ChangeLog 514 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
2014-01-09  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r161540.
        http://trac.webkit.org/changeset/161540
        https://bugs.webkit.org/show_bug.cgi?id=126704

        Caused assertion failures on multiple tests (Requested by ap
        on #webkit).

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::visitAggregate):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlockSet::mark):
        * dfg/DFGOperations.cpp:
        * heap/CodeBlockSet.cpp:
        (JSC::CodeBlockSet::add):
        (JSC::CodeBlockSet::traceMarked):
        * heap/CodeBlockSet.h:
        * heap/CopiedBlockInlines.h:
        (JSC::CopiedBlock::reportLiveBytes):
        * heap/CopiedSpace.cpp:
        * heap/CopiedSpace.h:
        * heap/Heap.cpp:
        (JSC::Heap::Heap):
        (JSC::Heap::didAbandon):
        (JSC::Heap::markRoots):
        (JSC::Heap::copyBackingStores):
        (JSC::Heap::collectAllGarbage):
        (JSC::Heap::collect):
        (JSC::Heap::didAllocate):
        * heap/Heap.h:
        (JSC::Heap::shouldCollect):
        (JSC::Heap::isCollecting):
        (JSC::Heap::isWriteBarrierEnabled):
        (JSC::Heap::writeBarrier):
        * heap/HeapOperation.h:
        * heap/MarkStack.cpp:
        (JSC::MarkStackArray::~MarkStackArray):
        * heap/MarkStack.h:
        * heap/MarkedAllocator.cpp:
        (JSC::MarkedAllocator::isPagedOut):
        (JSC::MarkedAllocator::tryAllocateHelper):
        (JSC::MarkedAllocator::addBlock):
        (JSC::MarkedAllocator::removeBlock):
        * heap/MarkedAllocator.h:
        (JSC::MarkedAllocator::MarkedAllocator):
        (JSC::MarkedAllocator::reset):
        * heap/MarkedBlock.cpp:
        * heap/MarkedBlock.h:
        (JSC::MarkedBlock::lastChanceToFinalize):
        (JSC::MarkedBlock::didConsumeEmptyFreeList):
        (JSC::MarkedBlock::clearMarks):
        * heap/MarkedSpace.cpp:
        (JSC::MarkedSpace::~MarkedSpace):
        (JSC::MarkedSpace::resetAllocators):
        (JSC::MarkedSpace::visitWeakSets):
        (JSC::MarkedSpace::reapWeakSets):
        * heap/MarkedSpace.h:
        (JSC::ClearMarks::operator()):
        (JSC::MarkedSpace::clearMarks):
        * heap/SlotVisitor.cpp:
        (JSC::SlotVisitor::~SlotVisitor):
        * heap/SlotVisitor.h:
        (JSC::SlotVisitor::sharedData):
        * heap/SlotVisitorInlines.h:
        (JSC::SlotVisitor::internalAppend):
        (JSC::SlotVisitor::copyLater):
        (JSC::SlotVisitor::reportExtraMemoryUsage):
        * jit/Repatch.cpp:
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::JSGenericTypedArrayView<Adaptor>::visitChildren):
        * runtime/JSPropertyNameIterator.h:
        (JSC::StructureRareData::setEnumerationCache):
        * runtime/JSString.cpp:
        (JSC::JSString::visitChildren):
        * runtime/StructureRareDataInlines.h:
        (JSC::StructureRareData::setPreviousID):
        (JSC::StructureRareData::setObjectToStringValue):
        * runtime/WeakMapData.cpp:
        (JSC::WeakMapData::visitChildren):

akling@apple.com's avatar
akling@apple.com committed
82 83 84 85 86 87 88 89 90 91 92 93
2014-01-09  Andreas Kling  <akling@apple.com>

        Shrink WatchpointSet.
        <https://webkit.org/b/126694>

        Reorder the members of WatchpointSet, shrinking it by 8 bytes.
        767 kB progression on Membuster3.

        Reviewed by Antti Koivisto.

        * bytecode/Watchpoint.h:

94 95 96 97 98 99
2014-01-08  Mark Hahnenberg  <mhahnenberg@apple.com>

        Reverting accidental GC logging

        * heap/Heap.cpp:

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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 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 208 209 210 211 212 213 214 215
2014-01-07  Mark Hahnenberg  <mhahnenberg@apple.com>

        Marking should be generational
        https://bugs.webkit.org/show_bug.cgi?id=126552

        Reviewed by Geoffrey Garen.

        Re-marking the same objects over and over is a waste of effort. This patch implements 
        the sticky mark bit algorithm (along with our already-present write barriers) to reduce 
        overhead during garbage collection caused by rescanning objects.

        There are now two collection modes, EdenCollection and FullCollection. EdenCollections
        only visit new objects or objects that were added to the remembered set by a write barrier.
        FullCollections are normal collections that visit all objects regardless of their 
        generation.

        In this patch EdenCollections do not do anything in CopiedSpace. This will be fixed in 
        https://bugs.webkit.org/show_bug.cgi?id=126555.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::visitAggregate):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlockSet::mark):
        * dfg/DFGOperations.cpp:
        * heap/CodeBlockSet.cpp:
        (JSC::CodeBlockSet::add):
        (JSC::CodeBlockSet::traceMarked):
        (JSC::CodeBlockSet::rememberCurrentlyExecutingCodeBlocks):
        * heap/CodeBlockSet.h:
        * heap/CopiedBlockInlines.h:
        (JSC::CopiedBlock::reportLiveBytes):
        * heap/CopiedSpace.cpp:
        (JSC::CopiedSpace::didStartFullCollection):
        * heap/CopiedSpace.h:
        (JSC::CopiedSpace::heap):
        * heap/Heap.cpp:
        (JSC::Heap::Heap):
        (JSC::Heap::didAbandon):
        (JSC::Heap::markRoots):
        (JSC::Heap::copyBackingStores):
        (JSC::Heap::addToRememberedSet):
        (JSC::Heap::collectAllGarbage):
        (JSC::Heap::collect):
        (JSC::Heap::didAllocate):
        (JSC::Heap::writeBarrier):
        * heap/Heap.h:
        (JSC::Heap::isInRememberedSet):
        (JSC::Heap::operationInProgress):
        (JSC::Heap::shouldCollect):
        (JSC::Heap::isCollecting):
        (JSC::Heap::isWriteBarrierEnabled):
        (JSC::Heap::writeBarrier):
        * heap/HeapOperation.h:
        * heap/MarkStack.cpp:
        (JSC::MarkStackArray::~MarkStackArray):
        (JSC::MarkStackArray::clear):
        (JSC::MarkStackArray::fillVector):
        * heap/MarkStack.h:
        * heap/MarkedAllocator.cpp:
        (JSC::isListPagedOut):
        (JSC::MarkedAllocator::isPagedOut):
        (JSC::MarkedAllocator::tryAllocateHelper):
        (JSC::MarkedAllocator::addBlock):
        (JSC::MarkedAllocator::removeBlock):
        (JSC::MarkedAllocator::reset):
        * heap/MarkedAllocator.h:
        (JSC::MarkedAllocator::MarkedAllocator):
        * heap/MarkedBlock.cpp:
        (JSC::MarkedBlock::clearMarks):
        (JSC::MarkedBlock::clearRememberedSet):
        (JSC::MarkedBlock::clearMarksWithCollectionType):
        (JSC::MarkedBlock::lastChanceToFinalize):
        * heap/MarkedBlock.h: Changed atomSize to 16 bytes because we have no objects smaller
        than 16 bytes. This is also to pay for the additional Bitmap for the remembered set.
        (JSC::MarkedBlock::didConsumeEmptyFreeList):
        (JSC::MarkedBlock::setRemembered):
        (JSC::MarkedBlock::clearRemembered):
        (JSC::MarkedBlock::atomicClearRemembered):
        (JSC::MarkedBlock::isRemembered):
        * heap/MarkedSpace.cpp:
        (JSC::MarkedSpace::~MarkedSpace):
        (JSC::MarkedSpace::resetAllocators):
        (JSC::MarkedSpace::visitWeakSets):
        (JSC::MarkedSpace::reapWeakSets):
        (JSC::VerifyMarked::operator()):
        (JSC::MarkedSpace::clearMarks):
        * heap/MarkedSpace.h:
        (JSC::ClearMarks::operator()):
        (JSC::ClearRememberedSet::operator()):
        (JSC::MarkedSpace::didAllocateInBlock):
        (JSC::MarkedSpace::clearRememberedSet):
        * heap/SlotVisitor.cpp:
        (JSC::SlotVisitor::~SlotVisitor):
        (JSC::SlotVisitor::clearMarkStack):
        * heap/SlotVisitor.h:
        (JSC::SlotVisitor::markStack):
        (JSC::SlotVisitor::sharedData):
        * heap/SlotVisitorInlines.h:
        (JSC::SlotVisitor::internalAppend):
        (JSC::SlotVisitor::unconditionallyAppend):
        (JSC::SlotVisitor::copyLater):
        (JSC::SlotVisitor::reportExtraMemoryUsage):
        (JSC::SlotVisitor::heap):
        * jit/Repatch.cpp:
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::JSGenericTypedArrayView<Adaptor>::visitChildren):
        * runtime/JSPropertyNameIterator.h:
        (JSC::StructureRareData::setEnumerationCache):
        * runtime/JSString.cpp:
        (JSC::JSString::visitChildren):
        * runtime/StructureRareDataInlines.h:
        (JSC::StructureRareData::setPreviousID):
        (JSC::StructureRareData::setObjectToStringValue):
        * runtime/WeakMapData.cpp:
        (JSC::WeakMapData::visitChildren):

216 217 218 219 220 221 222 223 224 225 226 227
2014-01-08  Sam Weinig  <sam@webkit.org>

        [JS] Should be able to create a promise by calling the Promise constructor as a function
        https://bugs.webkit.org/show_bug.cgi?id=126561

        Reviewed by Geoffrey Garen.

        * runtime/JSPromiseConstructor.cpp:
        (JSC::JSPromiseConstructor::getCallData):
        Add support for calling the Promise constructor as a function (e.g. var p = Promise(...), note
        the missing "new").

228 229 230 231 232 233 234 235 236 237 238 239
2014-01-08  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>

        [EFL] Make FTL buildable
        https://bugs.webkit.org/show_bug.cgi?id=125777

        Reviewed by Csaba Osztrogonác.

        * CMakeLists.txt:
        * ftl/FTLOSREntry.cpp:
        * ftl/FTLOSRExitCompiler.cpp:
        * llvm/library/config_llvm.h:

240 241 242 243 244 245 246 247 248 249 250 251
2014-01-08  Zan Dobersek  <zdobersek@igalia.com>

        [Automake] Scripts for generated build targets do not necessarily produce their output
        https://bugs.webkit.org/show_bug.cgi?id=126378

        Reviewed by Carlos Garcia Campos.

        * GNUmakefile.am: Touch the build targets that are generated through helper scripts that don't
        assure the output is generated every time the script is invoked, most commonly due to unchanged
        input. This assures the build targets are up-to-date and can't be older that their dependencies,
        which would result in constant regeneration at every build.

252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
2014-01-07  Filip Pizlo  <fpizlo@apple.com>

        DFG fixup phase should be responsible for inserting ValueToInt32's as needed and it should use Phantom to keep the original values alive in case of OSR exit
        https://bugs.webkit.org/show_bug.cgi?id=126600

        Reviewed by Michael Saboff.
        
        This fixes an embarrassing OSR exit liveness bug. It also simplifies the code. We were
        already using FixupPhase as the place where conversion nodes get inserted. ValueToInt32
        was the only exception to that rule, and that was one of the reasons why we had this bug.
        
        Henceforth ValueToInt32 is only inserted by FixupPhase, and only when it is necessary:
        we have a BitOp that will want a ToInt32 conversion and the operand is not predicted to
        already be an int32. If FixupPhase inserts any ValueToInt32's then the BitOp will no
        longer appear to use the original operand, which will make OSR exit think that the
        original operand is dead. We work around this they way we always do: insert a Phantom on
        the original operands right after the BitOp. This ensures that any OSR exit in any of the
        ValueToInt32's or in the BitOp itself will have values for the original inputs.

        * dfg/DFGBackwardsPropagationPhase.cpp:
        (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo):
        (JSC::DFG::BackwardsPropagationPhase::propagate):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::handleIntrinsic):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::fixIntEdge):
        (JSC::DFG::FixupPhase::fixBinaryIntEdges):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * tests/stress/bit-op-value-to-int32-input-liveness.js: Added.
        (foo):

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
2014-01-07  Mark Hahnenberg  <mhahnenberg@apple.com>

        Repatch write barrier slow path call doesn't align the stack in the presence of saved registers
        https://bugs.webkit.org/show_bug.cgi?id=126093

        Reviewed by Geoffrey Garen.

        * jit/Repatch.cpp: Reworked the stack alignment code for calling out to C code on the write barrier slow path.
        We need to properly account for the number of reused registers that were saved to the stack, so we have to 
        pass the ScratchRegisterAllocator around.
        (JSC::storeToWriteBarrierBuffer):
        (JSC::writeBarrier):
        (JSC::emitPutReplaceStub):
        (JSC::emitPutTransitionStub):
        * jit/ScratchRegisterAllocator.h: Previously the ScratchRegisterAllocator only knew whether or not it had
        reused registers, but not how many. In order to correctly align the stack for calls to C slow paths for 
        the write barriers in inline caches we need to know how the stack is aligned. So now ScratchRegisterAllocator
        tracks how many registers it has reused.
        (JSC::ScratchRegisterAllocator::ScratchRegisterAllocator):
        (JSC::ScratchRegisterAllocator::allocateScratch):
        (JSC::ScratchRegisterAllocator::didReuseRegisters):
        (JSC::ScratchRegisterAllocator::numberOfReusedRegisters):
        (JSC::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
        (JSC::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
        * llint/LowLevelInterpreter64.asm: Random typo fix.

312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
2014-01-07  Mark Lam  <mark.lam@apple.com>

        r161364 caused JSC tests regression on non-DFG builds (e.g. C Loop and Windows).
        https://bugs.webkit.org/show_bug.cgi?id=126589.

        Reviewed by Filip Pizlo.

        After the removal of ENABLE(VALUE_PROFILER), the LLINT is now expecting the
        relevant opcode operands to point to ValueProfiler data structures and will
        write profiling data into them. Hence, we need to allocate these data
        structures even though the profiling data won't be used in non-DFG builds.

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

327 328 329 330 331 332 333 334 335 336 337 338
2014-01-07  Filip Pizlo  <fpizlo@apple.com>

        ASSERT in compileArithNegate on pdfjs
        https://bugs.webkit.org/show_bug.cgi?id=126584

        Reviewed by Mark Hahnenberg.
        
        Check negative zero when we should check it, not when we shouldn't check it. :-/

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

339 340 341 342 343 344 345 346 347 348 349 350
2014-01-07  Gabor Rapcsanyi  <rgabor@webkit.org>

        pushFinallyContext saves wrong m_labelScopes size
        https://bugs.webkit.org/show_bug.cgi?id=124529

        Remove free label scopes before saving finally context.

        Reviewed by Geoffrey Garen.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::pushFinallyContext):

351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
2014-01-06  Mark Hahnenberg  <mhahnenberg@apple.com>

        Heap::collect shouldn't be responsible for sweeping
        https://bugs.webkit.org/show_bug.cgi?id=126556

        Reviewed by Geoffrey Garen.

        Sweeping happens at an awkward time during collection due to the fact that destructors can 
        cause arbitrary reentry into the VM. This patch separates collecting and sweeping, and delays 
        sweeping until after collection has completely finished.

        * heap/Heap.cpp:
        (JSC::Heap::collectAllGarbage):
        (JSC::Heap::collect):
        (JSC::Heap::collectIfNecessaryOrDefer):
        * heap/Heap.h:
        * heap/MarkedSpace.cpp:
        (JSC::MarkedSpace::sweep):
        * runtime/GCActivityCallback.cpp:
        (JSC::DefaultGCActivityCallback::doWork):

372 373 374 375 376 377 378 379 380 381
2014-01-07  Mark Rowe  <mrowe@apple.com>

        <https://webkit.org/b/126567> Remove the legacy WebKit availability macros

        They're no longer used.

        Reviewed by Ryosuke Niwa.

        * API/WebKitAvailability.h:

382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399
2014-01-07  Filip Pizlo  <fpizlo@apple.com>

        SetLocal for a FlushedArguments should not claim that the dataFormat is DataFormatJS
        https://bugs.webkit.org/show_bug.cgi?id=126563

        Reviewed by Gavin Barraclough.
        
        This was a rookie arguments simplification mistake: the SetLocal needs to record the fact
        that although it set JSValue(), OSR should think it set Arguments. DataFormatArguments
        conveys this, and dataFormatFor(FlushFormat) will do the right thing.

        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * tests/stress/phantom-arguments-set-local-then-exit-in-same-block.js: Added.
        (foo):

400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463
2014-01-06  Filip Pizlo  <fpizlo@apple.com>

        Make the different flavors of integer arithmetic more explicit, and don't rely on (possibly stale) results of the backwards propagator to decide integer arithmetic semantics
        https://bugs.webkit.org/show_bug.cgi?id=125519

        Reviewed by Geoffrey Garen.
        
        Adds the Arith::Mode enum to arithmetic nodes, which makes it explicit what sorts of
        checks and overflows the node should do. Previously this would be deduced from
        backwards analysis results.
        
        This also makes "unchecked" variants really mean that you want the int32 wrapped
        result, so ArithIMul is now done in terms of ArithMul(Unchecked). That means that the
        constant folder needs to compute exactly the result implied by ArithMode, instead of
        just folding the double result.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
        * dfg/DFGArithMode.cpp: Added.
        (WTF::printInternal):
        * dfg/DFGArithMode.h: Added.
        (JSC::DFG::doesOverflow):
        (JSC::DFG::shouldCheckOverflow):
        (JSC::DFG::shouldCheckNegativeZero):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::pureCSE):
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGConstantFoldingPhase.cpp:
        (JSC::DFG::ConstantFoldingPhase::foldConstants):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
        * dfg/DFGGraph.cpp:
        (JSC::DFG::Graph::dump):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::Node):
        (JSC::DFG::Node::hasArithMode):
        (JSC::DFG::Node::arithMode):
        (JSC::DFG::Node::setArithMode):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
        (JSC::DFG::SpeculativeJIT::compileDoubleAsInt32):
        (JSC::DFG::SpeculativeJIT::compileAdd):
        (JSC::DFG::SpeculativeJIT::compileArithSub):
        (JSC::DFG::SpeculativeJIT::compileArithNegate):
        (JSC::DFG::SpeculativeJIT::compileArithMul):
        (JSC::DFG::SpeculativeJIT::compileArithDiv):
        (JSC::DFG::SpeculativeJIT::compileArithMod):
        * dfg/DFGSpeculativeJIT.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileAddSub):
        (JSC::FTL::LowerDFGToLLVM::compileArithMul):
        (JSC::FTL::LowerDFGToLLVM::compileArithDivMod):
        (JSC::FTL::LowerDFGToLLVM::compileArithNegate):
        (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):

464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
2014-01-06  Mark Hahnenberg  <mhahnenberg@apple.com>

        Add write barriers to the LLInt
        https://bugs.webkit.org/show_bug.cgi?id=126527

        Reviewed by Filip Pizlo.

        This patch takes a similar approach to how write barriers work in the baseline JIT.
        We execute the write barrier at the beginning of the opcode so we don't have to 
        worry about saving and restoring live registers across write barrier slow path calls 
        to C code.

        * llint/LLIntOfflineAsmConfig.h:
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::llint_write_barrier_slow):
        * llint/LLIntSlowPaths.h:
        * llint/LowLevelInterpreter.asm:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * offlineasm/arm64.rb:
        * offlineasm/instructions.rb:
        * offlineasm/x86.rb:

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
2014-01-05  Sam Weinig  <sam@webkit.org>

        [JS] Implement Promise.all()
        https://bugs.webkit.org/show_bug.cgi?id=126510

        Reviewed by Gavin Barraclough.

        Add Promise.all() implementation and factor out performing resolves and rejects
        on deferreds to share a bit of code. Also moves the abruptRejection helper to
        JSPromiseDeferred so it can be used in JSPromiseFunctions.

        * runtime/CommonIdentifiers.h:
        * runtime/JSPromiseConstructor.cpp:
        (JSC::JSPromiseConstructorFuncCast):
        (JSC::JSPromiseConstructorFuncResolve):
        (JSC::JSPromiseConstructorFuncReject):
        (JSC::JSPromiseConstructorFuncAll):
        * runtime/JSPromiseDeferred.cpp:
        (JSC::updateDeferredFromPotentialThenable):
        (JSC::performDeferredResolve):
        (JSC::performDeferredReject):
        (JSC::abruptRejection):
        * runtime/JSPromiseDeferred.h:
        * runtime/JSPromiseFunctions.cpp:
        (JSC::promiseAllCountdownFunction):
        (JSC::createPromiseAllCountdownFunction):
        * runtime/JSPromiseFunctions.h:
        * runtime/JSPromiseReaction.cpp:
        (JSC::ExecutePromiseReactionMicrotask::run):

517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
2014-01-06  Filip Pizlo  <fpizlo@apple.com>

        Get rid of ENABLE(VALUE_PROFILER). It's on all the time now.

        Rubber stamped by Mark Hahnenberg.

        * bytecode/CallLinkStatus.cpp:
        (JSC::CallLinkStatus::computeFor):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dumpValueProfiling):
        (JSC::CodeBlock::dumpArrayProfiling):
        (JSC::CodeBlock::dumpRareCaseProfile):
        (JSC::CodeBlock::dumpBytecode):
        (JSC::CodeBlock::CodeBlock):
        (JSC::CodeBlock::setNumParameters):
        (JSC::CodeBlock::shrinkToFit):
        (JSC::CodeBlock::shouldOptimizeNow):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::valueProfileForBytecodeOffset):
        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeForChain):
        (JSC::GetByIdStatus::computeFor):
        * bytecode/LazyOperandValueProfile.cpp:
        * bytecode/LazyOperandValueProfile.h:
        * bytecode/PutByIdStatus.cpp:
        (JSC::PutByIdStatus::computeFor):
        * bytecode/ValueProfile.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::newArrayProfile):
        (JSC::BytecodeGenerator::newArrayAllocationProfile):
        (JSC::BytecodeGenerator::emitProfiledOpcode):
        * jit/GPRInfo.h:
        * jit/JIT.cpp:
        (JSC::JIT::JIT):
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompile):
        * jit/JIT.h:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::compileBinaryArithOp):
        (JSC::JIT::emit_op_mul):
        (JSC::JIT::emit_op_div):
        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emitBinaryDoubleOp):
        (JSC::JIT::emit_op_mul):
        (JSC::JIT::emitSlow_op_mul):
        (JSC::JIT::emit_op_div):
        * jit/JITCall.cpp:
        (JSC::JIT::emitPutCallResult):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::emitPutCallResult):
        * jit/JITInlines.h:
        (JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):
        (JSC::JIT::emitValueProfilingSite):
        (JSC::JIT::emitArrayProfilingSiteForBytecodeIndex):
        (JSC::JIT::emitArrayProfileStoreToHoleSpecialCase):
        (JSC::JIT::emitArrayProfileOutOfBoundsSpecialCase):
        (JSC::arrayProfileSaw):
        (JSC::JIT::chooseArrayMode):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_get_argument_by_val):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_get_argument_by_val):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emitSlow_op_get_by_val):
        (JSC::JIT::emit_op_get_by_id):
        (JSC::JIT::emit_op_get_from_scope):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emit_op_get_by_val):
        (JSC::JIT::emitSlow_op_get_by_val):
        (JSC::JIT::emit_op_get_by_id):
        (JSC::JIT::emit_op_get_from_scope):
        * llint/LLIntOfflineAsmConfig.h:
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * llint/LowLevelInterpreter.asm:
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * profiler/ProfilerBytecodeSequence.cpp:
        (JSC::Profiler::BytecodeSequence::BytecodeSequence):
        * runtime/CommonSlowPaths.cpp:

599 600 601 602 603 604 605 606 607 608 609 610 611
2014-01-06  Filip Pizlo  <fpizlo@apple.com>

        LLInt shouldn't check for ENABLE(JIT).

        Rubber stamped by Mark Hahnenberg.

        * llint/LLIntCommon.h:
        * llint/LLIntOfflineAsmConfig.h:
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::entryOSR):
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * llint/LowLevelInterpreter.asm:

612 613 614 615 616 617 618 619 620 621 622
2014-01-06  Filip Pizlo  <fpizlo@apple.com>

        LLInt shouldnt check for ENABLE(JAVASCRIPT_DEBUGGER).

        Rubber stamped by Mark Hahnenberg.

        * debugger/Debugger.h:
        (JSC::Debugger::Debugger):
        * llint/LLIntOfflineAsmConfig.h:
        * llint/LowLevelInterpreter.asm:

623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639
2014-01-05  Sam Weinig  <sam@webkit.org>

        [JS] Implement Promise.race()
        https://bugs.webkit.org/show_bug.cgi?id=126506

        Reviewed by Oliver Hunt.

        * runtime/CommonIdentifiers.h:
        Add identifier for "cast".
    
        * runtime/JSPromiseConstructor.cpp:
        (JSC::abruptRejection):
        Helper for the RejectIfAbrupt abstract operation.
  
        (JSC::JSPromiseConstructorFuncRace):
        Add implementation of Promise.race()

640 641 642 643 644 645 646 647 648
2014-01-05  Martin Robinson  <mrobinson@igalia.com>

        [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
        https://bugs.webkit.org/show_bug.cgi?id=116379

        Reviewed by Gustavo Noronha Silva.

        * PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file.

649 650 651 652 653 654 655 656 657
2014-01-04  Yusuke Suzuki  <utatane.tea@gmail.com>

        Use Compiler macros instead of raw "final" and "override"
        https://bugs.webkit.org/show_bug.cgi?id=126490

        Reviewed by Sam Weinig.

        * runtime/JSPromiseReaction.cpp:

658 659 660 661 662 663 664 665 666
2014-01-04  Martin Robinson  <mrobinson@igalia.com>

        [GTK] [CMake] Improve the way we locate gobject-introspection
        https://bugs.webkit.org/show_bug.cgi?id=126452

        Reviewed by Philippe Normand.

        * PlatformGTK.cmake: Use the new introspection variables.

667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690
2014-01-04  Zan Dobersek  <zdobersek@igalia.com>

        Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
        https://bugs.webkit.org/show_bug.cgi?id=126439

        Reviewed by Andreas Kling.

        Instead of relying on std::pair and std::make_pair symbols being present in the current scope
        through the pair and make_pair symbols, the std:: specifier should be used explicitly.

        * bytecode/Opcode.cpp:
        (JSC::compareOpcodePairIndices):
        (JSC::OpcodeStats::~OpcodeStats):
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::BytecodeGenerator):
        * parser/ASTBuilder.h:
        (JSC::ASTBuilder::makeBinaryNode):
        * parser/Parser.cpp:
        (JSC::Parser<LexerType>::parseIfStatement):
        * runtime/Structure.cpp:
        (JSC::StructureTransitionTable::contains):
        (JSC::StructureTransitionTable::get):
        (JSC::StructureTransitionTable::add):

691 692 693 694 695 696 697 698 699 700 701 702 703
2014-01-03  David Farler  <dfarler@apple.com>

        [super dealloc] missing in Source/JavaScriptCore/API/tests/testapi.mm, fails to build with -Werror,-Wobjc-missing-super-calls
        https://bugs.webkit.org/show_bug.cgi?id=126454

        Reviewed by Geoffrey Garen.

        * API/tests/testapi.mm:
        (-[TextXYZ dealloc]):
        add [super dealloc]
        (-[EvilAllocationObject dealloc]):
        add [super dealloc]

704 705 706 707 708 709 710 711 712 713 714 715
2014-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r160304): [GTK] Disable libtool fast install
        https://bugs.webkit.org/show_bug.cgi?id=126381

        Reviewed by Martin Robinson.

        Remove -no-fast-install ld flag since fast install is now disabled
        globally.

        * GNUmakefile.am:

716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 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 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824
2014-01-02  Sam Weinig  <sam@webkit.org>

        Update Promises to the https://github.com/domenic/promises-unwrapping spec
        https://bugs.webkit.org/show_bug.cgi?id=120954

        Reviewed by Filip Pizlo.

        Update Promises to the revised spec. Notable changes:
        - JSPromiseResolver is gone.
        - TaskContext has been renamed Microtask and now has a virtual run() function.
        - Instead of using custom InternalFunction subclasses, JSFunctions are used
          with PrivateName properties for internal slots.

        * CMakeLists.txt:
        * DerivedSources.make:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * interpreter/CallFrame.h:
        (JSC::ExecState::promiseConstructorTable):
        * runtime/CommonIdentifiers.cpp:
        (JSC::CommonIdentifiers::CommonIdentifiers):
        * runtime/CommonIdentifiers.h:
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::reset):
        (JSC::JSGlobalObject::visitChildren):
        (JSC::JSGlobalObject::queueMicrotask):
        * runtime/JSGlobalObject.h:
        (JSC::JSGlobalObject::promiseConstructor):
        (JSC::JSGlobalObject::promisePrototype):
        (JSC::JSGlobalObject::promiseStructure):
        * runtime/JSPromise.cpp:
        (JSC::JSPromise::create):
        (JSC::JSPromise::JSPromise):
        (JSC::JSPromise::finishCreation):
        (JSC::JSPromise::visitChildren):
        (JSC::JSPromise::reject):
        (JSC::JSPromise::resolve):
        (JSC::JSPromise::appendResolveReaction):
        (JSC::JSPromise::appendRejectReaction):
        (JSC::triggerPromiseReactions):
        * runtime/JSPromise.h:
        (JSC::JSPromise::status):
        (JSC::JSPromise::result):
        (JSC::JSPromise::constructor):
        * runtime/JSPromiseCallback.cpp: Removed.
        * runtime/JSPromiseCallback.h: Removed.
        * runtime/JSPromiseConstructor.cpp:
        (JSC::constructPromise):
        (JSC::JSPromiseConstructor::getCallData):
        (JSC::JSPromiseConstructorFuncCast):
        (JSC::JSPromiseConstructorFuncResolve):
        (JSC::JSPromiseConstructorFuncReject):
        * runtime/JSPromiseConstructor.h:
        * runtime/JSPromiseDeferred.cpp: Added.
        (JSC::JSPromiseDeferred::create):
        (JSC::JSPromiseDeferred::JSPromiseDeferred):
        (JSC::JSPromiseDeferred::finishCreation):
        (JSC::JSPromiseDeferred::visitChildren):
        (JSC::createJSPromiseDeferredFromConstructor):
        (JSC::updateDeferredFromPotentialThenable):
        * runtime/JSPromiseDeferred.h: Added.
        (JSC::JSPromiseDeferred::createStructure):
        (JSC::JSPromiseDeferred::promise):
        (JSC::JSPromiseDeferred::resolve):
        (JSC::JSPromiseDeferred::reject):
        * runtime/JSPromiseFunctions.cpp: Added.
        (JSC::deferredConstructionFunction):
        (JSC::createDeferredConstructionFunction):
        (JSC::identifyFunction):
        (JSC::createIdentifyFunction):
        (JSC::promiseAllCountdownFunction):
        (JSC::createPromiseAllCountdownFunction):
        (JSC::promiseResolutionHandlerFunction):
        (JSC::createPromiseResolutionHandlerFunction):
        (JSC::rejectPromiseFunction):
        (JSC::createRejectPromiseFunction):
        (JSC::resolvePromiseFunction):
        (JSC::createResolvePromiseFunction):
        (JSC::throwerFunction):
        (JSC::createThrowerFunction):
        * runtime/JSPromiseFunctions.h: Added.
        * runtime/JSPromisePrototype.cpp:
        (JSC::JSPromisePrototypeFuncThen):
        (JSC::JSPromisePrototypeFuncCatch):
        * runtime/JSPromiseReaction.cpp: Added.
        (JSC::createExecutePromiseReactionMicroTask):
        (JSC::ExecutePromiseReactionMicroTask::run):
        (JSC::JSPromiseReaction::create):
        (JSC::JSPromiseReaction::JSPromiseReaction):
        (JSC::JSPromiseReaction::finishCreation):
        (JSC::JSPromiseReaction::visitChildren):
        * runtime/JSPromiseReaction.h: Added.
        (JSC::JSPromiseReaction::createStructure):
        (JSC::JSPromiseReaction::deferred):
        (JSC::JSPromiseReaction::handler):
        * runtime/JSPromiseResolver.cpp: Removed.
        * runtime/JSPromiseResolver.h: Removed.
        * runtime/JSPromiseResolverConstructor.cpp: Removed.
        * runtime/JSPromiseResolverConstructor.h: Removed.
        * runtime/JSPromiseResolverPrototype.cpp: Removed.
        * runtime/JSPromiseResolverPrototype.h: Removed.
        * runtime/Microtask.h: Added.
        * runtime/VM.cpp:
        (JSC::VM::VM):
        (JSC::VM::~VM):
        * runtime/VM.h:

825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847
2014-01-02  Mark Hahnenberg  <mhahnenberg@apple.com>

        Add support for StoreBarrier and friends to the FTL
        https://bugs.webkit.org/show_bug.cgi?id=126040

        Reviewed by Filip Pizlo.

        * ftl/FTLAbstractHeapRepository.h:
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLIntrinsicRepository.h:
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileStoreBarrier):
        (JSC::FTL::LowerDFGToLLVM::compileConditionalStoreBarrier):
        (JSC::FTL::LowerDFGToLLVM::compileStoreBarrierWithNullCheck):
        (JSC::FTL::LowerDFGToLLVM::loadMarkByte):
        (JSC::FTL::LowerDFGToLLVM::emitStoreBarrier):
        * heap/Heap.cpp:
        (JSC::Heap::Heap):
        * heap/Heap.h:
        (JSC::Heap::writeBarrierBuffer):

848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906
2014-01-02  Mark Hahnenberg  <mhahnenberg@apple.com>

        Storing new CopiedSpace memory into a JSObject should fire a write barrier
        https://bugs.webkit.org/show_bug.cgi?id=126025

        Reviewed by Filip Pizlo.

        Technically this is creating a pointer between a (potentially) old generation object and a young 
        generation chunk of memory, thus there needs to be a barrier.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGOperations.cpp:
        * heap/CopyWriteBarrier.h: Added. This class functions similarly to the WriteBarrier class. It 
        acts as a proxy for pointers to CopiedSpace. Assignments to the field cause a write barrier to 
        fire for the object that is the owner of the CopiedSpace memory. This is to ensure during nursery 
        collections that objects with new backing stores are visited, even if they are old generation objects. 
        (JSC::CopyWriteBarrier::CopyWriteBarrier):
        (JSC::CopyWriteBarrier::operator!):
        (JSC::CopyWriteBarrier::operator UnspecifiedBoolType*):
        (JSC::CopyWriteBarrier::get):
        (JSC::CopyWriteBarrier::operator*):
        (JSC::CopyWriteBarrier::operator->):
        (JSC::CopyWriteBarrier::set):
        (JSC::CopyWriteBarrier::setWithoutWriteBarrier):
        (JSC::CopyWriteBarrier::clear):
        * heap/Heap.h:
        * runtime/JSArray.cpp:
        (JSC::JSArray::unshiftCountSlowCase):
        (JSC::JSArray::shiftCountWithArrayStorage):
        (JSC::JSArray::unshiftCountWithArrayStorage):
        * runtime/JSCell.h:
        (JSC::JSCell::unvalidatedStructure):
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory):
        * runtime/JSObject.cpp:
        (JSC::JSObject::copyButterfly):
        (JSC::JSObject::getOwnPropertySlotByIndex):
        (JSC::JSObject::putByIndex):
        (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
        (JSC::JSObject::createInitialIndexedStorage):
        (JSC::JSObject::createArrayStorage):
        (JSC::JSObject::deletePropertyByIndex):
        (JSC::JSObject::getOwnPropertyNames):
        (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
        (JSC::JSObject::countElements):
        (JSC::JSObject::increaseVectorLength):
        (JSC::JSObject::ensureLengthSlow):
        * runtime/JSObject.h:
        (JSC::JSObject::butterfly):
        (JSC::JSObject::setStructureAndButterfly):
        (JSC::JSObject::setButterflyWithoutChangingStructure):
        (JSC::JSObject::JSObject):
        (JSC::JSObject::putDirectInternal):
        (JSC::JSObject::putDirectWithoutTransition):
        * runtime/MapData.cpp:
        (JSC::MapData::ensureSpaceForAppend):
        * runtime/Structure.cpp:
        (JSC::Structure::materializePropertyMap):

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 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956
2013-12-23  Oliver Hunt  <oliver@apple.com>

        Refactor PutPropertySlot to be aware of custom properties
        https://bugs.webkit.org/show_bug.cgi?id=126187

        Reviewed by Antti Koivisto.

        Refactor PutPropertySlot, making the constructor take the thisValue
        used as a target.  This results in a wide range of boilerplate changes
        to pass the new parameter.

        * API/JSObjectRef.cpp:
        (JSObjectSetProperty):
        * dfg/DFGOperations.cpp:
        (JSC::DFG::operationPutByValInternal):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        * jit/JITOperations.cpp:
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/Arguments.cpp:
        (JSC::Arguments::putByIndex):
        * runtime/ArrayPrototype.cpp:
        (JSC::putProperty):
        (JSC::arrayProtoFuncPush):
        * runtime/JSCJSValue.cpp:
        (JSC::JSValue::putToPrimitiveByIndex):
        * runtime/JSCell.cpp:
        (JSC::JSCell::putByIndex):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::put):
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):
        * runtime/JSONObject.cpp:
        (JSC::Walker::walk):
        * runtime/JSObject.cpp:
        (JSC::JSObject::putByIndex):
        (JSC::JSObject::putDirectNonIndexAccessor):
        (JSC::JSObject::deleteProperty):
        * runtime/JSObject.h:
        (JSC::JSObject::putDirect):
        * runtime/Lookup.h:
        (JSC::putEntry):
        (JSC::lookupPut):
        * runtime/PutPropertySlot.h:
        (JSC::PutPropertySlot::PutPropertySlot):
        (JSC::PutPropertySlot::setCustomProperty):
        (JSC::PutPropertySlot::thisValue):
        (JSC::PutPropertySlot::isCacheable):

fpizlo@apple.com's avatar
fpizlo@apple.com committed
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990
2014-01-01  Filip Pizlo  <fpizlo@apple.com>

        Rationalize DFG DCE
        https://bugs.webkit.org/show_bug.cgi?id=125523

        Reviewed by Mark Hahnenberg.
        
        Adds the ability to DCE more things. It's now the case that if a node is completely
        pure, we clear NodeMustGenerate and the node becomes a DCE candidate.

        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::performNodeCSE):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberize):
        * dfg/DFGDCEPhase.cpp:
        (JSC::DFG::DCEPhase::cleanVariables):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGGraph.h:
        (JSC::DFG::Graph::clobbersWorld):
        * dfg/DFGNodeType.h:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileAdd):
        * dfg/DFGSpeculativeJIT.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileValueAdd):

991 992 993 994 995 996 997 998 999
2014-01-02  Benjamin Poulain  <benjamin@webkit.org>

        Attempt to fix the build of WebCore's code generator on CMake based system
        https://bugs.webkit.org/show_bug.cgi?id=126271

        Reviewed by Sam Weinig.

        * CMakeLists.txt:

1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021
2013-12-30  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r161157, r161158, r161160, r161161,
        r161163, and r161165.
        http://trac.webkit.org/changeset/161157
        http://trac.webkit.org/changeset/161158
        http://trac.webkit.org/changeset/161160
        http://trac.webkit.org/changeset/161161
        http://trac.webkit.org/changeset/161163
        http://trac.webkit.org/changeset/161165
        https://bugs.webkit.org/show_bug.cgi?id=126332

        Broke WebKit2 on Mountain Lion (Requested by ap on #webkit).

        * heap/BlockAllocator.cpp:
        (JSC::BlockAllocator::~BlockAllocator):
        (JSC::BlockAllocator::waitForRelativeTimeWhileHoldingLock):
        (JSC::BlockAllocator::waitForRelativeTime):
        (JSC::BlockAllocator::blockFreeingThreadMain):
        * heap/BlockAllocator.h:
        (JSC::BlockAllocator::deallocate):

andersca@apple.com's avatar
andersca@apple.com committed
1022 1023 1024 1025 1026 1027
2013-12-30  Anders Carlsson  <andersca@apple.com>

        Fix build.

        * heap/BlockAllocator.h:

1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041
2013-12-30  Anders Carlsson  <andersca@apple.com>

        Stop using ThreadCondition in BlockAllocator
        https://bugs.webkit.org/show_bug.cgi?id=126313

        Reviewed by Sam Weinig.

        * heap/BlockAllocator.cpp:
        (JSC::BlockAllocator::~BlockAllocator):
        (JSC::BlockAllocator::waitForDuration):
        (JSC::BlockAllocator::blockFreeingThreadMain):
        * heap/BlockAllocator.h:
        (JSC::BlockAllocator::deallocate):

1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
2013-12-30  Anders Carlsson  <andersca@apple.com>

        Stop using ThreadCondition in jsc.cpp
        https://bugs.webkit.org/show_bug.cgi?id=126311

        Reviewed by Sam Weinig.

        * jsc.cpp:
        (timeoutThreadMain):
        (main):

1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064
2013-12-30  Anders Carlsson  <andersca@apple.com>

        Replace WTF::ThreadingOnce with std::call_once
        https://bugs.webkit.org/show_bug.cgi?id=126215

        Reviewed by Sam Weinig.

        * dfg/DFGWorklist.cpp:
        (JSC::DFG::globalWorklist):
        * runtime/InitializeThreading.cpp:
        (JSC::initializeThreading):

1065 1066 1067 1068 1069 1070 1071 1072 1073
2013-12-30  Martin Robinson  <mrobinson@igalia.com>

        [CMake] [GTK] Add support for GObject introspection
        https://bugs.webkit.org/show_bug.cgi?id=126162

        Reviewed by Daniel Bates.

        * PlatformGTK.cmake: Add the GIR targets.

1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 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
2013-12-28  Filip Pizlo  <fpizlo@apple.com>

        Get rid of DFG forward exiting
        https://bugs.webkit.org/show_bug.cgi?id=125531

        Reviewed by Oliver Hunt.
        
        This finally gets rid of forward exiting. Forward exiting was always a fragile concept
        since it involved the compiler trying to figure out how to "roll forward" the
        execution from some DFG node to the next bytecode index. It was always easy to find
        counterexamples where it broke, and it has always served as an obstacle to adding
        compiler improvements - the latest being http://webkit.org/b/125523, which tried to
        make DCE work for more things.
        
        This change finishes the work of removing forward exiting. A lot of forward exiting
        was already removed in some other bugs, but SetLocal still did forward exits. SetLocal
        is in many ways the hardest to remove, since the forward exiting of SetLocal also
        implied that any conversion nodes inserted before the SetLocal would then also be
        marked as forward-exiting. Hence SetLocal's forward-exiting made a bunch of other
        things also forward-exiting, and this was always a source of weirdo bugs.
        
        SetLocal must be able to exit in case it performs a hoisted type speculation. Nodes
        inserted just before SetLocal must also be able to exit - for example type check
        hoisting may insert a CheckStructure, or fixup phase may insert something like
        Int32ToDouble. But if any of those nodes tried to backward exit, then this could lead
        to the reexecution of a side-effecting operation, for example:
        
            a: Call(...)
            b: SetLocal(@a, r1)
        
        For a long time it seemed like SetLocal *had* to exit forward because of this. But
        this change side-steps the problem by changing the ByteCodeParser to always emit a
        kind of "two-phase commit" for stores to local variables. Now when the ByteCodeParser
        wishes to store to a local, it first emits a MovHint and then enqueues a SetLocal.
        The SetLocal isn't actually emitted until the beginning of the next bytecode
        instruction (which the exception of op_enter and op_ret, which emit theirs immediately
        since it's always safe to reexecute those bytecode instructions and since deferring
        SetLocals would be weird there - op_enter has many SetLocals and op_ret is a set
        followed by a jump in case of inlining, so we'd have to emit the SetLocal "after" the
        jump and that would be awkward). This means that the above IR snippet would look
        something like:
        
            a: Call(..., bc#42)
            b: MovHint(@a, r1, bc#42)
            c: SetLocal(@a, r1, bc#47)
        
        Where the SetLocal exits "backwards" but appears at the beginning of the next bytecode
        instruction. This means that by the time we get to that SetLocal, the OSR exit
        analysis already knows that r1 is associated with @a, and it means that the SetLocal
        or anything hoisted above it can exit backwards as normal.
        
        This change also means that the "forward rewiring" can be killed. Previously, we might
        have inserted a conversion node on SetLocal and then the SetLocal died (i.e. turned
        into a MovHint) and the conversion node either died completely or had its lifetime
        truncated to be less than the actual value's bytecode lifetime. This no longer happens
        since conversion nodes are only inserted at SetLocals.
        
        More precisely, this change introduces two laws that we were basically already
        following anyway:
        
        1) A MovHint's child should never be changed except if all other uses of that child
           are also replaced. Specifically, this prohibits insertion of conversion nodes at
           MovHints.
        
        2) Anytime any child is replaced with something else, and all other uses aren't also
           replaced, we must insert a Phantom use of the original child.

        This is a slight compile-time regression but has no effect on code-gen. It unlocks a
        bunch of optimization opportunities so I think it's worth it.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dumpAssumingJITType):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::instructionCount):
        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        * dfg/DFGArrayifySlowPathGenerator.h:
        (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator):
        * dfg/DFGBackwardsPropagationPhase.cpp:
        (JSC::DFG::BackwardsPropagationPhase::propagate):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::setDirect):
        (JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal):
        (JSC::DFG::ByteCodeParser::DelayedSetLocal::execute):
        (JSC::DFG::ByteCodeParser::handleInlining):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::eliminate):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberize):
        * dfg/DFGCommon.h:
        * dfg/DFGConstantFoldingPhase.cpp:
        (JSC::DFG::ConstantFoldingPhase::foldConstants):
        * dfg/DFGDCEPhase.cpp:
        (JSC::DFG::DCEPhase::run):
        (JSC::DFG::DCEPhase::fixupBlock):
        (JSC::DFG::DCEPhase::cleanVariables):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::fixEdge):
        (JSC::DFG::FixupPhase::injectInt32ToDoubleNode):
        * dfg/DFGLICMPhase.cpp:
        (JSC::DFG::LICMPhase::run):
        (JSC::DFG::LICMPhase::attemptHoist):
        * dfg/DFGMinifiedNode.cpp:
        (JSC::DFG::MinifiedNode::fromNode):
        * dfg/DFGMinifiedNode.h:
        (JSC::DFG::belongsInMinifiedGraph):
        (JSC::DFG::MinifiedNode::constantNumber):
        (JSC::DFG::MinifiedNode::weakConstant):
        * dfg/DFGNode.cpp:
        (JSC::DFG::Node::hasVariableAccessData):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::convertToPhantom):
        (JSC::DFG::Node::convertToPhantomUnchecked):
        (JSC::DFG::Node::convertToIdentity):
        (JSC::DFG::Node::containsMovHint):
        (JSC::DFG::Node::hasUnlinkedLocal):
        (JSC::DFG::Node::willHaveCodeGenOrOSR):
        * dfg/DFGNodeFlags.cpp:
        (JSC::DFG::dumpNodeFlags):
        * dfg/DFGNodeFlags.h:
        * dfg/DFGNodeType.h:
        * dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
        (JSC::DFG::OSRAvailabilityAnalysisPhase::run):
        * dfg/DFGOSREntrypointCreationPhase.cpp:
        (JSC::DFG::OSREntrypointCreationPhase::run):
        * dfg/DFGOSRExit.cpp:
        * dfg/DFGOSRExit.h:
        * dfg/DFGOSRExitBase.cpp:
        * dfg/DFGOSRExitBase.h:
        (JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        (JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
        * dfg/DFGSSAConversionPhase.cpp:
        (JSC::DFG::SSAConversionPhase::run):
        * dfg/DFGSafeToExecute.h:
        (JSC::DFG::safeToExecute):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::speculationCheck):
        (JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
        (JSC::DFG::SpeculativeJIT::typeCheck):
        (JSC::DFG::SpeculativeJIT::compileMovHint):
        (JSC::DFG::SpeculativeJIT::compileCurrentBlock):
        (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
        (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
        (JSC::DFG::SpeculativeJIT::needsTypeCheck):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGTypeCheckHoistingPhase.cpp:
        (JSC::DFG::TypeCheckHoistingPhase::run):
        (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
        (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
        * dfg/DFGValidate.cpp:
        (JSC::DFG::Validate::validateCPS):
        * dfg/DFGVariableAccessData.h:
        (JSC::DFG::VariableAccessData::VariableAccessData):
        * dfg/DFGVariableEventStream.cpp:
        (JSC::DFG::VariableEventStream::reconstruct):
        * ftl/FTLCapabilities.cpp:
        (JSC::FTL::canCompile):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileNode):
        (JSC::FTL::LowerDFGToLLVM::compileGetArgument):
        (JSC::FTL::LowerDFGToLLVM::compileSetLocal):
        (JSC::FTL::LowerDFGToLLVM::compileMovHint):
        (JSC::FTL::LowerDFGToLLVM::compileZombieHint):
        (JSC::FTL::LowerDFGToLLVM::compileInt32ToDouble):
        (JSC::FTL::LowerDFGToLLVM::speculate):
        (JSC::FTL::LowerDFGToLLVM::typeCheck):
        (JSC::FTL::LowerDFGToLLVM::appendTypeCheck):
        (JSC::FTL::LowerDFGToLLVM::appendOSRExit):
        (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall):
        * ftl/FTLOSRExit.cpp:
        * ftl/FTLOSRExit.h:
        * tests/stress/dead-int32-to-double.js: Added.
        (foo):
        * tests/stress/dead-uint32-to-number.js: Added.
        (foo):

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
2013-12-25  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r161033 and r161074.
        http://trac.webkit.org/changeset/161033
        http://trac.webkit.org/changeset/161074
        https://bugs.webkit.org/show_bug.cgi?id=126240

        Oliver says that a rollout would be better (Requested by ap on
        #webkit).

        * API/JSObjectRef.cpp:
        (JSObjectSetProperty):
        * dfg/DFGOperations.cpp:
        (JSC::DFG::operationPutByValInternal):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        * jit/JITOperations.cpp:
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/Arguments.cpp:
        (JSC::Arguments::putByIndex):
        * runtime/ArrayPrototype.cpp:
        (JSC::putProperty):
        (JSC::arrayProtoFuncPush):
        * runtime/JSCJSValue.cpp:
        (JSC::JSValue::putToPrimitiveByIndex):
        * runtime/JSCell.cpp:
        (JSC::JSCell::putByIndex):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::put):
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):
        * runtime/JSONObject.cpp:
        (JSC::Walker::walk):
        * runtime/JSObject.cpp:
        (JSC::JSObject::putByIndex):
        (JSC::JSObject::putDirectNonIndexAccessor):
        (JSC::JSObject::deleteProperty):
        * runtime/JSObject.h:
        (JSC::JSObject::putDirect):
        * runtime/Lookup.h:
        (JSC::putEntry):
        (JSC::lookupPut):
        * runtime/PutPropertySlot.h:
        (JSC::PutPropertySlot::PutPropertySlot):
        (JSC::PutPropertySlot::setNewProperty):
        (JSC::PutPropertySlot::isCacheable):

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
2013-12-25  Filip Pizlo  <fpizlo@apple.com>

        DFG PhantomArguments shouldn't rely on a dead Phi graph
        https://bugs.webkit.org/show_bug.cgi?id=126218

        Reviewed by Oliver Hunt.
        
        This change dramatically rationalizes our handling of PhantomArguments (i.e.
        speculative elision of arguments object allocation).
        
        It's now the case that if we decide that we can elide arguments allocation, we just
        turn the arguments-creating node into a PhantomArguments and mark all locals that
        it's stored to as being arguments aliases. Being an arguments alias and being a
        PhantomArguments means basically the same thing: in DFG execution you have the empty
        value, on OSR exit an arguments object is allocated in your place, and all operations
        that use the value now just refer directly to the actual arguments in the call frame
        header (or the arguments we know that we passed to the call, in case of inlining).
        
        This means that we no longer have arguments simplification creating a dead Phi graph
        that then has to be interpreted by the OSR exit logic. That sort of never made any
        sense.
        
        This means that PhantomArguments now has a clear story in SSA: basically SSA just
        gets rid of the "locals" but everything else is the same.
        
        Finally, this means that we can more easily get rid of forward exiting. As I was
        working on the code to get rid of forward exiting, I realized that I'd have to
        carefully preserve the special meanings of MovHint and SetLocal in the case of
        PhantomArguments. It was really bizarre: even the semantics of MovHint were tied to
        our specific treatment of PhantomArguments. After this change this is no longer the
        case.
        
        One of the really cool things about this change is that arguments reification now
        just becomes a special kind of FlushFormat. This further unifies things: it means
        that a MovHint(PhantomArguments) and a SetLocal(PhantomArguments) both have the same
        meaning, since both of them dictate that the way we recover the local on exit is by
        reifying arguments. Previously, the SetLocal(PhantomArguments) case needed some
        special handling to accomplish this.
        
        A downside of this approach is that we will now emit code to store the empty value
        into aliased arguments variables, and we will even emit code to load that empty value
        as well. As far as I can tell this doesn't cost anything, since PhantomArguments are
        most profitable in cases where it allows us to simplify control flow and kill the
        arguments locals entirely. Of course, this isn't an issue in SSA form since SSA form
        also eliminates the locals.

        * dfg/DFGArgumentsSimplificationPhase.cpp:
        (JSC::DFG::ArgumentsSimplificationPhase::run):
        (JSC::DFG::ArgumentsSimplificationPhase::detypeArgumentsReferencingPhantomChild):
        * dfg/DFGFlushFormat.cpp:
        (WTF::printInternal):
        * dfg/DFGFlushFormat.h:
        (JSC::DFG::resultFor):
        (JSC::DFG::useKindFor):
        (JSC::DFG::dataFormatFor):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileCurrentBlock):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::compile):
        * dfg/DFGValueSource.h:
        (JSC::DFG::ValueSource::ValueSource):
        (JSC::DFG::ValueSource::forFlushFormat):
        * dfg/DFGVariableAccessData.h:
        (JSC::DFG::VariableAccessData::flushFormat):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::buildExitArguments):

1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 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
2013-12-23  Oliver Hunt  <oliver@apple.com>

        Refactor PutPropertySlot to be aware of custom properties
        https://bugs.webkit.org/show_bug.cgi?id=126187

        Reviewed by msaboff.

        Refactor PutPropertySlot, making the constructor take the thisValue
        used as a target.  This results in a wide range of boilerplate changes
        to pass the new parameter.

        * API/JSObjectRef.cpp:
        (JSObjectSetProperty):
        * dfg/DFGOperations.cpp:
        (JSC::DFG::operationPutByValInternal):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):
        * jit/JITOperations.cpp:
        * llint/LLIntSlowPaths.cpp:
        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
        * runtime/Arguments.cpp:
        (JSC::Arguments::putByIndex):
        * runtime/ArrayPrototype.cpp:
        (JSC::putProperty):
        (JSC::arrayProtoFuncPush):
        * runtime/JSCJSValue.cpp:
        (JSC::JSValue::putToPrimitiveByIndex):
        * runtime/JSCell.cpp:
        (JSC::JSCell::putByIndex):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::put):
        * runtime/JSGenericTypedArrayViewInlines.h:
        (JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):
        * runtime/JSONObject.cpp:
        (JSC::Walker::walk):
        * runtime/JSObject.cpp:
        (JSC::JSObject::putByIndex):
        (JSC::JSObject::putDirectNonIndexAccessor):
        (JSC::JSObject::deleteProperty):
        * runtime/JSObject.h:
        (JSC::JSObject::putDirect):
        * runtime/Lookup.h:
        (JSC::putEntry):
        (JSC::lookupPut):
        * runtime/PutPropertySlot.h:
        (JSC::PutPropertySlot::PutPropertySlot):
        (JSC::PutPropertySlot::setCustomProperty):
        (JSC::PutPropertySlot::thisValue):
        (JSC::PutPropertySlot::isCacheable):

1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444
2013-12-23  Benjamin Poulain  <benjamin@webkit.org>

        Add class matching to the Selector Code Generator
        https://bugs.webkit.org/show_bug.cgi?id=126176

        Reviewed by Antti Koivisto and Oliver Hunt.

        Add test and branch based on BaseIndex addressing for x86_64.
        Fast loops are needed to compete with clang on tight loops.

        * assembler/MacroAssembler.h:
        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::branch64):
        (JSC::MacroAssemblerX86_64::branchPtr):
        * assembler/X86Assembler.h:
        (JSC::X86Assembler::cmpq_rm):

1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457
2013-12-23  Oliver Hunt  <oliver@apple.com>

        Update custom setter implementations to perform type checks
        https://bugs.webkit.org/show_bug.cgi?id=126171

        Reviewed by Daniel Bates.

        Modify the setter function signature to take encoded values
        as we're changing the setter usage everywhere anyway.

        * runtime/Lookup.h:
        (JSC::putEntry):

1458 1459 1460 1461 1462 1463 1464 1465 1466
2013-12-23  Lucas Forschler  <lforschler@apple.com>

        <rdar://problem/15682948> Update copyright strings
        
        Reviewed by Dan Bernstein.

        * Info.plist:
        * JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist:

1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477
2013-12-23  Zan Dobersek  <zdobersek@igalia.com>

        [GTK] Clean up compiler optimizations flags for libWTF, libJSC
        https://bugs.webkit.org/show_bug.cgi?id=126157

        Reviewed by Gustavo Noronha Silva.

        * GNUmakefile.am: Remove the -fstrict-aliasing and -O3 compiler flags for libWTF.la. -O3 gets
        overridden by -O2 that's listed in CXXFLAGS (or -O0 in case of debug builds) and -fstrict-aliasing
        is enabled when -O2 is used (and shouldn't be enabled in debug builds anyway).

1478 1479 1480 1481 1482 1483 1484 1485 1486
2013-12-22  Martin Robinson  <mrobinson@igalia.com>

        [CMake] Fix typo from r160812
        https://bugs.webkit.org/show_bug.cgi?id=126145

        Reviewed by Gustavo Noronha Silva.

        * CMakeLists.txt: Fix typo when detecting the type of library.

1487 1488 1489 1490 1491 1492 1493 1494 1495 1496
2013-12-22  Martin Robinson  <mrobinson@igalia.com>

        [GTK][CMake] libtool-compatible soversion calculation
        https://bugs.webkit.org/show_bug.cgi?id=125511

        Reviewed by Gustavo Noronha Silva.

        * CMakeLists.txt: Use the POPULATE_LIBRARY_VERSION macro and the
        library-specific version information.

1497 1498 1499 1500 1501 1502 1503 1504 1505
2013-12-23  Gustavo Noronha Silva  <gns@gnome.org>

        [GTK] [CMake] Generate pkg-config files
        https://bugs.webkit.org/show_bug.cgi?id=125685

        Reviewed by Martin Robinson.

        * PlatformGTK.cmake: Added. Generate javascriptcoregtk-3.0.pc.

1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516
2013-12-22  Benjamin Poulain  <benjamin@webkit.org>

        Create a skeleton for CSS Selector code generation
        https://bugs.webkit.org/show_bug.cgi?id=126044

        Reviewed by Antti Koivisto and Gavin Barraclough.

        * assembler/LinkBuffer.h:
        Add a new owner UID for code compiled for CSS.
        Export the symbols needed to link code from WebCore.

1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536
2013-12-19  Mark Hahnenberg  <mhahnenberg@apple.com>

        Clean up DFG write barriers
        https://bugs.webkit.org/show_bug.cgi?id=126047

        Reviewed by Filip Pizlo.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::storeToWriteBarrierBuffer): Use the register allocator to 
        determine which registers need saving instead of saving every single one of them.
        (JSC::DFG::SpeculativeJIT::osrWriteBarrier): We don't need to save live register state 
        because the write barriers during OSR execute when there are no live registers. Also we  
        don't need to use pushes to pad the stack pointer for pokes on x86; we can just use an add.
        (JSC::DFG::SpeculativeJIT::writeBarrier):
        * dfg/DFGSpeculativeJIT.h:
        * jit/Repatch.cpp:
        (JSC::emitPutReplaceStub):
        (JSC::emitPutTransitionStub):
        * runtime/VM.h: Get rid of writeBarrierRegisterBuffer since it's no longer used.

1537 1538 1539 1540 1541 1542 1543 1544 1545 1546
2013-12-20  Balazs Kilvady  <kilvadyb@homejinni.com>

        [MIPS] Missing MacroAssemblerMIPS::branchTest8(ResultCondition, BaseIndex, TrustedImm32)
        https://bugs.webkit.org/show_bug.cgi?id=126062

        Reviewed by Mark Hahnenberg.

        * assembler/MacroAssemblerMIPS.h:
        (JSC::MacroAssemblerMIPS::branchTest8):

1547 1548 1549 1550 1551 1552 1553 1554 1555 1556
2013-12-20  Julien Brianceau  <jbriance@cisco.com>

        [sh4] Add missing implementation in MacroAssembler to fix build.
        https://bugs.webkit.org/show_bug.cgi?id=126063

        Reviewed by Mark Hahnenberg.

        * assembler/MacroAssemblerSH4.h:
        (JSC::MacroAssemblerSH4::branchTest8):

1557 1558 1559 1560 1561 1562 1563 1564 1565 1566
2013-12-20  Julien Brianceau  <jbriance@cisco.com>

        [arm] Add missing implementation in MacroAssembler to fix CPU(ARM_TRADITIONAL) build.
        https://bugs.webkit.org/show_bug.cgi?id=126064

        Reviewed by Mark Hahnenberg.

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

1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580
2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
        https://bugs.webkit.org/show_bug.cgi?id=126016

        Reviewed by Timothy Hatcher.

        * inspector/remote/RemoteInspector.mm:
        (Inspector::RemoteInspector::listingForDebuggable):
        * inspector/remote/RemoteInspectorConstants.h:
        Include a debuggable type identifier in the debuggable listing,
        so the remote frontend can know if it is debugging a Web Page
        or JS Context.

1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599
2013-12-19  Benjamin Poulain  <benjamin@webkit.org>

        Add an utility class to simplify generating function calls
        https://bugs.webkit.org/show_bug.cgi?id=125972

        Reviewed by Geoffrey Garen.

        Split branchTest32 in two functions: test32AndSetFlags and branchOnFlags.
        This is done to allow code where the flags are set, multiple operation that
        do not modify the flags occur, then the flags are used.

        This is used for function calls to test the return value while discarding the
        return register.

        * assembler/MacroAssemblerX86Common.h:
        (JSC::MacroAssemblerX86Common::test32AndSetFlags):
        (JSC::MacroAssemblerX86Common::branchOnFlags):
        (JSC::MacroAssemblerX86Common::branchTest32):

1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647
2013-12-19  Mark Hahnenberg  <mhahnenberg@apple.com>

        Put write barriers in the right places in the baseline JIT
        https://bugs.webkit.org/show_bug.cgi?id=125975

        Reviewed by Filip Pizlo.

        * jit/JIT.cpp:
        (JSC::JIT::privateCompileSlowCases):
        * jit/JIT.h:
        * jit/JITInlines.h:
        (JSC::JIT::callOperation):
        (JSC::JIT::emitArrayProfilingSite):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::emit_op_enter):
        (JSC::JIT::emitSlow_op_enter):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::emit_op_enter):
        (JSC::JIT::emitSlow_op_enter):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::emit_op_put_by_val):
        (JSC::JIT::emitGenericContiguousPutByVal):
        (JSC::JIT::emitArrayStoragePutByVal):
        (JSC::JIT::emit_op_put_by_id):
        (JSC::JIT::emitPutGlobalProperty):
        (JSC::JIT::emitPutGlobalVar):
        (JSC::JIT::emitPutClosureVar):
        (JSC::JIT::emit_op_init_global_const):
        (JSC::JIT::checkMarkWord):
        (JSC::JIT::emitWriteBarrier):
        (JSC::JIT::privateCompilePutByVal):
        * jit/JITPropertyAccess32_64.cpp:
        (JSC::JIT::emitGenericContiguousPutByVal):
        (JSC::JIT::emitArrayStoragePutByVal):
        (JSC::JIT::emit_op_put_by_id):
        (JSC::JIT::emitSlow_op_put_by_id):
        (JSC::JIT::emitPutGlobalProperty):
        (JSC::JIT::emitPutGlobalVar):
        (JSC::JIT::emitPutClosureVar):
        (JSC::JIT::emit_op_init_global_const):
        * jit/Repatch.cpp:
        (JSC::emitPutReplaceStub):
        (JSC::emitPutTransitionStub):
        (JSC::repatchPutByID):
        * runtime/CommonSlowPaths.cpp:
        (JSC::SLOW_PATH_DECL):
        * runtime/CommonSlowPaths.h:

1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660
2013-12-19  Brent Fulgham  <bfulgham@apple.com>

        Implement ArrayBuffer.isView
        https://bugs.webkit.org/show_bug.cgi?id=126004

        Reviewed by Filip Pizlo.

        Test coverage in webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html

        * runtime/JSArrayBufferConstructor.cpp:
        (JSC::JSArrayBufferConstructor::finishCreation): Add 'isView' to object constructor.
        (JSC::arrayBufferFuncIsView): New method.

1661 1662 1663 1664 1665 1666 1667 1668 1669
2013-12-19  Mark Lam  <mark.lam@apple.com>

        Fix broken C loop LLINT build.
        https://bugs.webkit.org/show_bug.cgi?id=126024.

        Reviewed by Oliver Hunt.

        * runtime/VM.h:

1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687
2013-12-18  Mark Hahnenberg  <mhahnenberg@apple.com>

        DelayedReleaseScope is in the wrong place
        https://bugs.webkit.org/show_bug.cgi?id=125876

        Reviewed by Geoffrey Garen.

        The DelayedReleaseScope needs to be around the free list sweeping in MarkedAllocator::tryAllocateHelper. 
        This location gives us a good safe point between getting ready to allocate  (i.e. identifying a non-empty 
        free list) and doing the actual allocation (popping the free list).

        * heap/MarkedAllocator.cpp:
        (JSC::MarkedAllocator::tryAllocateHelper):
        (JSC::MarkedAllocator::allocateSlowCase):
        (JSC::MarkedAllocator::addBlock):
        * runtime/JSCellInlines.h:
        (JSC::allocateCell):

1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698
2013-12-18  Gustavo Noronha Silva  <gns@gnome.org>

        [GTK][CMake] make libjavascriptcoregtk a public shared library again
        https://bugs.webkit.org/show_bug.cgi?id=125512

        Reviewed by Martin Robinson.

        * CMakeLists.txt: use target type instead of SHARED_CORE to decide whether
        JavaScriptCore is a shared library, since it's always shared for GTK+ regardless
        of SHARED_CORE.

1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713
2013-12-18  Benjamin Poulain  <benjamin@webkit.org>

        Add a simple stack abstraction for x86_64
        https://bugs.webkit.org/show_bug.cgi?id=125908

        Reviewed by Geoffrey Garen.

        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::addPtrNoFlags):
        Add an explicit abstraction for the "lea" instruction. This is needed
        by the experimental JIT to have add and substract without changing the flags.

        This is useful for function calls to test the return value, restore the registers,
        then branch on the flags from the return value.

1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 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 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828
2013-12-18  Mark Hahnenberg  <mhahnenberg@apple.com>

        DFG should have a separate StoreBarrier node
        https://bugs.webkit.org/show_bug.cgi?id=125530

        Reviewed by Filip Pizlo.

        This is in preparation for GenGC. We use a separate StoreBarrier node instead of making them implicitly 
        part of other nodes so that it's easier to run analyses on them, e.g. for the StoreBarrierElisionPhase. 
        They are inserted during the fixup phase. Initially they do not generate any code.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * dfg/DFGAbstractHeap.h:
        * dfg/DFGAbstractInterpreter.h:
        (JSC::DFG::AbstractInterpreter::isKnownNotCell):
        * dfg/DFGAbstractInterpreterInlines.h:
        (JSC::DFG::::executeEffects):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberizeForAllocation):
        (JSC::DFG::clobberize):
        * dfg/DFGConstantFoldingPhase.cpp:
        (JSC::DFG::ConstantFoldingPhase::foldConstants): Whenever we insert new nodes that require StoreBarriers,
        we have to add those new StoreBarriers too. It's important to note that AllocatePropertyStorage and 
        ReallocatePropertyStorage nodes require their StoreBarriers to come after them since they allocate first,
        which could cause a GC, and then store the resulting buffer into their JSCell, which requires the barrier.
        If we ever require that write barriers occur before stores, we'll have to split these nodes into 
        AllocatePropertyStorage + StoreBarrier + PutPropertyStorage.
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        (JSC::DFG::FixupPhase::insertStoreBarrier):
        * dfg/DFGNode.h:
        (JSC::DFG::Node::isStoreBarrier):
        * dfg/DFGNodeType.h:
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGPlan.cpp:
        (JSC::DFG::Plan::compileInThreadImpl):
        * dfg/DFGPredictionPropagationPhase.cpp:
        (JSC::DFG::PredictionPropagationPhase::propagate):
        * dfg/DFGSafeToExecute.h:
        (JSC::DFG::safeToExecute):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
        (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
        (JSC::DFG::SpeculativeJIT::compileStoreBarrier):
        (JSC::DFG::SpeculativeJIT::genericWriteBarrier): The fast path write barrier check. It loads the 
        byte that contains the mark bit of the object. 
        (JSC::DFG::SpeculativeJIT::storeToWriteBarrierBuffer): If the fast path check fails we try to store the 
        cell in the WriteBarrierBuffer so as to avoid frequently flushing all registers in order to make a C call.
        (JSC::DFG::SpeculativeJIT::writeBarrier):
        (JSC::DFG::SpeculativeJIT::osrWriteBarrier): More barebones version of the write barrier to be executed 
        during an OSR exit into baseline code. We must do this so that the baseline JIT object and array profiles 
        are properly cleared during GC.
        * dfg/DFGSpeculativeJIT.h:
        (JSC::DFG::SpeculativeJIT::callOperation):
        * dfg/DFGSpeculativeJIT32_64.cpp:
        (JSC::DFG::SpeculativeJIT::cachedPutById):
        (JSC::DFG::SpeculativeJIT::compileBaseValueStoreBarrier):
        (JSC::DFG::SpeculativeJIT::compile):
        (JSC::DFG::SpeculativeJIT::writeBarrier):
        * dfg/DFGSpeculativeJIT64.cpp:
        (JSC::DFG::SpeculativeJIT::cachedPutById):
        (JSC::DFG::SpeculativeJIT::compileBaseValueStoreBarrier):
        (JSC::DFG::SpeculativeJIT::compile):
        (JSC::DFG::SpeculativeJIT::writeBarrier):
        * dfg/DFGStoreBarrierElisionPhase.cpp: Added. New DFG phase that does block-local elision of redundant
        StoreBarriers. Every time a StoreBarrier on a particular object is executed, a bit is set indicating that 
        that object doesn't need any more StoreBarriers. 
        (JSC::DFG::StoreBarrierElisionPhase::StoreBarrierElisionPhase):
        (JSC::DFG::StoreBarrierElisionPhase::couldCauseGC): Nodes that could cause a GC reset the bits for all of the 
        objects known in the current block. 
        (JSC::DFG::StoreBarrierElisionPhase::allocatesFreshObject): A node that creates a new object automatically 
        sets the bit for that object since if a GC occurred as the result of that object's allocation then that 
        object would not need a barrier since it would be guaranteed to be a young generation object until the 
        next GC point.
        (JSC::DFG::StoreBarrierElisionPhase::noticeFreshObject):
        (JSC::DFG::StoreBarrierElisionPhase::getBaseOfStore):
        (JSC::DFG::StoreBarrierElisionPhase::shouldBeElided):
        (JSC::DFG::StoreBarrierElisionPhase::elideBarrier):
        (JSC::DFG::StoreBarrierElisionPhase::handleNode):
        (JSC::DFG::StoreBarrierElisionPhase::handleBlock):
        (JSC::DFG::StoreBarrierElisionPhase::run):
        (JSC::DFG::performStoreBarrierElision):
        * dfg/DFGStoreBarrierElisionPhase.h: Added.
        * heap/Heap.cpp:
        (JSC::Heap::Heap):
        (JSC::Heap::flushWriteBarrierBuffer):
        * heap/Heap.h:
        (JSC::Heap::writeBarrier):
        * heap/MarkedBlock.h:
        (JSC::MarkedBlock::offsetOfMarks):
        * heap/WriteBarrierBuffer.cpp: Added. The WriteBarrierBuffer buffers a set of JSCells that are awaiting 
        a pending WriteBarrier. This buffer is used by the DFG to avoid the overhead of calling out to C repeatedly
        to invoke a write barrier on a single JSCell. Instead the DFG has inline code to fill the WriteBarrier buffer
        until its full, and then to call out to C to flush it. The WriteBarrierBuffer will also be flushed prior to 
        each EdenCollection.
        (JSC::WriteBarrierBuffer::WriteBarrierBuffer):
        (JSC::WriteBarrierBuffer::~WriteBarrierBuffer):
        (JSC::WriteBarrierBuffer::flush):
        (JSC::WriteBarrierBuffer::reset):
        (JSC::WriteBarrierBuffer::add):
        * heap/WriteBarrierBuffer.h: Added.
        (JSC::WriteBarrierBuffer::currentIndexOffset):
        (JSC::WriteBarrierBuffer::capacityOffset):
        (JSC::WriteBarrierBuffer::bufferOffset):
        * jit/JITOperations.cpp:
        * jit/JITOperations.h:
        * runtime/VM.h:

1829 1830 1831 1832 1833 1834
2013-12-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.am:

1835 1836 1837 1838 1839 1840 1841 1842 1843 1844
2013-12-17  Julien Brianceau  <jbriance@cisco.com>

        Fix armv7 and sh4 builds.
        https://bugs.webkit.org/show_bug.cgi?id=125848

        Reviewed by Csaba Osztrogonác.

        * assembler/ARMv7Assembler.h: Include limits.h for INT_MIN.
        * assembler/SH4Assembler.h: Include limits.h for INT_MIN.

1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864
2013-12-16  Oliver Hunt  <oliver@apple.com>

        Avoid indirect function calls for custom getters
        https://bugs.webkit.org/show_bug.cgi?id=125821

        Reviewed by Mark Hahnenberg.

        Rather than invoking a helper function to perform an indirect call
        through a function pointer, just have the JIT call the function directly.

        Unfortunately this only works in JSVALUE64 at the moment as there
        is not an obvious way to pass two EncodedJSValues uniformly over
        the various effected JITs.

        * jit/CCallHelpers.h:
        (JSC::CCallHelpers::setupArguments):
        * jit/Repatch.cpp:
        (JSC::generateProtoChainAccessStub):
        (JSC::tryBuildGetByIDList):

1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876
2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>

        Fix some whitespace issues in inspector code
        https://bugs.webkit.org/show_bug.cgi?id=125814

        Reviewed by Darin Adler.

        * inspector/protocol/Debugger.json:
        * inspector/protocol/Runtime.json:
        * inspector/scripts/CodeGeneratorInspector.py:
        (Generator.process_command):

1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896
2013-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>

        Add some missing functions to MacroAssembler
        https://bugs.webkit.org/show_bug.cgi?id=125809

        Reviewed by Oliver Hunt.

        * assembler/AbstractMacroAssembler.h:
        * assembler/AssemblerBuffer.h:
        * assembler/LinkBuffer.cpp:
        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::storePtr):
        (JSC::MacroAssembler::andPtr):
        * assembler/MacroAssemblerARM64.h:
        (JSC::MacroAssemblerARM64::and64):
        (JSC::MacroAssemblerARM64::branchTest8):
        * assembler/MacroAssemblerARMv7.h:
        (JSC::MacroAssemblerARMv7::branchTest8):
        * assembler/X86Assembler.h:

1897 1898 1899 1900 1901 1902 1903 1904 1905
2013-12-16  Brent Fulgham  <bfulgham@apple.com>

        [Win] Remove dead code after conversion to VS2013
        https://bugs.webkit.org/show_bug.cgi?id=125795

        Reviewed by Darin Adler.

        * API/tests/testapi.c: Remove local nan implementation

1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923
2013-12-16  Oliver Hunt  <oliver@apple.com>

        Cache getters and custom accessors on the prototype chain
        https://bugs.webkit.org/show_bug.cgi?id=125602

        Reviewed by Michael Saboff.

        Support caching of custom getters and accessors on the prototype chain.
        This is relatively trivial and just requires a little work compared to
        the direct access mode as we're under more register pressure.

        * bytecode/StructureStubInfo.h:
          Removed the unsued initGetByIdProto as it was confusing to still have it present.
        * jit/Repatch.cpp:
        (JSC::generateProtoChainAccessStub):
        (JSC::tryCacheGetByID):
        (JSC::tryBuildGetByIDList):

1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939
2013-12-16  Mark Lam  <mark.lam@apple.com>

        Change slow path result to take a void* instead of a ExecState*.
        https://bugs.webkit.org/show_bug.cgi?id=125802.

        Reviewed by Filip Pizlo.

        This is in preparation for C Stack OSR entry work that is coming soon.
        In the OSR entry case, we'll be returning a topOfFrame pointer value
        instead of the ExecState*.

        * offlineasm/cloop.rb:
        * runtime/CommonSlowPaths.h:
        (JSC::encodeResult):
        (JSC::decodeResult):

1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956
2013-12-16  Alex Christensen  <achristensen@webkit.org>

        Fixed Win64 build on VS2013.
        https://bugs.webkit.org/show_bug.cgi?id=125753

        Reviewed by Brent Fulgham.

        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
        * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
        * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
        * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
        Added correct PlatformToolset for 64-bit builds.

1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971
2013-12-16  Peter Szanka  <h868064@stud.u-szeged.hu>

        Delete RVCT related code parts.
        https://bugs.webkit.org/show_bug.cgi?id=125626

        Reviewed by Darin Adler.

        * assembler/ARMAssembler.cpp:
        * assembler/ARMAssembler.h:
        (JSC::ARMAssembler::cacheFlush):
        * assembler/MacroAssemblerARM.cpp:
        (JSC::isVFPPresent):
        * jit/JITStubsARM.h:
        * jit/JITStubsARMv7.h:

1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
2013-12-15  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION: 2x regression on Dromaeo DOM query tests
        https://bugs.webkit.org/show_bug.cgi?id=125377

        Reviewed by Filip Pizlo.

        The bug was caused by JSC not JIT'ing property access on "document" due to its type info having
        HasImpureGetOwnPropertySlot flag.

        Fixed the bug by new type info flag NewImpurePropertyFiresWatchpoints, which allows the baseline
        JIT to generate byte code for access properties on an object with named properties (a.k.a.
        custom name getter) in DOM. When a new named property appears on the object, VM is notified via
        VM::addImpureProperty and fires StructureStubClearingWatchpoint added during the repatch.

        * bytecode/GetByIdStatus.cpp:
        (JSC::GetByIdStatus::computeFromLLInt): Take the slow path if we have any object with impure
        properties in the prototype chain.
        (JSC::GetByIdStatus::computeForChain): Ditto.

        * jit/Repatch.cpp:
        (JSC::repatchByIdSelfAccess): Throw away the byte code when a new impure property is added on any
        object in the prototype chain via StructureStubClearingWatchpoint.
        (JSC::generateProtoChainAccessStub): Ditto.
        (JSC::tryCacheGetByID):
        (JSC::tryBuildGetByIDList):
        (JSC::tryRepatchIn): Ditto.

        * runtime/JSTypeInfo.h: Added NewImpurePropertyFiresWatchpoints.
        (JSC::TypeInfo::newImpurePropertyFiresWatchpoints): Added.

        * runtime/Operations.h:
        (JSC::normalizePrototypeChainForChainAccess): Don't exit early if VM will be notified of new
        impure property even if the object had impure properties.

        * runtime/Structure.h:
        (JSC::Structure::takesSlowPathInDFGForImpureProperty): Added. Wraps hasImpureGetOwnPropertySlot and
        asserts that newImpurePropertyFiresWatchpoints is true whenever hasImpureGetOwnPropertySlot is true.

        * runtime/VM.cpp:
        (JSC::VM::registerWatchpointForImpureProperty): Added.
        (JSC::VM::addImpureProperty): Added. HTMLDocument calls it to notify JSC of a new impure property.

        * runtime/VM.h:

2017 2018 2019 2020 2021 2022 2023 2024 2025
2013-12-15  Andy Estes  <aestes@apple.com>

        [iOS] Upstream changes to FeatureDefines.xcconfig
        https://bugs.webkit.org/show_bug.cgi?id=125742

        Reviewed by Dan Bernstein.

        * Configurations/FeatureDefines.xcconfig:

2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
2013-12-14  Filip Pizlo  <fpizlo@apple.com>

        FTL should *really* know when things are flushed
        https://bugs.webkit.org/show_bug.cgi?id=125747

        Reviewed by Sam Weinig.
        
        Fix more codegen badness. This makes V8v7's crypto am3() function run faster in the FTL
        than in DFG. This means that even if we just compile those functions in V8v7 that don't
        make calls, the FTL gives us a 2% speed-up over the DFG. That's pretty good considering
        that we have still more optimizations to fix and we can make calls work.

        * dfg/DFGSSAConversionPhase.cpp:
        (JSC::DFG::SSAConversionPhase::run):
        * ftl/FTLCompile.cpp:
        (JSC::FTL::fixFunctionBasedOnStackMaps):

2043 2044 2045 2046 2047 2048 2049 2050 2051
2013-12-14  Andy Estes  <aestes@apple.com>

        Unify FeatureDefines.xcconfig
        https://bugs.webkit.org/show_bug.cgi?id=125741

        Rubber-stamped by Dan Bernstein.

        * Configurations/FeatureDefines.xcconfig: Enable ENABLE_MEDIA_SOURCE.

mrowe@apple.com's avatar
mrowe@apple.com committed
2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068
2013-12-14  Mark Rowe  <mrowe@apple.com>

        Build fix after r160557.

        r160557 added the first generated header to JavaScriptCore that needs to be installed in to
        the framework wrapper. Sadly JavaScriptCore's Derived Sources target was not set to generate
        headers when invoked as part of the installhdrs action. This resulted in the build failing
        due to Xcode being unable to find the header file to install. The fix for this is to configure
        the Derived Sources target to use JavaScriptCore.xcconfig, which sets INSTALLHDRS_SCRIPT_PHASE
        to YES and allows Xcode to generate derived sources during the installhdrs action.

        Enabling INSTALLHDRS_SCRIPT_PHASE required tweaking the Generate Derived Sources script build
        phase to skip running code related to offlineasm that depends on JSCLLIntOffsetExtractor
        having been compiled, which isn't the case at installhdrs time.

        * JavaScriptCore.xcodeproj/project.pbxproj:

2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080
2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>

        Some Set and Map prototype functions have incorrect function lengths
        https://bugs.webkit.org/show_bug.cgi?id=125732

        Reviewed by Oliver Hunt.

        * runtime/MapPrototype.cpp:
        (JSC::MapPrototype::finishCreation):
        * runtime/SetPrototype.cpp:
        (JSC::SetPrototype::finishCreation):

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
2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore
        https://bugs.webkit.org/show_bug.cgi?id=125707

        Reviewed by Timothy Hatcher.

        * CMakeLists.txt:
        * DerivedSources.make:
        * GNUmakefile.am:
        * inspector/protocol/Debugger.json: Renamed from Source/WebCore/inspector/protocol/Debugger.json.
        * inspector/protocol/GenericTypes.json: Added.
        * inspector/protocol/InspectorDomain.json: Renamed from Source/WebCore/inspector/protocol/InspectorDomain.json.
        Add new files to inspector generation.

        * inspector/scripts/CodeGeneratorInspector.py:
        (Generator.go):
        Only build TypeBuilder output if the domain only has types. Avoid
        backend/frontend dispatchers and backend commands.

        (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
        (format_setter_value_expression):
        (Generator.process_command):
        (Generator.generate_send_method):
        * inspector/scripts/CodeGeneratorInspectorStrings.py:
        Export and name the get{JS,Web}EnumConstant function.

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 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 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
2013-12-11  Filip Pizlo  <fpizlo@apple.com>

        Get rid of forward exit on UInt32ToNumber by adding an op_unsigned bytecode instruction
        https://bugs.webkit.org/show_bug.cgi?id=125553

        Reviewed by Oliver Hunt.
        
        UInt32ToNumber was a super complicated node because it had to do a speculation, but it
        would do it after we already had computed the urshift. It couldn't just back to the
        beginning of the urshift because the inputs to the urshift weren't necessarily live
        anymore. We couldn't jump forward to the beginning of the next instruction because the
        result of the urshift was not yet unsigned-converted.
        
        For a while we solved this by forward-exiting in UInt32ToNumber. But that's really
        gross and I want to get rid of all forward exits. They cause a lot of bugs.
        
        We could also have turned UInt32ToNumber to a backwards exit by forcing the inputs to
        the urshift to be live. I figure that this might be a bit too extreme.
        
        So, I just created a new place that we can exit to: I split op_urshift into op_urshift
        followed by op_unsigned. op_unsigned is an "unsigned cast" along the lines of what
        UInt32ToNumber does. This allows me to get rid of all of the nastyness in the DFG for
        forward exiting in UInt32ToNumber.
        
        This patch enables massive code carnage in the DFG and FTL, and brings us closer to
        eliminating one of the DFG's most confusing concepts. On the flipside, it does make the
        bytecode slightly more complex (one new instruction). This is a profitable trade. We
        want the DFG and FTL to trend towards simplicity, since they are both currently too
        complicated.

        * bytecode/BytecodeUseDef.h:
        (JSC::computeUsesForBytecodeOffset):
        (JSC::computeDefsForBytecodeOffset):
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dumpBytecode):
        * bytecode/Opcode.h:
        (JSC::padOpcodeName):
        * bytecode/ValueRecovery.cpp:
        (JSC::ValueRecovery::dumpInContext):
        * bytecode/ValueRecovery.h:
        (JSC::ValueRecovery::gpr):
        * bytecompiler/NodesCodegen.cpp:
        (JSC::BinaryOpNode::emitBytecode):
        (JSC::emitReadModifyAssignment):
        * dfg/DFGByteCodeParser.cpp:
        (JSC::DFG::ByteCodeParser::toInt32):
        (JSC::DFG::ByteCodeParser::parseBlock):
        * dfg/DFGClobberize.h:
        (JSC::DFG::clobberize):
        * dfg/DFGNodeType.h:
        * dfg/DFGOSRExitCompiler32_64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGOSRExitCompiler64.cpp:
        (JSC::DFG::OSRExitCompiler::compileExit):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileMovHint):
        (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
        * dfg/DFGSpeculativeJIT.h:
        * dfg/DFGSpeculativeJIT32_64.cpp:
        * dfg/DFGSpeculativeJIT64.cpp:
        * dfg/DFGStrengthReductionPhase.cpp:
        (JSC::DFG::StrengthReductionPhase::handleNode):
        (JSC::DFG::StrengthReductionPhase::convertToIdentityOverChild):
        (JSC::DFG::StrengthReductionPhase::convertToIdentityOverChild1):
        (JSC::DFG::StrengthReductionPhase::convertToIdentityOverChild2):
        * ftl/FTLFormattedValue.h:
        (JSC::FTL::int32Value):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
        * ftl/FTLValueFormat.cpp:
        (JSC::FTL::reboxAccordingToFormat):
        (WTF::printInternal):
        * ftl/FTLValueFormat.h:
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        * jit/JIT.h:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::emit_op_urshift):
        (JSC::JIT::emitSlow_op_urshift):
        (JSC::JIT::emit_op_unsigned):
        (JSC::JIT::emitSlow_op_unsigned):
        * jit/JITArithmetic32_64.cpp:
        (JSC::JIT::emitRightShift):
        (JSC::JIT::emitRightShiftSlowCase):
        (JSC::JIT::emit_op_unsigned):
        (JSC::JIT::emitSlow_op_unsigned):
        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:
        * runtime/CommonSlowPaths.cpp:
        (JSC::SLOW_PATH_DECL):
        * runtime/CommonSlowPaths.h:

2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213
2013-12-13  Mark Hahnenberg  <mhahnenberg@apple.com>

        LLInt should not conditionally branch to to labels outside of its function
        https://bugs.webkit.org/show_bug.cgi?id=125713

        Reviewed by Geoffrey Garen.

        Conditional branches are insufficient for jumping to out-of-function labels.
        The fix is to use an unconditional jmp to the label combined with a conditional branch around the jmp.

        * llint/LowLevelInterpreter32_64.asm:
        * llint/LowLevelInterpreter64.asm:

2214 2215 2216 2217 2218 2219 2220 2221 2222
2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>

        [GTK] Remove Warnings in building about duplicate INSPECTOR variables
        https://bugs.webkit.org/show_bug.cgi?id=125710

        Reviewed by Tim Horton.

        * GNUmakefile.am:

2223 2224 2225 2226 2227 2228 2229 2230 2231 2232
2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>

        Cleanup CodeGeneratorInspectorStrings a bit
        https://bugs.webkit.org/show_bug.cgi?id=125705

        Reviewed by Timothy Hatcher.

        * inspector/scripts/CodeGeneratorInspectorStrings.py:
        Use ${foo} variable syntax and add an ASCIILiteral.

2233 2234 2235 2236 2237 2238 2239
2013-12-13  Brent Fulgham  <bfulgham@apple.com>

        [Win] Unreviewed build fix after r160563

        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Missed the Debug
        target in my last patch.

2240 2241 2242 2243 2244 2245 2246 2247 2248
2013-12-13  Brent Fulgham  <bfulgham@apple.com>

        [Win] Unreviewed build fix after r160548

        * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Specify
        that we are using the vs12_xp target for Makefile-based projects.
        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Ditto
        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Ditto.

2249 2250 2251 2252 2253 2254 2255 2256 2257
2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>

        Make inspector folder groups smarter in JavaScriptCore.xcodeproj
        https://bugs.webkit.org/show_bug.cgi?id=125663

        Reviewed by Darin Adler.

        * JavaScriptCore.xcodeproj/project.pbxproj:

2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292
2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
        https://bugs.webkit.org/show_bug.cgi?id=125595

        Reviewed by Timothy Hatcher.

          - Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
          - For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
          - Update CodeGeneratorInspector.py in a few ways:
            - output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
            - take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
              that are generated elsewhere that we can depend on for Types.
          - Add DerivedSources build step to generate the Inspector Interfaces

        * CMakeLists.txt:
        * DerivedSources.make:
        * GNUmakefile.am:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
        * JavaScriptCore.vcxproj/copy-files.cmd:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        Add scripts and code generation.

        * inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
        Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.

        * inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
        Updates to the script as listed above.

        * inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
        * inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
        Moved from WebCore into JavaScriptCore for code generation.

2293 2294 2295 2296 2297 2298 2299 2300 2301 2302
2013-12-13  Peter Szanka  <h868064@stud.u-szeged.hu>

        Delete INTEL C compiler related code parts.
        https://bugs.webkit.org/show_bug.cgi?id=125625

        Reviewed by Darin Adler.

        * jsc.cpp:
        * testRegExp.cpp:

2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316
2013-12-13  Brent Fulgham  <bfulgham@apple.com>

        [Win] Switch WebKit solution to Visual Studio 2013
        https://bugs.webkit.org/show_bug.cgi?id=125192

        Reviewed by Anders Carlsson.

        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Update for VS2013
        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
        Ditto
        * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Ditto
        * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto
        * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto

2317 2318 2319 2320 2321 2322 2323 2324 2325 2326
2013-12-12  Joseph Pecoraro  <pecoraro@apple.com>

        Add a few more ASCIILiterals
        https://bugs.webkit.org/show_bug.cgi?id=125662

        Reviewed by Darin Adler.

        * inspector/InspectorBackendDispatcher.cpp:
        (Inspector::InspectorBackendDispatcher::dispatch):

2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343
2013-12-12  Joseph Pecoraro  <pecoraro@apple.com>

        Test new JSContext name APIs
        https://bugs.webkit.org/show_bug.cgi?id=125607

        Reviewed by Darin Adler.

        * API/JSContext.h:
        * API/JSContextRef.h:
        Fix whitespace issues.

        * API/tests/testapi.c:
        (globalContextNameTest):
        (main):
        * API/tests/testapi.mm:
        Add tests for JSContext set/get name APIs.

2344 2345 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 2382
2013-12-11  Filip Pizlo  <fpizlo@apple.com>

        ARM64: Hang running pdfjs test, suspect DFG generated code for "in"
        https://bugs.webkit.org/show_bug.cgi?id=124727
        <rdar://problem/15566923>

        Reviewed by Michael Saboff.
        
        Get rid of In's hackish use of StructureStubInfo. Previously it was using hotPathBegin,
        and it was the only IC that used that field, which was wasteful. Moreover, it used it
        to store two separate locations: the label for patching the jump and the label right
        after the jump. The code was relying on those two being the same label, which is true
        on X86 and some other platforms, but it isn't true on ARM64.
        
        This gets rid of hotPathBegin and makes In express those two locations as offsets from
        the callReturnLocation, which is analogous to what the other IC's do.
        
        This fixes a bug where any successful In patching would result in a trivially infinite
        loop - and hence a hang - on ARM64.

        * bytecode/StructureStubInfo.h:
        * dfg/DFGJITCompiler.cpp:
        (JSC::DFG::JITCompiler::link):
        * dfg/DFGJITCompiler.h:
        (JSC::DFG::InRecord::InRecord):
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileIn):
        * jit/JITInlineCacheGenerator.cpp:
        (JSC::JITByIdGenerator::finalize):
        * jit/Repatch.cpp:
        (JSC::replaceWithJump):
        (JSC::patchJumpToGetByIdStub):
        (JSC::tryCachePutByID):
        (JSC::tryBuildPutByIdList):
        (JSC::tryRepatchIn):
        (JSC::resetGetByID):
        (JSC::resetPutByID):
        (JSC::resetIn):

2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411
2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
        https://bugs.webkit.org/show_bug.cgi?id=125324

        Reviewed by Timothy Hatcher.

        * CMakeLists.txt:
        * GNUmakefile.am:
        * GNUmakefile.list.am:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
        * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
        * JavaScriptCore.vcxproj/copy-files.cmd:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bindings/ScriptFunctionCall.cpp: Renamed from Source/WebCore/bindings/js/ScriptFunctionCall.cpp.
        * bindings/ScriptFunctionCall.h: Renamed from Source/WebCore/bindings/js/ScriptFunctionCall.h.
        * bindings/ScriptObject.cpp: Copied from Source/WebCore/inspector/WorkerConsoleAgent.cpp.
        * bindings/ScriptObject.h: Renamed from Source/WebCore/inspector/InspectorBaseAgent.h.
        * bindings/ScriptValue.cpp: Renamed from Source/WebCore/bindings/js/ScriptValue.cpp.
        * bindings/ScriptValue.h: Renamed from Source/WebCore/bindings/js/ScriptValue.h.
        * inspector/InspectorAgentBase.h: Copied from Source/WebCore/inspector/InspectorAgentRegistry.h.
        * inspector/InspectorAgentRegistry.cpp: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.cpp.
        * inspector/InspectorBackendDispatcher.h: Renamed from Source/WebCore/inspector/InspectorBackendDispatcher.h.
        (Inspector::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
        (Inspector::InspectorSupplementalBackendDispatcher::~InspectorSupplementalBackendDispatcher):
        * inspector/InspectorValues.cpp: Renamed from Source/WebCore/inspector/InspectorValues.cpp.
        * inspector/InspectorValues.h: Renamed from Source/WebCore/inspector/InspectorValues.h.

2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423
2013-12-11  Laszlo Vidacs  <lac@inf.u-szeged.hu>

        Store SHA1 hash in std::array
        https://bugs.webkit.org/show_bug.cgi?id=125446

        Reviewed by Darin Adler.

        Change Vector to std::array and use typedef.

        * bytecode/CodeBlockHash.cpp:
        (JSC::CodeBlockHash::CodeBlockHash):

2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447
2013-12-11  Mark Rowe  <mrowe@apple.com>

        <https://webkit.org/b/125141> Modernize the JavaScriptCore API headers
        <rdar://problem/15540121>

        This consists of three main changes:
        1) Converting the return type of initializer methods to instancetype.
        2) Declaring properties rather than getters and setters.
        3) Tagging C API methods with information about their memory management semantics.

        Changing the declarations from getters and setters to properties also required
        updating the headerdoc in a number of places.

        Reviewed by Anders Carlsson.

        * API/JSContext.h:
        * API/JSContext.mm:
        * API/JSManagedValue.h:
        * API/JSManagedValue.mm:
        * API/JSStringRefCF.h:
        * API/JSValue.h:
        * API/JSVirtualMachine.h:
        * API/JSVirtualMachine.mm:

2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469
2013-12-11  Mark Rowe  <mrowe@apple.com>

        <https://webkit.org/b/125559> Move JavaScriptCore off the legacy WebKit availability macros

        The legacy WebKit availability macros are verbose, confusing, and provide no benefit over
        using the system availability macros directly. The original vision was that they'd serve
        a cross-platform purpose but that never came to be.

        Map from WebKit version to OS X version based on the mapping in WebKitAvailability.h.
        All iOS versions are specified as 7.0 as that is when the JavaScriptCore C API was made
        public.

        Part of <rdar://problem/15512304>.

        Reviewed by Anders Carlsson.

        * API/JSBasePrivate.h:
        * API/JSContextRef.h:
        * API/JSContextRefPrivate.h:
        * API/JSObjectRef.h:
        * API/JSValueRef.h:

2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496
2013-12-10  Filip Pizlo  <fpizlo@apple.com>

        Get rid of forward exit on DoubleAsInt32
        https://bugs.webkit.org/show_bug.cgi?id=125552

        Reviewed by Oliver Hunt.
        
        The forward exit was just there so that we wouldn't have to keep the inputs alive up to
        the DoubleAsInt32. That's dumb. Forward exits are a complicated piece of machinery and
        we shouldn't have it just for a bit of liveness micro-optimization.
        
        Also add a bunch of machinery to test this case on X86.

        * assembler/AbstractMacroAssembler.h:
        (JSC::optimizeForARMv7s):
        (JSC::optimizeForARM64):
        (JSC::optimizeForX86):
        * dfg/DFGFixupPhase.cpp:
        (JSC::DFG::FixupPhase::fixupNode):
        * dfg/DFGNodeType.h:
        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileDoubleAsInt32):
        * runtime/Options.h:
        * tests/stress/double-as-int32.js: Added.
        (foo):
        (test):

2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511
2013-12-10  Filip Pizlo  <fpizlo@apple.com>

        Simplify CSE's treatment of NodeRelevantToOSR
        https://bugs.webkit.org/show_bug.cgi?id=125538

        Reviewed by Oliver Hunt.
        
        Make the NodeRelevantToOSR thing obvious: if there is any MovHint on a node then the
        node is relevant to OSR.

        * dfg/DFGCSEPhase.cpp:
        (JSC::DFG::CSEPhase::run):
        (JSC::DFG::CSEPhase::performNodeCSE):
        (JSC::DFG::CSEPhase::performBlockCSE):

2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523
2013-12-10  Filip Pizlo  <fpizlo@apple.com>

        Get rid of forward exit in GetByVal on Uint32Array
        https://bugs.webkit.org/show_bug.cgi?id=125543

        Reviewed by Oliver Hunt.

        * dfg/DFGSpeculativeJIT.cpp:
        (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
        * ftl/FTLLowerDFGToLLVM.cpp:
        (JSC::FTL::LowerDFGToLLVM::compileGetByVal):

2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534
2013-12-10  Balazs Kilvady  <kilvadyb@homejinni.com>

        [MIPS] Redundant instructions in code generated from offlineasm.
        https://bugs.webkit.org/show_bug.cgi?id=125528

        Reviewed by Michael Saboff.

        Optimize lowering of offlineasm BaseIndex Addresses.

        * offlineasm/mips.rb:

2535 2536 2537 2538 2539 2540