ChangeLog 2.46 MB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
2012-04-13  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r114185.
        http://trac.webkit.org/changeset/114185
        https://bugs.webkit.org/show_bug.cgi?id=83967

        Broke a bunch of JavaScript related tests (Requested by
        andersca on #webkit).

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToString):
        (JSC::arrayProtoFuncToLocaleString):
        * runtime/CommonIdentifiers.h:
        * tests/mozilla/ecma/Array/15.4.4.2.js:
        (getTestCases):

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2012-04-13  Gavin Barraclough  <barraclough@apple.com>

        Don't rely on fixed offsets to patch calls
        https://bugs.webkit.org/show_bug.cgi?id=83966

        Rubber stamped by Oliver Hunt.

        These aren't being used anywhere!

        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCall):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::compileOpCall):

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
2012-04-13  Hojong Han  <hojong.han@samsung.com>

        Array.prototype.toString and Array.prototype.toLocaleString should be generic
        https://bugs.webkit.org/show_bug.cgi?id=81588

        Reviewed by Gavin Barraclough.

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToString):
        (JSC::arrayProtoFuncToLocaleString):
        * runtime/CommonIdentifiers.h:
        * tests/mozilla/ecma/Array/15.4.4.2.js:
        (getTestCases.array.item.new.TestCase):
        (getTestCases):

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
2012-04-13  Gavin Barraclough  <barraclough@apple.com>

        Don't rely on fixed offsets to patch method checks
        https://bugs.webkit.org/show_bug.cgi?id=83958

        Reviewed by Oliver Hunt.

        * bytecode/StructureStubInfo.h:
            - Add fields for the method check info.
        * jit/JIT.cpp:
        (JSC::PropertyStubCompilationInfo::copyToStubInfo):
            - Store the offsets on the stub info, instead of asserting.
        * jit/JIT.h:
            - Delete all the method check related offsets.
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::patchMethodCallProto):
            - Use the offset from the stubInfo.
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
            - Pass the stubInfo to patchMethodCallProto.

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
2012-04-13  Gavin Barraclough  <barraclough@apple.com>

        Don't rely on fixed offsets to patch get_by_id/put_by_id
        https://bugs.webkit.org/show_bug.cgi?id=83924

        Reviewed by Oliver Hunt.

        Store offsets in the structure stub info, as we do for the DFG JIT.

        * assembler/AbstractMacroAssembler.h:
        (JSC::AbstractMacroAssembler::differenceBetween):
            - this method can be static (now used from PropertyStubCompilationInfo::copyToStubInfo, will be removed soon!)
        * bytecode/StructureStubInfo.h:
            - added new fields for baseline JIT offsets.
        * jit/JIT.cpp:
        (JSC::PropertyStubCompilationInfo::copyToStubInfo):
            - moved out from JIT::privateCompile.
        (JSC::JIT::privateCompile):
            - moved out code to PropertyStubCompilationInfo::copyToStubInfo.
        * jit/JIT.h:
        (PropertyStubCompilationInfo):
            - added helper functions to initializae PropertyStubCompilationInfo, state to store more offset info.
            - removed many offsets.
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_method_check):
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::emit_op_put_by_id):
        (JSC::JIT::emitSlow_op_put_by_id):
        (JSC::JIT::patchGetByIdSelf):
        (JSC::JIT::patchPutByIdReplace):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        (JSC::JIT::privateCompileGetByIdProto):
        (JSC::JIT::privateCompileGetByIdSelfList):
        (JSC::JIT::privateCompileGetByIdProtoList):
        (JSC::JIT::privateCompileGetByIdChainList):
        (JSC::JIT::privateCompileGetByIdChain):
        (JSC::JIT::resetPatchGetById):
        (JSC::JIT::resetPatchPutById):
            - changed code generation to use new interface to store info on PropertyStubCompilationInfo.
            - changed repatch functions to read offsets from the structure stub info.
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emit_op_method_check):
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::emit_op_put_by_id):
        (JSC::JIT::emitSlow_op_put_by_id):
        (JSC::JIT::patchGetByIdSelf):
        (JSC::JIT::patchPutByIdReplace):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        (JSC::JIT::privateCompileGetByIdProto):
        (JSC::JIT::privateCompileGetByIdSelfList):
        (JSC::JIT::privateCompileGetByIdProtoList):
        (JSC::JIT::privateCompileGetByIdChainList):
        (JSC::JIT::privateCompileGetByIdChain):
        (JSC::JIT::resetPatchGetById):
        (JSC::JIT::resetPatchPutById):
            - changed code generation to use new interface to store info on PropertyStubCompilationInfo.
            - changed repatch functions to read offsets from the structure stub info.

128 129 130 131 132 133 134 135 136 137 138 139
2012-04-13  Rob Buis  <rbuis@rim.com>

        Fix some compiler warnings (miscellaneous)
        https://bugs.webkit.org/show_bug.cgi?id=80790

        Reviewed by Antonio Gomes.

        Fix signed/unsigned comparison warning.

        * parser/Lexer.cpp:
        (JSC::::record16):

140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
2012-04-12  Benjamin Poulain  <bpoulain@apple.com>

        Improve replaceUsingStringSearch() for case of a single character searchValue
        https://bugs.webkit.org/show_bug.cgi?id=83738

        Reviewed by Geoffrey Garen.

        This patch improves replaceUsingStringSearch() with the following:
        -Add a special case for single character search, taking advantage of the faster WTF::find().
        -Inline replaceUsingStringSearch().
        -Use StringImpl::create() instead of UString::substringSharingImpl() since we know we are in the bounds
         by definition.

        This gives less than 1% improvement for the multicharacter replace.
        The single character search show about 9% improvement.

        * runtime/StringPrototype.cpp:
        (JSC::replaceUsingStringSearch):

159 160 161 162 163 164 165 166 167 168 169 170 171
2012-04-12  Michael Saboff  <msaboff@apple.com>

        StructureStubInfo::reset() causes leaks of PolymorphicAccessStructureList and ExecutableMemoryHandle objects
        https://bugs.webkit.org/show_bug.cgi?id=83823

        Reviewed by Gavin Barraclough.

        Put the clearing of the accessType to after the call to deref() so that
        deref() can use the accessType to delete referenced objects as needed.

        * bytecode/StructureStubInfo.h:
        (JSC::StructureStubInfo::reset):

172 173 174 175 176 177 178 179 180
2012-04-12  Balazs Kelemen  <kbalazs@webkit.org>

        [Qt] Fix WebKit1 build with V8
        https://bugs.webkit.org/show_bug.cgi?id=83322

        Reviewed by Adam Barth.

        * yarr/yarr.pri:

181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
2012-04-12  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=83821
        Move dfg repatching properties of structure stub info into a union

        Reviewed by Oliver Hunt.

        We want to be able to have similar properties for the baseline JIT, some restructuring to prepare for this.

        * bytecode/StructureStubInfo.h:
        (StructureStubInfo):
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::link):
        * dfg/DFGRepatch.cpp:
        (JSC::DFG::dfgRepatchByIdSelfAccess):
        (JSC::DFG::linkRestoreScratch):
        (JSC::DFG::generateProtoChainAccessStub):
        (JSC::DFG::tryCacheGetByID):
        (JSC::DFG::tryBuildGetByIDList):
        (JSC::DFG::tryBuildGetByIDProtoList):
        (JSC::DFG::emitPutReplaceStub):
        (JSC::DFG::emitPutTransitionStub):
        (JSC::DFG::tryCachePutByID):
        (JSC::DFG::tryBuildPutByIdList):
        (JSC::DFG::dfgResetGetByID):
        (JSC::DFG::dfgResetPutByID):

208 209 210 211 212 213 214 215 216 217 218 219
2012-04-12  Gavin Barraclough  <barraclough@apple.com>

        Delete a bunch of unused, copy & pasted values in JIT.h
        https://bugs.webkit.org/show_bug.cgi?id=83822

        Reviewed by Oliver Hunt.
        
        The only architecture we support the JSVALUE64 JIT on is x86-64, all the patch offsets for other architectures are just nonsense.

        * jit/JIT.h:
        (JIT):

220 221 222 223 224 225 226 227 228 229
2012-04-12  Csaba Osztrogonác  <ossy@webkit.org>

        [Qt][ARM] Buildfix after r113934.

        Reviewed by Zoltan Herczeg.

        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::compare8):
        (MacroAssemblerARM):

230 231 232 233 234 235 236 237 238 239 240 241 242 243
2012-04-11  Filip Pizlo  <fpizlo@apple.com>

        It is incorrect to short-circuit Branch(LogicalNot(@a)) if boolean speculations on @a may fail
        https://bugs.webkit.org/show_bug.cgi?id=83744
        <rdar://problem/11206946>

        Reviewed by Andy Estes.
        
        This does the conservative thing: it only short-circuits Branch(LogicalNot(@a)) if @a is a node
        that is statically known to return boolean results.

        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):

244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
2012-04-11  Michael Saboff  <msaboff@apple.com>

        Invalid Union Reference in StructureStubInfo.{cpp.h}
        https://bugs.webkit.org/show_bug.cgi?id=83735

        Reviewed by Filip Pizlo.

        Changed the references to u.getByIdProtoList and u.getByIdSelfList
        to be consistent.

        * bytecode/StructureStubInfo.cpp:
        (JSC::StructureStubInfo::visitWeakReferences):
        * bytecode/StructureStubInfo.h:
        (JSC::StructureStubInfo::initGetByIdSelfList):

259 260 261 262 263 264 265 266 267 268 269 270 271 272
2012-04-11  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed attempting to make Qt's eccentric hardware work.

        * assembler/MacroAssemblerARM.h:
        (JSC::MacroAssemblerARM::compare8):
        (MacroAssemblerARM):
        * assembler/MacroAssemblerMIPS.h:
        (JSC::MacroAssemblerMIPS::compare8):
        (MacroAssemblerMIPS):
        * assembler/MacroAssemblerSH4.h:
        (JSC::MacroAssemblerSH4::compare8):
        (MacroAssemblerSH4):

273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
2012-04-11  Filip Pizlo  <fpizlo@apple.com>

        op_is_foo should be optimized
        https://bugs.webkit.org/show_bug.cgi?id=83666

        Reviewed by Gavin Barraclough.
        
        This implements inlining of op_is_undefined, op_is_string, op_is_number,
        and op_is_boolean in LLInt and the baseline JIT. op_is_object and
        op_is_function are not inlined because they are quite a bit more complex.
        
        This also implements all of the op_is_foo opcodes in the DFG, but it does
        not do any type profiling based optimizations, yet.

        * assembler/MacroAssemblerARMv7.h:
        (JSC::MacroAssemblerARMv7::compare8):
        (MacroAssemblerARMv7):
        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::compare8):
        (MacroAssemblerX86Common):
        * assembler/MacroAssemblerX86_64.h:
        (MacroAssemblerX86_64):
        (JSC::MacroAssemblerX86_64::testPtr):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGCCallHelpers.h:
        (JSC::DFG::CCallHelpers::setupArguments):
        (CCallHelpers):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGCapabilities.h:
        (JSC::DFG::canCompileOpcode):
        * dfg/DFGNodeType.h:
        (DFG):
        * dfg/DFGOperations.cpp:
        * dfg/DFGOperations.h:
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):
        (JSC::DFG::SpeculativeJIT::appendCallSetResult):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        * jit/JIT.h:
        (JIT):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC):
        (JSC::JIT::emit_op_is_boolean):
        (JSC::JIT::emit_op_is_number):
        (JSC::JIT::emit_op_is_string):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_is_undefined):
        (JSC):
        (JSC::JIT::emit_op_is_boolean):
        (JSC::JIT::emit_op_is_number):
        (JSC::JIT::emit_op_is_string):
        * jit/JITStubs.cpp:
        (JSC):
        * llint/LLIntSlowPaths.cpp:
        (LLInt):
        * llint/LLIntSlowPaths.h:
        (LLInt):
        * llint/LowLevelInterpreter.asm:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * offlineasm/armv7.rb:
        * offlineasm/instructions.rb:
        * offlineasm/x86.rb:

349 350 351 352 353 354 355 356 357 358 359 360 361
2012-04-11  Filip Pizlo  <fpizlo@apple.com>

        If you use an IntegerOperand and want to return it with integerResult, you need to
        zero extend to get rid of the box
        https://bugs.webkit.org/show_bug.cgi?id=83734
        <rdar://problem/11232296>

        Reviewed by Oliver Hunt.

        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::fillInteger):
        (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):

362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
2012-04-11  Filip Pizlo  <fpizlo@apple.com>

        SpeculativeJIT::fillStorage() should work with all the states that a cell may be in
        https://bugs.webkit.org/show_bug.cgi?id=83722

        Reviewed by Gavin Barraclough.
        
        It's now possible to do StorageOperand on a cell, in the case that the storage is
        inline. But this means that fillStorage() must be able to handle all of the states
        that a cell might be in. Previously it didn't.
        
        With this change, it now does handle all of the states, and moreover, it does so
        by preserving the DataFormat of cells and performing all of the cell speculations
        that should be performed if you're using a cell as storage. But if you use this on
        something that is known to be storage already then it behaves as it did before.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::fillStorage):

381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
2012-04-11  Filip Pizlo  <fpizlo@apple.com>

        Global variable predictions should not be coalesced unnecessarily
        https://bugs.webkit.org/show_bug.cgi?id=83678

        Reviewed by Geoff Garen.
        
        Removed the PredictionTracker and everyone who used it. Converted GetGlobalVar
        to have a heapPrediction like a civilized DFG opcode ought to.
        
        No performance effect.

        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/CodeBlock.h:
        * bytecode/PredictionTracker.h: Removed.
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGGenerationInfo.h:
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGGraph.h:
        (Graph):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::hasHeapPrediction):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):

409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
2012-04-11  Benjamin Poulain  <bpoulain@apple.com>

        Optimize String.split() for 1 character separator
        https://bugs.webkit.org/show_bug.cgi?id=83546

        Reviewed by Gavin Barraclough.

        This patch adds a serie of optimizations to make stringProtoFuncSplit() faster in the common case
        where the separator is a single character.

        The two main gains are:
        -Use of the find() function with a single character instead of doing a full string matching.
        -Use of WTF::find() instead of UString::find() to avoid branching on is8Bit() and have a simpler inline
         function.

        The code is also changed to avoid making unnecessary allocations by converting the 8bit string to 16bits.

        This makes String.split() faster by about 13% in that particular case.

        * runtime/StringPrototype.cpp:
        (JSC):
        (JSC::splitStringByOneCharacterImpl):
        (JSC::stringProtoFuncSplit):

433 434 435 436 437 438
2012-04-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck issues.

        * GNUmakefile.list.am: Ad missing files.

439 440 441 442 443 444
2012-04-10  Mark Rowe  <mrowe@apple.com>

        Attempt to fix the Windows build.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
2012-04-10  Patrick Gansterer  <paroga@webkit.org>

        Cleanup wtf/Platform.h and config.h files
        https://bugs.webkit.org/show_bug.cgi?id=83431

        Reviewed by Eric Seidel.

        The ENABLE() and USE() macros take care about the case when the flag
        isn't defined. So there is no need to define anything with 0.

        Also move duplicated code from the config.h files to Platform.h and
        merge a few preprocessor commands to make the file more readable.

        * config.h:

460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523
2012-04-10  Filip Pizlo  <fpizlo@apple.com>

        DFG should flush SetLocals to arguments
        https://bugs.webkit.org/show_bug.cgi?id=83554

        Reviewed by Gavin Barraclough.
        
        This is necessary to match baseline JIT argument capture behavior.
        
        But to make this work right we need to have a story for arguments into
        which we store values of different formats. This patch introduces the
        notion of an ArgumentPosition - i.e. an argument in a particular inline
        call frame - and forces unification of all data pertinent to selecting
        the argument's data format.
        
        Also fixed an amusing bug in the handling of OSR on SetLocals if there
        was any insertion/deletion of nodes in the basic block. This is benign
        for now but won't be eventually since the DFG is getting smarter. So
        better fix it now.
        
        Also fixed an amusing bug in the handling of OSR on SetLocals if they
        are immediately followed by a Flush. I think this bug might have always
        been there but now it'll happen more commonly, and it's covered by the
        run-javascriptcore-tests.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGArgumentPosition.h: Added.
        (DFG):
        (ArgumentPosition):
        (JSC::DFG::ArgumentPosition::ArgumentPosition):
        (JSC::DFG::ArgumentPosition::addVariable):
        (JSC::DFG::ArgumentPosition::mergeArgumentAwareness):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::setLocal):
        (JSC::DFG::ByteCodeParser::setArgument):
        (InlineStackEntry):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * dfg/DFGDoubleFormatState.h: Added.
        (DFG):
        (JSC::DFG::mergeDoubleFormatStates):
        (JSC::DFG::mergeDoubleFormatState):
        (JSC::DFG::doubleFormatStateToString):
        * dfg/DFGGraph.h:
        (Graph):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGVariableAccessData.h:
        (JSC::DFG::VariableAccessData::VariableAccessData):
        (JSC::DFG::VariableAccessData::predict):
        (JSC::DFG::VariableAccessData::argumentAwarePrediction):
        (VariableAccessData):
        (JSC::DFG::VariableAccessData::mergeArgumentAwarePrediction):
        (JSC::DFG::VariableAccessData::doubleFormatState):
        (JSC::DFG::VariableAccessData::shouldUseDoubleFormat):
        (JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
        (JSC::DFG::VariableAccessData::mergeDoubleFormatState):
        (JSC::DFG::VariableAccessData::makePredictionForDoubleFormat):

524 525 526 527 528 529 530 531 532
2012-04-10  Adam Klein  <adamk@chromium.org>

        Remove unused NonNullPassRefPtr from WTF
        https://bugs.webkit.org/show_bug.cgi?id=82389

        Reviewed by Kentaro Hara.

        * JavaScriptCore.order: Remove nonexistent symbols referencing NonNullPassRefPtr.

533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
2012-04-10  Darin Adler  <darin@apple.com>

        Remove unused data member from Lexer class
        https://bugs.webkit.org/show_bug.cgi?id=83429

        Reviewed by Kentaro Hara.

        I noticed that m_delimited was "write-only", so I deleted it.

        * parser/Lexer.cpp:
        (JSC::Lexer::setCode): Removed code to set m_delimited.
        (JSC::Lexer::parseIdentifier): Ditto.
        (JSC::Lexer::parseIdentifierSlowCase): Ditto.
        (JSC::Lexer::lex): Ditto.
        * parser/Lexer.h: Deleted m_delimited.

549 550 551 552 553 554 555 556 557 558 559 560 561 562
2012-04-10  Patrick Gansterer  <paroga@webkit.org>

        [CMake] Enable USE_FOLDERS property
        https://bugs.webkit.org/show_bug.cgi?id=83571

        Reviewed by Daniel Bates.

        Setting the FOLDER property on targets gives more structure 
        to the generated Visual Studio solutions.
        This does not affect other CMake generators.

        * CMakeLists.txt:
        * shell/CMakeLists.txt:

563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
2012-04-10  Filip Pizlo  <fpizlo@apple.com>

        It should be possible to see why a code block was not compiled by the DFG
        https://bugs.webkit.org/show_bug.cgi?id=83553

        Reviewed by Geoff Garen.
        
        If DFG_ENABLE(DEBUG_VERBOSE) and a code block is rejected, then print the
        opcode that caused the rejection.

        * dfg/DFGCapabilities.cpp:
        (JSC::DFG::debugFail):
        (DFG):
        (JSC::DFG::canHandleOpcodes):

578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
2012-04-09  Gavin Barraclough  <barraclough@apple.com>

        If a callback constructor returns a C++ null, throw a type error.
        https://bugs.webkit.org/show_bug.cgi?id=83537

        Rubber Stamped by Geoff Garen.

        * API/JSCallbackConstructor.cpp:
        (JSC::constructJSCallback):
            - If a callback constructor returns a C++ null, throw a type error.
        * API/tests/testapi.c:
        (Base_returnHardNull):
        * API/tests/testapi.js:
            - Add a test case for callback constructors that return a C++ null.

593 594 595 596 597 598 599 600 601 602 603 604 605 606 607
2012-04-09  Gavin Barraclough  <barraclough@apple.com>

        If a callback function returns a C++ null, convert to undefined.
        https://bugs.webkit.org/show_bug.cgi?id=83534

        Reviewed by Geoff Garen.

        * API/JSCallbackFunction.cpp:
            - If a callback function returns a C++ null, convert to undefined.
        (JSC::JSCallbackFunction::call):
        * API/tests/testapi.c:
        (Base_returnHardNull):
        * API/tests/testapi.js:
            - Add a test case for callback functions that return a C++ null.

608 609 610 611 612 613 614 615 616 617 618 619
2012-04-09  Filip Pizlo  <fpizlo@apple.com>

        Classic interpreter's GC hooks shouldn't attempt to scan instructions for code blocks that
        are currently being generated
        https://bugs.webkit.org/show_bug.cgi?id=83531
        <rdar://problem/11215200>

        Reviewed by Gavin Barraclough.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::stronglyVisitStrongReferences):

620 621 622 623 624 625 626 627
2012-04-09  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, modernize and clean up uses of ARM assembly mnemonics in inline asm blocks.

        * dfg/DFGOperations.cpp:
        (JSC):
        * offlineasm/armv7.rb:

paroga@webkit.org's avatar
paroga@webkit.org committed
628 629 630 631 632 633 634 635 636 637 638
2012-04-09  Patrick Gansterer  <paroga@webkit.org>

        Remove HAVE_STDINT_H
        https://bugs.webkit.org/show_bug.cgi?id=83434

        Reviewed by Kentaro Hara.

        HAVE_STDINT_H is defined with 1 all the time and we us stdint.h without HAVE(STDINT_H) already.

        * config.h:

639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
2012-04-08  Filip Pizlo  <fpizlo@apple.com>

        DFG should not load the property storage if it is inline.
        https://bugs.webkit.org/show_bug.cgi?id=83455

        Reviewed by Gavin Barraclough.
        
        We had previously decided to have all property storage accesses go through
        the property storage pointer even if they don't "really" have to, because
        we were thinking this would help GC barriers somehow. Well, we never ended
        up doing anything with that. Hence, doing these wasted loads of the
        property storage pointer when the storage is inline is just a waste of CPU
        cycles.
        
        This change makes the DFG's inline property accesses (GetByOffset and
        PutByOffset) go directly to the inline property storage if the structure(s)
        tell us that it's OK.
        
        This looks like an across-the-board 1% win.

        * bytecode/StructureSet.h:
        (JSC):
        (JSC::StructureSet::allAreUsingInlinePropertyStorage):
        (StructureSet):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::fillStorage):

668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689
2012-04-08  Filip Pizlo  <fpizlo@apple.com>

        Command-line jsc's exception handling should be rationalized
        https://bugs.webkit.org/show_bug.cgi?id=83437

        Reviewed by Dan Bernstein.
        
        - If an exception is thrown during run() execution, it is now propagated,
          so that it will terminate program execution unless it is caught.
          
        - If program execution terminates with an exception, the exception is now
          always printed.
          
        - When printing the exception, the backtrace is now also printed if one is
          available. It will only not be available if you use something akin to my
          favorite line of code, 'throw "error"', since primitives don't have
          properties and hence we cannot attach a "stack" property to them.

        * jsc.cpp:
        (functionRun):
        (runWithScripts):

690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739
2012-04-04  Filip Pizlo  <fpizlo@apple.com>

        Forced OSR exits should lead to recompilation based on count, not rate
        https://bugs.webkit.org/show_bug.cgi?id=83247
        <rdar://problem/10720925>

        Reviewed by Geoff Garen.
        
        Track which OSR exits happen because of inadequate coverage. Count them
        separately. If the count reaches a threshold, immediately trigger
        reoptimization.
        
        This is in contrast to the recompilation trigger for all other OSR exits.
        Normally recomp is triggered when the exit rate exceeds a certain ratio.
        
        Looks like a slight V8 speedup (sub 1%).

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::CodeBlock):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::forcedOSRExitCounter):
        (JSC::CodeBlock::addressOfForcedOSRExitCounter):
        (JSC::CodeBlock::offsetOfForcedOSRExitCounter):
        (JSC::CodeBlock::shouldReoptimizeNow):
        (JSC::CodeBlock::shouldReoptimizeFromLoopNow):
        (CodeBlock):
        * bytecode/DFGExitProfile.h:
        (JSC::DFG::exitKindToString):
        * dfg/DFGOSRExitCompiler.cpp:
        (JSC::DFG::OSRExitCompiler::handleExitCounts):
        (DFG):
        * dfg/DFGOSRExitCompiler.h:
        (OSRExitCompiler):
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOperations.cpp:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * runtime/Options.cpp:
        (Options):
        (JSC::Options::initializeOptions):
        * runtime/Options.h:
        (Options):

740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776
2012-04-06  Benjamin Poulain  <bpoulain@apple.com>

        Do not abuse ArrayStorage's m_length for testing array consistency
        https://bugs.webkit.org/show_bug.cgi?id=83403

        Reviewed by Geoffrey Garen.

        Array creation from a list of values is a 3 steps process:
        -JSArray::tryCreateUninitialized()
        -JSArray::initializeIndex() for each values
        -JSArray::completeInitialization()

        Previously, the attribute m_length was not set to the final size
        JSArray::tryCreateUninitialized() because it was used to test the array
        consistency JSArray::initializeIndex().

        This caused the initialization loop using JSArray::initializeIndex() maintain
        two counters:
        -index of the loop
        -storage->m_length++

        This patch fixes this by using the index of the initialization loop for the indinces of
        JSArray::initializeIndex(). For testing consistency, the variable m_initializationIndex
        is introduced if CHECK_ARRAY_CONSISTENCY is defined.

        The patch also fixes minor unrelated build issue when CHECK_ARRAY_CONSISTENCY is defined.

        This improves the performance of JSArray creation from literals by 8%.

        * runtime/JSArray.cpp:
        (JSC::JSArray::tryFinishCreationUninitialized):
        (JSC::JSArray::checkConsistency):
        * runtime/JSArray.h:
        (ArrayStorage):
        (JSC::JSArray::initializeIndex):
        (JSC::JSArray::completeInitialization):

jonlee@apple.com's avatar
jonlee@apple.com committed
777 778 779 780 781 782
2012-04-06  Jon Lee  <jonlee@apple.com>

        Build fix for Windows bots.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: export missing symbol.

ggaren@apple.com's avatar
Renamed  
ggaren@apple.com committed
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
2012-04-06  Geoffrey Garen  <ggaren@apple.com>

        Renamed

                WeakHeap => WeakSet
                HandleHeap => HandleSet

        Reviewed by Sam Weinig.

        These sets do have internal allocators, but it's confusing to call them
        heaps because they're sub-objects of an object called "heap".

        * heap/HandleHeap.cpp: Removed.
        * heap/HandleHeap.h: Removed.
        * heap/HandleSet.cpp: Copied from JavaScriptCore/heap/HandleHeap.cpp.
        * heap/WeakHeap.cpp: Removed.
        * heap/WeakHeap.h: Removed.
        * heap/WeakSet.cpp: Copied from JavaScriptCore/heap/WeakHeap.cpp.
        * heap/WeakSet.h: Copied from JavaScriptCore/heap/WeakHeap.h.

        Plus global rename using grep.

805 806 807 808 809 810 811 812
2012-04-06  Dan Bernstein  <mitz@apple.com>

        <rdar://problem/10912476> HiDPI: Have canvas use a hidpi backing store, but downsample upon access

        Reviewed by Sam Weinig.

        * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS.

813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831
2012-04-06  Rob Buis  <rbuis@rim.com>

        Fix cast-align warnings in JSC
        https://bugs.webkit.org/show_bug.cgi?id=80790

        Reviewed by George Staikos.

        * assembler/ARMv7Assembler.h:
        (JSC::ARMv7Assembler::computeJumpType):
        (JSC::ARMv7Assembler::link):
        * assembler/LinkBuffer.h:
        (JSC::LinkBuffer::linkCode):
        * heap/MarkStack.cpp:
        (JSC::SlotVisitor::copyAndAppend):
        * runtime/JSArray.cpp:
        (JSC::JSArray::visitChildren):
        * wtf/RefCountedArray.h:
        (WTF::RefCountedArray::Header::payload):

832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869
2012-04-06  Darin Adler  <darin@apple.com>

        Streamline strtod and fix some related problems
        https://bugs.webkit.org/show_bug.cgi?id=82857

        Reviewed by Geoffrey Garen.

        * parser/Lexer.cpp:
        (JSC::Lexer<>::lex): Use parseDouble. Since we have already scanned the number
        and we know it has only correct characters, leading spaces, trailing junk, and
        trailing spaces are not a possibility. No need to add a trailing null character.

        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::parseInt): Changed overflow based 10 case to use parseDouble. No need
        to allow trailing junk since the code above already allows only numeric digits
        in the string. This code path is used only in unusual cases, so it's not
        optimized for 8-bit strings, but easily could be.
        (JSC::jsStrDecimalLiteral): Removed the allow trailing junk argument to this
        function template because all the callers are OK with trailing junk. Use the
        parseDouble function. No need to copy the data into a byte buffer, because
        parseDouble handles that.
        (JSC::toDouble): Got rid of the DisallowTrailingJunk argument to the
        jsStrDecimalLiteral function template. That's OK because this function
        already checks for trailing junk and handles it appropriately. The old code
        path was doing it twice.
        (JSC::parseFloat): Got rid of the AllowTrailingJunk argument to the
        jsStrDecimalLiteral function template; the template allows junk unconditionally.

        * runtime/LiteralParser.cpp:
        (JSC::::Lexer::lexNumber): Use parseDouble. Since we have already scanned the number
        and we know it has only correct characters, leading spaces, trailing junk, and
        trailing spaces are not a possibility. No need to add a trailing null character.
        No need to copy the data into a byte buffer, because parseDouble handles that.
        We could optimize the UChar case even more because we know all the characters
        are ASCII, but not doing that at this time.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated.

870 871 872 873 874 875 876 877 878 879 880 881 882
2012-04-06  Patrick Gansterer  <paroga@webkit.org>

        Remove JSC dependency from GregorianDateTime
        https://bugs.webkit.org/show_bug.cgi?id=83290

        Reviewed by Geoffrey Garen.

        This allows us to move it to WTF later.

        * runtime/DateConstructor.cpp:
        (JSC::callDate):
        * runtime/JSDateMath.h:

883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901
2012-04-05  Michael Saboff  <msaboff@apple.com>

        Call Heap::discardAllCompiledCode() in low memory situations
        https://bugs.webkit.org/show_bug.cgi?id=83335

        Reviewed by Geoffrey Garen.

        Restructured Heap::discardAllCompiledCode() to do the "Is JavaScriptRunning?"
        check inline so that it can be called directly without this check.

        * heap/Heap.cpp:
        (JSC::Heap::discardAllCompiledCode):
        (JSC::Heap::collectAllGarbage):
        * heap/Heap.h: Added JS_EXPORT_PRIVATE to discardAllCompiledCode() so it can be
        called from WebCore.
        (Heap):
        * runtime/JSGlobalData.h: Removed unused " void discardAllCompiledCode()" declaration.
        (JSGlobalData):

902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
2012-04-05  Benjamin Poulain  <bpoulain@apple.com>

        Speed up the conversion from JSValue to String for bulk operations
        https://bugs.webkit.org/show_bug.cgi?id=83243

        Reviewed by Geoffrey Garen.

        When making operations on primitive types, we loose some time converting
        values to JSString in order to extract the string.

        This patch speeds up some basic Array operations by avoiding the creation
        of intermediary JSString when possible.

        For the cases where we need to convert a lot of JSValue in a tight loop,
        an inline conversion is used.

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToString):
        (JSC::arrayProtoFuncToLocaleString):
        (JSC::arrayProtoFuncJoin):
        (JSC::arrayProtoFuncPush):
        (JSC::arrayProtoFuncSort):
        * runtime/CommonIdentifiers.h:
        * runtime/JSArray.cpp:
        (JSC::JSArray::sort):
        * runtime/JSString.h:
        (JSC::JSValue::toUString):
        (JSC):
        (JSC::inlineJSValueNotStringtoUString):
        (JSC::JSValue::toUStringInline):
        * runtime/JSValue.cpp:
        (JSC::JSValue::toUStringSlowCase):
        (JSC):
        * runtime/JSValue.h:
        (JSValue):

938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953
2012-04-05  Benjamin Poulain  <bpoulain@apple.com>

        Use QuickSort when sorting primitive values by string representation
        https://bugs.webkit.org/show_bug.cgi?id=83312

        Reviewed by Gavin Barraclough.

        When the value we are sorting are all primitive values, we do not need to
        ensure a stable sort as two values with equal string representation are
        indistinguishable from JavaScript.

        This gives about 16% performance increase when sorting primitive values.

        * runtime/JSArray.cpp:
        (JSC::JSArray::sort):

954 955 956 957 958 959 960 961 962 963 964 965
2012-04-05  Oliver Hunt  <oliver@apple.com>

        SIGILL in JavaScriptCore on a Geode processor
        https://bugs.webkit.org/show_bug.cgi?id=82496

        Reviewed by Gavin Barraclough.

        Don't attempt to use the DFG when SSE2 is not available.

        * dfg/DFGCapabilities.cpp:
        (JSC::DFG::canCompileOpcodes):

oliver@apple.com's avatar
oliver@apple.com committed
966 967 968 969 970 971 972
2012-04-05  Oliver Hunt  <oliver@apple.com>

        Fix 32-bit build.

        * API/APICast.h:
        (toJS):

973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050
2012-04-05  Oliver Hunt  <oliver@apple.com>

        Replace static_cast with jsCast when casting JSCell subclasses in JSC
        https://bugs.webkit.org/show_bug.cgi?id=83307

        Reviewed by Gavin Barraclough.

        Replace all usage of static_cast<JSCell subtype*> with jsCast<> in JavaScriptCore.
        This results in assertions when unsafe casts are performed, but simply leaves
        a static_cast<> in release builds.

        * API/APICast.h:
        (toJS):
        * API/JSCallbackConstructor.cpp:
        (JSC::constructJSCallback):
        * API/JSCallbackFunction.cpp:
        (JSC::JSCallbackFunction::call):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::asCallbackObject):
        (JSC::::finishCreation):
        (JSC::::construct):
        (JSC::::call):
        * API/JSObjectRef.cpp:
        (JSObjectGetPrivate):
        (JSObjectSetPrivate):
        (JSObjectGetPrivateProperty):
        (JSObjectSetPrivateProperty):
        (JSObjectDeletePrivateProperty):
        * API/JSValueRef.cpp:
        (JSValueIsObjectOfClass):
        * API/JSWeakObjectMapRefPrivate.cpp:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::resolve):
        (JSC::BytecodeGenerator::resolveConstDecl):
        * debugger/DebuggerActivation.cpp:
        (JSC::DebuggerActivation::finishCreation):
        * dfg/DFGOperations.cpp:
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        (JSC::Interpreter::privateExecute):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/Executable.h:
        (JSC::isHostFunction):
        * runtime/JSActivation.h:
        (JSC::asActivation):
        * runtime/JSArray.cpp:
        (JSC::JSArray::defineOwnProperty):
        * runtime/JSArray.h:
        (JSC::asArray):
        * runtime/JSBoundFunction.cpp:
        (JSC::boundFunctionCall):
        (JSC::boundFunctionConstruct):
        * runtime/JSByteArray.h:
        (JSC::asByteArray):
        * runtime/JSCell.cpp:
        (JSC::JSCell::toObject):
        * runtime/JSCell.h:
        (JSC::jsCast):
        * runtime/JSGlobalObject.h:
        (JSC::asGlobalObject):
        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::globalFuncEval):
        * runtime/JSObject.cpp:
        (JSC::JSObject::setPrototypeWithCycleCheck):
        (JSC::JSObject::allowsAccessFrom):
        (JSC::JSObject::toThisObject):
        (JSC::JSObject::unwrappedObject):
        * runtime/JSObject.h:
        (JSC::asObject):
        * runtime/JSPropertyNameIterator.h:
        (JSC::Register::propertyNameIterator):
        * runtime/JSString.h:
        (JSC::asString):
        (JSC::JSValue::toString):
        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncSubstr):

1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089
2012-04-05  Benjamin Poulain  <bpoulain@apple.com>

        Make something faster than JSStringBuilder for joining an array of JSValue
        https://bugs.webkit.org/show_bug.cgi?id=83180

        Reviewed by Geoffrey Garen.

        This patch add the class JSStringJoiner optimized for join() operations.

        This class makes stricter constraints than JSStringBuilder in order avoid
        memory allocations.

        In the best case, the class allocate memory only twice:
        -Allocate an array to keep a list of UString to join.
        -Allocate the final string.

        We also avoid the conversion from 8bits strings to 16bits strings since
        they are costly and unlikly to help for subsequent calls.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToLocaleString):
        (JSC::arrayProtoFuncJoin):
        * runtime/JSStringJoiner.cpp: Added.
        (JSC):
        (JSC::appendStringToData):
        (JSC::joinStrings):
        (JSC::JSStringJoiner::build):
        * runtime/JSStringJoiner.h: Added.
        (JSC):
        (JSStringJoiner):
        (JSC::JSStringJoiner::JSStringJoiner):
        (JSC::JSStringJoiner::append):

1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
2012-04-05  Gavin Barraclough  <barraclough@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=77293
        [Un]Reserve 'let'

        Rubber stamped by Oliver Hunt.

        Revert r106198.
        This does break the web - e.g. https://bvi.bnc.ca/index/bnc/indexen.html
        If we're going to reserve let, we're going to have to do so in a more
        circumspect fashion.

        * parser/Keywords.table:

1104 1105 1106 1107 1108 1109 1110 1111 1112 1113
2012-04-05  Michael Saboff  <msaboff@apple.com>

        Rolling out http://trac.webkit.org/changeset/113262.
        Original code was fine.

        Rubber-stamped by Oliver Hunt.

        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::additionBlindedConstant):

1114 1115 1116 1117 1118 1119 1120 1121 1122
2012-04-05  Patrick Gansterer  <paroga@webkit.org>

        [WinCE] Remove unnecessary function decleration
        https://bugs.webkit.org/show_bug.cgi?id=83155

        Reviewed by Kentaro Hara.

        * runtime/JSDateMath.cpp:

1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
2012-04-04  Patrick Gansterer  <paroga@webkit.org>

        Add WTF::getCurrentLocalTime()
        https://bugs.webkit.org/show_bug.cgi?id=83164

        Reviewed by Alexey Proskuryakov.

        Replace the calls to WTF::getLocalTime() with time(0) with the new function.
        This allows us to use Win32 API on windows to get the same result in a next step.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * runtime/DateConstructor.cpp:
        (JSC::callDate):

1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
2012-04-04  Oliver Hunt  <oliver@apple.com>

        Parser fails to revert some state after parsing expression and object literals.
        https://bugs.webkit.org/show_bug.cgi?id=83236

        Reviewed by Gavin Barraclough.

        Reset left hand side counter after parsing the literals.

        * parser/Parser.cpp:
        (JSC::::parseObjectLiteral):
        (JSC::::parseStrictObjectLiteral):
        (JSC::::parseArrayLiteral):

1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
2012-04-04  Filip Pizlo  <fpizlo@apple.com>

        DFG InstanceOf should not uselessly speculate cell
        https://bugs.webkit.org/show_bug.cgi?id=83234

        Reviewed by Oliver Hunt.
        
        If InstanceOf is the only user of its child then don't speculate cell, since
        the not-cell case is super easy to handle.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileInstanceOf):

1164 1165 1166 1167 1168 1169 1170 1171 1172
2012-04-04  Michael Saboff  <msaboff@apple.com>

        Fixed minor error: "& 3" should be "& 2".

        Rubber-stamped by Oliver Hunt.

        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::additionBlindedConstant):

1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
2012-04-04  Michael Saboff  <msaboff@apple.com>

        Constant Blinding for add/sub immediate crashes in ArmV7 when dest is SP
        https://bugs.webkit.org/show_bug.cgi?id=83191

        Reviewed by Oliver Hunt.

        Make are that blinded constant pairs are similarly aligned to the
        original immediate values so that instructions that expect that
        alignment work correctly.  One example is ARMv7 add/sub imm to SP.

        * assembler/ARMv7Assembler.h:
        (JSC::ARMv7Assembler::add): Added ASSERT that immediate is word aligned.
        (JSC::ARMv7Assembler::sub): Added ASSERT that immediate is word aligned.
        (JSC::ARMv7Assembler::sub_S): Added ASSERT that immediate is word aligned.
        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::additionBlindedConstant):

1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202
2012-04-04  Filip Pizlo  <fpizlo@apple.com>

        DFG should short-circuit Branch(LogicalNot(...))
        https://bugs.webkit.org/show_bug.cgi?id=83181

        Reviewed by Geoff Garen.
        
        Slight (sub 1%) speed-up on V8.

        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):

1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214
2012-04-04  Geoffrey Garen  <ggaren@apple.com>

        [Qt] REGRESSION(r113141): All tests assert on 32 bit debug mode
        https://bugs.webkit.org/show_bug.cgi?id=83139

        Reviewed by Sam Weinig.

        * heap/PassWeak.h:
        (JSC::::get): 32-bit JSValue treats JSValue(nullptr).asCell() as an error,
        so work around that here. (Long-term, we should make 32-bit and 64-bit
        agree on the right behavior.)

1215 1216 1217 1218 1219 1220 1221 1222
2012-04-03  Geoffrey Garen  <ggaren@apple.com>

        Updated JSC expected test results to reflect recent bug fixes <disapproving look>.

        Reviewed by Sam Weinig.

        * tests/mozilla/expected.html:

1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391
2012-03-29  Geoffrey Garen  <ggaren@apple.com>

        First step toward incremental Weak<T> finalization
        https://bugs.webkit.org/show_bug.cgi?id=82670

        Reviewed by Filip Pizlo.

        This patch implements a Weak<T> heap that is compatible with incremental
        finalization, while making as few behavior changes as possible. The behavior
        changes it makes are:

        (*) Weak<T>'s raw JSValue no longer reverts to JSValue() automatically --
        instead, a separate flag indicates that the JSValue is no longer valid.
        (This is required so that the JSValue can be preserved for later finalization.)
        Objects dealing with WeakImpls directly must change to check the flag.

        (*) Weak<T> is no longer a subclass of Handle<T>.

        (*) DOM GC performance is different -- 9% faster in the geometric mean,
        but 15% slower in one specific case:
                gc-dom1.html: 6%  faster
                gc-dom2.html: 23% faster
                gc-dom3.html: 17% faster
                gc-dom4.html: 15% *slower*

        The key features of this new heap are:

        (*) Each block knows its own state, independent of any other blocks.

        (*) Each block caches its own sweep result.

        (*) The heap visits dead Weak<T>s at the end of GC. (It doesn't
        mark them yet, since that would be a behavior change.)

        * API/JSCallbackObject.cpp:
        (JSC::JSCallbackObjectData::finalize):
        * API/JSCallbackObjectFunctions.h:
        (JSC::::init): Updated to use the new WeakHeap API.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri: Paid the build system tax since I added some new files.

        * heap/Handle.h: Made WeakBlock a friend and exposed slot() as public,
        so we can keep passing a Handle<T> to finalizers, to avoid more surface
        area change in this patch. A follow-up patch should change the type we
        pass to finalizers.

        * heap/HandleHeap.cpp:
        (JSC):
        (JSC::HandleHeap::writeBarrier):
        (JSC::HandleHeap::isLiveNode):
        * heap/HandleHeap.h:
        (JSC):
        (HandleHeap):
        (Node):
        (JSC::HandleHeap::Node::Node): Removed all code related to Weak<T>, since
        we have a separate WeakHeap now.

        * heap/Heap.cpp:
        (JSC::Heap::Heap): Removed m_extraCost because extra cost is accounted
        for through our watermark now. Removed m_waterMark because it was unused.

        (JSC::Heap::destroy): Updated for addition of WeakHeap.

        (JSC::Heap::reportExtraMemoryCostSlowCase): Changed from using its own
        variable to participating in the watermark strategy. I wanted to standardize
        WeakHeap and all other Heap clients on this strategy, to make sure it's
        accurate.
 
        (JSC::Heap::markRoots): Updated for addition of WeakHeap. Added WeakHeap
        dead visit pass, as explained above.

        (JSC::Heap::collect):
        (JSC::Heap::resetAllocators): Updated for addition of WeakHeap.

        (JSC::Heap::addFinalizer):
        (JSC::Heap::FinalizerOwner::finalize): Updated for new Weak<T> API.

        * heap/Heap.h:
        (JSC::Heap::weakHeap):
        (Heap):
        (JSC::Heap::addToWaterMark): Added a way to participate in the watermarking
        strategy, since this is the best way for WeakHeap to report its memory
        cost. (I plan to update this in a follow-up patch to make it more accurate,
        but for now it is not less accurate than it used to be.)

        * heap/MarkedSpace.cpp:
        (JSC::MarkedSpace::MarkedSpace):
        (JSC::MarkedSpace::resetAllocators):
        * heap/MarkedSpace.h:
        (MarkedSpace):
        (JSC::MarkedSpace::addToWaterMark):
        (JSC::MarkedSpace::didConsumeFreeList): Removed m_nurseryWaterMark because
        it was unused, and I didn't want to update WeakHeap to keep an usused
        variable working. Added API for above.

        * heap/PassWeak.h:
        (JSC):
        (WeakImplAccessor):
        (PassWeak):
        (JSC::::operator):
        (JSC::::get):
        (JSC::::was):
        (JSC::::PassWeak):
        (JSC::::~PassWeak):
        (JSC::UnspecifiedBoolType):
        (JSC::::leakImpl):
        (JSC::adoptWeak):
        * heap/Strong.h:
        (JSC::Strong::operator!):
        (Strong):
        (JSC::Strong::operator UnspecifiedBoolType*):
        (JSC::Strong::get):
        * heap/Weak.h:
        (Weak):
        (JSC::::Weak):
        (JSC):
        (JSC::::isHashTableDeletedValue):
        (JSC::::~Weak):
        (JSC::::swap):
        (JSC::=):
        (JSC::::operator):
        (JSC::UnspecifiedBoolType):
        (JSC::::release):
        (JSC::::clear):
        (JSC::::hashTableDeletedValue): Lots of code changes here, but they boil
        down to two things:

        (*) Allocate WeakImpls from the WeakHeap instead of Handles from the HandleHeap.

        (*) Explicitly check WeakImpl::state() for non-liveness before returning
        a value (explained above).

        These files implement the new Weak<T> heap behavior described above:

        * heap/WeakBlock.cpp: Added.
        * heap/WeakBlock.h: Added.
        * heap/WeakHandleOwner.cpp: Added.
        * heap/WeakHandleOwner.h: Added.
        * heap/WeakHeap.cpp: Added.
        * heap/WeakHeap.h: Added.
        * heap/WeakImpl.h: Added.

        One interesting difference from the old heap is that we don't allow
        clients to overwrite a WeakImpl after allocating it, and we don't recycle
        WeakImpls prior to garbage collection. This is required for lazy finalization,
        but it will also help us esablish a useful invariant in the future: allocating
        a WeakImpl will be a binding contract to run a finalizer at some point in the
        future, even if the WeakImpl is later deallocated.

        * jit/JITStubs.cpp:
        (JSC::JITThunks::hostFunctionStub): Check the Weak<T> for ! instead of
        its JSValue, since that's our API contract now, and the JSValue might
        be stale.

        * runtime/JSCell.h:
        (JSC::jsCast): Allow casting NULL pointers because it's useful and harmless.

        * runtime/Structure.cpp:
        (JSC::StructureTransitionTable::add): I can't remember why I did this.

        * runtime/StructureTransitionTable.h:
        * runtime/WeakGCMap.h: I had to update these classes because they allocate
        and deallocate weak pointers manually. They should probably stop doing that.

1392 1393 1394 1395 1396 1397 1398 1399 1400
2012-04-03  Keishi Hattori  <keishi@webkit.org>

        Disable ENABLE_DATALIST for now
        https://bugs.webkit.org/show_bug.cgi?id=82871

        Reviewed by Kent Tamura.

        * Configurations/FeatureDefines.xcconfig: Disabled ENABLE_DATALIST.

fpizlo@apple.com's avatar
fpizlo@apple.com committed
1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438
2012-04-02  Filip Pizlo  <fpizlo@apple.com>

        jsr/sret should be removed
        https://bugs.webkit.org/show_bug.cgi?id=82986
        <rdar://problem/11017015>

        Reviewed by Sam Weinig and Geoff Garen.
        
        Replaces jsr/sret with finally block inlining.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * bytecode/Opcode.h:
        (JSC):
        (JSC::padOpcodeName):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::pushFinallyContext):
        (JSC::BytecodeGenerator::emitComplexJumpScopes):
        (JSC):
        * bytecompiler/BytecodeGenerator.h:
        (FinallyContext):
        (BytecodeGenerator):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::TryNode::emitBytecode):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompile):
        * jit/JIT.h:
        (JIT):
        * jit/JITOpcodes.cpp:
        (JSC):
        * jit/JITOpcodes32_64.cpp:
        (JSC):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:

1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450
2012-04-03  Mark Rowe  <mrowe@apple.com>

        Make it possible to install the JavaScriptCore test tools.

        Part of <rdar://problem/11158607>.
        
        Reviewed by Filip Pizlo.

        * JavaScriptCore.xcodeproj/project.pbxproj: Introduce an aggregate target named
        Test Tools that builds testapi, minidom and testRegExp. Switch All from depending on
        those targets individually to depending on the new aggregate target.

1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463
2012-04-03  Filip Pizlo  <fpizlo@apple.com>

        Offlineasm ARM backend has a very convoluted way of saying it wants to emit a
        three-operand multiply instruction
        https://bugs.webkit.org/show_bug.cgi?id=83100

        Reviewed by Darin Adler.
        
        Changed the "muli"/"mulp" case to call emitArmV7() since that helper method was
        already smart enough to do the Right Thing for multiply.

        * offlineasm/armv7.rb:

1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475
2012-04-03  Filip Pizlo  <fpizlo@apple.com>

        Offlineasm ARM backend uses the wrong mnemonic for multiply
        https://bugs.webkit.org/show_bug.cgi?id=83098
        <rdar://problem/11168744>

        Reviewed by Gavin Barraclough.
        
        Use "mul" instead of "muls" since we're passing three operands, not two.

        * offlineasm/armv7.rb:

1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492
2012-04-03  Gavin Barraclough  <barraclough@apple.com>

        Linux crashes during boot
        https://bugs.webkit.org/show_bug.cgi?id=83096

        Reviewed by Filip Pizlo.

        The bug here is that we add empty JSValues to the sparse map, and then set them
        - but a GC may occur before doing so (due to a call to reportExtraMemory cost).
        We may want to consider making it safe to mark empty JSValues, but the simple &
        contained fix to this specific bug is to just initialize these values to
        something other than JSValue().

        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::add):
            - Initialize sparse map entries.

1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
2012-04-02  Oliver Hunt  <oliver@apple.com>

        Incorrect liveness information when inlining
        https://bugs.webkit.org/show_bug.cgi?id=82985

        Reviewed by Filip Pizlo.

        Don't remap register numbers that have already been remapped.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::handleInlining):

1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521
2012-04-02  Filip Pizlo  <fpizlo@apple.com>

        Activation tear-off neglects to copy the callee and scope chain, leading to crashes if we
        try to create an arguments object from the activation
        https://bugs.webkit.org/show_bug.cgi?id=82947
        <rdar://problem/11058598>

        Reviewed by Gavin Barraclough.
        
        We now copy the entire call frame header just to be sure. This is mostly perf-netural,
        except for a 3.7% slow-down in V8/earley.

        * runtime/JSActivation.cpp:
        (JSC::JSActivation::visitChildren):
        * runtime/JSActivation.h:
        (JSC::JSActivation::tearOff):

1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558
2012-04-02  Daniel Bates  <dbates@webkit.org>

        Remove Source/JavaScriptCore/wtf and its empty subdirectories

        Rubber-stamped by Eric Seidel.

        Following the move of WTF from Source/JavaScriptCore/wtf to Source/WTF
        (https://bugs.webkit.org/show_bug.cgi?id=75673), remove directory
        Source/JavaScriptCore/wtf and its empty subdirectories.

        * wtf: Removed.
        * wtf/android: Removed.
        * wtf/blackberry: Removed.
        * wtf/chromium: Removed.
        * wtf/dtoa: Removed.
        * wtf/efl: Removed.
        * wtf/gobject: Removed.
        * wtf/gtk: Removed.
        * wtf/mac: Removed.
        * wtf/qt: Removed.
        * wtf/qt/compat: Removed.
        * wtf/tests: Removed.
        * wtf/text: Removed.
        * wtf/threads: Removed.
        * wtf/threads/win: Removed.
        * wtf/unicode: Removed.
        * wtf/unicode/glib: Removed.
        * wtf/unicode/icu: Removed.
        * wtf/unicode/qt4: Removed.
        * wtf/unicode/wince: Removed.
        * wtf/url: Removed.
        * wtf/url/api: Removed.
        * wtf/url/src: Removed.
        * wtf/win: Removed.
        * wtf/wince: Removed.
        * wtf/wx: Removed.

1559 1560 1561 1562 1563 1564
2012-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck issues.

        * GNUmakefile.list.am: Add missing file.

1565 1566 1567 1568 1569 1570 1571 1572
2012-04-01  Darin Adler  <darin@apple.com>

        Fix incorrect path for libWTF.a in Mac project file.

        * JavaScriptCore.xcodeproj/project.pbxproj: Removed the "../Release" prefix that
        would cause other configurations to try to link with the "Release" version of
        libWTF.a instead of the correct version.

1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612
2012-03-29  Filip Pizlo  <fpizlo@apple.com>

        DFG should optimize a==b for a being an object and b being either an object or
        null/undefined, and vice versa
        https://bugs.webkit.org/show_bug.cgi?id=82656

        Reviewed by Oliver Hunt.
        
        Implements additional object equality optimizations for the case that one
        operand is predicted to be an easily speculated object (like FinalObject or
        Array) and the other is either an easily speculated object or Other, i.e.
        Null or Undefined.
        
        2-5% speed-up on V8/raytrace, leading to a sub-1% progression on V8.
        
        I also took the opportunity to clean up the control flow for the speculation
        decisions in the various Compare opcodes. And to fix a build bug in SamplingTool.
        And to remove debug cruft I stupidly committed in my last patch.
        
        * bytecode/SamplingTool.h:
        (SamplingRegion):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGOperations.cpp:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
        (JSC::DFG::SpeculativeJIT::compare):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (DFG):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
        (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
        (DFG):
        (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):

1613 1614 1615 1616 1617 1618 1619 1620 1621
2012-03-30  David Barr  <davidbarr@chromium.org>

        Split up top-level .gitignore and .gitattributes
        https://bugs.webkit.org/show_bug.cgi?id=82687

        Reviewed by Tor Arne Vestbø.

        * JavaScriptCore.gyp/.gitignore: Added.

1622 1623 1624 1625 1626 1627
2012-03-30  Steve Falkenburg  <sfalken@apple.com>

        Windows (make based) build fix.

        * JavaScriptCore.vcproj/JavaScriptCore.make: Copy WTF header files into a place where JavaScriptCore build can see them.

1628 1629 1630 1631 1632 1633 1634 1635 1636
2012-03-30  Keishi Hattori  <keishi@webkit.org>

        Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
        https://bugs.webkit.org/show_bug.cgi?id=80972

        Reviewed by Kent Tamura.

        * Configurations/FeatureDefines.xcconfig:

1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671
2012-03-29  Mark Hahnenberg  <mhahnenberg@apple.com>

        Refactor recompileAllJSFunctions() to be less expensive
        https://bugs.webkit.org/show_bug.cgi?id=80330

        Reviewed by Filip Pizlo.

        This change is performance neutral on the JS benchmarks we track. It's mostly to improve page 
        load performance, which currently does at least a couple full GCs per navigation.

        * heap/Heap.cpp:
        (JSC::Heap::discardAllCompiledCode): Rename recompileAllJSFunctions to discardAllCompiledCode 
        because the function doesn't actually recompile anything (and never did); it simply throws code
        away for it to be recompiled later if we determine we should do so.
        (JSC):
        (JSC::Heap::collectAllGarbage):
        (JSC::Heap::addFunctionExecutable): Adds a newly created FunctionExecutable to the Heap's list.
        (JSC::Heap::removeFunctionExecutable): Removes the specified FunctionExecutable from the Heap's list.
        * heap/Heap.h:
        (JSC):
        (Heap):
        * runtime/Executable.cpp: Added next and prev fields to FunctionExecutables so that they can 
        be used in DoublyLinkedLists.
        (JSC::FunctionExecutable::FunctionExecutable):
        (JSC::FunctionExecutable::finalize): Removes the FunctionExecutable from the Heap's list.
        * runtime/Executable.h:
        (FunctionExecutable):
        (JSC::FunctionExecutable::create): Adds the FunctionExecutable to the Heap's list.
        * runtime/JSGlobalData.cpp: Remove recompileAllJSFunctions, as it's the Heap's job to own and manage 
        the list of FunctionExecutables.
        * runtime/JSGlobalData.h:
        (JSGlobalData):
        * runtime/JSGlobalObject.cpp:
        (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Use the new discardAllCompiledCode.

1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682
2012-03-29  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed build fix for non-x86 platforms.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileSoftModulo):
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):
        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emitSlow_op_mod):

barraclough@apple.com's avatar
barraclough@apple.com committed
1683 1684 1685 1686 1687 1688
2012-03-29  Gavin Barraclough  <barraclough@apple.com>

        Windows build fix p2.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

barraclough@apple.com's avatar
barraclough@apple.com committed
1689 1690 1691 1692 1693 1694
2012-03-29  Gavin Barraclough  <barraclough@apple.com>

        Windows build fix p1.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722
2012-03-29  Gavin Barraclough  <barraclough@apple.com>

        Template the Yarr::Interpreter on the character type
        https://bugs.webkit.org/show_bug.cgi?id=82637

        Reviewed by Sam Weinig.

        We should be able to call to the interpreter after having already checked the character type,
        without having to re-package the character pointer back up into a string!

        * runtime/RegExp.cpp:
        (JSC::RegExp::match):
        (JSC::RegExp::matchCompareWithInterpreter):
            - Don't pass length.
        * yarr/Yarr.h:
            - moved function declarations to YarrInterpreter.h.
        * yarr/YarrInterpreter.cpp:
        (Yarr):
        (Interpreter):
        (JSC::Yarr::Interpreter::InputStream::InputStream):
        (InputStream):
        (JSC::Yarr::Interpreter::Interpreter):
        (JSC::Yarr::interpret):
            - templated Interpreter class on CharType.
        * yarr/YarrInterpreter.h:
        (Yarr):
            - added function declarations.

1723 1724 1725 1726 1727 1728 1729 1730 1731
2012-03-29  David Kilzer  <ddkilzer@apple.com>

        Don't use a flattened framework path when building on OS X

        Reviewed by Mark Rowe.

        * Configurations/ToolExecutable.xcconfig: Use REAL_PLATFORM_NAME
        to select different INSTALL_PATH values.

1732 1733 1734 1735 1736 1737 1738
2012-03-29  Kevin Ollivier  <kevino@theolliviers.com>

        [wx] Unreviewed build fix, add Win-specific sources
        the wx port needs after WTF move.

        * wscript:

1739 1740 1741 1742 1743 1744 1745 1746 1747
2012-03-29  Andy Estes  <aestes@apple.com>

        Remove an unused variable that breaks the build with newer versions of clang.

        Rubber stamped by Gavin Barraclough.

        * yarr/YarrJIT.cpp:
        (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813
2012-03-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        HashMap<>::add should return a more descriptive object
        https://bugs.webkit.org/show_bug.cgi?id=71063

        Reviewed by Ryosuke Niwa.

        Update code to use AddResult instead of a pair. Note that since WeakGCMap wraps
        the iterator type, there's a need for its own AddResult type -- instantiated from
        HashTableAddResult template class.

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::contextData):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::addVar):
        (JSC::BytecodeGenerator::addGlobalVar):
        (JSC::BytecodeGenerator::addConstant):
        (JSC::BytecodeGenerator::addConstantValue):
        (JSC::BytecodeGenerator::emitLoad):
        (JSC::BytecodeGenerator::addStringConstant):
        (JSC::BytecodeGenerator::emitLazyNewFunction):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::PropertyListNode::emitBytecode):
        * debugger/Debugger.cpp:
        * dfg/DFGAssemblyHelpers.cpp:
        (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::cellConstant):
        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
        * jit/JITStubs.cpp:
        (JSC::JITThunks::ctiStub):
        (JSC::JITThunks::hostFunctionStub):
        * parser/Parser.cpp:
        (JSC::::parseStrictObjectLiteral):
        * parser/Parser.h:
        (JSC::Scope::declareParameter):
        * runtime/Identifier.cpp:
        (JSC::Identifier::add):
        (JSC::Identifier::add8):
        (JSC::Identifier::addSlowCase):
        * runtime/Identifier.h:
        (JSC::Identifier::add):
        (JSC::IdentifierTable::add):
        * runtime/JSArray.cpp:
        (JSC::SparseArrayValueMap::add):
        (JSC::SparseArrayValueMap::put):
        (JSC::SparseArrayValueMap::putDirect):
        (JSC::JSArray::enterDictionaryMode):
        (JSC::JSArray::defineOwnNumericProperty):
        * runtime/JSArray.h:
        (SparseArrayValueMap):
        * runtime/PropertyNameArray.cpp:
        (JSC::PropertyNameArray::add):
        * runtime/StringRecursionChecker.h:
        (JSC::StringRecursionChecker::performCheck):
        * runtime/Structure.cpp:
        (JSC::StructureTransitionTable::add):
        * runtime/WeakGCMap.h:
        (WeakGCMap):
        (JSC::WeakGCMap::add):
        (JSC::WeakGCMap::set):
        * tools/ProfileTreeNode.h:
        (JSC::ProfileTreeNode::sampleChild):

1814 1815 1816 1817 1818 1819 1820
2012-03-29  Patrick Gansterer  <paroga@webkit.org>

        Build fix for !ENABLE(YARR_JIT) after r112454.

        * runtime/RegExp.cpp:
        (JSC::RegExp::invalidateCode):

1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831
2012-03-28  Filip Pizlo  <fpizlo@apple.com>

        DFG object equality speculations should be simplified
        https://bugs.webkit.org/show_bug.cgi?id=82557

        Reviewed by Gavin Barraclough.

        * dfg/DFGNode.h:
        (JSC::DFG::Node::shouldSpeculateFinalObject):
        (JSC::DFG::Node::shouldSpeculateArray):

1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846
2012-03-28  David Kilzer  <ddkilzer@apple.com>

        minidom configurations should be based on ToolExecutable.xcconfig
        <http://webkit.org/b/82513>

        Reviewed by Mark Rowe.

        Note that this patch changes minidom from being installed in
        /usr/local/bin to JavaScriptCore.framework/Resources.

        * Configurations/ToolExecutable.xcconfig: Add semi-colon.
        * JavaScriptCore.xcodeproj/project.pbxproj: Base minidom
        configurations on ToolExecutable.xcconfig.  Remove redundant
        PRODUCT_NAME and SKIP_INSTALL variables.

1847 1848 1849 1850 1851 1852 1853 1854 1855
2012-03-28  Gavin Barraclough  <barraclough@apple.com>

        Build fix - some compiles generating NORETURN related warnings.

        * yarr/YarrJIT.cpp:
        (JSC::Yarr::YarrGenerator::setSubpatternStart):
        (JSC::Yarr::YarrGenerator::setSubpatternEnd):
        (JSC::Yarr::YarrGenerator::clearSubpatternStart):

1856 1857 1858 1859 1860 1861 1862
2012-03-28  Kevin Ollivier  <kevino@theolliviers.com>

        [wx] Unreviewed. Build fix, move WTF back into JSCore target
        until issues with JSCore not linking in all WTF symbols are resolved.
        
        * wscript:

1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873
2012-03-28  Gavin Barraclough  <barraclough@apple.com>

        Yarr: if we're not using the output array, don't populate it!
        https://bugs.webkit.org/show_bug.cgi?id=82519

        Reviewed by Sam Weinig.

        * runtime/RegExp.cpp:
        (JSC):
            - Missed review comment! - didn't fully remove RegExpRepresentation.

1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959
2012-03-28  Gavin Barraclough  <barraclough@apple.com>

        Yarr: if we're not using the output array, don't populate it!
        https://bugs.webkit.org/show_bug.cgi?id=82519

        Reviewed by Sam Weinig.

        Add a new variant of the match method to RegExp that returns a MatchResult,
        and modify YarrJIT to be able to compile code that doesn't use an output vector.

        This is a 3% progression on v8-regexp.

        * JavaScriptCore.xcodeproj/project.pbxproj:
            - Moved MatchResult into its own header.
        * assembler/AbstractMacroAssembler.h:
            - Added missing include.
        * runtime/MatchResult.h: Added.
        (MatchResult::MatchResult):
        (MatchResult):
        (MatchResult::failed):
        (MatchResult::operator bool):
        (MatchResult::empty):
            - Moved MatchResult into its own header.
        * runtime/RegExp.cpp:
        (JSC::RegExp::compile):
        (JSC::RegExp::compileIfNecessary):
        (JSC::RegExp::match):
            - Changed due to execute & representation changes.
        (JSC::RegExp::compileMatchOnly):
        (JSC::RegExp::compileIfNecessaryMatchOnly):
            - Added helper to compile MatchOnly code.
        (JSC::RegExp::invalidateCode):
        (JSC::RegExp::matchCompareWithInterpreter):
        (JSC::RegExp::printTraceData):
            - Changed due representation changes.
        * runtime/RegExp.h:
        (RegExp):
        (JSC::RegExp::hasCode):
            - Made YarrCodeBlock a member.
        * runtime/RegExpConstructor.h:
        (RegExpConstructor):
        (JSC::RegExpConstructor::performMatch):
            - Added no-ovector form.
        * runtime/RegExpMatchesArray.cpp:
        (JSC::RegExpMatchesArray::reifyAllProperties):
            - Match now takes a reference to ovector, not a pointer.
        * runtime/RegExpObject.h:
        (JSC):
            - Moved MatchResult into its own header.
        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncSplit):
            - Match now takes a reference to ovector, not a pointer.
        * testRegExp.cpp:
        (testOneRegExp):
            - Match now takes a reference to ovector, not a pointer.
        * yarr/YarrJIT.cpp:
        (Yarr):
        (YarrGenerator):
        (JSC::Yarr::YarrGenerator::initCallFrame):
        (JSC::Yarr::YarrGenerator::removeCallFrame):
        (JSC::Yarr::YarrGenerator::setSubpatternStart):
        (JSC::Yarr::YarrGenerator::setSubpatternEnd):
        (JSC::Yarr::YarrGenerator::clearSubpatternStart):
        (JSC::Yarr::YarrGenerator::setMatchStart):
        (JSC::Yarr::YarrGenerator::getMatchStart):
            - Added helper functions to intermediate access to output.
        (JSC::Yarr::YarrGenerator::generateDotStarEnclosure):
        (JSC::Yarr::YarrGenerator::generate):
        (JSC::Yarr::YarrGenerator::backtrack):
        (JSC::Yarr::YarrGenerator::generateEnter):
        (JSC::Yarr::YarrGenerator::compile):
            - Changed to use the new helpers, only generate subpatterns if IncludeSubpatterns.
        (JSC::Yarr::jitCompile):
            - Needs to template of MatchOnly or IncludeSubpatterns.
        * yarr/YarrJIT.h:
        (YarrCodeBlock):
        (JSC::Yarr::YarrCodeBlock::set8BitCode):
        (JSC::Yarr::YarrCodeBlock::set16BitCode):
        (JSC::Yarr::YarrCodeBlock::has8BitCodeMatchOnly):
        (JSC::Yarr::YarrCodeBlock::has16BitCodeMatchOnly):
        (JSC::Yarr::YarrCodeBlock::set8BitCodeMatchOnly):
        (JSC::Yarr::YarrCodeBlock::set16BitCodeMatchOnly):
        (JSC::Yarr::YarrCodeBlock::execute):
        (JSC::Yarr::YarrCodeBlock::clear):
            - Added a second set of CodeRefs, so that we can compile RexExps with/without subpattern matching.

1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976
2012-03-27  Filip Pizlo  <fpizlo@apple.com>

        DFG OSR exit should not generate an exit for variables of inlinees if the
        inlinees are not in scope
        https://bugs.webkit.org/show_bug.cgi?id=82312

        Reviewed by Oliver Hunt.
        
        * bytecode/CodeBlock.h:
        (JSC::baselineCodeBlockForInlineCallFrame):
        (JSC):
        (JSC::baselineCodeBlockForOriginAndBaselineCodeBlock):
        * dfg/DFGOSRExit.cpp:
        (JSC::DFG::computeNumVariablesForCodeOrigin):
        (DFG):
        (JSC::DFG::OSRExit::OSRExit):

1977 1978 1979 1980 1981 1982 1983 1984 1985
2012-03-27  Matt Lilek  <mrl@apple.com>

        Stop compiling Interpreter.cpp with -fno-var-tracking
        https://bugs.webkit.org/show_bug.cgi?id=82299

        Reviewed by Anders Carlsson.

        * JavaScriptCore.xcodeproj/project.pbxproj:

1986 1987 1988 1989 1990 1991 1992 1993 1994 1995
2012-03-27  Pratik Solanki  <psolanki@apple.com>

        Compiler warning when JIT is not enabled
        https://bugs.webkit.org/show_bug.cgi?id=82352

        Reviewed by Filip Pizlo.

        * runtime/JSFunction.cpp:
        (JSC::JSFunction::create):

1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
2012-03-26  Thouraya ANDOLSI  <thouraya.andolsi@st.com>

        Unaligned userspace access for SH4 platforms
        https://bugs.webkit.org/show_bug.cgi?id=79104

        Reviewed by Gavin Barraclough.

        * assembler/AbstractMacroAssembler.h:
        (Jump):
        (JSC::AbstractMacroAssembler::Jump::Jump):
        (JSC::AbstractMacroAssembler::Jump::link):
        * assembler/MacroAssemblerSH4.h:
        (JSC::MacroAssemblerSH4::load16Unaligned):
        (JSC::MacroAssemblerSH4::load32WithUnalignedHalfWords):
        (JSC::MacroAssemblerSH4::branchDouble):
        (JSC::MacroAssemblerSH4::branchTrue):
        (JSC::MacroAssemblerSH4::branchFalse):
        * assembler/SH4Assembler.h:
        (JSC::SH4Assembler::extraInstrForBranch):
        (SH4Assembler):
        (JSC::SH4Assembler::bra):
        (JSC::SH4Assembler::linkJump):
        * jit/JIT.h:
        (JIT):
        * yarr/YarrJIT.cpp:
        (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):

2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033
2012-03-26  Ryosuke Niwa  <rniwa@webkit.org>

        cssText should use shorthand notations
        https://bugs.webkit.org/show_bug.cgi?id=81737

        Reviewed by Enrica Casucci.

        Export symbols of BitVector on Windows.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051
2012-03-26  Filip Pizlo  <fpizlo@apple.com>

        DFG should assert that argument value recoveries can only be
        AlreadyInRegisterFile or Constant
        https://bugs.webkit.org/show_bug.cgi?id=82249

        Reviewed by Michael Saboff.
        
        Made the assertions that the DFG makes for argument value recoveries match
        what Arguments expects.

        * bytecode/ValueRecovery.h:
        (JSC::ValueRecovery::isConstant):
        (ValueRecovery):
        (JSC::ValueRecovery::isAlreadyInRegisterFile):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compile):

2052 2053 2054 2055 2056 2057 2058
2012-03-26  Dan Bernstein  <mitz@apple.com>

        Tried to fix the Windows build.

        * yarr/YarrPattern.cpp:
        (JSC::Yarr::CharacterClassConstructor::putRange):

2059 2060 2061 2062 2063 2064 2065
2012-03-26  Gavin Barraclough  <barraclough@apple.com>

        Unreviewed - speculative Windows build fix.

        * yarr/YarrCanonicalizeUCS2.h:
        (JSC::Yarr::getCanonicalPair):

2066 2067 2068 2069 2070 2071 2072
2012-03-26  Dan Bernstein  <mitz@apple.com>

        Fixed builds with assertions disabled.

        * yarr/YarrCanonicalizeUCS2.h:
        (JSC::Yarr::areCanonicallyEquivalent):

2073 2074 2075 2076 2077 2078
2012-03-26  Gavin Barraclough  <barraclough@apple.com>

        Unreviewed - errk! - accidentally the whole pbxproj.

        * JavaScriptCore.xcodeproj/project.pbxproj:

2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133
2012-03-25  Gavin Barraclough  <barraclough@apple.com>

        Greek sigma is handled wrong in case independent regexp.
        https://bugs.webkit.org/show_bug.cgi?id=82063

        Reviewed by Oliver Hunt.

        The bug here is that we assume that any given codepoint has at most one additional value it
        should match under a case insensitive match, and that the pair of codepoints that match (if
        a codepoint does not only match itself) can be determined by calling toUpper/toLower on the
        given codepoint). Life is not that simple.

        Instead, pre-calculate a set of tables mapping from a UCS2 codepoint to the set of characters
        it may match, under the ES5.1 case-insensitive matching rules. Since unicode is fairly regular
        we can pack this table quite nicely, and get it down to 364 entries. This means we can use a
        simple binary search to find an entry in typically eight compares.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * yarr/yarr.pri:
            - Added new files to build systems.
        * yarr/YarrCanonicalizeUCS2.cpp: Added.
            - New - autogenerated, UCS2 canonicalized comparison tables.
        * yarr/YarrCanonicalizeUCS2.h: Added.
        (JSC::Yarr::rangeInfoFor):
            - Look up the canonicalization info for a UCS2 character.
        (JSC::Yarr::getCanonicalPair):
            - For a UCS2 character with a single equivalent value, look it up.
        (JSC::Yarr::isCanonicallyUnique):
            - Returns true if no other UCS2 code points are canonically equal.
        (JSC::Yarr::areCanonicallyEquivalent):
            - Compare two values, under canonicalization rules.
        * yarr/YarrCanonicalizeUCS2.js: Added.
            - script used to generate YarrCanonicalizeUCS2.cpp.
        * yarr/YarrInterpreter.cpp:
        (JSC::Yarr::Interpreter::tryConsumeBackReference):
            - Use isCanonicallyUnique, rather than Unicode toUpper/toLower.
        * yarr/YarrJIT.cpp:
        (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
        (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
        (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
            - Use isCanonicallyUnique, rather than Unicode toUpper/toLower.
        * yarr/YarrPattern.cpp:
        (JSC::Yarr::CharacterClassConstructor::putChar):
            - Updated to determine canonical equivalents correctly.
        (JSC::Yarr::CharacterClassConstructor::putUnicodeIgnoreCase):
            - Added, used to put a non-ascii, non-unique character in a case-insensitive match.
        (JSC::Yarr::CharacterClassConstructor::putRange):
            - Updated to determine canonical equivalents correctly.
        (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
            - Changed to call putUnicodeIgnoreCase, instead of putChar, avoid a double lookup of rangeInfo.

2134 2135 2136 2137 2138 2139 2140
2012-03-26  Kevin Ollivier  <kevino@theolliviers.com>

        [wx] Unreviewed build fix. Add the build outputs dir to the list of build dirs,
        so we make sure it finds the API headers on all platforms.

        * wscript:

2141 2142 2143 2144 2145 2146 2147 2148
2012-03-26  Patrick Gansterer  <paroga@webkit.org>

        Build fix for WinCE after r112039.

        * interpreter/Register.h:
        (Register): Removed inline keyword from decleration since
                    there is an ALWAYS_INLINE at the definition anyway.

2149 2150 2151 2152 2153 2154
2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.list.am: Add missing files.

2155 2156 2157 2158 2159 2160
2012-03-25  Kevin Ollivier  <kevino@theolliviers.com>

        [wx] Unreviewed build fix. Move WTF to its own static lib build.

        * wscript:

2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248
2012-03-25  Filip Pizlo  <fpizlo@apple.com>

        DFG int-to-double conversion should be revealed to CSE
        https://bugs.webkit.org/show_bug.cgi?id=82135

        Reviewed by Oliver Hunt.
        
        This introduces the notion of an Int32ToDouble node, which is injected
        into the graph anytime we know that we have a double use of a node that
        was predicted integer. The Int32ToDouble simplifies double speculation
        on integers by skipping the path that would unbox doubles, if we know
        that the value is already proven to be an integer. It allows integer to
        double conversions to be subjected to common subexpression elimination
        (CSE) by allowing the CSE phase to see where these conversions are
        occurring. Finally, it allows us to see when a constant is being used
        as both a double and an integer. This is a bit odd, since it means that
        sometimes a double use of a constant will not refer directly to the
        constant. This should not cause problems, for now, but it may require
        some canonizalization in the future if we want to support strength
        reductions of double operations based on constants.
        
        To allow injection of nodes into the graph, this change introduces the
        DFG::InsertionSet, which is a way of lazily inserting elements into a
        list. This allows the FixupPhase to remain O(N) despite performing
        multiple injections in a single basic block. Without the InsertionSet,
        each injection would require performing an insertion into a vector,
        which is O(N), leading to O(N^2) performance overall. With the
        InsertionSet, each injection simply records what insertion would have
        been performed, and all insertions are performed at once (via
        InsertionSet::execute) after processing of a basic block is completed.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/PredictedType.h:
        (JSC::isActionableIntMutableArrayPrediction):
        (JSC):
        (JSC::isActionableFloatMutableArrayPrediction):
        (JSC::isActionableTypedMutableArrayPrediction):
        (JSC::isActionableMutableArrayPrediction):
        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGCommon.h:
        (JSC::DFG::useKindToString):
        (DFG):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::run):
        (JSC::DFG::FixupPhase::fixupBlock):
        (FixupPhase):
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::fixDoubleEdge):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGInsertionSet.h: Added.
        (DFG):
        (Insertion):
        (JSC::DFG::Insertion::Insertion):
        (JSC::DFG::Insertion::index):
        (JSC::DFG::Insertion::element):
        (InsertionSet):
        (JSC::DFG::InsertionSet::InsertionSet):
        (JSC::DFG::InsertionSet::append):
        (JSC::DFG::InsertionSet::execute):
        * dfg/DFGNodeType.h:
        (DFG):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
        (JSC::DFG::SpeculativeJIT::compileValueToInt32):
        (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
        (DFG):
        * dfg/DFGSpeculativeJIT.h:
        (SpeculativeJIT):
        (JSC::DFG::IntegerOperand::IntegerOperand):
        (JSC::DFG::DoubleOperand::DoubleOperand):
        (JSC::DFG::JSValueOperand::JSValueOperand):
        (JSC::DFG::StorageOperand::StorageOperand):
        (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand):
        (JSC::DFG::SpeculateStrictInt32Operand::SpeculateStrictInt32Operand):
        (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
        (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
        (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):

2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265
2012-03-25  Filip Pizlo  <fpizlo@apple.com>

        DFGOperands should be moved out of the DFG and into bytecode
        https://bugs.webkit.org/show_bug.cgi?id=82151

        Reviewed by Dan Bernstein.

        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bytecode/Operands.h: Copied from Source/JavaScriptCore/dfg/DFGOperands.h.
        * dfg/DFGBasicBlock.h:
        * dfg/DFGNode.h:
        * dfg/DFGOSREntry.h:
        * dfg/DFGOSRExit.h:
        * dfg/DFGOperands.h: Removed.
        * dfg/DFGVariableAccessData.h:

2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276
2012-03-24  Filip Pizlo  <fpizlo@apple.com>

        DFG 64-bit Branch implementation should not be creating a JSValueOperand that
        it isn't going to use
        https://bugs.webkit.org/show_bug.cgi?id=82136

        Reviewed by Geoff Garen.

        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::emitBranch):

2277 2278 2279 2280 2281 2282
2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>

        [wx] Unreviewed. Fix the build after WTF move.

        * wscript:

2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317
2012-03-23  Filip Pizlo  <fpizlo@apple.com>

        DFG double voting may be overzealous in the case of variables that end up
        being used as integers
        https://bugs.webkit.org/show_bug.cgi?id=82008

        Reviewed by Oliver Hunt.
        
        Cleaned up propagation, making the intent more explicit in most places.
        Back-propagate NodeUsedAsInt for cases where a node was used in a context
        that is known to strongly prefer integers.

        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::handleCall):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dumpCodeOrigin):
        (JSC::DFG::Graph::dump):
        * dfg/DFGGraph.h:
        (Graph):
        * dfg/DFGNodeFlags.cpp:
        (JSC::DFG::nodeFlagsAsString):
        * dfg/DFGNodeFlags.h:
        (DFG):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::run):
        (JSC::DFG::PredictionPropagationPhase::propagate):
        (PredictionPropagationPhase):
        (JSC::DFG::PredictionPropagationPhase::mergeDefaultFlags):
        (JSC::DFG::PredictionPropagationPhase::vote):
        (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
        (JSC::DFG::PredictionPropagationPhase::fixupNode):
        * dfg/DFGVariableAccessData.h:
        (JSC::DFG::VariableAccessData::shouldUseDoubleFormatAccordingToVote):

2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332
2012-03-24  Filip Pizlo  <fpizlo@apple.com>

        DFG::Node::shouldNotSpeculateInteger() should be eliminated
        https://bugs.webkit.org/show_bug.cgi?id=82123

        Reviewed by Geoff Garen.

        * dfg/DFGAbstractState.cpp:
        (JSC::DFG::AbstractState::execute):
        * dfg/DFGNode.h:
        (Node):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
        (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):

2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345
2012-03-24  Yong Li  <yoli@rim.com>

        Increase getByIdSlowCase ConstantSpace/InstructionSpace for CPU(ARM_TRADITIONAL)
        https://bugs.webkit.org/show_bug.cgi?id=81521

        Increase sequenceGetByIdSlowCaseConstantSpace and sequenceGetByIdSlowCaseInstructionSpace
        for CPU(ARM_TRADITIONAL) to fit actual need.

        Reviewed by Oliver Hunt.

        * jit/JIT.h:
        (JIT):

2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381
2012-03-23  Filip Pizlo  <fpizlo@apple.com>

        DFG Fixup should be able to short-circuit trivial ValueToInt32's
        https://bugs.webkit.org/show_bug.cgi?id=82030

        Reviewed by Michael Saboff.
        
        Takes the fixup() method of the prediction propagation phase and makes it
        into its own phase. Adds the ability to short-circuit trivial ValueToInt32
        nodes, and mark pure ValueToInt32's as such.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * Target.pri:
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::makeSafe):
        (JSC::DFG::ByteCodeParser::handleCall):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGCommon.h:
        * dfg/DFGDriver.cpp:
        (JSC::DFG::compile):
        * dfg/DFGFixupPhase.cpp: Added.
        (DFG):
        (FixupPhase):
        (JSC::DFG::FixupPhase::FixupPhase):
        (JSC::DFG::FixupPhase::run):
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::fixIntEdge):
        (JSC::DFG::performFixup):
        * dfg/DFGFixupPhase.h: Added.
        (DFG):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::run):
        (PredictionPropagationPhase):

2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395
2012-03-23  Mark Hahnenberg  <mhahnenberg@apple.com>

        tryReallocate could break the zero-ed memory invariant of CopiedBlocks
        https://bugs.webkit.org/show_bug.cgi?id=82087

        Reviewed by Filip Pizlo.

        Removing this optimization turned out to be ~1% regression on kraken, so I simply 
        undid the modification to the current block if we fail.

        * heap/CopiedSpace.cpp:
        (JSC::CopiedSpace::tryReallocate): Undid the reset in the CopiedAllocator if we fail 
        to reallocate from the current block.

2396 2397 2398 2399 2400 2401 2402 2403 2404
2012-03-23  Alexey Proskuryakov  <ap@apple.com>

        [Mac] No need for platform-specific ENABLE_BLOB values
        https://bugs.webkit.org/show_bug.cgi?id=82102

        Reviewed by David Kilzer.

        * Configurations/FeatureDefines.xcconfig:

2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425
2012-03-23  Michael Saboff  <msaboff@apple.com>

        DFG::compileValueToInt32 Sometime Generates GPR to FPR reg back to GPR
        https://bugs.webkit.org/show_bug.cgi?id=81805

        Reviewed by Filip Pizlo.

        Added SpeculativeJIT::checkGeneratedType() to determine the current format
        of an operand.  Used that information in SpeculativeJIT::compileValueToInt32
        to generate code that will use integer and JSValue types in integer
        format directly without a conversion to double.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::checkGeneratedType):
        (DFG):
        (JSC::DFG::SpeculativeJIT::compileValueToInt32):
        * dfg/DFGSpeculativeJIT.h:
        (DFG):
        (SpeculativeJIT):

2426 2427 2428 2429 2430 2431 2432 2433 2434
2012-03-23  Steve Falkenburg  <sfalken@apple.com>

        Update Apple Windows build files for WTF move
        https://bugs.webkit.org/show_bug.cgi?id=82069

        Reviewed by Jessie Berlin.

        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Removed WTF and WTFGenerated.

2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445
2012-03-23  Dean Jackson  <dino@apple.com>

        Disable CSS_SHADERS in Apple builds
        https://bugs.webkit.org/show_bug.cgi?id=81996

        Reviewed by Simon Fraser.

        Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.

        * Configurations/FeatureDefines.xcconfig:

2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489