1 2010-05-24  Gavin Barraclough  <barraclough@apple.com>
 
   3         Rubber Stamped by Sam Weinig.
 
   5         Accidentally committed double write of codeblock in Interpreter.
 
   7         * interpreter/Interpreter.cpp:
 
   8         (JSC::Interpreter::privateExecute):
 
  10 2010-05-24  Gavin Barraclough  <barraclough@apple.com>
 
  12         Reviewed by Sam Weinig.
 
  14         https://bugs.webkit.org/show_bug.cgi?id=39583
 
  15         Move creation of 'this' object from caller to callee in construction.
 
  17         Presently the caller of a constructor is responsible for providing a this
 
  18         object.  Instead, move the object creation into a new op_create_this opcode,
 
  19         planted in the head of the contructor bytecode for a function.  Since the
 
  20         prototype for the object is provided by performing a get_by_id on the callee,
 
  21         also add a new get_callee opcode (this is used to get the callee JSFunction
 
  22         into a register so that a normal get_by_id can be used).
 
  24         Currently the caller is also responsible for detecting when op_construct is
 
  25         performed on a JSFunction representing a host function, in which case an
 
  26         exception is thrown – and this check currently takes place when constructing
 
  27         the this object.  Instead, mirroring the recent changes for non-host functions,
 
  28         add a parallel code-path for native constructors to follow, with a thunk for
 
  29         invoking native constructors provided by JITStubs, and a constructor-specific
 
  30         NativeFunction on NativeExecutable.  Provide an implementation of a host
 
  31         constructor which will throw an exception.
 
  33         * bytecode/CodeBlock.cpp:
 
  34         (JSC::CodeBlock::dump):
 
  35         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
 
  36         * bytecode/CodeBlock.h:
 
  38         * bytecompiler/BytecodeGenerator.cpp:
 
  39         (JSC::BytecodeGenerator::BytecodeGenerator):
 
  40         (JSC::BytecodeGenerator::emitConstruct):
 
  41         * bytecompiler/BytecodeGenerator.h:
 
  42         (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
 
  43         * interpreter/Interpreter.cpp:
 
  44         (JSC::Interpreter::privateExecute):
 
  46         (JSC::JIT::privateCompileMainPass):
 
  49         (JSC::JIT::compileOpCall):
 
  50         (JSC::JIT::compileOpCallSlowCase):
 
  51         * jit/JITCall32_64.cpp:
 
  52         (JSC::JIT::compileOpCall):
 
  53         (JSC::JIT::compileOpCallSlowCase):
 
  55         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
  56         (JSC::JIT::privateCompileCTINativeCall):
 
  57         (JSC::JIT::emit_op_neq_null):
 
  58         (JSC::JIT::emit_op_convert_this):
 
  59         (JSC::JIT::emit_op_get_callee):
 
  60         (JSC::JIT::emit_op_create_this):
 
  61         * jit/JITOpcodes32_64.cpp:
 
  62         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
  63         (JSC::JIT::privateCompileCTINativeCall):
 
  64         (JSC::JIT::emit_op_get_callee):
 
  65         (JSC::JIT::emit_op_create_this):
 
  67         (JSC::DEFINE_STUB_FUNCTION):
 
  68         (JSC::JITThunks::hostFunctionStub):
 
  70         (JSC::JITThunks::ctiNativeConstruct):
 
  72         * runtime/ExceptionHelpers.cpp:
 
  73         (JSC::createNotAnObjectError):
 
  74         * runtime/Executable.h:
 
  75         (JSC::NativeExecutable::create):
 
  76         (JSC::NativeExecutable::NativeExecutable):
 
  77         * runtime/JSFunction.cpp:
 
  78         (JSC::callHostFunctionAsConstructor):
 
  79         * runtime/JSFunction.h:
 
  81 2010-05-23  Sam Weinig  <sam@webkit.org>
 
  85         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
  87 2010-05-23  Sam Weinig  <sam@webkit.org>
 
  89         Reviewed by Oliver Hunt.
 
  91         Fix for https://bugs.webkit.org/show_bug.cgi?id=39575
 
  92         Make JS DOMObject inherit from JSObjectWithGlobalObject instead of JSObject
 
  94         Expose the global object stored in JSObjectWithGlobalObject.
 
  97         * JavaScriptCore.xcodeproj/project.pbxproj:
 
  98         * runtime/JSObjectWithGlobalObject.cpp:
 
  99         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
 
 100         (JSC::JSObjectWithGlobalObject::globalObject):
 
 101         * runtime/JSObjectWithGlobalObject.h:
 
 103 2010-05-21  Oliver Hunt  <oliver@apple.com>
 
 105         "asm volatile" isn't valid outside of functions.
 
 107         Reviewed by Gavin Barraclough.
 
 111 2010-05-21  Gavin Barraclough  <barraclough@apple.com>
 
 113         Unreviewed build fix.
 
 115         Interpreter fix following r59974.
 
 117         * interpreter/Interpreter.cpp:
 
 118         (JSC::Interpreter::privateExecute):
 
 119         * runtime/JSPropertyNameIterator.cpp:
 
 120         (JSC::JSPropertyNameIterator::get):
 
 121         * runtime/JSPropertyNameIterator.h:
 
 123 2010-05-21  Gavin Barraclough  <barraclough@apple.com>
 
 125         Rubber stamped by Oliver Hunt.
 
 127         Interpreter fix following r59939.
 
 129         * interpreter/Interpreter.cpp:
 
 130         (JSC::Interpreter::privateExecute):
 
 132 2010-05-21  David Levin  <levin@chromium.org>
 
 134         Unreviewed build fix.
 
 136         * wtf/SizeLimits.cpp: Removed a check while I figure out how to write it properly.
 
 138 2010-05-21  David Levin  <levin@chromium.org>
 
 140         Reviewed by Darin Adler.
 
 142         Enforce size constraints on various data structures in JavaScriptCore/wtf.
 
 143         https://bugs.webkit.org/show_bug.cgi?id=39327
 
 145         I only modified the default build for OSX and Chromium's build file to include WTFCompileAsserts.cpp
 
 146         as those should be sufficient to catch regressions on the size of the data structures.
 
 148         * JavaScriptCore.gypi: Added the WTFCompileAsserts.cpp file.
 
 149         * JavaScriptCore.xcodeproj/project.pbxproj: Added the WTFCompileAsserts.cpp file.
 
 150         * runtime/UString.cpp: Added a compile assert for UString size.
 
 151         * wtf/SizeLimits.cpp: Added compile asserts for data structures that didn't have cpp files.
 
 152         * wtf/text/StringImpl.cpp: Added a compile assert for StringImpl size.
 
 154 2010-05-21  Gavin Barraclough  <barraclough@apple.com>
 
 156         Reviewed by Oliver Hunt.
 
 158         Bug 39509 - Exceptions raised when JSString::value() is called not always properly thrown.
 
 159         Missing some CHECK_FOR_EXCEPTION()s, cleanup NativeError construction (adding a property
 
 160         via the prototype was inefficient, and whilst trivially true that the property is is not
 
 161         a rope - and thus couldn't except - it would be hard to prove this).
 
 163         * interpreter/Interpreter.cpp:
 
 164         (JSC::Interpreter::callEval):
 
 165         (JSC::Interpreter::privateExecute):
 
 167         (JSC::DEFINE_STUB_FUNCTION):
 
 168         * runtime/InternalFunction.cpp:
 
 169         (JSC::InternalFunction::name):
 
 170         (JSC::InternalFunction::displayName):
 
 171         * runtime/JSFunction.cpp:
 
 172         (JSC::JSFunction::name):
 
 173         (JSC::JSFunction::displayName):
 
 174         * runtime/JSGlobalObject.cpp:
 
 175         (JSC::JSGlobalObject::reset):
 
 176         * runtime/JSPropertyNameIterator.cpp:
 
 177         * runtime/JSPropertyNameIterator.h:
 
 178         * runtime/JSString.h:
 
 179         (JSC::RopeBuilder::tryGetValue):
 
 180         (JSC::JSString::getIndex):
 
 181         * runtime/NativeErrorConstructor.cpp:
 
 182         (JSC::NativeErrorConstructor::NativeErrorConstructor):
 
 183         * runtime/NativeErrorConstructor.h:
 
 184         * runtime/NativeErrorPrototype.cpp:
 
 185         (JSC::NativeErrorPrototype::NativeErrorPrototype):
 
 186         * runtime/NativeErrorPrototype.h:
 
 187         * runtime/StringPrototype.cpp:
 
 188         (JSC::stringProtoFuncReplace):
 
 190 2010-05-21  Gavin Barraclough  <barraclough@apple.com>
 
 192         Reviewed by NOBODY (build fix).
 
 194         Fix interpreter build.
 
 196         * interpreter/Interpreter.cpp:
 
 197         (JSC::Interpreter::privateExecute):
 
 199 2010-05-21  Geoffrey Garen  <ggaren@apple.com>
 
 201         Reviewed by Gavin Barraclough.
 
 203         Split out JITCall32_64.cpp, and tightened up some #ifdefs in the hopes
 
 204         of improving compile times.
 
 205         https://bugs.webkit.org/show_bug.cgi?id=39507
 
 207         * JavaScriptCore.xcodeproj/project.pbxproj:
 
 209         * jit/JITArithmetic.cpp:
 
 210         * jit/JITArithmetic32_64.cpp:
 
 212         * jit/JITCall32_64.cpp: Copied from jit/JITCall.cpp.
 
 213         * jit/JITOpcodes.cpp:
 
 214         * jit/JITOpcodes32_64.cpp:
 
 215         * jit/JITPropertyAccess.cpp:
 
 216         * jit/JITPropertyAccess32_64.cpp:
 
 219 2010-05-21  Csaba Osztrogonác  <ossy@webkit.org>
 
 221         Unreviewed buildfix for Qt after r59941.
 
 223         * JavaScriptCore.pro: missing runtime/JSObjectWithGlobalObject.cpp added to SOURCES.
 
 225 2010-05-21  Oliver Hunt  <oliver@apple.com>
 
 229         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
 231 2010-05-21  Oliver Hunt  <oliver@apple.com>
 
 235         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
 237 2010-05-21  Oliver Hunt  <oliver@apple.com>
 
 241         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
 243 2010-05-21  Oliver Hunt  <oliver@apple.com>
 
 245         Reviewed by Geoffrey Garen.
 
 247         All callable objects should have a global object reference
 
 248         https://bugs.webkit.org/show_bug.cgi?id=39495
 
 250         All objects that may ever return a value other CallTypeNone
 
 251         or ConstructTypeNone now get a global object in their constructor
 
 252         and store that in their first anonymous slot.  We add a new type
 
 253         JSObjectWithGlobalObject to allow us to share this logic as much
 
 254         as possible, however some objects have specific inheritance 
 
 255         requirements so we can't just use it universally.
 
 257         To enforce this requirement JSValue::getCallData and getConstructData
 
 258         make use of a new "isValidCallee" function to assert that any object
 
 259         that returns a value other than CallType/ConstructTypeNone has a
 
 260         global object in anonymous slot 0.
 
 262         In order to ensure that static function slots are converted into
 
 263         function objects with the correct global object, all prototype objects
 
 264         and other classes with static function slots also gain a global object
 
 265         reference.  Happily this fixes the long standing issue where host
 
 266         function objects get a prototype from the lexical global object of the
 
 267         first function that calls them, instead of the global object that they
 
 270         * API/JSCallbackConstructor.cpp:
 
 271         (JSC::JSCallbackConstructor::JSCallbackConstructor):
 
 272         * API/JSCallbackConstructor.h:
 
 273         * API/JSCallbackFunction.cpp:
 
 274         (JSC::JSCallbackFunction::JSCallbackFunction):
 
 275         * API/JSCallbackFunction.h:
 
 276         * API/JSCallbackObject.cpp:
 
 278         * API/JSCallbackObject.h:
 
 279         * API/JSCallbackObjectFunctions.h:
 
 280         (JSC::::JSCallbackObject):
 
 281         (JSC::::staticFunctionGetter):
 
 282         * API/JSClassRef.cpp:
 
 283         (OpaqueJSClass::prototype):
 
 284         * API/JSContextRef.cpp:
 
 285         * API/JSObjectRef.cpp:
 
 287         (JSObjectMakeFunctionWithCallback):
 
 288         (JSObjectMakeConstructor):
 
 289         (JSObjectGetPrivate):
 
 290         (JSObjectSetPrivate):
 
 291         (JSObjectGetPrivateProperty):
 
 292         (JSObjectSetPrivateProperty):
 
 293         (JSObjectDeletePrivateProperty):
 
 294         * API/JSValueRef.cpp:
 
 295         (JSValueIsObjectOfClass):
 
 296         * API/JSWeakObjectMapRefPrivate.cpp:
 
 299         * JavaScriptCore.exp:
 
 300         * JavaScriptCore.gypi:
 
 301         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
 302         * JavaScriptCore.xcodeproj/project.pbxproj:
 
 303         * interpreter/Interpreter.cpp:
 
 304         (JSC::Interpreter::privateExecute):
 
 306         (JSC::DEFINE_STUB_FUNCTION):
 
 308         (GlobalObject::GlobalObject):
 
 309         * runtime/ArrayConstructor.cpp:
 
 310         (JSC::ArrayConstructor::ArrayConstructor):
 
 311         * runtime/ArrayConstructor.h:
 
 312         * runtime/ArrayPrototype.cpp:
 
 313         (JSC::ArrayPrototype::ArrayPrototype):
 
 314         * runtime/ArrayPrototype.h:
 
 315         (JSC::ArrayPrototype::createStructure):
 
 316         * runtime/BooleanConstructor.cpp:
 
 317         (JSC::BooleanConstructor::BooleanConstructor):
 
 318         * runtime/BooleanConstructor.h:
 
 319         * runtime/BooleanPrototype.cpp:
 
 320         (JSC::BooleanPrototype::BooleanPrototype):
 
 321         * runtime/BooleanPrototype.h:
 
 322         * runtime/DateConstructor.cpp:
 
 323         (JSC::DateConstructor::DateConstructor):
 
 324         * runtime/DateConstructor.h:
 
 325         * runtime/DatePrototype.cpp:
 
 326         (JSC::DatePrototype::DatePrototype):
 
 327         * runtime/DatePrototype.h:
 
 328         * runtime/ErrorConstructor.cpp:
 
 329         (JSC::ErrorConstructor::ErrorConstructor):
 
 330         * runtime/ErrorConstructor.h:
 
 331         * runtime/ErrorPrototype.cpp:
 
 332         (JSC::ErrorPrototype::ErrorPrototype):
 
 333         * runtime/ErrorPrototype.h:
 
 334         * runtime/FunctionConstructor.cpp:
 
 335         (JSC::FunctionConstructor::FunctionConstructor):
 
 336         * runtime/FunctionConstructor.h:
 
 337         * runtime/FunctionPrototype.cpp:
 
 338         (JSC::FunctionPrototype::FunctionPrototype):
 
 339         (JSC::FunctionPrototype::addFunctionProperties):
 
 340         * runtime/FunctionPrototype.h:
 
 341         * runtime/GlobalEvalFunction.cpp:
 
 342         (JSC::GlobalEvalFunction::GlobalEvalFunction):
 
 343         * runtime/GlobalEvalFunction.h:
 
 344         * runtime/InternalFunction.cpp:
 
 345         (JSC::InternalFunction::InternalFunction):
 
 346         * runtime/InternalFunction.h:
 
 348         (JSC::JSValue::getCallData):
 
 349         (JSC::JSValue::getConstructData):
 
 350         * runtime/JSFunction.cpp:
 
 351         (JSC::JSFunction::JSFunction):
 
 352         * runtime/JSFunction.h:
 
 353         * runtime/JSGlobalObject.cpp:
 
 354         (JSC::JSGlobalObject::reset):
 
 355         * runtime/JSGlobalObject.h:
 
 356         (JSC::JSGlobalObject::JSGlobalObject):
 
 357         * runtime/JSONObject.cpp:
 
 358         (JSC::JSONObject::JSONObject):
 
 359         * runtime/JSONObject.h:
 
 360         * runtime/JSObject.h:
 
 361         * runtime/JSObjectWithGlobalObject.cpp: Added.
 
 362         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
 
 363         * runtime/JSObjectWithGlobalObject.h: Added.
 
 364         (JSC::JSObjectWithGlobalObject::createStructure):
 
 365         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
 
 366         * runtime/JSValue.cpp:
 
 367         (JSC::JSValue::isValidCallee):
 
 369         * runtime/Lookup.cpp:
 
 370         (JSC::setUpStaticFunctionSlot):
 
 371         * runtime/MathObject.cpp:
 
 372         (JSC::MathObject::MathObject):
 
 373         * runtime/MathObject.h:
 
 374         * runtime/NativeErrorConstructor.cpp:
 
 375         (JSC::NativeErrorConstructor::NativeErrorConstructor):
 
 376         * runtime/NativeErrorConstructor.h:
 
 377         * runtime/NativeErrorPrototype.cpp:
 
 378         (JSC::NativeErrorPrototype::NativeErrorPrototype):
 
 379         * runtime/NativeErrorPrototype.h:
 
 380         * runtime/NumberConstructor.cpp:
 
 381         (JSC::NumberConstructor::NumberConstructor):
 
 382         * runtime/NumberConstructor.h:
 
 383         * runtime/NumberPrototype.cpp:
 
 384         (JSC::NumberPrototype::NumberPrototype):
 
 385         * runtime/NumberPrototype.h:
 
 386         * runtime/ObjectConstructor.cpp:
 
 387         (JSC::ObjectConstructor::ObjectConstructor):
 
 388         * runtime/ObjectConstructor.h:
 
 389         * runtime/ObjectPrototype.cpp:
 
 390         (JSC::ObjectPrototype::ObjectPrototype):
 
 391         * runtime/ObjectPrototype.h:
 
 392         * runtime/PrototypeFunction.cpp:
 
 393         (JSC::PrototypeFunction::PrototypeFunction):
 
 394         * runtime/PrototypeFunction.h:
 
 395         * runtime/RegExpConstructor.cpp:
 
 396         (JSC::RegExpConstructor::RegExpConstructor):
 
 397         (JSC::constructRegExp):
 
 398         * runtime/RegExpConstructor.h:
 
 399         * runtime/RegExpObject.cpp:
 
 400         (JSC::RegExpObject::RegExpObject):
 
 401         * runtime/RegExpObject.h:
 
 402         * runtime/RegExpPrototype.cpp:
 
 403         (JSC::RegExpPrototype::RegExpPrototype):
 
 404         * runtime/RegExpPrototype.h:
 
 405         * runtime/StringConstructor.cpp:
 
 406         (JSC::StringConstructor::StringConstructor):
 
 407         * runtime/StringConstructor.h:
 
 408         * runtime/StringPrototype.cpp:
 
 409         (JSC::StringPrototype::StringPrototype):
 
 410         * runtime/StringPrototype.h:
 
 412 2010-05-21  Geoffrey Garen  <ggaren@apple.com>
 
 414         Reviewed by Oliver Hunt.
 
 416         Removed the unused entry in the CallFrame
 
 417         https://bugs.webkit.org/show_bug.cgi?id=39470
 
 419         Removed the unused entry in the CallFrame, and reordered CallFrame
 
 420         writes on the hot path to be in forwards order.
 
 422         SunSpider says 0.3% faster.
 
 424         * interpreter/RegisterFile.h:
 
 425         (JSC::RegisterFile::):
 
 427         (JSC::JIT::compileOpCall):
 
 429 2010-05-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
 431         Reviewed by Kenneth Rohde Christiansen.
 
 433         Split the QScriptValue autotest into smaller chunks.
 
 435         File tst_qscriptvalue_generated.cpp was huge and it was difficult to compile
 
 436         it with MSVS2008, because of the code optimization.
 
 438         Tests were splited into a few files for better use of distributed
 
 440         Repeated calls to insert() and operator<<() where replaced by loops,
 
 441         that should reduce time of code optimizing.
 
 443         New files were generated by the same application, test logic wasn't changed.
 
 445         [Qt] The QScriptValue autotest should be refactored.
 
 446         https://bugs.webkit.org/show_bug.cgi?id=38987
 
 448         * qt/tests/qscriptvalue/qscriptvalue.pro:
 
 449         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
 450         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Removed.
 
 451         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_init.cpp: Added.
 
 452         (tst_QScriptValue::initScriptValues):
 
 453         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_istype.cpp: Added.
 
 454         (tst_QScriptValue::isValid_initData):
 
 455         (tst_QScriptValue::isValid_makeData):
 
 456         (tst_QScriptValue::isValid_test):
 
 457         (tst_QScriptValue::isBool_initData):
 
 458         (tst_QScriptValue::isBool_makeData):
 
 459         (tst_QScriptValue::isBool_test):
 
 460         (tst_QScriptValue::isBoolean_initData):
 
 461         (tst_QScriptValue::isBoolean_makeData):
 
 462         (tst_QScriptValue::isBoolean_test):
 
 463         (tst_QScriptValue::isNumber_initData):
 
 464         (tst_QScriptValue::isNumber_makeData):
 
 465         (tst_QScriptValue::isNumber_test):
 
 466         (tst_QScriptValue::isFunction_initData):
 
 467         (tst_QScriptValue::isFunction_makeData):
 
 468         (tst_QScriptValue::isFunction_test):
 
 469         (tst_QScriptValue::isNull_initData):
 
 470         (tst_QScriptValue::isNull_makeData):
 
 471         (tst_QScriptValue::isNull_test):
 
 472         (tst_QScriptValue::isString_initData):
 
 473         (tst_QScriptValue::isString_makeData):
 
 474         (tst_QScriptValue::isString_test):
 
 475         (tst_QScriptValue::isUndefined_initData):
 
 476         (tst_QScriptValue::isUndefined_makeData):
 
 477         (tst_QScriptValue::isUndefined_test):
 
 478         (tst_QScriptValue::isObject_initData):
 
 479         (tst_QScriptValue::isObject_makeData):
 
 480         (tst_QScriptValue::isObject_test):
 
 481         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_totype.cpp: Added.
 
 482         (tst_QScriptValue::toString_initData):
 
 483         (tst_QScriptValue::toString_makeData):
 
 484         (tst_QScriptValue::toString_test):
 
 485         (tst_QScriptValue::toNumber_initData):
 
 486         (tst_QScriptValue::toNumber_makeData):
 
 487         (tst_QScriptValue::toNumber_test):
 
 488         (tst_QScriptValue::toBool_initData):
 
 489         (tst_QScriptValue::toBool_makeData):
 
 490         (tst_QScriptValue::toBool_test):
 
 491         (tst_QScriptValue::toBoolean_initData):
 
 492         (tst_QScriptValue::toBoolean_makeData):
 
 493         (tst_QScriptValue::toBoolean_test):
 
 494         (tst_QScriptValue::toInteger_initData):
 
 495         (tst_QScriptValue::toInteger_makeData):
 
 496         (tst_QScriptValue::toInteger_test):
 
 497         (tst_QScriptValue::toInt32_initData):
 
 498         (tst_QScriptValue::toInt32_makeData):
 
 499         (tst_QScriptValue::toInt32_test):
 
 500         (tst_QScriptValue::toUInt32_initData):
 
 501         (tst_QScriptValue::toUInt32_makeData):
 
 502         (tst_QScriptValue::toUInt32_test):
 
 503         (tst_QScriptValue::toUInt16_initData):
 
 504         (tst_QScriptValue::toUInt16_makeData):
 
 505         (tst_QScriptValue::toUInt16_test):
 
 507 2010-05-21  Kwang Yul Seo  <skyul@company100.net>
 
 509         Reviewed by Eric Seidel.
 
 511         Add COMPILER(MSVC) guard for strnstr
 
 512         https://bugs.webkit.org/show_bug.cgi?id=39397
 
 514         BREWMP uses MSVC for simulator build, but it is not OS(WINDOWS).
 
 515         Add COMPILER(MSVC) guard for strnstr.
 
 517         * wtf/StringExtras.h:
 
 519 2010-05-21  Kwang Yul Seo  <skyul@company100.net>
 
 521         Reviewed by Eric Seidel.
 
 523         [BREWMP] Add !PLATFORM(BREWMP) guard for isMainThread
 
 524         https://bugs.webkit.org/show_bug.cgi?id=39396
 
 526         BREWMP sets ENABLE(SINGLE_THREADED), so it uses isMainThread from ThreadingNone.cpp.
 
 527         Exclude isMainThread in MainThread.cpp.
 
 529         * wtf/MainThread.cpp:
 
 531 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
 
 533         Reviewed by Eric Seidel.
 
 535         [BREWMP] Use skia as BREW MP's graphics backend.
 
 536         https://bugs.webkit.org/show_bug.cgi?id=39407
 
 538         Define WTF_PLATFORM_SKIA=1 for BREW MP.
 
 542 2010-05-20  Geoffrey Garen  <ggaren@apple.com>
 
 544         Reviewed by Beth Dakin.
 
 546         Fixed naming mixup: it's op_call_put_result, not ret_result.
 
 548         * bytecode/CodeBlock.cpp:
 
 549         (JSC::CodeBlock::dump):
 
 550         * interpreter/Interpreter.cpp:
 
 551         (JSC::Interpreter::privateExecute):
 
 553 2010-05-20  Geoffrey Garen  <ggaren@apple.com>
 
 555         Reviewed by Oliver Hunt.
 
 557         Whittling away at CodeBlock use: Removed a little wonkiness in closure lookup
 
 558         https://bugs.webkit.org/show_bug.cgi?id=39444
 
 560         Calculate all lookup depths at compile time. I'm not sure why we couldn't
 
 561         do this before, but whatever the reason, it seems to be gone now.
 
 563         * bytecompiler/BytecodeGenerator.cpp:
 
 564         (JSC::BytecodeGenerator::findScopedProperty):
 
 565         * bytecompiler/BytecodeGenerator.h:
 
 566         * interpreter/Interpreter.cpp:
 
 567         (JSC::Interpreter::resolveSkip):
 
 568         (JSC::Interpreter::resolveGlobalDynamic):
 
 569         (JSC::Interpreter::privateExecute):
 
 570         * jit/JITOpcodes.cpp:
 
 571         (JSC::JIT::emit_op_get_scoped_var):
 
 572         (JSC::JIT::emit_op_put_scoped_var):
 
 573         (JSC::JIT::emit_op_resolve_skip):
 
 574         (JSC::JIT::emit_op_resolve_global_dynamic):
 
 575         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
 
 576         * jit/JITOpcodes32_64.cpp:
 
 577         (JSC::JIT::emit_op_get_scoped_var):
 
 578         (JSC::JIT::emit_op_put_scoped_var):
 
 579         (JSC::JIT::emit_op_resolve_skip):
 
 581 2010-05-20  Darin Adler  <darin@apple.com>
 
 583         Reviewed by Eric Seidel.
 
 585         Fix warnings seen on the buildbots today
 
 586         https://bugs.webkit.org/show_bug.cgi?id=39368
 
 588         * profiler/ProfileNode.cpp:
 
 589         (JSC::getCount): Removed unneeded initialization of global variable.
 
 590         These are all initialized to zero anyway, so no need to try to initialize
 
 591         it and get a warning.
 
 593         * wtf/CurrentTime.cpp:
 
 594         (WTF::currentTime): Removed unused global variable.
 
 596 2010-05-20  Geoffrey Garen  <ggaren@apple.com>
 
 598         Reviewed by Darin Adler.
 
 600         Removed some reliance on callFame[CodeBlock] by storing CodeBlock in a
 
 601         local variable in the Interpreter.
 
 602         https://bugs.webkit.org/show_bug.cgi?id=39447
 
 604         Small speedup on SunSpider in Interpreter mode.
 
 606         * interpreter/Interpreter.cpp:
 
 607         (JSC::Interpreter::privateExecute):
 
 611 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 613         Reviewed by Oliver Hunt.
 
 615         Bug 39408 - Unify JIT/interpreter return behaviour.
 
 617         Presently the JIT and the interpreter have differing implementations in how
 
 618         they handle storing the result of a function call back to the register file.
 
 619         In both cases the op_call ( / _eval / _varargs / op_construct) opcode has an
 
 620         operand indicating the VM register in which the result should be stored.
 
 621         The JIT plants code after the call to store the result, so the value will be
 
 622         stored as soon as the callee has returned.  In the interpreter the call
 
 623         passes the return value register id into the callee via the callee callframe,
 
 624         and the callee is responsible for writing the result back into its callers
 
 625         register file after it has restored the parents callframe pointer, but before
 
 628         Instead, move the task of writing the call result to the register file into a
 
 629         new opcode (op_call_put_result), and after returning the callee should leave
 
 630         the return value in a canonical location.  In the case of the interpreter,
 
 631         this canonical location is a local variable in privateExecute
 
 632         (functionReturnValue), in the case of the JIT this is the normal return value
 
 633         registers (regT0, or regT1:regT0 in JSVALUE32_64).  op_call_put_result stores
 
 634         the result from the canonical location to the registerfile.
 
 636         In addition to unifying JIT & interpreter behaviour this change allows us to
 
 637         remove a slot from the callframe, omit the write of the result where the
 
 638         return value from the call is not used, and provides a 2% speedup on sunspider
 
 641         * bytecode/CodeBlock.cpp:
 
 642         (JSC::CodeBlock::dump):
 
 644         * bytecompiler/BytecodeGenerator.cpp:
 
 645         (JSC::BytecodeGenerator::emitCall):
 
 646         (JSC::BytecodeGenerator::emitCallVarargs):
 
 647         (JSC::BytecodeGenerator::emitConstruct):
 
 648         * bytecompiler/BytecodeGenerator.h:
 
 649         (JSC::BytecodeGenerator::finalDestinationOrIgnored):
 
 650         * bytecompiler/NodesCodegen.cpp:
 
 651         (JSC::NewExprNode::emitBytecode):
 
 652         (JSC::FunctionCallValueNode::emitBytecode):
 
 653         (JSC::FunctionCallResolveNode::emitBytecode):
 
 654         (JSC::FunctionCallBracketNode::emitBytecode):
 
 655         (JSC::FunctionCallDotNode::emitBytecode):
 
 656         (JSC::CallFunctionCallDotNode::emitBytecode):
 
 657         (JSC::ApplyFunctionCallDotNode::emitBytecode):
 
 658         * interpreter/CallFrame.h:
 
 659         (JSC::ExecState::init):
 
 660         (JSC::ExecState::noCaller):
 
 661         * interpreter/Interpreter.cpp:
 
 662         (JSC::Interpreter::dumpRegisters):
 
 663         (JSC::Interpreter::throwException):
 
 664         (JSC::Interpreter::privateExecute):
 
 665         * interpreter/RegisterFile.h:
 
 666         (JSC::RegisterFile::):
 
 668         (JSC::JIT::privateCompileMainPass):
 
 671         (JSC::JIT::compileOpCallSetupArgs):
 
 672         (JSC::JIT::compileOpConstructSetupArgs):
 
 673         (JSC::JIT::emit_op_call_put_result):
 
 674         (JSC::JIT::compileOpCallVarargs):
 
 675         (JSC::JIT::compileOpCallVarargsSlowCase):
 
 676         (JSC::JIT::compileOpCall):
 
 677         (JSC::JIT::compileOpCallSlowCase):
 
 678         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
 680 2010-05-20  Steve Block  <steveblock@google.com>
 
 682         Reviewed by Jeremy Orlow.
 
 684         Provide bindings for DeviceOrientation
 
 685         https://bugs.webkit.org/show_bug.cgi?id=39210
 
 687         Adds ENABLE_DEVICE_ORIENTATION to XCode project file, always disabled.
 
 689         * Configurations/FeatureDefines.xcconfig:
 
 691 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 693         Reviewed by Geoff Garen.
 
 695         Errk! rename op_constructor_ret as requested in review of Bug 39399.
 
 697         * bytecode/CodeBlock.cpp:
 
 698         (JSC::CodeBlock::dump):
 
 700         * bytecompiler/BytecodeGenerator.cpp:
 
 701         (JSC::BytecodeGenerator::emitReturn):
 
 702         * interpreter/Interpreter.cpp:
 
 703         (JSC::Interpreter::privateExecute):
 
 705         (JSC::JIT::privateCompileMainPass):
 
 708         (JSC::JIT::emit_op_ret_object_or_this):
 
 709         * jit/JITOpcodes.cpp:
 
 710         (JSC::JIT::emit_op_ret_object_or_this):
 
 712 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 714         Reviewed by Geoff Garen.
 
 716         Bug 39399 - Move responsibility for verifying constructors return objects from the caller to the callee.
 
 718         This is a necessary step to move object creation from caller to callee.
 
 720         * bytecode/CodeBlock.cpp:
 
 721         (JSC::CodeBlock::dump):
 
 723         * bytecompiler/BytecodeGenerator.cpp:
 
 724         (JSC::BytecodeGenerator::BytecodeGenerator):
 
 725         (JSC::BytecodeGenerator::emitReturn):
 
 726         (JSC::BytecodeGenerator::emitConstruct):
 
 727         * bytecompiler/BytecodeGenerator.h:
 
 728         (JSC::BytecodeGenerator::isConstructor):
 
 729         * bytecompiler/NodesCodegen.cpp:
 
 730         (JSC::FunctionBodyNode::emitBytecode):
 
 731         * interpreter/Interpreter.cpp:
 
 732         (JSC::Interpreter::privateExecute):
 
 734         (JSC::JIT::privateCompileMainPass):
 
 735         (JSC::JIT::privateCompileSlowCases):
 
 738         (JSC::JIT::emit_op_constructor_ret):
 
 739         * jit/JITOpcodes.cpp:
 
 740         (JSC::JIT::emit_op_constructor_ret):
 
 742 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 744         Reviewed by NOBODY (build fix).
 
 746         Fix windows build II.
 
 748         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
 750 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 752         Reviewed by NOBODY (build fix).
 
 756         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
 758 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 760         Reviewed by Oliver Hunt.
 
 762         Bug 39393 - JSFunction need not be a subclass of InternalFunction.
 
 766         * JavaScriptCore.exp:
 
 767         * interpreter/Interpreter.cpp:
 
 768         (JSC::Interpreter::retrieveCaller):
 
 769         (JSC::Interpreter::findFunctionCallFrame):
 
 770         * interpreter/Interpreter.h:
 
 771         * profiler/Profiler.cpp:
 
 772         (JSC::Profiler::createCallIdentifier):
 
 773         * runtime/FunctionPrototype.cpp:
 
 774         (JSC::functionProtoFuncToString):
 
 775         * runtime/JSFunction.cpp:
 
 777         (JSC::JSFunction::JSFunction):
 
 778         (JSC::JSFunction::name):
 
 779         (JSC::JSFunction::displayName):
 
 780         (JSC::JSFunction::calculatedDisplayName):
 
 781         * runtime/JSFunction.h:
 
 782         * runtime/JSObject.cpp:
 
 783         (JSC::JSObject::putDirectFunction):
 
 784         (JSC::JSObject::putDirectFunctionWithoutTransition):
 
 785         * runtime/JSObject.h:
 
 786         * runtime/Lookup.cpp:
 
 787         (JSC::setUpStaticFunctionSlot):
 
 789 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 791         Reviewed by NOBODY (build fix).
 
 793         Reverting r59800, this b0rked stuff.
 
 795         * JavaScriptCore.exp:
 
 796         * interpreter/Interpreter.cpp:
 
 797         (JSC::Interpreter::retrieveCaller):
 
 798         (JSC::Interpreter::findFunctionCallFrame):
 
 799         * interpreter/Interpreter.h:
 
 800         * profiler/Profiler.cpp:
 
 801         (JSC::Profiler::createCallIdentifier):
 
 802         * runtime/FunctionPrototype.cpp:
 
 803         (JSC::functionProtoFuncToString):
 
 804         * runtime/JSFunction.cpp:
 
 806         (JSC::JSFunction::JSFunction):
 
 807         * runtime/JSFunction.h:
 
 808         * runtime/JSObject.cpp:
 
 809         * runtime/JSObject.h:
 
 810         * runtime/Lookup.cpp:
 
 811         (JSC::setUpStaticFunctionSlot):
 
 813 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
 
 815         Reviewed by Oliver Hunt.
 
 817         Bug 39393 - JSFunction need not be a subclass of InternalFunction.
 
 819         This may prevent us from introducing a more useful parent class to
 
 820         JSFunction, e.g. a JSObject that holds an executable, which could
 
 821         also reference an eval or program executable.
 
 823         * JavaScriptCore.exp:
 
 824         * interpreter/Interpreter.cpp:
 
 825         (JSC::Interpreter::retrieveCaller):
 
 826         (JSC::Interpreter::findFunctionCallFrame):
 
 827         * interpreter/Interpreter.h:
 
 828         * profiler/Profiler.cpp:
 
 829         (JSC::Profiler::createCallIdentifier):
 
 830         * runtime/FunctionPrototype.cpp:
 
 831         (JSC::functionProtoFuncToString):
 
 832         * runtime/JSFunction.cpp:
 
 834         (JSC::JSFunction::JSFunction):
 
 835         (JSC::JSFunction::name):
 
 836         (JSC::JSFunction::displayName):
 
 837         (JSC::JSFunction::calculatedDisplayName):
 
 838         * runtime/JSFunction.h:
 
 839         * runtime/JSObject.cpp:
 
 840         (JSC::JSObject::putDirectFunction):
 
 841         (JSC::JSObject::putDirectFunctionWithoutTransition):
 
 842         * runtime/JSObject.h:
 
 843         * runtime/Lookup.cpp:
 
 844         (JSC::setUpStaticFunctionSlot):
 
 846 2010-05-19  Oliver Hunt  <oliver@apple.com>
 
 848         Reviewed by Geoffrey Garen.
 
 850         emitJumpIfNotJSCell should special case constant immediate values
 
 851         https://bugs.webkit.org/show_bug.cgi?id=39392
 
 852         <rdar://problem/8001324>
 
 854         Make emitJumpSlowCaseIfNotJSCell special case constant immediate
 
 855         values, in addition to the immediate JSCell optimisation.
 
 857         Also add assertions to make sure no one else produces code that
 
 858         attempts to load constants from the register file.
 
 860         * jit/JITInlineMethods.h:
 
 861         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
 
 862         * jit/JSInterfaceJIT.h:
 
 863         (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
 
 864         (JSC::JSInterfaceJIT::emitLoadInt32):
 
 865         (JSC::JSInterfaceJIT::tagFor):
 
 866         (JSC::JSInterfaceJIT::payloadFor):
 
 867         (JSC::JSInterfaceJIT::emitLoadDouble):
 
 868         (JSC::JSInterfaceJIT::addressFor):
 
 869         * jit/ThunkGenerators.cpp:
 
 871 2010-05-19  Geoffrey Garen  <ggaren@apple.com>
 
 873         Reviewed by Sam Weinig.
 
 875         Slight refactoring to CodeBlock bytecode access
 
 876         https://bugs.webkit.org/show_bug.cgi?id=39384
 
 878         * bytecode/CodeBlock.h:
 
 879         (JSC::CodeBlock::bytecodeOffset):
 
 880         * interpreter/CallFrame.h:
 
 881         (JSC::ExecState::returnPC):
 
 882         * interpreter/Interpreter.cpp:
 
 883         (JSC::Interpreter::unwindCallFrame):
 
 884         (JSC::Interpreter::retrieveLastCaller): Moved bytecode access into a
 
 885         CodeBlock helper function. Changed CallFrame to accurately represent
 
 886         how the returnPC is stored in JIT vs Interpreter.
 
 888 2010-05-19  Geoffrey Garen  <ggaren@apple.com>
 
 890         Reviewed by Sam Weinig.
 
 892         Don't build the Interpreter into JIT builds.
 
 893         https://bugs.webkit.org/show_bug.cgi?id=39373
 
 895         SunSpider says no change.
 
 897         * interpreter/Interpreter.cpp:
 
 898         (JSC::Interpreter::privateExecute):
 
 899         * interpreter/Interpreter.h:
 
 902 2010-05-19  Geoffrey Garen  <ggaren@apple.com>
 
 904         Reviewed by Gavin Barraclough.
 
 906         Standardized naming: "bytecode offset" wins; "bytecode index" loses.
 
 908         Also renamed getBytecodeOffset to bytecodeOffset, to match the WebKit
 
 911         * bytecode/CodeBlock.h:
 
 912         (JSC::CallReturnOffsetToBytecodeOffset::CallReturnOffsetToBytecodeOffset):
 
 913         (JSC::getCallReturnOffset):
 
 914         (JSC::CodeBlock::bytecodeOffset):
 
 915         (JSC::CodeBlock::callReturnIndexVector):
 
 916         * interpreter/Interpreter.cpp:
 
 917         (JSC::bytecodeOffsetForPC):
 
 920         (JSC::JIT::privateCompileMainPass):
 
 921         (JSC::JIT::privateCompileLinkPass):
 
 922         (JSC::JIT::privateCompileSlowCases):
 
 923         (JSC::JIT::privateCompile):
 
 925         (JSC::CallRecord::CallRecord):
 
 926         (JSC::JumpTable::JumpTable):
 
 927         (JSC::SwitchRecord::SwitchRecord):
 
 929         (JSC::JIT::compileOpCallVarargsSlowCase):
 
 930         (JSC::JIT::compileOpCall):
 
 931         * jit/JITInlineMethods.h:
 
 932         (JSC::JIT::emitNakedCall):
 
 933         (JSC::JIT::addSlowCase):
 
 935         (JSC::JIT::emitJumpSlowToHot):
 
 936         (JSC::JIT::isLabeled):
 
 939         (JSC::JIT::isMapped):
 
 940         (JSC::JIT::getMappedPayload):
 
 941         (JSC::JIT::getMappedTag):
 
 942         (JSC::JIT::emitGetVirtualRegister):
 
 943         * jit/JITOpcodes.cpp:
 
 944         (JSC::JIT::emit_op_switch_imm):
 
 945         (JSC::JIT::emit_op_switch_char):
 
 946         (JSC::JIT::emit_op_switch_string):
 
 947         (JSC::JIT::emit_op_new_error):
 
 948         * jit/JITOpcodes32_64.cpp:
 
 949         (JSC::JIT::emit_op_mov):
 
 950         (JSC::JIT::emit_op_get_global_var):
 
 951         (JSC::JIT::emit_op_put_global_var):
 
 952         (JSC::JIT::emit_op_get_scoped_var):
 
 953         (JSC::JIT::emit_op_put_scoped_var):
 
 954         (JSC::JIT::emit_op_to_primitive):
 
 955         (JSC::JIT::emit_op_resolve_global):
 
 956         (JSC::JIT::emit_op_to_jsnumber):
 
 957         (JSC::JIT::emit_op_catch):
 
 958         (JSC::JIT::emit_op_switch_imm):
 
 959         (JSC::JIT::emit_op_switch_char):
 
 960         (JSC::JIT::emit_op_switch_string):
 
 961         (JSC::JIT::emit_op_new_error):
 
 962         (JSC::JIT::emit_op_convert_this):
 
 963         * jit/JITPropertyAccess.cpp:
 
 964         (JSC::JIT::emit_op_method_check):
 
 965         (JSC::JIT::emitSlow_op_method_check):
 
 966         * jit/JITPropertyAccess32_64.cpp:
 
 967         (JSC::JIT::emit_op_method_check):
 
 968         (JSC::JIT::emitSlow_op_method_check):
 
 969         (JSC::JIT::emit_op_get_by_val):
 
 970         (JSC::JIT::emit_op_get_by_id):
 
 971         (JSC::JIT::emit_op_get_by_pname):
 
 973         (JSC::JITStubCall::call):
 
 975         (JSC::DEFINE_STUB_FUNCTION):
 
 977 2010-05-19  Peter Varga  <pvarga@inf.u-szeged.hu>
 
 979         Reviewed by Darin Adler.
 
 981         The backtrackParenthesesOnceEnd function should store the start position
 
 982         of the subpattern's non-greedy match at the place of the subpattern's
 
 983         start index in the output array instead of the place of the
 
 984         subpattern's end index.
 
 985         Add layout test for checking of non-greedy matching of subpattern in
 
 987         https://bugs.webkit.org/show_bug.cgi?id=39289
 
 989         * yarr/RegexInterpreter.cpp:
 
 990         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
 
 992 2010-05-18  Gavin Barraclough  <barraclough@apple.com>
 
 994         Reviewed by Geoff Garen.
 
 996         Bug 39343 - Dynamically generate a native call thunk per NativeFunction
 
 998         https://bugs.webkit.org/show_bug.cgi?id=39252 regressed performance on i386,
 
 999         by adding an extra indirection to making a native call.  By introducing per-
 
1000         NativeFunction thunks we can hard code the function pointer into the thunk
 
1001         so that it need not be loaded from the callee.
 
1004         (JSC::JIT::compileCTINativeCall):
 
1005         * jit/JITOpcodes.cpp:
 
1006         (JSC::JIT::privateCompileCTINativeCall):
 
1007         * jit/JITOpcodes32_64.cpp:
 
1008         (JSC::JIT::privateCompileCTINativeCall):
 
1009         * jit/JITPropertyAccess.cpp:
 
1010         (JSC::JIT::emitSlow_op_get_by_val):
 
1011         * jit/JITPropertyAccess32_64.cpp:
 
1012         (JSC::JIT::emitSlow_op_get_by_val):
 
1014         (JSC::JITThunks::ctiStub):
 
1015         (JSC::JITThunks::hostFunctionStub):
 
1017         * jit/SpecializedThunkJIT.h:
 
1018         (JSC::SpecializedThunkJIT::finalize):
 
1019         * jit/ThunkGenerators.cpp:
 
1020         (JSC::charCodeAtThunkGenerator):
 
1021         (JSC::charAtThunkGenerator):
 
1022         (JSC::fromCharCodeThunkGenerator):
 
1023         (JSC::sqrtThunkGenerator):
 
1024         (JSC::powThunkGenerator):
 
1025         * runtime/JSFunction.cpp:
 
1026         (JSC::JSFunction::JSFunction):
 
1027         * runtime/JSGlobalData.cpp:
 
1028         (JSC::JSGlobalData::getHostFunction):
 
1029         * runtime/JSGlobalData.h:
 
1030         (JSC::JSGlobalData::getCTIStub):
 
1031         * runtime/Lookup.cpp:
 
1032         (JSC::setUpStaticFunctionSlot):
 
1033         * runtime/StringConstructor.cpp:
 
1034         (JSC::StringConstructor::StringConstructor):
 
1037 2010-05-18  Geoffrey Garen  <ggaren@apple.com>
 
1039         Reviewed by Darin Adler.
 
1041         Simplified handling of 'arguments' -- 1.2% SunSpider speedup
 
1042         https://bugs.webkit.org/show_bug.cgi?id=39200
 
1044         Removed the reserved OptionalCalleeArguments slot from the CallFrame.
 
1045         Now, slots for 'arguments' are allocated and initialized only by
 
1046         functions that might need them.
 
1048         * bytecode/CodeBlock.cpp:
 
1049         (JSC::CodeBlock::dump): Updated for new bytecode operands.
 
1051         (JSC::CodeBlock::CodeBlock):
 
1052         * bytecode/CodeBlock.h:
 
1053         (JSC::unmodifiedArgumentsRegister): Added a helper function for mapping
 
1054         from the arguments register to its unmodified counterpart.
 
1056         (JSC::CodeBlock::setArgumentsRegister):
 
1057         (JSC::CodeBlock::argumentsRegister):
 
1058         (JSC::CodeBlock::usesArguments):  Changed from a "usesArguments" bool to
 
1059         an optional int index representing the arguments register.
 
1061         * bytecode/Opcode.h: Updated for new bytecode operands.
 
1063         * bytecompiler/BytecodeGenerator.cpp:
 
1064         (JSC::BytecodeGenerator::addVar): Factored out a helper function for
 
1065         allocating an anonymous var.
 
1067         (JSC::BytecodeGenerator::BytecodeGenerator): Merged / simplified some
 
1068         arguments vs activation logic, and added code to allocate the arguments
 
1069         registers when needed.
 
1071         (JSC::BytecodeGenerator::createArgumentsIfNecessary): Updated for new bytecode operands.
 
1073         (JSC::BytecodeGenerator::emitCallEval): No need to create the arguments
 
1074         object before calling eval; the activation object will lazily create the
 
1075         arguments object if eval resolves it.
 
1077         (JSC::BytecodeGenerator::emitReturn): Updated for new bytecode operands.
 
1079         (JSC::BytecodeGenerator::emitPushScope):
 
1080         (JSC::BytecodeGenerator::emitPushNewScope): Ditto emitCallEval.
 
1082         * bytecompiler/BytecodeGenerator.h:
 
1083         (JSC::BytecodeGenerator::addVar): Factored out a helper function for
 
1084         allocating an anonymous var.
 
1086         (JSC::BytecodeGenerator::registerFor): No more need for special handling
 
1087         of the arguments registers; they're allocated just like normal registers
 
1090         * interpreter/CallFrame.h:
 
1091         (JSC::ExecState::callerFrame):
 
1092         (JSC::ExecState::init):
 
1093         * interpreter/CallFrameClosure.h:
 
1094         (JSC::CallFrameClosure::resetCallFrame): Nixed optionalCalleeArguments.
 
1096         * interpreter/Interpreter.cpp:
 
1097         (JSC::Interpreter::dumpRegisters):
 
1098         (JSC::Interpreter::unwindCallFrame):
 
1099         (JSC::Interpreter::privateExecute):
 
1100         (JSC::Interpreter::retrieveArguments): Opcodes accessing 'arguments' now
 
1101         take operands specifying registers, just like all other opcodes.
 
1102         JSActivation::copyRegisters is no longer responsible for tearing off the
 
1103         arguments object; instead, the VM is responsible for both.
 
1105         Also, a behavior change: Each access to f.arguments creates a new object,
 
1106         unless f itself uses 'arguments'. This matches Chrome, and is necessary
 
1107         for the optimization. f.arguments is a nonstandard, deprecated feature,
 
1108         so high fidelity to a given implementation is not necessarily a goal.
 
1109         Also, as illustrated by the new test case, the identity of f.arguments
 
1110         has been broken since 2008, except in the case where f itself accesses
 
1111         f.arguments -- but nobody seemed to notice. So, hopefully this change won't
 
1114         * interpreter/Register.h: Nixed the special arguments accessor. It's no
 
1117         * interpreter/RegisterFile.h:
 
1118         (JSC::RegisterFile::):
 
1120         (JSC::JIT::compileOpCallInitializeCallFrame):
 
1121         (JSC::JIT::compileOpCall):
 
1122         * jit/JITOpcodes.cpp:
 
1123         (JSC::JIT::emit_op_tear_off_activation):
 
1124         (JSC::JIT::emit_op_tear_off_arguments):
 
1125         (JSC::JIT::emit_op_create_arguments):
 
1126         (JSC::JIT::emit_op_init_arguments):
 
1127         * jit/JITOpcodes32_64.cpp:
 
1128         (JSC::JIT::emit_op_tear_off_activation):
 
1129         (JSC::JIT::emit_op_tear_off_arguments):
 
1130         (JSC::JIT::emit_op_create_arguments):
 
1131         (JSC::JIT::emit_op_init_arguments): The actual optimization: Removed
 
1132         OptionalCalleeArguments from the callframe slot. Now, it doesn't need
 
1133         to be initialized for most calls.
 
1136         (JSC::DEFINE_STUB_FUNCTION):
 
1138         (JSC::): Updated stubs to support arbitrary 'arguments' registers,
 
1139         instead of hard-coding something in the call frame.
 
1141         * runtime/Arguments.h:
 
1142         (JSC::JSActivation::copyRegisters): Removed some obfuscatory abstraction.
 
1144         * runtime/Executable.h:
 
1145         (JSC::FunctionExecutable::generatedByteCode): Added a helper for accessing
 
1146         the 'arguments' register. In a future patch, that kind of data should
 
1147         probably move out of CodeBlock and into Executable.
 
1149         * runtime/JSActivation.cpp:
 
1150         (JSC::JSActivation::getOwnPropertySlot):
 
1151         (JSC::JSActivation::argumentsGetter):
 
1152         * runtime/JSActivation.h: Simplified / fixed access to 'arguments' via
 
1153         the activation object. It now implements the same behavior implemented
 
1154         by optimized variable access in the VM. This simplifies some other
 
1155         things, too -- like eval code generation.
 
1157 2010-05-18  Sam Weinig  <sam@webkit.org>
 
1159         Try to fix the windows build.
 
1161         * API/JSStringRefBSTR.cpp:
 
1163 2010-05-18  Anders Carlsson  <andersca@apple.com>
 
1165         Reviewed by Sam Weinig.
 
1167         Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set.
 
1168         https://bugs.webkit.org/show_bug.cgi?id=39304
 
1169         <rdar://problem/7998366>
 
1171         Add an inlineCapacity template parameter to ListHashSet.
 
1173         * wtf/ListHashSet.h:
 
1174         (WTF::::ListHashSet):
 
1177         (WTF::::~ListHashSet):
 
1186         (WTF::::insertBefore):
 
1189         (WTF::::unlinkAndDelete):
 
1190         (WTF::::appendNode):
 
1191         (WTF::::insertNodeBefore):
 
1192         (WTF::::deleteAllNodes):
 
1193         (WTF::::makeIterator):
 
1194         (WTF::::makeConstIterator):
 
1195         (WTF::deleteAllValues):
 
1197 2010-05-18  Gabor Loki  <loki@webkit.org>
 
1199         Reviewed by Darin Adler.
 
1201         Fix the interpreter after r59637
 
1202         https://bugs.webkit.org/show_bug.cgi?id=39287
 
1204         * runtime/Executable.h:
 
1205         * runtime/JSFunction.cpp:
 
1206         (JSC::JSFunction::JSFunction):
 
1207         (JSC::JSFunction::getCallData):
 
1208         * runtime/JSGlobalData.cpp:
 
1209         * runtime/JSGlobalData.h:
 
1211 2010-05-17  Gavin Barraclough  <barraclough@apple.com>
 
1213         Reviewed by Geoff Garen.
 
1215         Oops, meant ebx not eax there.  Fix Qt (and probably Win too).
 
1217         * jit/JITOpcodes32_64.cpp:
 
1219 2010-05-17  Gavin Barraclough  <barraclough@apple.com>
 
1221         Reviewed by Geoff Garen.
 
1223         Bug 39252 - Move host/native JSFunction's NativeFunction onto NativeExecutable.
 
1225         Currently host functions reuse JSFunction's ScopeChain as storage for their
 
1226         NativeFunction (the C function pointer to the host function implementation).
 
1227         Instead, move this onto NativeExecutable.  This will allow host functions to
 
1228         have a scopechain (which will be implemented as a separate patch).
 
1230         * JavaScriptCore.xcodeproj/project.pbxproj:
 
1233         (JSC::JIT::compileOpCallInitializeCallFrame):
 
1234         (JSC::JIT::compileOpCall):
 
1235         * jit/JITOpcodes.cpp:
 
1236         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
1237         * jit/JITOpcodes32_64.cpp:
 
1238         * jit/JITPropertyAccess.cpp:
 
1239         (JSC::JIT::stringGetByValStubGenerator):
 
1240         (JSC::JIT::emitSlow_op_get_by_val):
 
1241         * jit/JITPropertyAccess32_64.cpp:
 
1242         (JSC::JIT::stringGetByValStubGenerator):
 
1243         (JSC::JIT::emitSlow_op_get_by_val):
 
1245         (JSC::JITThunks::specializedThunk):
 
1247         (JSC::JITThunks::ctiNativeCall):
 
1248         * jit/SpecializedThunkJIT.h:
 
1249         (JSC::SpecializedThunkJIT::finalize):
 
1250         * jit/ThunkGenerators.cpp:
 
1251         (JSC::charCodeAtThunkGenerator):
 
1252         (JSC::charAtThunkGenerator):
 
1253         (JSC::fromCharCodeThunkGenerator):
 
1254         (JSC::sqrtThunkGenerator):
 
1255         (JSC::powThunkGenerator):
 
1256         * jit/ThunkGenerators.h:
 
1257         * runtime/Executable.h:
 
1258         (JSC::NativeExecutable::create):
 
1259         (JSC::NativeExecutable::function):
 
1260         (JSC::NativeExecutable::NativeExecutable):
 
1261         (JSC::JSFunction::nativeFunction):
 
1262         * runtime/JSFunction.cpp:
 
1263         (JSC::JSFunction::JSFunction):
 
1264         (JSC::JSFunction::~JSFunction):
 
1265         (JSC::JSFunction::markChildren):
 
1266         (JSC::JSFunction::getCallData):
 
1267         (JSC::JSFunction::call):
 
1268         (JSC::JSFunction::getOwnPropertySlot):
 
1269         (JSC::JSFunction::getConstructData):
 
1270         (JSC::JSFunction::construct):
 
1271         * runtime/JSFunction.h:
 
1272         (JSC::JSFunction::scope):
 
1273         * runtime/JSGlobalData.h:
 
1274         (JSC::JSGlobalData::getThunk):
 
1275         * runtime/Lookup.cpp:
 
1276         (JSC::setUpStaticFunctionSlot):
 
1277         * runtime/StringConstructor.cpp:
 
1278         (JSC::StringConstructor::StringConstructor):
 
1280 2010-05-17  Patrick Gansterer  <paroga@paroga.com>
 
1282         Reviewed by Laszlo Gombos.
 
1284         [Qt] Remove WinCE endian dedection.
 
1285         https://bugs.webkit.org/show_bug.cgi?id=38511
 
1287         Windows CE supports little-endian format only.
 
1288         Correct dedection was added in r57804.
 
1292 2010-05-16  Simon Fraser  <simon.fraser@apple.com>
 
1294         Reviewed by Darin Adler.
 
1296         Reduce the size of FunctionExecutable
 
1297         https://bugs.webkit.org/show_bug.cgi?id=39180
 
1299         Change m_numVariables from a size_t to 31 bits in a bitfield,
 
1300         packed with another bit for m_forceUsesArguments (which in turn
 
1301         get packed with the base class).
 
1303         Reduces the size of FunctionExecutable from 160 to 152 bytes.
 
1305         * runtime/Executable.h:
 
1306         (JSC::FunctionExecutable::variableCount):
 
1307         (JSC::FunctionExecutable::FunctionExecutable):
 
1309 2010-05-15  Oliver Hunt  <oliver@apple.com>
 
1311         Reviewed by Maciej Stachowiak.
 
1313         Incorrect codegen for slowcase of < in 64-bit
 
1314         https://bugs.webkit.org/show_bug.cgi?id=39151
 
1316         Call the correct stud for the slowcases of the < operator.
 
1318         * jit/JITArithmetic.cpp:
 
1319         (JSC::JIT::emitSlow_op_jnless):
 
1320         (JSC::JIT::emitSlow_op_jless):
 
1322 2010-05-15  Leo Yang  <leo.yang@torchmobile.com.cn>
 
1324         Reviewed by Darin Adler.
 
1326         Fix bug https://bugs.webkit.org/show_bug.cgi?id=38890
 
1328         * runtime/DatePrototype.cpp:
 
1329         (JSC::formatLocaleDate):
 
1331 2010-05-15  Leandro Pereira  <leandro@profusion.mobi>
 
1333         Reviewed by Adam Treat.
 
1335         [EFL] Add build system for the EFL port.
 
1336         http://webkit.org/b/37945
 
1338         * CMakeLists.txt: Added.
 
1339         * CMakeListsEfl.txt: Added.
 
1340         * config.h: Add conditional to look for cmakeconfig.h.
 
1341         * jsc/CMakeLists.txt: Added.
 
1342         * jsc/CMakeListsEfl.txt: Added.
 
1343         * wtf/CMakeLists.txt: Added.
 
1344         * wtf/CMakeListsEfl.txt: Added.
 
1346 2010-05-15  Chao-ying Fu  <fu@mips.com>
 
1348         Reviewed by Oliver Hunt.
 
1350         Update MIPS JIT for unsigned right shift, Math.sqrt, load16
 
1351         https://bugs.webkit.org/show_bug.cgi?id=38412
 
1353         Fixed MIPS build failure.
 
1355         * assembler/MIPSAssembler.h:
 
1356         (JSC::MIPSAssembler::srl):
 
1357         (JSC::MIPSAssembler::srlv):
 
1358         (JSC::MIPSAssembler::sqrtd):
 
1359         * assembler/MacroAssemblerMIPS.h:
 
1360         (JSC::MacroAssemblerMIPS::urshift32):
 
1361         (JSC::MacroAssemblerMIPS::sqrtDouble):
 
1362         (JSC::MacroAssemblerMIPS::load16):
 
1363         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
 
1364         * jit/JSInterfaceJIT.h:
 
1366 2010-05-15  Ilya Tikhonovsky  <loislo@chromium.org>
 
1368         Reviewed by Geoffrey Garen.
 
1370         WebInspector: JSC Should provide heap size info for Timeline panel.
 
1371         https://bugs.webkit.org/show_bug.cgi?id=38420
 
1373         * JavaScriptCore.exp:
 
1374         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
1375         * runtime/Collector.cpp:
 
1377         * runtime/Collector.h:
 
1379 2010-05-15  Dave Tapuska  <dtapuska@rim.com>
 
1381         Reviewed by Darin Adler.
 
1383         Add a new define for we need strict arena alignment. ARMv5 with
 
1384         double word instructions set this value.
 
1388 2010-05-14  Stephanie Lewis  <slewis@apple.com>
 
1390         Rubber-stamped by Mark Rowe.
 
1394         * JavaScriptCore.order:
 
1396 2010-05-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
1398         Reviewed by Kenneth Rohde Christiansen.
 
1400         Implementation of QtScript API that provide method to convert a value to an object.
 
1402         [Qt] QtScript is missing toObject API
 
1403         https://bugs.webkit.org/show_bug.cgi?id=36594
 
1405         * qt/api/qscriptengine.cpp:
 
1406         (QScriptEngine::toObject):
 
1407         * qt/api/qscriptengine.h:
 
1408         * qt/api/qscriptvalue.cpp:
 
1409         (QScriptValue::toObject):
 
1410         * qt/api/qscriptvalue.h:
 
1411         * qt/api/qscriptvalue_p.h:
 
1412         (QScriptValuePrivate::toObject):
 
1413         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
 
1414         (tst_QScriptEngine::toObject):
 
1415         (tst_QScriptEngine::toObjectTwoEngines):
 
1416         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
 
1417         (tst_QScriptValue::toObjectSimple):
 
1418         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
1420 2010-05-14  Chao-ying Fu  <fu@mips.com>
 
1422         Reviewed by Oliver Hunt.
 
1424         String Indexing Failure on JSVALUE32 targets
 
1425         https://bugs.webkit.org/show_bug.cgi?id=39034
 
1427         Remove zero-extend/shift-right code on regT1, because we already have
 
1428         it in emit_op_get_by_val().
 
1430         * jit/JITPropertyAccess.cpp:
 
1431         (JSC::JIT::stringGetByValStubGenerator):
 
1433 2010-05-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
1435         Reviewed by Alexey Proskuryakov.
 
1437         Fix a VS2010 assert in std::copy
 
1438         https://bugs.webkit.org/show_bug.cgi?id=38630
 
1440         The assert complains that the output iterator is null.
 
1445 2010-05-13  Maciej Stachowiak  <mjs@apple.com>
 
1447         No review, attempted build fix.
 
1449         Try to fix Tiger build with some gratuitous initialization of
 
1450         seemingly uninitialized variables.
 
1452         * wtf/text/StringImpl.h:
 
1453         (WebCore::StringImpl::tryCreateUninitialized):
 
1455 2010-05-13  Maciej Stachowiak  <mjs@apple.com>
 
1457         Reviewed by Mark Rowe.
 
1459         Various JavaScript string optimizations
 
1460         https://bugs.webkit.org/show_bug.cgi?id=39051
 
1462         Approximately 1% SunSpider speedup.
 
1464         * runtime/ArrayPrototype.cpp:
 
1465         (JSC::arrayProtoFuncJoin): Remove branches from the hot code path
 
1466         by moving the first pass outside the loop, and duplicating the hot loop
 
1467         to extract the loop-invariant branch.
 
1468         * runtime/RegExp.cpp:
 
1469         (JSC::RegExp::match): resize ovector to 0 instead of clearing to avoid
 
1470         thrash in case of large matches.
 
1471         * runtime/RegExpConstructor.h:
 
1472         (JSC::RegExpConstructor::performMatch): Mark ALWAYS_INLINE to make the
 
1473         compiler respect our authority.
 
1474         * runtime/StringPrototype.cpp:
 
1475         (JSC::jsSpliceSubstringsWithSeparators): Inline.
 
1476         (JSC::stringProtoFuncSubstring): Rewrite boundary condition checks to
 
1477         reduce the number of floating point comparisons and branches.
 
1479 2010-05-12  Gavin Barraclough  <barraclough@apple.com>
 
1481         Reviewed by Oliver Hunt.
 
1483         https://bugs.webkit.org/show_bug.cgi?id=39039
 
1484         Provide support for separate bytecode/JIT code translations for call/construct usage
 
1485         This will allow us to produce code generated specifically for use as a constructor, not for general function use.
 
1487         * bytecode/CodeBlock.cpp:
 
1488         (JSC::CodeBlock::CodeBlock):
 
1489         (JSC::CodeBlock::unlinkCallers):
 
1490         * bytecode/CodeBlock.h:
 
1491         (JSC::CodeBlock::getBytecodeIndex):
 
1492         (JSC::CodeBlock::getJITCode):
 
1493         (JSC::CodeBlock::executablePool):
 
1494         (JSC::GlobalCodeBlock::GlobalCodeBlock):
 
1495         (JSC::FunctionCodeBlock::FunctionCodeBlock):
 
1496         * interpreter/Interpreter.cpp:
 
1497         (JSC::Interpreter::executeCall):
 
1498         (JSC::Interpreter::executeConstruct):
 
1499         (JSC::Interpreter::prepareForRepeatCall):
 
1500         (JSC::Interpreter::execute):
 
1501         (JSC::Interpreter::privateExecute):
 
1502         * interpreter/Interpreter.h:
 
1504         (JSC::JIT::unlinkCallOrConstruct):
 
1505         (JSC::JIT::linkConstruct):
 
1508         (JSC::JIT::compileOpCall):
 
1509         (JSC::JIT::compileOpCallSlowCase):
 
1510         * jit/JITOpcodes.cpp:
 
1511         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
1512         * jit/JITOpcodes32_64.cpp:
 
1513         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
1514         * jit/JITPropertyAccess.cpp:
 
1515         (JSC::JIT::emitSlow_op_get_by_val):
 
1516         * jit/JITPropertyAccess32_64.cpp:
 
1517         (JSC::JIT::emitSlow_op_get_by_val):
 
1519         (JSC::DEFINE_STUB_FUNCTION):
 
1521         (JSC::JITThunks::ctiVirtualConstructLink):
 
1522         (JSC::JITThunks::ctiVirtualConstruct):
 
1524         * jit/SpecializedThunkJIT.h:
 
1525         (JSC::SpecializedThunkJIT::finalize):
 
1526         * runtime/Arguments.h:
 
1527         (JSC::JSActivation::copyRegisters):
 
1528         * runtime/ArrayPrototype.cpp:
 
1529         (JSC::isNumericCompareFunction):
 
1530         * runtime/Executable.cpp:
 
1531         (JSC::FunctionExecutable::~FunctionExecutable):
 
1532         (JSC::FunctionExecutable::compileForCall):
 
1533         (JSC::FunctionExecutable::compileForConstruct):
 
1534         (JSC::EvalExecutable::generateJITCode):
 
1535         (JSC::ProgramExecutable::generateJITCode):
 
1536         (JSC::FunctionExecutable::generateJITCodeForCall):
 
1537         (JSC::FunctionExecutable::generateJITCodeForConstruct):
 
1538         (JSC::FunctionExecutable::markAggregate):
 
1539         (JSC::FunctionExecutable::reparseExceptionInfo):
 
1540         (JSC::EvalExecutable::reparseExceptionInfo):
 
1541         (JSC::FunctionExecutable::recompile):
 
1542         * runtime/Executable.h:
 
1543         (JSC::ExecutableBase::ExecutableBase):
 
1544         (JSC::ExecutableBase::isHostFunction):
 
1545         (JSC::ExecutableBase::generatedJITCodeForCall):
 
1546         (JSC::ExecutableBase::generatedJITCodeForConstruct):
 
1547         (JSC::NativeExecutable::NativeExecutable):
 
1548         (JSC::EvalExecutable::jitCode):
 
1549         (JSC::ProgramExecutable::jitCode):
 
1550         (JSC::FunctionExecutable::bytecodeForCall):
 
1551         (JSC::FunctionExecutable::isGeneratedForCall):
 
1552         (JSC::FunctionExecutable::generatedBytecodeForCall):
 
1553         (JSC::FunctionExecutable::bytecodeForConstruct):
 
1554         (JSC::FunctionExecutable::isGeneratedForConstruct):
 
1555         (JSC::FunctionExecutable::generatedBytecodeForConstruct):
 
1556         (JSC::FunctionExecutable::symbolTable):
 
1557         (JSC::FunctionExecutable::FunctionExecutable):
 
1558         (JSC::FunctionExecutable::jitCodeForCall):
 
1559         (JSC::FunctionExecutable::jitCodeForConstruct):
 
1560         * runtime/JSActivation.h:
 
1561         (JSC::JSActivation::JSActivationData::JSActivationData):
 
1562         * runtime/JSFunction.cpp:
 
1563         (JSC::JSFunction::~JSFunction):
 
1564         (JSC::JSFunction::call):
 
1565         (JSC::JSFunction::construct):
 
1566         * runtime/JSGlobalData.cpp:
 
1567         (JSC::JSGlobalData::numericCompareFunction):
 
1569 2010-05-12  Oliver Hunt  <oliver@apple.com>
 
1573         <rdar://problem/7977960> REGRESSION (r59282): Tiger PPC build broken
 
1575         * runtime/UString.h:
 
1576         (JSC::tryMakeString):
 
1578 2010-05-12  Oliver Hunt  <oliver@apple.com>
 
1580         Reviewed by Gavin Barraclough.
 
1582         <rdar://7969718> Incorrect 32-bit codegen for op_jnlesseq
 
1583         https://bugs.webkit.org/show_bug.cgi?id=39038
 
1585         Correct the use of incorrect comparison operators.
 
1587         * jit/JITArithmetic32_64.cpp:
 
1588         (JSC::JIT::emit_op_jlesseq):
 
1589         (JSC::JIT::emitBinaryDoubleOp):
 
1591 2010-05-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
 
1593         Reviewed by Eric Seidel.
 
1595         JavaScriptCore: fix build when some optimizations are disabled
 
1596         https://bugs.webkit.org/show_bug.cgi?id=38800
 
1598         Remove outdated UNUSED_PARAMs when using JIT but with
 
1599         ENABLE_JIT_OPTIMIZE_CALL and ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
 
1602         * jit/JITOpcodes.cpp:
 
1603         * jit/JITOpcodes32_64.cpp:
 
1605 2010-05-12  Oliver Hunt  <oliver@apple.com>
 
1607         Reviewed by Gavin Barraclough.
 
1609         Work around GCC stupidity by either explicitly inlining or by
 
1612         * runtime/StringPrototype.cpp:
 
1613         (JSC::stringProtoFuncReplace):
 
1614         * runtime/UString.h:
 
1615         (JSC::UString::~UString):
 
1617         (WTF::RefPtr::RefPtr):
 
1618         (WTF::RefPtr::~RefPtr):
 
1619         * wtf/text/StringImpl.h:
 
1620         (WebCore::StringImpl::create):
 
1621         (WebCore::StringImpl::tryCreateUninitialized):
 
1623 2010-05-12  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
1625         Reviewed by Kenneth Rohde Christiansen.
 
1627         [Qt] Detect debug mode consistently
 
1628         https://bugs.webkit.org/show_bug.cgi?id=38863
 
1630         * JavaScriptCore.pri:
 
1631         * JavaScriptCore.pro:
 
1633         * qt/api/QtScript.pro:
 
1635 2010-05-12  Peter Varga  <pvarga@inf.u-szeged.hu>
 
1637         Reviewed by Gavin Barraclough.
 
1639         Remove a direct jump in generatePatternCharacterGreedy() and
 
1640         generatePatternCharacterClassGreedy() functions if quantityCount of the term
 
1642         https://bugs.webkit.org/show_bug.cgi?id=38898
 
1644         * yarr/RegexJIT.cpp:
 
1645         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
 
1646         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
 
1648 2010-05-11  Geoffrey Garen  <ggaren@apple.com>
 
1650         Reviewed by Gavin Barraclough.
 
1652         Slight simplification to the calling convention: read RegisterFile::end()
 
1653         from an absolute address, instead of from a pointer to the RegisterFile
 
1656         SunSpider reports no change.
 
1658         This should free us to remove the RegisterFile argument from the stack.
 
1661         (JSC::JIT::privateCompile):
 
1663 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
 
1665         Possible Gtk build fix - use ALWAYS_INLINE on functions that were inlined.
 
1667         * wtf/text/AtomicString.h:
 
1668         (WebCore::AtomicString::add): Use ALWAYS_INLINE.
 
1669         * wtf/text/WTFString.h:
 
1670         (WebCore::String::length): Ditto.
 
1671         (WebCore::String::isEmpty): Ditto.
 
1673 2010-05-11  Anders Carlsson  <andersca@apple.com>
 
1675         Reviewed by Sam Weinig.
 
1677         Add a compile time assert that sizeof(String) == sizeof(AtomicString).
 
1679         * wtf/text/AtomicString.cpp:
 
1681 2010-05-11  Anders Carlsson  <andersca@apple.com>
 
1683         Reviewed by Mark Rowe.
 
1685         https://bugs.webkit.org/show_bug.cgi?id=38961
 
1686         Move some member variables around to reduce class sizes.
 
1688         Make AtomicString no longer inherit from FastAllocBase.
 
1690         Since AtomicString's first (and only) member variable, a RefPtr, also inherits from FastAllocBase this
 
1691         was causing the size of AtomicString to contain sizeof(void*) bytes of padding.
 
1693         * wtf/text/AtomicString.h:
 
1695 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
 
1697         Reviewed by Maciej Stachowiak.
 
1698         Patch by Gavin Barraclough.
 
1700         Rest of REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
 
1701         https://bugs.webkit.org/show_bug.cgi?id=38930
 
1702         <rdar://problem/7937188>
 
1704         Inline string functions that are commonly used in WTFString, CString, and AtomicString.
 
1706         * JavaScriptCore.exp: Remove exports of inline functions.
 
1707         * wtf/text/AtomicString.cpp:
 
1708         (WebCore::AtomicString::addSlowCase): Rename add to addSlowCase, and inline the fast path
 
1710         * wtf/text/AtomicString.h:
 
1711         (WebCore::AtomicString::add): Inline the fast path of add.
 
1712         * wtf/text/CString.cpp: Inline implementation of data and length in the header.
 
1713         * wtf/text/CString.h:
 
1714         (WTF::CString::data): Inline implementation of data.
 
1715         (WTF::CString::length): Inline implementation of length.
 
1716         * wtf/text/WTFString.cpp: Remove implementations of functions to be inlined.
 
1717         * wtf/text/WTFString.h:
 
1718         (WebCore::String::String): Inline implementation.
 
1719         (WebCore::String::length): Ditto.
 
1720         (WebCore::String::characters): Ditto.
 
1721         (WebCore::String::operator[]): Ditto.
 
1722         (WebCore::String::isEmpty): Ditto.
 
1724 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
 
1726         Reviewed by Steve Falkenburg and Jon Honeycutt.
 
1727         Patch by Gavin Barraclough.
 
1729         REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
 
1730         https://bugs.webkit.org/show_bug.cgi?id=38930
 
1731         <rdar://problem/7937188>
 
1733         When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations
 
1734         on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll).
 
1736         We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and
 
1737         WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations
 
1740         * GNUmakefile.am: Add new file to build system.
 
1741         * JavaScriptCore.gypi: Ditto.
 
1742         * JavaScriptCore.pro: Ditto.
 
1743         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now
 
1745         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added
 
1746             here (the post build step is in JavaScriptCoreCommon.vsprops).
 
1747         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled
 
1748             by WebCore into the WebKitOutputDir directory.
 
1749         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file.
 
1750         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project.
 
1751         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore).
 
1752         * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file.
 
1753         * wtf/text/AtomicString.cpp: Moved code to StringStatics.
 
1754         * wtf/text/StringImpl.cpp: Ditto.
 
1755         * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so 
 
1756             the rest of the files can be compiled in WebCore.
 
1757         (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here.
 
1758         (WebCore::AtomicString::init): Moved from AtomicString.cpp to here.
 
1760 2010-05-11  Alice Liu  <alice.liu@apple.com>
 
1762         Rubber-stamped by Gavin Barraclough.
 
1764         Fix build error when enabling debugging block in WebKit win painting code
 
1766         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
1768 2010-05-11  Mark Rowe  <mrowe@apple.com>
 
1772         In r59162 a change was made to WebCore's FeatureDefines.xcconfig that enabled FILE_READER and FILE_WRITER.
 
1773         The author and reviewer of that patch ignored the carefully-worded warning at the top of that file asking
 
1774         that changes to the file be kept in sync across JavaScriptCore, WebCore and WebKit, as well as being kept
 
1775         in sync with build-webkit.  This led to WebCore and WebKit having different views of Document's vtable
 
1776         and results in crashes in Safari shortly after launch when virtual function calls resulted in the wrong
 
1777         function in WebCore being called.
 
1779         We fix this by bringing the FeatureDefines.xcconfig files in to sync.  Based on the ChangeLog message and
 
1780         other changes in r59162 it appears that enabling FILE_WRITER was unintentional so that particular change
 
1783         * Configurations/FeatureDefines.xcconfig:
 
1785 2010-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
 
1787         Unreviewed, rolling out r59171.
 
1788         http://trac.webkit.org/changeset/59171
 
1789         https://bugs.webkit.org/show_bug.cgi?id=38933
 
1791         "Broke the world" (Requested by bweinstein on #webkit).
 
1793         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
1794         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
1795         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
1796         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
1797         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
 
1798         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
1799         * JavaScriptCore.xcodeproj/project.pbxproj:
 
1800         * wtf/text/AtomicString.cpp:
 
1801         (WebCore::AtomicString::init):
 
1802         * wtf/text/StringImpl.cpp:
 
1803         (WebCore::StringImpl::empty):
 
1804         * wtf/text/StringStatics.cpp: Removed.
 
1806 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
 
1808         Reviewed by Steve Falkenburg.
 
1809         Patch by Gavin Barraclough.
 
1811         REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
 
1812         https://bugs.webkit.org/show_bug.cgi?id=38930
 
1813         <rdar://problem/7937188>
 
1815         When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations
 
1816         on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll).
 
1818         We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and
 
1819         WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations
 
1822         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now
 
1824         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added
 
1825             here (the post build step is in JavaScriptCoreCommon.vsprops).
 
1826         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled
 
1827             by WebCore into the WebKitOutputDir directory.
 
1828         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file.
 
1829         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project.
 
1830         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore).
 
1831         * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file.
 
1832         * wtf/text/AtomicString.cpp: Moved code to StringStatics.
 
1833         * wtf/text/StringImpl.cpp: Ditto.
 
1834         * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so 
 
1835             the rest of the files can be compiled in WebCore.
 
1836         (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here.
 
1837         (WebCore::AtomicString::init): Moved from AtomicString.cpp to here.
 
1839 2010-05-11  Geoffrey Garen  <ggaren@apple.com>
 
1841         Fixed test failures seen on SnowLeopard buildbot.
 
1843         * runtime/JSString.cpp:
 
1844         (JSC::JSString::replaceCharacter): Don't use size_t and wtf::notFound.
 
1845         Instead, use the individual types and notFound values of the string APIs
 
1846         we're using, since they're not necessarily the same in 64bit.
 
1848 2010-05-11  Geoffrey Garen  <ggaren@apple.com>
 
1850         Reviewed by Oliver Hunt and Darin Adler.
 
1852         Start using ropes in String.prototype.replace.
 
1854         1%-1.5% speedup on SunSpider.
 
1856         * runtime/JSString.cpp:
 
1857         (JSC::JSString::resolveRope): Updated for RopeImpl refactoring.
 
1859         (JSC::JSString::replaceCharacter): Added a replaceCharacter function, which creates
 
1860         a rope for the resulting replacement.
 
1862         * runtime/JSString.h: A few changes here:
 
1864         (JSC::RopeBuilder::RopeIterator::RopeIterator):
 
1865         (JSC::RopeBuilder::RopeIterator::operator++):
 
1866         (JSC::RopeBuilder::RopeIterator::operator*):
 
1867         (JSC::RopeBuilder::RopeIterator::operator!=):
 
1868         (JSC::RopeBuilder::RopeIterator::WorkItem::WorkItem):
 
1869         (JSC::RopeBuilder::RopeIterator::WorkItem::operator!=):
 
1870         (JSC::RopeBuilder::RopeIterator::skipRopes): Created a RopeIterator abstraction.
 
1871         We use this to do a substring find without having to resolve the rope.
 
1872         (We could use this iterator when resolving ropes, too, but resolving
 
1873         ropes backwards is usually more efficient.)
 
1875         (JSC::RopeBuilder::JSString): Added constructors for 2 & 3 UStrings.
 
1877         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
 
1878         (JSC::RopeBuilder::size): Updated for RopeImpl refactoring.
 
1880         * runtime/Operations.h: Updated for RopeImpl refactoring.
 
1881         (JSC::jsString): Added jsString functions for 2 & 3 UStrings.
 
1883         * runtime/RopeImpl.cpp:
 
1884         (JSC::RopeImpl::derefFibersNonRecursive):
 
1885         * runtime/RopeImpl.h:
 
1886         (JSC::RopeImpl::initializeFiber):
 
1887         (JSC::RopeImpl::size):
 
1888         (JSC::RopeImpl::fibers):
 
1889         (JSC::RopeImpl::deref):
 
1890         (JSC::RopeImpl::RopeImpl): A little refactoring to make this patch easier:
 
1891         Moved statics to the top of the class; put multi-statement functions on
 
1892         multiple lines; renamed "fiberCount" to "size" to match other collections;
 
1893         changed the "fibers" accessor to return the fibers buffer, instead of an
 
1894         item in the buffer, to make iteration easier.
 
1896         * runtime/StringPrototype.cpp:
 
1897         (JSC::stringProtoFuncReplace): Don't resolve a rope unless we need to. Do
 
1898         use our new replaceCharacter function if possible. Do use a rope to
 
1899         represent splicing three strings together.
 
1901 2010-05-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
1903         Reviewed by Darin Adler.
 
1905         [Qt] Disable JIT support for mingw-w64
 
1906         https://bugs.webkit.org/show_bug.cgi?id=38747
 
1908         Disale JIT for mingw-w64 as it is reportedly
 
1911         Thanks for Vanboxem Rruben for the investigation.
 
1915 2010-05-09  Fumitoshi Ukai  <ukai@chromium.org>
 
1917         Reviewed by Eric Seidel.
 
1919         JavaScriptCore/wtf/MD5.h: checksum should take a reference to output.
 
1920         https://bugs.webkit.org/show_bug.cgi?id=38723
 
1922         * JavaScriptCore.exp:
 
1923         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
1926           Fix for checksum change.
 
1927         (WTF::MD5::checksum):
 
1928           Take a reference to output, instead of returning the result by value, to reduce coping for performance.
 
1931 2010-05-09  Oliver Hunt  <oliver@apple.com>
 
1935         Fix accidental repeat addition of emit_op_new_regexp
 
1937         * jit/JITOpcodes.cpp:
 
1939 2010-05-09  Oliver Hunt  <oliver@apple.com>
 
1941         Reviewed by Gavin Barraclough.
 
1943         REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
 
1944         https://bugs.webkit.org/show_bug.cgi?id=38828
 
1945         <rdar://problem/7961634>
 
1949         * bytecode/CodeBlock.cpp:
 
1950         (JSC::regexpToSourceString):
 
1952         (JSC::CodeBlock::dump):
 
1953         (JSC::CodeBlock::shrinkToFit):
 
1954         * bytecode/CodeBlock.h:
 
1955         (JSC::CodeBlock::addRegExp):
 
1956         (JSC::CodeBlock::regexp):
 
1957         * bytecode/Opcode.h:
 
1958         * bytecompiler/BytecodeGenerator.cpp:
 
1959         (JSC::BytecodeGenerator::addRegExp):
 
1960         (JSC::BytecodeGenerator::emitNewRegExp):
 
1961         * bytecompiler/BytecodeGenerator.h:
 
1962         * bytecompiler/NodesCodegen.cpp:
 
1963         (JSC::RegExpNode::emitBytecode):
 
1964         * interpreter/Interpreter.cpp:
 
1965         (JSC::Interpreter::privateExecute):
 
1967         (JSC::JIT::privateCompileMainPass):
 
1969         * jit/JITOpcodes.cpp:
 
1970         (JSC::JIT::emit_op_new_regexp):
 
1972         (JSC::DEFINE_STUB_FUNCTION):
 
1976 2010-05-09  Geoffrey Garen  <ggaren@apple.com>
 
1978         Reviewed by Oliver Hunt.
 
1980         Reserve a large-ish initial capacity for Lexer::m_buffer16.
 
1982         SunSpider says 0.3% faster.
 
1984         m_buffer16 is used when parsing complex strings -- for example, strings
 
1985         with escape sequences in them. These kinds of strings can be really long,
 
1986         and we want to avoid repeatedly copying as we grow m_buffer16.
 
1988         The net memory cost is quite low, since it's proporitional to source
 
1989         code we already have in memory, and we throw away m_buffer16 right when
 
1993         (JSC::Lexer::Lexer): No need to reserve initial capacity in our constructor,
 
1994         since setCode will be called before we're asked to lex anything.
 
1995         (JSC::Lexer::setCode): Reserve enough space to lex half the source code
 
1996         as a complex string without having to copy.
 
1997         (JSC::Lexer::clear): No need to reserve initial capacity here either,
 
1998         since setCode will be called before we're asked to lex anything.
 
2000 2010-05-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
2002         Reviewed by Eric Seidel.
 
2004         [Qt] Remove YARR configuration rules from Qt make system
 
2005         https://bugs.webkit.org/show_bug.cgi?id=38819
 
2007         Setting YARR based on JIT seeting is now in Platform.h 
 
2008         for all ports. This patch essentially reverses r49238.
 
2010         * JavaScriptCore.pri:
 
2012 2010-05-09  Oliver Hunt  <oliver@apple.com>
 
2014         Reviewed by Maciej Stachowiak.
 
2016         Improve string indexing performance
 
2017         https://bugs.webkit.org/show_bug.cgi?id=38814
 
2019         Add an assembly stub to do indexed loads from strings much
 
2020         more cheaply than the current stub dispatch logic.  We can
 
2021         do this because we are able to make guarantees about the
 
2022         register contents when entering the stub so the call overhead
 
2026         * jit/JITInlineMethods.h:
 
2027         * jit/JITOpcodes.cpp:
 
2028         * jit/JITPropertyAccess.cpp:
 
2029         (JSC::JIT::stringGetByValStubGenerator):
 
2030         (JSC::JIT::emitSlow_op_get_by_val):
 
2031            Moved from JITOpcodes.cpp to keep the slowcase next to
 
2032            the normal case codegen as we do for everything else.
 
2033         * jit/JITPropertyAccess32_64.cpp:
 
2034         (JSC::JIT::stringGetByValStubGenerator):
 
2035         (JSC::JIT::emitSlow_op_get_by_val):
 
2036         * jit/JSInterfaceJIT.h:
 
2037         (JSC::JSInterfaceJIT::emitFastArithImmToInt):
 
2039 2010-05-09  Maciej Stachowiak  <mjs@apple.com>
 
2041         Fixed version of: "Optimized o[s] where o is a cell and s is a string"
 
2042         https://bugs.webkit.org/show_bug.cgi?id=38815
 
2044         Fixed the previous patch for this from Geoff Garen.
 
2046         The two problems were a missing exception check and a PropertySlot
 
2047         initialized improperly, leading to crashes and failures in the case
 
2048         of getters accessed with bracket syntax.
 
2052         Optimized o[s] where o is a cell and s is a string, removing some old
 
2053         code that wasn't really tuned for the JIT.
 
2055         SunSpider says 0.8% faster.
 
2058         (JSC::DEFINE_STUB_FUNCTION):
 
2061 2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
2063         Unreviewed, build fix.
 
2065         Fix missing terminating ' character warning
 
2067         The warning has been only seen on the Gtk buildbots.
 
2071 2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
2073         Reviewed by Gavin Barraclough.
 
2075         Refactor YARR and YARR_JIT default rules in Platform.h
 
2076         https://bugs.webkit.org/show_bug.cgi?id=38727
 
2078         Turn on YARR and YARR JIT by default of JIT is enabled.
 
2079         Ports can overrule this default decisions as they wish.
 
2083 2010-05-08  Oliver Hunt  <oliver@apple.com>
 
2085         Reviewed by Gavin Barraclough.
 
2087         Split JSVALUE32_64 code out of JITOpcodes.cpp and into JITOpcodes32_64.cpp
 
2088         https://bugs.webkit.org/show_bug.cgi?id=38808
 
2091         * JavaScriptCore.gypi:
 
2092         * JavaScriptCore.pro:
 
2093         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
2094         * JavaScriptCore.xcodeproj/project.pbxproj:
 
2095         * jit/JITOpcodes.cpp:
 
2096         * jit/JITOpcodes32_64.cpp: Added.
 
2097         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
2098         (JSC::JIT::emit_op_mov):
 
2099         (JSC::JIT::emit_op_end):
 
2100         (JSC::JIT::emit_op_jmp):
 
2101         (JSC::JIT::emit_op_loop_if_lesseq):
 
2102         (JSC::JIT::emitSlow_op_loop_if_lesseq):
 
2103         (JSC::JIT::emit_op_new_object):
 
2104         (JSC::JIT::emit_op_instanceof):
 
2105         (JSC::JIT::emitSlow_op_instanceof):
 
2106         (JSC::JIT::emit_op_new_func):
 
2107         (JSC::JIT::emit_op_get_global_var):
 
2108         (JSC::JIT::emit_op_put_global_var):
 
2109         (JSC::JIT::emit_op_get_scoped_var):
 
2110         (JSC::JIT::emit_op_put_scoped_var):
 
2111         (JSC::JIT::emit_op_tear_off_activation):
 
2112         (JSC::JIT::emit_op_tear_off_arguments):
 
2113         (JSC::JIT::emit_op_new_array):
 
2114         (JSC::JIT::emit_op_resolve):
 
2115         (JSC::JIT::emit_op_to_primitive):
 
2116         (JSC::JIT::emitSlow_op_to_primitive):
 
2117         (JSC::JIT::emit_op_strcat):
 
2118         (JSC::JIT::emit_op_resolve_base):
 
2119         (JSC::JIT::emit_op_resolve_skip):
 
2120         (JSC::JIT::emit_op_resolve_global):
 
2121         (JSC::JIT::emitSlow_op_resolve_global):
 
2122         (JSC::JIT::emit_op_not):
 
2123         (JSC::JIT::emitSlow_op_not):
 
2124         (JSC::JIT::emit_op_jfalse):
 
2125         (JSC::JIT::emitSlow_op_jfalse):
 
2126         (JSC::JIT::emit_op_jtrue):
 
2127         (JSC::JIT::emitSlow_op_jtrue):
 
2128         (JSC::JIT::emit_op_jeq_null):
 
2129         (JSC::JIT::emit_op_jneq_null):
 
2130         (JSC::JIT::emit_op_jneq_ptr):
 
2131         (JSC::JIT::emit_op_jsr):
 
2132         (JSC::JIT::emit_op_sret):
 
2133         (JSC::JIT::emit_op_eq):
 
2134         (JSC::JIT::emitSlow_op_eq):
 
2135         (JSC::JIT::emit_op_neq):
 
2136         (JSC::JIT::emitSlow_op_neq):
 
2137         (JSC::JIT::compileOpStrictEq):
 
2138         (JSC::JIT::emit_op_stricteq):
 
2139         (JSC::JIT::emitSlow_op_stricteq):
 
2140         (JSC::JIT::emit_op_nstricteq):
 
2141         (JSC::JIT::emitSlow_op_nstricteq):
 
2142         (JSC::JIT::emit_op_eq_null):
 
2143         (JSC::JIT::emit_op_neq_null):
 
2144         (JSC::JIT::emit_op_resolve_with_base):
 
2145         (JSC::JIT::emit_op_new_func_exp):
 
2146         (JSC::JIT::emit_op_throw):
 
2147         (JSC::JIT::emit_op_get_pnames):
 
2148         (JSC::JIT::emit_op_next_pname):
 
2149         (JSC::JIT::emit_op_push_scope):
 
2150         (JSC::JIT::emit_op_pop_scope):
 
2151         (JSC::JIT::emit_op_to_jsnumber):
 
2152         (JSC::JIT::emitSlow_op_to_jsnumber):
 
2153         (JSC::JIT::emit_op_push_new_scope):
 
2154         (JSC::JIT::emit_op_catch):
 
2155         (JSC::JIT::emit_op_jmp_scopes):
 
2156         (JSC::JIT::emit_op_switch_imm):
 
2157         (JSC::JIT::emit_op_switch_char):
 
2158         (JSC::JIT::emit_op_switch_string):
 
2159         (JSC::JIT::emit_op_new_error):
 
2160         (JSC::JIT::emit_op_debug):
 
2161         (JSC::JIT::emit_op_enter):
 
2162         (JSC::JIT::emit_op_enter_with_activation):
 
2163         (JSC::JIT::emit_op_create_arguments):
 
2164         (JSC::JIT::emit_op_init_arguments):
 
2165         (JSC::JIT::emit_op_convert_this):
 
2166         (JSC::JIT::emitSlow_op_convert_this):
 
2167         (JSC::JIT::emit_op_profile_will_call):
 
2168         (JSC::JIT::emit_op_profile_did_call):
 
2170 2010-05-08  Gabor Loki  <loki@webkit.org>
 
2172         Reviewed by Gavin Barraclough.
 
2174         Fix halfword loads on ARM
 
2175         https://bugs.webkit.org/show_bug.cgi?id=38741
 
2177         The BaseIndex and ImplicitAddress are contain 32bit wide offset, but
 
2178         the load16 functions were working with 8 bit data (encoded in the
 
2179         instruction). If the offset cannot be encoded in an instruction, it
 
2180         should be stored in a temporary register.
 
2182         * assembler/ARMAssembler.h:
 
2183         (JSC::ARMAssembler::getOffsetForHalfwordDataTransfer):
 
2184         * assembler/MacroAssemblerARM.h:
 
2185         (JSC::MacroAssemblerARM::load16):
 
2187 2010-05-08  Gabor Loki  <loki@webkit.org>
 
2189         Reviewed by Gavin Barraclough.
 
2191         Fix spanning branch instruction on Cortex-A8 with Thumb-2 JIT
 
2192         https://bugs.webkit.org/show_bug.cgi?id=38280
 
2194         If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and
 
2195         the target of the branch falls within the first region it is
 
2196         possible for the processor to incorrectly determine the branch
 
2197         instruction, and it is also possible in some cases for the processor
 
2198         to enter a deadlock state.
 
2200         * assembler/ARMv7Assembler.h:
 
2201         (JSC::ARMv7Assembler::linkJumpAbsolute):
 
2203 2010-05-08  Adam Barth  <abarth@webkit.org>
 
2205         Reviewed by Darin Fisher.
 
2207         [WTFURL] Add a buffer for managing the output of the canonicalizer
 
2208         https://bugs.webkit.org/show_bug.cgi?id=38671
 
2210         The canonicalizer produces a stream of canonicalized characters, which
 
2211         we will store in a URLBuffer.  URLBuffer is quite similar to Vector,
 
2212         but serves as an abstraction to isolate us from the underlying
 
2213         character storage.  In the case of WebKit, we'll probably implement a
 
2214         subclass of URLBuffer with Vector.  In Chromium, the backing store is a
 
2215         std::string, which avoids an unnecessary memcpy that would be caused by
 
2216         using Vector instead.
 
2218         * wtf/url/src/URLBuffer.h: Added.
 
2219         (WTF::URLBuffer::URLBuffer):
 
2220         (WTF::URLBuffer::~URLBuffer):
 
2221         (WTF::URLBuffer::at):
 
2222         (WTF::URLBuffer::set):
 
2223         (WTF::URLBuffer::capacity):
 
2224         (WTF::URLBuffer::length):
 
2225         (WTF::URLBuffer::data):
 
2226         (WTF::URLBuffer::setLength):
 
2227         (WTF::URLBuffer::append):
 
2228         (WTF::URLBuffer::grow):
 
2230 2010-05-08  Eric Seidel  <eric@webkit.org>
 
2232         Unreviewed, just reverting commit.
 
2234         REGRESSION(59000): r59000 contained all sorts of changes it should not have, needs revert.
 
2235         https://bugs.webkit.org/show_bug.cgi?id=38798
 
2237         * bytecompiler/BytecodeGenerator.cpp:
 
2238         (JSC::BytecodeGenerator::emitResolve):
 
2239         * jit/JITOpcodes.cpp:
 
2240         (JSC::JIT::emit_op_resolve_global):
 
2242 2010-05-04  Jer Noble  <jer.noble@apple.com>
 
2244         Reviewed by Maciej Stachowiak
 
2246         Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
 
2247         <https://bugs.webkit.org/show_bug.cgi?id=34005>
 
2248         <rdar://problem/7569713>
 
2250         Added cancelCallOnMainThread.  callOnMainThread should always now be paired
 
2251         with cancelCallOnMainThread in situations where the refcon passed to callOnMainThread
 
2252         may be dealloced before the main thread function can be dispatched.  
 
2254         * wtf/MainThread.cpp:
 
2255         (WTF::FunctionWithContext::operator == ): Supports the FunctionWithContextFinder predicate functor.
 
2256         (WTF::FunctionWithContextFinder::FunctionWithContextFinder):  Predicate functor for use with Dequeue::findIf
 
2257         (WTF::FunctionWithContextFinder::operator()):
 
2258         (WTF::cancelCallOnMainThread):
 
2261 2010-05-07  Oliver Hunt  <oliver@apple.com>
 
2265         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
2267 2010-05-07  Eric Seidel  <eric@webkit.org>
 
2269         Unreviewed, rolling out r58990.
 
2270         http://trac.webkit.org/changeset/58990
 
2272         Broke 4 tests on Snow Leopard and Qt.
 
2275         (JSC::DEFINE_STUB_FUNCTION):
 
2278 2010-05-07  Oliver Hunt  <oliver@apple.com>
 
2280         Reviewed by Gavin Barraclough.
 
2282         Optimize access to the global object from a function that uses eval
 
2283         https://bugs.webkit.org/show_bug.cgi?id=38644
 
2285         Fix bug where cross scope access to a global var (vs. property) would
 
2286         be allowed without checking for intervening dynamic scopes.
 
2288         * bytecompiler/BytecodeGenerator.cpp:
 
2289         (JSC::BytecodeGenerator::emitResolve):
 
2291 2010-05-07  Oliver Hunt  <oliver@apple.com>
 
2295         Macro expansion I stab at thee!
 
2297         * jit/JITOpcodes.cpp:
 
2298         (JSC::JIT::emit_op_resolve_global):
 
2300 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
 
2302         Reviewed by Darin Adler.
 
2304         Optimized o[s] where o is a cell and s is a string, removing some old
 
2305         code that wasn't really tuned for the JIT.
 
2307         SunSpider says 0.8% faster.
 
2310         (JSC::DEFINE_STUB_FUNCTION):
 
2313 2010-05-07  Oliver Hunt  <oliver@apple.com>
 
2317         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
2319 2010-05-07  Oliver Hunt  <oliver@apple.com>
 
2321         Reviewed by Geoffrey Garen.
 
2323         Optimize access to the global object from a function that uses eval
 
2324         https://bugs.webkit.org/show_bug.cgi?id=38644
 
2326         Add op_resolve_global_dynamic, a variant of op_resolve_global that
 
2327         checks each node in the scope chain for dynamically inserted properties
 
2328         and falls back to the normal resolve logic in that case.
 
2330         * JavaScriptCore.exp:
 
2331         * bytecode/CodeBlock.cpp:
 
2332         (JSC::isGlobalResolve):
 
2333         (JSC::CodeBlock::printStructures):
 
2334         (JSC::CodeBlock::dump):
 
2335         (JSC::CodeBlock::derefStructures):
 
2336         * bytecode/Opcode.h:
 
2337         * bytecompiler/BytecodeGenerator.cpp:
 
2338         (JSC::BytecodeGenerator::findScopedProperty):
 
2339            Now take an additional reference parameter to used to indicate that
 
2340            there were nodes that may gain dynamic properties
 
2341         (JSC::BytecodeGenerator::emitResolve):
 
2342         (JSC::BytecodeGenerator::emitResolveBase):
 
2343         (JSC::BytecodeGenerator::emitResolveWithBase):
 
2344            deal with additional argument to findScopedProperty
 
2345         * bytecompiler/BytecodeGenerator.h:
 
2346         * bytecompiler/NodesCodegen.cpp:
 
2347         (JSC::FunctionCallResolveNode::emitBytecode):
 
2348         (JSC::PostfixResolveNode::emitBytecode):
 
2349         (JSC::PrefixResolveNode::emitBytecode):
 
2350         (JSC::ReadModifyResolveNode::emitBytecode):
 
2351         (JSC::AssignResolveNode::emitBytecode):
 
2352            These functions use findScopedProperty directly in order to
 
2353            optimise lookup.  They cannot trivially handle any degree of
 
2354            dynamism in the lookup so we just give up in such case.
 
2355         * interpreter/Interpreter.cpp:
 
2356         (JSC::Interpreter::resolveGlobalDynamic):
 
2357         (JSC::Interpreter::execute):
 
2358         (JSC::Interpreter::privateExecute):
 
2359         * interpreter/Interpreter.h:
 
2361         (JSC::JIT::privateCompileMainPass):
 
2362         (JSC::JIT::privateCompileSlowCases):
 
2364         * jit/JITOpcodes.cpp:
 
2365         (JSC::JIT::emit_op_resolve_global):
 
2366         (JSC::JIT::emit_op_resolve_global_dynamic):
 
2367         (JSC::JIT::emitSlow_op_resolve_global):
 
2368         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
 
2369            Happily resolve_global_dynamic can share the slow case!
 
2372         * runtime/JSActivation.cpp:
 
2373         (JSC::JSActivation::isDynamicScope):
 
2374         * runtime/JSActivation.h:
 
2375         * runtime/JSGlobalObject.cpp:
 
2376         (JSC::JSGlobalObject::isDynamicScope):
 
2377         * runtime/JSGlobalObject.h:
 
2378         * runtime/JSStaticScopeObject.cpp:
 
2379         (JSC::JSStaticScopeObject::isDynamicScope):
 
2380         * runtime/JSStaticScopeObject.h:
 
2381         * runtime/JSVariableObject.h:
 
2383 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
 
2385         Reviewed by Gavin Barraclough.
 
2387         Fixed Sputnik failure seen on buildbot.
 
2389         * runtime/NumberPrototype.cpp:
 
2390         (JSC::numberProtoFuncToString): Cast to unsigned before checking magnitude,
 
2391         to efficiently exclude negative numbers, which require two characters
 
2394 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
 
2396         Reviewed by Alexey Proskuryakov.
 
2398         Slightly more effective way to guarantee a compile-time constant, at
 
2401         * runtime/NumberPrototype.cpp:
 
2402         (JSC::numberProtoFuncToString): Use pointer notation instead of array
 
2403         notation, so the compiler treats the string and its contents as constant.
 
2405 2010-05-07  Adam Barth  <abarth@webkit.org>
 
2407         Reviewed by Alexey Proskuryakov.
 
2409         [WTFURL] Add core URL parser
 
2410         https://bugs.webkit.org/show_bug.cgi?id=38572
 
2412         This patch adds the core of the URL parser.  The URL parser uses a
 
2413         templated notion of a code unit to support different string types.
 
2414         Later we'll add some non-templated APIs with concrete types that
 
2415         clients can use more conveniently.
 
2417         The URLParser has a couple calls to ASSERT(), which I've commented out
 
2418         for now.  I'm not 100% sure how to handle the dependency issues there
 
2419         yet, so I've punted on the issue for now.
 
2421         Also, there are a number of methods that are declared public in this
 
2422         patch that are only used by the canonicalizer.  My plan is to make
 
2423         those private or protected and make the canonicalizer a friend of the
 
2424         parser.  The details will be in a later patch.
 
2426         * wtf/url/src/URLComponent.h:
 
2427         (WTF::URLComponent::fromRange):
 
2428         (WTF::URLComponent::isNonEmpty):
 
2429         (WTF::URLComponent::isEmptyOrInvalid):
 
2430         * wtf/url/src/URLParser.h: Added.
 
2432         (WTF::URLParser::isPossibleAuthorityTerminator):
 
2433         (WTF::URLParser::parseAuthority):
 
2434         (WTF::URLParser::extractScheme):
 
2435         (WTF::URLParser::parseAfterScheme):
 
2436         (WTF::URLParser::parseStandardURL):
 
2437         (WTF::URLParser::parsePath):
 
2438         (WTF::URLParser::parsePathURL):
 
2439         (WTF::URLParser::parseMailtoURL):
 
2440         (WTF::URLParser::parsePort):
 
2441         (WTF::URLParser::extractFileName):
 
2442         (WTF::URLParser::extractQueryKeyValue):
 
2443         (WTF::URLParser::isURLSlash):
 
2444         (WTF::URLParser::shouldTrimFromURL):
 
2445         (WTF::URLParser::trimURL):
 
2446         (WTF::URLParser::consecutiveSlashes):
 
2447         (WTF::URLParser::isPortDigit):
 
2448         (WTF::URLParser::nextAuthorityTerminator):
 
2449         (WTF::URLParser::parseUserInfo):
 
2450         (WTF::URLParser::parseServerInfo):
 
2452 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
 
2454         Reviewed by Oliver Hunt.
 
2456         Added a fast path for number-to-character conversion via
 
2457         Number.prototype.toString base 36.
 
2459         0.7% speedup on SunSpider.
 
2461         * runtime/NumberPrototype.cpp:
 
2462         (JSC::numberProtoFuncToString): Made radix interpretation a little more
 
2463         efficient by keeping it in int space. Turned "const char" into
 
2464         "static const char" just in case. Added a fast path for base 36
 
2465         conversion of something that will turn into a character.
 
2467 2010-05-07  Adam Barth  <abarth@webkit.org>
 
2469         Reviewed by Darin Fisher.
 
2471         [WTFURL] Add a malloc-backed URLBuffer
 
2472         https://bugs.webkit.org/show_bug.cgi?id=38694
 
2474         This patch adds a URLBuffer that uses new/delete to manage the backing
 
2475         store for the buffer.
 
2477         * wtf/url/src/RawURLBuffer.h: Added.
 
2478         (WTF::RawURLBuffer::RawURLBuffer):
 
2479         (WTF::RawURLBuffer::~RawURLBuffer):
 
2480         (WTF::RawURLBuffer::resize):
 
2482 2010-05-06  Fumitoshi Ukai  <ukai@chromium.org>
 
2484         Reviewed by Alexey Proskuryakov.
 
2486         JavaScriptCore/wtf/RandomNumber.h should provide using WTF::*
 
2487         https://bugs.webkit.org/show_bug.cgi?id=38719
 
2489         * wtf/RandomNumber.h:
 
2490           Add using directives.
 
2492 2010-05-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
2494         Reviewed by Kenneth Rohde Christiansen.
 
2496         [Qt] Enable YARR_JIT for X86 Mac for QtWebKit
 
2497         https://bugs.webkit.org/show_bug.cgi?id=38668
 
2501 2010-05-06  Gavin Barraclough  <barraclough@apple.com>
 
2503         Reviewed by Geoff Garen.
 
2505         Bug 38714 - Add result caching for Math.sin
 
2507         Math.sin is frequently called with the same operand, caching the result should
 
2508         improve performance.  CachedTranscendentalFunction adds a generic mechanism to
 
2509         cache results for pure functions with the signature "double func(double)", and
 
2510         where NaN maps to NaN.
 
2512         CachedTranscendentalFunction uses a very simple hash function designed to be
 
2513         fast to execute since we cannot cache the result, and trivial to JIT generate,
 
2514         should we wish to do so.
 
2516         * JavaScriptCore.xcodeproj/project.pbxproj:
 
2517         * runtime/CachedTranscendentalFunction.h: Added.
 
2518         (JSC::CachedTranscendentalFunction::CachedTranscendentalFunction):
 
2519         (JSC::CachedTranscendentalFunction::~CachedTranscendentalFunction):
 
2520         (JSC::CachedTranscendentalFunction::operator()):
 
2521         (JSC::CachedTranscendentalFunction::initialize):
 
2522         (JSC::CachedTranscendentalFunction::hash):
 
2523         * runtime/JSGlobalData.h:
 
2524         * runtime/MathObject.cpp:
 
2525         (JSC::mathProtoFuncSin):
 
2528 2010-05-06  Geoffrey Garen  <ggaren@apple.com>
 
2532         * bytecode/SamplingTool.cpp:
 
2533         (JSC::SamplingFlags::sample): Use a cast, so Windows will be happy when
 
2534         this code is enabled.
 
2535         * wtf/Platform.h: Reverted last change to this file, which seems to have
 
2538 2010-05-06  Gavin Barraclough  <barraclough@apple.com>
 
2540         Reviewed by Oliver Hunt.
 
2542         Add compile switch to make debugger keyword plant breakpoint instructions.
 
2544         * bytecompiler/BytecodeGenerator.cpp:
 
2545         (JSC::BytecodeGenerator::emitDebugHook):
 
2546         * jit/JITOpcodes.cpp:
 
2547         (JSC::JIT::emit_op_debug):
 
2550 2010-05-06  Oliver Hunt  <oliver@apple.com>
 
2556         * assembler/MacroAssemblerARM.h:
 
2557         (JSC::MacroAssemblerARM::load16):
 
2558         * assembler/MacroAssemblerARMv7.h:
 
2559         (JSC::MacroAssemblerARMv7::load16):
 
2561 2010-05-06  Oliver Hunt  <oliver@apple.com>
 
2563         Reviewed by Geoffrey Garen.
 
2565         Improve performance of single character string compares
 
2566         https://bugs.webkit.org/show_bug.cgi?id=38659
 
2568         Add logic to the jit to identify comparisons to single character string literals
 
2569         and then just perform the comparison inline, rather than ignoring the evidence
 
2570         and attempting to perform an integer comparison.
 
2572         Multiple changes required -- add jnlesseq opcode, add helper function to identify
 
2573         single character string constants, add a helper to load single character strings.
 
2574         Then add the 32_64 and normal codepaths to the JIT.
 
2576         * assembler/MacroAssemblerX86Common.h:
 
2577         (JSC::MacroAssemblerX86Common::load16):
 
2578         * bytecode/CodeBlock.cpp:
 
2579         (JSC::CodeBlock::dump):
 
2580         * bytecode/Opcode.h:
 
2581         * bytecompiler/BytecodeGenerator.cpp:
 
2582         (JSC::BytecodeGenerator::emitJumpIfTrue):
 
2583         * interpreter/Interpreter.cpp:
 
2584         (JSC::Interpreter::privateExecute):
 
2586         (JSC::JIT::privateCompileMainPass):
 
2587         (JSC::JIT::privateCompileSlowCases):
 
2589         * jit/JITArithmetic.cpp:
 
2590         (JSC::JIT::emit_op_jnless):
 
2591         (JSC::JIT::emitSlow_op_jnless):
 
2592         (JSC::JIT::emit_op_jless):
 
2593         (JSC::JIT::emitSlow_op_jless):
 
2594         (JSC::JIT::emit_op_jlesseq):
 
2595         (JSC::JIT::emit_op_jnlesseq):
 
2596         (JSC::JIT::emitSlow_op_jlesseq):
 
2597         (JSC::JIT::emitSlow_op_jnlesseq):
 
2598         * jit/JITArithmetic32_64.cpp:
 
2599         (JSC::JIT::emit_op_jnless):
 
2600         (JSC::JIT::emitSlow_op_jnless):
 
2601         (JSC::JIT::emit_op_jless):
 
2602         (JSC::JIT::emitSlow_op_jless):
 
2603         (JSC::JIT::emit_op_jlesseq):
 
2604         (JSC::JIT::emit_op_jnlesseq):
 
2605         (JSC::JIT::emitSlow_op_jlesseq):
 
2606         (JSC::JIT::emitSlow_op_jnlesseq):
 
2607         (JSC::JIT::emitBinaryDoubleOp):
 
2608         * jit/JITInlineMethods.h:
 
2609         (JSC::JIT::emitLoadCharacterString):
 
2610         (JSC::JIT::isOperandConstantImmediateChar):
 
2611         * jit/JSInterfaceJIT.h:
 
2612         (JSC::ThunkHelpers::stringImplDataOffset):
 
2613         (JSC::ThunkHelpers::jsStringLengthOffset):
 
2614         (JSC::ThunkHelpers::jsStringValueOffset):
 
2615          Moved from ThunkGenerators to make it possible to share.
 
2616         * jit/ThunkGenerators.cpp:
 
2618 2010-05-06  Martin Robinson  <mrobinson@webkit.org>
 
2620         Reviewed by Gustavo Noronha Silva.
 
2622         [GTK] Enable DOM clipboard and drag-and-drop access
 
2623         https://bugs.webkit.org/show_bug.cgi?id=30623
 
2625         Convert dragging portion of drag-and-drop to use DataObjectGtk.
 
2627         * wtf/gobject/GRefPtr.h: Add forward declarations for GObject functions.
 
2629 2010-05-06  Steve Block  <steveblock@google.com>
 
2631         Reviewed by Eric Seidel.
 
2633         MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
 
2634         https://bugs.webkit.org/show_bug.cgi?id=38544
 
2638 2010-05-06  Adam Barth  <abarth@webkit.org>
 
2640         Reviewed by Maciej Stachowiak.
 
2642         [WTFURL] Add a class to represent the segments of a URL
 
2643         https://bugs.webkit.org/show_bug.cgi?id=38566
 
2645         When paired with a string, this class represents a parsed URL.
 
2647         * wtf/url/src/URLSegments.cpp: Added.
 
2648         (WTF::URLSegments::length):
 
2649         (WTF::URLSegments::charactersBefore):
 
2650         * wtf/url/src/URLSegments.h: Added.
 
2651         (WTF::URLSegments::):
 
2652         (WTF::URLSegments::URLSegments):
 
2653         * wtf/url/wtfurl.gyp:
 
2655 2010-05-05  Tony Gentilcore  <tonyg@chromium.org>
 
2657         Reviewed by Adam Barth.
 
2659         Adding comment with link to RefPtr documentation.
 
2660         https://bugs.webkit.org/show_bug.cgi?id=38601
 
2664 2010-05-05  Gavin Barraclough  <barraclough@apple.com>
 
2666         Reviewed by Darin Adler.
 
2668         Bug 38604 - workers-gc2 crashing on Qt
 
2670         This appears to be due to a couple of issues.
 
2671         (1) When the atomic string table is deleted it does not clear the 'inTable' bit
 
2672         on AtomicStrings - it implicitly assumes that all AtomicStrings have already
 
2673         been deleted at this point (otherwise they will crash in their destructor when
 
2674         they try to remove themselves from the atomic string table).
 
2675         (2) We don't fix the ordering in which WTF::WTFThreadData and
 
2676         WebCore::ThreadGlobalData are destructed.
 
2678         We should make sure that ThreadGlobalData is cleaned up before worker threads
 
2679         terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable
 
2680         bit of members on atomic string table destruction.
 
2682         WTF changes (fix issue 1, above) - ensure inTable property is cleared when the
 
2683         atomic string table is destroyed (also, rename InTable to IsAtomic, to make it
 
2684         clear which table we are refering to!)
 
2686         * wtf/text/AtomicString.cpp:
 
2687         (WebCore::AtomicStringTable::destroy):
 
2688         (WebCore::CStringTranslator::translate):
 
2689         (WebCore::UCharBufferTranslator::translate):
 
2690         (WebCore::HashAndCharactersTranslator::translate):
 
2691         (WebCore::AtomicString::add):
 
2692         * wtf/text/StringImpl.cpp:
 
2693         (WebCore::StringImpl::~StringImpl):
 
2694         * wtf/text/StringImpl.h:
 
2695         (WebCore::StringImpl::isAtomic):
 
2696         (WebCore::StringImpl::setIsAtomic):
 
2697         * wtf/text/StringImplBase.h:
 
2699 2010-05-05  Oliver Hunt  <oliver@apple.com>
 
2701         Reviewed by Geoffrey Garen.
 
2703         Make Array.join specialised for actual arrays
 
2704         https://bugs.webkit.org/show_bug.cgi?id=38592
 
2706         Bring Array.join in line with the other array methods by specialising for
 
2709         * runtime/ArrayPrototype.cpp:
 
2710         (JSC::arrayProtoFuncJoin):
 
2712 2010-05-04  Yongjun Zhang  <yongjun_zhang@apple.com>
 
2714         Reviewed by Darin Adler.
 
2716         WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe.
 
2717         https://bugs.webkit.org/show_bug.cgi?id=38535
 
2719         Don't call asFunction if callee is not a FunctionType to prevent assertion failure
 
2720         in JSCell::isObject().
 
2722         * debugger/DebuggerCallFrame.cpp:
 
2723         (JSC::DebuggerCallFrame::functionName):
 
2724         (JSC::DebuggerCallFrame::calculatedFunctionName):
 
2726 2010-05-04  Steve Falkenburg  <sfalken@apple.com>
 
2728         Remove redundant exports to fix Windows build warnings.
 
2730         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
2732 2010-05-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
2734         Reviewed by Holger Freyther.
 
2736         Fix a memory leak inside the QScriptValue.
 
2738         QSciptValuePrivate::toString should release all temporary variables.
 
2740         [Qt] QScriptValue::toString have a memory leak.
 
2741         https://bugs.webkit.org/show_bug.cgi?id=38112
 
2743         * qt/api/qscriptvalue_p.h:
 
2744         (QScriptValuePrivate::toString):
 
2746 2010-05-04  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
2748         Reviewed by Darin Adler.
 
2750         Does not work on SPARC because of alignment issues
 
2751         https://bugs.webkit.org/show_bug.cgi?id=38455
 
2753         Use AllocAlignmentInteger instead of void* on pageheap_memory to
 
2754         avoid crashing at runtime in some architectures. Investigated by
 
2755         Mike Hommey <mh@glandium.org>, change suggested by Darin Adler.
 
2757         * wtf/FastMalloc.cpp:
 
2759 2010-05-04  Adam Barth  <abarth@webkit.org>
 
2761         Reviewed by Maciej Stachowiak.
 
2763         Add first WTFURL file
 
2764         https://bugs.webkit.org/show_bug.cgi?id=38470
 
2766         This class represents a component of a URL, such as the scheme or path.
 
2767         Essentially, the class is an index into a string buffer.
 
2770             - There was some discussion about where to put the URL library.
 
2771               There are a number of reasonable options, but putting the library
 
2772               in the WTF directory seems like a reasonable alternative.  This
 
2773               location will make more sense once WTF is moved out of
 
2774               JavaScriptCore and into a top-level directory.
 
2775         * wtf/url/src: Added.
 
2776             - I've added this extra directory to the usual structure because we
 
2777               eventually want a "public" folder that defines the public
 
2778               interface to this library that clients outside of svn.webkit.org
 
2779               can rely upon, much like the various subfolders of the WebKit
 
2780               directory often define a public API.
 
2781         * wtf/url/src/URLComponent.h: Added.
 
2782             - I've added this somewhat trivial class to get the ball rolling.
 
2783         (WTF::URLComponent::URLComponent):
 
2784         (WTF::URLComponent::isValid):
 
2785         (WTF::URLComponent::isNonempty):
 
2786         (WTF::URLComponent::reset):
 
2787         (WTF::URLComponent::operator==):
 
2788         (WTF::URLComponent::begin):
 
2789         (WTF::URLComponent::setBegin):
 
2790         (WTF::URLComponent::length):
 
2791         (WTF::URLComponent::setLength):
 
2792         (WTF::URLComponent::end):
 
2793         * wtf/url/wtfurl.gyp: Added.
 
2794             - WTFURL will be an independently buildable library, hence the
 
2795               beginnings of a wtfurl.gyp file.
 
2797 2010-05-03  Stephanie Lewis  <slewis@apple.com>
 
2799         Reviewed by Geoff Garen.
 
2801         https://bugs.webkit.org/show_bug.cgi?id=38368
 
2802         <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 
 
2803         (return memory quicker).
 
2804         Instead of returning everything but the smallest spans spread out 
 
2805         the spans kept over several size lists.
 
2807         * wtf/FastMalloc.cpp:
 
2808         (WTF::TCMalloc_PageHeap::scavenge):
 
2810 2010-05-03  James Robinson  <jamesr@chromium.org>
 
2812         Reviewed by Eric Seidel.
 
2814         Clean up a few compiler warnings
 
2815         https://bugs.webkit.org/show_bug.cgi?id=38073
 
2817         * wtf/text/StringImpl.cpp:
 
2818         (WebCore::StringImpl::ascii):
 
2820 2010-05-03  Gavin Barraclough  <barraclough@apple.com>
 
2822         Reviewed by NOBODY (reverting previous commit).
 
2824         Rolling out r58114 - this introduced memory leaks of
 
2825         AtomicStrings then workers terminated.
 
2828         * JavaScriptCore.gypi:
 
2829         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
2830         * JavaScriptCore.xcodeproj/project.pbxproj:
 
2831         * jit/ThunkGenerators.cpp:
 
2832         (JSC::ThunkHelpers::stringImplDataOffset):
 
2833         * runtime/Identifier.cpp:
 
2834         (JSC::IdentifierTable::~IdentifierTable):
 
2835         (JSC::IdentifierTable::add):
 
2836         (JSC::IdentifierCStringTranslator::hash):
 
2837         (JSC::IdentifierCStringTranslator::equal):
 
2838         (JSC::IdentifierCStringTranslator::translate):
 
2839         (JSC::Identifier::add):
 
2840         (JSC::IdentifierUCharBufferTranslator::hash):
 
2841         (JSC::IdentifierUCharBufferTranslator::equal):
 
2842         (JSC::IdentifierUCharBufferTranslator::translate):
 
2843         (JSC::Identifier::addSlowCase):
 
2844         * runtime/Identifier.h:
 
2845         * runtime/JSGlobalData.cpp:
 
2846         (JSC::JSGlobalData::JSGlobalData):
 
2847         (JSC::JSGlobalData::~JSGlobalData):
 
2848         * runtime/JSGlobalData.h:
 
2849         * wtf/WTFThreadData.cpp:
 
2850         (WTF::WTFThreadData::WTFThreadData):
 
2851         (WTF::WTFThreadData::~WTFThreadData):
 
2852         * wtf/WTFThreadData.h:
 
2853         (JSC::IdentifierTable::remove):
 
2854         (JSC::IdentifierTable::literalTable):
 
2855         (WTF::WTFThreadData::atomicStringTable):
 
2856         * wtf/text/AtomicString.cpp:
 
2857         (WebCore::AtomicStringTable::create):
 
2858         (WebCore::AtomicStringTable::table):
 
2859         (WebCore::AtomicStringTable::destroy):
 
2860         (WebCore::stringTable):
 
2861         (WebCore::CStringTranslator::hash):
 
2862         (WebCore::CStringTranslator::equal):
 
2863         (WebCore::CStringTranslator::translate):
 
2864         (WebCore::operator==):
 
2865         (WebCore::AtomicString::add):
 
2867         (WebCore::UCharBufferTranslator::hash):
 
2868         (WebCore::UCharBufferTranslator::equal):
 
2869         (WebCore::UCharBufferTranslator::translate):
 
2870         (WebCore::HashAndCharactersTranslator::hash):
 
2871         (WebCore::HashAndCharactersTranslator::equal):
 
2872         (WebCore::HashAndCharactersTranslator::translate):
 
2873         (WebCore::AtomicString::find):
 
2874         (WebCore::AtomicString::remove):
 
2875         * wtf/text/AtomicStringTable.h: Removed.
 
2876         * wtf/text/StringImpl.cpp:
 
2877         (WebCore::StringImpl::~StringImpl):
 
2878         * wtf/text/StringImpl.h:
 
2879         (WebCore::StringImpl::inTable):
 
2880         (WebCore::StringImpl::setInTable):
 
2882         * wtf/text/StringImplBase.h:
 
2883         (WTF::StringImplBase::StringImplBase):
 
2885 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
 
2887         Reviewed by Kevin Ollivier.
 
2889         [wx] Implement scheduleDispatchFunctionsOnMainThread for wx port.
 
2890         https://bugs.webkit.org/show_bug.cgi?id=38480
 
2892         * wtf/wx/MainThreadWx.cpp:
 
2893         (wxCallAfter::wxCallAfter):
 
2894         (wxCallAfter::OnCallback):
 
2895         (WTF::scheduleDispatchFunctionsOnMainThread):
 
2897 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
 
2899         Reviewed by Kevin Ollivier.
 
2901         [wx] Build and use Mac's ComplexTextController to support complex text in wx.
 
2902         https://bugs.webkit.org/show_bug.cgi?id=38482
 
2906 2010-05-03  Oliver Hunt  <oliver@apple.com>
 
2908         Reviewed by Maciej Stachowiak.
 
2910         Interpreter crashes due to incorrect refcounting of cached structures.
 
2911         https://bugs.webkit.org/show_bug.cgi?id=38491
 
2912         rdar://problem/7926160
 
2914         Make sure we ref/deref structures used for cached custom property getters
 
2916         * bytecode/CodeBlock.cpp:
 
2917         (JSC::CodeBlock::derefStructures):
 
2918         (JSC::CodeBlock::refStructures):
 
2920 2010-05-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
2922         Reviewed by Eric Seidel.
 
2924         [Qt] Enable JIT for QtWebKit on Symbian
 
2925         https://bugs.webkit.org/show_bug.cgi?id=38339
 
2927         JIT on Symbian has been stable for quite some time, it
 
2928         is time to turn it on by default.
 
2932 2010-04-29  Oliver Hunt  <oliver@apple.com>
 
2934         Reviewed by Gavin Barraclough.
 
2936         Add codegen support for unsigned right shift
 
2937         https://bugs.webkit.org/show_bug.cgi?id=38375
 
2939         Expose unsigned right shift in the macro assembler, and make use of it
 
2940         from the jit.  Currently if the result is outside the range 0..2^31-1
 
2941         we simply fall back to the slow case, even in JSVALUE64 and JSVALUE32_64
 
2942         where technically we could still return an immediate value.
 
2944         * assembler/MacroAssemblerARM.h:
 
2945         (JSC::MacroAssemblerARM::urshift32):
 
2946         * assembler/MacroAssemblerARMv7.h:
 
2947         (JSC::MacroAssemblerARMv7::urshift32):
 
2948         * assembler/MacroAssemblerX86Common.h:
 
2949         (JSC::MacroAssemblerX86Common::urshift32):
 
2950         * assembler/X86Assembler.h:
 
2951         (JSC::X86Assembler::):
 
2952         (JSC::X86Assembler::shrl_i8r):
 
2953         (JSC::X86Assembler::shrl_CLr):
 
2954            Add unsigned right shift to the x86 assembler
 
2956         (JSC::JIT::privateCompileMainPass):
 
2957         (JSC::JIT::privateCompileSlowCases):
 
2958            op_rshift no longer simply get thrown to a stub function
 
2960         * jit/JITArithmetic.cpp:
 
2961         (JSC::JIT::emit_op_urshift):
 
2962         (JSC::JIT::emitSlow_op_urshift):
 
2963           JSVALUE32 and JSVALUE64 implementation.  Only supports
 
2964           double lhs in JSVALUE64.
 
2965         * jit/JITArithmetic32_64.cpp:
 
2966         (JSC::JIT::emit_op_rshift):
 
2967         (JSC::JIT::emitSlow_op_rshift):
 
2968         (JSC::JIT::emit_op_urshift):
 
2969         (JSC::JIT::emitSlow_op_urshift):
 
2970           Refactor right shift code to have shared implementation between signed
 
2971           and unsigned versions.
 
2973 2010-04-29  Oliver Hunt  <oliver@apple.com>
 
2975         Reviewed by Gavin Barraclough.
 
2977         Handle double on righthand side of a right shift
 
2978         https://bugs.webkit.org/show_bug.cgi?id=38363
 
2980         In 64-bit we support right shift of a double, and there's no
 
2981         reason not to in 32-bit either.  This is a 1.1% sunspider
 
2982         improvement in 32bit.
 
2984         Given high performance javascript code frequently makes
 
2985         use of bit operators to perform double->int conversion i'll
 
2986         follow this patch up with similar patches for bitwise 'and'
 
2989         * jit/JITArithmetic32_64.cpp:
 
2990         (JSC::JIT::emit_op_rshift):
 
2991         (JSC::JIT::emitSlow_op_rshift):
 
2993 2010-04-29  Oliver Hunt  <oliver@apple.com>
 
2995         Reviewed by Geoff Garen.
 
2997         Hoist JSVALUE32_64 arithmetic implementations into a separate file.
 
3000         * JavaScriptCore.gypi:
 
3001         * JavaScriptCore.pro:
 
3002         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
3003         * JavaScriptCore.xcodeproj/project.pbxproj:
 
3004         * jit/JITArithmetic.cpp:
 
3005         (JSC::JIT::emitSlow_op_jnless):
 
3006         (JSC::JIT::emitSlow_op_jless):
 
3007         (JSC::JIT::emitSlow_op_jnlesseq):
 
3008         (JSC::JIT::emit_op_mod):
 
3009         (JSC::JIT::compileBinaryArithOpSlowCase):
 
3010         (JSC::JIT::emit_op_div):
 
3011         (JSC::JIT::compileBinaryArithOp):
 
3012         * jit/JITArithmetic32_64.cpp: Added.
 
3013         (JSC::JIT::emit_op_negate):
 
3014         (JSC::JIT::emitSlow_op_negate):
 
3015         (JSC::JIT::emit_op_jnless):
 
3016         (JSC::JIT::emitSlow_op_jnless):
 
3017         (JSC::JIT::emit_op_jless):
 
3018         (JSC::JIT::emitSlow_op_jless):
 
3019         (JSC::JIT::emit_op_jnlesseq):
 
3020         (JSC::JIT::emitSlow_op_jnlesseq):
 
3021         (JSC::JIT::emit_op_lshift):
 
3022         (JSC::JIT::emitSlow_op_lshift):
 
3023         (JSC::JIT::emit_op_rshift):
 
3024         (JSC::JIT::emitSlow_op_rshift):
 
3025         (JSC::JIT::emit_op_bitand):
 
3026         (JSC::JIT::emitSlow_op_bitand):
 
3027         (JSC::JIT::emit_op_bitor):
 
3028         (JSC::JIT::emitSlow_op_bitor):
 
3029         (JSC::JIT::emit_op_bitxor):
 
3030         (JSC::JIT::emitSlow_op_bitxor):
 
3031         (JSC::JIT::emit_op_bitnot):
 
3032         (JSC::JIT::emitSlow_op_bitnot):
 
3033         (JSC::JIT::emit_op_post_inc):
 
3034         (JSC::JIT::emitSlow_op_post_inc):
 
3035         (JSC::JIT::emit_op_post_dec):
 
3036         (JSC::JIT::emitSlow_op_post_dec):
 
3037         (JSC::JIT::emit_op_pre_inc):
 
3038         (JSC::JIT::emitSlow_op_pre_inc):
 
3039         (JSC::JIT::emit_op_pre_dec):
 
3040         (JSC::JIT::emitSlow_op_pre_dec):
 
3041         (JSC::JIT::emit_op_add):
 
3042         (JSC::JIT::emitAdd32Constant):
 
3043         (JSC::JIT::emitSlow_op_add):
 
3044         (JSC::JIT::emit_op_sub):
 
3045         (JSC::JIT::emitSub32Constant):
 
3046         (JSC::JIT::emitSlow_op_sub):
 
3047         (JSC::JIT::emitBinaryDoubleOp):
 
3048         (JSC::JIT::emit_op_mul):
 
3049         (JSC::JIT::emitSlow_op_mul):
 
3050         (JSC::JIT::emit_op_div):
 
3051         (JSC::JIT::emitSlow_op_div):
 
3052         (JSC::JIT::emit_op_mod):
 
3053         (JSC::JIT::emitSlow_op_mod):
 
3055 2010-04-29  Zoltan Herczeg  <zherczeg@webkit.org>
 
3057         Reviewed by Oliver Hunt
 
3059         Add sqrt() instruction support for ARM assembler (using VFP)
 
3060         https://bugs.webkit.org/show_bug.cgi?id=38312
 
3062         * assembler/ARMAssembler.h:
 
3063         (JSC::ARMAssembler::):
 
3064         (JSC::ARMAssembler::fsqrtd_r):
 
3065         * assembler/MacroAssemblerARM.h:
 
3066         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
 
3067         (JSC::MacroAssemblerARM::sqrtDouble):
 
3069 2010-04-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
3071         Reviewed by Simon Hausmann.
 
3073         [Qt] Refactor qtscriptglobal.h
 
3074         https://bugs.webkit.org/show_bug.cgi?id=37953
 
3076         Use the same pattern in qtscriptglobal.h as in 
 
3077         qwebkitglobal.h without checking for specific OSs.
 
3079         * qt/api/qtscriptglobal.h:
 
3081 2010-04-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
3083         Reviewed by Simon Hausmann.
 
3087         QScriptValuePrivate constructor shouldn't take QScriptEngine pointer
 
3088         as a parameter, because it breaks a private / public separation rule.
 
3089         QScriptEnginePrivate::get(QScriptEngine*) should return
 
3090         a QScriptEnginePrivate pointer instead of a QScriptEnginePtr, it simplifies
 
3093         [Qt] QScriptValuePrivate class needs some cleanup.
 
3094         https://bugs.webkit.org/show_bug.cgi?id=37729
 
3096         * qt/api/qscriptengine_p.h:
 
3097         (QScriptEnginePrivate::get):
 
3098         * qt/api/qscriptvalue.cpp:
 
3099         (QScriptValue::QScriptValue):
 
3100         * qt/api/qscriptvalue_p.h:
 
3101         (QScriptValuePrivate::QScriptValuePrivate):
 
3103 2010-04-29  Kwang Yul Seo  <skyul@company100.net>
 
3105         Reviewed by Simon Hausmann.
 
3107         [WINCE] Export g_stackBase with JS_EXPORTDATA
 
3108         https://bugs.webkit.org/show_bug.cgi?id=37437
 
3110         Export g_stackBase with JS_EXPORTDATA as it is used by SharedTimerWince.cpp.
 
3112         * runtime/Collector.cpp:
 
3114 2010-04-28  Oliver Hunt  <oliver@apple.com>
 
3116         Do an unordered compare so that we don't treat NaN incorrectly.
 
3118         RS=Gavin Barraclough
 
3120         * jit/ThunkGenerators.cpp:
 
3121         (JSC::powThunkGenerator):
 
3123 2010-04-28  Oliver Hunt  <oliver@apple.com>
 
3125         Reviewed by Gavin Barraclough.
 
3127         Add fast paths for Math.pow and Math.sqrt
 
3128         https://bugs.webkit.org/show_bug.cgi?id=38294
 
3130         Add specialized thunks for Math.pow and Math.sqrt.
 
3131         This requires adding a sqrtDouble function to the MacroAssembler
 
3132         and sqrtsd to the x86 assembler.
 
3134         Math.pow is slightly more complicated, in that we have
 
3135         to implement exponentiation ourselves rather than relying
 
3136         on hardware support.  The inline exponentiation is restricted
 
3137         to positive integer exponents on a numeric base.  Exponentiation
 
3138         is finally performed through the "Exponentiation by Squaring"
 
3141         * assembler/AbstractMacroAssembler.h:
 
3142         (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
 
3143         * assembler/MacroAssemblerARM.h:
 
3144         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
 
3145         (JSC::MacroAssemblerARM::loadDouble):
 
3146         (JSC::MacroAssemblerARM::sqrtDouble):
 
3147         * assembler/MacroAssemblerARMv7.h:
 
3148         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
 
3149         (JSC::MacroAssemblerARMv7::sqrtDouble):
 
3150         * assembler/MacroAssemblerX86.h:
 
3151         (JSC::MacroAssemblerX86::loadDouble):
 
3152         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
 
3153         * assembler/MacroAssemblerX86Common.h:
 
3154         (JSC::MacroAssemblerX86Common::sqrtDouble):
 
3155         * assembler/MacroAssemblerX86_64.h:
 
3156         (JSC::MacroAssemblerX86_64::loadDouble):
 
3157         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
 
3158         * assembler/X86Assembler.h:
 
3159         (JSC::X86Assembler::):
 
3160         (JSC::X86Assembler::movsd_mr):
 
3161         (JSC::X86Assembler::sqrtsd_rr):
 
3162         (JSC::X86Assembler::X86InstructionFormatter::twoByteOp):
 
3163         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
 
3164         * create_hash_table:
 
3166         * jit/JITInlineMethods.h:
 
3167         * jit/JITOpcodes.cpp:
 
3169         (JSC::JITThunks::ctiNativeCallThunk):
 
3170         * jit/JSInterfaceJIT.h:
 
3171         (JSC::JSInterfaceJIT::emitLoadDouble):
 
3172         (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
 
3173         (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
 
3174         (JSC::JSInterfaceJIT::emitLoadInt32):
 
3175         * jit/SpecializedThunkJIT.h:
 
3176         (JSC::SpecializedThunkJIT::loadDoubleArgument):
 
3177         (JSC::SpecializedThunkJIT::loadInt32Argument):
 
3178         (JSC::SpecializedThunkJIT::returnJSValue):
 
3179         (JSC::SpecializedThunkJIT::returnDouble):
 
3180         (JSC::SpecializedThunkJIT::finalize):
 
3181         * jit/ThunkGenerators.cpp:
 
3182         (JSC::sqrtThunkGenerator):
 
3183         (JSC::powThunkGenerator):
 
3184         * jit/ThunkGenerators.h:
 
3185         * runtime/Executable.h:
 
3186         (JSC::NativeExecutable::NativeExecutable):
 
3187         * runtime/JSFunction.cpp:
 
3188         (JSC::JSFunction::JSFunction):
 
3190 2010-04-28  Mike Thole  <mthole@apple.com>
 
3192         Reviewed by Mark Rowe.
 
3194         Reenable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK now that an
 
3195         exports file for it has been added.
 
3199 2010-04-28  Mike Thole  <mthole@apple.com>
 
3201         Build fix, not reviewed.
 
3204         Disable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK until an exports file is created.
 
3206 2010-04-28  Mike Thole  <mthole@apple.com>
 
3208         Reviewed by David Kilzer.
 
3210         Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space 
 
3211         can be inspected before attempting to authenticate against it
 
3212         https://bugs.webkit.org/show_bug.cgi?id=38271
 
3214         * wtf/Platform.h: Add WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK define.
 
3216 2010-04-28  Darin Adler  <darin@apple.com>
 
3218         Reviewed by Sam Weinig.
 
3220         Don't use CFAbsoluteTimeGetCurrent on Mac OS X, since it's just a cover
 
3221         for gettimeofday anyway.
 
3223         * wtf/CurrentTime.cpp:
 
3224         (WTF::currentTime): Remove the CF version of this. Change the "other POSIX"
 
3225         version to pass 0 for the time zone instead of ignoring a return value.
 
3226         Also get rid of unneeded type casts, since operations involving both
 
3227         integers and doubles are always evaluated as doubles in C without explicit
 
3230 2010-04-28  Darin Fisher  <darin@chromium.org>
 
3232         Reviewed by David Levin.
 
3234         [Chromium] callOnMainThread should equate to MessageLoop::PostTask
 
3235         https://bugs.webkit.org/show_bug.cgi?id=38276
 
3237         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
3238         * wtf/MainThread.cpp:
 
3239         * wtf/chromium/ChromiumThreading.h:
 
3240         * wtf/chromium/MainThreadChromium.cpp:
 
3241         (WTF::initializeMainThread):
 
3242         (WTF::callOnMainThread):
 
3243         (WTF::callOnMainThreadAndWait):
 
3244         (WTF::setMainThreadCallbacksPaused):
 
3245         (WTF::isMainThread):
 
3247 2010-04-28  Simon Hausmann  <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>
 
3249         Reviewed by Darin Adler.
 
3251         JSC's currentThreadStackBase is not reentrant on some platforms
 
3252         https://bugs.webkit.org/show_bug.cgi?id=37195
 
3254         This function needs to be reentrant to avoid memory corruption on platforms where
 
3255         the implementation uses global variables.
 
3257         This patch adds a mutex lock where necessary and makes the Symbian implementation
 
3260         * runtime/Collector.cpp:
 
3261         (JSC::currentThreadStackBaseMutex):
 
3262         (JSC::currentThreadStackBase):
 
3264 2010-04-28  Thiago Macieira <thiago.macieira@nokia.com>
 
3266         Reviewed by Simon Hausmann.
 
3268         Fix compilation with gcc 3.4.
 
3270         AtomicStringImpl.h:29: error: base `WebCore::StringImpl' with only
 
3271         non-default constructor in class without a constructor
 
3273         * wtf/text/AtomicStringImpl.h:
 
3274         (WebCore::AtomicStringImpl::AtomicStringImpl): Provide a default constructor.
 
3275         * wtf/text/StringImpl.h: Allow AtomicStringImpl to call a StringImpl constructor through a friend declaration.
 
3277 2010-04-27  Stephanie Lewis  <slewis@apple.com>
 
3281         * wtf/FastMalloc.cpp:
 
3282         (WTF::TCMalloc_PageHeap::Carve):
 
3284 2010-04-26  Stephanie Lewis  <slewis@apple.com>
 
3286         Reviewed by Geoff Garen.
 
3288         https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often.
 
3289         <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker).  
 
3290         To save on madvise calls when recommitting memory recommit the entire span and then carve it
 
3291         instead of carving the span up and only committing the part that will be used immediately.
 
3293         * wtf/FastMalloc.cpp:
 
3294         (WTF::TCMalloc_PageHeap::New):
 
3295         (WTF::TCMalloc_PageHeap::AllocLarge):
 
3296         (WTF::TCMalloc_PageHeap::Carve):
 
3298 2010-04-26  Oliver Hunt  <oliver@apple.com>
 
3300         Reviewed by Maciej Stachowiak.
 
3302         Add specialized thunks for a char code related string functions
 
3303         https://bugs.webkit.org/show_bug.cgi?id=38177
 
3305         This is a simple extension to my prior patch.  Basically hoist the
 
3306         existing character loading logic from the charCodeAt thunk and into
 
3307         a helper function, then add a helper to load strings from the small
 
3308         string cache.  This allows trivial implementations of fromCharCode
 
3311         * create_hash_table:
 
3312         * jit/SpecializedThunkJIT.h:
 
3313         (JSC::SpecializedThunkJIT::returnJSCell):
 
3314         (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
 
3315         * jit/ThunkGenerators.cpp:
 
3316         (JSC::stringCharLoad):
 
3317         (JSC::charToString):
 
3318         (JSC::charCodeAtThunkGenerator):
 
3319         (JSC::charAtThunkGenerator):
 
3320         (JSC::fromCharCodeThunkGenerator):
 
3321         * jit/ThunkGenerators.h:
 
3322         * runtime/SmallStrings.h:
 
3323         (JSC::SmallStrings::singleCharacterStrings):
 
3324         * runtime/StringConstructor.cpp:
 
3325         (JSC::StringConstructor::StringConstructor):
 
3327 2010-04-27  Thomas Zander <t.zander@nokia.com>
 
3329         Reviewed by Simon Hausmann.
 
3331         [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec
 
3333         * JavaScriptCore.pri: It is necessary to specify the library search path
 
3334         when linking against JavaScriptCore.
 
3336 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
3338         Reviewed by Simon Hausmann.
 
3340         Compile fix for Visual Studio 2010
 
3341         https://bugs.webkit.org/show_bug.cgi?id=37867
 
3343         Patch by Prasanth Ullattil <prasanth.ullattil@nokia.com>
 
3345         * runtime/Structure.cpp:
 
3346         (JSC::Structure::transitionTableAdd):
 
3350 2010-04-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
3352         Reviewed by Simon Hausmann.
 
3354         Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER)
 
3357         (JSC::Structure::transitionTableAdd):
 
3360         * wtf/CurrentTime.h:
 
3361         (WTF::getLocalTime):
 
3363         * wtf/StaticConstructors.h:
 
3364         * wtf/StringExtras.h:
 
3368 2010-04-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
3370         Reviewed by Tor Arne Vestbø.
 
3372         [Qt] Fix Mac build break.
 
3374         https://bugs.webkit.org/show_bug.cgi?id=37867
 
3375         - Make sure JavaScriptCore's debug_and_release config follows that
 
3377         - Use different name for JavaScriptCore target in debug and release
 
3378           since they might be written in the same path at the same time on
 
3380         - Consolidate the DESTDIR determination logic in JavaScriptCore.pri
 
3382         * JavaScriptCore.pri:
 
3383         * JavaScriptCore.pro:
 
3385 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
3387         Reviewed by Kenneth Rohde Christiansen.
 
3389         [Qt] Make sure WebKit is not compiled using C++0x.
 
3390         https://bugs.webkit.org/show_bug.cgi?id=37867
 
3392         As the rest of Qt compiles in the C++0x mode, people might start
 
3393         compiling it in this mode. WebKit don't support this yet.
 
3395         Patch by Thiago Macieira <thiago.macieira@nokia.com>
 
3397         * JavaScriptCore.pro:
 
3399 2010-04-26  Oliver Hunt  <oliver@apple.com>
 
3403         * jit/SpecializedThunkJIT.h:
 
3404         (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
 
3406 2010-04-26  Oliver Hunt  <oliver@apple.com>
 
3408         Reviewed by Gavin Barraclough.
 
3410         Need to support more efficient dispatch of lightweight builtins
 
3411         https://bugs.webkit.org/show_bug.cgi?id=38155
 
3413         The problem with calling lightweight builtins is that marshalling
 
3414         the call from the nitro calling convention to the system calling
 
3415         convention is very expensive relative to the cost of the actually
 
3416         evaluating the function.  To work around this problem this patch
 
3417         adds the ability to define a custom thunk for a builtin.
 
3419         This allows us to use high performance custom implementations of
 
3420         the common and sensible versions of simple builtins.  This patch
 
3421         includes a simple (use of which is currently hardcoded) thunk for
 
3424         This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
 
3425         that has helper functions to remove (or at least reduce) the need
 
3426         to have separate thunk implementations for each JSValue encoding.
 
3429         * JavaScriptCore.pro:
 
3430         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
3431         * JavaScriptCore.xcodeproj/project.pbxproj:
 
3432           Many project file updates
 
3434         * create_hash_table:
 
3435           Add thunk generation callbacks to the hash tables, currently
 
3436           we hardcode the script to only support charCodeAt
 
3438         * jit/JITStubCall.h:
 
3440         (JSC::JITThunks::~JITThunks):
 
3441         (JSC::JITThunks::specializedThunk):
 
3443         * jit/SpecializedThunkJIT.h: Added.
 
3444         (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
 
3445         (JSC::SpecializedThunkJIT::loadCellArgument):
 
3446         (JSC::SpecializedThunkJIT::loadJSStringArgument):
 
3447         (JSC::SpecializedThunkJIT::loadInt32Argument):
 
3448         (JSC::SpecializedThunkJIT::appendFailure):
 
3449         (JSC::SpecializedThunkJIT::returnInt32):
 
3450         (JSC::SpecializedThunkJIT::finalize):
 
3451         (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
 
3452         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
 
3453         * jit/ThunkGenerators.cpp: Added.
 
3454         (JSC::ThunkHelpers::stringImplDataOffset):
 
3455         (JSC::ThunkHelpers::jsStringLengthOffset):
 
3456         (JSC::ThunkHelpers::jsStringValueOffset):
 
3457         (JSC::charCodeAtThunkGenerator):
 
3458         * jit/ThunkGenerators.h: Added.
 
3459         * runtime/Executable.h:
 
3460         (JSC::NativeExecutable::NativeExecutable):
 
3461         * runtime/JSFunction.cpp:
 
3462         (JSC::JSFunction::JSFunction):
 
3463         * runtime/JSFunction.h:
 
3464         * runtime/JSGlobalData.h:
 
3465         (JSC::JSGlobalData::getThunk):
 
3466         * runtime/JSString.h:
 
3468         * runtime/JSValue.h:
 
3469           Protect some of the JSVALUE32 and JSVALUE32_64 only constants
 
3470           and function behind appropriate USE() guards to make it harder
 
3471           to use the wrong flags for the target build.
 
3472         * runtime/Lookup.cpp:
 
3473         (JSC::HashTable::createTable):
 
3474         (JSC::setUpStaticFunctionSlot):
 
3476         (JSC::HashEntry::initialize):
 
3477         (JSC::HashEntry::generator):
 
3479           Make the lookup tables use a specialized thunkGenerator
 
3481         * wtf/text/StringImpl.h:
 
3483 2010-04-26  Oliver Hunt  <oliver@apple.com>
 
3487         * runtime/JSImmediate.h:
 
3488         * runtime/JSValue.h:
 
3490 2010-04-26  Oliver Hunt  <oliver@apple.com>
 
3492         Reviewed by Gavin Barraclough.
 
3494         Factor some basic JS interface logic out of JIT and into a superclass
 
3495         https://bugs.webkit.org/show_bug.cgi?id=38163
 
3497         Create JSInterfaceJIT to hold some common low level functions for
 
3498         interacting with the JS RegisterFile.  Doing this separately from
 
3499         https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing.
 
3501         * JavaScriptCore.xcodeproj/project.pbxproj:
 
3503         * jit/JITInlineMethods.h:
 
3504         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
 
3505         * jit/JSInterfaceJIT.h: Added.
 
3506         (JSC::JSInterfaceJIT::emitLoadJSCell):
 
3507         (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
 
3508         (JSC::JSInterfaceJIT::emitLoadInt32):
 
3509         (JSC::JSInterfaceJIT::tagFor):
 
3510         (JSC::JSInterfaceJIT::payloadFor):
 
3511         (JSC::JSInterfaceJIT::addressFor):
 
3513 2010-04-26  Sam Weinig  <sam@webkit.org>
 
3517         * wtf/mac/MainThreadMac.mm:
 
3518         (WTF::isMainThread):
 
3520 2010-04-26  Geoffrey Garen  <ggaren@apple.com>
 
3522         Reviewed by Sam Weinig.
 
3524         <rdar://problem/7766413>
 
3526         Fixed a crash seen when using the JavaScriptCore API with WebKit.
 
3528         No layout test because DumpRenderTree doesn't use the JavaScriptCore API
 
3531         * interpreter/RegisterFile.cpp:
 
3532         (JSC::RegisterFile::setGlobalObject):
 
3533         (JSC::RegisterFile::clearGlobalObject):
 
3534         (JSC::RegisterFile::globalObject):
 
3535         * interpreter/RegisterFile.h:
 
3536         (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject,
 
3537         since it's a weak pointer. (We never noticed this error before because,
 
3538         in WebKit, global objects always have a self-reference in a global variable,
 
3539         so marking the register file's global variables would keep m_globalObject
 
3540         alive. In the JavaScriptCore API, you can allocate a global object with
 
3543         * runtime/JSActivation.h: Removed unneeded #include.
 
3545         * runtime/JSGlobalObject.cpp:
 
3546         (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak
 
3547         pointer is 0 when the object it points to runs its destructor.
 
3549         * runtime/WeakGCPtr.h:
 
3550         (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the
 
3551         clear actually happened.
 
3552         (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand
 
3553         for calling clear(). A client should never clear by assigning 0, since
 
3554         clear() should be conditional on whether the object doing the clearing
 
3555         is still pointed to by the weak pointer. (Otherwise, a zombie object might
 
3556         clear a pointer to a new, valid object.)
 
3558 2010-04-25  Sam Weinig  <sam@webkit.org>
 
3560         Reviewed by Maciej Stachowiak.
 
3562         Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
 
3563         Disentangle initializing the main thread from initializing threading
 
3565         This is the first step in getting rid of the WEB_THREAD #define and
 
3566         paving the way to allowing mac both WebKit and WebKit2 to use the same
 
3569         * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread.
 
3570         * JavaScriptCore.xcodeproj/project.pbxproj: Sort files.
 
3572         * wtf/MainThread.cpp:
 
3573         (WTF::mainThreadInitializationMutex):
 
3574         (WTF::mainThreadFunctionQueueMutex):
 
3575         (WTF::initializeMainThread):
 
3576         (WTF::deprecatedInitializeMainThread):
 
3578         Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread
 
3579         and isMainThead calls to assume that WebCore's main thread is also the
 
3580         process's main thread. Since it is possible that both initializeMainThread
 
3581         and initializeMainThreadToProcessMainThread could be called, the first one called
 
3582         wins (either will work).
 
3584         * wtf/Threading.h: Moved to top of file.
 
3586         * wtf/ThreadingPthreads.cpp:
 
3587         (WTF::initializeThreading): Remove call to initializeMainThread.
 
3588         * wtf/ThreadingWin.cpp:
 
3589         (WTF::initializeThreading): Ditto.
 
3590         * wtf/gtk/ThreadingGtk.cpp:
 
3591         (WTF::initializeThreading): Ditto.
 
3593         * wtf/mac/MainThreadMac.mm:
 
3594         (WTF::initializeMainThreadPlatform):
 
3595         (WTF::initializeMainThreadToProcessMainThread):
 
3596         (WTF::scheduleDispatchFunctionsOnMainThread):
 
3597         (WTF::isMainThread):
 
3598         Add runtime switch between the old behavior of using the system's main
 
3599         thread and a stored pointer to the main thread. Tiger always uses the
 
3600         system's main thread.
 
3602         * wtf/qt/ThreadingQt.cpp:
 
3603         (WTF::initializeThreading): Remove call to initializeMainThread.
 
3604         * wtf/win/MainThreadWin.cpp:
 
3605         (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal
 
3606         removed from initializeThreading.
 
3608 2010-04-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
3610         Reviewed by Kenneth Rohde Christiansen.
 
3612         Fix a memory leak in the QScriptString.
 
3614         QScriptStringPrivate's constructor shouldn't call JSStringRetain as
 
3615         QScriptConverter implicitly pass a JSStringRef ownership.
 
3617         [Qt] QScriptStringPrivate c'tor problem
 
3618         https://bugs.webkit.org/show_bug.cgi?id=38110
 
3620         * qt/api/qscriptstring_p.h:
 
3621         (QScriptStringPrivate::QScriptStringPrivate):
 
3623 2010-04-24  Darin Adler  <darin@apple.com>
 
3625         Reviewed by Dan Bernstein.
 
3627         REGRESSION (r56560): Crash in parseFloat if passed invalid UTF-16 data
 
3628         https://bugs.webkit.org/show_bug.cgi?id=38083
 
3629         rdar://problem/7901044
 
3631         Tests: fast/js/ToNumber.html
 
3632                fast/js/parseFloat.html
 
3634         * runtime/JSGlobalObjectFunctions.cpp:
 
3635         (JSC::parseInt): Added a FIXME comment about a problem I noticed.
 
3636         (JSC::parseFloat): Added a FIXME comment about a problem I noticed;
 
3637         covered by test cases in the test I added.
 
3638         * runtime/UString.cpp:
 
3639         (JSC::UString::toDouble): Added FIXME comments about two problems I
 
3640         noticed; covered by test cases in the tests I added. Added a return
 
3641         statement so we don't crash when illegal UTF-16 sequences are present.
 
3643 2010-04-24  Anton Muhin  <antonm@chromium.org>
 
3645         Reviewed by Darin Adler.
 
3647         Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue
 
3649         Former implementation attempted to use AtomicString(HashTableDeletedValue)
 
3650         however those values cannot be used that way: one cannot construct
 
3651         QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
 
3652         in the table, for example.
 
3653         https://bugs.webkit.org/show_bug.cgi?id=37722
 
3655         * wtf/RefPtr.h: expose hash table deleted value
 
3657 2010-04-23  Sam Weinig  <sam@webkit.org>
 
3659         Reviewed by David Levin.
 
3661         Fix for https://bugs.webkit.org/show_bug.cgi?id=38060
 
3662         Split up Threading.h
 
3664         Move bits for of Threading.h into 3 new files.
 
3665         - Atomics.h for atomic operations.
 
3666         - ThreadSafeShared.h for the ThreadSafeShared class.
 
3667         - ThreadingPrimitives.h for the primitives and platform types.
 
3669         Basic threading operations (creation, etc.) remain in Threading.h.
 
3672         * JavaScriptCore.gypi:
 
3673         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
3674         * JavaScriptCore.xcodeproj/project.pbxproj:
 
3675         * wtf/Atomics.h: Copied from wtf/Threading.h.
 
3676         * wtf/ThreadSafeShared.h: Copied from wtf/Threading.h.
 
3678         * wtf/ThreadingPrimitives.h: Copied from wtf/Threading.h.
 
3680 2010-04-23  Sam Weinig  <sam@webkit.org>
 
3684         * wtf/qt/MainThreadQt.cpp: #include <QThread>
 
3686 2010-04-22  Sam Weinig  <sam@webkit.org>
 
3688         Reviewed by Anders Carlsson.
 
3690         Fix for https://bugs.webkit.org/show_bug.cgi?id=38022
 
3691         Move isMainThread predicate function to MainThread.h
 
3693         * wtf/MainThread.cpp:
 
3694         (WTF::initializeMainThread):
 
3695         (WTF::isMainThread):
 
3698         * wtf/ThreadingPthreads.cpp:
 
3699         (WTF::initializeThreading):
 
3700         * wtf/ThreadingWin.cpp:
 
3701         (WTF::initializeThreading):
 
3702         * wtf/gtk/ThreadingGtk.cpp:
 
3703         (WTF::initializeThreading):
 
3704         * wtf/mac/MainThreadMac.mm:
 
3705         (WTF::initializeMainThreadPlatform):
 
3706         (WTF::isMainThread):
 
3707         * wtf/qt/MainThreadQt.cpp:
 
3708         (WTF::isMainThread):
 
3709         * wtf/qt/ThreadingQt.cpp:
 
3710         (WTF::initializeThreading):
 
3711         * wtf/text/AtomicString.cpp:
 
3713 2010-04-23  Gabor Rapcsanyi  <rgabor@inf.u-szeged.hu>
 
3715         Reviewed by Laszlo Gombos.
 
3717         Add RVCT support for Linux
 
3719         Developed in cooperation with Gabor Loki.
 
3721         * API/JSStringRef.h:
 
3722         * jit/ExecutableAllocator.h:
 
3723         * jit/ExecutableAllocatorPosix.cpp:
 
3724         (JSC::ExecutableAllocator::cacheFlush):
 
3727         * wtf/unicode/qt4/UnicodeQt4.h:
 
3729 2010-04-23  Patrick Gansterer  <paroga@paroga.com>
 
3731         Reviewed by Laszlo Gombos.
 
3733         [WIN] Move OwnPtrWin.cpp into platform specific folder.
 
3734         https://bugs.webkit.org/show_bug.cgi?id=38042
 
3736         * JavaScriptCore.gypi:
 
3737         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
3738         * wtf/OwnPtrWin.cpp: Removed.
 
3739         * wtf/win/OwnPtrWin.cpp: Copied from JavaScriptCore/wtf/OwnPtrWin.cpp.
 
3741 2010-04-23  Patrick Gansterer  <paroga@paroga.com>
 
3743         Reviewed by Laszlo Gombos.
 
3745         [BREWMP] Move OwnPtrBrew.cpp into platform specific folder.
 
3746         https://bugs.webkit.org/show_bug.cgi?id=38042
 
3748         * wtf/OwnPtrBrew.cpp: Removed.
 
3749         * wtf/brew/OwnPtrBrew.cpp: Copied from JavaScriptCore/wtf/OwnPtrBrew.cpp.
 
3751 2010-04-22  Steve Block  <steveblock@google.com>
 
3753         Reviewed by Adam Barth.
 
3755         Update Android to use isfinite, isinf, isnan and signbit from namespace std.
 
3756         https://bugs.webkit.org/show_bug.cgi?id=37948
 
3760 2010-04-22  Fumitoshi Ukai  <ukai@chromium.org>
 
3762         Unreviewed build fix.
 
3764         * wtf/MD5.cpp: fix include path of CString.h
 
3766 2010-04-22  Fumitoshi Ukai  <ukai@chromium.org>
 
3768         Reviewed by Adam Barth.
 
3770         MD5 is required for WebSocket new protocol implementation
 
3771         https://bugs.webkit.org/show_bug.cgi?id=37913
 
3774         * JavaScriptCore.exp:
 
3775         * JavaScriptCore.gypi:
 
3776         * JavaScriptCore.pro:
 
3777         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
3778         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
3779         * JavaScriptCore.xcodeproj/project.pbxproj:
 
3780         * wtf/MD5.cpp: Added.
 
3783 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
 
3785         Reviewed by NOBODY (build fix).
 
3786         Errk, accidentally committed commenting out two ASSERTs! reverting.
 
3788         * runtime/Collector.cpp:
 
3789         (JSC::Heap::protect):
 
3790         (JSC::Heap::unprotect):
 
3792 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
 
3794         Reviewed by Geoff Garen.
 
3796         https://bugs.webkit.org/show_bug.cgi?id=38006
 
3797         Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable
 
3799         Presently JSC's IdentifierTables are owned by the JSGlobalData.  For
 
3800         JSGlobalData objects created via the API this should continue to be the case,
 
3801         but for the JSGlobalData objects used by WebCore (the main thread's common
 
3802         global data, and those for workers) use a IdentifierTable provided (and owned)
 
3803         by wtfThreadData.  This allow the lifetime of these IdentifierTable to match
 
3804         those of the corresponding AtomicStringTables.
 
3807         (JSC::APIEntryShim::APIEntryShim):
 
3808         * API/JSContextRef.cpp:
 
3809         (JSContextGroupCreate):
 
3810         * runtime/Collector.cpp:
 
3811         (JSC::Heap::protect):
 
3812         (JSC::Heap::unprotect):
 
3813         (JSC::Heap::markRoots):
 
3814         * runtime/JSGlobalData.cpp:
 
3815         (JSC::JSGlobalData::JSGlobalData):
 
3816         (JSC::JSGlobalData::~JSGlobalData):
 
3817         (JSC::JSGlobalData::createContextGroup):
 
3818         (JSC::JSGlobalData::create):
 
3819         (JSC::JSGlobalData::sharedInstance):
 
3820         * runtime/JSGlobalData.h:
 
3821         (JSC::JSGlobalData::):
 
3822         (JSC::JSGlobalData::isSharedInstance):
 
3823         * runtime/JSLock.cpp:
 
3824         (JSC::JSLock::JSLock):
 
3825         (JSC::JSLock::lock):
 
3826         (JSC::JSLock::unlock):
 
3827         (JSC::JSLock::DropAllLocks::DropAllLocks):
 
3828         * wtf/WTFThreadData.cpp:
 
3829         (WTF::WTFThreadData::WTFThreadData):
 
3830         (WTF::WTFThreadData::~WTFThreadData):
 
3832 2010-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
 
3834         Unreviewed, rolling out r58110.
 
3835         http://trac.webkit.org/changeset/58110
 
3836         https://bugs.webkit.org/show_bug.cgi?id=38007
 
3838         Caused an internal compiler error on Qt (Requested by abarth
 
3843 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
 
3845         Reviewed by NOBODY (windows build fix).
 
3847         * API/JSWeakObjectMapRefPrivate.cpp:
 
3849 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
 
3851         Reviewed by NOBODY (windows build fix).
 
3854         * API/JSCallbackObject.cpp:
 
3856 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
 
3858         Reviewed by Geoff Garen.
 
3860         https://bugs.webkit.org/show_bug.cgi?id=37978
 
3861         Unify JSC::IdentifierTable and WebCore::AtomicStringTable implementations.
 
3863         These two classes both implement a HashSet of uniqued StringImpls, with
 
3864         translator classes to avoid unnecessary object creation. The only difference
 
3865         between the classes is which flag (isIdentifier or inTable) is set.
 
3866         Combine the two classes using a template predicated on which flag to use.
 
3868         New class AtomicStringTable created, containing all the goodness from
 
3869         IdentifierTable & AtomicStringTable, expect for Identifier's literalTable,
 
3870         which has been moved onto JSGlobalData. Removed duplicate string translator
 
3871         classes. Renamed StringImpl's inTable flag to more explicit 'isAtomic',
 
3872         and set this on the empty string (which matches Identifier behaviour, and
 
3873         removes a redundant check for zero-length).
 
3876         * JavaScriptCore.gypi:
 
3877         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
3878         * JavaScriptCore.xcodeproj/project.pbxproj:
 
3879         * runtime/Identifier.cpp:
 
3880         (JSC::createLiteralTable):
 
3881         (JSC::deleteLiteralTable):
 
3882         (JSC::Identifier::add):
 
3883         (JSC::Identifier::addSlowCase):
 
3884         * runtime/Identifier.h:
 
3885         * runtime/JSGlobalData.cpp:
 
3886         (JSC::JSGlobalData::JSGlobalData):
 
3887         (JSC::JSGlobalData::~JSGlobalData):
 
3888         * runtime/JSGlobalData.h:
 
3889         * wtf/WTFThreadData.cpp:
 
3890         (WTF::WTFThreadData::WTFThreadData):
 
3891         (WTF::WTFThreadData::~WTFThreadData):
 
3892         * wtf/WTFThreadData.h:
 
3893         (WTF::WTFThreadData::atomicStringTable):
 
3894         * wtf/text/AtomicString.cpp:
 
3896         (WebCore::operator==):
 
3897         (WebCore::AtomicString::add):
 
3898         (WebCore::AtomicString::find):
 
3899         (WebCore::AtomicString::remove):
 
3900         * wtf/text/AtomicStringTable.h: Added.
 
3901         (WTF::CStringTranslator::hash):
 
3902         (WTF::CStringTranslator::equal):
 
3903         (WTF::CStringTranslator::translate):
 
3904         (WTF::UCharBufferTranslator::hash):
 
3905         (WTF::UCharBufferTranslator::equal):
 
3906         (WTF::UCharBufferTranslator::translate):
 
3907         (WTF::HashAndCharactersTranslator::hash):
 
3908         (WTF::HashAndCharactersTranslator::equal):
 
3909         (WTF::HashAndCharactersTranslator::translate):
 
3910         (WTF::IdentifierOrAtomicStringTable::remove):
 
3911         (WTF::::~IdentifierOrAtomicStringTable):
 
3914         * wtf/text/StringImpl.cpp:
 
3915         (WebCore::StringImpl::~StringImpl):
 
3916         * wtf/text/StringImpl.h:
 
3917         (WebCore::StringImpl::isAtomic):
 
3918         (WebCore::StringImpl::setIsAtomic):
 
3920         * wtf/text/StringImplBase.h:
 
3921         (WTF::StringImplBase::StringImplBase):
 
3923 2010-04-22  Steve Block  <steveblock@google.com>
 
3925         Reviewed by Adam Barth.
 
3927         Update Android to use isfinite, isinf, isnan and signbit from namespace std.
 
3928         https://bugs.webkit.org/show_bug.cgi?id=37948
 
3932 2010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
3934         Reviewed by Kenneth Rohde Christiansen.
 
3936         [Qt] Remove dependency of JSC to QtGui
 
3937         https://bugs.webkit.org/show_bug.cgi?id=37867
 
3939         The patch also make sure that hal.h is in the include path on Symbian.
 
3940         The dependency to QtGui took care of that before.
 
3942         Patch by Thiago Macieira <thiago.macieira@nokia.com>
 
3943              and Rohan McGovern <rohan.mcgovern@nokia.com>
 
3945         * JavaScriptCore.pri:
 
3946         * JavaScriptCore.pro:
 
3948 2010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
3950         Reviewed by Tor Arne Vestbø.
 
3952         [Qt] Corrects symbols visibility for JavaScriptCore.
 
3954         https://bugs.webkit.org/show_bug.cgi?id=37867
 
3956         * JavaScriptCore.pro:
 
3958 2010-04-22  Gabor Loki  <loki@webkit.org>
 
3960         Reviewed by Gavin Barraclough.
 
3962         Use BLX and BX to keep happy the return stack predictor above ARMv4
 
3963         https://bugs.webkit.org/show_bug.cgi?id=37862
 
3965         Inspired by Jacob Bramley's patch from JaegerMonkey
 
3967         * assembler/ARMAssembler.cpp:
 
3968         (JSC::ARMAssembler::executableCopy):
 
3969         * assembler/ARMAssembler.h:
 
3970         (JSC::ARMAssembler::):
 
3971         (JSC::ARMAssembler::bx):
 
3972         (JSC::ARMAssembler::blx):
 
3973         (JSC::ARMAssembler::loadBranchTarget):
 
3974         (JSC::ARMAssembler::jmp):
 
3975         (JSC::ARMAssembler::getLdrImmAddress):
 
3976         * assembler/MacroAssemblerARM.h:
 
3977         (JSC::MacroAssemblerARM::jump):
 
3978         (JSC::MacroAssemblerARM::nearCall):
 
3979         (JSC::MacroAssemblerARM::call):
 
3980         (JSC::MacroAssemblerARM::ret):
 
3981         (JSC::MacroAssemblerARM::prepareCall):
 
3982         (JSC::MacroAssemblerARM::call32):
 
3984 2010-04-21  Andy Estes  <aestes@apple.com>
 
3986         Rubber stamped by Mark Rowe.
 
3988         Export WTF::deleteOwnedPtr(HFONT).
 
3990         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
3992 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
 
3994         Rubber Stamped by Oliver Hunt.
 
3996         Make SmallStrings store an array of RefPtr<StringImpl>,
 
3997         instead of a direct array of StringImpls.  This allows
 
3998         us to remove a friend (and a layering violation) from
 
3999         WTF::StringImpl, and makes it so that all StringImpls
 
4000         are individually heap allocated.
 
4002         * runtime/SmallStrings.cpp:
 
4003         (JSC::SmallStringsStorage::rep):
 
4004         (JSC::SmallStringsStorage::SmallStringsStorage):
 
4005         * wtf/text/StringImpl.h:
 
4007 2010-04-21  Sam Weinig  <sam@webkit.org>
 
4009         Reviewed by Geoffrey Garen.
 
4011         Fix for https://bugs.webkit.org/show_bug.cgi?id=37937
 
4012         Wean JavaScriptCore off calls to isMainThread()
 
4014         - Replace use of isMainThread() for interpreter reentry checks
 
4015           with a stored value on the JSGlobalData.
 
4016         - Replace use of isMainThread() for useMainThread only check in the
 
4017           collector with a stored exclusive thread.
 
4019         * API/JSContextRef.cpp:
 
4020         (JSContextGroupCreate):
 
4021         Always default to a small stack type for uses of the JSC API. It is
 
4022         unlikely that the interpreter reentry required on the web will be as
 
4023         important for other uses of JavaScriptCore. 
 
4025         * JavaScriptCore.exp: 
 
4026         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4029         * interpreter/Interpreter.cpp:
 
4030         (JSC::Interpreter::execute):
 
4031         (JSC::Interpreter::prepareForRepeatCall):
 
4032         Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
 
4034         * interpreter/Interpreter.h:
 
4035         Rename MaxMainThreadReentryDepth to MaxLargeThreadReentryDepth and 
 
4036         MaxSecondaryThreadReentryDepth to MaxSmallThreadReentryDepth.
 
4039         (main): Use the a large stack for jsc since it is always using the
 
4042         * runtime/ArrayPrototype.cpp:
 
4043         (JSC::arrayProtoFuncToString):
 
4044         (JSC::arrayProtoFuncToLocaleString):
 
4045         (JSC::arrayProtoFuncJoin):
 
4046         Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
 
4048         * runtime/Collector.cpp:
 
4049         (JSC::Heap::registerThread):
 
4050         Use the concept of making JSC run on an exclusiveThread instead of
 
4051         forcing a mainThreadOnly assertion.
 
4053         * runtime/JSGlobalData.cpp:
 
4054         (JSC::JSGlobalData::JSGlobalData):
 
4055         (JSC::JSGlobalData::createNonDefault):
 
4056         (JSC::JSGlobalData::create):
 
4057         (JSC::JSGlobalData::createLeaked):
 
4058         (JSC::JSGlobalData::sharedInstance):
 
4059         * runtime/JSGlobalData.h:
 
4060         Add ThreadStackType argument to JSGlobalData constructors and set
 
4061         maxReentryDepth based on it.
 
4063 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
 
4065         Reviewed by NOBODY (windows build fix pt. 3).
 
4067         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4069 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
 
4071         Reviewed by NOBODY (windows build fix pt. 2).
 
4073         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4075 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
 
4077         Reviewed by NOBODY (Qt build fix).
 
4079         * JavaScriptCore.gypi:
 
4080         * JavaScriptCore.pro:
 
4081         * wtf/qt/StringQt.cpp: Copied from WebCore/platform/text/qt/StringQt.cpp.
 
4083 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
 
4085         Reviewed by NOBODY (windows build fix).
 
4087         * API/JSValueRef.cpp:
 
4088         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
4089         * runtime/Identifier.cpp:
 
4090         (JSC::IdentifierTable::~IdentifierTable):
 
4091         (JSC::IdentifierTable::add):
 
4092         * runtime/Identifier.h:
 
4093         * wtf/WTFThreadData.h:
 
4094         (JSC::IdentifierTable::remove):
 
4095         (JSC::IdentifierTable::literalTable):
 
4096         * wtf/text/StringImpl.cpp:
 
4097         (WebCore::StringImpl::~StringImpl):
 
4099 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4101         Reviewed by Oliver Hunt, Darin Adler.
 
4103         Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl.
 
4105         JSC::UStringImpl and WebCore::StringImpl (soon to be renamed to
 
4106         WTF::StringImpl) are almost identical.  Remove duplication of code by unifying
 
4107         the two, move missing features from UStringImpl into StringImpl & delete the
 
4110         * API/JSClassRef.cpp:
 
4111         * API/JSContextRef.cpp:
 
4113         * JavaScriptCore.exp:
 
4114         * JavaScriptCore.pro:
 
4115         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4116         * bytecode/EvalCodeCache.h:
 
4117         * bytecode/JumpTable.cpp:
 
4118         * profiler/ProfileNode.cpp:
 
4119         * runtime/Identifier.cpp:
 
4120         (JSC::Identifier::add):
 
4121         * runtime/Identifier.h:
 
4122         (JSC::Identifier::equal):
 
4123         * runtime/UString.cpp:
 
4124         * runtime/UString.h:
 
4126         * runtime/UStringImpl.cpp: Removed.
 
4127         * runtime/UStringImpl.h:
 
4128         * wtf/text/StringHash.h:
 
4129         (WebCore::StringHash::equal):
 
4130         (WebCore::CaseFoldingHash::equal):
 
4131         * wtf/text/StringImpl.cpp:
 
4132         (WebCore::StringImpl::~StringImpl):
 
4133         (WebCore::StringImpl::empty):
 
4134         (WebCore::StringImpl::sharedBuffer):
 
4136         * wtf/text/StringImpl.h:
 
4137         (WebCore::StringImpl::StringImpl):
 
4138         (WebCore::StringImpl::create):
 
4139         (WebCore::StringImpl::tryCreateUninitialized):
 
4140         (WebCore::StringImpl::cost):
 
4141         (WebCore::StringImpl::isIdentifier):
 
4142         (WebCore::StringImpl::setIsIdentifier):
 
4143         (WebCore::StringImpl::computeHash):
 
4144         (WebCore::StringImpl::copyChars):
 
4145         (WebCore::StringImpl::):
 
4147 2010-04-21  Patrick Gansterer  <paroga@paroga.com>
 
4149         Reviewed by Darin Adler.
 
4151         Added missing #include "Lookup.h" in LUT source files.
 
4152         https://bugs.webkit.org/show_bug.cgi?id=37903
 
4154         * runtime/ArrayPrototype.cpp:
 
4155         * runtime/DatePrototype.cpp:
 
4156         * runtime/JSONObject.cpp:
 
4157         * runtime/MathObject.cpp:
 
4158         * runtime/NumberConstructor.cpp:
 
4159         * runtime/RegExpConstructor.cpp:
 
4160         * runtime/RegExpObject.cpp:
 
4161         * runtime/StringPrototype.cpp:
 
4163 2010-04-21  Gustavo Sverzut Barbieri  <barbieri@profusion.mobi>
 
4165         Reviewed by Nikolas Zimmermann.
 
4167         Add missing EFL JavaScriptCore file.
 
4168         http://webkit.org/b/37854
 
4171         * wtf/efl/MainThreadEfl.cpp: Added.
 
4172         (WTF::initializeMainThreadPlatform):
 
4173         (WTF::timeoutFired):
 
4174         (WTF::scheduleDispatchFunctionsOnMainThread):
 
4176 2010-04-20  Xan Lopez  <xlopez@igalia.com>
 
4178         Another attempt to fix the build.
 
4182 2010-04-20  Oliver Hunt  <oliver@apple.com>
 
4184         Reviewed by Maciej Stachowiak.
 
4186         [ES5] RegExp literals are constants that should be persistent across multiple function calls.
 
4187         https://bugs.webkit.org/show_bug.cgi?id=37908
 
4189         Dump the separate RegExp constant pool, and just use the standard JS constant pool
 
4190         in codeblock.  This allows us to drop op_new_regexp and all associated code as well.
 
4192         * bytecode/CodeBlock.cpp:
 
4193         (JSC::CodeBlock::dump):
 
4194         (JSC::CodeBlock::shrinkToFit):
 
4195         * bytecode/CodeBlock.h:
 
4196         * bytecode/Opcode.h:
 
4197         * bytecompiler/BytecodeGenerator.cpp:
 
4198         (JSC::BytecodeGenerator::emitLoad):
 
4199         * bytecompiler/BytecodeGenerator.h:
 
4200         * bytecompiler/NodesCodegen.cpp:
 
4201         (JSC::RegExpNode::emitBytecode):
 
4202         * interpreter/Interpreter.cpp:
 
4203         (JSC::Interpreter::privateExecute):
 
4205         (JSC::JIT::privateCompileMainPass):
 
4207         * jit/JITOpcodes.cpp:
 
4212 2010-04-20  Oliver Hunt  <oliver@apple.com>
 
4214         Fix license on create_regex_tables
 
4216         * create_regex_tables:
 
4218 2010-04-20  Oliver Hunt  <oliver@apple.com>
 
4220         Reviewed by NOBODY (Build fix).
 
4225         * make-generated-sources.sh:
 
4227 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4229         Reviewed by Oliver Hunt.
 
4231         Bug 37895 - Share common code from UStringImplBase with StringImpl
 
4233         The implementation of StringImpl & UStringImpl is very similar.  Restructure
 
4234         StringImpl to match UStringImpl, moving the flags and length into a base class,
 
4235         so that this can be shared between both string types to increase code reuse.
 
4237         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4238         * runtime/RopeImpl.h:
 
4239         (JSC::RopeImpl::RopeImpl):
 
4240         * runtime/UStringImpl.h:
 
4241         (JSC::UStringImpl::UStringImpl):
 
4242         * wtf/text/StringImpl.h:
 
4243         (WebCore::StringImpl::StringImpl):
 
4244         (WebCore::StringImpl::characters):
 
4245         * wtf/text/StringImplBase.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
 
4246         (WTF::StringImplBase::length):
 
4247         (WTF::StringImplBase::operator new):
 
4248         (WTF::StringImplBase::StringImplBase):
 
4250 2010-04-20  Oliver Hunt  <oliver@apple.com>
 
4252         Reviewed by Gavin Barraclough.
 
4254         Autogenerate yarr character tables
 
4255         https://bugs.webkit.org/show_bug.cgi?id=37877
 
4257         Use a python script to automatically generate character tables
 
4258         for the builtin YARR character classes.  This allows us to generate
 
4259         actual tables as well, by using these tables we can both increase
 
4260         performance of the check (for complex builtins) and reduce the actual
 
4263         4-8% win on string-unpack-code, but lots of noise on other tests so
 
4264         i'm only confident saying its a 1% win overall.
 
4266         * DerivedSources.make:
 
4267         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4268         * assembler/AbstractMacroAssembler.h:
 
4269         (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress):
 
4270         * assembler/MacroAssembler.h:
 
4271         (JSC::MacroAssembler::branchTest8):
 
4272         * assembler/MacroAssemblerX86Common.h:
 
4273         (JSC::MacroAssemblerX86Common::branchTest8):
 
4274         * assembler/MacroAssemblerX86_64.h:
 
4275         (JSC::MacroAssemblerX86_64::branchTest8):
 
4276         * assembler/X86Assembler.h:
 
4277         (JSC::X86Assembler::cmpb_im):
 
4278         (JSC::X86Assembler::testb_im):
 
4279         * bytecode/SamplingTool.cpp:
 
4280         (JSC::SamplingTool::dump):
 
4281         * create_regex_tables: Added.
 
4282         * yarr/RegexCompiler.cpp:
 
4283         (JSC::Yarr::CharacterClassConstructor::charClass):
 
4284         * yarr/RegexJIT.cpp:
 
4285         (JSC::Yarr::RegexGenerator::matchCharacterClass):
 
4286         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
 
4287         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
 
4288         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
 
4289         * yarr/RegexPattern.h:
 
4290         (JSC::Yarr::CharacterClassTable::create):
 
4291         (JSC::Yarr::CharacterClassTable::CharacterClassTable):
 
4292         (JSC::Yarr::CharacterClass::CharacterClass):
 
4294 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4296         Reviewed by NOBODY (speculative windows fix - missed a bit!).
 
4298         * wtf/text/AtomicString.h:
 
4300 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4302         Reviewed by NOBODY (speculative windows fix).
 
4304         * wtf/text/AtomicString.h:
 
4306 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4308         Reviewed by NOBODY (windows build fix).
 
4310         Add missing .def file entries.
 
4312         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4314 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4316         Reviewed by Geoff Garen.
 
4318         Bug 37869 - Move URopeImpl to its own .h/.cpp
 
4320         Currently Ropes are implemented by the class URopeImpl, which is defined in
 
4321         UStringImpl.h, and then typedefed to the name JSString::Rope. Remove the
 
4322         typedef, and rename all uses of URopeImpl and JSString::Rope to just RopeImpl.
 
4324         Move RopeImpl to its own header, and remove all remaining references to ropes
 
4325         from UStringImpl (rename UStringOrRopeImpl to UStringImplBase, rename or move
 
4326         the isRope & deref methods from UStringOrRopeImpl).
 
4328         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4329         * runtime/JSString.cpp:
 
4330         (JSC::JSString::resolveRope):
 
4331         * runtime/JSString.h:
 
4333         (JSC::RopeBuilder::JSString):
 
4334         (JSC::RopeBuilder::~JSString):
 
4335         (JSC::RopeBuilder::appendStringInConstruct):
 
4336         (JSC::RopeBuilder::JSStringFinalizerStruct::):
 
4337         * runtime/RopeImpl.cpp: Copied from JavaScriptCore/runtime/UStringImpl.cpp.
 
4338         (JSC::RopeImpl::derefFibersNonRecursive):
 
4339         (JSC::RopeImpl::destructNonRecursive):
 
4340         * runtime/RopeImpl.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
 
4341         (JSC::RopeImpl::tryCreateUninitialized):
 
4342         (JSC::RopeImpl::isRope):
 
4343         (JSC::RopeImpl::deref):
 
4344         (JSC::RopeImpl::RopeImpl):
 
4345         * runtime/UStringImpl.cpp:
 
4346         * runtime/UStringImpl.h:
 
4347         (JSC::UStringImplBase::isInvalid):
 
4348         (JSC::UStringImplBase::ref):
 
4349         (JSC::UStringImplBase::UStringImplBase):
 
4350         (JSC::UStringImplBase::):
 
4351         (JSC::UStringImpl::UStringImpl):
 
4353 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4355         Reviewed by Geoff Garen.
 
4357         Bug 37828 - Move WebCore's String classes to WTF
 
4359         Move these classes up to WTF so they are available to all clients of WTF (in
 
4362         As a first patch, making the most minimal change possible, since this patch
 
4363         could easily grow rather large since we'll have to change every class forward
 
4364         declaration ( e.g. every "namespace WebCore { class String; }" much change to
 
4365         "namespace WTF { class String; }").
 
4367         Moving the files, but leaving the classes logically in the WebCore namespace -
 
4368         which is technically a layering violation - I'll come back and fix this up in a
 
4372         * Android.v8.wtf.mk:
 
4374         * JavaScriptCore.exp:
 
4375         * JavaScriptCore.gypi:
 
4376         * JavaScriptCore.pro:
 
4377         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
4378         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4380         * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h.
 
4381         * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp.
 
4382         * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h.
 
4383         * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h.
 
4384         * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h.
 
4385         * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h.
 
4386         * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp.
 
4387         * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h.
 
4388         * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp.
 
4389         (WebCore::charactersToFloat):
 
4390         * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h.
 
4392 2010-04-20  Csaba Osztrogonác  <ossy@webkit.org>
 
4394         [Qt] Unreviewed speculative buildfix for WinCE after r57882
 
4395         https://bugs.webkit.org/show_bug.cgi?id=37701
 
4397         * JavaScriptCore.pri: missing wince* case added.
 
4399 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4401         Reviewed by NOBODY (build fix).
 
4402         Speculative Chromium/Win build fix, attempt #2.
 
4406 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4408         Reviewed by NOBODY (build fix).
 
4409         Speculative Chromium/Win build fix.
 
4411         * config.h: JS_EXPORTDATA should do nothing on !JSC builds.
 
4413 2010-04-20  Csaba Osztrogonác  <ossy@webkit.org>
 
4415         Reviewed by Simon Hausmann.
 
4417         [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore
 
4418         https://bugs.webkit.org/show_bug.cgi?id=37701
 
4420         * JavaScriptCore.pri: dependency added.
 
4422 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
 
4424         Rubber stamped by Maciej Stachowiak (relanding r57829).
 
4425         Added missing JS_EXPORTDATA
 
4428         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
 
4429         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
 
4430         (JSC::APICallbackShim::APICallbackShim):
 
4431         (JSC::APICallbackShim::~APICallbackShim):
 
4432         * API/JSContextRef.cpp:
 
4434         * Android.v8.wtf.mk:
 
4436         * JavaScriptCore.exp:
 
4437         * JavaScriptCore.gypi:
 
4438         * JavaScriptCore.pro:
 
4439         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4440         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
4441         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4442         * runtime/Completion.cpp:
 
4445         * runtime/Identifier.cpp:
 
4446         (JSC::Identifier::remove):
 
4447         (JSC::Identifier::checkCurrentIdentifierTable):
 
4448         * runtime/Identifier.h:
 
4449         * runtime/InitializeThreading.cpp:
 
4450         (JSC::initializeThreadingOnce):
 
4451         * runtime/JSGlobalData.cpp:
 
4452         (JSC::JSGlobalData::create):
 
4453         * wtf/WTFThreadData.cpp: Copied from JavaScriptCore/wtf/WTFThreadData.cpp.
 
4454         * wtf/WTFThreadData.h: Copied from JavaScriptCore/wtf/WTFThreadData.h.
 
4456 2010-04-19  Gavin Barraclough  <barraclough@apple.com>
 
4458         Reviewed by NOBODY (rolling out r57829).
 
4462         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
 
4463         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
 
4464         (JSC::APICallbackShim::APICallbackShim):
 
4465         (JSC::APICallbackShim::~APICallbackShim):
 
4466         * API/JSContextRef.cpp:
 
4468         * Android.v8.wtf.mk:
 
4470         * JavaScriptCore.exp:
 
4471         * JavaScriptCore.gypi:
 
4472         * JavaScriptCore.pro:
 
4473         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4474         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
4475         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4476         * runtime/Completion.cpp:
 
4479         * runtime/Identifier.cpp:
 
4480         (JSC::Identifier::remove):
 
4481         (JSC::Identifier::checkCurrentIdentifierTable):
 
4482         (JSC::createIdentifierTableSpecificCallback):
 
4483         (JSC::createIdentifierTableSpecific):
 
4484         * runtime/Identifier.h:
 
4485         (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
 
4486         (JSC::defaultIdentifierTable):
 
4487         (JSC::setDefaultIdentifierTable):
 
4488         (JSC::currentIdentifierTable):
 
4489         (JSC::setCurrentIdentifierTable):
 
4490         (JSC::resetCurrentIdentifierTable):
 
4491         * runtime/InitializeThreading.cpp:
 
4492         (JSC::initializeThreadingOnce):
 
4493         * runtime/JSGlobalData.cpp:
 
4494         (JSC::JSGlobalData::create):
 
4495         * wtf/WTFThreadData.cpp: Removed.
 
4496         * wtf/WTFThreadData.h: Removed.
 
4498 2010-04-19  Douglas Gregor  <dgregor@apple.com>
 
4500         Reviewed and landed by Anders Carlsson.
 
4502         * runtime/UStringImpl.h:
 
4503         Fix class/struct declaration mismatches.
 
4505 2010-04-19  Geoffrey Garen  <ggaren@apple.com>
 
4507         Reviewed by Beth Dakin.
 
4509         Checked in these tests I wrote becuase Balazs Kelemen wanted to use them.
 
4511         * tests/perf: Added.
 
4512         * tests/perf/bench-allocate-nonretained.js: Added.
 
4513         * tests/perf/bench-allocate-retained.js: Added.
 
4515 2010-04-19  Gavin Barraclough  <barraclough@apple.com>
 
4517         Reviewed by NOBODY (windows build fix).
 
4519         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
4521 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
 
4523         Reviewed by Sam Weinig.
 
4525         https://bugs.webkit.org/show_bug.cgi?id=37745
 
4526         Move string uniquing tables to (new) WTFThreadData class.
 
4528         Remove AtomicString's dependency on ThreadGlobalData so that we can move
 
4529         WebCore's string classes up to WTF.
 
4531         WTFThreadData.cpp/.h are based on ThreadGlobalData from WebCore.
 
4532         Moved JSC & WebCore's string uniquing tables to this class.
 
4534         This patch introduces a temporary layering violation in providing forward
 
4535         declarations of classes from JSC and WTF; this will be resolved as we move
 
4536         more string code up to WTF.
 
4539         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
 
4540         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
 
4541         (JSC::APICallbackShim::APICallbackShim):
 
4542         (JSC::APICallbackShim::~APICallbackShim):
 
4543         * API/JSContextRef.cpp:
 
4544         * JavaScriptCore.exp:
 
4545         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4546         * runtime/Completion.cpp:
 
4549         * runtime/Identifier.cpp:
 
4550         (JSC::Identifier::remove):
 
4551         (JSC::Identifier::checkCurrentIdentifierTable):
 
4552         * runtime/Identifier.h:
 
4553         * runtime/InitializeThreading.cpp:
 
4554         (JSC::initializeThreadingOnce):
 
4555         * runtime/JSGlobalData.cpp:
 
4556         (JSC::JSGlobalData::create):
 
4557         * wtf/WTFThreadData.cpp: Copied from WebCore/platform/ThreadGlobalData.cpp.
 
4558         (WTF::WTFThreadData::WTFThreadData):
 
4559         (WTF::WTFThreadData::~WTFThreadData):
 
4560         * wtf/WTFThreadData.h: Copied from WebCore/platform/ThreadGlobalData.h.
 
4561         (WTF::WTFThreadData::atomicStringTable):
 
4562         (WTF::WTFThreadData::initializeIdentifierTable):
 
4563         (WTF::WTFThreadData::currentIdentifierTable):
 
4564         (WTF::WTFThreadData::setCurrentIdentifierTable):
 
4565         (WTF::WTFThreadData::resetCurrentIdentifierTable):
 
4566         (WTF::wtfThreadData):
 
4568 2010-04-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
4570         Reviewed by Simon Hausmann.
 
4572         [Qt] Build fix for WinCE.
 
4574         Moved the include of the non-existing errno.h header file inside
 
4575         platform guard macros.
 
4577         * jit/ExecutableAllocatorFixedVMPool.cpp:
 
4579 2010-04-18  Kwang Yul Seo  <skyul@company100.net>
 
4581         Reviewed by Laszlo Gombos.
 
4583         [WINCE] Don't define WTF_CPU_MIDDLE_ENDIAN=1
 
4584         https://bugs.webkit.org/show_bug.cgi?id=37434
 
4586         Windows CE supports little-endian format only, so don't define
 
4587         WTF_CPU_MIDDLE_ENDIAN=1.
 
4591 2010-04-18  Simon Hausmann  <simon.hausmann@nokia.com>
 
4593         Reviewed by Laszlo Gombos.
 
4595         [Qt] Fix JavaScriptCore's include path for WinCE builds
 
4597         https://bugs.webkit.org/show_bug.cgi?id=36751
 
4599         * JavaScriptCore.pri:
 
4601 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
 
4603         Reviewed by nobody, build fix.
 
4605 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
 
4607         Reviewed by nobody, build fix.
 
4609 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
 
4611         Reviewed by Oliver Hunt.
 
4613         Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl
 
4614         (Following on from bug #37675).
 
4616         Make the argument ordering for UStringImpl's constructor & create
 
4617         methods match, when passed a shared buffer.
 
4619         * JavaScriptCore.exp:
 
4620         * runtime/UStringImpl.cpp:
 
4621         (JSC::UStringImpl::create):
 
4622         * runtime/UStringImpl.h:
 
4624 2010-04-15  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
4626         Reviewed by Kenneth Rohde Christiansen.
 
4628         Fix memory leak in QScriptEngine::evaluate().
 
4630         QScriptEnginePrivate::evaluate should release temporary variables.
 
4632         [Qt] QScriptEngine::evaluate has memory leak.
 
4633         https://bugs.webkit.org/show_bug.cgi?id=37596
 
4635         * qt/api/qscriptengine_p.cpp:
 
4636         (QScriptEnginePrivate::evaluate):
 
4637         * qt/api/qscriptengine_p.h:
 
4639 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
4641         Reviewed by Kenneth Rohde Christiansen.
 
4643         Fix a memory leak in QScriptValue::inherits.
 
4645         [Qt] QScriptValue::inherits has a memory leak.
 
4646         https://bugs.webkit.org/show_bug.cgi?id=37617
 
4648         * qt/api/qscriptvalue_p.h:
 
4649         (QScriptValuePrivate::inherits):
 
4651 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
4653         Reviewed by Kenneth Rohde Christiansen.
 
4655         Fix a few memory leaks in QScriptEngine.
 
4657         Syntax checking caused memory leak, not all temporary variables were released.
 
4659         [Qt] Syntax checking  in the QtScript cause a memory leak.
 
4660         https://bugs.webkit.org/show_bug.cgi?id=37610
 
4662         * qt/api/qscriptengine_p.cpp:
 
4663         (QScriptEnginePrivate::checkSyntax):
 
4664         * qt/api/qscriptsyntaxcheckresult.cpp:
 
4665         (QScriptSyntaxCheckResultPrivate::errorMessage):
 
4666         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
 
4668 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
4670         Reviewed by Kenneth Rohde Christiansen.
 
4672         Fix memory leak inside QScriptEnginePrivate::makeJSValue.
 
4674         QScriptEnginePrivate::makeJSValue should release temporary JSStringRef variable.
 
4676         [Qt] tst_QScriptValue::toString has a memory leak.
 
4677         https://bugs.webkit.org/show_bug.cgi?id=37598
 
4679         * qt/api/qscriptengine_p.h:
 
4680         (QScriptEnginePrivate::makeJSValue):
 
4682 2010-04-14  Peter Varga  <pvarga@inf.u-szeged.hu>
 
4684         Reviewed by Geoffrey Garen.
 
4686         Move the YARR JIT fallback detection from RegexJIT.cpp to
 
4689         https://bugs.webkit.org/show_bug.cgi?id=37571
 
4691         * yarr/RegexCompiler.cpp:
 
4692         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
 
4693         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
 
4694         * yarr/RegexJIT.cpp:
 
4695         (JSC::Yarr::RegexGenerator::generateTerm):
 
4696         (JSC::Yarr::RegexGenerator::RegexGenerator):
 
4697         (JSC::Yarr::jitCompileRegex):
 
4699         (JSC::Yarr::RegexCodeBlock::operator!):
 
4700         * yarr/RegexPattern.h:
 
4701         (JSC::Yarr::RegexPattern::RegexPattern):
 
4702         (JSC::Yarr::RegexPattern::reset):
 
4704 2010-04-14  Kent Hansen  <kent.hansen@nokia.com>
 
4706         Reviewed by Maciej Stachowiak.
 
4708         Mac OS X: Use deployment target to determine whether memory tagging should be enabled
 
4709         https://bugs.webkit.org/show_bug.cgi?id=34888
 
4711         When building on (Snow) Leopard but targeting Tiger
 
4712         (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined),
 
4713         WebKit would crash on Tiger because the tags passed to mmap
 
4714         caused those function calls to fail.
 
4716         Conversely, when building on Tiger but targeting Leopard
 
4717         (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit
 
4718         would crash on Leopard because the tags passed to vm_map and
 
4719         vm_allocate caused those function calls to fail.
 
4721         Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to
 
4722         govern the tag definitions. Use the same tags for vm_map and
 
4723         vm_allocate regardless of target, since they work on
 
4724         both. Fall back to the mmap tags that work on Tiger (that is,
 
4725         "no tags") if targeting Tiger, since those tags also work on
 
4730 2010-04-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
4732         Reviewed by nobody, build fix.
 
4734         [Qt] Build fix for Mac when building with build-webkit --qt
 
4736         Specifying no configuration on Mac builds WebCore both in debug
 
4737         and release. JavaScriptCore has to follow this rule as well.
 
4739         * JavaScriptCore.pro:
 
4741 2010-04-11  Mark Rowe  <mrowe@apple.com>
 
4743         Reviewed by Sam Weinig.
 
4745         <rdar://problem/7851332> Fix the build.
 
4747         * wtf/FastMalloc.cpp:
 
4748         (WTF::TCMallocStats::): Initialize extra members of malloc_introspection_t to zero.
 
4750 2010-04-09  Mikhail Naganov  <mnaganov@chromium.org>
 
4752         Reviewed by Pavel Feldman.
 
4754         Make CallIdentifier constructor to handle null urls.
 
4756         https://bugs.webkit.org/show_bug.cgi?id=37341
 
4758         * profiler/CallIdentifier.h:
 
4759         (JSC::CallIdentifier::CallIdentifier):
 
4761 2010-04-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
4763         Reviewed by Simon Hausmann.
 
4765         [Qt] Fix crashes with package builds in release
 
4767         Add NDEBUG to the defines for package build in JavaScriptCore.pri,
 
4768         so that it's consistently used for JavaScriptCore, WebCore, jsc and all
 
4769         other tools using wtf, etc. data structures directly. Mixing NDEBUG with
 
4770         non-NDEBUG builds causes crashes due to differences in data structures when
 
4771         assertions/checks are enabled.
 
4773         * JavaScriptCore.pri:
 
4775 2010-04-09  Patrick Gansterer  <paroga@paroga.com>
 
4777         Reviewed by Darin Adler.
 
4779         Implement NO_RETURN for COMPILER(MSVC).
 
4780         https://bugs.webkit.org/show_bug.cgi?id=33056 
 
4782         Added NO_RETURN_WITH_VALUE for functions with non-void return type.
 
4785         * wtf/AlwaysInline.h:
 
4786         * wtf/FastMalloc.cpp:
 
4788 2010-04-08  Kwang Yul Seo  <skyul@company100.net>
 
4790         Reviewed by Simon Hausmann.
 
4792         [WINCE] Check if ARM or _ARM_ is defined
 
4793         https://bugs.webkit.org/show_bug.cgi?id=37200
 
4795         MSVC defines ARM and _ARM_ for Windows CE ARM. Define WTF_CPU_ARM=1
 
4796         when either ARM or _ARM_ is defined.
 
4800 2010-04-08  Csaba Osztrogonác  <ossy@webkit.org>
 
4802         Reviewed Oliver Hunt.
 
4804         [Qt]r57240 broke Qt build (might be a gcc bug)
 
4805         https://bugs.webkit.org/show_bug.cgi?id=37253
 
4807         Workaround until fix. On PLATFORM(QT) use inline instead of ALWAYS_INLINE.
 
4809         * wtf/PassRefPtr.h: Qt guards added.
 
4811 2010-04-07  Oliver Hunt  <oliver@apple.com>
 
4813         Reviewed by Anders Carlsson.
 
4815         Vector<UString> makes many needless calls to UString::UString and UString::~UString
 
4817         Add a VectorTrait<UString> specialisation to allow vector to simply memset/memcpy
 
4818         data around.  Only difference from the VectorTrait<RefPtr<T> > traits is the inability
 
4819         to use memset to initialize data.
 
4821         * runtime/UString.h:
 
4824 2010-04-07  Oliver Hunt  <oliver@apple.com>
 
4826         Reviewed by Geoff Garen.
 
4828         Beat gcc with a clue bat -- force inlining of refIfNotNull and derefIfNotNull
 
4832 2010-04-07  Kwang Yul Seo  <skyul@company100.net>
 
4834         Reviewed by Darin Adler.
 
4836         Replace isprint with isASCIIPrintable
 
4837         https://bugs.webkit.org/show_bug.cgi?id=37223
 
4839         WebKit does not use functions in <ctype.h> as they are dependent on the current
 
4840         locale. Use the equivalent functions in <wtf/ASCIICType.h>. isASCIIPrintable
 
4843         * pcre/pcre_exec.cpp:
 
4846 2010-04-07  Enrica Casucci  <enrica@apple.com>
 
4848         Reviewed by Darin Adler.
 
4850         https://bugs.webkit.org/show_bug.cgi?id=37219
 
4852         This change disables text caret for the iPhone platflorm.
 
4854         * wtf/Platform.h: Disabled text caret for iPhone.
 
4856 2010-04-06  Adam Barth  <abarth@webkit.org>
 
4858         Reviewed by Eric Seidel.
 
4860         REGRESSION: Worker termination via JS timeout may cause worker tests like fast/workers/worker-terminate.html fail.
 
4861         https://bugs.webkit.org/show_bug.cgi?id=36646
 
4863         Add a new exception type for forcibly terminating a JavaScript stack.
 
4864         The new exception functions similarly to the
 
4865         InterruptedExecutionException but is conceptually different because
 
4866         execution is terminated instead of just interrupted.
 
4869             - Added new Terminator.h file.
 
4870         * JavaScriptCore.gypi:
 
4871             - Added new Terminator.h file.
 
4872         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
4873             - Added new Terminator.h file.
 
4874         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4875             - Added new Terminator.h file.
 
4876         * interpreter/Interpreter.cpp:
 
4877         (JSC::Interpreter::throwException):
 
4878             - Fully unwind the stack for TerminatedExecutionException.
 
4879         (JSC::Interpreter::privateExecute):
 
4880             - Check if we've been terminated at the same time we check if we've
 
4883         (JSC::DEFINE_STUB_FUNCTION):
 
4884             - Check if we've been terminated at the same time we check if we've
 
4886         * runtime/Completion.cpp:
 
4887             - Some exceptions define special completion types so that calls can
 
4888               see why we terminated evaluation.
 
4890         * runtime/Completion.h:
 
4891             - Define a new completion type for termination.
 
4893         * runtime/ExceptionHelpers.cpp:
 
4894             - Define TerminatedExecutionException and refactor pseudo-RTTI
 
4895               virtual function to be more semantic.
 
4896         (JSC::InterruptedExecutionError::exceptionType):
 
4897         (JSC::TerminatedExecutionError::TerminatedExecutionError):
 
4898         (JSC::TerminatedExecutionError::exceptionType):
 
4899         (JSC::TerminatedExecutionError::toString):
 
4900         (JSC::createTerminatedExecutionException):
 
4901         * runtime/ExceptionHelpers.h:
 
4902             - Entry point for generating a TerminatedExecutionException.
 
4903         * runtime/JSGlobalData.cpp:
 
4904         (JSC::JSGlobalData::JSGlobalData):
 
4905             - Add a Terminator object that can be used to asynchronously
 
4906               terminate a JavaScript execution stack.
 
4907         * runtime/JSGlobalData.h:
 
4908         * runtime/JSObject.h:
 
4909         (JSC::JSObject::exceptionType):
 
4910             - Define that, by default, thrown objects have a normal exception
 
4912         * runtime/Terminator.h: Added.
 
4913             - Added a new controller object that can be used to terminate
 
4914               execution asynchronously.  This object is more or less a
 
4916         (JSC::Terminator::Terminator):
 
4917         (JSC::Terminator::termianteSoon):
 
4918         (JSC::Terminator::shouldTerminate):
 
4920 2010-04-05  Oliver Hunt  <oliver@apple.com>
 
4924         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
4926 2010-04-05  Oliver Hunt  <oliver@apple.com>
 
4928         And another build fix.
 
4930         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
 
4932 2010-04-05  Oliver Hunt  <oliver@apple.com>
 
4936         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
4938 2010-04-05  Oliver Hunt  <oliver@apple.com>
 
4940         Reviewed by Gavin Barraclough.
 
4942         Support weak maps in JSC
 
4943         https://bugs.webkit.org/show_bug.cgi?id=37132
 
4945         Expose an API to allow creation of a map for storing
 
4948         * API/JSWeakObjectMapRefInternal.h: Added.
 
4949         (OpaqueJSWeakObjectMap::create):
 
4950         (OpaqueJSWeakObjectMap::map):
 
4951         (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap):
 
4952         (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
 
4953         * API/JSWeakObjectMapRefPrivate.cpp: Added.
 
4954         * API/JSWeakObjectMapRefPrivate.h: Added.
 
4955         * JavaScriptCore.exp:
 
4956         * JavaScriptCore.xcodeproj/project.pbxproj:
 
4957         * runtime/JSGlobalObject.h:
 
4958         (JSC::JSGlobalObject::registerWeakMap):
 
4959         (JSC::JSGlobalObject::deregisterWeakMap):
 
4961 2010-04-05  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
4963         Reviewed by Kenneth Rohde Christiansen.
 
4965         [Symbian] Consolidate Symbian WINSCW environment configuration
 
4966         https://bugs.webkit.org/show_bug.cgi?id=37100
 
4968         Move the "undefinition" of WIN32 and _WIN32 from WebCore/config.h
 
4969         to JavaScriptCore/wtf/Platform.h as it is not specific to WebCore.
 
4971         PLATFORM(WIN) and OS(WIN) no longer needs to be undefined as
 
4972         undefining WIN32 takes care of it.
 
4976 2010-04-03  Gavin Barraclough  <barraclough@apple.com>
 
4978         Reviewed by Oliver Hunt.
 
4980         https://bugs.webkit.org/show_bug.cgi?id=37068
 
4981         Change UString to use a 0 rep for null strings instead of a null object.
 
4983         No performance impact.
 
4985         * JavaScriptCore.exp:
 
4986         * runtime/InternalFunction.cpp:
 
4987         (JSC::InternalFunction::InternalFunction):
 
4988         * runtime/JSString.h:
 
4989         (JSC::RopeBuilder::JSString):
 
4990         * runtime/UString.cpp:
 
4991         (JSC::initializeUString):
 
4992         * runtime/UString.h:
 
4993         (JSC::UString::UString):
 
4994         (JSC::UString::data):
 
4995         (JSC::UString::size):
 
4996         (JSC::UString::isNull):
 
4997         (JSC::UString::isEmpty):
 
4998         (JSC::UString::cost):
 
5000 2010-04-03  Balazs Kelemen  <kb@inf.u-szeged.hu>
 
5002         Reviewed by Oliver Hunt.
 
5004         Fix uninitalised members in CallLinkInfo and BytecodeGenerator.
 
5006         https://bugs.webkit.org/show_bug.cgi?id=36816
 
5008         * bytecode/CodeBlock.cpp:
 
5009         (JSC::CodeBlock::CodeBlock):
 
5010         * bytecode/CodeBlock.h:
 
5011         (JSC::CallLinkInfo::CallLinkInfo):
 
5013 2010-04-03  yael aharon  <yael.aharon@nokia.com>
 
5015         Reviewed by Darin Adler.
 
5017         Enable HTMLProgressElement for Safari on OSX
 
5018         https://bugs.webkit.org/show_bug.cgi?id=36961
 
5020         * Configurations/FeatureDefines.xcconfig:
 
5022 2010-04-02  Ruben Van Boxem  <vanboxem.ruben@gmail.com>
 
5024         Reviewed by Eric Seidel.
 
5026         Mingw-w64 fixes for JavaScriptCore
 
5027         https://bugs.webkit.org/show_bug.cgi?id=35607
 
5029         * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
 
5030         (JSC::Heap::allocateBlock):
 
5031         (JSC::Heap::freeBlockPtr):
 
5032         (JSC::currentThreadStackBase):
 
5033         (JSC::currentThreadStackBase):
 
5034         * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
 
5036 2010-04-02  Geoffrey Garen  <ggaren@apple.com>
 
5038         Build fix: updated the .def file.
 
5040         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5042 2010-04-02  Geoffrey Garen  <ggaren@apple.com>
 
5044         Reviewed by Oliver Hunt.
 
5046         Inlined toThisString and toThisJSString to avoid virtual function call overhead
 
5047         https://bugs.webkit.org/show_bug.cgi?id=37039
 
5049         Maybe a 1% speedup on iBench JS.
 
5051         * JavaScriptCore.exp: New exports.
 
5053         * runtime/JSCell.cpp:
 
5055         * runtime/JSNumberCell.cpp:
 
5056         * runtime/JSNumberCell.h:
 
5057         * runtime/JSString.cpp:
 
5058         * runtime/JSString.h:
 
5059         * runtime/JSValue.h:
 
5060         * runtime/JSZombie.h:
 
5061         (JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation.
 
5063         * runtime/JSObject.h:
 
5064         (JSC::JSValue::toThisString):
 
5065         (JSC::JSValue::toThisJSString): Added the inlined implementation.
 
5067 2010-04-02  Jeremy Moskovich  <jeremy@chromium.org>
 
5069         Reviewed by Geoffrey Garen.
 
5071         Beef up documentation for ASSERT* and CRASH macros a bit.
 
5073         https://bugs.webkit.org/show_bug.cgi?id=36527
 
5077 2010-04-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
5079         Unreviewed, minor build fix.
 
5081         Change the order of the member initialisation list
 
5082         in constructor to match declaration order
 
5084         * runtime/Collector.cpp:
 
5087 2010-04-01  Kinuko Yasuda  <kinuko@chromium.org>
 
5089         Reviewed by Dmitry Titov.
 
5091         Add FileThread for async file operation support in FileReader and FileWriter
 
5092         https://bugs.webkit.org/show_bug.cgi?id=36896
 
5094         Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags.
 
5096         * Configurations/FeatureDefines.xcconfig:
 
5098 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
 
5100         Reviewed by NOBODY (windows build fix pt II).
 
5102         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5104 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
 
5106         Reviewed by NOBODY (windows build fix).
 
5108         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5110 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
 
5112         Reviewed by Geoff Garen.
 
5114         Bug 36871 - Remove JSC::CString
 
5115         Use WTF::CString instead (which until recently was WebCore::CString).
 
5117         * JavaScriptCore.exp:
 
5118         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5119         * runtime/UString.cpp:
 
5120         * runtime/UString.h:
 
5122 2010-03-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
5124         Unreviewed, fix after r56842.
 
5126         Add UNUSED_PARAM a to silence warning.
 
5129         (JSC::DEFINE_STUB_FUNCTION):
 
5131 2010-03-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
5133         Unreviewed, Symbian build fix.
 
5135         Refactor JITStubs.cpp so that the list of STUB_FUNCTIONs
 
5136         are not dependent on the JSVALUE32_64 guard.
 
5138         * jit/JITStubs.cpp: Place the JSVALUE32_64 guard inside 
 
5139         the body of cti_op_eq_strings.
 
5140         * jit/JITStubs.h: Remove JSVALUE32_64 guard from 
 
5141         cti_op_eq_strings stub.
 
5143 2010-03-30  Gavin Barraclough  <barraclough@apple.com>
 
5145         Reviewed by NOBODY (windows build fix).
 
5147         Fixing b0rked version of JavaScriptCore.vcproj - added lines were truncated.
 
5149         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
5151 2010-03-30  Gavin Barraclough  <barraclough@apple.com>
 
5153         Rubber stamped by Sam Weinig.
 
5155         https://bugs.webkit.org/show_bug.cgi?id=36866
 
5160         * JavaScriptCore.exp:
 
5161         * JavaScriptCore.gypi:
 
5162         * JavaScriptCore.pro:
 
5163         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5164         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
5165         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
5166         * JavaScriptCore.xcodeproj/project.pbxproj:
 
5168         * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp.
 
5169         * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h.
 
5170         (WTF::CStringBuffer::data):
 
5171         (WTF::CStringBuffer::length):
 
5172         (WTF::CStringBuffer::create):
 
5173         (WTF::CStringBuffer::CStringBuffer):
 
5174         (WTF::CStringBuffer::mutableData):
 
5175         (WTF::CString::CString):
 
5176         (WTF::CString::isNull):
 
5177         (WTF::CString::buffer):
 
5180 2010-03-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
5182         Reviewed by nobody, build break.
 
5184         [Qt] Fix build break on Qt Mac.
 
5186         DESTDIR path on Mac do not include the configuration path by default
 
5187         like on Windows. Have to force it.
 
5189         * JavaScriptCore.pro:
 
5191 2010-03-29  Alice Liu  <alice.liu@apple.com>
 
5193         Reviewed by NOBODY (build fix).
 
5195         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
 
5196         add JSObjectRefPrivate.h
 
5198 2010-03-29  Chao-ying Fu  <fu@mips.com>
 
5200         Reviewed by Oliver Hunt.
 
5203         https://bugs.webkit.org/show_bug.cgi?id=30144
 
5205         The following changes enable MIPS JIT.
 
5207         * assembler/MIPSAssembler.h:
 
5208         (JSC::MIPSAssembler::lbu):
 
5209         (JSC::MIPSAssembler::linkWithOffset):
 
5210         * assembler/MacroAssemblerMIPS.h:
 
5211         (JSC::MacroAssemblerMIPS::load8):
 
5212         (JSC::MacroAssemblerMIPS::branch8):
 
5213         (JSC::MacroAssemblerMIPS::branchTest8):
 
5214         (JSC::MacroAssemblerMIPS::setTest8):
 
5215         (JSC::MacroAssemblerMIPS::setTest32):
 
5217         * jit/JITInlineMethods.h:
 
5218         (JSC::JIT::preserveReturnAddressAfterCall):
 
5219         (JSC::JIT::restoreReturnAddressBeforeReturn):
 
5220         * jit/JITOpcodes.cpp:
 
5222         (JSC::JITThunks::JITThunks):
 
5224         (JSC::JITStackFrame::returnAddressSlot):
 
5227 2010-02-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
 
5229         Reviewed by Simon Fraser.
 
5231         Add support for Widgets 1.0: View Mode Media Feature
 
5232         https://bugs.webkit.org/show_bug.cgi?id=35446
 
5234         Add an enable flag for the Widgets (http://www.w3.org/TR/widgets-reqs/)
 
5235         and turn it on for Qt only.
 
5239 2010-03-29  Patrick Gansterer  <paroga@paroga.com>
 
5241         Reviewed by Darin Adler.
 
5243         Corrected name of (u)int64_t compile time assert.
 
5244         https://bugs.webkit.org/show_bug.cgi?id=36739
 
5246         int64_t_is_four_bytes -> int64_t_is_eight_bytes
 
5248         * os-win32/stdint.h:
 
5250 2010-03-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
5252         Reviewed by Simon Hausmann.
 
5254         [Qt] Use the -l syntax for linking against JavaScriptCore on Windows.
 
5255         This allow qmake to extract dependencies correctly when generating VS
 
5258         * JavaScriptCore.pri:
 
5260 2010-03-29  Thomas Zander  <t.zander@nokia.com>
 
5262         Reviewed by Simon Hausmann.
 
5264         https://bugs.webkit.org/show_bug.cgi?id=36742
 
5266         gcc for Symbian doesn't support gcc extensions like atomicity.h - disable
 
5268         * wtf/Threading.h: also detect os symbian
 
5270 2010-03-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
5272         Reviewed by Simon Hausmann.
 
5274         [Qt] Remove the definition of WTF_CHANGES guards from the build system
 
5275         https://bugs.webkit.org/show_bug.cgi?id=31670
 
5277         * JavaScriptCore.pro: Remove the definition of WTF_CHANGES
 
5278         as it is already defined in config.h
 
5280 2010-03-28  Kent Hansen  <kent.hansen@nokia.com>
 
5282         Reviewed by Simon Hausmann.
 
5284         [Qt] Add API for reporting additional memory cost of JavaScript objects
 
5285         https://bugs.webkit.org/show_bug.cgi?id=36650
 
5287         * qt/api/qscriptengine.cpp:
 
5288         (QScriptEngine::reportAdditionalMemoryCost):
 
5289         * qt/api/qscriptengine.h:
 
5290         * qt/api/qscriptengine_p.h:
 
5291         (QScriptEnginePrivate::reportAdditionalMemoryCost):
 
5292         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
 
5293         (tst_QScriptEngine::reportAdditionalMemoryCost):
 
5295 2010-03-28  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
5297         Reviewed by Simon Hausmann.
 
5299         QScriptEngine API was enriched by globalObject() method
 
5300         which give an access to the global object.
 
5302         [Qt] QScriptEngine doesn't give an access to global object
 
5303         https://bugs.webkit.org/show_bug.cgi?id=36603
 
5305         * qt/api/qscriptengine.cpp:
 
5306         (QScriptEngine::globalObject):
 
5307         * qt/api/qscriptengine.h:
 
5308         * qt/api/qscriptengine_p.cpp:
 
5309         (QScriptEnginePrivate::globalObject):
 
5310         * qt/api/qscriptengine_p.h:
 
5311         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
 
5312         (tst_QScriptEngine::globalObject):
 
5314 2010-03-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
5316         Reviewed by Simon Hausmann.
 
5318         [Qt] Build JavaScriptCore as a static library.
 
5319         https://bugs.webkit.org/show_bug.cgi?id=36590
 
5321         This patch takes what was left of the unused JavaScriptCore.pro
 
5322         and moved the compilation logic from JavaScriptCore.pri to
 
5325         * JavaScriptCore.pri:
 
5326         * JavaScriptCore.pro:
 
5328         * qt/api/QtScript.pro:
 
5330 2010-03-25  Gavin Barraclough  <barraclough@apple.com>
 
5332         Reviewed by NOBODY (build fix).
 
5334         * profiler/ProfileGenerator.cpp:
 
5335         (JSC::ProfileGenerator::willExecute):
 
5336         (JSC::ProfileGenerator::didExecute):
 
5338 2010-03-25  Gavin Barraclough  <barraclough@apple.com>
 
5340         Reviewed by Geoff Garen.
 
5342         Bug 36611 - Cleanup JSC::CString
 
5343         Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(),
 
5344         remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).
 
5346         * bytecode/CodeBlock.cpp:
 
5347         (JSC::CodeBlock::printUnaryOp):
 
5348         (JSC::CodeBlock::printBinaryOp):
 
5349         (JSC::CodeBlock::printConditionalJump):
 
5350         (JSC::CodeBlock::printGetByIdOp):
 
5351         (JSC::CodeBlock::printPutByIdOp):
 
5352         (JSC::printGlobalResolveInfo):
 
5353         (JSC::printStructureStubInfo):
 
5354         (JSC::CodeBlock::printStructure):
 
5355         (JSC::CodeBlock::printStructures):
 
5356         (JSC::CodeBlock::dump):
 
5361         (fillBufferWithContentsOfFile):
 
5362         * profiler/CallIdentifier.h:
 
5363         (JSC::CallIdentifier::c_str):
 
5364         * profiler/Profile.cpp:
 
5365         (JSC::Profile::debugPrintDataSampleStyle):
 
5366         * profiler/ProfileNode.cpp:
 
5367         (JSC::ProfileNode::debugPrintData):
 
5368         (JSC::ProfileNode::debugPrintDataSampleStyle):
 
5369         * runtime/DateConversion.cpp:
 
5371         * runtime/JSGlobalObjectFunctions.cpp:
 
5373         (JSC::globalFuncJSCPrint):
 
5374         * runtime/UString.cpp:
 
5376         (JSC::UString::toDouble):
 
5377         * runtime/UString.h:
 
5378         (JSC::CString::length):
 
5379         (JSC::CString::data):
 
5381 2010-03-25  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
5383         Reviewed by nobody, build fix.
 
5385         [Qt] Build fix on MSVC. Reverts r55633 for stdint.h
 
5387         This file gets included in generated moc files which don't
 
5388         include the prefix header.
 
5390         * os-win32/stdint.h:
 
5392 2010-03-24  Gavin Barraclough  <barraclough@apple.com>
 
5394         Reviewed by NOBODY (windows build fix).
 
5396 2010-03-24  Gavin Barraclough  <barraclough@apple.com>
 
5398         Reviewed by Sam Weinig.
 
5400         Switch String::latin1, String::utf8, String::fromUTF8 to
 
5401         use WTF's Unicode conversion methods rather than TextEncoder.
 
5402         These methods only perform simple conversion, and don't need
 
5403         really require TextEncoder's full capability (to look up arbitrary
 
5404         encodings by name), switching to only be dependent on WTF will
 
5405         make it easier if we chose to move WebCore::String to WTF.
 
5407         * JavaScriptCore.exp:
 
5409 2010-03-24  Alexey Proskuryakov  <ap@apple.com>
 
5411         Reviewed by Geoff Garen.
 
5413         * wtf/FastMalloc.h: Added a using directive for fastMallocSize, like we do for all public
 
5414         WTF symbols. Also sorted the list alphabetically.
 
5416 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
 
5418         Reviewed by NOBODY (speculative windows build fix part II).
 
5420 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
 
5422         Reviewed by NOBODY (speculative windows build fix).
 
5424 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
 
5426         Reviewed by Oliver Hunt.
 
5428         Bug 36519 - JSGlobalContextRelease is unnecessarily slow
 
5430         Since [ http://trac.webkit.org/changeset/35917 ], calling
 
5431         JSGlobalContextRelease always triggers a GC heap collection
 
5432         (if not a full destroy). As per 35917's changelog "This is
 
5433         only really necessary when the (JSGlobalObject's) last
 
5434         reference is released, but there is no way to determine that,
 
5435         and no harm in collecting slightly more often."
 
5437         Well, we now know of cases of API clients who are harmed by
 
5438         the performance penalty of collecting too often, so it's time
 
5439         to add a way to determine whether a call to JSGlobalContextRelease
 
5440         is removing the last protect from it's global object.  If further
 
5441         protects are retaining the global object (likely from other
 
5442         JSGlobalContextRefs), then don't trigger a GC collection.
 
5444         * API/JSContextRef.cpp:
 
5445         * runtime/Collector.cpp:
 
5446         (JSC::Heap::unprotect): return a boolean indicating that the value is now unprotected.
 
5447         * runtime/Collector.h:
 
5448         * wtf/HashCountedSet.h:
 
5449         (WTF::::remove): return a boolean indicating whether the value was removed from the set.
 
5451 2010-03-23  Mark Rowe  <mrowe@apple.com>
 
5455         * runtime/ArrayPrototype.cpp:
 
5456         (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation
 
5457         that takes place here. An explicit cast is sufficient to silence it.
 
5459 2010-03-23  Alexey Proskuryakov  <ap@apple.com>
 
5463         * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't
 
5464         need to be converted with toInteger().
 
5466 2010-03-23  Alexey Proskuryakov  <ap@apple.com>
 
5468         Reviewed by Geoff Garen.
 
5470         https://bugs.webkit.org/show_bug.cgi?id=36511
 
5471         <rdar://problem/7753498> Safari freezes when using SPUTNIK JavaScript conformance check
 
5473         Test: fast/js/sputnik-S15.4.4.12_A3_T3.html
 
5475         * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing
 
5476         the start offset, and iterated over (almost) all integers. Note that this can be fixed
 
5477         without using doubles, but the code would be much more complicated, and there is no important
 
5478         reason to stick to integers here.
 
5480 2010-03-23  Kent Hansen  <kent.hansen@nokia.com>
 
5482         Reviewed by Darin Adler.
 
5484         Fix compilation on Itanium in 32-bit mode
 
5485         https://bugs.webkit.org/show_bug.cgi?id=36494
 
5487         * wtf/Platform.h: Introduce CPU(IA64_32). Don't define
 
5488           WTF_USE_JSVALUE64 if the CPU is in 32-bit mode.
 
5490 2010-03-23  Geoffrey Garen  <ggaren@apple.com>
 
5492         Reviewed by Mark Rowe.
 
5494         Interpreter fix for <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
 
5495         evaluates to -2147483648 on 32 bit (35842)
 
5497         * interpreter/Interpreter.cpp:
 
5498         (JSC::Interpreter::privateExecute): Only take the fast negate path if
 
5499         a bit other than bit 31 is set. If none of bits 0-30 are set, then the
 
5500         value we're negating can only be 0 or -2147483648, and neither can be
 
5501         negated in int space.
 
5503         * jit/JITArithmetic.cpp:
 
5504         (JSC::JIT::emit_op_negate):
 
5505         (JSC::JIT::emitSlow_op_negate): Updated the JIT implementation to match
 
5506         the interpreter, since it's slightly simpler.
 
5508 2010-03-22  Siddharth Mathur  <siddharth.mathur@nokia.com>
 
5510         Reviewed by Laszlo Gombos.
 
5512         [Symbian] More efficient aligned memory allocation for JSC Collector
 
5513         https://bugs.webkit.org/show_bug.cgi?id=34350
 
5515         * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
 
5517         * runtime/Collector.cpp: Reduced port-specific code and added private data member
 
5520         (JSC::Heap::destroy):
 
5521         (JSC::Heap::allocateBlock):
 
5522         (JSC::Heap::freeBlockPtr):
 
5524         * runtime/Collector.h: Added private data member
 
5526         * wtf/symbian: Added.
 
5527         * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
 
5528         (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate 
 
5529         aligned blocks more efficiently as required by Collector
 
5530         (WTF::AlignedBlockAllocator::alloc):
 
5531         (WTF::AlignedBlockAllocator::free):
 
5532         (WTF::AlignedBlockAllocator::destroy):
 
5533         (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
 
5534         * wtf/symbian/BlockAllocatorSymbian.h: Added.
 
5536 2010-03-22  Geoffrey Garen  <ggaren@apple.com>
 
5538         Reviewed by Sam Weinig.
 
5540         Fixed <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
 
5541         evaluates to -2147483648 on 32 bit (35842)
 
5543         Two ways to fix the same bug:
 
5545         1. Check for overflow when negating, since negating the largest negative
 
5546         int causes overflow.
 
5548         2. Constant-fold even when negating a negative, since, like they say in
 
5549         high school, "math works."
 
5551         * assembler/MacroAssemblerARM.h:
 
5552         (JSC::MacroAssemblerARM::branchNeg32):
 
5553         * assembler/MacroAssemblerX86Common.h:
 
5554         (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version
 
5555         of the negate operator.
 
5557         * jit/JITArithmetic.cpp:
 
5558         (JSC::JIT::emit_op_negate): Use the branching version of the negate 
 
5559         operator to check for overflow.
 
5561         (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case.
 
5562         (We could emit inline code for this, since we know what the result would
 
5563         be, but that's probably just a waste of generated code.)
 
5565         * parser/Grammar.y: Constant fold even when negating a negative.
 
5567 2010-03-22  David Kilzer  <ddkilzer@apple.com>
 
5569         <http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789
 
5571         Reviewed by Darin Adler.
 
5573         * runtime/UString.cpp:
 
5574         (JSC::UString::from): Changed argument type from 'unsigned int'
 
5575         to 'unsigned' to match WebKit coding style.
 
5576         (JSC::UString::find): Changed static_cast<int>() to
 
5577         static_cast<unsigned>() now that this method returns unsigned.
 
5578         (JSC::UString::rfind): Ditto.
 
5579         * runtime/UString.h:
 
5580         (JSC::UString::from): Changed argument type from 'unsigned int'
 
5581         to 'unsigned' to match WebKit coding style.
 
5583 2010-03-22  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
5585         Reviewed by Kenneth Rohde Christiansen.
 
5587         Add support for syntax checking in the QtScript API.
 
5589         New class was created; the QScriptSyntaxCheckResult which main
 
5590         responsibility is to provide results of the ECMA Script code
 
5591         syntax check. The class is not fully functional as the JSC C API
 
5592         doesn't expose an error column number, but it is a good start point
 
5593         for a future development.
 
5595         [Qt] QtScript functionality should be extended by syntax checking.
 
5596         https://bugs.webkit.org/show_bug.cgi?id=36123
 
5598         * qt/api/QtScript.pro:
 
5599         * qt/api/qscriptengine.cpp:
 
5600         (QScriptEngine::checkSyntax):
 
5601         * qt/api/qscriptengine.h:
 
5602         * qt/api/qscriptengine_p.cpp:
 
5603         (QScriptEnginePrivate::checkSyntax):
 
5604         * qt/api/qscriptengine_p.h:
 
5605         * qt/api/qscriptsyntaxcheckresult.cpp: Added.
 
5606         (QScriptSyntaxCheckResult::QScriptSyntaxCheckResult):
 
5607         (QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult):
 
5608         (QScriptSyntaxCheckResult::operator=):
 
5609         (QScriptSyntaxCheckResult::state):
 
5610         (QScriptSyntaxCheckResult::errorLineNumber):
 
5611         (QScriptSyntaxCheckResult::errorColumnNumber):
 
5612         (QScriptSyntaxCheckResult::errorMessage):
 
5613         * qt/api/qscriptsyntaxcheckresult.h: Added.
 
5614         * qt/api/qscriptsyntaxcheckresult_p.cpp: Added.
 
5615         (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
 
5616         (QScriptSyntaxCheckResultPrivate::errorMessage):
 
5617         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
 
5618         * qt/api/qscriptsyntaxcheckresult_p.h: Added.
 
5619         (QScriptSyntaxCheckResultPrivate::get):
 
5620         (QScriptSyntaxCheckResultPrivate::QScriptSyntaxCheckResultPrivate):
 
5621         (QScriptSyntaxCheckResultPrivate::state):
 
5622         (QScriptSyntaxCheckResultPrivate::errorColumnNumber):
 
5623         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
 
5624         (tst_QScriptEngine::checkSyntax_data):
 
5625         (tst_QScriptEngine::checkSyntax):
 
5627 2010-03-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
5629         Reviewed by Simon Hausmann.
 
5631         New class; QScriptProgram.
 
5633         The class should be used to evaluate the same script multiple times
 
5636         [Qt] QtScript should have QScriptProgram class
 
5637         https://bugs.webkit.org/show_bug.cgi?id=36008
 
5639         * qt/api/QtScript.pro:
 
5640         * qt/api/qscriptengine.cpp:
 
5641         (QScriptEngine::evaluate):
 
5642         * qt/api/qscriptengine.h:
 
5643         * qt/api/qscriptengine_p.cpp:
 
5644         (QScriptEnginePrivate::evaluate):
 
5645         * qt/api/qscriptengine_p.h:
 
5646         (QScriptEnginePrivate::evaluate):
 
5647         * qt/api/qscriptprogram.cpp: Added.
 
5648         (QScriptProgram::QScriptProgram):
 
5649         (QScriptProgram::~QScriptProgram):
 
5650         (QScriptProgram::operator=):
 
5651         (QScriptProgram::isNull):
 
5652         (QScriptProgram::sourceCode):
 
5653         (QScriptProgram::fileName):
 
5654         (QScriptProgram::firstLineNumber):
 
5655         (QScriptProgram::operator==):
 
5656         (QScriptProgram::operator!=):
 
5657         * qt/api/qscriptprogram.h: Added.
 
5658         * qt/api/qscriptprogram_p.h: Added.
 
5659         (QScriptProgramPrivate::get):
 
5660         (QScriptProgramPrivate::QScriptProgramPrivate):
 
5661         (QScriptProgramPrivate::~QScriptProgramPrivate):
 
5662         (QScriptProgramPrivate::isNull):
 
5663         (QScriptProgramPrivate::sourceCode):
 
5664         (QScriptProgramPrivate::fileName):
 
5665         (QScriptProgramPrivate::firstLineNumber):
 
5666         (QScriptProgramPrivate::operator==):
 
5667         (QScriptProgramPrivate::operator!=):
 
5668         (QScriptProgramPrivate::program):
 
5669         (QScriptProgramPrivate::file):
 
5670         (QScriptProgramPrivate::line):
 
5671         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
 
5672         (tst_QScriptEngine::evaluateProgram):
 
5674 2010-03-21  David Kilzer  <ddkilzer@apple.com>
 
5676         Blind attempt #2 to fix the Windows build after r56314
 
5678         * API/tests/testapi.c: Include JSObjectRefPrivate.h for the new
 
5679         methods instead of declaring them locally (and non-extern).
 
5680         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5681         Backed out previous change.
 
5683 2010-03-21  David Kilzer  <ddkilzer@apple.com>
 
5685         Blind attempt to fix the Windows build after r56314
 
5687         Try to fix the following errors on the Windows buildbot:
 
5690             testapi.obj : error LNK2001: unresolved external symbol "bool __cdecl JSObjectSetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *,struct OpaqueJSValue const *)" (?JSObjectSetPrivateProperty@@YA_NPBUOpaqueJSContext@@PAUOpaqueJSValue@@PAUOpaqueJSString@@PBU2@@Z)
 
5691             testapi.obj : error LNK2001: unresolved external symbol "struct OpaqueJSValue const * __cdecl JSObjectGetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *)" (?JSObjectGetPrivateProperty@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1@PAUOpaqueJSString@@@Z)
 
5692             C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\bin\testapi.exe : fatal error LNK1120: 2 unresolved externals
 
5694         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
 
5695         missing symbols to be exported.
 
5697 2010-03-21  Oliver Hunt  <oliver@apple.com>
 
5699         Reviewed by Maciej Stachowiak.
 
5701         Documentation fix for previous patch.
 
5703         * API/JSObjectRefPrivate.h:
 
5705 2010-03-20  Oliver Hunt  <oliver@apple.com>
 
5707         Reviewed by Maciej Stachowiak.
 
5709         JSC needs an API to allow custom objects to have aprivate GC-accessible properties
 
5710         https://bugs.webkit.org/show_bug.cgi?id=36420
 
5712         Add new API methods to support "private" properties on custom
 
5715         * API/JSCallbackObject.h:
 
5716         (JSC::JSCallbackObjectData::JSCallbackObjectData):
 
5717         (JSC::JSCallbackObjectData::~JSCallbackObjectData):
 
5718         (JSC::JSCallbackObjectData::getPrivateProperty):
 
5719         (JSC::JSCallbackObjectData::setPrivateProperty):
 
5720         (JSC::JSCallbackObjectData::deletePrivateProperty):
 
5721         (JSC::JSCallbackObjectData::markChildren):
 
5722         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
 
5723         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
 
5724         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
 
5725         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
 
5726         (JSC::JSCallbackObject::getPrivateProperty):
 
5727         (JSC::JSCallbackObject::setPrivateProperty):
 
5728         (JSC::JSCallbackObject::deletePrivateProperty):
 
5729         (JSC::JSCallbackObject::markChildren):
 
5730         * API/JSObjectRef.cpp:
 
5731         (JSObjectGetPrivateProperty):
 
5732         (JSObjectSetPrivateProperty):
 
5733         (JSObjectDeletePrivateProperty):
 
5734         * API/JSObjectRefPrivate.h: Added.
 
5735         * API/tests/testapi.c:
 
5737         * JavaScriptCore.exp:
 
5738         * JavaScriptCore.xcodeproj/project.pbxproj:
 
5740 2010-03-20  Kevin Ollivier  <kevino@theolliviers.com>
 
5742         [wx] Build fixes after introduction of Brew files.
 
5746 2010-03-18  Tom Callaway  <tcallawa@redhat.com>
 
5748         Reviewed by Darin Adler.
 
5750         Bug 35429: Fix compile on SPARC64
 
5751         https://bugs.webkit.org/show_bug.cgi?id=35429
 
5753         * wtf/Platform.h: Set WTF_USE_JSVALUE64 for SPARC64
 
5755 2010-03-18  Oliver Hunt  <oliver@apple.com>
 
5757         Reviewed by Sam Weinig.
 
5759         Add API to directly expose JSON parsing
 
5760         https://bugs.webkit.org/show_bug.cgi?id=34887
 
5762         Add API to expose JSON parsing directly, and add tests to testapi
 
5764         * API/JSValueRef.cpp:
 
5765         (JSValueMakeFromJSONString):
 
5766         (JSValueCreateJSONString):
 
5767         * API/tests/testapi.c:
 
5769         * JavaScriptCore.exp:
 
5770         * runtime/JSONObject.cpp:
 
5771         (JSC::JSONStringify):
 
5772         * runtime/JSONObject.h:
 
5774 2010-03-16  Sam Weinig  <sam@webkit.org>
 
5776         Reviewed by Darin Adler and Mark Rowe.
 
5778         Update WebKit availability macros for release after 4.0.
 
5780         * API/WebKitAvailability.h:
 
5782 2010-03-17  Oliver Hunt  <oliver@apple.com>
 
5784         Reviewed by Gavin Barraclough.
 
5786         undefined, NaN, and Infinity should be ReadOnly
 
5787         https://bugs.webkit.org/show_bug.cgi?id=36263
 
5789         Simply add the ReadOnly flag to these properties.
 
5791         * runtime/JSGlobalObject.cpp:
 
5792         (JSC::JSGlobalObject::reset):
 
5794 2010-03-17  Darin Adler  <darin@apple.com>
 
5796         Reviewed by Oliver Hunt.
 
5798         Speed up Math.round a little by removing unneeded special case
 
5799         https://bugs.webkit.org/show_bug.cgi?id=36107
 
5801         Test: fast/js/math.html
 
5803         * runtime/MathObject.cpp:
 
5804         (JSC::mathProtoFuncRound): This function had a special case for numbers
 
5805         between -0.5 and -0.0 to return -0.0. But the algorithm in the function
 
5806         already yields -0.0 for those cases, so the extra checking and branching
 
5809 2010-03-17  Mike Homey  <glandium@debian.org>
 
5811         Reviewed by Gustavo Noronha.
 
5813         Build fix for SPARC. Fix missing macro value.
 
5817 2010-03-16  Gavin Barraclough  <barraclough@apple.com>
 
5819         Reviewed by Oliver Hunt, Darin Adler.
 
5821         Bug 36083 - REGRESSION (r55772-r55834): Crash in JavaScriptCore RegExp code on PowerPC
 
5823         The problem is a bug in our port of PCRE - that a read may take place from the first character in an
 
5824         empty string.  For the time being, revert to using a valid pointer in the data segment rather than
 
5825         an invalid non-null pointer into the zero-page for the empty string's data pointer.  A better fix for
 
5826         this will be to remove PCRE.
 
5828         * runtime/UStringImpl.cpp:
 
5829         (JSC::UStringImpl::empty):
 
5831 2010-03-16  Darin Adler  <darin@apple.com>
 
5833         Rolled out r56081 since it broke the Windows build.
 
5835 2010-03-16  Zoltan Horvath  <zoltan@webkit.org>
 
5837         Reviewed by Darin Adler.
 
5839         Remove extra <new> include and add guards to operator new/delete definitions
 
5840         https://bugs.webkit.org/show_bug.cgi?id=35967
 
5842         Remove extra <new> header include from FastAlloc.cpp since it is included in 
 
5843         FastAlloc.h. Add ENABLE(GLOBAL_FASTMALLOC_NEW) macro guard to operator
 
5844         new/delete/new []/delete [] definitions.
 
5846         * wtf/FastMalloc.cpp:
 
5848 2010-03-15  Kwang Yul Seo  <skyul@company100.net>
 
5850         Reviewed by Eric Seidel.
 
5852         [BREWMP] Add a function to create a BREW instance without local variable declarations.
 
5853         https://bugs.webkit.org/show_bug.cgi?id=34705
 
5855         Add a template function to create a BREW instance in one line.
 
5857         * wtf/brew/ShellBrew.h: Added.
 
5858         (WTF::createInstance):
 
5860 2010-03-15  Geoffrey Garen  <ggaren@apple.com>
 
5864         Removed a now-incorrect comment I forgot to remove in my last check-in.
 
5866         * wtf/FastMalloc.cpp:
 
5867         (WTF::TCMalloc_PageHeap::scavenge):
 
5869 2010-03-15  Geoffrey Garen  <ggaren@apple.com>
 
5871         Reviewed by Sam Weinig.
 
5874         <rdar://problem/7165917> | https://bugs.webkit.org/show_bug.cgi?id=28676
 
5875         Safari 4 does not release memory back to the operating system fast enough (28676)
 
5877         Every few seconds, release a percentage of the minimum unused page count
 
5878         during that time period.
 
5880         SunSpider reports no change, command-line or in-browser, Mac or Windows.
 
5882         * wtf/FastMalloc.cpp:
 
5883         (WTF::TCMalloc_PageHeap::init):
 
5884         (WTF::TCMalloc_PageHeap::signalScavenger):
 
5885         (WTF::TCMalloc_PageHeap::initializeScavenger): Renamed shouldContinueScavenging
 
5886         to shouldScavenge, since scavenging is no longer something that we interrupt.
 
5888         (WTF::TCMalloc_PageHeap::scavenge): The new scavenging algorithm. Fixes
 
5889         a bug where the old code would release only one item from each size class
 
5890         per scavenge, potentially leaving large numbers of large-sized objects
 
5891         unreleased for a long time.
 
5893         (WTF::TCMalloc_PageHeap::shouldScavenge):
 
5894         (WTF::TCMalloc_PageHeap::New):
 
5895         (WTF::TCMalloc_PageHeap::AllocLarge):
 
5896         (WTF::TCMalloc_PageHeap::Delete):
 
5897         (WTF::TCMalloc_PageHeap::GrowHeap):
 
5898         (WTF::TCMalloc_PageHeap::scavengerThread):
 
5899         (WTF::TCMalloc_PageHeap::periodicScavenge): Updated to track the minimum
 
5900         value of free_committed_pages_ during a given scavenge period.
 
5902 2010-03-15  Gavin Barraclough  <barraclough@apple.com>
 
5904         Reviewed by Sam Weinig.
 
5906         https://bugs.webkit.org/show_bug.cgi?id=35843
 
5907         Re-land reverted fix to JSString::getIndex()
 
5909         Calling getIndex() on a JSString in rope form may result in a JSException being thrown
 
5910         if there is insuficient memory so value(exec) returns UString() with length zero,
 
5911         which will be passed to jsSingleCharacterSubstring.
 
5912         Add a slow case function to trap the error & return a safe null value, until the
 
5913         exception is handled.
 
5915         * runtime/JSString.cpp:
 
5916         (JSC::JSString::getIndexSlowCase):
 
5917         (JSC::JSString::getStringPropertyDescriptor):
 
5918         * runtime/JSString.h:
 
5919         (JSC::jsSingleCharacterSubstring):
 
5920         (JSC::JSString::getIndex):
 
5921         (JSC::jsSingleCharacterString):
 
5922         (JSC::JSString::getStringPropertySlot):
 
5924 2010-03-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
 
5926         Reviewed by Adam Roben.
 
5928         Add a long long version of abs() for MSVC.
 
5933 2010-03-15  Gabor Loki  <loki@webkit.org>
 
5935         Reviewed by Gavin Barraclough.
 
5937         Combine ctiTrampolines on ARM and Thumb-2
 
5938         https://bugs.webkit.org/show_bug.cgi?id=36014
 
5941         (JSC::JITThunks::JITThunks):
 
5943 2010-03-12  Gavin Barraclough  <barraclough@apple.com>
 
5945         Reviewed by NOBODY (build fix).
 
5947         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5949 2010-03-12  Gavin Barraclough  <barraclough@apple.com>
 
5951         Reviewed by NOBODY (build fix).
 
5953         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
5955 2010-03-11  Gavin Barraclough  <barraclough@apple.com>
 
5957         Reviewed by Oliver Hunt.
 
5959         Bug 36075 - Clean up screwyness re static string impls & Identifiers.
 
5961         * API/JSClassRef.cpp:
 
5962         (OpaqueJSClass::~OpaqueJSClass): Classname may be null/empty, and these are an identifer.  This is okay, since the null/empty strings are shared across all threads.
 
5963         * JavaScriptCore.exp:
 
5964         * runtime/Identifier.cpp:
 
5965         (JSC::Identifier::add): No need to explicitly hash null reps, this is done in the ststic UStringImpl constructor.
 
5966         (JSC::Identifier::addSlowCase): UStringImpl::empty() handled & checkCurrentIdentifierTable now called in the header.
 
5967         (JSC::Identifier::checkCurrentIdentifierTable): Replaces checkSameIdentifierTable (this no longer checked the rep since the identifierTable pointer was removed from UString::Rep long ago).
 
5968         * runtime/Identifier.h:
 
5969         (JSC::Identifier::add): Replace call to checkSameIdentifierTable with call to checkCurrentIdentifierTable at head of function.
 
5970         * runtime/UStringImpl.cpp:
 
5971         (JSC::UStringImpl::~UStringImpl): Remove call to checkConsistency - this function no longer checks anything interesting.
 
5972         * runtime/UStringImpl.h:
 
5973         (JSC::UStringOrRopeImpl::UStringOrRopeImpl): Set s_refCountFlagIsIdentifier in static constructor.
 
5974         (JSC::UStringImpl::UStringImpl): remove calls to checkConsistency (see above), add new ASSERT to substring constructor.
 
5975         (JSC::UStringImpl::setHash): ASSERT not static (static strings set the hash in their constructor, should not reach this code path).
 
5976         (JSC::UStringImpl::create): Add missing ASSERT.
 
5977         (JSC::UStringImpl::setIsIdentifier): ASSERT !isStatic() (static strings hash set in constructor).
 
5979 2010-03-12  Peter Varga  <pvarga@inf.u-szeged.hu>
 
5981         Reviewed by David Levin.
 
5983         Two functions tryConsumeCharacter() and tryConsumeCharacterClass() are
 
5984         removed from yarr/RegexInterpreter.cpp because they are never called.
 
5986         * yarr/RegexInterpreter.cpp:
 
5988 2010-03-11  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
5990         Reviewed by Simon Hausmann.
 
5992         The JSNative state was renamed to JSPrimitive. The new name better
 
5993         coresponds to the ECMAScript standard.
 
5995         Enum QScriptValuePrivate::States was renamed to State to obey Qt
 
5996         coding style rules ("States" name suggests that a state could
 
5997         mixed together with an other state using bitwise logic operators.
 
5999         [Qt] QScriptValuePrivate::States has naming issues
 
6000         https://bugs.webkit.org/show_bug.cgi?id=35968
 
6002         * qt/api/qscriptvalue_p.h:
 
6003         (QScriptValuePrivate::):
 
6004         (QScriptValuePrivate::QScriptValuePrivate):
 
6005         (QScriptValuePrivate::isBool):
 
6006         (QScriptValuePrivate::isNumber):
 
6007         (QScriptValuePrivate::isNull):
 
6008         (QScriptValuePrivate::isString):
 
6009         (QScriptValuePrivate::isUndefined):
 
6010         (QScriptValuePrivate::toString):
 
6011         (QScriptValuePrivate::toNumber):
 
6012         (QScriptValuePrivate::toBool):
 
6013         (QScriptValuePrivate::assignEngine):
 
6014         (QScriptValuePrivate::refinedJSValue):
 
6016 2010-03-11  Gavin Barraclough  <barraclough@apple.com>
 
6018         Reviewed by NOBODY (Windows build fix).
 
6022         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6024 2010-03-11  Gavin Barraclough  <barraclough@apple.com>
 
6026         Reviewed by NOBODY (Windows build fix).
 
6030         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6032 2010-03-11  Gavin Barraclough  <barraclough@apple.com>
 
6034         Rubber stamped by Oliver Hunt.
 
6036         Remove nonsense comments used in development & commited in error.
 
6038         * runtime/UStringImpl.h:
 
6040 2010-03-11  Gavin Barraclough  <barraclough@apple.com>
 
6042         Reviewed by NOBODY (Windows build fix).
 
6046         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6048 2010-03-11  Gavin Barraclough  <barraclough@apple.com>
 
6050         Reviewed by Oliver Hunt.
 
6052         https://bugs.webkit.org/show_bug.cgi?id=36041
 
6053         Remove unnecessary differences in common code between WebCore::StringImpl & JSC::UStringImpl
 
6055         Much of the code in WebCore::StringImpl and JSC::UStringImpl is now very similar,
 
6056         but has trivial and unnecessary formatting differences, such as the exact wording
 
6057         of comments, missing ASSERTs, functions implemented in the .h vs .cpp etc.
 
6059         * runtime/Identifier.cpp:
 
6060         (JSC::Identifier::add): UStringImpl::empty() now automatically hashes, uas per WebCore strings.
 
6061         (JSC::Identifier::addSlowCase): UStringImpl::empty() now automatically hashes, uas per WebCore strings.
 
6062         * runtime/UStringImpl.cpp:
 
6063         (JSC::UStringImpl::~UStringImpl): Only call bufferOwnership() once, add missing ASSERTs.
 
6064         (JSC::UStringImpl::createUninitialized): Move from .h, not commonly called, no need to inline.
 
6065         (JSC::UStringImpl::create): Move from .h, not commonly called, no need to inline.
 
6066         (JSC::UStringImpl::sharedBuffer): Rewritten to more closely match WebCore implementation, remove need for separate baseSharedBuffer() method.
 
6067         * runtime/UStringImpl.h:
 
6068         (JSC::UStringImpl::UStringImpl): Automatically hash static strings, ASSERT m_data & m_length are non-null/non-zero in non-static strings.
 
6069         (JSC::UStringImpl::setHash): Add missing ASSERT.
 
6070         (JSC::UStringImpl::create): Moved to .cpp / added missing check for empty string creation.
 
6071         (JSC::UStringImpl::adopt): Vector.size() returns size_t, not unsigned.
 
6072         (JSC::UStringImpl::cost): Renamed m_bufferSubstring -> m_substringBuffer
 
6073         (JSC::UStringImpl::hash): Reordered in file.
 
6074         (JSC::UStringImpl::existingHash): Reordered in file.
 
6075         (JSC::UStringImpl::computeHash): Reordered in file, renamed parameter.
 
6076         (JSC::UStringImpl::checkConsistency): rewrote ASSERT.
 
6077         (JSC::UStringImpl::bufferOwnership): Return type should be BufferOwnership.
 
6078         (JSC::UStringImpl::): Moved friends to head of class.
 
6080 2010-03-11  Mark Rowe  <mrowe@apple.com>
 
6082         Reviewed by David Kilzer.
 
6084         <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version
 
6086         Default to using the appropriate SDK if the target Mac OS X version is not the current Mac OS X version.
 
6088         * Configurations/Base.xcconfig:
 
6090 2010-03-11  Mark Rowe  <mrowe@apple.com>
 
6092         Reviewed by Tim Hatcher.
 
6094         <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version
 
6096         Introduce TARGET_MAC_OS_X_VERSION_MAJOR to represent the Mac OS X version that is being targeted.  It defaults to the
 
6097         current Mac OS X version unless otherwise specified.
 
6099         Key off TARGET_MAC_OS_X_VERSION_MAJOR where we'd previously been keying off MAC_OS_X_VERSION_MAJOR.
 
6101         Explicitly map from the target Mac OS X version to the preferred compiler since Xcode's default compiler choice
 
6102         may not be usable when targetting a different Mac OS X version.
 
6104         Key off TARGET_GCC_VERSION rather than MAC_OS_X_VERSION_MAJOR in locations where we'd previously been keying off
 
6105         MAC_OS_X_VERSION_MAJOR but the decision is really related to the compiler version being used.
 
6107         * Configurations/Base.xcconfig:
 
6108         * Configurations/DebugRelease.xcconfig:
 
6109         * Configurations/FeatureDefines.xcconfig:
 
6110         * Configurations/JavaScriptCore.xcconfig:
 
6111         * Configurations/Version.xcconfig:
 
6113 2010-03-11  Simon Fraser  <simon.fraser@apple.com>
 
6115         Reviewed by Mark Rowe.
 
6117         Sort the project file.
 
6119         * JavaScriptCore.xcodeproj/project.pbxproj:
 
6121 2010-03-11  Simon Fraser  <simon.fraser@apple.com>
 
6123         Reviewed by Mark Rowe.
 
6125         Sort the project file .
 
6127         * JavaScriptCore.xcodeproj/project.pbxproj:
 
6129 2010-03-11  Gabor Loki  <loki@webkit.org>
 
6131         Reviewed by Gavin Barraclough.
 
6133         Buildfix for Thumb-2 after r55684. Add branch8 and branchTest8 functions.
 
6134         https://bugs.webkit.org/show_bug.cgi?id=35892
 
6136         * assembler/ARMv7Assembler.h:
 
6137         (JSC::ARMv7Assembler::):
 
6138         (JSC::ARMv7Assembler::ldrb):
 
6139         * assembler/MacroAssemblerARMv7.h:
 
6140         (JSC::MacroAssemblerARMv7::load8):
 
6141         (JSC::MacroAssemblerARMv7::branch8):
 
6142         (JSC::MacroAssemblerARMv7::branchTest8):
 
6143         (JSC::MacroAssemblerARMv7::setTest8):
 
6145 2010-03-10  Gavin Barraclough  <barraclough@apple.com>
 
6147         Rubber stamped by Oliver Hunt.
 
6149         Rename JSC::UStringImpl::data() to characters(), to match WebCore::StringImpl.
 
6151         * API/JSClassRef.cpp:
 
6152         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
6153         * bytecompiler/BytecodeGenerator.cpp:
 
6154         (JSC::keyForCharacterSwitch):
 
6155         * bytecompiler/NodesCodegen.cpp:
 
6156         (JSC::processClauseList):
 
6157         * interpreter/Interpreter.cpp:
 
6158         (JSC::Interpreter::privateExecute):
 
6160         (JSC::DEFINE_STUB_FUNCTION):
 
6161         * runtime/ArrayPrototype.cpp:
 
6162         (JSC::arrayProtoFuncToString):
 
6163         * runtime/Identifier.cpp:
 
6164         (JSC::Identifier::equal):
 
6165         (JSC::Identifier::addSlowCase):
 
6166         * runtime/JSString.cpp:
 
6167         (JSC::JSString::resolveRope):
 
6168         * runtime/UString.cpp:
 
6169         (JSC::UString::toStrictUInt32):
 
6171         * runtime/UString.h:
 
6172         (JSC::UString::data):
 
6173         * runtime/UStringImpl.h:
 
6174         (JSC::UStringImpl::characters):
 
6175         (JSC::UStringImpl::hash):
 
6176         (JSC::UStringImpl::setHash):
 
6178 2010-03-10  Gavin Barraclough  <barraclough@apple.com>
 
6180         Reviewed by Darin Adler, Geoffrey Garen, Maciej Stachowiak.
 
6182         https://bugs.webkit.org/show_bug.cgi?id=35991
 
6183         Would be faster to not use a thread specific to implement StringImpl::empty()
 
6185         Change JSC::UStringImpl's implementation of empty() match to match StringImpl's new implementation
 
6186         (use a static defined within the empty() method), and change the interface to match too (return
 
6187         a pointer not a reference). 
 
6189         ~0% performance impact (possible minor progression from moving empty() from .h to .cpp).
 
6191         * JavaScriptCore.exp:
 
6192         * runtime/Identifier.cpp:
 
6193         (JSC::Identifier::add):
 
6194         (JSC::Identifier::addSlowCase):
 
6195         * runtime/PropertyNameArray.cpp:
 
6196         (JSC::PropertyNameArray::add):
 
6197         * runtime/UString.cpp:
 
6198         (JSC::initializeUString):
 
6199         (JSC::UString::UString):
 
6200         * runtime/UStringImpl.cpp:
 
6201         (JSC::UStringImpl::empty):
 
6202         (JSC::UStringImpl::create):
 
6203         * runtime/UStringImpl.h:
 
6204         (JSC::UStringImpl::adopt):
 
6205         (JSC::UStringImpl::createUninitialized):
 
6206         (JSC::UStringImpl::tryCreateUninitialized):
 
6208 2010-03-10  Dmitry Titov  <dimich@chromium.org>
 
6210         Not reviewed, fixing Snow Leopard build.
 
6212         * wtf/mac/MainThreadMac.mm: Forgot 'static' for a new local function.
 
6215 2010-03-10  Dmitry Titov  <dimich@chromium.org>
 
6217         Reviewed by Darin Adler.
 
6219         Make Document::postTask to use a single queue of tasks, to fire them in order
 
6220         https://bugs.webkit.org/show_bug.cgi?id=35943
 
6222         The patch uses CFRunLoopTimer to schedule execution of tasks instead of performSelectorOnMainThread which apparently can starve other event sources.
 
6223         The timer is used when the schedule request is coming on the main thread itself. This happens when the task is posted on the main thread or
 
6224         when too many tasks are posted and the queue does 'stop and re-schedule' to make sure run loop has a chance to execute other events.
 
6226         * wtf/mac/MainThreadMac.mm:
 
6229         (WTF::scheduleDispatchFunctionsOnMainThread): Use timer posted to the current RunLoop if scheduling the task execution while on the main thread.
 
6231 2010-03-10  Geoffrey Garen  <ggaren@apple.com>
 
6233         Windows build fix: added new symbol.
 
6235         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6237 2010-03-10  Geoffrey Garen  <ggaren@apple.com>
 
6239         Windows build fix: removed old symbol.
 
6241         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6243 2010-03-09  Geoffrey Garen  <ggaren@apple.com>
 
6245         Reviewed by Alexey Proskuryakov, Darin Adler, and Sam Weinig.
 
6247         Refactored fastCheckConsistency to match some review comments:
 
6248             - renamed fastCheckConsistency to fastMallocSize, and changed ValueCheck
 
6249               to ASSERT that a pointer's fastMallocSize is not 0.
 
6250             - implemented a version of fastMallocSize for tcmalloc.
 
6252         Also moved some pre-existing code around to avoid a problem related to
 
6253         mismatched #define/#undef of malloc/free in this source file.
 
6255         * JavaScriptCore.exp:
 
6256         * wtf/FastMalloc.cpp:
 
6257         (WTF::fastMallocSize): Renamed. Fixed indentation.
 
6259         (WTF::TCMalloc_PageHeap::scavenge): Removed an incorrect ASSERT that
 
6260         got in the way of testing the tcmalloc implementation. (More information
 
6261         on why this ASSERT is incorrect is in <rdar://problem/7165917>.)
 
6263         (WTF::TCMallocStats::fastMallocSize): Implemented for tcmalloc.
 
6265         * wtf/FastMalloc.h: Updated for rename.
 
6268         (WTF::): Moved the ASSERT that used to be in fastCheckConsistency here.
 
6270 2010-03-10  Kevin Ollivier  <kevino@theolliviers.com>
 
6272         Reviewed by Eric Seidel.
 
6274         Make global new/delete operators configurable for all ports and disable it
 
6275         for the wx port for now.
 
6280 2010-03-09  Gavin Barraclough  <barraclough@apple.com>
 
6282         Reviewed by NOBODY (reverting r54510).
 
6284         This caused a performance regression, by breaking the code
 
6285         generator's logic to calculate the skip level for resolving
 
6286         variables (traced by rdar:7683350)  Reverting for now.
 
6289         * parser/NodeConstructors.h:
 
6290         (JSC::ContinueNode::ContinueNode):
 
6291         (JSC::BreakNode::BreakNode):
 
6292         (JSC::ForInNode::ForInNode):
 
6293         * runtime/CommonIdentifiers.cpp:
 
6294         (JSC::CommonIdentifiers::CommonIdentifiers):
 
6295         * runtime/CommonIdentifiers.h:
 
6296         * runtime/FunctionPrototype.cpp:
 
6297         (JSC::FunctionPrototype::FunctionPrototype):
 
6298         * runtime/Identifier.cpp:
 
6299         (JSC::Identifier::add):
 
6300         * runtime/PropertyNameArray.cpp:
 
6301         (JSC::PropertyNameArray::add):
 
6303 2010-03-09  Geoffrey Garen  <ggaren@apple.com>
 
6305         Reviewed by Darin Adler.
 
6307         Changed FastMalloc statistics reporting to be a bit clearer. We now
 
6309             - Reserved VM Bytes: the VM that has been mapped into the process.
 
6310             - Committed VM Bytes: the subset of Reserved VM Bytes actually in use.
 
6311             - Free List Bytes: the subset of Committed VM Bytes in a free list.
 
6313         * wtf/FastMalloc.cpp:
 
6314         (WTF::fastMallocStatistics):
 
6315         (WTF::TCMallocStats::fastMallocStatistics): Updated to report the statistics
 
6316         above. Standardized use of "ifdef WTF_CHANGES". Added a SpinLockHolder
 
6317         around all statistics gathering, since it reads from the page heap.
 
6319         * wtf/FastMalloc.h: Updated to report the statistics above. 
 
6321 2010-03-09  Gabor Loki  <loki@webkit.org>
 
6323         Rubber-stamped by Maciej Stachowiak.
 
6325         Buildfix for ARM after r55684. Add branch8 and branchTest8 functions.
 
6326         https://bugs.webkit.org/show_bug.cgi?id=35892
 
6328         * assembler/ARMAssembler.cpp:
 
6329         (JSC::ARMAssembler::dataTransfer32):
 
6330         * assembler/ARMAssembler.h:
 
6331         (JSC::ARMAssembler::):
 
6332         * assembler/MacroAssemblerARM.h:
 
6333         (JSC::MacroAssemblerARM::load8):
 
6334         (JSC::MacroAssemblerARM::branch8):
 
6335         (JSC::MacroAssemblerARM::branchTest8):
 
6337 2010-03-08  Geoffrey Garen  <ggaren@apple.com>
 
6339         Windows build fix: 'P' is not a type. Luckily, 'void' is.
 
6341         * wtf/FastMalloc.cpp:
 
6342         (WTF::fastCheckConsistency):
 
6344 2010-03-08  Geoffrey Garen  <ggaren@apple.com>
 
6346         Windows build fix: export a new symbol.
 
6348         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6350 2010-03-08  Geoffrey Garen  <ggaren@apple.com>
 
6352         Reviewed by Maciej Stachowiak.
 
6354         Switching malloc implementations requires a world rebuild
 
6355         https://bugs.webkit.org/show_bug.cgi?id=35899
 
6357         * wtf/FastMalloc.cpp:
 
6358         (WTF::fastCheckConsistency):
 
6359         (WTF::TCMallocStats::fastCheckConsistency):
 
6362         (WTF::): Moved pointer checking into a helper function in FastMalloc.cpp,
 
6363         so you can switch malloc implementations without rebuilding the world.
 
6365 2010-03-07  Oliver Hunt  <oliver@apple.com>
 
6367         Reviewed by Darin Adler.
 
6369         TypeInfo is unnecessarily large
 
6370         https://bugs.webkit.org/show_bug.cgi?id=35850
 
6372         Reduce the size of the type and flags members to a single
 
6373         byte each, reducing the size of Structure by 8 bytes.
 
6375         * assembler/MacroAssemblerX86Common.h:
 
6376         (JSC::MacroAssemblerX86Common::branch8):
 
6377         (JSC::MacroAssemblerX86Common::branchTest8):
 
6378         (JSC::MacroAssemblerX86Common::setTest8):
 
6379           Add single byte branches, and correct setTest8 to do a
 
6380           single byte read from memory, and actually store the result
 
6381         * assembler/X86Assembler.h:
 
6382         (JSC::X86Assembler::):
 
6383         (JSC::X86Assembler::cmpb_im):
 
6384         (JSC::X86Assembler::testb_im):
 
6386         (JSC::JIT::emit_op_construct_verify):
 
6387         * jit/JITOpcodes.cpp:
 
6388         (JSC::JIT::emit_op_instanceof):
 
6389         (JSC::JIT::emit_op_jeq_null):
 
6390         (JSC::JIT::emit_op_jneq_null):
 
6391         (JSC::JIT::emit_op_get_pnames):
 
6392         (JSC::JIT::emit_op_convert_this):
 
6393         (JSC::JIT::emit_op_construct_verify):
 
6394         (JSC::JIT::emit_op_to_jsnumber):
 
6395         (JSC::JIT::emit_op_eq_null):
 
6396         (JSC::JIT::emit_op_neq_null):
 
6397         * runtime/JSTypeInfo.h:
 
6398         (JSC::TypeInfo::TypeInfo):
 
6399         (JSC::TypeInfo::type):
 
6401 2010-03-08  Gavin Barraclough  <barraclough@apple.com>
 
6403         Reviewed by NOBODY (reverting regression).
 
6405         Reverting 55035, this caused a regression.
 
6406         (https://bugs.webkit.org/show_bug.cgi?id=35843)
 
6408         * runtime/JSString.cpp:
 
6409         (JSC::JSString::resolveRope):
 
6410         (JSC::JSString::getStringPropertyDescriptor):
 
6411         * runtime/JSString.h:
 
6412         (JSC::jsSingleCharacterSubstring):
 
6413         (JSC::JSString::getIndex):
 
6414         (JSC::JSString::getStringPropertySlot):
 
6415         * runtime/UStringImpl.cpp:
 
6416         * runtime/UStringImpl.h:
 
6418 2010-03-08  Stuart Morgan  <stuartmorgan@chromium.org>
 
6420         Reviewed by Darin Adler.
 
6422         Added a new USE definition for secure text mode on the Mac.
 
6423         https://bugs.webkit.org/show_bug.cgi?id=31265
 
6427 2010-03-08  Jian Li  <jianli@chromium.org>
 
6429         Reviewed by Dmitry Titov.
 
6432         https://bugs.webkit.org/show_bug.cgi?id=32993
 
6434         Add ENABLE_BLOB_SLICE feature define.
 
6435         Also fix a problem that JSValue.toInteger is not exposed on Windows.
 
6437         * Configurations/FeatureDefines.xcconfig:
 
6438         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6440 2010-03-07  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
6442         Reviewed by Simon Hausmann.
 
6444         Small performance fix in the QScriptConverter::toString().
 
6446         The QByteArray was replaced by the QVarLengthArray which doesn't
 
6447         have to allocate any memory on heap.
 
6449         [Qt] QScriptConverter::toString() should use QVarLengthArray instead of QByteArray
 
6450         https://bugs.webkit.org/show_bug.cgi?id=35577
 
6452         * qt/api/qscriptconverter_p.h:
 
6453         (QScriptConverter::toString):
 
6455 2010-03-06  Mark Rowe  <mrowe@apple.com>
 
6457         Rubber-stamped by Sam Weinig.
 
6459         Remove unnecessary includes of wtf/Platform.h.  This is already pulled in by config.h.
 
6462         * API/JSCallbackFunction.cpp:
 
6463         * API/JSContextRef.cpp:
 
6464         * API/JSObjectRef.cpp:
 
6465         * API/JSValueRef.cpp:
 
6466         * assembler/ARMAssembler.h:
 
6467         * assembler/ARMv7Assembler.h:
 
6468         * assembler/AbstractMacroAssembler.h:
 
6469         * assembler/AssemblerBuffer.h:
 
6470         * assembler/AssemblerBufferWithConstantPool.h:
 
6471         * assembler/CodeLocation.h:
 
6472         * assembler/LinkBuffer.h:
 
6473         * assembler/MIPSAssembler.h:
 
6474         * assembler/MacroAssembler.h:
 
6475         * assembler/MacroAssemblerARM.h:
 
6476         * assembler/MacroAssemblerARMv7.h:
 
6477         * assembler/MacroAssemblerCodeRef.h:
 
6478         * assembler/MacroAssemblerMIPS.h:
 
6479         * assembler/MacroAssemblerX86.h:
 
6480         * assembler/MacroAssemblerX86Common.h:
 
6481         * assembler/MacroAssemblerX86_64.h:
 
6482         * assembler/RepatchBuffer.h:
 
6483         * assembler/X86Assembler.h:
 
6486         * jit/JITInlineMethods.h:
 
6488         * os-win32/stdint.h:
 
6489         * runtime/JSAPIValueWrapper.h:
 
6490         * runtime/JSImmediate.h:
 
6492         * wtf/StdLibExtras.h:
 
6494         * yarr/RegexCompiler.h:
 
6495         * yarr/RegexInterpreter.h:
 
6497         * yarr/RegexParser.h:
 
6498         * yarr/RegexPattern.h:
 
6500 2010-03-06  Kwang Yul Seo  <skyul@company100.net>
 
6502         Reviewed by Eric Seidel.
 
6504         [BREWMP] Share OwnPtr.
 
6505         https://bugs.webkit.org/show_bug.cgi?id=35776
 
6507         Share OwnPtr implementation with BREW MP and remove OwnPtrBrew.
 
6509         * wtf/OwnPtrBrew.cpp: Added.
 
6510         (WTF::deleteOwnedPtr):
 
6511         * wtf/OwnPtrCommon.h:
 
6512         * wtf/brew/OwnPtrBrew.cpp: Removed.
 
6513         * wtf/brew/OwnPtrBrew.h: Removed.
 
6515 2010-03-06  Patrick Gansterer  <paroga@paroga.com>
 
6517         Reviewed by Eric Seidel.
 
6519         Implemented JIT_OPTIMIZE_NATIVE_CALL for WinCE
 
6520         https://bugs.webkit.org/show_bug.cgi?id=33426
 
6522         * jit/JITOpcodes.cpp:
 
6523         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
6525 2010-03-05  Oliver Hunt  <oliver@apple.com>
 
6527         Reviewed by NOBODY (build fix).
 
6529         Add enw exports to windows
 
6531         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
6533 2010-03-05  Oliver Hunt  <oliver@apple.com>
 
6535         Reviewed by Gavin Barraclough.
 
6537         JSC should cache int to Identifier conversion as it does for ordinary strings
 
6538         https://bugs.webkit.org/show_bug.cgi?id=35814
 
6540         Make the NumericStrings cache cache unsigned ints in addition to signed.
 
6541         We keep them separate from the int cache as it both simplifies code, and
 
6542         also because the unsigned path is exclusive to property access and therefore
 
6543         seems to have different usage patterns.
 
6545         The primary trigger for the unsigned to Identifier propertyName conversion
 
6546         is the construction of array-like objects out of normal objects.  Given these
 
6547         tend to be relative small numbers, and the array-like behaviour lends itself
 
6548         to sequential values this patch also adds a non-colliding cache for all small
 
6551         * JavaScriptCore.exp:
 
6552         * runtime/Identifier.cpp:
 
6553         (JSC::Identifier::from):
 
6554         * runtime/Identifier.h:
 
6555         * runtime/NumericStrings.h:
 
6556         (JSC::NumericStrings::add):
 
6557         (JSC::NumericStrings::lookup):
 
6558         (JSC::NumericStrings::lookupSmallString):
 
6560 2010-03-03  Oliver Hunt  <oliver@apple.com>
 
6562         Reviewed by Gavin Barraclough.
 
6564         Allow static property getters to interact with JSCs caching
 
6565         https://bugs.webkit.org/show_bug.cgi?id=35716
 
6567         Add new opcodes for handling cached lookup of static value getters.
 
6568         More or less the same as with JS getters, all that changes is that
 
6569         instead of calling through a JSFunction we always know that we have
 
6570         a C function to call.
 
6572         For the patching routines in the JIT we now need to pass a few
 
6573         new parameters to allow us to pass enough information to the stub
 
6574         function to allow us to call the C function correctly.  Logically
 
6575         this shouldn't actually be necessary as all of these functions ignore
 
6576         the identifier, but removing the ident parameter would require
 
6577         somewhat involved changes to the way we implement getOwnPropertySlot,
 
6580         * bytecode/CodeBlock.cpp:
 
6581         (JSC::CodeBlock::dump):
 
6582         (JSC::CodeBlock::derefStructures):
 
6583         (JSC::CodeBlock::refStructures):
 
6584         * bytecode/Instruction.h:
 
6585         (JSC::Instruction::Instruction):
 
6586         (JSC::Instruction::):
 
6587         * bytecode/Opcode.h:
 
6588         * interpreter/Interpreter.cpp:
 
6589         (JSC::Interpreter::tryCacheGetByID):
 
6590         (JSC::Interpreter::privateExecute):
 
6592         (JSC::JIT::privateCompileMainPass):
 
6594         (JSC::JIT::compileGetByIdProto):
 
6595         (JSC::JIT::compileGetByIdSelfList):
 
6596         (JSC::JIT::compileGetByIdProtoList):
 
6597         (JSC::JIT::compileGetByIdChainList):
 
6598         (JSC::JIT::compileGetByIdChain):
 
6599         * jit/JITPropertyAccess.cpp:
 
6600         (JSC::JIT::privateCompileGetByIdProto):
 
6601         (JSC::JIT::privateCompileGetByIdSelfList):
 
6602         (JSC::JIT::privateCompileGetByIdProtoList):
 
6603         (JSC::JIT::privateCompileGetByIdChainList):
 
6604         (JSC::JIT::privateCompileGetByIdChain):
 
6605         * jit/JITPropertyAccess32_64.cpp:
 
6606         (JSC::JIT::privateCompileGetByIdProto):
 
6607         (JSC::JIT::privateCompileGetByIdSelfList):
 
6608         (JSC::JIT::privateCompileGetByIdProtoList):
 
6609         (JSC::JIT::privateCompileGetByIdChainList):
 
6610         (JSC::JIT::privateCompileGetByIdChain):
 
6612         (JSC::JITThunks::tryCacheGetByID):
 
6613         (JSC::DEFINE_STUB_FUNCTION):
 
6616         * runtime/JSFunction.cpp:
 
6617         (JSC::JSFunction::getOwnPropertySlot):
 
6619         (JSC::getStaticPropertySlot):
 
6620         (JSC::getStaticValueSlot):
 
6621         * runtime/PropertySlot.h:
 
6622         (JSC::PropertySlot::):
 
6623         (JSC::PropertySlot::PropertySlot):
 
6624         (JSC::PropertySlot::cachedPropertyType):
 
6625         (JSC::PropertySlot::isCacheable):
 
6626         (JSC::PropertySlot::isCacheableValue):
 
6627         (JSC::PropertySlot::setValueSlot):
 
6628         (JSC::PropertySlot::setCacheableCustom):
 
6629         (JSC::PropertySlot::setGetterSlot):
 
6630         (JSC::PropertySlot::setCacheableGetterSlot):
 
6631         (JSC::PropertySlot::clearOffset):
 
6632         (JSC::PropertySlot::customGetter):
 
6634 2010-03-04  Shinichiro Hamaji  <hamaji@chromium.org>
 
6636         Unreviewed. Remove a non-ASCII character introduced in the following bug.
 
6638         put_by_id does will incorrectly cache writes where a specific value exists, where at the point of caching the same value is being written.
 
6639         https://bugs.webkit.org/show_bug.cgi?id=35537
 
6641         * runtime/JSObject.h:
 
6642         (JSC::JSObject::putDirectInternal):
 
6644 2010-03-04  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
6646         Reviewed by Tor Arne Vestbø.
 
6648         [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic.
 
6650         This also allows shadow builds relying only on qmake to work properly.
 
6652         * qt/api/QtScript.pro:
 
6653         * qt/tests/qscriptengine/qscriptengine.pro:
 
6654         * qt/tests/qscriptvalue/qscriptvalue.pro:
 
6655         * qt/tests/tests.pri:
 
6657 2010-03-03  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
6659         Reviewed by Simon Hausmann.
 
6661         QScriptValue::isObject fix.
 
6663         Fix broken internal state evaluation from JSValue to JSNative / JSObject.
 
6664         New function was introduced which should take care about promoting
 
6665         JSValue state inside QScriptValuePrivate. It should be used instead of a
 
6666         direct JSC C API call.
 
6668         The bug exposed a weakness in autotest suite, as the QScriptValuePrivate
 
6669         is based on state machine with lazy state evaluation, there is a possibility
 
6670         that serial sequencial calls to the same public const function could return
 
6671         different results. The patch fix the issue.
 
6673         [Qt] Sometimes QScriptValue::isObject returns an incorrect value
 
6674         https://bugs.webkit.org/show_bug.cgi?id=35387
 
6676         * qt/api/qscriptvalue_p.h:
 
6677         (QScriptValuePrivate::isBool):
 
6678         (QScriptValuePrivate::isNumber):
 
6679         (QScriptValuePrivate::isNull):
 
6680         (QScriptValuePrivate::isString):
 
6681         (QScriptValuePrivate::isUndefined):
 
6682         (QScriptValuePrivate::isError):
 
6683         (QScriptValuePrivate::isObject):
 
6684         (QScriptValuePrivate::isFunction):
 
6685         (QScriptValuePrivate::call):
 
6686         (QScriptValuePrivate::refineJSValue):
 
6687         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
 
6688         (tst_QScriptValue::initScriptValues):
 
6689         (tst_QScriptValue::isValid_makeData):
 
6690         (tst_QScriptValue::isValid_test):
 
6691         (tst_QScriptValue::isBool_makeData):
 
6692         (tst_QScriptValue::isBool_test):
 
6693         (tst_QScriptValue::isBoolean_makeData):
 
6694         (tst_QScriptValue::isBoolean_test):
 
6695         (tst_QScriptValue::isNumber_makeData):
 
6696         (tst_QScriptValue::isNumber_test):
 
6697         (tst_QScriptValue::isFunction_test):
 
6698         (tst_QScriptValue::isNull_makeData):
 
6699         (tst_QScriptValue::isNull_test):
 
6700         (tst_QScriptValue::isString_makeData):
 
6701         (tst_QScriptValue::isString_test):
 
6702         (tst_QScriptValue::isUndefined_makeData):
 
6703         (tst_QScriptValue::isUndefined_test):
 
6704         (tst_QScriptValue::isObject_makeData):
 
6705         (tst_QScriptValue::isObject_test):
 
6706         (tst_QScriptValue::toString_makeData):
 
6707         (tst_QScriptValue::toString_test):
 
6708         (tst_QScriptValue::toNumber_makeData):
 
6709         (tst_QScriptValue::toNumber_test):
 
6710         (tst_QScriptValue::toBool_makeData):
 
6711         (tst_QScriptValue::toBool_test):
 
6712         (tst_QScriptValue::toBoolean_makeData):
 
6713         (tst_QScriptValue::toBoolean_test):
 
6714         (tst_QScriptValue::toInteger_makeData):
 
6715         (tst_QScriptValue::toInteger_test):
 
6716         (tst_QScriptValue::toInt32_makeData):
 
6717         (tst_QScriptValue::toInt32_test):
 
6718         (tst_QScriptValue::toUInt32_makeData):
 
6719         (tst_QScriptValue::toUInt32_test):
 
6720         (tst_QScriptValue::toUInt16_makeData):
 
6721         (tst_QScriptValue::toUInt16_test):
 
6723 2010-03-03  Chao-ying Fu  <fu@mips.com>
 
6725         Reviewed by Gavin Barraclough.
 
6728         https://bugs.webkit.org/show_bug.cgi?id=30144
 
6730         The following changes enable MIPS YARR and YARR_JIT.
 
6732         * assembler/AbstractMacroAssembler.h:
 
6733         (JSC::AbstractMacroAssembler::Imm32::Imm32):
 
6734         * assembler/MIPSAssembler.h: Added.
 
6735         (JSC::MIPSRegisters::):
 
6736         (JSC::MIPSAssembler::MIPSAssembler):
 
6737         (JSC::MIPSAssembler::):
 
6738         (JSC::MIPSAssembler::JmpSrc::JmpSrc):
 
6739         (JSC::MIPSAssembler::JmpDst::JmpDst):
 
6740         (JSC::MIPSAssembler::JmpDst::isUsed):
 
6741         (JSC::MIPSAssembler::JmpDst::used):
 
6742         (JSC::MIPSAssembler::emitInst):
 
6743         (JSC::MIPSAssembler::nop):
 
6744         (JSC::MIPSAssembler::loadDelayNop):
 
6745         (JSC::MIPSAssembler::copDelayNop):
 
6746         (JSC::MIPSAssembler::move):
 
6747         (JSC::MIPSAssembler::li):
 
6748         (JSC::MIPSAssembler::lui):
 
6749         (JSC::MIPSAssembler::addiu):
 
6750         (JSC::MIPSAssembler::addu):
 
6751         (JSC::MIPSAssembler::subu):
 
6752         (JSC::MIPSAssembler::mult):
 
6753         (JSC::MIPSAssembler::mfhi):
 
6754         (JSC::MIPSAssembler::mflo):
 
6755         (JSC::MIPSAssembler::mul):
 
6756         (JSC::MIPSAssembler::andInsn):
 
6757         (JSC::MIPSAssembler::andi):
 
6758         (JSC::MIPSAssembler::nor):
 
6759         (JSC::MIPSAssembler::orInsn):
 
6760         (JSC::MIPSAssembler::ori):
 
6761         (JSC::MIPSAssembler::xorInsn):
 
6762         (JSC::MIPSAssembler::xori):
 
6763         (JSC::MIPSAssembler::slt):
 
6764         (JSC::MIPSAssembler::sltu):
 
6765         (JSC::MIPSAssembler::sltiu):
 
6766         (JSC::MIPSAssembler::sll):
 
6767         (JSC::MIPSAssembler::sllv):
 
6768         (JSC::MIPSAssembler::sra):
 
6769         (JSC::MIPSAssembler::srav):
 
6770         (JSC::MIPSAssembler::lw):
 
6771         (JSC::MIPSAssembler::lwl):
 
6772         (JSC::MIPSAssembler::lwr):
 
6773         (JSC::MIPSAssembler::lhu):
 
6774         (JSC::MIPSAssembler::sw):
 
6775         (JSC::MIPSAssembler::jr):
 
6776         (JSC::MIPSAssembler::jalr):
 
6777         (JSC::MIPSAssembler::jal):
 
6778         (JSC::MIPSAssembler::bkpt):
 
6779         (JSC::MIPSAssembler::bgez):
 
6780         (JSC::MIPSAssembler::bltz):
 
6781         (JSC::MIPSAssembler::beq):
 
6782         (JSC::MIPSAssembler::bne):
 
6783         (JSC::MIPSAssembler::bc1t):
 
6784         (JSC::MIPSAssembler::bc1f):
 
6785         (JSC::MIPSAssembler::newJmpSrc):
 
6786         (JSC::MIPSAssembler::appendJump):
 
6787         (JSC::MIPSAssembler::addd):
 
6788         (JSC::MIPSAssembler::subd):
 
6789         (JSC::MIPSAssembler::muld):
 
6790         (JSC::MIPSAssembler::lwc1):
 
6791         (JSC::MIPSAssembler::ldc1):
 
6792         (JSC::MIPSAssembler::swc1):
 
6793         (JSC::MIPSAssembler::sdc1):
 
6794         (JSC::MIPSAssembler::mtc1):
 
6795         (JSC::MIPSAssembler::mfc1):
 
6796         (JSC::MIPSAssembler::truncwd):
 
6797         (JSC::MIPSAssembler::cvtdw):
 
6798         (JSC::MIPSAssembler::ceqd):
 
6799         (JSC::MIPSAssembler::cngtd):
 
6800         (JSC::MIPSAssembler::cnged):
 
6801         (JSC::MIPSAssembler::cltd):
 
6802         (JSC::MIPSAssembler::cled):
 
6803         (JSC::MIPSAssembler::cueqd):
 
6804         (JSC::MIPSAssembler::coled):
 
6805         (JSC::MIPSAssembler::coltd):
 
6806         (JSC::MIPSAssembler::culed):
 
6807         (JSC::MIPSAssembler::cultd):
 
6808         (JSC::MIPSAssembler::label):
 
6809         (JSC::MIPSAssembler::align):
 
6810         (JSC::MIPSAssembler::getRelocatedAddress):
 
6811         (JSC::MIPSAssembler::getDifferenceBetweenLabels):
 
6812         (JSC::MIPSAssembler::size):
 
6813         (JSC::MIPSAssembler::executableCopy):
 
6814         (JSC::MIPSAssembler::getCallReturnOffset):
 
6815         (JSC::MIPSAssembler::linkJump):
 
6816         (JSC::MIPSAssembler::linkCall):
 
6817         (JSC::MIPSAssembler::linkPointer):
 
6818         (JSC::MIPSAssembler::relinkJump):
 
6819         (JSC::MIPSAssembler::relinkCall):
 
6820         (JSC::MIPSAssembler::repatchInt32):
 
6821         (JSC::MIPSAssembler::repatchPointer):
 
6822         (JSC::MIPSAssembler::repatchLoadPtrToLEA):
 
6823         (JSC::MIPSAssembler::relocateJumps):
 
6824         (JSC::MIPSAssembler::linkWithOffset):
 
6825         (JSC::MIPSAssembler::linkCallInternal):
 
6826         * assembler/MacroAssembler.h:
 
6827         * assembler/MacroAssemblerMIPS.h: Added.
 
6828         (JSC::MacroAssemblerMIPS::MacroAssemblerMIPS):
 
6829         (JSC::MacroAssemblerMIPS::):
 
6830         (JSC::MacroAssemblerMIPS::add32):
 
6831         (JSC::MacroAssemblerMIPS::and32):
 
6832         (JSC::MacroAssemblerMIPS::lshift32):
 
6833         (JSC::MacroAssemblerMIPS::mul32):
 
6834         (JSC::MacroAssemblerMIPS::not32):
 
6835         (JSC::MacroAssemblerMIPS::or32):
 
6836         (JSC::MacroAssemblerMIPS::rshift32):
 
6837         (JSC::MacroAssemblerMIPS::sub32):
 
6838         (JSC::MacroAssemblerMIPS::xor32):
 
6839         (JSC::MacroAssemblerMIPS::load32):
 
6840         (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords):
 
6841         (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch):
 
6842         (JSC::MacroAssemblerMIPS::loadPtrWithPatchToLEA):
 
6843         (JSC::MacroAssemblerMIPS::loadPtrWithAddressOffsetPatch):
 
6844         (JSC::MacroAssemblerMIPS::load16):
 
6845         (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch):
 
6846         (JSC::MacroAssemblerMIPS::store32):
 
6847         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
 
6848         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
 
6849         (JSC::MacroAssemblerMIPS::pop):
 
6850         (JSC::MacroAssemblerMIPS::push):
 
6851         (JSC::MacroAssemblerMIPS::move):
 
6852         (JSC::MacroAssemblerMIPS::swap):
 
6853         (JSC::MacroAssemblerMIPS::signExtend32ToPtr):
 
6854         (JSC::MacroAssemblerMIPS::zeroExtend32ToPtr):
 
6855         (JSC::MacroAssemblerMIPS::branch32):
 
6856         (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
 
6857         (JSC::MacroAssemblerMIPS::branch16):
 
6858         (JSC::MacroAssemblerMIPS::branchTest32):
 
6859         (JSC::MacroAssemblerMIPS::jump):
 
6860         (JSC::MacroAssemblerMIPS::branchAdd32):
 
6861         (JSC::MacroAssemblerMIPS::branchMul32):
 
6862         (JSC::MacroAssemblerMIPS::branchSub32):
 
6863         (JSC::MacroAssemblerMIPS::breakpoint):
 
6864         (JSC::MacroAssemblerMIPS::nearCall):
 
6865         (JSC::MacroAssemblerMIPS::call):
 
6866         (JSC::MacroAssemblerMIPS::ret):
 
6867         (JSC::MacroAssemblerMIPS::set32):
 
6868         (JSC::MacroAssemblerMIPS::setTest32):
 
6869         (JSC::MacroAssemblerMIPS::moveWithPatch):
 
6870         (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
 
6871         (JSC::MacroAssemblerMIPS::storePtrWithPatch):
 
6872         (JSC::MacroAssemblerMIPS::tailRecursiveCall):
 
6873         (JSC::MacroAssemblerMIPS::makeTailRecursiveCall):
 
6874         (JSC::MacroAssemblerMIPS::loadDouble):
 
6875         (JSC::MacroAssemblerMIPS::storeDouble):
 
6876         (JSC::MacroAssemblerMIPS::addDouble):
 
6877         (JSC::MacroAssemblerMIPS::subDouble):
 
6878         (JSC::MacroAssemblerMIPS::mulDouble):
 
6879         (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
 
6880         (JSC::MacroAssemblerMIPS::insertRelaxationWords):
 
6881         (JSC::MacroAssemblerMIPS::branchTrue):
 
6882         (JSC::MacroAssemblerMIPS::branchFalse):
 
6883         (JSC::MacroAssemblerMIPS::branchEqual):
 
6884         (JSC::MacroAssemblerMIPS::branchNotEqual):
 
6885         (JSC::MacroAssemblerMIPS::branchDouble):
 
6886         (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
 
6887         (JSC::MacroAssemblerMIPS::linkCall):
 
6888         (JSC::MacroAssemblerMIPS::repatchCall):
 
6889         * jit/ExecutableAllocator.h:
 
6890         (JSC::ExecutableAllocator::cacheFlush):
 
6892         * yarr/RegexJIT.cpp:
 
6893         (JSC::Yarr::RegexGenerator::generateEnter):
 
6894         (JSC::Yarr::RegexGenerator::generateReturn):
 
6896 2010-03-03  Steve Falkenburg  <sfalken@apple.com>
 
6900         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
 
6901         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
6903 2010-03-03  Steve Falkenburg  <sfalken@apple.com>
 
6907         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
 
6909 2010-03-03  Mark Rowe  <mrowe@apple.com>
 
6911         Reviewed by Geoff Garen.
 
6913         Add virtual memory tags for TCMalloc and WebCore's purgeable buffers.
 
6915         * wtf/TCSystemAlloc.cpp:
 
6916         (TryMmap): Use the VM tag.
 
6917         * wtf/VMTags.h: Make use of VM_MEMORY_TCMALLOC and VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS.
 
6919 2010-03-03  Steve Falkenburg  <sfalken@apple.com>
 
6921         Rubber stamped by Adam Roben.
 
6923         Fix bogus xcopy that was polluting source tree at build time.
 
6925         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
6927 2010-03-02  Fridrich Strba  <fridrich.strba@bluewin.ch>
 
6929         Reviewed by Oliver Hunt.
 
6931         Allow building smoothly on win32 and win64 using GCC
 
6932         https://bugs.webkit.org/show_bug.cgi?id=35607
 
6935         * runtime/Collector.cpp:
 
6936         (JSC::Heap::allocateBlock):
 
6937         (JSC::Heap::freeBlockPtr):
 
6938         (JSC::currentThreadStackBase):
 
6940 2010-03-02  Jeremy Orlow  <jorlow@chromium.org>
 
6942         Reviewed by David Levin.
 
6944         Revert database thread changes that are no longer required
 
6945         https://bugs.webkit.org/show_bug.cgi?id=35519
 
6947         Jochen Eisinger created 55214 and 55247 to track which database
 
6948         owns which thread.  Dmitry suggested that this could also
 
6949         be done via TLS, though.  After exploring the options, Jochen
 
6950         chose to go the TLS route, so these patches are no longer needed.
 
6953         * wtf/ThreadingNone.cpp:
 
6954         (WTF::isMainThread):
 
6955         * wtf/ThreadingPthreads.cpp:
 
6956         (WTF::identifierByPthreadHandle):
 
6957         (WTF::establishIdentifierForPthreadHandle):
 
6958         (WTF::pthreadHandleForIdentifier):
 
6959         (WTF::createThreadInternal):
 
6960         (WTF::currentThread):
 
6961         * wtf/ThreadingWin.cpp:
 
6963         (WTF::storeThreadHandleByIdentifier):
 
6964         (WTF::threadHandleForIdentifier):
 
6965         (WTF::createThreadInternal):
 
6967 2010-03-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
6969         Reviewed by Simon Hausmann.
 
6971         Fix QScriptValue::toString().
 
6973         More ECMA Script compliance, especially for values as NaN, Inifinite
 
6974         and really big/small numbers.
 
6976         [Qt] QScriptValue::toString() returns incorrect values
 
6977         https://bugs.webkit.org/show_bug.cgi?id=34850
 
6979         * qt/api/qscriptconverter_p.h:
 
6980         (QScriptConverter::toString):
 
6981         * qt/api/qscriptvalue_p.h:
 
6982         (QScriptValuePrivate::toString):
 
6983         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
 
6984         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
6985         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
 
6986         (tst_QScriptValue::toString_initData):
 
6987         (tst_QScriptValue::toString_makeData):
 
6988         (tst_QScriptValue::toString_test):
 
6990 2010-03-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
6992         Reviewed by Simon Hausmann.
 
6994         Introduce a new class; QScriptString.
 
6996         The QScriptString class should act as a handle to "interned"
 
6997         strings in a QScriptEngine.
 
6999         [Qt] QtScript should provide QScriptString
 
7000         https://bugs.webkit.org/show_bug.cgi?id=34843
 
7002         * qt/api/QtScript.pro:
 
7003         * qt/api/qscriptengine.cpp:
 
7004         (QScriptEngine::toStringHandle):
 
7005         * qt/api/qscriptengine.h:
 
7006         * qt/api/qscriptengine_p.h:
 
7007         (QScriptEnginePrivate::toStringHandle):
 
7008         * qt/api/qscriptstring.cpp: Added.
 
7009         (QScriptString::QScriptString):
 
7010         (QScriptString::~QScriptString):
 
7011         (QScriptString::operator=):
 
7012         (QScriptString::isValid):
 
7013         (QScriptString::operator==):
 
7014         (QScriptString::operator!=):
 
7015         (QScriptString::toArrayIndex):
 
7016         (QScriptString::toString):
 
7017         (QScriptString::operator QString):
 
7019         * qt/api/qscriptstring.h: Added.
 
7020         * qt/api/qscriptstring_p.h: Added.
 
7021         (QScriptStringPrivate::QScriptStringPrivate):
 
7022         (QScriptStringPrivate::~QScriptStringPrivate):
 
7023         (QScriptStringPrivate::get):
 
7024         (QScriptStringPrivate::isValid):
 
7025         (QScriptStringPrivate::operator==):
 
7026         (QScriptStringPrivate::operator!=):
 
7027         (QScriptStringPrivate::toArrayIndex):
 
7028         (QScriptStringPrivate::toString):
 
7029         (QScriptStringPrivate::id):
 
7030         * qt/tests/qscriptstring/qscriptstring.pro: Added.
 
7031         * qt/tests/qscriptstring/tst_qscriptstring.cpp: Added.
 
7032         (tst_QScriptString::tst_QScriptString):
 
7033         (tst_QScriptString::~tst_QScriptString):
 
7034         (tst_QScriptString::test):
 
7035         (tst_QScriptString::hash):
 
7036         (tst_QScriptString::toArrayIndex_data):
 
7037         (tst_QScriptString::toArrayIndex):
 
7038         * qt/tests/tests.pro:
 
7040 2010-03-02  Oliver Hunt  <oliver@apple.com>
 
7042         Reviewed by NOBODY (Build fix).
 
7044         Export function on windows.
 
7046         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
7048 2010-03-01  Oliver Hunt  <oliver@apple.com>
 
7050         Reviewed by Maciej Stachowiak.
 
7052         Refactor named getter function signature to be in line with indexing getter signature
 
7053         https://bugs.webkit.org/show_bug.cgi?id=35563
 
7055         This removes the PropertySlot argument from getter functions, and makes them directly
 
7056         pass the slot base.  This makes the semantics for the functions match that of the
 
7059         On the down side, this means that we can no longer simply use a proxy function for
 
7060         JS getters, so we now add another marker value to indicate that a getter is present
 
7061         and branch accordingly.
 
7063         Against all rationality sunspider reports this as a perf win, but i suspect it's just noise.
 
7065         * API/JSCallbackObject.h:
 
7066         * API/JSCallbackObjectFunctions.h:
 
7067         (JSC::::staticValueGetter):
 
7068         (JSC::::staticFunctionGetter):
 
7069         (JSC::::callbackGetter):
 
7070         * JavaScriptCore.exp:
 
7071         * runtime/JSActivation.cpp:
 
7072         (JSC::JSActivation::argumentsGetter):
 
7073         * runtime/JSActivation.h:
 
7074         * runtime/JSFunction.cpp:
 
7075         (JSC::JSFunction::argumentsGetter):
 
7076         (JSC::JSFunction::callerGetter):
 
7077         (JSC::JSFunction::lengthGetter):
 
7078         * runtime/JSFunction.h:
 
7079         * runtime/NumberConstructor.cpp:
 
7080         (JSC::numberConstructorNaNValue):
 
7081         (JSC::numberConstructorNegInfinity):
 
7082         (JSC::numberConstructorPosInfinity):
 
7083         (JSC::numberConstructorMaxValue):
 
7084         (JSC::numberConstructorMinValue):
 
7085         * runtime/PropertySlot.cpp:
 
7086         (JSC::PropertySlot::functionGetter):
 
7087         * runtime/PropertySlot.h:
 
7088         (JSC::PropertySlot::getValue):
 
7089         (JSC::PropertySlot::setGetterSlot):
 
7090         (JSC::PropertySlot::setCacheableGetterSlot):
 
7091         * runtime/RegExpConstructor.cpp:
 
7092         (JSC::regExpConstructorDollar1):
 
7093         (JSC::regExpConstructorDollar2):
 
7094         (JSC::regExpConstructorDollar3):
 
7095         (JSC::regExpConstructorDollar4):
 
7096         (JSC::regExpConstructorDollar5):
 
7097         (JSC::regExpConstructorDollar6):
 
7098         (JSC::regExpConstructorDollar7):
 
7099         (JSC::regExpConstructorDollar8):
 
7100         (JSC::regExpConstructorDollar9):
 
7101         (JSC::regExpConstructorInput):
 
7102         (JSC::regExpConstructorMultiline):
 
7103         (JSC::regExpConstructorLastMatch):
 
7104         (JSC::regExpConstructorLastParen):
 
7105         (JSC::regExpConstructorLeftContext):
 
7106         (JSC::regExpConstructorRightContext):
 
7107         * runtime/RegExpObject.cpp:
 
7108         (JSC::regExpObjectGlobal):
 
7109         (JSC::regExpObjectIgnoreCase):
 
7110         (JSC::regExpObjectMultiline):
 
7111         (JSC::regExpObjectSource):
 
7112         (JSC::regExpObjectLastIndex):
 
7114 2010-03-01  Oliver Hunt  <oliver@apple.com>
 
7116         Reviewed by Gavin Barraclough.
 
7118         PropertySlot::getValue(ExecState, unsigned) unnecessarily converts index to an Identifier
 
7119         https://bugs.webkit.org/show_bug.cgi?id=35561
 
7121         Fix this by defining a separate property getter function for index getters.  This allows
 
7122         us to pass an unsigned number without the conversion to an Identifier.  We then update
 
7123         setCustomIndex to take this new getter type.
 
7125         * runtime/PropertySlot.h:
 
7126         (JSC::PropertySlot::getValue):
 
7127         (JSC::PropertySlot::setCustom):
 
7128         (JSC::PropertySlot::setCustomIndex):
 
7130 2010-03-01  Gavin Barraclough  <barraclough@apple.com>
 
7132         Reviewed by Oliver Hunt.
 
7134         Bug 35537 - put_by_id does will incorrectly cache writes where a specific value exists,
 
7135                     where at the point of caching the same value is being written.
 
7137         When performing a put_by_id that is replacing a property already present on the object,
 
7138         there are three interesting cases regarding the state of the specific value:
 
7140         (1) No specific value set - nothing to do, leave the structure in it's current state,
 
7142         (2) A specific value was set, the new put is not of a specified value (i.e. function),
 
7143             or is of a different specific value - in these cases we need to perform a despecifying
 
7144             transition to clear the specific value in the structure, but having done so this is a
 
7145             normal property so as such we can again cache normally.
 
7146         (3) A specific value was set, and we are overwriting with the same value - in these cases
 
7147             leave the structure unchanged, but since a specific value is set we cannot cache this
 
7148             put (we would need the JIT to dynamically check the value being written matched).
 
7150         Unfortunately, the current behaviour does not match this.  the checks for a specific value
 
7151         being present & the value matching are combined in such a way that in case (2), above we
 
7152         will unnecessarily prevent the transition being cached, but in case (3) we will incorrectly
 
7153         fail to prevent caching.
 
7155         The bug exposes itself if multiple puts of the same specific value are performed to a
 
7156         property, and erroneously the put is allowed to be cached by the JIT.  Method checks may be
 
7157         generated caching calls of this structure.  Subsequent puts performed from JIT code may
 
7158         write different values without triggering a despecify transition, and as such cached method
 
7159         checks will continue to pass, despite the value having changed.
 
7161         * runtime/JSObject.h:
 
7162         (JSC::JSObject::putDirectInternal):
 
7164 2010-03-01  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
7166         Reviewed by Simon Hausmann.
 
7168         Fix the Qt build on Mac OS X/Cocoa 64-bit
 
7170         * JavaScriptCore.pri: Add missing implementation file to resolve JSC symbols
 
7172 2010-02-26  Gavin Barraclough  <barraclough@apple.com>
 
7174         Rubber Stamped by Geoff Garen.
 
7176         Remove wrec.  All builds should have switched to yarr by now.
 
7180         * JavaScriptCore.gypi:
 
7181         * JavaScriptCore.pri:
 
7182         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
7183         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
7184         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
7185         * JavaScriptCore.xcodeproj/project.pbxproj:
 
7186         * runtime/RegExp.cpp:
 
7187         (JSC::RegExp::match):
 
7190         * wrec/CharacterClass.cpp: Removed.
 
7191         * wrec/CharacterClass.h: Removed.
 
7192         * wrec/CharacterClassConstructor.cpp: Removed.
 
7193         * wrec/CharacterClassConstructor.h: Removed.
 
7194         * wrec/Escapes.h: Removed.
 
7195         * wrec/Quantifier.h: Removed.
 
7196         * wrec/WREC.cpp: Removed.
 
7197         * wrec/WREC.h: Removed.
 
7198         * wrec/WRECFunctors.cpp: Removed.
 
7199         * wrec/WRECFunctors.h: Removed.
 
7200         * wrec/WRECGenerator.cpp: Removed.
 
7201         * wrec/WRECGenerator.h: Removed.
 
7202         * wrec/WRECParser.cpp: Removed.
 
7203         * wrec/WRECParser.h: Removed.
 
7206 2010-02-26  Oliver Hunt  <oliver@apple.com>
 
7208         Reviewed by Geoff Garen.
 
7210         Make the lookup table generator include an explicit cast to expected
 
7211         type of the function.  We do this because otherwise the blind intptr_t
 
7212         cast that is subsequently applied allows incorrectly typed functions
 
7213         to be inserted into the table, where they will only fail at runtime.
 
7214         This change makes such errors produce a compile time failure.
 
7216         * create_hash_table:
 
7218 2010-02-26  Janne Koskinen  <janne.p.koskinen@digia.com>
 
7220         Reviewed by Simon Hausmann.
 
7222         [Qt] Symbian specific getCPUTime implemetation
 
7223         https://bugs.webkit.org/show_bug.cgi?id=34742
 
7225         Default implementation doesn't work on Symbian devices.
 
7226         This change adds a proper implementation by
 
7227         asking thread execution time from the current thread.
 
7229         * runtime/TimeoutChecker.cpp:
 
7232 2010-02-25  Alexey Proskuryakov  <ap@apple.com>
 
7234         Reviewed by Anders Carlsson.
 
7236         https://bugs.webkit.org/show_bug.cgi?id=35406
 
7237         <rdar://problem/6945502> Make generic array methods work with JavaArray
 
7239         Renamed lazyCreationData to subclassData. This is extra data that can be used by JSArray
 
7240         subclasses (you can't add new data members, because it wouldn't fit in JSCell otherwise).
 
7242         * JavaScriptCore.exp:
 
7243         * runtime/JSArray.cpp:
 
7244         (JSC::JSArray::JSArray):
 
7245         (JSC::JSArray::subclassData):
 
7246         (JSC::JSArray::setSubclassData):
 
7247         * runtime/JSArray.h:
 
7248         * runtime/RegExpConstructor.cpp:
 
7249         (JSC::RegExpMatchesArray::RegExpMatchesArray):
 
7250         (JSC::RegExpMatchesArray::~RegExpMatchesArray):
 
7251         (JSC::RegExpMatchesArray::fillArrayInstance):
 
7252         * runtime/RegExpMatchesArray.h:
 
7253         (JSC::RegExpMatchesArray::getOwnPropertySlot):
 
7254         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
 
7255         (JSC::RegExpMatchesArray::put):
 
7256         (JSC::RegExpMatchesArray::deleteProperty):
 
7257         (JSC::RegExpMatchesArray::getOwnPropertyNames):
 
7259 2010-02-25  Oliver Hunt  <oliver@apple.com>
 
7261         Reviewed by Geoff Garen.
 
7263         JSC crashes like crazy in the JSPropertyNameIterator destructor
 
7265         Add back null check of m_cachedStructure.  Curse last minute changes.
 
7267         * runtime/JSPropertyNameIterator.cpp:
 
7268         (JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
 
7270 2010-02-25  Oliver Hunt  <oliver@apple.com>
 
7272         Reviewed by Maciej Stachowiak.
 
7274         Race condition in JSPropertyNameIterator and Structure destruction
 
7275         https://bugs.webkit.org/show_bug.cgi?id=35398
 
7277         JSPropertyNameIterator and Structure have a cyclic dependency that they
 
7278         manage by clearing the appropriate reference in each other during their
 
7279         destruction.  However if the Structure is destroyed while the 
 
7280         JSPropertyNameIterator is dead but not yet finalized the Structures
 
7281         WeakGCPtr will return null, and so prevent Structure from clearing
 
7282         the m_cachedStructure pointer of the iterator.  When the iterator is
 
7283         then finalised the m_cachedStructure is invalid, and the attempt to
 
7284         clear the structures back reference fails.
 
7286         To fix this we simply make JSPropertyNameIterator keep the Structure
 
7287         alive, using the weak pointer to break the ref cycle.
 
7289         * runtime/JSPropertyNameIterator.cpp:
 
7290         (JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
 
7291           The iterator now keeps m_cachedStructure alive itself, so no longer needs
 
7292           to check for it being cleared
 
7293         * runtime/JSPropertyNameIterator.h:
 
7294         (JSC::JSPropertyNameIterator::setCachedStructure):
 
7295           Add an assertion to ensure correct usage
 
7296         (JSC::JSPropertyNameIterator::cachedStructure):
 
7298         * runtime/Structure.cpp:
 
7299         (JSC::Structure::~Structure):
 
7300           Add an assertion that our iterator isn't already dead, and remove
 
7301           the now unnecessary attempt to clear the ref in the iterator
 
7302         * runtime/WeakGCPtr.h:
 
7303         (JSC::WeakGCPtr::hasDeadObject):
 
7304           An assert-only function to allow us to assert correct behaviour
 
7305           in the Structure destructor
 
7307 2010-02-25  Jochen Eisinger  <jochen@chromium.org>
 
7309         Reviewed by Jeremy Orlow.
 
7311         Make the context that was passed to the ThreadFunction accessible.
 
7312         https://bugs.webkit.org/show_bug.cgi?id=35379
 
7314         When a database is opened, right now you
 
7315         don't have any context from where it is opened. The problem is that
 
7316         the actual calls that open a database go through the sqlite3 vfs
 
7317         layer, so there's no easy way to pass this function down to to
 
7318         platform/sql/chromium/SQLFileSystemChromium*.cpp
 
7320         This patch will allow you to get from anywhere within webkit a pointer
 
7321         to the Thread object that actually created the thread you're currently
 
7322         on (in case of the database, this can be either a thread forked of
 
7323         from the main thread or from a worker thread), and query the object
 
7324         for context information.
 
7327         * wtf/ThreadingNone.cpp:
 
7328         (WTF::threadContext):
 
7329         * wtf/ThreadingPthreads.cpp:
 
7331         (WTF::identifierByPthreadHandle):
 
7332         (WTF::establishIdentifierForPthreadHandle):
 
7333         (WTF::pthreadHandleForIdentifier):
 
7334         (WTF::contextForIdentifier):
 
7335         (WTF::createThreadInternal):
 
7336         (WTF::currentThread):
 
7337         (WTF::threadContext):
 
7338         * wtf/ThreadingWin.cpp:
 
7341         (WTF::storeThreadHandleByIdentifier):
 
7342         (WTF::threadHandleForIdentifier):
 
7343         (WTF::contextForIdentifier):
 
7344         (WTF::createThreadInternal):
 
7345         (WTF::threadContext):
 
7347 2010-02-25  Jeremy Orlow  <jorlow@chromium.org>
 
7349         Reverting to re-submit with better change log.
 
7352         * wtf/ThreadingNone.cpp:
 
7353         (WTF::isMainThread):
 
7354         * wtf/ThreadingPthreads.cpp:
 
7355         (WTF::identifierByPthreadHandle):
 
7356         (WTF::establishIdentifierForPthreadHandle):
 
7357         (WTF::pthreadHandleForIdentifier):
 
7358         (WTF::createThreadInternal):
 
7359         (WTF::currentThread):
 
7360         * wtf/ThreadingWin.cpp:
 
7362         (WTF::storeThreadHandleByIdentifier):
 
7363         (WTF::threadHandleForIdentifier):
 
7364         (WTF::createThreadInternal):
 
7366 2010-02-25  Jochen Eisinger  <jochen@chromium.org>
 
7368         Reviewed by Jeremy Orlow.
 
7370         Make the context that was passed to the ThreadFunction accessible.
 
7371         https://bugs.webkit.org/show_bug.cgi?id=35379
 
7374         * wtf/ThreadingNone.cpp:
 
7375         (WTF::threadContext):
 
7376         * wtf/ThreadingPthreads.cpp:
 
7378         (WTF::identifierByPthreadHandle):
 
7379         (WTF::establishIdentifierForPthreadHandle):
 
7380         (WTF::pthreadHandleForIdentifier):
 
7381         (WTF::contextForIdentifier):
 
7382         (WTF::createThreadInternal):
 
7383         (WTF::currentThread):
 
7384         (WTF::threadContext):
 
7385         * wtf/ThreadingWin.cpp:
 
7388         (WTF::storeThreadHandleByIdentifier):
 
7389         (WTF::threadHandleForIdentifier):
 
7390         (WTF::contextForIdentifier):
 
7391         (WTF::createThreadInternal):
 
7392         (WTF::threadContext):
 
7394 2010-02-24  Oliver Hunt  <oliver@apple.com>
 
7396         Reviewed by Geoffrey Garen.
 
7398         [REGRESSION in r55185] EXC_BAD_ACCESS on opening inspector.
 
7399         https://bugs.webkit.org/show_bug.cgi?id=35335
 
7401         compileGetDirectOffset modifies the contents of the object register
 
7402         when the object is not using the inline storage array.  As the object
 
7403         register contains our 'this' pointer we can't allow it to be clobbered.
 
7404         The fix is simply to copy the register into a separate scratch register
 
7405         when we're loading off an object that doesn't use inline storage.
 
7407         * jit/JITPropertyAccess.cpp:
 
7408         (JSC::JIT::privateCompileGetByIdSelfList):
 
7409         * jit/JITPropertyAccess32_64.cpp:
 
7410         (JSC::JIT::privateCompileGetByIdSelfList):
 
7412 2010-02-24  Oliver Hunt  <oliver@apple.com>
 
7414         Reviewed by Gavin Barraclough.
 
7416         Speed up getter performance in the jit
 
7417         https://bugs.webkit.org/show_bug.cgi?id=35332
 
7419         Implement getter lookup caching in the interpreter.
 
7420         The getter stubs are generated through basically the
 
7421         same code paths as the normal get_by_id caching.
 
7422         Instead of simply loading a property and returning,
 
7423         we load the getter slot, and pass the getter, base value
 
7424         and return address to a shared stub used for getter
 
7428         (JSC::JIT::compileGetByIdProto):
 
7429         (JSC::JIT::compileGetByIdSelfList):
 
7430         (JSC::JIT::compileGetByIdProtoList):
 
7431         (JSC::JIT::compileGetByIdChainList):
 
7432         (JSC::JIT::compileGetByIdChain):
 
7433         * jit/JITPropertyAccess.cpp:
 
7434         (JSC::JIT::privateCompileGetByIdProto):
 
7435         (JSC::JIT::privateCompileGetByIdSelfList):
 
7436         (JSC::JIT::privateCompileGetByIdProtoList):
 
7437         (JSC::JIT::privateCompileGetByIdChainList):
 
7438         (JSC::JIT::privateCompileGetByIdChain):
 
7439         * jit/JITPropertyAccess32_64.cpp:
 
7440         (JSC::JIT::privateCompileGetByIdProto):
 
7441         (JSC::JIT::privateCompileGetByIdSelfList):
 
7442         (JSC::JIT::privateCompileGetByIdProtoList):
 
7443         (JSC::JIT::privateCompileGetByIdChainList):
 
7444         (JSC::JIT::privateCompileGetByIdChain):
 
7446         (JSC::JITThunks::tryCacheGetByID):
 
7447         (JSC::DEFINE_STUB_FUNCTION):
 
7450         * runtime/GetterSetter.h:
 
7452 2010-02-23  Oliver Hunt  <oliver@apple.com>
 
7454         Reviewed by Maciej Stachowiak.
 
7456         Web Inspector: Regression: r55027+: Inspector broken
 
7457         https://bugs.webkit.org/show_bug.cgi?id=35253
 
7459         op_get_by_id_getter_chain was not passing the correct this parameter.
 
7460         The bug was caused by incorrect use of baseCell instead of baseValue,
 
7461         baseValue contains the original object for the lookup (and hence the
 
7462         correct this object), baseCell is clobbered as part of walking the
 
7465         * interpreter/Interpreter.cpp:
 
7466         (JSC::Interpreter::privateExecute):
 
7468 2010-02-23  Gustavo Noronha Silva  <gns@gnome.org>
 
7470         Rubber-stamped by Dimitri Glazkov.
 
7474         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
7476 2010-02-23  Leandro Pereira  <leandro@profusion.mobi>
 
7478         Reviewed by Gustavo Noronha Silva.
 
7480         Changes references of GOwnPtr to reflect their new place.
 
7481         http://webkit.org/b/35084
 
7483         * JavaScriptCore/JavaScriptCore.gypi:
 
7484         * JavaScriptCore/wtf/Threading.h:
 
7485         * JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h:
 
7487 2010-02-23  Leandro Pereira  <leandro@profusion.mobi>
 
7489         Reviewed by Kenneth Rohde Christiansen.
 
7491         Adding the EFL implementation of JavaScriptCore.
 
7492         See https://bugs.webkit.org/show_bug.cgi?id=35084 for details.
 
7494         * GNUmakefile.am: Updated to reflect the new location of GOwnPtr and
 
7496         * wtf/efl/MainThreadEfl.cpp: Added.
 
7497         * wtf/gobject/GOwnPtr.cpp: Moved from wtf/gtk.
 
7498         * wtf/gobject/GOwnPtr.h: Moved from wtf/gtk.
 
7499         * wtf/gobject/GRefPtr.cpp: Moved from wtf/gtk.
 
7500         * wtf/gobject/GRefPtr.h: Moved from wtf/gtk.
 
7502 2010-02-22  Julien Chaffraix  <jchaffraix@webkit.org>
 
7504         Reviewed by Darin Adler.
 
7506         Remove auto_ptr usage in JavaScriptCore.
 
7507         https://bugs.webkit.org/show_bug.cgi?id=35221
 
7509         * parser/Nodes.h: Removed now unneeded adopt method.
 
7510         * parser/Parser.cpp: Removed <memory> include as it is not required anymore.
 
7511         * wtf/OwnPtr.h: Removed the constructor from auto_ptr.
 
7512         * wtf/VectorTraits.h: Removed a template specialization for auto_ptr.
 
7513         * wtf/unicode/Collator.h: Made userDefault return a PassOwnPtr.
 
7514         * wtf/unicode/CollatorDefault.cpp:
 
7515         (WTF::Collator::userDefault): Changed the method to match the next signature.
 
7516         * wtf/unicode/icu/CollatorICU.cpp:
 
7517         (WTF::Collator::userDefault): Ditto.
 
7519 2010-02-22  Huahui Wu  <hwu@google.com>
 
7521         Reviewed by Eric Seidel.
 
7523         Add code that enables SquirrelFish Extreme (a.k.a JSCX, JSC JIT)
 
7524         in Android. It's disabled by default, but is enabled when the 
 
7525         enveronment variable ENABLE_JSC_JIT is set to true.
 
7526         https://bugs.webkit.org/show_bug.cgi?id=34855
 
7531 2010-02-22  Gavin Barraclough  <barraclough@apple.com>
 
7533         Reviewed by Oliver Hunt.
 
7535         JSStringBuilder should not CRASH if allocation fails, it should throw a JSException.
 
7537         * runtime/JSGlobalObjectFunctions.cpp:
 
7538         * runtime/JSStringBuilder.h:
 
7539         (JSC::JSStringBuilder::JSStringBuilder):
 
7540         (JSC::JSStringBuilder::append):
 
7541         (JSC::JSStringBuilder::build):
 
7542         * runtime/StringBuilder.h:
 
7543         (JSC::StringBuilder::build):
 
7545         (WTF::VectorBufferBase::tryAllocateBuffer):
 
7547         (WTF::VectorBuffer::tryAllocateBuffer):
 
7548         (WTF::::tryExpandCapacity):
 
7549         (WTF::::tryReserveCapacity):
 
7552 2010-02-22  Kwang Yul Seo  <skyul@company100.net>
 
7554         Reviewed by Eric Seidel.
 
7556         [BREWMP] Map FastMalloc to BREW memory allocator
 
7557         https://bugs.webkit.org/show_bug.cgi?id=33570
 
7559         Use MALLOC macro instead of the standard malloc function.
 
7560         Although RVCT provides malloc, we can't use it in BREW
 
7561         because the loader does not initialize the base address properly.
 
7563         * wtf/FastMalloc.cpp:
 
7564         * wtf/brew/SystemMallocBrew.h: Added.
 
7570 2010-02-22  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
7572         Build fix for make distcheck.
 
7576 2010-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
7578         Unreviewed build fix.
 
7580         [Qt] Build fix for RVCT.
 
7582         Fix after r55024. The "-i" option is for perl not for the
 
7585         * DerivedSources.pro:
 
7587 2010-02-21  Gavin Barraclough  <barraclough@apple.com>
 
7589         Reviewed by Oliver Hunt.
 
7591         Make UString::m_data be const, and make the UChar owned/ref-counted by CrossThreadRefCounted be const too.
 
7593         * runtime/UStringImpl.cpp:
 
7594         (JSC::UStringImpl::baseSharedBuffer):
 
7595         (JSC::UStringImpl::~UStringImpl):
 
7596         * runtime/UStringImpl.h:
 
7597         (JSC::UStringImpl::create):
 
7598         (JSC::UStringImpl::data):
 
7599         (JSC::UStringImpl::UStringImpl):
 
7600         * wtf/OwnFastMallocPtr.h:
 
7601         (WTF::OwnFastMallocPtr::~OwnFastMallocPtr):
 
7603 2010-02-21  Yuta Kitamura  <yutak@chromium.org>
 
7605         Reviewed by Darin Adler.
 
7607         HashMapTranslatorAdapter::translate() needs to set the mapped value.
 
7609         HTTPHeaderMap::add(const char*, const String&) does not work
 
7610         https://bugs.webkit.org/show_bug.cgi?id=35227
 
7613         (WTF::HashMapTranslatorAdapter::translate):
 
7615 2010-02-19  Maciej Stachowiak  <mjs@apple.com>
 
7617         Reviewed by David Levin.
 
7619         Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases
 
7620         https://bugs.webkit.org/show_bug.cgi?id=35147
 
7622         * Configurations/FeatureDefines.xcconfig:
 
7624 2010-02-19  Gavin Barraclough  <barraclough@apple.com>
 
7626         Reviewed by Oliver Hunt.
 
7628         JSString::getIndex() calls value() to resolve the string value (is a rope)
 
7629         to a UString, then passes the result to jsSingleCharacterSubstring without
 
7630         checking for an exception.  In case of out-of-memory the returned UString
 
7631         is null(), which may result in an out-of-buounds substring being created.
 
7634         Simple fix is to be able to get an index from a rope without resolving to
 
7635         UString.  This may be a useful optimization in some test cases.
 
7637         The same bug exists in some other methods is JSString, these can be fixed
 
7638         by changing them to call getIndex().
 
7640         * runtime/JSString.cpp:
 
7641         (JSC::JSString::resolveRope):
 
7642         (JSC::JSString::getStringPropertyDescriptor):
 
7643         * runtime/JSString.h:
 
7644         (JSC::jsSingleCharacterSubstring):
 
7645         (JSC::JSString::getIndex):
 
7646         (JSC::jsSingleCharacterString):
 
7647         (JSC::JSString::getStringPropertySlot):
 
7648         * runtime/UStringImpl.cpp:
 
7649         (JSC::singleCharacterSubstring):
 
7650         * runtime/UStringImpl.h:
 
7651         (JSC::UStringImpl::singleCharacterSubstring):
 
7653 2010-02-19  Oliver Hunt  <oliver@apple.com>
 
7655         RS = Gavin Barraclough.
 
7657         Split the 32/64 version of JITPropertyAccess into a separate file.
 
7660         * JavaScriptCore.gypi:
 
7661         * JavaScriptCore.pri:
 
7662         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
7663         * JavaScriptCore.xcodeproj/project.pbxproj:
 
7664         * jit/JITPropertyAccess.cpp:
 
7665         * jit/JITPropertyAccess32_64.cpp: Added.
 
7666         (JSC::JIT::emit_op_put_by_index):
 
7667         (JSC::JIT::emit_op_put_getter):
 
7668         (JSC::JIT::emit_op_put_setter):
 
7669         (JSC::JIT::emit_op_del_by_id):
 
7670         (JSC::JIT::emit_op_method_check):
 
7671         (JSC::JIT::emitSlow_op_method_check):
 
7672         (JSC::JIT::emit_op_get_by_val):
 
7673         (JSC::JIT::emitSlow_op_get_by_val):
 
7674         (JSC::JIT::emit_op_put_by_val):
 
7675         (JSC::JIT::emitSlow_op_put_by_val):
 
7676         (JSC::JIT::emit_op_get_by_id):
 
7677         (JSC::JIT::emitSlow_op_get_by_id):
 
7678         (JSC::JIT::emit_op_put_by_id):
 
7679         (JSC::JIT::emitSlow_op_put_by_id):
 
7680         (JSC::JIT::compileGetByIdHotPath):
 
7681         (JSC::JIT::compileGetByIdSlowCase):
 
7682         (JSC::JIT::compilePutDirectOffset):
 
7683         (JSC::JIT::compileGetDirectOffset):
 
7684         (JSC::JIT::testPrototype):
 
7685         (JSC::JIT::privateCompilePutByIdTransition):
 
7686         (JSC::JIT::patchGetByIdSelf):
 
7687         (JSC::JIT::patchMethodCallProto):
 
7688         (JSC::JIT::patchPutByIdReplace):
 
7689         (JSC::JIT::privateCompilePatchGetArrayLength):
 
7690         (JSC::JIT::privateCompileGetByIdProto):
 
7691         (JSC::JIT::privateCompileGetByIdSelfList):
 
7692         (JSC::JIT::privateCompileGetByIdProtoList):
 
7693         (JSC::JIT::privateCompileGetByIdChainList):
 
7694         (JSC::JIT::privateCompileGetByIdChain):
 
7695         (JSC::JIT::emit_op_get_by_pname):
 
7696         (JSC::JIT::emitSlow_op_get_by_pname):
 
7698 2010-02-19  Patrick Gansterer  <paroga@paroga.com>
 
7700         Reviewed by Laszlo Gombos.
 
7702         Added additional parameter to create_rvct_stubs 
 
7703         for setting the regularexpression prefix.
 
7704         Renamed it because it now works for other platforms too.
 
7705         https://bugs.webkit.org/show_bug.cgi?id=34951
 
7707         * DerivedSources.pro:
 
7708         * create_jit_stubs: Copied from JavaScriptCore/create_rvct_stubs.
 
7709         * create_rvct_stubs: Removed.
 
7711 2010-02-18  Oliver Hunt  <oliver@apple.com>
 
7713         Reviewed by Gavin Barraclough.
 
7715         Improve interpreter getter performance
 
7716         https://bugs.webkit.org/show_bug.cgi?id=35138
 
7718         Improve the performance of getter dispatch by making it possible
 
7719         for the interpreter to cache the GetterSetter object lookup.
 
7721         To do this we simply need to make PropertySlot aware of getters
 
7722         as a potentially cacheable property, and record the base and this
 
7723         objects for a getter access.  This allows us to use more-or-less
 
7724         identical code to that used by the normal get_by_id caching, with
 
7725         the dispatch being the only actual difference.
 
7727         I'm holding off of implementing this in the JIT until I do some
 
7728         cleanup to try and making coding in the JIT not be as horrible
 
7731         * bytecode/CodeBlock.cpp:
 
7732         (JSC::CodeBlock::dump):
 
7733         (JSC::CodeBlock::derefStructures):
 
7734         (JSC::CodeBlock::refStructures):
 
7735         * bytecode/Opcode.h:
 
7736         * interpreter/Interpreter.cpp:
 
7737         (JSC::Interpreter::resolveGlobal):
 
7738         (JSC::Interpreter::tryCacheGetByID):
 
7739         (JSC::Interpreter::privateExecute):
 
7741         (JSC::JIT::privateCompileMainPass):
 
7743         (JSC::JITThunks::tryCacheGetByID):
 
7744         (JSC::DEFINE_STUB_FUNCTION):
 
7745         * runtime/JSObject.cpp:
 
7746         (JSC::JSObject::fillGetterPropertySlot):
 
7747         * runtime/PropertySlot.cpp:
 
7748         (JSC::PropertySlot::functionGetter):
 
7749         * runtime/PropertySlot.h:
 
7750         (JSC::PropertySlot::isGetter):
 
7751         (JSC::PropertySlot::isCacheable):
 
7752         (JSC::PropertySlot::isCacheableValue):
 
7753         (JSC::PropertySlot::setValueSlot):
 
7754         (JSC::PropertySlot::setGetterSlot):
 
7755         (JSC::PropertySlot::setCacheableGetterSlot):
 
7756         (JSC::PropertySlot::clearOffset):
 
7757         (JSC::PropertySlot::thisValue):
 
7759 2010-02-17  Geoffrey Garen  <ggaren@apple.com>
 
7761         Reviewed by Oliver Hunt.
 
7764         <rdar://problem/7165917> | https://bugs.webkit.org/show_bug.cgi?id=28676
 
7765         Safari 4 does not release memory back to the operating system fast enough (28676)
 
7767         This patch fixes a surprisingly common edge case in which the page heap
 
7768         would have only one free span, but that span would be larger than the
 
7769         minimum free size, so we would decide not to free it, even though it
 
7770         could be as large as 100MB or more!
 
7772         SunSpider reports no change on Mac or Windows.
 
7774         * wtf/FastMalloc.cpp:
 
7775         (WTF::TCMalloc_PageHeap::scavenge): Call shouldContinueScavenging() instead
 
7776         of doing the math ourselves. Don't keep a local value for pagesDecommitted
 
7777         because that lets free_committed_pages_ be wrong temporarily. Instead,
 
7778         update free_committed_pages_ as we go. ASSERT that we aren't releasing
 
7779         a span that has already been released, because we think this is impossible.
 
7780         Finally, don't be afraid to release all free memory in the page heap when
 
7781         scavenging. We only scavenge after 5 seconds of the application's working
 
7782         set not growing, and we keep both thread caches and a central cache on
 
7783         top of the page heap, so the extra free pages in the page heap were just
 
7786 2010-02-17  Gavin Barraclough  <barraclough@apple.com>
 
7788         Reviewed by Oliver Hunt.
 
7790         https://bugs.webkit.org/show_bug.cgi?id=35070
 
7791         Addition of 2 strings of length 2^31 may result in a string of length 0.
 
7793         Check for overflow when creating a new JSString as a result of an addition
 
7794         or concatenation, throw an out of memory exception.
 
7796         * runtime/JSString.h:
 
7798         * runtime/Operations.h:
 
7801 2010-02-17  Xan Lopez  <xlopez@igalia.com>
 
7803         Reviewed by Gustavo Noronha.
 
7805         [Linux] Webkit incompatible with Java plugins
 
7806         https://bugs.webkit.org/show_bug.cgi?id=24912
 
7808         Add support for GFile to GOwnPtr.
 
7810         Based on original work by Gustavo Noronha.
 
7812         * wtf/gtk/GOwnPtr.cpp:
 
7814         * wtf/gtk/GOwnPtr.h:
 
7816 2010-02-16  Gavin Barraclough  <barraclough@apple.com>
 
7818         Reviewed by Mark Rowe.
 
7820         Fix a handful of other leaks seen on the buildbot.
 
7822         * runtime/UStringImpl.h:
 
7823         (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that
 
7824         the correct cleanup takes place.  This function previously featured some code that attempted to
 
7825         skip deletion of static UStringImpl's.  Closer inspection revealed that it was in fact equivalent
 
7826         to "if (false)", meaning that UStringImpl's which had their final deref performed via this function
 
7829 2010-02-16  Mark Rowe  <mrowe@apple.com>
 
7831         Reviewed by Gavin Barraclough.
 
7833         Fix a handful of leaks seen on the buildbot.
 
7835         * runtime/UStringImpl.h:
 
7836         (JSC::UStringOrRopeImpl::deref): Call URopeImpl::destructNonRecursive rather than delete
 
7837         to ensure that the rope's fibers are also destroyed.
 
7839 2010-02-16  Gavin Barraclough  <barraclough@apple.com>
 
7841         Reviewed by Oliver Hunt.
 
7843         https://bugs.webkit.org/show_bug.cgi?id=34964
 
7844         Leaks tool reports false memory leaks due to Rope implementation.
 
7846         A rope is a recursive data structure where each node in the rope holds a set of
 
7847         pointers, each of which may reference either a string (in UStringImpl form) or
 
7848         another rope node.  A low bit in each pointer is used to distinguish between
 
7849         rope & string elements, in a fashion similar to the recently-removed
 
7850         PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ).  Again,
 
7851         this causes a problem for Leaks - refactor to remove the magic pointer
 
7854         Move Rope out from JSString.h and rename to URopeImpl, to match UStringImpl.
 
7855         Give UStringImpl and URopeImpl a common parent class, UStringOrRopeImpl.
 
7856         Repurpose an otherwise invalid permutation to flags (static & should report
 
7857         memory cost) to identify ropes.
 
7859         This allows us to change the rope's fibers to interrogate the object rather
 
7860         than storing a bool within the low bits of the pointer (or in some cases the
 
7861         use of a common parent class removes the need to determine the type at all -
 
7862         there is a common interface to ref or get the length of either ropes or strings).
 
7864         * API/JSClassRef.cpp:
 
7865         (OpaqueJSClass::OpaqueJSClass):
 
7866         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
7867         * bytecompiler/BytecodeGenerator.cpp:
 
7868         (JSC::keyForCharacterSwitch):
 
7869         * interpreter/Interpreter.cpp:
 
7870         (JSC::Interpreter::privateExecute):
 
7872         (JSC::DEFINE_STUB_FUNCTION):
 
7873         * runtime/ArrayPrototype.cpp:
 
7874         (JSC::arrayProtoFuncToString):
 
7875         * runtime/Identifier.cpp:
 
7876         (JSC::Identifier::equal):
 
7877         (JSC::Identifier::addSlowCase):
 
7878         * runtime/JSString.cpp:
 
7879         (JSC::JSString::resolveRope):
 
7880         * runtime/JSString.h:
 
7882         (JSC::RopeBuilder::JSString):
 
7883         (JSC::RopeBuilder::~JSString):
 
7884         (JSC::RopeBuilder::appendStringInConstruct):
 
7885         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
 
7886         (JSC::RopeBuilder::JSStringFinalizerStruct::JSStringFinalizerStruct):
 
7887         (JSC::RopeBuilder::JSStringFinalizerStruct::):
 
7888         * runtime/UString.cpp:
 
7889         (JSC::UString::toStrictUInt32):
 
7891         * runtime/UString.h:
 
7892         (JSC::UString::isEmpty):
 
7893         (JSC::UString::size):
 
7894         * runtime/UStringImpl.cpp:
 
7895         (JSC::URopeImpl::derefFibersNonRecursive):
 
7896         (JSC::URopeImpl::destructNonRecursive):
 
7897         * runtime/UStringImpl.h:
 
7898         (JSC::UStringOrRopeImpl::isRope):
 
7899         (JSC::UStringOrRopeImpl::length):
 
7900         (JSC::UStringOrRopeImpl::ref):
 
7901         (JSC::UStringOrRopeImpl::):
 
7902         (JSC::UStringOrRopeImpl::operator new):
 
7903         (JSC::UStringOrRopeImpl::UStringOrRopeImpl):
 
7904         (JSC::UStringImpl::adopt):
 
7905         (JSC::UStringImpl::createUninitialized):
 
7906         (JSC::UStringImpl::tryCreateUninitialized):
 
7907         (JSC::UStringImpl::data):
 
7908         (JSC::UStringImpl::cost):
 
7909         (JSC::UStringImpl::deref):
 
7910         (JSC::UStringImpl::UStringImpl):
 
7911         (JSC::UStringImpl::):
 
7912         (JSC::URopeImpl::tryCreateUninitialized):
 
7913         (JSC::URopeImpl::initializeFiber):
 
7914         (JSC::URopeImpl::fiberCount):
 
7915         (JSC::URopeImpl::fibers):
 
7916         (JSC::URopeImpl::deref):
 
7917         (JSC::URopeImpl::URopeImpl):
 
7918         (JSC::URopeImpl::hasOneRef):
 
7919         (JSC::UStringOrRopeImpl::deref):
 
7921 2010-02-15  Gabor Loki  <loki@webkit.org>
 
7923         Reviewed by Gavin Barraclough.
 
7925         Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32)
 
7926         https://bugs.webkit.org/show_bug.cgi?id=34939
 
7930 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
7932         Reviewed by NOBODY (Build Fix!).
 
7934         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
7936 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
7938         Reviewed by Oliver Hunt.
 
7940         Some general Rope related refactoring.
 
7942         Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive.
 
7943         Rename Rope::m_stringLength to simply m_length (since this is the
 
7944         more conventional name for the length of a string).  Move append
 
7945         behaviour out into a new RopeBuilder class, so that Rope no longer
 
7946         needs any knowledge of the JSString or UString implementation.
 
7948         Make Rope no longer be nested within JSString.
 
7949         (Rope now no-longer need reside within JSString.h, but leaving
 
7950         the change of moving this out to a different header as a separate
 
7951         change from these renames).
 
7953         * JavaScriptCore.exp:
 
7954         * jit/JITOpcodes.cpp:
 
7955         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
7956         * runtime/JSString.cpp:
 
7957         (JSC::Rope::destructNonRecursive):
 
7959         (JSC::JSString::resolveRope):
 
7960         (JSC::JSString::toBoolean):
 
7961         (JSC::JSString::getStringPropertyDescriptor):
 
7962         * runtime/JSString.h:
 
7963         (JSC::Rope::Fiber::Fiber):
 
7964         (JSC::Rope::Fiber::deref):
 
7965         (JSC::Rope::Fiber::ref):
 
7966         (JSC::Rope::Fiber::refAndGetLength):
 
7967         (JSC::Rope::Fiber::isRope):
 
7968         (JSC::Rope::Fiber::rope):
 
7969         (JSC::Rope::Fiber::isString):
 
7970         (JSC::Rope::Fiber::string):
 
7971         (JSC::Rope::Fiber::nonFiber):
 
7972         (JSC::Rope::tryCreateUninitialized):
 
7973         (JSC::Rope::append):
 
7974         (JSC::Rope::fiberCount):
 
7975         (JSC::Rope::length):
 
7976         (JSC::Rope::fibers):
 
7978         (JSC::Rope::operator new):
 
7980         (JSC::RopeBuilder::JSString):
 
7981         (JSC::RopeBuilder::~JSString):
 
7982         (JSC::RopeBuilder::length):
 
7983         (JSC::RopeBuilder::canGetIndex):
 
7984         (JSC::RopeBuilder::appendStringInConstruct):
 
7985         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
 
7986         (JSC::RopeBuilder::isRope):
 
7987         (JSC::RopeBuilder::fiberCount):
 
7988         (JSC::JSString::getStringPropertySlot):
 
7989         * runtime/Operations.h:
 
7992 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
7994         Reviewed by NOBODY (Build fix).
 
7996         Add missing cast for !YARR (PPC) builds.
 
7998         * runtime/RegExp.cpp:
 
7999         (JSC::RegExp::match):
 
8001 2010-02-14  Gavin Barraclough  <barraclough@apple.com>
 
8003         Reviewed by Darin Adler.
 
8005         https://bugs.webkit.org/show_bug.cgi?id=33731
 
8006         Many false leaks in release builds due to PtrAndFlags
 
8008         StructureTransitionTable was effectively a smart pointer type,
 
8009         one machine word in size and wholly contained as a member of
 
8010         of Structure.  It either pointed to an actual table, or could
 
8011         be used to describe a single transtion entry without use of a
 
8014         This, however, worked by using a PtrAndFlags, which is not
 
8015         compatible with the leaks tool.  Since there is no clear way to
 
8016         obtain another bit for 'free' here, and since there are bits
 
8017         available up in Structure, merge this functionality back up into
 
8018         Structure.  Having this in a separate class was quite clean
 
8019         from an enacapsulation perspective, but this solution doesn't
 
8020         seem to bad - all table access is now intermediated through the
 
8021         Structure::structureTransitionTableFoo methods, keeping the
 
8022         optimization fairly well contained.
 
8024         This was the last use of PtrAndFlags, so removing the file too.
 
8026         * JavaScriptCore.xcodeproj/project.pbxproj:
 
8027         * bytecode/CodeBlock.h:
 
8028         * runtime/Structure.cpp:
 
8029         (JSC::Structure::Structure):
 
8030         (JSC::Structure::~Structure):
 
8031         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
8032         (JSC::Structure::addPropertyTransition):
 
8033         (JSC::Structure::hasTransition):
 
8034         * runtime/Structure.h:
 
8036         (JSC::Structure::structureTransitionTableContains):
 
8037         (JSC::Structure::structureTransitionTableGet):
 
8038         (JSC::Structure::structureTransitionTableHasTransition):
 
8039         (JSC::Structure::structureTransitionTableRemove):
 
8040         (JSC::Structure::structureTransitionTableAdd):
 
8041         (JSC::Structure::structureTransitionTable):
 
8042         (JSC::Structure::setStructureTransitionTable):
 
8043         (JSC::Structure::singleTransition):
 
8044         (JSC::Structure::setSingleTransition):
 
8045         * runtime/StructureTransitionTable.h:
 
8046         * wtf/PtrAndFlags.h: Removed.
 
8048 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
8050         Rubber Stamped by Geoff Garen.
 
8052         Bug 34948 - tryMakeString should fail on error in length calculation
 
8054         Ooops! - "bool overflow" argument should have been "bool& overflow".
 
8056         * runtime/UString.h:
 
8057         (JSC::sumWithOverflow):
 
8058         (JSC::tryMakeString):
 
8060 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
8062         Reviewed by NOBODY (Build Fix (pt 2!)).
 
8064         Some symbol names have changed, remove, will readd if required.
 
8066         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
8068 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
8070         Reviewed by NOBODY (Build Fix (pt 1?)).
 
8072         Some symbol names have changed, remove, will readd if required.
 
8074         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
8076 2010-02-15  Geoffrey Garen  <ggaren@apple.com>
 
8078         Reviewed by Oliver Hunt.
 
8080         Removed some mistaken code added in http://trac.webkit.org/changeset/53860.
 
8083         (JSC::APICallbackShim::APICallbackShim):
 
8084         (JSC::APICallbackShim::~APICallbackShim): No need to start/stop the
 
8085         timeout checker when calling out from the API to the client; we want to
 
8086         monitor the VM for timeouts, not the client. This mistake was harmless /
 
8087         undetectable, since it's totally redundant with the APIEntryShim, which
 
8088         also starts / stops the timeout checker.
 
8090 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
8092         Reviewed by Geoff Garen.
 
8094         Bug 34952 - String lengths in UString should be unsigned.
 
8095         This matches WebCore::StringImpl, and better unifies behaviour throughout JSC.
 
8097         * JavaScriptCore.exp:
 
8098         * bytecode/EvalCodeCache.h:
 
8099         * runtime/Identifier.cpp:
 
8100         (JSC::Identifier::equal):
 
8101         * runtime/Identifier.h:
 
8102         * runtime/JSGlobalObjectFunctions.cpp:
 
8103         (JSC::globalFuncEscape):
 
8104         * runtime/JSONObject.cpp:
 
8106         (JSC::Stringifier::indent):
 
8107         * runtime/NumberPrototype.cpp:
 
8108         (JSC::numberProtoFuncToFixed):
 
8109         (JSC::numberProtoFuncToPrecision):
 
8110         * runtime/RegExp.cpp:
 
8111         (JSC::RegExp::match):
 
8112         * runtime/StringPrototype.cpp:
 
8113         (JSC::substituteBackreferencesSlow):
 
8114         (JSC::stringProtoFuncReplace):
 
8115         (JSC::stringProtoFuncSplit):
 
8117         * runtime/UString.cpp:
 
8118         (JSC::UString::UString):
 
8119         (JSC::UString::from):
 
8120         (JSC::UString::getCString):
 
8121         (JSC::UString::ascii):
 
8122         (JSC::UString::operator[]):
 
8123         (JSC::UString::toStrictUInt32):
 
8124         (JSC::UString::find):
 
8125         (JSC::UString::rfind):
 
8126         (JSC::UString::substr):
 
8131         (JSC::UString::UTF8String):
 
8132         * runtime/UString.h:
 
8133         (JSC::UString::size):
 
8135         * runtime/UStringImpl.cpp:
 
8136         (JSC::UStringImpl::create):
 
8137         * runtime/UStringImpl.h:
 
8138         (JSC::UStringImpl::create):
 
8139         (JSC::UStringImpl::size):
 
8140         (JSC::UStringImpl::computeHash):
 
8141         (JSC::UStringImpl::UStringImpl):
 
8143 2010-02-15  Gavin Barraclough  <barraclough@apple.com>
 
8145         Reviewed by Geoff Garen.
 
8147         Bug 34948 - tryMakeString should fail on error in length calculation
 
8149         The sum of the length of substrings could overflow.
 
8151         * runtime/UString.h:
 
8152         (JSC::sumWithOverflow):
 
8153         (JSC::tryMakeString):
 
8155 2010-02-15  Geoffrey Garen  <ggaren@apple.com>
 
8157         Reviewed by Oliver Hunt.
 
8159         Fixed <rdar://problem/7628524> Crash beneath JSGlobalContextRelease when
 
8160         typing in Google search field with GuardMalloc/full page heap enabled
 
8162         * API/JSContextRef.cpp: Don't use APIEntryShim, since that requires
 
8163         a JSGlobalData, which this function destroys. Do use setCurrentIdentifierTable
 
8164         and JSLock instead, since those are the two features of APIEntryShim we
 
8167 2010-02-15  Patrick Gansterer  <paroga@paroga.com>
 
8169         Reviewed by Laszlo Gombos.
 
8171         Added additional parameter to create_rvct_stubs 
 
8172         for setting the offset of thunkReturnAddress.
 
8173         https://bugs.webkit.org/show_bug.cgi?id=34657
 
8175         * create_rvct_stubs:
 
8178 2010-02-15  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
8180         Reviewed by Simon Hausmann.
 
8182         Fix QScriptValue::toIntXX methods.
 
8184         More ECMA Script compliance.
 
8186         [Qt] QScriptValue::toIntXX returns incorrect values
 
8187         https://bugs.webkit.org/show_bug.cgi?id=34847
 
8189         * qt/api/qscriptvalue_p.h:
 
8190         (QScriptValuePrivate::toInteger):
 
8191         (QScriptValuePrivate::toInt32):
 
8192         (QScriptValuePrivate::toUInt32):
 
8193         (QScriptValuePrivate::toUInt16):
 
8194         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
8195         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
 
8196         (tst_QScriptValue::toInteger_initData):
 
8197         (tst_QScriptValue::toInteger_makeData):
 
8198         (tst_QScriptValue::toInteger_test):
 
8199         (tst_QScriptValue::toInt32_initData):
 
8200         (tst_QScriptValue::toInt32_makeData):
 
8201         (tst_QScriptValue::toInt32_test):
 
8202         (tst_QScriptValue::toUInt32_initData):
 
8203         (tst_QScriptValue::toUInt32_makeData):
 
8204         (tst_QScriptValue::toUInt32_test):
 
8205         (tst_QScriptValue::toUInt16_initData):
 
8206         (tst_QScriptValue::toUInt16_makeData):
 
8207         (tst_QScriptValue::toUInt16_test):
 
8209 2010-02-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
8211         Reviewed by Adam Barth.
 
8213         Implement NEVER_INLINE and NO_RETURN for RVCT
 
8214         https://bugs.webkit.org/show_bug.cgi?id=34740
 
8216         * wtf/AlwaysInline.h:
 
8218 2010-02-12  Gavin Barraclough  <barraclough@apple.com>
 
8220         Reviewed by Oliver Hunt.
 
8222         https://bugs.webkit.org/show_bug.cgi?id=33731
 
8223         Remove uses of PtrAndFlags from JIT data stuctures.
 
8225         These break the OS X Leaks tool.  Free up a bit in CallLinkInfo, and invalid
 
8226         permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
 
8228         * bytecode/CodeBlock.h:
 
8229         (JSC::CallLinkInfo::seenOnce):
 
8230         (JSC::CallLinkInfo::setSeen):
 
8231         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
 
8232         (JSC::MethodCallLinkInfo::seenOnce):
 
8233         (JSC::MethodCallLinkInfo::setSeen):
 
8235         (JSC::JIT::unlinkCall):
 
8236         * jit/JITPropertyAccess.cpp:
 
8237         (JSC::JIT::patchMethodCallProto):
 
8238         * runtime/UString.h:
 
8240 2010-02-12  Gavin Barraclough  <barraclough@apple.com>
 
8242         Reviewed by Darin Adler.
 
8244         https://bugs.webkit.org/show_bug.cgi?id=33731
 
8245         Many false leaks in release builds due to PtrAndFlags
 
8247         Remove UntypedPtrAndBitfield (similar to PtrAndFlags) in UStringImpl,
 
8248         and steal bits from the refCount instead.
 
8250         * runtime/UStringImpl.cpp:
 
8251         (JSC::UStringImpl::baseSharedBuffer):
 
8252         (JSC::UStringImpl::~UStringImpl):
 
8253         * runtime/UStringImpl.h:
 
8254         (JSC::UStringImpl::cost):
 
8255         (JSC::UStringImpl::isIdentifier):
 
8256         (JSC::UStringImpl::setIsIdentifier):
 
8257         (JSC::UStringImpl::ref):
 
8258         (JSC::UStringImpl::deref):
 
8259         (JSC::UStringImpl::UStringImpl):
 
8260         (JSC::UStringImpl::bufferOwnerString):
 
8261         (JSC::UStringImpl::bufferOwnership):
 
8262         (JSC::UStringImpl::isStatic):
 
8263         (JSC::UStringImpl::):
 
8265 2010-02-12  Geoffrey Garen  <ggaren@apple.com>
 
8267         Reviewed by Darin Adler.
 
8269         Removed an unnecessary data dependency from my last patch.
 
8271         * runtime/SmallStrings.cpp:
 
8272         (JSC::SmallStrings::markChildren): Since isAnyStringMarked being false
 
8273         is a condition of entering the loop, we can just use '=' instead of '|='.
 
8275 2010-02-12  Janne Koskinen  <janne.p.koskinen@digia.com>
 
8277         Reviewed by Tor Arne Vestbø.
 
8279         Additional refptr/passrefptr workarounds for WINSCW compiler
 
8280         https://bugs.webkit.org/show_bug.cgi?id=28054
 
8283         (WTF::refIfNotNull):
 
8284         (WTF::PassRefPtr::PassRefPtr):
 
8285         (WTF::PassRefPtr::~PassRefPtr):
 
8286         (WTF::PassRefPtr::clear):
 
8289         (WTF::RefPtr::RefPtr):
 
8292 2010-02-12  Janne Koskinen  <janne.p.koskinen@digia.com>
 
8294         Reviewed by Tor Arne Vestbø.
 
8296         Additional refptr/passrefptr workarounds for WINSCW compiler
 
8297         https://bugs.webkit.org/show_bug.cgi?id=28054
 
8300         (WTF::refIfNotNull):
 
8301         (WTF::PassRefPtr::PassRefPtr):
 
8302         (WTF::PassRefPtr::~PassRefPtr):
 
8303         (WTF::PassRefPtr::clear):
 
8306         (WTF::RefPtr::RefPtr):
 
8309 2010-02-12  Janne Koskinen  <janne.p.koskinen@digia.com>
 
8311         Reviewed by Tor Arne Vestbø.
 
8313         Additional refptr/passrefptr workarounds for WINSCW compiler
 
8314         https://bugs.webkit.org/show_bug.cgi?id=28054
 
8317         (WTF::refIfNotNull):
 
8318         (WTF::PassRefPtr::PassRefPtr):
 
8319         (WTF::PassRefPtr::~PassRefPtr):
 
8320         (WTF::PassRefPtr::clear):
 
8323         (WTF::RefPtr::RefPtr):
 
8326 2010-02-12  Janne Koskinen  <janne.p.koskinen@digia.com>
 
8328         Reviewed by Simon Hausmann.
 
8330         Don't import the cmath functions from std:: for WINSCW.
 
8334 2010-02-12  Kwang Yul Seo  <skyul@company100.net>
 
8336         Reviewed by Adam Barth.
 
8338         Typedef both JSChar and UChar to wchar_t in RVCT.
 
8339         https://bugs.webkit.org/show_bug.cgi?id=34560
 
8341         Define both JSChar and UChar to wchar_t as the size
 
8342         of wchar_t is 2 bytes in RVCT.
 
8344         * API/JSStringRef.h:
 
8345         * wtf/unicode/qt4/UnicodeQt4.h:
 
8347 2010-02-11  Geoffrey Garen  <ggaren@apple.com>
 
8349         Reviewed by Oliver Hunt and Darin Adler.
 
8351         The rest of the fix for
 
8352         https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198>
 
8353         Many objects left uncollected after visiting mail.google.com and closing
 
8356         Don't unconditionally hang onto small strings. Instead, hang onto all
 
8357         small strings as long as any small string is still referenced.
 
8359         SunSpider reports no change.
 
8361         * runtime/Collector.cpp:
 
8362         (JSC::Heap::markRoots): Mark the small strings cache last, so it can
 
8363         check if anything else has kept any strings alive.
 
8365         * runtime/SmallStrings.cpp:
 
8367         (JSC::SmallStrings::markChildren): Only keep our strings alive if some
 
8368         other reference to at least one of them exists, too.
 
8370 2010-02-11  Geoffrey Garen  <ggaren@apple.com>
 
8372         Reviewed by Gavin Barraclough.
 
8374         Some progress toward fixing
 
8375         https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198>
 
8376         Many objects left uncollected after visiting mail.google.com and closing
 
8379         SunSpider reports no change.
 
8381         Keep weak references, rather than protected references, to cached for-in
 
8382         property name enumerators.
 
8384         One problem with protected references is that a chain like 
 
8385             [ gc object 1 ] => [ non-gc object ] => [ gc object 2 ]
 
8386         takes two GC passes to break, since the first pass collects [ gc object 1 ],
 
8387         releasing [ non-gc object ] and unprotecting [ gc object 2 ], and only
 
8388         then can a second pass collect [ gc object 2 ].
 
8390         Another problem with protected references is that they can keep a bunch
 
8391         of strings alive long after they're useful. In SunSpider and a few popular
 
8392         websites, the size-speed tradeoff seems to favor weak references.
 
8394         * runtime/JSPropertyNameIterator.cpp:
 
8395         (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Moved this constructor
 
8396         into the .cpp file, since it's not used elsewhere.
 
8398         (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): Added a destructor
 
8399         to support our weak reference.
 
8401         * runtime/JSPropertyNameIterator.h:
 
8402         (JSC::Structure::setEnumerationCache):
 
8403         (JSC::Structure::clearEnumerationCache):
 
8404         (JSC::Structure::enumerationCache): Added a function for clearing a
 
8405         Structure's enumeration cache, used by our new destructor. Also fixed
 
8406         indentation to match the rest of the file.
 
8408         * runtime/Structure.h: Changed from protected pointer to weak pointer.
 
8410 2010-02-11  Chris Rogers  <crogers@google.com>
 
8412         Reviewed by David Levin.
 
8414         audio engine: add Complex number class
 
8415         https://bugs.webkit.org/show_bug.cgi?id=34538
 
8417         * wtf/Complex.h: Added.
 
8418         (WebCore::complexFromMagnitudePhase):
 
8420 2010-02-10  Geoffrey Garen  <ggaren@apple.com>
 
8422         Reviewed by Oliver Hunt.
 
8424         Added an SPI for asking about all the different live objects on the heap.
 
8425         Useful for memory debugging.
 
8427         * JavaScriptCore.exp: Export the new SPI.
 
8429         * runtime/Collector.cpp:
 
8430         (JSC::typeName): Use a little capitalization. Don't crash in the case of
 
8431         a non-object cell, since it might just be an uninitialized cell.
 
8433         (JSC::Heap::objectTypeCounts): The new SPI.
 
8435         * runtime/Collector.h:
 
8436         * runtime/CollectorHeapIterator.h:
 
8437         (JSC::CollectorHeapIterator::advance):
 
8438         (JSC::LiveObjectIterator::operator++):
 
8439         (JSC::DeadObjectIterator::operator++):
 
8440         (JSC::ObjectIterator::operator++): Made 2 tweaks to these iterators:
 
8441         (1) Skip the last cell in the block, since it's a dummy sentinel, and
 
8442         we don't want it to confuse the object count; (2) Fixed a logic error
 
8443         in LiveObjectIterator that could cause it to iterate dead objects if
 
8444         m_block were equal to m_heap.nextBlock and m_cell were less than
 
8445         m_heap.nextCell. No test for this since I can't think of a way that this
 
8446         could make WebKit behave badly.
 
8448 2010-02-11  Steve Block  <steveblock@google.com>
 
8450         Reviewed by Darin Adler.
 
8452         Guard cmath using declarations in MathExtras.h on Android
 
8453         https://bugs.webkit.org/show_bug.cgi?id=34840
 
8455         Android does not provide these functions.
 
8459 2010-02-08  Maciej Stachowiak  <mjs@apple.com>
 
8461         Reviewed by Cameron Zwarich.
 
8463         Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose.
 
8464         https://bugs.webkit.org/show_bug.cgi?id=34698
 
8466         * Configurations/FeatureDefines.xcconfig:
 
8468 2010-02-10  Kevin Watters  <kevinwatters@gmail.com>
 
8470         Reviewed by Kevin Ollivier.
 
8472         [wx] Add Windows complex text support and Mac support for containsCharacters.
 
8474         https://bugs.webkit.org/show_bug.cgi?id=34759
 
8478 2010-02-10  Alexey Proskuryakov  <ap@apple.com>
 
8480         Addressing issues found by style bot.
 
8482         * wtf/ValueCheck.h: Renamed header guard to match final file name.
 
8484         * wtf/Vector.h: (WTF::::checkConsistency): Remove braces around a one-line clause.
 
8486 2010-02-09  Alexey Proskuryakov  <ap@apple.com>
 
8488         Reviewed by Geoffrey Garen.
 
8490         https://bugs.webkit.org/show_bug.cgi?id=34490
 
8491         WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions
 
8494         * JavaScriptCore.gypi:
 
8495         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
8496         * JavaScriptCore.xcodeproj/project.pbxproj:
 
8499         * wtf/ValueCheck.h: Added. Moved code out of HashTraits, since it would be awkward to
 
8500         include that from Vector.h.
 
8501         (WTF::ValueCheck::checkConsistency): Allow null pointers, those are pretty consistent.
 
8503         * wtf/HashTraits.h: Moved value checking code out of here.
 
8505         * wtf/HashTable.h: (WTF::::checkTableConsistencyExceptSize): Updated for the above changes.
 
8508         (WTF::::checkConsistency): Check all vector elements.
 
8509         (WTF::ValueCheck): Support checking a Vector as an element in other containers. Currently
 
8512 2010-02-10  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
8514         Reviewed by Simon Hausmann.
 
8516         Fix QScriptValue::toBool.
 
8518         Fix ECMA compliance in the QScriptValue for values like 0, NaN and
 
8521         [Qt] QScriptValue::toBool problem
 
8522         https://bugs.webkit.org/show_bug.cgi?id=34793
 
8524         * qt/api/qscriptvalue_p.h:
 
8525         (QScriptValuePrivate::toBool):
 
8526         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
8527         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
 
8528         (tst_QScriptValue::toBool_initData):
 
8529         (tst_QScriptValue::toBool_makeData):
 
8530         (tst_QScriptValue::toBool_test):
 
8531         (tst_QScriptValue::toBoolean_initData):
 
8532         (tst_QScriptValue::toBoolean_makeData):
 
8533         (tst_QScriptValue::toBoolean_test):
 
8535 2009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
8537         Reviewed by Simon Hausmann.
 
8539         Use derefIfNotNull() to work around WINSCW compiler forward declaration bug
 
8541         The compiler bug is reported at
 
8542         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
 
8544         The change should be reverted when the above bug is fixed in WINSCW compiler.
 
8546         https://bugs.webkit.org/show_bug.cgi?id=28054
 
8548 2009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
8550         Reviewed by Simon Hausmann.
 
8552         Get rid of WINSCW hack for UnSpecifiedBoolType
 
8554         Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW
 
8555         compiler work with the default UnSpecifiedBoolType() operator.
 
8557         https://bugs.webkit.org/show_bug.cgi?id=28054
 
8561 2010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
8563         Reviewed by Simon Hausmann.
 
8565         New functions nullValue() and undefinedValue().
 
8567         [Qt] QScriptEngine should contain nullValue and undefinedValue methods
 
8568         https://bugs.webkit.org/show_bug.cgi?id=34749
 
8570         * qt/api/qscriptengine.cpp:
 
8571         (QScriptEngine::nullValue):
 
8572         (QScriptEngine::undefinedValue):
 
8573         * qt/api/qscriptengine.h:
 
8574         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
 
8575         (tst_QScriptEngine::nullValue):
 
8576         (tst_QScriptEngine::undefinedValue):
 
8578 2010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
8580         Reviewed by Simon Hausmann.
 
8582         Fixes for QScriptValue::toNumber().
 
8584         Fix ECMA compliance in QScriptValue for values unbound
 
8587         [Qt] QScriptValue::toNumber() is broken
 
8588         https://bugs.webkit.org/show_bug.cgi?id=34592
 
8590         * qt/api/qscriptvalue_p.h:
 
8591         (QScriptValuePrivate::toNumber):
 
8592         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
8593         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
 
8594         (tst_QScriptValue::toNumber_initData):
 
8595         (tst_QScriptValue::toNumber_makeData):
 
8596         (tst_QScriptValue::toNumber_test):
 
8598 2010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
8600         Reviewed by Simon Hausmann.
 
8602         Fix QScriptValue::isNumber().
 
8604         The isNumber() should return 'true' if the value is in the CNumber
 
8607         [Qt] QScriptValue::isNumber() returns an incorrect value
 
8608         https://bugs.webkit.org/show_bug.cgi?id=34575
 
8610         * qt/api/qscriptvalue_p.h:
 
8611         (QScriptValuePrivate::isNumber):
 
8612         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
 
8613         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
 
8614         (tst_QScriptValue::isNumber_initData):
 
8615         (tst_QScriptValue::isNumber_makeData):
 
8616         (tst_QScriptValue::isNumber_test):
 
8618 2010-02-09  Geoffrey Garen  <ggaren@apple.com>
 
8620         Reviewed by Oliver Hunt.
 
8622         Small refactoring to the small strings cache to allow it to be cleared
 
8625         * runtime/SmallStrings.cpp:
 
8626         (JSC::SmallStrings::SmallStrings):
 
8627         (JSC::SmallStrings::clear):
 
8628         * runtime/SmallStrings.h: Moved initialization code into a shared function,
 
8629         and changed the constructor to call it.
 
8631 2010-02-09  Gavin Barraclough  <barraclough@apple.com>
 
8633         Rubber Stamped by Geoff Garen.
 
8635         Rename StringBuilder::release && JSStringBuilder::releaseJSString
 
8638         * runtime/ArrayPrototype.cpp:
 
8639         (JSC::arrayProtoFuncToLocaleString):
 
8640         (JSC::arrayProtoFuncJoin):
 
8641         * runtime/Executable.cpp:
 
8642         (JSC::FunctionExecutable::paramString):
 
8643         * runtime/FunctionConstructor.cpp:
 
8644         (JSC::constructFunction):
 
8645         * runtime/JSGlobalObjectFunctions.cpp:
 
8648         (JSC::globalFuncEscape):
 
8649         (JSC::globalFuncUnescape):
 
8650         * runtime/JSONObject.cpp:
 
8651         (JSC::Stringifier::stringify):
 
8652         * runtime/JSStringBuilder.h:
 
8653         (JSC::JSStringBuilder::build):
 
8654         * runtime/LiteralParser.cpp:
 
8655         (JSC::LiteralParser::Lexer::lexString):
 
8656         * runtime/NumberPrototype.cpp:
 
8657         (JSC::integerPartNoExp):
 
8658         (JSC::numberProtoFuncToFixed):
 
8659         * runtime/StringBuilder.h:
 
8660         (JSC::StringBuilder::build):
 
8662 2010-02-09  John Sullivan  <sullivan@apple.com>
 
8664         https://bugs.webkit.org/show_bug.cgi?id=34772
 
8665         Overzealous new assertion in URStringImpl::adopt()
 
8667         Reviewed by Adam Barth.
 
8669         * runtime/UStringImpl.h:
 
8670         (JSC::UStringImpl::adopt):
 
8671         Only assert that vector.data() is non-zero if vector.size() is non-zero.
 
8673 2010-02-09  Nikolas Zimmermann  <nzimmermann@rim.com>
 
8675         Not reviewed. Try to fix build problem on SnowLeopard slaves to bring them back.
 
8677         * API/JSClassRef.cpp:
 
8678         (tryCreateStringFromUTF8): Mark method as 'static inline' to suppress "warning: no previous prototype for ..."
 
8680 2010-02-09  Gavin Barraclough  <barraclough@apple.com>
 
8682         Reviewed by Oliver Hunt.
 
8684         Three small string fixes:
 
8685         (1) StringBuilder::release should CRASH if the buffer allocation failed.
 
8686         (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT.
 
8687         (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8.
 
8688             This is only used from the API, and (now) unlike other UString::create
 
8689             methods may return UString::null() to indicate failure cases.  Better
 
8690             handle these in the API.
 
8692         * API/JSClassRef.cpp:
 
8693         (tryCreateStringFromUTF8):
 
8694         (OpaqueJSClass::OpaqueJSClass):
 
8695         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
8696         * runtime/JSString.h:
 
8697         (JSC::Fiber::tryGetValue):
 
8698         * runtime/StringBuilder.h:
 
8699         (JSC::StringBuilder::release):
 
8700         * runtime/UString.cpp:
 
8701         (JSC::UString::UString):
 
8702         (JSC::UString::from):
 
8703         (JSC::UString::find):
 
8704         * runtime/UString.h:
 
8706 2010-02-09  Janne Koskinen  <janne.p.koskinen@digia.com>
 
8708         Reviewed by Laszlo Gombos.
 
8710         [Qt] use nanval() for Symbian as nonInlineNaN
 
8711         https://bugs.webkit.org/show_bug.cgi?id=34170
 
8713         numeric_limits<double>::quiet_NaN is broken in Symbian
 
8714         causing NaN to be evaluated as a number.
 
8716         * runtime/JSValue.cpp:
 
8717         (JSC::nonInlineNaN):
 
8719 2010-02-09  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
 
8721         Reviewed by Gavin Barraclough.
 
8723         Add a soft modulo operation to ARM JIT using a trampoline function.
 
8724         The performance progression is about ~1.8% on ARMv7
 
8725         https://bugs.webkit.org/show_bug.cgi?id=34424
 
8727         Developed in cooperation with Gabor Loki.
 
8730         * jit/JITArithmetic.cpp:
 
8731         (JSC::JIT::emit_op_mod):
 
8732         (JSC::JIT::emitSlow_op_mod):
 
8733         * jit/JITOpcodes.cpp:
 
8734         (JSC::JIT::softModulo):
 
8736         (JSC::JITThunks::ctiSoftModulo):
 
8739 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
 
8741         Reviewed by NOBODY (SL/win build fixes).
 
8743         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
8744         * runtime/StringPrototype.cpp:
 
8746 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
 
8748         Reviewed by Oliver Hunt
 
8750         Make String.replace throw an exception on out-of-memory, rather than
 
8751         returning a null (err, empty-ish) string.  Move String::replaceRange
 
8752         and String::spliceSubstringsWithSeparators out to StringPrototype -
 
8753         these were fairly specific use anyway, and we can better integrate
 
8754         throwing the JS expcetion this way.
 
8756         Also removes redundant assignment operator from UString.
 
8758         * JavaScriptCore.exp:
 
8759         * runtime/StringPrototype.cpp:
 
8760         (JSC::StringRange::StringRange):
 
8761         (JSC::jsSpliceSubstringsWithSeparators):
 
8762         (JSC::jsReplaceRange):
 
8763         (JSC::stringProtoFuncReplace):
 
8764         * runtime/UString.cpp:
 
8765         * runtime/UString.h:
 
8767 2010-02-08  Kwang Yul Seo  <skyul@company100.net>
 
8769         Reviewed by Eric Seidel.
 
8771         [BREWMP] Undefine WTF_OS_WINDOWS and WTF_PLATFORM_WIN
 
8772         https://bugs.webkit.org/show_bug.cgi?id=34561
 
8774         As the binary for simulator is built with MSVC 2005,
 
8775         WTF_OS_WINDOWS and WTF_PLATFORM_WIN are defined.
 
8776         Undefine them as we don't target Windows.
 
8780 2010-02-08  Chris Rogers  <crogers@google.com>
 
8782         Reviewed by Darin Adler.
 
8784         audio engine: add Vector3 class
 
8785         https://bugs.webkit.org/show_bug.cgi?id=34548
 
8787         * wtf/Vector3.h: Added.
 
8788         (WebCore::Vector3::Vector3):
 
8789         (WebCore::Vector3::abs):
 
8790         (WebCore::Vector3::isZero):
 
8791         (WebCore::Vector3::normalize):
 
8792         (WebCore::Vector3::x):
 
8793         (WebCore::Vector3::y):
 
8794         (WebCore::Vector3::z):
 
8795         (WebCore::operator+):
 
8796         (WebCore::operator-):
 
8797         (WebCore::operator*):
 
8800         (WebCore::distance):
 
8802 2010-02-08  Oliver Hunt  <oliver@apple.com>
 
8804         Reviewed by Gavin Barraclough.
 
8806         Fix warning in clang++
 
8808         * runtime/Structure.h:
 
8809         (JSC::Structure::propertyStorageSize):
 
8811 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
 
8813         Reviewed by Geoff Garen.
 
8815         Make makeString CRASH if we fail to allocate a string.
 
8817         (tryMakeString or jsMakeNontrivialString can be used where we
 
8818         expect allocation may fail and want to handle the error).
 
8820         * runtime/JSStringBuilder.h:
 
8821         (JSC::jsMakeNontrivialString):
 
8822         * runtime/UString.h:
 
8823         (JSC::tryMakeString):
 
8826 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
 
8828         Rubber Stamped by Oliver Hunt.
 
8830         Remove a couple of unnecesary C-style casts spotted by Darin.
 
8832         * runtime/JSGlobalObjectFunctions.cpp:
 
8834         (JSC::globalFuncEscape):
 
8836 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
 
8838         Reviewed by Geoff Garen.
 
8840         Switch some more StringBuilder/jsNontrivialString code to use
 
8841         JSStringBuilder/jsMakeNontrivialString - these methods will
 
8842         throw an exception if we hit out-of-memory, rather than just
 
8845         * runtime/FunctionPrototype.cpp:
 
8846         (JSC::functionProtoFuncToString):
 
8847         * runtime/JSGlobalObjectFunctions.cpp:
 
8850         (JSC::globalFuncEscape):
 
8852 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
 
8854         Reviewed by Sam Weinig.
 
8856         Use an empty identifier instead of a null identifier for parse
 
8857         tokens without an identifier.
 
8859         This helps encapsulate the null UStringImpl within UString.
 
8862         * parser/NodeConstructors.h:
 
8863         (JSC::ContinueNode::ContinueNode):
 
8864         (JSC::BreakNode::BreakNode):
 
8865         (JSC::ForInNode::ForInNode):
 
8866         * runtime/CommonIdentifiers.cpp:
 
8867         (JSC::CommonIdentifiers::CommonIdentifiers):
 
8868         * runtime/CommonIdentifiers.h:
 
8869         * runtime/FunctionPrototype.cpp:
 
8870         (JSC::FunctionPrototype::FunctionPrototype):
 
8872 2010-02-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
8874         Build fix for make distcheck.
 
8878 2010-02-08  Simon Hausmann  <simon.hausmann@nokia.com>
 
8880         Unreviewed RVCT build fix.
 
8882         Similar to r54391, don't import the cmath functions from std:: for RVCT.
 
8886 2010-02-05  Gavin Barraclough  <barraclough@apple.com>
 
8888         Reviewed by Geoff Garen.
 
8890         Change UStringImpl::create to CRASH if the string cannot be allocated,
 
8891         rather than returning a null string (which will behave like a zero-length
 
8894         Also move createRep function from UString to become new overloaded
 
8895         UStringImpl::create methods.  In doing so, bring their behaviour closer to
 
8896         being in line with WebCore::StringImpl, in removing the behaviour that they
 
8897         can be used to produce null UStrings (ASSERT the char* provided is non-null).
 
8898         This behaviour of converting null C-strings to null UStrings is inefficient
 
8899         (cmompared to just using UString::null()), incompatible with WebCore::StringImpl's
 
8900         behaviour, and may generate unexpected behaviour, since in many cases a null
 
8901         UString can be used like an empty string.
 
8903         With these changes UStringImpl need not have a concept of null impls, we can
 
8904         start transitioning this to become an implementation detail of UString, that
 
8905         internally it chooses to use a null-object rather than an actually zero impl
 
8908         * JavaScriptCore.exp:
 
8909         * debugger/Debugger.cpp:
 
8910         (JSC::Debugger::recompileAllJSFunctions):
 
8911         * debugger/DebuggerCallFrame.cpp:
 
8912         (JSC::DebuggerCallFrame::calculatedFunctionName):
 
8913         * parser/Parser.cpp:
 
8914         (JSC::Parser::parse):
 
8915         * profiler/Profile.cpp:
 
8916         (JSC::Profile::Profile):
 
8917         * profiler/ProfileGenerator.cpp:
 
8918         (JSC::ProfileGenerator::stopProfiling):
 
8919         * runtime/Error.cpp:
 
8920         (JSC::Error::create):
 
8922         * runtime/ExceptionHelpers.cpp:
 
8924         * runtime/Identifier.cpp:
 
8925         (JSC::Identifier::add):
 
8926         * runtime/PropertyNameArray.cpp:
 
8927         (JSC::PropertyNameArray::add):
 
8928         * runtime/UString.cpp:
 
8929         (JSC::initializeUString):
 
8930         (JSC::UString::UString):
 
8931         (JSC::UString::operator=):
 
8932         * runtime/UString.h:
 
8933         (JSC::UString::isNull):
 
8934         (JSC::UString::null):
 
8935         (JSC::UString::rep):
 
8936         (JSC::UString::UString):
 
8937         * runtime/UStringImpl.cpp:
 
8938         (JSC::UStringImpl::create):
 
8939         * runtime/UStringImpl.h:
 
8941 2010-02-05  Kwang Yul Seo  <skyul@company100.net>
 
8943         Reviewed by Eric Seidel.
 
8945         [BREWMP] Define SYSTEM_MALLOC 1
 
8946         https://bugs.webkit.org/show_bug.cgi?id=34640
 
8948         Make BREWMP use system malloc because FastMalloc is not ported.
 
8952 2010-02-05  Kwang Yul Seo  <skyul@company100.net>
 
8954         Reviewed by Alexey Proskuryakov.
 
8956         Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0
 
8957         https://bugs.webkit.org/show_bug.cgi?id=34569
 
8959         With USE_SYSTEM_MALLOC=1, fastMalloc and fastCalloc call CRASH()
 
8960         if the return value of malloc and calloc is 0.
 
8962         However, these functions can return 0 when the request size is 0.
 
8963         Libc manual says, "If size is 0, then malloc() returns either NULL,
 
8964         or a unique pointer value that can later be successfully passed to free()."
 
8965         Though malloc returns a unique pointer in most systems,
 
8966         0 can be returned in some systems. For instance, BREW's MALLOC returns 0
 
8969         If malloc or calloc returns 0 due to allocation size, increase the size
 
8972         * wtf/FastMalloc.cpp:
 
8976 2010-02-04  Mark Rowe  <mrowe@apple.com>
 
8978         Reviewed by Timothy Hatcher.
 
8980         Build fix.  Remove a symbol corresponding to an inline function from the linker export
 
8981         file to prevent a weak external failure.
 
8983         * JavaScriptCore.xcodeproj/project.pbxproj: Accommodate rename of script.
 
8985 2010-02-04  Daniel Bates  <dbates@webkit.org>
 
8987         [Qt] Unreviewed, build fix for Qt bot.
 
8989         * runtime/JSStringBuilder.h: Changed #include <X.h> notation #include "X.h".
 
8991 2010-02-04  Geoffrey Garen  <ggaren@apple.com>
 
8993         Reviewed by Oliver Hunt.
 
8995         Clearing a WeakGCPtr is weird
 
8996         https://bugs.webkit.org/show_bug.cgi?id=34627
 
8998         Added a WeakGCPtr::clear interface.
 
9000         As discussed in https://bugs.webkit.org/show_bug.cgi?id=33383, the old
 
9001         interface made it pretty weird for a client to conditionally clear a
 
9002         WeakGCPtr, which is exactly what clients want to do when objects are
 
9005         * API/JSClassRef.cpp:
 
9006         (clearReferenceToPrototype): Use the new WeakGCPtr::clear() interface. 
 
9008         * runtime/WeakGCPtr.h:
 
9009         (JSC::WeakGCPtr::clear): Added an interface for clearing a WeakGCPtr,
 
9010         iff its current value is the value passed in. It's cumbersome for the
 
9011         client to do this test, since WeakGCPtr sometimes pretends to be null.
 
9013 2010-02-04  Geoffrey Garen  <ggaren@apple.com>
 
9015         Build fix: export a header.
 
9017         * JavaScriptCore.xcodeproj/project.pbxproj:
 
9019 2010-02-04  Gavin Barraclough  <barraclough@apple.com>
 
9021         Reviewed by Oliver Hunt.
 
9023         Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to
 
9024         construct JSStrings, throwing a JS exception should we run out of memory whilst
 
9025         allocating storage for the string.
 
9027         Similarly, add jsMakeNontrivialString methods to use in cases where previously
 
9028         we were calling makeString & passing the result to jsNontrivialString.  Again,
 
9029         these new methods throw if we hit an out of memory condition.
 
9031         Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available.
 
9033         * JavaScriptCore.xcodeproj/project.pbxproj:
 
9034         * runtime/ArrayPrototype.cpp:
 
9035         (JSC::arrayProtoFuncToString):
 
9036         (JSC::arrayProtoFuncToLocaleString):
 
9037         (JSC::arrayProtoFuncJoin):
 
9038         * runtime/DateConstructor.cpp:
 
9040         * runtime/DatePrototype.cpp:
 
9041         (JSC::dateProtoFuncToString):
 
9042         (JSC::dateProtoFuncToUTCString):
 
9043         (JSC::dateProtoFuncToGMTString):
 
9044         * runtime/ErrorPrototype.cpp:
 
9045         (JSC::errorProtoFuncToString):
 
9046         * runtime/ExceptionHelpers.cpp:
 
9047         (JSC::throwOutOfMemoryError):
 
9048         * runtime/ExceptionHelpers.h:
 
9049         * runtime/JSStringBuilder.h: Added.
 
9050         (JSC::JSStringBuilder::releaseJSString):
 
9051         (JSC::jsMakeNontrivialString):
 
9052         * runtime/NumberPrototype.cpp:
 
9053         (JSC::numberProtoFuncToPrecision):
 
9054         * runtime/ObjectPrototype.cpp:
 
9055         (JSC::objectProtoFuncToString):
 
9056         * runtime/Operations.cpp:
 
9057         * runtime/Operations.h:
 
9058         * runtime/RegExpPrototype.cpp:
 
9059         (JSC::regExpProtoFuncToString):
 
9060         * runtime/StringBuilder.h:
 
9061         (JSC::StringBuilder::append):
 
9062         * runtime/StringPrototype.cpp:
 
9063         (JSC::stringProtoFuncBig):
 
9064         (JSC::stringProtoFuncSmall):
 
9065         (JSC::stringProtoFuncBlink):
 
9066         (JSC::stringProtoFuncBold):
 
9067         (JSC::stringProtoFuncFixed):
 
9068         (JSC::stringProtoFuncItalics):
 
9069         (JSC::stringProtoFuncStrike):
 
9070         (JSC::stringProtoFuncSub):
 
9071         (JSC::stringProtoFuncSup):
 
9072         (JSC::stringProtoFuncFontcolor):
 
9073         (JSC::stringProtoFuncFontsize):
 
9074         (JSC::stringProtoFuncAnchor):
 
9076 2010-02-04  Steve Falkenburg  <sfalken@apple.com>
 
9082 2010-02-04  Darin Adler  <darin@apple.com>
 
9084         Reviewed by David Levin.
 
9086         Make MathExtras.h compatible with <cmath>
 
9087         https://bugs.webkit.org/show_bug.cgi?id=34618
 
9089         * wtf/MathExtras.h: Include <cmath> instead of <math.h>.
 
9090         Use "using" as we do elsewhere in WTF for the four functions from <cmath>
 
9091         we want to use without the prefix. Later we could consider making the std
 
9092         explicit at call sites instead.
 
9094 2010-02-04  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
 
9096         Reviewed by Gavin Barraclough.
 
9098         Use an easily appendable structure for trampolines instead of pointer parameters.
 
9099         https://bugs.webkit.org/show_bug.cgi?id=34424
 
9101         * assembler/ARMAssembler.cpp:
 
9102         (JSC::ARMAssembler::executableCopy):
 
9104         (JSC::JIT::compileCTIMachineTrampolines):
 
9105         * jit/JITOpcodes.cpp:
 
9106         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
9108         (JSC::JITThunks::JITThunks):
 
9110         (JSC::JITThunks::ctiStringLengthTrampoline):
 
9111         (JSC::JITThunks::ctiVirtualCallLink):
 
9112         (JSC::JITThunks::ctiVirtualCall):
 
9113         (JSC::JITThunks::ctiNativeCallThunk):
 
9115 2010-02-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
9117         Reviewed by Simon Hausmann.
 
9119         Increase test coverage for the QScriptValue.
 
9121         https://bugs.webkit.org/show_bug.cgi?id=34533
 
9123         * qt/tests/qscriptvalue/qscriptvalue.pro:
 
9124         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
 
9125         (tst_QScriptValue::tst_QScriptValue):
 
9126         (tst_QScriptValue::~tst_QScriptValue):
 
9127         (tst_QScriptValue::dataHelper):
 
9128         (tst_QScriptValue::newRow):
 
9129         (tst_QScriptValue::testHelper):
 
9130         (tst_QScriptValue::ctor):
 
9131         * qt/tests/qscriptvalue/tst_qscriptvalue.h: Added.
 
9132         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Added.
 
9133         (tst_QScriptValue::initScriptValues):
 
9134         (tst_QScriptValue::isValid_initData):
 
9135         (tst_QScriptValue::isValid_makeData):
 
9136         (tst_QScriptValue::isValid_test):
 
9137         (tst_QScriptValue::isBool_initData):
 
9138         (tst_QScriptValue::isBool_makeData):
 
9139         (tst_QScriptValue::isBool_test):
 
9140         (tst_QScriptValue::isBoolean_initData):
 
9141         (tst_QScriptValue::isBoolean_makeData):
 
9142         (tst_QScriptValue::isBoolean_test):
 
9143         (tst_QScriptValue::isFunction_initData):
 
9144         (tst_QScriptValue::isFunction_makeData):
 
9145         (tst_QScriptValue::isFunction_test):
 
9146         (tst_QScriptValue::isNull_initData):
 
9147         (tst_QScriptValue::isNull_makeData):
 
9148         (tst_QScriptValue::isNull_test):
 
9149         (tst_QScriptValue::isString_initData):
 
9150         (tst_QScriptValue::isString_makeData):
 
9151         (tst_QScriptValue::isString_test):
 
9152         (tst_QScriptValue::isUndefined_initData):
 
9153         (tst_QScriptValue::isUndefined_makeData):
 
9154         (tst_QScriptValue::isUndefined_test):
 
9155         (tst_QScriptValue::isObject_initData):
 
9156         (tst_QScriptValue::isObject_makeData):
 
9157         (tst_QScriptValue::isObject_test):
 
9159 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
 
9161         Reviewed by Eric Seidel.
 
9163         [BREWMP] Define WTF_PLATFORM_BREWMP_SIMULATOR when AEE_SIMULATOR is defined
 
9164         https://bugs.webkit.org/show_bug.cgi?id=34514
 
9166         PLATFORM(BREWMP_SIMULATOR) guard is needed to make distinction between BREWMP
 
9167         and BREWMP simulator.
 
9171 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
 
9173         Reviewed by Eric Seidel.
 
9175         [BREWMP] Remove COMPILE_ASSERT conflict with the underlying PLATFORM
 
9176         https://bugs.webkit.org/show_bug.cgi?id=34190
 
9178         COMPILE_ASSERT conflicts with the underlying PLATFORM because it is defined
 
9179         both in WTF's Assertions.h and BREWMP's AEEClassIDs.h. Include AEEClassIDs.h
 
9180         in Assertions.h and undef COMPILE_ASSERT to avoid redefining COMPILE_ASSERT.
 
9184 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
 
9186         Reviewed by Eric Seidel.
 
9188         [BREWMP] Implement OwnPtrBrew to make sure BREW instances are freed.
 
9189         https://bugs.webkit.org/show_bug.cgi?id=34518
 
9191         Add OwnPtrBrew to release IFile, IFileMgr and IBitmap instances.
 
9193         * wtf/brew/OwnPtrBrew.cpp: Added.
 
9197         (WTF::freeOwnedPtrBrew):
 
9198         * wtf/brew/OwnPtrBrew.h: Added.
 
9199         (WTF::OwnPtrBrew::OwnPtrBrew):
 
9200         (WTF::OwnPtrBrew::~OwnPtrBrew):
 
9201         (WTF::OwnPtrBrew::get):
 
9202         (WTF::OwnPtrBrew::release):
 
9203         (WTF::OwnPtrBrew::outPtr):
 
9204         (WTF::OwnPtrBrew::set):
 
9205         (WTF::OwnPtrBrew::clear):
 
9206         (WTF::OwnPtrBrew::operator*):
 
9207         (WTF::OwnPtrBrew::operator->):
 
9208         (WTF::OwnPtrBrew::operator!):
 
9209         (WTF::OwnPtrBrew::operator UnspecifiedBoolType):
 
9210         (WTF::OwnPtrBrew::swap):
 
9216 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
 
9218         Reviewed by Darin Adler.
 
9220         Export WTF::fastStrDup symbol
 
9221         https://bugs.webkit.org/show_bug.cgi?id=34526
 
9223         * JavaScriptCore.exp:
 
9225 2010-02-03  Kevin Watters  <kevinwatters@gmail.com>
 
9227         Reviewed by Kevin Ollivier.
 
9229         [wx] Enable JIT compilation for wx.
 
9231         https://bugs.webkit.org/show_bug.cgi?id=34536
 
9235 2010-02-02  Oliver Hunt  <oliver@apple.com>
 
9237         Reviewed by Geoffrey Garen.
 
9239         Crash in CollectorBitmap::get at nbcolympics.com
 
9240         https://bugs.webkit.org/show_bug.cgi?id=34504
 
9242         This was caused by the use of m_offset to determine the offset of
 
9243         a new property into the property storage.  This patch corrects
 
9244         the effected cases by incorporating the anonymous slot count. It
 
9245         also removes the duplicate copy of anonymous slot count from the
 
9246         property table as keeping this up to date merely increased the
 
9247         chance of a mismatch.  Finally I've added a large number of
 
9248         assertions in an attempt to prevent such a bug from happening
 
9251         With the new assertions in place the existing anonymous slot tests
 
9252         all fail without the m_offset fixes.
 
9254         * runtime/PropertyMapHashTable.h:
 
9255         * runtime/Structure.cpp:
 
9256         (JSC::Structure::materializePropertyMap):
 
9257         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
9258         (JSC::Structure::addPropertyTransition):
 
9259         (JSC::Structure::removePropertyTransition):
 
9260         (JSC::Structure::flattenDictionaryStructure):
 
9261         (JSC::Structure::addPropertyWithoutTransition):
 
9262         (JSC::Structure::removePropertyWithoutTransition):
 
9263         (JSC::Structure::copyPropertyTable):
 
9264         (JSC::Structure::get):
 
9265         (JSC::Structure::put):
 
9266         (JSC::Structure::remove):
 
9267         (JSC::Structure::insertIntoPropertyMapHashTable):
 
9268         (JSC::Structure::createPropertyMapHashTable):
 
9269         (JSC::Structure::rehashPropertyMapHashTable):
 
9270         (JSC::Structure::checkConsistency):
 
9272 2010-02-02  Steve Falkenburg  <sfalken@apple.com>
 
9274         Reviewed by Darin Adler.
 
9276         Copyright year updating for Windows version resources should be automatic
 
9277         https://bugs.webkit.org/show_bug.cgi?id=34503
 
9279         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
 
9281 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
 
9283         Reviewed by Eric Seidel.
 
9285         [BREWMP] Add dummy main thread functions
 
9286         https://bugs.webkit.org/show_bug.cgi?id=33569
 
9288         Add dummy initializeMainThreadPlatform and
 
9289         scheduleDispatchFunctionsOnMainThread.
 
9291         * wtf/brew/MainThreadBrew.cpp: Added.
 
9292         (WTF::initializeMainThreadPlatform):
 
9293         (WTF::scheduleDispatchFunctionsOnMainThread):
 
9295 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
 
9297         Reviewed by Darin Adler.
 
9299         Add using WTF::getLocalTime to CurrentTime.h
 
9300         https://bugs.webkit.org/show_bug.cgi?id=34493
 
9302         * wtf/CurrentTime.h:
 
9304 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
 
9306         Reviewed by Eric Seidel.
 
9308         [BREWMP] Add HAVE_XXX definitions
 
9309         https://bugs.webkit.org/show_bug.cgi?id=34414
 
9315 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
 
9317         Reviewed by Eric Seidel.
 
9319         [BREWMP] Don't define HAVE_TM_GMTOFF, HAVE_TM_ZONE and HAVE_TIMEGM
 
9320         https://bugs.webkit.org/show_bug.cgi?id=34388
 
9322         BREWMP does not have these features.
 
9326 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
 
9328         Reviewed by Eric Seidel.
 
9330         [BREWMP] Define WTF_PLATFORM_BREWMP=1 when BUILDING_BREWMP is defined
 
9331         https://bugs.webkit.org/show_bug.cgi?id=34386
 
9333         Define WTF_PLATFORM_BREWMP=1 so that PLATFORM(BREWMP) guard can be used.
 
9337 2010-02-01  Kent Tamura  <tkent@chromium.org>
 
9339         Reviewed by Darin Adler.
 
9341         Date.UTC() should apply TimeClip operation.
 
9342         https://bugs.webkit.org/show_bug.cgi?id=34461
 
9344         ECMAScript 5 15.9.4.3:
 
9345         > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
 
9347         * runtime/DateConstructor.cpp:
 
9348         (JSC::dateUTC): Calls WTF::timeClip().
 
9350 2010-02-01  Kent Tamura  <tkent@chromium.org>
 
9352         Reviewed by Darin Adler.
 
9354         Fix a bug that Math.round() retunrs incorrect results for huge integers
 
9355         https://bugs.webkit.org/show_bug.cgi?id=34462
 
9357         * runtime/MathObject.cpp:
 
9358         (JSC::mathProtoFuncRound): Avoid "arg + 0.5".
 
9360 2010-02-01  Kwang Yul Seo  <skyul@company100.net>
 
9362         Reviewed by Eric Seidel.
 
9364         [BREWMP] Port WTF's currentTime
 
9365         https://bugs.webkit.org/show_bug.cgi?id=33567
 
9367         Combine GETUTCSECONDS and GETTIMEMS to calculate the number
 
9368         of milliseconds since 1970/01/01 00:00:00 UTC.
 
9370         * wtf/CurrentTime.cpp:
 
9373 2010-02-01  Patrick Gansterer  <paroga@paroga.com>
 
9375         Reviewed by Darin Adler.
 
9377         [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo.
 
9378         https://bugs.webkit.org/show_bug.cgi?id=34378
 
9382 2010-02-01  Oliver Hunt  <oliver@apple.com>
 
9384         Reviewed by Gavin Barraclough.
 
9386         Structure not accounting for anonymous slots when computing property storage size
 
9387         https://bugs.webkit.org/show_bug.cgi?id=34441
 
9389         Previously any Structure with anonymous storage would have a property map, so we
 
9390         were only including anonymous slot size if there was a property map.  Given this
 
9391         is no longer the case we should always include the anonymous slot count in the
 
9392         property storage size.
 
9394         * runtime/Structure.h:
 
9395         (JSC::Structure::propertyStorageSize):
 
9397 2010-02-01  Oliver Hunt  <oliver@apple.com>
 
9399         Windows build fix, update exports file (again)
 
9401         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
9403 2010-02-01  Oliver Hunt  <oliver@apple.com>
 
9405         Windows build fix, update exports file
 
9407         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
9409 2010-01-31  Oliver Hunt  <oliver@apple.com>
 
9411         Reviewed by Maciej Stachowiak.
 
9413         JSC is failing to propagate anonymous slot count on some transitions
 
9414         https://bugs.webkit.org/show_bug.cgi?id=34321
 
9416         Remove secondary Structure constructor, and make Structure store a copy
 
9417         of the number of anonymous slots directly so saving an immediate allocation
 
9418         of a property map for all structures with anonymous storage, which also
 
9419         avoids the leaked property map on new property transition in the original
 
9420         version of this patch.
 
9422         We need to propagate the the anonymous slot count otherwise we can end up
 
9423         with a structure recording incorrect information about the available and
 
9424         needed space for property storage, or alternatively incorrectly reusing
 
9427         * JavaScriptCore.exp:
 
9428         * runtime/Structure.cpp:
 
9429         (JSC::Structure::Structure):
 
9430         (JSC::Structure::materializePropertyMap):
 
9431         (JSC::Structure::addPropertyTransition):
 
9432         (JSC::Structure::changePrototypeTransition):
 
9433         (JSC::Structure::despecifyFunctionTransition):
 
9434         (JSC::Structure::getterSetterTransition):
 
9435         (JSC::Structure::toDictionaryTransition):
 
9436         (JSC::Structure::flattenDictionaryStructure):
 
9437         (JSC::Structure::copyPropertyTable):
 
9438         (JSC::Structure::put):
 
9439         (JSC::Structure::remove):
 
9440         (JSC::Structure::insertIntoPropertyMapHashTable):
 
9441         (JSC::Structure::createPropertyMapHashTable):
 
9442         * runtime/Structure.h:
 
9443         (JSC::Structure::create):
 
9444         (JSC::Structure::hasAnonymousSlots):
 
9445         (JSC::Structure::anonymousSlotCount):
 
9447 2010-01-31  Patrick Gansterer  <paroga@paroga.com>
 
9449         Reviewed by Darin Adler.
 
9451         Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined).
 
9452         https://bugs.webkit.org/show_bug.cgi?id=34380
 
9454         * wtf/ThreadSpecific.h:
 
9456 2010-01-31  Kent Tamura  <tkent@chromium.org>
 
9458         Reviewed by Darin Adler.
 
9460         [Windows] Fix a bug of round() with huge integral numbers
 
9461         https://bugs.webkit.org/show_bug.cgi?id=34297
 
9463         Fix a bug that round() for huge integral numbers returns incorrect
 
9464         results. For example, round(8639999913600001) returns
 
9465         8639999913600002 without this change though the double type can
 
9466         represent 8639999913600001 precisely.
 
9468         Math.round() of JavaScript has a similar problem. But this change
 
9469         doesn't fix it because Math.round() doesn't use round() of
 
9473         (round): Avoid to do "num + 0.5" or "num - 0.5".
 
9474         (roundf): Fixed similarly.
 
9475         (llround): Calls round().
 
9476         (llroundf): Calls roundf().
 
9477         (lround): Calls round().
 
9478         (lroundf): Calls roundf().
 
9480 2010-01-29  Mark Rowe  <mrowe@apple.com>
 
9482         Sort Xcode projects.
 
9484         * JavaScriptCore.xcodeproj/project.pbxproj:
 
9486 2010-01-29  Mark Rowe  <mrowe@apple.com>
 
9490         Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
 
9492         As the comment in FeatureDefines.xcconfig notes, the list of feature defines
 
9493         needs to be kept in sync across the various files.  The default values also
 
9494         need to be kept in sync between these files and build-webkit.
 
9496         * Configurations/FeatureDefines.xcconfig:
 
9498 2010-01-29  Simon Hausmann  <simon.hausmann@nokia.com>
 
9500         Rubber-stamped by Maciej Stachowiak.
 
9504         * runtime/JSNumberCell.h:
 
9505         (JSC::JSNumberCell::createStructure): Call the right Structure::create overload.
 
9507 2010-01-28  Kevin Ollivier  <kevino@theolliviers.com>
 
9509         [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation
 
9510         implements pthread_t in a way that makes it impossible to check its validity,
 
9511         which is needed by ThreadingPthreads.cpp.
 
9515 2010-01-28  Oliver Hunt  <oliver@apple.com>
 
9517         Reviewed by Gavin Barraclough.
 
9519         DOM Objects shouldn't all require custom mark functions
 
9520         https://bugs.webkit.org/show_bug.cgi?id=34291
 
9522         Make getAnonymousValue const-friendly
 
9524         * runtime/JSObject.h:
 
9525         (JSC::JSObject::getAnonymousValue):
 
9527 2010-01-28  Oliver Hunt  <oliver@apple.com>
 
9529         Reviewed by Gavin Barraclough.
 
9531         Simplify anonymous slot implementation
 
9532         https://bugs.webkit.org/show_bug.cgi?id=34282
 
9534         A class must now specify the number of slots it needs at construction time
 
9535         rather than later on with a transition.  This makes many things simpler,
 
9536         we no longer need to need an additional transition on object creation to
 
9537         add the anonymous slots, and we remove the need for a number of transition
 
9540         * API/JSCallbackConstructor.h:
 
9541         (JSC::JSCallbackConstructor::createStructure):
 
9542         * API/JSCallbackFunction.h:
 
9543         (JSC::JSCallbackFunction::createStructure):
 
9544         * API/JSCallbackObject.h:
 
9545         (JSC::JSCallbackObject::createStructure):
 
9546         * JavaScriptCore.exp:
 
9547         * debugger/DebuggerActivation.h:
 
9548         (JSC::DebuggerActivation::createStructure):
 
9549         * runtime/Arguments.h:
 
9550         (JSC::Arguments::createStructure):
 
9551         * runtime/BooleanObject.h:
 
9552         (JSC::BooleanObject::createStructure):
 
9553         * runtime/DateInstance.h:
 
9554         (JSC::DateInstance::createStructure):
 
9555         * runtime/DatePrototype.h:
 
9556         (JSC::DatePrototype::createStructure):
 
9557         * runtime/FunctionPrototype.h:
 
9558         (JSC::FunctionPrototype::createStructure):
 
9559         * runtime/GetterSetter.h:
 
9560         (JSC::GetterSetter::createStructure):
 
9561         * runtime/GlobalEvalFunction.h:
 
9562         (JSC::GlobalEvalFunction::createStructure):
 
9563         * runtime/InternalFunction.h:
 
9564         (JSC::InternalFunction::createStructure):
 
9565         * runtime/JSAPIValueWrapper.h:
 
9566         (JSC::JSAPIValueWrapper::createStructure):
 
9567         * runtime/JSActivation.h:
 
9568         (JSC::JSActivation::createStructure):
 
9569         * runtime/JSArray.h:
 
9570         (JSC::JSArray::createStructure):
 
9571         * runtime/JSByteArray.cpp:
 
9572         (JSC::JSByteArray::createStructure):
 
9574         (JSC::JSCell::createDummyStructure):
 
9575         * runtime/JSFunction.h:
 
9576         (JSC::JSFunction::createStructure):
 
9577         * runtime/JSGlobalObject.h:
 
9578         (JSC::JSGlobalObject::createStructure):
 
9579         * runtime/JSNotAnObject.h:
 
9580         (JSC::JSNotAnObject::createStructure):
 
9581         * runtime/JSONObject.h:
 
9582         (JSC::JSONObject::createStructure):
 
9583         * runtime/JSObject.h:
 
9584         (JSC::JSObject::createStructure):
 
9585         (JSC::JSObject::putAnonymousValue):
 
9586         (JSC::JSObject::getAnonymousValue):
 
9587         * runtime/JSPropertyNameIterator.h:
 
9588         (JSC::JSPropertyNameIterator::createStructure):
 
9589         * runtime/JSStaticScopeObject.h:
 
9590         (JSC::JSStaticScopeObject::createStructure):
 
9591         * runtime/JSString.h:
 
9592         (JSC::Fiber::createStructure):
 
9593         * runtime/JSVariableObject.h:
 
9594         (JSC::JSVariableObject::createStructure):
 
9595         * runtime/JSWrapperObject.h:
 
9596         (JSC::JSWrapperObject::createStructure):
 
9597         (JSC::JSWrapperObject::JSWrapperObject):
 
9598         * runtime/MathObject.h:
 
9599         (JSC::MathObject::createStructure):
 
9600         * runtime/NumberConstructor.h:
 
9601         (JSC::NumberConstructor::createStructure):
 
9602         * runtime/NumberObject.h:
 
9603         (JSC::NumberObject::createStructure):
 
9604         * runtime/RegExpConstructor.h:
 
9605         (JSC::RegExpConstructor::createStructure):
 
9606         * runtime/RegExpObject.h:
 
9607         (JSC::RegExpObject::createStructure):
 
9608         * runtime/StringObject.h:
 
9609         (JSC::StringObject::createStructure):
 
9610         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
9611         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
 
9612         * runtime/Structure.cpp:
 
9613         (JSC::Structure::~Structure):
 
9614         (JSC::Structure::materializePropertyMap):
 
9615         * runtime/Structure.h:
 
9616         (JSC::Structure::create):
 
9617         (JSC::Structure::anonymousSlotCount):
 
9618         * runtime/StructureTransitionTable.h:
 
9620 2010-01-27  Oliver Hunt  <oliver@apple.com>
 
9624         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
9626 2010-01-27  Oliver Hunt  <oliver@apple.com>
 
9628         Reviewed by Maciej Stachowiak.
 
9630         MessageEvent.data should deserialize in the context of the MessageEvent's global object
 
9631         https://bugs.webkit.org/show_bug.cgi?id=34227
 
9633         Add logic to allow us to create an Object, Array, or Date instance
 
9634         so we can create them in the context of a specific global object,
 
9635         rather than just using the current lexical global object.
 
9637         * JavaScriptCore.exp:
 
9638         * runtime/DateInstance.cpp:
 
9639         (JSC::DateInstance::DateInstance):
 
9640         * runtime/DateInstance.h:
 
9641         * runtime/JSGlobalObject.h:
 
9642         (JSC::constructEmptyObject):
 
9643         (JSC::constructEmptyArray):
 
9645 2010-01-27  Alexey Proskuryakov  <ap@apple.com>
 
9647         Reviewed by Darin Adler.
 
9649         https://bugs.webkit.org/show_bug.cgi?id=34150
 
9650         WebKit needs a mechanism to catch stale HashMap entries
 
9652         It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
 
9653         is just its value, it is very unlikely that any observable problem is reproducible.
 
9655         This extends hash table consistency checks to check that pointers are referencing allocated
 
9656         memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
 
9657         to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
 
9659         * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
 
9660         add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
 
9663         * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
 
9664         CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
 
9667         (WTF::HashTable::internalCheckTableConsistency):
 
9668         (WTF::HashTable::internalCheckTableConsistencyExceptSize):
 
9669         (WTF::HashTable::checkTableConsistencyExceptSize):
 
9670         Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
 
9671         (WTF::::add): Updated for checkTableConsistency renaming.
 
9672         (WTF::::addPassingHashCode): Ditto.
 
9673         (WTF::::removeAndInvalidate): Ditto.
 
9674         (WTF::::remove): Ditto.
 
9675         (WTF::::rehash): Ditto.
 
9676         (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
 
9677         function returns true for tables with m_table == 0.
 
9678         (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
 
9679         we could do the same for values.
 
9682         (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
 
9683         to add checks. Currently, the only override is for pointer hashes.
 
9685         * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
 
9687 2010-01-27  Anton Muhin  <antonm@chromium.org>
 
9689         Reviewed by Darin Adler.
 
9691         Remove trailing \ from inline function code
 
9692         https://bugs.webkit.org/show_bug.cgi?id=34223
 
9694         * assembler/ARMv7Assembler.h:
 
9695         (JSC::ARMThumbImmediate::countLeadingZerosPartial):
 
9697 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
 
9699         Reviewed by Eric Seidel.
 
9701         [BREWMP] Port WTF's randomNumber
 
9702         https://bugs.webkit.org/show_bug.cgi?id=33566
 
9704         Use GETRAND to generate 4 byte random byte sequence to implement
 
9705         weakRandomNumber. Create a secure random number generator with
 
9706         AEECLSID_RANDOM to implement randomNumber.
 
9708         * wtf/RandomNumber.cpp:
 
9709         (WTF::weakRandomNumber):
 
9710         (WTF::randomNumber):
 
9712 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
 
9714         Reviewed by Eric Seidel.
 
9716         [BREWMP] Port getCPUTime
 
9717         https://bugs.webkit.org/show_bug.cgi?id=33572
 
9719         Use GETUPTIMEMS which returns a continuously and
 
9720         linearly increasing millisecond timer from the time the device
 
9721         was powered on. This function is enough to implement getCPUTime.
 
9723         * runtime/TimeoutChecker.cpp:
 
9726 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
 
9728         Reviewed by Oliver Hunt.
 
9730         [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap.
 
9731         https://bugs.webkit.org/show_bug.cgi?id=33582
 
9733         Use fastMalloc and fastFree to implement MarkStack::allocateStack and
 
9734         MarkStack::releaseStack for platforms without page level allocation.
 
9736         * runtime/MarkStack.h:
 
9737         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
 
9738         * runtime/MarkStackNone.cpp: Added.
 
9739         (JSC::MarkStack::initializePagesize):
 
9740         (JSC::MarkStack::allocateStack):
 
9741         (JSC::MarkStack::releaseStack):
 
9743 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
 
9745         Reviewed by Eric Seidel.
 
9747         [BREWMP] Don't use time function
 
9748         https://bugs.webkit.org/show_bug.cgi?id=33577
 
9750         Calling time(0) in BREW devices causes a crash because time
 
9751         is not properly ported in most devices. Cast currentTime() to
 
9752         time_t to get the same result as time(0).
 
9755         (WTF::calculateUTCOffset):
 
9757 2010-01-27  Alexey Proskuryakov  <ap@apple.com>
 
9759         Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes,
 
9760         because they make SVG tests crash in release builds.
 
9768         (WTF::::addPassingHashCode):
 
9769         (WTF::::removeAndInvalidate):
 
9772         (WTF::::checkTableConsistency):
 
9773         (WTF::::checkTableConsistencyExceptSize):
 
9775         (WTF::GenericHashTraits::emptyValue):
 
9777         * wtf/RefPtrHashMap.h:
 
9780 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
 
9782         More Windows build fixing.
 
9784         * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type.
 
9786 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
 
9790         * wtf/HashTraits.h: Include malloc.h for _msize().
 
9792 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
 
9796         * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a
 
9797         static (empty) version of this function.
 
9799 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
 
9801         Reviewed by Darin Adler.
 
9803         https://bugs.webkit.org/show_bug.cgi?id=34150
 
9804         WebKit needs a mechanism to catch stale HashMap entries
 
9806         It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
 
9807         is just its value, it is very unlikely that any observable problem is reproducible.
 
9809         This extends hash table consistency checks to check that pointers are referencing allocated
 
9810         memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
 
9811         to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
 
9813         * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
 
9814         add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
 
9817         * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
 
9818         CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
 
9821         (WTF::HashTable::internalCheckTableConsistency):
 
9822         (WTF::HashTable::internalCheckTableConsistencyExceptSize):
 
9823         (WTF::HashTable::checkTableConsistencyExceptSize):
 
9824         Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
 
9825         (WTF::::add): Updated for checkTableConsistency renaming.
 
9826         (WTF::::addPassingHashCode): Ditto.
 
9827         (WTF::::removeAndInvalidate): Ditto.
 
9828         (WTF::::remove): Ditto.
 
9829         (WTF::::rehash): Ditto.
 
9830         (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
 
9831         function returns true for tables with m_table == 0.
 
9832         (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
 
9833         we could do the same for values.
 
9836         (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
 
9837         to add checks. Currently, the only override is for pointer hashes.
 
9839         * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
 
9841 2010-01-26  Lyon Chen  <liachen@rim.com>
 
9843         Reviewed by Maciej Stachowiak.
 
9845         Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
 
9846         https://bugs.webkit.org/show_bug.cgi?id=33902
 
9848         * bytecode/Opcode.h:
 
9850 2010-01-26  Steve Falkenburg  <sfalken@apple.com>
 
9852         Reviewed by Oliver Hunt.
 
9854         Windows build references non-existent include paths
 
9855         https://bugs.webkit.org/show_bug.cgi?id=34175
 
9857         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
9858         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
9859         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
 
9860         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
9861         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
 
9862         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
 
9864 2010-01-26  Oliver Hunt  <oliver@apple.com>
 
9866         Reviewed by Geoffrey Garen.
 
9868         Using JavaScriptCore API with a webkit vended context can result in slow script dialog
 
9869         https://bugs.webkit.org/show_bug.cgi?id=34172
 
9871         Make the APIShim correctly increment and decrement the timeout
 
9875         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
 
9876         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
 
9877         (JSC::APICallbackShim::APICallbackShim):
 
9878         (JSC::APICallbackShim::~APICallbackShim):
 
9880 2010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
 
9882         [Qt] Fix compilation of QtScript with non-gcc compilers
 
9884         Variable length stack arrays are a gcc extension. Use QVarLengthArray
 
9885         as a more portable solution that still tries to allocate on the stack
 
9888         * qt/api/qscriptvalue_p.h:
 
9889         (QScriptValuePrivate::call):
 
9891 2010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
 
9893         Reviewed by Tor Arne Vestbø.
 
9895         [Qt] Fix the build on platforms without JIT support.
 
9897         The JIT support should be determined at compile-time via wtf/Platform.h
 
9899         * qt/api/QtScript.pro:
 
9901 2010-01-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
9903         Reviewed by Simon Hausmann.
 
9905         First steps of the QtScript API.
 
9907         Two new classes were created; QScriptEngine and QScriptValue.
 
9908         The first should encapsulate a javascript context and the second a script
 
9911         This API is still in development, so it isn't compiled by default.
 
9912         To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
 
9915         https://bugs.webkit.org/show_bug.cgi?id=32565
 
9917         * qt/api/QtScript.pro: Added.
 
9918         * qt/api/qscriptconverter_p.h: Added.
 
9919         (QScriptConverter::toString):
 
9920         * qt/api/qscriptengine.cpp: Added.
 
9921         (QScriptEngine::QScriptEngine):
 
9922         (QScriptEngine::~QScriptEngine):
 
9923         (QScriptEngine::evaluate):
 
9924         (QScriptEngine::collectGarbage):
 
9925         * qt/api/qscriptengine.h: Added.
 
9926         * qt/api/qscriptengine_p.cpp: Added.
 
9927         (QScriptEnginePrivate::QScriptEnginePrivate):
 
9928         (QScriptEnginePrivate::~QScriptEnginePrivate):
 
9929         (QScriptEnginePrivate::evaluate):
 
9930         * qt/api/qscriptengine_p.h: Added.
 
9931         (QScriptEnginePrivate::get):
 
9932         (QScriptEnginePrivate::collectGarbage):
 
9933         (QScriptEnginePrivate::makeJSValue):
 
9934         (QScriptEnginePrivate::context):
 
9935         * qt/api/qscriptvalue.cpp: Added.
 
9936         (QScriptValue::QScriptValue):
 
9937         (QScriptValue::~QScriptValue):
 
9938         (QScriptValue::isValid):
 
9939         (QScriptValue::isBool):
 
9940         (QScriptValue::isBoolean):
 
9941         (QScriptValue::isNumber):
 
9942         (QScriptValue::isNull):
 
9943         (QScriptValue::isString):
 
9944         (QScriptValue::isUndefined):
 
9945         (QScriptValue::isError):
 
9946         (QScriptValue::isObject):
 
9947         (QScriptValue::isFunction):
 
9948         (QScriptValue::toString):
 
9949         (QScriptValue::toNumber):
 
9950         (QScriptValue::toBool):
 
9951         (QScriptValue::toBoolean):
 
9952         (QScriptValue::toInteger):
 
9953         (QScriptValue::toInt32):
 
9954         (QScriptValue::toUInt32):
 
9955         (QScriptValue::toUInt16):
 
9956         (QScriptValue::call):
 
9957         (QScriptValue::engine):
 
9958         (QScriptValue::operator=):
 
9959         (QScriptValue::equals):
 
9960         (QScriptValue::strictlyEquals):
 
9961         * qt/api/qscriptvalue.h: Added.
 
9963         * qt/api/qscriptvalue_p.h: Added.
 
9964         (QScriptValuePrivate::):
 
9965         (QScriptValuePrivate::get):
 
9966         (QScriptValuePrivate::QScriptValuePrivate):
 
9967         (QScriptValuePrivate::isValid):
 
9968         (QScriptValuePrivate::isBool):
 
9969         (QScriptValuePrivate::isNumber):
 
9970         (QScriptValuePrivate::isNull):
 
9971         (QScriptValuePrivate::isString):
 
9972         (QScriptValuePrivate::isUndefined):
 
9973         (QScriptValuePrivate::isError):
 
9974         (QScriptValuePrivate::isObject):
 
9975         (QScriptValuePrivate::isFunction):
 
9976         (QScriptValuePrivate::toString):
 
9977         (QScriptValuePrivate::toNumber):
 
9978         (QScriptValuePrivate::toBool):
 
9979         (QScriptValuePrivate::toInteger):
 
9980         (QScriptValuePrivate::toInt32):
 
9981         (QScriptValuePrivate::toUInt32):
 
9982         (QScriptValuePrivate::toUInt16):
 
9983         (QScriptValuePrivate::equals):
 
9984         (QScriptValuePrivate::strictlyEquals):
 
9985         (QScriptValuePrivate::assignEngine):
 
9986         (QScriptValuePrivate::call):
 
9987         (QScriptValuePrivate::engine):
 
9988         (QScriptValuePrivate::context):
 
9989         (QScriptValuePrivate::value):
 
9990         (QScriptValuePrivate::object):
 
9991         (QScriptValuePrivate::inherits):
 
9992         (QScriptValuePrivate::isJSBased):
 
9993         (QScriptValuePrivate::isNumberBased):
 
9994         (QScriptValuePrivate::isStringBased):
 
9995         * qt/api/qtscriptglobal.h: Added.
 
9996         * qt/tests/qscriptengine/qscriptengine.pro: Added.
 
9997         * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added.
 
9998         (tst_QScriptEngine::tst_QScriptEngine):
 
9999         (tst_QScriptEngine::~tst_QScriptEngine):
 
10000         (tst_QScriptEngine::init):
 
10001         (tst_QScriptEngine::cleanup):
 
10002         (tst_QScriptEngine::collectGarbage):
 
10003         (tst_QScriptEngine::evaluate):
 
10004         * qt/tests/qscriptvalue/qscriptvalue.pro: Added.
 
10005         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added.
 
10006         (tst_QScriptValue::tst_QScriptValue):
 
10007         (tst_QScriptValue::~tst_QScriptValue):
 
10008         (tst_QScriptValue::init):
 
10009         (tst_QScriptValue::cleanup):
 
10010         (tst_QScriptValue::ctor):
 
10011         (tst_QScriptValue::toString_data):
 
10012         (tst_QScriptValue::toString):
 
10013         (tst_QScriptValue::copyConstructor_data):
 
10014         (tst_QScriptValue::copyConstructor):
 
10015         (tst_QScriptValue::assignOperator_data):
 
10016         (tst_QScriptValue::assignOperator):
 
10017         (tst_QScriptValue::dataSharing):
 
10018         (tst_QScriptValue::constructors_data):
 
10019         (tst_QScriptValue::constructors):
 
10020         (tst_QScriptValue::call):
 
10021         * qt/tests/tests.pri: Added.
 
10022         * qt/tests/tests.pro: Added.
 
10024 2010-01-25  Dmitry Titov  <dimich@chromium.org>
 
10026         Reviewed by David Levin.
 
10028         Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
 
10029         After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
 
10030         were already terminated and their threadMap entries cleared.
 
10033         * wtf/ThreadingPthreads.cpp:
 
10034         (WTF::waitForThreadCompletion):
 
10035         (WTF::detachThread):
 
10037 2010-01-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
10039         Reviewed by Maciej Stachowiak.
 
10041         Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function
 
10042         https://bugs.webkit.org/show_bug.cgi?id=33866
 
10044         Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION
 
10045         macro for those functions that are always present.
 
10047         * jit/JITStubs.cpp:
 
10048         (JSC::DEFINE_STUB_FUNCTION):
 
10050 2010-01-22  Kevin Watters  <kevinwatters@gmail.com>
 
10052         Reviewed by Kevin Ollivier.
 
10054         [wx] Remove the Bakefile build system, which is no longer being used.
 
10056         https://bugs.webkit.org/show_bug.cgi?id=34022
 
10058         * JavaScriptCoreSources.bkl: Removed.
 
10059         * jscore.bkl: Removed.
 
10061 2010-01-22  Steve Falkenburg  <sfalken@apple.com>
 
10063         Reviewed by Darin Adler.
 
10065         https://bugs.webkit.org/show_bug.cgi?id=34025
 
10066         Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
 
10068         * Configurations/FeatureDefines.xcconfig:
 
10070 2010-01-22  Dmitry Titov  <dimich@chromium.org>
 
10072         Not reviewed, attempted Snow Leopard build fix.
 
10074         * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'.
 
10076 2009-01-22  Dmitry Titov  <dimich@chromium.org>
 
10078         Reviewed by Maciej Stachowiak.
 
10080         Fix the leak of ThreadIdentifiers in threadMap across threads.
 
10081         https://bugs.webkit.org/show_bug.cgi?id=32689
 
10083         Test is added to DumpRenderTree.mm.
 
10085         * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build.
 
10086         * Android.v8.wtf.mk: Ditto.
 
10087         * GNUmakefile.am: Ditto.
 
10088         * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto.
 
10089         * JavaScriptCore.gypi: Ditto.
 
10090         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
 
10092         * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor.
 
10093         (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap.
 
10094         (WTF::ThreadIdentifierData::identifier):
 
10095         (WTF::ThreadIdentifierData::initialize):
 
10096         (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke.
 
10097         (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
 
10098         (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s).
 
10099         * wtf/ThreadIdentifierDataPthreads.h: Added.
 
10100         (WTF::ThreadIdentifierData::ThreadIdentifierData):
 
10102         * wtf/Threading.cpp:
 
10103         (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make
 
10104                                  sure it is invoked when ThreadIdentifier is already established.
 
10106         * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now.
 
10107         * wtf/ThreadingNone.cpp:
 
10108         (WTF::initializeCurrentThreadInternal): Ditto.
 
10109         * wtf/ThreadingWin.cpp:
 
10110         (WTF::initializeCurrentThreadInternal): Ditto.
 
10111         (WTF::initializeThreading): Ditto.
 
10112         * wtf/gtk/ThreadingGtk.cpp:
 
10113         (WTF::initializeCurrentThreadInternal): Ditto.
 
10114         * wtf/qt/ThreadingQt.cpp:
 
10115         (WTF::initializeCurrentThreadInternal): Ditto.
 
10117         * wtf/ThreadingPthreads.cpp:
 
10118         (WTF::establishIdentifierForPthreadHandle):
 
10119         (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it.
 
10120         (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread.
 
10121         (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData().
 
10122         (WTF::detachThread): Ditto.
 
10123         (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map.
 
10124                               Also, set the thread-specific data if called first time on the thread.
 
10126 2010-01-21  Kwang Yul Seo  <skyul@company100.net>
 
10128         Reviewed by Alexey Proskuryakov.
 
10130         Add ThreadSpecific for ENABLE(SINGLE_THREADED)
 
10131         https://bugs.webkit.org/show_bug.cgi?id=33878
 
10133         Implement ThreadSpecific with a simple getter/setter
 
10134         when ENABLE(SINGLE_THREADED) is true.
 
10136         Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236,
 
10137         an implementation of ThreadSpecific must be available to build WebKit.
 
10138         This causes a build failure for platforms without a proper
 
10139         ThreadSpecific implementation.
 
10141         * wtf/ThreadSpecific.h:
 
10142         (WTF::::ThreadSpecific):
 
10143         (WTF::::~ThreadSpecific):
 
10148 2010-01-21  Kwang Yul Seo  <skyul@company100.net>
 
10150         Reviewed by Maciej Stachowiak.
 
10152         Add fastStrDup to FastMalloc
 
10153         https://bugs.webkit.org/show_bug.cgi?id=33937
 
10155         The new string returned by fastStrDup is obtained with fastMalloc,
 
10156         and can be freed with fastFree. This makes the memory management 
 
10157         more consistent because we don't need to keep strdup allocated pointers
 
10158         and free them with free(). Instead we can use fastFree everywhere.
 
10160         * wtf/FastMalloc.cpp:
 
10162         * wtf/FastMalloc.h:
 
10164 2010-01-21  Brady Eidson  <beidson@apple.com>
 
10166         Reviewed by Maciej Stachowiak.
 
10168         history.back() for same-document history traversals isn't synchronous as the specification states.
 
10169         <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538
 
10171         * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium.
 
10173 2010-01-21  Geoffrey Garen  <ggaren@apple.com>
 
10175         Reviewed by Oliver Hunt.
 
10177         Always create a prototype for automatically managed classes.
 
10179         This fixes some errors where prototype chains were not correctly hooked
 
10180         up, and also ensures that API classes work correctly with features like
 
10183         * API/JSClassRef.cpp:
 
10184         (OpaqueJSClass::create): Cleaned up some of this code. Also changed it
 
10185         to always create a prototype class.
 
10187         * API/tests/testapi.c:
 
10189         (main): Fixed a null value crash in the exception checking code.
 
10190         * API/tests/testapi.js: Added some tests for the case where a prototype
 
10191         chain would not be hooked up correctly.
 
10193 2010-01-21  Oliver Hunt  <oliver@apple.com>
 
10195         Reviewed by Geoff Garen.
 
10197         Force JSC to create a prototype chain for API classes with a
 
10198         parent class but no static functions.
 
10200         * API/JSClassRef.cpp:
 
10201         (OpaqueJSClass::create):
 
10203 2010-01-21  Kent Hansen  <kent.hansen@nokia.com>
 
10205         Reviewed by Geoffrey Garen.
 
10207         Object.getOwnPropertyDescriptor always returns undefined for JS API objects
 
10208         https://bugs.webkit.org/show_bug.cgi?id=33946
 
10210         Ideally the getOwnPropertyDescriptor() reimplementation should return an
 
10211         access descriptor that wraps the property getter and setter callbacks, but
 
10212         that approach is much more involved than returning a value descriptor.
 
10213         Keep it simple for now.
 
10215         * API/JSCallbackObject.h:
 
10216         * API/JSCallbackObjectFunctions.h:
 
10217         (JSC::::getOwnPropertyDescriptor):
 
10218         * API/tests/testapi.js:
 
10220 2010-01-20  Mark Rowe  <mrowe@apple.com>
 
10224         * wtf/FastMalloc.cpp:
 
10225         (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call.
 
10227 2010-01-20  Mark Rowe  <mrowe@apple.com>
 
10229         Reviewed by Oliver Hunt.
 
10231         Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes.
 
10233         * wtf/TCSpinLock.h:
 
10234         (TCMalloc_SpinLock::Lock):
 
10235         (TCMalloc_SpinLock::Unlock):
 
10236         (TCMalloc_SlowLock):
 
10238 2010-01-20  Mark Rowe  <mrowe@apple.com>
 
10240         Reviewed by Oliver Hunt.
 
10242         <rdar://problem/7215063> Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported
 
10244         Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms
 
10245         where it is supported.
 
10247         * wtf/FastMalloc.cpp:
 
10248         (WTF::TCMalloc_PageHeap::init):
 
10249         (WTF::TCMalloc_PageHeap::initializeScavenger):
 
10250         (WTF::TCMalloc_PageHeap::signalScavenger):
 
10251         (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
 
10252         (WTF::TCMalloc_PageHeap::Delete):
 
10253         (WTF::TCMalloc_PageHeap::periodicScavenge):
 
10256 2010-01-20  Geoffrey Garen  <ggaren@apple.com>
 
10258         Reviewed by Oliver Hunt.
 
10260         <rdar://problem/7562708> REGRESSION(53460): Heap::destroy may not run
 
10263         * runtime/Collector.cpp:
 
10264         (JSC::Heap::freeBlocks): Instead of fully marking protected objects,
 
10265         just set their mark bits. This prevents protected objects from keeping
 
10266         unprotected objects alive. Destructor order is not guaranteed, so it's
 
10267         OK to destroy objects pointed to by protected objects before destroying
 
10270 2010-01-19  David Levin  <levin@chromium.org>
 
10272         Reviewed by Oliver Hunt.
 
10274         CrossThreadCopier needs to support ThreadSafeShared better.
 
10275         https://bugs.webkit.org/show_bug.cgi?id=33698
 
10277         * wtf/TypeTraits.cpp: Added tests for the new type traits.
 
10278         * wtf/TypeTraits.h:
 
10279         (WTF::IsSubclass): Determines if a class is a derived from another class.
 
10280         (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a
 
10281         template class (with one parameter that is unknown).
 
10282         (WTF::RemoveTemplate): Reveals the type for a template parameter.
 
10284 2010-01-20  Steve Falkenburg  <sfalken@apple.com>
 
10286         Reviewed by Darin Adler and Adam Roben.
 
10288         Feature defines are difficult to maintain on Windows builds
 
10289         https://bugs.webkit.org/show_bug.cgi?id=33883
 
10291         FeatureDefines.vsprops are now maintained in a way similar to
 
10292         Configurations/FeatureDefines.xcconfig, with the added advantage
 
10293         of having a single FeatureDefines file across all projects.
 
10295         * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
 
10296         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet.
 
10297         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet.
 
10299 2010-01-20  Csaba Osztrogonác  <ossy@webkit.org>
 
10301         [Qt] Unreviewed buildfix for r53547.
 
10303         * DerivedSources.pro:
 
10305 2010-01-20  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
10307         Reviewed by Simon Hausmann.
 
10309         [Qt] Make extraCompilers for generated sources depend on their scripts
 
10311         * DerivedSources.pro:
 
10313 2010-01-19  Brian Weinstein  <bweinstein@apple.com>
 
10315         Reviewed by Tim Hatcher.
 
10317         When JavaScriptCore calls Debugger::Exception, have it pass a
 
10318         hasHandler variable that represents if exception is being handled
 
10319         in the same function (not in a parent on the call stack).
 
10321         This just adds a new parameter, no behavior is changed.
 
10323         * debugger/Debugger.h:
 
10324         * interpreter/Interpreter.cpp:
 
10325         (JSC::Interpreter::throwException):
 
10327 2010-01-18  Maciej Stachowiak  <mjs@apple.com>
 
10329         Reviewed by Adam Barth.
 
10331         Inline functions that are hot in DOM manipulation
 
10332         https://bugs.webkit.org/show_bug.cgi?id=33820
 
10334         (3% speedup on Dromaeo DOM Core tests)
 
10336         * runtime/WeakGCMap.h:
 
10337         (JSC::::get): inline
 
10339 2010-01-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
10341         Unreviewed build fix for JIT with RVCT.
 
10343         Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h.
 
10346         * jit/JITStubs.cpp:
 
10347         (JSC::ctiVMThrowTrampoline):
 
10349 2010-01-19  Geoffrey Garen  <ggaren@apple.com>
 
10351         Reviewed by Oliver Hunt.
 
10353         REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
 
10354         https://bugs.webkit.org/show_bug.cgi?id=33826
 
10356         This bug was caused by a GC-protected object being destroyed early by
 
10357         Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
 
10358         to GC-protected memory to be valid.
 
10360         The solution is to do two passes of tear-down in Heap::destroy. The first
 
10361         pass tears down all unprotected objects. The second pass ASSERTs that all
 
10362         previously protected objects are now unprotected, and then tears down
 
10363         all perviously protected objects. These two passes simulate the two passes
 
10364         that would have been required to free a protected object during normal GC.
 
10366         * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
 
10368         * runtime/Collector.cpp:
 
10369         (JSC::Heap::destroy): Moved ASSERTs to here.
 
10370         (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
 
10371         setter to the function that does the shrinking.
 
10372         (JSC::Heap::freeBlocks): Implemented above algorithm.
 
10373         (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
 
10375 2010-01-19  Gavin Barraclough  <barraclough@apple.com>
 
10377         Reviewed by NOBODY (build fix).
 
10379         Reverting r53455, breaks 2 javascriptcore tests.
 
10381         * API/JSContextRef.cpp:
 
10382         * runtime/Collector.cpp:
 
10383         (JSC::Heap::destroy):
 
10384         (JSC::Heap::freeBlock):
 
10385         (JSC::Heap::freeBlocks):
 
10386         (JSC::Heap::shrinkBlocks):
 
10388 2010-01-18  Gavin Barraclough  <barraclough@apple.com>
 
10390         Reviewed by NOBODY (build fix).
 
10392         Revert r53454, since it causes much sadness in this world.
 
10394         * runtime/UString.cpp:
 
10395         (JSC::UString::spliceSubstringsWithSeparators):
 
10396         (JSC::UString::replaceRange):
 
10397         * runtime/UStringImpl.cpp:
 
10398         (JSC::UStringImpl::baseSharedBuffer):
 
10399         (JSC::UStringImpl::sharedBuffer):
 
10400         (JSC::UStringImpl::~UStringImpl):
 
10401         * runtime/UStringImpl.h:
 
10402         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
 
10403         (JSC::UntypedPtrAndBitfield::asPtr):
 
10404         (JSC::UntypedPtrAndBitfield::operator&=):
 
10405         (JSC::UntypedPtrAndBitfield::operator|=):
 
10406         (JSC::UntypedPtrAndBitfield::operator&):
 
10407         (JSC::UStringImpl::create):
 
10408         (JSC::UStringImpl::cost):
 
10409         (JSC::UStringImpl::isIdentifier):
 
10410         (JSC::UStringImpl::setIsIdentifier):
 
10411         (JSC::UStringImpl::ref):
 
10412         (JSC::UStringImpl::deref):
 
10413         (JSC::UStringImpl::checkConsistency):
 
10414         (JSC::UStringImpl::UStringImpl):
 
10415         (JSC::UStringImpl::bufferOwnerString):
 
10416         (JSC::UStringImpl::bufferOwnership):
 
10417         (JSC::UStringImpl::isStatic):
 
10418         * wtf/StringHashFunctions.h:
 
10421 2010-01-18  Geoffrey Garen  <ggaren@apple.com>
 
10423         Reviewed by Oliver Hunt.
 
10425         REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
 
10426         https://bugs.webkit.org/show_bug.cgi?id=33826
 
10428         This bug was caused by a GC-protected object being destroyed early by
 
10429         Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
 
10430         to GC-protected memory to be valid.
 
10432         The solution is to do two passes of tear-down in Heap::destroy. The first
 
10433         pass tears down all unprotected objects. The second pass ASSERTs that all
 
10434         previously protected objects are now unprotected, and then tears down
 
10435         all perviously protected objects. These two passes simulate the two passes
 
10436         that would have been required to free a protected object during normal GC.
 
10438         * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
 
10440         * runtime/Collector.cpp:
 
10441         (JSC::Heap::destroy): Moved ASSERTs to here.
 
10442         (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
 
10443         setter to the function that does the shrinking.
 
10444         (JSC::Heap::freeBlocks): Implemented above algorithm.
 
10445         (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
 
10447 2010-01-18  Gavin Barraclough  <barraclough@apple.com>
 
10449         Reviewed by Oliver Hunt.
 
10451         https://bugs.webkit.org/show_bug.cgi?id=33731
 
10452         Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
 
10454         This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
 
10456         * runtime/UStringImpl.cpp:
 
10457         (JSC::UStringImpl::sharedBuffer):
 
10458         (JSC::UStringImpl::~UStringImpl):
 
10459         * runtime/UStringImpl.h:
 
10460         (JSC::UStringImpl::cost):
 
10461         (JSC::UStringImpl::checkConsistency):
 
10462         (JSC::UStringImpl::UStringImpl):
 
10463         (JSC::UStringImpl::bufferOwnerString):
 
10464         (JSC::UStringImpl::):
 
10465         * wtf/StringHashFunctions.h:
 
10468 2010-01-18  Kent Tamura  <tkent@chromium.org>
 
10470         Reviewed by Darin Adler.
 
10472         HTMLInputElement::valueAsDate setter support for type=month.
 
10473         https://bugs.webkit.org/show_bug.cgi?id=33021
 
10475         Expose the following functions to be used by WebCore:
 
10478          - WTF::monthFromDayInYear()
 
10479          - WTF::dayInMonthFromDayInYear()
 
10481         * JavaScriptCore.exp:
 
10482         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
10483         * wtf/DateMath.cpp:
 
10484         (WTF::msToYear): Remove "static inline".
 
10485         (WTF::dayInYear): Remove "static inline".
 
10486         (WTF::monthFromDayInYear): Remove "static inline".
 
10487         (WTF::dayInMonthFromDayInYear): Remove "static inline".
 
10488         * wtf/DateMath.h: Declare the above functions.
 
10490 2010-01-18  Darin Adler  <darin@apple.com>
 
10492         Fix build by reverting the previous change.
 
10494         * runtime/UString.h: Rolled out the FastAllocBase base class.
 
10495         It was making UString larger, and therefore JSString larger,
 
10496         and too big for a garbage collection cell.
 
10498         This raises the unpleasant possibility that many classes became
 
10499         larger because we added the FastAllocBase base class. I am
 
10500         worried about this, and it needs to be investigated.
 
10502 2010-01-18  Zoltan Horvath  <zoltan@webkit.org>
 
10504         Reviewed by Darin Adler.
 
10506         Allow custom memory allocation control for UString class
 
10507         https://bugs.webkit.org/show_bug.cgi?id=27831
 
10509         Inherits the following class from FastAllocBase because it is
 
10510         instantiated by 'new' and no need to be copyable:
 
10512         class name     - instantiated at:
 
10513         classs UString - JavaScriptCore/runtime/UString.cpp:160
 
10515         * runtime/UString.h:
 
10517 2010-01-18  Evan Cheng  <evan.cheng@apple.com>
 
10519         Reviewed by Darin Adler.
 
10521         Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC.
 
10522         rdar://problem/7553780
 
10524         * runtime/JSObject.h:
 
10525         (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads.
 
10526         * runtime/JSString.h:
 
10527         (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString.
 
10528         * runtime/UString.h:
 
10529         (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects.
 
10531 2010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
 
10533         Reviewed by Darin Adler.
 
10535         Delete dftables-xxxxxxxx.in files automatically.
 
10536         https://bugs.webkit.org/show_bug.cgi?id=33796
 
10538         * pcre/dftables: unlink unnecessary temporary file.
 
10540 2010-01-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
10542         Reviewed by Simon Hausmann.
 
10544         [Qt] Force qmake to generate a single makefile for DerivedSources.pro
 
10546         * DerivedSources.pro:
 
10548 2010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
 
10550         Rubber-stamped by Gustavo Noronha Silva.
 
10552         Rolling out r53391 and r53392 because of random crashes on buildbots.
 
10553         https://bugs.webkit.org/show_bug.cgi?id=33731
 
10555         * bytecode/CodeBlock.h:
 
10556         (JSC::CallLinkInfo::seenOnce):
 
10557         (JSC::CallLinkInfo::setSeen):
 
10558         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
 
10559         (JSC::MethodCallLinkInfo::seenOnce):
 
10560         (JSC::MethodCallLinkInfo::setSeen):
 
10562         (JSC::JIT::unlinkCall):
 
10563         * jit/JITPropertyAccess.cpp:
 
10564         (JSC::JIT::patchMethodCallProto):
 
10565         * runtime/UString.cpp:
 
10566         (JSC::UString::spliceSubstringsWithSeparators):
 
10567         (JSC::UString::replaceRange):
 
10568         * runtime/UString.h:
 
10569         * runtime/UStringImpl.cpp:
 
10570         (JSC::UStringImpl::baseSharedBuffer):
 
10571         (JSC::UStringImpl::sharedBuffer):
 
10572         (JSC::UStringImpl::~UStringImpl):
 
10573         * runtime/UStringImpl.h:
 
10574         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
 
10575         (JSC::UntypedPtrAndBitfield::asPtr):
 
10576         (JSC::UntypedPtrAndBitfield::operator&=):
 
10577         (JSC::UntypedPtrAndBitfield::operator|=):
 
10578         (JSC::UntypedPtrAndBitfield::operator&):
 
10579         (JSC::UStringImpl::create):
 
10580         (JSC::UStringImpl::cost):
 
10581         (JSC::UStringImpl::isIdentifier):
 
10582         (JSC::UStringImpl::setIsIdentifier):
 
10583         (JSC::UStringImpl::ref):
 
10584         (JSC::UStringImpl::deref):
 
10585         (JSC::UStringImpl::checkConsistency):
 
10586         (JSC::UStringImpl::UStringImpl):
 
10587         (JSC::UStringImpl::bufferOwnerString):
 
10588         (JSC::UStringImpl::bufferOwnership):
 
10589         (JSC::UStringImpl::isStatic):
 
10590         * wtf/StringHashFunctions.h:
 
10593 2010-01-18  Simon Hausmann  <simon.hausmann@nokia.com>
 
10595         Reviewed by Kenneth Rohde Christiansen.
 
10597         Fix the build with strict gcc and RVCT versions: It's not legal to cast a
 
10598         pointer to a function to a void* without an intermediate cast to a non-pointer
 
10599         type. A cast to a ptrdiff_t inbetween fixes it.
 
10601         * runtime/JSString.h:
 
10602         (JSC::Fiber::JSString):
 
10604 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
 
10606         Reviewed by Oliver Hunt.
 
10608         https://bugs.webkit.org/show_bug.cgi?id=33731
 
10609         Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
 
10611         This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
 
10613         * runtime/UStringImpl.cpp:
 
10614         (JSC::UStringImpl::sharedBuffer):
 
10615         (JSC::UStringImpl::~UStringImpl):
 
10616         * runtime/UStringImpl.h:
 
10617         (JSC::UStringImpl::cost):
 
10618         (JSC::UStringImpl::checkConsistency):
 
10619         (JSC::UStringImpl::UStringImpl):
 
10620         (JSC::UStringImpl::bufferOwnerString):
 
10621         (JSC::UStringImpl::):
 
10622         * wtf/StringHashFunctions.h:
 
10625 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
 
10627         Reviewed by Oliver Hunt.
 
10629         https://bugs.webkit.org/show_bug.cgi?id=33731
 
10630         Remove uses of PtrAndFlags from JIT data stuctures.
 
10632         These break the OS X Leaks tool.  Free up a bit in CallLinkInfo, and invalid
 
10633         permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
 
10635         * bytecode/CodeBlock.h:
 
10636         (JSC::CallLinkInfo::seenOnce):
 
10637         (JSC::CallLinkInfo::setSeen):
 
10638         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
 
10639         (JSC::MethodCallLinkInfo::seenOnce):
 
10640         (JSC::MethodCallLinkInfo::setSeen):
 
10642         (JSC::JIT::unlinkCall):
 
10643         * jit/JITPropertyAccess.cpp:
 
10644         (JSC::JIT::patchMethodCallProto):
 
10645         * runtime/UString.h:
 
10647 2010-01-16  Maciej Stachowiak  <mjs@apple.com>
 
10649         Reviewed by Oliver Hunt.
 
10651         Cache JS string values made from DOM strings (Dromaeo speedup)
 
10652         https://bugs.webkit.org/show_bug.cgi?id=33768
 
10653         <rdar://problem/7353576>
 
10655         * runtime/JSString.h:
 
10656         (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
 
10657         finalizer callback, for the benefit of weak-referencing caches.
 
10659         (JSC::Fiber::JSString):
 
10660         (JSC::Fiber::~JSString):
 
10661         * runtime/JSString.cpp:
 
10662         (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
 
10663         * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
 
10665 2010-01-15  Sam Weinig  <sam@webkit.org>
 
10667         Reviewed by Maciej Stachowiak.
 
10669         Fix for <rdar://problem/7548432>
 
10670         Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc.
 
10672         * runtime/Operations.h:
 
10675 2010-01-14  Geoffrey Garen  <ggaren@apple.com>
 
10677         Reviewed by Oliver Hunt.
 
10679         REGRESISON: Google maps buttons not working properly
 
10680         https://bugs.webkit.org/show_bug.cgi?id=31871
 
10682         REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
 
10683         getting directions for a second time
 
10684         https://bugs.webkit.org/show_bug.cgi?id=33446
 
10686         SunSpider and v8 report no change.
 
10688         * interpreter/Interpreter.cpp:
 
10689         (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case
 
10690         flattening the dictionary changed any of its offsets.
 
10692         * jit/JITStubs.cpp:
 
10693         (JSC::JITThunks::tryCacheGetByID):
 
10694         (JSC::DEFINE_STUB_FUNCTION):
 
10695         * runtime/Operations.h:
 
10696         (JSC::normalizePrototypeChain): ditto
 
10698 2010-01-14  Gavin Barraclough  <barraclough@apple.com>
 
10700         Reviewed by Oliver Hunt.
 
10702         https://bugs.webkit.org/show_bug.cgi?id=33705
 
10703         UStringImpl::create() should use internal storage
 
10705         When creating a UStringImpl copying of a UChar*, we can use an internal buffer,
 
10706         by calling UStringImpl::tryCreateUninitialized().
 
10708         Also, remove duplicate of copyChars from JSString, call UStringImpl's version.
 
10710         Small (max 0.5%) progression on Sunspidey.
 
10712         * runtime/JSString.cpp:
 
10713         (JSC::JSString::resolveRope):
 
10714         * runtime/UStringImpl.h:
 
10715         (JSC::UStringImpl::create):
 
10717 2010-01-14  Gavin Barraclough  <barraclough@apple.com>
 
10719         Reviewed by Sam Weinig.
 
10721         Make naming & behaviour of UString[Impl] methods more consistent.
 
10722         https://bugs.webkit.org/show_bug.cgi?id=33702
 
10724         UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
 
10725         that it should assume ownership of the provided buffer (with UString::createNonCopying()
 
10726         and UStringImpl::createCopying() providing the alternate behaviours).  Unify on create()
 
10727         taking a copy of the provided buffer.  For non-copying cases, use the name 'adopt', and
 
10728         make this method take a Vector<UChar>&.  For cases where non-copying construction was being
 
10729         used, other than from a Vector<UChar>, change the code to allocate the storage along with
 
10730         the UStringImpl using UStringImpl::createUninitialized().  (The adopt() method also more
 
10731         closely matches that of WebCore::StringImpl).
 
10733         Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
 
10734         behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
 
10735         indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
 
10736         indicate when allocation has failed (potentially leaving the output Char* uninitialized).
 
10737         This is also incompatible with WebCore::StringImpl's behaviour, in that
 
10738         StringImpl::createUninitialized() will CRASH() if unable to allocate.  Some uses of
 
10739         createUninitialized() in JSC are unsafe, since they do not test the result for null.
 
10740         UStringImpl's indication is preferable, since we may want a successful call to set the result
 
10741         buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
 
10742         returns the empty string, which seems reasonable to catch bugs early).  UString's method
 
10743         cannot support UStringImpl's behaviour directly, since it returns an object rather than a
 
10745             - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
 
10746             - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
 
10747               with current behaviour, make createUninitialized() crash on failure to allocate.
 
10748             - make cases in JSC that do not check the result call createUninitialized(), and cases that do
 
10749               check call tryCreateUninitialized().
 
10751         Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
 
10753         * API/JSClassRef.cpp:
 
10754         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
10755         * JavaScriptCore.exp:
 
10756         * runtime/ArrayPrototype.cpp:
 
10757         (JSC::arrayProtoFuncToString):
 
10758         * runtime/Identifier.cpp:
 
10759         (JSC::CStringTranslator::translate):
 
10760         (JSC::UCharBufferTranslator::translate):
 
10761         * runtime/JSString.cpp:
 
10762         (JSC::JSString::resolveRope):
 
10763         * runtime/Lookup.cpp:
 
10764         (JSC::HashTable::createTable):
 
10765         * runtime/Lookup.h:
 
10766         (JSC::HashTable::entry):
 
10767         * runtime/StringBuilder.h:
 
10768         (JSC::StringBuilder::release):
 
10769         * runtime/StringConstructor.cpp:
 
10770         (JSC::stringFromCharCodeSlowCase):
 
10771         * runtime/StringPrototype.cpp:
 
10772         (JSC::substituteBackreferencesSlow):
 
10773         (JSC::stringProtoFuncToLowerCase):
 
10774         (JSC::stringProtoFuncToUpperCase):
 
10775         (JSC::stringProtoFuncFontsize):
 
10776         (JSC::stringProtoFuncLink):
 
10777         * runtime/Structure.cpp:
 
10778         (JSC::Structure::despecifyDictionaryFunction):
 
10779         (JSC::Structure::get):
 
10780         (JSC::Structure::despecifyFunction):
 
10781         (JSC::Structure::put):
 
10782         (JSC::Structure::remove):
 
10783         (JSC::Structure::insertIntoPropertyMapHashTable):
 
10784         (JSC::Structure::checkConsistency):
 
10785         * runtime/Structure.h:
 
10786         (JSC::Structure::get):
 
10787         * runtime/StructureTransitionTable.h:
 
10788         (JSC::StructureTransitionTableHash::hash):
 
10789         * runtime/UString.cpp:
 
10791         (JSC::UString::UString):
 
10792         (JSC::UString::spliceSubstringsWithSeparators):
 
10793         (JSC::UString::replaceRange):
 
10794         (JSC::UString::operator=):
 
10795         * runtime/UString.h:
 
10796         (JSC::UString::adopt):
 
10797         (JSC::IdentifierRepHash::hash):
 
10799         * runtime/UStringImpl.h:
 
10800         (JSC::UStringImpl::adopt):
 
10801         (JSC::UStringImpl::create):
 
10802         (JSC::UStringImpl::createUninitialized):
 
10803         (JSC::UStringImpl::tryCreateUninitialized):
 
10804         (JSC::UStringImpl::existingHash):
 
10806 2010-01-13  Kent Hansen  <kent.hansen@nokia.com>
 
10808         Reviewed by Oliver Hunt.
 
10810         JSON.stringify and JSON.parse needlessly process properties in the prototype chain
 
10811         https://bugs.webkit.org/show_bug.cgi?id=33053
 
10813         * runtime/JSONObject.cpp:
 
10814         (JSC::Stringifier::Holder::appendNextProperty):
 
10815         (JSC::Walker::walk):
 
10817 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
 
10819         Reviewed by NOBODY (buildfix).
 
10821         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
10823 2010-01-13  Alexey Proskuryakov  <ap@apple.com>
 
10825         Reviewed by Darin Adler.
 
10827         https://bugs.webkit.org/show_bug.cgi?id=33641
 
10828         Assertion failure in Lexer.cpp if input stream ends while in string escape
 
10830         Test: fast/js/end-in-string-escape.html
 
10832         * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the
 
10833         assertion a chance to fire.
 
10835 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
 
10837         Reviewed by NOBODY (buildfix).
 
10839         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
10841 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
 
10843         Rubber stamped by Sam Weinig & Darin Adler.
 
10845         Three quick fixes to UStringImpl.
 
10846             - The destroy() method can be switched back to a normal destructor; since we've switched
 
10847               the way we protect static strings to be using an odd ref-count the destroy() won't abort.
 
10848             - The cost() calculation logic was wrong.  If you have multiple JSStrings wrapping substrings
 
10849               of a base string, they would each report the full cost of the base string to the heap.
 
10850               Instead we should only be reporting once for the base string.
 
10851             - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick
 
10852               up the implementation from the parent class.
 
10854         * JavaScriptCore.exp:
 
10855         * runtime/UStringImpl.cpp:
 
10856         (JSC::UStringImpl::~UStringImpl):
 
10857         * runtime/UStringImpl.h:
 
10858         (JSC::UStringImpl::cost):
 
10859         (JSC::UStringImpl::deref):
 
10861 2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
10863         Reviewed by Simon Hausmann.
 
10865         [Qt] Split the build process in two different .pro files.
 
10866         This allows qmake to be run once all source files are available.
 
10868         * DerivedSources.pro: Added.
 
10869         * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
 
10870         * pcre/pcre.pri: Moved source generation to DerivedSources.pro
 
10872 2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
 
10874         Reviewed by Geoffrey Garen.
 
10876         [ES5] Implement Object.getOwnPropertyNames
 
10877         https://bugs.webkit.org/show_bug.cgi?id=32242
 
10879         Add an extra argument to getPropertyNames() and getOwnPropertyNames()
 
10880         (and all reimplementations thereof) that indicates whether non-enumerable
 
10881         properties should be added.
 
10883         * API/JSCallbackObject.h:
 
10884         * API/JSCallbackObjectFunctions.h:
 
10885         (JSC::::getOwnPropertyNames):
 
10886         * JavaScriptCore.exp:
 
10887         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
10888         * debugger/DebuggerActivation.cpp:
 
10889         (JSC::DebuggerActivation::getOwnPropertyNames):
 
10890         * debugger/DebuggerActivation.h:
 
10891         * runtime/Arguments.cpp:
 
10892         (JSC::Arguments::getOwnPropertyNames):
 
10893         * runtime/Arguments.h:
 
10894         * runtime/CommonIdentifiers.h:
 
10895         * runtime/JSArray.cpp:
 
10896         (JSC::JSArray::getOwnPropertyNames):
 
10897         * runtime/JSArray.h:
 
10898         * runtime/JSByteArray.cpp:
 
10899         (JSC::JSByteArray::getOwnPropertyNames):
 
10900         * runtime/JSByteArray.h:
 
10901         * runtime/JSFunction.cpp:
 
10902         (JSC::JSFunction::getOwnPropertyNames):
 
10903         * runtime/JSFunction.h:
 
10904         * runtime/JSNotAnObject.cpp:
 
10905         (JSC::JSNotAnObject::getOwnPropertyNames):
 
10906         * runtime/JSNotAnObject.h:
 
10907         * runtime/JSObject.cpp:
 
10908         (JSC::getClassPropertyNames):
 
10909         (JSC::JSObject::getPropertyNames):
 
10910         (JSC::JSObject::getOwnPropertyNames):
 
10911         * runtime/JSObject.h:
 
10912         * runtime/JSVariableObject.cpp:
 
10913         (JSC::JSVariableObject::getOwnPropertyNames):
 
10914         * runtime/JSVariableObject.h:
 
10915         * runtime/ObjectConstructor.cpp:
 
10916         (JSC::ObjectConstructor::ObjectConstructor):
 
10917         (JSC::objectConstructorGetOwnPropertyNames):
 
10918         * runtime/RegExpMatchesArray.h:
 
10919         (JSC::RegExpMatchesArray::getOwnPropertyNames):
 
10920         * runtime/StringObject.cpp:
 
10921         (JSC::StringObject::getOwnPropertyNames):
 
10922         * runtime/StringObject.h:
 
10923         * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
 
10924         (JSC::Structure::getPropertyNames):
 
10925         * runtime/Structure.h:
 
10928 2010-01-12  Alexey Proskuryakov  <ap@apple.com>
 
10930         Reviewed by Darin Adler.
 
10932         https://bugs.webkit.org/show_bug.cgi?id=33540
 
10933         Make it possible to build in debug mode with assertions disabled
 
10935         * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
 
10936         * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable):
 
10937         * wtf/FastMalloc.cpp:
 
10938         * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity):
 
10939         * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex):
 
10941 2009-11-23  Yong Li  <yoli@rim.com>
 
10943         Reviewed by Adam Treat.
 
10945         Make GIF decoder support down-sampling
 
10946         https://bugs.webkit.org/show_bug.cgi?id=31806
 
10948         * platform/image-decoders/ImageDecoder.cpp:
 
10949         (WebCore::ImageDecoder::upperBoundScaledY):
 
10950         (WebCore::ImageDecoder::lowerBoundScaledY):
 
10951         * platform/image-decoders/ImageDecoder.h:
 
10952         (WebCore::RGBA32Buffer::scaledRect):
 
10953         (WebCore::RGBA32Buffer::setScaledRect):
 
10954         (WebCore::ImageDecoder::scaledSize):
 
10955         * platform/image-decoders/gif/GIFImageDecoder.cpp:
 
10956         (WebCore::GIFImageDecoder::sizeNowAvailable):
 
10957         (WebCore::GIFImageDecoder::initFrameBuffer):
 
10958         (WebCore::copyOnePixel):
 
10959         (WebCore::GIFImageDecoder::haveDecodedRow):
 
10960         (WebCore::GIFImageDecoder::frameComplete):
 
10962 2010-01-12  Adam Barth  <abarth@webkit.org>
 
10964         Reviewed by Eric Seidel.
 
10966         ecma/Date/15.9.5.12-1.js fails every night at midnight
 
10967         https://bugs.webkit.org/show_bug.cgi?id=28041
 
10969         Change the test to use a concrete time instead of "now".
 
10971         * tests/mozilla/ecma/Date/15.9.5.10-1.js:
 
10972         * tests/mozilla/ecma/Date/15.9.5.12-1.js:
 
10974 2010-01-11  Csaba Osztrogonác  <ossy@webkit.org>
 
10976         Reviewed by Ariya Hidayat.
 
10978         [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100)
 
10982 2010-01-11  Geoffrey Garen  <ggaren@apple.com>
 
10984         Reviewed by Alexey Proskuryakov.
 
10986         https://bugs.webkit.org/show_bug.cgi?id=33481
 
10987         Uninitialized data members in ArrayStorage
 
10989         SunSpider reports no change.
 
10991         * runtime/JSArray.cpp:
 
10992         (JSC::JSArray::JSArray): Initialize missing data members in the two cases
 
10993         where we don't use fastZeroedMalloc, so it doesn't happen automatically.
 
10995 2010-01-11  Steve Falkenburg  <sfalken@apple.com>
 
10997         Reviewed by Sam Weinig.
 
10999         https://bugs.webkit.org/show_bug.cgi?id=33480
 
11001         Improve debugging reliability for WTF on Windows.
 
11002         Store WTF static library's PDB file into a better location.
 
11004         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
11006 2010-01-11  Steve Falkenburg  <sfalken@apple.com>
 
11009         Remove extraneous entries from def file causing build warning.
 
11011         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
11013 2010-01-10  Kent Hansen  <kent.hansen@nokia.com>
 
11015         Reviewed by Darin Adler.
 
11017         RegExp.prototype.toString returns "//" for empty regular expressions
 
11018         https://bugs.webkit.org/show_bug.cgi?id=33319
 
11020         "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
 
11022         * runtime/RegExpPrototype.cpp:
 
11023         (JSC::regExpProtoFuncToString):
 
11025         * tests/mozilla/ecma_2/RegExp/properties-001.js:
 
11027         * tests/mozilla/js1_2/regexp/toString.js:
 
11028         Update relevant Mozilla tests (Mozilla has had this behavior since November 2003).
 
11030 2010-01-10  Darin Adler  <darin@apple.com>
 
11032         * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs.
 
11033         * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs.
 
11034         * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs.
 
11035         * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs.
 
11036         * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs.
 
11037         * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs.
 
11038         * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs.
 
11039         * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs.
 
11040         * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs.
 
11041         * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs.
 
11042         * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs.
 
11043         * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs.
 
11044         * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs.
 
11045         * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs.
 
11046         * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs.
 
11047         * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs.
 
11048         * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs.
 
11049         * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs.
 
11050         * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs.
 
11051         * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs.
 
11052         * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs.
 
11053         * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs.
 
11054         * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs.
 
11055         * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs.
 
11056         * tests/mozilla/ecma/jsref.js: Modified property allow-tabs.
 
11057         * tests/mozilla/ecma/shell.js: Modified property allow-tabs.
 
11058         * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs.
 
11059         * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs.
 
11060         * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs.
 
11061         * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs.
 
11062         * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs.
 
11063         * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs.
 
11064         * tests/mozilla/ecma_2/shell.js: Added property allow-tabs.
 
11065         * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs.
 
11066         * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs.
 
11067         * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs.
 
11068         * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs.
 
11069         * tests/mozilla/importList.html: Added property allow-tabs.
 
11070         * tests/mozilla/js1_1/shell.js: Added property allow-tabs.
 
11071         * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs.
 
11072         * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs.
 
11073         * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs.
 
11074         * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs.
 
11075         * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs.
 
11076         * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs.
 
11077         * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs.
 
11078         * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs.
 
11079         * tests/mozilla/js1_2/String/match.js: Added property allow-tabs.
 
11080         * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs.
 
11081         * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs.
 
11082         * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs.
 
11083         * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs.
 
11084         * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs.
 
11085         * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs.
 
11086         * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs.
 
11087         * tests/mozilla/js1_2/jsref.js: Added property allow-tabs.
 
11088         * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs.
 
11089         * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs.
 
11090         * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs.
 
11091         * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs.
 
11092         * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs.
 
11093         * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs.
 
11094         * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs.
 
11095         * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs.
 
11096         * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs.
 
11097         * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs.
 
11098         * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs.
 
11099         * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs.
 
11100         * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs.
 
11101         * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs.
 
11102         * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs.
 
11103         * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs.
 
11104         * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs.
 
11105         * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs.
 
11106         * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs.
 
11107         * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs.
 
11108         * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs.
 
11109         * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs.
 
11110         * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs.
 
11111         * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs.
 
11112         * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs.
 
11113         * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs.
 
11114         * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs.
 
11115         * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs.
 
11116         * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs.
 
11117         * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs.
 
11118         * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs.
 
11119         * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs.
 
11120         * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs.
 
11121         * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs.
 
11122         * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs.
 
11123         * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs.
 
11124         * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs.
 
11125         * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs.
 
11126         * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs.
 
11127         * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs.
 
11128         * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs.
 
11129         * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs.
 
11130         * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs.
 
11131         * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs.
 
11132         * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs.
 
11133         * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs.
 
11134         * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs.
 
11135         * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs.
 
11136         * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs.
 
11137         * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs.
 
11138         * tests/mozilla/js1_2/shell.js: Added property allow-tabs.
 
11139         * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs.
 
11140         * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs.
 
11141         * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs.
 
11142         * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs.
 
11143         * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs.
 
11144         * tests/mozilla/js1_3/shell.js: Added property allow-tabs.
 
11145         * tests/mozilla/js1_4/shell.js: Added property allow-tabs.
 
11146         * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs.
 
11147         * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs.
 
11148         * tests/mozilla/menuhead.html: Added property allow-tabs.
 
11149         * tests/mozilla/mklistpage.pl: Added property allow-tabs.
 
11150         * tests/mozilla/runtests.pl: Added property allow-tabs.
 
11152 2010-01-08  Daniel Bates  <dbates@webkit.org>
 
11154         Reviewed by Adam Barth.
 
11156         https://bugs.webkit.org/show_bug.cgi?id=33417
 
11158         Cleans up style errors exposed by the patch for bug #33198.
 
11159         Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?"
 
11160         errors reported by check-webkit-style.
 
11162         No functionality was changed. So, no new tests.
 
11166 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
 
11168         Reviewed by Eric Seidel.
 
11170         Don't store RegExp flags string representation
 
11171         https://bugs.webkit.org/show_bug.cgi?id=33321
 
11173         It's unused; the string representation is reconstructed from flags.
 
11175         * runtime/RegExp.cpp:
 
11176         (JSC::RegExp::RegExp):
 
11177         * runtime/RegExp.h:
 
11179 2010-01-08  Geoffrey Garen  <ggaren@apple.com>
 
11181         Reviewed by Oliver Hunt.
 
11183         Memory use grows grows possibly unbounded in this JavaScript Array test case
 
11184         https://bugs.webkit.org/show_bug.cgi?id=31675
 
11186         This fixes one observed bug in this test case, which is that
 
11187         arrays don't report extra cost for the sparse value maps.
 
11189         SunSpider reports a small speedup.
 
11191         * runtime/JSArray.cpp:
 
11192         (JSC::JSArray::putSlowCase): Report extra memory cost for
 
11193         the sparse value map.
 
11194         * runtime/JSArray.h: 
 
11196 2010-01-08  Yong Li  <yoli@rim.com>
 
11198         Reviewed by Darin Adler.
 
11200         Remove unnecessary #include from FastMalloc.cpp
 
11201         https://bugs.webkit.org/show_bug.cgi?id=33393
 
11203         * wtf/FastMalloc.cpp:
 
11205 2010-01-08  Eric Seidel  <eric@webkit.org>
 
11207         No review, rolling out r52983.
 
11208         http://trac.webkit.org/changeset/52983
 
11209         https://bugs.webkit.org/show_bug.cgi?id=33321
 
11211         Broke 59 JavaScriptCore tests.  I don't think Kent knew about
 
11212         run-javascriptcore-tests.  Sadly neither does the commit-bot,
 
11215         * runtime/RegExp.cpp:
 
11216         (JSC::RegExp::RegExp):
 
11217         * runtime/RegExp.h:
 
11218         (JSC::RegExp::flags):
 
11220 2010-01-08  Eric Seidel  <eric@webkit.org>
 
11222         No review, rolling out r52981.
 
11223         http://trac.webkit.org/changeset/52981
 
11224         https://bugs.webkit.org/show_bug.cgi?id=33319
 
11226         Caused two JS tests to start failing:
 
11227         ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js
 
11229         * runtime/RegExpPrototype.cpp:
 
11230         (JSC::regExpProtoFuncToString):
 
11232 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
 
11234         Reviewed by Darin Adler.
 
11236         Don't store RegExp flags string representation
 
11237         https://bugs.webkit.org/show_bug.cgi?id=33321
 
11239         It's unused; the string representation is reconstructed from flags.
 
11241         * runtime/RegExp.cpp:
 
11242         (JSC::RegExp::RegExp):
 
11243         * runtime/RegExp.h:
 
11245 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
 
11247         Reviewed by Darin Adler.
 
11249         RegExp.prototype.toString returns "//" for empty regular expressions
 
11250         https://bugs.webkit.org/show_bug.cgi?id=33319
 
11252         "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
 
11254         * runtime/RegExpPrototype.cpp:
 
11255         (JSC::regExpProtoFuncToString):
 
11257 2010-01-08  Norbert Leser  <norbert.leser@nokia.com>
 
11259         Reviewed by Darin Adler.
 
11261         RVCT compiler with "-Otime -O3" optimization tries to optimize out 
 
11262         inline new'ed pointers that are passed as arguments.
 
11263         Proposed patch assigns new'ed pointer explicitly outside function call.
 
11265         https://bugs.webkit.org/show_bug.cgi?id=33084
 
11267         * API/JSClassRef.cpp:
 
11268         (OpaqueJSClass::OpaqueJSClass):
 
11269         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
11271 2010-01-08  Gabor Loki  <loki@webkit.org>
 
11273         Reviewed by Gavin Barraclough.
 
11275         Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT
 
11276         https://bugs.webkit.org/show_bug.cgi?id=33203
 
11278         * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function.
 
11279         (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code.
 
11280         * assembler/ARMAssembler.h:
 
11281         (JSC::ARMAssembler::getLdrImmAddress): Use inline function.
 
11282         (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto.
 
11283         (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush.
 
11284         (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch.
 
11285         (JSC::ARMAssembler::linkCall): Ditto.
 
11286         (JSC::ARMAssembler::relinkCall): Ditto.
 
11288 2010-01-07  Gabor Loki  <loki@webkit.org>
 
11290         Reviewed by Gavin Barraclough.
 
11292         Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled
 
11293         https://bugs.webkit.org/show_bug.cgi?id=33311
 
11295         Move compileGetDirectOffset function to common part of JSVALUE32
 
11297         * jit/JITPropertyAccess.cpp:
 
11298         (JSC::JIT::compileGetDirectOffset):
 
11300 2010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
11302         Reviewed by Maciej Stachowiak.
 
11304         Allow call sites to determine if ASSERT_* and LOG_* macros are operational
 
11305         https://bugs.webkit.org/show_bug.cgi?id=33020
 
11307         * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED,
 
11308         ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support
 
11309         variadic macros. Refactor for better readibility.
 
11311 2010-01-07  Daniel Bates  <dbates@rim.com>
 
11313         Reviewed by Eric Seidel.
 
11315         https://bugs.webkit.org/show_bug.cgi?id=32987
 
11317         Added ENABLE_XHTMLMP flag. Disabled by default.
 
11319         * Configurations/FeatureDefines.xcconfig:
 
11321 2010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
11323         Reviewed by Gavin Barraclough.
 
11325         [Symbian] Port ARM traditional JIT Trampolines to RVCT
 
11326         https://bugs.webkit.org/show_bug.cgi?id=30552
 
11328         Take the GCC implementation and mechanically convert
 
11331         Use 'bx rX' instead of 'mov pc, rX' when it is available.
 
11333         Developed in cooperation with Iain Campbell and Gabor Loki.
 
11335         * JavaScriptCore.pri: Extra step to generate RVCT stubs. The 
 
11336         script generation intentionally executed all the time not just
 
11339         * create_rvct_stubs: Added. Perl script to expand precompiler macros
 
11340         for RVCT assembler - the template is defined in JITStubs.cpp.
 
11342         * jit/JITStubs.cpp:
 
11343         (JSC::ctiTrampoline):
 
11344         (JSC::ctiVMThrowTrampoline):
 
11345         (JSC::ctiOpThrowNotCaught):
 
11347 2010-01-07  Geoffrey Garen  <ggaren@apple.com>
 
11349         Reviewed by Sam Weinig.
 
11351         Fix a crash seen on the buildbots.
 
11353         * runtime/JSGlobalObject.cpp:
 
11354         (JSC::JSGlobalObject::init): Disable specific function tracking here,
 
11355         instead of in WebCore, to ensure that the disabling happens before a
 
11356         specific function can be registered.
 
11358 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
 
11362         * JavaScriptCore.exp: Export new JSGlobalData static data members.
 
11364 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
 
11366         Reviewed by Geoffrey Garen.
 
11368         https://bugs.webkit.org/show_bug.cgi?id=33057
 
11369         REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
 
11371         <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
 
11373         Test: fast/js/webcore-string-comparison.html
 
11375         In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
 
11376         got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
 
11377         not exported, objects created from WebCore got a different vptr, and JavaScriptCore
 
11378         optimizations that relied on vptr of all JSString objects being equal failed.
 
11380         * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
 
11381         JS_EXPORTDATA, but it clearly needed a new name.
 
11383         * runtime/InitializeThreading.cpp:
 
11384         (JSC::initializeThreadingOnce):
 
11385         * runtime/JSGlobalData.cpp:
 
11386         (JSC::JSGlobalData::storeVPtrs):
 
11387         (JSC::JSGlobalData::JSGlobalData):
 
11388         (JSC::JSGlobalData::createNonDefault):
 
11389         (JSC::JSGlobalData::create):
 
11390         (JSC::JSGlobalData::sharedInstance):
 
11391         * runtime/JSGlobalData.h:
 
11392         Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
 
11393         assert vptr correctness in object destructors (which don't have access to JSGlobalData,
 
11394         and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
 
11396         * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
 
11397         It's important to assert in destructor, because MSVC changes the vptr after constructor
 
11399         * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
 
11400         * runtime/JSByteArray.h: Ditto.
 
11401         * runtime/JSFunction.h: Ditto.
 
11402         * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
 
11404         * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
 
11407         * runtime/JSString.h: Export JSString class together with its vftable, and tell other
 
11408         libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
 
11409         dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
 
11410         (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
 
11411         (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
 
11412         JavaScriptCore itself).
 
11413         (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
 
11414         (JSC::jsSingleCharacterSubstring): Ditto.
 
11415         (JSC::jsNontrivialString): Ditto.
 
11416         (JSC::jsString): Ditto.
 
11417         (JSC::jsSubstring): Ditto.
 
11418         (JSC::jsOwnedString): Ditto.
 
11420         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
 
11421         JSGlobalData members that are used in WebCore via inline functions.
 
11423 2010-01-07  Geoffrey Garen  <ggaren@apple.com>
 
11425         Reviewed by Sam Weinig.
 
11427         Safari memory usage skyrockets using new Google AdWords interface
 
11428         https://bugs.webkit.org/show_bug.cgi?id=33343
 
11430         The memory use was caused by the global object creating too many structures
 
11431         as it thrashed between different specific functions.
 
11433         * runtime/Structure.cpp:
 
11434         (JSC::Structure::Structure):
 
11435         (JSC::Structure::addPropertyTransition):
 
11436         (JSC::Structure::changePrototypeTransition):
 
11437         (JSC::Structure::despecifyFunctionTransition):
 
11438         (JSC::Structure::addAnonymousSlotsTransition):
 
11439         (JSC::Structure::getterSetterTransition):
 
11440         (JSC::Structure::toDictionaryTransition):
 
11441         (JSC::Structure::addPropertyWithoutTransition):
 
11442         (JSC::Structure::despecifyAllFunctions):
 
11443         * runtime/Structure.h:
 
11444         (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
 
11445         for specific functions. Disable specific function tracking once the
 
11446         thrash count has been hit.
 
11448 2010-01-07  Csaba Osztrogonác  <ossy@webkit.org>
 
11450         Reviewed by Simon Hausmann.
 
11452         [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes.
 
11454         * JavaScriptCore.pri:
 
11456 2010-01-07  Zoltan Horvath  <zoltan@webkit.org>
 
11458         Reviewed by Holger Freyther.
 
11460         [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
 
11461         https://bugs.webkit.org/show_bug.cgi?id=33312
 
11463         Using of operator += cause compile error on Mac, so it is changed to
 
11464         "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1".
 
11466         * wtf/FastMalloc.cpp:
 
11467         (WTF::TCMallocStats::realloc):
 
11469 2010-01-07  Zoltan Horvath  <zoltan@webkit.org>
 
11471         Reviewed by Holger Freyther.
 
11473         [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
 
11474         https://bugs.webkit.org/show_bug.cgi?id=33312
 
11476         Remove pByte (committed in r42344 from #20422), because pByte doesn't
 
11477         exist and it is unnecessary.
 
11479         * wtf/FastMalloc.cpp:
 
11480         (WTF::TCMallocStats::realloc):
 
11482 2010-01-06  Gavin Barraclough  <barraclough@apple.com>
 
11486         * runtime/Identifier.cpp:
 
11487         (JSC::createIdentifierTableSpecific):
 
11489 2010-01-06  Gavin Barraclough  <barraclough@apple.com>
 
11491         Windows build fix part I.
 
11493         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
11495 2010-01-06  Dan Bernstein  <mitz@apple.com>
 
11499         * runtime/Identifier.cpp:
 
11500         (JSC::createIdentifierTableSpecificCallback):
 
11502 2010-01-05  Gavin Barraclough  <barraclough@apple.com>
 
11504         Reviewed by Sam Weinig.
 
11506         https://bugs.webkit.org/show_bug.cgi?id=33236
 
11507         Remove m_identifierTable pointer from UString
 
11509         Currently every string holds a pointer so that during destruction,
 
11510         if a string has been used as an identifier, it can remove itself
 
11511         from the table.  By instead accessing the identifierTable via a
 
11512         thread specific tracking the table associated with the current
 
11513         globaldata, we can save the memory cost of this pointer.
 
11516         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
 
11517         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
 
11518         (JSC::APICallbackShim::APICallbackShim):
 
11519         (JSC::APICallbackShim::~APICallbackShim):
 
11521             - change the API shims to track the identifierTable of the current JSGlobalData.
 
11523         * API/JSContextRef.cpp:
 
11524         (JSContextGroupCreate):
 
11526             - update creation of JSGlobalData for API usage to use new create method.
 
11527             - fix shim instanciation bug in JSGlobalContextCreateInGroup.
 
11529         * JavaScriptCore.exp:
 
11530         * runtime/Completion.cpp:
 
11531         (JSC::checkSyntax):
 
11534             - add asserts to check the identifierTable is being tracked correctly.
 
11536         * runtime/Identifier.cpp:
 
11537         (JSC::IdentifierTable::~IdentifierTable):
 
11538         (JSC::IdentifierTable::add):
 
11539         (JSC::Identifier::remove):
 
11540         (JSC::Identifier::checkSameIdentifierTable):
 
11541         (JSC::createIdentifierTableSpecificCallback):
 
11542         (JSC::createIdentifierTableSpecific):
 
11543         (JSC::createDefaultDataSpecific):
 
11545             - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable.
 
11546             - Define methods to access the thread specific identifier tables.
 
11548         * runtime/Identifier.h:
 
11549         (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
 
11550         (JSC::defaultIdentifierTable):
 
11551         (JSC::setDefaultIdentifierTable):
 
11552         (JSC::currentIdentifierTable):
 
11553         (JSC::setCurrentIdentifierTable):
 
11554         (JSC::resetCurrentIdentifierTable):
 
11556             - Declare methods to access the thread specific identifier tables.
 
11558         * runtime/JSGlobalData.cpp:
 
11559         (JSC::JSGlobalData::createNonDefault):
 
11560         (JSC::JSGlobalData::create):
 
11561         (JSC::JSGlobalData::sharedInstance):
 
11563             - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread.
 
11565         * runtime/JSGlobalData.h:
 
11566         * runtime/UStringImpl.cpp:
 
11567         (JSC::UStringImpl::destroy):
 
11569             - destroy() method should be using isIdentifier().
 
11571         * runtime/UStringImpl.h:
 
11572         (JSC::UStringImpl::isIdentifier):
 
11573         (JSC::UStringImpl::setIsIdentifier):
 
11574         (JSC::UStringImpl::checkConsistency):
 
11575         (JSC::UStringImpl::UStringImpl):
 
11577             - replace m_identifierTable with a single m_isIdentifier bit.
 
11579         * wtf/StringHashFunctions.h:
 
11582             - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier.
 
11584 2009-12-25 Patrick Gansterer <paroga@paroga.com>
 
11586         Reviewed by Eric Seidel.
 
11588         Buildfix for WinCE + style fixes.
 
11589         https://bugs.webkit.org/show_bug.cgi?id=32939
 
11595         (fillBufferWithContentsOfFile):
 
11597 2010-01-05  Patrick Gansterer  <paroga@paroga.com>
 
11599         Reviewed by Eric Seidel.
 
11601         WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)).
 
11602         https://bugs.webkit.org/show_bug.cgi?id=33205
 
11604         * jit/ExecutableAllocator.h:
 
11606 2010-01-05  Patrick Gansterer  <paroga@paroga.com>
 
11608         Reviewed by Darin Adler.
 
11610         Added compiler error for unsupported platforms.
 
11611         https://bugs.webkit.org/show_bug.cgi?id=33112
 
11613         * jit/JITStubs.cpp:
 
11615 2010-01-05  Gabor Loki  <loki@webkit.org>
 
11617         Reviewed by Maciej Stachowiak.
 
11619         Follow r52729 in ARMAssembler.
 
11620         https://bugs.webkit.org/show_bug.cgi?id=33208
 
11622         Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION
 
11624         * assembler/ARMAssembler.cpp:
 
11625         (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7
 
11626         * assembler/ARMAssembler.h:
 
11627         (JSC::ARMAssembler::):
 
11628         (JSC::ARMAssembler::bkpt):
 
11630 2010-01-05  Maciej Stachowiak  <mjs@apple.com>
 
11632         Unreviewed build fix for Gtk+
 
11634         Don't use // comments in Platform.h, at least some of them seem to make the version of GCC
 
11635         used on the Gtk buildbot unhappy.
 
11639 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
 
11641         Reviewed by Darin Fisher.
 
11643         Reorganize, document and rename OS() platform macros.
 
11644         https://bugs.webkit.org/show_bug.cgi?id=33198
 
11646         * wtf/Platform.h: Rename, reorganize and document OS() macros.
 
11648         Adapt to name changes. Also fixed a few incorrect OS checks.
 
11650         * API/JSContextRef.cpp:
 
11651         * assembler/MacroAssemblerARM.cpp:
 
11652         (JSC::isVFPPresent):
 
11653         * assembler/MacroAssemblerX86Common.h:
 
11654         * bytecode/SamplingTool.cpp:
 
11656         * interpreter/RegisterFile.cpp:
 
11657         (JSC::RegisterFile::~RegisterFile):
 
11658         * interpreter/RegisterFile.h:
 
11659         (JSC::RegisterFile::RegisterFile):
 
11660         (JSC::RegisterFile::grow):
 
11661         * jit/ExecutableAllocator.h:
 
11662         * jit/ExecutableAllocatorFixedVMPool.cpp:
 
11663         * jit/ExecutableAllocatorPosix.cpp:
 
11664         * jit/ExecutableAllocatorSymbian.cpp:
 
11665         * jit/ExecutableAllocatorWin.cpp:
 
11666         * jit/JITOpcodes.cpp:
 
11667         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
11668         * jit/JITStubs.cpp:
 
11671         * parser/Grammar.y:
 
11672         * profiler/ProfileNode.cpp:
 
11674         * runtime/Collector.cpp:
 
11676         (JSC::Heap::allocateBlock):
 
11677         (JSC::Heap::freeBlockPtr):
 
11678         (JSC::currentThreadStackBase):
 
11679         (JSC::getCurrentPlatformThread):
 
11680         (JSC::suspendThread):
 
11681         (JSC::resumeThread):
 
11682         (JSC::getPlatformThreadRegisters):
 
11683         (JSC::otherThreadStackPointer):
 
11684         * runtime/Collector.h:
 
11685         * runtime/DateConstructor.cpp:
 
11686         * runtime/DatePrototype.cpp:
 
11687         (JSC::formatLocaleDate):
 
11688         * runtime/InitializeThreading.cpp:
 
11689         (JSC::initializeThreading):
 
11690         * runtime/MarkStack.h:
 
11691         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
 
11692         * runtime/MarkStackPosix.cpp:
 
11693         * runtime/MarkStackSymbian.cpp:
 
11694         * runtime/MarkStackWin.cpp:
 
11695         * runtime/StringPrototype.cpp:
 
11696         (JSC::stringProtoFuncLastIndexOf):
 
11697         * runtime/TimeoutChecker.cpp:
 
11699         * runtime/UString.cpp:
 
11700         (JSC::UString::from):
 
11701         * wtf/Assertions.cpp:
 
11702         * wtf/Assertions.h:
 
11703         * wtf/CurrentTime.cpp:
 
11704         (WTF::lowResUTCTime):
 
11705         * wtf/CurrentTime.h:
 
11706         (WTF::getLocalTime):
 
11707         * wtf/DateMath.cpp:
 
11708         * wtf/FastMalloc.cpp:
 
11709         (WTF::TCMalloc_ThreadCache::InitModule):
 
11710         (WTF::TCMallocStats::):
 
11711         * wtf/FastMalloc.h:
 
11712         * wtf/MathExtras.h:
 
11713         * wtf/RandomNumber.cpp:
 
11714         (WTF::randomNumber):
 
11715         * wtf/RandomNumberSeed.h:
 
11716         (WTF::initializeRandomNumberGenerator):
 
11717         * wtf/StringExtras.h:
 
11718         * wtf/TCSpinLock.h:
 
11719         (TCMalloc_SpinLock::Unlock):
 
11720         (TCMalloc_SlowLock):
 
11721         * wtf/TCSystemAlloc.cpp:
 
11722         * wtf/ThreadSpecific.h:
 
11725         * wtf/ThreadingPthreads.cpp:
 
11726         (WTF::initializeThreading):
 
11727         (WTF::isMainThread):
 
11728         * wtf/ThreadingWin.cpp:
 
11729         (WTF::wtfThreadEntryPoint):
 
11730         (WTF::createThreadInternal):
 
11732         * wtf/unicode/icu/CollatorICU.cpp:
 
11733         (WTF::Collator::userDefault):
 
11734         * wtf/win/MainThreadWin.cpp:
 
11735         (WTF::initializeMainThreadPlatform):
 
11737 2010-01-04  Gustavo Noronha Silva  <gns@gnome.org>
 
11739         Add missing files to the build system - make distcheck build fix.
 
11743 2010-01-04  Gavin Barraclough <barraclough@apple.com>
 
11745         Reviewed by Sam Weinig, additional coding by Mark Rowe.
 
11747         https://bugs.webkit.org/show_bug.cgi?id=33163
 
11748         Add string hashing functions to WTF.
 
11749         Use WTF's string hashing functions from UStringImpl.
 
11752         * JavaScriptCore.exp:
 
11753         * JavaScriptCore.gypi:
 
11754         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
11755         * JavaScriptCore.xcodeproj/project.pbxproj:
 
11756         * runtime/UStringImpl.cpp:
 
11757         * runtime/UStringImpl.h:
 
11758         (JSC::UStringImpl::computeHash):
 
11759         * wtf/HashFunctions.h:
 
11760         * wtf/StringHashFunctions.h: Added.
 
11763 2010-01-04  Dmitry Titov  <dimich@chromium.org>
 
11765         Not reviewed, attempt to fix ARM bulid.
 
11769 2010-01-04  Gavin Barraclough  <barraclough@apple.com>
 
11771         Rubber stamped by Geoff Garen.
 
11773         Add an 'isIdentifier' to UStringImpl, use this where appropriate
 
11774         (where previously 'identifierTable' was being tested).
 
11776         * API/JSClassRef.cpp:
 
11777         (OpaqueJSClass::~OpaqueJSClass):
 
11778         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
11779         * runtime/Identifier.cpp:
 
11780         (JSC::Identifier::addSlowCase):
 
11781         * runtime/Identifier.h:
 
11782         (JSC::Identifier::add):
 
11783         * runtime/PropertyNameArray.cpp:
 
11784         (JSC::PropertyNameArray::add):
 
11785         * runtime/UStringImpl.h:
 
11786         (JSC::UStringImpl::isIdentifier):
 
11788 2010-01-04  Gavin Barraclough  <barraclough@apple.com>
 
11790         Reviewed by Sam "Shimmey Shimmey" Weinig.
 
11792         https://bugs.webkit.org/show_bug.cgi?id=33158
 
11793         Refactor JSC API entry/exit to use RAII instead of copy/pasting code.
 
11794         Make it easier to change set of actions taken when passing across the API boundary.
 
11796         * API/APIShims.h: Added.
 
11797         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
 
11798         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
 
11799         (JSC::APIEntryShim::APIEntryShim):
 
11800         (JSC::APICallbackShim::APICallbackShim):
 
11801         (JSC::APICallbackShim::~APICallbackShim):
 
11803         (JSEvaluateScript):
 
11804         (JSCheckScriptSyntax):
 
11805         (JSGarbageCollect):
 
11806         (JSReportExtraMemoryCost):
 
11807         * API/JSCallbackConstructor.cpp:
 
11808         (JSC::constructJSCallback):
 
11809         * API/JSCallbackFunction.cpp:
 
11810         (JSC::JSCallbackFunction::call):
 
11811         * API/JSCallbackObjectFunctions.h:
 
11813         (JSC::::getOwnPropertySlot):
 
11815         (JSC::::deleteProperty):
 
11816         (JSC::::construct):
 
11817         (JSC::::hasInstance):
 
11819         (JSC::::getOwnPropertyNames):
 
11822         (JSC::::staticValueGetter):
 
11823         (JSC::::callbackGetter):
 
11824         * API/JSContextRef.cpp:
 
11825         * API/JSObjectRef.cpp:
 
11827         (JSObjectMakeFunctionWithCallback):
 
11828         (JSObjectMakeConstructor):
 
11829         (JSObjectMakeFunction):
 
11830         (JSObjectMakeArray):
 
11831         (JSObjectMakeDate):
 
11832         (JSObjectMakeError):
 
11833         (JSObjectMakeRegExp):
 
11834         (JSObjectGetPrototype):
 
11835         (JSObjectSetPrototype):
 
11836         (JSObjectHasProperty):
 
11837         (JSObjectGetProperty):
 
11838         (JSObjectSetProperty):
 
11839         (JSObjectGetPropertyAtIndex):
 
11840         (JSObjectSetPropertyAtIndex):
 
11841         (JSObjectDeleteProperty):
 
11842         (JSObjectCallAsFunction):
 
11843         (JSObjectCallAsConstructor):
 
11844         (JSObjectCopyPropertyNames):
 
11845         (JSPropertyNameArrayRelease):
 
11846         (JSPropertyNameAccumulatorAddName):
 
11847         * API/JSValueRef.cpp:
 
11849         (JSValueIsUndefined):
 
11851         (JSValueIsBoolean):
 
11855         (JSValueIsObjectOfClass):
 
11857         (JSValueIsStrictEqual):
 
11858         (JSValueIsInstanceOfConstructor):
 
11859         (JSValueMakeUndefined):
 
11861         (JSValueMakeBoolean):
 
11862         (JSValueMakeNumber):
 
11863         (JSValueMakeString):
 
11864         (JSValueToBoolean):
 
11866         (JSValueToStringCopy):
 
11869         (JSValueUnprotect):
 
11870         * JavaScriptCore.xcodeproj/project.pbxproj:
 
11872 2010-01-04  Dan Bernstein  <mitz@apple.com>
 
11874         Reviewed by Ada Chan and Mark Rowe.
 
11876         Updated copyright string
 
11879         * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist:
 
11880         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
 
11882 2010-01-04  Adam Roben  <aroben@apple.com>
 
11884         No review, rolling out r52741.
 
11885         http://trac.webkit.org/changeset/52741
 
11886         https://bugs.webkit.org/show_bug.cgi?id=33056
 
11888         * wtf/AlwaysInline.h:
 
11890 2010-01-04  Patrick Gansterer  <paroga@paroga.com>
 
11892         Reviewed by Darin Adler.
 
11894         Add cacheFlush support for WinCE
 
11895         https://bugs.webkit.org/show_bug.cgi?id=33110
 
11897         * jit/ExecutableAllocator.h:
 
11898         (JSC::ExecutableAllocator::cacheFlush):
 
11900 2010-01-04  Patrick Gansterer  <paroga@paroga.com>
 
11902         Reviewed by Adam Roben.
 
11904         Implement NO_RETURN for COMPILER(MSVC).
 
11905         https://bugs.webkit.org/show_bug.cgi?id=33056
 
11907         * wtf/AlwaysInline.h:
 
11909 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
 
11911         Reviewed by Simon Hausmann.
 
11913         Fix some PLATFORM(*_ENDIAN) uses to CPU()
 
11914         https://bugs.webkit.org/show_bug.cgi?id=33148
 
11916         * runtime/JSCell.cpp:
 
11918         * runtime/JSValue.h:
 
11921 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
 
11923         Reviewed by Adam Barth.
 
11925         Document CPU() macros in comments.
 
11926         https://bugs.webkit.org/show_bug.cgi?id=33147
 
11930 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
 
11932         Reviewed by Adam Barth.
 
11934         Reorganize, document and rename CPU() platform macros.
 
11935         https://bugs.webkit.org/show_bug.cgi?id=33145
 
11936         ExecutableAllocatorSymbian appears to have buggy ARM version check
 
11937         https://bugs.webkit.org/show_bug.cgi?id=33138
 
11940         Rename all macros related to detection of particular CPUs or
 
11941         classes of CPUs to CPU(), reorganize and document them.
 
11943         All remaining changes are adapting to the renames, plus fixing the
 
11944         second bug cited above.
 
11946         * assembler/ARMAssembler.cpp:
 
11947         * assembler/ARMAssembler.h:
 
11948         * assembler/ARMv7Assembler.h:
 
11949         * assembler/AbstractMacroAssembler.h:
 
11950         (JSC::AbstractMacroAssembler::Imm32::Imm32):
 
11951         * assembler/MacroAssembler.h:
 
11952         * assembler/MacroAssemblerARM.cpp:
 
11953         * assembler/MacroAssemblerARM.h:
 
11954         * assembler/MacroAssemblerCodeRef.h:
 
11955         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
 
11956         * assembler/MacroAssemblerX86.h:
 
11957         * assembler/MacroAssemblerX86Common.h:
 
11958         * assembler/MacroAssemblerX86_64.h:
 
11959         * assembler/X86Assembler.h:
 
11960         (JSC::X86Registers::):
 
11961         (JSC::X86Assembler::):
 
11962         (JSC::X86Assembler::movl_mEAX):
 
11963         (JSC::X86Assembler::movl_EAXm):
 
11964         (JSC::X86Assembler::repatchLoadPtrToLEA):
 
11965         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
 
11966         * jit/ExecutableAllocator.h:
 
11967         * jit/ExecutableAllocatorFixedVMPool.cpp:
 
11968         * jit/ExecutableAllocatorPosix.cpp:
 
11969         * jit/ExecutableAllocatorSymbian.cpp:
 
11970         (JSC::ExecutableAllocator::intializePageSize):
 
11973         * jit/JITArithmetic.cpp:
 
11974         * jit/JITInlineMethods.h:
 
11975         (JSC::JIT::beginUninterruptedSequence):
 
11976         (JSC::JIT::restoreArgumentReferenceForTrampoline):
 
11977         (JSC::JIT::emitCount):
 
11978         * jit/JITOpcodes.cpp:
 
11979         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
11980         * jit/JITPropertyAccess.cpp:
 
11981         (JSC::JIT::privateCompileGetByIdProto):
 
11982         (JSC::JIT::privateCompileGetByIdProtoList):
 
11983         (JSC::JIT::privateCompileGetByIdChainList):
 
11984         (JSC::JIT::privateCompileGetByIdChain):
 
11985         * jit/JITStubs.cpp:
 
11986         (JSC::JITThunks::JITThunks):
 
11988         * runtime/Collector.cpp:
 
11989         (JSC::currentThreadStackBase):
 
11990         (JSC::getPlatformThreadRegisters):
 
11991         (JSC::otherThreadStackPointer):
 
11993         * wrec/WRECGenerator.cpp:
 
11994         (JSC::WREC::Generator::generateEnter):
 
11995         (JSC::WREC::Generator::generateReturnSuccess):
 
11996         (JSC::WREC::Generator::generateReturnFailure):
 
11997         * wrec/WRECGenerator.h:
 
11998         * wtf/FastMalloc.cpp:
 
11999         * wtf/TCSpinLock.h:
 
12000         (TCMalloc_SpinLock::Lock):
 
12001         (TCMalloc_SpinLock::Unlock):
 
12002         (TCMalloc_SlowLock):
 
12005         * yarr/RegexJIT.cpp:
 
12006         (JSC::Yarr::RegexGenerator::generateEnter):
 
12007         (JSC::Yarr::RegexGenerator::generateReturn):
 
12010 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
 
12012         Reviewed by Adam Barth.
 
12014         Clean up COMPILER macros and remove unused ones.
 
12015         https://bugs.webkit.org/show_bug.cgi?id=33132
 
12017         Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were
 
12022 2010-01-03  Maciej Stachowiak  <mjs@apple.com>
 
12024         Reviewed by Eric Seidel.
 
12026         Update wtf/Platform.h to document the new system for porting macros.
 
12027         https://bugs.webkit.org/show_bug.cgi?id=33130
 
12031 2009-12-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
12033         Reviewed by Maciej Stachowiak.
 
12035         PLATFORM(CAIRO) should be defined by WIN_CAIRO define
 
12036         https://bugs.webkit.org/show_bug.cgi?id=22250
 
12038         * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only
 
12039         For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h
 
12041 2009-12-28  Shu Chang  <Chang.Shu@nokia.com>
 
12043         Reviewed by Laszlo Gombos.
 
12045         [Qt] Delete ThreadPrivate instance after it is finished.
 
12046         https://bugs.webkit.org/show_bug.cgi?id=32614
 
12048         * wtf/qt/ThreadingQt.cpp:
 
12049         (WTF::ThreadMonitor::instance):
 
12050         (WTF::ThreadMonitor::threadFinished):
 
12051         (WTF::createThreadInternal):
 
12052         (WTF::detachThread):
 
12054 2009-12-28  Patrick Gansterer  <paroga@paroga.com>
 
12056         Reviewed by Maciej Stachowiak.
 
12058         Cleanup of #define JS_EXPORT.
 
12062 2009-12-27  Patrick Gansterer  <paroga@paroga.com>
 
12064         Reviewed by Adam Barth.
 
12066         WinCE buildfix (HWND_MESSAGE isn't supported there)
 
12068         * wtf/win/MainThreadWin.cpp:
 
12069         (WTF::initializeMainThreadPlatform):
 
12071 2009-12-27  Patrick Gansterer  <paroga@paroga.com>
 
12073         Reviewed by Adam Barth.
 
12075         Added a file with WinMain function to link agains in WinCE.
 
12077         * os-win32/WinMain.cpp: Added.
 
12081 2009-12-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
12083         Unreviewed; revert of r52550.
 
12085         The change regressed the following LayoutTests for QtWebKit.
 
12087         fast/workers/worker-call.html -> crashed
 
12088         fast/workers/worker-close.html -> crashed
 
12090         * wtf/qt/ThreadingQt.cpp:
 
12091         (WTF::waitForThreadCompletion):
 
12092         (WTF::detachThread):
 
12094 2009-12-24  Shu Chang  <Chang.Shu@nokia.com>
 
12096         Reviewed by Laszlo Gombos.
 
12098         [Qt] Fix memory leak by deleting instance of ThreadPrivate
 
12099         in function waitForThreadCompletion(), synchronously, or in
 
12100         detachThread(), asynchronously.
 
12101         https://bugs.webkit.org/show_bug.cgi?id=32614 
 
12103         * wtf/qt/ThreadingQt.cpp:
 
12104         (WTF::waitForThreadCompletion):
 
12105         (WTF::detachThread):
 
12107 2009-12-23  Kwang Yul Seo  <skyul@company100.net>
 
12109         Reviewed by Laszlo Gombos.
 
12111         Include stddef.h for ptrdiff_t
 
12112         https://bugs.webkit.org/show_bug.cgi?id=32891
 
12114         ptrdiff_t is typedef-ed in stddef.h.
 
12115         Include stddef.h in jit/ExecutableAllocator.h.
 
12117         * jit/ExecutableAllocator.h:
 
12119 2009-12-23  Patrick Gansterer  <paroga@paroga.com>
 
12121         Reviewed by Eric Seidel.
 
12123         Buildfix after r47092.
 
12125         * wtf/wince/MemoryManager.cpp:
 
12126         (WTF::tryFastMalloc):
 
12127         (WTF::tryFastZeroedMalloc):
 
12128         (WTF::tryFastCalloc):
 
12129         (WTF::tryFastRealloc):
 
12131 2009-12-23  Kent Tamura  <tkent@chromium.org>
 
12133         Reviewed by Darin Adler.
 
12135         HTMLInputElement::valueAsDate getter support.
 
12136         https://bugs.webkit.org/show_bug.cgi?id=32876
 
12138         Expose dateToDaysFrom1970().
 
12140         * JavaScriptCore.exp:
 
12141         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
12142         * wtf/DateMath.cpp:
 
12143         (WTF::dateToDaysFrom1970):
 
12146 2009-12-22  Darin Adler  <darin@apple.com>
 
12148         Reviewed by Mark Rowe.
 
12150         Turn off datagrid by default, at least for all platforms Apple ships.
 
12151         The datagrid implementation isn't ready for general web use yet.
 
12153         * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
 
12155 2009-12-22  Steve Block  <steveblock@google.com>
 
12157         Reviewed by David Levin.
 
12159         Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
 
12160         AndroidThreading class, rather than using JavaSharedClient directly.
 
12161         This fixes the current layering violation.
 
12162         https://bugs.webkit.org/show_bug.cgi?id=32651
 
12164         The pattern is copied from Chromium, which uses the ChromiumThreading
 
12165         class. This patch also fixes the style in ChromiumThreading.h.
 
12167         * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
 
12168         * wtf/android/MainThreadAndroid.cpp: Modified
 
12169         (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
 
12170         * wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
 
12172 2009-12-22  Gavin Barraclough  <barraclough@apple.com>
 
12174         Reviewed by Sam Weinig.
 
12176         Fix a couple of problems with UntypedPtrAndBitfield.
 
12178         Add a m_leaksPtr to reduce false positives from leaks in debug builds
 
12179         (this isn't perfect because we'd like a solution for release builds,
 
12180         but this is now at least as good as a PtrAndFlags would be).
 
12182         Switch SmallStringsto use a regular string for the base, rather than
 
12183         a static one.  UntypedPtrAndBitfield assumes all strings are at least
 
12184         8 byte aligned; this migt not be true of static strings.  Shared buffers
 
12185         are heap allocated, as are all UStringImpls other than static strings.
 
12186         Static strings cannot end up being the owner string of substrings,
 
12187         since the only static strings are length 0.
 
12189         * runtime/SmallStrings.cpp:
 
12190         (JSC::SmallStringsStorage::SmallStringsStorage):
 
12191         * runtime/UStringImpl.h:
 
12192         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
 
12193         (JSC::UStringImpl::UStringImpl):
 
12195 2009-12-22  Kwang Yul Seo  <skyul@company100.net>
 
12197         Reviewed by Darin Adler.
 
12199         RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
 
12200         https://bugs.webkit.org/show_bug.cgi?id=32857
 
12202         Add implementation of strcasecmp and strncasecmp for RVCT < 4.0
 
12203         because earlier versions of RVCT 4.0 does not provide these functions.
 
12205         * wtf/StringExtras.cpp: Added.
 
12208         * wtf/StringExtras.h:
 
12210 2009-12-22  Kwang Yul Seo  <skyul@company100.net>
 
12212         Reviewed by Darin Adler.
 
12214         Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT
 
12215         https://bugs.webkit.org/show_bug.cgi?id=32853
 
12217         Use __forceinline forces RVCT to compile a C or C++ function
 
12218         inline. The compiler attempts to inline the function, regardless of
 
12219         the characteristics of the function.
 
12221         * wtf/AlwaysInline.h:
 
12222         * wtf/FastMalloc.h:
 
12224 2009-12-21  Simon Hausmann  <simon.hausmann@nokia.com>
 
12226         Prospective GTK build fix: Add UStringImpl.cpp/h to the build.
 
12230 2009-12-21  Simon Hausmann  <simon.hausmann@nokia.com>
 
12232         Fix the Qt build, add UStringImpl.cpp to the build.
 
12234         * JavaScriptCore.pri:
 
12236 2009-12-21  Gavin Barraclough  <barraclough@apple.com>
 
12238         Windows Build fix part 5.
 
12239         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
12241 2009-12-21  Gavin Barraclough  <barraclough@apple.com>
 
12243         Reviewed by NOBODY (build fix).
 
12244         Fix breakage of world introduced in build fix to r52463.
 
12246         * runtime/UStringImpl.h:
 
12248 2009-12-21  Gavin Barraclough  <barraclough@apple.com>
 
12250         Reviewed by Darin Adler.
 
12252         https://bugs.webkit.org/show_bug.cgi?id=32831
 
12253         Replace UString::Rep implementation, following introduction of ropes to JSC.
 
12255             * Remove redundant overcapacity mechanisms.
 
12256             * Reduce memory cost of Rep's.
 
12257             * Add an inline storage mechanism akin to that in WebCore's StringImpl.
 
12259         ~1% Sunspider progression.
 
12261         * JavaScriptCore.exp:
 
12262         * JavaScriptCore.xcodeproj/project.pbxproj:
 
12263         * runtime/JSString.cpp:
 
12264         (JSC::JSString::resolveRope):
 
12265         * runtime/SmallStrings.cpp:
 
12266         (JSC::SmallStringsStorage::SmallStringsStorage):
 
12267         * runtime/UString.cpp:
 
12268         (JSC::initializeUString):
 
12270         (JSC::UString::createFromUTF8):
 
12271         (JSC::UString::createUninitialized):
 
12272         (JSC::UString::spliceSubstringsWithSeparators):
 
12273         (JSC::UString::replaceRange):
 
12274         (JSC::UString::ascii):
 
12275         (JSC::UString::operator=):
 
12276         (JSC::UString::toStrictUInt32):
 
12278         * runtime/UString.h:
 
12279         (JSC::UString::isEmpty):
 
12280         (JSC::UString::cost):
 
12282         * runtime/UStringImpl.cpp: Added.
 
12283         (JSC::UStringImpl::baseSharedBuffer):
 
12284         (JSC::UStringImpl::sharedBuffer):
 
12285         (JSC::UStringImpl::destroy):
 
12286         (JSC::UStringImpl::computeHash):
 
12287         * runtime/UStringImpl.h: Added.
 
12288         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
 
12289         (JSC::UntypedPtrAndBitfield::asPtr):
 
12290         (JSC::UntypedPtrAndBitfield::operator&=):
 
12291         (JSC::UntypedPtrAndBitfield::operator|=):
 
12292         (JSC::UntypedPtrAndBitfield::operator&):
 
12293         (JSC::UStringImpl::create):
 
12294         (JSC::UStringImpl::createCopying):
 
12295         (JSC::UStringImpl::createUninitialized):
 
12296         (JSC::UStringImpl::data):
 
12297         (JSC::UStringImpl::size):
 
12298         (JSC::UStringImpl::cost):
 
12299         (JSC::UStringImpl::hash):
 
12300         (JSC::UStringImpl::computedHash):
 
12301         (JSC::UStringImpl::setHash):
 
12302         (JSC::UStringImpl::identifierTable):
 
12303         (JSC::UStringImpl::setIdentifierTable):
 
12304         (JSC::UStringImpl::ref):
 
12305         (JSC::UStringImpl::deref):
 
12306         (JSC::UStringImpl::allocChars):
 
12307         (JSC::UStringImpl::copyChars):
 
12308         (JSC::UStringImpl::computeHash):
 
12309         (JSC::UStringImpl::null):
 
12310         (JSC::UStringImpl::empty):
 
12311         (JSC::UStringImpl::checkConsistency):
 
12312         (JSC::UStringImpl::):
 
12313         (JSC::UStringImpl::UStringImpl):
 
12314         (JSC::UStringImpl::operator new):
 
12315         (JSC::UStringImpl::bufferOwnerString):
 
12316         (JSC::UStringImpl::bufferOwnership):
 
12317         (JSC::UStringImpl::isStatic):
 
12319 2009-12-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
12321         Reviewed by Kenneth Rohde Christiansen.
 
12323         Move some build decisions from Qt build system into source files
 
12324         https://bugs.webkit.org/show_bug.cgi?id=31956
 
12326         * JavaScriptCore.pri: Compile files unconditionally
 
12327         * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
 
12328         * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS)
 
12329         * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
 
12330         * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN)
 
12331         * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS)
 
12332         * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port
 
12333         * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED)
 
12334         * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED)
 
12336 2009-12-18  Gavin Barraclough  <barraclough@apple.com>
 
12338         Reviewed by Sam Weinig.
 
12340         Add createNonCopying method to UString to make replace constructor passed bool,
 
12341         to make behaviour more explicit.  Add createFromUTF8 to UString (wrapping method
 
12342         on UString::Rep), since other cases of transliteration (e.g.  from ascii) are
 
12343         performed in UString constructors.  Add/use setHash & size() accessors on Rep,
 
12344         rather than accessing _hash/len directly.
 
12346         * API/JSClassRef.cpp:
 
12347         (OpaqueJSClass::OpaqueJSClass):
 
12348         * API/OpaqueJSString.cpp:
 
12349         (OpaqueJSString::ustring):
 
12350         * JavaScriptCore.exp:
 
12351         * runtime/ArrayPrototype.cpp:
 
12352         (JSC::arrayProtoFuncToString):
 
12353         * runtime/Identifier.cpp:
 
12354         (JSC::Identifier::equal):
 
12355         (JSC::CStringTranslator::translate):
 
12356         (JSC::UCharBufferTranslator::translate):
 
12357         (JSC::Identifier::addSlowCase):
 
12358         * runtime/JSString.cpp:
 
12359         (JSC::JSString::resolveRope):
 
12360         * runtime/JSString.h:
 
12361         (JSC::JSString::Rope::Fiber::refAndGetLength):
 
12362         (JSC::JSString::Rope::append):
 
12363         * runtime/StringBuilder.h:
 
12364         (JSC::StringBuilder::release):
 
12365         * runtime/StringConstructor.cpp:
 
12366         (JSC::stringFromCharCodeSlowCase):
 
12367         * runtime/StringPrototype.cpp:
 
12368         (JSC::substituteBackreferencesSlow):
 
12369         (JSC::stringProtoFuncToLowerCase):
 
12370         (JSC::stringProtoFuncToUpperCase):
 
12371         (JSC::stringProtoFuncFontsize):
 
12372         (JSC::stringProtoFuncLink):
 
12373         * runtime/UString.cpp:
 
12374         (JSC::UString::UString):
 
12375         (JSC::UString::createNonCopying):
 
12376         (JSC::UString::createFromUTF8):
 
12377         * runtime/UString.h:
 
12378         (JSC::UString::Rep::setHash):
 
12379         (JSC::UString::~UString):
 
12382 2009-12-18  Geoffrey Garen  <ggaren@apple.com>
 
12384         Reviewed by Cameron Zwarich and Gavin Barraclough.
 
12386         Changed Register constructors to assignment operators, to streamline
 
12387         moving values into registers. (In theory, there's no difference between
 
12388         the two, since the constructor should just inline away, but there seems
 
12389         to be a big difference in the addled mind of the GCC optimizer.)
 
12391         In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K
 
12392         reduction in stack usage per privateExecute stack frame.
 
12394         * interpreter/CallFrame.h:
 
12395         (JSC::ExecState::setCalleeArguments):
 
12396         (JSC::ExecState::setCallerFrame):
 
12397         (JSC::ExecState::setScopeChain):
 
12398         (JSC::ExecState::init):
 
12399         (JSC::ExecState::setArgumentCount):
 
12400         (JSC::ExecState::setCallee):
 
12401         (JSC::ExecState::setCodeBlock): Added a little bit of casting so these
 
12402         functions could use the new Register assignment operators.
 
12404         * interpreter/Register.h:
 
12405         (JSC::Register::withInt):
 
12406         (JSC::Register::Register):
 
12407         (JSC::Register::operator=): Swapped in assignment operators for constructors.
 
12409 2009-12-18  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
12411         Reviewed by Simon Hausmann.
 
12413         https://bugs.webkit.org/show_bug.cgi?id=32713
 
12414         [Qt] make wtf/Assertions.h compile in winscw compiler.
 
12416         Add string arg before ellipsis to help winscw compiler resolve variadic
 
12417         macro definitions in wtf/Assertions.h. 
 
12419         * wtf/Assertions.h:
 
12421 2009-12-18  Geoffrey Garen  <ggaren@apple.com>
 
12423         Reviewed by Adam Roben.
 
12425         Fixed intermittent failure seen on Windows buildbot, and in other JSC
 
12428         Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to
 
12429         use it, to avoid vending a stale object as a prototype.
 
12431         * API/JSClassRef.cpp:
 
12432         (OpaqueJSClassContextData::OpaqueJSClassContextData):
 
12433         (OpaqueJSClass::prototype):
 
12434         * API/JSClassRef.h: Use WeakGCPtr.
 
12436         * JavaScriptCore.xcodeproj/project.pbxproj:
 
12437         * runtime/WeakGCPtr.h: Added.
 
12438         (JSC::WeakGCPtr::WeakGCPtr):
 
12439         (JSC::WeakGCPtr::get):
 
12440         (JSC::WeakGCPtr::clear):
 
12441         (JSC::WeakGCPtr::operator*):
 
12442         (JSC::WeakGCPtr::operator->):
 
12443         (JSC::WeakGCPtr::operator!):
 
12444         (JSC::WeakGCPtr::operator bool):
 
12445         (JSC::WeakGCPtr::operator UnspecifiedBoolType):
 
12446         (JSC::WeakGCPtr::assign):
 
12450         (JSC::static_pointer_cast):
 
12451         (JSC::const_pointer_cast):
 
12452         (JSC::getPtr): Added WeakGCPtr to the project.
 
12454 2009-12-18  Gavin Barraclough  <barraclough@apple.com>
 
12456         Reviewed by Sam Weinig.
 
12458         https://bugs.webkit.org/show_bug.cgi?id=32720
 
12460         * JavaScriptCore.exp:
 
12461             - Remove exports for UString::append
 
12462         * JavaScriptCore.xcodeproj/project.pbxproj:
 
12463             - Make StringBuilder a private header (was project).
 
12465 2009-12-18  Martin Robinson  <martin.james.robinson@gmail.com>
 
12467         Reviewed by Gustavo Noronha Silva.
 
12469         [GTK] GRefPtr does not take a reference when assigned a raw pointer
 
12470         https://bugs.webkit.org/show_bug.cgi?id=32709
 
12472         Ensure that when assigning a raw pointer to a GRefPtr, the reference
 
12473         count is incremented. Also remove the GRefPtr conversion overload as
 
12474         GRefPtr types have necessarily incompatible reference counting.
 
12476         * wtf/gtk/GRefPtr.h:
 
12477         (WTF::GRefPtr::operator=):
 
12479 2009-12-18  Simon Hausmann  <simon.hausmann@nokia.com>
 
12481         Reviewed by Tor Arne Vestbø.
 
12483         [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds
 
12485         https://bugs.webkit.org/show_bug.cgi?id=32716
 
12487         * pcre/pcre.pri: Use standalone_package instead of QTDIR_build
 
12489 2009-12-18  Martin Robinson  <martin.james.robinson@gmail.com>
 
12491         Reviewed by Gustavo Noronha Silva.
 
12493         [GTK] Compile warning from line 29 of GRefPtr.cpp
 
12494         https://bugs.webkit.org/show_bug.cgi?id=32703
 
12496         Fix memory leak and compiler warning in GRefPtr GHashTable template
 
12499         * wtf/gtk/GRefPtr.cpp:
 
12502 2009-12-17  Sam Weinig  <sam@webkit.org>
 
12504         Reviewed by Mark Rowe.
 
12506         Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines.
 
12510 2009-12-17  Adam Roben  <aroben@apple.com>
 
12512         Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the
 
12515         Fixes <http://webkit.org/b/32665>.
 
12517         Reviewed by Ada Chan.
 
12519         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved
 
12520         around files and filters so that the structure matches
 
12521         JavaScriptCore.xcodeproj and the source tree. A few headers that were
 
12522         previously omitted have been added, as well as JSZombie.{cpp,h}.
 
12524 2009-12-17  Adam Roben  <aroben@apple.com>
 
12526         Remove HeavyProfile and TreeProfile completely
 
12528         These were mostly removed in r42808, but the empty files were left in
 
12531         Fixes <http://webkit.org/b/32664>.
 
12533         Reviewed by John Sullivan.
 
12537         * JavaScriptCore.gypi:
 
12538         * JavaScriptCore.pri:
 
12539         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
12540         * JavaScriptCoreSources.bkl:
 
12541         Removed HeavyProfile/TreeProfile source files.
 
12543         * profiler/HeavyProfile.cpp: Removed.
 
12544         * profiler/HeavyProfile.h: Removed.
 
12545         * profiler/TreeProfile.cpp: Removed.
 
12546         * profiler/TreeProfile.h: Removed.
 
12548 2009-12-17  Martin Robinson  <martin.james.robinson@gmail.com>
 
12550         Reviewed by Gustavo Noronha Silva.
 
12552         [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs
 
12553         https://bugs.webkit.org/show_bug.cgi?id=21599
 
12555         Implement GRefPtr, a smart pointer for reference counted GObject types.
 
12558         * wtf/gtk/GOwnPtr.cpp:
 
12560         * wtf/gtk/GRefPtr.h: Added.
 
12562         (WTF::GRefPtr::GRefPtr):
 
12563         (WTF::GRefPtr::~GRefPtr):
 
12564         (WTF::GRefPtr::clear):
 
12565         (WTF::GRefPtr::get):
 
12566         (WTF::GRefPtr::operator*):
 
12567         (WTF::GRefPtr::operator->):
 
12568         (WTF::GRefPtr::operator!):
 
12569         (WTF::GRefPtr::operator UnspecifiedBoolType):
 
12570         (WTF::GRefPtr::hashTableDeletedValue):
 
12576         (WTF::static_pointer_cast):
 
12577         (WTF::const_pointer_cast):
 
12583 2009-12-17  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
12585         Unreviewed. Build fixes for make distcheck.
 
12589 2009-12-16  Geoffrey Garen  <ggaren@apple.com>
 
12591         Reviewed by Oliver Hunt.
 
12593         Fixed <rdar://problem/7355025> Interpreter::privateExecute macro generates
 
12596         This patch cuts Interpreter stack use by about a third.
 
12598         * bytecode/Opcode.h: Changed Opcode to const void* to work with the
 
12599         const static initiliazation we want to do in Interpreter::privateExecute.
 
12601         * interpreter/Interpreter.cpp:
 
12602         (JSC::Interpreter::Interpreter): Moved hashtable initialization here to
 
12603         avoid polluting Interpreter::privateExecute's stack, and changed it from a
 
12604         series of add() calls to one add() call in a loop, to cut down on code size.
 
12606         (JSC::Interpreter::privateExecute): Changed a series of label computations
 
12607         to a copy of a compile-time constant array to cut down on code size.
 
12609 2009-12-16  Mark Rowe  <mrowe@apple.com>
 
12611         Build fix.  Disable debug variants of WebKit frameworks.
 
12613         * JavaScriptCore.xcodeproj/project.pbxproj:
 
12615 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
 
12617         Reviewed by Sam "r=me" Weinig.
 
12619         https://bugs.webkit.org/show_bug.cgi?id=32498
 
12620         <rdar://problem/7471495>
 
12621         REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer
 
12626         * runtime/Operations.h:
 
12627         (JSC::jsAdd): Use the '&&' operator, not the ',' operator.
 
12629 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
 
12631         Try to fix the windows build: don't export this inlined function.
 
12633         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
12635 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
 
12637         Reviewed by Beth Dakin.
 
12639         Inlined JSCell's operator new.
 
12641         3.7% speedup on bench-allocate-nonretained.js.
 
12643         * JavaScriptCore.exp:
 
12644         * runtime/JSCell.cpp:
 
12645         * runtime/JSCell.h:
 
12646         (JSC::JSCell::operator new):
 
12648 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
 
12650         Reviewed by Oliver Hunt.
 
12652         Removed the number heap, replacing it with a one-item free list for
 
12653         numbers, taking advantage of the fact that two number cells fit inside
 
12654         the space for one regular cell, and number cells don't require destruction.
 
12656         SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that
 
12657         heap-allocates numbers).
 
12659         SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster
 
12660         in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6%
 
12661         speedup on bench-alloc-retained.js.
 
12663         There's a lot of formulaic change in this patch, but not much substance.
 
12665         * JavaScriptCore.exp:
 
12666         * debugger/Debugger.cpp:
 
12667         (JSC::Debugger::recompileAllJSFunctions):
 
12668         * runtime/Collector.cpp:
 
12670         (JSC::Heap::destroy):
 
12671         (JSC::Heap::allocateBlock):
 
12672         (JSC::Heap::freeBlock):
 
12673         (JSC::Heap::freeBlockPtr):
 
12674         (JSC::Heap::freeBlocks):
 
12675         (JSC::Heap::recordExtraCost):
 
12676         (JSC::Heap::allocate):
 
12677         (JSC::Heap::resizeBlocks):
 
12678         (JSC::Heap::growBlocks):
 
12679         (JSC::Heap::shrinkBlocks):
 
12680         (JSC::Heap::markConservatively):
 
12681         (JSC::Heap::clearMarkBits):
 
12682         (JSC::Heap::markedCells):
 
12683         (JSC::Heap::sweep):
 
12684         (JSC::Heap::markRoots):
 
12685         (JSC::Heap::objectCount):
 
12686         (JSC::Heap::addToStatistics):
 
12687         (JSC::Heap::statistics):
 
12688         (JSC::Heap::isBusy):
 
12689         (JSC::Heap::reset):
 
12690         (JSC::Heap::collectAllGarbage):
 
12691         (JSC::Heap::primaryHeapBegin):
 
12692         (JSC::Heap::primaryHeapEnd):
 
12693         * runtime/Collector.h:
 
12694         (JSC::): Removed all code pertaining to the number heap, and changed all
 
12695         heap template functions and classes to non-template functions and classes.
 
12697         (JSC::Heap::allocateNumber): A new optimization to replace the number
 
12698         heap: allocate half-sized number cells in pairs, returning the first
 
12699         cell and caching the second cell for the next allocation.
 
12701         * runtime/CollectorHeapIterator.h:
 
12702         (JSC::LiveObjectIterator::LiveObjectIterator):
 
12703         (JSC::LiveObjectIterator::operator++):
 
12704         (JSC::DeadObjectIterator::DeadObjectIterator):
 
12705         (JSC::DeadObjectIterator::operator++):
 
12706         (JSC::ObjectIterator::ObjectIterator):
 
12707         (JSC::ObjectIterator::operator++):
 
12708         * runtime/JSCell.h:
 
12709         (JSC::JSCell::isNumber): Removed all code pertaining to the number heap,
 
12710         and changed all heap template functions and classes to non-template functions
 
12713 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
 
12715         Reviewed by Darin Adler.
 
12717         Allow custom memory allocation control for WeakGCMap class
 
12718         https://bugs.webkit.org/show_bug.cgi?id=32547
 
12720         Inherits WeakGCMap from FastAllocBase because it is instantiated by
 
12721         'new' at: WebCore/dom/Document.cpp:512.
 
12723         * runtime/WeakGCMap.h:
 
12725 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
 
12727         Reviewed by Darin Adler.
 
12729         Allow custom memory allocation control for dtoa's P5Node struct
 
12730         https://bugs.webkit.org/show_bug.cgi?id=32544
 
12732         Inherits P5Node struct from Noncopyable because it is instantiated by
 
12733         'new' at wtf/dtoa.cpp:588 and don't need to be copyable.
 
12737 2009-12-14  Geoffrey Garen  <ggaren@apple.com>
 
12739         Reviewed by Simon Fraser.
 
12741         https://bugs.webkit.org/show_bug.cgi?id=32524
 
12742         REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests
 
12744         * wtf/StdLibExtras.h:
 
12745         (WTF::bitCount): The original patch put the parentheses in the wrong
 
12746         place, completely changing the calculation and making it almost always
 
12747         wrong. Moved the parentheses around the '+' operation, like the original
 
12748         compiler warning suggested.
 
12750 2009-12-14  Gabor Loki  <loki@inf.u-szeged.hu>
 
12752         Unreviewed trivial buildfix.
 
12754         Fix crosses initialization of usedPrimaryBlocks for JSValue32
 
12756         * runtime/Collector.cpp:
 
12757         (JSC::Heap::markConservatively):
 
12759 2009-12-14  Csaba Osztrogonác  <ossy@webkit.org>
 
12761         Reviewed by Simon Hausmann.
 
12763         GCC 4.3.x warning fixed. Suggested parantheses added.
 
12764         warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of &
 
12766         * wtf/StdLibExtras.h:
 
12769 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
 
12771         Reviewed by Sam Weinig.
 
12773         Changed GC from mark-sweep to mark-allocate.
 
12775         Added WeakGCMap to keep WebCore blissfully ignorant about objects that
 
12776         have become garbage but haven't run their destructors yet.
 
12778         1% SunSpider speedup.
 
12779         7.6% v8 speedup (37% splay speedup).
 
12780         17% speedup on bench-alloc-nonretained.js.
 
12781         18% speedup on bench-alloc-retained.js.
 
12784         (JSGarbageCollect):
 
12785         * API/JSContextRef.cpp:
 
12786         * JavaScriptCore.exp:
 
12787         * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new
 
12790         * debugger/Debugger.cpp:
 
12791         (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector
 
12792         iterator abstraction.
 
12795         (functionGC): Updated for rename.
 
12797         * runtime/Collector.cpp: Slightly reduced the number of allocations per
 
12798         collection, so that small workloads only allocate on collector block,
 
12801         (JSC::Heap::Heap): Updated to use the new allocateBlock function.
 
12803         (JSC::Heap::destroy): Updated to use the new freeBlocks function.
 
12805         (JSC::Heap::allocateBlock): New function to initialize a block when
 
12808         (JSC::Heap::freeBlock): Consolidated the responsibility for running
 
12809         destructors into this function.
 
12811         (JSC::Heap::freeBlocks): Updated to use freeBlock.
 
12813         (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function,
 
12814         so that allocation, which is more common, doesn't have to check extraCost.
 
12816         (JSC::Heap::heapAllocate): Run destructors right before recycling a
 
12817         garbage cell. This has better cache utilization than a separate sweep phase.
 
12819         (JSC::Heap::resizeBlocks):
 
12820         (JSC::Heap::growBlocks):
 
12821         (JSC::Heap::shrinkBlocks): New set of functions for managing the size of
 
12822         the heap, now that the heap doesn't maintain any information about its
 
12825         (JSC::isPointerAligned):
 
12826         (JSC::isHalfCellAligned):
 
12827         (JSC::isPossibleCell):
 
12828         (JSC::isCellAligned):
 
12829         (JSC::Heap::markConservatively): Cleaned up this code a bit.
 
12831         (JSC::Heap::clearMarkBits):
 
12832         (JSC::Heap::markedCells): Some helper functions for examining the the mark
 
12835         (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator.
 
12837         (JSC::Heap::markRoots): Reordered some operations for clarity.
 
12839         (JSC::Heap::objectCount):
 
12840         (JSC::Heap::addToStatistics):
 
12841         (JSC::Heap::statistics): Rewrote these functions to calculate an object
 
12842         count on demand, since the heap doesn't maintain this information by 
 
12845         (JSC::Heap::reset): New function for resetting the heap once we've
 
12846         exhausted heap space.
 
12848         (JSC::Heap::collectAllGarbage): This function matches the old collect()
 
12849         behavior, but it's now an uncommon function used only by API.
 
12851         * runtime/Collector.h:
 
12852         (JSC::CollectorBitmap::count):
 
12853         (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing
 
12854         the collector mark bitmap.
 
12856         (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents
 
12857         to bytes, so it's easier to understand.
 
12859         * runtime/CollectorHeapIterator.h:
 
12860         (JSC::CollectorHeapIterator::CollectorHeapIterator):
 
12861         (JSC::CollectorHeapIterator::operator!=):
 
12862         (JSC::CollectorHeapIterator::operator*):
 
12863         (JSC::CollectorHeapIterator::advance):
 
12864         (JSC::::LiveObjectIterator):
 
12866         (JSC::::DeadObjectIterator):
 
12867         (JSC::::ObjectIterator): New iterators for encapsulating details about
 
12868         heap layout, and what's live and dead on the heap.
 
12870         * runtime/JSArray.cpp:
 
12871         (JSC::JSArray::putSlowCase):
 
12872         (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until
 
12873         we're fully constructed, so the heap mark phase won't visit us in an
 
12876         * runtime/JSCell.h:
 
12878         (JSC::JSCell::createDummyStructure):
 
12879         (JSC::JSCell::JSCell):
 
12880         * runtime/JSGlobalData.cpp:
 
12881         (JSC::JSGlobalData::JSGlobalData):
 
12882         * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic.
 
12884         * runtime/JSString.h:
 
12885         (JSC::jsSubstring): Don't report extra cost for substrings, since they
 
12886         share a buffer that's already reported extra cost.
 
12888         * runtime/Tracing.d:
 
12889         * runtime/Tracing.h: Changed these dtrace hooks not to report object
 
12890         counts, since they're no longer cheap to compute.
 
12892         * runtime/UString.h: Updated for renames.
 
12894         * runtime/WeakGCMap.h: Added.
 
12895         (JSC::WeakGCMap::isEmpty):
 
12896         (JSC::WeakGCMap::uncheckedGet):
 
12897         (JSC::WeakGCMap::uncheckedBegin):
 
12898         (JSC::WeakGCMap::uncheckedEnd):
 
12902         (JSC::::uncheckedRemove): Mentioned above.
 
12904         * wtf/StdLibExtras.h:
 
12905         (WTF::bitCount): Added a bit population count function, so the heap can
 
12906         count live objects to fulfill statistics questions.
 
12908 The very last cell in the block is not allocated -- should not be marked.
 
12910 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
 
12912         Windows build fix: Export some new symbols.
 
12914         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
12916 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
 
12918         Windows build fix: Removed some old exports.
 
12920         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
12922 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
 
12924         Windows build fix: Use unsigned instead of uint32_t to avoid dependencies.
 
12926         * wtf/StdLibExtras.h:
 
12929 2009-12-13  Gavin Barraclough  <barraclough@apple.com>
 
12931         Reviewed by NOBODY (speculative Windows build fix).
 
12933         * runtime/JSGlobalObjectFunctions.cpp:
 
12935 2009-12-13  Gavin Barraclough  <barraclough@apple.com>
 
12937         Reviewed by Sam Weinig.
 
12939         https://bugs.webkit.org/show_bug.cgi?id=32496
 
12940         Switch remaining cases of string construction to use StringBuilder.
 
12941         Builds strings using a vector rather than using string append / addition.
 
12943         * JavaScriptCore.exp:
 
12944         * JavaScriptCore.xcodeproj/project.pbxproj:
 
12945         * runtime/Executable.cpp:
 
12946         (JSC::FunctionExecutable::paramString):
 
12947         * runtime/FunctionConstructor.cpp:
 
12948         (JSC::constructFunction):
 
12949         * runtime/JSGlobalObjectFunctions.cpp:
 
12952         (JSC::globalFuncEscape):
 
12953         (JSC::globalFuncUnescape):
 
12954         * runtime/JSONObject.cpp:
 
12955         (JSC::Stringifier::stringify):
 
12956         (JSC::Stringifier::indent):
 
12957         * runtime/JSString.h:
 
12958         * runtime/LiteralParser.cpp:
 
12959         (JSC::LiteralParser::Lexer::lexString):
 
12960         * runtime/NumberPrototype.cpp:
 
12961         (JSC::integerPartNoExp):
 
12962         (JSC::numberProtoFuncToFixed):
 
12963         (JSC::numberProtoFuncToPrecision):
 
12964         * runtime/Operations.h:
 
12966         * runtime/StringPrototype.cpp:
 
12967         (JSC::substituteBackreferencesSlow):
 
12968         (JSC::substituteBackreferences):
 
12969         (JSC::stringProtoFuncConcat):
 
12971 2009-12-08  Jeremy Moskovich  <jeremy@chromium.org>
 
12973         Reviewed by Eric Seidel.
 
12975         Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
 
12976         https://bugs.webkit.org/show_bug.cgi?id=31802
 
12978         The goal here is to allow for a zero runtime hit for ports that decide to select
 
12979         the API at compile time.
 
12980         When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
 
12981         at runtime.  Core Text is used for OS Versions >= 10.6.
 
12983         * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac.
 
12985 2009-12-11  Maciej Stachowiak  <mjs@apple.com>
 
12987         Reviewed by Oliver Hunt.
 
12989         Unify codegen for forward and backward variants of branches
 
12990         https://bugs.webkit.org/show_bug.cgi?id=32463
 
12993         (JSC::JIT::emit_op_loop): Implemented in terms of forward variant.
 
12994         (JSC::JIT::emit_op_loop_if_true): ditto
 
12995         (JSC::JIT::emitSlow_op_loop_if_true): ditto
 
12996         (JSC::JIT::emit_op_loop_if_false): ditto
 
12997         (JSC::JIT::emitSlow_op_loop_if_false): ditto
 
12998         (JSC::JIT::emit_op_loop_if_less): ditto
 
12999         (JSC::JIT::emitSlow_op_loop_if_less): ditto
 
13000         * jit/JITOpcodes.cpp:
 
13002 2009-12-11  Sam Weinig  <sam@webkit.org>
 
13004         Reviewed by Anders Carlsson.
 
13006         Allow WTFs concept of the main thread to differ from pthreads when necessary.
 
13008         * wtf/ThreadingPthreads.cpp:
 
13009         (WTF::initializeThreading):
 
13010         (WTF::isMainThread):
 
13011         * wtf/mac/MainThreadMac.mm:
 
13012         (WTF::initializeMainThreadPlatform):
 
13013         (WTF::scheduleDispatchFunctionsOnMainThread):
 
13015 2009-12-11  Gavin Barraclough  <barraclough@apple.com>
 
13017         Reviewed by Oliver Hunt.
 
13019         https://bugs.webkit.org/show_bug.cgi?id=32454
 
13020         Refactor construction of simple strings to avoid string concatenation.
 
13022         Building strings through concatenation has a memory and performance cost -
 
13023         a memory cost since we must over-allocate the buffer to leave space to append
 
13024         into, and performance in that the string may still require reallocation (and
 
13025         thus copying during construction).  Instead move the full construction to
 
13026         within a single function call (makeString), so that the arguments' lengths
 
13027         can be calculated and an appropriate sized buffer allocated before copying
 
13030         ~No performance change (~2% progression on date tests).
 
13032         * bytecode/CodeBlock.cpp:
 
13033         (JSC::escapeQuotes):
 
13034         (JSC::valueToSourceString):
 
13035         (JSC::constantName):
 
13037         (JSC::CodeBlock::registerName):
 
13038         (JSC::regexpToSourceString):
 
13040         * bytecompiler/NodesCodegen.cpp:
 
13042         * profiler/Profiler.cpp:
 
13043         (JSC::Profiler::createCallIdentifier):
 
13044         * runtime/DateConstructor.cpp:
 
13046         * runtime/DateConversion.cpp:
 
13048         (JSC::formatDateUTCVariant):
 
13050         (JSC::formatTimeUTC):
 
13051         * runtime/DateConversion.h:
 
13053         * runtime/DatePrototype.cpp:
 
13054         (JSC::dateProtoFuncToString):
 
13055         (JSC::dateProtoFuncToUTCString):
 
13056         (JSC::dateProtoFuncToDateString):
 
13057         (JSC::dateProtoFuncToTimeString):
 
13058         (JSC::dateProtoFuncToGMTString):
 
13059         * runtime/ErrorPrototype.cpp:
 
13060         (JSC::errorProtoFuncToString):
 
13061         * runtime/ExceptionHelpers.cpp:
 
13062         (JSC::createUndefinedVariableError):
 
13063         (JSC::createErrorMessage):
 
13064         (JSC::createInvalidParamError):
 
13065         * runtime/FunctionPrototype.cpp:
 
13066         (JSC::insertSemicolonIfNeeded):
 
13067         (JSC::functionProtoFuncToString):
 
13068         * runtime/ObjectPrototype.cpp:
 
13069         (JSC::objectProtoFuncToString):
 
13070         * runtime/RegExpConstructor.cpp:
 
13071         (JSC::constructRegExp):
 
13072         * runtime/RegExpObject.cpp:
 
13073         (JSC::RegExpObject::match):
 
13074         * runtime/RegExpPrototype.cpp:
 
13075         (JSC::regExpProtoFuncCompile):
 
13076         (JSC::regExpProtoFuncToString):
 
13077         * runtime/StringPrototype.cpp:
 
13078         (JSC::stringProtoFuncBig):
 
13079         (JSC::stringProtoFuncSmall):
 
13080         (JSC::stringProtoFuncBlink):
 
13081         (JSC::stringProtoFuncBold):
 
13082         (JSC::stringProtoFuncFixed):
 
13083         (JSC::stringProtoFuncItalics):
 
13084         (JSC::stringProtoFuncStrike):
 
13085         (JSC::stringProtoFuncSub):
 
13086         (JSC::stringProtoFuncSup):
 
13087         (JSC::stringProtoFuncFontcolor):
 
13088         (JSC::stringProtoFuncFontsize):
 
13089         (JSC::stringProtoFuncAnchor):
 
13090         * runtime/UString.h:
 
13094 2009-12-10  Gavin Barraclough  <barraclough@apple.com>
 
13096         Reviewed by Oliver Hunt.
 
13098         https://bugs.webkit.org/show_bug.cgi?id=32400
 
13099         Switch remaining cases of string addition to use ropes.
 
13101         Re-landing r51975 - added toPrimitiveString method,
 
13102         performs toPrimitive then subsequent toString operations.
 
13104         ~1% progression on Sunspidey.
 
13106         * jit/JITStubs.cpp:
 
13107         (JSC::DEFINE_STUB_FUNCTION):
 
13108         * runtime/JSString.h:
 
13109         (JSC::JSString::JSString):
 
13110         (JSC::JSString::appendStringInConstruct):
 
13111         * runtime/Operations.cpp:
 
13112         (JSC::jsAddSlowCase):
 
13113         * runtime/Operations.h:
 
13117 2009-12-11  Adam Roben  <aroben@apple.com>
 
13121         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added
 
13122         $(WebKitOutputDir)/include/private to the include path.
 
13124 2009-12-11  Adam Roben  <aroben@apple.com>
 
13126         Move QuartzCorePresent.h to include/private
 
13128         This fixes other projects that use wtf/Platform.h
 
13130         Rubber-stamped by Steve Falkenburg.
 
13132         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang.
 
13133         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write
 
13134         QuartzCorePresent.h to $(WebKitOutputDir)/include/private.
 
13136         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
13137         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
 
13138         Added $(WebKitOutputDir)/include/private to the include path.
 
13140 2009-12-11  Adam Roben  <aroben@apple.com>
 
13142         Fix clean builds and everything rebuilding on every build
 
13144         Reviewed by Sam Weinig.
 
13146         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't
 
13147         write out QuartzCorePresent.h if it exists but is older than
 
13148         QuartzCore.h. Also, create the directory we write QuartzCorePresent.h
 
13151 2009-12-11  Adam Roben  <aroben@apple.com>
 
13153         Windows build fix for systems with spaces in their paths
 
13155         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths.
 
13157 2009-12-11  Chris Marrin  <cmarrin@apple.com>
 
13159         Reviewed by Adam Roben.
 
13161         Add check for presence of QuartzCore headers
 
13162         https://bugs.webkit.org/show_bug.cgi?id=31856
 
13164         The script now checks for the presence of QuartzCore.h. If present
 
13165         it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable
 
13166         HW compositing on Windows. The script writes QuartzCorePresent.h to
 
13167         the build directory which has a define telling whether QuartzCore is 
 
13170         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
 
13173 2009-12-11  Kent Tamura  <tkent@chromium.org>
 
13175         Reviewed by Darin Adler.
 
13177         Fix a problem that JSC::gregorianDateTimeToMS() returns a negative
 
13178         value for a huge year value.
 
13179         https://bugs.webkit.org/show_bug.cgi?id=32304
 
13181         * wtf/DateMath.cpp:
 
13182         (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double.
 
13183         (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change.
 
13184         (WTF::timeClip): Use maxECMAScriptTime.
 
13185         (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change.
 
13187 2009-12-10  Adam Barth  <abarth@webkit.org>
 
13189         No review, rolling out r51975.
 
13190         http://trac.webkit.org/changeset/51975
 
13192         * jit/JITStubs.cpp:
 
13193         (JSC::DEFINE_STUB_FUNCTION):
 
13194         * runtime/JSString.h:
 
13195         (JSC::JSString::JSString):
 
13196         (JSC::JSString::appendStringInConstruct):
 
13197         * runtime/Operations.cpp:
 
13198         (JSC::jsAddSlowCase):
 
13199         * runtime/Operations.h:
 
13203 2009-12-10  Oliver Hunt  <oliver@apple.com>
 
13205         Reviewed by Gavin Barraclough.
 
13207         Incorrect caching of prototype lookup with dictionary base
 
13208         https://bugs.webkit.org/show_bug.cgi?id=32402
 
13210         Make sure we don't add cached prototype lookup to the proto_list
 
13211         lookup chain if the top level object is a dictionary.
 
13213         * jit/JITStubs.cpp:
 
13214         (JSC::JITThunks::tryCacheGetByID):
 
13216 2009-12-10  Gavin Barraclough  <barraclough@apple.com>
 
13218         Reviewed by Oliver Hunt.
 
13220         https://bugs.webkit.org/show_bug.cgi?id=32400
 
13221         Switch remaining cases of string addition to use ropes.
 
13223         ~1% progression on Sunspidey.
 
13225         * jit/JITStubs.cpp:
 
13226         (JSC::DEFINE_STUB_FUNCTION):
 
13227         * runtime/JSString.h:
 
13228         (JSC::JSString::JSString):
 
13229         (JSC::JSString::appendStringInConstruct):
 
13230         * runtime/Operations.cpp:
 
13231         (JSC::jsAddSlowCase):
 
13232         * runtime/Operations.h:
 
13236 2009-12-10  Kent Hansen  <kent.hansen@nokia.com>
 
13238         Reviewed by Geoffrey Garen.
 
13240         Remove JSObject::getPropertyAttributes() and all usage of it.
 
13241         https://bugs.webkit.org/show_bug.cgi?id=31933
 
13243         getOwnPropertyDescriptor() should be used instead.
 
13245         * JavaScriptCore.exp:
 
13246         * JavaScriptCore.order:
 
13247         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
13248         * debugger/DebuggerActivation.cpp:
 
13249         (JSC::DebuggerActivation::getOwnPropertyDescriptor):
 
13250         * debugger/DebuggerActivation.h:
 
13251         * runtime/JSObject.cpp:
 
13252         (JSC::JSObject::propertyIsEnumerable):
 
13253         * runtime/JSObject.h:
 
13254         * runtime/JSVariableObject.cpp:
 
13255         * runtime/JSVariableObject.h:
 
13257 2009-12-10  Gavin Barraclough  <barraclough@apple.com>
 
13259         Reviewed by Oliver Hunt & Mark Rowe.
 
13261         https://bugs.webkit.org/show_bug.cgi?id=32367
 
13262         Add support for short Ropes (up to 3 entries) inline within JSString.
 
13263         (rather than externally allocating an object to hold the rope).
 
13264         Switch jsAdd of (JSString* + JSString*) to now make use of Ropes.
 
13266         ~1% progression on Sunspidey.
 
13268         * interpreter/Interpreter.cpp:
 
13269         (JSC::Interpreter::privateExecute):
 
13270         * jit/JITOpcodes.cpp:
 
13271         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
13272         * jit/JITStubs.cpp:
 
13273         (JSC::DEFINE_STUB_FUNCTION):
 
13274         * runtime/JSString.cpp:
 
13275         (JSC::JSString::resolveRope):
 
13276         (JSC::JSString::toBoolean):
 
13277         (JSC::JSString::getStringPropertyDescriptor):
 
13278         * runtime/JSString.h:
 
13279         (JSC::JSString::Rope::Fiber::deref):
 
13280         (JSC::JSString::Rope::Fiber::ref):
 
13281         (JSC::JSString::Rope::Fiber::refAndGetLength):
 
13282         (JSC::JSString::Rope::append):
 
13283         (JSC::JSString::JSString):
 
13284         (JSC::JSString::~JSString):
 
13285         (JSC::JSString::value):
 
13286         (JSC::JSString::tryGetValue):
 
13287         (JSC::JSString::length):
 
13288         (JSC::JSString::canGetIndex):
 
13289         (JSC::JSString::appendStringInConstruct):
 
13290         (JSC::JSString::appendValueInConstructAndIncrementLength):
 
13291         (JSC::JSString::isRope):
 
13292         (JSC::JSString::string):
 
13293         (JSC::JSString::ropeLength):
 
13294         (JSC::JSString::getStringPropertySlot):
 
13295         * runtime/Operations.h:
 
13298         (JSC::resolveBase):
 
13300 2009-12-09  Anders Carlsson  <andersca@apple.com>
 
13302         Reviewed by Geoffrey Garen.
 
13304         Fix three more things found by compiling with clang++.
 
13306         * runtime/Structure.h:
 
13307         (JSC::StructureTransitionTable::reifySingleTransition):
 
13308         Add the 'std' qualifier to the call to make_pair.
 
13310         * wtf/DateMath.cpp:
 
13311         (WTF::initializeDates):
 
13312         Incrementing a bool is deprecated according to the C++ specification.
 
13314         * wtf/PtrAndFlags.h:
 
13315         (WTF::PtrAndFlags::PtrAndFlags):
 
13316         Name lookup should not be done in dependent bases, so explicitly qualify the call to set.
 
13318 2009-12-09  Maciej Stachowiak  <mjs@apple.com>
 
13320         Reviewed by Oliver Hunt.
 
13322         Google reader gets stuck in the "Loading..." state and does not complete
 
13323         https://bugs.webkit.org/show_bug.cgi?id=32256
 
13324         <rdar://problem/7456388>
 
13326         * jit/JITArithmetic.cpp:
 
13327         (JSC::JIT::emitSlow_op_jless): Fix some backward branches.
 
13329 2009-12-09  Gavin Barraclough  <barraclough@apple.com>
 
13331         Reviewed by Oliver Hunt.
 
13333         https://bugs.webkit.org/show_bug.cgi?id=32228
 
13334         Make destruction of ropes non-recursive to prevent stack exhaustion.
 
13335         Also, pass a UString& into initializeFiber rather than a Ustring::Rep*,
 
13336         since the Rep is not being ref counted this could result in usage of a
 
13337         Rep with refcount zero (where the Rep comes from a temporary UString
 
13338         returned from a function).
 
13340         * runtime/JSString.cpp:
 
13341         (JSC::JSString::Rope::destructNonRecursive):
 
13342         (JSC::JSString::Rope::~Rope):
 
13343         * runtime/JSString.h:
 
13344         (JSC::JSString::Rope::initializeFiber):
 
13345         * runtime/Operations.h:
 
13346         (JSC::concatenateStrings):
 
13348 2009-12-09  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
13350         Reviewed by Eric Seidel.
 
13352         https://bugs.webkit.org/show_bug.cgi?id=31930
 
13354         Update to r51457. ASSERTs changed to COMPILE_ASSERTs.
 
13355         The speedup is 25%.
 
13357         * runtime/JSGlobalData.cpp:
 
13358         (JSC::VPtrSet::VPtrSet):
 
13360 2009-12-09  Steve Block  <steveblock@google.com>
 
13362         Reviewed by Adam Barth.
 
13364         Updates Android Makefiles with latest additions.
 
13365         https://bugs.webkit.org/show_bug.cgi?id=32278
 
13367         * Android.mk: Modified.
 
13368         * Android.v8.wtf.mk: Modified.
 
13370 2009-12-09  Sam Weinig  <sam@webkit.org>
 
13372         Reviewed by Gavin Barraclough.
 
13374         Fix a bug found while trying to compile JavaScriptCore with clang++.
 
13376         * yarr/RegexPattern.h:
 
13377         (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here.  Use false instead.
 
13379 2009-12-09  Anders Carlsson  <andersca@apple.com>
 
13381         Reviewed by Sam Weinig.
 
13383         Attempt to fix the Windows build.
 
13385         * wtf/FastMalloc.h:
 
13387 2009-12-09  Anders Carlsson  <andersca@apple.com>
 
13389         Reviewed by Sam Weinig.
 
13391         Fix some things found while trying to compile JavaScriptCore with clang++.
 
13393         * wtf/FastMalloc.h:
 
13394         Add correct exception specifications for the allocation/deallocation operators.
 
13397         * wtf/VectorTraits.h:
 
13398         Fix a bunch of struct/class mismatches.
 
13400 2009-12-08  Maciej Stachowiak  <mjs@apple.com>
 
13402         Reviewed by Darin Adler.
 
13404         move code generation portions of Nodes.cpp to bytecompiler directory
 
13405         https://bugs.webkit.org/show_bug.cgi?id=32284
 
13407         * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that
 
13408         are not about codegen.
 
13409         * parser/Nodes.cpp: Removed everything that is about codegen.
 
13411         Update build systems:
 
13415         * JavaScriptCore.gypi:
 
13416         * JavaScriptCore.pri:
 
13417         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
13418         * JavaScriptCore.xcodeproj/project.pbxproj:
 
13419         * JavaScriptCoreSources.bkl:
 
13421 2009-12-08  Kevin Watters  <kevinwatters@gmail.com>
 
13423         Reviewed by Kevin Ollivier.
 
13425         [wx] Mac plugins support.
 
13427         https://bugs.webkit.org/show_bug.cgi?id=32236
 
13431 2009-12-08  Dmitry Titov  <dimich@chromium.org>
 
13433         Rubber-stamped by David Levin.
 
13435         Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
 
13436         It may have caused massive increase of reported leaks on the bots.
 
13437         https://bugs.webkit.org/show_bug.cgi?id=31639
 
13440         * JavaScriptCore.gypi:
 
13441         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
 
13442         * JavaScriptCore.xcodeproj/project.pbxproj:
 
13443         * runtime/Structure.cpp:
 
13444         (JSC::Structure::Structure):
 
13445         * wtf/RefCounted.h:
 
13446         (WTF::RefCountedBase::ref):
 
13447         (WTF::RefCountedBase::hasOneRef):
 
13448         (WTF::RefCountedBase::refCount):
 
13449         (WTF::RefCountedBase::derefBase):
 
13450         * wtf/ThreadVerifier.h: Removed.
 
13452 2009-12-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
13454         Reviewed by Darin Adler.
 
13456         Make WebKit build correctly on FreeBSD, IA64, and Alpha.
 
13457         Based on work by Petr Salinger <Petr.Salinger@seznam.cz>,
 
13458         and Colin Watson <cjwatson@ubuntu.com>.
 
13462 2009-12-08  Dmitry Titov  <dimich@chromium.org>
 
13464         Reviewed by Darin Adler.
 
13466         Add asserts to RefCounted to make sure ref/deref happens on the right thread.
 
13467         https://bugs.webkit.org/show_bug.cgi?id=31639
 
13469         * runtime/Structure.cpp:
 
13470         (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount().
 
13471         * wtf/RefCounted.h:
 
13472         (WTF::RefCountedBase::ref): Add ASSERT.
 
13473         (WTF::RefCountedBase::hasOneRef): Ditto.
 
13474         (WTF::RefCountedBase::refCount): Ditto.
 
13475         (WTF::RefCountedBase::derefBase): Ditto.
 
13476         (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method.
 
13477         * wtf/ThreadVerifier.h: Added.
 
13478         (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread.
 
13479         (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2.
 
13480         (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2.
 
13481         (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc)
 
13482         (WTF::ThreadVerifier::verifyThread):
 
13483         * GNUmakefile.am: Add ThreadVerifier.h to the build file.
 
13484         * JavaScriptCore.gypi: Ditto.
 
13485         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
 
13486         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
 
13488 2009-12-08  Steve Block  <steveblock@google.com>
 
13490         Reviewed by Adam Barth.
 
13492         [Android] Adds Makefiles for Android port.
 
13493         https://bugs.webkit.org/show_bug.cgi?id=31325
 
13495         * Android.mk: Added.
 
13496         * Android.v8.wtf.mk: Added.
 
13498 2009-12-07  Dmitry Titov  <dimich@chromium.org>
 
13500         Rubber-stamped by Darin Adler.
 
13502         Remove ENABLE_SHARED_SCRIPT flags
 
13503         https://bugs.webkit.org/show_bug.cgi?id=32245
 
13504         This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
 
13506         * Configurations/FeatureDefines.xcconfig:
 
13509 2009-12-07  Gavin Barraclough  <barraclough@apple.com>
 
13511         Reviewed by NOBODY (Windows build fixage part I).
 
13513         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
13515 2009-12-05  Gavin Barraclough  <barraclough@apple.com>
 
13517         Reviewed by Oliver Hunt.
 
13519         https://bugs.webkit.org/show_bug.cgi?id=32184
 
13520         Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
 
13521         Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
 
13523         * API/JSCallbackObjectFunctions.h:
 
13525         * API/JSValueRef.cpp:
 
13526         (JSValueIsStrictEqual):
 
13527         * JavaScriptCore.exp:
 
13528         * bytecompiler/BytecodeGenerator.cpp:
 
13529         (JSC::BytecodeGenerator::emitEqualityOp):
 
13530         * debugger/DebuggerCallFrame.cpp:
 
13531         (JSC::DebuggerCallFrame::functionName):
 
13532         (JSC::DebuggerCallFrame::calculatedFunctionName):
 
13533         * interpreter/Interpreter.cpp:
 
13534         (JSC::Interpreter::callEval):
 
13535         (JSC::Interpreter::privateExecute):
 
13536         * jit/JITStubs.cpp:
 
13537         (JSC::DEFINE_STUB_FUNCTION):
 
13538         * profiler/ProfileGenerator.cpp:
 
13539         (JSC::ProfileGenerator::addParentForConsoleStart):
 
13540         * profiler/Profiler.cpp:
 
13541         (JSC::Profiler::willExecute):
 
13542         (JSC::Profiler::didExecute):
 
13543         (JSC::Profiler::createCallIdentifier):
 
13544         (JSC::createCallIdentifierFromFunctionImp):
 
13545         * profiler/Profiler.h:
 
13546         * runtime/ArrayPrototype.cpp:
 
13547         (JSC::arrayProtoFuncIndexOf):
 
13548         (JSC::arrayProtoFuncLastIndexOf):
 
13549         * runtime/DateConstructor.cpp:
 
13550         (JSC::constructDate):
 
13551         * runtime/FunctionPrototype.cpp:
 
13552         (JSC::functionProtoFuncToString):
 
13553         * runtime/InternalFunction.cpp:
 
13554         (JSC::InternalFunction::name):
 
13555         (JSC::InternalFunction::displayName):
 
13556         (JSC::InternalFunction::calculatedDisplayName):
 
13557         * runtime/InternalFunction.h:
 
13558         * runtime/JSCell.cpp:
 
13559         (JSC::JSCell::getString):
 
13560         * runtime/JSCell.h:
 
13561         (JSC::JSValue::getString):
 
13562         * runtime/JSONObject.cpp:
 
13564         (JSC::Stringifier::Stringifier):
 
13565         (JSC::Stringifier::appendStringifiedValue):
 
13566         * runtime/JSObject.cpp:
 
13567         (JSC::JSObject::putDirectFunction):
 
13568         (JSC::JSObject::putDirectFunctionWithoutTransition):
 
13569         (JSC::JSObject::defineOwnProperty):
 
13570         * runtime/JSObject.h:
 
13571         * runtime/JSPropertyNameIterator.cpp:
 
13572         (JSC::JSPropertyNameIterator::get):
 
13573         * runtime/JSString.cpp:
 
13574         (JSC::JSString::Rope::~Rope):
 
13575         (JSC::JSString::resolveRope):
 
13576         (JSC::JSString::getPrimitiveNumber):
 
13577         (JSC::JSString::toNumber):
 
13578         (JSC::JSString::toString):
 
13579         (JSC::JSString::toThisString):
 
13580         (JSC::JSString::getStringPropertyDescriptor):
 
13581         * runtime/JSString.h:
 
13582         (JSC::JSString::Rope::createOrNull):
 
13583         (JSC::JSString::Rope::operator new):
 
13584         (JSC::JSString::value):
 
13585         (JSC::JSString::tryGetValue):
 
13586         (JSC::JSString::getIndex):
 
13587         (JSC::JSString::getStringPropertySlot):
 
13588         (JSC::JSValue::toString):
 
13589         * runtime/JSValue.h:
 
13590         * runtime/NativeErrorConstructor.cpp:
 
13591         (JSC::NativeErrorConstructor::NativeErrorConstructor):
 
13592         * runtime/Operations.cpp:
 
13593         (JSC::JSValue::strictEqualSlowCase):
 
13594         * runtime/Operations.h:
 
13595         (JSC::JSValue::equalSlowCaseInline):
 
13596         (JSC::JSValue::strictEqualSlowCaseInline):
 
13597         (JSC::JSValue::strictEqual):
 
13601         (JSC::concatenateStrings):
 
13602         * runtime/PropertyDescriptor.cpp:
 
13603         (JSC::PropertyDescriptor::equalTo):
 
13604         * runtime/PropertyDescriptor.h:
 
13605         * runtime/StringPrototype.cpp:
 
13606         (JSC::stringProtoFuncReplace):
 
13607         (JSC::stringProtoFuncToLowerCase):
 
13608         (JSC::stringProtoFuncToUpperCase):
 
13610 2009-12-07  Nikolas Zimmermann  <nzimmermann@rim.com>
 
13612         Reviewed by Holger Freyther.
 
13614         Turn on (SVG) Filters support, by default.
 
13615         https://bugs.webkit.org/show_bug.cgi?id=32224
 
13617         * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
 
13619 2009-12-07  Steve Falkenburg  <sfalken@apple.com>
 
13621         Build fix. Be flexible about which version of ICU is used on Windows.
 
13623         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2.
 
13625 2009-12-07  Maciej Stachowiak  <mjs@apple.com>
 
13627         Reviewed by Oliver Hunt.
 
13629         op_loop_if_less JIT codegen is broken for 64-bit
 
13630         https://bugs.webkit.org/show_bug.cgi?id=32221
 
13632         * jit/JITOpcodes.cpp:
 
13633         (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards.
 
13635 2009-12-07  Oliver Hunt  <oliver@apple.com>
 
13637         Reviewed by Maciej Stachowiak.
 
13639         Object.create fails if properties on the descriptor are getters
 
13640         https://bugs.webkit.org/show_bug.cgi?id=32219
 
13642         Correctly initialise the PropertySlots with the descriptor object.
 
13644         * runtime/ObjectConstructor.cpp:
 
13645         (JSC::toPropertyDescriptor):
 
13647 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
 
13649         Not reviewed, build fix.
 
13651         Actually tested 64-bit *and* 32-bit build this time.
 
13653         * jit/JITOpcodes.cpp:
 
13654         (JSC::JIT::emit_op_loop_if_false):
 
13656 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
 
13658         Not reviewed, build fix.
 
13660         Really really fix 64-bit build for prior patch (actually tested this time).
 
13662         * jit/JITOpcodes.cpp:
 
13663         (JSC::JIT::emit_op_loop_if_false):
 
13664         (JSC::JIT::emitSlow_op_loop_if_false):
 
13666 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
 
13668         Not reviewed, build fix.
 
13670         Really fix 64-bit build for prior patch.
 
13672         * jit/JITArithmetic.cpp:
 
13673         (JSC::JIT::emitSlow_op_jless):
 
13675 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
 
13677         Not reviewed, build fix.
 
13679         Fix 64-bit build for prior patch.
 
13681         * jit/JITOpcodes.cpp:
 
13682         (JSC::JIT::emitSlow_op_loop_if_less):
 
13684 2009-12-05  Maciej Stachowiak  <mjs@apple.com>
 
13686         Reviewed by Oliver Hunt.
 
13688         conway benchmark spends half it's time in op_less (jump fusion fails)
 
13689         https://bugs.webkit.org/show_bug.cgi?id=32190
 
13691         <1% speedup on SunSpider and V8
 
13692         2x speedup on "conway" benchmark
 
13695         1) Improve codegen for logical operators &&, || and ! in a condition context
 
13697         When generating code for combinations of &&, || and !, in a
 
13698         condition context (i.e. in an if statement or loop condition), we
 
13699         used to produce a value, and then separately jump based on its
 
13700         truthiness. Now we pass the false and true targets in, and let the
 
13701         logical operators generate jumps directly. This helps in four
 
13704         a) Individual clauses of a short-circuit logical operator can now
 
13705         jump directly to the then or else clause of an if statement (or to
 
13706         the top or exit of a loop) instead of jumping to a jump.
 
13708         b) It used to be that jump fusion with the condition of the first
 
13709         clause of a logical operator was inhibited, because the register
 
13710         was ref'd to be used later, in the actual condition jump; this no
 
13711         longer happens since a jump straight to the final target is
 
13712         generated directly.
 
13714         c) It used to be that jump fusion with the condition of the second
 
13715         clause of a logical operator was inhibited, because there was a
 
13716         jump target right after the second clause and before the actual
 
13717         condition jump. But now it's no longer necessary for the first
 
13718         clause to jump there so jump fusion is not blocked.
 
13720         d) We avoid generating excess mov statements in some cases.
 
13722         As a concrete example this source:
 
13724         if (!((x < q && y < q) || (t < q && z < q))) {
 
13728         Used to generate this bytecode:
 
13730         [  34] less              r1, r-15, r-19
 
13731         [  38] jfalse            r1, 7(->45)
 
13732         [  41] less              r1, r-16, r-19
 
13733         [  45] jtrue             r1, 14(->59)
 
13734         [  48] less              r1, r-17, r-19
 
13735         [  52] jfalse            r1, 7(->59)
 
13736         [  55] less              r1, r-18, r-19
 
13737         [  59] jtrue             r1, 17(->76)
 
13739         And now generates this bytecode (also taking advantage of the second optimization below):
 
13741         [  34] jnless            r-15, r-19, 8(->42)
 
13742         [  38] jless             r-16, r-19, 26(->64)
 
13743         [  42] jnless            r-17, r-19, 8(->50)
 
13744         [  46] jless             r-18, r-19, 18(->64)
 
13746         Note the jump fusion and the fact that there's less jump
 
13747         indirection - three of the four jumps go straight to the target
 
13748         clause instead of indirecting through another jump.
 
13750         2) Implement jless opcode to take advantage of the above, since we'll now often generate
 
13751         a less followed by a jtrue where fusion is not forbidden.
 
13754         (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine
 
13755         whether a node supports special conditional codegen. Return false as this is the default.
 
13756         (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really
 
13757         defined for nodes that do have conditional codegen.
 
13758         (JSC::UnaryOpNode::expr): Add const version.
 
13759         (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression
 
13761         (JSC::LogicalOpNode::hasConditionContextCodegen): Return true.
 
13762         * parser/Nodes.cpp:
 
13763         (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap
 
13764         the true and false targets for the child node.
 
13765         (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps
 
13766         directly, improving codegen quality. Also handles further nested conditional codegen.
 
13767         (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available.
 
13768         (JSC::IfNode::emitBytecode): ditto
 
13769         (JSC::IfElseNode::emitBytecode): ditto
 
13770         (JSC::DoWhileNode::emitBytecode): ditto
 
13771         (JSC::WhileNode::emitBytecode): ditto
 
13772         (JSC::ForNode::emitBytecode): ditto
 
13774         * bytecode/Opcode.h: 
 
13775         - Added loop_if_false opcode - needed now that falsey jumps can be backwards.
 
13776         - Added jless opcode to take advantage of new fusion opportunities.
 
13777         * bytecode/CodeBlock.cpp:
 
13778         (JSC::CodeBlock::dump): Handle above.
 
13779         * bytecompiler/BytecodeGenerator.cpp:
 
13780         (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless.
 
13781         (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps.
 
13782         * bytecompiler/BytecodeGenerator.h:
 
13783         (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of
 
13784         overly deep expressions etc.
 
13785         * interpreter/Interpreter.cpp:
 
13786         (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless).
 
13788         (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes.
 
13789         (JSC::JIT::privateCompileSlowCases): ditto
 
13791         * jit/JITArithmetic.cpp:
 
13792         (JSC::JIT::emit_op_jless):
 
13793         (JSC::JIT::emitSlow_op_jless): ditto
 
13794         (JSC::JIT::emitBinaryDoubleOp): ditto
 
13795         * jit/JITOpcodes.cpp:
 
13796         (JSC::JIT::emitSlow_op_loop_if_less): ditto
 
13797         (JSC::JIT::emit_op_loop_if_false): ditto
 
13798         (JSC::JIT::emitSlow_op_loop_if_false): ditto
 
13799         * jit/JITStubs.cpp:
 
13803 2009-12-04  Kent Hansen  <kent.hansen@nokia.com>
 
13805         Reviewed by Darin Adler.
 
13807         JavaScript delete operator should return false for string properties
 
13808         https://bugs.webkit.org/show_bug.cgi?id=32012
 
13810         * runtime/StringObject.cpp:
 
13811         (JSC::StringObject::deleteProperty):
 
13813 2009-12-03  Drew Wilson  <atwilson@chromium.org>
 
13815         Rolled back r51633 because it causes a perf regression in Chromium.
 
13819 2009-12-03  Gavin Barraclough  <barraclough@apple.com>
 
13821         Try and fix the Windows build.
 
13823         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:  Export a symbol that should be exported.
 
13825 2009-12-03  Mark Rowe  <mrowe@apple.com>
 
13827         Try and fix the Mac build.
 
13829         * JavaScriptCore.exp:  Export a symbol that should be exported.
 
13831 2009-12-03  Oliver Hunt  <oliver@apple.com>
 
13833         Reviewed by Gavin Barraclough.
 
13835         REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?)
 
13836         https://bugs.webkit.org/show_bug.cgi?id=32133
 
13838         Work around odd GCC-ism and correct the scopechain for use by
 
13839         calls made while a cachedcall is active on the callstack.
 
13841         * interpreter/CachedCall.h:
 
13842         (JSC::CachedCall::newCallFrame):
 
13843         * runtime/JSArray.cpp:
 
13844         (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
 
13845         * runtime/StringPrototype.cpp:
 
13846         (JSC::stringProtoFuncReplace):
 
13848 2009-12-03  Gavin Barraclough  <barraclough@apple.com>
 
13850         Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt.
 
13852         https://bugs.webkit.org/show_bug.cgi?id=32136
 
13853         Add a rope representation to JSString.  Presently JSString always holds its data in UString form.
 
13854         Instead, allow the result of a string concatenation to be represented in a tree form - with a
 
13855         variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes).
 
13857         Strings must still currently be resolved down to a flat UString representation before being used,
 
13858         but by holding the string in a rope representation during construction we can avoid copying data
 
13859         until we know the final size of the string.
 
13861         ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input).
 
13863         * JavaScriptCore.exp:
 
13867         * interpreter/Interpreter.cpp:
 
13868         (JSC::Interpreter::privateExecute):
 
13870             - Make use of new JSString::length() method to avoid prematurely resolving ropes.
 
13872         * jit/JITOpcodes.cpp:
 
13873         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
13875             - Switch the string length trampoline to read the length directly from JSString::m_length,
 
13876               rather than from the JSString's UString::Rep's 'len' property.
 
13878         * jit/JITStubs.cpp:
 
13879         (JSC::DEFINE_STUB_FUNCTION):
 
13881             - Modify op_add such that addition of two strings, where either or both strings are already
 
13882               in rope representation, produces a rope as a result.
 
13884         * runtime/JSString.cpp:
 
13885         (JSC::JSString::Rope::~Rope):
 
13887         (JSC::JSString::resolveRope):
 
13888         (JSC::JSString::getPrimitiveNumber):
 
13889         (JSC::JSString::toBoolean):
 
13890         (JSC::JSString::toNumber):
 
13891         (JSC::JSString::toString):
 
13892         (JSC::JSString::toThisString):
 
13893         (JSC::JSString::getStringPropertyDescriptor):
 
13894         * runtime/JSString.h:
 
13895         (JSC::JSString::Rope::Fiber::Fiber):
 
13896         (JSC::JSString::Rope::Fiber::destroy):
 
13897         (JSC::JSString::Rope::Fiber::isRope):
 
13898         (JSC::JSString::Rope::Fiber::rope):
 
13899         (JSC::JSString::Rope::Fiber::string):
 
13900         (JSC::JSString::Rope::create):
 
13901         (JSC::JSString::Rope::initializeFiber):
 
13902         (JSC::JSString::Rope::ropeLength):
 
13903         (JSC::JSString::Rope::stringLength):
 
13904         (JSC::JSString::Rope::fibers):
 
13905         (JSC::JSString::Rope::Rope):
 
13906         (JSC::JSString::Rope::operator new):
 
13907         (JSC::JSString::JSString):
 
13908         (JSC::JSString::value):
 
13909         (JSC::JSString::length):
 
13910         (JSC::JSString::isRope):
 
13911         (JSC::JSString::rope):
 
13912         (JSC::JSString::string):
 
13913         (JSC::JSString::canGetIndex):
 
13914         (JSC::jsSingleCharacterSubstring):
 
13915         (JSC::JSString::getIndex):
 
13916         (JSC::jsSubstring):
 
13917         (JSC::JSString::getStringPropertySlot):
 
13921         * runtime/Operations.h:
 
13923         (JSC::concatenateStrings):
 
13925             - Update string concatenation, and addition of ropes, to produce ropes.
 
13927         * runtime/StringObject.cpp:
 
13928         (JSC::StringObject::getOwnPropertyNames):
 
13930             - Make use of new JSString::length() method to avoid prematurely resolving ropes.
 
13932 2009-11-23  Jeremy Moskovich  <jeremy@chromium.org>
 
13934         Reviewed by Eric Seidel.
 
13936         Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
 
13937         https://bugs.webkit.org/show_bug.cgi?id=31802
 
13939         No test since this is already covered by existing pixel tests.
 
13941         * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac.
 
13943 2009-12-02  Oliver Hunt  <oliver@apple.com>
 
13945         Reviewed by Gavin Barraclough.
 
13947         Add files missed in prior patch.
 
13949         * runtime/JSZombie.cpp:
 
13951         (JSC::JSZombie::leakedZombieStructure):
 
13952         * runtime/JSZombie.h: Added.
 
13953         (JSC::JSZombie::JSZombie):
 
13954         (JSC::JSZombie::isZombie):
 
13955         (JSC::JSZombie::classInfo):
 
13956         (JSC::JSZombie::isGetterSetter):
 
13957         (JSC::JSZombie::isAPIValueWrapper):
 
13958         (JSC::JSZombie::isPropertyNameIterator):
 
13959         (JSC::JSZombie::getCallData):
 
13960         (JSC::JSZombie::getConstructData):
 
13961         (JSC::JSZombie::getUInt32):
 
13962         (JSC::JSZombie::toPrimitive):
 
13963         (JSC::JSZombie::getPrimitiveNumber):
 
13964         (JSC::JSZombie::toBoolean):
 
13965         (JSC::JSZombie::toNumber):
 
13966         (JSC::JSZombie::toString):
 
13967         (JSC::JSZombie::toObject):
 
13968         (JSC::JSZombie::markChildren):
 
13969         (JSC::JSZombie::put):
 
13970         (JSC::JSZombie::deleteProperty):
 
13971         (JSC::JSZombie::toThisObject):
 
13972         (JSC::JSZombie::toThisString):
 
13973         (JSC::JSZombie::toThisJSString):
 
13974         (JSC::JSZombie::getJSNumber):
 
13975         (JSC::JSZombie::getOwnPropertySlot):
 
13977 2009-12-02  Oliver Hunt  <oliver@apple.com>
 
13979         Reviewed by Gavin Barraclough.
 
13982         https://bugs.webkit.org/show_bug.cgi?id=32103
 
13984         Add a compile time flag to make the JSC collector replace "unreachable"
 
13985         objects with zombie objects.  The zombie object is a JSCell subclass that
 
13986         ASSERTs on any attempt to use the JSCell methods.  In addition there are
 
13987         a number of additional assertions in bottleneck code to catch zombie usage
 
13988         as quickly as possible.
 
13990         Grrr. Argh. Brains.
 
13992         * JavaScriptCore.xcodeproj/project.pbxproj:
 
13993         * interpreter/Register.h:
 
13994         (JSC::Register::Register):
 
13995         * runtime/ArgList.h:
 
13996         (JSC::MarkedArgumentBuffer::append):
 
13997         (JSC::ArgList::ArgList):
 
13998         * runtime/Collector.cpp:
 
13999         (JSC::Heap::destroy):
 
14000         (JSC::Heap::sweep):
 
14001         * runtime/Collector.h:
 
14002         * runtime/JSCell.h:
 
14003         (JSC::JSCell::isZombie):
 
14004         (JSC::JSValue::isZombie):
 
14005         * runtime/JSValue.h:
 
14006         (JSC::JSValue::decode):
 
14007         (JSC::JSValue::JSValue):
 
14010 2009-12-01  Jens Alfke  <snej@chromium.org>
 
14012         Reviewed by Darin Adler.
 
14014         Added variants of find/contains/add that allow a foreign key type to be used.
 
14015         This will allow AtomicString-keyed maps to be queried by C string without
 
14016         having to create a temporary AtomicString (see HTTPHeaderMap.)
 
14017         The code for this is adapted from the equivalent in HashSet.h.
 
14020         (WTF::HashMap::find):
 
14021         (WTF::HashMap::contains):
 
14022         (WTF::HashMap::add):
 
14023         * wtf/HashSet.h: Changed "method" to "function member" in a comment.
 
14025 2009-12-01  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
14027         Revert 51551 because it broke GTK+.
 
14031 2009-11-30  Gavin Barraclough  <barraclough@apple.com>
 
14033         Windows Build fix.  Reviewed by NOBODY.
 
14035         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
14037 2009-11-24  Gavin Barraclough  <barraclough@apple.com>
 
14039         Reviewed by Geoff Garen.
 
14041         Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
 
14043         WebCore presently has to explicitly specify the world before entering into JSC,
 
14044         which is a little fragile (particularly since property access via a
 
14045         getter/setter might invoke execution). Instead derive the current world from
 
14046         the lexical global object.
 
14048         Remove the temporary duct tape of willExecute/didExecute virtual hooks on the JSGlobalData::ClientData - these are no longer necessary.
 
14051         (JSEvaluateScript):
 
14052         * API/JSObjectRef.cpp:
 
14053         (JSObjectCallAsFunction):
 
14054         * JavaScriptCore.exp:
 
14055         * runtime/JSGlobalData.cpp:
 
14056         * runtime/JSGlobalData.h:
 
14058 2009-11-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14060         Reviewed by Kenneth Rohde Christiansen.
 
14062         [Qt] Remove obsolete PLATFORM(KDE) code
 
14063         https://bugs.webkit.org/show_bug.cgi?id=31958
 
14065         KDE is now using unpatched QtWebKit.
 
14067         * parser/Lexer.cpp: Remove obsolete KDE_USE_FINAL guard
 
14068         * wtf/Platform.h: Remove PLATFORM(KDE) definition and code 
 
14069         section that is guarded with it.
 
14071 2009-11-30  Jan-Arve Sæther  <jan-arve.saether@nokia.com>
 
14073         Reviewed by Simon Hausmann.
 
14075         [Qt] Fix compilation with win32-icc
 
14077         The Intel compiler does not support the __has_trivial_constructor type
 
14078         trait.  The Intel Compiler can report itself as _MSC_VER >= 1400. The
 
14079         reason for that is that the Intel Compiler depends on the Microsoft
 
14080         Platform SDK, and in order to try to be "fully" MS compatible it will
 
14081         "pretend" to be the same MS compiler as was shipped with the MS PSDK.
 
14082         (Thus, compiling with win32-icc with VC8 SDK will make the source code
 
14083         "think" the compiler at hand supports this type trait).
 
14085         * wtf/TypeTraits.h:
 
14087 2009-11-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14089         Reviewed by Eric Seidel.
 
14091         [Qt] Mac build has JIT disabled
 
14092         https://bugs.webkit.org/show_bug.cgi?id=31828
 
14094         * wtf/Platform.h: Enable JIT for Qt Mac builds
 
14096 2009-11-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14098         Reviewed by Eric Seidel.
 
14100         Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows
 
14101         https://bugs.webkit.org/show_bug.cgi?id=31943
 
14103         * runtime/MarkStack.h:
 
14104         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
 
14106 2009-11-28  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
14108         Reviewed by Gavin Barraclough.
 
14110         https://bugs.webkit.org/show_bug.cgi?id=31930
 
14112         Seems a typo. We don't need ~270k memory to determine the vptrs.
 
14114         * runtime/JSGlobalData.cpp:
 
14115         (JSC::VPtrSet::VPtrSet):
 
14117 2009-11-27  Shinichiro Hamaji  <hamaji@chromium.org>
 
14121         Move GOwnPtr* from wtf to wtf/gtk
 
14122         https://bugs.webkit.org/show_bug.cgi?id=31793
 
14124         Build fix for chromium after r51423.
 
14125         Exclude gtk directory from chromium build.
 
14127         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
14129 2009-11-25  Oliver Hunt  <oliver@apple.com>
 
14131         Reviewed by Gavin Barraclough.
 
14133         Incorrect behaviour of jneq_null in the interpreter
 
14134         https://bugs.webkit.org/show_bug.cgi?id=31901
 
14136         Correct the logic of jneq_null.  This is already covered by existing tests.
 
14138         * interpreter/Interpreter.cpp:
 
14139         (JSC::Interpreter::privateExecute):
 
14141 2009-11-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14143         Reviewed by Oliver Hunt.
 
14145         Move GOwnPtr* from wtf to wtf/gtk
 
14146         https://bugs.webkit.org/show_bug.cgi?id=31793
 
14148         * GNUmakefile.am: Change the path for GOwnPtr.*.
 
14149         * JavaScriptCore.gyp/JavaScriptCore.gyp: Remove
 
14150           GOwnPtr.cpp from the exclude list.
 
14151         * JavaScriptCore.gypi: Change the path for GOwnPtr.*.
 
14152         * wscript: Remove GOwnPtr.cpp from the exclude list.
 
14153         * wtf/GOwnPtr.cpp: Removed.
 
14154         * wtf/GOwnPtr.h: Removed.
 
14155         * wtf/Threading.h: Change the path for GOwnPtr.h.
 
14156         * wtf/gtk/GOwnPtr.cpp: Copied from JavaScriptCore/wtf/GOwnPtr.cpp.
 
14157         * wtf/gtk/GOwnPtr.h: Copied from JavaScriptCore/wtf/GOwnPtr.h.
 
14158         * wtf/unicode/glib/UnicodeGLib.h: Change the path for GOwnPtr.h.
 
14160 2009-11-24  Dmitry Titov  <dimich@chromium.org>
 
14162         Reviewed by Eric Seidel.
 
14164         Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
 
14165         https://bugs.webkit.org/show_bug.cgi?id=31444
 
14167         * Configurations/FeatureDefines.xcconfig:
 
14170 2009-11-24  Chris Marrin  <cmarrin@apple.com>
 
14172         Reviewed by Simon Fraser.
 
14174         Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled)
 
14175         https://bugs.webkit.org/show_bug.cgi?id=27314
 
14179 2009-11-24  Jason Smith  <dark.panda@gmail.com>
 
14181         Reviewed by Alexey Proskuryakov.
 
14183         RegExp#exec's returned Array-like object behaves differently from
 
14185         https://bugs.webkit.org/show_bug.cgi?id=31689
 
14187         * JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined
 
14188         values are added to the returned RegExpMatchesArray
 
14190 2009-11-24  Oliver Hunt  <oliver@apple.com>
 
14192         Reviewed by Alexey Proskuryakov.
 
14194         JSON.stringify performance on undefined is very poor
 
14195         https://bugs.webkit.org/show_bug.cgi?id=31839
 
14197         Switch from a UString to a Vector<UChar> when building
 
14198         the JSON string, allowing us to safely remove the substr-copy
 
14199         we otherwise did when unwinding an undefined property.
 
14201         Also turns out to be a ~5% speedup on stringification.
 
14203         * runtime/JSONObject.cpp:
 
14204         (JSC::Stringifier::StringBuilder::append):
 
14205         (JSC::Stringifier::stringify):
 
14206         (JSC::Stringifier::Holder::appendNextProperty):
 
14208 2009-11-24  Mark Rowe  <mrowe@apple.com>
 
14210         Fix production builds where the source tree may be read-only.
 
14212         * JavaScriptCore.xcodeproj/project.pbxproj:
 
14214 2009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14216         Reviewed by Kenneth Rohde Christiansen.
 
14218         Include "config.h" to meet Coding Style Guidelines
 
14219         https://bugs.webkit.org/show_bug.cgi?id=31792
 
14221         * wtf/unicode/UTF8.cpp:
 
14222         * wtf/unicode/glib/UnicodeGLib.cpp:
 
14223         * wtf/unicode/wince/UnicodeWince.cpp:
 
14225 2009-11-23  Geoffrey Garen  <ggaren@apple.com>
 
14227         Reviewed by Oliver Hunt.
 
14229         Streamlined some Math functions where we expect or know the result not
 
14230         to be representable as an int.
 
14232         SunSpider says 0.6% faster.
 
14234         * runtime/JSNumberCell.h:
 
14235         (JSC::JSValue::JSValue):
 
14236         * runtime/JSValue.h:
 
14238         (JSC::jsDoubleNumber):
 
14239         (JSC::JSValue::JSValue): Added a function for making a numeric JSValue
 
14240         and skipping the "can I encode this as an int?" check, avoiding the
 
14241         overhead of int <-> double roundtripping and double <-> double comparison
 
14244         * runtime/MathObject.cpp:
 
14245         (JSC::mathProtoFuncACos):
 
14246         (JSC::mathProtoFuncASin):
 
14247         (JSC::mathProtoFuncATan):
 
14248         (JSC::mathProtoFuncATan2):
 
14249         (JSC::mathProtoFuncCos):
 
14250         (JSC::mathProtoFuncExp):
 
14251         (JSC::mathProtoFuncLog):
 
14252         (JSC::mathProtoFuncRandom):
 
14253         (JSC::mathProtoFuncSin):
 
14254         (JSC::mathProtoFuncSqrt):
 
14255         (JSC::mathProtoFuncTan): For these functions, which we expect or know
 
14256         to produce results not representable as ints, call jsDoubleNumber instead
 
14259 2009-11-23  Mark Rowe  <mrowe@apple.com>
 
14261         Unreviewed. Unbreak the regression tests after r51329.
 
14264         (JSEvaluateScript): Null-check clientData before dereferencing it.
 
14265         * API/JSObjectRef.cpp:
 
14266         (JSObjectCallAsFunction): Ditto.
 
14268 2009-11-23  Gavin Barraclough  <barraclough@apple.com>
 
14270         Reviewed by Geoff Garen.
 
14272         Part 1/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world
 
14274         Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API,
 
14275         and for this to automagically cause execution to take place in the world associated with the
 
14276         global object associated with the ExecState (JSContextRef) passed.  However this is not how
 
14277         things work - the world must be explicitly set within WebCore.
 
14279         Making this work just for API calls to evaluate & call will be a far from perfect solution,
 
14280         since direct (non-API) use of JSC still relies on WebCore setting the current world correctly.
 
14281         A better solution would be to make this all work automagically all throughout WebCore, but this
 
14282         will require more refactoring.
 
14284         Since the API is in JSC but worlds only exist in WebCore, add callbacks on the JSGlobalData::ClientData
 
14285         to allow it to update the current world on entry/exit via the JSC API.  This is temporary duck
 
14286         tape, and should be removed once the current world no longer needs to be explicitly tracked.
 
14289         (JSEvaluateScript):
 
14290         * API/JSObjectRef.cpp:
 
14291         (JSObjectCallAsFunction):
 
14292         * JavaScriptCore.exp:
 
14293         * runtime/JSGlobalData.cpp:
 
14294         (JSC::JSGlobalData::ClientData::beginningExecution):
 
14295         (JSC::JSGlobalData::ClientData::completedExecution):
 
14296         * runtime/JSGlobalData.h:
 
14298 2009-11-23  Steve Block  <steveblock@google.com>
 
14300         Reviewed by Dmitry Titov.
 
14302         Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
 
14303         https://bugs.webkit.org/show_bug.cgi?id=31807
 
14305         * wtf/android: Added.
 
14306         * wtf/android/MainThreadAndroid.cpp: Added.
 
14307         (WTF::timeoutFired):
 
14308         (WTF::initializeMainThreadPlatform):
 
14309         (WTF::scheduleDispatchFunctionsOnMainThread):
 
14311 2009-11-23  Alexey Proskuryakov  <ap@apple.com>
 
14313         Reviewed by Brady Eidson.
 
14315         https://bugs.webkit.org/show_bug.cgi?id=31748
 
14316         Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
 
14318         * JavaScriptCore.exp: Export callOnMainThreadAndWait.
 
14320 2009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14322         Reviewed by Kenneth Rohde Christiansen.
 
14324         [Symbian] Fix lastIndexOf() for Symbian
 
14325         https://bugs.webkit.org/show_bug.cgi?id=31773
 
14327         Symbian soft floating point library has problems with operators
 
14328         comparing NaN to numbers. Without a workaround lastIndexOf() 
 
14329         function does not work.
 
14331         Patch developed by David Leong.
 
14333         * runtime/StringPrototype.cpp:
 
14334         (JSC::stringProtoFuncLastIndexOf):Add an extra test 
 
14335         to check for NaN for Symbian.
 
14337 2009-11-23  Steve Block  <steveblock@google.com>
 
14339         Reviewed by Eric Seidel.
 
14341         Android port lacks implementation of atomicIncrement and atomicDecrement.
 
14342         https://bugs.webkit.org/show_bug.cgi?id=31715
 
14344         * wtf/Threading.h: Modified.
 
14345         (WTF::atomicIncrement): Added Android implementation.
 
14346         (WTF::atomicDecrement): Added Android implementation.
 
14348 2009-11-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14352         [Qt] Sort source lists and remove obsolete comments 
 
14353         from the build system.
 
14355         * JavaScriptCore.pri:
 
14357 2009-11-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14359         Reviewed by Eric Seidel.
 
14361         [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac
 
14362         https://bugs.webkit.org/show_bug.cgi?id=31753
 
14366 2009-11-19  Steve Block  <steveblock@google.com>
 
14368         Android port lacks configuration in Platform.h and config.h.
 
14369         https://bugs.webkit.org/show_bug.cgi?id=31671
 
14371         * wtf/Platform.h: Modified. Added Android-specific configuration.
 
14373 2009-11-19  Alexey Proskuryakov  <ap@apple.com>
 
14375         Reviewed by Darin Adler.
 
14377         https://bugs.webkit.org/show_bug.cgi?id=31690
 
14378         Make SocketStreamHandleCFNet work on Windows
 
14380         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
14381         * wtf/MainThread.cpp:
 
14382         (WTF::FunctionWithContext::FunctionWithContext):
 
14383         (WTF::dispatchFunctionsFromMainThread):
 
14384         (WTF::callOnMainThreadAndWait):
 
14385         * wtf/MainThread.h:
 
14386         Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
 
14388 2009-11-19  Dmitry Titov  <dimich@chromium.org>
 
14390         Reviewed by David Levin.
 
14392         isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
 
14393         https://bugs.webkit.org/show_bug.cgi?id=31693
 
14395         * wtf/ThreadingPthreads.cpp:
 
14396         (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
 
14397         (WTF::isMainThread): Ditto.
 
14399 2009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14401         Reviewed by Darin Adler.
 
14403         Remove HAVE(STRING_H) guard from JavaScriptCore
 
14404         https://bugs.webkit.org/show_bug.cgi?id=31668
 
14407         * runtime/UString.cpp:
 
14409 2009-11-19  Dumitru Daniliuc  <dumi@chromium.org>
 
14411         Reviewed by Dmitry Titov.
 
14413         Fixing a bug in MessageQueue::removeIf() that leads to an
 
14416         https://bugs.webkit.org/show_bug.cgi?id=31657
 
14418         * wtf/MessageQueue.h:
 
14419         (WTF::MessageQueue::removeIf):
 
14421 2009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14423         Reviewed by Darin Adler.
 
14425         Remove HAVE(FLOAT_H) guard
 
14426         https://bugs.webkit.org/show_bug.cgi?id=31661
 
14428         JavaScriptCore has a dependency on float.h, there is
 
14429         no need to guard float.h.
 
14431         * runtime/DatePrototype.cpp: Remove include directive 
 
14432         for float.h as it is included in MathExtras.h already.
 
14433         * runtime/Operations.cpp: Ditto.
 
14434         * runtime/UString.cpp: Ditto.
 
14435         * wtf/dtoa.cpp: Ditto.
 
14436         * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
 
14437         * wtf/Platform.h: Ditto.
 
14439 2009-11-19  Thiago Macieira <thiago.macieira@nokia.com>
 
14441         Reviewed by Simon Hausmann.
 
14443         Build fix for 32-bit Sparc machines: these machines are big-endian.
 
14447 2009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14449         Reviewed by Kenneth Rohde Christiansen.
 
14451         [Qt] Remove support for Qt v4.3 or older versions
 
14452         https://bugs.webkit.org/show_bug.cgi?id=29469
 
14454         * JavaScriptCore.pro:
 
14456         * wtf/unicode/qt4/UnicodeQt4.h:
 
14458 2009-11-18  Kent Tamura  <tkent@chromium.org>
 
14460         Reviewed by Darin Adler.
 
14462         Move UString::from(double) implementation to new
 
14463         WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
 
14465         https://bugs.webkit.org/show_bug.cgi?id=31330
 
14467         - Introduce new function createRep(const char*, unsigned) and
 
14468           UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
 
14469         - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
 
14472         No new tests because this doesn't change the behavior.
 
14474         * JavaScriptCore.exp:
 
14475         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
14476         * runtime/UString.cpp:
 
14478         (JSC::UString::UString):
 
14479         (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
 
14480         * runtime/UString.h:
 
14482         (WTF::dtoa): Fix a bug about rve.
 
14483         (WTF::append): A helper for doubleToStringInJavaScriptFormat().
 
14484         (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
 
14487 2009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14489         Reviewed by Kenneth Rohde Christiansen.
 
14491         [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
 
14492         https://bugs.webkit.org/show_bug.cgi?id=31643
 
14494         * JavaScriptCore.pro:
 
14496 2009-11-18  Nate Chapin  <japhet@chromium.org>
 
14498         Reviewed by Darin Fisher.
 
14500         Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
 
14502         https://bugs.webkit.org/show_bug.cgi?id=31648
 
14504         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
14506 2009-11-18  Thiago Macieira <thiago.macieira@nokia.com>
 
14508         Reviewed by Gavin Barraclough.
 
14510         [Qt] Implement symbol hiding for JSC's JIT functions.
 
14512         These functions are implemented directly in assembly, so they need the
 
14513         proper directives to enable/disable visibility. On ELF systems, it's
 
14514         .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
 
14515         Windows, it's not necessary since you have to explicitly export. I
 
14516         also implemented the AIX idiom, though it's unlikely anyone will
 
14517         implement AIX/POWER JIT.
 
14518         https://bugs.webkit.org/show_bug.cgi?id=30864
 
14520         * jit/JITStubs.cpp:
 
14522 2009-11-18  Oliver Hunt  <oliver@apple.com>
 
14524         Reviewed by Alexey Proskuryakov.
 
14526         Interpreter may do an out of range access when throwing an exception in the profiler.
 
14527         https://bugs.webkit.org/show_bug.cgi?id=31635
 
14531         * interpreter/Interpreter.cpp:
 
14532         (JSC::Interpreter::throwException):
 
14534 2009-11-18  Gabor Loki  <loki@inf.u-szeged.hu>
 
14536         Reviewed by Darin Adler.
 
14538         Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
 
14539         https://bugs.webkit.org/show_bug.cgi?id=31631
 
14541         * jit/ExecutableAllocator.h:
 
14542         (JSC::ExecutableAllocator::cacheFlush):
 
14544 2009-11-18  Harald Fernengel  <harald.fernengel@nokia.com>
 
14546         Reviewed by Simon Hausmann.
 
14548         [Qt] Fix detection of linux-g++
 
14550         Never use "linux-g++*" to check for linux-g++, since this will break embedded
 
14551         builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
 
14552         g++ on linux mkspec.
 
14554         * JavaScriptCore.pri:
 
14556 2009-11-17  Jon Honeycutt  <jhoneycutt@apple.com>
 
14558         Add JSContextRefPrivate.h to list of copied files.
 
14560         Reviewed by Mark Rowe.
 
14562         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
 
14564 2009-11-17  Martin Robinson  <martin.james.robinson@gmail.com>
 
14566         Reviewed by Adam Barth.
 
14568         [GTK] Style cleanup for GOwnPtr
 
14569         https://bugs.webkit.org/show_bug.cgi?id=31506
 
14571         Remove forward declaration in GOwnPtr and do some style cleanup.
 
14575         (WTF::GOwnPtr::GOwnPtr):
 
14576         (WTF::GOwnPtr::~GOwnPtr):
 
14577         (WTF::GOwnPtr::get):
 
14578         (WTF::GOwnPtr::release):
 
14579         (WTF::GOwnPtr::outPtr):
 
14580         (WTF::GOwnPtr::set):
 
14581         (WTF::GOwnPtr::clear):
 
14582         (WTF::GOwnPtr::operator*):
 
14583         (WTF::GOwnPtr::operator->):
 
14584         (WTF::GOwnPtr::operator!):
 
14585         (WTF::GOwnPtr::operator UnspecifiedBoolType):
 
14586         (WTF::GOwnPtr::swap):
 
14591         (WTF::freeOwnedGPtr):
 
14593 2009-11-17  Oliver Hunt  <oliver@apple.com>
 
14595         Reviewed by Maciej Stachowiak.
 
14597         Incorrect use of JavaScriptCore API in DumpRenderTree
 
14598         https://bugs.webkit.org/show_bug.cgi?id=31577
 
14600         Add assertions to the 'toJS' functions to catch mistakes like
 
14601         this early.  Restructure existing code which blindly passed potentially
 
14602         null values to toJS when forwarding exceptions so that a null check is
 
14608         * API/JSCallbackObjectFunctions.h:
 
14609         (JSC::::getOwnPropertySlot):
 
14611         (JSC::::deleteProperty):
 
14612         (JSC::::construct):
 
14613         (JSC::::hasInstance):
 
14617         (JSC::::staticValueGetter):
 
14618         (JSC::::callbackGetter):
 
14619         * API/tests/testapi.c: Fix errors in the API tester.
 
14620         (MyObject_getProperty):
 
14621         (MyObject_convertToType):
 
14622         (EvilExceptionObject_convertToType):
 
14624 2009-11-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
14626         Reviewed by Gavin Barraclough.
 
14628         https://bugs.webkit.org/show_bug.cgi?id=31050
 
14630         Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
 
14631         failed on a CortexA8 CPU, but not on a simulator; and
 
14632         JITCall.cpp modifications was somehow not committed to mainline.
 
14634         * assembler/ARMAssembler.h:
 
14635         (JSC::ARMAssembler::fmrs_r):
 
14636         * assembler/MacroAssemblerARM.h:
 
14637         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
 
14639         (JSC::JIT::compileOpCall):
 
14641 2009-11-16  Joerg Bornemann  <joerg.bornemann@trolltech.com>
 
14643         Reviewed by Simon Hausmann.
 
14645         Fix Qt build on Windows CE 6.
 
14647         * JavaScriptCore.pri: Add missing include path.
 
14648         * wtf/Platform.h: Include ce_time.h for Windows CE 6.
 
14650 2009-11-13  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
14652         Reviewed by Gavin Barraclough.
 
14654         https://bugs.webkit.org/show_bug.cgi?id=31050
 
14656         Adding optimization support for mode JSVALUE32_64
 
14661         (JSC::JIT::compileOpCall):
 
14662         * jit/JITPropertyAccess.cpp:
 
14663         (JSC::JIT::emit_op_method_check):
 
14664         (JSC::JIT::compileGetByIdHotPath):
 
14665         (JSC::JIT::compileGetByIdSlowCase):
 
14666         (JSC::JIT::emit_op_put_by_id):
 
14668 2009-11-14  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
14670         Reviewed by Gavin Barraclough.
 
14672         https://bugs.webkit.org/show_bug.cgi?id=31050
 
14674         Adding JSVALUE32_64 support for ARM (but not turning it
 
14675         on by default). All optimizations must be disabled, since
 
14676         this patch is only the first of a series of patches.
 
14678         During the work, a lot of x86 specific code revealed and
 
14679         made platform independent.
 
14680         See revisions: 50531 50541 50593 50594 50595
 
14682         * assembler/ARMAssembler.h:
 
14683         (JSC::ARMAssembler::):
 
14684         (JSC::ARMAssembler::fdivd_r):
 
14685         * assembler/MacroAssemblerARM.h:
 
14686         (JSC::MacroAssemblerARM::lshift32):
 
14687         (JSC::MacroAssemblerARM::neg32):
 
14688         (JSC::MacroAssemblerARM::rshift32):
 
14689         (JSC::MacroAssemblerARM::branchOr32):
 
14690         (JSC::MacroAssemblerARM::set8):
 
14691         (JSC::MacroAssemblerARM::setTest8):
 
14692         (JSC::MacroAssemblerARM::loadDouble):
 
14693         (JSC::MacroAssemblerARM::divDouble):
 
14694         (JSC::MacroAssemblerARM::convertInt32ToDouble):
 
14695         (JSC::MacroAssemblerARM::zeroDouble):
 
14698         * jit/JITOpcodes.cpp:
 
14699         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
14700         * jit/JITStubs.cpp:
 
14701         * wtf/StdLibExtras.h:
 
14703 2009-11-13  Dominik Röttsches  <dominik.roettsches@access-company.com>
 
14705         Reviewed by Eric Seidel.
 
14707         Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
 
14708         https://bugs.webkit.org/show_bug.cgi?id=31468
 
14710         Adding isAlphanumeric abstraction, required
 
14711         by TextBoundaries.cpp.
 
14713         * wtf/unicode/glib/UnicodeGLib.h:
 
14714         (WTF::Unicode::isAlphanumeric):
 
14715         * wtf/unicode/icu/UnicodeIcu.h:
 
14716         (WTF::Unicode::isAlphanumeric):
 
14718 2009-11-13  Norbert Leser  <norbert.leser&nokia.com>
 
14720         Reviewed by Eric Seidel.
 
14722         Added macros for USERINCLUDE paths within symbian blocks
 
14723         to guarantee inclusion of respective header files from local path
 
14724         first (to avoid clashes with same names of header files in system include path).
 
14726         * JavaScriptCore.pri:
 
14728 2009-11-13  Oliver Hunt  <oliver@apple.com>
 
14730         Reviewed by Geoff Garen.
 
14732         JSValueProtect and JSValueUnprotect don't protect API wrapper values
 
14733         https://bugs.webkit.org/show_bug.cgi?id=31485
 
14735         Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
 
14736         does not attempt to to strip out API wrapper objects.
 
14740         * API/JSValueRef.cpp:
 
14742         (JSValueUnprotect):
 
14743         * API/tests/testapi.c:
 
14744         (makeGlobalNumberValue):
 
14747 2009-11-13  İsmail Dönmez  <ismail@namtrac.org>
 
14749         Reviewed by Antti Koivisto.
 
14751         Fix typo, ce_time.cpp should be ce_time.c
 
14753         * JavaScriptCore.pri:
 
14755 2009-11-12  Steve VanDeBogart  <vandebo@chromium.org>
 
14757         Reviewed by Adam Barth.
 
14759         Calculate the time offset only if we were able to parse
 
14760         the date string. This saves an IPC in Chromium for
 
14761         invalid date strings.
 
14762         https://bugs.webkit.org/show_bug.cgi?id=31416
 
14764         * wtf/DateMath.cpp:
 
14765         (WTF::parseDateFromNullTerminatedCharacters):
 
14766         (JSC::parseDateFromNullTerminatedCharacters):
 
14768 2009-11-12  Oliver Hunt  <oliver@apple.com>
 
14770         Rollout r50896 until i can work out why it causes failures.
 
14772         * bytecompiler/BytecodeGenerator.cpp:
 
14773         (JSC::BytecodeGenerator::emitReturn):
 
14774         * interpreter/Interpreter.cpp:
 
14775         (JSC::Interpreter::execute):
 
14776         * parser/Nodes.cpp:
 
14777         (JSC::EvalNode::emitBytecode):
 
14779 2009-11-12  Steve Falkenburg  <sfalken@apple.com>
 
14781         Reviewed by Stephanie Lewis.
 
14783         Remove LIBRARY directive from def file to fix Debug_All target.
 
14785         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
14787 2009-11-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
14789         Rubber-stamped by Holger Freyther.
 
14791         Revert r50204, since it makes DRT crash on 32 bits release builds
 
14794         * wtf/FastMalloc.h:
 
14796 2009-11-12  Oliver Hunt  <oliver@apple.com>
 
14798         Reviewed by Gavin Barraclough.
 
14800         Start unifying entry logic for function and eval code.
 
14802         Eval now uses a ret instruction to end execution, and sets up
 
14803         a callframe more in line with what we do for function entry.
 
14805         * bytecompiler/BytecodeGenerator.cpp:
 
14806         (JSC::BytecodeGenerator::emitReturn):
 
14807         * interpreter/Interpreter.cpp:
 
14808         (JSC::Interpreter::execute):
 
14809         * parser/Nodes.cpp:
 
14810         (JSC::EvalNode::emitBytecode):
 
14812 2009-11-12  Richard Moe Gustavsen  <richard.gustavsen@nokia.com>
 
14814         Reviewed by Kenneth Rohde Christiansen.
 
14816         [Qt] Disable pthread_setname_np.
 
14818         This allows Qt builds on Mac from 10.6 to run on earlier version
 
14819         where this symbol is not present.
 
14820         https://bugs.webkit.org/show_bug.cgi?id=31403
 
14824 2009-11-12  Thiago Macieira <thiago.macieira@nokia.com>
 
14826         Reviewed by Kenneth Rohde Christiansen.
 
14828         [Qt] Fix linking on Linux 32-bit.
 
14830         It was missing the ".text" directive at the top of the file,
 
14831         indicating that code would follow. Without it, the assembler created
 
14832         "NOTYPE" symbols, which would result in linker errors.
 
14833         https://bugs.webkit.org/show_bug.cgi?id=30863
 
14835         * jit/JITStubs.cpp:
 
14837 2009-11-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
14839         Reviewed by Alexey Proskuryakov.
 
14841         Refactor multiple JavaScriptCore threads
 
14842         https://bugs.webkit.org/show_bug.cgi?id=31328
 
14844         Remove the id field from the PlatformThread structure 
 
14847         * runtime/Collector.cpp:
 
14848         (JSC::getCurrentPlatformThread):
 
14849         (JSC::suspendThread):
 
14850         (JSC::resumeThread):
 
14851         (JSC::getPlatformThreadRegisters):
 
14853 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
 
14855         Linux build fix: Added an #include for UINT_MAX.
 
14857         * runtime/WeakRandom.h:
 
14859 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
 
14861         JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
 
14863         * JavaScriptCore.xcodeproj/project.pbxproj:
 
14865 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
 
14867         Reviewed by Gavin "avGni arBalroguch" Barraclough.
 
14869         Faster Math.random, based on GameRand.
 
14871         SunSpider says 1.4% faster.
 
14874         * JavaScriptCore.gypi:
 
14875         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
14876         * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
 
14878         * runtime/JSGlobalData.cpp:
 
14879         (JSC::JSGlobalData::JSGlobalData):
 
14880         * runtime/JSGlobalData.h: Use an object to track random number generation
 
14881         state, initialized to the current time.
 
14883         * runtime/MathObject.cpp:
 
14884         (JSC::MathObject::MathObject):
 
14885         (JSC::mathProtoFuncRandom): Use the new hotness.
 
14887         * runtime/WeakRandom.h: Added.
 
14888         (JSC::WeakRandom::WeakRandom):
 
14889         (JSC::WeakRandom::get):
 
14890         (JSC::WeakRandom::advance): The new hotness.
 
14892 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
 
14894         Reviewed by Oliver Hunt.
 
14896         Imported the v8 DST cache.
 
14898         SunSpider says 1.5% faster.
 
14900         * runtime/JSGlobalData.cpp:
 
14901         (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
 
14904         * runtime/JSGlobalData.h:
 
14905         (JSC::DSTOffsetCache::DSTOffsetCache):
 
14906         (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
 
14908         * wtf/DateMath.cpp:
 
14909         (WTF::calculateDSTOffsetSimple):
 
14910         (WTF::calculateDSTOffset):
 
14911         (WTF::parseDateFromNullTerminatedCharacters):
 
14912         (JSC::getDSTOffset):
 
14913         (JSC::gregorianDateTimeToMS):
 
14914         (JSC::msToGregorianDateTime):
 
14915         (JSC::parseDateFromNullTerminatedCharacters):
 
14916         * wtf/DateMath.h: The imported code for probing and updating the cache.
 
14918 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
 
14920         Reviewed by Oliver Hunt.
 
14922         Fixed an edge case that could cause the engine not to notice a timezone
 
14925         No test because this case would require manual intervention to change
 
14926         the timezone during the test.
 
14928         SunSpider reports no change.
 
14930         * runtime/DateInstanceCache.h:
 
14931         (JSC::DateInstanceCache::DateInstanceCache):
 
14932         (JSC::DateInstanceCache::reset): Added a helper function for resetting
 
14933         this cache. Also, shrank the cache, since we'll be resetting it often.
 
14935         * runtime/JSGlobalData.cpp:
 
14936         (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
 
14937         in resetting Date data. (Otherwise, a cache hit could bypass a necessary
 
14938         timezone update check.)
 
14940 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
 
14942         Reviewed by Sam Weinig.
 
14944         Some manual inlining and constant propogation in Date code.
 
14946         SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
 
14947         says some previously evident stalls are now gone.
 
14949         * runtime/DateConstructor.cpp:
 
14951         * runtime/DateConversion.cpp:
 
14953         (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
 
14955         * runtime/DateConversion.h:
 
14956         * runtime/DateInstance.cpp:
 
14957         (JSC::DateInstance::calculateGregorianDateTime):
 
14958         (JSC::DateInstance::calculateGregorianDateTimeUTC):
 
14959         * runtime/DateInstance.h:
 
14960         (JSC::DateInstance::gregorianDateTime):
 
14961         (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
 
14962         a UTC and non-UTC variant, and split each variant into a fast inline
 
14963         case and a slow out-of-line case.
 
14965         * runtime/DatePrototype.cpp:
 
14966         (JSC::formatLocaleDate):
 
14967         (JSC::dateProtoFuncToString):
 
14968         (JSC::dateProtoFuncToUTCString):
 
14969         (JSC::dateProtoFuncToISOString):
 
14970         (JSC::dateProtoFuncToDateString):
 
14971         (JSC::dateProtoFuncToTimeString):
 
14972         (JSC::dateProtoFuncGetFullYear):
 
14973         (JSC::dateProtoFuncGetUTCFullYear):
 
14974         (JSC::dateProtoFuncToGMTString):
 
14975         (JSC::dateProtoFuncGetMonth):
 
14976         (JSC::dateProtoFuncGetUTCMonth):
 
14977         (JSC::dateProtoFuncGetDate):
 
14978         (JSC::dateProtoFuncGetUTCDate):
 
14979         (JSC::dateProtoFuncGetDay):
 
14980         (JSC::dateProtoFuncGetUTCDay):
 
14981         (JSC::dateProtoFuncGetHours):
 
14982         (JSC::dateProtoFuncGetUTCHours):
 
14983         (JSC::dateProtoFuncGetMinutes):
 
14984         (JSC::dateProtoFuncGetUTCMinutes):
 
14985         (JSC::dateProtoFuncGetSeconds):
 
14986         (JSC::dateProtoFuncGetUTCSeconds):
 
14987         (JSC::dateProtoFuncGetTimezoneOffset):
 
14988         (JSC::setNewValueFromTimeArgs):
 
14989         (JSC::setNewValueFromDateArgs):
 
14990         (JSC::dateProtoFuncSetYear):
 
14991         (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
 
14993 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
 
14995         Build fix: export a new symbol.
 
14997         * JavaScriptCore.exp:
 
14998         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
15000 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
 
15002         Reviewed by Sam "Home Wrecker" Weinig.
 
15004         Added a tiny cache for Date parsing.
 
15006         SunSpider says 1.2% faster.
 
15008         * runtime/DateConversion.cpp:
 
15009         (JSC::parseDate): Try to reuse the last parsed Date, if present.
 
15011         * runtime/JSGlobalData.cpp:
 
15012         (JSC::JSGlobalData::resetDateCache):
 
15013         * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
 
15014         this code to make resetting the date cache easier.
 
15016         * runtime/JSGlobalObject.h:
 
15017         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
 
15020         * wtf/DateMath.cpp:
 
15021         (JSC::parseDateFromNullTerminatedCharacters):
 
15022         * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
 
15024 2009-11-09  Oliver Hunt  <oliver@apple.com>
 
15026         Reviewed by Gavin Barraclough.
 
15028         Can cache prototype lookups on uncacheable dictionaries.
 
15029         https://bugs.webkit.org/show_bug.cgi?id=31198
 
15031         Replace fromDictionaryTransition with flattenDictionaryObject and
 
15032         flattenDictionaryStructure.  This change is necessary as we need to
 
15033         guarantee that our attempt to convert away from a dictionary structure
 
15034         will definitely succeed, and in some cases this requires mutating the
 
15035         object storage itself.
 
15037         * interpreter/Interpreter.cpp:
 
15038         (JSC::Interpreter::tryCacheGetByID):
 
15039         * jit/JITStubs.cpp:
 
15040         (JSC::JITThunks::tryCacheGetByID):
 
15041         (JSC::DEFINE_STUB_FUNCTION):
 
15042         * runtime/BatchedTransitionOptimizer.h:
 
15043         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
 
15044         * runtime/JSObject.h:
 
15045         (JSC::JSObject::flattenDictionaryObject):
 
15046         * runtime/Operations.h:
 
15047         (JSC::normalizePrototypeChain):
 
15048         * runtime/Structure.cpp:
 
15049         (JSC::Structure::flattenDictionaryStructure):
 
15050         (JSC::comparePropertyMapEntryIndices):
 
15051         * runtime/Structure.h:
 
15053 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
15055         Not reviewed, build fix.
 
15057         Remove extra character from r50701.
 
15059         * JavaScriptCore.pri:
 
15061 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
15063         Not reviewed, build fix.
 
15065         Revert r50695 because it broke QtWebKit (clean builds).
 
15067         * JavaScriptCore.pri:
 
15069 2009-11-09  Norbert Leser  <norbert.leser@nokia.com>
 
15071         Reviewed by Kenneth Rohde Christiansen.
 
15073         Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
 
15074         Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
 
15075         and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
 
15077         * JavaScriptCore.pri:
 
15079 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
15081         Reviewed by Kenneth Rohde Christiansen.
 
15083         Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
 
15084         https://bugs.webkit.org/show_bug.cgi?id=31040
 
15086         * interpreter/Interpreter.cpp:
 
15087         (JSC::Interpreter::privateExecute):
 
15089 2009-11-08  David Levin  <levin@chromium.org>
 
15091         Reviewed by NOBODY (speculative snow leopard and windows build fixes).
 
15093         * wtf/DateMath.cpp:
 
15094         (WTF::parseDateFromNullTerminatedCharacters):
 
15095         (JSC::gregorianDateTimeToMS):
 
15096         (JSC::msToGregorianDateTime):
 
15097         (JSC::parseDateFromNullTerminatedCharacters):
 
15099         (JSC::GregorianDateTime::GregorianDateTime):
 
15101 2009-11-08  David Levin  <levin@chromium.org>
 
15103         Reviewed by NOBODY (chromium build fix).
 
15105         Hopefully, the last build fix.
 
15107         Create better separation in DateMath about the JSC
 
15108         and non-JSC portions. Also, only expose the non-JSC
 
15109         version in the exports.
 
15111         * JavaScriptCore.exp:
 
15112         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
15113         * wtf/DateMath.cpp:
 
15114         (WTF::parseDateFromNullTerminatedCharacters):
 
15115         (JSC::getUTCOffset):
 
15116         (JSC::gregorianDateTimeToMS):
 
15117         (JSC::msToGregorianDateTime):
 
15118         (JSC::parseDateFromNullTerminatedCharacters):
 
15122 2009-11-08  David Levin  <levin@chromium.org>
 
15124         Reviewed by NOBODY (chromium build fix).
 
15126         For the change in DateMath.
 
15129         * wtf/DateMath.cpp:
 
15131 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
 
15133         Windows build fix: export some symbols.
 
15135         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
15137 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
 
15139         Build fix: updated export file.
 
15141         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
15143 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
 
15145         Build fix: added some #includes.
 
15147         * wtf/CurrentTime.h:
 
15150 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
 
15152         Reviewed by Oliver Hunt.
 
15154         https://bugs.webkit.org/show_bug.cgi?id=31197
 
15155         Implemented a timezone cache not based on Mac OS X's notify_check API.
 
15157         If the VM calculates the local timezone offset from UTC, it caches the
 
15158         result until the end of the current VM invocation. (We don't want to cache
 
15159         forever, because the user's timezone may change over time.)
 
15161         This removes notify_* overhead on Mac, and, more significantly, removes
 
15162         OS time and date call overhead on non-Mac platforms.
 
15164         ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
 
15165         speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
 
15167         * JavaScriptCore.exp:
 
15169         * interpreter/CachedCall.h:
 
15170         (JSC::CachedCall::CachedCall):
 
15171         * interpreter/Interpreter.cpp:
 
15172         (JSC::Interpreter::execute):
 
15173         * runtime/JSGlobalObject.h:
 
15174         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the 
 
15175         DynamicGlobalObjectScope constructor responsible for checking whether a
 
15176         dynamicGlobalObject has already been set. This eliminated some duplicate
 
15177         client code, and allowed me to avoid adding even more duplicate client
 
15178         code. Made DynamicGlobalObjectScope responsible for resetting the
 
15179         local timezone cache upon first entry to the VM.
 
15181         * runtime/DateConstructor.cpp:
 
15182         (JSC::constructDate):
 
15186         * runtime/DateConversion.cpp:
 
15188         * runtime/DateConversion.h:
 
15189         * runtime/DateInstance.cpp:
 
15190         (JSC::DateInstance::gregorianDateTime):
 
15191         * runtime/DateInstance.h:
 
15192         * runtime/DateInstanceCache.h:
 
15193         * runtime/DatePrototype.cpp:
 
15194         (JSC::setNewValueFromTimeArgs):
 
15195         (JSC::setNewValueFromDateArgs):
 
15196         (JSC::dateProtoFuncSetYear):
 
15197         * runtime/InitializeThreading.cpp:
 
15198         (JSC::initializeThreadingOnce):
 
15199         * runtime/JSGlobalData.cpp:
 
15200         (JSC::JSGlobalData::JSGlobalData):
 
15201         * runtime/JSGlobalData.h:
 
15202         * wtf/DateMath.cpp:
 
15203         (WTF::getCurrentUTCTime):
 
15204         (WTF::getCurrentUTCTimeWithMicroseconds):
 
15205         (WTF::getLocalTime):
 
15206         (JSC::getUTCOffset): Use the new cache. Also, see below.
 
15207         (JSC::gregorianDateTimeToMS):
 
15208         (JSC::msToGregorianDateTime):
 
15209         (JSC::initializeDates):
 
15210         (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
 
15211         accounts for the local timezone offset, to accomodate our new caching API,
 
15212         and a (possibly misguided) caller in WebCore. Also, see below.
 
15214         (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
 
15215         DateMath.* into the JSC namespace. The code needed to move so it could
 
15216         naturally interact with ExecState and JSGlobalData to support caching.
 
15217         Logically, it seemed right to move it, too, since this code is not really
 
15218         as low-level as the WTF namespace might imply -- it implements a set of
 
15219         date parsing and conversion quirks that are finely tuned to the JavaScript
 
15220         language. Also removed the Mac OS X notify_* infrastructure.
 
15222         * wtf/CurrentTime.h:
 
15223         (WTF::currentTimeMS):
 
15224         (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
 
15225         it to make it consistent with WTF's currentTime function.
 
15227 2009-11-06  Gabor Loki  <loki@inf.u-szeged.hu>
 
15229         Unreviewed trivial buildfix after r50595.
 
15231         Rename the remaining rshiftPtr calls to rshift32
 
15233         * jit/JITArithmetic.cpp:
 
15234         (JSC::JIT::emit_op_rshift):
 
15235         * jit/JITInlineMethods.h:
 
15236         (JSC::JIT::emitFastArithImmToInt):
 
15238 2009-11-06  Gavin Barraclough  <barraclough@apple.com>
 
15240         Reviewed by Oliver Hunt.
 
15242         Tidy up the shift methods on the macro-assembler interface.
 
15244         Currently behaviour of shifts of a magnitude > 0x1f is undefined.
 
15245         Instead defined that all shifts are masked to this range.  This makes a lot of
 
15246         practical sense, both since having undefined behaviour is not particularly
 
15247         desirable, and because this behaviour is commonly required (particularly since
 
15248         it is required bt ECMA-262 for shifts).
 
15250         Update the ARM assemblers to provide this behaviour.  Remove (now) redundant
 
15251         masks from JITArithmetic, and remove rshiftPtr (this was used in case that
 
15252         could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
 
15253         on x86-64, which uses JSVALUE64!)
 
15255         * assembler/MacroAssembler.h:
 
15256         * assembler/MacroAssemblerARM.h:
 
15257         (JSC::MacroAssemblerARM::lshift32):
 
15258         (JSC::MacroAssemblerARM::rshift32):
 
15259         * assembler/MacroAssemblerARMv7.h:
 
15260         (JSC::MacroAssemblerARMv7::lshift32):
 
15261         (JSC::MacroAssemblerARMv7::rshift32):
 
15262         * assembler/MacroAssemblerX86_64.h:
 
15263         * jit/JITArithmetic.cpp:
 
15264         (JSC::JIT::emit_op_lshift):
 
15265         (JSC::JIT::emit_op_rshift):
 
15267 2009-11-05  Gavin Barraclough  <barraclough@apple.com>
 
15269         Rubber Stamped by Oliver Hunt.
 
15271         Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
 
15273         * jit/JITInlineMethods.h:
 
15274         (JSC::JIT::emitPutJITStubArg):
 
15275         (JSC::JIT::emitPutJITStubArgConstant):
 
15276         (JSC::JIT::emitGetJITStubArg):
 
15277         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
 
15278         * jit/JITStubCall.h:
 
15279         (JSC::JITStubCall::JITStubCall):
 
15280         (JSC::JITStubCall::getArgument):
 
15283 2009-11-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
15285         Reviewed by Gavin Barraclough.
 
15287         https://bugs.webkit.org/show_bug.cgi?id=31159
 
15288         Fix branchDouble behaviour on ARM THUMB2 JIT.
 
15290         The x86 branchDouble behaviour is reworked, and all JIT
 
15291         ports should follow the x86 port. See bug 31104 and 31151
 
15293         This patch contains a fix for the traditional ARM port
 
15295         * assembler/ARMAssembler.h:
 
15296         (JSC::ARMAssembler::):
 
15297         (JSC::ARMAssembler::fmrs_r):
 
15298         (JSC::ARMAssembler::ftosid_r):
 
15299         * assembler/MacroAssemblerARM.h:
 
15300         (JSC::MacroAssemblerARM::):
 
15301         (JSC::MacroAssemblerARM::branchDouble):
 
15302         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
 
15304 2009-11-05  Chris Jerdonek  <chris.jerdonek@gmail.com>
 
15306         Reviewed by Eric Seidel.
 
15308         Removed the "this is part of the KDE project" comments from 
 
15309         all *.h, *.cpp, *.idl, and *.pm files.
 
15311         https://bugs.webkit.org/show_bug.cgi?id=31167
 
15313         The maintenance and architecture page in the project wiki lists
 
15316         This change includes no changes or additions to test cases 
 
15317         since the change affects only comments.
 
15319         * wtf/wince/FastMallocWince.h:
 
15321 2009-11-05  Gabor Loki  <loki@inf.u-szeged.hu>
 
15323         Reviewed by Gavin Barraclough.
 
15325         Use ARMv7 specific encoding for immediate constants on ARMv7 target
 
15326         https://bugs.webkit.org/show_bug.cgi?id=31060
 
15328         * assembler/ARMAssembler.cpp:
 
15329         (JSC::ARMAssembler::getOp2): Use INVALID_IMM
 
15330         (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
 
15331         (JSC::ARMAssembler::moveImm): Ditto.
 
15332         (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
 
15333         instructions or a PC relative load.
 
15334         * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
 
15335         encoded as an immediate constant.
 
15336         (JSC::ARMAssembler::):
 
15337         (JSC::ARMAssembler::movw_r): 16-bit immediate load
 
15338         (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
 
15339         (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
 
15342 2009-11-04  Mark Mentovai  <mark@chromium.org>
 
15344         Reviewed by Mark Rowe.
 
15346         Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
 
15347         BUILDING_ON_TIGER and BUILDING_ON_LEOPARD.  The TARGETING_ macros
 
15348         consider the deployment target; the BUILDING_ON_ macros consider the
 
15349         headers being built against.
 
15353 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
 
15355         Reviewed by Oliver Hunt.
 
15357         https://bugs.webkit.org/show_bug.cgi?id=31151
 
15358         Fix branchDouble behaviour on ARM THUMB2 JIT.
 
15360         The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
 
15361         for DoubleEqualOrUnordered, however this is incorrect - ConditionEQ won't
 
15362         branch on unordered operands.  Similarly, DoubleLessThanOrUnordered &
 
15363         DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
 
15364         ARMv7Assembler::ConditionLS, whereas they should be using
 
15365         ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
 
15367         Fix these, and fill out the missing DoubleConditions.
 
15369         * assembler/MacroAssemblerARMv7.h:
 
15370         (JSC::MacroAssemblerARMv7::):
 
15371         (JSC::MacroAssemblerARMv7::branchDouble):
 
15373 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
 
15375         Rubber Stamped by Oliver Hunt.
 
15377         Enable native call optimizations on ARMv7.  (Existing ARM_TRADITIONAL
 
15378         implementation was generic, worked perfectly, just needed turning on).
 
15380         * jit/JITOpcodes.cpp:
 
15383 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
 
15385         Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
 
15387         Add a missing assert to the ARMv7 JIT.
 
15389         * assembler/ARMv7Assembler.h:
 
15390         (JSC::ARMThumbImmediate::ARMThumbImmediate):
 
15392 2009-11-04  Mark Rowe  <mrowe@apple.com>
 
15394         Rubber-stamped by Oliver Hunt.
 
15396         Remove bogus op_ prefix on dumped version of three opcodes.
 
15398         * bytecode/CodeBlock.cpp:
 
15399         (JSC::CodeBlock::dump):
 
15401 2009-11-04  Mark Rowe  <mrowe@apple.com>
 
15403         Reviewed by Sam Weinig.
 
15405         Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
 
15407         We do this by having the registerName function return information about the constant if the register
 
15408         number corresponds to a constant.  This requires that registerName, and several functions that call it,
 
15409         be converted to member functions of CodeBlock so that the constant value can be retrieved.  The
 
15410         ExecState also needs to be threaded down through these functions so that it can be passed on to
 
15411         constantName when needed.
 
15413         * bytecode/CodeBlock.cpp:
 
15414         (JSC::constantName):
 
15415         (JSC::CodeBlock::registerName):
 
15416         (JSC::CodeBlock::printUnaryOp):
 
15417         (JSC::CodeBlock::printBinaryOp):
 
15418         (JSC::CodeBlock::printConditionalJump):
 
15419         (JSC::CodeBlock::printGetByIdOp):
 
15420         (JSC::CodeBlock::printPutByIdOp):
 
15421         (JSC::CodeBlock::dump):
 
15422         * bytecode/CodeBlock.h:
 
15423         (JSC::CodeBlock::isConstantRegisterIndex):
 
15425 2009-11-04  Pavel Heimlich  <tropikhajma@gmail.com>
 
15427         Reviewed by Alexey Proskuryakov.
 
15429         https://bugs.webkit.org/show_bug.cgi?id=30647
 
15430         Solaris build failure due to strnstr.
 
15432         * wtf/StringExtras.h: Enable strnstr on Solaris, too.
 
15434 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
 
15436         Reviewed by Oliver Hunt.
 
15438         https://bugs.webkit.org/show_bug.cgi?id=31104
 
15439         Refactor x86-specific behaviour out of the JIT.
 
15441         - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
 
15442         - Refactor double to int conversion out into the MacroAssembler.
 
15443         - Remove broken double to int conversion for !JSVALUE32_64 builds - this code was broken and slowing us down, fixing it showed it not to be an improvement.
 
15444         - Remove exclusion of double to int conversion from (1 % X) cases in JSVALUE32_64 builds - if this was of benefit this is no longer the case; simplify.
 
15446         * assembler/MacroAssemblerARM.h:
 
15447         (JSC::MacroAssemblerARM::):
 
15448         * assembler/MacroAssemblerARMv7.h:
 
15449         (JSC::MacroAssemblerARMv7::):
 
15450         * assembler/MacroAssemblerX86Common.h:
 
15451         (JSC::MacroAssemblerX86Common::):
 
15452         (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
 
15453         (JSC::MacroAssemblerX86Common::branchDouble):
 
15454         (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
 
15455         * jit/JITArithmetic.cpp:
 
15456         (JSC::JIT::emitBinaryDoubleOp):
 
15457         (JSC::JIT::emit_op_div):
 
15458         (JSC::JIT::emitSlow_op_jnless):
 
15459         (JSC::JIT::emitSlow_op_jnlesseq):
 
15460         * jit/JITOpcodes.cpp:
 
15461         (JSC::JIT::emit_op_jfalse):
 
15463 2009-11-04  Mark Mentovai  <mark@chromium.org>
 
15465         Reviewed by Eric Seidel.
 
15467         Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp.  This is supposed
 
15468         to be set as needed only in wtf/Platform.h.
 
15470         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
15472 2009-11-02  Oliver Hunt  <oliver@apple.com>
 
15474         Reviewed by Gavin Barraclough.
 
15476         REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
 
15477         https://bugs.webkit.org/show_bug.cgi?id=31045
 
15479         Add guards to prevent caching of prototype chain lookups with dictionaries at the
 
15480         head of the chain.  Also add a few tighter assertions to cached prototype lookups
 
15481         to catch this in future.
 
15483         * interpreter/Interpreter.cpp:
 
15484         (JSC::Interpreter::tryCacheGetByID):
 
15485         (JSC::Interpreter::privateExecute):
 
15486         * jit/JITStubs.cpp:
 
15487         (JSC::JITThunks::tryCacheGetByID):
 
15489 2009-11-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
15491         Reviewed by Darin Adler.
 
15493         PLATFORM(CF) should be set when building for Qt on Darwin
 
15494         https://bugs.webkit.org/show_bug.cgi?id=23671
 
15496         * wtf/Platform.h: Turn on CF support if both QT and DARWIN
 
15497         platforms are defined.
 
15499 2009-11-02  Dmitry Titov  <dimich@chromium.org>
 
15501         Reviewed by David Levin.
 
15503         Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
 
15504         https://bugs.webkit.org/show_bug.cgi?id=30612
 
15506         * wtf/MessageQueue.h:
 
15507         (WTF::MessageQueue::alwaysTruePredicate):
 
15508         (WTF::MessageQueue::~MessageQueue):
 
15509         (WTF::MessageQueue::append):
 
15510         (WTF::MessageQueue::appendAndCheckEmpty):
 
15511         (WTF::MessageQueue::prepend):
 
15512         (WTF::MessageQueue::waitForMessage):
 
15513         (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
 
15514         (WTF::MessageQueue::tryGetMessage):
 
15515         (WTF::MessageQueue::removeIf):
 
15516         The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
 
15517         of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
 
15518         All methods have arguments of type PassOwnPtr<DataType> and return the same type.
 
15520         * wtf/Threading.cpp:
 
15521         (WTF::createThread):
 
15522         Superficial change to trigger rebuild of JSC project on Windows,
 
15523         workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
 
15525 2009-10-30  Geoffrey Garen  <ggaren@apple.com>
 
15527         Reviewed by Oliver Hunt.
 
15529         Fixed failing layout test: restore a special case I accidentally deleted.
 
15531         * runtime/DatePrototype.cpp:
 
15532         (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
 
15533         that is NaN, reset the date to 0 *and* then apply the change; don't just
 
15534         reset the date to 0.
 
15536 2009-10-30  Geoffrey Garen  <ggaren@apple.com>
 
15538         Windows build fix: update for object-to-pointer change.
 
15540         * runtime/DatePrototype.cpp:
 
15541         (JSC::formatLocaleDate):
 
15543 2009-10-29  Geoffrey Garen  <ggaren@apple.com>
 
15545         Reviewed by Darin Adler.
 
15547         https://bugs.webkit.org/show_bug.cgi?id=30942
 
15548         Use pointers instead of copies to pass GregorianDateTime objects around.
 
15550         SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
 
15551         speedup on date-format-tofte.
 
15553         * runtime/DateInstance.cpp:
 
15554         (JSC::DateInstance::gregorianDateTime):
 
15555         * runtime/DateInstance.h:
 
15556         * runtime/DatePrototype.cpp:
 
15557         (JSC::formatLocaleDate):
 
15558         (JSC::dateProtoFuncToString):
 
15559         (JSC::dateProtoFuncToUTCString):
 
15560         (JSC::dateProtoFuncToISOString):
 
15561         (JSC::dateProtoFuncToDateString):
 
15562         (JSC::dateProtoFuncToTimeString):
 
15563         (JSC::dateProtoFuncGetFullYear):
 
15564         (JSC::dateProtoFuncGetUTCFullYear):
 
15565         (JSC::dateProtoFuncToGMTString):
 
15566         (JSC::dateProtoFuncGetMonth):
 
15567         (JSC::dateProtoFuncGetUTCMonth):
 
15568         (JSC::dateProtoFuncGetDate):
 
15569         (JSC::dateProtoFuncGetUTCDate):
 
15570         (JSC::dateProtoFuncGetDay):
 
15571         (JSC::dateProtoFuncGetUTCDay):
 
15572         (JSC::dateProtoFuncGetHours):
 
15573         (JSC::dateProtoFuncGetUTCHours):
 
15574         (JSC::dateProtoFuncGetMinutes):
 
15575         (JSC::dateProtoFuncGetUTCMinutes):
 
15576         (JSC::dateProtoFuncGetSeconds):
 
15577         (JSC::dateProtoFuncGetUTCSeconds):
 
15578         (JSC::dateProtoFuncGetTimezoneOffset):
 
15579         (JSC::setNewValueFromTimeArgs):
 
15580         (JSC::setNewValueFromDateArgs):
 
15581         (JSC::dateProtoFuncSetYear):
 
15582         (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
 
15583         since it no longer has an out parameter. Uses 0 to indicate invalid dates.
 
15585 2009-10-30  Zoltan Horvath  <zoltan@webkit.org>
 
15587         Reviewed by Darin Adler.
 
15589         Allow custom memory allocation control for JavaScriptCore's ListHashSet
 
15590         https://bugs.webkit.org/show_bug.cgi?id=30853
 
15592         Inherits ListHashSet class from FastAllocBase because it is
 
15593         instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
 
15595         * wtf/ListHashSet.h:
 
15597 2009-10-30  Oliver Hunt  <oliver@apple.com>
 
15599         Reviewed by Gavin Barraclough.
 
15601         Regression: crash enumerating properties of an object with getters or setters
 
15602         https://bugs.webkit.org/show_bug.cgi?id=30948
 
15604         Add a guard to prevent us trying to cache property enumeration on
 
15605         objects with getters or setters.
 
15607         * runtime/JSPropertyNameIterator.cpp:
 
15608         (JSC::JSPropertyNameIterator::create):
 
15610 2009-10-30  Roland Steiner  <rolandsteiner@chromium.org>
 
15612         Reviewed by Eric Seidel.
 
15614         Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
 
15616         Bug 28420 -  Implement HTML5 <ruby> rendering
 
15617         (https://bugs.webkit.org/show_bug.cgi?id=28420)
 
15619         No new tests (no functional change).
 
15621         * Configurations/FeatureDefines.xcconfig:
 
15623 2009-10-29  Oliver Hunt  <oliver@apple.com>
 
15625         Reviewed by Maciej Stachowiak.
 
15627         REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
 
15628         https://bugs.webkit.org/show_bug.cgi?id=30947
 
15629         <rdar://problem/7348833>
 
15631         The logic for flagging that a structure has non-enumerable properties
 
15632         was in addPropertyWithoutTransition, rather than in the core Structure::put
 
15633         method.  Despite this I was unable to produce a testcase that caused
 
15634         the failure that etrade was experiencing, but the new assertion in
 
15635         getEnumerablePropertyNames triggers on numerous layout tests without
 
15636         the fix, so in effecti all for..in enumeration in any test ends up
 
15637         doing the required consistency check.
 
15639         * runtime/Structure.cpp:
 
15640         (JSC::Structure::addPropertyWithoutTransition):
 
15641         (JSC::Structure::put):
 
15642         (JSC::Structure::getEnumerablePropertyNames):
 
15643         (JSC::Structure::checkConsistency):
 
15645 2009-10-29  Gabor Loki  <loki@inf.u-szeged.hu>
 
15647         Reviewed by Gavin Barraclough.
 
15649         Add cacheFlush support for Thumb-2 on Linux
 
15650         https://bugs.webkit.org/show_bug.cgi?id=30865
 
15652         * jit/ExecutableAllocator.h:
 
15653         (JSC::ExecutableAllocator::cacheFlush):
 
15655 2009-10-28  Gavin Barraclough  <barraclough@apple.com>
 
15657         Reviewed by Oliver Hunt.
 
15659         JSC JIT on ARMv7 cannot link jumps >16Mb range
 
15660         https://bugs.webkit.org/show_bug.cgi?id=30891
 
15662         Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
 
15663         In the cases where the jump would fall within a relative jump range, use a relative jump.
 
15665         * JavaScriptCore.xcodeproj/project.pbxproj:
 
15666         * assembler/ARMv7Assembler.h:
 
15667         (JSC::ARMv7Assembler::~ARMv7Assembler):
 
15668         (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
 
15669         (JSC::ARMv7Assembler::):
 
15670         (JSC::ARMv7Assembler::executableCopy):
 
15671         (JSC::ARMv7Assembler::linkJump):
 
15672         (JSC::ARMv7Assembler::relinkJump):
 
15673         (JSC::ARMv7Assembler::setInt32):
 
15674         (JSC::ARMv7Assembler::isB):
 
15675         (JSC::ARMv7Assembler::isBX):
 
15676         (JSC::ARMv7Assembler::isMOV_imm_T3):
 
15677         (JSC::ARMv7Assembler::isMOVT):
 
15678         (JSC::ARMv7Assembler::isNOP_T1):
 
15679         (JSC::ARMv7Assembler::isNOP_T2):
 
15680         (JSC::ARMv7Assembler::linkJumpAbsolute):
 
15681         (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
 
15682         (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
 
15683         (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
 
15684         * assembler/MacroAssemblerARMv7.h:
 
15685         (JSC::MacroAssemblerARMv7::makeJump):
 
15686         (JSC::MacroAssemblerARMv7::makeBranch):
 
15690 2009-10-28  Oliver Hunt  <oliver@apple.com>
 
15692         Reviewed by Geoff Garen.
 
15694         Improve for..in enumeration performance
 
15695         https://bugs.webkit.org/show_bug.cgi?id=30887
 
15697         Improve indexing of an object with a for..in iterator by
 
15698         identifying cases where get_by_val is being used with a iterator
 
15699         as the subscript and replace it with a new get_by_pname
 
15700         bytecode.  get_by_pname then optimizes lookups that directly access
 
15703         * bytecode/CodeBlock.cpp:
 
15704         (JSC::CodeBlock::dump):
 
15705         * bytecode/Opcode.h:
 
15706         * bytecompiler/BytecodeGenerator.cpp:
 
15707         (JSC::BytecodeGenerator::emitGetByVal):
 
15708         * bytecompiler/BytecodeGenerator.h:
 
15709         (JSC::BytecodeGenerator::pushOptimisedForIn):
 
15710         (JSC::BytecodeGenerator::popOptimisedForIn):
 
15711         * interpreter/Interpreter.cpp:
 
15712         (JSC::Interpreter::privateExecute):
 
15714         (JSC::JIT::privateCompileMainPass):
 
15715         (JSC::JIT::privateCompileSlowCases):
 
15717         * jit/JITPropertyAccess.cpp:
 
15718         (JSC::JIT::compileGetDirectOffset):
 
15719         (JSC::JIT::emit_op_get_by_pname):
 
15720         (JSC::JIT::emitSlow_op_get_by_pname):
 
15721         * parser/Nodes.cpp:
 
15722         (JSC::ForInNode::emitBytecode):
 
15723         * runtime/JSObject.h:
 
15724         * runtime/JSPropertyNameIterator.cpp:
 
15725         (JSC::JSPropertyNameIterator::create):
 
15726         * runtime/JSPropertyNameIterator.h:
 
15727         (JSC::JSPropertyNameIterator::getOffset):
 
15728         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
 
15729         * runtime/JSValue.h:
 
15731         * runtime/Structure.cpp:
 
15732         (JSC::Structure::addPropertyTransition):
 
15733         (JSC::Structure::changePrototypeTransition):
 
15734         (JSC::Structure::despecifyFunctionTransition):
 
15735         (JSC::Structure::addAnonymousSlotsTransition):
 
15736         (JSC::Structure::getterSetterTransition):
 
15737         (JSC::Structure::toDictionaryTransition):
 
15738         (JSC::Structure::addPropertyWithoutTransition):
 
15739           Track the existence (or not) of non-enumerable properties.
 
15740         * runtime/Structure.h:
 
15741         (JSC::Structure::propertyStorageCapacity):
 
15742         (JSC::Structure::propertyStorageSize):
 
15743         (JSC::Structure::hasNonEnumerableProperties):
 
15744         (JSC::Structure::hasAnonymousSlots):
 
15746 2009-10-28  Dmitry Titov  <dimich@chromium.org>
 
15748         Not reviewed, attemp to fix Windows build.
 
15750         Touch the cpp file to cause recompile.
 
15752         * wtf/Threading.cpp:
 
15753         (WTF::threadEntryPoint):
 
15755 2009-10-28  Dmitry Titov  <dimich@chromium.org>
 
15757         Reviewed by David Levin.
 
15759         https://bugs.webkit.org/show_bug.cgi?id=30805
 
15760         Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
 
15761         Existing Database tests cover this since Database removes tasks when it is stopped.
 
15763         * wtf/MessageQueue.h:
 
15766 2009-10-28  Afonso R. Costa Jr.  <afonso.costa@openbossa.org>
 
15768         Reviewed by Oliver Hunt.
 
15770         [Qt] Enable YARR when YARR_JIT is enabled
 
15771         https://bugs.webkit.org/show_bug.cgi?id=30730
 
15773         When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
 
15776         * JavaScriptCore.pri:
 
15778 2009-10-24  Martin Robinson  <martin.james.robinson@gmail.com>
 
15780         Reviewed by Oliver Hunt.
 
15782         Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
 
15784         strict-aliasing warnings in JSFunction.h
 
15785         https://bugs.webkit.org/show_bug.cgi?id=27869
 
15787         * runtime/JSFunction.h:
 
15788         (JSC::JSFunction::nativeFunction):
 
15789         (JSC::JSFunction::scopeChain):
 
15790         (JSC::JSFunction::setScopeChain):
 
15791         (JSC::JSFunction::setNativeFunction):
 
15793 2009-10-28  Jan-Arve Sæther <jan-arve.saether@nokia.com>
 
15795         Reviewed by Tor Arne Vestbø.
 
15797         Build-fix for 64-bit Windows
 
15799         * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
 
15801 2009-10-28  Gavin Barraclough  <barraclough@apple.com>
 
15803         Reviewed by NOBODY (build fix!).
 
15807 2009-10-26  Holger Hans Peter Freyther  <zecke@selfish.org>
 
15809         Rubber-stamped by Darin Adler.
 
15811         Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
 
15812         https://bugs.webkit.org/show_bug.cgi?id=30769
 
15814         When using -fvisibility=hidden to hide all internal symbols by default
 
15815         the malloc symbols will be hidden as well. For memory instrumentation
 
15816         it is needed to provide an instrumented version of these symbols and
 
15817         override the normal routines and by changing the visibility back to
 
15818         default this becomes possible.
 
15820         The only other solution would be to use system malloc instead of the
 
15821         TCmalloc implementation but this will not allow to analyze memory
 
15822         behavior with the default allocator.
 
15824         * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
 
15826 2009-10-27  Gavin Barraclough  <barraclough@apple.com>
 
15828         Rubber Stamped by Samuel Q. Weinig.
 
15830         Make the asserts protecting the offsets in the JIT more descriptive.
 
15834         (JSC::JIT::compileOpCall):
 
15835         * jit/JITPropertyAccess.cpp:
 
15836         (JSC::JIT::emit_op_method_check):
 
15837         (JSC::JIT::compileGetByIdHotPath):
 
15838         (JSC::JIT::compileGetByIdSlowCase):
 
15839         (JSC::JIT::emit_op_put_by_id):
 
15841 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
 
15843         Reviewed by Sam Weinig.
 
15845         A little bit of refactoring in the date code.
 
15847         * JavaScriptCore.exp: Don't export this unused symbol.
 
15849         * runtime/DateConstructor.cpp:
 
15850         (JSC::constructDate):
 
15852         * runtime/DateInstance.cpp:
 
15853         (JSC::DateInstance::DateInstance):
 
15854         * runtime/DateInstance.h: Removed some unused functions. Changed the default
 
15855         constructor to ensure that a DateInstance is always initialized.
 
15857         * runtime/DatePrototype.cpp:
 
15858         (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
 
15859         since it now requires one.
 
15861         * wtf/DateMath.cpp:
 
15862         (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
 
15863         output will require it. Otherwise, our offset is 0.
 
15865 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
 
15867         Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
 
15869         * JavaScriptCore.xcodeproj/project.pbxproj:
 
15871 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
 
15873         Build fix: re-readded this file.
 
15875         * runtime/DateInstanceCache.h: Added.
 
15876         (JSC::DateInstanceData::create):
 
15877         (JSC::DateInstanceData::DateInstanceData):
 
15878         (JSC::DateInstanceCache::DateInstanceCache):
 
15879         (JSC::DateInstanceCache::add):
 
15880         (JSC::DateInstanceCache::lookup):
 
15882 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
 
15884         Reviewed by Darin Adler and Oliver Hunt.
 
15886         https://bugs.webkit.org/show_bug.cgi?id=30800
 
15887         Cache recently computed date data.
 
15889         SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
 
15892         * JavaScriptCore.gypi:
 
15893         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
15894         * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
 
15896         * runtime/DateInstance.cpp:
 
15897         (JSC::DateInstance::DateInstance):
 
15898         (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
 
15900         * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
 
15901         of a "cache cache".
 
15903         * runtime/DatePrototype.cpp:
 
15904         (JSC::formatLocaleDate):
 
15905         (JSC::dateProtoFuncToString):
 
15906         (JSC::dateProtoFuncToUTCString):
 
15907         (JSC::dateProtoFuncToISOString):
 
15908         (JSC::dateProtoFuncToDateString):
 
15909         (JSC::dateProtoFuncToTimeString):
 
15910         (JSC::dateProtoFuncGetFullYear):
 
15911         (JSC::dateProtoFuncGetUTCFullYear):
 
15912         (JSC::dateProtoFuncToGMTString):
 
15913         (JSC::dateProtoFuncGetMonth):
 
15914         (JSC::dateProtoFuncGetUTCMonth):
 
15915         (JSC::dateProtoFuncGetDate):
 
15916         (JSC::dateProtoFuncGetUTCDate):
 
15917         (JSC::dateProtoFuncGetDay):
 
15918         (JSC::dateProtoFuncGetUTCDay):
 
15919         (JSC::dateProtoFuncGetHours):
 
15920         (JSC::dateProtoFuncGetUTCHours):
 
15921         (JSC::dateProtoFuncGetMinutes):
 
15922         (JSC::dateProtoFuncGetUTCMinutes):
 
15923         (JSC::dateProtoFuncGetSeconds):
 
15924         (JSC::dateProtoFuncGetUTCSeconds):
 
15925         (JSC::dateProtoFuncGetTimezoneOffset):
 
15926         (JSC::setNewValueFromTimeArgs):
 
15927         (JSC::setNewValueFromDateArgs):
 
15928         (JSC::dateProtoFuncSetYear):
 
15929         (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
 
15930         can access the DateInstanceCache.
 
15932         * runtime/JSGlobalData.h: Keep a DateInstanceCache.
 
15934 2009-10-27  James Robinson  <jamesr@chromium.org>
 
15936         Reviewed by Darin Fisher.
 
15938         Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
 
15940         Chromium uses a different method to calculate the current time than is used in
 
15941         JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
 
15942         function are mixed.  In particular, timers can get scheduled in the past which leads to 100% CPU use.
 
15943         See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
 
15945         https://bugs.webkit.org/show_bug.cgi?id=30833
 
15947         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
15948         * wtf/CurrentTime.cpp:
 
15950 2009-10-27  Peter Varga  <pvarga@inf.u-szeged.hu>
 
15952         Rubber-stamped by Tor Arne Vestbø.
 
15954         Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
 
15957         * yarr/RegexInterpreter.cpp:
 
15958         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
 
15959         (JSC::Yarr::ByteCompiler::alternativeDisjunction):
 
15960         (JSC::Yarr::ByteCompiler::emitDisjunction):
 
15961         * yarr/RegexJIT.cpp:
 
15962         (JSC::Yarr::RegexGenerator::generateDisjunction):
 
15964 2009-10-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
15966         Reviewed by Darin Adler.
 
15968         Make .rc files compile on Windows without depending on MFC headers
 
15969         https://bugs.webkit.org/show_bug.cgi?id=30750
 
15971         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
 
15972         winresrc.h because it exists even when MFC is not installed, and is
 
15973         all that's needed here.
 
15975 2009-10-26  Gabor Loki  <loki@inf.u-szeged.hu>
 
15977         Reviewed by Gavin Barraclough.
 
15979         The thunkReturnAddress is on JITStackFrame on ARM JIT as well
 
15980         https://bugs.webkit.org/show_bug.cgi?id=30782
 
15982         Move the thunkReturnAddress from top of the stack into the JITStackFrame
 
15983         structure. This is a requirement for JSValue32_64 support on ARM.
 
15985         * assembler/MacroAssemblerARM.h:
 
15986         (JSC::MacroAssemblerARM::ret): Return with link register
 
15987         (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
 
15988         * jit/JIT.h: Remove unused ctiReturnRegister
 
15989         * jit/JITInlineMethods.h: Same as ARMv7
 
15990         (JSC::JIT::restoreArgumentReference): Ditto.
 
15991         (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
 
15992         * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
 
15993         * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
 
15994         small trampoline functions which handle return addresses for each
 
15996         * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
 
15997         (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
 
15998         * yarr/RegexJIT.cpp:
 
15999         (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
 
16001 2009-10-26  Steve Block  <steveblock@google.com>
 
16003         Reviewed by Darin Adler.
 
16005         Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
 
16006         https://bugs.webkit.org/show_bug.cgi?id=30713
 
16008         * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
 
16009         * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
 
16010         * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
 
16012 2009-10-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
16014         Reviewed by Holger Freyther.
 
16016         [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
 
16017         https://bugs.webkit.org/show_bug.cgi?id=30476
 
16019         Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
 
16024 2009-10-23  Steve Block  <steveblock@google.com>
 
16026         Reviewed by Dmitry Titov.
 
16028         Fixes a leak in createThreadInternal on Android.
 
16029         https://bugs.webkit.org/show_bug.cgi?id=30698
 
16031         * wtf/ThreadingPthreads.cpp: Modified.
 
16032         (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
 
16034 2009-10-22  Geoffrey Garen  <ggaren@apple.com>
 
16036         Reviewed by Alexey Proskuryakov.
 
16038         Fixed ASSERT when opening Safari's Caches window while the Web Inspector
 
16041         * runtime/Collector.cpp:
 
16042         (JSC::typeName): Added two new types to the type name list in the Collector.
 
16043         These types have been around for a while, but nobody remembered to consider them here.
 
16045         * runtime/JSCell.h:
 
16046         (JSC::JSCell::isPropertyNameIterator):
 
16047         * runtime/JSPropertyNameIterator.h:
 
16048         (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
 
16049         a way to tell if a cell is a JSPropertyNameIterator.
 
16051 2009-10-22  Steve Falkenburg  <sfalken@apple.com>
 
16053         Reviewed by Jon Honeycutt.
 
16055         https://bugs.webkit.org/show_bug.cgi?id=30686
 
16056         Remove debug-specific def file.
 
16057         Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
 
16058         that target is only used internally, maintaining two files just to
 
16059         suppress a single link warning isn't worthwhile.
 
16061         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
16062         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
 
16064 2009-10-21  Jon Honeycutt  <jhoneycutt@apple.com>
 
16066         <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
 
16067         <rdar://problem/7270314> After halting a transparent PluginView on
 
16068         Windows, the transparency is applied twice
 
16070         Reviewed by Dan Bernstein.
 
16072         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
16073         Export WTF::deleteOwnedPtr(HDC).
 
16075         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
16078 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
 
16080         Windows build fix: updated variable name.
 
16082         * runtime/DatePrototype.cpp:
 
16083         (JSC::formatLocaleDate):
 
16085 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
 
16087         Reviewed by Mark Rowe.
 
16089         * jit/JITOpcodes.cpp:
 
16090         (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
 
16091         size of a JSValue because m_jsStrings is an array of JSValues.
 
16093 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
 
16095         Reviewed by Mark Rowe.
 
16097         Fixed a 64-bit regression caused by the fix for
 
16098         https://bugs.webkit.org/show_bug.cgi?id=30570.
 
16100         * jit/JITOpcodes.cpp:
 
16101         (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
 
16102         64-bit pointers are eight bytes long.
 
16104 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
 
16106         Reviewed by Sam Weinig.
 
16108         Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
 
16109         caller doesn't need to supply the DateInstance's own internal value to
 
16112         * runtime/DateInstance.cpp:
 
16113         (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
 
16115         * runtime/DateInstance.h:
 
16116         * runtime/DatePrototype.cpp:
 
16117         (JSC::formatLocaleDate):
 
16118         (JSC::dateProtoFuncToString):
 
16119         (JSC::dateProtoFuncToUTCString):
 
16120         (JSC::dateProtoFuncToISOString):
 
16121         (JSC::dateProtoFuncToDateString):
 
16122         (JSC::dateProtoFuncToTimeString):
 
16123         (JSC::dateProtoFuncToLocaleString):
 
16124         (JSC::dateProtoFuncToLocaleDateString):
 
16125         (JSC::dateProtoFuncToLocaleTimeString):
 
16126         (JSC::dateProtoFuncGetTime):
 
16127         (JSC::dateProtoFuncGetFullYear):
 
16128         (JSC::dateProtoFuncGetUTCFullYear):
 
16129         (JSC::dateProtoFuncToGMTString):
 
16130         (JSC::dateProtoFuncGetMonth):
 
16131         (JSC::dateProtoFuncGetUTCMonth):
 
16132         (JSC::dateProtoFuncGetDate):
 
16133         (JSC::dateProtoFuncGetUTCDate):
 
16134         (JSC::dateProtoFuncGetDay):
 
16135         (JSC::dateProtoFuncGetUTCDay):
 
16136         (JSC::dateProtoFuncGetHours):
 
16137         (JSC::dateProtoFuncGetUTCHours):
 
16138         (JSC::dateProtoFuncGetMinutes):
 
16139         (JSC::dateProtoFuncGetUTCMinutes):
 
16140         (JSC::dateProtoFuncGetSeconds):
 
16141         (JSC::dateProtoFuncGetUTCSeconds):
 
16142         (JSC::dateProtoFuncGetTimezoneOffset):
 
16143         (JSC::setNewValueFromTimeArgs):
 
16144         (JSC::setNewValueFromDateArgs):
 
16145         (JSC::dateProtoFuncSetYear):
 
16146         (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
 
16148 2009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
 
16150         Reviewed by Geoffrey Garen.
 
16152         The op_next_pname should use 4 bytes addressing mode in case of JSValue32
 
16153         https://bugs.webkit.org/show_bug.cgi?id=30570
 
16155         * jit/JITOpcodes.cpp:
 
16156         (JSC::JIT::emit_op_next_pname):
 
16158 2009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
 
16160         Reviewed by Oliver Hunt.
 
16162         Move OverridesMarkChildren flag from DatePrototype to its parent class
 
16163         https://bugs.webkit.org/show_bug.cgi?id=30372
 
16165         * runtime/DateInstance.h:
 
16166         (JSC::DateInstance::createStructure):
 
16167         * runtime/DatePrototype.h:
 
16169 2009-10-19  Geoffrey Garen  <ggaren@apple.com>
 
16171         Reviewed by Oliver Hunt.
 
16173         Tightened up some put_by_id_transition code generation.
 
16174         https://bugs.webkit.org/show_bug.cgi?id=30539
 
16177         * jit/JITPropertyAccess.cpp:
 
16178         (JSC::JIT::testPrototype):
 
16179         (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
 
16180         checks or read Structures and prototypes from objects: they're all known
 
16181         constants at compile time.
 
16183 2009-10-19  Geoffrey Garen  <ggaren@apple.com>
 
16185         Reviewed by Sam Weinig.
 
16187         Added a private API for getting a global context from a context, for
 
16188         clients who want to preserve a context for a later callback.
 
16191         (toGlobalRef): Added an ASSERT, since this function is used more often
 
16194         * API/JSContextRef.cpp:
 
16195         * API/JSContextRefPrivate.h: Added. The new API.
 
16197         * API/tests/testapi.c:
 
16198         (print_callAsFunction):
 
16199         (main): Test the new API.
 
16201         * JavaScriptCore.exp:
 
16202         * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
 
16204 2009-10-17  Geoffrey Garen  <ggaren@apple.com>
 
16206         Reviewed by Oliver Hunt.
 
16208         Tightened up some instanceof code generation.
 
16209         https://bugs.webkit.org/show_bug.cgi?id=30488
 
16211         * jit/JITOpcodes.cpp:
 
16212         (JSC::JIT::emit_op_instanceof):
 
16213         (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks - 
 
16214         cell type checks and ImplementsDefaultHasIntance checks implicitly
 
16215         supersede object type checks.
 
16217 2009-10-18  Kwang Yul Seo  <skyul@company100.net>
 
16219         Reviewed by Darin Adler.
 
16221         Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
 
16222         https://bugs.webkit.org/show_bug.cgi?id=30474
 
16224         stricmp and strnicmp are deprecated beginning in Visual
 
16225         C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
 
16227         * wtf/StringExtras.h:
 
16231 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
 
16233         Build fix: apparently we shouldn't export those symbols?
 
16235         * JavaScriptCore.exp:
 
16237 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
 
16239         Build fix: export some symbols.
 
16241         * JavaScriptCore.exp:
 
16243 2009-10-16  Oliver Hunt  <oliver@apple.com>
 
16245         Reviewed by Gavin Barraclough.
 
16247         structure typeinfo flags should be inherited.
 
16248         https://bugs.webkit.org/show_bug.cgi?id=30468
 
16250         Add StructureFlag constant to the various JSC classes and use
 
16251         it for the TypeInfo construction.  This allows us to simply
 
16252         accumulate flags by basing each classes StructureInfo on its parents.
 
16254         * API/JSCallbackConstructor.h:
 
16255         (JSC::JSCallbackConstructor::createStructure):
 
16256         * API/JSCallbackFunction.h:
 
16257         (JSC::JSCallbackFunction::createStructure):
 
16258         * API/JSCallbackObject.h:
 
16259         (JSC::JSCallbackObject::createStructure):
 
16260         * debugger/DebuggerActivation.h:
 
16261         (JSC::DebuggerActivation::createStructure):
 
16262         * runtime/Arguments.h:
 
16263         (JSC::Arguments::createStructure):
 
16264         * runtime/BooleanObject.h:
 
16265         (JSC::BooleanObject::createStructure):
 
16266         * runtime/DatePrototype.h:
 
16267         (JSC::DatePrototype::createStructure):
 
16268         * runtime/FunctionPrototype.h:
 
16269         (JSC::FunctionPrototype::createStructure):
 
16270         * runtime/GlobalEvalFunction.h:
 
16271         (JSC::GlobalEvalFunction::createStructure):
 
16272         * runtime/InternalFunction.h:
 
16273         (JSC::InternalFunction::createStructure):
 
16274         * runtime/JSActivation.h:
 
16275         (JSC::JSActivation::createStructure):
 
16276         * runtime/JSArray.h:
 
16277         (JSC::JSArray::createStructure):
 
16278         * runtime/JSByteArray.cpp:
 
16279         (JSC::JSByteArray::createStructure):
 
16280         * runtime/JSByteArray.h:
 
16281         * runtime/JSFunction.h:
 
16282         (JSC::JSFunction::createStructure):
 
16283         * runtime/JSGlobalObject.h:
 
16284         (JSC::JSGlobalObject::createStructure):
 
16285         * runtime/JSNotAnObject.h:
 
16286         (JSC::JSNotAnObject::createStructure):
 
16287         * runtime/JSONObject.h:
 
16288         (JSC::JSONObject::createStructure):
 
16289         * runtime/JSObject.h:
 
16290         (JSC::JSObject::createStructure):
 
16291         * runtime/JSStaticScopeObject.h:
 
16292         (JSC::JSStaticScopeObject::createStructure):
 
16293         * runtime/JSVariableObject.h:
 
16294         (JSC::JSVariableObject::createStructure):
 
16295         * runtime/JSWrapperObject.h:
 
16296         (JSC::JSWrapperObject::createStructure):
 
16297         * runtime/MathObject.h:
 
16298         (JSC::MathObject::createStructure):
 
16299         * runtime/NumberConstructor.h:
 
16300         (JSC::NumberConstructor::createStructure):
 
16301         * runtime/NumberObject.h:
 
16302         (JSC::NumberObject::createStructure):
 
16303         * runtime/RegExpConstructor.h:
 
16304         (JSC::RegExpConstructor::createStructure):
 
16305         * runtime/RegExpObject.h:
 
16306         (JSC::RegExpObject::createStructure):
 
16307         * runtime/StringObject.h:
 
16308         (JSC::StringObject::createStructure):
 
16309         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
16310         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
 
16312 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
 
16314         Reviewed by Oliver Hunt.
 
16316         Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
 
16317         in JSPropertyNameIterator; inline more code.
 
16319         1.024x as fast on SunSpider (fasta: 1.43x as fast).
 
16321         * bytecode/CodeBlock.cpp:
 
16322         (JSC::CodeBlock::dump):
 
16323         * bytecode/Opcode.h:
 
16324         * bytecompiler/BytecodeGenerator.cpp:
 
16325         (JSC::BytecodeGenerator::emitGetPropertyNames):
 
16326         (JSC::BytecodeGenerator::emitNextPropertyName):
 
16327         * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
 
16328         op_get_pnames and op_next_pname so that we can track iteration state
 
16329         in the register file instead of in the JSPropertyNameIterator. (To be
 
16330         cacheable, the JSPropertyNameIterator must be stateless.)
 
16332         * interpreter/Interpreter.cpp:
 
16333         (JSC::Interpreter::tryCachePutByID):
 
16334         (JSC::Interpreter::tryCacheGetByID): Updated for rename to
 
16335         "normalizePrototypeChain" and removal of "isCacheable". 
 
16337         (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
 
16338         iteration state tracking.
 
16341         (JSC::JIT::privateCompileMainPass):
 
16343         * jit/JITOpcodes.cpp:
 
16344         (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
 
16345         iteration state tracking.
 
16347         (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
 
16349         * jit/JITStubs.cpp:
 
16350         (JSC::JITThunks::tryCachePutByID):
 
16351         (JSC::JITThunks::tryCacheGetByID): Updated for rename to
 
16352         "normalizePrototypeChain" and removal of "isCacheable". 
 
16354         (JSC::DEFINE_STUB_FUNCTION):
 
16356         (JSC::): Added has_property and to_object stubs. Removed op_next_pname
 
16357         stub, since has_property is all we need anymore.
 
16359         * parser/Nodes.cpp:
 
16360         (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
 
16361         iteration state tracking.
 
16363         * runtime/JSCell.h:
 
16364         * runtime/JSObject.cpp:
 
16365         (JSC::JSObject::getPropertyNames): Don't do caching at this layer
 
16366         anymore, since we don't create a JSPropertyNameIterator at this layer.
 
16368         * runtime/JSPropertyNameIterator.cpp:
 
16369         (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
 
16370         (JSC::JSPropertyNameIterator::get):  Updated for in-RegisterFile
 
16371         iteration state tracking.
 
16372         (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
 
16374         * runtime/JSPropertyNameIterator.h:
 
16375         (JSC::JSPropertyNameIterator::size):
 
16376         (JSC::JSPropertyNameIterator::setCachedStructure):
 
16377         (JSC::JSPropertyNameIterator::cachedStructure):
 
16378         (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
 
16379         (JSC::JSPropertyNameIterator::cachedPrototypeChain):
 
16380         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
 
16381         (JSC::Structure::setEnumerationCache): Don't store iteration state in
 
16382         a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
 
16385         * runtime/JSValue.h:
 
16387         * runtime/MarkStack.h: Make those mischievous #include gods happy.
 
16389         * runtime/ObjectConstructor.cpp:
 
16391         * runtime/Operations.h:
 
16392         (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
 
16393         to normalizePrototypeChain, since it changes dictionary prototypes to
 
16394         non-dictionary objects.
 
16396         * runtime/PropertyNameArray.cpp:
 
16397         (JSC::PropertyNameArray::add):
 
16398         * runtime/PropertyNameArray.h:
 
16399         (JSC::PropertyNameArrayData::PropertyNameArrayData):
 
16400         (JSC::PropertyNameArray::data):
 
16401         (JSC::PropertyNameArray::size):
 
16402         (JSC::PropertyNameArray::begin):
 
16403         (JSC::PropertyNameArray::end): Simplified some code here to help with
 
16404         current and future refactoring.
 
16406         * runtime/Protect.h:
 
16407         * runtime/Structure.cpp:
 
16408         (JSC::Structure::~Structure):
 
16409         (JSC::Structure::addPropertyWithoutTransition):
 
16410         (JSC::Structure::removePropertyWithoutTransition): No need to clear
 
16411         the enumeration cache with adding / removing properties without
 
16412         transition. It is an error to add / remove properties without transition
 
16413         once an object has been observed, and we can ASSERT to catch that.
 
16415         * runtime/Structure.h:
 
16416         (JSC::Structure::enumerationCache): Changed the enumeration cache to
 
16417         hold a JSPropertyNameIterator.
 
16419         * runtime/StructureChain.cpp:
 
16420         * runtime/StructureChain.h:
 
16421         (JSC::StructureChain::head): Removed StructureChain::isCacheable because
 
16422         it was wrong-headed in two ways: (1) It gave up when a prototype was a
 
16423         dictionary, but instead we want un-dictionary heavily accessed
 
16424         prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
 
16425         a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
 
16426         is only releavant to for-in caching.
 
16428 2009-10-16  Steve Falkenburg  <sfalken@apple.com>
 
16430         Reviewed by Adam Roben.
 
16432         Add a Debug_All configuration to build entire stack as debug.
 
16433         Change Debug_Internal to:
 
16434         - stop using _debug suffix for all WebKit/Safari binaries
 
16435         - not use _debug as a DLL naming suffix
 
16436         - use non-debug C runtime lib.
 
16438         * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
 
16439         * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
 
16440         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
 
16441         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
 
16442         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
 
16443         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
 
16444         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
 
16445         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
 
16447 2009-10-16  Oliver Hunt  <oliver@apple.com>
 
16449         Reviewed by Gavin Barraclough.
 
16451         Make typeinfo flags default to false
 
16452         https://bugs.webkit.org/show_bug.cgi?id=30372
 
16454         Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
 
16457         * API/JSCallbackConstructor.h:
 
16458         (JSC::JSCallbackConstructor::createStructure):
 
16459         * API/JSCallbackObject.h:
 
16460         (JSC::JSCallbackObject::createStructure):
 
16461         * debugger/DebuggerActivation.h:
 
16462         (JSC::DebuggerActivation::createStructure):
 
16463         * runtime/Arguments.h:
 
16464         (JSC::Arguments::createStructure):
 
16465         * runtime/BooleanObject.h:
 
16466         (JSC::BooleanObject::createStructure):
 
16467         * runtime/DatePrototype.h:
 
16468         (JSC::DatePrototype::createStructure):
 
16469         * runtime/FunctionPrototype.h:
 
16470         (JSC::FunctionPrototype::createStructure):
 
16471         * runtime/GlobalEvalFunction.h:
 
16472         (JSC::GlobalEvalFunction::createStructure):
 
16473         * runtime/JSAPIValueWrapper.h:
 
16474         (JSC::JSAPIValueWrapper::createStructure):
 
16475         * runtime/JSActivation.h:
 
16476         (JSC::JSActivation::createStructure):
 
16477         * runtime/JSArray.h:
 
16478         (JSC::JSArray::createStructure):
 
16479         * runtime/JSByteArray.cpp:
 
16480         (JSC::JSByteArray::createStructure):
 
16481         * runtime/JSFunction.h:
 
16482         (JSC::JSFunction::createStructure):
 
16483         * runtime/JSGlobalObject.h:
 
16484         (JSC::JSGlobalObject::createStructure):
 
16485         * runtime/JSNotAnObject.h:
 
16486         (JSC::JSNotAnObject::createStructure):
 
16487         * runtime/JSONObject.h:
 
16488         (JSC::JSONObject::createStructure):
 
16489         * runtime/JSObject.cpp:
 
16490         (JSC::JSObject::getPropertyNames):
 
16491         * runtime/JSObject.h:
 
16492         (JSC::JSObject::createStructure):
 
16493         * runtime/JSStaticScopeObject.h:
 
16494         (JSC::JSStaticScopeObject::createStructure):
 
16495         * runtime/JSTypeInfo.h:
 
16496         (JSC::TypeInfo::overridesGetPropertyNames):
 
16497         * runtime/JSVariableObject.h:
 
16498         (JSC::JSVariableObject::createStructure):
 
16499         * runtime/JSWrapperObject.h:
 
16500         (JSC::JSWrapperObject::createStructure):
 
16501         * runtime/MathObject.h:
 
16502         (JSC::MathObject::createStructure):
 
16503         * runtime/NumberConstructor.h:
 
16504         (JSC::NumberConstructor::createStructure):
 
16505         * runtime/NumberObject.h:
 
16506         (JSC::NumberObject::createStructure):
 
16507         * runtime/RegExpConstructor.h:
 
16508         (JSC::RegExpConstructor::createStructure):
 
16509         * runtime/RegExpObject.h:
 
16510         (JSC::RegExpObject::createStructure):
 
16511         * runtime/StringObject.h:
 
16512         (JSC::StringObject::createStructure):
 
16513         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
16514         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
 
16515         * runtime/StructureChain.cpp:
 
16516         (JSC::StructureChain::isCacheable):
 
16518 2009-10-16  Kevin Ollivier  <kevino@theolliviers.com>
 
16520         wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion 
 
16525 2009-10-16  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
16527         Reviewed by Simon Hausmann.
 
16529         [Qt] Implement ExecutableAllocator for Symbian
 
16530         https://bugs.webkit.org/show_bug.cgi?id=29946
 
16532         Tested with YARR JIT enabled for Symbian; 
 
16533         This patch does not (yet) enable YARR JIT by default.
 
16535         * JavaScriptCore.pri:
 
16536         * jit/ExecutableAllocator.h:
 
16537         * jit/ExecutableAllocatorSymbian.cpp: Added.
 
16538         (JSC::ExecutableAllocator::intializePageSize):
 
16539         (JSC::ExecutablePool::systemAlloc):
 
16540         (JSC::ExecutablePool::systemRelease):
 
16542 2009-10-15  Oliver Hunt  <oliver@apple.com>
 
16544         Reviewed by Darin Adler.
 
16546         Make typeinfo flags default to false
 
16547         https://bugs.webkit.org/show_bug.cgi?id=30372
 
16549         Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
 
16551         * API/JSCallbackConstructor.h:
 
16552         (JSC::JSCallbackConstructor::createStructure):
 
16553         * API/JSCallbackFunction.h:
 
16554         (JSC::JSCallbackFunction::createStructure):
 
16555         * API/JSCallbackObject.h:
 
16556         (JSC::JSCallbackObject::createStructure):
 
16557         * debugger/DebuggerActivation.h:
 
16558         (JSC::DebuggerActivation::createStructure):
 
16559         * runtime/Arguments.h:
 
16560         (JSC::Arguments::createStructure):
 
16561         * runtime/BooleanObject.h:
 
16562         (JSC::BooleanObject::createStructure):
 
16563         * runtime/DatePrototype.h:
 
16564         (JSC::DatePrototype::createStructure):
 
16565         * runtime/FunctionPrototype.h:
 
16566         (JSC::FunctionPrototype::createStructure):
 
16567         * runtime/GetterSetter.h:
 
16568         (JSC::GetterSetter::createStructure):
 
16569         * runtime/GlobalEvalFunction.h:
 
16570         (JSC::GlobalEvalFunction::createStructure):
 
16571         * runtime/InternalFunction.h:
 
16572         (JSC::InternalFunction::createStructure):
 
16573         * runtime/JSAPIValueWrapper.h:
 
16574         (JSC::JSAPIValueWrapper::createStructure):
 
16575         * runtime/JSActivation.h:
 
16576         (JSC::JSActivation::createStructure):
 
16577         * runtime/JSArray.h:
 
16578         (JSC::JSArray::createStructure):
 
16579         (JSC::MarkStack::markChildren):
 
16580         * runtime/JSByteArray.cpp:
 
16581         (JSC::JSByteArray::createStructure):
 
16582         * runtime/JSFunction.h:
 
16583         (JSC::JSFunction::createStructure):
 
16584         * runtime/JSGlobalObject.h:
 
16585         (JSC::JSGlobalObject::createStructure):
 
16586         * runtime/JSNotAnObject.h:
 
16587         (JSC::JSNotAnObject::createStructure):
 
16588         * runtime/JSNumberCell.h:
 
16589         (JSC::JSNumberCell::createStructure):
 
16590         * runtime/JSONObject.h:
 
16591         (JSC::JSONObject::createStructure):
 
16592         * runtime/JSObject.h:
 
16593         (JSC::JSObject::createStructure):
 
16594         * runtime/JSPropertyNameIterator.h:
 
16595         (JSC::JSPropertyNameIterator::createStructure):
 
16596         * runtime/JSStaticScopeObject.h:
 
16597         (JSC::JSStaticScopeObject::createStructure):
 
16598         * runtime/JSString.h:
 
16599         (JSC::JSString::createStructure):
 
16600         * runtime/JSTypeInfo.h:
 
16601         (JSC::TypeInfo::overridesMarkChildren):
 
16602         * runtime/JSVariableObject.h:
 
16603         (JSC::JSVariableObject::createStructure):
 
16604         * runtime/JSWrapperObject.h:
 
16605         (JSC::JSWrapperObject::createStructure):
 
16606         * runtime/MathObject.h:
 
16607         (JSC::MathObject::createStructure):
 
16608         * runtime/NumberConstructor.h:
 
16609         (JSC::NumberConstructor::createStructure):
 
16610         * runtime/NumberObject.h:
 
16611         (JSC::NumberObject::createStructure):
 
16612         * runtime/RegExpConstructor.h:
 
16613         (JSC::RegExpConstructor::createStructure):
 
16614         * runtime/RegExpObject.h:
 
16615         (JSC::RegExpObject::createStructure):
 
16616         * runtime/StringObject.h:
 
16617         (JSC::StringObject::createStructure):
 
16618         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
16619         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
 
16621 2009-10-14  Oliver Hunt  <oliver@apple.com>
 
16623         Reviewed by Geoff Garen.
 
16625         Make typeinfo flags default to false
 
16626         https://bugs.webkit.org/show_bug.cgi?id=30372
 
16628         Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
 
16630         * API/JSCallbackConstructor.h:
 
16631         (JSC::JSCallbackConstructor::createStructure):
 
16632         * API/JSCallbackFunction.h:
 
16633         (JSC::JSCallbackFunction::createStructure):
 
16634         * API/JSCallbackObject.h:
 
16635         (JSC::JSCallbackObject::createStructure):
 
16636         * debugger/DebuggerActivation.h:
 
16637         (JSC::DebuggerActivation::createStructure):
 
16638         * jit/JITStubs.cpp:
 
16639         (JSC::DEFINE_STUB_FUNCTION):
 
16640         * runtime/Arguments.h:
 
16641         (JSC::Arguments::createStructure):
 
16642         * runtime/BooleanObject.h:
 
16643         (JSC::BooleanObject::createStructure):
 
16644         * runtime/DatePrototype.h:
 
16645         (JSC::DatePrototype::createStructure):
 
16646         * runtime/FunctionPrototype.h:
 
16647         (JSC::FunctionPrototype::createStructure):
 
16648         * runtime/GlobalEvalFunction.h:
 
16649         (JSC::GlobalEvalFunction::createStructure):
 
16650         * runtime/InternalFunction.h:
 
16651         (JSC::InternalFunction::createStructure):
 
16652         * runtime/JSActivation.h:
 
16653         (JSC::JSActivation::createStructure):
 
16654         * runtime/JSArray.h:
 
16655         (JSC::JSArray::createStructure):
 
16656         * runtime/JSByteArray.cpp:
 
16657         (JSC::JSByteArray::createStructure):
 
16658         * runtime/JSFunction.h:
 
16659         (JSC::JSFunction::createStructure):
 
16660         * runtime/JSGlobalObject.h:
 
16661         (JSC::JSGlobalObject::createStructure):
 
16662         * runtime/JSNumberCell.h:
 
16663         (JSC::JSNumberCell::createStructure):
 
16664         * runtime/JSONObject.h:
 
16665         (JSC::JSONObject::createStructure):
 
16666         * runtime/JSObject.h:
 
16667         (JSC::JSObject::createStructure):
 
16668         (JSC::JSCell::fastGetOwnPropertySlot):
 
16669         * runtime/JSStaticScopeObject.h:
 
16670         (JSC::JSStaticScopeObject::createStructure):
 
16671         * runtime/JSString.h:
 
16672         (JSC::JSString::createStructure):
 
16673         * runtime/JSTypeInfo.h:
 
16674         (JSC::TypeInfo::overridesGetOwnPropertySlot):
 
16675         * runtime/JSVariableObject.h:
 
16676         (JSC::JSVariableObject::createStructure):
 
16677         * runtime/JSWrapperObject.h:
 
16678         (JSC::JSWrapperObject::createStructure):
 
16679         * runtime/MathObject.h:
 
16680         (JSC::MathObject::createStructure):
 
16681         * runtime/NumberConstructor.h:
 
16682         (JSC::NumberConstructor::createStructure):
 
16683         * runtime/NumberObject.h:
 
16684         (JSC::NumberObject::createStructure):
 
16685         * runtime/RegExpConstructor.h:
 
16686         (JSC::RegExpConstructor::createStructure):
 
16687         * runtime/RegExpObject.h:
 
16688         (JSC::RegExpObject::createStructure):
 
16689         * runtime/StringObject.h:
 
16690         (JSC::StringObject::createStructure):
 
16691         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
16692         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
 
16694 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
 
16695 2009-10-14  Darin Adler  <darin@apple.com>
 
16697         Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
 
16698         can build on Windows.
 
16700         * wtf/MathExtras.h: Added llround and llroundf for Windows.
 
16702 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
 
16704         wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
 
16708 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
16710         Reviewed by Simon Hausmann.
 
16712         Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
 
16713         https://bugs.webkit.org/show_bug.cgi?id=30278
 
16715         Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
 
16716         from the make system into common code.
 
16720 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
16722         Reviewed by Darin Adler.
 
16724         ARM compiler does not understand reinterpret_cast<void*>
 
16725         https://bugs.webkit.org/show_bug.cgi?id=29034
 
16727         Change reinterpret_cast<void*> to regular C style (void*) cast 
 
16728         for the ARM RVCT compiler.
 
16730         * assembler/MacroAssemblerCodeRef.h:
 
16731         (JSC::FunctionPtr::FunctionPtr): 
 
16732         * jit/JITOpcodes.cpp: Cast to FunctionPtr first 
 
16733            instead of directly casting to reinterpret_cast
 
16734         * jit/JITStubCall.h: Ditto + change the type of m_stub
 
16735           from void* to FunctionPtr.
 
16736         (JSC::JITStubCall::JITStubCall): 
 
16737         (JSC::JITStubCall::call):
 
16738         * jit/JITStubs.cpp: Ditto.
 
16739         (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
 
16741 2009-10-11  Oliver Hunt  <oliver@apple.com>
 
16747 2009-10-10  Oliver Hunt  <oliver@apple.com>
 
16749         Reviewed by Maciej Stachowiak.
 
16751         Support for String.trim(), String.trimLeft() and String.trimRight() methods
 
16752         https://bugs.webkit.org/show_bug.cgi?id=26590
 
16754         Implement trim, trimLeft, and trimRight
 
16756         * runtime/StringPrototype.cpp:
 
16757         (JSC::isTrimWhitespace):
 
16758            Our normal string whitespace function does not include U+200B which
 
16759            is needed for compatibility with mozilla's implementation of trim.
 
16760            U+200B does not appear to be expected according to spec, however I am
 
16761            choosing to be lax, and match mozilla behavior so have added this
 
16765 2009-10-09  Geoffrey Garen  <ggaren@apple.com>
 
16767         Reviewed by Oliver Hunt.
 
16769         Eliminated some legacy bytecode weirdness.
 
16771         Use vPC[x] subscripting instead of ++vPC to access instruction operands.
 
16772         This is simpler, and often more efficient.
 
16774         To support this, and to remove use of hard-coded offsets in bytecode and
 
16775         JIT code generation and dumping, calculate jump offsets from the beginning
 
16776         of an instruction, rather than the middle or end.
 
16778         Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
 
16781         SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
 
16784         * bytecode/CodeBlock.cpp:
 
16785         (JSC::printConditionalJump):
 
16786         (JSC::CodeBlock::dump):
 
16787         * bytecompiler/BytecodeGenerator.cpp:
 
16788         (JSC::BytecodeGenerator::emitJump):
 
16789         (JSC::BytecodeGenerator::emitJumpIfTrue):
 
16790         (JSC::BytecodeGenerator::emitJumpIfFalse):
 
16791         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
 
16792         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
 
16793         (JSC::BytecodeGenerator::emitComplexJumpScopes):
 
16794         (JSC::BytecodeGenerator::emitJumpScopes):
 
16795         (JSC::BytecodeGenerator::emitNextPropertyName):
 
16796         (JSC::BytecodeGenerator::emitCatch):
 
16797         (JSC::BytecodeGenerator::emitJumpSubroutine):
 
16798         (JSC::prepareJumpTableForImmediateSwitch):
 
16799         (JSC::prepareJumpTableForCharacterSwitch):
 
16800         (JSC::prepareJumpTableForStringSwitch):
 
16801         (JSC::BytecodeGenerator::endSwitch):
 
16802         * bytecompiler/Label.h:
 
16803         (JSC::Label::setLocation):
 
16804         (JSC::Label::bind):
 
16805         * interpreter/Interpreter.cpp:
 
16806         (JSC::Interpreter::resolve):
 
16807         (JSC::Interpreter::resolveSkip):
 
16808         (JSC::Interpreter::resolveGlobal):
 
16809         (JSC::Interpreter::resolveBase):
 
16810         (JSC::Interpreter::resolveBaseAndProperty):
 
16811         (JSC::Interpreter::createExceptionScope):
 
16812         (JSC::Interpreter::privateExecute):
 
16813         * interpreter/Interpreter.h:
 
16815         (JSC::JIT::privateCompile):
 
16816         * jit/JITArithmetic.cpp:
 
16817         (JSC::JIT::emit_op_jnless):
 
16818         (JSC::JIT::emitSlow_op_jnless):
 
16819         (JSC::JIT::emit_op_jnlesseq):
 
16820         (JSC::JIT::emitSlow_op_jnlesseq):
 
16821         (JSC::JIT::emitBinaryDoubleOp):
 
16822         * jit/JITOpcodes.cpp:
 
16823         (JSC::JIT::emit_op_jmp):
 
16824         (JSC::JIT::emit_op_loop):
 
16825         (JSC::JIT::emit_op_loop_if_less):
 
16826         (JSC::JIT::emitSlow_op_loop_if_less):
 
16827         (JSC::JIT::emit_op_loop_if_lesseq):
 
16828         (JSC::JIT::emitSlow_op_loop_if_lesseq):
 
16829         (JSC::JIT::emit_op_loop_if_true):
 
16830         (JSC::JIT::emitSlow_op_loop_if_true):
 
16831         (JSC::JIT::emit_op_jfalse):
 
16832         (JSC::JIT::emitSlow_op_jfalse):
 
16833         (JSC::JIT::emit_op_jtrue):
 
16834         (JSC::JIT::emitSlow_op_jtrue):
 
16835         (JSC::JIT::emit_op_jeq_null):
 
16836         (JSC::JIT::emit_op_jneq_null):
 
16837         (JSC::JIT::emit_op_jneq_ptr):
 
16838         (JSC::JIT::emit_op_jsr):
 
16839         (JSC::JIT::emit_op_next_pname):
 
16840         (JSC::JIT::emit_op_jmp_scopes):
 
16842 2009-10-09  Geoffrey Garen  <ggaren@apple.com>
 
16844         Reviewed by Sam Weinig.
 
16846         Migrated some code that didn't belong out of Structure.
 
16848         SunSpider says maybe 1.03x faster.
 
16850         * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
 
16851         a Structure's prototype the direct responsility of the object using it.
 
16852         (Giving Structure a mark function was misleading because it implied that
 
16853         all live structures get marked during GC, when they don't.)
 
16855         * runtime/JSGlobalObject.cpp:
 
16856         (JSC::markIfNeeded):
 
16857         (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
 
16858         on the global object. Maybe this wasn't necessary, but now we don't have
 
16861         * runtime/JSObject.cpp:
 
16862         (JSC::JSObject::getPropertyNames):
 
16863         (JSC::JSObject::getOwnPropertyNames):
 
16864         (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
 
16865         * runtime/JSObject.h:
 
16866         (JSC::JSObject::markChildrenDirect):
 
16867         * runtime/PropertyNameArray.h:
 
16868         * runtime/Structure.cpp:
 
16869         * runtime/Structure.h:
 
16870         (JSC::Structure::setEnumerationCache):
 
16871         (JSC::Structure::enumerationCache): Moved property name gathering code
 
16872         from Structure to JSObject because having a Structure iterate its JSObject
 
16873         was a layering violation. A JSObject is implemented using a Structure; not
 
16874         the other way around.
 
16876 2009-10-09  Mark Rowe  <mrowe@apple.com>
 
16878         Attempt to fix the GTK release build.
 
16880         * GNUmakefile.am: Include Grammar.cpp in release builds now that
 
16881         AllInOneFile.cpp is gone.
 
16883 2009-10-09  Gabor Loki  <loki@inf.u-szeged.hu>
 
16885         Rubber-stamped by Eric Seidel.
 
16887         Add ARM JIT support for Gtk port (disabled by default)
 
16888         https://bugs.webkit.org/show_bug.cgi?id=30228
 
16892 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
 
16894         Tiger build fix: added a few more variable initializations.
 
16896         * runtime/StringPrototype.cpp:
 
16897         (JSC::stringProtoFuncReplace):
 
16898         (JSC::stringProtoFuncSearch):
 
16900 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
 
16902         Qt build fix: added missing #include.
 
16906 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
 
16908         Tiger build fix: initialize variable whose initialization the compiler
 
16909         can't otherwise figure out.
 
16911         * runtime/RegExpObject.cpp:
 
16912         (JSC::RegExpObject::match):
 
16914 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
 
16916         Windows build fix: updated exports.
 
16918         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
16919         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
16921 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
 
16923         Tiger build fix: fixed file name case.
 
16925         * JavaScriptCore.xcodeproj/project.pbxproj:
 
16927 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
 
16929         Reviewed by Maciej Stachowiak.
 
16931         At long last, I pronounce the death of AllInOneFile.cpp.
 
16933         SunSpider reports a 1.01x speedup.
 
16935         * AllInOneFile.cpp: Removed.
 
16937         * JavaScriptCore.exp:
 
16938         * JavaScriptCore.gypi:
 
16939         * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
 
16940         to compilation stages.
 
16942         * parser/Grammar.y:
 
16943         * parser/Lexer.cpp:
 
16946         * runtime/ArrayConstructor.cpp:
 
16947         (JSC::constructArrayWithSizeQuirk):
 
16948         * runtime/Collector.h:
 
16949         * runtime/JSCell.cpp:
 
16950         (JSC::JSCell::operator new):
 
16951         * runtime/JSCell.h:
 
16952         (JSC::JSCell::operator new):
 
16953         * runtime/JSGlobalObject.cpp:
 
16954         (JSC::JSGlobalObject::operator new):
 
16955         * runtime/JSNumberCell.h:
 
16956         (JSC::JSNumberCell::operator new):
 
16957         * runtime/JSString.cpp:
 
16958         * runtime/JSString.h:
 
16960         (JSC::jsSubstring):
 
16961         (JSC::jsOwnedString):
 
16962         * runtime/RegExpConstructor.cpp:
 
16963         * runtime/RegExpConstructor.h:
 
16964         (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
 
16965         (JSC::RegExpConstructorPrivate::lastOvector):
 
16966         (JSC::RegExpConstructorPrivate::tempOvector):
 
16967         (JSC::RegExpConstructorPrivate::changeLastOvector):
 
16968         (JSC::RegExpConstructor::performMatch):
 
16969         * runtime/StringPrototype.cpp:
 
16970         (JSC::stringProtoFuncMatch):
 
16971         * yarr/RegexJIT.cpp:
 
16973         (JSC::Yarr::executeRegex): Inlined a few things that Shark said
 
16974         were hot, on the presumption that AllInOneFile.cpp used to inline them
 
16977 2009-10-08  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
16979         Reviewed by Gavin Barraclough.
 
16981         Fix for JIT'ed op_call instructions (evals, constructs, etc.)
 
16982         when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
 
16984         https://bugs.webkit.org/show_bug.cgi?id=30201
 
16987         (JSC::JIT::compileOpCall):
 
16989 2009-10-07  Geoffrey Garen  <ggaren@apple.com>
 
16991         Windows build fix: removed no longer exported symbol.
 
16993         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
16994         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
16996 2009-10-07  Geoffrey Garen  <ggaren@apple.com>
 
16998         Reviewed by Oliver Hunt.
 
17000         Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
 
17001         thread, permanently slowing down JavaScript
 
17003         Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
 
17004         since WebCore no longer uses it.
 
17006         * JavaScriptCore.exp:
 
17007         * runtime/Collector.cpp:
 
17008         (JSC::Heap::protect):
 
17009         (JSC::Heap::unprotect):
 
17010         (JSC::Heap::markProtectedObjects):
 
17011         (JSC::Heap::protectedGlobalObjectCount):
 
17012         (JSC::Heap::protectedObjectCount):
 
17013         (JSC::Heap::protectedObjectTypeCounts):
 
17014         * runtime/Collector.h:
 
17016 2009-10-07  Zoltan Horvath  <zoltan@webkit.org>
 
17018         Reviewed by Darin Adler.
 
17020         Allow custom memory allocation control for JavaScriptCore's IdentifierArena
 
17021         https://bugs.webkit.org/show_bug.cgi?id=30158
 
17023         Inherits IdentifierArena class from FastAllocBase because it has been
 
17024         instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
 
17026         * parser/ParserArena.h:
 
17028 2009-10-07  Adam Roben  <aroben@apple.com>
 
17030         Export DateInstance::info in a way that works on Windows
 
17032         Fixes <http://webkit.org/b/30171>
 
17033         fast/dom/Window/window-postmessage-clone.html fails on Windows
 
17035         Reviewed by Anders Carlsson.
 
17037         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
17038         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
17039         Removed the export of DateInstance::info from here.
 
17041         * runtime/DateInstance.h: Use JS_EXPORTDATA to export
 
17042         DateInstance::info, which is the required way of exporting data on
 
17045 2009-10-07  Jørgen Lind  <jorgen.lind@nokia.com>
 
17047         Reviewed by Simon Hausmann.
 
17049         When enabling or disabling the JIT through .qmake.cache, make sure
 
17050         to also toggle ENABLE_YARR_JIT.
 
17052         * JavaScriptCore.pri:
 
17054 2009-10-06  Priit Laes  <plaes@plaes.org>
 
17056         Reviewed by Gavin Barraclough.
 
17058         Linking fails with "relocation R_X86_64_PC32 against symbol
 
17060         https://bugs.webkit.org/show_bug.cgi?id=28422
 
17062         * jit/JITStubs.cpp:
 
17063         Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
 
17064         in text segment causing relocation errors on amd64 architecture.
 
17065         Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
 
17067 2009-10-06  Oliver Hunt  <oliver@apple.com>
 
17069         Windows linking fix
 
17071         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
17072         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
17074 2009-10-06  Oliver Hunt  <oliver@apple.com>
 
17076         Reviewed by NOBODY (build fix).
 
17080         * runtime/DateInstance.cpp:
 
17082 2009-10-05  Oliver Hunt  <oliver@apple.com>
 
17084         Reviewed by Gavin Barraclough.
 
17086         It should be possible to post (clone) built-in JS objects to Workers
 
17087         https://bugs.webkit.org/show_bug.cgi?id=22878
 
17089         Expose helpers to throw correct exceptions during object graph walk
 
17090         used for cloning and add a helper function to create Date instances
 
17091         without going through the JS Date constructor function.
 
17093         * JavaScriptCore.exp:
 
17094         * JavaScriptCore.xcodeproj/project.pbxproj:
 
17095         * runtime/DateInstance.cpp:
 
17096         (JSC::DateInstance::DateInstance):
 
17097         * runtime/DateInstance.h:
 
17098         * runtime/ExceptionHelpers.cpp:
 
17099         (JSC::createTypeError):
 
17100         * runtime/ExceptionHelpers.h:
 
17102 2009-10-06  David Levin  <levin@chromium.org>
 
17104         Reviewed by Oliver Hunt.
 
17106         StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
 
17107         https://bugs.webkit.org/show_bug.cgi?id=30095
 
17109         * wtf/CrossThreadRefCounted.h:
 
17110         Removed an unused function and assert improvement.
 
17111         (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
 
17112         (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
 
17113         (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
 
17114         (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
 
17115         non-threadsafe operation, add an assert that the class is owned by the current thread.
 
17117 2009-10-05  Kevin Ollivier  <kevino@theolliviers.com>
 
17119         wx build fix. Add Symbian files to the list of excludes.
 
17123 2009-10-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
17125         Reviewed by Simon Hausmann.
 
17127         [Qt] Remove precompiled header from JavaScriptCore compilation to
 
17128         prevent qmake warning during autonomous compilation.
 
17129         https://bugs.webkit.org/show_bug.cgi?id=30069
 
17131         * JavaScriptCore.pro:
 
17133 2009-10-02  Geoffrey Garen  <ggaren@apple.com>
 
17135         Reviewed by Sam Weinig.
 
17137         Removed the concept of a "fast access cutoff" in arrays, because it
 
17138         punished some patterns of array access too much, and made things too
 
17139         complex for inlining in some cases.
 
17141         1.3% speedup on SunSpider.
 
17143         * jit/JITOpcodes.cpp:
 
17144         (JSC::JIT::emitSlow_op_get_by_val):
 
17145         (JSC::JIT::emitSlow_op_put_by_val):
 
17146         * jit/JITPropertyAccess.cpp:
 
17147         (JSC::JIT::emit_op_get_by_val):
 
17148         (JSC::JIT::emitSlow_op_get_by_val):
 
17149         (JSC::JIT::emit_op_put_by_val):
 
17150         (JSC::JIT::emitSlow_op_put_by_val):
 
17151         * jit/JITStubs.cpp:
 
17153         (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
 
17154         getting / putting from / to an array. Inline putting past the end of
 
17157         * runtime/JSArray.cpp:
 
17158         (JSC::JSArray::JSArray):
 
17159         (JSC::JSArray::getOwnPropertySlot):
 
17160         (JSC::JSArray::getOwnPropertyDescriptor):
 
17161         (JSC::JSArray::put):
 
17162         (JSC::JSArray::putSlowCase):
 
17163         (JSC::JSArray::deleteProperty):
 
17164         (JSC::JSArray::getOwnPropertyNames):
 
17165         (JSC::JSArray::increaseVectorLength):
 
17166         (JSC::JSArray::setLength):
 
17167         (JSC::JSArray::pop):
 
17168         (JSC::JSArray::push):
 
17169         (JSC::JSArray::sort):
 
17170         (JSC::JSArray::fillArgList):
 
17171         (JSC::JSArray::copyToRegisters):
 
17172         (JSC::JSArray::compactForSorting):
 
17173         (JSC::JSArray::checkConsistency):
 
17174         * runtime/JSArray.h:
 
17175         (JSC::JSArray::canGetIndex):
 
17176         (JSC::JSArray::canSetIndex):
 
17177         (JSC::JSArray::setIndex):
 
17178         (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
 
17179         replaced with checks for JSValue() to detect reads and writes from / to
 
17180         uninitialized parts of the array.
 
17182 2009-10-02  Jonni Rainisto  <jonni.rainisto@nokia.com>
 
17184         Reviewed by Darin Adler.
 
17186         Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
 
17187         https://bugs.webkit.org/show_bug.cgi?id=29956
 
17189         * wtf/RandomNumber.cpp:
 
17190         (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
 
17192 2009-10-02  Geoffrey Garen  <ggaren@apple.com>
 
17194         Reviewed by Sam Weinig.
 
17196         Take one branch instead of two to test for JSValue().
 
17198         1.1% SunSpider speedup.
 
17201         (JSC::JIT::compileOpCall):
 
17202         * jit/JITOpcodes.cpp:
 
17203         (JSC::JIT::emit_op_to_jsnumber):
 
17204         (JSC::JIT::emit_op_create_arguments):
 
17205         * jit/JITPropertyAccess.cpp:
 
17206         (JSC::JIT::emitSlow_op_get_by_val):
 
17207         (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
 
17208         of testing for the cell tag with a 0 payload.
 
17210         * runtime/JSValue.cpp:
 
17211         (JSC::JSValue::description): Added support for dumping the new empty value,
 
17212         and deleted values, in debug builds.
 
17214         * runtime/JSValue.h:
 
17215         (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
 
17217         (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
 
17218         tag, to avoid having two different c++ versions of null / empty.
 
17220         (JSC::JSValue::operator bool): Test for the empty value tag, instead
 
17221         of testing for the cell tag with a 0 payload.
 
17223 2009-10-02  Steve Falkenburg  <sfalken@apple.com>
 
17225         Reviewed by Mark Rowe.
 
17227         <https://bugs.webkit.org/show_bug.cgi?id=29989>
 
17228         Safari version number shouldn't be exposed in WebKit code
 
17230         For a WebKit version of 532.3.4:
 
17231         Product version is: 5.32.3.4 (was 4.0.3.0)
 
17232         File version is: 5.32.3.4 (was 4.532.3.4)
 
17234         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
 
17236 2009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
17238         Rubber-stamped by Simon Hausmann.
 
17240         Fix the Qt on Mac OS X build.
 
17242         * wtf/FastMalloc.cpp:
 
17244 2009-10-02  Jørgen Lind  <jorgen.lind@nokia.com>
 
17246         Reviewed by Simon Hausmann.
 
17248         Allow enabling and disabling of the JIT through a qmake variable.
 
17250         Qt's configure may set this variable through .qmake.cache if a
 
17251         commandline option is given and/or the compile test for hwcap.h
 
17254         * JavaScriptCore.pri:
 
17256 2009-10-01  Mark Rowe  <mrowe@apple.com>
 
17258         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
 
17260         * Configurations/FeatureDefines.xcconfig:
 
17262 2009-10-01  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
17264         Reviewed by Darin Adler.
 
17266         https://bugs.webkit.org/show_bug.cgi?id=29187
 
17268         Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
 
17269         bug regarding templated classes.
 
17271         The compiler bug is reported at:
 
17272         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
 
17274         The change will be reverted when the above bug is fixed in winscw compiler.
 
17276         * wtf/ListRefPtr.h:
 
17277         (WTF::::~ListRefPtr):
 
17279 2009-10-01  Zoltan Horvath  <zoltan@webkit.org>
 
17281         Reviewed by Simon Hausmann.
 
17283         [Qt] Allow custom memory allocation control for the whole JavaScriptCore
 
17284         https://bugs.webkit.org/show_bug.cgi?id=27029
 
17286         Since in JavaScriptCore almost every class which has been instantiated by operator new is
 
17287         inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
 
17288         when USE_SYSTEM_MALLOC=0.
 
17290         Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
 
17291         (It's needed for the functionality of TCmalloc.)
 
17293         Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
 
17295         * JavaScriptCore.pri:
 
17296         * wtf/FastMalloc.cpp:
 
17298         * wtf/FastMalloc.h:
 
17300 2009-09-30  Gabor Loki  <loki@inf.u-szeged.hu>
 
17302         Reviewed by George Staikos.
 
17304         Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
 
17305         https://bugs.webkit.org/show_bug.cgi?id=29122
 
17307         Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
 
17308         macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
 
17309         when Thumb-2 instruction set is the required target. The
 
17310         PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
 
17311         case where the code is common the PLATFORM(ARM) have to be used.
 
17313         Modified by George Wright  <gwright@rim.com> to correctly work
 
17314         with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
 
17315         compiler macros, as well as adding readability changes.
 
17319 2009-09-30  Oliver Hunt  <oliver@apple.com>
 
17321         Reviewed by Geoff Garen.
 
17323         Devirtualise array toString conversion
 
17325         Tweak the implementation of Array.prototype.toString to have a fast path
 
17326         when acting on a true JSArray.
 
17328         * runtime/ArrayPrototype.cpp:
 
17329         (JSC::arrayProtoFuncToString):
 
17331 2009-09-30  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
17333         Reviewed by Geoffrey Garen.
 
17335         Buildfix for platforms using JSVALUE32.
 
17336         https://bugs.webkit.org/show_bug.cgi?id=29915
 
17338         After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
 
17339         Also removed unreachable code.
 
17341         * jit/JITArithmetic.cpp:
 
17342         (JSC::JIT::emit_op_add):
 
17343          - Declaration of "OperandTypes types" moved before first use.
 
17344          - Typos fixed: dst modified to result, regT2 added.
 
17345          - Unreachable code removed.
 
17346         (JSC::JIT::emitSlow_op_add):
 
17347          - Missing declaration of "OperandTypes types" added.
 
17349 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
 
17351         Reviewed by Simon Hausmann.
 
17353         Reduce heap size on Symbian from 64MB to 8MB.
 
17355         This is not a perfect fix, it requires more fine tuning.
 
17356         But this makes it possible again to debug in the emulator,
 
17357         which is more important in order to be able to fix other
 
17360         * runtime/Collector.h:
 
17362 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
 
17364         Reviewed by Simon Hausmann.
 
17366         Fix CRASH() macro for Symbian build.
 
17368         * wtf/Assertions.h: Added missing }
 
17370 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
 
17372         Reviewed by Gavin Barraclough.
 
17374         Inlined a few math operations.
 
17376         ~1% SunSpider speedup.
 
17379         * jit/JITArithmetic.cpp:
 
17380         (JSC::JIT::compileBinaryArithOpSlowCase):
 
17381         (JSC::JIT::emitSlow_op_add):
 
17382         (JSC::JIT::emitSlow_op_mul):
 
17383         (JSC::JIT::emit_op_sub):
 
17384         (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
 
17385         a constant int and a double.
 
17387 2009-09-28  Oliver Hunt  <oliver@apple.com>
 
17389         Reviewed by Gavin Barraclough.
 
17391         Tidy up codeblock sampler
 
17392         https://bugs.webkit.org/show_bug.cgi?id=29836
 
17394         Some rather simple refactoring of codeblock sampler so that
 
17395         it's easier for us to use it to find problems in non-jsc
 
17398         * JavaScriptCore.exp:
 
17399         * bytecode/SamplingTool.h:
 
17400         * debugger/Debugger.cpp:
 
17401         (JSC::evaluateInGlobalCallFrame):
 
17402         * debugger/DebuggerCallFrame.cpp:
 
17403         (JSC::DebuggerCallFrame::evaluate):
 
17404         * interpreter/Interpreter.cpp:
 
17405         (JSC::Interpreter::Interpreter):
 
17406         (JSC::Interpreter::execute):
 
17407         (JSC::Interpreter::privateExecute):
 
17408         (JSC::Interpreter::enableSampler):
 
17409         (JSC::Interpreter::dumpSampleData):
 
17410         (JSC::Interpreter::startSampling):
 
17411         (JSC::Interpreter::stopSampling):
 
17412         * interpreter/Interpreter.h:
 
17413         (JSC::Interpreter::sampler):
 
17417         * runtime/Completion.cpp:
 
17418         (JSC::checkSyntax):
 
17420         * runtime/Executable.h:
 
17421         (JSC::EvalExecutable::EvalExecutable):
 
17422         (JSC::ProgramExecutable::create):
 
17423         (JSC::ProgramExecutable::ProgramExecutable):
 
17424         * runtime/JSGlobalData.cpp:
 
17425         (JSC::JSGlobalData::startSampling):
 
17426         (JSC::JSGlobalData::stopSampling):
 
17427         (JSC::JSGlobalData::dumpSampleData):
 
17428         * runtime/JSGlobalData.h:
 
17429         * runtime/JSGlobalObjectFunctions.cpp:
 
17430         (JSC::globalFuncEval):
 
17432 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
 
17434         Reviewed by Dimitri Glazkov.
 
17436         Add GYP generated files to svn:ignore
 
17437         https://bugs.webkit.org/show_bug.cgi?id=29895
 
17439         The following files are generated by JavaScriptCore's GYP file and should be ignored:
 
17449         * JavaScriptCore.gyp: Changed property svn:ignore.
 
17451 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
 
17453         Reviewed by Sam Weinig.
 
17455         Standardized an optimization for adding non-numbers.
 
17457         SunSpider says maybe a tiny speedup.
 
17459         * jit/JITArithmetic.cpp:
 
17460         (JSC::JIT::emit_op_add):
 
17461         (JSC::JIT::emitSlow_op_add):
 
17463 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
 
17465         Windows build fix: export a new symbol.
 
17467         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
17468         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
17470 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
 
17472         Reviewed by Sam Weinig.
 
17474         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
 
17475         fix-ups when accessing JSGlobalObject::d.
 
17477         Replaced with an explicit destructor function pointer.
 
17479         6% speedup on bench-alloc-nonretained.js.
 
17481         * JavaScriptCore.exp:
 
17482         * runtime/JSGlobalObject.cpp:
 
17483         (JSC::JSGlobalObject::~JSGlobalObject):
 
17484         (JSC::JSGlobalObject::destroyJSGlobalObjectData):
 
17485         * runtime/JSGlobalObject.h:
 
17486         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
 
17487         (JSC::JSGlobalObject::JSGlobalObject):
 
17489 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
 
17491         Reviewed by David Kilzer.
 
17493         [Qt] Assert messages prints visible in Symbian
 
17494         https://bugs.webkit.org/show_bug.cgi?id=29808
 
17496         Asserts use vprintf to print the messages to stderr.
 
17497         In Symbian Open C it is not possible to see stderr so
 
17498         I routed the messages to stdout instead.
 
17500         * wtf/Assertions.cpp:
 
17502 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
 
17504         Reviewed by Darin Adler.
 
17506         [Qt] Symbian CRASH macro implementation
 
17508         Added Symbian specific crash macro that
 
17509         stops to crash line if JIT debugging is used.
 
17510         Additional differentiation of access violation
 
17511         (KERN-EXEC 3) and CRASH panic.
 
17513         * wtf/Assertions.h:
 
17515 2009-09-28  Mark Rowe  <mrowe@apple.com>
 
17517         Fix the PowerPC build.
 
17519         * JavaScriptCore.exp:
 
17521 2009-09-28  Mark Rowe  <mrowe@apple.com>
 
17523         Reviewed by Gavin Barraclough.
 
17525         <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
 
17527         * runtime/Collector.cpp:
 
17528         (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
 
17529         to ensure that we correctly interpret the contents of registers during marking.
 
17531 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
 
17533         Windows build fix: added new exports.
 
17535         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
17536         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
17538 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
 
17540         Windows build fix: removed exports that no longer exist.
 
17542         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
17543         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
17545 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
 
17547         Reviewed by Darin Adler.
 
17549         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
 
17550         https://bugs.webkit.org/show_bug.cgi?id=29822
 
17552         Added NotNullPassRefPtr, and deployed it in all places that initialize
 
17553         JavaScript objects.
 
17555         2.2% speedup on bench-allocate-nonretained.js.
 
17557         * API/JSCallbackConstructor.cpp:
 
17558         (JSC::JSCallbackConstructor::JSCallbackConstructor):
 
17559         * API/JSCallbackConstructor.h:
 
17560         * API/JSCallbackObject.h:
 
17561         * API/JSCallbackObjectFunctions.h:
 
17562         (JSC::JSCallbackObject::JSCallbackObject):
 
17563         * JavaScriptCore.exp:
 
17564         * bytecode/CodeBlock.h:
 
17565         (JSC::CodeBlock::addFunctionDecl):
 
17566         (JSC::CodeBlock::addFunctionExpr):
 
17567         * runtime/ArrayConstructor.cpp:
 
17568         (JSC::ArrayConstructor::ArrayConstructor):
 
17569         * runtime/ArrayConstructor.h:
 
17570         * runtime/ArrayPrototype.cpp:
 
17571         (JSC::ArrayPrototype::ArrayPrototype):
 
17572         * runtime/ArrayPrototype.h:
 
17573         * runtime/BooleanConstructor.cpp:
 
17574         (JSC::BooleanConstructor::BooleanConstructor):
 
17575         * runtime/BooleanConstructor.h:
 
17576         * runtime/BooleanObject.cpp:
 
17577         (JSC::BooleanObject::BooleanObject):
 
17578         * runtime/BooleanObject.h:
 
17579         * runtime/BooleanPrototype.cpp:
 
17580         (JSC::BooleanPrototype::BooleanPrototype):
 
17581         * runtime/BooleanPrototype.h:
 
17582         * runtime/DateConstructor.cpp:
 
17583         (JSC::DateConstructor::DateConstructor):
 
17584         * runtime/DateConstructor.h:
 
17585         * runtime/DateInstance.cpp:
 
17586         (JSC::DateInstance::DateInstance):
 
17587         * runtime/DateInstance.h:
 
17588         * runtime/DatePrototype.cpp:
 
17589         (JSC::DatePrototype::DatePrototype):
 
17590         * runtime/DatePrototype.h:
 
17591         * runtime/ErrorConstructor.cpp:
 
17592         (JSC::ErrorConstructor::ErrorConstructor):
 
17593         * runtime/ErrorConstructor.h:
 
17594         * runtime/ErrorInstance.cpp:
 
17595         (JSC::ErrorInstance::ErrorInstance):
 
17596         * runtime/ErrorInstance.h:
 
17597         * runtime/ErrorPrototype.cpp:
 
17598         (JSC::ErrorPrototype::ErrorPrototype):
 
17599         * runtime/ErrorPrototype.h:
 
17600         * runtime/FunctionConstructor.cpp:
 
17601         (JSC::FunctionConstructor::FunctionConstructor):
 
17602         * runtime/FunctionConstructor.h:
 
17603         * runtime/FunctionPrototype.cpp:
 
17604         (JSC::FunctionPrototype::FunctionPrototype):
 
17605         * runtime/FunctionPrototype.h:
 
17606         * runtime/GlobalEvalFunction.cpp:
 
17607         (JSC::GlobalEvalFunction::GlobalEvalFunction):
 
17608         * runtime/GlobalEvalFunction.h:
 
17609         * runtime/InternalFunction.cpp:
 
17610         (JSC::InternalFunction::InternalFunction):
 
17611         * runtime/InternalFunction.h:
 
17612         (JSC::InternalFunction::InternalFunction):
 
17613         * runtime/JSActivation.cpp:
 
17614         (JSC::JSActivation::JSActivation):
 
17615         * runtime/JSActivation.h:
 
17616         (JSC::JSActivation::JSActivationData::JSActivationData):
 
17617         * runtime/JSArray.cpp:
 
17618         (JSC::JSArray::JSArray):
 
17619         * runtime/JSArray.h:
 
17620         * runtime/JSByteArray.cpp:
 
17621         (JSC::JSByteArray::JSByteArray):
 
17622         * runtime/JSByteArray.h:
 
17623         * runtime/JSFunction.cpp:
 
17624         (JSC::JSFunction::JSFunction):
 
17625         * runtime/JSFunction.h:
 
17626         * runtime/JSGlobalObject.h:
 
17627         (JSC::JSGlobalObject::JSGlobalObject):
 
17628         * runtime/JSONObject.h:
 
17629         (JSC::JSONObject::JSONObject):
 
17630         * runtime/JSObject.h:
 
17631         (JSC::JSObject::JSObject):
 
17632         (JSC::JSObject::setStructure):
 
17633         * runtime/JSVariableObject.h:
 
17634         (JSC::JSVariableObject::JSVariableObject):
 
17635         * runtime/JSWrapperObject.h:
 
17636         (JSC::JSWrapperObject::JSWrapperObject):
 
17637         * runtime/MathObject.cpp:
 
17638         (JSC::MathObject::MathObject):
 
17639         * runtime/MathObject.h:
 
17640         * runtime/NativeErrorConstructor.cpp:
 
17641         (JSC::NativeErrorConstructor::NativeErrorConstructor):
 
17642         * runtime/NativeErrorConstructor.h:
 
17643         * runtime/NativeErrorPrototype.cpp:
 
17644         (JSC::NativeErrorPrototype::NativeErrorPrototype):
 
17645         * runtime/NativeErrorPrototype.h:
 
17646         * runtime/NumberConstructor.cpp:
 
17647         (JSC::NumberConstructor::NumberConstructor):
 
17648         * runtime/NumberConstructor.h:
 
17649         * runtime/NumberObject.cpp:
 
17650         (JSC::NumberObject::NumberObject):
 
17651         * runtime/NumberObject.h:
 
17652         * runtime/NumberPrototype.cpp:
 
17653         (JSC::NumberPrototype::NumberPrototype):
 
17654         * runtime/NumberPrototype.h:
 
17655         * runtime/ObjectConstructor.cpp:
 
17656         (JSC::ObjectConstructor::ObjectConstructor):
 
17657         * runtime/ObjectConstructor.h:
 
17658         * runtime/ObjectPrototype.cpp:
 
17659         (JSC::ObjectPrototype::ObjectPrototype):
 
17660         * runtime/ObjectPrototype.h:
 
17661         * runtime/PropertyNameArray.h:
 
17662         (JSC::PropertyNameArrayData::setCachedPrototypeChain):
 
17663         * runtime/PrototypeFunction.cpp:
 
17664         (JSC::PrototypeFunction::PrototypeFunction):
 
17665         * runtime/PrototypeFunction.h:
 
17666         * runtime/RegExpConstructor.cpp:
 
17667         (JSC::RegExpConstructor::RegExpConstructor):
 
17668         * runtime/RegExpConstructor.h:
 
17669         * runtime/RegExpObject.cpp:
 
17670         (JSC::RegExpObject::RegExpObject):
 
17671         * runtime/RegExpObject.h:
 
17672         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
 
17673         * runtime/RegExpPrototype.cpp:
 
17674         (JSC::RegExpPrototype::RegExpPrototype):
 
17675         * runtime/RegExpPrototype.h:
 
17676         * runtime/StringConstructor.cpp:
 
17677         (JSC::StringConstructor::StringConstructor):
 
17678         * runtime/StringConstructor.h:
 
17679         * runtime/StringObject.cpp:
 
17680         (JSC::StringObject::StringObject):
 
17681         * runtime/StringObject.h:
 
17682         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
17683         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
 
17684         * runtime/StringPrototype.cpp:
 
17685         (JSC::StringPrototype::StringPrototype):
 
17686         * runtime/StringPrototype.h:
 
17687         * wtf/PassRefPtr.h:
 
17688         (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
 
17689         (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
 
17690         (WTF::NotNullPassRefPtr::get):
 
17691         (WTF::NotNullPassRefPtr::clear):
 
17692         (WTF::NotNullPassRefPtr::releaseRef):
 
17693         (WTF::NotNullPassRefPtr::operator*):
 
17694         (WTF::NotNullPassRefPtr::operator->):
 
17695         (WTF::NotNullPassRefPtr::operator!):
 
17696         (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
 
17698         (WTF::RefPtr::RefPtr):
 
17701 2009-09-28  Oliver Hunt  <oliver@apple.com>
 
17703         Reviewed by Geoff Garen.
 
17705         Hard dependency on SSE2 instruction set with JIT
 
17706         https://bugs.webkit.org/show_bug.cgi?id=29779
 
17708         Add floating point support checks to op_jfalse and op_jtrue, and
 
17709         fix the logic for the slow case of op_add
 
17711         * jit/JITArithmetic.cpp:
 
17712         (JSC::JIT::emitSlow_op_add):
 
17713         * jit/JITOpcodes.cpp:
 
17714         (JSC::JIT::emit_op_jfalse):
 
17715         (JSC::JIT::emit_op_jtrue):
 
17717 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
 
17719         Reviewed by Dimitri Glazkov.
 
17721         Chromium port - recognize we are being built independently
 
17722         of chromium and look for dependencies under webkit/chromium rather
 
17725         https://bugs.webkit.org/show_bug.cgi?id=29722
 
17727         * JavaScriptCore.gyp/JavaScriptCore.gyp:
 
17729 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
 
17731         Reviewed by Simon Hausmann.
 
17733         [Qt] Implement XSLT support with QtXmlPatterns.
 
17734         https://bugs.webkit.org/show_bug.cgi?id=28303
 
17736         * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
 
17738 2009-09-28  Gabor Loki  <loki@inf.u-szeged.hu>
 
17740         Reviewed by Simon Hausmann.
 
17742         Remove __clear_cache which is an internal function of GCC
 
17743         https://bugs.webkit.org/show_bug.cgi?id=28886
 
17745         Although __clear_cache is exported from GCC, this is an internal
 
17746         function. GCC makes no promises about it.
 
17748         * jit/ExecutableAllocator.h:
 
17749         (JSC::ExecutableAllocator::cacheFlush):
 
17751 2009-09-28  Sam Weinig  <sam@webkit.org>
 
17753         Reviewed by Oliver Hunt.
 
17755         Fix an absolute path to somewhere in Oliver's machine to a relative path
 
17756         for derived JSONObject.lut.h.
 
17758         * JavaScriptCore.xcodeproj/project.pbxproj:
 
17760 2009-09-28  Joerg Bornemann  <joerg.bornemann@nokia.com>
 
17762         Reviewed by Simon Hausmann.
 
17764         Add ARM version detection for Windows CE.
 
17768 2009-09-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
17770         Reviewed by Simon Hausmann.
 
17772         Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
 
17774         Re-use Windows shrinkAllocation implementation because Symbian doesn't
 
17775         support releasing part of memory region.
 
17777         Use fastMalloc and fastFree to implement allocateStack and releaseStack
 
17780         * JavaScriptCore.pri:
 
17781         * runtime/MarkStack.h:
 
17782         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
 
17783         * runtime/MarkStackSymbian.cpp: Added.
 
17784         (JSC::MarkStack::initializePagesize):
 
17785         (JSC::MarkStack::allocateStack):
 
17786         (JSC::MarkStack::releaseStack):
 
17788 2009-09-25  Gabor Loki  <loki@inf.u-szeged.hu>
 
17790         Reviewed by Gavin Barraclough.
 
17792         Fix unaligned data access in YARR_JIT on ARMv5 and below.
 
17793         https://bugs.webkit.org/show_bug.cgi?id=29695
 
17795         On ARMv5 and below all data access should be naturally aligned.
 
17796         In the YARR_JIT there is a case when character pairs are
 
17797         loaded from the input string, but this data access is not
 
17798         naturally aligned. This fix introduces load32WithUnalignedHalfWords
 
17799         and branch32WithUnalignedHalfWords functions which contain
 
17800         naturally aligned memory loads - half word loads - on ARMv5 and below.
 
17802         * assembler/MacroAssemblerARM.cpp:
 
17803         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
 
17804         * assembler/MacroAssemblerARM.h:
 
17805         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
 
17806         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
 
17807         * assembler/MacroAssemblerARMv7.h:
 
17808         (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
 
17809         (JSC::MacroAssemblerARMv7::branch32):
 
17810         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
 
17811         * assembler/MacroAssemblerX86Common.h:
 
17812         (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
 
17813         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
 
17815         * yarr/RegexJIT.cpp:
 
17816         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
 
17818 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
 
17820         This is breaking Chromium try bots, so I'm counting this as a build fix.
 
17822         Add more svn:ignore exceptions.  On different platforms, these files are
 
17823         generated with different case for JavaScriptCore.  Also there are some
 
17824         wtf project files that get built apparently.
 
17826         * JavaScriptCore.gyp: Changed property svn:ignore.
 
17828 2009-09-25  Ada Chan  <adachan@apple.com>
 
17832         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
17833         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
17835 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
 
17837         Reviewed by Darin Adler.
 
17839         Inlined some object creation code, including lexicalGlobalObject access
 
17840         https://bugs.webkit.org/show_bug.cgi?id=29750
 
17842         SunSpider says 0.5% faster.
 
17844         0.8% speedup on bench-alloc-nonretained.js.
 
17845         2.5% speedup on v8-splay.js.
 
17847         * interpreter/CachedCall.h:
 
17848         (JSC::CachedCall::CachedCall):
 
17849         * interpreter/CallFrame.h:
 
17850         (JSC::ExecState::lexicalGlobalObject):
 
17851         (JSC::ExecState::globalThisValue):
 
17852         * interpreter/Interpreter.cpp:
 
17853         (JSC::Interpreter::dumpRegisters):
 
17854         (JSC::Interpreter::execute):
 
17855         (JSC::Interpreter::privateExecute):
 
17856         * jit/JITStubs.cpp:
 
17857         (JSC::DEFINE_STUB_FUNCTION):
 
17858         * runtime/FunctionConstructor.cpp:
 
17859         (JSC::constructFunction):
 
17860         * runtime/ScopeChain.cpp:
 
17861         (JSC::ScopeChainNode::print):
 
17862         * runtime/ScopeChain.h:
 
17863         (JSC::ScopeChainNode::ScopeChainNode):
 
17864         (JSC::ScopeChainNode::~ScopeChainNode):
 
17865         (JSC::ScopeChainNode::push):
 
17866         (JSC::ScopeChain::ScopeChain):
 
17867         (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
 
17868         Replaced accessor function for globalObject() with data member. Replaced
 
17869         globalThisObject() accessor with direct access to globalThis, to match.
 
17871         * runtime/JSGlobalObject.cpp:
 
17872         (JSC::JSGlobalObject::init):
 
17873         * runtime/JSGlobalObject.h: Inlined array and object construction.
 
17875 2009-09-25  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
17877         Reviewed by Gavin Barraclough.
 
17879         Add ARM version detection rules for Symbian
 
17880         https://bugs.webkit.org/show_bug.cgi?id=29715
 
17884 2009-09-24  Xan Lopez  <xlopez@igalia.com>
 
17886         Reviewed by Mark "Do It!" Rowe.
 
17888         Some GCC versions don't like C++-style comments in preprocessor
 
17889         directives, change to C-style to shut them up.
 
17893 2009-09-24  Oliver Hunt  <oliver@apple.com>
 
17895         Reviewed by Gavin Barraclough.
 
17897         Division is needlessly slow in 64-bit
 
17898         https://bugs.webkit.org/show_bug.cgi?id=29723
 
17900         Add codegen for op_div on x86-64
 
17903         (JSC::JIT::privateCompileMainPass):
 
17904         (JSC::JIT::privateCompileSlowCases):
 
17906         * jit/JITArithmetic.cpp:
 
17907         (JSC::JIT::compileBinaryArithOpSlowCase):
 
17908         (JSC::JIT::emit_op_div):
 
17909         (JSC::JIT::emitSlow_op_div):
 
17910         * jit/JITInlineMethods.h:
 
17911         (JSC::JIT::isOperandConstantImmediateDouble):
 
17912         (JSC::JIT::addressFor):
 
17913         (JSC::JIT::emitLoadDouble):
 
17914         (JSC::JIT::emitLoadInt32ToDouble):
 
17915         (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
 
17917 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
 
17919         Reviewed by Dimitri Glazkov.
 
17921         Add GYP generated files to svn:ignore
 
17922         https://bugs.webkit.org/show_bug.cgi?id=29724
 
17924         Adding the following files to the svn:ignore list (all in the
 
17925         JavaScriptCore/JavaScriptCore.gyp directory)
 
17927         JavaScriptCore.xcodeproj
 
17929         JavaScriptCore.vcproj
 
17930         JavaScriptCore_Debug.rules
 
17931         JavaScriptCore_Release.rules
 
17932         JavaScriptCore_Release - no tcmalloc.rules
 
17933         JavaScriptCore_Purify.rules
 
17935         JavaScriptCore_Debug_rules.mk
 
17936         JavaScriptCore_Release_rules.mk
 
17937         JavaScriptCore_Release - no tcmalloc_rules.mk
 
17938         JavaScriptCore_Purify_rules.mk
 
17939         JavaScriptCore.scons
 
17940         JavaScriptCore_main.scons
 
17942         * JavaScriptCore.gyp: Changed property svn:ignore.
 
17944 2009-09-24  Yong Li  <yong.li@torchmobile.com>
 
17946         Reviewed by Adam Barth.
 
17948         Replace platform-dependent code with WTF::currentTime()
 
17949         https://bugs.webkit.org/show_bug.cgi?id=29148
 
17952         (StopWatch::start):
 
17954         (StopWatch::getElapsedMS):
 
17955         * runtime/TimeoutChecker.cpp:
 
17958 2009-09-24  Mark Rowe  <mrowe@apple.com>
 
17960         Reviewed by Sam Weinig.
 
17962         <rdar://problem/7215058> FastMalloc scavenging thread should be named
 
17964         * wtf/FastMalloc.cpp:
 
17965         (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
 
17966         * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
 
17967         * wtf/ThreadingPthreads.cpp:
 
17968         (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
 
17970 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
 
17972         Reviewed by Sam Weinig.
 
17974         Renamed clear to removeAll, as suggested by Darin Adler.
 
17976         * wtf/HashCountedSet.h:
 
17977         (WTF::::removeAll):
 
17979 2009-09-24  Mark Rowe  <mrowe@apple.com>
 
17981         Reviewed by Gavin Barraclough.
 
17983         Fix FastMalloc to build with assertions enabled.
 
17985         * wtf/FastMalloc.cpp:
 
17986         (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
 
17987         * wtf/TCSpinLock.h:
 
17988         (TCMalloc_SpinLock::IsHeld):
 
17990 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
 
17992         Suggested by Darin Adler.
 
17994         Removed some unnecessary parameter names.
 
17996         * wtf/HashCountedSet.h:
 
17998 2009-09-24  Janne Koskinen  <janne.p.koskinen@digia.com>
 
18000         Reviewed by Simon Hausmann.
 
18002         On Windows JSChar is typedef'ed to wchar_t.
 
18004         When building with WINSCW for Symbian we need to do the
 
18007         * API/JSStringRef.h:
 
18009 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
 
18011         A piece of my last patch that I forgot.
 
18013         * wtf/HashCountedSet.h:
 
18014         (WTF::::clear): Added HashCountedSet::clear.
 
18016 2009-09-24  Gabor Loki  <loki@inf.u-szeged.hu>
 
18018         Reviewed by Gavin Barraclough.
 
18020         Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
 
18021         https://bugs.webkit.org/show_bug.cgi?id=28886
 
18023         There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
 
18024         which contain __clear_cache built-in function only for C while the C++
 
18025         version of __clear_cache is missing on ARM architectures.
 
18027         Fixed a small bug in the inline assembly of cacheFlush function on
 
18030         * jit/ExecutableAllocator.h:
 
18031         (JSC::ExecutableAllocator::cacheFlush):
 
18033 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
 
18035         Reviewed by Sam Weinig.
 
18037         Added the ability to swap vectors with inline capacities, so you can
 
18038         store a vector with inline capacity in a hash table.
 
18042         (WTF::VectorBuffer::swap):
 
18044 2009-09-23  David Kilzer  <ddkilzer@apple.com>
 
18046         Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
 
18048         Reviewed by Mark Rowe.
 
18050         * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when
 
18051         building on 64-bit SnowLeopard.  Define to 0 elsewhere.
 
18053 2009-09-22  Oliver Hunt  <oliver@apple.com>
 
18055         Reviewed by Geoff Garen.
 
18057         Code sampling builds are broken.
 
18058         https://bugs.webkit.org/show_bug.cgi?id=29662
 
18062         * bytecode/EvalCodeCache.h:
 
18063         (JSC::EvalCodeCache::get):
 
18064         * bytecode/SamplingTool.cpp:
 
18065         (JSC::ScriptSampleRecord::sample):
 
18066         (JSC::SamplingTool::doRun):
 
18067         (JSC::SamplingTool::notifyOfScope):
 
18068         (JSC::compareScriptSampleRecords):
 
18069         (JSC::SamplingTool::dump):
 
18070         * bytecode/SamplingTool.h:
 
18071         (JSC::ScriptSampleRecord::ScriptSampleRecord):
 
18072         (JSC::ScriptSampleRecord::~ScriptSampleRecord):
 
18073         (JSC::SamplingTool::SamplingTool):
 
18074         * bytecompiler/BytecodeGenerator.cpp:
 
18075         (JSC::BytecodeGenerator::BytecodeGenerator):
 
18076         (JSC::BytecodeGenerator::emitNewFunction):
 
18077         (JSC::BytecodeGenerator::emitNewFunctionExpression):
 
18078         * bytecompiler/BytecodeGenerator.h:
 
18079         (JSC::BytecodeGenerator::makeFunction):
 
18080         * debugger/Debugger.cpp:
 
18081         (JSC::evaluateInGlobalCallFrame):
 
18082         * debugger/DebuggerCallFrame.cpp:
 
18083         (JSC::DebuggerCallFrame::evaluate):
 
18084         * parser/Nodes.cpp:
 
18085         (JSC::ScopeNode::ScopeNode):
 
18086         * runtime/Completion.cpp:
 
18087         (JSC::checkSyntax):
 
18089         * runtime/Executable.cpp:
 
18090         (JSC::FunctionExecutable::fromGlobalCode):
 
18091         * runtime/Executable.h:
 
18092         (JSC::ScriptExecutable::ScriptExecutable):
 
18093         (JSC::EvalExecutable::EvalExecutable):
 
18094         (JSC::EvalExecutable::create):
 
18095         (JSC::ProgramExecutable::ProgramExecutable):
 
18096         (JSC::FunctionExecutable::create):
 
18097         (JSC::FunctionExecutable::FunctionExecutable):
 
18098         * runtime/JSGlobalObjectFunctions.cpp:
 
18099         (JSC::globalFuncEval):
 
18101 2009-09-22  Darin Adler  <darin@apple.com>
 
18103         Reviewed by Sam Weinig.
 
18105         * wtf/Forward.h: Added PassOwnPtr.
 
18107 2009-09-22  Yaar Schnitman  <yaar@chromium.org>
 
18109         Reviewed by David Levin.
 
18111         Ported chromium.org's javascriptcore.gyp for the webkit chromium port.
 
18113         https://bugs.webkit.org/show_bug.cgi?id=29617
 
18115         * JavaScriptCore.gyp/JavaScriptCore.gyp: Added.
 
18117 2009-09-22  Thiago Macieira  <thiago.macieira@nokia.com>
 
18119         Reviewed by Simon Hausmann.
 
18121         Fix compilation with WINSCW: no varargs macros
 
18123         Disable variadic arguments for WINSCW just like we do
 
18126         * wtf/Assertions.h:
 
18128 2009-09-22  Kent Hansen  <khansen@trolltech.com>
 
18130         Reviewed by Simon Hausmann.
 
18132         Disable variadic macros on MSVC7.
 
18134         This was originally added in r26589 but not extended
 
18135         when LOG_DISABLED/ASSERT_DISABLED was introduced.
 
18137         * wtf/Assertions.h:
 
18139 2009-09-22  Simon Hausmann  <simon.hausmann@nokia.com>
 
18141         Unreviewed build fix for Windows CE < 5
 
18143         Define WINCEBASIC to disable the IsDebuggerPresent() code in
 
18144         wtf/Assertions.cpp.
 
18146         * JavaScriptCore.pri:
 
18148 2009-09-22  Joerg Bornemann  <joerg.bornemann@nokia.com>
 
18150         Reviewed by Simon Hausmann.
 
18152         Fix major memory leak in JavaScriptCore RegisterFile on Windows CE
 
18154         https://bugs.webkit.org/show_bug.cgi?id=29367
 
18156         On Widows CE we must decommit all committed pages before we release
 
18157         them. See VirtualFree documentation.
 
18158         Desktop Windows behaves much smoother in this situation.
 
18160         * interpreter/RegisterFile.cpp:
 
18161         (JSC::RegisterFile::~RegisterFile):
 
18163 2009-09-21  Greg Bolsinga  <bolsinga@apple.com>
 
18165         Reviewed by Simon Fraser & Sam Weinig.
 
18167         Add ENABLE(ORIENTATION_EVENTS)
 
18168         https://bugs.webkit.org/show_bug.cgi?id=29508
 
18170         * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines.
 
18172 2009-09-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
18174         Reviewed by Eric Seidel.
 
18176         [Fix] SourceCode's uninitialized member
 
18178         Potential source of crashes and bugs was fixed. Default constructor
 
18179         didn't initialized m_provider member.
 
18181         https://bugs.webkit.org/show_bug.cgi?id=29364
 
18183         * parser/SourceCode.h:
 
18184         (JSC::SourceCode::SourceCode):
 
18186 2009-09-21  Oliver Hunt  <oliver@apple.com>
 
18188         Reviewed by Geoff Garen.
 
18190         REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
 
18191         https://bugs.webkit.org/show_bug.cgi?id=29599
 
18193         It is unsafe to attempt to cache new property transitions on
 
18194         dictionaries of any type.
 
18196         * interpreter/Interpreter.cpp:
 
18197         (JSC::Interpreter::tryCachePutByID):
 
18198         * jit/JITStubs.cpp:
 
18199         (JSC::JITThunks::tryCachePutByID):
 
18201 2009-09-21  Oliver Hunt  <oliver@apple.com>
 
18203         RS=Maciej Stachowiak.
 
18205         Re-land SNES fix with corrected assertion.
 
18207         * interpreter/Interpreter.cpp:
 
18208         (JSC::Interpreter::resolveGlobal):
 
18209         (JSC::Interpreter::tryCachePutByID):
 
18210         (JSC::Interpreter::tryCacheGetByID):
 
18211         * jit/JITStubs.cpp:
 
18212         (JSC::JITThunks::tryCachePutByID):
 
18213         (JSC::JITThunks::tryCacheGetByID):
 
18214         (JSC::DEFINE_STUB_FUNCTION):
 
18215         * runtime/BatchedTransitionOptimizer.h:
 
18216         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
 
18217         * runtime/JSObject.cpp:
 
18218         (JSC::JSObject::removeDirect):
 
18219         * runtime/Structure.cpp:
 
18220         (JSC::Structure::Structure):
 
18221         (JSC::Structure::getEnumerablePropertyNames):
 
18222         (JSC::Structure::despecifyDictionaryFunction):
 
18223         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
18224         (JSC::Structure::addPropertyTransition):
 
18225         (JSC::Structure::removePropertyTransition):
 
18226         (JSC::Structure::toDictionaryTransition):
 
18227         (JSC::Structure::toCacheableDictionaryTransition):
 
18228         (JSC::Structure::toUncacheableDictionaryTransition):
 
18229         (JSC::Structure::fromDictionaryTransition):
 
18230         (JSC::Structure::removePropertyWithoutTransition):
 
18231         * runtime/Structure.h:
 
18232         (JSC::Structure::isDictionary):
 
18233         (JSC::Structure::isUncacheableDictionary):
 
18234         (JSC::Structure::):
 
18235         * runtime/StructureChain.cpp:
 
18236         (JSC::StructureChain::isCacheable):
 
18238 2009-09-21  Adam Roben  <aroben@apple.com>
 
18240         Revert r48573, as it caused many assertion failures
 
18242         * interpreter/Interpreter.cpp:
 
18243         * jit/JITStubs.cpp:
 
18244         * runtime/BatchedTransitionOptimizer.h:
 
18245         * runtime/JSObject.cpp:
 
18246         * runtime/Structure.cpp:
 
18247         * runtime/Structure.h:
 
18248         * runtime/StructureChain.cpp:
 
18250 2009-09-21  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
18252         Unreviewed make dist build fix. Missing files.
 
18256 2009-09-19  Gavin Barraclough  <barraclough@apple.com>
 
18258         Reviewed by Sam 'Cabin Boy' Weinig.
 
18260         Fix stack alignment with ARM THUMB2 JIT.
 
18261         https://bugs.webkit.org/show_bug.cgi?id=29526
 
18263         Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
 
18264         multiple of 16 bytes.
 
18266         * jit/JITStubs.cpp:
 
18267         (JSC::JITThunks::JITThunks):
 
18270 2009-09-20  Oliver Hunt  <oliver@apple.com>
 
18272         Reviewed by Maciej Stachowiak.
 
18275         https://bugs.webkit.org/show_bug.cgi?id=29534
 
18277         The problem was that the emulator used multiple classes with
 
18278         more properties than our dictionary cutoff allowed, this resulted
 
18279         in more or less all critical logic inside the emulator requiring
 
18280         uncached property access.
 
18282         Rather than simply bumping the dictionary cutoff, this patch
 
18283         recognises that there are two ways to create a "dictionary"
 
18284         structure.  Either by adding a large number of properties, or
 
18285         by removing a property.  In the case of adding properties we
 
18286         know all the existing properties will maintain their existing
 
18287         offsets, so we could cache access to those properties, if we
 
18288         know they won't be removed.
 
18290         To make this possible, this patch adds the logic required to
 
18291         distinguish a dictionary created by addition from one created
 
18292         by removal.  With this logic in place we can now cache access
 
18293         to objects with large numbers of properties.
 
18295         SNES performance improved by more than 6x.
 
18297         * interpreter/Interpreter.cpp:
 
18298         (JSC::Interpreter::resolveGlobal):
 
18299         (JSC::Interpreter::tryCachePutByID):
 
18300         (JSC::Interpreter::tryCacheGetByID):
 
18301         * jit/JITStubs.cpp:
 
18302         (JSC::JITThunks::tryCachePutByID):
 
18303         (JSC::JITThunks::tryCacheGetByID):
 
18304         (JSC::DEFINE_STUB_FUNCTION):
 
18305         * runtime/BatchedTransitionOptimizer.h:
 
18306         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
 
18307         * runtime/JSObject.cpp:
 
18308         (JSC::JSObject::removeDirect):
 
18309         * runtime/Structure.cpp:
 
18310         (JSC::Structure::Structure):
 
18311         (JSC::Structure::getEnumerablePropertyNames):
 
18312         (JSC::Structure::despecifyDictionaryFunction):
 
18313         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
18314         (JSC::Structure::addPropertyTransition):
 
18315         (JSC::Structure::removePropertyTransition):
 
18316         (JSC::Structure::toDictionaryTransition):
 
18317         (JSC::Structure::toCacheableDictionaryTransition):
 
18318         (JSC::Structure::toUncacheableDictionaryTransition):
 
18319         (JSC::Structure::fromDictionaryTransition):
 
18320         (JSC::Structure::removePropertyWithoutTransition):
 
18321         * runtime/Structure.h:
 
18322         (JSC::Structure::isDictionary):
 
18323         (JSC::Structure::isUncacheableDictionary):
 
18324         (JSC::Structure::):
 
18325         * runtime/StructureChain.cpp:
 
18326         (JSC::StructureChain::isCacheable):
 
18328 2009-09-19  Oliver Hunt  <oliver@apple.com>
 
18330         Reviewed by Maciej Stachowiak.
 
18332         Implement ES5 Object.create function
 
18333         https://bugs.webkit.org/show_bug.cgi?id=29524
 
18335         Implement Object.create.  Very simple patch, effectively Object.defineProperties
 
18336         only creating the target object itself.
 
18338         * runtime/CommonIdentifiers.h:
 
18339         * runtime/ObjectConstructor.cpp:
 
18340         (JSC::ObjectConstructor::ObjectConstructor):
 
18341         (JSC::objectConstructorCreate):
 
18343 2009-09-19  Dan Bernstein  <mitz@apple.com>
 
18345         Fix clean debug builds.
 
18347         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
18349 2009-09-19  Joerg Bornemann  <joerg.bornemann@nokia.com>
 
18351         Reviewed by George Staikos.
 
18353         QtWebKit Windows CE compile fix
 
18355         https://bugs.webkit.org/show_bug.cgi?id=29379
 
18357         There is no _aligned_alloc or _aligned_free on Windows CE.
 
18358         We just use the Windows code that was there before and use VirtualAlloc.
 
18359         But that also means that the BLOCK_SIZE must be 64K as this function
 
18360         allocates on 64K boundaries.
 
18362         * runtime/Collector.cpp:
 
18363         (JSC::Heap::allocateBlock):
 
18364         (JSC::Heap::freeBlock):
 
18365         * runtime/Collector.h:
 
18367 2009-09-19  Oliver Hunt  <oliver@apple.com>
 
18369         Reviewed by Sam Weinig.
 
18371         Implement ES5 Object.defineProperties function
 
18372         https://bugs.webkit.org/show_bug.cgi?id=29522
 
18374         Implement Object.defineProperties.  Fairly simple patch, simply makes use of
 
18375         existing functionality used for defineProperty.
 
18377         * runtime/CommonIdentifiers.h:
 
18378         * runtime/ObjectConstructor.cpp:
 
18379         (JSC::ObjectConstructor::ObjectConstructor):
 
18380         (JSC::defineProperties):
 
18381         (JSC::objectConstructorDefineProperties):
 
18383 2009-09-19  Oliver Hunt  <oliver@apple.com>
 
18385         Reviewed by NOBODY (Build fix).
 
18387         Windows build fix part2
 
18389         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
18390         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
18392 2009-09-19  Oliver Hunt  <oliver@apple.com>
 
18394         Reviewed by NOBODY (Buildfix).
 
18396         Windows build fix part 1.
 
18398         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
18399         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
18401 2009-09-18  Oliver Hunt  <oliver@apple.com>
 
18403         Reviewed by Geoff Garen.
 
18405         Implement ES5 Object.defineProperty function
 
18406         https://bugs.webkit.org/show_bug.cgi?id=29503
 
18408         Implement Object.defineProperty.  This requires adding the API to
 
18409         ObjectConstructor, along with a helper function that implements the
 
18410         ES5 internal [[ToPropertyDescriptor]] function.  It then adds
 
18411         JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
 
18412         Currently defineOwnProperty uses a delete followed by a put to redefine
 
18413         attributes of a property, clearly this is less efficient than it could be
 
18414         but we can improve this if it needs to be possible in future.
 
18416         * JavaScriptCore.exp:
 
18417         * debugger/DebuggerActivation.cpp:
 
18418         (JSC::DebuggerActivation::defineGetter):
 
18419         (JSC::DebuggerActivation::defineSetter):
 
18420         * debugger/DebuggerActivation.h:
 
18421         * interpreter/Interpreter.cpp:
 
18422         (JSC::Interpreter::privateExecute):
 
18423         * jit/JITStubs.cpp:
 
18424           Update defineGetter/Setter calls
 
18425         * runtime/CommonIdentifiers.h:
 
18426         * runtime/JSArray.cpp:
 
18427         (JSC::JSArray::getOwnPropertySlot):
 
18428         * runtime/JSGlobalObject.cpp:
 
18429         (JSC::JSGlobalObject::defineGetter):
 
18430         (JSC::JSGlobalObject::defineSetter):
 
18431         * runtime/JSGlobalObject.h:
 
18432         * runtime/JSObject.cpp:
 
18433         (JSC::JSObject::defineGetter):
 
18434         (JSC::JSObject::defineSetter):
 
18435         (JSC::putDescriptor):
 
18436         (JSC::JSObject::defineOwnProperty):
 
18437         * runtime/JSObject.h:
 
18438         * runtime/ObjectConstructor.cpp:
 
18439         (JSC::ObjectConstructor::ObjectConstructor):
 
18440         (JSC::objectConstructorGetOwnPropertyDescriptor):
 
18441         (JSC::toPropertyDescriptor):
 
18442         (JSC::objectConstructorDefineProperty):
 
18443         * runtime/ObjectPrototype.cpp:
 
18444         (JSC::objectProtoFuncDefineGetter):
 
18445         (JSC::objectProtoFuncDefineSetter):
 
18446         * runtime/PropertyDescriptor.cpp:
 
18447         (JSC::PropertyDescriptor::writable):
 
18448         (JSC::PropertyDescriptor::enumerable):
 
18449         (JSC::PropertyDescriptor::configurable):
 
18450         (JSC::PropertyDescriptor::isDataDescriptor):
 
18451         (JSC::PropertyDescriptor::isGenericDescriptor):
 
18452         (JSC::PropertyDescriptor::isAccessorDescriptor):
 
18453         (JSC::PropertyDescriptor::getter):
 
18454         (JSC::PropertyDescriptor::setter):
 
18455         (JSC::PropertyDescriptor::setDescriptor):
 
18456         (JSC::PropertyDescriptor::setAccessorDescriptor):
 
18457         (JSC::PropertyDescriptor::setWritable):
 
18458         (JSC::PropertyDescriptor::setEnumerable):
 
18459         (JSC::PropertyDescriptor::setConfigurable):
 
18460         (JSC::PropertyDescriptor::setSetter):
 
18461         (JSC::PropertyDescriptor::setGetter):
 
18462         (JSC::PropertyDescriptor::equalTo):
 
18463         (JSC::PropertyDescriptor::attributesEqual):
 
18464         (JSC::PropertyDescriptor::attributesWithOverride):
 
18465         * runtime/PropertyDescriptor.h:
 
18466         (JSC::PropertyDescriptor::PropertyDescriptor):
 
18467         (JSC::PropertyDescriptor::value):
 
18468         (JSC::PropertyDescriptor::setValue):
 
18469         (JSC::PropertyDescriptor::isEmpty):
 
18470         (JSC::PropertyDescriptor::writablePresent):
 
18471         (JSC::PropertyDescriptor::enumerablePresent):
 
18472         (JSC::PropertyDescriptor::configurablePresent):
 
18473         (JSC::PropertyDescriptor::setterPresent):
 
18474         (JSC::PropertyDescriptor::getterPresent):
 
18475         (JSC::PropertyDescriptor::operator==):
 
18476         (JSC::PropertyDescriptor::):
 
18478 2009-09-18  Gabor Loki  <loki@inf.u-szeged.hu>
 
18480         Reviewed by Gavin Barraclough.
 
18482         Build fix to enable ARM_THUMB2 on Linux
 
18483         https://bugs.webkit.org/show_bug.cgi?id=
 
18485         * jit/ExecutableAllocator.h:
 
18486         (JSC::ExecutableAllocator::cacheFlush):
 
18487         * jit/JITStubs.cpp:
 
18490 2009-09-18  Gabor Loki  <loki@inf.u-szeged.hu>
 
18492         Reviewed by Gavin Barraclough.
 
18494         Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
 
18495         https://bugs.webkit.org/show_bug.cgi?id=29122
 
18497         Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
 
18498         macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
 
18499         when Thumb-2 instruction set is the required target. The
 
18500         PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
 
18501         case where the code is common the PLATFORM(ARM) have to be used.
 
18503         * assembler/ARMAssembler.cpp:
 
18504         * assembler/ARMAssembler.h:
 
18505         * assembler/ARMv7Assembler.h:
 
18506         * assembler/MacroAssembler.h:
 
18507         * assembler/MacroAssemblerARM.cpp:
 
18508         * assembler/MacroAssemblerARM.h:
 
18509         * assembler/MacroAssemblerCodeRef.h:
 
18510         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
 
18511         * jit/ExecutableAllocator.h:
 
18513         * jit/JITInlineMethods.h:
 
18514         (JSC::JIT::beginUninterruptedSequence):
 
18515         (JSC::JIT::preserveReturnAddressAfterCall):
 
18516         (JSC::JIT::restoreReturnAddressBeforeReturn):
 
18517         (JSC::JIT::restoreArgumentReference):
 
18518         (JSC::JIT::restoreArgumentReferenceForTrampoline):
 
18519         * jit/JITOpcodes.cpp:
 
18520         * jit/JITStubs.cpp:
 
18521         (JSC::JITThunks::JITThunks):
 
18524         * yarr/RegexJIT.cpp:
 
18525         (JSC::Yarr::RegexGenerator::generateEnter):
 
18527 2009-09-18  Joerg Bornemann  <joerg.bornemann@nokia.com>
 
18529         Reviewed by Simon Hausmann.
 
18531         Fix the Qt/Windows CE build.
 
18533         * JavaScriptCore.pri: Build the ce_time.cpp functions from
 
18534         within Qt externally.
 
18535         * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the
 
18536         Qt build these functions are no external, too.
 
18538 2009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
 
18540         Reviewed by Simon Hausmann.
 
18542         Symbian/WINSCW build fox.
 
18544         Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to
 
18547         WINSCW defines wchar_t, thus UChar has to be wchar_t
 
18549         * wtf/unicode/qt4/UnicodeQt4.h:
 
18551 2009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
 
18553         Reviewed by Simon Hausmann.
 
18555         Symbian/WINSCW build fix.
 
18557         https://bugs.webkit.org/show_bug.cgi?id=29186
 
18559         WINSCW Template specialisation name in declaration must the be the same as in implementation.
 
18561         * runtime/LiteralParser.h:
 
18563 2009-09-15  Norbert Leser  <norbert.leser@nokia.com>
 
18565         Reviewed by Darin Adler.
 
18567         https://bugs.webkit.org/show_bug.cgi?id=27060
 
18569         Symbian compiler for emulator target (WINSCW) fails with
 
18570         "illegal operand" for m_attributesInPrevious in structure.ccp
 
18571         (when calling make_pair functions).
 
18572         This error is apparently due to the compiler not properly
 
18573         resolving the unsigned type of the declared bitfield.
 
18575         Initial patch explicitly casted m_attributesInPrevious
 
18576         to unsigned, but since bitfield optimization is not critical for
 
18577         the emulator target, this conditional change in header file
 
18578         appears to be least intrusive.
 
18580         * runtime/Structure.h:
 
18582 2009-09-16  Gabor Loki  <loki@inf.u-szeged.hu>
 
18584         Reviewed by Darin Adler.
 
18586         Fix GCC warnings on ARM_THUMB2 platform
 
18588         * assembler/ARMv7Assembler.h:
 
18589         (JSC::ARMThumbImmediate::countLeadingZerosPartial):
 
18590         * assembler/MacroAssemblerARMv7.h:
 
18591         (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32):
 
18592         (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
 
18594 2009-09-16  Greg Bolsinga  <bolsinga@apple.com>
 
18596         Add ENABLE(INSPECTOR)
 
18597         https://bugs.webkit.org/show_bug.cgi?id=29260
 
18599         Reviewed by David Kilzer.
 
18603 2009-09-16  Greg Bolsinga  <bolsinga@apple.com>
 
18605         Add ENABLE(CONTEXT_MENUS)
 
18606         https://bugs.webkit.org/show_bug.cgi?id=29225
 
18608         Reviewed by David Kilzer.
 
18612 2009-09-16  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
 
18614         Reviewed by Eric Seidel.
 
18616         The webkit stdint and stdbool headers exists because
 
18617         the compiler MSVC doesn't include them.  The check
 
18618         should not check for PLATFORM(WIN_OS) but for MSVC.
 
18620         * os-win32/stdbool.h:
 
18621         * os-win32/stdint.h:
 
18623 2009-09-16  Greg Bolsinga  <bolsinga@apple.com>
 
18625         Add ENABLE(DRAG_SUPPORT)
 
18626         https://bugs.webkit.org/show_bug.cgi?id=29233
 
18628         Reviewed by David Kilzer.
 
18632 2009-09-16  Kevin Ollivier  <kevino@theolliviers.com>
 
18634         waf build fix after flag was moved to correct place.
 
18638 2009-09-16  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
18640         Reviewed by Simon Hausmann.
 
18642         [Qt] Build fix for 64-bit Qt on Mac OS X
 
18644         * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC
 
18646 2009-09-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
18648         Reviewed by Simon Hausmann.
 
18650         [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects.
 
18651         https://bugs.webkit.org/show_bug.cgi?id=29295
 
18653         This is an important fix when JavaScript workers are in use, since
 
18654         unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each).
 
18655         QThreadStorage calls the destructor of a given object, which is the
 
18656         ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does
 
18657         not support the calling of a static utility function when the thread
 
18658         is about to close. In this patch we call the ThreadSpecific::destroy()
 
18659         utility function from the destructor of ThreadSpecific::Data. Moreover,
 
18660         since Qt resets all thread local values to 0 before the calling of the
 
18661         appropriate destructors, we set back the pointer to its original value.
 
18662         This is necessary because the get() method of the ThreadSpecific
 
18663         object may be called during the exuction of the destructor.
 
18665         * wtf/ThreadSpecific.h:
 
18666         (WTF::ThreadSpecific::Data::~Data):
 
18667         (WTF::::~ThreadSpecific):
 
18671 2009-09-10  Oliver Hunt  <oliver@apple.com>
 
18673         Reviewed by Geoff Garen.
 
18675         Allow anonymous storage inside JSObject
 
18676         https://bugs.webkit.org/show_bug.cgi?id=29168
 
18678         Add the concept of anonymous slots to Structures so that it is
 
18679         possible to store references to values that need marking in the
 
18680         standard JSObject storage buffer.  This allows us to reduce the
 
18681         malloc overhead of some objects (by allowing them to store JS
 
18682         values in the inline storage of the object) and reduce the 
 
18683         dependence of custom mark functions (if all an objects children
 
18684         are in the standard object property storage there's no need to
 
18685         mark them manually).
 
18687         * JavaScriptCore.exp:
 
18688         * runtime/JSObject.h:
 
18689         (JSC::JSObject::putAnonymousValue):
 
18690         (JSC::JSObject::getAnonymousValue):
 
18691         (JSC::JSObject::addAnonymousSlots):
 
18692         * runtime/JSWrapperObject.h:
 
18693         (JSC::JSWrapperObject::createStructure):
 
18694         (JSC::JSWrapperObject::JSWrapperObject):
 
18695         (JSC::JSWrapperObject::setInternalValue):
 
18696         * runtime/PropertyMapHashTable.h:
 
18697         * runtime/Structure.cpp:
 
18698         (JSC::Structure::~Structure):
 
18699         (JSC::Structure::materializePropertyMap):
 
18700         (JSC::Structure::addAnonymousSlotsTransition):
 
18701         (JSC::Structure::copyPropertyTable):
 
18702         (JSC::Structure::put):
 
18703         (JSC::Structure::rehashPropertyMapHashTable):
 
18704         * runtime/Structure.h:
 
18705         (JSC::Structure::propertyStorageSize):
 
18706         (JSC::StructureTransitionTable::reifySingleTransition):
 
18707         * runtime/StructureTransitionTable.h:
 
18708         (JSC::StructureTransitionTable::TransitionTable::addSlotTransition):
 
18709         (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition):
 
18710         (JSC::StructureTransitionTable::TransitionTable::getSlotTransition):
 
18711         (JSC::StructureTransitionTable::getAnonymousSlotTransition):
 
18712         (JSC::StructureTransitionTable::addAnonymousSlotTransition):
 
18713         (JSC::StructureTransitionTable::removeAnonymousSlotTransition):
 
18715 2009-09-15  Alex Milowski  <alex@milowski.com>
 
18717         Reviewed by Tor Arne Vestbø.
 
18719         Added the ENABLE_MATHML define to the features
 
18721         * Configurations/FeatureDefines.xcconfig:
 
18723 2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
 
18725         Reviewed by Tor Arne Vestbø.
 
18727         [Qt] Build fix for windows.
 
18729         After http://trac.webkit.org/changeset/47795 the MinGW build broke,
 
18730         because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.
 
18732         * runtime/Collector.cpp:
 
18733         (JSC::Heap::allocateBlock): MinGW case added.
 
18734         (JSC::Heap::freeBlock): MinGW case added.
 
18736 2009-09-15  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
18738         Reviewed by Tor Arne Vestbø.
 
18740         [Qt] Build fix for Windows/MinGW
 
18742         https://bugs.webkit.org/show_bug.cgi?id=29268
 
18744         * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW)
 
18746 2009-09-14  Gabor Loki  <loki@inf.u-szeged.hu>
 
18748         Reviewed by Gavin Barraclough.
 
18750         Detect VFP at runtime in generic ARM port on Linux platform.
 
18751         https://bugs.webkit.org/show_bug.cgi?id=29076
 
18753         * JavaScriptCore.pri:
 
18754         * assembler/MacroAssemblerARM.cpp: Added.
 
18755         (JSC::isVFPPresent):
 
18756         * assembler/MacroAssemblerARM.h:
 
18757         (JSC::MacroAssemblerARM::supportsFloatingPoint):
 
18759 2009-09-14  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
18761         Reviewed by Tor Arne Vestbø.
 
18763         [Qt] Build fix for windows build.
 
18765         * JavaScriptCore.pri: Correct a logic error.
 
18766         * pcre/dftables: Add missing paranthesis for tmpdir function.
 
18768 2009-09-12  Oliver Hunt  <oliver@apple.com>
 
18770         Reviewed by NOBODY (Build fix).
 
18772         Build fix for windows exports (again).
 
18774         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
18775         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
18777 2009-09-12  Oliver Hunt  <oliver@apple.com>
 
18779         Reviewed by NOBODY (Build fix).
 
18781         Build fix for windows exports.
 
18783         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
18784         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
18786 2009-09-12  Oliver Hunt  <oliver@apple.com>
 
18788         Reviewed by NOBODY (Build fix).
 
18790         Correct fix for non-allinonefile builds
 
18792         * runtime/ObjectConstructor.cpp:
 
18794 2009-09-12  Oliver Hunt  <oliver@apple.com>
 
18796         Reviewed by NOBODY (Build fix).
 
18798         Fix non-allinonefile builds
 
18800         * runtime/ObjectConstructor.cpp:
 
18802 2009-09-12  Oliver Hunt  <oliver@apple.com>
 
18804         Reviewed by Maciej Stachowiak.
 
18806         [ES5] Implement Object.keys
 
18807         https://bugs.webkit.org/show_bug.cgi?id=29170
 
18809         This patch basically requires two separate steps, the first is to split getPropertyNames
 
18810         into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave
 
18811         in the same way as getOwnPropertySlot and getPropertySlot.  In essence getOwnPropertyNames
 
18812         produces the list of properties on an object excluding its prototype chain and getPropertyNames
 
18813         just iterates the the object and its prototype chain calling getOwnPropertyNames at each level.
 
18815         * API/JSCallbackObject.h:
 
18816         * API/JSCallbackObjectFunctions.h:
 
18817         (JSC::::getOwnPropertyNames):
 
18818         * JavaScriptCore.exp:
 
18819         * debugger/DebuggerActivation.cpp:
 
18820         (JSC::DebuggerActivation::getOwnPropertyNames):
 
18821         * debugger/DebuggerActivation.h:
 
18822         * runtime/CommonIdentifiers.h:
 
18823         * runtime/JSArray.cpp:
 
18824         (JSC::JSArray::getOwnPropertyNames):
 
18825         * runtime/JSArray.h:
 
18826         * runtime/JSByteArray.cpp:
 
18827         (JSC::JSByteArray::getOwnPropertyNames):
 
18828         * runtime/JSByteArray.h:
 
18829         * runtime/JSNotAnObject.cpp:
 
18830         (JSC::JSNotAnObject::getOwnPropertyNames):
 
18831         * runtime/JSNotAnObject.h:
 
18832         * runtime/JSObject.cpp:
 
18833         (JSC::JSObject::getOwnPropertyNames):
 
18834         * runtime/JSObject.h:
 
18835         * runtime/JSVariableObject.cpp:
 
18836         (JSC::JSVariableObject::getOwnPropertyNames):
 
18837         * runtime/JSVariableObject.h:
 
18838         * runtime/ObjectConstructor.cpp:
 
18839         (JSC::ObjectConstructor::ObjectConstructor):
 
18840         (JSC::objectConstructorKeys):
 
18841         * runtime/RegExpMatchesArray.h:
 
18842         (JSC::RegExpMatchesArray::getOwnPropertyNames):
 
18843         * runtime/StringObject.cpp:
 
18844         (JSC::StringObject::getOwnPropertyNames):
 
18845         * runtime/StringObject.h:
 
18846         * runtime/Structure.cpp:
 
18847         (JSC::Structure::getOwnEnumerablePropertyNames):
 
18848         (JSC::Structure::getEnumerablePropertyNames):
 
18849         * runtime/Structure.h:
 
18851 2009-09-11  Oliver Hunt  <oliver@apple.com>
 
18853         Reviewed by Sam Weinig.
 
18855         getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames
 
18856         https://bugs.webkit.org/show_bug.cgi?id=29214
 
18858         Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames.
 
18859         This flag is used to make sure that caching of the property name data is safe.
 
18861         * API/JSCallbackConstructor.h:
 
18862         (JSC::JSCallbackConstructor::createStructure):
 
18863         * debugger/DebuggerActivation.h:
 
18864         (JSC::DebuggerActivation::createStructure):
 
18865         * runtime/BooleanObject.h:
 
18866         (JSC::BooleanObject::createStructure):
 
18867         * runtime/DatePrototype.h:
 
18868         (JSC::DatePrototype::createStructure):
 
18869         * runtime/FunctionPrototype.h:
 
18870         (JSC::FunctionPrototype::createStructure):
 
18871         * runtime/JSONObject.h:
 
18872         (JSC::JSONObject::createStructure):
 
18873         * runtime/JSObject.h:
 
18874         (JSC::JSObject::createStructure):
 
18875         * runtime/JSTypeInfo.h:
 
18876         (JSC::TypeInfo::hasDefaultGetPropertyNames):
 
18877         * runtime/JSVariableObject.h:
 
18878         (JSC::JSVariableObject::createStructure):
 
18879         * runtime/JSWrapperObject.h:
 
18880         (JSC::JSWrapperObject::createStructure):
 
18881         * runtime/MathObject.h:
 
18882         (JSC::MathObject::createStructure):
 
18883         * runtime/NumberConstructor.h:
 
18884         (JSC::NumberConstructor::createStructure):
 
18885         * runtime/NumberObject.h:
 
18886         (JSC::NumberObject::createStructure):
 
18887         * runtime/RegExpConstructor.h:
 
18888         (JSC::RegExpConstructor::createStructure):
 
18889         * runtime/RegExpObject.h:
 
18890         (JSC::RegExpObject::createStructure):
 
18891         * runtime/StructureChain.cpp:
 
18892         (JSC::StructureChain::isCacheable):
 
18894 2009-09-11  Alexey Proskuryakov  <ap@webkit.org>
 
18896         Reviewed by Geoff Garen.
 
18898         https://bugs.webkit.org/show_bug.cgi?id=29207
 
18899         Add checks for using WebCore JS context on secondary threads
 
18901         * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
 
18902         * runtime/JSGlobalData.h:
 
18903         Added a new mainThreadOnly flag that WebCore would set.
 
18905         * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this,
 
18906         so this is a good place to check that the API isn't used form a wrong thread.
 
18908 2009-09-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
18910         Reviewed by Simon Hausmann.
 
18912         Compiling JavaScriptCore on sparc 64 with gcc fails.
 
18914         ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int,
 
18915         however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes).
 
18917         The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use
 
18918         a mutex instead when compiling for sparc 64 with gcc.
 
18920         https://bugs.webkit.org/show_bug.cgi?id=29175
 
18923         __sparc64__ is not defined on all OS.
 
18924         Uses instead: __sparc__ && __arch64__ || __sparcv9
 
18927 2009-09-11  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
 
18929         Reviewed by Simon Hausmann.
 
18931         Fix compile error on Windows7(64Bit) with latest SDK.
 
18933         Added the missing include file.
 
18935         * runtime/UString.cpp:
 
18937 2009-09-11  Joerg Bornemann  <joerg.bornemann@trolltech.com>
 
18939         Reviewed by Simon Hausmann.
 
18941         Qt/Windows CE compile fix, include the executable allocator and
 
18942         markstack implementation in the windows build.
 
18944         * JavaScriptCore.pri:
 
18946 2009-09-08  John Abd-El-Malek  <jam@chromium.org>
 
18948         Reviewed by Dimitri Glazkov.
 
18950         Remove unneeded define for ActiveX.
 
18951         https://bugs.webkit.org/show_bug.cgi?id=29054
 
18955 2009-09-10  Mark Rowe  <mrowe@apple.com>
 
18957         Rubber-stamped by Sam Weinig.
 
18959         Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
 
18961         * Configurations/FeatureDefines.xcconfig:
 
18963 2009-09-10  Fumitoshi Ukai  <ukai@chromium.org>
 
18965         Reviewed by Alexey Proskuryakov.
 
18967         Export WTF::tryFastMalloc used in WebSocketChannel.
 
18968         https://bugs.webkit.org/show_bug.cgi?id=28038
 
18970         * JavaScriptCore.exp:
 
18971         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
18972         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
18974 2009-09-10  Oliver Hunt  <oliver@apple.com>
 
18976         Reviewed by NOBODY (Build fix).
 
18978         Make StructureTransitionTable use an enum for the PtrAndFlags member
 
18979         used for the single transition slot optimisation.
 
18981         * runtime/StructureTransitionTable.h:
 
18982         (JSC::StructureTransitionTable::StructureTransitionTable):
 
18983         (JSC::StructureTransitionTable::usingSingleTransitionSlot):
 
18984         (JSC::StructureTransitionTable::):
 
18986 2009-09-10  Oliver Hunt  <oliver@apple.com>
 
18988         Reviewed by Geoff Garen.
 
18990         Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization
 
18991         https://bugs.webkit.org/show_bug.cgi?id=29141
 
18993         Make StructureTransitionTable encapsulate the single transition slot optimization.
 
18995         * runtime/Structure.cpp:
 
18996         (JSC::Structure::Structure):
 
18997         (JSC::Structure::~Structure):
 
18998         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
18999         (JSC::Structure::addPropertyTransition):
 
19000         (JSC::Structure::addPropertyWithoutTransition):
 
19001         (JSC::Structure::removePropertyWithoutTransition):
 
19002         (JSC::Structure::hasTransition):
 
19003         * runtime/Structure.h:
 
19004         (JSC::StructureTransitionTable::contains):
 
19005         (JSC::StructureTransitionTable::get):
 
19006         (JSC::StructureTransitionTable::hasTransition):
 
19007         (JSC::StructureTransitionTable::reifySingleTransition):
 
19008         * runtime/StructureTransitionTable.h:
 
19009         (JSC::StructureTransitionTable::StructureTransitionTable):
 
19010         (JSC::StructureTransitionTable::~StructureTransitionTable):
 
19011         (JSC::StructureTransitionTable::remove):
 
19012         (JSC::StructureTransitionTable::add):
 
19013         (JSC::StructureTransitionTable::table):
 
19014         (JSC::StructureTransitionTable::singleTransition):
 
19015         (JSC::StructureTransitionTable::usingSingleTransitionSlot):
 
19016         (JSC::StructureTransitionTable::setSingleTransition):
 
19017         (JSC::StructureTransitionTable::setTransitionTable):
 
19018         (JSC::StructureTransitionTable::):
 
19019         * wtf/PtrAndFlags.h:
 
19020         (WTF::PtrAndFlags::PtrAndFlags):
 
19022 2009-09-10  Zoltan Horvath  <zoltan@webkit.org>
 
19024         Reviewed by Darin Adler.
 
19026         Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet
 
19027         https://bugs.webkit.org/show_bug.cgi?id=25930
 
19029         FastAllocBase has been extended with fastDeleteSkippingDestructor function which
 
19030         releases memory without destructor call. fastDeleteAllValues has been implemented 
 
19031         similar as deleteAllValues but it uses fastDelete function to release memory.
 
19033         * wtf/FastAllocBase.h:
 
19034         (WTF::fastDeleteSkippingDestructor):
 
19036         (WTF::fastDeleteAllValues):
 
19038 2009-09-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
19040         Reviewed by Darin Adler.
 
19042         ARM compiler does not understand GCC visibility attribute
 
19043         https://bugs.webkit.org/show_bug.cgi?id=29079
 
19045         * API/JSBase.h: Make the test more specific to hit only
 
19048 2009-09-10  Adam Barth  <abarth@webkit.org>
 
19050         Unreviewed revert of the previous change.  It broke the tests.
 
19055 2009-09-10  Ben Laurie  <benl@google.com>
 
19057         Reviewed by Adam Barth.
 
19059         <https://bugs.webkit.org/show_bug.cgi?id=26836>
 
19061         If dtoa was given a small buffer and the number was either infinite or
 
19062         NaN, then the buffer would be overflowed.
 
19066 2009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
19068         Reviewed by Darin Adler.
 
19070         Change reinterpret_cast to static_cast in r48212.
 
19072         * jit/ExecutableAllocator.h:
 
19073         (JSC::ExecutableAllocator::cacheFlush):
 
19075 2009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
19077         Reviewed by Darin Adler.
 
19079         Remove WTF_PLATFORM_FORCE_PACK as it is no longer used
 
19080         https://bugs.webkit.org/show_bug.cgi?id=29066
 
19084 2009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
19086         Reviewed by Ariya Hidayat.
 
19088         Implement flushing the instruction cache for Symbian
 
19089         https://bugs.webkit.org/show_bug.cgi?id=29075
 
19091         * jit/ExecutableAllocator.h:
 
19092         (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush
 
19093         the instruction cache on Symbian
 
19095 2009-09-09  Kent Hansen  <khansen@trolltech.com>
 
19097         Reviewed by Darin Adler.
 
19099         https://bugs.webkit.org/show_bug.cgi?id=29024
 
19100         Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL
 
19102         These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler.
 
19104         * JavaScriptCore.gypi:
 
19105         * JavaScriptCore.xcodeproj/project.pbxproj:
 
19106         * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h.
 
19107         * runtime/Structure.h:
 
19108         * runtime/TypeInfo.h: Removed.
 
19110 2009-09-08  Oliver Hunt  <oliver@apple.com>
 
19112         Reviewed by Maciej Stachowiak.
 
19114         JSON.stringify(Date) loses the milliseconds information
 
19115         https://bugs.webkit.org/show_bug.cgi?id=29063
 
19117         Make sure we include milliseconds in the output of toISOString.
 
19119         * runtime/DatePrototype.cpp:
 
19120         (JSC::dateProtoFuncToISOString):
 
19122 2009-09-08  Kevin Ollivier  <kevino@theolliviers.com>
 
19124         wx build fix, generate derived sources earlier in order to make sure
 
19125         they're found by the build system when generating the list of sources to build.
 
19129 2009-09-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
19131         Reviewed by Simon Hausmann.
 
19133         Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined
 
19134         https://bugs.webkit.org/show_bug.cgi?id=29011
 
19136         * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for 
 
19137         atomicIncrement and atomicDecrement
 
19139 2009-09-07  Zoltan Horvath  <zoltan@webkit.org>
 
19141         Reviewed by Darin Adler.
 
19143         Allow custom memory allocation control in Yarr's RegexInterpreter
 
19144         https://bugs.webkit.org/show_bug.cgi?id=29025
 
19146         Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has
 
19147         been instantiated by 'new':
 
19149         class ByteDisjunction
 
19150         -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462
 
19152         struct BytecodePattern
 
19153         -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279
 
19155         * yarr/RegexInterpreter.h:
 
19157 2009-09-07  Drew Wilson  <atwilson@google.com>
 
19159         Reverting r48121 to fix Windows build errors.
 
19161         * JavaScriptCore.exp:
 
19163 2009-09-07  Drew Wilson  <atwilson@google.com>
 
19165         Reviewed by David Levin.
 
19167         Enable SHARED_WORKERS by default
 
19168         https://bugs.webkit.org/show_bug.cgi?id=28959
 
19170         * Configurations/FeatureDefines.xcconfig:
 
19172 2009-09-07  Fumitoshi Ukai  <ukai@chromium.org>
 
19174         Reviewed by Alexey Proskuryakov.
 
19176         Export WTF::tryFastMalloc used in WebSocketChannel.
 
19177         https://bugs.webkit.org/show_bug.cgi?id=28038
 
19179         * JavaScriptCore.exp:
 
19181 2009-09-04  Oliver Hunt  <oliver@apple.com>
 
19183         Reviewed by NOBODY (Build fix).
 
19185         Fix windows export files
 
19187         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
19188         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
19190 2009-09-04  Oliver Hunt  <oliver@apple.com>
 
19192         Reviewed by Gavin Barraclough.
 
19194         [[ToString]] conversion should use the actual toString function for String objects.
 
19196         Remove incorrect specialisations of toString conversions on StringObject.
 
19198         * JavaScriptCore.exp:
 
19199         * runtime/StringObject.cpp:
 
19200         * runtime/StringObject.h:
 
19202 2009-09-04  Steve Falkenburg  <sfalken@apple.com>
 
19206         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export.
 
19207         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export.
 
19209 2009-09-04  Steve Falkenburg  <sfalken@apple.com>
 
19213         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export.
 
19214         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export.
 
19216 2009-09-04  Darin Adler  <darin@apple.com>
 
19218         Reviewed by Geoff Garen.
 
19220         DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
 
19221         https://bugs.webkit.org/show_bug.cgi?id=28909
 
19225         Make some improvements to garbage collection code:
 
19227             1) Create a runtime assertion that catches any classes that
 
19228                override markChildren but have the HasDefaultMark bit set.
 
19229             2) Remove checks of the mark bit outside the MarkStack::append
 
19230                function; they are redundant.
 
19231             3) Improve the efficiency of the asObject and asArray functions
 
19232                when called on JSCell* to avoid a round trip to JSValue.
 
19233             4) Make more callers use the checked asCell and asObject
 
19234                casting functions rather than unchecked casts.
 
19235             5) Removed the JSCell::marked function and other GC-related
 
19236                functions because these operations are no longer things that
 
19237                code other than the core GC code needs to do directly. Fixed
 
19238                callers that were calling them.
 
19240         * runtime/Collector.cpp:
 
19241         (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain.
 
19242         (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark
 
19243         bit and call to MarkStack::drain.
 
19244         (JSC::Heap::collect): Removed unneeded checks of the mark bit and also
 
19245         changed call to SmallStrings::mark to call markChildren instead to match
 
19246         the rest of the objects.
 
19247         (JSC::typeName): Removed unneeded cast to JSObject*.
 
19249         * runtime/JSArray.h:
 
19250         (JSC::asArray): Added an overload for JSCell* and changed the JSValue
 
19251         version to call it. Removed some unneeded casts.
 
19252         (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in
 
19253         a header, and if not marked inline this could lead to linking problems.
 
19254         (JSC::MarkStack::markChildren): Added. This helper function is used by
 
19255         the drain function to avoid repating code. Also added the code here to
 
19256         check fro default mark violations in debug code. If a markChildren
 
19257         function adds something to the mark stack, but the type info claimed
 
19258         hasDefaultMark was true, then we will get an assertion now. Also fixed
 
19259         the assertion about the mark bit to use the Heap function directly
 
19260         because we don't have a JSCell::marked function any more.
 
19261         (JSC::MarkStack::drain): Changed a local variable from "v" to "value",
 
19262         and from "currentCell" to "cell". Changed to call markChildren in two
 
19263         places instead of repeating a chain of if statements twice. Changed
 
19264         code that reads and writes the mark bit to use Heap::isCellMarked and
 
19265         Heap::markCell so we can eliminate the JSCell::marked and
 
19266         JSCell::markCellDirect functions.
 
19268         * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member
 
19269         functions. Added a comment explaining that asCell should be deprecated
 
19270         in favor of the JSValue asCell member function.
 
19271         (JSC::MarkStack::append): Added the assertion that catches callers
 
19272         that have set the HasDefaultMark bit incorrectly. Changed
 
19273         code that reads and writes the mark bit to use Heap::isCellMarked and
 
19274         Heap::markCell so we can eliminate the JSCell::marked and
 
19275         JSCell::markCellDirect functions. Moved the overload of
 
19276         MarkStack::append for JSValue here so it can call through to the cell
 
19277         version. The old version had a copy of all the code instead, but that
 
19278         repeated the conversion from JSValue to JSCell* and the check for
 
19279         whether a value is a cell multiple times.
 
19280         (JSC::Structure::markAggregate): Moved this function here to avoid
 
19281         dependencies for Structure.h, since this calls MarkStack::append.
 
19283         * runtime/JSObject.cpp:
 
19284         (JSC::JSObject::markChildren): Added code to clear
 
19285         m_isCheckingForDefaultMarkViolation so the marking done by JSObject
 
19286         doesn't trigger the assertion.
 
19288         * runtime/JSValue.h: Moved some stray includes that were outside the
 
19289         header guard inside it. Not sure how that happened! Removed the
 
19290         GC-related member functions markChildren, hasChildren, marked, and
 
19293         * runtime/JSWrapperObject.h: Made markChildren private.
 
19294         (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
 
19295         HasDefaultMark bit was set.
 
19297         * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and
 
19298         initialized it to false. Moved the append function body from here to
 
19299         JSCell.h. Added a declaration of a private markChildren function used
 
19300         inside the drain function.
 
19302         * runtime/SmallStrings.cpp:
 
19303         (JSC::SmallStrings::markChildren): Changed the name and style of this
 
19304         function to match other functions. This allows us to share the normal
 
19305         mark stack code path.
 
19307         * runtime/SmallStrings.h: Changed the name and interface of mark to
 
19308         the more-normal markChildren style.
 
19310         * runtime/Structure.h: Moved the body of markAggregate into the
 
19311         JSCell.h to avoid a circular dependency with JSCell.h.
 
19313 2009-09-04  Darin Adler  <darin@apple.com>
 
19315         Reviewed by Geoff Garen.
 
19317         DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
 
19318         https://bugs.webkit.org/show_bug.cgi?id=28909
 
19322         Make some improvements to garbage collection code:
 
19324             1) Fix the two classes that had the default mark bit set but
 
19326             2) Remove checks of the mark bit outside the MarkStack::append
 
19327                function; they are redundant.
 
19328             3) Make more callers use the checked asCell and asObject
 
19329                casting functions rather than unchecked casts.
 
19330             4) Removed some GC-related functions because these operations are
 
19331                no longer things that code other than the core GC code needs
 
19332                to do directly. Fixed callers that were calling them.
 
19334         * bytecode/CodeBlock.cpp:
 
19335         (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark
 
19336         bit before calling MarkStack::append.
 
19338         * interpreter/Register.h: Removed unneeded marked and markChildren
 
19341         * jit/JITStubs.cpp:
 
19342         (op_eq): Removed unneeded assertions, instead using checked casting
 
19343         functions such as asObject.
 
19345         * runtime/ArgList.h: Added now-needed forward declaration of MarkStack.
 
19347         * runtime/GetterSetter.cpp:
 
19348         (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit.
 
19350         * runtime/GlobalEvalFunction.h:
 
19351         (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the
 
19352         HasDefaultMark bit was set.
 
19354         * runtime/JSCell.cpp:
 
19355         (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast.
 
19357         * runtime/JSObject.h:
 
19358         (JSC::asObject): Added an overload for JSCell* and changed the JSValue
 
19359         version to call it.
 
19360         (JSC::JSValue::get): Use asObject to avoid a direct static_cast.
 
19362         * runtime/JSWrapperObject.h: Made markChildren private.
 
19363         (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
 
19364         HasDefaultMark bit was set. Later we may want to optimize this for
 
19365         wrapper types that never have cells in their internal values, but there
 
19366         is no measured performance regression in SunSpider or V8 doing this
 
19369         * runtime/MarkStack.cpp: Tweaked formatting.
 
19371 2009-09-04  Kevin Ollivier  <kevino@theolliviers.com>
 
19373         wx build fix. Switch USE_ defines over to the compiler so that they can be
 
19374         checked by files not including config.h (like WebCorePrefix.h).
 
19378 2009-09-03  Yong Li  <yong.li@torchmobile.com>
 
19380         Reviewed by David Levin.
 
19382         Remove unnecessary dependency on unistd.h
 
19383         https://bugs.webkit.org/show_bug.cgi?id=28962
 
19385         * runtime/Completion.cpp:
 
19387 2009-09-03  Fumitoshi Ukai  <ukai@chromium.org>
 
19389         Reviewed by Eric Seidel.
 
19391         Add strnstr for Linux and Windows in StringExtras.h
 
19392         https://bugs.webkit.org/show_bug.cgi?id=28901
 
19394         * wtf/StringExtras.h:
 
19397 2009-09-03  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
19399         Reviewed by Darin Adler.
 
19401         Allow custom memory allocation control for JavaScriptCore's HashEntry class
 
19402         https://bugs.webkit.org/show_bug.cgi?id=27830
 
19404         Inherits HashEntry class from FastAllocBase because it has been
 
19405         instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32.
 
19407         * runtime/Lookup.h:
 
19409 2009-09-02  Gavin Barraclough  <barraclough@apple.com>
 
19411         Should crash if JIT code buffer allocation fails.
 
19413         https://bugs.webkit.org/show_bug.cgi?id=28926
 
19414         <rdar://problem/7031922>
 
19416         * jit/ExecutableAllocatorPosix.cpp:
 
19417         (JSC::ExecutablePool::systemAlloc):
 
19418         * jit/ExecutableAllocatorWin.cpp:
 
19419         (JSC::ExecutablePool::systemAlloc):
 
19421 2009-09-02  Kevin Ollivier  <kevino@theolliviers.com>
 
19423         waf build fixes for Windows/MSVC.
 
19427 2009-09-02  Kevin Ollivier  <kevino@theolliviers.com>
 
19429         Build fix for building on Windows.
 
19431         * wtf/ThreadingPthreads.cpp:
 
19433 2009-09-02  Norbert Leser  <norbert.leser@nokia.com>
 
19435         Reviewed by Eric Seidel.
 
19437         Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled
 
19439         RegisterFile constructor currently throws #error when both
 
19440         MMAP and VIRTUALALLOC conditions fail.
 
19441         On any platform that does not provide these features
 
19442         (for instance, Symbian),
 
19443         the fallback should be regular malloc (or fastMalloc).
 
19444         It is functionally equivalent in this case, even though it may
 
19445         have certain drawbacks such as lack of dynamic pre-allocation.
 
19447         * interpreter/RegisterFile.cpp:
 
19448         (JSC::RegisterFile::~RegisterFile):
 
19449         * interpreter/RegisterFile.h:
 
19450         (JSC::RegisterFile::RegisterFile):
 
19452 2009-08-31  Robert Agoston  <Agoston.Robert@stud.u-szeged.hu>
 
19454         Reviewed by Gavin Barraclough.
 
19457         https://bugs.webkit.org/show_bug.cgi?id=28691
 
19460         (JSC::Parser::parse):
 
19462 2009-08-27  Oliver Hunt  <oliver@apple.com>
 
19464         Reviewed by Maciej Stachowiak.
 
19466         JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects
 
19467         https://bugs.webkit.org/show_bug.cgi?id=28797
 
19469         Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception
 
19470         checks, and corrected the logic in gap to correctly convert Number and String objects.
 
19472         * runtime/JSONObject.cpp:
 
19473         (JSC::unwrapBoxedPrimitive):
 
19475         (JSC::Stringifier::Stringifier):
 
19476         (JSC::Stringifier::appendStringifiedValue):
 
19478 2009-08-27  Oliver Hunt  <oliver@apple.com>
 
19480         Reviewed by Adam Roben.
 
19482         JSON.stringify replacer array does not accept values that are not string primitives.
 
19483         https://bugs.webkit.org/show_bug.cgi?id=28788
 
19485         Update the JSON stringifier to initialise its replacer array according to the most
 
19486         recent version of the spec.
 
19488         * runtime/Identifier.h:
 
19489         (JSC::Identifier::from):
 
19490         * runtime/JSONObject.cpp:
 
19491         (JSC::Stringifier::Stringifier):
 
19493 2009-08-27  Alexey Proskuryakov  <ap@apple.com>
 
19495         Reviewed by Oliver Hunt.
 
19497         https://bugs.webkit.org/show_bug.cgi?id=28753
 
19498         <rdar://problem/7173448> Excessive number of threads (and a crash)
 
19500         * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement
 
19501         and return the new value. Also added using directives for these functions, to match
 
19504 2009-08-27  Brent Fulgham  <bfulgham@webkit.org>
 
19506         Reviewed by Adam Roben.
 
19508         Link the testapi against CFLite when building the WinCairo port.
 
19510         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite
 
19511           target.  Update all targets to inherit from either the
 
19512           JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops
 
19513           file (WinCairo target).
 
19514         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove
 
19515           input file CoreFoundation.lib. This is provided by either the
 
19516           JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file.
 
19518 2009-08-27  Steve Falkenburg  <sfalken@apple.com>
 
19520         Reviewed by Geoff Garen.
 
19522         Fix Windows-specific crash due to missing memory clearing call.
 
19524         * runtime/Collector.cpp:
 
19525         (JSC::Heap::allocateBlock):
 
19527 2009-08-27  Brent Fulgham  <bfulgham@webkit.org>
 
19529         Build fix: JavaScriptCore_debug.def missing some exports.  Apple
 
19530         Windows build does not use this file, so it was not noticed previously.
 
19532         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
19534 2009-08-27  Gavin Barraclough  <barraclough@apple.com>
 
19536         Reviewed by Oliver Hunt.
 
19538         x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
 
19539         https://bugs.webkit.org/show_bug.cgi?id=28317
 
19541         Missed one, fix part II.
 
19543         * assembler/MacroAssemblerX86Common.h:
 
19544         (JSC::MacroAssemblerX86Common::move):
 
19545         * assembler/X86Assembler.h:
 
19546         (JSC::CAN_SIGN_EXTEND_8_32):
 
19548 2009-08-27  Oliver Hunt  <oliver@apple.com>
 
19550         Reviewed by Adam Roben.
 
19552         JSON.stringify replacer array does not accept values that are not string primitives.
 
19553         https://bugs.webkit.org/show_bug.cgi?id=28788
 
19555         Update the JSON stringifier to initialise its replacer array according to the most
 
19556         recent version of the spec.
 
19558         * runtime/Identifier.h:
 
19559         (JSC::Identifier::from):
 
19560         * runtime/JSONObject.cpp:
 
19561         (JSC::Stringifier::Stringifier):
 
19563 2009-08-27  Oliver Hunt  <oliver@apple.com>
 
19565         Reviewed by Alexey Proskuryakov.
 
19567         JSON parser accepts trailing comma in array literals
 
19568         https://bugs.webkit.org/show_bug.cgi?id=28779
 
19570         Update parser to correctly fail if there's a trailing comma.
 
19572         * runtime/LiteralParser.cpp:
 
19573         (JSC::LiteralParser::parse):
 
19575 2009-08-26  Oliver Hunt  <oliver@apple.com>
 
19577         Reviewed by Gavin Barraclough.
 
19579         'this' in JSON.parse reviver is the global object
 
19580         https://bugs.webkit.org/show_bug.cgi?id=28752
 
19582         This is a technically simple change, we merely update the code for calling
 
19583         the reviver function to pass the correct this object.  Doing so however
 
19584         exposes the holder to arbitrary mutation by the reviver function so it is
 
19585         necessary for us to now guard all property accesses against the possibility
 
19588         * runtime/JSArray.h:
 
19589           JSON needs to delete a property from the array, so we friend its 
 
19590           Walker class so that we can make a non-virtual call to the arrays
 
19591           delete and getOwnPropertySlot methods.
 
19592         * runtime/JSONObject.cpp:
 
19593         (JSC::Walker::callReviver):
 
19594           We need to pass the correct this object
 
19595         (JSC::Walker::walk):
 
19596           Update calls to callReviver, and update property logic logic
 
19597           to correctly handle the holder being mutated by the reviver
 
19600 2009-08-26  Alice Liu  <alice.liu@apple.com>
 
19602         Windows build fix: added some exported symbols
 
19604         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
19605         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
19607 2009-08-26  Geoffrey Garen  <ggaren@apple.com>
 
19609         Windows build fix: Removed some exported symbols that no longer exist.
 
19611         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
19612         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
19614 2009-08-26  Gavin Barraclough  <barraclough@apple.com>
 
19616         Reviewed by Olliejver Hunt.
 
19618         x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
 
19619         https://bugs.webkit.org/show_bug.cgi?id=28317
 
19621         We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page,
 
19622         so pointers are never representable as a 32-bit integer, and always have to be represented by
 
19623         a separate immediate load instruction, rather than within the immediate field of an arithmetic
 
19624         or memory operation.
 
19626         We explicitly check for a couple of cases where a value might be representable in 32-bit, but
 
19627         these probably never kick in on Mac OS, and only kick in to hose GTK.  Deleting these does not
 
19628         show a performance degradation on SunSpider.  Remove.
 
19630         * assembler/MacroAssemblerX86_64.h:
 
19631         (JSC::MacroAssemblerX86_64::storePtr):
 
19632         (JSC::MacroAssemblerX86_64::branchPtr):
 
19634 2009-08-26  Geoffrey Garen  <ggaren@apple.com>
 
19636         Reviewed by Oliver Hunt.
 
19638         A bit of Collector refatoring.
 
19640         SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay).
 
19642         * JavaScriptCore.exp:
 
19644         * runtime/JSCell.cpp:
 
19645         (JSC::JSCell::toPrimitive):
 
19646         (JSC::JSCell::getPrimitiveNumber):
 
19647         (JSC::JSCell::toBoolean):
 
19648         (JSC::JSCell::toNumber):
 
19649         (JSC::JSCell::toString):
 
19650         (JSC::JSCell::toObject): Removed pure virtual functions from
 
19651         JSCell, so the collector can construct one. This allowed
 
19652         me to remove a bunch of ASSERT_NOT_REACHED throughout the
 
19655         * runtime/JSCell.h:
 
19656         (JSC::JSCell::JSCell): ditto
 
19657         (JSC::Heap::heap): Inlined this function because it's trivial.
 
19659         * JavaScriptCore.exp:
 
19661         * runtime/Collector.cpp:
 
19662         (JSC::Heap::destroy):
 
19663         (JSC::Heap::allocateBlock):
 
19664         (JSC::Heap::freeBlock):
 
19665         (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since
 
19666         it doesn't actually free the Heap object.
 
19667         (JSC::Heap::heapAllocate):
 
19668         (JSC::Heap::sweep):
 
19669         * runtime/Collector.h: Refactored block allocation and destruction
 
19670         into helper functions.
 
19672         * runtime/GetterSetter.cpp:
 
19673         * runtime/JSAPIValueWrapper.cpp:
 
19674         * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations
 
19675         of pure virtual functions. (See above.)
 
19677 === End re-roll-in of r47738:47740 with Windows crash fixed ===
 
19679 2009-08-26  Geoffrey Garen  <ggaren@apple.com>
 
19681         Build fix: start out with a 32-bit value to avoid a shortening warning.
 
19683         * runtime/Collector.cpp:
 
19684         (JSC::Heap::sweep):
 
19686 2009-08-24  Geoffrey Garen  <ggaren@apple.com>
 
19688         Reviewed by Oliver Hunt.
 
19690         Substantially reduced VM thrash in the GC heap.
 
19692         1.08x faster on v8 (1.60x faster on v8-splay).
 
19694         1.40x faster on bench-alloc-nonretained.
 
19696         1.90x faster on bench-alloc-retained.
 
19698         SunSpider says no change.
 
19700         * runtime/Collector.cpp:
 
19701         (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local
 
19702         variables unconditionally after calling collect(), since they may be used
 
19703         even if we don't "goto scan". (In the bug I saw, usedBlocks got out of
 
19704         sync with heap.usedBlocks).
 
19705         (JSC::Heap::sweep): Keep enough free heap space to accomodate 
 
19706         the number of objects we'll allocate before the next GC, plus 25%, for
 
19708         * runtime/Collector.h: Bumped the block size to 256k. This seems to give
 
19709         the best cache performance, and it prevents us from initiating lots of
 
19710         VM traffic to recover very small chunks of memory.
 
19712 === Begin re-roll-in of r47738:47740 with Windows crash fixed ===
 
19714 2009-08-25  Drew Wilson  <atwilson@google.com>
 
19716         Reviewed by David Levin.
 
19718         postMessage() spec now supports sending arrays of ports
 
19719         https://bugs.webkit.org/show_bug.cgi?id=26902
 
19721         Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors.
 
19723         * wtf/VectorTraits.h:
 
19725 2009-08-26  Xan Lopez  <xlopez@igalia.com>
 
19727         Rubber-stamped by Gustavo Noronha.
 
19729         Remove duplicated files from file list.
 
19733 2009-08-26  Oliver Hunt  <oliver@apple.com>
 
19735         Reviewed by NOBODY (Build fix).
 
19739         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
19740         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
19742 2009-08-26  Oliver Hunt  <oliver@apple.com>
 
19744         Reviewed by NOBODY (Build fix).
 
19746         Hopefully fix all the exports from JSC on windows
 
19748         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
19749         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
19751 2009-08-26  Oliver Hunt  <oliver@apple.com>
 
19753         Reviewed by NOBODY (Build fixes).
 
19755         Forgot I added files to JavaScriptCore. 
 
19758         * JavaScriptCore.gypi:
 
19759         * JavaScriptCore.pri:
 
19760         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
19761         * JavaScriptCoreSources.bkl:
 
19763 2009-08-25  Oliver Hunt  <oliver@apple.com>
 
19765         Reviewed by Gavin Barraclough.
 
19767         [ES5] Implement getOwnPropertyDescriptor
 
19768         https://bugs.webkit.org/show_bug.cgi?id=28724
 
19770         Implement the core runtime support for getOwnPropertyDescriptor.
 
19771         This adds a virtual getOwnPropertyDescriptor method to every class
 
19772         that implements getOwnPropertySlot that shadows the behaviour of
 
19773         getOwnPropertySlot.  The alternative would be to make getOwnPropertySlot
 
19774         (or PropertySlots in general) provide property attribute information,
 
19775         but quick testing showed this to be a regression.
 
19777         * JavaScriptCore.exp:
 
19778         * JavaScriptCore.xcodeproj/project.pbxproj:
 
19779         * runtime/Arguments.cpp:
 
19780         (JSC::Arguments::getOwnPropertyDescriptor):
 
19781         * runtime/Arguments.h:
 
19782         * runtime/ArrayPrototype.cpp:
 
19783         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
 
19784         * runtime/ArrayPrototype.h:
 
19785         * runtime/CommonIdentifiers.h:
 
19786         * runtime/DatePrototype.cpp:
 
19787         (JSC::DatePrototype::getOwnPropertyDescriptor):
 
19788         * runtime/DatePrototype.h:
 
19789         * runtime/JSArray.cpp:
 
19790         (JSC::JSArray::getOwnPropertyDescriptor):
 
19791         * runtime/JSArray.h:
 
19792         * runtime/JSByteArray.cpp:
 
19793         (JSC::JSByteArray::getOwnPropertyDescriptor):
 
19794         * runtime/JSByteArray.h:
 
19795         * runtime/JSFunction.cpp:
 
19796         (JSC::JSFunction::getOwnPropertyDescriptor):
 
19797         * runtime/JSFunction.h:
 
19798         * runtime/JSGlobalObject.h:
 
19799         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
 
19800         * runtime/JSNotAnObject.cpp:
 
19801         (JSC::JSNotAnObject::getOwnPropertyDescriptor):
 
19802         * runtime/JSNotAnObject.h:
 
19803         * runtime/JSONObject.cpp:
 
19804         (JSC::JSONObject::getOwnPropertySlot):
 
19805         (JSC::JSONObject::getOwnPropertyDescriptor):
 
19806         * runtime/JSONObject.h:
 
19807         * runtime/JSObject.cpp:
 
19808         (JSC::JSObject::getOwnPropertyDescriptor):
 
19809         (JSC::JSObject::getPropertyDescriptor):
 
19810         * runtime/JSObject.h:
 
19811         * runtime/JSString.cpp:
 
19812         (JSC::JSString::getStringPropertyDescriptor):
 
19813         (JSC::JSString::getOwnPropertyDescriptor):
 
19814         * runtime/JSString.h:
 
19815         * runtime/JSVariableObject.cpp:
 
19816         (JSC::JSVariableObject::symbolTableGet):
 
19817         * runtime/JSVariableObject.h:
 
19818         * runtime/Lookup.h:
 
19819         (JSC::getStaticPropertyDescriptor):
 
19820         (JSC::getStaticFunctionDescriptor):
 
19821         (JSC::getStaticValueDescriptor):
 
19822           Add property descriptor equivalents of the lookup
 
19823           table access functions
 
19825         * runtime/MathObject.cpp:
 
19826         (JSC::MathObject::getOwnPropertySlot):
 
19827         (JSC::MathObject::getOwnPropertyDescriptor):
 
19828         * runtime/MathObject.h:
 
19829         * runtime/NumberConstructor.cpp:
 
19830         (JSC::NumberConstructor::getOwnPropertyDescriptor):
 
19831         * runtime/NumberConstructor.h:
 
19832         * runtime/ObjectConstructor.cpp:
 
19833         (JSC::ObjectConstructor::ObjectConstructor):
 
19834         (JSC::objectConstructorGetOwnPropertyDescriptor):
 
19835         * runtime/PropertyDescriptor.cpp: Added.
 
19836         (JSC::PropertyDescriptor::writable):
 
19837         (JSC::PropertyDescriptor::enumerable):
 
19838         (JSC::PropertyDescriptor::configurable):
 
19839         (JSC::PropertyDescriptor::hasAccessors):
 
19840         (JSC::PropertyDescriptor::setUndefined):
 
19841         (JSC::PropertyDescriptor::getter):
 
19842         (JSC::PropertyDescriptor::setter):
 
19843         (JSC::PropertyDescriptor::setDescriptor):
 
19844         (JSC::PropertyDescriptor::setAccessorDescriptor):
 
19845         * runtime/PropertyDescriptor.h: Added.
 
19846         (JSC::PropertyDescriptor::PropertyDescriptor):
 
19847         (JSC::PropertyDescriptor::attributes):
 
19848         (JSC::PropertyDescriptor::isValid):
 
19849         (JSC::PropertyDescriptor::value):
 
19850         * runtime/RegExpConstructor.cpp:
 
19851         (JSC::RegExpConstructor::getOwnPropertyDescriptor):
 
19852         * runtime/RegExpConstructor.h:
 
19853         * runtime/RegExpMatchesArray.h:
 
19854         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
 
19855         * runtime/RegExpObject.cpp:
 
19856         (JSC::RegExpObject::getOwnPropertyDescriptor):
 
19857         * runtime/RegExpObject.h:
 
19858         * runtime/StringObject.cpp:
 
19859         (JSC::StringObject::getOwnPropertyDescriptor):
 
19860         * runtime/StringObject.h:
 
19861         * runtime/StringPrototype.cpp:
 
19862         (JSC::StringPrototype::getOwnPropertyDescriptor):
 
19863         * runtime/StringPrototype.h:
 
19865 2009-08-24  Gavin Barraclough  <barraclough@apple.com>
 
19867         Reviewed by Darin Adler.
 
19869         How many copies of the parameters do you need?
 
19870         https://bugs.webkit.org/show_bug.cgi?id=28701
 
19872         The function parameters in JSC get copied a lot - and unnecessarily so.
 
19874         Originally this happened due to duplicating FunctionBodyNodes on recompilation,
 
19875         though the problem has been exacerbated by copying the parameters from the
 
19876         original function body onto the executable, then back onto the real body that
 
19877         will be generated (this happens on every function).  And this is all made worse
 
19878         since the data structures in question are a little ugly - C style arrays of C++
 
19879         objects containing ref counts, so they need a full copy-construct (rather than
 
19882         This can all be greatly simplified by just punting the parameters off into
 
19883         their own ref-counted object, and forgoing all the copying.
 
19885         ~no performance change, possible slight progression.
 
19887         * bytecompiler/BytecodeGenerator.cpp:
 
19888         (JSC::BytecodeGenerator::BytecodeGenerator):
 
19889         * bytecompiler/BytecodeGenerator.h:
 
19890         (JSC::BytecodeGenerator::makeFunction):
 
19891         * parser/Nodes.cpp:
 
19892         (JSC::FunctionParameters::FunctionParameters):
 
19893         (JSC::FunctionBodyNode::FunctionBodyNode):
 
19894         (JSC::FunctionBodyNode::finishParsing):
 
19896         (JSC::FunctionBodyNode::parameters):
 
19897         (JSC::FunctionBodyNode::parameterCount):
 
19898         * runtime/Executable.cpp:
 
19899         (JSC::FunctionExecutable::~FunctionExecutable):
 
19900         (JSC::FunctionExecutable::compile):
 
19901         (JSC::FunctionExecutable::reparseExceptionInfo):
 
19902         (JSC::FunctionExecutable::fromGlobalCode):
 
19903         (JSC::FunctionExecutable::paramString):
 
19904         * runtime/Executable.h:
 
19905         (JSC::FunctionExecutable::FunctionExecutable):
 
19906         (JSC::FunctionExecutable::parameterCount):
 
19908 2009-08-25  Brent Fulgham  <bfulgham@webkit.org>
 
19910         Reviewed by NOBODY (Buildfix).
 
19912         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target
 
19913           that inherits from the debug_wincairo property sheet and therefore
 
19914           links to the proper debug library.
 
19915         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target
 
19916           that inherits from the debug_wincairo property sheet and therefore
 
19917           links to the proper debug library.
 
19919 2009-08-25  Chris Marrin  <cmarrin@apple.com>
 
19921         Reviewed by Simon Fraser.
 
19923         Export tryFastMalloc for Canvas3D work
 
19924         https://bugs.webkit.org/show_bug.cgi?id=28018
 
19926         * JavaScriptCore.exp:
 
19928 2009-08-25  David Levin  <levin@chromium.org>
 
19930         Reviewed by Adam Roben.
 
19932         PLATFORM(CFNETWORK) should be USE(CFNETWORK).
 
19933         https://bugs.webkit.org/show_bug.cgi?id=28713
 
19935         * wtf/Platform.h: Added a #define to catch this issue in the
 
19936         future. The define would generate an error on gcc without the
 
19937         space in the expansion, but Visual C++ needs the space to cause an error.
 
19939 2009-08-24  Brent Fulgham  <bfulgham@webkit.org>
 
19941         Reviewed by Steve Falkenburg.
 
19943         Revise CFLite Debug build to emit DLL's with _debug label.
 
19944         https://bugs.webkit.org/show_bug.cgi?id=28695.
 
19946         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify
 
19947           Cairo debug build to inherit from new debug_cairo property sheet.
 
19948         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops:
 
19949           Modify to look for debug CFLite when in debug build.
 
19951 2009-08-24  Gavin Barraclough  <barraclough@apple.com>
 
19953         Reviewed by Oliver Adler & Darin Hunt.
 
19955         https://bugs.webkit.org/show_bug.cgi?id=28691
 
19956         Do not retain ScopeNodes outside of parsing
 
19958         There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types.
 
19960         * bytecode/EvalCodeCache.h:
 
19961         (JSC::EvalCodeCache::get):
 
19962         * bytecompiler/BytecodeGenerator.cpp:
 
19963         (JSC::BytecodeGenerator::BytecodeGenerator):
 
19964         (JSC::BytecodeGenerator::emitNewFunction):
 
19965         (JSC::BytecodeGenerator::emitNewFunctionExpression):
 
19966         * bytecompiler/BytecodeGenerator.h:
 
19967         (JSC::BytecodeGenerator::makeFunction):
 
19968         * debugger/Debugger.cpp:
 
19969         (JSC::Debugger::recompileAllJSFunctions):
 
19970         (JSC::evaluateInGlobalCallFrame):
 
19971         * debugger/DebuggerCallFrame.cpp:
 
19972         (JSC::DebuggerCallFrame::evaluate):
 
19973         * interpreter/Interpreter.cpp:
 
19974         (JSC::Interpreter::execute):
 
19975         (JSC::Interpreter::prepareForRepeatCall):
 
19976         (JSC::Interpreter::privateExecute):
 
19977         * jit/JITStubs.cpp:
 
19978         (JSC::DEFINE_STUB_FUNCTION):
 
19979         * parser/Nodes.cpp:
 
19980         (JSC::ScopeNodeData::ScopeNodeData):
 
19981         (JSC::ProgramNode::create):
 
19982         (JSC::EvalNode::create):
 
19983         (JSC::FunctionBodyNode::create):
 
19985         (JSC::ScopeNode::adoptData):
 
19986         (JSC::FunctionBodyNode::parameterCount):
 
19987         * parser/Parser.cpp:
 
19989         (JSC::Parser::arena):
 
19990         (JSC::Parser::Parser):
 
19991         (JSC::Parser::parse):
 
19992         * runtime/ArrayPrototype.cpp:
 
19993         (JSC::isNumericCompareFunction):
 
19994         (JSC::arrayProtoFuncSort):
 
19995         * runtime/Completion.cpp:
 
19996         (JSC::checkSyntax):
 
19998         * runtime/Executable.cpp:
 
19999         (JSC::FunctionExecutable::~FunctionExecutable):
 
20000         (JSC::EvalExecutable::compile):
 
20001         (JSC::ProgramExecutable::checkSyntax):
 
20002         (JSC::ProgramExecutable::compile):
 
20003         (JSC::FunctionExecutable::compile):
 
20004         (JSC::EvalExecutable::generateJITCode):
 
20005         (JSC::ProgramExecutable::generateJITCode):
 
20006         (JSC::FunctionExecutable::generateJITCode):
 
20007         (JSC::FunctionExecutable::reparseExceptionInfo):
 
20008         (JSC::EvalExecutable::reparseExceptionInfo):
 
20009         (JSC::FunctionExecutable::recompile):
 
20010         (JSC::FunctionExecutable::fromGlobalCode):
 
20011         (JSC::FunctionExecutable::copyParameters):
 
20012         (JSC::FunctionExecutable::paramString):
 
20013         * runtime/Executable.h:
 
20014         (JSC::ScriptExecutable::ScriptExecutable):
 
20015         (JSC::ScriptExecutable::sourceID):
 
20016         (JSC::ScriptExecutable::sourceURL):
 
20017         (JSC::ScriptExecutable::lineNo):
 
20018         (JSC::ScriptExecutable::lastLine):
 
20019         (JSC::ScriptExecutable::usesEval):
 
20020         (JSC::ScriptExecutable::usesArguments):
 
20021         (JSC::ScriptExecutable::needsActivation):
 
20022         (JSC::ScriptExecutable::recordParse):
 
20023         (JSC::EvalExecutable::bytecode):
 
20024         (JSC::EvalExecutable::jitCode):
 
20025         (JSC::ProgramExecutable::bytecode):
 
20026         (JSC::ProgramExecutable::reparseExceptionInfo):
 
20027         (JSC::ProgramExecutable::jitCode):
 
20028         (JSC::FunctionExecutable::FunctionExecutable):
 
20029         (JSC::FunctionExecutable::make):
 
20030         (JSC::FunctionExecutable::bytecode):
 
20031         (JSC::FunctionExecutable::isGenerated):
 
20032         (JSC::FunctionExecutable::name):
 
20033         (JSC::FunctionExecutable::parameterCount):
 
20034         (JSC::FunctionExecutable::jitCode):
 
20035         * runtime/FunctionConstructor.cpp:
 
20036         (JSC::constructFunction):
 
20037         * runtime/JSGlobalData.cpp:
 
20038         (JSC::JSGlobalData::numericCompareFunction):
 
20039         * runtime/JSGlobalObjectFunctions.cpp:
 
20040         (JSC::globalFuncEval):
 
20042 2009-08-24  Darin Adler  <darin@apple.com>
 
20044         * runtime/ObjectPrototype.cpp:
 
20045         (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot
 
20046         to land. Leave out the branch, since we don't need one.
 
20048 2009-08-24  Darin Adler  <darin@apple.com>
 
20050         Reviewed by Geoff Garen.
 
20052         Array index miss case creates a string every time
 
20053         https://bugs.webkit.org/show_bug.cgi?id=28664
 
20055         SunSpider test results I saw:
 
20057             0.5% faster overall
 
20058             1% faster on crypto-aes
 
20059             20% faster on crypto-md5
 
20060             13% faster on crypto-sha1
 
20062         * runtime/ObjectPrototype.cpp:
 
20063         (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names
 
20065         (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new
 
20066         property has a name that is the string form of a UInt32.
 
20067         (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot
 
20068         if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true.
 
20070         * runtime/ObjectPrototype.h: Added declarations for the above.
 
20072 2009-08-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
20074         Unreviewed. Fix a typo in my distcheck build fix.
 
20078 2009-08-23  Gustavo Noronha Silva  <gns@gnome.org>
 
20080         Unreviewed build fix for make distcheck.
 
20082         * GNUmakefile.am: Added files required for the build.
 
20084 2009-08-22  Maciej Stachowiak  <mjs@apple.com>
 
20086         Reviewed by Mark Rowe.
 
20088         REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC
 
20089         https://bugs.webkit.org/show_bug.cgi?id=28655
 
20091         * runtime/JSFunction.cpp:
 
20092         (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable.
 
20095 2009-08-22  Darin Adler  <darin@apple.com>
 
20097         Fix storage leak from syntax tree arena allocation patch.
 
20099         * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable
 
20100         because it has a vector.
 
20102 2009-08-21  Darin Adler  <darin@apple.com>
 
20106         * parser/Nodes.cpp:
 
20107         (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again.
 
20108         This is used outside Nodes.cpp so can't be inline unless
 
20109         it is in the header.
 
20111 2009-08-21  Darin Adler  <darin@apple.com>
 
20113         Two loose ends from the last commit.
 
20115         * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h
 
20116         and create_hash_table project-internal instead of "private".
 
20117         * runtime/Executable.h: Removed accidentally-added constructor.
 
20119 2009-08-21  Darin Adler  <darin@apple.com>
 
20121         Reviewed by Gavin Barraclough.
 
20123         Syntax tree nodes should use arena allocation
 
20124         https://bugs.webkit.org/show_bug.cgi?id=25674
 
20126         Use an actual arena now. 0.6% speedup on SunSpider.
 
20128         New and improved with 100% less leaking of the universe.
 
20130         * JavaScriptCore.exp:
 
20131         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
20132         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
20133         Removed all exports involving the class FunctionBodyNode, which no
 
20134         longer needs to be used outside JavaScriptCore.
 
20136         * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and
 
20137         Executable.h project-internal instead of "private".
 
20139         * bytecompiler/BytecodeGenerator.cpp:
 
20140         (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack
 
20141         contains const Identifier* now.
 
20143         * parser/Grammar.y: Made identifiers from the lexer be const
 
20144         Identifier* and updated since VarStack contains const Identifier* now.
 
20146         * parser/Lexer.cpp:
 
20147         (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
 
20148         (JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
 
20149         and changed to call ParserArena.
 
20150         (JSC::Lexer::clear): Removed the code to manage m_identifiers and
 
20151         added code to set m_arena to 0.
 
20152         * parser/Lexer.h: Updated for changes above.
 
20154         * parser/NodeConstructors.h:
 
20155         (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
 
20157         (JSC::ParserArenaDeletable::operator new): Changed to call the
 
20158         allocateDeletable function on the arena instead of deleteWithArena.
 
20159         (JSC::PropertyNode::PropertyNode): Added new constructor that makes
 
20160         numeric identifiers. Some day we might want to optimize this for
 
20161         integers so it doesn't create a string for each one.
 
20162         (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
 
20163         since it's now a const Identifier& so it can't be left uninitialized.
 
20164         (JSC::BreakNode::BreakNode): Ditto.
 
20165         (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
 
20166         to keep track of the statements rather than a separate statement vector.
 
20167         (JSC::BlockNode::BlockNode): Ditto.
 
20168         (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.
 
20170         * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
 
20171         It seemed strangely out of place in the header.
 
20172         (JSC::ThrowableExpressionData::emitThrowError): Added an overload for
 
20173         UString as well as Identifier.
 
20174         (JSC::SourceElements::singleStatement): Added.
 
20175         (JSC::SourceElements::lastStatement): Added.
 
20176         (JSC::RegExpNode::emitBytecode): Changed the throwError code to use
 
20177         the substitution mechanism instead of doing a string append.
 
20178         (JSC::SourceElements::emitBytecode): Added. Replaces the old
 
20179         statementListEmitCode function, since we now keep the SourceElements
 
20181         (JSC::BlockNode::lastStatement): Added.
 
20182         (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
 
20183         statementListEmitCode.
 
20184         (JSC::CaseClauseNode::emitBytecode): Added.
 
20185         (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
 
20186         instead of statementListEmitCode.
 
20187         (JSC::ScopeNodeData::ScopeNodeData): Changed to store the
 
20188         SourceElements* instead of using releaseContentsIntoVector.
 
20189         (JSC::ScopeNode::emitStatementsBytecode): Added.
 
20190         (JSC::ScopeNode::singleStatement): Added.
 
20191         (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
 
20192         of statementListEmitCode.
 
20193         (JSC::EvalNode::emitBytecode): Ditto.
 
20194         (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
 
20195         insetad of statementListEmitCode and check for the return node using
 
20198         * parser/Nodes.h: Changed VarStack to store const Identifier* instead
 
20199         of Identifier and rely on the arena to control lifetime. Added a new
 
20200         ParserArenaFreeable class. Made ParserArenaDeletable inherit from
 
20201         FastAllocBase instead of having its own operator new. Base the Node
 
20202         class on ParserArenaFreeable. Changed the various Node classes
 
20203         to use const Identifier& instead of Identifier to avoid the need to
 
20204         call their destructors and allow them to function as "freeable" in the
 
20205         arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
 
20206         Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
 
20207         CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
 
20208         as a base class since they do not descend from Node. Eliminated the
 
20209         StatementVector type and instead have various classes use SourceElements*
 
20210         instead of StatementVector. This prevents those classes from having to
 
20211         use ParserArenaDeletable to make sure the vector destructor is called.
 
20213         * parser/Parser.cpp:
 
20214         (JSC::Parser::parse): Pass the arena to the lexer.
 
20216         * parser/Parser.h: Added an include of ParserArena.h, which is no longer
 
20217         included by Nodes.h.
 
20218         (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the
 
20219         singleStatement function, since there is no longer any children function.
 
20220         Removed some unneeded use of RefPtr.
 
20222         * parser/ParserArena.cpp:
 
20223         (JSC::ParserArena::ParserArena): Added. Initializes the new members,
 
20224         m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
 
20225         (JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
 
20226         since we store only the current pointer and the end of pool pointer.
 
20227         (JSC::ParserArena::deallocateObjects): Added. Contains the common
 
20228         memory-deallocation logic used by both the destructor and the
 
20230         (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
 
20231         (JSC::ParserArena::reset): Ditto. Also added code to zero out the
 
20232         new structures, and switched to use clear() instead of shrink(0) since
 
20233         we don't really reuse arenas.
 
20234         (JSC::ParserArena::makeNumericIdentifier): Added.
 
20235         (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
 
20237         (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
 
20238         since this is used only for assertions at the moment.
 
20239         (JSC::ParserArena::derefWithArena): Make non-inline.
 
20241         * parser/ParserArena.h: Added an actual arena of "freeable" objects,
 
20242         ones that don't need destructors to be called. Also added a separate
 
20243         IdentifierArena object, a segmented vector of identifiers that used
 
20244         to be in the Lexer.
 
20246         * runtime/Executable.h: Moved the definition of the
 
20247         FunctionExecutable::make function here. It can't go in JSFunction.h
 
20248         since that header has to be used outside JavaScriptCore and so can't
 
20249         include this, which includes Nodes.h. The function could be moved
 
20250         elswhere if we don't want to include JSFunction.h in this header, but
 
20251         for now this seems to be the best place.
 
20253         * runtime/JSFunction.h: Removed the include of Executable.h and
 
20254         definition of the FunctionExecutable::make function.
 
20256         * wtf/FastMalloc.cpp: Fixed an incorrect comment.
 
20258 2009-08-21  Mark Rowe  <mrowe@apple.com>
 
20260         Fix the non-JIT build.
 
20262         * runtime/Executable.cpp:
 
20263         * runtime/Executable.h:
 
20265 2009-08-21  Gavin Barraclough  <barraclough@apple.com>
 
20267         Speculative QuickTime build fix.
 
20269         * runtime/JSArray.cpp:
 
20271 2009-08-21  Gavin Barraclough  <barraclough@apple.com>
 
20273         Speculative QT build fix.
 
20275         * runtime/StringPrototype.cpp:
 
20277 2009-08-21  Gavin Barraclough  <barraclough@apple.com>
 
20279         Reviewed by Oliver Hunt.
 
20281         Restructure Executable types so that host functions do not hold a FunctionExecutable.
 
20282         https://bugs.webkit.org/show_bug.cgi?id=28621
 
20284         All JSFunction objects have a pointer to an Executable*.  This is currently always a
 
20285         FunctionExecutable, however this has a couple of drawbacks.  Host functions do not
 
20286         store a range of information that the FunctionExecutable provides (source, name,
 
20287         CodeBlock & information presently held on the FunctionBodyNode). 
 
20289         [ * nearly all... see below! ]
 
20291         Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific
 
20292         to JS sourced executable types (source, node) into a new subclass (ScriptExecutable),
 
20293         and create a new NativeExecutable type.  We now provide a new method in JSFunction
 
20294         to access & downcast to FunctionExecutable, but in doing so we can make an early
 
20295         check (with an ASSERT) to ensure that the Executable read from a function will only
 
20296         be treated as a FunctionExecutable (and thus the JS sepcific fields will only be
 
20297         accessed) if the JSFunction is not a host function.
 
20299         There is one JSFunction that currently does not have an Executable, which is the
 
20300         object created to allow us to read out the vtable pointer.  By making this change
 
20301         we can also add a new Executable type fror this object (VPtrHackExecutable).
 
20302         Since this means that really all JSFunctions have an Executable we no longer have
 
20303         to null-check m_executable before us it - particularly in isHostFunction().
 
20305         This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase
 
20306         can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase
 
20307         that might be a FunctionExecutable or a NativeExecutable.  This does now mean that all
 
20308         ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be
 
20309         ref-counted, however this seems less-bad than host functions unnecessarily providing
 
20310         interface to access non-host specific information.
 
20312         The class hierarcy has changed from this:
 
20315             - ProgramExecutable
 
20317                 - CacheableEvalExecutable (also RefCounted by multiple-inheritance)
 
20318             - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions)
 
20325                 - VPtrHackExecutable
 
20327                     - ProgramExecutable
 
20329                     - FunctionExecutable
 
20331         This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()).
 
20333         * bytecode/CodeBlock.cpp:
 
20334         (JSC::CodeBlock::CodeBlock):
 
20335         * bytecode/CodeBlock.h:
 
20336         (JSC::CodeBlock::ownerExecutable):
 
20337         (JSC::GlobalCodeBlock::GlobalCodeBlock):
 
20338         * bytecode/EvalCodeCache.h:
 
20339         (JSC::EvalCodeCache::get):
 
20340         * debugger/Debugger.cpp:
 
20341         (JSC::Debugger::recompileAllJSFunctions):
 
20342         * interpreter/CachedCall.h:
 
20343         (JSC::CachedCall::CachedCall):
 
20344         * interpreter/Interpreter.cpp:
 
20345         (JSC::Interpreter::callEval):
 
20346         (JSC::Interpreter::privateExecute):
 
20347         * jit/JITStubs.cpp:
 
20348         (JSC::DEFINE_STUB_FUNCTION):
 
20349         * profiler/Profiler.cpp:
 
20350         (JSC::createCallIdentifierFromFunctionImp):
 
20351         * runtime/Arguments.h:
 
20352         (JSC::Arguments::getArgumentsData):
 
20353         (JSC::Arguments::Arguments):
 
20354         * runtime/Executable.cpp:
 
20355         (JSC::NativeExecutable::~NativeExecutable):
 
20356         (JSC::VPtrHackExecutable::~VPtrHackExecutable):
 
20357         * runtime/Executable.h:
 
20358         (JSC::ExecutableBase::ExecutableBase):
 
20359         (JSC::ExecutableBase::~ExecutableBase):
 
20360         (JSC::ExecutableBase::isHostFunction):
 
20361         (JSC::NativeExecutable::NativeExecutable):
 
20362         (JSC::VPtrHackExecutable::VPtrHackExecutable):
 
20363         (JSC::ScriptExecutable::ScriptExecutable):
 
20364         (JSC::ScriptExecutable::source):
 
20365         (JSC::ScriptExecutable::sourceID):
 
20366         (JSC::ScriptExecutable::sourceURL):
 
20367         (JSC::ScriptExecutable::lineNo):
 
20368         (JSC::ScriptExecutable::lastLine):
 
20369         (JSC::ScriptExecutable::usesEval):
 
20370         (JSC::ScriptExecutable::usesArguments):
 
20371         (JSC::ScriptExecutable::needsActivation):
 
20372         (JSC::EvalExecutable::EvalExecutable):
 
20373         (JSC::EvalExecutable::create):
 
20374         (JSC::ProgramExecutable::ProgramExecutable):
 
20375         (JSC::FunctionExecutable::FunctionExecutable):
 
20376         * runtime/FunctionPrototype.cpp:
 
20377         (JSC::functionProtoFuncToString):
 
20378         * runtime/JSFunction.cpp:
 
20379         (JSC::JSFunction::JSFunction):
 
20380         (JSC::JSFunction::~JSFunction):
 
20381         (JSC::JSFunction::markChildren):
 
20382         (JSC::JSFunction::getCallData):
 
20383         (JSC::JSFunction::call):
 
20384         (JSC::JSFunction::lengthGetter):
 
20385         (JSC::JSFunction::getConstructData):
 
20386         (JSC::JSFunction::construct):
 
20387         * runtime/JSFunction.h:
 
20388         (JSC::JSFunction::executable):
 
20389         (JSC::JSFunction::jsExecutable):
 
20390         (JSC::JSFunction::isHostFunction):
 
20392 2009-08-20  Oliver Hunt  <oliver@apple.com>
 
20394         Reviewed by Maciej Stachowiak.
 
20396         Browser hangs on opening Web Inspector.
 
20397         https://bugs.webkit.org/show_bug.cgi?id=28438
 
20399         Code generation needs to be able to walk the entire scopechain in some
 
20400         cases, however the symbol table used by activations was a member of the
 
20401         codeblock.  Following recompilation this may no longer exist, leading
 
20402         to a crash or hang on lookup.
 
20404         We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable,
 
20405         for the CodeBlocks used by function code.  This allows activations to
 
20406         maintain ownership of a copy of the symbol table even after recompilation so
 
20407         they can continue to work.
 
20409         * bytecode/CodeBlock.cpp:
 
20410         (JSC::CodeBlock::CodeBlock):
 
20411         * bytecode/CodeBlock.h:
 
20412         (JSC::CodeBlock::symbolTable):
 
20413         (JSC::CodeBlock::sharedSymbolTable):
 
20414         (JSC::GlobalCodeBlock::GlobalCodeBlock):
 
20415         (JSC::FunctionCodeBlock::FunctionCodeBlock):
 
20416         (JSC::FunctionCodeBlock::~FunctionCodeBlock):
 
20417         * interpreter/Interpreter.cpp:
 
20418         (JSC::Interpreter::retrieveArguments):
 
20419         * runtime/Executable.cpp:
 
20420         (JSC::EvalExecutable::generateBytecode):
 
20421         (JSC::FunctionExecutable::generateBytecode):
 
20422         (JSC::FunctionExecutable::reparseExceptionInfo):
 
20423         (JSC::EvalExecutable::reparseExceptionInfo):
 
20424         * runtime/JSActivation.h:
 
20425         (JSC::JSActivation::JSActivationData::JSActivationData):
 
20426         (JSC::JSActivation::JSActivationData::~JSActivationData):
 
20427         * runtime/SymbolTable.h:
 
20429 2009-08-20  Xan Lopez  <xlopez@igalia.com>
 
20431         Add new file to GTK+ build.
 
20435 2009-08-20  Geoffrey Garen  <ggaren@apple.com>
 
20437         Reviewed by Maciej Stachowiak.
 
20439         Added a number => string cache.
 
20441         1.07x faster on v8 (1.7x faster on v8-splay).
 
20442         1.004x faster on SunSpider.
 
20444         * runtime/JSCell.h: Moved JSValue::toString to JSString.h.
 
20445         * runtime/JSGlobalData.h: Holds the cache.
 
20446         * runtime/JSNumberCell.cpp:
 
20447         (JSC::JSNumberCell::toString):
 
20448         (JSC::JSNumberCell::toThisString): Removed -0 special case.
 
20449         UString handles this now, since too many clients were
 
20452         * runtime/JSString.h:
 
20453         (JSC::JSValue::toString): Use the cache when converting
 
20454         an int or double to string.
 
20456         * runtime/Operations.h:
 
20457         (JSC::concatenateStrings): Call toString to take advantage
 
20460         * runtime/SmallStrings.h:
 
20461         (JSC::NumericStrings::add):
 
20462         (JSC::NumericStrings::lookup): The cache.
 
20464         * runtime/UString.cpp:
 
20465         (JSC::UString::from): Added -0 special case mentioned above.
 
20466         Removed appendNumeric because it's mutually exclusive with the
 
20469 2009-08-20  Oliver Hunt  <oliver@apple.com>
 
20471         Reviewed by Gavin Barraclough.
 
20473         REGRESSION: fast/profiler/call.html is crashing occasionally
 
20474         https://bugs.webkit.org/show_bug.cgi?id=28476
 
20476         Using the codeblock for information about how many parameters and
 
20477         locals a function has is unsafe in certain circumstances.  The
 
20478         basic scenario is all function code being cleared in response to
 
20479         the debugger or profiler being enabled, and then an activation is
 
20480         marked before its associated function is re-executed.
 
20482         To deal with this scenario we store the variable count of a function
 
20483         directly in the FunctionExecutable, and then use that information.
 
20485         * runtime/Arguments.h:
 
20486         (JSC::Arguments::getArgumentsData):
 
20487         * runtime/Executable.cpp:
 
20488         (JSC::FunctionExecutable::generateBytecode):
 
20489         * runtime/Executable.h:
 
20490         (JSC::FunctionExecutable::FunctionExecutable):
 
20491         (JSC::FunctionExecutable::variableCount):
 
20492         * runtime/JSActivation.cpp:
 
20493         (JSC::JSActivation::markChildren):
 
20495 2009-08-20  Gavin Barraclough  <barraclough@apple.com>
 
20497         Reviewed by Oliver Hunt.
 
20499         Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect
 
20500         <bug lost in the great bug disasteroony of 08/20/09!>
 
20502         The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match
 
20503         the argument number used within the stub functions in JITStubs.cpp, but it doesn't.
 
20505         Firstly, all the numbers changed when we added a void* 'reserved' as the first slot
 
20506         (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to
 
20507         peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number
 
20508         of machine words, and on 32_64 build the argument slots to stub functions are two
 
20513         (JSC::JIT::compileOpCallSetupArgs):
 
20514         (JSC::JIT::compileOpConstructSetupArgs):
 
20515         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
20516         (JSC::JIT::compileOpCall):
 
20517         * jit/JITInlineMethods.h:
 
20518         (JSC::JIT::emitPutJITStubArg):
 
20519         (JSC::JIT::emitPutJITStubArgConstant):
 
20520         (JSC::JIT::emitGetJITStubArg):
 
20521         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
 
20522         * jit/JITOpcodes.cpp:
 
20523         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
20524         * jit/JITPropertyAccess.cpp:
 
20525         (JSC::JIT::privateCompilePutByIdTransition):
 
20527 2009-08-20  Oliver Hunt  <oliver@apple.com>
 
20529         Reviewed by Geoff Garen.
 
20531         REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
 
20532         https://bugs.webkit.org/show_bug.cgi?id=28332
 
20534         Follow up style fixes that were missed in review.
 
20536         * runtime/Structure.cpp:
 
20537         (JSC::Structure::hasTransition):
 
20538         * runtime/Structure.h:
 
20539         (JSC::Structure::get):
 
20540         (JSC::StructureTransitionTable::contains):
 
20541         * runtime/StructureTransitionTable.h:
 
20542         (JSC::StructureTransitionTable::add):
 
20544 2009-08-20  Oliver Hunt  <oliver@apple.com>
 
20546         Add new exports to windows jsc build
 
20548         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
20549         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
20551 2009-08-20  Oliver Hunt  <oliver@apple.com>
 
20553         Reviewed by Gavin Barraclough.
 
20555         REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
 
20556         https://bugs.webkit.org/show_bug.cgi?id=28332
 
20558         The method check optimisation made transitions aware of the value being
 
20559         assigned when a transition was assigning a function.  This had the side
 
20560         effect of making every assignment of a function expression result in a
 
20561         new transition, and thus a new Structure.  The net result of this is that
 
20562         the common JS idiom of
 
20564             function MyObject() {
 
20565                 this.myFunction = function(...){...};
 
20569         Will produce a unique structure on every iteration, meaning that all
 
20570         caching is defeated and there is a significant amount of structure churn.
 
20572         The fix is to return the transition to its original form where it is
 
20573         keyed off a property name + attributes tuple, but have each transition
 
20574         support an optional transition on a specific value.
 
20576         * JavaScriptCore.exp:
 
20577         * runtime/JSObject.h:
 
20578         (JSC::JSObject::putDirectInternal):
 
20579         * runtime/Structure.cpp:
 
20580         (JSC::Structure::~Structure):
 
20581         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
20582         (JSC::Structure::addPropertyTransition):
 
20583         (JSC::Structure::hasTransition):
 
20584         * runtime/Structure.h:
 
20585         (JSC::Structure::transitionedFor):
 
20586         (JSC::Structure::hasTransition):
 
20587         (JSC::Structure::):
 
20588         (JSC::StructureTransitionTable::contains):
 
20589         (JSC::StructureTransitionTable::get):
 
20590         * runtime/StructureTransitionTable.h:
 
20591         (JSC::StructureTransitionTableHashTraits::emptyValue):
 
20592         (JSC::StructureTransitionTable::hasTransition):
 
20593         (JSC::StructureTransitionTable::remove):
 
20594         (JSC::StructureTransitionTable::add):
 
20596 2009-08-20  Gavin Barraclough  <barraclough@apple.com>
 
20598         Reviewed by Oliver Hunt.
 
20600         Remove FunctionCodeBlock.
 
20601         https://bugs.webkit.org/show_bug.cgi?id=28502
 
20603         These only exist to allow JIT code to dereference properties off the
 
20604         CodeBlock for any callee, regardless of whether it is a host function.
 
20606         Instead just use the FunctionExecutable.  Copy the m_parameters field
 
20607         from the CodeBlock into the Executable, and use this to distinguish
 
20608         between host functions, functions that have been bytecompiled, and
 
20609         functions that have not.
 
20611         m_parameters is moved to ExecutableBase rather than FunctionExecutable
 
20612         so that (as a separate change) we can move make a separate class of
 
20613         executable for host code, which is not devived from FunctionExecutable
 
20614         (host code does not feature any of the properties that normal executable
 
20615         do and will provide, such as source, attributes, and a parsed name).
 
20617         1% win on v8 tests, 0.5% on sunspider.
 
20619         * bytecode/CodeBlock.cpp:
 
20620         (JSC::CodeBlock::derefStructures):
 
20621         (JSC::CodeBlock::refStructures):
 
20622         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
 
20623         (JSC::CodeBlock::handlerForBytecodeOffset):
 
20624         (JSC::CodeBlock::lineNumberForBytecodeOffset):
 
20625         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
 
20626         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
 
20627         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
 
20628         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
 
20629         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
 
20630         * bytecode/CodeBlock.h:
 
20632         (JSC::CodeBlock::source):
 
20633         (JSC::CodeBlock::sourceOffset):
 
20634         (JSC::CodeBlock::evalCodeCache):
 
20635         (JSC::CodeBlock::createRareDataIfNecessary):
 
20637             remove NativeCodeBlocks and the NativeCode code type.
 
20640         (JSC::JIT::linkCall):
 
20642             Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock.
 
20645         (JSC::JIT::compileOpCallInitializeCallFrame):
 
20646         (JSC::JIT::compileOpCallSetupArgs):
 
20647         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
20648         (JSC::JIT::compileOpConstructSetupArgs):
 
20649         (JSC::JIT::compileOpCallVarargs):
 
20650         (JSC::JIT::compileOpCall):
 
20651         (JSC::JIT::compileOpCallSlowCase):
 
20653             Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0.
 
20655         * jit/JITOpcodes.cpp:
 
20656         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
20658             Rewrite call trampolines to not use the CodeBlock.
 
20660         * jit/JITStubs.cpp:
 
20661         (JSC::DEFINE_STUB_FUNCTION):
 
20663             Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock.
 
20665         * runtime/Executable.cpp:
 
20666         (JSC::FunctionExecutable::generateBytecode):
 
20667         (JSC::FunctionExecutable::recompile):
 
20668         (JSC::FunctionExecutable::FunctionExecutable):
 
20669         * runtime/Executable.h:
 
20670         (JSC::ExecutableBase::):
 
20671         (JSC::ExecutableBase::ExecutableBase):
 
20672         (JSC::FunctionExecutable::isHostFunction):
 
20674             Add m_numParameters.
 
20676         * runtime/JSFunction.cpp:
 
20677         (JSC::JSFunction::~JSFunction):
 
20679             Only call generatedBytecode() on JSFunctions non-host FunctionExecutables.
 
20681 2009-08-20  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
20683         Reviewed by Eric Seidel.
 
20685         https://bugs.webkit.org/show_bug.cgi?id=28054
 
20687         Use a helper function to work around winscw compiler forward declaration bug
 
20688         regarding templated classes.
 
20690         Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler
 
20691         work with the default UnSpecifiedBoolType() operator, which removes the winscw
 
20692         specific bool cast hack.
 
20694         * wtf/PassRefPtr.h:
 
20695         (WTF::derefIfNotNull):
 
20696         (WTF::PassRefPtr::~PassRefPtr):
 
20698 2009-08-19  Yong Li  <yong.li@torchmobile.com>
 
20700         Reviewed by Gavin Barraclough.
 
20702         Change namespace ARM to ARMRegisters
 
20703         X86 to X86Registers to avoid conflict with macros
 
20704         https://bugs.webkit.org/show_bug.cgi?id=28428
 
20706         * assembler/ARMAssembler.cpp:
 
20707         * assembler/ARMAssembler.h:
 
20708         * assembler/ARMv7Assembler.h:
 
20709         * assembler/MacroAssemblerARM.h:
 
20710         * assembler/MacroAssemblerARMv7.h:
 
20711         * assembler/MacroAssemblerX86Common.h:
 
20712         * assembler/MacroAssemblerX86_64.h:
 
20713         * assembler/X86Assembler.h:
 
20715         * jit/JITArithmetic.cpp:
 
20716         * jit/JITInlineMethods.h:
 
20717         * jit/JITOpcodes.cpp:
 
20718         * wrec/WRECGenerator.cpp:
 
20719         * wrec/WRECGenerator.h:
 
20720         * yarr/RegexJIT.cpp:
 
20722 2009-08-19  Oliver Hunt  <oliver@apple.com>
 
20724         Reviewed by Gavin Barraclough.
 
20726         Devirtualise marking
 
20727         https://bugs.webkit.org/show_bug.cgi?id=28294
 
20729         We actually need to mark the value in a number object if we're using the
 
20730         32bit number representation.
 
20732         * runtime/NumberObject.h:
 
20733         (JSC::NumberObject::createStructure):
 
20735 2009-08-19  Gavin Barraclough  <barraclough@apple.com>
 
20737         Reviewed by Darin Adler.
 
20739          We probably shouldn't be keeping the AST for eval nodes around forevar.
 
20740         https://bugs.webkit.org/show_bug.cgi?id=28469
 
20742         EvalNodes don't destroyData() (delete their parser data) since they need to hold onto
 
20743         their varStack.  Copy a list of variable onto EvalCodeBlock, and this can go away.
 
20745         * bytecode/CodeBlock.h:
 
20746         (JSC::EvalCodeBlock::variable):
 
20747         (JSC::EvalCodeBlock::numVariables):
 
20748         (JSC::EvalCodeBlock::adoptVariables):
 
20749         * bytecompiler/BytecodeGenerator.cpp:
 
20750         (JSC::BytecodeGenerator::BytecodeGenerator):
 
20751         * interpreter/Interpreter.cpp:
 
20752         (JSC::Interpreter::execute):
 
20754         * runtime/Executable.cpp:
 
20755         (JSC::EvalExecutable::generateBytecode):
 
20756         * runtime/Executable.h:
 
20758 2009-08-19  Jungshik Shin  <jshin@chromium.org>
 
20760         Reviewed by Darin Adler.
 
20762         http://bugs.webkit.org/show_bug.cgi?id=28441
 
20764         Fix a build issue with ICU 4.2 or later on Windows with Visual C++. 
 
20765         Instead of defining all isXXX and toupper/tolower as 
 
20766           WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h,
 
20767         #define them to be different by prepending 'WTF_...ASCIIType_h' with
 
20768         the originial names like 'toupper_WTF_...ASCIIType_h'. 
 
20770         * wtf/DisallowCType.h:
 
20772 2009-08-18  Oliver Hunt  <oliver@apple.com>
 
20774         Reviewed by Gavin Barraclough.
 
20776         Assigning a function to an object should always use the existing transition, even if the transition is not specialized
 
20777         https://bugs.webkit.org/show_bug.cgi?id=28442
 
20779         Check for an unspecialized transition as an alternative to always failing if specialisation does not match.
 
20781         * runtime/Structure.cpp:
 
20782         (JSC::Structure::addPropertyTransitionToExistingStructure):
 
20784 2009-08-18  Dirk Schulze  <krit@webkit.org>
 
20786         Reviewed by Oliver Hunt.
 
20788         Added additional getter to ByteArray with an unsigned char as return.
 
20789         ByteArray can take unsigned char directly now.
 
20792         (WTF::ByteArray::set):
 
20793         (WTF::ByteArray::get):
 
20795 2009-08-18  Peter Kasting  <pkasting@google.com>
 
20797         Reviewed by Eric Seidel.
 
20799         https://bugs.webkit.org/show_bug.cgi?id=28415
 
20800         Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
 
20803         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
 
20804         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
 
20806 2009-08-18  Xan Lopez  <xlopez@igalia.com>
 
20808         Try to fix the GTK+ build.
 
20812 2009-08-17  Gavin Barraclough  <barraclough@apple.com>
 
20814         Reviewed by Sam Weinig.
 
20816         No, silly runtime, AST nodes are not for you.
 
20818         We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within
 
20819         the runtime, which means that these nodes must be persisted outside of the
 
20820         arena, contain both parser & runtime data, etc.  This is all a bit of a mess.
 
20822         Move functionality into a new FunctionExecutable class.
 
20824         * API/JSCallbackFunction.cpp:
 
20825         * API/JSObjectRef.cpp:
 
20826         * JavaScriptCore.exp:
 
20827         * JavaScriptCore.xcodeproj/project.pbxproj:
 
20828         * bytecode/CodeBlock.cpp:
 
20829         (JSC::CodeBlock::CodeBlock):
 
20830         (JSC::CodeBlock::markAggregate):
 
20831         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
 
20832         (JSC::CodeBlock::lineNumberForBytecodeOffset):
 
20833         (JSC::CodeBlock::shrinkToFit):
 
20834         * bytecode/CodeBlock.h:
 
20835         (JSC::CodeBlock::getBytecodeIndex):
 
20836         (JSC::CodeBlock::discardBytecode):
 
20837         (JSC::CodeBlock::instructionCount):
 
20838         (JSC::CodeBlock::getJITCode):
 
20839         (JSC::CodeBlock::executablePool):
 
20840         (JSC::CodeBlock::ownerExecutable):
 
20841         (JSC::CodeBlock::extractExceptionInfo):
 
20842         (JSC::CodeBlock::addFunctionDecl):
 
20843         (JSC::CodeBlock::functionDecl):
 
20844         (JSC::CodeBlock::numberOfFunctionDecls):
 
20845         (JSC::CodeBlock::addFunctionExpr):
 
20846         (JSC::CodeBlock::functionExpr):
 
20847         (JSC::GlobalCodeBlock::GlobalCodeBlock):
 
20848         (JSC::ProgramCodeBlock::ProgramCodeBlock):
 
20849         (JSC::EvalCodeBlock::EvalCodeBlock):
 
20850         (JSC::FunctionCodeBlock::FunctionCodeBlock):
 
20851         (JSC::NativeCodeBlock::NativeCodeBlock):
 
20852         * bytecode/EvalCodeCache.h:
 
20853         * bytecode/SamplingTool.cpp:
 
20854         (JSC::SamplingTool::doRun):
 
20855         * bytecompiler/BytecodeGenerator.cpp:
 
20856         (JSC::BytecodeGenerator::BytecodeGenerator):
 
20857         (JSC::BytecodeGenerator::emitNewFunction):
 
20858         (JSC::BytecodeGenerator::emitNewFunctionExpression):
 
20859         * bytecompiler/BytecodeGenerator.h:
 
20860         * debugger/Debugger.cpp:
 
20861         (JSC::Debugger::recompileAllJSFunctions):
 
20862         * interpreter/CachedCall.h:
 
20863         (JSC::CachedCall::CachedCall):
 
20864         * interpreter/CallFrameClosure.h:
 
20865         * interpreter/Interpreter.cpp:
 
20866         (JSC::Interpreter::unwindCallFrame):
 
20867         (JSC::Interpreter::throwException):
 
20868         (JSC::Interpreter::execute):
 
20869         (JSC::Interpreter::prepareForRepeatCall):
 
20870         (JSC::Interpreter::debug):
 
20871         (JSC::Interpreter::privateExecute):
 
20872         (JSC::Interpreter::retrieveLastCaller):
 
20873         * interpreter/Interpreter.h:
 
20875         (JSC::JIT::privateCompile):
 
20877         (JSC::JIT::compile):
 
20878         * jit/JITOpcodes.cpp:
 
20879         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
20880         (JSC::JIT::emit_op_new_func):
 
20881         (JSC::JIT::emit_op_new_func_exp):
 
20882         * jit/JITStubs.cpp:
 
20883         (JSC::DEFINE_STUB_FUNCTION):
 
20886         * parser/Nodes.cpp:
 
20887         (JSC::FunctionBodyNode::reparseDataIfNecessary):
 
20889         (JSC::EvalNode::partialDestroyData):
 
20891         * profiler/ProfileGenerator.cpp:
 
20892         * profiler/Profiler.cpp:
 
20893         (JSC::Profiler::createCallIdentifier):
 
20894         (JSC::createCallIdentifierFromFunctionImp):
 
20895         * runtime/Arguments.h:
 
20896         (JSC::Arguments::getArgumentsData):
 
20897         (JSC::Arguments::Arguments):
 
20898         (JSC::JSActivation::copyRegisters):
 
20899         * runtime/ArrayPrototype.cpp:
 
20900         (JSC::isNumericCompareFunction):
 
20901         * runtime/CallData.h:
 
20903         * runtime/Collector.cpp:
 
20904         (JSC::Heap::collect):
 
20905         * runtime/ConstructData.h:
 
20907         * runtime/ExceptionHelpers.cpp:
 
20908         (JSC::createUndefinedVariableError):
 
20909         (JSC::createInvalidParamError):
 
20910         (JSC::createNotAConstructorError):
 
20911         (JSC::createNotAFunctionError):
 
20912         (JSC::createNotAnObjectError):
 
20913         * runtime/Executable.cpp: Added.
 
20914         (JSC::EvalExecutable::generateBytecode):
 
20915         (JSC::ProgramExecutable::generateBytecode):
 
20916         (JSC::FunctionExecutable::generateBytecode):
 
20917         (JSC::EvalExecutable::generateJITCode):
 
20918         (JSC::ProgramExecutable::generateJITCode):
 
20919         (JSC::FunctionExecutable::generateJITCode):
 
20920         (JSC::FunctionExecutable::isHostFunction):
 
20921         (JSC::FunctionExecutable::markAggregate):
 
20922         (JSC::FunctionExecutable::reparseExceptionInfo):
 
20923         (JSC::EvalExecutable::reparseExceptionInfo):
 
20924         (JSC::FunctionExecutable::recompile):
 
20925         (JSC::FunctionExecutable::FunctionExecutable):
 
20926         * runtime/Executable.h:
 
20927         (JSC::ExecutableBase::~ExecutableBase):
 
20928         (JSC::ExecutableBase::ExecutableBase):
 
20929         (JSC::ExecutableBase::source):
 
20930         (JSC::ExecutableBase::sourceID):
 
20931         (JSC::ExecutableBase::lastLine):
 
20932         (JSC::ExecutableBase::usesEval):
 
20933         (JSC::ExecutableBase::usesArguments):
 
20934         (JSC::ExecutableBase::needsActivation):
 
20935         (JSC::ExecutableBase::astNode):
 
20936         (JSC::ExecutableBase::generatedJITCode):
 
20937         (JSC::ExecutableBase::getExecutablePool):
 
20938         (JSC::EvalExecutable::EvalExecutable):
 
20939         (JSC::EvalExecutable::bytecode):
 
20940         (JSC::EvalExecutable::varStack):
 
20941         (JSC::EvalExecutable::evalNode):
 
20942         (JSC::EvalExecutable::jitCode):
 
20943         (JSC::ProgramExecutable::ProgramExecutable):
 
20944         (JSC::ProgramExecutable::reparseExceptionInfo):
 
20945         (JSC::ProgramExecutable::bytecode):
 
20946         (JSC::ProgramExecutable::programNode):
 
20947         (JSC::ProgramExecutable::jitCode):
 
20948         (JSC::FunctionExecutable::FunctionExecutable):
 
20949         (JSC::FunctionExecutable::name):
 
20950         (JSC::FunctionExecutable::bytecode):
 
20951         (JSC::FunctionExecutable::generatedBytecode):
 
20952         (JSC::FunctionExecutable::usesEval):
 
20953         (JSC::FunctionExecutable::usesArguments):
 
20954         (JSC::FunctionExecutable::parameterCount):
 
20955         (JSC::FunctionExecutable::paramString):
 
20956         (JSC::FunctionExecutable::isGenerated):
 
20957         (JSC::FunctionExecutable::body):
 
20958         (JSC::FunctionExecutable::jitCode):
 
20959         (JSC::FunctionExecutable::createNativeThunk):
 
20960         * runtime/FunctionConstructor.cpp:
 
20961         (JSC::constructFunction):
 
20962         * runtime/FunctionPrototype.cpp:
 
20963         (JSC::functionProtoFuncToString):
 
20964         * runtime/JSActivation.cpp:
 
20965         (JSC::JSActivation::JSActivation):
 
20966         (JSC::JSActivation::markChildren):
 
20967         (JSC::JSActivation::isDynamicScope):
 
20968         (JSC::JSActivation::argumentsGetter):
 
20969         * runtime/JSActivation.h:
 
20970         (JSC::JSActivation::JSActivationData::JSActivationData):
 
20971         * runtime/JSFunction.cpp:
 
20972         (JSC::JSFunction::isHostFunction):
 
20973         (JSC::JSFunction::JSFunction):
 
20974         (JSC::JSFunction::~JSFunction):
 
20975         (JSC::JSFunction::markChildren):
 
20976         (JSC::JSFunction::getCallData):
 
20977         (JSC::JSFunction::call):
 
20978         (JSC::JSFunction::lengthGetter):
 
20979         (JSC::JSFunction::getConstructData):
 
20980         (JSC::JSFunction::construct):
 
20981         * runtime/JSFunction.h:
 
20982         (JSC::JSFunction::executable):
 
20983         (JSC::FunctionExecutable::make):
 
20984         * runtime/JSGlobalData.cpp:
 
20985         (JSC::JSGlobalData::JSGlobalData):
 
20986         (JSC::JSGlobalData::numericCompareFunction):
 
20987         * runtime/JSGlobalData.h:
 
20989 2009-08-17  Mark Rowe  <mrowe@apple.com>
 
20991         Reviewed by Darin Adler.
 
20993         Fix 300,000+ leaks seen during the regression tests.
 
20995         EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference.
 
20996         While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated.
 
20997         To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the
 
20998         refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get
 
20999         now uses CacheableEvalExecutable::create and avoids the leak.
 
21001         * bytecode/EvalCodeCache.h:
 
21002         (JSC::EvalCodeCache::get):
 
21003         * interpreter/Interpreter.cpp:
 
21004         (JSC::Interpreter::callEval):
 
21005         * runtime/Executable.h:
 
21006         (JSC::CacheableEvalExecutable::create):
 
21007         (JSC::CacheableEvalExecutable::CacheableEvalExecutable):
 
21009 2009-08-17  Oliver Hunt  <oliver@apple.com>
 
21013         REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes
 
21014         https://bugs.webkit.org/show_bug.cgi?id=28341
 
21015         <rdar://problem/7145615>
 
21017         Reverting r47292.  Alas Prototype.js breaks with Arguments inheriting
 
21018         from Array as ES5 attempted.  Prototype.js defines $A in terms of a 
 
21019         function it places on (among other global objects) the Array prototype,
 
21020         thus breaking $A for arrays.
 
21022         * runtime/Arguments.h:
 
21023         (JSC::Arguments::Arguments):
 
21024         * runtime/JSGlobalObject.cpp:
 
21025         (JSC::JSGlobalObject::reset):
 
21026         (JSC::JSGlobalObject::markChildren):
 
21027         * runtime/JSGlobalObject.h:
 
21028         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
 
21029         * runtime/ObjectPrototype.cpp:
 
21030         (JSC::ObjectPrototype::ObjectPrototype):
 
21031         * runtime/ObjectPrototype.h:
 
21032         * tests/mozilla/ecma_3/Function/arguments-001.js:
 
21034 2009-08-17  Peter Kasting  <pkasting@google.com>
 
21036         Reviewed by Steve Falkenburg.
 
21038         https://bugs.webkit.org/show_bug.cgi?id=27323
 
21039         Only add Cygwin to the path when it isn't already there.  This avoids
 
21040         causing problems for people who purposefully have non-Cygwin versions of
 
21041         executables like svn in front of the Cygwin ones in their paths.
 
21043         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
21044         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
 
21045         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
 
21046         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
21047         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
 
21049 2009-08-17  Xan Lopez  <xlopez@igalia.com>
 
21051         Reviewed by Mark Rowe.
 
21053         Fix build with FAST_MALLOC_MATCH_VALIDATION enabled.
 
21055         * wtf/FastMalloc.cpp:
 
21058         (WTF::fastRealloc):
 
21060 2009-08-16  Holger Hans Peter Freyther  <zecke@selfish.org>
 
21062         Reviewed by Mark Rowe.
 
21064         Fix crash on ./ecma_2/RegExp/exec-002.js.
 
21065         https://bugs.webkit.org/show_bug.cgi?id=28353
 
21067         Change the order of freeParenthesesDisjunctionContext and
 
21068         popParenthesesDisjunctionContext on all call sites as the pop
 
21069         method is accessing backTrack->lastContext which is the context
 
21070         that is about to be freed.
 
21072         * yarr/RegexInterpreter.cpp:
 
21073         (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
 
21074         (JSC::Yarr::Interpreter::backtrackParentheses):
 
21076 2009-08-16  Holger Hans Peter Freyther  <zecke@selfish.org>
 
21078         Reviewed by Mark Rowe.
 
21080         https://bugs.webkit.org/show_bug.cgi?id=28352
 
21082         Fix coding style violations. Use m_ for C++ class members. Remove
 
21083         trailing whitespace on empty lines.
 
21085         * yarr/RegexInterpreter.cpp:
 
21086         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
 
21087         (JSC::Yarr::Interpreter::tryConsumeCharacter):
 
21088         (JSC::Yarr::Interpreter::tryConsumeBackReference):
 
21089         (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
 
21090         (JSC::Yarr::Interpreter::backtrackParentheses):
 
21091         (JSC::Yarr::ByteCompiler::ByteCompiler):
 
21092         (JSC::Yarr::ByteCompiler::compile):
 
21093         (JSC::Yarr::ByteCompiler::checkInput):
 
21094         (JSC::Yarr::ByteCompiler::assertionBOL):
 
21095         (JSC::Yarr::ByteCompiler::assertionEOL):
 
21096         (JSC::Yarr::ByteCompiler::assertionWordBoundary):
 
21097         (JSC::Yarr::ByteCompiler::atomPatternCharacter):
 
21098         (JSC::Yarr::ByteCompiler::atomCharacterClass):
 
21099         (JSC::Yarr::ByteCompiler::atomBackReference):
 
21100         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
 
21101         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
 
21102         (JSC::Yarr::ByteCompiler::popParenthesesStack):
 
21103         (JSC::Yarr::ByteCompiler::closeAlternative):
 
21104         (JSC::Yarr::ByteCompiler::closeBodyAlternative):
 
21105         (JSC::Yarr::ByteCompiler::atomParenthesesEnd):
 
21106         (JSC::Yarr::ByteCompiler::regexBegin):
 
21107         (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction):
 
21108         (JSC::Yarr::ByteCompiler::alterantiveDisjunction):
 
21109         (JSC::Yarr::ByteCompiler::emitDisjunction):
 
21111 2009-08-15  Mark Rowe  <mrowe@apple.com>
 
21113         Fix the build with JIT disabled.
 
21115         * runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled.
 
21116         * runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what
 
21117         NativeFunctionWrapper is when the JIT is disabled.
 
21119 2009-08-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
 
21121         Reviewed by Sam Weinig.
 
21123         Added ENABLE_EVENTSOURCE flag.
 
21124         https://bugs.webkit.org/show_bug.cgi?id=14997
 
21126         * Configurations/FeatureDefines.xcconfig:
 
21128 2009-08-14  Gavin Barraclough  <barraclough@apple.com>
 
21131         (JSC::EvalExecutable::parse):
 
21132         (JSC::ProgramExecutable::parse):
 
21133         * runtime/Executable.h:
 
21135 2009-08-14  Gavin Barraclough  <barraclough@apple.com>
 
21137         Reviewed by Oliver Hunt.
 
21139         Remove AST nodes from use within the Runtime (outside of parsing), stage 1
 
21140         https://bugs.webkit.org/show_bug.cgi?id=28330
 
21142         Remove the EvalNode and ProgramNode from use in the runtime.  They still exist
 
21143         after this patch, but are hidden behind EvalExecutable and FunctionExecutable,
 
21144         and are also still reachable behind CodeBlock::m_ownerNode.
 
21146         The next step will be to beat back FunctionBodyNode in the same fashion.
 
21147         Then remove the usage via CodeBlock, then only construct these nodes only on
 
21148         demand during bytecode generation.
 
21150         * JavaScriptCore.xcodeproj/project.pbxproj:
 
21151         * bytecode/CodeBlock.h:
 
21152         (JSC::GlobalCodeBlock::GlobalCodeBlock):
 
21153         (JSC::GlobalCodeBlock::~GlobalCodeBlock):
 
21154         (JSC::ProgramCodeBlock::ProgramCodeBlock):
 
21155         (JSC::EvalCodeBlock::EvalCodeBlock):
 
21156         (JSC::FunctionCodeBlock::FunctionCodeBlock):
 
21157         (JSC::NativeCodeBlock::NativeCodeBlock):
 
21158         * bytecode/EvalCodeCache.h:
 
21159         (JSC::EvalCodeCache::get):
 
21160         * debugger/Debugger.cpp:
 
21161         (JSC::evaluateInGlobalCallFrame):
 
21162         * debugger/DebuggerCallFrame.cpp:
 
21163         (JSC::DebuggerCallFrame::evaluate):
 
21164         * interpreter/Interpreter.cpp:
 
21165         (JSC::Interpreter::callEval):
 
21166         (JSC::Interpreter::execute):
 
21167         * interpreter/Interpreter.h:
 
21168         * parser/Nodes.cpp:
 
21169         (JSC::FunctionBodyNode::createNativeThunk):
 
21170         (JSC::FunctionBodyNode::generateBytecode):
 
21171         (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
 
21173         (JSC::Parser::parse):
 
21174         (JSC::Parser::reparse):
 
21175         (JSC::Parser::parseFunctionFromGlobalCode):
 
21177         * runtime/Completion.cpp:
 
21178         (JSC::checkSyntax):
 
21180         * runtime/Error.cpp:
 
21183         * runtime/Executable.h: Added.
 
21184         (JSC::TemplateExecutable::TemplateExecutable):
 
21185         (JSC::TemplateExecutable::markAggregate):
 
21186         (JSC::TemplateExecutable::sourceURL):
 
21187         (JSC::TemplateExecutable::lineNo):
 
21188         (JSC::TemplateExecutable::bytecode):
 
21189         (JSC::TemplateExecutable::jitCode):
 
21190         (JSC::EvalExecutable::EvalExecutable):
 
21191         (JSC::ProgramExecutable::ProgramExecutable):
 
21192         * runtime/FunctionConstructor.cpp:
 
21193         (JSC::constructFunction):
 
21194         * runtime/FunctionConstructor.h:
 
21195         * runtime/JSGlobalData.cpp:
 
21196         (JSC::JSGlobalData::numericCompareFunction):
 
21197         * runtime/JSGlobalObject.cpp:
 
21198         (JSC::JSGlobalObject::~JSGlobalObject):
 
21199         (JSC::JSGlobalObject::markChildren):
 
21200         * runtime/JSGlobalObject.h:
 
21201         (JSC::JSGlobalObject::codeBlocks):
 
21202         * runtime/JSGlobalObjectFunctions.cpp:
 
21203         (JSC::globalFuncEval):
 
21205 2009-08-14  Darin Adler  <darin@apple.com>
 
21207         Reviewed by Sam Weinig.
 
21209         Rename the confusing isObject(<class>) to inherits(<class>).
 
21210         It still works on non-objects, returning false.
 
21212         * runtime/ArrayConstructor.cpp:
 
21213         (JSC::arrayConstructorIsArray): Removed unneeded isObject call
 
21214         and updated remaining isObject call to new name, inherits.
 
21216         * runtime/JSCell.h: Renamed isObject(<class>) to inherits(<class>)
 
21217         but more importantly, made it non-virtual (it was already inline)
 
21218         so it is now as fast as JSObject::inherits was.
 
21220         * runtime/JSObject.h: Removed inherits function since the one
 
21221         in the base class is fine as-is. Also made various JSCell functions
 
21222         that should not be called on JSObject uncallable by making them
 
21223         both private and not implemented.
 
21224         (JSC::JSCell::inherits): Updated name.
 
21225         (JSC::JSValue::inherits): Ditto.
 
21227         * debugger/Debugger.cpp:
 
21228         (JSC::Debugger::recompileAllJSFunctions):
 
21229         * interpreter/Interpreter.cpp:
 
21230         (JSC::Interpreter::unwindCallFrame):
 
21231         * runtime/ArrayPrototype.cpp:
 
21232         (JSC::arrayProtoFuncToString):
 
21233         (JSC::arrayProtoFuncToLocaleString):
 
21234         (JSC::arrayProtoFuncConcat):
 
21235         * runtime/BooleanPrototype.cpp:
 
21236         (JSC::booleanProtoFuncToString):
 
21237         (JSC::booleanProtoFuncValueOf):
 
21238         * runtime/DateConstructor.cpp:
 
21239         (JSC::constructDate):
 
21240         * runtime/DatePrototype.cpp:
 
21241         (JSC::dateProtoFuncToString):
 
21242         (JSC::dateProtoFuncToUTCString):
 
21243         (JSC::dateProtoFuncToISOString):
 
21244         (JSC::dateProtoFuncToDateString):
 
21245         (JSC::dateProtoFuncToTimeString):
 
21246         (JSC::dateProtoFuncToLocaleString):
 
21247         (JSC::dateProtoFuncToLocaleDateString):
 
21248         (JSC::dateProtoFuncToLocaleTimeString):
 
21249         (JSC::dateProtoFuncGetTime):
 
21250         (JSC::dateProtoFuncGetFullYear):
 
21251         (JSC::dateProtoFuncGetUTCFullYear):
 
21252         (JSC::dateProtoFuncToGMTString):
 
21253         (JSC::dateProtoFuncGetMonth):
 
21254         (JSC::dateProtoFuncGetUTCMonth):
 
21255         (JSC::dateProtoFuncGetDate):
 
21256         (JSC::dateProtoFuncGetUTCDate):
 
21257         (JSC::dateProtoFuncGetDay):
 
21258         (JSC::dateProtoFuncGetUTCDay):
 
21259         (JSC::dateProtoFuncGetHours):
 
21260         (JSC::dateProtoFuncGetUTCHours):
 
21261         (JSC::dateProtoFuncGetMinutes):
 
21262         (JSC::dateProtoFuncGetUTCMinutes):
 
21263         (JSC::dateProtoFuncGetSeconds):
 
21264         (JSC::dateProtoFuncGetUTCSeconds):
 
21265         (JSC::dateProtoFuncGetMilliSeconds):
 
21266         (JSC::dateProtoFuncGetUTCMilliseconds):
 
21267         (JSC::dateProtoFuncGetTimezoneOffset):
 
21268         (JSC::dateProtoFuncSetTime):
 
21269         (JSC::setNewValueFromTimeArgs):
 
21270         (JSC::setNewValueFromDateArgs):
 
21271         (JSC::dateProtoFuncSetYear):
 
21272         (JSC::dateProtoFuncGetYear):
 
21273         * runtime/FunctionPrototype.cpp:
 
21274         (JSC::functionProtoFuncToString):
 
21275         * runtime/JSActivation.cpp:
 
21276         (JSC::JSActivation::argumentsGetter):
 
21277         * runtime/JSValue.h:
 
21278         * runtime/RegExpConstructor.cpp:
 
21279         (JSC::constructRegExp):
 
21280         * runtime/RegExpPrototype.cpp:
 
21281         (JSC::regExpProtoFuncTest):
 
21282         (JSC::regExpProtoFuncExec):
 
21283         (JSC::regExpProtoFuncCompile):
 
21284         (JSC::regExpProtoFuncToString):
 
21285         * runtime/ScopeChain.cpp:
 
21286         (JSC::ScopeChain::localDepth):
 
21287         * runtime/StringPrototype.cpp:
 
21288         (JSC::stringProtoFuncReplace):
 
21289         (JSC::stringProtoFuncToString):
 
21290         (JSC::stringProtoFuncMatch):
 
21291         (JSC::stringProtoFuncSearch):
 
21292         (JSC::stringProtoFuncSplit):
 
21293         Updated to new name, inherits, from old name, isObject.
 
21295 2009-07-31  Harald Fernengel  <harald.fernengel@nokia.com>
 
21297         Reviewed by Simon Hausmann.
 
21299         Adding QNX as a platform. Currently only tested with Qt.
 
21301         https://bugs.webkit.org/show_bug.cgi?id=27885
 
21303         * JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base
 
21304           since QNX doesn't have the pthread _nt functions
 
21305         * JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding
 
21307         * WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX
 
21309 2009-08-14  Gabor Loki  <loki@inf.u-szeged.hu>
 
21311         Reviewed by Simon Hausmann.
 
21313         Currently generic ARM and ARMv7 platforms work only with JSVALUE32
 
21314         https://bugs.webkit.org/show_bug.cgi?id=28300
 
21318 2009-08-14  Gabor Loki  <loki@inf.u-szeged.hu>
 
21320         Reviewed by Simon Hausmann.
 
21322         Enable JIT on ARM for QT by default
 
21323         https://bugs.webkit.org/show_bug.cgi?id=28259
 
21327 2009-08-14  Gabor Loki  <loki@inf.u-szeged.hu>
 
21329         Reviewed by Simon Hausmann.
 
21331         Enable YARR_JIT on ARM for QT by default
 
21332         https://bugs.webkit.org/show_bug.cgi?id=28259
 
21336 2009-08-14  Oliver Hunt  <oliver@apple.com>
 
21338         Reviewed by Gavin Barraclough.
 
21340         [ES5] Arguments object should inherit from Array
 
21341         https://bugs.webkit.org/show_bug.cgi?id=28298
 
21343         Make the Arguments object conform to the behaviour specified in ES5.
 
21344         The simple portion of this is to make Arguments use Array.prototype
 
21345         as its prototype rather than Object.prototype.
 
21347         The spec then requires us to set instance.constructor to the pristine
 
21348         Object constructor, and instance.toString and instance.toLocaleString
 
21349         to the pristine versions from Object.prototype.  To do this we now 
 
21350         make the ObjectPrototype constructor return its toString and
 
21351         toLocaleString functions (similar to the call and apply functions
 
21352         from FunctionPrototype).
 
21354         Oddly enough this reports itself as a slight win, but given the code
 
21355         isn't hit in the tests that claim to have improved I put this down to
 
21358         * runtime/Arguments.h:
 
21359         (JSC::Arguments::Arguments):
 
21360         (JSC::Arguments::initializeStandardProperties):
 
21361         * runtime/JSGlobalObject.cpp:
 
21362         (JSC::JSGlobalObject::reset):
 
21363         (JSC::JSGlobalObject::markChildren):
 
21364         * runtime/JSGlobalObject.h:
 
21365         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
 
21366         (JSC::JSGlobalObject::objectConstructor):
 
21367         (JSC::JSGlobalObject::objectToStringFunction):
 
21368         (JSC::JSGlobalObject::objectToLocaleStringFunction):
 
21369         * runtime/ObjectPrototype.cpp:
 
21370         (JSC::ObjectPrototype::ObjectPrototype):
 
21371         * runtime/ObjectPrototype.h:
 
21372         * tests/mozilla/ecma_3/Function/arguments-001.js:
 
21373           Update test to new es5 behaviour
 
21375 2009-08-14  Oliver Hunt  <oliver@apple.com>
 
21377         Remove MarkStack::drain from the JSC exports file
 
21379         MarkStack::drain is now marked inline, the including it in the exports file
 
21380         produces an ld warning
 
21382         * JavaScriptCore.exp:
 
21384 2009-08-13  Sam Weinig  <sam@webkit.org>
 
21386         Reviewed by Oliver Hunt.
 
21388         Remove accidentally left in debugging statement.
 
21390         * runtime/JSArray.h:
 
21391         (JSC::MarkStack::drain):
 
21393 2009-08-13  Oliver Hunt  <oliver@apple.com>
 
21395         Reviewed by Maciej Stachowiak.
 
21397         [ES5] Implement Array.isArray
 
21398         https://bugs.webkit.org/show_bug.cgi?id=28296
 
21400         Add support for Array.isArray to the Array constructor
 
21402         * runtime/ArrayConstructor.cpp:
 
21403         (JSC::ArrayConstructor::ArrayConstructor):
 
21404         (JSC::arrayConstructorIsArray):
 
21405         * runtime/ArrayConstructor.h:
 
21406         * runtime/CommonIdentifiers.h:
 
21407         * runtime/JSArray.h:
 
21408         (JSC::MarkStack::drain):
 
21409         * runtime/JSGlobalObject.cpp:
 
21410         (JSC::JSGlobalObject::reset):
 
21412 2009-08-13  Oliver Hunt  <oliver@apple.com>
 
21414         Reviewed by NOBODY (Buildfix).
 
21416         Attempt to fix windows build
 
21418         * runtime/Collector.cpp:
 
21420 2009-08-13  Oliver Hunt  <oliver@apple.com>
 
21422         Reviewed by Maciej Stachowiak.
 
21424         Devirtualise marking
 
21425         https://bugs.webkit.org/show_bug.cgi?id=28294
 
21427         Add a bit to TypeInfo to indicate that an object uses the standard
 
21428         JSObject::markChildren method.  This allows us to devirtualise marking
 
21429         of most objects (though a branch is still needed).  We also add a branch
 
21430         to identify arrays thus devirtualising marking in that case as well.
 
21432         In order to make the best use of this devirtualisation I've also reworked
 
21433         the MarkStack::drain() logic to make the iteration more efficient.
 
21435         * API/JSCallbackConstructor.h:
 
21436         (JSC::JSCallbackConstructor::createStructure):
 
21437         * API/JSCallbackFunction.h:
 
21438         (JSC::JSCallbackFunction::createStructure):
 
21439         * JavaScriptCore.exp:
 
21440         * runtime/BooleanObject.h:
 
21441         (JSC::BooleanObject::createStructure):
 
21442         * runtime/FunctionPrototype.h:
 
21443         (JSC::FunctionPrototype::createStructure):
 
21444         * runtime/InternalFunction.h:
 
21445         (JSC::InternalFunction::createStructure):
 
21446         * runtime/JSAPIValueWrapper.h:
 
21447         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
 
21448         * runtime/JSArray.cpp:
 
21449         (JSC::JSArray::markChildren):
 
21450         * runtime/JSArray.h:
 
21451         (JSC::JSArray::markChildrenDirect):
 
21452         (JSC::MarkStack::drain):
 
21453         * runtime/JSByteArray.cpp:
 
21454         (JSC::JSByteArray::createStructure):
 
21455         * runtime/JSCell.h:
 
21456         (JSC::MarkStack::append):
 
21457         * runtime/JSGlobalData.cpp:
 
21458         (JSC::JSGlobalData::JSGlobalData):
 
21459         * runtime/JSNumberCell.h:
 
21460         (JSC::JSNumberCell::createStructure):
 
21461         * runtime/JSONObject.h:
 
21462         (JSC::JSONObject::createStructure):
 
21463         * runtime/JSObject.cpp:
 
21464         (JSC::JSObject::markChildren):
 
21465         * runtime/JSObject.h:
 
21466         (JSC::JSObject::markChildrenDirect):
 
21467         (JSC::JSObject::createStructure):
 
21468         * runtime/JSString.h:
 
21469         (JSC::JSString::createStructure):
 
21470         * runtime/JSType.h:
 
21472         * runtime/MarkStack.h:
 
21473         (JSC::MarkStack::MarkStack):
 
21474         (JSC::MarkStack::MarkSet::MarkSet):
 
21475         (JSC::MarkStack::MarkStackArray::last):
 
21476         * runtime/MathObject.h:
 
21477         (JSC::MathObject::createStructure):
 
21478         * runtime/NumberConstructor.h:
 
21479         (JSC::NumberConstructor::createStructure):
 
21480         * runtime/NumberObject.h:
 
21481         (JSC::NumberObject::createStructure):
 
21482         * runtime/RegExpConstructor.h:
 
21483         (JSC::RegExpConstructor::createStructure):
 
21484         * runtime/RegExpObject.h:
 
21485         (JSC::RegExpObject::createStructure):
 
21486         * runtime/StringObjectThatMasqueradesAsUndefined.h:
 
21487         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
 
21488         * runtime/TypeInfo.h:
 
21489         (JSC::TypeInfo::hasDefaultMark):
 
21491 2009-08-13  Darin Adler  <darin@apple.com>
 
21493         Reviewed by Mark Rowe.
 
21495         Some small bits of housekeeping.
 
21497         * JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h
 
21498         project instead of private. Remove JSONObject.lut.h.
 
21500         * assembler/ARMAssembler.h: Remove unneeded WTF prefix.
 
21501         * assembler/AssemblerBufferWithConstantPool.h: Ditto.
 
21502         * bytecompiler/BytecodeGenerator.h: Ditto.
 
21504         * wtf/SegmentedVector.h: Add a "using" statement as we do
 
21505         with the other WTF headers.
 
21507 2009-08-13  Darin Adler  <darin@apple.com>
 
21511         * parser/Grammar.y: Use a template function so we can compile
 
21512         setStatementLocation even if it comes before YYLTYPE is defined.
 
21514 2009-08-13  Darin Adler  <darin@apple.com>
 
21516         Reviewed by George Staikos.
 
21518         Too much use of void* in Grammar.y
 
21519         https://bugs.webkit.org/show_bug.cgi?id=28287
 
21521         * parser/Grammar.y: Changed all the helper functions to
 
21522         take a JSGlobalData* instead of a void*. A couple formatting
 
21523         tweaks that I missed when breaking this into pieces.
 
21525 2009-08-13  Darin Adler  <darin@apple.com>
 
21527         Reviewed by George Staikos.
 
21529         Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
 
21531         * parser/Grammar.y: Reduced and sorted includes. Tweaked comment
 
21532         format. Marked a few more functions inline.
 
21534 2009-08-13  Darin Adler  <darin@apple.com>
 
21536         Reviewed by George Staikos.
 
21538         Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
 
21540         * parser/Grammar.y: Pass the number to the PropertyNode instead of
 
21541         first turning it into an Identifier.
 
21543         * parser/NodeConstructors.h:
 
21544         (JSC::PropertyNode::PropertyNode): Add an overload that takes a double
 
21545         so the code to convert to a string can be here instead of Grammar.y.
 
21546         * parser/Nodes.h: Ditto.
 
21548 2009-08-13  Darin Adler  <darin@apple.com>
 
21550         Reviewed by George Staikos.
 
21552         Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
 
21554         * parser/Grammar.y: Eliminate the DBG macro.
 
21556 2009-08-13  Darin Adler  <darin@apple.com>
 
21558         Reviewed by George Staikos.
 
21560         Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
 
21562         * parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro.
 
21564 2009-08-13  Darin Adler  <darin@apple.com>
 
21566         Reviewed by George Staikos.
 
21568         George asked me to break the patch from
 
21569         https://bugs.webkit.org/show_bug.cgi?id=28287
 
21570         into smaller pieces and land it in stages.
 
21572         * parser/Grammar.y: Eliminate the LEXER macro.
 
21574 2009-08-13  Mark Rowe  <mrowe@apple.com>
 
21576         Try some more to fix the Windows build.
 
21578         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
 
21579         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
 
21581 2009-08-13  Mark Rowe  <mrowe@apple.com>
 
21583         Try and fix the Windows build.
 
21585         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
 
21586         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
 
21588 2009-08-13  Darin Adler  <darin@apple.com>
 
21590         Reviewed by David Levin.
 
21592         JavaScriptCore tweaks to get ready for the parser arena
 
21593         https://bugs.webkit.org/show_bug.cgi?id=28243
 
21595         Eliminate dependencies on Nodes.h outside JavaScriptCore,
 
21596         and cut down on them inside JavaScriptCore.
 
21598         Change regular expression parsing to use identifiers as
 
21599         with other strings we parse.
 
21601         Fix a couple things that are needed to use const Identifier
 
21602         more, which will be part of the parser arena work.
 
21604         * JavaScriptCore.exp: Resorted and updated.
 
21606         * JavaScriptCore.xcodeproj/project.pbxproj: Changed
 
21607         CollectorHeapIterator.h to be project-internal.
 
21609         * bytecompiler/BytecodeGenerator.cpp:
 
21610         (JSC::BytecodeGenerator::emitPushNewScope): Added const.
 
21611         * bytecompiler/BytecodeGenerator.h: Ditto.
 
21613         * debugger/Debugger.cpp:
 
21614         (JSC::Debugger::recompileAllJSFunctions): Moved this function
 
21615         here from WebCore. Here is better since it uses so many internals.
 
21616         Removed unimportant optimization for the no listener case.
 
21617         * debugger/Debugger.h: Ditto. Also removed unneeded include
 
21618         and tweaked formatting and comments.
 
21620         * debugger/DebuggerCallFrame.cpp:
 
21621         (JSC::DebuggerCallFrame::functionName): Call asFunction instead
 
21622         of doing the unchecked static_cast.
 
21623         (JSC::DebuggerCallFrame::calculatedFunctionName): Ditto.
 
21625         * jit/JITStubs.cpp:
 
21626         (JSC::op_call_JSFunction): Call isHostFunction on the body rather
 
21627         than on the JSFunction.
 
21628         (JSC::vm_lazyLinkCall): Ditto.
 
21629         (JSC::op_construct_JSConstruct): Ditto.
 
21631         * parser/Grammar.y: Changed callers to use new scanRegExp with
 
21632         out arguments instead of relying on state in the Lexer. And
 
21633         callers that just want to skip a regular expression to use
 
21636         * parser/Lexer.cpp:
 
21637         (JSC::Lexer::scanRegExp): Changed to use out arguments, and to
 
21638         add a prefix argument so we can add in the "=" character as needed.
 
21639         Also rewrote to streamline the logic a bit inspired by suggestions
 
21641         (JSC::Lexer::skipRegExp): Added. Version of the function above that
 
21642         does not actually put the regular expression into a string.
 
21643         (JSC::Lexer::clear): Removed code to clear m_pattern and m_flags.
 
21644         * parser/Lexer.h: Changed scanRegExp to have out arguments. Added
 
21645         skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags.
 
21647         * parser/NodeConstructors.h:
 
21648         (JSC::RegExpNode::RegExpNode): Changed to take const Identifier&.
 
21649         * parser/Nodes.cpp:
 
21650         (JSC::RegExpNode::emitBytecode): Changed since m_pattern and
 
21651         m_flags are now Identifier instead of UString.
 
21652         (JSC::FunctionBodyNode::make): Moved this function here instead
 
21653         of putting it in the JSFunction.h header.
 
21654         * parser/Nodes.h: Changed RegExpNode to use Identifier.
 
21656         * profiler/Profiler.cpp:
 
21657         (JSC::Profiler::createCallIdentifier): Changed to use isHostFunction
 
21658         on the body instead of on the JSFunction object.
 
21659         * runtime/FunctionPrototype.cpp:
 
21660         (JSC::functionProtoFuncToString): Ditto.
 
21662         * runtime/JSFunction.cpp:
 
21663         (JSC::JSFunction::isHostFunction): Moved here from header.
 
21664         (JSC::JSFunction::isHostFunctionNonInline): Added.
 
21665         (JSC::JSFunction::JSFunction): Removed unneeded initialization of
 
21667         (JSC::JSFunction::setBody): Moved here from header.
 
21669         * runtime/JSFunction.h: Removed unneeded includes. Moved private
 
21670         constructor down to the private section. Made virtual functions
 
21671         private. Removed unneeded overload of setBody and moved the body
 
21672         of the function into the .cpp file. Changed assertions to use
 
21673         the non-inline version of isHostFunction.
 
21675         * runtime/PropertySlot.cpp:
 
21676         (JSC::PropertySlot::functionGetter): Use asFunction instead
 
21677         of doing the unchecked static_cast.
 
21679         * wtf/SegmentedVector.h:
 
21680         (WTF::SegmentedVector::isEmpty): Added.
 
21682 2009-08-13  Mark Rowe  <mrowe@apple.com>
 
21684         Rubber-stamped by Darin Adler.
 
21686         Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode
 
21687         from within the grammar to prevent these nodes from being leaked.
 
21689         * parser/Grammar.y:
 
21691 2009-08-13  Simon Hausmann  <simon.hausmann@nokia.com>
 
21693         Reviewed by Ariya Hidayat.
 
21695         Remove the special-case for Qt wrt JSVALUE_32 introduced in
 
21696         r46709. It must've been a dependency issue on the bot, as
 
21697         after a manual build all the tests pass on amd64 and ia32.
 
21701 2009-08-12  Gabor Loki  <loki@inf.u-szeged.hu>
 
21703         Reviewed by Gavin Barraclough.
 
21705         Add optimize call and property access support for ARM JIT.
 
21706         https://bugs.webkit.org/show_bug.cgi?id=24986
 
21708         For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and
 
21709         END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure
 
21710         space for instructions and constants of the named sequence. This
 
21711         method is vital for those architecture which are using constant pool.
 
21713         The 'latePatch' method - which was linked to JmpSrc - is replaced with
 
21714         a port specific solution (each calls are marked to place their address
 
21715         on the constant pool).
 
21717         * assembler/ARMAssembler.cpp:
 
21718         (JSC::ARMAssembler::linkBranch):
 
21719         (JSC::ARMAssembler::executableCopy): Add extra align for constant pool.
 
21720         * assembler/ARMAssembler.h:
 
21721         (JSC::ARMAssembler::JmpSrc::JmpSrc):
 
21722         (JSC::ARMAssembler::sizeOfConstantPool):
 
21723         (JSC::ARMAssembler::jmp):
 
21724         (JSC::ARMAssembler::linkCall):
 
21725         * assembler/ARMv7Assembler.h:
 
21726         * assembler/AbstractMacroAssembler.h:
 
21727         * assembler/AssemblerBufferWithConstantPool.h:
 
21728         (JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the
 
21729         computation of the remaining space.
 
21730         * assembler/MacroAssemblerARM.h:
 
21731         (JSC::MacroAssemblerARM::branch32):
 
21732         (JSC::MacroAssemblerARM::nearCall):
 
21733         (JSC::MacroAssemblerARM::call):
 
21734         (JSC::MacroAssemblerARM::branchPtrWithPatch):
 
21735         (JSC::MacroAssemblerARM::ensureSpace):
 
21736         (JSC::MacroAssemblerARM::sizeOfConstantPool):
 
21737         (JSC::MacroAssemblerARM::prepareCall):
 
21738         * assembler/X86Assembler.h:
 
21741         (JSC::JIT::compileOpCall):
 
21742         * jit/JITInlineMethods.h:
 
21743         (JSC::JIT::beginUninterruptedSequence):
 
21744         (JSC::JIT::endUninterruptedSequence):
 
21745         * jit/JITPropertyAccess.cpp:
 
21746         (JSC::JIT::emit_op_method_check):
 
21747         (JSC::JIT::compileGetByIdHotPath):
 
21748         (JSC::JIT::compileGetByIdSlowCase):
 
21749         (JSC::JIT::emit_op_put_by_id):
 
21751 2009-08-12  Gavin Barraclough  <barraclough@apple.com>
 
21753         Rubber Stamped by Dave Kilzer.
 
21755         Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7).
 
21759 2009-08-12  Gavin Barraclough  <barraclough@apple.com>
 
21761         Reviewed by Maciej Stachoviak.
 
21763         Ooops - moved code that had been accidentally added to op_new_func instead of
 
21764         op_new_func_exp, to where it shoulds be.
 
21766         * interpreter/Interpreter.cpp:
 
21767         (JSC::Interpreter::privateExecute):
 
21770 2009-08-12  Ada Chan  <adachan@apple.com>
 
21772         Added workaround for the limitation that VirtualFree with MEM_RELEASE
 
21773         can only accept the base address returned by VirtualAlloc when the region
 
21774         was reserved and it can only free the entire region, and not a part of it.
 
21776         Reviewed by Oliver Hunt.
 
21778         * runtime/MarkStack.h:
 
21779         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
 
21780         * runtime/MarkStackWin.cpp:
 
21781         (JSC::MarkStack::releaseStack):
 
21783 2009-08-12  Balazs Kelemen  <kelemen.balazs.3@stud.u-szeged.hu>
 
21785         Reviewed by Ariya Hidayat.
 
21787         Build fix: use std::numeric_limits<long long>::min() instead of LLONG_MIN
 
21788         since LLONG_MIN is not defined in standard c++.
 
21790         * runtime/UString.cpp:
 
21791         (JSC::UString::from):
 
21793 2009-08-12  Benjamin Otte  <otte@gnome.org>
 
21795         Reviewed by Jan Alonzo.
 
21797         Buildfix for Gtk platforms debug builds.
 
21799         * GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp
 
21800         depending on platform.
 
21802 2009-08-12  Simon Hausmann  <simon.hausmann@nokia.com>
 
21804         Prospective build fix for Mac and 32-bit Windows.
 
21806         * runtime/UString.cpp: Include wtf/StringExtras.h for snprintf.
 
21807         (JSC::UString::from): Use %lld instead of %I64d for snprintf
 
21808         on non-windows platforms.
 
21810 2009-08-12  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
 
21812         Reviewed by Simon Hausmann.
 
21814         Fix compile error on 64Bit Windows, when UString::from
 
21815         is called with an intptr_t.
 
21817         Added new UString::From overload with long long parameter.
 
21819         Thanks to Holger for the long long idea.
 
21821         * runtime/UString.cpp:
 
21822         (JSC::UString::from):
 
21823         * runtime/UString.h:
 
21825 2009-08-11  Oliver Hunt  <oliver@apple.com>
 
21827         Reviewed by Mark Rowe.
 
21831         * runtime/UString.h:
 
21832         (JSC::UString::Rep::createEmptyBuffer):
 
21833         * wtf/FastMalloc.h:
 
21834         (WTF::TryMallocReturnValue::getValue):
 
21836 2009-08-11  Oliver Hunt  <oliver@apple.com>
 
21838         Reviewed by Gavin Barraclough.
 
21840         Make it harder to misuse try* allocation routines
 
21841         https://bugs.webkit.org/show_bug.cgi?id=27469
 
21843         Jump through a few hoops to make it much harder to accidentally
 
21844         miss null-checking of values returned by the try-* allocation
 
21847         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
21848         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
21849         * JavaScriptCore.xcodeproj/project.pbxproj:
 
21850         * runtime/JSArray.cpp:
 
21851         (JSC::JSArray::putSlowCase):
 
21852         (JSC::JSArray::increaseVectorLength):
 
21853         * runtime/StringPrototype.cpp:
 
21854         (JSC::stringProtoFuncFontsize):
 
21855         (JSC::stringProtoFuncLink):
 
21856         * runtime/UString.cpp:
 
21858         (JSC::reallocChars):
 
21859         (JSC::expandCapacity):
 
21860         (JSC::UString::Rep::reserveCapacity):
 
21861         (JSC::UString::expandPreCapacity):
 
21863         (JSC::concatenate):
 
21864         (JSC::UString::spliceSubstringsWithSeparators):
 
21865         (JSC::UString::replaceRange):
 
21866         (JSC::UString::append):
 
21867         (JSC::UString::operator=):
 
21868         * runtime/UString.h:
 
21869         (JSC::UString::Rep::createEmptyBuffer):
 
21870         * wtf/FastMalloc.cpp:
 
21871         (WTF::tryFastZeroedMalloc):
 
21872         (WTF::tryFastMalloc):
 
21873         (WTF::tryFastCalloc):
 
21874         (WTF::tryFastRealloc):
 
21875         (WTF::TCMallocStats::tryFastMalloc):
 
21876         (WTF::TCMallocStats::tryFastCalloc):
 
21877         (WTF::TCMallocStats::tryFastRealloc):
 
21878         * wtf/FastMalloc.h:
 
21879         (WTF::TryMallocReturnValue::TryMallocReturnValue):
 
21880         (WTF::TryMallocReturnValue::~TryMallocReturnValue):
 
21881         (WTF::TryMallocReturnValue::operator PossiblyNull<T>):
 
21882         (WTF::TryMallocReturnValue::getValue):
 
21884         * wtf/PossiblyNull.h: Added.
 
21885         (WTF::PossiblyNull::PossiblyNull):
 
21886         (WTF::PossiblyNull::~PossiblyNull):
 
21889 2009-08-11  Gavin Barraclough  <barraclough@apple.com>
 
21891         Reviewed by NOBODY (build fix part deux).
 
21893         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
21894         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
21896 2009-08-11  Gavin Barraclough  <barraclough@apple.com>
 
21898         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
21899         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
21901 2009-08-11  Gavin Barraclough  <barraclough@apple.com>
 
21903         Reviewed by Oliver Hunt.
 
21905         Restrict use of FuncDeclNode & FuncExprNode to the parser.
 
21906         https://bugs.webkit.org/show_bug.cgi?id=28209
 
21908         These objects were also being referenced from the CodeBlock.  By changing this
 
21909         to just retain pointers to FunctionBodyNodes these classes can be restricted to
 
21910         use during parsing.
 
21912         No performance impact (or sub-percent progression).
 
21914         * JavaScriptCore.exp:
 
21917         * bytecode/CodeBlock.cpp:
 
21918         (JSC::CodeBlock::mark):
 
21919         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
 
21920         (JSC::CodeBlock::shrinkToFit):
 
21921         * bytecode/CodeBlock.h:
 
21922         (JSC::CodeBlock::addFunction):
 
21923         (JSC::CodeBlock::function):
 
21924             Unify m_functions & m_functionExpressions into a single Vector<RefPtr<FuncExprNode> >.
 
21926         * bytecompiler/BytecodeGenerator.cpp:
 
21927         (JSC::BytecodeGenerator::BytecodeGenerator):
 
21928         (JSC::BytecodeGenerator::addConstant):
 
21929         (JSC::BytecodeGenerator::emitNewFunction):
 
21930         (JSC::BytecodeGenerator::emitNewFunctionExpression):
 
21931         * bytecompiler/BytecodeGenerator.h:
 
21932             FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
 
21934         * interpreter/Interpreter.cpp:
 
21935         (JSC::Interpreter::execute):
 
21936         (JSC::Interpreter::privateExecute):
 
21937             Update to reflect chnages in CodeBlock.
 
21939         * jit/JITOpcodes.cpp:
 
21940         (JSC::JIT::emit_op_new_func_exp):
 
21941         * jit/JITStubs.cpp:
 
21942         (JSC::DEFINE_STUB_FUNCTION):
 
21945             Update to reflect chnages in CodeBlock.
 
21947         * parser/Grammar.y:
 
21948             FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
 
21950         * parser/NodeConstructors.h:
 
21951         (JSC::FuncExprNode::FuncExprNode):
 
21952         (JSC::FuncDeclNode::FuncDeclNode):
 
21953         * parser/Nodes.cpp:
 
21954         (JSC::ScopeNodeData::mark):
 
21955         (JSC::FunctionBodyNode::finishParsing):
 
21957         (JSC::FunctionBodyNode::ident):
 
21958             Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode.
 
21960         * runtime/JSFunction.h:
 
21961         (JSC::FunctionBodyNode::make):
 
21962             Make this method inline (was FuncDeclNode::makeFunction).
 
21964 2009-08-11  Oliver Hunt  <oliver@apple.com>
 
21966         Reviewed by Gavin Barraclough.
 
21968         Native JSON.stringify does not omit functions
 
21969         https://bugs.webkit.org/show_bug.cgi?id=28117
 
21971         Objects that are callable should be treated as undefined when
 
21972         serialising to JSON.
 
21974         * runtime/JSONObject.cpp:
 
21975         (JSC::Stringifier::appendStringifiedValue):
 
21977 2009-08-11  Oliver Hunt  <oliver@apple.com>
 
21979         Reviewed by Geoff Garen.
 
21981         REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page
 
21982         https://bugs.webkit.org/show_bug.cgi?id=28169
 
21984         Handle the case where someone has attempted to shadow a property
 
21985         on the global object with a constant.
 
21987         * bytecompiler/BytecodeGenerator.cpp:
 
21988         (JSC::BytecodeGenerator::constRegisterFor):
 
21989         * parser/Nodes.cpp:
 
21990         (JSC::ConstDeclNode::emitCodeSingle):
 
21992 2009-08-11  John Gregg  <johnnyg@google.com>
 
21994         Reviewed by Maciej Stachowiak.
 
21996         Desktop Notifications API
 
21997         https://bugs.webkit.org/show_bug.cgi?id=25463
 
21999         Adds ENABLE_NOTIFICATION flag.
 
22001         * Configurations/FeatureDefines.xcconfig:
 
22004 2009-08-11  Maxime Simon  <simon.maxime@gmail.com>
 
22006         Reviewed by Eric Seidel.
 
22008         Modifications on JavaScriptCore to allow Haiku port.
 
22009         https://bugs.webkit.org/show_bug.cgi?id=28121
 
22011         * runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead.
 
22012         (JSC::currentThreadStackBase): Haiku uses its own threading system.
 
22013         * wtf/Platform.h: Defining all Haiku platform values.
 
22014         * wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h).
 
22016 2009-08-11  Jessie Berlin  <jberlin@apple.com>
 
22018         Reviewed by Adam Roben.
 
22022         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22024 2009-08-11  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
22026         Reviewed by Tor Arne Vestbø.
 
22028         Buildfix for Qt-win platforms.
 
22030         * JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform.
 
22032 2009-08-10  Oliver Hunt  <oliver@apple.com>
 
22034         Reviewed by NOBODY (And another build fix).
 
22036         Add new exports for MSVC
 
22038         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
22039         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22040         * JavaScriptCore.xcodeproj/project.pbxproj:
 
22042 2009-08-10  Oliver Hunt  <oliver@apple.com>
 
22044         Reviewed by NOBODY (yet another build fix).
 
22046         Remove obsolete entries from MSVC exports file
 
22048         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
22049         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22051 2009-08-10  Oliver Hunt  <oliver@apple.com>
 
22053         Add includes needed for non-allinonefile builds
 
22055         * runtime/GetterSetter.h:
 
22056         * runtime/ScopeChain.h:
 
22058 2009-08-10  Oliver Hunt  <oliver@apple.com>
 
22060         Fix export file for last build fix
 
22062         * JavaScriptCore.exp:
 
22064 2009-08-10  Oliver Hunt  <oliver@apple.com>
 
22066         Hoist page size initialization into platform specific code.
 
22068         * jit/ExecutableAllocatorPosix.cpp:
 
22069         * jit/ExecutableAllocatorWin.cpp:
 
22070         * runtime/MarkStack.h:
 
22071         (JSC::MarkStack::pageSize):
 
22072         * runtime/MarkStackPosix.cpp:
 
22073         (JSC::MarkStack::initializePagesize):
 
22074         * runtime/MarkStackWin.cpp:
 
22075         (JSC::MarkStack::initializePagesize):
 
22077 2009-08-07  Oliver Hunt  <oliver@apple.com>
 
22079         Reviewed by Gavin Barraclough.
 
22081         Stack overflow crash in JavaScript garbage collector mark pass
 
22082         https://bugs.webkit.org/show_bug.cgi?id=12216
 
22084         Make the GC mark phase iterative by using an explicit mark stack.
 
22085         To do this marking any single object is performed in multiple stages
 
22086           * The object is appended to the MarkStack, this sets the marked
 
22087             bit for the object using the new markDirect() function, and then
 
22089           * When the MarkStack is drain()ed the object is popped off the stack
 
22090             and markChildren(MarkStack&) is called on the object to collect 
 
22091             all of its children.  drain() then repeats until the stack is empty.
 
22093         Additionally I renamed a number of methods from 'mark' to 'markAggregate'
 
22094         in order to make it more clear that marking of those object was not
 
22095         going to result in an actual recursive mark.
 
22098         * JavaScriptCore.exp:
 
22099         * JavaScriptCore.gypi:
 
22100         * JavaScriptCore.pri:
 
22101         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
22102         * JavaScriptCore.xcodeproj/project.pbxproj:
 
22103         * bytecode/CodeBlock.cpp:
 
22104         (JSC::CodeBlock::markAggregate):
 
22105         * bytecode/CodeBlock.h:
 
22106         * bytecode/EvalCodeCache.h:
 
22107         (JSC::EvalCodeCache::markAggregate):
 
22108         * debugger/DebuggerActivation.cpp:
 
22109         (JSC::DebuggerActivation::markChildren):
 
22110         * debugger/DebuggerActivation.h:
 
22111         * interpreter/Register.h:
 
22112         * interpreter/RegisterFile.h:
 
22113         (JSC::RegisterFile::markGlobals):
 
22114         (JSC::RegisterFile::markCallFrames):
 
22115         * parser/Nodes.cpp:
 
22116         (JSC::ScopeNodeData::markAggregate):
 
22117         (JSC::EvalNode::markAggregate):
 
22118         (JSC::FunctionBodyNode::markAggregate):
 
22120         (JSC::ScopeNode::markAggregate):
 
22121         * runtime/ArgList.cpp:
 
22122         (JSC::MarkedArgumentBuffer::markLists):
 
22123         * runtime/ArgList.h:
 
22124         * runtime/Arguments.cpp:
 
22125         (JSC::Arguments::markChildren):
 
22126         * runtime/Arguments.h:
 
22127         * runtime/Collector.cpp:
 
22128         (JSC::Heap::markConservatively):
 
22129         (JSC::Heap::markCurrentThreadConservativelyInternal):
 
22130         (JSC::Heap::markCurrentThreadConservatively):
 
22131         (JSC::Heap::markOtherThreadConservatively):
 
22132         (JSC::Heap::markStackObjectsConservatively):
 
22133         (JSC::Heap::markProtectedObjects):
 
22134         (JSC::Heap::collect):
 
22135         * runtime/Collector.h:
 
22136         * runtime/GetterSetter.cpp:
 
22137         (JSC::GetterSetter::markChildren):
 
22138         * runtime/GetterSetter.h:
 
22139         (JSC::GetterSetter::GetterSetter):
 
22140         (JSC::GetterSetter::createStructure):
 
22141         * runtime/GlobalEvalFunction.cpp:
 
22142         (JSC::GlobalEvalFunction::markChildren):
 
22143         * runtime/GlobalEvalFunction.h:
 
22144         * runtime/JSActivation.cpp:
 
22145         (JSC::JSActivation::markChildren):
 
22146         * runtime/JSActivation.h:
 
22147         * runtime/JSArray.cpp:
 
22148         (JSC::JSArray::markChildren):
 
22149         * runtime/JSArray.h:
 
22150         * runtime/JSCell.h:
 
22151         (JSC::JSCell::markCellDirect):
 
22152         (JSC::JSCell::markChildren):
 
22153         (JSC::JSValue::markDirect):
 
22154         (JSC::JSValue::markChildren):
 
22155         (JSC::JSValue::hasChildren):
 
22156         (JSC::MarkStack::append):
 
22157         (JSC::MarkStack::drain):
 
22158         * runtime/JSFunction.cpp:
 
22159         (JSC::JSFunction::markChildren):
 
22160         * runtime/JSFunction.h:
 
22161         * runtime/JSGlobalData.cpp:
 
22162         (JSC::JSGlobalData::JSGlobalData):
 
22163         * runtime/JSGlobalData.h:
 
22164         * runtime/JSGlobalObject.cpp:
 
22165         (JSC::markIfNeeded):
 
22166         (JSC::JSGlobalObject::markChildren):
 
22167         * runtime/JSGlobalObject.h:
 
22168         * runtime/JSNotAnObject.cpp:
 
22169         (JSC::JSNotAnObject::markChildren):
 
22170         * runtime/JSNotAnObject.h:
 
22171         * runtime/JSONObject.cpp:
 
22172         (JSC::Stringifier::markAggregate):
 
22173         (JSC::JSONObject::markStringifiers):
 
22174         * runtime/JSONObject.h:
 
22175         * runtime/JSObject.cpp:
 
22176         (JSC::JSObject::markChildren):
 
22177         (JSC::JSObject::defineGetter):
 
22178         (JSC::JSObject::defineSetter):
 
22179         * runtime/JSObject.h:
 
22180         * runtime/JSPropertyNameIterator.cpp:
 
22181         (JSC::JSPropertyNameIterator::markChildren):
 
22182         * runtime/JSPropertyNameIterator.h:
 
22183         (JSC::JSPropertyNameIterator::createStructure):
 
22184         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
 
22185         (JSC::JSPropertyNameIterator::create):
 
22186         * runtime/JSStaticScopeObject.cpp:
 
22187         (JSC::JSStaticScopeObject::markChildren):
 
22188         * runtime/JSStaticScopeObject.h:
 
22189         * runtime/JSType.h:
 
22191         * runtime/JSValue.h:
 
22192         * runtime/JSWrapperObject.cpp:
 
22193         (JSC::JSWrapperObject::markChildren):
 
22194         * runtime/JSWrapperObject.h:
 
22195         * runtime/MarkStack.cpp: Added.
 
22196         (JSC::MarkStack::compact):
 
22197         * runtime/MarkStack.h: Added.
 
22199         (JSC::MarkStack::MarkStack):
 
22200         (JSC::MarkStack::append):
 
22201         (JSC::MarkStack::appendValues):
 
22202         (JSC::MarkStack::~MarkStack):
 
22203         (JSC::MarkStack::MarkSet::MarkSet):
 
22204         (JSC::MarkStack::pageSize):
 
22206         MarkStackArray is a non-shrinking, mmap-based vector type
 
22207         used for storing objects to be marked.
 
22208         (JSC::MarkStack::MarkStackArray::MarkStackArray):
 
22209         (JSC::MarkStack::MarkStackArray::~MarkStackArray):
 
22210         (JSC::MarkStack::MarkStackArray::expand):
 
22211         (JSC::MarkStack::MarkStackArray::append):
 
22212         (JSC::MarkStack::MarkStackArray::removeLast):
 
22213         (JSC::MarkStack::MarkStackArray::isEmpty):
 
22214         (JSC::MarkStack::MarkStackArray::size):
 
22215         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
 
22216         * runtime/MarkStackPosix.cpp: Added.
 
22217         (JSC::MarkStack::allocateStack):
 
22218         (JSC::MarkStack::releaseStack):
 
22219         * runtime/MarkStackWin.cpp: Added.
 
22220         (JSC::MarkStack::allocateStack):
 
22221         (JSC::MarkStack::releaseStack):
 
22223         * runtime/ScopeChain.h:
 
22224         * runtime/ScopeChainMark.h:
 
22225         (JSC::ScopeChain::markAggregate):
 
22226         * runtime/SmallStrings.cpp:
 
22227         (JSC::SmallStrings::mark):
 
22228         * runtime/Structure.h:
 
22229         (JSC::Structure::markAggregate):
 
22231 2009-08-10  Mark Rowe  <mrowe@apple.com>
 
22233         Reviewed by Darin Adler.
 
22235         Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot.
 
22237         * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since
 
22238         we implement the nothrow variants of new and new[].  The nothrow variant of delete is called
 
22239         explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated
 
22240         memory being passed to the system allocator to free.
 
22242 2009-08-10  Jan Michael Alonzo  <jmalonzo@webkit.org>
 
22244         [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug
 
22245         section. This file is already part of AllInOneFile in Release builds.
 
22249 2009-08-10  Darin Adler  <darin@apple.com>
 
22251         * wtf/FastMalloc.h: Fix build.
 
22253 2009-08-10  Darin Adler  <darin@apple.com>
 
22255         Reviewed by Mark Rowe.
 
22257         FastMalloc.h has cross-platform code but marked as WinCE-only
 
22258         https://bugs.webkit.org/show_bug.cgi?id=28160
 
22260         1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is
 
22261            not platform-specific.
 
22262         2) The code tried to override operator delete nothrow, which does not exist.
 
22263         3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code
 
22264            in FastMalloc.cpp checks only if the macro is defined.
 
22266         * wtf/FastMalloc.h: See above.
 
22267         * wtf/FastMalloc.cpp: Ditto.
 
22269 2009-08-10  Sam Weinig  <sam@webkit.org>
 
22271         Reviewed by Anders Carlsson.
 
22273         Fix an annoying indentation issue.
 
22275         * runtime/DateConstructor.cpp:
 
22276         (JSC::constructDate):
 
22278 2009-08-10  Xan Lopez  <xlopez@igalia.com>
 
22280         Unreviewed build fix.
 
22282         Add new files to makefile.
 
22286 2009-08-10  Simon Hausmann  <simon.hausmann@nokia.com>
 
22288         Fix compilation with the interpreter instead of the JIT by including
 
22289         PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h.
 
22291         * runtime/ObjectConstructor.cpp:
 
22293 2009-08-09  Oliver Hunt  <oliver@apple.com>
 
22295         Reviewed by George Staikos.
 
22297         JSON.stringify replacer returning undefined does not omit object properties
 
22298         https://bugs.webkit.org/show_bug.cgi?id=28118
 
22300         Correct behaviour of stringify when using a replacer function that returns
 
22301         undefined.  This is a simple change to move the undefined value check to
 
22302         after the replacer function is called.  This means that the replacer function
 
22303         is now called for properties with the value undefined, however i've confirmed
 
22304         that this behaviour is correct.
 
22306         In addition I've made the cyclic object exception have a more useful error
 
22309         * runtime/JSONObject.cpp:
 
22310         (JSC::Stringifier::appendStringifiedValue):
 
22312 2009-08-08  Oliver Hunt  <oliver@apple.com>
 
22314         Reviewed by Eric Seidel and Sam Weinig.
 
22316         [ES5] Implement Object.getPrototypeOf
 
22317         https://bugs.webkit.org/show_bug.cgi?id=28114
 
22319         Implement getPrototypeOf
 
22321         * runtime/CommonIdentifiers.h:
 
22322         * runtime/JSGlobalObject.cpp:
 
22323         (JSC::JSGlobalObject::reset):
 
22324         * runtime/ObjectConstructor.cpp:
 
22325         (JSC::ObjectConstructor::ObjectConstructor):
 
22326         (JSC::objectConsGetPrototypeOf):
 
22327         * runtime/ObjectConstructor.h:
 
22329 2009-08-07  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22331         Reviewed by Eric Seidel.
 
22333         Allow custom memory allocation control for Noncopyable class
 
22334         https://bugs.webkit.org/show_bug.cgi?id=27879
 
22336         Several classes which are inherited from Noncopyable are instantiated by
 
22337         operator new, so Noncopyable class has been inherited from FastAllocBase.
 
22339         * wtf/Noncopyable.h:
 
22341 2009-08-07  George Staikos <george.staikos@torchmobile.com> 
 
22343         Reviewed by Eric Seidel.
 
22345         https://bugs.webkit.org/show_bug.cgi?id=27305
 
22346         Implement WinCE-specific unicode layer.
 
22347         Written by George Staikos <george.staikos@torchmobile.com>
 
22348         with bug fixes by Yong Li <yong.li@torchmobile.com>
 
22349         refactored by Joe Mason <joe.mason@torchmobile.com> 
 
22352         * wtf/unicode/Unicode.h:
 
22353         * wtf/unicode/wince/UnicodeWince.cpp: Added.
 
22354         (WTF::Unicode::toLower):
 
22355         (WTF::Unicode::toUpper):
 
22356         (WTF::Unicode::foldCase):
 
22357         (WTF::Unicode::isPrintableChar):
 
22358         (WTF::Unicode::isSpace):
 
22359         (WTF::Unicode::isLetter):
 
22360         (WTF::Unicode::isUpper):
 
22361         (WTF::Unicode::isLower):
 
22362         (WTF::Unicode::isDigit):
 
22363         (WTF::Unicode::isPunct):
 
22364         (WTF::Unicode::toTitleCase):
 
22365         (WTF::Unicode::direction):
 
22366         (WTF::Unicode::category):
 
22367         (WTF::Unicode::decompositionType):
 
22368         (WTF::Unicode::combiningClass):
 
22369         (WTF::Unicode::mirroredChar):
 
22370         (WTF::Unicode::digitValue):
 
22371         * wtf/unicode/wince/UnicodeWince.h: Added.
 
22373         (WTF::Unicode::isSeparatorSpace):
 
22374         (WTF::Unicode::isHighSurrogate):
 
22375         (WTF::Unicode::isLowSurrogate):
 
22376         (WTF::Unicode::isArabicChar):
 
22377         (WTF::Unicode::hasLineBreakingPropertyComplexContext):
 
22378         (WTF::Unicode::umemcasecmp):
 
22379         (WTF::Unicode::surrogateToUcs4):
 
22381 2009-08-07  Yongjun Zhang  <yongjun.zhang@nokia.com>
 
22383         Reviewed by Eric Seidel.
 
22385         https://bugs.webkit.org/show_bug.cgi?id=28069
 
22387         Add inline to help winscw compiler resolve specialized argument in 
 
22388         templated functions.  
 
22390         * runtime/LiteralParser.cpp:
 
22391         (JSC::LiteralParser::Lexer::lexString):
 
22393 2009-08-07  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22395         Reviewed by Eric Seidel.
 
22397         Allow custom memory allocation control for RegExpObjectData struct
 
22398         http://bugs.webkit.org/show_bug.cgi?id=26750
 
22400         Inherits RegExpObjectData struct from FastAllocBase because
 
22401         it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62
 
22403         * runtime/RegExpObject.h:
 
22405 2009-08-06  Norbert Leser  <norbert.leser@nokia.com>
 
22407         Reviewed by Darin Adler.
 
22409         Updated patch for bug #27059:
 
22410         Symbian platform always uses little endian encoding,
 
22411         regardless of compiler.
 
22412         We need to make sure that we correctly detect EABI architecture
 
22413         for armv5 targets on Symbian,
 
22414         where __EABI__ is set but not __ARM_EABI__
 
22418 2009-08-06  Adam Barth  <abarth@webkit.org>
 
22422         http://bugs.webkit.org/show_bug.cgi?id=27879
 
22424         Revert 46877 because it broke GTK.
 
22426         * wtf/Noncopyable.h:
 
22428 2009-08-06  Gavin Barraclough  <barraclough@apple.com>
 
22430         Reviewed by Oliver Hunt.
 
22432         Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
 
22433         ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
 
22435         This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
 
22436         (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
 
22438         * bytecode/CodeBlock.cpp:
 
22439         (JSC::printStructureStubInfo):
 
22440             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
 
22442         * bytecode/CodeBlock.h:
 
22444         (JSC::CallLinkInfo::seenOnce):
 
22445         (JSC::CallLinkInfo::setSeen):
 
22446         (JSC::MethodCallLinkInfo::seenOnce):
 
22447         (JSC::MethodCallLinkInfo::setSeen):
 
22448             - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
 
22450         * bytecode/StructureStubInfo.cpp:
 
22451         (JSC::StructureStubInfo::deref):
 
22452             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
 
22454         * bytecode/StructureStubInfo.h:
 
22455         (JSC::StructureStubInfo::StructureStubInfo):
 
22456         (JSC::StructureStubInfo::initGetByIdSelf):
 
22457         (JSC::StructureStubInfo::initGetByIdProto):
 
22458         (JSC::StructureStubInfo::initGetByIdChain):
 
22459         (JSC::StructureStubInfo::initGetByIdSelfList):
 
22460         (JSC::StructureStubInfo::initGetByIdProtoList):
 
22461         (JSC::StructureStubInfo::initPutByIdTransition):
 
22462         (JSC::StructureStubInfo::initPutByIdReplace):
 
22463         (JSC::StructureStubInfo::seenOnce):
 
22464         (JSC::StructureStubInfo::setSeen):
 
22465             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
 
22467         * bytecompiler/BytecodeGenerator.cpp:
 
22468         (JSC::BytecodeGenerator::emitGetById):
 
22469         (JSC::BytecodeGenerator::emitPutById):
 
22470             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
 
22473         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
22474         (JSC::JIT::unlinkCall):
 
22475             - Remove the "don't lazy link" stage of calls.
 
22478         (JSC::JIT::compileCTIMachineTrampolines):
 
22479             - Remove the "don't lazy link" stage of calls.
 
22482         (JSC::JIT::compileOpCallSlowCase):
 
22483             - Remove the "don't lazy link" stage of calls.
 
22485         * jit/JITStubs.cpp:
 
22486         (JSC::JITThunks::JITThunks):
 
22487         (JSC::JITThunks::tryCachePutByID):
 
22488         (JSC::JITThunks::tryCacheGetByID):
 
22489         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
 
22490         (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
 
22491             - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
 
22494         (JSC::JITThunks::ctiStringLengthTrampoline):
 
22496             - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
 
22498         * wtf/PtrAndFlags.h:
 
22499         (WTF::PtrAndFlags::PtrAndFlags):
 
22500         (WTF::PtrAndFlags::operator!):
 
22501         (WTF::PtrAndFlags::operator->):
 
22502             - Add ! and -> operators, add constuctor with pointer argument.
 
22504 2009-08-06  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22506         Reviewed by Adam Barth.
 
22508         Allow custom memory allocation control for Noncopyable class
 
22509         https://bugs.webkit.org/show_bug.cgi?id=27879
 
22511         Several classes which inherited from Noncopyable are instantiated by
 
22512         operator new, so Noncopyable class has been inherited from FastAllocBase.
 
22514         * wtf/Noncopyable.h:
 
22516 2009-08-06  Mark Rowe  <mrowe@apple.com>
 
22518         Rubber-stamped by Sam Weinig.
 
22520         Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
 
22522         * JavaScriptCore.xcodeproj/project.pbxproj:
 
22524 2009-08-06  Mark Rowe  <mrowe@apple.com>
 
22526         Bring a little order to our otherwise out of control lives.
 
22528         * JavaScriptCore.xcodeproj/project.pbxproj:
 
22530 2009-08-06  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22532         Reviewed by Darin Adler.
 
22534         Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct
 
22535         https://bugs.webkit.org/show_bug.cgi?id=27877
 
22537         Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by
 
22538         'new' in JavaScriptCore/jit/JITStubs.cpp:1229.
 
22540         * bytecode/Instruction.h:
 
22542 2009-08-05  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22544         Reviewed by Darin Adler.
 
22546         Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct
 
22547         https://bugs.webkit.org/show_bug.cgi?id=27875
 
22549         Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by
 
22550         'new' in JavaScriptCore/parser/Nodes.cpp:1848.
 
22554 2009-08-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
22556         Reviewed by Gavin Barraclough.
 
22558         Add floating point support for generic ARM port.
 
22559         https://bugs.webkit.org/show_bug.cgi?id=24986
 
22561         * assembler/ARMAssembler.cpp:
 
22562         (JSC::ARMAssembler::doubleTransfer):
 
22563         * assembler/ARMAssembler.h:
 
22565         (JSC::ARMAssembler::):
 
22566         (JSC::ARMAssembler::faddd_r):
 
22567         (JSC::ARMAssembler::fsubd_r):
 
22568         (JSC::ARMAssembler::fmuld_r):
 
22569         (JSC::ARMAssembler::fcmpd_r):
 
22570         (JSC::ARMAssembler::fdtr_u):
 
22571         (JSC::ARMAssembler::fdtr_d):
 
22572         (JSC::ARMAssembler::fmsr_r):
 
22573         (JSC::ARMAssembler::fsitod_r):
 
22574         (JSC::ARMAssembler::fmstat):
 
22575         * assembler/MacroAssemblerARM.h:
 
22576         (JSC::MacroAssemblerARM::):
 
22577         (JSC::MacroAssemblerARM::supportsFloatingPoint):
 
22578         (JSC::MacroAssemblerARM::loadDouble):
 
22579         (JSC::MacroAssemblerARM::storeDouble):
 
22580         (JSC::MacroAssemblerARM::addDouble):
 
22581         (JSC::MacroAssemblerARM::subDouble):
 
22582         (JSC::MacroAssemblerARM::mulDouble):
 
22583         (JSC::MacroAssemblerARM::convertInt32ToDouble):
 
22584         (JSC::MacroAssemblerARM::branchDouble):
 
22587 2009-08-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
22589         Reviewed by Gavin Barraclough.
 
22591         Add JIT support for generic ARM port without optimizations.
 
22592         https://bugs.webkit.org/show_bug.cgi?id=24986
 
22594         All JIT optimizations are disabled.
 
22596         Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
 
22597         Signed off by Gabor Loki <loki@inf.u-szeged.hu>
 
22599         * assembler/ARMAssembler.cpp:
 
22600         (JSC::ARMAssembler::baseIndexTransfer32):
 
22601         * assembler/AbstractMacroAssembler.h:
 
22602         (JSC::AbstractMacroAssembler::Imm32::Imm32):
 
22603         * assembler/MacroAssemblerARM.h:
 
22604         (JSC::MacroAssemblerARM::store32):
 
22605         (JSC::MacroAssemblerARM::move):
 
22606         (JSC::MacroAssemblerARM::branch32):
 
22607         (JSC::MacroAssemblerARM::add32):
 
22608         (JSC::MacroAssemblerARM::sub32):
 
22609         (JSC::MacroAssemblerARM::load32):
 
22610         * bytecode/CodeBlock.h:
 
22611         (JSC::CodeBlock::getBytecodeIndex):
 
22613         * jit/JITInlineMethods.h:
 
22614         (JSC::JIT::restoreArgumentReference):
 
22615         * jit/JITOpcodes.cpp:
 
22616         * jit/JITStubs.cpp:
 
22618         (JSC::JITStackFrame::returnAddressSlot):
 
22621 2009-08-04  Gavin Barraclough  <barraclough@apple.com>
 
22623         Rubber Stamped by Oiver Hunt.
 
22625         Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests.
 
22626         https://bugs.webkit.org/show_bug.cgi?id=27874
 
22628         * yarr/RegexInterpreter.cpp:
 
22629         (JSC::Yarr::Interpreter::allocDisjunctionContext):
 
22630         (JSC::Yarr::Interpreter::freeDisjunctionContext):
 
22631         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
 
22632         (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
 
22634 2009-08-04  Oliver Hunt  <oliver@apple.com>
 
22640 2009-08-04  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
 
22642         Reviewed by Adam Treat
 
22644         Explicitly include limits.h header when using INT_MAX and INT_MIN
 
22646         * interpreter/Interpreter.cpp
 
22648 2009-08-03  Harald Fernengel  <harald.fernengel@nokia.com>
 
22650         Reviewed by Darin Adler.
 
22652         Fix compile error for ambigous call to abs()
 
22653         https://bugs.webkit.org/show_bug.cgi?id=27873
 
22655         Fix ambiguity in abs(long int) call by calling labs() instead
 
22657         * wtf/DateMath.cpp: replace call to abs() with labs()
 
22659 2009-08-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
22661         Reviewed by Eric Seidel.
 
22663         [Qt] Consolidate common gcc flags to WebKit.pri
 
22664         https://bugs.webkit.org/show_bug.cgi?id=27934
 
22666         * JavaScriptCore.pro:
 
22668 2009-08-03  Ada Chan  <adachan@apple.com>
 
22670         Fixed the Tiger build.
 
22672         * wtf/FastMalloc.cpp:
 
22674 2009-08-03  Ada Chan  <adachan@apple.com>
 
22676         Reviewed by Darin Adler.
 
22678         Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash.
 
22679         https://bugs.webkit.org/show_bug.cgi?id=27900
 
22681         * wtf/FastMalloc.cpp:
 
22683 2009-08-03  Fumitoshi Ukai  <ukai@chromium.org>
 
22685         Reviewed by Jan Alonzo.
 
22687         Fix build break on Gtk/x86_64.
 
22688         https://bugs.webkit.org/show_bug.cgi?id=27936
 
22690         Use JSVALUE64 for X86_64 LINUX, except Qt.
 
22694 2009-08-02  Xan Lopez  <xlopez@igalia.com>
 
22696         Fix the GTK+ build.
 
22700 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22702         Reviewed by Sam Weinig.
 
22704         Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously
 
22705         crash with it enabled.
 
22709 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22713         Added JSAPIValueWrapper.cpp to the build.
 
22715         * JavaScriptCore.pri:
 
22717 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22721         Exported symbols for JSAPIValueWrapper.
 
22723         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
22724         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22726 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22730         * jit/JITStubs.cpp: #include <stdarg.h>, for a definition of va_start.
 
22732 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22736         * runtime/Collector.cpp: #include <limits.h>, for a definition of ULONG_MAX.
 
22738 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22740         Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject,
 
22741         and JSImmediate::toThisObject, and removed their exported symbols.
 
22743         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
22744         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22745         * runtime/JSImmediate.cpp:
 
22746         * runtime/JSImmediate.h:
 
22748 2009-08-02  Geoffrey Garen  <ggaren@apple.com>
 
22750         Reviewed by Mark Rowe.
 
22752         Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64).
 
22756 2009-08-02  Kevin Ollivier  <kevino@theolliviers.com>
 
22758         Reviewed by Jan Alonzo.
 
22760         Script for building the JavaScriptCore library for wx.
 
22761         https://bugs.webkit.org/show_bug.cgi?id=27619
 
22765 2009-08-02  Yong Li  <yong.li@torchmobile.com>
 
22767         Reviewed by George Staikos.
 
22769         DateMath depends on strftime and localtime, which need to be imported manually on WinCE
 
22770         https://bugs.webkit.org/show_bug.cgi?id=26558
 
22772         * wtf/DateMath.cpp:
 
22774 2009-08-01  David Kilzer  <ddkilzer@apple.com>
 
22776         wtf/Threading.h: added include of Platform.h
 
22778         Reviewed by Mark Rowe.
 
22780         * wtf/Threading.h: Added #include "Platform.h" since this header
 
22781         uses PLATFORM() and other macros.
 
22783 2009-08-01  Mark Rowe  <mrowe@apple.com>
 
22785         Rubber-stamped by Oliver Hunt.
 
22787         Roll out r46668 as it was misinformed.  ScopeChain is only used with placement new.
 
22789         * runtime/ScopeChain.h:
 
22791 2009-08-01  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22793         Allow custom memory allocation control for JavaScriptCore's HashMap class
 
22794         http://bugs.webkit.org/show_bug.cgi?id=27871
 
22796         Inherits HashMap class from FastAllocBase because it has been
 
22797         instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148.
 
22799         * wtf/RefPtrHashMap.h:
 
22802 2009-08-01  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22804         Allow custom memory allocation control for JavaScriptCore's ScopeChain class
 
22805         https://bugs.webkit.org/show_bug.cgi?id=27834
 
22807         Inherits ScopeChain class from FastAllocBase because it has been
 
22808         instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109.
 
22810         * runtime/ScopeChain.h:
 
22812 2009-08-01  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22814         Reviewed by Darin Adler.
 
22816         Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct 
 
22817         https://bugs.webkit.org/show_bug.cgi?id=27833
 
22819         Inherits RegExpConstructorPrivate class from FastAllocBase because it has been
 
22820         instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152.
 
22822         * runtime/RegExpConstructor.cpp:
 
22824 2009-07-31  Yong Li  <yong.li@torchmobile.com>
 
22826         Reviewed by George Staikos.
 
22828         Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER
 
22829         currentSystemTime taken from older WebKit; currentTime written by Yong Li <yong.li@torchmobile.com>; cleanup by Joe Mason <joe.mason@torchmobile.com>
 
22830         https://bugs.webkit.org/show_bug.cgi?id=27848
 
22832         * wtf/CurrentTime.cpp:
 
22833         (WTF::currentSystemTime): get current time with GetCurrentFT
 
22834         (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount
 
22837 2009-07-31  Ada Chan  <adachan@apple.com>
 
22839         Fixes the Windows release-PGO build.
 
22841         Reviewed by Jon Honeycutt.
 
22843         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread().
 
22844         * wtf/FastMalloc.cpp:
 
22845         (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build.
 
22847 2009-07-31  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
22849         Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
 
22850         https://bugs.webkit.org/show_bug.cgi?id=27874
 
22852         Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
 
22854         * yarr/RegexInterpreter.cpp:
 
22855         (JSC::Yarr::Interpreter::allocDisjunctionContext):
 
22856         (JSC::Yarr::Interpreter::freeDisjunctionContext):
 
22857         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
 
22858         (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
 
22860 2009-07-30  Xan Lopez  <xlopez@igalia.com>
 
22862         Reviewed by Jan Alonzo.
 
22864         Fix compiler warning.
 
22866         GCC does not like C++-style comments in preprocessor directives.
 
22870 2009-07-30  John McCall  <rjmccall@apple.com>
 
22872         Reviewed by Gavin Barraclough.
 
22874         Optimize the X86_64 trampolines: avoid the need for filler arguments
 
22875         and move the stub-args area closer to the stack pointer.
 
22877         * jit/JIT.h: adjust patch offsets because of slight code-size change 
 
22879         (JSC::JITCode::execute): don't pass filler args
 
22880         * jit/JITStubs.cpp:
 
22881         (ctiTrampoline): (X86_64): push args onto stack, use args directly
 
22882         (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement
 
22883         (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement
 
22885         (JITStackFrame): (X86_64): move args area earlier
 
22886         (ctiTrampoline): remove filler args from prototype
 
22888 2009-07-30  Gavin Barraclough  <barraclough@apple.com>
 
22890         Temporarily revert r46618 since this is b0rking on Linux.
 
22892 2009-07-23  Gavin Barraclough  <barraclough@apple.com>
 
22894         Reviewed by Oliver Hunt.
 
22896         Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
 
22897         ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
 
22899         This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
 
22900         (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
 
22902         * bytecode/CodeBlock.cpp:
 
22903         (JSC::printStructureStubInfo):
 
22904             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
 
22906         * bytecode/CodeBlock.h:
 
22908         (JSC::CallLinkInfo::seenOnce):
 
22909         (JSC::CallLinkInfo::setSeen):
 
22910         (JSC::MethodCallLinkInfo::seenOnce):
 
22911         (JSC::MethodCallLinkInfo::setSeen):
 
22912             - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
 
22914         * bytecode/StructureStubInfo.cpp:
 
22915         (JSC::StructureStubInfo::deref):
 
22916             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
 
22918         * bytecode/StructureStubInfo.h:
 
22919         (JSC::StructureStubInfo::StructureStubInfo):
 
22920         (JSC::StructureStubInfo::initGetByIdSelf):
 
22921         (JSC::StructureStubInfo::initGetByIdProto):
 
22922         (JSC::StructureStubInfo::initGetByIdChain):
 
22923         (JSC::StructureStubInfo::initGetByIdSelfList):
 
22924         (JSC::StructureStubInfo::initGetByIdProtoList):
 
22925         (JSC::StructureStubInfo::initPutByIdTransition):
 
22926         (JSC::StructureStubInfo::initPutByIdReplace):
 
22927         (JSC::StructureStubInfo::seenOnce):
 
22928         (JSC::StructureStubInfo::setSeen):
 
22929             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
 
22931         * bytecompiler/BytecodeGenerator.cpp:
 
22932         (JSC::BytecodeGenerator::emitGetById):
 
22933         (JSC::BytecodeGenerator::emitPutById):
 
22934             - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
 
22937         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
22938         (JSC::JIT::unlinkCall):
 
22939             - Remove the "don't lazy link" stage of calls.
 
22942         (JSC::JIT::compileCTIMachineTrampolines):
 
22943             - Remove the "don't lazy link" stage of calls.
 
22946         (JSC::JIT::compileOpCallSlowCase):
 
22947             - Remove the "don't lazy link" stage of calls.
 
22949         * jit/JITStubs.cpp:
 
22950         (JSC::JITThunks::JITThunks):
 
22951         (JSC::JITThunks::tryCachePutByID):
 
22952         (JSC::JITThunks::tryCacheGetByID):
 
22953         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
 
22954         (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
 
22955             - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
 
22958         (JSC::JITThunks::ctiStringLengthTrampoline):
 
22960             - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
 
22962         * wtf/PtrAndFlags.h:
 
22963         (WTF::PtrAndFlags::PtrAndFlags):
 
22964         (WTF::PtrAndFlags::operator!):
 
22965         (WTF::PtrAndFlags::operator->):
 
22966             - Add ! and -> operators, add constuctor with pointer argument.
 
22968 2009-07-30  Geoffrey Garen  <ggaren@apple.com>
 
22970         Reviewed by Gavin Barraclough.
 
22972         Fixed failing tests seen on Windows buildbot.
 
22974         * jit/JITStubs.cpp:
 
22975         (JSC::DEFINE_STUB_FUNCTION):
 
22977         (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result,
 
22978         regardless of compiler. gcc on mac uses 32-bit values for bool,
 
22979         but gcc on linux and MSVC on Windows use 8-bit values.
 
22981 2009-07-30  Geoffrey Garen  <ggaren@apple.com>
 
22983         Windows build fix: added missing symbols on Windows.
 
22985         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
22986         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22988 2009-07-30  Geoffrey Garen  <ggaren@apple.com>
 
22990         Windows build fix: removed stale symbols on Windows.
 
22992         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
22993         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
22995 === End merge of nitro-extreme branch 2009-07-30 ===
 
22997 2009-07-20  Geoffrey Garen  <ggaren@apple.com>
 
22999         Fixed a post-review typo in r46066 that caused tons of test failures.
 
23001         SunSpider reports no change.
 
23003         * runtime/JSArray.cpp:
 
23004         (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid
 
23005         uninitialized members at the end.
 
23007 2009-07-20  Geoffrey Garen  <ggaren@apple.com>
 
23009         Windows WebKit build fix: Added some missing exports.
 
23011         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
23012         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
23014 2009-07-17  Geoffrey Garen  <ggaren@apple.com>
 
23016         Reviewed by Sam Weinig.
 
23018         Get the branch working on windows.
 
23019         https://bugs.webkit.org/show_bug.cgi?id=27391
 
23021         SunSpider says 0.3% faster.
 
23023         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
23024         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated
 
23025         MSVC export lists to fix linker errors.
 
23027         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed
 
23028         new / old project files.
 
23031         (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell
 
23032         MSVC that these structures represent actual memory layout, and should not be
 
23033         automatically aligned. Changed the return value load to load a 64bit quantity
 
23034         into the canonical registers.
 
23036         * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because
 
23037         it's needed by more than just the JIT, and it supplements a standard library
 
23041         (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed
 
23042         cast to resolve an MSVC warning.
 
23044         * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures
 
23045         represent actual memory layout, and should not be automatically aligned. 
 
23047         * runtime/JSArray.cpp:
 
23048         (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since
 
23049         memset_pattern8 is not portable. (I verified that this version of the loop
 
23050         gives the best performance / generated code in GCC.)
 
23052         * runtime/JSObject.h:
 
23053         (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET --
 
23054         OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a
 
23055         definition in winnt.h.)
 
23057         * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds.
 
23059         * runtime/JSValue.h:
 
23060         (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values.
 
23061         (GCC doesn't seem to care one way or the other.)
 
23063         * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a
 
23064         while ago to resolve a conflict with winnt.h. I can't remember if it's truly
 
23065         still needed, but what the heck.
 
23067         * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here.
 
23069 2009-07-06  Geoffrey Garen  <ggaren@apple.com>
 
23071         Reviewed by Sam Weinig (?).
 
23073         Fixed an assertion seen during the stress test.
 
23075         Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly,
 
23076         not all constants get folded.
 
23078         * jit/JITArithmetic.cpp:
 
23079         (JSC::JIT::emit_op_jnless):
 
23080         (JSC::JIT::emitSlow_op_jnless):
 
23081         (JSC::JIT::emit_op_jnlesseq):
 
23082         (JSC::JIT::emitSlow_op_jnlesseq):
 
23084 2009-07-06  Geoffrey Garen  <ggaren@apple.com>
 
23086         Reviewed by Sam Weinig.
 
23088         Include op_convert_this in result caching.
 
23090         No change on SunSpider or v8.
 
23092         * jit/JITOpcodes.cpp:
 
23093         (JSC::JIT::emit_op_convert_this):
 
23095         * jit/JITStubs.cpp:
 
23096         (JSC::DEFINE_STUB_FUNCTION):
 
23098         (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so
 
23099         to maintain the result caching contract that { tag, payload } can be
 
23100         found in { regT1, regT0 }.
 
23102 2009-07-06  Geoffrey Garen  <ggaren@apple.com>
 
23104         Reviewed by Sam Weinig.
 
23106         Implemented result chaining.
 
23108         1% faster on SunSpider. 4%-5% faster on v8.
 
23110         * assembler/MacroAssemblerX86Common.h:
 
23111         (JSC::MacroAssemblerX86Common::move):
 
23112         * assembler/X86Assembler.h:
 
23113         (JSC::X86Assembler::movl_rr): Added an optimization to eliminate
 
23114         no-op mov instructions, to simplify chaining.
 
23118         * jit/JIT.h: Added data members and helper functions for recording
 
23119         chained results. We record both a mapping from virtual to machine register
 
23120         and the opcode for which the mapping is valid, to help ensure that the
 
23121         mapping isn't used after the mapped register has been stomped by other
 
23125         (JSC::JIT::compileOpCallVarargs):
 
23126         (JSC::JIT::compileOpCallVarargsSlowCase):
 
23127         (JSC::JIT::emit_op_ret):
 
23128         (JSC::JIT::emit_op_construct_verify):
 
23129         (JSC::JIT::compileOpCall):
 
23130         (JSC::JIT::compileOpCallSlowCase): Chain function call results.
 
23132         * jit/JITInlineMethods.h:
 
23133         (JSC::JIT::emitLoadTag):
 
23134         (JSC::JIT::emitLoadPayload):
 
23135         (JSC::JIT::emitLoad):
 
23136         (JSC::JIT::emitLoad2):
 
23137         (JSC::JIT::isLabeled):
 
23140         (JSC::JIT::isMapped):
 
23141         (JSC::JIT::getMappedPayload):
 
23142         (JSC::JIT::getMappedTag): Use helper functions when loading virtual
 
23143         registers into machine registers, in case the loads can be eliminated
 
23146         * jit/JITOpcodes.cpp:
 
23147         (JSC::JIT::emit_op_mov):
 
23148         (JSC::JIT::emit_op_end):
 
23149         (JSC::JIT::emit_op_instanceof):
 
23150         (JSC::JIT::emit_op_get_global_var):
 
23151         (JSC::JIT::emit_op_put_global_var):
 
23152         (JSC::JIT::emit_op_get_scoped_var):
 
23153         (JSC::JIT::emit_op_put_scoped_var):
 
23154         (JSC::JIT::emit_op_to_primitive):
 
23155         (JSC::JIT::emit_op_resolve_global):
 
23156         (JSC::JIT::emit_op_jneq_ptr):
 
23157         (JSC::JIT::emit_op_next_pname):
 
23158         (JSC::JIT::emit_op_to_jsnumber):
 
23159         (JSC::JIT::emit_op_catch): Chain results from these opcodes.
 
23161         (JSC::JIT::emit_op_profile_will_call):
 
23162         (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to
 
23163         avoid stomping a chained result.
 
23165         * jit/JITPropertyAccess.cpp:
 
23166         (JSC::JIT::emit_op_method_check):
 
23167         (JSC::JIT::emit_op_get_by_val):
 
23168         (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes.
 
23170         * jit/JITStubCall.h:
 
23171         (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate
 
23174         (JSC::JITStubCall::call): Unmap all mapped registers, since our callee
 
23175         stub might stomp them.
 
23177 2009-07-01  Sam Weinig  <sam@webkit.org>
 
23179         Reviewed by Gavin Barraclough.
 
23181         Don't reload values in emitBinaryDoubleOp.
 
23183         SunSpider reports a 0.6% progression. 
 
23186         * jit/JITArithmetic.cpp:
 
23187         (JSC::JIT::emit_op_jnless):
 
23188         (JSC::JIT::emit_op_jnlesseq):
 
23189         (JSC::JIT::emitBinaryDoubleOp):
 
23191 2009-07-01  Sam Weinig  <sam@webkit.org>
 
23193         Reviewed by Geoffrey Garen.
 
23195         Convert op_div to load op1 and op2 up front.
 
23197         * jit/JITArithmetic.cpp:
 
23198         (JSC::JIT::emit_op_div):
 
23200 2009-07-01  Sam Weinig  <sam@webkit.org>
 
23202         Reviewed by Geoffrey Garen.
 
23204         Don't emit code in emitBinaryDoubleOp if code is unreachable, observable
 
23205         via an empty (unlinked) jumplist passed in.  This only effects op_jnless
 
23206         and op_jnlesseq at present.
 
23208         * jit/JITArithmetic.cpp:
 
23209         (JSC::JIT::emitSlow_op_jnless):
 
23210         (JSC::JIT::emitSlow_op_jnlesseq):
 
23211         (JSC::JIT::emitBinaryDoubleOp):
 
23213 2009-07-01  Geoffrey Garen  <ggaren@apple.com>
 
23215         Reviewed by Sam Weinig.
 
23217         Converted op_mod to put { tag, payload } in { regT1, regT0 }, and
 
23218         tidied up its constant case.
 
23220         SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod
 
23221         shows a 12% speedup, and the SunSpider test that uses op_mod most should
 
23222         benefit a lot from result caching in the end, since it almost always
 
23223         performs (expression) % constant.
 
23225         * jit/JITArithmetic.cpp:
 
23226         (JSC::JIT::emit_op_mod):
 
23227         (JSC::JIT::emitSlow_op_mod):
 
23229 2009-06-30  Sam Weinig  <sam@webkit.org>
 
23231         Reviewed by Geoffrey Garen.
 
23233         Converted some more arithmetic ops to put { tag, payload } in
 
23236         * jit/JITArithmetic.cpp:
 
23237         (JSC::JIT::emit_op_mul):
 
23238         (JSC::JIT::emitSlow_op_mul):
 
23240 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23242         Reviewed by Sam Weinig.
 
23244         Converted some more arithmetic ops to put { tag, payload } in
 
23245         { regT1, regT0 }, and added a case for subtract constant.
 
23247         SunSpider says no change. v8 says 0.3% slower.
 
23250         * jit/JITArithmetic.cpp:
 
23251         (JSC::JIT::emit_op_add):
 
23252         (JSC::JIT::emitAdd32Constant):
 
23253         (JSC::JIT::emitSlow_op_add):
 
23254         (JSC::JIT::emit_op_sub):
 
23255         (JSC::JIT::emitSub32Constant):
 
23256         (JSC::JIT::emitSlow_op_sub):
 
23258 2009-06-30  Gavin Barraclough  <barraclough@apple.com>
 
23260         Reviewed by Sam Weinig.
 
23262         Remove more uses of addressFor(), load double constants directly from
 
23263         the constantpool in the CodeBlock, rather than from the register file.
 
23265         * jit/JITArithmetic.cpp:
 
23266         (JSC::JIT::emitAdd32Constant):
 
23267         (JSC::JIT::emitBinaryDoubleOp):
 
23269 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23271         Reviewed by Sam Weinig.
 
23273         Fixed a bug in postfix ops, where we would treat x = x++ and x = x--
 
23274         as a no-op, even if x were not an int, and the ++/-- could have side-effects.
 
23276         * jit/JITArithmetic.cpp:
 
23277         (JSC::JIT::emit_op_post_inc):
 
23278         (JSC::JIT::emitSlow_op_post_inc):
 
23279         (JSC::JIT::emit_op_post_dec):
 
23280         (JSC::JIT::emitSlow_op_post_dec):
 
23282 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23284         Reviewed by Sam Weinig.
 
23286         Converted some arithmetic ops to put { tag, payload } in
 
23289         SunSpider says 0.7% faster. v8 says no change.
 
23292         * jit/JITArithmetic.cpp:
 
23293         (JSC::JIT::emit_op_jnless):
 
23294         (JSC::JIT::emit_op_jnlesseq):
 
23295         (JSC::JIT::emit_op_lshift):
 
23296         (JSC::JIT::emit_op_rshift):
 
23297         (JSC::JIT::emit_op_bitand):
 
23298         (JSC::JIT::emit_op_bitor):
 
23299         (JSC::JIT::emit_op_bitxor):
 
23300         * jit/JITInlineMethods.h:
 
23301         (JSC::JIT::isOperandConstantImmediateInt):
 
23302         (JSC::JIT::getOperandConstantImmediateInt):
 
23304 2009-06-30  Gavin Barraclough  <barraclough@apple.com>
 
23306         Reviewed by Sam Weinig.
 
23308         Start removing cases of addressFor().
 
23311         * jit/JITArithmetic.cpp:
 
23312         (JSC::JIT::emitAdd32Constant):
 
23313         (JSC::JIT::emitBinaryDoubleOp):
 
23314         (JSC::JIT::emit_op_div):
 
23315         * jit/JITInlineMethods.h:
 
23316         (JSC::JIT::emitLoadDouble):
 
23317         (JSC::JIT::emitLoadInt32ToDouble):
 
23318         (JSC::JIT::emitStoreDouble):
 
23319         * jit/JITOpcodes.cpp:
 
23320         (JSC::JIT::emit_op_jfalse):
 
23321         (JSC::JIT::emit_op_jtrue):
 
23323 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23325         Rolled back in my last patch with regression fixed.
 
23328         (JSC::JIT::privateCompileSlowCases):
 
23330         * jit/JITOpcodes.cpp:
 
23331         (JSC::JIT::emit_op_loop_if_less):
 
23332         (JSC::JIT::emit_op_loop_if_lesseq):
 
23333         (JSC::JIT::emit_op_resolve_global):
 
23334         (JSC::JIT::emitSlow_op_resolve_global):
 
23335         (JSC::JIT::emit_op_eq):
 
23336         (JSC::JIT::emitSlow_op_eq):
 
23337         (JSC::JIT::emit_op_neq):
 
23338         (JSC::JIT::emitSlow_op_neq):
 
23340 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23342         Rolled out my last patch because it was a 2% SunSpider regression.
 
23345         (JSC::JIT::privateCompileSlowCases):
 
23347         * jit/JITOpcodes.cpp:
 
23348         (JSC::JIT::emit_op_loop_if_less):
 
23349         (JSC::JIT::emit_op_loop_if_lesseq):
 
23350         (JSC::JIT::emit_op_resolve_global):
 
23351         (JSC::JIT::emit_op_eq):
 
23352         (JSC::JIT::emitSlow_op_eq):
 
23353         (JSC::JIT::emit_op_neq):
 
23354         (JSC::JIT::emitSlow_op_neq):
 
23356 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23358         Reviewed by Gavin "Sam Weinig" Barraclough.
 
23360         Standardized the rest of our opcodes to put { tag, payload } in
 
23361         { regT1, regT0 } where possible.
 
23364         (JSC::JIT::privateCompileSlowCases):
 
23366         * jit/JITOpcodes.cpp:
 
23367         (JSC::JIT::emit_op_loop_if_less):
 
23368         (JSC::JIT::emit_op_loop_if_lesseq):
 
23369         (JSC::JIT::emit_op_resolve_global):
 
23370         (JSC::JIT::emitSlow_op_resolve_global):
 
23371         (JSC::JIT::emit_op_eq):
 
23372         (JSC::JIT::emitSlow_op_eq):
 
23373         (JSC::JIT::emit_op_neq):
 
23374         (JSC::JIT::emitSlow_op_neq):
 
23376 2009-06-30  Gavin Barraclough  <barraclough@apple.com>
 
23378         Reviewed by Geoffrey Garen.
 
23380         Replace calls to store32(tagFor()) and store32(payloadFor())
 
23381         with emitStoreInt32(), emitStoreBool(), and emitStoreCell().
 
23384         * jit/JITArithmetic.cpp:
 
23385         (JSC::JIT::emit_op_negate):
 
23386         (JSC::JIT::emit_op_lshift):
 
23387         (JSC::JIT::emit_op_rshift):
 
23388         (JSC::JIT::emit_op_bitand):
 
23389         (JSC::JIT::emitBitAnd32Constant):
 
23390         (JSC::JIT::emit_op_bitor):
 
23391         (JSC::JIT::emitBitOr32Constant):
 
23392         (JSC::JIT::emit_op_bitxor):
 
23393         (JSC::JIT::emitBitXor32Constant):
 
23394         (JSC::JIT::emit_op_bitnot):
 
23395         (JSC::JIT::emit_op_post_inc):
 
23396         (JSC::JIT::emit_op_post_dec):
 
23397         (JSC::JIT::emit_op_pre_inc):
 
23398         (JSC::JIT::emit_op_pre_dec):
 
23399         (JSC::JIT::emit_op_add):
 
23400         (JSC::JIT::emitAdd32Constant):
 
23401         (JSC::JIT::emit_op_sub):
 
23402         (JSC::JIT::emitSub32ConstantLeft):
 
23403         (JSC::JIT::emitSub32ConstantRight):
 
23404         (JSC::JIT::emit_op_mul):
 
23405         (JSC::JIT::emitSlow_op_mul):
 
23406         (JSC::JIT::emit_op_div):
 
23407         (JSC::JIT::emit_op_mod):
 
23409         (JSC::JIT::emit_op_load_varargs):
 
23410         * jit/JITInlineMethods.h:
 
23411         (JSC::JIT::emitStoreInt32):
 
23412         (JSC::JIT::emitStoreCell):
 
23413         (JSC::JIT::emitStoreBool):
 
23414         (JSC::JIT::emitStore):
 
23415         * jit/JITOpcodes.cpp:
 
23416         (JSC::JIT::emit_op_instanceof):
 
23417         (JSC::JIT::emit_op_not):
 
23418         (JSC::JIT::emit_op_eq):
 
23419         (JSC::JIT::emitSlow_op_eq):
 
23420         (JSC::JIT::emit_op_neq):
 
23421         (JSC::JIT::emitSlow_op_neq):
 
23422         (JSC::JIT::compileOpStrictEq):
 
23423         (JSC::JIT::emit_op_eq_null):
 
23424         (JSC::JIT::emit_op_neq_null):
 
23425         * jit/JITStubCall.h:
 
23426         (JSC::JITStubCall::call):
 
23428 2009-06-30  Geoffrey Garen  <ggaren@apple.com>
 
23430         Reviewed by Sam Weinig.
 
23432         Standardized the rest of the property access instructions to put { tag,
 
23433         payload } in { regT1, regT0 }.
 
23435         Small v8 speedup, 0.2% SunSpider slowdown.
 
23438         * jit/JITInlineMethods.h:
 
23439         (JSC::JIT::emitLoad):
 
23440         (JSC::JIT::emitLoad2):
 
23441         * jit/JITPropertyAccess.cpp:
 
23442         (JSC::JIT::emit_op_get_by_val):
 
23443         (JSC::JIT::emitSlow_op_get_by_val):
 
23444         (JSC::JIT::emit_op_put_by_val):
 
23445         (JSC::JIT::emitSlow_op_put_by_val):
 
23446         (JSC::JIT::emit_op_put_by_id):
 
23447         (JSC::JIT::emitSlow_op_put_by_id):
 
23448         (JSC::JIT::patchPutByIdReplace):
 
23450 2009-06-29  Sam Weinig  <sam@webkit.org>
 
23452         Reviewed by Gavin Barraclough.
 
23455         - Use fpRegT* instead of X86::xmm*.
 
23456         - Use a switch statement in emitBinaryDoubleOp instead of a bunch of
 
23459         * jit/JITArithmetic.cpp:
 
23460         (JSC::JIT::emitAdd32Constant):
 
23461         (JSC::JIT::emitBinaryDoubleOp):
 
23462         (JSC::JIT::emit_op_div):
 
23464 2009-06-29  Sam Weinig  <sam@webkit.org>
 
23466         Reviewed by Geoffrey Garen.
 
23468         Add inline code dealing with doubles for op_jfalse and op_jtrue.
 
23470         * assembler/MacroAssemblerX86Common.h:
 
23471         (JSC::MacroAssemblerX86Common::):
 
23472         (JSC::MacroAssemblerX86Common::zeroDouble):
 
23473         * jit/JITOpcodes.cpp:
 
23474         (JSC::JIT::emit_op_jfalse):
 
23475         (JSC::JIT::emit_op_jtrue):
 
23477 2009-06-28  Geoffrey Garen  <ggaren@apple.com>
 
23479         Reviewed by Sam Weinig.
 
23481         Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }.
 
23483         SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization
 
23484         this enables will win much more than that back.
 
23487         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
23489         * jit/JITPropertyAccess.cpp:
 
23490         (JSC::JIT::emit_op_method_check):
 
23491         (JSC::JIT::emit_op_get_by_id):
 
23492         (JSC::JIT::compileGetByIdHotPath):
 
23493         (JSC::JIT::compileGetByIdSlowCase):
 
23494         (JSC::JIT::patchGetByIdSelf):
 
23495         (JSC::JIT::privateCompilePatchGetArrayLength):
 
23496         (JSC::JIT::privateCompileGetByIdProto):
 
23497         (JSC::JIT::privateCompileGetByIdSelfList):
 
23498         (JSC::JIT::privateCompileGetByIdProtoList):
 
23499         (JSC::JIT::privateCompileGetByIdChainList):
 
23500         (JSC::JIT::privateCompileGetByIdChain):
 
23502 2009-06-26  Geoffrey Garen  <ggaren@apple.com>
 
23504         Reviewed by Maciej Stachowiak.
 
23506         Standardized op_call to put { tag, payload } in { regT1, regT0 }.
 
23508         SunSpider and v8 report no change.
 
23511         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
23513         (JSC::JIT::compileOpCallInitializeCallFrame):
 
23514         (JSC::JIT::compileOpCallSetupArgs):
 
23515         (JSC::JIT::compileOpConstructSetupArgs):
 
23516         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
23517         (JSC::JIT::compileOpCallVarargs):
 
23518         (JSC::JIT::compileOpCall):
 
23519         (JSC::JIT::compileOpCallSlowCase):
 
23521 2009-06-26  Sam Weinig  <sam@webkit.org>
 
23523         Reviewed by Geoffrey Garen.
 
23525         Handle multiplying by zero a little better by
 
23526         inlining the case that both operands are non-negative
 
23529         * assembler/MacroAssemblerX86Common.h:
 
23530         (JSC::MacroAssemblerX86Common::branchOr32):
 
23531         * jit/JITArithmetic.cpp:
 
23532         (JSC::JIT::emit_op_mul):
 
23533         (JSC::JIT::emitSlow_op_mul):
 
23535 2009-06-25  Geoffrey Garen  <ggaren@apple.com>
 
23537         Reviewed by Sam Weinig.
 
23539         Optimize x++ to ++x inside for loops.
 
23541         Sadly, no measurable speedup, but this should help with result chaining.
 
23543         * parser/Nodes.cpp:
 
23544         (JSC::ForNode::emitBytecode):
 
23546 2009-06-25  Geoffrey Garen  <ggaren@apple.com>
 
23548         Reviewed by Sam Weinig.
 
23550         Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
 
23552         * jit/JITArithmetic.cpp:
 
23553         (JSC::JIT::emitSlow_op_bitnot):
 
23554         (JSC::JIT::emit_op_post_inc):
 
23556 2009-06-25  Geoffrey Garen  <ggaren@apple.com>
 
23558         Reviewed by Sam Weinig.
 
23560         Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
 
23562         * jit/JITArithmetic.cpp:
 
23563         (JSC::JIT::emit_op_bitnot):
 
23564         (JSC::JIT::emit_op_post_dec):
 
23565         (JSC::JIT::emit_op_pre_inc):
 
23566         (JSC::JIT::emitSlow_op_pre_inc):
 
23567         (JSC::JIT::emit_op_pre_dec):
 
23568         (JSC::JIT::emitSlow_op_pre_dec):
 
23570 2009-06-25  Geoffrey Garen  <ggaren@apple.com>
 
23572         Reviewed by Sam Weinig.
 
23574         Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
 
23576         * jit/JITArithmetic.cpp:
 
23577         (JSC::JIT::emit_op_negate):
 
23578         (JSC::JIT::emitSlow_op_negate):
 
23580         (JSC::JIT::emit_op_construct_verify):
 
23581         (JSC::JIT::emitSlow_op_construct_verify):
 
23583 2009-06-25  Geoffrey Garen  <ggaren@apple.com>
 
23585         Reviewed by Sam Weinig.
 
23587         Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
 
23589         * jit/JITOpcodes.cpp:
 
23590         (JSC::JIT::emit_op_loop_if_true):
 
23591         (JSC::JIT::emit_op_jfalse):
 
23592         (JSC::JIT::emit_op_jtrue):
 
23593         (JSC::JIT::emit_op_jeq_null):
 
23594         (JSC::JIT::emit_op_jneq_null):
 
23595         (JSC::JIT::emit_op_eq_null):
 
23596         (JSC::JIT::emit_op_neq_null):
 
23598 2009-06-25  Geoffrey Garen  <ggaren@apple.com>
 
23600         Reviewed by Sam Weinig (sort of, maybe).
 
23602         Fixed some ASSERTs in http/tests/security.
 
23604         These ASSERTs were introduced by http://trac.webkit.org/changeset/45057,
 
23605         but the underlying problem was actually older. http://trac.webkit.org/changeset/45057
 
23606         just exposed the problem by enabling optimization in more cases.
 
23608         The ASSERTs fired because we tested PropertySlot::slotBase() for validity,
 
23609         but slotBase() ASSERTs if it's invalid, so we would ASSERT before
 
23610         the test could happen. Solution: Remove the ASSERT. Maybe it was valid
 
23611         once, but it clearly goes against a pattern we've deployed of late.
 
23613         The underlying problem was that WebCore would re-use a PropertySlot in
 
23614         the case of a forwarding access, and the second use would not completely
 
23615         overwrite the first use. Solution: Make sure to overwrite m_offset when
 
23616         setting a value on a PropertySlot. (Other values already get implicitly
 
23617         overwritten during reuse.)
 
23619         * runtime/PropertySlot.h:
 
23620         (JSC::PropertySlot::PropertySlot):
 
23621         (JSC::PropertySlot::setValueSlot):
 
23622         (JSC::PropertySlot::setValue):
 
23623         (JSC::PropertySlot::setRegisterSlot):
 
23624         (JSC::PropertySlot::setUndefined):
 
23625         (JSC::PropertySlot::slotBase):
 
23626         (JSC::PropertySlot::clearOffset):
 
23628 2009-06-24  Gavin Barraclough  <barraclough@apple.com>
 
23630         Reviewed by Geoff Garen.
 
23632         Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT.
 
23635         * jit/JITPropertyAccess.cpp:
 
23636         (JSC::JIT::emit_op_method_check):
 
23637         (JSC::JIT::emitSlow_op_method_check):
 
23638         (JSC::JIT::emit_op_get_by_id):
 
23639         (JSC::JIT::compileGetByIdHotPath):
 
23640         (JSC::JIT::emitSlow_op_get_by_id):
 
23641         (JSC::JIT::compileGetByIdSlowCase):
 
23643 2009-06-23  Geoffrey Garen  <ggaren@apple.com>
 
23645         Reviewed by Sam Weinig.
 
23647         Bit off a tiny bit more of standardizing opcode behavior to help with result
 
23650         SunSpider reports no change, v8 maybe a tiny speedup.
 
23652         * jit/JITOpcodes.cpp:
 
23653         (JSC::JIT::emit_op_to_jsnumber):
 
23654         (JSC::JIT::emitSlow_op_to_jsnumber):
 
23655         (JSC::JIT::emit_op_convert_this):
 
23656         (JSC::JIT::emitSlow_op_convert_this):
 
23658 2009-06-23  Geoffrey Garen  <ggaren@apple.com>
 
23660         Reviewed by Sam Weinig.
 
23662         Bit off a tiny bit more of standardizing opcode behavior to help with result
 
23663         caching -- including removing my old enemy, op_resolve_function, because
 
23664         it was non-standard, and removing it felt better than helping it limp along.
 
23666         SunSpider reports no change, v8 maybe a tiny speedup.
 
23668         * bytecode/CodeBlock.cpp:
 
23669         (JSC::CodeBlock::dump):
 
23670         * bytecode/Opcode.h:
 
23671         * bytecompiler/BytecodeGenerator.cpp:
 
23672         * bytecompiler/BytecodeGenerator.h:
 
23673         * interpreter/Interpreter.cpp:
 
23674         (JSC::Interpreter::privateExecute):
 
23676         (JSC::JIT::privateCompileMainPass):
 
23678         * jit/JITOpcodes.cpp:
 
23679         (JSC::JIT::emit_op_get_scoped_var):
 
23680         (JSC::JIT::emit_op_put_scoped_var):
 
23681         (JSC::JIT::emit_op_to_primitive):
 
23682         (JSC::JIT::emitSlow_op_to_primitive):
 
23683         * jit/JITStubs.cpp:
 
23685         * parser/Nodes.cpp:
 
23686         (JSC::FunctionCallResolveNode::emitBytecode):
 
23688 2009-06-23  Geoffrey Garen  <ggaren@apple.com>
 
23690         Reviewed by Sam Weinig.
 
23692         Bit off a tiny bit of standardizing opcode behavior to help with result
 
23695         0.6% SunSpider speedup. 0.3% v8 speedup.
 
23697         * jit/JITInlineMethods.h:
 
23698         (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload
 
23699         by loading tag before payload, to avoid stomping base/payload.
 
23701         * jit/JITOpcodes.cpp:
 
23702         (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in
 
23705         (JSC::JIT::emit_op_get_global_var):
 
23706         (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent
 
23707         loads while I was at it. The global object's "d" pointer never changes
 
23708         after construction.
 
23710 2009-06-23  Gavin Barraclough  <barraclough@apple.com>
 
23712         Reviewed by Sam Weinig.
 
23714         Remove 'arguments' field from Register union (again).
 
23715         This time do so without breaking tests (radical, I know).
 
23717         * interpreter/CallFrame.h:
 
23718         (JSC::ExecState::optionalCalleeArguments):
 
23719         (JSC::ExecState::setArgumentCount):
 
23720         (JSC::ExecState::init):
 
23721         * interpreter/Interpreter.cpp:
 
23722         (JSC::Interpreter::dumpRegisters):
 
23723         (JSC::Interpreter::unwindCallFrame):
 
23724         (JSC::Interpreter::privateExecute):
 
23725         (JSC::Interpreter::retrieveArguments):
 
23726         * interpreter/Register.h:
 
23727         (JSC::Register::withInt):
 
23729         (JSC::Register::Register):
 
23730         (JSC::Register::i):
 
23731         * jit/JITStubs.cpp:
 
23732         (JSC::JITStubs::cti_op_tear_off_arguments):
 
23733         * runtime/Arguments.h:
 
23734         (JSC::JSActivation::copyRegisters):
 
23735         (JSC::Register::arguments):
 
23736         * runtime/JSActivation.cpp:
 
23737         (JSC::JSActivation::argumentsGetter):
 
23738         * runtime/JSActivation.h:
 
23740 2009-06-23  Geoffrey Garen  <ggaren@apple.com>
 
23742         Reviewed by Sam Weinig.
 
23744         Removed some result register tracking cruft in preparation for a new
 
23745         result tracking mechanism.
 
23747         SunSpider reports no change.
 
23749         * assembler/AbstractMacroAssembler.h:
 
23750         * assembler/X86Assembler.h:
 
23751         (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in
 
23752         machine code; we already do this in bytecode.
 
23756         (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result
 
23757         registers, so an opcode with a timeout check can still benefit from result
 
23760         (JSC::JIT::privateCompileMainPass):
 
23761         (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister()
 
23762         in preparation for something new.
 
23765         * jit/JITArithmetic.cpp:
 
23766         (JSC::JIT::emit_op_jnless):
 
23767         (JSC::JIT::emit_op_jnlesseq):
 
23768         * jit/JITInlineMethods.h:
 
23769         (JSC::JIT::emitGetFromCallFrameHeaderPtr):
 
23770         (JSC::JIT::emitGetFromCallFrameHeader32):
 
23771         * jit/JITOpcodes.cpp:
 
23772         (JSC::JIT::emit_op_jmp):
 
23773         (JSC::JIT::emit_op_jfalse):
 
23774         (JSC::JIT::emit_op_jtrue):
 
23775         (JSC::JIT::emit_op_jeq_null):
 
23776         (JSC::JIT::emit_op_jneq_null):
 
23777         (JSC::JIT::emit_op_jneq_ptr):
 
23778         (JSC::JIT::emit_op_jsr):
 
23779         (JSC::JIT::emit_op_sret):
 
23780         (JSC::JIT::emit_op_jmp_scopes): ditto
 
23782         * jit/JITStubCall.h:
 
23783         (JSC::JITStubCall::JITStubCall):
 
23784         (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument
 
23785         you passed to a JIT stub, for use in emitTimeoutCheck.
 
23787 2009-06-23  Sam Weinig  <sam@webkit.org>
 
23789         Reviewed by Geoffrey Garen.
 
23791         Remove now-useless inplace variants of binary ops.
 
23794         * jit/JITArithmetic.cpp:
 
23795         (JSC::JIT::emit_op_bitand):
 
23796         (JSC::JIT::emit_op_bitor):
 
23797         (JSC::JIT::emit_op_bitxor):
 
23798         (JSC::JIT::emit_op_add):
 
23799         (JSC::JIT::emit_op_sub):
 
23800         (JSC::JIT::emit_op_mul):
 
23802 2009-06-23  Sam Weinig  <sam@webkit.org>
 
23804         Reviewed by Geoffrey Garen.
 
23806         Move off memory operands to aid in re-enabling result caching.
 
23808         - No regression measured.
 
23811         * jit/JITArithmetic.cpp:
 
23812         (JSC::JIT::emit_op_negate):
 
23813         (JSC::JIT::emit_op_jnless):
 
23814         (JSC::JIT::emit_op_jnlesseq):
 
23815         (JSC::JIT::emit_op_lshift):
 
23816         (JSC::JIT::emit_op_rshift):
 
23817         (JSC::JIT::emit_op_bitand):
 
23818         (JSC::JIT::emitBitAnd32Constant):
 
23819         (JSC::JIT::emitBitAnd32InPlace):
 
23820         (JSC::JIT::emit_op_bitor):
 
23821         (JSC::JIT::emitBitOr32Constant):
 
23822         (JSC::JIT::emitBitOr32InPlace):
 
23823         (JSC::JIT::emit_op_bitxor):
 
23824         (JSC::JIT::emitBitXor32Constant):
 
23825         (JSC::JIT::emitBitXor32InPlace):
 
23826         (JSC::JIT::emit_op_bitnot):
 
23827         (JSC::JIT::emit_op_post_inc):
 
23828         (JSC::JIT::emit_op_post_dec):
 
23829         (JSC::JIT::emit_op_pre_inc):
 
23830         (JSC::JIT::emitSlow_op_pre_inc):
 
23831         (JSC::JIT::emit_op_pre_dec):
 
23832         (JSC::JIT::emitSlow_op_pre_dec):
 
23833         (JSC::JIT::emit_op_add):
 
23834         (JSC::JIT::emitAdd32Constant):
 
23835         (JSC::JIT::emitAdd32InPlace):
 
23836         (JSC::JIT::emitSlow_op_add):
 
23837         (JSC::JIT::emitSlowAdd32Constant):
 
23838         (JSC::JIT::emit_op_sub):
 
23839         (JSC::JIT::emitSlow_op_sub):
 
23840         (JSC::JIT::emitSub32ConstantLeft):
 
23841         (JSC::JIT::emitSub32ConstantRight):
 
23842         (JSC::JIT::emitSub32InPlaceLeft):
 
23843         (JSC::JIT::emitSub32InPlaceRight):
 
23844         (JSC::JIT::emitBinaryDoubleOp):
 
23845         (JSC::JIT::emit_op_mul):
 
23846         (JSC::JIT::emitMul32InPlace):
 
23847         (JSC::JIT::emit_op_div):
 
23848         (JSC::JIT::emit_op_mod):
 
23850         (JSC::JIT::compileOpCallVarargs):
 
23851         * jit/JITOpcodes.cpp:
 
23852         (JSC::JIT::emit_op_loop_if_less):
 
23853         (JSC::JIT::emit_op_loop_if_lesseq):
 
23854         (JSC::JIT::emit_op_instanceof):
 
23855         (JSC::JIT::emit_op_to_primitive):
 
23856         (JSC::JIT::emit_op_not):
 
23857         (JSC::JIT::emit_op_jneq_ptr):
 
23858         (JSC::JIT::emit_op_eq):
 
23859         (JSC::JIT::emit_op_neq):
 
23860         (JSC::JIT::emit_op_to_jsnumber):
 
23861         * jit/JITPropertyAccess.cpp:
 
23862         (JSC::JIT::emit_op_get_by_val):
 
23863         (JSC::JIT::emit_op_put_by_val):
 
23865 2009-06-23  Geoffrey Garen  <ggaren@apple.com>
 
23867         Reviewed by Sam Weinig.
 
23869         Fixed some missing and/or misplaced labels in bytecode generation, so
 
23870         we don't have to work around them in JIT code generation.
 
23872         * bytecompiler/BytecodeGenerator.cpp:
 
23873         (JSC::BytecodeGenerator::emitJumpSubroutine):
 
23874         * parser/Nodes.cpp:
 
23875         (JSC::TryNode::emitBytecode):
 
23877 2009-06-22  Geoffrey Garen  <ggaren@apple.com>
 
23879         Reviewed by Sam Weinig.
 
23881         For member function calls, emit "this" directly into the "this" slot
 
23882         for the function call, instead of moving it there later. This reduces
 
23883         time spent in op_mov during certain calls, like "a.b.c()".
 
23885         1%-2% speedup on v8, mostly richards and delta-blue.
 
23887         * parser/Nodes.cpp:
 
23888         (JSC::FunctionCallDotNode::emitBytecode):
 
23890 2009-06-22  Gavin Barraclough  <barraclough@apple.com>
 
23892         Reviewed by Sam Weinig.
 
23894         Remove 'arguments' field from Register union.  Having JSCell derived types in the union is
 
23895         dangerous since it opens the possibility for the field to be written as a raw pointer but
 
23896         then read as a JSValue.  This will lead to statle data being read for the tag, which may
 
23897         be dangerous.  Having removed Arguments* types form Register, all arguments objects must
 
23898         always explicitly be stored in the register file as JSValues.
 
23900         * interpreter/CallFrame.h:
 
23901         (JSC::ExecState::optionalCalleeArguments):
 
23902         * interpreter/Interpreter.cpp:
 
23903         (JSC::Interpreter::unwindCallFrame):
 
23904         (JSC::Interpreter::privateExecute):
 
23905         (JSC::Interpreter::retrieveArguments):
 
23906         * interpreter/Register.h:
 
23908         * jit/JITStubs.cpp:
 
23909         (JSC::JITStubs::cti_op_tear_off_arguments):
 
23910         * runtime/Arguments.h:
 
23911         (JSC::JSActivation::copyRegisters):
 
23912         * runtime/JSActivation.cpp:
 
23913         (JSC::JSActivation::argumentsGetter):
 
23914         * runtime/JSActivation.h:
 
23916 2009-06-03  Sam Weinig  <sam@webkit.org>
 
23918         Reviewed by Geoffrey Garen.
 
23920         Add back known this value optimization by abstracting
 
23921         slow case if not JSCell jumps.
 
23925         (JSC::JIT::compileOpCallVarargs):
 
23926         (JSC::JIT::compileOpCallVarargsSlowCase):
 
23927         (JSC::JIT::compileOpCall):
 
23928         (JSC::JIT::compileOpCallSlowCase):
 
23929         * jit/JITInlineMethods.h:
 
23930         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
 
23931         (JSC::JIT::linkSlowCaseIfNotJSCell):
 
23932         * jit/JITOpcodes.cpp:
 
23933         (JSC::JIT::emit_op_instanceof):
 
23934         (JSC::JIT::emitSlow_op_instanceof):
 
23935         * jit/JITPropertyAccess.cpp:
 
23936         (JSC::JIT::emit_op_get_by_val):
 
23937         (JSC::JIT::emitSlow_op_get_by_val):
 
23938         (JSC::JIT::emit_op_put_by_val):
 
23939         (JSC::JIT::emitSlow_op_put_by_val):
 
23940         (JSC::JIT::emit_op_get_by_id):
 
23941         (JSC::JIT::emitSlow_op_get_by_id):
 
23942         (JSC::JIT::emit_op_put_by_id):
 
23943         (JSC::JIT::emitSlow_op_put_by_id):
 
23945 2009-06-01  Geoffrey Garen  <ggaren@apple.com>
 
23947         Reviewed by Sam Weinig.
 
23949         Fixed some of the regression in crypto-aes.js. (8.5% speedup in
 
23952         SunSpider reports no change overall.
 
23954         Division was producing double results, which took the slow path through
 
23957         Strangely, all my attempts at versions of this patch that modified array
 
23958         access code to accept ints encoded as doubles along the fast or slow paths
 
23959         were regressions. So I did this instead.
 
23961         * jit/JITArithmetic.cpp:
 
23962         (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try
 
23963         to turn the result into an int. Don't just do int division, though, because
 
23964         testing shows it to be slower than SSE double division, and the corner
 
23965         cases are pretty complicated / lengthy on top of that. Also, don't try
 
23966         to canonicalize division of known tiny numerators into ints, since that's a
 
23969 2009-05-26  Geoffrey Garen  <ggaren@apple.com>
 
23971         Reviewed by Oliver Hunt.
 
23973         Fixed a regression caused by my recent fix for NaN.
 
23975         * jit/JITArithmetic.cpp:
 
23976         (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse
 
23977         order, like the ChangeLog said we would, bokay?
 
23979 2009-05-26  Geoffrey Garen  <ggaren@apple.com>
 
23981         Reviewed by Sam Weinig and Oliver Hunt.
 
23983         Fixed two edge cases in %:
 
23985         - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1,
 
23986         which will signal a hardware exception due to overflow.
 
23988         - In the case of a zero remainder, be sure to store negative zero if the
 
23991         SunSpider reports no change.
 
23993         * jit/JITArithmetic.cpp:
 
23994         (JSC::JIT::emit_op_mod):
 
23995         (JSC::JIT::emitSlow_op_mod):
 
23997 2009-05-25  Geoffrey Garen  <ggaren@apple.com>
 
23999         Reviewed by Maciej Stachowiak.
 
24001         Fixed a regression when comparing to NaN.
 
24003         * jit/JITArithmetic.cpp:
 
24004         (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the
 
24005         comparison in reverse order, and jump if the result is below or 
 
24006         below-or-equal. This ensures that we do jump in the case of NaN.
 
24008 2009-05-25  Geoffrey Garen  <ggaren@apple.com>
 
24010         Reviewed by Oliver Hunt.
 
24012         SunSpider says no change.
 
24014         Fixed regressions in fast/js/var-declarations-shadowing.html and
 
24015         fast/js/equality.html, caused by recent == and != optimizations.
 
24017         * jit/JITStubs.cpp:
 
24018         (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always
 
24019         numeric or string comparison. If the second operand is an object, you
 
24020         need to ToPrimitive it, and start all over again. Also, I wrote out each
 
24021         of the possible cases explicitly, to cut down on redundant branching.
 
24023 2009-05-25  Sam Weinig  <sam@webkit.org>
 
24025         Reviewed by Mark Rowe.
 
24027         Fix bug in fast/js/constant-folding.html where we were not negating
 
24030         * jit/JITArithmetic.cpp:
 
24031         (JSC::JIT::emit_op_negate):
 
24033 2009-05-23  Geoffrey Garen  <ggaren@apple.com>
 
24035         Reviewed by Oliver Hunt.
 
24037         Refactored new slow case codegen for == and !=.
 
24039         SunSpider reports no change, maybe a tiny speedup.
 
24041         * jit/JITOpcodes.cpp:
 
24042         (JSC::JIT::emitSlow_op_eq):
 
24043         (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation,
 
24044         instead of *32, to make it portable to 64bit. Reorganized the string
 
24045         and generic cases to make their control flow a little clearer.
 
24047 2009-05-23  Geoffrey Garen  <ggaren@apple.com>
 
24049         Reviewed by Maciej Stachowiak.
 
24051         Optimized == and != for our new value representation -- especially for strings.
 
24053         14% speedup on date-format-tofte.
 
24055         * jit/JITOpcodes.cpp:
 
24056         (JSC::JIT::emit_op_eq):
 
24057         (JSC::JIT::emitSlow_op_eq):
 
24058         (JSC::JIT::emit_op_neq):
 
24059         (JSC::JIT::emitSlow_op_neq):
 
24060         * jit/JITStubCall.h:
 
24061         (JSC::JITStubCall::JITStubCall):
 
24062         * jit/JITStubs.cpp:
 
24063         (JSC::JITStubs::cti_op_eq):
 
24064         (JSC::JITStubs::cti_op_eq_strings):
 
24065         (JSC::JITStubs::cti_op_call_eval):
 
24068         * runtime/JSValue.h:
 
24070 2009-05-22  Sam Weinig  <sam@webkit.org>
 
24072         Reviewed by Gavin Barraclough.
 
24074         Fix non-SSE enabled builds.
 
24076         * jit/JITArithmetic.cpp:
 
24077         (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub.
 
24078         (JSC::JIT::emitSlow_op_sub): Ditto.
 
24080 2009-05-22  Geoffrey Garen  <ggaren@apple.com>
 
24082         Reviewed by Sam Weinig.
 
24084         Here's a thought: let's not take a jit stub call just to multiply by 1,
 
24087         imul doesn't set the zero flag, so to test for a zero result, we need
 
24088         an explicit instruction. (Luckily, it does set the overflow flag, so
 
24089         we can still use that.)
 
24092         * jit/JITArithmetic.cpp:
 
24093         (JSC::JIT::emit_op_mul):
 
24094         (JSC::JIT::emitSlow_op_mul):
 
24095         (JSC::JIT::emitMul32InPlace):
 
24097 2009-05-22  Sam Weinig  <sam@webkit.org>
 
24099         Reviewed by Geoffrey "Premature Commit" Garen.
 
24101         Add back constant integer cases for op_add.
 
24104         * jit/JITArithmetic.cpp:
 
24105         (JSC::JIT::emit_op_add):
 
24106         (JSC::JIT::emitAdd32Constant):
 
24107         (JSC::JIT::emitSlow_op_add):
 
24108         (JSC::JIT::emitSlowAdd32Constant):
 
24109         * jit/JITInlineMethods.h:
 
24110         (JSC::JIT::getConstantOperandImmediateDouble):
 
24111         (JSC::JIT::isOperandConstantImmediateDouble):
 
24113 2009-05-22  Geoffrey Garen  <ggaren@apple.com>
 
24115         Reviewed by Sam Weinig.
 
24117         Added fast double cases for op_jnless and op_jnlesseq.
 
24119         * assembler/AbstractMacroAssembler.h:
 
24120         (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by
 
24123         * assembler/X86Assembler.h:
 
24124         (JSC::X86Assembler::ucomisd_rm): New method for comparing register to
 
24128         * jit/JITArithmetic.cpp:
 
24129         (JSC::JIT::emit_op_jnless):
 
24130         (JSC::JIT::emitSlow_op_jnless):
 
24131         (JSC::JIT::emit_op_jnlesseq):
 
24132         (JSC::JIT::emitSlow_op_jnlesseq):
 
24133         (JSC::JIT::emit_op_add):
 
24134         (JSC::JIT::emit_op_sub):
 
24135         (JSC::JIT::emitBinaryDoubleOp):
 
24136         (JSC::JIT::emit_op_mul):
 
24137         (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump
 
24138         operations in addition to operations with explicit result registers.
 
24140         * jit/JITInlineMethods.h:
 
24141         (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients
 
24142         can track multiple jumps to the same slow case condition together.
 
24144 2009-05-21  Sam Weinig  <sam@webkit.org>
 
24146         Reviewed by Gavin Barraclough.
 
24148         Implement op_negate inline fast cases.
 
24150         * assembler/MacroAssemblerX86Common.h:
 
24151         (JSC::MacroAssemblerX86Common::neg32):
 
24152         * assembler/X86Assembler.h:
 
24153         (JSC::X86Assembler::):
 
24154         (JSC::X86Assembler::negl_m):
 
24155         (JSC::X86Assembler::xorpd_rr):
 
24157         (JSC::JIT::privateCompileMainPass):
 
24158         (JSC::JIT::privateCompileSlowCases):
 
24160         * jit/JITArithmetic.cpp:
 
24161         (JSC::JIT::emit_op_negate):
 
24162         (JSC::JIT::emitSlow_op_negate):
 
24164 2009-05-20  Sam Weinig  <sam@webkit.org>
 
24166         Reviewed by Gavin Barraclough.
 
24168         Update the patchOffsetGetByIdSlowCaseCall constant for the
 
24169         case that OPCODE_SAMPLING is enabled.
 
24173 2009-05-20  Geoffrey Garen  <ggaren@apple.com>
 
24175         Reviewed by Sam Weinig.
 
24177         Added support for inline subtraction of doubles.
 
24179         * jit/JITArithmetic.cpp:
 
24180         (JSC::JIT::emit_op_sub):
 
24181         (JSC::JIT::emitSlow_op_sub):
 
24182         (JSC::JIT::emitSlowSub32InPlaceLeft):
 
24183         (JSC::JIT::emitBinaryDoubleOp):
 
24185 2009-05-20  Sam Weinig  <sam@webkit.org>
 
24187         Reviewed by Geoffrey Garen.
 
24189         Added support for inline division.
 
24191         * assembler/X86Assembler.h:
 
24192         (JSC::X86Assembler::):
 
24193         (JSC::X86Assembler::divsd_rr):
 
24194         (JSC::X86Assembler::divsd_mr):
 
24195         * bytecode/CodeBlock.cpp:
 
24196         (JSC::CodeBlock::dump):
 
24197         * bytecode/Opcode.h:
 
24198         * bytecompiler/BytecodeGenerator.cpp:
 
24199         (JSC::BytecodeGenerator::emitBinaryOp):
 
24200         * interpreter/Interpreter.cpp:
 
24201         (JSC::Interpreter::privateExecute):
 
24203         (JSC::JIT::privateCompileMainPass):
 
24204         (JSC::JIT::privateCompileSlowCases):
 
24206         * jit/JITArithmetic.cpp:
 
24207         (JSC::JIT::emitBinaryDoubleOp):
 
24208         (JSC::JIT::emit_op_div):
 
24209         (JSC::JIT::emitSlow_op_div):
 
24211 2009-05-20  Geoffrey Garen  <ggaren@apple.com>
 
24213         Reviewed by Sam Weinig.
 
24215         Added support for inline addition of doubles.
 
24217         * jit/JITArithmetic.cpp:
 
24218         (JSC::JIT::emit_op_add):
 
24219         (JSC::JIT::emitSlow_op_add):
 
24220         (JSC::JIT::emitSlowAdd32InPlace):
 
24221         (JSC::JIT::emitBinaryDoubleOp):
 
24222         (JSC::JIT::emit_op_mul):
 
24223         (JSC::JIT::emitSlow_op_mul):
 
24225 2009-05-20  Geoffrey Garen  <ggaren@apple.com>
 
24227         Reviewed by Sam Weinig.
 
24229         Factored inline double operations into a helper function, so that we
 
24230         can reuse this code for other math operations.
 
24233         * jit/JITArithmetic.cpp:
 
24234         (JSC::JIT::emitBinaryDoubleOp):
 
24235         (JSC::JIT::emit_op_mul):
 
24237         (JSC::JIT::compileOpCallInitializeCallFrame):
 
24239 2009-05-20  Geoffrey Garen  <ggaren@apple.com>
 
24241         Reviewed by Sam Weinig.
 
24243         Added support for inline multiplication of doubles.
 
24245         * assembler/X86Assembler.h:
 
24246         (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an
 
24247         int32 into a double register.
 
24249         * jit/JITArithmetic.cpp:
 
24250         (JSC::JIT::emit_op_mul):
 
24251         (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic.
 
24254         * jit/JITInlineMethods.h:
 
24255         (JSC::JIT::addressFor): New function, useful for addressing a JSValue's
 
24256         full 64bits as a double.
 
24258 2009-05-19  Sam Weinig  <sam@webkit.org>
 
24260         Reviewed by Geoffrey Garen.
 
24262         Implement and enable optimized calls.
 
24265         (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards
 
24266         around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink).
 
24267         Update the trampolines to account for the new JSValue representation.
 
24268         (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue. 
 
24271         (JSC::JIT::compileOpCall): Update to account for the new JSValue representation
 
24272         (JSC::JIT::compileOpCallSlowCase): Ditto.
 
24274         * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard.
 
24276         * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL.
 
24278 2009-05-19  Sam Weinig  <sam@webkit.org>
 
24280         Reviewed by Geoffrey Garen.
 
24282         Implement and enable optimized property access.
 
24284         * assembler/AbstractMacroAssembler.h: Fix comment.
 
24286         (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline
 
24287         and implement the string length trampoline.
 
24288         * jit/JIT.h: Add new constants for patch offsets.
 
24289         * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h.
 
24290         * jit/JITPropertyAccess.cpp: 
 
24291         (JSC::JIT::emit_op_get_by_id):
 
24292         (JSC::JIT::emitSlow_op_get_by_id):
 
24293         (JSC::JIT::emit_op_put_by_id):
 
24294         (JSC::JIT::emitSlow_op_put_by_id):
 
24295         (JSC::JIT::compilePutDirectOffset):
 
24296         (JSC::JIT::compileGetDirectOffset):
 
24297         (JSC::JIT::privateCompilePutByIdTransition):
 
24298         (JSC::JIT::patchGetByIdSelf):
 
24299         (JSC::JIT::patchPutByIdReplace):
 
24300         (JSC::JIT::privateCompilePatchGetArrayLength):
 
24301         (JSC::JIT::privateCompileGetByIdProto):
 
24302         (JSC::JIT::privateCompileGetByIdSelfList):
 
24303         (JSC::JIT::privateCompileGetByIdProtoList):
 
24304         (JSC::JIT::privateCompileGetByIdChainList):
 
24305         (JSC::JIT::privateCompileGetByIdChain):
 
24306         * jit/JITStubCall.h:
 
24307         (JSC::JITStubCall::addArgument): Add version of addArgument that takes
 
24308         two registers for the tag and payload.
 
24309         * jit/JITStubs.cpp:
 
24310         (JSC::JITStubs::JITStubs): Remove array length trampoline pointer.
 
24311         (JSC::JITStubs::cti_op_get_by_id_self_fail): 
 
24313         * runtime/JSObject.h:
 
24314         (JSC::JSObject::JSObject): Move m_inheritorID below the property storage
 
24315         to align it to a 16 byte boundary.
 
24316         * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
 
24317         * wtf/StdLibExtras.h: Move FIELD_OFFSET here.
 
24319 2009-05-17  Sam Weinig  <sam@webkit.org>
 
24321         Reviewed by Geoffrey Garen.
 
24323         Remove unneeded ExecState parameter from the number JSValue constructors.
 
24325         * runtime/JSValue.h:
 
24328         (JSC::JSValue::JSValue):
 
24330 2009-05-15  Sam Weinig  <sam@webkit.org>
 
24332         Reviewed by Geoffrey Garen.
 
24334         Implemented fast path for op_put_by_val when putting to arrays.
 
24336         * jit/JITPropertyAccess.cpp:
 
24337         (JSC::JIT::emit_op_put_by_val):
 
24338         (JSC::JIT::emitSlow_op_put_by_val):
 
24340 2009-05-15  Geoffrey Garen  <ggaren@apple.com> (Mostly by Sam)
 
24342         Reviewed by Sam Weinig.
 
24344         Implemented fast path for op_get_by_val when accessing array.
 
24347         * jit/JITPropertyAccess.cpp:
 
24348         (JSC::JIT::emit_op_get_by_val):
 
24349         (JSC::JIT::emitSlow_op_get_by_val):
 
24351 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24353         Reviewed by Sam Weinig.
 
24355         Fixed a failure in fast/js/math-transforms.html caused by failing to
 
24356         preserve -0 in multiplication.
 
24358         * assembler/X86Assembler.h:
 
24359         (JSC::X86Assembler::jz):
 
24360         * jit/JITArithmetic.cpp:
 
24361         (JSC::JIT::emit_op_mul):
 
24362         (JSC::JIT::emitSlow_op_mul):
 
24363         (JSC::JIT::emitMul32Constant):
 
24364         (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when
 
24365         doing multiplication. Use a slow case to get these right.
 
24367 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24369         Reviewed by Sam Weinig.
 
24371         Fixed a bug in the varargs calling convention.
 
24374         (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1,
 
24375         since that's where ctiVirtualCall expects it to be.
 
24377 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24379         Reviewed by Sam Weinig.
 
24381         Fixed a small bug in instanceof's looping code.
 
24383         * jit/JITOpcodes.cpp:
 
24384         (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype,
 
24385         so only loop when *not* equal to NULL.
 
24387 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24389         Reviewed by Sam Weinig.
 
24391         Fixed a small bug in instanceof's result writing code.
 
24393         * jit/JITOpcodes.cpp:
 
24394         (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits
 
24397 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24399         Reviewed by Geoffrey Garen.
 
24401         Removed an invalid assertion in cti_op_urshift which
 
24402         depended on a fast path for op_urshift which has
 
24405         * jit/JITStubs.cpp:
 
24406         (JSC::JITStubs::cti_op_urshift):
 
24408 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24410         Reviewed by Sam Weinig.
 
24412         Fixed loop_if_true, which had the same reversed test that jtrue had.
 
24414         * jit/JITOpcodes.cpp:
 
24415         (JSC::JIT::emit_op_loop_if_true):
 
24417 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24419         Reviewed by Geoffrey Garen.
 
24421         In op_neq, we apparently want to check that one value
 
24422         does *not* equal another.  Go figure.
 
24424         * jit/JITOpcodes.cpp:
 
24425         (JSC::JIT::emit_op_neq):
 
24427 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24429         Reviewed by Geoffrey Garen.
 
24431         The slow case of op_mod should call op_mod's jit stub,
 
24432         not op_mul.  That would be dumb.
 
24434         * jit/JITArithmetic.cpp:
 
24435         (JSC::JIT::emitSlow_op_mod):
 
24437 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24439         Reviewed by Sam Weinig.
 
24441         Fixed problems when using 'arguments' due to a half-initialized register.
 
24443         * interpreter/CallFrame.h:
 
24444         (JSC::ExecState::setCalleeArguments):
 
24445         (JSC::ExecState::init): Require a full JSValue when setting up the 
 
24446         'arguments' virtual register, since this register is accessible from JIT
 
24447         code and bytecode, and needs to be a true JSValue.
 
24449         * interpreter/CallFrameClosure.h:
 
24450         (JSC::CallFrameClosure::resetCallFrame): ditto
 
24452         * interpreter/Interpreter.cpp:
 
24453         (JSC::Interpreter::privateExecute): ditto
 
24455         * interpreter/Register.h: Removed the constructor that allowed assignment
 
24456         of a JSArguments* to a register. That is not safe. See above.
 
24458         * jit/JITStubs.cpp:
 
24459         (JSC::JITStubs::cti_op_create_arguments):
 
24460         (JSC::JITStubs::cti_op_create_arguments_no_params): ditto
 
24462 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24464         Reviewed by Geoffrey Garen.
 
24466         We really want to go to the slow case in op_jfalse and
 
24467         op_jtrue if the value is *not* boolean. 
 
24469         * jit/JITOpcodes.cpp:
 
24470         (JSC::JIT::emit_op_jfalse):
 
24471         (JSC::JIT::emit_op_jtrue):
 
24473 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24475         Reviewed by Geoffrey Garen.
 
24477         Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq
 
24478         if the first operand is a constant.
 
24480         * jit/JITOpcodes.cpp:
 
24481         (JSC::JIT::emit_op_loop_if_less):
 
24482         (JSC::JIT::emit_op_loop_if_lesseq):
 
24484 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24486         Reviewed by Geoffrey Garen.
 
24488         Added missing return in op_jnless and op_jnlesseq. 
 
24490         * jit/JITArithmetic.cpp:
 
24491         (JSC::JIT::emit_op_jnless):
 
24492         (JSC::JIT::emit_op_jnlesseq):
 
24494 2009-05-14  Sam Weinig  <sam@webkit.org>
 
24496         Reviewed by Geoffrey Garen.
 
24498         Load constants into the the register file as a temporary measure to
 
24499         aid bring up.  This allows us to use to treat constants like any
 
24500         other virtual register.
 
24502         * jit/JITOpcodes.cpp:
 
24503         (JSC::JIT::emit_op_enter):
 
24504         (JSC::JIT::emit_op_enter_with_activation):
 
24506 2009-05-14  Geoffrey Garen  <ggaren@apple.com>
 
24508         Reviewed by Sam Weinig.
 
24510         Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin.
 
24512         * assembler/MacroAssemblerX86Common.h:
 
24513         (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly
 
24514         faster than set32, and the new value representation usually doesn't
 
24519         * jit/JITInlineMethods.h:
 
24520         (JSC::JIT::emitLoadTag):
 
24521         (JSC::JIT::emitLoadPayload): Added helper functions for dealing with
 
24522         constants. Eventually, we should write special cases for all constants,
 
24523         but these are helpful in the short term.
 
24525         * jit/JITOpcodes.cpp:
 
24526         (JSC::JIT::compileOpStrictEq):
 
24527         (JSC::JIT::emitSlow_op_stricteq):
 
24528         (JSC::JIT::emitSlow_op_nstricteq): teh opcodez.
 
24530         * runtime/JSValue.h:
 
24532         (JSC::JSValue::isDouble): Added a LowestTag for clarity.
 
24534 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24536         Reviewed by Sam Weinig.
 
24538         Fixed some bugs in host function calls.
 
24540         testapi now passes!
 
24542         * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax,
 
24543         which is how JSValues are now returned. Also changed the code that
 
24544         passes thisValue to pass the full 64bits of the value. Also added
 
24545         an #error compiler directive to other platform builds, since the JSValue
 
24546         return signature probably won't return in edx:eax on those platforms,
 
24547         and we'll have to investigate a solution.
 
24549 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24551         Reviewed by Sam Weinig.
 
24553         Removed parameters from functions that are intended never to use their
 
24556         * jit/JITPropertyAccess.cpp:
 
24557         (JSC::JIT::emitSlow_op_get_by_val):
 
24558         (JSC::JIT::emitSlow_op_put_by_val):
 
24560 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24562         Reviewed by Sam Weinig.
 
24564         Ported op_instance_of from TOT. It's basically the same, but some register
 
24565         stuff changed to memory stuff.
 
24567         * jit/JITInlineMethods.h:
 
24568         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
 
24569         (JSC::JIT::emitStore): Changed to use helper functions.
 
24571         * jit/JITOpcodes.cpp:
 
24572         (JSC::JIT::emit_op_instanceof):
 
24573         (JSC::JIT::emitSlow_op_instanceof): Ported from TOT.
 
24575 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24577         Reviewed by Gavin Barraclough.
 
24579         Added a comment to explain an exception-handling subtelty that we found
 
24580         hard to remember when reviewing my last patch.
 
24582         * jit/JITOpcodes.cpp:
 
24583         (JSC::JIT::emit_op_catch):
 
24585 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24587         Reviewed by Sam Weinig.
 
24589         Implemented try/catch.
 
24591         * jit/JITOpcodes.cpp:
 
24592         (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction.
 
24593         (JSC::JIT::emit_op_catch): Filled out.
 
24595 2009-05-13  Sam Weinig  <sam@webkit.org>
 
24597         Reviewed by Geoffrey Garen.
 
24599         Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null
 
24601         * jit/JITOpcodes.cpp:
 
24602         (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its
 
24605         (JSC::JIT::emit_op_loop_if_true): Similar to the old version
 
24606         in that it tries to do the integer case first and reduce the
 
24607         number of jumps you might need to take.
 
24608         (JSC::JIT::emitSlow_op_loop_if_true):
 
24610         (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only
 
24611         the inverse and without a timeout check.
 
24612         (JSC::JIT::emitSlow_op_jfalse):
 
24614         (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except
 
24615         without the timeout check.
 
24616         (JSC::JIT::emitSlow_op_jtrue):
 
24618         (JSC::JIT::emit_op_jeq_null): Very similar to the implementation
 
24619         of op_eq, except it takes jumps instead of copying the condition
 
24621         (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq.
 
24623 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24625         Reviewed by Sam Weinig.
 
24627         Implemented op_call_varargs.
 
24630         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
24631         (JSC::JIT::compileOpCallVarargs):
 
24632         (JSC::JIT::emit_op_call):
 
24633         (JSC::JIT::emit_op_call_eval):
 
24634         (JSC::JIT::emit_op_load_varargs):
 
24635         (JSC::JIT::emit_op_call_varargs):
 
24636         (JSC::JIT::emit_op_construct):
 
24637         * jit/JITOpcodes.cpp:
 
24638         (JSC::JIT::emit_op_jneq_ptr):
 
24640 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24642         Reviewed by Sam Weinig.
 
24644         Implemented op_call_eval.
 
24647         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
24648         (JSC::JIT::compileOpCall):
 
24649         * jit/JITStubCall.h:
 
24650         (JSC::CallEvalJITStub::CallEvalJITStub):
 
24652 2009-05-13  Sam Weinig  <sam@webkit.org>
 
24654         Reviewed by Gavin Barraclough.
 
24656         Implemented op_not. (Gavin did most of the work!)
 
24658         * jit/JITOpcodes.cpp:
 
24659         (JSC::JIT::emit_op_not):
 
24660         (JSC::JIT::emitSlow_op_not):
 
24662 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24664         Reviewed by Sam Weinig.
 
24666         Implemented op_global_resolve.
 
24668         * jit/JITOpcodes.cpp:
 
24669         (JSC::JIT::emit_op_loop_if_less):
 
24670         (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed
 
24673         (JSC::JIT::emit_op_resolve_global):
 
24674         * jit/JITStubs.cpp:
 
24675         (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code,
 
24676         but we need two reads and a TimesEight step in order to account for the
 
24680         (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*,
 
24681         to avoid having to pass an irrelevant tag pointer to the stub.
 
24683 2009-05-13  Sam Weinig  <sam@webkit.org>
 
24685         Reviewed by Geoffrey Garen.
 
24687         Implemented op_to_jsnumber.
 
24689         * jit/JITOpcodes.cpp:
 
24690         (JSC::JIT::emit_op_to_jsnumber):
 
24691         (JSC::JIT::emitSlow_op_to_jsnumber):
 
24693 2009-05-13  Sam Weinig  <sam@webkit.org>
 
24695         Reviewed by Geoffrey Garen.
 
24697         Implemented op_convert_this.
 
24699         * jit/JITOpcodes.cpp:
 
24700         (JSC::JIT::emit_op_convert_this):
 
24701         (JSC::JIT::emitSlow_op_convert_this):
 
24703 2009-05-13  Geoffrey Garen  <ggaren@apple.com>
 
24705         Reviewed by Sam Weinig.
 
24707         Got basic JS function and constructor calls working.
 
24710         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
24713         (JSC::JIT::compileOpCallSetupArgs):
 
24714         (JSC::JIT::compileOpCallVarargsSetupArgs):
 
24715         (JSC::JIT::compileOpConstructSetupArgs):
 
24716         (JSC::JIT::emit_op_ret):
 
24717         (JSC::JIT::emit_op_construct_verify):
 
24718         (JSC::JIT::emitSlow_op_construct_verify):
 
24719         (JSC::JIT::emitSlow_op_call):
 
24720         (JSC::JIT::emitSlow_op_call_eval):
 
24721         (JSC::JIT::emitSlow_op_call_varargs):
 
24722         (JSC::JIT::emitSlow_op_construct):
 
24723         (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out.
 
24725         * jit/JITInlineMethods.h:
 
24726         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
 
24727         (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions,
 
24728         since I wanted to avoid the complexity of revamping the API here while
 
24729         trying to bring it up. Eventually, we should re-remove all of these functions.
 
24731         (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will
 
24732         not silence me, Sam Weinig! The world will know that you are a crufty,
 
24733         crufty, crufty programmer!!!
 
24735         * jit/JITOpcodes.cpp:
 
24736         * jit/JITStubs.cpp:
 
24738         * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since
 
24739         and off-by-one error was causing stack misalignment.
 
24741 2009-05-13  Sam Weinig  <sam@webkit.org>
 
24743         Reviewed by Geoffrey Garen.
 
24745         Implement op_eq_null and op_neq_null.
 
24747         * assembler/MacroAssemblerX86Common.h:
 
24748         (JSC::MacroAssemblerX86Common::set8):
 
24749         (JSC::MacroAssemblerX86Common::setTest8):
 
24750         * jit/JITOpcodes.cpp:
 
24751         (JSC::JIT::emit_op_stricteq):
 
24752         (JSC::JIT::emitSlow_op_stricteq):
 
24753         (JSC::JIT::emit_op_nstricteq):
 
24754         (JSC::JIT::emitSlow_op_nstricteq):
 
24755         (JSC::JIT::emit_op_eq_null):
 
24756         (JSC::JIT::emit_op_neq_null):
 
24759 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24761         Reviewed by Geoffrey Garen.
 
24763         Implement op_new_error.
 
24765         * jit/JITOpcodes.cpp:
 
24766         (JSC::JIT::emit_op_new_error):
 
24767         * jit/JITStubCall.h:
 
24768         (JSC::JITStubCall::addArgument): Add a version of addArgument
 
24769         that takes a constant JSValue.
 
24771 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24773         Reviewed by Geoffrey Garen.
 
24775         Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister.
 
24780 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24782         Reviewed by Geoffrey Garen.
 
24784         Implement op_to_primitive and op_next_pname.
 
24786         * jit/JITOpcodes.cpp:
 
24787         (JSC::JIT::emitSlow_op_construct_verify):
 
24788         (JSC::JIT::emit_op_to_primitive):
 
24789         (JSC::JIT::emitSlow_op_to_primitive):
 
24790         (JSC::JIT::emitSlow_op_loop_if_true):
 
24791         (JSC::JIT::emit_op_jtrue):
 
24792         (JSC::JIT::emit_op_next_pname):
 
24794 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24796         Reviewed by Geoffrey Garen.
 
24798         Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and
 
24799         op_unexpected_load.
 
24802         * jit/JITInlineMethods.h:
 
24803         (JSC::JIT::tagFor):
 
24804         (JSC::JIT::payloadFor):
 
24805         (JSC::JIT::emitLoad):
 
24806         (JSC::JIT::emitStore):
 
24807         (JSC::JIT::emitLoadReturnValue):
 
24808         * jit/JITOpcodes.cpp:
 
24809         (JSC::JIT::emit_op_get_global_var):
 
24810         (JSC::JIT::emit_op_put_global_var):
 
24811         (JSC::JIT::emit_op_get_scoped_var):
 
24812         (JSC::JIT::emit_op_put_scoped_var):
 
24813         (JSC::JIT::emit_op_unexpected_load):
 
24815 2009-05-12  Geoffrey Garen  <ggaren@apple.com>
 
24817         Reviewed by Sam Weinig.
 
24819         Added overflow handling to op_sub.
 
24822         * jit/JITArithmetic.cpp:
 
24823         (JSC::JIT::emitSlow_op_sub):
 
24824         (JSC::JIT::emitSlowSub32InPlaceLeft):
 
24826 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24828         Reviewed by Geoffrey Garen.
 
24830         Remove a function call by folding op_get_by_id and op_put_by_id into
 
24831         their respective compile functions.
 
24834         * jit/JITPropertyAccess.cpp:
 
24835         (JSC::JIT::emit_op_get_by_id):
 
24836         (JSC::JIT::emitSlow_op_get_by_id):
 
24837         (JSC::JIT::emit_op_put_by_id):
 
24838         (JSC::JIT::emitSlow_op_put_by_id):
 
24840 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24842         Reviewed by Geoffrey Garen.
 
24844         Make JITStubCall work in 64bit by making the stack index
 
24845         step dependent on the size of void*.
 
24847         * jit/JITStubCall.h:
 
24848         (JSC::JITStubCall::JITStubCall):
 
24849         (JSC::JITStubCall::addArgument):
 
24851 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24853         Reviewed by Geoffrey Garen.
 
24855         Implement simple version of property access opcodes
 
24856         which just call a stub functions.
 
24858         * jit/JITOpcodes.cpp:
 
24859         * jit/JITPropertyAccess.cpp:
 
24860         (JSC::JIT::emitSlow_op_put_by_id):
 
24861         (JSC::JIT::emitSlow_op_get_by_id):
 
24862         (JSC::JIT::emit_op_get_by_val):
 
24863         (JSC::JIT::emitSlow_op_get_by_val):
 
24864         (JSC::JIT::emit_op_put_by_val):
 
24865         (JSC::JIT::emitSlow_op_put_by_val):
 
24866         (JSC::JIT::emit_op_put_by_index):
 
24867         (JSC::JIT::emit_op_put_getter):
 
24868         (JSC::JIT::emit_op_put_setter):
 
24869         (JSC::JIT::emit_op_del_by_id):
 
24870         (JSC::JIT::compileGetByIdHotPath):
 
24871         (JSC::JIT::compilePutByIdHotPath):
 
24872         * jit/JITStubCall.h:
 
24873         (JSC::JITStubCall::addArgument):
 
24876 2009-05-12  Geoffrey Garen  <ggaren@apple.com>
 
24878         Reviewed by Sam Weinig.
 
24880         Added work-around for XCode debugging echo problem.
 
24885 2009-05-12  Geoffrey Garen  <ggaren@apple.com>
 
24887         Reviewed by Sam Weinig.
 
24889         Added overflow handling to op_add.
 
24892         * jit/JITArithmetic.cpp:
 
24893         (JSC::JIT::emitSlow_op_add):
 
24894         (JSC::JIT::emitSlowAdd32InPlace):
 
24896 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24898         Reviewed by Geoffrey Garen.
 
24900         Add slow cases for op_jnless or emit_op_jnlesseq.
 
24902         * jit/JITArithmetic.cpp:
 
24903         (JSC::JIT::emitSlow_op_jnless):
 
24904         (JSC::JIT::emitSlow_op_jnlesseq):
 
24906 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24908         Reviewed by Geoffrey Garen.
 
24910         Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq.
 
24911         No slow cases for op_jnless or emit_op_jnlesseq yet.
 
24913         * jit/JITArithmetic.cpp:
 
24914         (JSC::JIT::emit_op_jnless):
 
24915         (JSC::JIT::emitSlow_op_jnless):
 
24916         (JSC::JIT::emit_op_jnlesseq):
 
24917         (JSC::JIT::emitSlow_op_jnlesseq):
 
24918         * jit/JITOpcodes.cpp:
 
24919         (JSC::JIT::emit_op_loop_if_less):
 
24920         (JSC::JIT::emitSlow_op_loop_if_less):
 
24921         (JSC::JIT::emit_op_loop_if_lesseq):
 
24922         (JSC::JIT::emitSlow_op_loop_if_lesseq):
 
24924 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24926         Reviewed by Geoffrey Garen.
 
24928         Turn the RECORD_JUMP_TARGET macro into an inline function.
 
24931         * jit/JITInlineMethods.h:
 
24932         (JSC::JIT::recordJumpTarget):
 
24933         * jit/JITOpcodes.cpp:
 
24934         (JSC::JIT::emit_op_jmp):
 
24935         (JSC::JIT::emit_op_jsr):
 
24936         (JSC::JIT::emit_op_jmp_scopes):
 
24938 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24940         Add MacroAssemblerX86Common::set8 to fix the build.
 
24942         * assembler/MacroAssemblerX86Common.h:
 
24943         (JSC::MacroAssemblerX86Common::set8):
 
24945 2009-05-12  Geoffrey Garen  <ggaren@apple.com>
 
24947         Reviewed by Sam Weinig.
 
24949         Added overflow recovery for pre_inc and pre_dec.
 
24951         Turned some short-circuit code into early returns, as is the WebKit style.
 
24953         * jit/JITArithmetic.cpp:
 
24954         (JSC::JIT::emit_op_post_inc):
 
24955         (JSC::JIT::emitSlow_op_post_inc):
 
24956         (JSC::JIT::emit_op_post_dec):
 
24957         (JSC::JIT::emitSlow_op_post_dec):
 
24958         (JSC::JIT::emitSlow_op_pre_inc):
 
24959         (JSC::JIT::emitSlow_op_pre_dec):
 
24961 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24963         Reviewed by Geoffrey Garen.
 
24965         Implement op_jmp, op_loop, op_eq and op_neq.
 
24967         * jit/JITOpcodes.cpp:
 
24968         (JSC::JIT::emit_op_jmp):
 
24969         (JSC::JIT::emit_op_loop):
 
24970         (JSC::JIT::emit_op_eq):
 
24971         (JSC::JIT::emitSlow_op_eq):
 
24972         (JSC::JIT::emit_op_neq):
 
24973         (JSC::JIT::emitSlow_op_neq):
 
24974         (JSC::JIT::emit_op_enter):
 
24975         (JSC::JIT::emit_op_enter_with_activation):
 
24977 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24979         Reviewed by Geoffrey Garen.
 
24981         Implement the slow cases for arithmetic opcodes.
 
24983         * jit/JITArithmetic.cpp:
 
24984         (JSC::JIT::emitSlow_op_lshift):
 
24985         (JSC::JIT::emitSlow_op_rshift):
 
24986         (JSC::JIT::emitSlow_op_bitand):
 
24987         (JSC::JIT::emitSlow_op_bitor):
 
24988         (JSC::JIT::emitSlow_op_bitxor):
 
24989         (JSC::JIT::emitSlow_op_bitnot):
 
24990         (JSC::JIT::emitSlow_op_sub):
 
24991         (JSC::JIT::emitSlow_op_mul):
 
24992         (JSC::JIT::emitSlow_op_mod):
 
24993         (JSC::JIT::emit_op_mod):
 
24995 2009-05-12  Sam Weinig  <sam@webkit.org>
 
24997         Reviewed by Geoffrey Garen.
 
24999         Implement op_bitnot.
 
25001         * assembler/MacroAssemblerX86Common.h:
 
25002         (JSC::MacroAssemblerX86Common::not32):
 
25003         * assembler/X86Assembler.h:
 
25004         (JSC::X86Assembler::notl_m):
 
25005         * jit/JITArithmetic.cpp:
 
25006         (JSC::JIT::emit_op_bitnot):
 
25008 2009-05-12  Sam Weinig  <sam@webkit.org>
 
25010         Reviewed by Geoffrey Garen.
 
25012         Add arithmetic opcode implementations from the old nitro-extreme branch.
 
25015         * jit/JITArithmetic.cpp:
 
25016         (JSC::JIT::emit_op_jnless):
 
25017         (JSC::JIT::emitSlow_op_jnless):
 
25018         (JSC::JIT::emit_op_jnlesseq):
 
25019         (JSC::JIT::emitSlow_op_jnlesseq):
 
25020         (JSC::JIT::emit_op_lshift):
 
25021         (JSC::JIT::emitSlow_op_lshift):
 
25022         (JSC::JIT::emit_op_rshift):
 
25023         (JSC::JIT::emitSlow_op_rshift):
 
25024         (JSC::JIT::emit_op_bitand):
 
25025         (JSC::JIT::emitBitAnd32Constant):
 
25026         (JSC::JIT::emitBitAnd32InPlace):
 
25027         (JSC::JIT::emit_op_bitor):
 
25028         (JSC::JIT::emitSlow_op_bitor):
 
25029         (JSC::JIT::emitBitOr32Constant):
 
25030         (JSC::JIT::emitBitOr32InPlace):
 
25031         (JSC::JIT::emit_op_bitxor):
 
25032         (JSC::JIT::emitSlow_op_bitxor):
 
25033         (JSC::JIT::emitBitXor32Constant):
 
25034         (JSC::JIT::emitBitXor32InPlace):
 
25035         (JSC::JIT::emit_op_bitnot):
 
25036         (JSC::JIT::emitSlow_op_bitnot):
 
25037         (JSC::JIT::emit_op_post_inc):
 
25038         (JSC::JIT::emitSlow_op_post_inc):
 
25039         (JSC::JIT::emit_op_post_dec):
 
25040         (JSC::JIT::emitSlow_op_post_dec):
 
25041         (JSC::JIT::emit_op_pre_inc):
 
25042         (JSC::JIT::emitSlow_op_pre_inc):
 
25043         (JSC::JIT::emit_op_pre_dec):
 
25044         (JSC::JIT::emitSlow_op_pre_dec):
 
25045         (JSC::JIT::emit_op_add):
 
25046         (JSC::JIT::emitAdd32Constant):
 
25047         (JSC::JIT::emitAdd32InPlace):
 
25048         (JSC::JIT::emitSlow_op_add):
 
25049         (JSC::JIT::emit_op_sub):
 
25050         (JSC::JIT::emitSlow_op_sub):
 
25051         (JSC::JIT::emitSub32ConstantLeft):
 
25052         (JSC::JIT::emitSub32ConstantRight):
 
25053         (JSC::JIT::emitSub32InPlaceLeft):
 
25054         (JSC::JIT::emitSub32InPlaceRight):
 
25055         (JSC::JIT::emit_op_mul):
 
25056         (JSC::JIT::emitSlow_op_mul):
 
25057         (JSC::JIT::emitMul32Constant):
 
25058         (JSC::JIT::emitMul32InPlace):
 
25059         (JSC::JIT::emit_op_mod):
 
25060         (JSC::JIT::emitSlow_op_mod):
 
25061         * jit/JITOpcodes.cpp:
 
25063 2009-05-12  Geoffrey Garen  <ggaren@apple.com>
 
25065         Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit
 
25066         value representations.
 
25068         Added JSAPIValueWrapper to the repository.
 
25071         * jit/JITArithmetic.cpp:
 
25072         * runtime/JSAPIValueWrapper.cpp: Added.
 
25073         (JSC::JSAPIValueWrapper::toPrimitive):
 
25074         (JSC::JSAPIValueWrapper::getPrimitiveNumber):
 
25075         (JSC::JSAPIValueWrapper::toBoolean):
 
25076         (JSC::JSAPIValueWrapper::toNumber):
 
25077         (JSC::JSAPIValueWrapper::toString):
 
25078         (JSC::JSAPIValueWrapper::toObject):
 
25079         * runtime/JSAPIValueWrapper.h: Added.
 
25080         (JSC::JSAPIValueWrapper::value):
 
25081         (JSC::JSAPIValueWrapper::isAPIValueWrapper):
 
25082         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
 
25083         (JSC::jsAPIValueWrapper):
 
25086 2009-05-12  Geoffrey Garen  <ggaren@apple.com>
 
25088         Turned on the JIT and got it building and running the most trivial of
 
25091         All configurable optimizations are turned off, and a few opcodes are ad
 
25094         So far, I've only merged op_mov and op_end, but some stub-reliant
 
25095         opcodes work as-is from TOT.
 
25097         * bytecode/CodeBlock.cpp:
 
25098         (JSC::CodeBlock::~CodeBlock):
 
25099         * bytecode/CodeBlock.h:
 
25101         (JSC::JIT::compileOpStrictEq):
 
25103         * jit/JITArithmetic.cpp:
 
25104         (JSC::JIT::emit_op_lshift):
 
25105         (JSC::JIT::emitSlow_op_lshift):
 
25106         (JSC::JIT::emit_op_rshift):
 
25107         (JSC::JIT::emitSlow_op_rshift):
 
25108         (JSC::JIT::emit_op_jnless):
 
25109         (JSC::JIT::emitSlow_op_jnless):
 
25110         (JSC::JIT::emit_op_jnlesseq):
 
25111         (JSC::JIT::emitSlow_op_jnlesseq):
 
25112         (JSC::JIT::emit_op_bitand):
 
25113         (JSC::JIT::emitSlow_op_bitand):
 
25114         (JSC::JIT::emit_op_post_inc):
 
25115         (JSC::JIT::emitSlow_op_post_inc):
 
25116         (JSC::JIT::emit_op_post_dec):
 
25117         (JSC::JIT::emitSlow_op_post_dec):
 
25118         (JSC::JIT::emit_op_pre_inc):
 
25119         (JSC::JIT::emitSlow_op_pre_inc):
 
25120         (JSC::JIT::emit_op_pre_dec):
 
25121         (JSC::JIT::emitSlow_op_pre_dec):
 
25122         (JSC::JIT::emit_op_mod):
 
25123         (JSC::JIT::emitSlow_op_mod):
 
25124         (JSC::JIT::emit_op_add):
 
25125         (JSC::JIT::emit_op_mul):
 
25126         (JSC::JIT::emit_op_sub):
 
25127         (JSC::JIT::compileBinaryArithOpSlowCase):
 
25128         (JSC::JIT::emitSlow_op_add):
 
25129         (JSC::JIT::emitSlow_op_mul):
 
25131         (JSC::JIT::compileOpCallInitializeCallFrame):
 
25132         (JSC::JIT::compileOpConstructSetupArgs):
 
25133         (JSC::JIT::compileOpCallVarargs):
 
25134         (JSC::JIT::compileOpCall):
 
25135         (JSC::JIT::compileOpCallSlowCase):
 
25136         * jit/JITInlineMethods.h:
 
25137         (JSC::JIT::getConstantOperandImmediateInt):
 
25138         (JSC::JIT::isOperandConstantImmediateInt):
 
25139         (JSC::JIT::emitInitRegister):
 
25140         (JSC::JIT::addSlowCase):
 
25141         (JSC::JIT::addJump):
 
25142         (JSC::JIT::emitJumpSlowToHot):
 
25143         (JSC::JIT::tagFor):
 
25144         (JSC::JIT::payloadFor):
 
25145         (JSC::JIT::emitLoad):
 
25146         (JSC::JIT::emitLoadReturnValue):
 
25147         (JSC::JIT::emitStore):
 
25148         (JSC::JIT::emitStoreReturnValue):
 
25149         * jit/JITOpcodes.cpp:
 
25150         (JSC::JIT::emit_op_mov):
 
25151         (JSC::JIT::emit_op_end):
 
25152         (JSC::JIT::emit_op_jmp):
 
25153         (JSC::JIT::emit_op_loop):
 
25154         (JSC::JIT::emit_op_loop_if_less):
 
25155         (JSC::JIT::emit_op_loop_if_lesseq):
 
25156         (JSC::JIT::emit_op_instanceof):
 
25157         (JSC::JIT::emit_op_get_global_var):
 
25158         (JSC::JIT::emit_op_put_global_var):
 
25159         (JSC::JIT::emit_op_get_scoped_var):
 
25160         (JSC::JIT::emit_op_put_scoped_var):
 
25161         (JSC::JIT::emit_op_tear_off_activation):
 
25162         (JSC::JIT::emit_op_ret):
 
25163         (JSC::JIT::emit_op_construct_verify):
 
25164         (JSC::JIT::emit_op_to_primitive):
 
25165         (JSC::JIT::emit_op_loop_if_true):
 
25166         (JSC::JIT::emit_op_resolve_global):
 
25167         (JSC::JIT::emit_op_not):
 
25168         (JSC::JIT::emit_op_jfalse):
 
25169         (JSC::JIT::emit_op_jeq_null):
 
25170         (JSC::JIT::emit_op_jneq_null):
 
25171         (JSC::JIT::emit_op_jneq_ptr):
 
25172         (JSC::JIT::emit_op_unexpected_load):
 
25173         (JSC::JIT::emit_op_eq):
 
25174         (JSC::JIT::emit_op_bitnot):
 
25175         (JSC::JIT::emit_op_jtrue):
 
25176         (JSC::JIT::emit_op_neq):
 
25177         (JSC::JIT::emit_op_bitxor):
 
25178         (JSC::JIT::emit_op_bitor):
 
25179         (JSC::JIT::emit_op_throw):
 
25180         (JSC::JIT::emit_op_next_pname):
 
25181         (JSC::JIT::emit_op_push_scope):
 
25182         (JSC::JIT::emit_op_to_jsnumber):
 
25183         (JSC::JIT::emit_op_push_new_scope):
 
25184         (JSC::JIT::emit_op_catch):
 
25185         (JSC::JIT::emit_op_switch_imm):
 
25186         (JSC::JIT::emit_op_switch_char):
 
25187         (JSC::JIT::emit_op_switch_string):
 
25188         (JSC::JIT::emit_op_new_error):
 
25189         (JSC::JIT::emit_op_eq_null):
 
25190         (JSC::JIT::emit_op_neq_null):
 
25191         (JSC::JIT::emit_op_convert_this):
 
25192         (JSC::JIT::emit_op_profile_will_call):
 
25193         (JSC::JIT::emit_op_profile_did_call):
 
25194         (JSC::JIT::emitSlow_op_construct_verify):
 
25195         (JSC::JIT::emitSlow_op_get_by_val):
 
25196         (JSC::JIT::emitSlow_op_loop_if_less):
 
25197         (JSC::JIT::emitSlow_op_loop_if_lesseq):
 
25198         (JSC::JIT::emitSlow_op_put_by_val):
 
25199         (JSC::JIT::emitSlow_op_not):
 
25200         (JSC::JIT::emitSlow_op_instanceof):
 
25201         * jit/JITPropertyAccess.cpp:
 
25202         (JSC::JIT::emit_op_get_by_val):
 
25203         (JSC::JIT::emit_op_put_by_val):
 
25204         (JSC::JIT::emit_op_put_by_index):
 
25205         (JSC::JIT::emit_op_put_getter):
 
25206         (JSC::JIT::emit_op_put_setter):
 
25207         (JSC::JIT::emit_op_del_by_id):
 
25208         (JSC::JIT::compileGetByIdHotPath):
 
25209         (JSC::JIT::compilePutByIdHotPath):
 
25210         * jit/JITStubCall.h:
 
25211         (JSC::JITStubCall::JITStubCall):
 
25212         (JSC::JITStubCall::addArgument):
 
25213         (JSC::JITStubCall::call):
 
25214         (JSC::JITStubCall::):
 
25215         (JSC::CallEvalJITStub::CallEvalJITStub):
 
25216         * jit/JITStubs.cpp:
 
25218         (JSC::JITStubs::cti_op_add):
 
25219         (JSC::JITStubs::cti_op_pre_inc):
 
25220         (JSC::JITStubs::cti_op_mul):
 
25221         (JSC::JITStubs::cti_op_get_by_val):
 
25222         (JSC::JITStubs::cti_op_get_by_val_string):
 
25223         (JSC::JITStubs::cti_op_get_by_val_byte_array):
 
25224         (JSC::JITStubs::cti_op_sub):
 
25225         (JSC::JITStubs::cti_op_put_by_val):
 
25226         (JSC::JITStubs::cti_op_put_by_val_array):
 
25227         (JSC::JITStubs::cti_op_put_by_val_byte_array):
 
25228         (JSC::JITStubs::cti_op_negate):
 
25229         (JSC::JITStubs::cti_op_div):
 
25230         (JSC::JITStubs::cti_op_pre_dec):
 
25231         (JSC::JITStubs::cti_op_post_inc):
 
25232         (JSC::JITStubs::cti_op_eq):
 
25233         (JSC::JITStubs::cti_op_lshift):
 
25234         (JSC::JITStubs::cti_op_bitand):
 
25235         (JSC::JITStubs::cti_op_rshift):
 
25236         (JSC::JITStubs::cti_op_bitnot):
 
25237         (JSC::JITStubs::cti_op_mod):
 
25238         (JSC::JITStubs::cti_op_neq):
 
25239         (JSC::JITStubs::cti_op_post_dec):
 
25240         (JSC::JITStubs::cti_op_urshift):
 
25241         (JSC::JITStubs::cti_op_bitxor):
 
25242         (JSC::JITStubs::cti_op_bitor):
 
25243         (JSC::JITStubs::cti_op_switch_imm):
 
25245         * runtime/JSArray.cpp:
 
25246         (JSC::JSArray::JSArray):
 
25247         * runtime/JSFunction.cpp:
 
25248         (JSC::JSFunction::~JSFunction):
 
25249         * runtime/JSValue.h:
 
25250         (JSC::JSValue::payload):
 
25253 2009-05-07  Sam Weinig  <sam@webkit.org>
 
25255         Reviewed by Geoffrey Garen.
 
25257         Add some new MacroAssembler and assembler functions that will be needed shortly.
 
25259         * assembler/MacroAssemblerX86Common.h:
 
25260         (JSC::MacroAssemblerX86Common::add32):
 
25261         (JSC::MacroAssemblerX86Common::and32):
 
25262         (JSC::MacroAssemblerX86Common::mul32):
 
25263         (JSC::MacroAssemblerX86Common::neg32):
 
25264         (JSC::MacroAssemblerX86Common::or32):
 
25265         (JSC::MacroAssemblerX86Common::sub32):
 
25266         (JSC::MacroAssemblerX86Common::xor32):
 
25267         (JSC::MacroAssemblerX86Common::branchAdd32):
 
25268         (JSC::MacroAssemblerX86Common::branchMul32):
 
25269         (JSC::MacroAssemblerX86Common::branchSub32):
 
25270         * assembler/X86Assembler.h:
 
25271         (JSC::X86Assembler::):
 
25272         (JSC::X86Assembler::addl_rm):
 
25273         (JSC::X86Assembler::andl_mr):
 
25274         (JSC::X86Assembler::andl_rm):
 
25275         (JSC::X86Assembler::andl_im):
 
25276         (JSC::X86Assembler::negl_r):
 
25277         (JSC::X86Assembler::notl_r):
 
25278         (JSC::X86Assembler::orl_rm):
 
25279         (JSC::X86Assembler::orl_im):
 
25280         (JSC::X86Assembler::subl_rm):
 
25281         (JSC::X86Assembler::xorl_mr):
 
25282         (JSC::X86Assembler::xorl_rm):
 
25283         (JSC::X86Assembler::xorl_im):
 
25284         (JSC::X86Assembler::imull_mr):
 
25286 2009-05-11  Sam Weinig  <sam@webkit.org>
 
25288         Reviewed by Cameron Zwarich.
 
25290         Remove the NumberHeap.
 
25292         * JavaScriptCore.exp:
 
25293         * runtime/Collector.cpp:
 
25295         (JSC::Heap::destroy):
 
25296         (JSC::Heap::recordExtraCost):
 
25297         (JSC::Heap::heapAllocate):
 
25298         (JSC::Heap::markConservatively):
 
25299         (JSC::Heap::sweep):
 
25300         (JSC::Heap::collect):
 
25301         (JSC::Heap::objectCount):
 
25302         (JSC::Heap::statistics):
 
25304         (JSC::Heap::isBusy):
 
25305         * runtime/Collector.h:
 
25306         (JSC::Heap::globalData):
 
25307         * runtime/JSCell.h:
 
25309 2009-05-11  Geoffrey Garen  <ggaren@apple.com>
 
25311         Reviewed by Sam Weinig.
 
25313         Land initial commit of new number representation for 32 bit platforms,
 
25319         * API/JSCallbackObjectFunctions.h:
 
25320         (JSC::::hasInstance):
 
25323         * API/tests/testapi.c:
 
25324         (EvilExceptionObject_convertToType):
 
25325         * AllInOneFile.cpp:
 
25326         * JavaScriptCore.exp:
 
25327         * JavaScriptCore.xcodeproj/project.pbxproj:
 
25328         * bytecode/CodeBlock.cpp:
 
25329         (JSC::valueToSourceString):
 
25330         * bytecompiler/BytecodeGenerator.cpp:
 
25331         (JSC::BytecodeGenerator::emitLoad):
 
25332         (JSC::BytecodeGenerator::emitUnexpectedLoad):
 
25333         (JSC::keyForImmediateSwitch):
 
25334         * bytecompiler/BytecodeGenerator.h:
 
25335         * interpreter/Interpreter.cpp:
 
25336         (JSC::Interpreter::dumpRegisters):
 
25337         (JSC::Interpreter::privateExecute):
 
25338         * parser/Nodes.cpp:
 
25339         (JSC::ArrayNode::emitBytecode):
 
25340         (JSC::processClauseList):
 
25341         * runtime/ArgList.h:
 
25342         * runtime/Collector.h:
 
25344         * runtime/DateMath.cpp:
 
25345         * runtime/ExceptionHelpers.h:
 
25346         * runtime/InitializeThreading.cpp:
 
25347         * runtime/JSArray.cpp:
 
25348         (JSC::JSArray::JSArray):
 
25349         * runtime/JSCell.cpp:
 
25350         * runtime/JSCell.h:
 
25351         (JSC::JSCell::isAPIValueWrapper):
 
25352         (JSC::JSValue::isString):
 
25353         (JSC::JSValue::isGetterSetter):
 
25354         (JSC::JSValue::isObject):
 
25355         (JSC::JSValue::getString):
 
25356         (JSC::JSValue::getObject):
 
25357         (JSC::JSValue::getCallData):
 
25358         (JSC::JSValue::getConstructData):
 
25359         (JSC::JSValue::getUInt32):
 
25360         (JSC::JSValue::marked):
 
25361         (JSC::JSValue::toPrimitive):
 
25362         (JSC::JSValue::getPrimitiveNumber):
 
25363         (JSC::JSValue::toBoolean):
 
25364         (JSC::JSValue::toNumber):
 
25365         (JSC::JSValue::toString):
 
25366         (JSC::JSValue::needsThisConversion):
 
25367         (JSC::JSValue::toThisString):
 
25368         (JSC::JSValue::getJSNumber):
 
25369         (JSC::JSValue::toObject):
 
25370         (JSC::JSValue::toThisObject):
 
25371         * runtime/JSGlobalData.cpp:
 
25372         (JSC::JSGlobalData::JSGlobalData):
 
25373         * runtime/JSGlobalData.h:
 
25374         * runtime/JSGlobalObject.h:
 
25375         (JSC::Structure::prototypeForLookup):
 
25376         * runtime/JSGlobalObjectFunctions.cpp:
 
25377         (JSC::globalFuncParseInt):
 
25378         * runtime/JSImmediate.h:
 
25379         * runtime/JSNumberCell.cpp: Removed.
 
25380         * runtime/JSNumberCell.h: Removed.
 
25381         * runtime/JSObject.h:
 
25382         (JSC::JSValue::get):
 
25383         (JSC::JSValue::put):
 
25384         * runtime/JSString.h:
 
25385         (JSC::JSValue::toThisJSString):
 
25386         * runtime/JSValue.cpp:
 
25387         (JSC::JSValue::toInteger):
 
25388         (JSC::JSValue::toIntegerPreserveNaN):
 
25389         (JSC::JSValue::toObjectSlowCase):
 
25390         (JSC::JSValue::toThisObjectSlowCase):
 
25391         (JSC::JSValue::synthesizeObject):
 
25392         (JSC::JSValue::synthesizePrototype):
 
25393         (JSC::JSValue::description):
 
25394         (JSC::nonInlineNaN):
 
25395         * runtime/JSValue.h:
 
25397         (JSC::EncodedJSValueHashTraits::emptyValue):
 
25403         (JSC::JSValue::encode):
 
25404         (JSC::JSValue::decode):
 
25405         (JSC::JSValue::JSValue):
 
25406         (JSC::JSValue::operator bool):
 
25407         (JSC::JSValue::operator==):
 
25408         (JSC::JSValue::operator!=):
 
25409         (JSC::JSValue::isUndefined):
 
25410         (JSC::JSValue::isNull):
 
25411         (JSC::JSValue::isUndefinedOrNull):
 
25412         (JSC::JSValue::isCell):
 
25413         (JSC::JSValue::isInt32):
 
25414         (JSC::JSValue::isUInt32):
 
25415         (JSC::JSValue::isDouble):
 
25416         (JSC::JSValue::isTrue):
 
25417         (JSC::JSValue::isFalse):
 
25418         (JSC::JSValue::tag):
 
25419         (JSC::JSValue::asInt32):
 
25420         (JSC::JSValue::asUInt32):
 
25421         (JSC::JSValue::asDouble):
 
25422         (JSC::JSValue::asCell):
 
25423         (JSC::JSValue::isNumber):
 
25424         (JSC::JSValue::isBoolean):
 
25425         (JSC::JSValue::getBoolean):
 
25426         (JSC::JSValue::uncheckedGetNumber):
 
25427         (JSC::JSValue::toJSNumber):
 
25428         (JSC::JSValue::getNumber):
 
25429         (JSC::JSValue::toInt32):
 
25430         (JSC::JSValue::toUInt32):
 
25431         * runtime/Operations.h:
 
25432         (JSC::JSValue::equal):
 
25433         (JSC::JSValue::equalSlowCaseInline):
 
25434         (JSC::JSValue::strictEqual):
 
25435         (JSC::JSValue::strictEqualSlowCaseInline):
 
25439         * runtime/PropertySlot.h:
 
25440         * runtime/StringPrototype.cpp:
 
25441         (JSC::stringProtoFuncCharAt):
 
25442         (JSC::stringProtoFuncCharCodeAt):
 
25443         (JSC::stringProtoFuncIndexOf):
 
25446 === Start merge of nitro-extreme branch 2009-07-30 ===
 
25448 2009-07-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
25450         Reviewed by George Staikos.
 
25452         Resolve class/struct mixup in forward declarations
 
25453         https://bugs.webkit.org/show_bug.cgi?id=27708
 
25455         * API/JSClassRef.h:
 
25456         * bytecode/SamplingTool.h:
 
25457         * interpreter/Interpreter.h:
 
25459         * profiler/ProfileGenerator.h:
 
25460         * profiler/Profiler.h:
 
25461         * runtime/ClassInfo.h:
 
25462         * runtime/ExceptionHelpers.h:
 
25463         * runtime/JSByteArray.h:
 
25464         * runtime/JSCell.h:
 
25465         * runtime/JSFunction.h:
 
25466         * runtime/JSGlobalData.h:
 
25467         * runtime/JSObject.h:
 
25468         * runtime/JSString.h:
 
25470 2009-07-28  Ada Chan  <adachan@apple.com>        
 
25472         Reviewed by Darin Adler.
 
25474         https://bugs.webkit.org/show_bug.cgi?id=27236
 
25475         - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows.
 
25476         - Use a background thread to periodically scavenge memory to release back to the system.
 
25478         * wtf/FastMalloc.cpp:
 
25479         (WTF::TCMalloc_PageHeap::init):
 
25480         (WTF::TCMalloc_PageHeap::runScavengerThread):
 
25481         (WTF::TCMalloc_PageHeap::scavenge):
 
25482         (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
 
25483         (WTF::TCMalloc_PageHeap::New):
 
25484         (WTF::TCMalloc_PageHeap::AllocLarge):
 
25485         (WTF::TCMalloc_PageHeap::Delete):
 
25486         (WTF::TCMalloc_PageHeap::GrowHeap):
 
25488         (WTF::TCMalloc_PageHeap::scavengerThread):
 
25489         * wtf/TCSystemAlloc.cpp:
 
25490         (TCMalloc_SystemRelease):
 
25491         (TCMalloc_SystemCommit):
 
25492         * wtf/TCSystemAlloc.h:
 
25494 2009-07-28  Xan Lopez  <xlopez@igalia.com>
 
25496         Add new files, fixes distcheck.
 
25500 2009-07-28  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
25502         Reviewed by Simon Hausmann.
 
25504         [Qt] Determining whether to use JIT or interpreter
 
25505         moved from JavaScriptCore.pri to Platform.h
 
25507         * JavaScriptCore.pri:
 
25510 2009-07-27  Brian Weinstein  <bweinstein@apple.com>
 
25512         Fix of misuse of sort command.
 
25514         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
25515         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
25517 2009-07-27  Brian Weinstein  <bweinstein@apple.com>
 
25519         Build fix for Windows.
 
25521         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
25522         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
25524 2009-07-27  Gavin Barraclough  <barraclough@apple.com>
 
25526         Rubber stamped by Oliver Hunt.
 
25528         Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall.
 
25531         (JSC::JIT::privateCompile):
 
25532         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
25534         * jit/JITInlineMethods.h:
 
25535         (JSC::JIT::preserveReturnAddressAfterCall):
 
25536         * jit/JITPropertyAccess.cpp:
 
25537         (JSC::JIT::privateCompilePutByIdTransition):
 
25539 2009-07-27  Alexey Proskuryakov  <ap@webkit.org>
 
25543         * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case.
 
25545 2009-07-27  Alexey Proskuryakov  <ap@webkit.org>
 
25549         * runtime/JSLock.h: (JSC::JSLock::~JSLock):
 
25551 2009-07-27  Alexey Proskuryakov  <ap@webkit.org>
 
25553         Reviewed by Darin Adler.
 
25555         https://bugs.webkit.org/show_bug.cgi?id=27735
 
25556         Give a helpful name to JSLock constructor argument
 
25559         (JSGarbageCollect):
 
25560         * API/JSContextRef.cpp:
 
25561         * API/JSObjectRef.cpp:
 
25562         (JSPropertyNameArrayRelease):
 
25563         (JSPropertyNameAccumulatorAddName):
 
25564         * JavaScriptCore.exp:
 
25567         (cleanupGlobalData):
 
25569         * runtime/Collector.cpp:
 
25570         (JSC::Heap::destroy):
 
25571         * runtime/JSLock.cpp:
 
25572         (JSC::JSLock::JSLock):
 
25573         (JSC::JSLock::lock):
 
25574         (JSC::JSLock::unlock):
 
25575         (JSC::JSLock::DropAllLocks::DropAllLocks):
 
25576         (JSC::JSLock::DropAllLocks::~DropAllLocks):
 
25577         * runtime/JSLock.h:
 
25579         (JSC::JSLock::JSLock):
 
25580         (JSC::JSLock::~JSLock):
 
25582 2009-07-25  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
25584         Reviewed by Eric Seidel.
 
25586         Allow custom memory allocation control for OpaqueJSPropertyNameArray struct
 
25587         https://bugs.webkit.org/show_bug.cgi?id=27342
 
25589         Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been
 
25590         instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473.
 
25592         * API/JSObjectRef.cpp:
 
25594 2009-07-24  Ada Chan  <adachan@apple.com>
 
25596         In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236:
 
25597         Remove TCMALLOC_TRACK_DECOMMITED_SPANS.  We'll always track decommitted spans.
 
25598         We have tested this and show it has little impact on performance.
 
25600         Reviewed by Mark Rowe.
 
25602         * wtf/FastMalloc.cpp:
 
25603         (WTF::TCMalloc_PageHeap::New):
 
25604         (WTF::TCMalloc_PageHeap::AllocLarge):
 
25605         (WTF::propagateDecommittedState):
 
25606         (WTF::mergeDecommittedStates):
 
25607         (WTF::TCMalloc_PageHeap::Delete):
 
25608         (WTF::TCMalloc_PageHeap::IncrementalScavenge):
 
25610 2009-07-24  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
25612         Reviewed by Darin Adler and Adam Barth.
 
25614         Build fix for x86 platforms.
 
25615         https://bugs.webkit.org/show_bug.cgi?id=27602
 
25619 2009-07-23  Kevin Ollivier  <kevino@theolliviers.com>
 
25621         wx build fix, adding missing header.
 
25625 2009-07-22  Yong Li  <yong.li@torchmobile.com>
 
25627         Reviewed by George Staikos.
 
25629         Add wince specific memory files into wtf/wince
 
25630         https://bugs.webkit.org/show_bug.cgi?id=27550
 
25632         * wtf/wince/FastMallocWince.h: Added.
 
25633         * wtf/wince/MemoryManager.cpp: Added.
 
25634         * wtf/wince/MemoryManager.h: Added.
 
25636 2009-07-23  Norbert Leser  <norbert.leser@nokia.com>
 
25638         Reviewed by Simon Hausmann.
 
25640         Fix for missing mmap features in Symbian
 
25641         https://bugs.webkit.org/show_bug.cgi?id=24540
 
25643         Fix, conditionally for PLATFORM(SYMBIAN), as an alternative 
 
25644         to missing support for the MAP_ANON property flag in mmap. 
 
25645         It utilizes Symbian specific memory allocation features.
 
25647         * runtime/Collector.cpp
 
25649 2009-07-22  Gavin Barraclough  <barraclough@apple.com>
 
25651         Reviewed by Sam Weinig.
 
25653         With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event.
 
25654         ( https://bugs.webkit.org/show_bug.cgi?id=27564 )
 
25656         Currently we change permissions forwards and backwards for each instruction modified,
 
25657         instead we should only change permissions once per complete repatching event.
 
25659         2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled,
 
25660         which recoups 1/3 of the penalty of running with this mode enabled.
 
25662         * assembler/ARMAssembler.cpp:
 
25663         (JSC::ARMAssembler::linkBranch):
 
25664             - Replace usage of MakeWritable with cacheFlush.
 
25666         * assembler/ARMAssembler.h:
 
25667         (JSC::ARMAssembler::patchPointerInternal):
 
25668         (JSC::ARMAssembler::repatchLoadPtrToLEA):
 
25669             - Replace usage of MakeWritable with cacheFlush.
 
25671         * assembler/ARMv7Assembler.h:
 
25672         (JSC::ARMv7Assembler::relinkJump):
 
25673         (JSC::ARMv7Assembler::relinkCall):
 
25674         (JSC::ARMv7Assembler::repatchInt32):
 
25675         (JSC::ARMv7Assembler::repatchPointer):
 
25676         (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
 
25677         (JSC::ARMv7Assembler::setInt32):
 
25678             - Replace usage of MakeWritable with cacheFlush.
 
25680         * assembler/LinkBuffer.h:
 
25681         (JSC::LinkBuffer::performFinalization):
 
25682             - Make explicit call to cacheFlush.
 
25684         * assembler/MacroAssemblerCodeRef.h:
 
25685         (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
 
25686             - Make size always available.
 
25688         * assembler/RepatchBuffer.h:
 
25689         (JSC::RepatchBuffer::RepatchBuffer):
 
25690         (JSC::RepatchBuffer::~RepatchBuffer):
 
25691             - Add calls to MakeWritable & makeExecutable.
 
25693         * assembler/X86Assembler.h:
 
25694         (JSC::X86Assembler::relinkJump):
 
25695         (JSC::X86Assembler::relinkCall):
 
25696         (JSC::X86Assembler::repatchInt32):
 
25697         (JSC::X86Assembler::repatchPointer):
 
25698         (JSC::X86Assembler::repatchLoadPtrToLEA):
 
25699             - Remove usage of MakeWritable.
 
25701         * bytecode/CodeBlock.h:
 
25702         (JSC::CodeBlock::getJITCode):
 
25703             - Provide access to CodeBlock's JITCode.
 
25705         * jit/ExecutableAllocator.h:
 
25706         (JSC::ExecutableAllocator::makeExecutable):
 
25707         (JSC::ExecutableAllocator::cacheFlush):
 
25708             - Remove MakeWritable, make cacheFlush public.
 
25711         (JSC::ctiPatchNearCallByReturnAddress):
 
25712         (JSC::ctiPatchCallByReturnAddress):
 
25713         (JSC::JIT::privateCompile):
 
25714         (JSC::JIT::unlinkCall):
 
25715         (JSC::JIT::linkCall):
 
25716             - Add CodeBlock argument to RepatchBuffer.
 
25719             - Pass CodeBlock argument for use by RepatchBuffer.
 
25722         (JSC::JITCode::start):
 
25723         (JSC::JITCode::size):
 
25724             - Provide access to code start & size.
 
25726         * jit/JITPropertyAccess.cpp:
 
25727         (JSC::JIT::privateCompilePutByIdTransition):
 
25728         (JSC::JIT::patchGetByIdSelf):
 
25729         (JSC::JIT::patchMethodCallProto):
 
25730         (JSC::JIT::patchPutByIdReplace):
 
25731         (JSC::JIT::privateCompilePatchGetArrayLength):
 
25732         (JSC::JIT::privateCompileGetByIdProto):
 
25733         (JSC::JIT::privateCompileGetByIdSelfList):
 
25734         (JSC::JIT::privateCompileGetByIdProtoList):
 
25735         (JSC::JIT::privateCompileGetByIdChainList):
 
25736         (JSC::JIT::privateCompileGetByIdChain):
 
25737             - Add CodeBlock argument to RepatchBuffer.
 
25739         * jit/JITStubs.cpp:
 
25740         (JSC::JITThunks::tryCachePutByID):
 
25741         (JSC::JITThunks::tryCacheGetByID):
 
25742         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
 
25743             - Pass CodeBlock argument for use by RepatchBuffer.
 
25745 2009-07-21  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
25747         Reviewed by Gavin Barraclough.
 
25749         Cache not only the structure of the method, but the
 
25750         structure of its prototype as well.
 
25751         https://bugs.webkit.org/show_bug.cgi?id=27077
 
25753         * bytecode/CodeBlock.cpp:
 
25754         (JSC::CodeBlock::~CodeBlock):
 
25755         * bytecode/CodeBlock.h:
 
25756         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
 
25757         * jit/JITPropertyAccess.cpp:
 
25758         (JSC::JIT::patchMethodCallProto):
 
25760 2009-07-21  Gavin Barraclough  <barraclough@apple.com>
 
25762         Reviewed by Sam Weinig.
 
25764         Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes.
 
25765         ( https://bugs.webkit.org/show_bug.cgi?id=27527 )
 
25767         This allows the implementation to be defined per architecture.  Specifically this addresses the
 
25768         fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call
 
25769         to register.  Patching the call actually requires the pointer load to be patched, rather than
 
25770         the call to be patched.  This is implementation detail specific to MacroAssemblerX86_64, and as
 
25771         such is best handled there.
 
25773         * assembler/AbstractMacroAssembler.h:
 
25774         * assembler/MacroAssemblerARM.h:
 
25775         (JSC::MacroAssemblerARM::linkCall):
 
25776         (JSC::MacroAssemblerARM::repatchCall):
 
25777         * assembler/MacroAssemblerARMv7.h:
 
25778         (JSC::MacroAssemblerARMv7::linkCall):
 
25779         (JSC::MacroAssemblerARMv7::repatchCall):
 
25780         * assembler/MacroAssemblerX86.h:
 
25781         (JSC::MacroAssemblerX86::linkCall):
 
25782         (JSC::MacroAssemblerX86::repatchCall):
 
25783         * assembler/MacroAssemblerX86_64.h:
 
25784         (JSC::MacroAssemblerX86_64::linkCall):
 
25785         (JSC::MacroAssemblerX86_64::repatchCall):
 
25787 2009-07-21  Adam Treat  <adam.treat@torchmobile.com>
 
25789         Reviewed by George Staikos.
 
25791         Every wtf file includes other wtf files with <> style includes
 
25792         except this one.  Fix the exception.
 
25796 2009-07-21  Gavin Barraclough  <barraclough@apple.com>
 
25798         Reviewed by Oliver Hunt.
 
25800         Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler.
 
25801         ( https://bugs.webkit.org/show_bug.cgi?id=27485 )
 
25803         This change is the first step in a process to move code that should be in
 
25804         the architecture-specific MacroAssembler classes up out of Assmbler and
 
25805         AbstractMacroAssembler.
 
25807         * JavaScriptCore.xcodeproj/project.pbxproj:
 
25810         * assembler/ARMAssembler.h:
 
25811         (JSC::ARMAssembler::linkPointer):
 
25812             - rename patchPointer to bring it in line with the current link/repatch naming scheme
 
25814         * assembler/ARMv7Assembler.h:
 
25815         (JSC::ARMv7Assembler::linkCall):
 
25816         (JSC::ARMv7Assembler::linkPointer):
 
25817         (JSC::ARMv7Assembler::relinkCall):
 
25818         (JSC::ARMv7Assembler::repatchInt32):
 
25819         (JSC::ARMv7Assembler::repatchPointer):
 
25820         (JSC::ARMv7Assembler::setInt32):
 
25821         (JSC::ARMv7Assembler::setPointer):
 
25822             - rename patchPointer to bring it in line with the current link/repatch naming scheme
 
25824         * assembler/AbstractMacroAssembler.h:
 
25825         (JSC::AbstractMacroAssembler::linkJump):
 
25826         (JSC::AbstractMacroAssembler::linkCall):
 
25827         (JSC::AbstractMacroAssembler::linkPointer):
 
25828         (JSC::AbstractMacroAssembler::getLinkerAddress):
 
25829         (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
 
25830         (JSC::AbstractMacroAssembler::repatchJump):
 
25831         (JSC::AbstractMacroAssembler::repatchCall):
 
25832         (JSC::AbstractMacroAssembler::repatchNearCall):
 
25833         (JSC::AbstractMacroAssembler::repatchInt32):
 
25834         (JSC::AbstractMacroAssembler::repatchPointer):
 
25835         (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA):
 
25836             - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler
 
25838         * assembler/LinkBuffer.h: Added.
 
25839         (JSC::LinkBuffer::LinkBuffer):
 
25840         (JSC::LinkBuffer::~LinkBuffer):
 
25841         (JSC::LinkBuffer::link):
 
25842         (JSC::LinkBuffer::patch):
 
25843         (JSC::LinkBuffer::locationOf):
 
25844         (JSC::LinkBuffer::locationOfNearCall):
 
25845         (JSC::LinkBuffer::returnAddressOffset):
 
25846         (JSC::LinkBuffer::finalizeCode):
 
25847         (JSC::LinkBuffer::finalizeCodeAddendum):
 
25848         (JSC::LinkBuffer::code):
 
25849         (JSC::LinkBuffer::performFinalization):
 
25850             - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler
 
25852         * assembler/RepatchBuffer.h: Added.
 
25853         (JSC::RepatchBuffer::RepatchBuffer):
 
25854         (JSC::RepatchBuffer::relink):
 
25855         (JSC::RepatchBuffer::repatch):
 
25856         (JSC::RepatchBuffer::repatchLoadPtrToLEA):
 
25857         (JSC::RepatchBuffer::relinkCallerToTrampoline):
 
25858         (JSC::RepatchBuffer::relinkCallerToFunction):
 
25859         (JSC::RepatchBuffer::relinkNearCallerToTrampoline):
 
25860             - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler
 
25862         * assembler/X86Assembler.h:
 
25863         (JSC::X86Assembler::linkJump):
 
25864         (JSC::X86Assembler::linkCall):
 
25865         (JSC::X86Assembler::linkPointerForCall):
 
25866         (JSC::X86Assembler::linkPointer):
 
25867         (JSC::X86Assembler::relinkJump):
 
25868         (JSC::X86Assembler::relinkCall):
 
25869         (JSC::X86Assembler::repatchInt32):
 
25870         (JSC::X86Assembler::repatchPointer):
 
25871         (JSC::X86Assembler::setPointer):
 
25872         (JSC::X86Assembler::setInt32):
 
25873         (JSC::X86Assembler::setRel32):
 
25874             - rename patchPointer to bring it in line with the current link/repatch naming scheme
 
25877         (JSC::ctiPatchNearCallByReturnAddress):
 
25878         (JSC::ctiPatchCallByReturnAddress):
 
25879             - include new headers
 
25880             - remove MacroAssembler:: specification from RepatchBuffer usage
 
25882         * jit/JITPropertyAccess.cpp:
 
25883         * yarr/RegexJIT.cpp:
 
25884             - include new headers
 
25886 2009-07-21  Robert Agoston  <Agoston.Robert@stud.u-szeged.hu>
 
25888         Reviewed by David Levin.
 
25891         https://bugs.webkit.org/show_bug.cgi?id=27506
 
25893         * bytecode/Opcode.h:
 
25895 2009-07-21  Adam Roben  <aroben@apple.com>
 
25897         Roll out r46153, r46154, and r46155
 
25899         These changes were causing build failures and assertion failures on
 
25902         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
25903         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
25904         * JavaScriptCore.xcodeproj/project.pbxproj:
 
25905         * runtime/JSArray.cpp:
 
25906         * runtime/StringPrototype.cpp:
 
25907         * runtime/UString.cpp:
 
25908         * runtime/UString.h:
 
25909         * wtf/FastMalloc.cpp:
 
25910         * wtf/FastMalloc.h:
 
25912         * wtf/PossiblyNull.h: Removed.
 
25914 2009-07-21  Roland Steiner  <rolandsteiner@google.com>
 
25916         Reviewed by David Levin.
 
25918         Add ENABLE_RUBY to list of build options
 
25919         https://bugs.webkit.org/show_bug.cgi?id=27324
 
25921         * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
 
25923 2009-07-20  Oliver Hunt  <oliver@apple.com>
 
25925         Build fix attempt #2
 
25927         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
25928         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
25930 2009-07-20  Oliver Hunt  <oliver@apple.com>
 
25932         Build fix attempt #1
 
25934         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
25935         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
25937 2009-07-20  Oliver Hunt  <oliver@apple.com>
 
25939         Reviewed by Gavin Barraclough.
 
25941         Make it harder to misuse try* allocation routines
 
25942         https://bugs.webkit.org/show_bug.cgi?id=27469
 
25944         Jump through a few hoops to make it much harder to accidentally
 
25945         miss null-checking of values returned by the try-* allocation
 
25948         * JavaScriptCore.xcodeproj/project.pbxproj:
 
25949         * runtime/JSArray.cpp:
 
25950         (JSC::JSArray::putSlowCase):
 
25951         (JSC::JSArray::increaseVectorLength):
 
25952         * runtime/StringPrototype.cpp:
 
25953         (JSC::stringProtoFuncFontsize):
 
25954         (JSC::stringProtoFuncLink):
 
25955         * runtime/UString.cpp:
 
25957         (JSC::reallocChars):
 
25958         (JSC::expandCapacity):
 
25959         (JSC::UString::Rep::reserveCapacity):
 
25960         (JSC::UString::expandPreCapacity):
 
25962         (JSC::concatenate):
 
25963         (JSC::UString::spliceSubstringsWithSeparators):
 
25964         (JSC::UString::replaceRange):
 
25965         (JSC::UString::append):
 
25966         (JSC::UString::operator=):
 
25967         * runtime/UString.h:
 
25968         (JSC::UString::Rep::createEmptyBuffer):
 
25969         * wtf/FastMalloc.cpp:
 
25970         (WTF::tryFastZeroedMalloc):
 
25971         (WTF::tryFastMalloc):
 
25972         (WTF::tryFastCalloc):
 
25973         (WTF::tryFastRealloc):
 
25974         (WTF::TCMallocStats::tryFastMalloc):
 
25975         (WTF::TCMallocStats::tryFastCalloc):
 
25976         (WTF::TCMallocStats::tryFastRealloc):
 
25977         * wtf/FastMalloc.h:
 
25978         (WTF::TryMallocReturnValue::TryMallocReturnValue):
 
25979         (WTF::TryMallocReturnValue::~TryMallocReturnValue):
 
25980         (WTF::TryMallocReturnValue::operator Maybe<T>):
 
25981         (WTF::TryMallocReturnValue::getValue):
 
25982         * wtf/PossiblyNull.h:
 
25983         (WTF::PossiblyNull::PossiblyNull):
 
25984         (WTF::PossiblyNull::~PossiblyNull):
 
25985         (WTF::PossiblyNull::getValue):
 
25988 2009-07-20  Gavin Barraclough  <barraclough@apple.com>
 
25992         Add ARM assembler files to xcodeproj, for convenience editing.
 
25994         * JavaScriptCore.xcodeproj/project.pbxproj:
 
25996 2009-07-20  Jessie Berlin  <jberlin@apple.com>
 
25998         Reviewed by David Levin.
 
26000         Fix an incorrect assertion in Vector::remove.
 
26002         https://bugs.webkit.org/show_bug.cgi?id=27477
 
26006         Assert that the position at which to start removing elements + the
 
26007         length (the number of elements to remove) is less than or equal to the
 
26008         size of the entire Vector.
 
26010 2009-07-20  Peter Kasting  <pkasting@google.com>
 
26012         Reviewed by Mark Rowe.
 
26014         https://bugs.webkit.org/show_bug.cgi?id=27468
 
26015         Back out r46060, which caused problems for some Apple developers.
 
26017         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
26018         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
 
26019         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
 
26020         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
26021         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
 
26023 2009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26025         Reviewed by Oliver Hunt.
 
26027         Allow custom memory allocation control in NewThreadContext
 
26028         https://bugs.webkit.org/show_bug.cgi?id=27338
 
26030         Inherits NewThreadContext struct from FastAllocBase because it
 
26031         has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76.
 
26033         * wtf/Threading.cpp:
 
26035 2009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26037         Reviewed by Oliver Hunt.
 
26039         Allow custom memory allocation control in JavaScriptCore's JSClassRef.h
 
26040         https://bugs.webkit.org/show_bug.cgi?id=27340
 
26042         Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these
 
26043         have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153
 
26044         and in JavaScriptCore/API/JSClassRef.cpp:166.
 
26046         * API/JSClassRef.h:
 
26048 2009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26050         Reviewed by Darin Adler.
 
26052         Allow custom memory allocation control in JavaScriptCore's RegexPattern.h
 
26053         https://bugs.webkit.org/show_bug.cgi?id=27343
 
26055         Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase:
 
26057         CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144)
 
26058         PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221) 
 
26059         PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446)
 
26061         * yarr/RegexPattern.h:
 
26063 2009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26065         Reviewed by Darin Adler.
 
26067         Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
 
26068         https://bugs.webkit.org/show_bug.cgi?id=27344
 
26070         Inherits MatchFrame struct from FastAllocBase because it has
 
26071         been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
 
26073         * pcre/pcre_exec.cpp:
 
26075 2009-07-20  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
26077         Reviewed by Holger Freyther.
 
26079         Remove some outdated S60 platform specific code
 
26080         https://bugs.webkit.org/show_bug.cgi?id=27423
 
26084 2009-07-20  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
26086         Reviewed by Simon Hausmann.
 
26088         Qt build fix with MSVC and MinGW.
 
26090         * jsc.pro: Make sure jsc is a console application, and turn off
 
26091         exceptions and stl support to fix the build.
 
26093 2009-07-20  Xan Lopez  <xlopez@igalia.com>
 
26095         Reviewed by Gustavo Noronha.
 
26097         Do not use C++-style comments in preprocessor directives.
 
26099         GCC does not like this in some configurations, using C-style
 
26104 2009-07-17  Peter Kasting  <pkasting@google.com>
 
26106         Reviewed by Steve Falkenburg.
 
26108         https://bugs.webkit.org/show_bug.cgi?id=27323
 
26109         Only add Cygwin to the path when it isn't already there.  This avoids
 
26110         causing problems for people who purposefully have non-Cygwin versions of
 
26111         executables like svn in front of the Cygwin ones in their paths.
 
26113         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
26114         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
 
26115         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
 
26116         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
 
26117         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
 
26119 2009-07-17  Gabor Loki  <loki@inf.u-szeged.hu>
 
26121         Reviewed by Gavin Barraclough.
 
26123         Add YARR support for generic ARM platforms (disabled by default).
 
26124         https://bugs.webkit.org/show_bug.cgi?id=24986
 
26126         Add generic ARM port for MacroAssembler. It supports the whole
 
26127         MacroAssembler functionality except floating point.
 
26129         The class JmpSrc is extended with a flag which enables to patch
 
26130         the jump destination offset during execution. This feature is
 
26131         required for generic ARM port.
 
26133         Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
 
26134         Signed off by Gabor Loki <loki@inf.u-szeged.hu>
 
26136         * JavaScriptCore.pri:
 
26137         * assembler/ARMAssembler.cpp: Added.
 
26138         (JSC::ARMAssembler::getLdrImmAddress):
 
26139         (JSC::ARMAssembler::linkBranch):
 
26140         (JSC::ARMAssembler::patchConstantPoolLoad):
 
26141         (JSC::ARMAssembler::getOp2):
 
26142         (JSC::ARMAssembler::genInt):
 
26143         (JSC::ARMAssembler::getImm):
 
26144         (JSC::ARMAssembler::moveImm):
 
26145         (JSC::ARMAssembler::dataTransfer32):
 
26146         (JSC::ARMAssembler::baseIndexTransfer32):
 
26147         (JSC::ARMAssembler::executableCopy):
 
26148         * assembler/ARMAssembler.h: Added.
 
26150         (JSC::ARMAssembler::ARMAssembler):
 
26151         (JSC::ARMAssembler::):
 
26152         (JSC::ARMAssembler::JmpSrc::JmpSrc):
 
26153         (JSC::ARMAssembler::JmpSrc::enableLatePatch):
 
26154         (JSC::ARMAssembler::JmpDst::JmpDst):
 
26155         (JSC::ARMAssembler::JmpDst::isUsed):
 
26156         (JSC::ARMAssembler::JmpDst::used):
 
26157         (JSC::ARMAssembler::emitInst):
 
26158         (JSC::ARMAssembler::and_r):
 
26159         (JSC::ARMAssembler::ands_r):
 
26160         (JSC::ARMAssembler::eor_r):
 
26161         (JSC::ARMAssembler::eors_r):
 
26162         (JSC::ARMAssembler::sub_r):
 
26163         (JSC::ARMAssembler::subs_r):
 
26164         (JSC::ARMAssembler::rsb_r):
 
26165         (JSC::ARMAssembler::rsbs_r):
 
26166         (JSC::ARMAssembler::add_r):
 
26167         (JSC::ARMAssembler::adds_r):
 
26168         (JSC::ARMAssembler::adc_r):
 
26169         (JSC::ARMAssembler::adcs_r):
 
26170         (JSC::ARMAssembler::sbc_r):
 
26171         (JSC::ARMAssembler::sbcs_r):
 
26172         (JSC::ARMAssembler::rsc_r):
 
26173         (JSC::ARMAssembler::rscs_r):
 
26174         (JSC::ARMAssembler::tst_r):
 
26175         (JSC::ARMAssembler::teq_r):
 
26176         (JSC::ARMAssembler::cmp_r):
 
26177         (JSC::ARMAssembler::orr_r):
 
26178         (JSC::ARMAssembler::orrs_r):
 
26179         (JSC::ARMAssembler::mov_r):
 
26180         (JSC::ARMAssembler::movs_r):
 
26181         (JSC::ARMAssembler::bic_r):
 
26182         (JSC::ARMAssembler::bics_r):
 
26183         (JSC::ARMAssembler::mvn_r):
 
26184         (JSC::ARMAssembler::mvns_r):
 
26185         (JSC::ARMAssembler::mul_r):
 
26186         (JSC::ARMAssembler::muls_r):
 
26187         (JSC::ARMAssembler::mull_r):
 
26188         (JSC::ARMAssembler::ldr_imm):
 
26189         (JSC::ARMAssembler::ldr_un_imm):
 
26190         (JSC::ARMAssembler::dtr_u):
 
26191         (JSC::ARMAssembler::dtr_ur):
 
26192         (JSC::ARMAssembler::dtr_d):
 
26193         (JSC::ARMAssembler::dtr_dr):
 
26194         (JSC::ARMAssembler::ldrh_r):
 
26195         (JSC::ARMAssembler::ldrh_d):
 
26196         (JSC::ARMAssembler::ldrh_u):
 
26197         (JSC::ARMAssembler::strh_r):
 
26198         (JSC::ARMAssembler::push_r):
 
26199         (JSC::ARMAssembler::pop_r):
 
26200         (JSC::ARMAssembler::poke_r):
 
26201         (JSC::ARMAssembler::peek_r):
 
26202         (JSC::ARMAssembler::clz_r):
 
26203         (JSC::ARMAssembler::bkpt):
 
26204         (JSC::ARMAssembler::lsl):
 
26205         (JSC::ARMAssembler::lsr):
 
26206         (JSC::ARMAssembler::asr):
 
26207         (JSC::ARMAssembler::lsl_r):
 
26208         (JSC::ARMAssembler::lsr_r):
 
26209         (JSC::ARMAssembler::asr_r):
 
26210         (JSC::ARMAssembler::size):
 
26211         (JSC::ARMAssembler::ensureSpace):
 
26212         (JSC::ARMAssembler::label):
 
26213         (JSC::ARMAssembler::align):
 
26214         (JSC::ARMAssembler::jmp):
 
26215         (JSC::ARMAssembler::patchPointerInternal):
 
26216         (JSC::ARMAssembler::patchConstantPoolLoad):
 
26217         (JSC::ARMAssembler::patchPointer):
 
26218         (JSC::ARMAssembler::repatchInt32):
 
26219         (JSC::ARMAssembler::repatchPointer):
 
26220         (JSC::ARMAssembler::repatchLoadPtrToLEA):
 
26221         (JSC::ARMAssembler::linkJump):
 
26222         (JSC::ARMAssembler::relinkJump):
 
26223         (JSC::ARMAssembler::linkCall):
 
26224         (JSC::ARMAssembler::relinkCall):
 
26225         (JSC::ARMAssembler::getRelocatedAddress):
 
26226         (JSC::ARMAssembler::getDifferenceBetweenLabels):
 
26227         (JSC::ARMAssembler::getCallReturnOffset):
 
26228         (JSC::ARMAssembler::getOp2Byte):
 
26229         (JSC::ARMAssembler::placeConstantPoolBarrier):
 
26230         (JSC::ARMAssembler::RM):
 
26231         (JSC::ARMAssembler::RS):
 
26232         (JSC::ARMAssembler::RD):
 
26233         (JSC::ARMAssembler::RN):
 
26234         (JSC::ARMAssembler::getConditionalField):
 
26235         * assembler/ARMv7Assembler.h:
 
26236         (JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
 
26237         * assembler/AbstractMacroAssembler.h:
 
26238         (JSC::AbstractMacroAssembler::Call::enableLatePatch):
 
26239         (JSC::AbstractMacroAssembler::Jump::enableLatePatch):
 
26240         * assembler/MacroAssembler.h:
 
26241         * assembler/MacroAssemblerARM.h: Added.
 
26242         (JSC::MacroAssemblerARM::):
 
26243         (JSC::MacroAssemblerARM::add32):
 
26244         (JSC::MacroAssemblerARM::and32):
 
26245         (JSC::MacroAssemblerARM::lshift32):
 
26246         (JSC::MacroAssemblerARM::mul32):
 
26247         (JSC::MacroAssemblerARM::not32):
 
26248         (JSC::MacroAssemblerARM::or32):
 
26249         (JSC::MacroAssemblerARM::rshift32):
 
26250         (JSC::MacroAssemblerARM::sub32):
 
26251         (JSC::MacroAssemblerARM::xor32):
 
26252         (JSC::MacroAssemblerARM::load32):
 
26253         (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
 
26254         (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
 
26255         (JSC::MacroAssemblerARM::load16):
 
26256         (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
 
26257         (JSC::MacroAssemblerARM::store32):
 
26258         (JSC::MacroAssemblerARM::pop):
 
26259         (JSC::MacroAssemblerARM::push):
 
26260         (JSC::MacroAssemblerARM::move):
 
26261         (JSC::MacroAssemblerARM::swap):
 
26262         (JSC::MacroAssemblerARM::signExtend32ToPtr):
 
26263         (JSC::MacroAssemblerARM::zeroExtend32ToPtr):
 
26264         (JSC::MacroAssemblerARM::branch32):
 
26265         (JSC::MacroAssemblerARM::branch16):
 
26266         (JSC::MacroAssemblerARM::branchTest32):
 
26267         (JSC::MacroAssemblerARM::jump):
 
26268         (JSC::MacroAssemblerARM::branchAdd32):
 
26269         (JSC::MacroAssemblerARM::mull32):
 
26270         (JSC::MacroAssemblerARM::branchMul32):
 
26271         (JSC::MacroAssemblerARM::branchSub32):
 
26272         (JSC::MacroAssemblerARM::breakpoint):
 
26273         (JSC::MacroAssemblerARM::nearCall):
 
26274         (JSC::MacroAssemblerARM::call):
 
26275         (JSC::MacroAssemblerARM::ret):
 
26276         (JSC::MacroAssemblerARM::set32):
 
26277         (JSC::MacroAssemblerARM::setTest32):
 
26278         (JSC::MacroAssemblerARM::tailRecursiveCall):
 
26279         (JSC::MacroAssemblerARM::makeTailRecursiveCall):
 
26280         (JSC::MacroAssemblerARM::moveWithPatch):
 
26281         (JSC::MacroAssemblerARM::branchPtrWithPatch):
 
26282         (JSC::MacroAssemblerARM::storePtrWithPatch):
 
26283         (JSC::MacroAssemblerARM::supportsFloatingPoint):
 
26284         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
 
26285         (JSC::MacroAssemblerARM::loadDouble):
 
26286         (JSC::MacroAssemblerARM::storeDouble):
 
26287         (JSC::MacroAssemblerARM::addDouble):
 
26288         (JSC::MacroAssemblerARM::subDouble):
 
26289         (JSC::MacroAssemblerARM::mulDouble):
 
26290         (JSC::MacroAssemblerARM::convertInt32ToDouble):
 
26291         (JSC::MacroAssemblerARM::branchDouble):
 
26292         (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
 
26293         (JSC::MacroAssemblerARM::ARMCondition):
 
26294         (JSC::MacroAssemblerARM::prepareCall):
 
26295         (JSC::MacroAssemblerARM::call32):
 
26296         * assembler/X86Assembler.h:
 
26297         (JSC::X86Assembler::JmpSrc::enableLatePatch):
 
26298         * jit/ExecutableAllocator.h:
 
26299         (JSC::ExecutableAllocator::cacheFlush):
 
26301         * yarr/RegexJIT.cpp:
 
26302         (JSC::Yarr::RegexGenerator::generateEnter):
 
26303         (JSC::Yarr::RegexGenerator::generateReturn):
 
26305 2009-07-17  Gabor Loki  <loki@inf.u-szeged.hu>
 
26307         Reviewed by Gavin Barraclough.
 
26309         Extend AssemblerBuffer with constant pool handling mechanism.
 
26310         https://bugs.webkit.org/show_bug.cgi?id=24986
 
26312         Add a platform independed constant pool framework.
 
26313         This pool can store 32 or 64 bits values which is enough to hold
 
26314         any integer, pointer or double constant.
 
26316         * assembler/AssemblerBuffer.h:
 
26317         (JSC::AssemblerBuffer::putIntUnchecked):
 
26318         (JSC::AssemblerBuffer::putInt64Unchecked):
 
26319         (JSC::AssemblerBuffer::append):
 
26320         (JSC::AssemblerBuffer::grow):
 
26321         * assembler/AssemblerBufferWithConstantPool.h: Added.
 
26324 2009-07-17  Eric Roman  <eroman@chromium.org>
 
26326         Reviewed by Darin Adler.
 
26328         Build fix for non-Darwin.
 
26329         Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
 
26331         https://bugs.webkit.org/show_bug.cgi?id=27382
 
26333         * wtf/unicode/icu/CollatorICU.cpp:
 
26335 2009-07-17  Alexey Proskuryakov  <ap@webkit.org>
 
26337         Reviewed by John Sullivan.
 
26339         Get user default collation order via a CFLocale API when available.
 
26341         * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
 
26343 2009-07-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
26345         Reviewed by Simon Hausmann.
 
26347         [Qt] Fix the include path for the Symbian port
 
26348         https://bugs.webkit.org/show_bug.cgi?id=27358
 
26350         * JavaScriptCore.pri:
 
26352 2009-07-17  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
 
26354         Reviewed by David Levin.
 
26356         Build fix on platforms don't have MMAP.
 
26357         https://bugs.webkit.org/show_bug.cgi?id=27365
 
26359         * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
 
26361 2009-07-16  Fumitoshi Ukai  <ukai@chromium.org>
 
26363         Reviewed by David Levin.
 
26365         Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
 
26366         https://bugs.webkit.org/show_bug.cgi?id=27206
 
26368         Add ENABLE_WEB_SOCKETS
 
26370         * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
 
26372 2009-07-16  Maxime Simon  <simon.maxime@gmail.com>
 
26374         Reviewed by Eric Seidel.
 
26376         Added Haiku-specific files for JavaScriptCore.
 
26377         https://bugs.webkit.org/show_bug.cgi?id=26620
 
26379         * wtf/haiku/MainThreadHaiku.cpp: Added.
 
26380         (WTF::initializeMainThreadPlatform):
 
26381         (WTF::scheduleDispatchFunctionsOnMainThread):
 
26383 2009-07-16  Gavin Barraclough  <barraclough@apple.com>
 
26387         Revert r45969, this fix does not appear to be valid.
 
26388         https://bugs.webkit.org/show_bug.cgi?id=27077
 
26390         * bytecode/CodeBlock.cpp:
 
26391         (JSC::CodeBlock::~CodeBlock):
 
26392         (JSC::CodeBlock::unlinkCallers):
 
26396 2009-07-16  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26398         Reviewed by Oliver Hunt.
 
26400         Allow custom memory allocation control in ExceptionInfo and RareData struct
 
26401         https://bugs.webkit.org/show_bug.cgi?id=27336
 
26403         Inherits ExceptionInfo and RareData struct from FastAllocBase because these
 
26404         have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
 
26405         in JavaScriptCore/bytecode/CodeBlock.h:453.
 
26407         Remove unnecessary WTF:: namespace from CodeBlock inheritance.
 
26409         * bytecode/CodeBlock.h:
 
26411 2009-07-16  Mark Rowe  <mrowe@apple.com>
 
26413         Rubber-stamped by Geoff Garen.
 
26415         Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
 
26417         * Configurations/FeatureDefines.xcconfig:
 
26419 2009-07-16  Yong Li  <yong.li@torchmobile.com>
 
26421          Reviewed by George Staikos.
 
26423          https://bugs.webkit.org/show_bug.cgi?id=27320
 
26424          _countof is only included in CE6; for CE5 we need to define it ourself
 
26428 2009-07-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
26430         Reviewed by Oliver Hunt.
 
26432         Workers + garbage collector: weird crashes
 
26433         https://bugs.webkit.org/show_bug.cgi?id=27077
 
26435         We need to unlink cached method call sites when a function is destroyed.
 
26437         * JavaScriptCore.xcodeproj/project.pbxproj:
 
26438         * bytecode/CodeBlock.cpp:
 
26439         (JSC::CodeBlock::~CodeBlock):
 
26440         (JSC::CodeBlock::unlinkCallers):
 
26442         (JSC::JIT::unlinkMethodCall):
 
26445 2009-07-15  Steve Falkenburg  <sfalken@apple.com>
 
26449         Visual Studio reset our intermediate directory on us.
 
26452         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
26453         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
 
26455 2009-07-15  Kwang Yul Seo  <skyul@company100.net>
 
26457         Reviewed by Eric Seidel.
 
26459         https://bugs.webkit.org/show_bug.cgi?id=26794
 
26460         Make Yacc-generated parsers to use fastMalloc/fastFree.
 
26462         Define YYMALLOC and YYFREE to fastMalloc and fastFree
 
26465         * parser/Grammar.y:
 
26467 2009-07-15  Darin Adler  <darin@apple.com>
 
26469         Fix a build for a particular Apple configuration.
 
26471         * wtf/FastAllocBase.h: Change include to use "" style for
 
26472         including another wtf header. This is the style we use for
 
26473         including other public headers in the same directory.
 
26475 2009-07-15  George Staikos  <george.staikos@torchmobile.com>
 
26477         Reviewed by Adam Treat.
 
26479         https://bugs.webkit.org/show_bug.cgi?id=27303
 
26480         Implement createThreadInternal for WinCE.
 
26481         Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
 
26483         * wtf/ThreadingWin.cpp:
 
26484         (WTF::createThreadInternal):
 
26486 2009-07-15  Joe Mason  <joe.mason@torchmobile.com>
 
26488          Reviewed by George Staikos.
 
26490          https://bugs.webkit.org/show_bug.cgi?id=27298
 
26491          Platform defines for WINCE.
 
26492          Contains changes by Yong Li <yong.li@torchmobile.com>,
 
26493          George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
 
26497 2009-07-15  Yong Li  <yong.li@torchmobile.com>
 
26499          Reviewed by Adam Treat.
 
26501          https://bugs.webkit.org/show_bug.cgi?id=27306
 
26502          Use RegisterClass instead of RegisterClassEx on WinCE.
 
26504          * wtf/win/MainThreadWin.cpp:
 
26505          (WTF::initializeMainThreadPlatform):
 
26507 2009-07-15  Yong Li  <yong.li@torchmobile.com>
 
26509          Reviewed by George Staikos.
 
26511          https://bugs.webkit.org/show_bug.cgi?id=27301
 
26512          Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
 
26513          Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
 
26514          Joe Mason <joe.mason@torchmobile.com>
 
26516          * wtf/Assertions.cpp: vprintf_stderr_common
 
26518 2009-07-15  Yong Li  <yong.li@torchmobile.com>
 
26520          Reviewed by George Staikos.
 
26522          https://bugs.webkit.org/show_bug.cgi?id=27020
 
26523          msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
 
26525          * wtf/DateMath.cpp:
 
26526          (WTF::gregorianDateTimeToMS):
 
26528 2009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
26530         Reviewed by Simon Hausmann.
 
26532         [Qt] Cleanup - Remove obsolete code from the make system
 
26533         https://bugs.webkit.org/show_bug.cgi?id=27299
 
26535         * JavaScriptCore.pro:
 
26538 2009-07-07  Norbert Leser  <norbert.leser@nokia.com>
 
26540         Reviewed by Simon Hausmann.
 
26542         https://bugs.webkit.org/show_bug.cgi?id=27056
 
26544         Alternate bool operator for codewarrior compiler (WINSCW).
 
26545         Compiler (latest b482) reports error for UnspecifiedBoolType construct:
 
26546         "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
 
26548         Same fix as in r38391.
 
26550         * JavaScriptCore/wtf/OwnArrayPtr.h:
 
26552 2009-07-15  Norbert Leser  <norbert.leser@nokia.com>
 
26554         Reviewed by Darin Adler.
 
26556         Qualify include path with wtf to fix compilation
 
26558         https://bugs.webkit.org/show_bug.cgi?id=27055
 
26560         * interpreter/Interpreter.h:
 
26562 2009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
26564         Reviewed by Dave Kilzer.
 
26566         Turn off non-portable date manipulations for SYMBIAN
 
26567         https://bugs.webkit.org/show_bug.cgi?id=27064
 
26569         Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards 
 
26570         and place the rules for controlling the guards in Platform.h.
 
26571         Turn off these newly introduced guards for SYMBIAN.
 
26573         * wtf/DateMath.cpp:
 
26574         (WTF::calculateUTCOffset):
 
26576         (WTF::GregorianDateTime::GregorianDateTime):
 
26577         (WTF::GregorianDateTime::operator tm):
 
26580 2009-07-15  Norbert Leser  <norbert.leser@nokia.com>
 
26582         Reviewed by Simon Hausmann.
 
26584         Undef ASSERT on Symbian, to avoid excessive warnings
 
26585         https://bugs.webkit.org/show_bug.cgi?id=27052
 
26587         * wtf/Assertions.h:
 
26589 2009-07-15  Oliver Hunt  <oliver@apple.com>
 
26591         Reviewed by Simon Hausmann.
 
26593         REGRESSION: fast/js/postfix-syntax.html fails with interpreter
 
26594         https://bugs.webkit.org/show_bug.cgi?id=27294
 
26596         When postfix operators operating on locals assign to the same local
 
26597         the order of operations has to be to store the incremented value, then
 
26598         store the unmodified number.  Rather than implementing this subtle
 
26599         semantic in the interpreter I've just made the logic explicit in the
 
26600         bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
 
26603         * parser/Nodes.cpp:
 
26604         (JSC::emitPostIncOrDec):
 
26606 2009-07-15  Oliver Hunt  <oliver@apple.com>
 
26608         Reviewed by Simon Hausmann.
 
26610         REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
 
26611         https://bugs.webkit.org/show_bug.cgi?id=27259
 
26613         The interpreter was incorrectly basing its need to create the arguments object
 
26614         based on the presence of the callframe's argument reference rather than the local
 
26615         arguments reference.  Based on this it then overrode the local variable reference.
 
26617         * interpreter/Interpreter.cpp:
 
26618         (JSC::Interpreter::privateExecute):
 
26620 2009-07-14  Steve Falkenburg  <sfalken@apple.com>
 
26622         Reorganize JavaScriptCore headers into:
 
26623         API: include/JavaScriptCore/
 
26624         Private: include/private/JavaScriptCore/
 
26626         Reviewed by Darin Adler.
 
26628         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
26629         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
 
26630         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
 
26631         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
 
26632         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
 
26634 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26636         Reviewed by Darin Adler.
 
26638         Change JSCell's superclass to NoncopyableCustomAllocated
 
26639         https://bugs.webkit.org/show_bug.cgi?id=27248
 
26641         JSCell class customizes operator new, since Noncopyable will be 
 
26642         inherited from FastAllocBase, NoncopyableCustomAllocated has 
 
26645         * runtime/JSCell.h:
 
26647 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26649         Reviewed by Darin Adler.
 
26651         Change all Noncopyable inheriting visibility to public.
 
26652         https://bugs.webkit.org/show_bug.cgi?id=27225
 
26654         Change all Noncopyable inheriting visibility to public because
 
26655         it is needed to the custom allocation framework (bug #20422).
 
26657         * bytecode/SamplingTool.h:
 
26658         * bytecompiler/RegisterID.h:
 
26659         * interpreter/CachedCall.h:
 
26660         * interpreter/RegisterFile.h:
 
26663         * runtime/ArgList.h:
 
26664         * runtime/BatchedTransitionOptimizer.h:
 
26665         * runtime/Collector.h:
 
26666         * runtime/CommonIdentifiers.h:
 
26667         * runtime/JSCell.h:
 
26668         * runtime/JSGlobalObject.h:
 
26669         * runtime/JSLock.h:
 
26670         * runtime/JSONObject.cpp:
 
26671         * runtime/SmallStrings.cpp:
 
26672         * runtime/SmallStrings.h:
 
26673         * wtf/CrossThreadRefCounted.h:
 
26676         * wtf/MessageQueue.h:
 
26677         * wtf/OwnArrayPtr.h:
 
26678         * wtf/OwnFastMallocPtr.h:
 
26680         * wtf/RefCounted.h:
 
26681         * wtf/ThreadSpecific.h:
 
26684         * wtf/unicode/Collator.h:
 
26686 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26688         Reviewed by Darin Adler.
 
26690         Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
 
26691         https://bugs.webkit.org/show_bug.cgi?id=27249
 
26693         ParserArenaDeletable customizes operator new, to avoid double inheritance
 
26694         ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
 
26698 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26700         Reviewed by Darin Adler.
 
26702         Add RefCountedCustomAllocated to RefCounted.h
 
26703         https://bugs.webkit.org/show_bug.cgi?id=27232
 
26705         Some class which are inherited from RefCounted customize
 
26706         operator new, but RefCounted is inherited from Noncopyable
 
26707         which will be inherited from FastAllocBase. To avoid
 
26708         conflicts Noncopyable inheriting was moved down to RefCounted
 
26709         and to avoid double inheritance this class has been added.
 
26711         * wtf/RefCounted.h:
 
26712         (WTF::RefCountedCustomAllocated::deref):
 
26713         (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
 
26715 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26717         Reviewed by Darin Adler.
 
26719         Add NoncopyableCustomAllocated to Noncopyable.h.
 
26720         https://bugs.webkit.org/show_bug.cgi?id=27228
 
26722         Some classes which inherited from Noncopyable overrides operator new
 
26723         since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h 
 
26724         needs to be extended with this new class to support the overriding. 
 
26726         * wtf/Noncopyable.h:
 
26727         (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
 
26728         (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
 
26730 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26732         Reviewed by Darin Adler.
 
26734         Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
 
26735         https://bugs.webkit.org/show_bug.cgi?id=27260
 
26737         Inherits IdentifierTable class from FastAllocBase because it has been
 
26738         instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
 
26740         * runtime/Identifier.cpp:
 
26742 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
26744         Reviewed by Darin Adler.
 
26746         Allow custom memory allocation control for JavaScriptCore's Profiler class
 
26747         https://bugs.webkit.org/show_bug.cgi?id=27253
 
26749         Inherits Profiler class from FastAllocBase because it has been instantiated by
 
26750         'new' in JavaScriptCore/profiler/Profiler.cpp:56.
 
26752         * profiler/Profiler.h:
 
26754 2009-07-06  George Staikos  <george.staikos@torchmobile.com>
 
26756         Reviewed by Adam Treat.
 
26758         Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
 
26760         https://bugs.webkit.org/show_bug.cgi?id=27030
 
26761         Implement custom RNG for WinCE using Mersenne Twister
 
26763         * wtf/RandomNumber.cpp:
 
26764         (WTF::randomNumber):
 
26765         * wtf/RandomNumberSeed.h:
 
26766         (WTF::initializeRandomNumberGenerator):
 
26767         * wtf/wince/mt19937ar.c: Added.
 
26777 2009-07-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
 
26779         Unreviewed make dist build fix.
 
26783 2009-07-13  Drew Wilson  <atwilson@google.com>
 
26785         Reviewed by David Levin.
 
26787         Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
 
26788         https://bugs.webkit.org/show_bug.cgi?id=26932
 
26790         Added ENABLE(SHARED_WORKERS) flag (off by default).
 
26792         * Configurations/FeatureDefines.xcconfig:
 
26794 2009-07-07  Norbert Leser  <norbert.leser@nokia.com>
 
26796         Reviewed by Maciej Stachoviak.
 
26798         https://bugs.webkit.org/show_bug.cgi?id=27058
 
26800         Removed superfluous parenthesis around single expression.
 
26801         Compilers on Symbian platform fail to properly parse and compile.
 
26803         * JavaScriptCore/wtf/Platform.h:
 
26805 2009-07-13  Norbert Leser  <norbert.leser@nokia.com>
 
26807         Reviewed by Maciej Stachoviak.
 
26809         https://bugs.webkit.org/show_bug.cgi?id=27054
 
26811         Renamed Translator to HashTranslator
 
26813         Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
 
26814         mismatch between template declaration and definition
 
26815         (HashTranslator / Translator)
 
26819 2009-07-13  Norbert Leser  <norbert.leser@nokia.com>
 
26821         Reviewed by Eric Seidel.
 
26823         https://bugs.webkit.org/show_bug.cgi?id=27053
 
26825         Ambiguity in LabelScope initialization
 
26827         Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
 
26828         type of "0" unambiguously. Set expression explicitly to
 
26829         PassRefPtr<Label>::PassRefPtr()
 
26831         * bytecompiler/BytecodeGenerator.cpp
 
26833 2009-07-11  Simon Fraser  <simon.fraser@apple.com>
 
26835         Enable support for accelerated compositing and 3d transforms on Leopard.
 
26836         <https://bugs.webkit.org/show_bug.cgi?id=20166>
 
26837         <rdar://problem/6120614>
 
26839         Reviewed by Oliver Hunt.
 
26841         * Configurations/FeatureDefines.xcconfig:
 
26844 2009-07-10  Mark Rowe  <mrowe@apple.com>
 
26846         Second part of the "make Windows happier" dance.
 
26848         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
26849         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
26851 2009-07-10  Mark Rowe  <mrowe@apple.com>
 
26853         Try and make the Windows build happy.
 
26855         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
26856         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
26858 2009-07-10  Kevin McCullough  <kmccullough@apple.com>
 
26860         Reviewed by Geoffrey Garen.
 
26862         * debugger/Debugger.h: Made this function virtual for use in WebCore's
 
26865 2009-07-10  Kwang Yul Seo  <skyul@company100.net>
 
26867         Reviewed by Darin Adler.
 
26869         ParserArenaDeletable should override delete
 
26870         https://bugs.webkit.org/show_bug.cgi?id=26790
 
26872         ParserArenaDeletable overrides new, but it does not override delete.
 
26873         ParserArenaDeletable must be freed by fastFree
 
26874         because it is allocated by fastMalloc.
 
26876         * parser/NodeConstructors.h:
 
26877         (JSC::ParserArenaDeletable::operator delete):
 
26880 2009-07-10  Adam Roben  <aroben@apple.com>
 
26882         Sort all our Xcode projects
 
26884         Accomplished using sort-Xcode-project-file.
 
26886         Requested by Dave Kilzer.
 
26888         * JavaScriptCore.xcodeproj/project.pbxproj:
 
26890 2009-07-09  Maciej Stachowiak  <mjs@apple.com>
 
26892         Not reviewed, build fix.
 
26894         Windows build fix for the last change.
 
26896         * wtf/dtoa.cpp: Forgot to include Vector.h
 
26898 2009-07-09  Maciej Stachowiak  <mjs@apple.com>
 
26900         Reviewed by Darin Adler.
 
26902         REGRESSION: crash in edge cases of floating point parsing.
 
26903         https://bugs.webkit.org/show_bug.cgi?id=27110
 
26904         <rdar://problem/7044458>
 
26906         Tests: fast/css/number-parsing-crash.html
 
26907                fast/css/number-parsing-crash.html
 
26908                fast/js/number-parsing-crash.html
 
26911         (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
 
26912         with inline capacity
 
26914         (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
 
26915         Added an assertion to verify that invariants are maintained.
 
26917         All other functions are adapted fairly mechanically to the above changes.
 
26918         (WTF::BigInt::clear):
 
26919         (WTF::BigInt::size):
 
26920         (WTF::BigInt::resize):
 
26921         (WTF::BigInt::words):
 
26922         (WTF::BigInt::append):
 
26936 2009-07-09  Drew Wilson  <atwilson@google.com>
 
26938         Reviewed by Alexey Proskuryakov.
 
26940         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
 
26941         can now be implemented for Web Workers and is reasonably stable.
 
26943         * Configurations/FeatureDefines.xcconfig:
 
26945 2009-07-09  Oliver Hunt  <oliver@apple.com>
 
26947         * interpreter/Interpreter.cpp:
 
26948         (JSC::Interpreter::privateExecute):
 
26950 2009-07-09  Oliver Hunt  <oliver@apple.com>
 
26952         Reviewed by Darin Adler.
 
26954         Bug 27016 - Interpreter crashes due to invalid array indexes
 
26955         <https://bugs.webkit.org/show_bug.cgi?id=27016>
 
26957         Unsigned vs signed conversions results in incorrect behaviour in
 
26958         64bit interpreter builds.
 
26960         * interpreter/Interpreter.cpp:
 
26961         (JSC::Interpreter::privateExecute):
 
26963 2009-07-09  Dimitri Glazkov  <dglazkov@chromium.org>
 
26965         Reviewed by Darin Fisher.
 
26967         [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
 
26968         https://bugs.webkit.org/show_bug.cgi?id=27135
 
26970         * JavaScriptCore.gypi: Added.
 
26972 2009-07-09  Joe Mason  <joe.mason@torchmobile.com>
 
26974         Reviewed by George Staikos.
 
26976         Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
 
26978         https://bugs.webkit.org/show_bug.cgi?id=27031
 
26979         Add an override for deleteOwnedPtr(HDC) on Windows
 
26981         * wtf/OwnPtrCommon.h:
 
26982         * wtf/OwnPtrWin.cpp:
 
26983         (WTF::deleteOwnedPtr):
 
26985 2009-07-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
 
26987         Reviewed by Darin Adler.
 
26989         Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
 
26992         https://bugs.webkit.org/show_bug.cgi?id=27026
 
26994         Based on Norbert Leser's work.
 
26997         (printUsageStatement):
 
27001 2009-07-07  Gavin Barraclough  <barraclough@apple.com>
 
27003         Reviewed by Sam Weinig.
 
27005         Stop loading constants into the register file.
 
27007         Instead, use high register values (highest bit bar the sign bit set) to indicate
 
27008         constants in the instruction stream, and when we encounter such a value load it
 
27009         directly from the CodeBlock.
 
27011         Since constants are no longer copied into the register file, this patch renders
 
27012         the 'unexpected constant' mechanism redundant, and removes it.
 
27014         2% improvement, thanks to Sam Weinig.
 
27016         * bytecode/CodeBlock.cpp:
 
27017         (JSC::CodeBlock::dump):
 
27018         (JSC::CodeBlock::CodeBlock):
 
27019         (JSC::CodeBlock::mark):
 
27020         (JSC::CodeBlock::shrinkToFit):
 
27021         * bytecode/CodeBlock.h:
 
27022         (JSC::CodeBlock::isTemporaryRegisterIndex):
 
27023         (JSC::CodeBlock::constantRegister):
 
27024         (JSC::CodeBlock::isConstantRegisterIndex):
 
27025         (JSC::CodeBlock::getConstant):
 
27026         (JSC::ExecState::r):
 
27027         * bytecode/Opcode.h:
 
27028         * bytecompiler/BytecodeGenerator.cpp:
 
27029         (JSC::BytecodeGenerator::preserveLastVar):
 
27030         (JSC::BytecodeGenerator::BytecodeGenerator):
 
27031         (JSC::BytecodeGenerator::addConstantValue):
 
27032         (JSC::BytecodeGenerator::emitEqualityOp):
 
27033         (JSC::BytecodeGenerator::emitLoad):
 
27034         (JSC::BytecodeGenerator::emitResolveBase):
 
27035         (JSC::BytecodeGenerator::emitResolveWithBase):
 
27036         (JSC::BytecodeGenerator::emitNewError):
 
27037         * bytecompiler/BytecodeGenerator.h:
 
27038         (JSC::BytecodeGenerator::emitNode):
 
27039         * interpreter/CallFrame.h:
 
27040         (JSC::ExecState::noCaller):
 
27041         (JSC::ExecState::hasHostCallFrameFlag):
 
27042         (JSC::ExecState::addHostCallFrameFlag):
 
27043         (JSC::ExecState::removeHostCallFrameFlag):
 
27044         * interpreter/Interpreter.cpp:
 
27045         (JSC::Interpreter::resolve):
 
27046         (JSC::Interpreter::resolveSkip):
 
27047         (JSC::Interpreter::resolveGlobal):
 
27048         (JSC::Interpreter::resolveBase):
 
27049         (JSC::Interpreter::resolveBaseAndProperty):
 
27050         (JSC::Interpreter::resolveBaseAndFunc):
 
27051         (JSC::Interpreter::dumpRegisters):
 
27052         (JSC::Interpreter::throwException):
 
27053         (JSC::Interpreter::createExceptionScope):
 
27054         (JSC::Interpreter::privateExecute):
 
27055         (JSC::Interpreter::retrieveArguments):
 
27057         (JSC::JIT::privateCompileMainPass):
 
27058         * jit/JITInlineMethods.h:
 
27059         (JSC::JIT::emitLoadDouble):
 
27060         (JSC::JIT::emitLoadInt32ToDouble):
 
27061         * jit/JITOpcodes.cpp:
 
27062         (JSC::JIT::emit_op_new_error):
 
27063         (JSC::JIT::emit_op_enter):
 
27064         (JSC::JIT::emit_op_enter_with_activation):
 
27065         * parser/Nodes.cpp:
 
27066         (JSC::DeleteResolveNode::emitBytecode):
 
27067         (JSC::DeleteValueNode::emitBytecode):
 
27068         (JSC::PrefixResolveNode::emitBytecode):
 
27069         * runtime/JSActivation.cpp:
 
27070         (JSC::JSActivation::JSActivation):
 
27073 2009-07-07  Mark Rowe  <mrowe@apple.com>
 
27075         Reviewed by Darin Adler.
 
27077         Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
 
27078         Bug 27025: Crashes and regression test failures related to regexps in 64-bit
 
27080         For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
 
27081         neglects to save and restore it.  The change in handling of the output vector in r45545
 
27082         altered code generation so that the RegExp::match was now storing important data in rbx,
 
27083         which caused crashes and bogus results when it was clobbered.
 
27085         * yarr/RegexJIT.cpp:
 
27086         (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
 
27087         (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
 
27089 2009-07-06  Ada Chan  <adachan@apple.com>
 
27091         Reviewed by Darin Adler and Mark Rowe.
 
27093         Decommitted spans are added to the list of normal spans rather than 
 
27094         the returned spans in TCMalloc_PageHeap::Delete().
 
27095         https://bugs.webkit.org/show_bug.cgi?id=26998
 
27097         In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in 
 
27098         the process of merging with neighboring spans that are also decommitted.  
 
27099         The merged span needs to be placed in the list of returned spans (spans 
 
27100         whose memory has been returned to the system).  Right now it's always added 
 
27101         to the list of the normal spans which can theoretically cause thrashing.  
 
27103         * wtf/FastMalloc.cpp:
 
27104         (WTF::TCMalloc_PageHeap::Delete):
 
27106 2009-07-05  Lars Knoll  <lars.knoll@nokia.com>
 
27108         Reviewed by Maciej Stachowiak.
 
27110         https://bugs.webkit.org/show_bug.cgi?id=26843
 
27112         Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
 
27114         The Metrowerks compiler on the Symbian platform moves the globally
 
27115         defined Hashtables into read-only memory, despite one of the members
 
27116         being mutable. This causes crashes at run-time due to write access to
 
27119         Avoid the use of const with this compiler by introducing the
 
27120         JSC_CONST_HASHTABLE macro.
 
27122         Based on idea by Norbert Leser.
 
27124         * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
 
27125         * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
 
27126         * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
 
27128 2009-07-04  Dan Bernstein  <mitz@apple.com>
 
27132         * runtime/RegExpConstructor.cpp:
 
27133         (JSC::RegExpConstructor::getLastParen):
 
27135 2009-07-03  Yong Li  <yong.li@torchmobile.com>
 
27137         Reviewed by Maciej Stachowiak (and revised slightly)
 
27139         RegExp::match to be optimized
 
27140         https://bugs.webkit.org/show_bug.cgi?id=26957
 
27142         Allow regexp matching to use Vectors with inline capacity instead of
 
27143         allocating a new ovector buffer every time.
 
27145         ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
 
27147         * runtime/RegExp.cpp:
 
27148         (JSC::RegExp::match):
 
27149         * runtime/RegExp.h:
 
27150         * runtime/RegExpConstructor.cpp:
 
27151         (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
 
27152         (JSC::RegExpConstructorPrivate::lastOvector):
 
27153         (JSC::RegExpConstructorPrivate::tempOvector):
 
27154         (JSC::RegExpConstructorPrivate::changeLastOvector):
 
27155         (JSC::RegExpConstructor::performMatch):
 
27156         (JSC::RegExpMatchesArray::RegExpMatchesArray):
 
27157         (JSC::RegExpMatchesArray::fillArrayInstance):
 
27158         (JSC::RegExpConstructor::getBackref):
 
27159         (JSC::RegExpConstructor::getLastParen):
 
27160         (JSC::RegExpConstructor::getLeftContext):
 
27161         (JSC::RegExpConstructor::getRightContext):
 
27162         * runtime/StringPrototype.cpp:
 
27163         (JSC::stringProtoFuncSplit):
 
27165 2009-06-30  Kwang Yul Seo  <skyul@company100.net>
 
27167         Reviewed by Eric Seidel.
 
27169         Override operator new/delete with const std::nothrow_t& as the second
 
27171         https://bugs.webkit.org/show_bug.cgi?id=26792
 
27173         On Windows CE, operator new/delete, new[]/delete[] with const
 
27174         std::nothrow_t& must be overrided because some standard template
 
27175         libraries use these operators.
 
27177         The problem occurs when memory allocated by new(size_t s, const
 
27178         std::nothrow_t&) is freed by delete(void* p). This causes the umatched
 
27179         malloc/free problem.
 
27181         The patch overrides all new, delete, new[] and delete[] to use
 
27182         fastMaloc and fastFree consistently.
 
27184         * wtf/FastMalloc.h:
 
27187 2009-06-30  Gabor Loki  <loki@inf.u-szeged.hu>
 
27189         Reviewed by Sam Weinig.
 
27191         <https://bugs.webkit.org/show_bug.cgi?id=24986>
 
27193         Remove unnecessary references to AssemblerBuffer.
 
27195         * interpreter/Interpreter.cpp:
 
27196         * interpreter/Interpreter.h:
 
27198 2009-06-29  David Levin  <levin@chromium.org>
 
27200         Reviewed by Oliver Hunt.
 
27202         Still seeing occasional leaks from UString::sharedBuffer code
 
27203         https://bugs.webkit.org/show_bug.cgi?id=26420
 
27205         The problem is that the pointer to the memory allocation isn't visible
 
27206         by "leaks" due to the lower bits being used as flags.  The fix is to
 
27207         make the pointer visible in memory (in debug only). The downside of
 
27208         this fix that the memory allocated by sharedBuffer will still look like
 
27209         a leak in non-debug builds when any flags are set.
 
27211         * wtf/PtrAndFlags.h:
 
27212         (WTF::PtrAndFlags::set):
 
27214 2009-06-29  Sam Weinig  <sam@webkit.org>
 
27216         Reviewed by Mark Rowe.
 
27218         Remove more unused scons support.
 
27220         * SConstruct: Removed.
 
27222 2009-06-29  Oliver Hunt  <oliver@apple.com>
 
27224         Reviewed by Gavin Barraclough.
 
27226         <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
 
27227         <https://bugs.webkit.org/show_bug.cgi?id=26802>
 
27229         In the original JSON.parse patch unicode was handled correctly, however in some last
 
27230         minute "clean up" I oversimplified isSafeStringCharacter.  This patch corrects this bug.
 
27232         * runtime/LiteralParser.cpp:
 
27233         (JSC::isSafeStringCharacter):
 
27234         (JSC::LiteralParser::Lexer::lexString):
 
27236 2009-06-26  Oliver Hunt  <oliver@apple.com>
 
27238         Reviewed by Dan Bernstein.
 
27240         <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
 
27241         <https://bugs.webkit.org/show_bug.cgi?id=26746>
 
27243         Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id.  Clearly this
 
27244         is less than correct.  This patch corrects that error.
 
27246         * interpreter/Interpreter.cpp:
 
27247         (JSC::Interpreter::tryCacheGetByID):
 
27249 2009-06-26  Eric Seidel  <eric@webkit.org>
 
27251         No review, only rolling out r45259.
 
27253         Roll out r45259 after crash appeared on the bots:
 
27254         plugins/undefined-property-crash.html
 
27255         ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
 
27256         (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
 
27257         void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
 
27259         * runtime/DateInstance.cpp:
 
27260         * runtime/Identifier.cpp:
 
27261         * runtime/Lookup.h:
 
27262         * runtime/RegExpConstructor.cpp:
 
27263         * runtime/RegExpObject.h:
 
27264         * runtime/ScopeChain.h:
 
27265         * runtime/UString.h:
 
27267 2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
 
27269         Reviewed by Simon Hausmann.
 
27271         Add support for QDataStream operators to Vector.
 
27277 2009-06-24  Sam Weinig  <sam@webkit.org>
 
27279         Reviewed by Gavin Barraclough.
 
27281         Make the opcode sampler work once again.
 
27284         (JSC::JIT::compileGetByIdProto):
 
27285         (JSC::JIT::compileGetByIdSelfList):
 
27286         (JSC::JIT::compileGetByIdProtoList):
 
27287         (JSC::JIT::compileGetByIdChainList):
 
27288         (JSC::JIT::compileGetByIdChain):
 
27289         (JSC::JIT::compilePutByIdTransition):
 
27290         (JSC::JIT::compileCTIMachineTrampolines):
 
27291         (JSC::JIT::compilePatchGetArrayLength):
 
27292         * jit/JITStubCall.h:
 
27293         (JSC::JITStubCall::call):
 
27295 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27297         Reviewed by Maciej Stachowiak.
 
27299         Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
 
27300         unnecessary WTF:: usings.
 
27301         Remove existing unnecessary WTF:: usings.
 
27303         * interpreter/Interpreter.h:
 
27304         * profiler/CallIdentifier.h:
 
27305         * runtime/ScopeChain.h:
 
27306         * wtf/FastAllocBase.h:
 
27308 2009-06-24  David Levin  <levin@chromium.org>
 
27312         * bytecode/CodeBlock.h:
 
27313         * bytecompiler/BytecodeGenerator.h:
 
27314         * interpreter/Register.h:
 
27316 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27318         Reviewed by Maciej Stachowiak.
 
27320         https://bugs.webkit.org/show_bug.cgi?id=26677
 
27322         Inherits CodeBlock class from FastAllocBase because it
 
27323         has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
 
27325         * bytecode/CodeBlock.h:
 
27327 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27329         Reviewed by Maciej Stachowiak.
 
27331         https://bugs.webkit.org/show_bug.cgi?id=26676
 
27333         Inherits BytecodeGenerator class from FastAllocBase because it has been
 
27334         instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
 
27336         * bytecompiler/BytecodeGenerator.h:
 
27338 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27340         Reviewed by Maciej Stachowiak.
 
27342         https://bugs.webkit.org/show_bug.cgi?id=26675
 
27344         Inherits Register class from FastAllocBase because it has been
 
27345         instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
 
27347         * interpreter/Register.h:
 
27349 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27351         Reviewed by Darin Adler.
 
27353         https://bugs.webkit.org/show_bug.cgi?id=26674
 
27355         Inherits HashMap class from FastAllocBase because it has been
 
27356         instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
 
27360 2009-06-24  Oliver Hunt  <oliver@apple.com>
 
27362         Reviewed by Darin Adler.
 
27364         <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
 
27366         The problem was caused by the page returned with a function using a
 
27367         var declaration list containing around ~3000 variables.  The solution
 
27368         to this is to flatten the comma expression representation and make
 
27369         codegen comma expressions and initializer lists iterative rather than
 
27372         * parser/Grammar.y:
 
27373         * parser/NodeConstructors.h:
 
27374         (JSC::CommaNode::CommaNode):
 
27375         * parser/Nodes.cpp:
 
27376         (JSC::CommaNode::emitBytecode):
 
27378         (JSC::ExpressionNode::isCommaNode):
 
27379         (JSC::CommaNode::isCommaNode):
 
27380         (JSC::CommaNode::append):
 
27382 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27384         Reviewed by Maciej Stachowiak.
 
27386         https://bugs.webkit.org/show_bug.cgi?id=26645
 
27388         Inherits ScopeChainNode class from FastAllocBase because it has been
 
27389         instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
 
27393 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27395         Reviewed by Darin Adler.
 
27397         https://bugs.webkit.org/show_bug.cgi?id=26648
 
27399         Inherits Deque class from FastAllocBase because it has been
 
27400         instantiated by 'new' with DEFINE_STATIC_LOCAL macro in 
 
27401         JavaScriptCore/wtf/MainThread.cpp:62.
 
27405 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27407         Reviewed by Darin Adler.
 
27409         https://bugs.webkit.org/show_bug.cgi?id=26644
 
27411         Inherits RefPtr class from FastAllocBase because it has been
 
27412         instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
 
27416 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27418         Reviewed by Darin Adler.
 
27420         Inherits HashSet class from FastAllocBase, because it has been
 
27421         instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
 
27425 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27427         Reviewed by Darin Adler.
 
27429         Inherits Vector class from FastAllocBase because it has been
 
27430         instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
 
27434 2009-06-24  Norbert Leser  <norbert.leser@nokia.com>
 
27436         Reviewed by Maciej Stachoviak.
 
27438         The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
 
27439         (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
 
27440         Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
 
27441         the stack overflows immediately on Symbian hardware (max. 80 kB).
 
27442         Proposed change allocates generator objects on heap.
 
27443         Performance impact (if any) should be negligible and change is proposed as general fix,
 
27444         rather than ifdef'd for SYMBIAN.
 
27446         * parser/Nodes.cpp:
 
27447         (JSC::ProgramNode::generateBytecode):
 
27448         (JSC::EvalNode::generateBytecode):
 
27449         (JSC::EvalNode::bytecodeForExceptionInfoReparse):
 
27450         (JSC::FunctionBodyNode::generateBytecode):
 
27451         (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
 
27453 2009-06-23  Oliver Hunt  <oliver@apple.com>
 
27455         Reviewed by Gavin Barraclough.
 
27457         <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
 
27458         <https://bugs.webkit.org/show_bug.cgi?id=26593>
 
27460         Do not attempt to cache structure chains if they contain a dictionary at any level.
 
27462         * interpreter/Interpreter.cpp:
 
27463         (JSC::Interpreter::tryCachePutByID):
 
27464         (JSC::Interpreter::tryCacheGetByID):
 
27465         * jit/JITStubs.cpp:
 
27466         (JSC::JITThunks::tryCachePutByID):
 
27467         * runtime/Structure.cpp:
 
27468         (JSC::Structure::getEnumerablePropertyNames):
 
27469         (JSC::Structure::addPropertyTransition):
 
27470         * runtime/StructureChain.cpp:
 
27471         (JSC::StructureChain::isCacheable):
 
27472         * runtime/StructureChain.h:
 
27474 2009-06-23  Yong Li  <yong.li@torchmobile.com>
 
27476         Reviewed by George Staikos.
 
27478         https://bugs.webkit.org/show_bug.cgi?id=26654
 
27479         Add the proper export define for the JavaScriptCore API when building for WINCE.
 
27483 2009-06-23  Joe Mason  <joe.mason@torchmobile.com>
 
27485         Reviewed by Adam Treat.
 
27487         Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
 
27489         https://bugs.webkit.org/show_bug.cgi?id=26611
 
27490         Implement currentThreadStackBase on WINCE by adding a global,
 
27491         g_stackBase, which must be set to the address of a local variable
 
27492         by the caller before calling any WebKit function that invokes JSC.
 
27494         * runtime/Collector.cpp:
 
27495         (JSC::isPageWritable):
 
27496         (JSC::getStackBase):
 
27497           Starts at the top of the stack and returns the entire range of
 
27498           consecutive writable pages as an estimate of the actual stack.
 
27499           This will be much bigger than the actual stack range, so some
 
27500           dead objects can't be collected, but it guarantees live objects
 
27501           aren't collected prematurely.
 
27503         (JSC::currentThreadStackBase):
 
27504           On WinCE, returns g_stackBase if set or call getStackBase as a
 
27507 2009-06-23  Oliver Hunt  <oliver@apple.com>
 
27509         Reviewed by Alexey Proskuryakov.
 
27511         Fix stupid performance problem in the LiteralParser
 
27513         The LiteralParser was making a new UString in order to use
 
27514         toDouble, however UString's toDouble allows a much wider range
 
27515         of numberic strings than the LiteralParser accepts, and requires
 
27516         an additional heap allocation or two for the construciton of the
 
27517         UString.  To rectify this we just call WTF::dtoa directly using
 
27518         a stack allocated buffer to hold the validated numeric literal.
 
27520         * runtime/LiteralParser.cpp:
 
27521         (JSC::LiteralParser::Lexer::lexNumber):
 
27522         (JSC::LiteralParser::parse):
 
27523         * runtime/LiteralParser.h:
 
27525 2009-06-22  Oliver Hunt  <oliver@apple.com>
 
27527         Reviewed by Alexey Proskuryakov.
 
27529         Bug 26640: JSON.stringify needs to special case Boolean objects
 
27530         <https://bugs.webkit.org/show_bug.cgi?id=26640>
 
27532         Add special case handling of the Boolean object so we match current
 
27535         * runtime/JSONObject.cpp:
 
27536         (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
 
27538         (JSC::Stringifier::appendStringifiedValue):
 
27540 2009-06-22  Oliver Hunt  <oliver@apple.com>
 
27542         Reviewed by Darin Adler.
 
27544         Bug 26591: Support revivers in JSON.parse
 
27545         <https://bugs.webkit.org/show_bug.cgi?id=26591>
 
27547         Add reviver support to JSON.parse.  This completes the JSON object.
 
27549         * runtime/JSONObject.cpp:
 
27550         (JSC::Walker::Walker):
 
27551         (JSC::Walker::callReviver):
 
27552         (JSC::Walker::walk):
 
27553         (JSC::JSONProtoFuncParse):
 
27555 2009-06-21  Oliver Hunt  <oliver@apple.com>
 
27557         Reviewed by Darin Adler.
 
27559         Bug 26592: Support standard toJSON functions
 
27560         <https://bugs.webkit.org/show_bug.cgi?id=26592>
 
27562         Add support for the standard Date.toJSON function.
 
27564         * runtime/DatePrototype.cpp:
 
27565         (JSC::dateProtoFuncToJSON):
 
27567 2009-06-21  Oliver Hunt  <oliver@apple.com>
 
27569         Reviewed by Sam Weinig.
 
27571         Bug 26594: JSC needs to support Date.toISOString
 
27572         <https://bugs.webkit.org/show_bug.cgi?id=26594>
 
27574         Add support for Date.toISOString.
 
27576         * runtime/DatePrototype.cpp:
 
27577         (JSC::dateProtoFuncToISOString):
 
27579 2009-06-21  Oliver Hunt  <oliver@apple.com>
 
27583         * runtime/LiteralParser.cpp:
 
27584         (JSC::LiteralParser::parse):
 
27586 2009-06-21  Oliver Hunt  <oliver@apple.com>
 
27588         Reviewed by Darin Adler and Cameron Zwarich.
 
27590         Bug 26587: Support JSON.parse
 
27591         <https://bugs.webkit.org/show_bug.cgi?id=26587>
 
27593         Extend the LiteralParser to support the full strict JSON
 
27594         grammar, fix a few places where the grammar was incorrectly
 
27595         lenient.   Doesn't yet support the JSON.parse reviver function
 
27596         but that does not block the JSON.parse functionality itself.
 
27598         * interpreter/Interpreter.cpp:
 
27599         (JSC::Interpreter::callEval):
 
27600         * runtime/JSGlobalObjectFunctions.cpp:
 
27601         (JSC::globalFuncEval):
 
27602         * runtime/JSONObject.cpp:
 
27603         (JSC::JSONProtoFuncParse):
 
27604         * runtime/LiteralParser.cpp:
 
27605         (JSC::LiteralParser::Lexer::lex):
 
27606         (JSC::isSafeStringCharacter):
 
27607         (JSC::LiteralParser::Lexer::lexString):
 
27608         (JSC::LiteralParser::parse):
 
27609         * runtime/LiteralParser.h:
 
27610         (JSC::LiteralParser::LiteralParser):
 
27611         (JSC::LiteralParser::tryJSONParse):
 
27612         (JSC::LiteralParser::):
 
27613         (JSC::LiteralParser::Lexer::Lexer):
 
27615 2009-06-21  David Levin  <levin@chromium.org>
 
27617         Reviewed by NOBODY (speculative build fix for windows).
 
27619         Simply removed some whitespace form this file to make windows build wtf and
 
27620         hopefully copy the new MessageQueque.h so that WebCore picks it up.
 
27622         * wtf/Assertions.cpp:
 
27624 2009-06-21  Drew Wilson  <atwilson@google.com>
 
27626         Reviewed by David Levin.
 
27628         <https://bugs.webkit.org/show_bug.cgi?id=25043>
 
27629         Added support for multi-threaded MessagePorts.
 
27631         * wtf/MessageQueue.h:
 
27632         (WTF::::appendAndCheckEmpty):
 
27633             Added API to test whether the queue was empty before adding an element.
 
27635 2009-06-20  David D. Kilzer  <ddkilzer@webkit.org>
 
27637         Fix namespace comment in SegmentedVector.h
 
27639         * wtf/SegmentedVector.h: Updated namespace comment to reflect
 
27640         new namespace after r44897.
 
27642 2009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
27644         Bug 24986: ARM JIT port
 
27645         <https://bugs.webkit.org/show_bug.cgi?id=24986>
 
27647         Reviewed by Oliver Hunt.
 
27649         An Iterator added for SegmentedVector. Currently
 
27650         only the pre ++ operator is supported.
 
27652         * wtf/SegmentedVector.h:
 
27653         (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
 
27654         (WTF::SegmentedVectorIterator::operator*):
 
27655         (WTF::SegmentedVectorIterator::operator->):
 
27656         (WTF::SegmentedVectorIterator::operator++):
 
27657         (WTF::SegmentedVectorIterator::operator==):
 
27658         (WTF::SegmentedVectorIterator::operator!=):
 
27659         (WTF::SegmentedVectorIterator::operator=):
 
27660         (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
 
27661         (WTF::SegmentedVector::alloc):
 
27662         (WTF::SegmentedVector::begin):
 
27663         (WTF::SegmentedVector::end):
 
27665 2009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
 
27667         Bug 24986: ARM JIT port
 
27668         <https://bugs.webkit.org/show_bug.cgi?id=24986>
 
27670         Reviewed by Oliver Hunt.
 
27672         Move SegmentedVector to /wtf subdirectory
 
27673         and change "namespace JSC" to "namespace WTF"
 
27675         Additional build file updates by David Kilzer.
 
27677         * GNUmakefile.am: Updated path to SegmentedVector.h.
 
27678         * JavaScriptCore.order: Updated SegmentedVector namespace from
 
27679         JSC to WTF in mangled C++ method name.
 
27680         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
 
27681         Removed reference to bytecompiler\SegmentedVector.h.
 
27682         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
 
27683         wtf\SegmentedVector.h.
 
27684         * JavaScriptCore.xcodeproj/project.pbxproj: Moved
 
27685         SegmentedVector.h definition from bytecompiler subdirectory to
 
27687         * bytecompiler/BytecodeGenerator.h: Updated #include path to
 
27688         SegmentedVector.h and prepended WTF:: namespace to its use.
 
27689         * parser/Lexer.h: Ditto.
 
27690         * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
 
27691         (WTF::SegmentedVector::SegmentedVector):
 
27692         (WTF::SegmentedVector::~SegmentedVector):
 
27693         (WTF::SegmentedVector::size):
 
27694         (WTF::SegmentedVector::at):
 
27695         (WTF::SegmentedVector::operator[]):
 
27696         (WTF::SegmentedVector::last):
 
27697         (WTF::SegmentedVector::append):
 
27698         (WTF::SegmentedVector::removeLast):
 
27699         (WTF::SegmentedVector::grow):
 
27700         (WTF::SegmentedVector::clear):
 
27701         (WTF::SegmentedVector::deleteAllSegments):
 
27702         (WTF::SegmentedVector::segmentExistsFor):
 
27703         (WTF::SegmentedVector::segmentFor):
 
27704         (WTF::SegmentedVector::subscriptFor):
 
27705         (WTF::SegmentedVector::ensureSegmentsFor):
 
27706         (WTF::SegmentedVector::ensureSegment):
 
27708 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
 
27710         Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
 
27713         (JSC::JIT::privateCompile):
 
27714         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
27715         (JSC::JIT::emitGetVariableObjectRegister):
 
27716         (JSC::JIT::emitPutVariableObjectRegister):
 
27718         * jit/JITArithmetic.cpp:
 
27719         (JSC::JIT::emit_op_rshift):
 
27720         (JSC::JIT::emitSlow_op_jnless):
 
27721         (JSC::JIT::emitSlow_op_jnlesseq):
 
27722         (JSC::JIT::compileBinaryArithOp):
 
27724         (JSC::JIT::compileOpCallInitializeCallFrame):
 
27725         (JSC::JIT::compileOpCall):
 
27726         * jit/JITInlineMethods.h:
 
27727         (JSC::JIT::restoreArgumentReference):
 
27728         (JSC::JIT::checkStructure):
 
27729         * jit/JITOpcodes.cpp:
 
27730         (JSC::JIT::emit_op_instanceof):
 
27731         (JSC::JIT::emit_op_get_scoped_var):
 
27732         (JSC::JIT::emit_op_put_scoped_var):
 
27733         (JSC::JIT::emit_op_construct_verify):
 
27734         (JSC::JIT::emit_op_resolve_global):
 
27735         (JSC::JIT::emit_op_jeq_null):
 
27736         (JSC::JIT::emit_op_jneq_null):
 
27737         (JSC::JIT::emit_op_to_jsnumber):
 
27738         (JSC::JIT::emit_op_catch):
 
27739         (JSC::JIT::emit_op_eq_null):
 
27740         (JSC::JIT::emit_op_neq_null):
 
27741         (JSC::JIT::emit_op_convert_this):
 
27742         (JSC::JIT::emit_op_profile_will_call):
 
27743         (JSC::JIT::emit_op_profile_did_call):
 
27744         (JSC::JIT::emitSlow_op_get_by_val):
 
27745         * jit/JITPropertyAccess.cpp:
 
27746         (JSC::JIT::emit_op_get_by_val):
 
27747         (JSC::JIT::emit_op_put_by_val):
 
27748         (JSC::JIT::emit_op_method_check):
 
27749         (JSC::JIT::compileGetByIdHotPath):
 
27750         (JSC::JIT::emit_op_put_by_id):
 
27751         (JSC::JIT::compilePutDirectOffset):
 
27752         (JSC::JIT::compileGetDirectOffset):
 
27753         (JSC::JIT::privateCompilePutByIdTransition):
 
27754         (JSC::JIT::privateCompilePatchGetArrayLength):
 
27755         * jit/JITStubs.cpp:
 
27756         (JSC::JITThunks::JITThunks):
 
27758 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
 
27760         Reviewed by NOBODY (Windows build fix).
 
27763         * jit/JITInlineMethods.h:
 
27765 2009-06-19  Gabor Loki  <loki@inf.u-szeged.hu>
 
27767         Reviewed by Gavin Barraclough.
 
27769         Reorganize ARM architecture specific macros.
 
27770         Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
 
27772         Bug 24986: ARM JIT port
 
27773         <https://bugs.webkit.org/show_bug.cgi?id=24986>
 
27775         * assembler/ARMv7Assembler.h:
 
27776         * assembler/AbstractMacroAssembler.h:
 
27777         (JSC::AbstractMacroAssembler::Imm32::Imm32):
 
27778         * assembler/MacroAssembler.h:
 
27779         * assembler/MacroAssemblerCodeRef.h:
 
27780         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
 
27781         * jit/ExecutableAllocator.h:
 
27782         (JSC::ExecutableAllocator::cacheFlush):
 
27784         * jit/JITInlineMethods.h:
 
27785         (JSC::JIT::restoreArgumentReferenceForTrampoline):
 
27786         * jit/JITStubs.cpp:
 
27789         * yarr/RegexJIT.cpp:
 
27790         (JSC::Yarr::RegexGenerator::generateEnter):
 
27791         (JSC::Yarr::RegexGenerator::generateReturn):
 
27793 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
 
27795         Reviewed by Oliver Hunt.
 
27797         Fix armv7 JIT build issues.
 
27799         Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
 
27800         and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
 
27802         * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
 
27803         * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
 
27807         * jit/JITInlineMethods.h:
 
27808         (JSC::JIT::restoreArgumentReference):
 
27809         * jit/JITOpcodes.cpp:
 
27810         (JSC::JIT::emit_op_catch):
 
27811         * jit/JITStubs.cpp:
 
27812         (JSC::JITThunks::JITThunks):
 
27814 2009-06-19  Adam Treat  <adam.treat@torchmobile.com>
 
27816         Blind attempt at build fix.
 
27818         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
27819         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
27821 2009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27823         Reviewed by Oliver Hunt.
 
27825         Inherits CallIdentifier struct from FastAllocBase because it has been
 
27826         instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
 
27828         * wtf/HashCountedSet.h:
 
27830 2009-06-19  Adam Treat  <adam.treat@torchmobile.com>
 
27832         Reviewed by Oliver Hunt.
 
27834         https://bugs.webkit.org/show_bug.cgi?id=26540
 
27835         Modify the test shell to add a new function 'checkSyntax' that will
 
27836         only parse the source instead of executing it. In this way we can test
 
27837         pure parsing performance against some of the larger scripts in the wild.
 
27840         (GlobalObject::GlobalObject):
 
27841         (functionCheckSyntax):
 
27843 2009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
 
27845         Reviewed by Darin Adler.
 
27847         Inherits HashCountedSet class from FastAllocBase because it has been
 
27848         instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
 
27850         * wtf/HashCountedSet.h:
 
27852 2009-06-19  Yong Li  <yong.li@torchmobile.com>
 
27854         Reviewed by George Staikos.
 
27856         https://bugs.webkit.org/show_bug.cgi?id=26558
 
27857         Declare these symbols extern for WINCE as they are provided by libce.
 
27859         * runtime/DateConstructor.cpp:
 
27860         * runtime/DatePrototype.cpp:
 
27861         (JSC::formatLocaleDate):
 
27863 2009-06-19  Oliver Hunt  <oliver@apple.com>
 
27865         Reviewed by Maciej Stachowiak.
 
27867         <rdar://problem/6988973> ScopeChain leak in interpreter builds
 
27869         Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
 
27872         * runtime/JSFunction.cpp:
 
27873         (JSC::JSFunction::~JSFunction):
 
27876 2009-06-19  Yong Li  <yong.li@torchmobile.com>
 
27878         Reviewed by George Staikos.
 
27880         https://bugs.webkit.org/show_bug.cgi?id=26543
 
27881         Windows CE uses 'GetLastError' instead of 'errno.'
 
27883         * interpreter/RegisterFile.h:
 
27884         (JSC::RegisterFile::RegisterFile):
 
27885         (JSC::RegisterFile::grow):
 
27887 2009-06-19  David Levin  <levin@chromium.org>
 
27889         Reviewed by NOBODY (Windows build fix).
 
27891         Add export for Windows corresponding to OSX export done in r44844.
 
27892         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
 
27893         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
 
27895 2009-06-18  Oliver Hunt  <oliver@apple.com>
 
27897         Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
 
27899         Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
 
27900         <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
 
27902         We need to make sure that each native function instance correctly unlinks any references to it
 
27903         when it is collected.  Allowing this to happen required a few changes:
 
27904             * Every native function needs a codeblock to track the link information
 
27905             * To have this codeblock, every function now also needs its own functionbodynode
 
27906               so we no longer get to have a single shared instance.
 
27907             * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
 
27909         * JavaScriptCore.exp:
 
27910         * bytecode/CodeBlock.cpp:
 
27911         (JSC::CodeBlock::CodeBlock):
 
27912            Constructor for NativeCode CodeBlock
 
27913         (JSC::CodeBlock::derefStructures):
 
27914         (JSC::CodeBlock::refStructures):
 
27915         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
 
27916         (JSC::CodeBlock::handlerForBytecodeOffset):
 
27917         (JSC::CodeBlock::lineNumberForBytecodeOffset):
 
27918         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
 
27919         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
 
27920         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
 
27921         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
 
27922         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
 
27923         (JSC::CodeBlock::setJITCode):
 
27924            Add assertions to ensure we don't try and use NativeCode CodeBlocks as
 
27925            a normal codeblock.
 
27927         * bytecode/CodeBlock.h:
 
27929         (JSC::CodeBlock::source):
 
27930         (JSC::CodeBlock::sourceOffset):
 
27931         (JSC::CodeBlock::evalCodeCache):
 
27932         (JSC::CodeBlock::createRareDataIfNecessary):
 
27936         (JSC::JIT::privateCompileCTIMachineTrampolines):
 
27937         (JSC::JIT::linkCall):
 
27938           Update logic to allow native function caching
 
27940         * jit/JITStubs.cpp:
 
27941         * parser/Nodes.cpp:
 
27942         (JSC::FunctionBodyNode::createNativeThunk):
 
27943         (JSC::FunctionBodyNode::isHostFunction):
 
27945         * runtime/JSFunction.cpp:
 
27946         (JSC::JSFunction::JSFunction):
 
27947         (JSC::JSFunction::~JSFunction):
 
27948         (JSC::JSFunction::mark):
 
27949         * runtime/JSGlobalData.cpp:
 
27950         (JSC::JSGlobalData::~JSGlobalData):
 
27951         * runtime/JSGlobalData.h:
 
27953 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
 
27955         Reviewed by NOBODY (Windows build fix).
 
27957         * wtf/DateMath.cpp:
 
27958         (WTF::calculateUTCOffset):
 
27960 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
 
27962         Reviewed by Geoff Garen.
 
27964         Timezone calculation incorrect in Venezuela.
 
27966         https://bugs.webkit.org/show_bug.cgi?id=26531
 
27967         <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
 
27969         The problem is that we're calculating the timezone relative to 01/01/2000,
 
27970         but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
 
27971         According to the spec, section 15.9.1.9 states "the time since the beginning
 
27972         of the year", presumably meaning the *current* year.  Change the calculation
 
27973         to be based on whatever the current year is, rather than a canned date.
 
27975         No performance impact.
 
27977         * wtf/DateMath.cpp:
 
27978         (WTF::calculateUTCOffset):
 
27980 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
 
27982         Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
 
27984         (Reintroducing patch added in r44492, and reverted in r44796.)
 
27986         Change the implementation of op_throw so the stub function always modifies its
 
27987         return address - if it doesn't find a 'catch' it will switch to a trampoline
 
27988         to force a return from JIT execution.  This saves memory, by avoiding the need
 
27989         for a unique return for every op_throw.
 
27991         * jit/JITOpcodes.cpp:
 
27992         (JSC::JIT::emit_op_throw):
 
27993             JITStubs::cti_op_throw now always changes its return address,
 
27994             remove return code generated after the stub call (this is now
 
27995             handled by ctiOpThrowNotCaught).
 
27996         * jit/JITStubs.cpp:
 
27998             Add ctiOpThrowNotCaught definitions.
 
27999         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
 
28000             Change cti_op_throw to always change its return address.
 
28002             Add ctiOpThrowNotCaught declaration.
 
28004 2009-06-18  Kevin McCullough  <kmccullough@apple.com>
 
28006         Reviewed by Oliver Hunt.
 
28008         <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
 
28010         - Exposed functions now needed by WebCore.
 
28012         * JavaScriptCore.exp:
 
28014 2009-06-17  Darin Adler  <darin@apple.com>
 
28016         Reviewed by Oliver Hunt.
 
28018         Bug 26429: Make JSON.stringify non-recursive so it can handle objects
 
28019         of arbitrary complexity
 
28020         https://bugs.webkit.org/show_bug.cgi?id=26429
 
28022         For marking I decided not to use gcProtect, because this is inside the engine
 
28023         so it's easy enough to just do marking. And that darned gcProtect does locking!
 
28024         Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
 
28025         for that class says "FIXME: Remove all clients of this API, then remove this API."
 
28027         * runtime/Collector.cpp:
 
28028         (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
 
28030         * runtime/CommonIdentifiers.cpp:
 
28031         (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
 
28032         * runtime/CommonIdentifiers.h: Ditto.
 
28034         * runtime/JSGlobalData.cpp:
 
28035         (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
 
28036         * runtime/JSGlobalData.h: Added firstStringifierToMark.
 
28038         * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
 
28039         (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
 
28040         objects to get their number and string values.
 
28041         (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
 
28042         to wrap an identifier or integer so we don't have to do any work unless we
 
28043         actually call a replacer.
 
28044         (JSC::ReplacerPropertyName::value): Added.
 
28045         (JSC::gap): Added. Helper function for the Stringifier constructor.
 
28046         (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
 
28047         The class is used to wrap an identifier or integer so we don't have to
 
28048         allocate a number or string until we actually call toJSON or a replacer.
 
28049         (JSC::PropertyNameForFunctionCall::asJSValue): Added.
 
28050         (JSC::Stringifier::Stringifier): Updated and moved out of the class
 
28051         definition. Added code to hook this into a singly linked list for marking.
 
28052         (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
 
28053         (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
 
28054         (JSC::Stringifier::stringify): Updated.
 
28055         (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
 
28056         (JSC::Stringifier::toJSON): Renamed from toJSONValue.
 
28057         (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
 
28058         Added code to use the m_holderStack to do non-recursive stringify of
 
28059         objects and arrays. This code also uses the timeout checker since in
 
28060         pathological cases it could be slow even without calling into the
 
28061         JavaScript virtual machine.
 
28062         (JSC::Stringifier::willIndent): Added.
 
28063         (JSC::Stringifier::indent): Added.
 
28064         (JSC::Stringifier::unindent): Added.
 
28065         (JSC::Stringifier::startNewLine): Added.
 
28066         (JSC::Stringifier::Holder::Holder): Added.
 
28067         (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
 
28068         function that handles the format of arrays and objects.
 
28069         (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
 
28070         of the file so the JSONObject class is not interleaved with the
 
28072         (JSC::JSONObject::markStringifiers): Added. Calls mark.
 
28073         (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
 
28074         to compute the gap string is now a separate function.
 
28076         * runtime/JSONObject.h: Made everything private. Added markStringifiers.
 
28078 2009-06-17  Oliver Hunt  <oliver@apple.com>
 
28080         Reviewed by Gavin Barraclough.
 
28082         <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
 
28084         Roll out r43849 as it appears that we cannot rely on the address of
 
28085         an objects property storage being constant even if the structure is
 
28089         * jit/JITPropertyAccess.cpp:
 
28090         (JSC::JIT::compileGetDirectOffset):
 
28091         (JSC::JIT::privateCompileGetByIdProto):
 
28092         (JSC::JIT::privateCompileGetByIdProtoList):
 
28093         (JSC::JIT::privateCompileGetByIdChainList):
 
28094         (JSC::JIT::privateCompileGetByIdChain):
 
28096 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
 
28098         Rubber Stamped by Mark Rowe.
 
28100         Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
 
28102         * jit/JITOpcodes.cpp:
 
28103         (JSC::JIT::emit_op_throw):
 
28104         * jit/JITStubs.cpp:
 
28106         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
 
28109 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
 
28111         Reviewed by Mark Rowe.
 
28113         <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
 
28115         On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
 
28117         No performance impact.
 
28119         * jit/JITArithmetic.cpp:
 
28120         (JSC::JIT::emit_op_rshift):
 
28122 2009-06-17  Adam Treat  <adam.treat@torchmobile.com>
 
28124         Reviewed by George Staikos.
 
28126         https://bugs.webkit.org/show_bug.cgi?id=23155
 
28127         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
 
28132 2009-06-17  George Staikos  <george.staikos@torchmobile.com>
 
28134         Reviewed by Adam Treat.
 
28136         https://bugs.webkit.org/show_bug.cgi?id=23155
 
28137         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
 
28141         * wtf/Assertions.cpp:
 
28142         * wtf/Assertions.h:
 
28143         * wtf/CurrentTime.cpp:
 
28144         (WTF::lowResUTCTime):
 
28145         * wtf/DateMath.cpp:
 
28146         (WTF::getLocalTime):
 
28147         * wtf/MathExtras.h:
 
28149         * wtf/StringExtras.h:
 
28151         * wtf/win/MainThreadWin.cpp:
 
28153 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
 
28155         Reviewed by Oliver Hunt.
 
28157         <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
 
28159         Remove PropertySlot::putValue - PropertySlots should only be used for getting,
 
28160         not putting.  Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
 
28161         which is what it really was being used to ask, and remove some other getOwnPropertySlot
 
28162         & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
 
28164         * runtime/JSGlobalObject.h:
 
28165         (JSC::JSGlobalObject::hasOwnPropertyForWrite):
 
28166         * runtime/JSObject.h:
 
28167         * runtime/JSStaticScopeObject.cpp:
 
28168         * runtime/JSStaticScopeObject.h:
 
28169         * runtime/PropertySlot.h:
 
28171 2009-06-16  Gavin Barraclough  <barraclough@apple.com>
 
28173         Reviewed by Oliver hunt.
 
28175         Temporarily partially disable r44492, since this is causing some problems on internal builds.
 
28177         * jit/JITOpcodes.cpp:
 
28178         (JSC::JIT::emit_op_throw):
 
28179         * jit/JITStubs.cpp:
 
28180         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
 
28182 2009-06-16  Sam Weinig  <sam@webkit.org>
 
28189 2009-06-16  Sam Weinig  <sam@webkit.org>
 
28191         Reviewed by Oliver Hunt.
 
28193         Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
 
28194         it for each type of stub using the return address to find the correct
 
28200         (JSC::JIT::compileGetByIdProto):
 
28201         (JSC::JIT::compileGetByIdSelfList):
 
28202         (JSC::JIT::compileGetByIdProtoList):
 
28203         (JSC::JIT::compileGetByIdChainList):
 
28204         (JSC::JIT::compileGetByIdChain):
 
28205         (JSC::JIT::compilePutByIdTransition):
 
28206         (JSC::JIT::compileCTIMachineTrampolines):
 
28207         (JSC::JIT::compilePatchGetArrayLength):
 
28208         * jit/JITStubCall.h:
 
28209         (JSC::JITStubCall::call):
 
28211 == Rolled over to ChangeLog-2009-06-16 ==