Create a super rough prototype of B3
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 23:57:04 +0000 (23:57 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Oct 2015 23:57:04 +0000 (23:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150280

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

This changeset adds the basic scaffolding of the B3 compiler. B3 stands for Bare Bones
Backend. It's a low-level SSA-based language-agnostic compiler. The basic structure allows
for aggressive C-level optimizations and an awesome portable backend. The backend, called
Air (Assembly IR), is a reflective abstraction over our MacroAssembler. The abstraction is
defined using a spec file (AirOpcode.opcodes) which describes the various kinds of
instructions that we wish to support. Then, the B3::LowerToAir phase, which does our
instruction selection, reflectively selects Air opcodes by querying which instruction forms
are possible. Air allows for optimal register allocation and stack layout. Currently the
register allocator isn't written, but the stack layout is.

Of course this isn't done yet. It can only compile simple programs, seen in the "test suite"
called "testb3.cpp". There's a lot of optimizations that have to be written and a lot of
stuff added to the instruction selector. But it's a neat start.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/MacroAssembler.cpp:
(WTF::printInternal):
* assembler/MacroAssembler.h:
* b3: Added.
* b3/B3AddressMatcher.patterns: Added.
* b3/B3ArgumentRegValue.cpp: Added.
(JSC::B3::ArgumentRegValue::~ArgumentRegValue):
(JSC::B3::ArgumentRegValue::dumpMeta):
* b3/B3ArgumentRegValue.h: Added.
* b3/B3BasicBlock.cpp: Added.
(JSC::B3::BasicBlock::BasicBlock):
(JSC::B3::BasicBlock::~BasicBlock):
(JSC::B3::BasicBlock::append):
(JSC::B3::BasicBlock::addPredecessor):
(JSC::B3::BasicBlock::removePredecessor):
(JSC::B3::BasicBlock::replacePredecessor):
(JSC::B3::BasicBlock::removeNops):
(JSC::B3::BasicBlock::dump):
(JSC::B3::BasicBlock::deepDump):
* b3/B3BasicBlock.h: Added.
(JSC::B3::BasicBlock::index):
(JSC::B3::BasicBlock::begin):
(JSC::B3::BasicBlock::end):
(JSC::B3::BasicBlock::size):
(JSC::B3::BasicBlock::at):
(JSC::B3::BasicBlock::last):
(JSC::B3::BasicBlock::values):
(JSC::B3::BasicBlock::numPredecessors):
(JSC::B3::BasicBlock::predecessor):
(JSC::B3::BasicBlock::predecessors):
(JSC::B3::BasicBlock::frequency):
(JSC::B3::DeepBasicBlockDump::DeepBasicBlockDump):
(JSC::B3::DeepBasicBlockDump::dump):
(JSC::B3::deepDump):
* b3/B3BasicBlockInlines.h: Added.
(JSC::B3::BasicBlock::appendNew):
(JSC::B3::BasicBlock::numSuccessors):
(JSC::B3::BasicBlock::successor):
(JSC::B3::BasicBlock::successors):
(JSC::B3::BasicBlock::successorBlock):
(JSC::B3::BasicBlock::successorBlocks):
* b3/B3BasicBlockUtils.h: Added.
(JSC::B3::addPredecessor):
(JSC::B3::removePredecessor):
(JSC::B3::replacePredecessor):
(JSC::B3::resetReachability):
(JSC::B3::blocksInPreOrder):
(JSC::B3::blocksInPostOrder):
* b3/B3BlockWorklist.h: Added.
* b3/B3CheckSpecial.cpp: Added.
(JSC::B3::Air::numB3Args):
(JSC::B3::CheckSpecial::CheckSpecial):
(JSC::B3::CheckSpecial::~CheckSpecial):
(JSC::B3::CheckSpecial::hiddenBranch):
(JSC::B3::CheckSpecial::forEachArg):
(JSC::B3::CheckSpecial::isValid):
(JSC::B3::CheckSpecial::admitsStack):
(JSC::B3::CheckSpecial::generate):
(JSC::B3::CheckSpecial::dumpImpl):
(JSC::B3::CheckSpecial::deepDumpImpl):
* b3/B3CheckSpecial.h: Added.
* b3/B3CheckValue.cpp: Added.
(JSC::B3::CheckValue::~CheckValue):
(JSC::B3::CheckValue::dumpMeta):
* b3/B3CheckValue.h: Added.
* b3/B3Common.cpp: Added.
(JSC::B3::shouldDumpIR):
(JSC::B3::shouldDumpIRAtEachPhase):
(JSC::B3::shouldValidateIR):
(JSC::B3::shouldValidateIRAtEachPhase):
(JSC::B3::shouldSaveIRBeforePhase):
* b3/B3Common.h: Added.
(JSC::B3::is64Bit):
(JSC::B3::is32Bit):
* b3/B3Commutativity.cpp: Added.
(WTF::printInternal):
* b3/B3Commutativity.h: Added.
* b3/B3Const32Value.cpp: Added.
(JSC::B3::Const32Value::~Const32Value):
(JSC::B3::Const32Value::negConstant):
(JSC::B3::Const32Value::addConstant):
(JSC::B3::Const32Value::subConstant):
(JSC::B3::Const32Value::dumpMeta):
* b3/B3Const32Value.h: Added.
* b3/B3Const64Value.cpp: Added.
(JSC::B3::Const64Value::~Const64Value):
(JSC::B3::Const64Value::negConstant):
(JSC::B3::Const64Value::addConstant):
(JSC::B3::Const64Value::subConstant):
(JSC::B3::Const64Value::dumpMeta):
* b3/B3Const64Value.h: Added.
* b3/B3ConstDoubleValue.cpp: Added.
(JSC::B3::ConstDoubleValue::~ConstDoubleValue):
(JSC::B3::ConstDoubleValue::negConstant):
(JSC::B3::ConstDoubleValue::addConstant):
(JSC::B3::ConstDoubleValue::subConstant):
(JSC::B3::ConstDoubleValue::dumpMeta):
* b3/B3ConstDoubleValue.h: Added.
(JSC::B3::ConstDoubleValue::accepts):
(JSC::B3::ConstDoubleValue::value):
(JSC::B3::ConstDoubleValue::ConstDoubleValue):
* b3/B3ConstPtrValue.h: Added.
(JSC::B3::ConstPtrValue::value):
(JSC::B3::ConstPtrValue::ConstPtrValue):
* b3/B3ControlValue.cpp: Added.
(JSC::B3::ControlValue::~ControlValue):
(JSC::B3::ControlValue::dumpMeta):
* b3/B3ControlValue.h: Added.
* b3/B3Effects.cpp: Added.
(JSC::B3::Effects::dump):
* b3/B3Effects.h: Added.
(JSC::B3::Effects::mustExecute):
* b3/B3FrequencyClass.cpp: Added.
(WTF::printInternal):
* b3/B3FrequencyClass.h: Added.
* b3/B3FrequentedBlock.h: Added.
* b3/B3Generate.cpp: Added.
(JSC::B3::generate):
(JSC::B3::generateToAir):
* b3/B3Generate.h: Added.
* b3/B3GenericFrequentedBlock.h: Added.
(JSC::B3::GenericFrequentedBlock::GenericFrequentedBlock):
(JSC::B3::GenericFrequentedBlock::operator==):
(JSC::B3::GenericFrequentedBlock::operator!=):
(JSC::B3::GenericFrequentedBlock::operator bool):
(JSC::B3::GenericFrequentedBlock::block):
(JSC::B3::GenericFrequentedBlock::frequency):
(JSC::B3::GenericFrequentedBlock::dump):
* b3/B3HeapRange.cpp: Added.
(JSC::B3::HeapRange::dump):
* b3/B3HeapRange.h: Added.
(JSC::B3::HeapRange::HeapRange):
(JSC::B3::HeapRange::top):
(JSC::B3::HeapRange::operator==):
(JSC::B3::HeapRange::operator!=):
(JSC::B3::HeapRange::operator bool):
(JSC::B3::HeapRange::begin):
(JSC::B3::HeapRange::end):
(JSC::B3::HeapRange::overlaps):
* b3/B3IndexMap.h: Added.
(JSC::B3::IndexMap::IndexMap):
(JSC::B3::IndexMap::resize):
(JSC::B3::IndexMap::operator[]):
* b3/B3IndexSet.h: Added.
(JSC::B3::IndexSet::IndexSet):
(JSC::B3::IndexSet::add):
(JSC::B3::IndexSet::contains):
(JSC::B3::IndexSet::Iterable::Iterable):
(JSC::B3::IndexSet::Iterable::iterator::iterator):
(JSC::B3::IndexSet::Iterable::iterator::operator*):
(JSC::B3::IndexSet::Iterable::iterator::operator++):
(JSC::B3::IndexSet::Iterable::iterator::operator==):
(JSC::B3::IndexSet::Iterable::iterator::operator!=):
(JSC::B3::IndexSet::Iterable::begin):
(JSC::B3::IndexSet::Iterable::end):
(JSC::B3::IndexSet::values):
(JSC::B3::IndexSet::indices):
(JSC::B3::IndexSet::dump):
* b3/B3InsertionSet.cpp: Added.
(JSC::B3::InsertionSet::execute):
* b3/B3InsertionSet.h: Added.
(JSC::B3::InsertionSet::InsertionSet):
(JSC::B3::InsertionSet::code):
(JSC::B3::InsertionSet::appendInsertion):
(JSC::B3::InsertionSet::insertValue):
* b3/B3InsertionSetInlines.h: Added.
(JSC::B3::InsertionSet::insert):
* b3/B3LowerToAir.cpp: Added.
(JSC::B3::Air::LowerToAir::LowerToAir):
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::tmp):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::addr):
(JSC::B3::Air::LowerToAir::loadAddr):
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::immOrTmp):
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::moveForType):
(JSC::B3::Air::LowerToAir::relaxedMoveForType):
(JSC::B3::Air::LowerToAir::append):
(JSC::B3::Air::LowerToAir::AddressSelector::AddressSelector):
(JSC::B3::Air::LowerToAir::AddressSelector::acceptRoot):
(JSC::B3::Air::LowerToAir::AddressSelector::acceptRootLate):
(JSC::B3::Air::LowerToAir::AddressSelector::acceptInternals):
(JSC::B3::Air::LowerToAir::AddressSelector::acceptInternalsLate):
(JSC::B3::Air::LowerToAir::AddressSelector::acceptOperands):
(JSC::B3::Air::LowerToAir::AddressSelector::acceptOperandsLate):
(JSC::B3::Air::LowerToAir::AddressSelector::tryAddShift1):
(JSC::B3::Air::LowerToAir::AddressSelector::tryAddShift2):
(JSC::B3::Air::LowerToAir::AddressSelector::tryAdd):
(JSC::B3::Air::LowerToAir::AddressSelector::tryDirect):
(JSC::B3::Air::LowerToAir::acceptRoot):
(JSC::B3::Air::LowerToAir::acceptRootLate):
(JSC::B3::Air::LowerToAir::acceptInternals):
(JSC::B3::Air::LowerToAir::acceptInternalsLate):
(JSC::B3::Air::LowerToAir::acceptOperands):
(JSC::B3::Air::LowerToAir::acceptOperandsLate):
(JSC::B3::Air::LowerToAir::tryLoad):
(JSC::B3::Air::LowerToAir::tryAdd):
(JSC::B3::Air::LowerToAir::tryAnd):
(JSC::B3::Air::LowerToAir::tryStoreAddLoad):
(JSC::B3::Air::LowerToAir::tryStoreAndLoad):
(JSC::B3::Air::LowerToAir::tryStore):
(JSC::B3::Air::LowerToAir::tryTruncArgumentReg):
(JSC::B3::Air::LowerToAir::tryTrunc):
(JSC::B3::Air::LowerToAir::tryArgumentReg):
(JSC::B3::Air::LowerToAir::tryConst32):
(JSC::B3::Air::LowerToAir::tryConst64):
(JSC::B3::Air::LowerToAir::tryIdentity):
(JSC::B3::Air::LowerToAir::tryReturn):
(JSC::B3::lowerToAir):
* b3/B3LowerToAir.h: Added.
* b3/B3LoweringMatcher.patterns: Added.
* b3/B3MemoryValue.cpp: Added.
(JSC::B3::MemoryValue::~MemoryValue):
(JSC::B3::MemoryValue::dumpMeta):
* b3/B3MemoryValue.h: Added.
* b3/B3Opcode.cpp: Added.
(WTF::printInternal):
* b3/B3Opcode.h: Added.
(JSC::B3::isCheckMath):
* b3/B3Origin.cpp: Added.
(JSC::B3::Origin::dump):
* b3/B3Origin.h: Added.
(JSC::B3::Origin::Origin):
(JSC::B3::Origin::operator bool):
(JSC::B3::Origin::data):
* b3/B3PatchpointSpecial.cpp: Added.
(JSC::B3::PatchpointSpecial::PatchpointSpecial):
(JSC::B3::PatchpointSpecial::~PatchpointSpecial):
(JSC::B3::PatchpointSpecial::forEachArg):
(JSC::B3::PatchpointSpecial::isValid):
(JSC::B3::PatchpointSpecial::admitsStack):
(JSC::B3::PatchpointSpecial::generate):
(JSC::B3::PatchpointSpecial::dumpImpl):
(JSC::B3::PatchpointSpecial::deepDumpImpl):
* b3/B3PatchpointSpecial.h: Added.
* b3/B3PatchpointValue.cpp: Added.
(JSC::B3::PatchpointValue::~PatchpointValue):
(JSC::B3::PatchpointValue::dumpMeta):
* b3/B3PatchpointValue.h: Added.
(JSC::B3::PatchpointValue::accepts):
(JSC::B3::PatchpointValue::PatchpointValue):
* b3/B3PhaseScope.cpp: Added.
(JSC::B3::PhaseScope::PhaseScope):
(JSC::B3::PhaseScope::~PhaseScope):
* b3/B3PhaseScope.h: Added.
* b3/B3Procedure.cpp: Added.
(JSC::B3::Procedure::Procedure):
(JSC::B3::Procedure::~Procedure):
(JSC::B3::Procedure::addBlock):
(JSC::B3::Procedure::resetReachability):
(JSC::B3::Procedure::dump):
(JSC::B3::Procedure::blocksInPreOrder):
(JSC::B3::Procedure::blocksInPostOrder):
* b3/B3Procedure.h: Added.
(JSC::B3::Procedure::size):
(JSC::B3::Procedure::at):
(JSC::B3::Procedure::operator[]):
(JSC::B3::Procedure::iterator::iterator):
(JSC::B3::Procedure::iterator::operator*):
(JSC::B3::Procedure::iterator::operator++):
(JSC::B3::Procedure::iterator::operator==):
(JSC::B3::Procedure::iterator::operator!=):
(JSC::B3::Procedure::iterator::findNext):
(JSC::B3::Procedure::begin):
(JSC::B3::Procedure::end):
(JSC::B3::Procedure::ValuesCollection::ValuesCollection):
(JSC::B3::Procedure::ValuesCollection::iterator::iterator):
(JSC::B3::Procedure::ValuesCollection::iterator::operator*):
(JSC::B3::Procedure::ValuesCollection::iterator::operator++):
(JSC::B3::Procedure::ValuesCollection::iterator::operator==):
(JSC::B3::Procedure::ValuesCollection::iterator::operator!=):
(JSC::B3::Procedure::ValuesCollection::begin):
(JSC::B3::Procedure::ValuesCollection::end):
(JSC::B3::Procedure::ValuesCollection::size):
(JSC::B3::Procedure::ValuesCollection::at):
(JSC::B3::Procedure::ValuesCollection::operator[]):
(JSC::B3::Procedure::values):
(JSC::B3::Procedure::setLastPhaseName):
(JSC::B3::Procedure::lastPhaseName):
* b3/B3ProcedureInlines.h: Added.
(JSC::B3::Procedure::add):
* b3/B3ReduceStrength.cpp: Added.
(JSC::B3::reduceStrength):
* b3/B3ReduceStrength.h: Added.
* b3/B3StackSlotKind.cpp: Added.
(WTF::printInternal):
* b3/B3StackSlotKind.h: Added.
* b3/B3StackSlotValue.cpp: Added.
(JSC::B3::StackSlotValue::~StackSlotValue):
(JSC::B3::StackSlotValue::dumpMeta):
* b3/B3StackSlotValue.h: Added.
(JSC::B3::StackSlotValue::accepts):
(JSC::B3::StackSlotValue::byteSize):
(JSC::B3::StackSlotValue::kind):
(JSC::B3::StackSlotValue::offsetFromFP):
(JSC::B3::StackSlotValue::setOffsetFromFP):
(JSC::B3::StackSlotValue::StackSlotValue):
* b3/B3Stackmap.cpp: Added.
(JSC::B3::Stackmap::Stackmap):
(JSC::B3::Stackmap::~Stackmap):
(JSC::B3::Stackmap::dump):
* b3/B3Stackmap.h: Added.
(JSC::B3::Stackmap::constrain):
(JSC::B3::Stackmap::reps):
(JSC::B3::Stackmap::clobber):
(JSC::B3::Stackmap::clobbered):
(JSC::B3::Stackmap::setGenerator):
* b3/B3StackmapSpecial.cpp: Added.
(JSC::B3::StackmapSpecial::StackmapSpecial):
(JSC::B3::StackmapSpecial::~StackmapSpecial):
(JSC::B3::StackmapSpecial::reportUsedRegisters):
(JSC::B3::StackmapSpecial::extraClobberedRegs):
(JSC::B3::StackmapSpecial::forEachArgImpl):
(JSC::B3::StackmapSpecial::isValidImpl):
(JSC::B3::StackmapSpecial::admitsStackImpl):
(JSC::B3::StackmapSpecial::appendRepsImpl):
(JSC::B3::StackmapSpecial::repForArg):
* b3/B3StackmapSpecial.h: Added.
* b3/B3SuccessorCollection.h: Added.
(JSC::B3::SuccessorCollection::SuccessorCollection):
(JSC::B3::SuccessorCollection::size):
(JSC::B3::SuccessorCollection::at):
(JSC::B3::SuccessorCollection::operator[]):
(JSC::B3::SuccessorCollection::iterator::iterator):
(JSC::B3::SuccessorCollection::iterator::operator*):
(JSC::B3::SuccessorCollection::iterator::operator++):
(JSC::B3::SuccessorCollection::iterator::operator==):
(JSC::B3::SuccessorCollection::iterator::operator!=):
(JSC::B3::SuccessorCollection::begin):
(JSC::B3::SuccessorCollection::end):
* b3/B3SwitchCase.cpp: Added.
(JSC::B3::SwitchCase::dump):
* b3/B3SwitchCase.h: Added.
(JSC::B3::SwitchCase::SwitchCase):
(JSC::B3::SwitchCase::operator bool):
(JSC::B3::SwitchCase::caseValue):
(JSC::B3::SwitchCase::target):
(JSC::B3::SwitchCase::targetBlock):
* b3/B3SwitchValue.cpp: Added.
(JSC::B3::SwitchValue::~SwitchValue):
(JSC::B3::SwitchValue::removeCase):
(JSC::B3::SwitchValue::appendCase):
(JSC::B3::SwitchValue::dumpMeta):
(JSC::B3::SwitchValue::SwitchValue):
* b3/B3SwitchValue.h: Added.
(JSC::B3::SwitchValue::accepts):
(JSC::B3::SwitchValue::numCaseValues):
(JSC::B3::SwitchValue::caseValue):
(JSC::B3::SwitchValue::caseValues):
(JSC::B3::SwitchValue::fallThrough):
(JSC::B3::SwitchValue::size):
(JSC::B3::SwitchValue::at):
(JSC::B3::SwitchValue::operator[]):
(JSC::B3::SwitchValue::iterator::iterator):
(JSC::B3::SwitchValue::iterator::operator*):
(JSC::B3::SwitchValue::iterator::operator++):
(JSC::B3::SwitchValue::iterator::operator==):
(JSC::B3::SwitchValue::iterator::operator!=):
(JSC::B3::SwitchValue::begin):
(JSC::B3::SwitchValue::end):
* b3/B3Type.cpp: Added.
(WTF::printInternal):
* b3/B3Type.h: Added.
(JSC::B3::isInt):
(JSC::B3::isFloat):
(JSC::B3::pointerType):
* b3/B3UpsilonValue.cpp: Added.
(JSC::B3::UpsilonValue::~UpsilonValue):
(JSC::B3::UpsilonValue::dumpMeta):
* b3/B3UpsilonValue.h: Added.
(JSC::B3::UpsilonValue::accepts):
(JSC::B3::UpsilonValue::phi):
(JSC::B3::UpsilonValue::UpsilonValue):
* b3/B3UseCounts.cpp: Added.
(JSC::B3::UseCounts::UseCounts):
(JSC::B3::UseCounts::~UseCounts):
* b3/B3UseCounts.h: Added.
(JSC::B3::UseCounts::operator[]):
* b3/B3Validate.cpp: Added.
(JSC::B3::validate):
* b3/B3Validate.h: Added.
* b3/B3Value.cpp: Added.
(JSC::B3::Value::~Value):
(JSC::B3::Value::replaceWithIdentity):
(JSC::B3::Value::replaceWithNop):
(JSC::B3::Value::dump):
(JSC::B3::Value::deepDump):
(JSC::B3::Value::negConstant):
(JSC::B3::Value::addConstant):
(JSC::B3::Value::subConstant):
(JSC::B3::Value::effects):
(JSC::B3::Value::performSubstitution):
(JSC::B3::Value::dumpMeta):
(JSC::B3::Value::typeFor):
* b3/B3Value.h: Added.
(JSC::B3::DeepValueDump::DeepValueDump):
(JSC::B3::DeepValueDump::dump):
(JSC::B3::deepDump):
* b3/B3ValueInlines.h: Added.
(JSC::B3::Value::as):
(JSC::B3::Value::isConstant):
(JSC::B3::Value::hasInt32):
(JSC::B3::Value::asInt32):
(JSC::B3::Value::hasInt64):
(JSC::B3::Value::asInt64):
(JSC::B3::Value::hasInt):
(JSC::B3::Value::asInt):
(JSC::B3::Value::isInt):
(JSC::B3::Value::hasIntPtr):
(JSC::B3::Value::asIntPtr):
(JSC::B3::Value::hasDouble):
(JSC::B3::Value::asDouble):
(JSC::B3::Value::stackmap):
* b3/B3ValueRep.cpp: Added.
(JSC::B3::ValueRep::dump):
(WTF::printInternal):
* b3/B3ValueRep.h: Added.
(JSC::B3::ValueRep::ValueRep):
(JSC::B3::ValueRep::reg):
(JSC::B3::ValueRep::stack):
(JSC::B3::ValueRep::stackArgument):
(JSC::B3::ValueRep::constant):
(JSC::B3::ValueRep::constantDouble):
(JSC::B3::ValueRep::kind):
(JSC::B3::ValueRep::operator bool):
(JSC::B3::ValueRep::offsetFromFP):
(JSC::B3::ValueRep::offsetFromSP):
(JSC::B3::ValueRep::value):
(JSC::B3::ValueRep::doubleValue):
* b3/air: Added.
* b3/air/AirAllocateStack.cpp: Added.
(JSC::B3::Air::allocateStack):
* b3/air/AirAllocateStack.h: Added.
* b3/air/AirArg.cpp: Added.
(JSC::B3::Air::Arg::dump):
* b3/air/AirArg.h: Added.
(JSC::B3::Air::Arg::isUse):
(JSC::B3::Air::Arg::isDef):
(JSC::B3::Air::Arg::typeForB3Type):
(JSC::B3::Air::Arg::Arg):
(JSC::B3::Air::Arg::imm):
(JSC::B3::Air::Arg::imm64):
(JSC::B3::Air::Arg::addr):
(JSC::B3::Air::Arg::stack):
(JSC::B3::Air::Arg::callArg):
(JSC::B3::Air::Arg::isValidScale):
(JSC::B3::Air::Arg::logScale):
(JSC::B3::Air::Arg::index):
(JSC::B3::Air::Arg::relCond):
(JSC::B3::Air::Arg::resCond):
(JSC::B3::Air::Arg::special):
(JSC::B3::Air::Arg::operator==):
(JSC::B3::Air::Arg::operator!=):
(JSC::B3::Air::Arg::operator bool):
(JSC::B3::Air::Arg::kind):
(JSC::B3::Air::Arg::isTmp):
(JSC::B3::Air::Arg::isImm):
(JSC::B3::Air::Arg::isImm64):
(JSC::B3::Air::Arg::isAddr):
(JSC::B3::Air::Arg::isStack):
(JSC::B3::Air::Arg::isCallArg):
(JSC::B3::Air::Arg::isIndex):
(JSC::B3::Air::Arg::isRelCond):
(JSC::B3::Air::Arg::isResCond):
(JSC::B3::Air::Arg::isSpecial):
(JSC::B3::Air::Arg::isAlive):
(JSC::B3::Air::Arg::tmp):
(JSC::B3::Air::Arg::value):
(JSC::B3::Air::Arg::pointerValue):
(JSC::B3::Air::Arg::base):
(JSC::B3::Air::Arg::hasOffset):
(JSC::B3::Air::Arg::offset):
(JSC::B3::Air::Arg::stackSlot):
(JSC::B3::Air::Arg::scale):
(JSC::B3::Air::Arg::isGPTmp):
(JSC::B3::Air::Arg::isFPTmp):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::hasType):
(JSC::B3::Air::Arg::type):
(JSC::B3::Air::Arg::isType):
(JSC::B3::Air::Arg::isGPR):
(JSC::B3::Air::Arg::gpr):
(JSC::B3::Air::Arg::isFPR):
(JSC::B3::Air::Arg::fpr):
(JSC::B3::Air::Arg::isReg):
(JSC::B3::Air::Arg::reg):
(JSC::B3::Air::Arg::gpTmpIndex):
(JSC::B3::Air::Arg::fpTmpIndex):
(JSC::B3::Air::Arg::tmpIndex):
(JSC::B3::Air::Arg::withOffset):
(JSC::B3::Air::Arg::forEachTmpFast):
(JSC::B3::Air::Arg::forEachTmp):
(JSC::B3::Air::Arg::asTrustedImm32):
(JSC::B3::Air::Arg::asTrustedImm64):
(JSC::B3::Air::Arg::asTrustedImmPtr):
(JSC::B3::Air::Arg::asAddress):
(JSC::B3::Air::Arg::asBaseIndex):
(JSC::B3::Air::Arg::asRelationalCondition):
(JSC::B3::Air::Arg::asResultCondition):
(JSC::B3::Air::Arg::isHashTableDeletedValue):
(JSC::B3::Air::Arg::hash):
(JSC::B3::Air::ArgHash::hash):
(JSC::B3::Air::ArgHash::equal):
* b3/air/AirBasicBlock.cpp: Added.
(JSC::B3::Air::BasicBlock::addPredecessor):
(JSC::B3::Air::BasicBlock::removePredecessor):
(JSC::B3::Air::BasicBlock::replacePredecessor):
(JSC::B3::Air::BasicBlock::dump):
(JSC::B3::Air::BasicBlock::deepDump):
(JSC::B3::Air::BasicBlock::BasicBlock):
* b3/air/AirBasicBlock.h: Added.
(JSC::B3::Air::BasicBlock::index):
(JSC::B3::Air::BasicBlock::size):
(JSC::B3::Air::BasicBlock::begin):
(JSC::B3::Air::BasicBlock::end):
(JSC::B3::Air::BasicBlock::at):
(JSC::B3::Air::BasicBlock::last):
(JSC::B3::Air::BasicBlock::appendInst):
(JSC::B3::Air::BasicBlock::append):
(JSC::B3::Air::BasicBlock::numSuccessors):
(JSC::B3::Air::BasicBlock::successor):
(JSC::B3::Air::BasicBlock::successors):
(JSC::B3::Air::BasicBlock::successorBlock):
(JSC::B3::Air::BasicBlock::successorBlocks):
(JSC::B3::Air::BasicBlock::numPredecessors):
(JSC::B3::Air::BasicBlock::predecessor):
(JSC::B3::Air::BasicBlock::predecessors):
(JSC::B3::Air::DeepBasicBlockDump::DeepBasicBlockDump):
(JSC::B3::Air::DeepBasicBlockDump::dump):
(JSC::B3::Air::deepDump):
* b3/air/AirCCallSpecial.cpp: Added.
(JSC::B3::Air::CCallSpecial::CCallSpecial):
(JSC::B3::Air::CCallSpecial::~CCallSpecial):
(JSC::B3::Air::CCallSpecial::forEachArg):
(JSC::B3::Air::CCallSpecial::isValid):
(JSC::B3::Air::CCallSpecial::admitsStack):
(JSC::B3::Air::CCallSpecial::reportUsedRegisters):
(JSC::B3::Air::CCallSpecial::generate):
(JSC::B3::Air::CCallSpecial::extraClobberedRegs):
(JSC::B3::Air::CCallSpecial::dumpImpl):
(JSC::B3::Air::CCallSpecial::deepDumpImpl):
* b3/air/AirCCallSpecial.h: Added.
* b3/air/AirCode.cpp: Added.
(JSC::B3::Air::Code::Code):
(JSC::B3::Air::Code::~Code):
(JSC::B3::Air::Code::addBlock):
(JSC::B3::Air::Code::addStackSlot):
(JSC::B3::Air::Code::addSpecial):
(JSC::B3::Air::Code::cCallSpecial):
(JSC::B3::Air::Code::resetReachability):
(JSC::B3::Air::Code::dump):
(JSC::B3::Air::Code::findFirstBlockIndex):
(JSC::B3::Air::Code::findNextBlockIndex):
(JSC::B3::Air::Code::findNextBlock):
* b3/air/AirCode.h: Added.
(JSC::B3::Air::Code::newTmp):
(JSC::B3::Air::Code::numTmps):
(JSC::B3::Air::Code::callArgAreaSize):
(JSC::B3::Air::Code::requestCallArgAreaSize):
(JSC::B3::Air::Code::frameSize):
(JSC::B3::Air::Code::setFrameSize):
(JSC::B3::Air::Code::calleeSaveRegisters):
(JSC::B3::Air::Code::size):
(JSC::B3::Air::Code::at):
(JSC::B3::Air::Code::operator[]):
(JSC::B3::Air::Code::iterator::iterator):
(JSC::B3::Air::Code::iterator::operator*):
(JSC::B3::Air::Code::iterator::operator++):
(JSC::B3::Air::Code::iterator::operator==):
(JSC::B3::Air::Code::iterator::operator!=):
(JSC::B3::Air::Code::begin):
(JSC::B3::Air::Code::end):
(JSC::B3::Air::Code::StackSlotsCollection::StackSlotsCollection):
(JSC::B3::Air::Code::StackSlotsCollection::size):
(JSC::B3::Air::Code::StackSlotsCollection::at):
(JSC::B3::Air::Code::StackSlotsCollection::operator[]):
(JSC::B3::Air::Code::StackSlotsCollection::iterator::iterator):
(JSC::B3::Air::Code::StackSlotsCollection::iterator::operator*):
(JSC::B3::Air::Code::StackSlotsCollection::iterator::operator++):
(JSC::B3::Air::Code::StackSlotsCollection::iterator::operator==):
(JSC::B3::Air::Code::StackSlotsCollection::iterator::operator!=):
(JSC::B3::Air::Code::StackSlotsCollection::begin):
(JSC::B3::Air::Code::StackSlotsCollection::end):
(JSC::B3::Air::Code::stackSlots):
(JSC::B3::Air::Code::SpecialsCollection::SpecialsCollection):
(JSC::B3::Air::Code::SpecialsCollection::size):
(JSC::B3::Air::Code::SpecialsCollection::at):
(JSC::B3::Air::Code::SpecialsCollection::operator[]):
(JSC::B3::Air::Code::SpecialsCollection::iterator::iterator):
(JSC::B3::Air::Code::SpecialsCollection::iterator::operator*):
(JSC::B3::Air::Code::SpecialsCollection::iterator::operator++):
(JSC::B3::Air::Code::SpecialsCollection::iterator::operator==):
(JSC::B3::Air::Code::SpecialsCollection::iterator::operator!=):
(JSC::B3::Air::Code::SpecialsCollection::begin):
(JSC::B3::Air::Code::SpecialsCollection::end):
(JSC::B3::Air::Code::specials):
(JSC::B3::Air::Code::setLastPhaseName):
(JSC::B3::Air::Code::lastPhaseName):
* b3/air/AirFrequentedBlock.h: Added.
* b3/air/AirGenerate.cpp: Added.
(JSC::B3::Air::generate):
* b3/air/AirGenerate.h: Added.
* b3/air/AirGenerated.cpp: Added.
* b3/air/AirGenerationContext.h: Added.
* b3/air/AirHandleCalleeSaves.cpp: Added.
(JSC::B3::Air::handleCalleeSaves):
* b3/air/AirHandleCalleeSaves.h: Added.
* b3/air/AirInsertionSet.cpp: Added.
(JSC::B3::Air::InsertionSet::execute):
* b3/air/AirInsertionSet.h: Added.
(JSC::B3::Air::InsertionSet::InsertionSet):
(JSC::B3::Air::InsertionSet::code):
(JSC::B3::Air::InsertionSet::appendInsertion):
(JSC::B3::Air::InsertionSet::insertInst):
(JSC::B3::Air::InsertionSet::insert):
* b3/air/AirInst.cpp: Added.
(JSC::B3::Air::Inst::dump):
* b3/air/AirInst.h: Added.
(JSC::B3::Air::Inst::Inst):
(JSC::B3::Air::Inst::opcode):
(JSC::B3::Air::Inst::forEachTmpFast):
(JSC::B3::Air::Inst::forEachTmp):
* b3/air/AirInstInlines.h: Added.
(JSC::B3::Air::ForEach<Tmp>::forEach):
(JSC::B3::Air::ForEach<Arg>::forEach):
(JSC::B3::Air::Inst::forEach):
(JSC::B3::Air::Inst::hasSpecial):
(JSC::B3::Air::Inst::extraClobberedRegs):
(JSC::B3::Air::Inst::reportUsedRegisters):
(JSC::B3::Air::isShiftValid):
(JSC::B3::Air::isLshift32Valid):
* b3/air/AirLiveness.h: Added.
(JSC::B3::Air::Liveness::Liveness):
(JSC::B3::Air::Liveness::liveAtHead):
(JSC::B3::Air::Liveness::liveAtTail):
(JSC::B3::Air::Liveness::LocalCalc::LocalCalc):
(JSC::B3::Air::Liveness::LocalCalc::live):
(JSC::B3::Air::Liveness::LocalCalc::takeLive):
(JSC::B3::Air::Liveness::LocalCalc::execute):
* b3/air/AirOpcode.opcodes: Added.
* b3/air/AirPhaseScope.cpp: Added.
(JSC::B3::Air::PhaseScope::PhaseScope):
(JSC::B3::Air::PhaseScope::~PhaseScope):
* b3/air/AirPhaseScope.h: Added.
* b3/air/AirRegisterPriority.cpp: Added.
(JSC::B3::Air::gprsInPriorityOrder):
(JSC::B3::Air::fprsInPriorityOrder):
(JSC::B3::Air::regsInPriorityOrder):
* b3/air/AirRegisterPriority.h: Added.
(JSC::B3::Air::RegistersInPriorityOrder<GPRInfo>::inPriorityOrder):
(JSC::B3::Air::RegistersInPriorityOrder<FPRInfo>::inPriorityOrder):
(JSC::B3::Air::regsInPriorityOrder):
* b3/air/AirSpecial.cpp: Added.
(JSC::B3::Air::Special::Special):
(JSC::B3::Air::Special::~Special):
(JSC::B3::Air::Special::name):
(JSC::B3::Air::Special::dump):
(JSC::B3::Air::Special::deepDump):
* b3/air/AirSpecial.h: Added.
(JSC::B3::Air::DeepSpecialDump::DeepSpecialDump):
(JSC::B3::Air::DeepSpecialDump::dump):
(JSC::B3::Air::deepDump):
* b3/air/AirSpillEverything.cpp: Added.
(JSC::B3::Air::spillEverything):
* b3/air/AirSpillEverything.h: Added.
* b3/air/AirStackSlot.cpp: Added.
(JSC::B3::Air::StackSlot::setOffsetFromFP):
(JSC::B3::Air::StackSlot::dump):
(JSC::B3::Air::StackSlot::deepDump):
(JSC::B3::Air::StackSlot::StackSlot):
* b3/air/AirStackSlot.h: Added.
(JSC::B3::Air::StackSlot::byteSize):
(JSC::B3::Air::StackSlot::kind):
(JSC::B3::Air::StackSlot::index):
(JSC::B3::Air::StackSlot::alignment):
(JSC::B3::Air::StackSlot::value):
(JSC::B3::Air::StackSlot::offsetFromFP):
(JSC::B3::Air::DeepStackSlotDump::DeepStackSlotDump):
(JSC::B3::Air::DeepStackSlotDump::dump):
(JSC::B3::Air::deepDump):
* b3/air/AirTmp.cpp: Added.
(JSC::B3::Air::Tmp::dump):
* b3/air/AirTmp.h: Added.
(JSC::B3::Air::Tmp::Tmp):
(JSC::B3::Air::Tmp::gpTmpForIndex):
(JSC::B3::Air::Tmp::fpTmpForIndex):
(JSC::B3::Air::Tmp::operator bool):
(JSC::B3::Air::Tmp::isGP):
(JSC::B3::Air::Tmp::isFP):
(JSC::B3::Air::Tmp::isGPR):
(JSC::B3::Air::Tmp::isFPR):
(JSC::B3::Air::Tmp::isReg):
(JSC::B3::Air::Tmp::gpr):
(JSC::B3::Air::Tmp::fpr):
(JSC::B3::Air::Tmp::reg):
(JSC::B3::Air::Tmp::hasTmpIndex):
(JSC::B3::Air::Tmp::gpTmpIndex):
(JSC::B3::Air::Tmp::fpTmpIndex):
(JSC::B3::Air::Tmp::tmpIndex):
(JSC::B3::Air::Tmp::isAlive):
(JSC::B3::Air::Tmp::operator==):
(JSC::B3::Air::Tmp::operator!=):
(JSC::B3::Air::Tmp::isHashTableDeletedValue):
(JSC::B3::Air::Tmp::hash):
(JSC::B3::Air::Tmp::encodeGP):
(JSC::B3::Air::Tmp::encodeFP):
(JSC::B3::Air::Tmp::encodeGPR):
(JSC::B3::Air::Tmp::encodeFPR):
(JSC::B3::Air::Tmp::encodeGPTmp):
(JSC::B3::Air::Tmp::encodeFPTmp):
(JSC::B3::Air::Tmp::isEncodedGP):
(JSC::B3::Air::Tmp::isEncodedFP):
(JSC::B3::Air::Tmp::isEncodedGPR):
(JSC::B3::Air::Tmp::isEncodedFPR):
(JSC::B3::Air::Tmp::isEncodedGPTmp):
(JSC::B3::Air::Tmp::isEncodedFPTmp):
(JSC::B3::Air::Tmp::decodeGPR):
(JSC::B3::Air::Tmp::decodeFPR):
(JSC::B3::Air::Tmp::decodeGPTmp):
(JSC::B3::Air::Tmp::decodeFPTmp):
(JSC::B3::Air::TmpHash::hash):
(JSC::B3::Air::TmpHash::equal):
* b3/air/AirTmpInlines.h: Added.
(JSC::B3::Air::Tmp::Tmp):
* b3/air/AirValidate.cpp: Added.
(JSC::B3::Air::validate):
* b3/air/AirValidate.h: Added.
* b3/air/opcode_generator.rb: Added.
* b3/generate_pattern_matcher.rb: Added.
* b3/testb3.cpp: Added.
(JSC::B3::compileAndRun):
(JSC::B3::test42):
(JSC::B3::testLoad42):
(JSC::B3::testArg):
(JSC::B3::testAddArgs):
(JSC::B3::testAddArgs32):
(JSC::B3::testStore):
(JSC::B3::testTrunc):
(JSC::B3::testAdd1):
(JSC::B3::testStoreAddLoad):
(JSC::B3::testStoreAddAndLoad):
(JSC::B3::testAdd1Uncommuted):
(JSC::B3::testLoadOffset):
(JSC::B3::testLoadOffsetNotConstant):
(JSC::B3::testLoadOffsetUsingAdd):
(JSC::B3::testLoadOffsetUsingAddNotConstant):
(JSC::B3::run):
(run):
(main):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::specializationKind):
* jit/Reg.h:
(JSC::Reg::index):
(JSC::Reg::isSet):
(JSC::Reg::operator bool):
(JSC::Reg::isHashTableDeletedValue):
(JSC::Reg::AllRegsIterable::iterator::iterator):
(JSC::Reg::AllRegsIterable::iterator::operator*):
(JSC::Reg::AllRegsIterable::iterator::operator++):
(JSC::Reg::AllRegsIterable::iterator::operator==):
(JSC::Reg::AllRegsIterable::iterator::operator!=):
(JSC::Reg::AllRegsIterable::begin):
(JSC::Reg::AllRegsIterable::end):
(JSC::Reg::all):
(JSC::Reg::invalid):
(JSC::Reg::operator!): Deleted.
* jit/RegisterAtOffsetList.cpp:
(JSC::RegisterAtOffsetList::RegisterAtOffsetList):
* jit/RegisterAtOffsetList.h:
(JSC::RegisterAtOffsetList::clear):
(JSC::RegisterAtOffsetList::size):
(JSC::RegisterAtOffsetList::begin):
(JSC::RegisterAtOffsetList::end):
* jit/RegisterSet.h:
(JSC::RegisterSet::operator==):
(JSC::RegisterSet::hash):
(JSC::RegisterSet::forEach):
(JSC::RegisterSet::setAny):

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/HashSet.h:
(WTF::copyToVector):
(WTF::=):
* wtf/ListDump.h:
(WTF::PointerListDump::PointerListDump):
(WTF::PointerListDump::dump):
(WTF::MapDump::MapDump):
(WTF::listDump):
(WTF::pointerListDump):
(WTF::sortedListDump):
* wtf/MathExtras.h:
(WTF::leftShiftWithSaturation):
(WTF::rangesOverlap):
* wtf/Platform.h:
* wtf/ScopedLambda.h: Added.
(WTF::scopedLambda):
* wtf/SharedTask.h:
(WTF::createSharedTask):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191705 268f45cc-cd09-0410-ab3c-d52691b4dbfc

148 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/DerivedSources.make
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/assembler/MacroAssembler.cpp
Source/JavaScriptCore/assembler/MacroAssembler.h
Source/JavaScriptCore/b3/B3AddressMatcher.patterns [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ArgumentRegValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3BasicBlock.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3BasicBlock.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3BasicBlockInlines.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3BasicBlockUtils.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3BlockWorklist.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3CheckSpecial.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3CheckSpecial.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3CheckValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3CheckValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Common.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Common.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Commutativity.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Commutativity.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Const32Value.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Const32Value.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Const64Value.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Const64Value.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ConstDoubleValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ConstPtrValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ControlValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ControlValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Effects.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Effects.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3FrequencyClass.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3FrequencyClass.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3FrequentedBlock.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Generate.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Generate.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3GenericFrequentedBlock.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3HeapRange.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3HeapRange.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3IndexMap.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3IndexSet.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3InsertionSet.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3InsertionSet.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3InsertionSetInlines.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3LowerToAir.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3LowerToAir.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3LoweringMatcher.patterns [new file with mode: 0644]
Source/JavaScriptCore/b3/B3MemoryValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3MemoryValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Opcode.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Opcode.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Origin.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Origin.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3PatchpointSpecial.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3PatchpointSpecial.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3PatchpointValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3PatchpointValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3PhaseScope.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3PhaseScope.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Procedure.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Procedure.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ProcedureInlines.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ReduceStrength.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ReduceStrength.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3StackSlotKind.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3StackSlotKind.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3StackSlotValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3StackSlotValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Stackmap.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Stackmap.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3StackmapSpecial.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3StackmapSpecial.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3SuccessorCollection.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3SwitchCase.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3SwitchCase.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3SwitchValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3SwitchValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Type.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Type.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3UpsilonValue.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3UpsilonValue.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3UseCounts.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3UseCounts.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Validate.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Validate.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Value.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3Value.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ValueInlines.h [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ValueRep.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/B3ValueRep.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirAllocateStack.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirAllocateStack.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirArg.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirArg.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirBasicBlock.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirBasicBlock.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirCCallSpecial.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirCCallSpecial.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirCode.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirCode.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirFrequentedBlock.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirGenerate.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirGenerate.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirGenerated.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirGenerationContext.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirHandleCalleeSaves.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirHandleCalleeSaves.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirInsertionSet.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirInsertionSet.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirInst.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirInst.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirInstInlines.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirLiveness.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirOpcode.opcodes [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirPhaseScope.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirPhaseScope.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirRegisterPriority.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirRegisterPriority.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirSpecial.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirSpecial.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirSpillEverything.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirSpillEverything.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirStackSlot.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirStackSlot.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirTmp.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirTmp.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirTmpInlines.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirValidate.cpp [new file with mode: 0644]
Source/JavaScriptCore/b3/air/AirValidate.h [new file with mode: 0644]
Source/JavaScriptCore/b3/air/opcode_generator.rb [new file with mode: 0644]
Source/JavaScriptCore/b3/generate_pattern_matcher.rb [new file with mode: 0644]
Source/JavaScriptCore/b3/testb3.cpp [new file with mode: 0644]
Source/JavaScriptCore/bytecode/CodeBlock.h
Source/JavaScriptCore/jit/Reg.h
Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp
Source/JavaScriptCore/jit/RegisterAtOffsetList.h
Source/JavaScriptCore/jit/RegisterSet.h
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/HashSet.h
Source/WTF/wtf/ListDump.h
Source/WTF/wtf/MathExtras.h
Source/WTF/wtf/Platform.h
Source/WTF/wtf/ScopedLambda.h [new file with mode: 0644]
Source/WTF/wtf/SharedTask.h

index 1c74c72..db8690b 100644 (file)
@@ -66,6 +66,61 @@ set(JavaScriptCore_SOURCES
     assembler/MacroAssemblerPrinter.cpp
     assembler/MacroAssemblerX86Common.cpp
 
+    b3/air/AirAllocateStack.cpp
+    b3/air/AirArg.cpp
+    b3/air/AirBasicBlock.cpp
+    b3/air/AirCCallSpecial.cpp
+    b3/air/AirCode.cpp
+    b3/air/AirGenerate.cpp
+    b3/air/AirGenerated.cpp
+    b3/air/AirHandleCalleeSaves.cpp
+    b3/air/AirInsertionSet.cpp
+    b3/air/AirInst.cpp
+    b3/air/AirPhaseScope.cpp
+    b3/air/AirRegisterPriority.cpp
+    b3/air/AirSpecial.cpp
+    b3/air/AirSpillEverything.cpp
+    b3/air/AirStackSlot.cpp
+    b3/air/AirTmp.cpp
+    b3/air/AirValidate.cpp
+
+    b3/B3ArgumentRegValue.cpp
+    b3/B3BasicBlock.cpp
+    b3/B3CheckSpecial.cpp
+    b3/B3CheckValue.cpp
+    b3/B3Common.cpp
+    b3/B3Commutativity.cpp
+    b3/B3Const32Value.cpp
+    b3/B3Const64Value.cpp
+    b3/B3ConstDoubleValue.cpp
+    b3/B3ControlValue.cpp
+    b3/B3Effects.cpp
+    b3/B3FrequencyClass.cpp
+    b3/B3Generate.cpp
+    b3/B3HeapRange.cpp
+    b3/B3InsertionSet.cpp
+    b3/B3LowerToAir.cpp
+    b3/B3MemoryValue.cpp
+    b3/B3Opcode.cpp
+    b3/B3Origin.cpp
+    b3/B3PatchpointSpecial.cpp
+    b3/B3PatchpointValue.cpp
+    b3/B3PhaseScope.cpp
+    b3/B3Procedure.cpp
+    b3/B3ReduceStrength.cpp
+    b3/B3Stackmap.cpp
+    b3/B3StackmapSpecial.cpp
+    b3/B3StackSlotKind.cpp
+    b3/B3StackSlotValue.cpp
+    b3/B3SwitchCase.cpp
+    b3/B3SwitchValue.cpp
+    b3/B3Type.cpp
+    b3/B3UpsilonValue.cpp
+    b3/B3UseCounts.cpp
+    b3/B3Validate.cpp
+    b3/B3Value.cpp
+    b3/B3ValueRep.cpp
+
     bindings/ScriptFunctionCall.cpp
     bindings/ScriptObject.cpp
     bindings/ScriptValue.cpp
@@ -1274,4 +1329,4 @@ endif ()
 # Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
 
 add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
-add_dependencies(JavaScriptCore stageSharedScripts)
\ No newline at end of file
+add_dependencies(JavaScriptCore stageSharedScripts)
index 6b17938..639540a 100644 (file)
@@ -1,3 +1,810 @@
+2015-10-28  Filip Pizlo  <fpizlo@apple.com>
+
+        Create a super rough prototype of B3
+        https://bugs.webkit.org/show_bug.cgi?id=150280
+
+        Reviewed by Benjamin Poulain.
+
+        This changeset adds the basic scaffolding of the B3 compiler. B3 stands for Bare Bones
+        Backend. It's a low-level SSA-based language-agnostic compiler. The basic structure allows
+        for aggressive C-level optimizations and an awesome portable backend. The backend, called
+        Air (Assembly IR), is a reflective abstraction over our MacroAssembler. The abstraction is
+        defined using a spec file (AirOpcode.opcodes) which describes the various kinds of
+        instructions that we wish to support. Then, the B3::LowerToAir phase, which does our
+        instruction selection, reflectively selects Air opcodes by querying which instruction forms
+        are possible. Air allows for optimal register allocation and stack layout. Currently the
+        register allocator isn't written, but the stack layout is.
+
+        Of course this isn't done yet. It can only compile simple programs, seen in the "test suite"
+        called "testb3.cpp". There's a lot of optimizations that have to be written and a lot of
+        stuff added to the instruction selector. But it's a neat start.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * assembler/MacroAssembler.cpp:
+        (WTF::printInternal):
+        * assembler/MacroAssembler.h:
+        * b3: Added.
+        * b3/B3AddressMatcher.patterns: Added.
+        * b3/B3ArgumentRegValue.cpp: Added.
+        (JSC::B3::ArgumentRegValue::~ArgumentRegValue):
+        (JSC::B3::ArgumentRegValue::dumpMeta):
+        * b3/B3ArgumentRegValue.h: Added.
+        * b3/B3BasicBlock.cpp: Added.
+        (JSC::B3::BasicBlock::BasicBlock):
+        (JSC::B3::BasicBlock::~BasicBlock):
+        (JSC::B3::BasicBlock::append):
+        (JSC::B3::BasicBlock::addPredecessor):
+        (JSC::B3::BasicBlock::removePredecessor):
+        (JSC::B3::BasicBlock::replacePredecessor):
+        (JSC::B3::BasicBlock::removeNops):
+        (JSC::B3::BasicBlock::dump):
+        (JSC::B3::BasicBlock::deepDump):
+        * b3/B3BasicBlock.h: Added.
+        (JSC::B3::BasicBlock::index):
+        (JSC::B3::BasicBlock::begin):
+        (JSC::B3::BasicBlock::end):
+        (JSC::B3::BasicBlock::size):
+        (JSC::B3::BasicBlock::at):
+        (JSC::B3::BasicBlock::last):
+        (JSC::B3::BasicBlock::values):
+        (JSC::B3::BasicBlock::numPredecessors):
+        (JSC::B3::BasicBlock::predecessor):
+        (JSC::B3::BasicBlock::predecessors):
+        (JSC::B3::BasicBlock::frequency):
+        (JSC::B3::DeepBasicBlockDump::DeepBasicBlockDump):
+        (JSC::B3::DeepBasicBlockDump::dump):
+        (JSC::B3::deepDump):
+        * b3/B3BasicBlockInlines.h: Added.
+        (JSC::B3::BasicBlock::appendNew):
+        (JSC::B3::BasicBlock::numSuccessors):
+        (JSC::B3::BasicBlock::successor):
+        (JSC::B3::BasicBlock::successors):
+        (JSC::B3::BasicBlock::successorBlock):
+        (JSC::B3::BasicBlock::successorBlocks):
+        * b3/B3BasicBlockUtils.h: Added.
+        (JSC::B3::addPredecessor):
+        (JSC::B3::removePredecessor):
+        (JSC::B3::replacePredecessor):
+        (JSC::B3::resetReachability):
+        (JSC::B3::blocksInPreOrder):
+        (JSC::B3::blocksInPostOrder):
+        * b3/B3BlockWorklist.h: Added.
+        * b3/B3CheckSpecial.cpp: Added.
+        (JSC::B3::Air::numB3Args):
+        (JSC::B3::CheckSpecial::CheckSpecial):
+        (JSC::B3::CheckSpecial::~CheckSpecial):
+        (JSC::B3::CheckSpecial::hiddenBranch):
+        (JSC::B3::CheckSpecial::forEachArg):
+        (JSC::B3::CheckSpecial::isValid):
+        (JSC::B3::CheckSpecial::admitsStack):
+        (JSC::B3::CheckSpecial::generate):
+        (JSC::B3::CheckSpecial::dumpImpl):
+        (JSC::B3::CheckSpecial::deepDumpImpl):
+        * b3/B3CheckSpecial.h: Added.
+        * b3/B3CheckValue.cpp: Added.
+        (JSC::B3::CheckValue::~CheckValue):
+        (JSC::B3::CheckValue::dumpMeta):
+        * b3/B3CheckValue.h: Added.
+        * b3/B3Common.cpp: Added.
+        (JSC::B3::shouldDumpIR):
+        (JSC::B3::shouldDumpIRAtEachPhase):
+        (JSC::B3::shouldValidateIR):
+        (JSC::B3::shouldValidateIRAtEachPhase):
+        (JSC::B3::shouldSaveIRBeforePhase):
+        * b3/B3Common.h: Added.
+        (JSC::B3::is64Bit):
+        (JSC::B3::is32Bit):
+        * b3/B3Commutativity.cpp: Added.
+        (WTF::printInternal):
+        * b3/B3Commutativity.h: Added.
+        * b3/B3Const32Value.cpp: Added.
+        (JSC::B3::Const32Value::~Const32Value):
+        (JSC::B3::Const32Value::negConstant):
+        (JSC::B3::Const32Value::addConstant):
+        (JSC::B3::Const32Value::subConstant):
+        (JSC::B3::Const32Value::dumpMeta):
+        * b3/B3Const32Value.h: Added.
+        * b3/B3Const64Value.cpp: Added.
+        (JSC::B3::Const64Value::~Const64Value):
+        (JSC::B3::Const64Value::negConstant):
+        (JSC::B3::Const64Value::addConstant):
+        (JSC::B3::Const64Value::subConstant):
+        (JSC::B3::Const64Value::dumpMeta):
+        * b3/B3Const64Value.h: Added.
+        * b3/B3ConstDoubleValue.cpp: Added.
+        (JSC::B3::ConstDoubleValue::~ConstDoubleValue):
+        (JSC::B3::ConstDoubleValue::negConstant):
+        (JSC::B3::ConstDoubleValue::addConstant):
+        (JSC::B3::ConstDoubleValue::subConstant):
+        (JSC::B3::ConstDoubleValue::dumpMeta):
+        * b3/B3ConstDoubleValue.h: Added.
+        (JSC::B3::ConstDoubleValue::accepts):
+        (JSC::B3::ConstDoubleValue::value):
+        (JSC::B3::ConstDoubleValue::ConstDoubleValue):
+        * b3/B3ConstPtrValue.h: Added.
+        (JSC::B3::ConstPtrValue::value):
+        (JSC::B3::ConstPtrValue::ConstPtrValue):
+        * b3/B3ControlValue.cpp: Added.
+        (JSC::B3::ControlValue::~ControlValue):
+        (JSC::B3::ControlValue::dumpMeta):
+        * b3/B3ControlValue.h: Added.
+        * b3/B3Effects.cpp: Added.
+        (JSC::B3::Effects::dump):
+        * b3/B3Effects.h: Added.
+        (JSC::B3::Effects::mustExecute):
+        * b3/B3FrequencyClass.cpp: Added.
+        (WTF::printInternal):
+        * b3/B3FrequencyClass.h: Added.
+        * b3/B3FrequentedBlock.h: Added.
+        * b3/B3Generate.cpp: Added.
+        (JSC::B3::generate):
+        (JSC::B3::generateToAir):
+        * b3/B3Generate.h: Added.
+        * b3/B3GenericFrequentedBlock.h: Added.
+        (JSC::B3::GenericFrequentedBlock::GenericFrequentedBlock):
+        (JSC::B3::GenericFrequentedBlock::operator==):
+        (JSC::B3::GenericFrequentedBlock::operator!=):
+        (JSC::B3::GenericFrequentedBlock::operator bool):
+        (JSC::B3::GenericFrequentedBlock::block):
+        (JSC::B3::GenericFrequentedBlock::frequency):
+        (JSC::B3::GenericFrequentedBlock::dump):
+        * b3/B3HeapRange.cpp: Added.
+        (JSC::B3::HeapRange::dump):
+        * b3/B3HeapRange.h: Added.
+        (JSC::B3::HeapRange::HeapRange):
+        (JSC::B3::HeapRange::top):
+        (JSC::B3::HeapRange::operator==):
+        (JSC::B3::HeapRange::operator!=):
+        (JSC::B3::HeapRange::operator bool):
+        (JSC::B3::HeapRange::begin):
+        (JSC::B3::HeapRange::end):
+        (JSC::B3::HeapRange::overlaps):
+        * b3/B3IndexMap.h: Added.
+        (JSC::B3::IndexMap::IndexMap):
+        (JSC::B3::IndexMap::resize):
+        (JSC::B3::IndexMap::operator[]):
+        * b3/B3IndexSet.h: Added.
+        (JSC::B3::IndexSet::IndexSet):
+        (JSC::B3::IndexSet::add):
+        (JSC::B3::IndexSet::contains):
+        (JSC::B3::IndexSet::Iterable::Iterable):
+        (JSC::B3::IndexSet::Iterable::iterator::iterator):
+        (JSC::B3::IndexSet::Iterable::iterator::operator*):
+        (JSC::B3::IndexSet::Iterable::iterator::operator++):
+        (JSC::B3::IndexSet::Iterable::iterator::operator==):
+        (JSC::B3::IndexSet::Iterable::iterator::operator!=):
+        (JSC::B3::IndexSet::Iterable::begin):
+        (JSC::B3::IndexSet::Iterable::end):
+        (JSC::B3::IndexSet::values):
+        (JSC::B3::IndexSet::indices):
+        (JSC::B3::IndexSet::dump):
+        * b3/B3InsertionSet.cpp: Added.
+        (JSC::B3::InsertionSet::execute):
+        * b3/B3InsertionSet.h: Added.
+        (JSC::B3::InsertionSet::InsertionSet):
+        (JSC::B3::InsertionSet::code):
+        (JSC::B3::InsertionSet::appendInsertion):
+        (JSC::B3::InsertionSet::insertValue):
+        * b3/B3InsertionSetInlines.h: Added.
+        (JSC::B3::InsertionSet::insert):
+        * b3/B3LowerToAir.cpp: Added.
+        (JSC::B3::Air::LowerToAir::LowerToAir):
+        (JSC::B3::Air::LowerToAir::run):
+        (JSC::B3::Air::LowerToAir::tmp):
+        (JSC::B3::Air::LowerToAir::effectiveAddr):
+        (JSC::B3::Air::LowerToAir::addr):
+        (JSC::B3::Air::LowerToAir::loadAddr):
+        (JSC::B3::Air::LowerToAir::imm):
+        (JSC::B3::Air::LowerToAir::immOrTmp):
+        (JSC::B3::Air::LowerToAir::appendBinOp):
+        (JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
+        (JSC::B3::Air::LowerToAir::moveForType):
+        (JSC::B3::Air::LowerToAir::relaxedMoveForType):
+        (JSC::B3::Air::LowerToAir::append):
+        (JSC::B3::Air::LowerToAir::AddressSelector::AddressSelector):
+        (JSC::B3::Air::LowerToAir::AddressSelector::acceptRoot):
+        (JSC::B3::Air::LowerToAir::AddressSelector::acceptRootLate):
+        (JSC::B3::Air::LowerToAir::AddressSelector::acceptInternals):
+        (JSC::B3::Air::LowerToAir::AddressSelector::acceptInternalsLate):
+        (JSC::B3::Air::LowerToAir::AddressSelector::acceptOperands):
+        (JSC::B3::Air::LowerToAir::AddressSelector::acceptOperandsLate):
+        (JSC::B3::Air::LowerToAir::AddressSelector::tryAddShift1):
+        (JSC::B3::Air::LowerToAir::AddressSelector::tryAddShift2):
+        (JSC::B3::Air::LowerToAir::AddressSelector::tryAdd):
+        (JSC::B3::Air::LowerToAir::AddressSelector::tryDirect):
+        (JSC::B3::Air::LowerToAir::acceptRoot):
+        (JSC::B3::Air::LowerToAir::acceptRootLate):
+        (JSC::B3::Air::LowerToAir::acceptInternals):
+        (JSC::B3::Air::LowerToAir::acceptInternalsLate):
+        (JSC::B3::Air::LowerToAir::acceptOperands):
+        (JSC::B3::Air::LowerToAir::acceptOperandsLate):
+        (JSC::B3::Air::LowerToAir::tryLoad):
+        (JSC::B3::Air::LowerToAir::tryAdd):
+        (JSC::B3::Air::LowerToAir::tryAnd):
+        (JSC::B3::Air::LowerToAir::tryStoreAddLoad):
+        (JSC::B3::Air::LowerToAir::tryStoreAndLoad):
+        (JSC::B3::Air::LowerToAir::tryStore):
+        (JSC::B3::Air::LowerToAir::tryTruncArgumentReg):
+        (JSC::B3::Air::LowerToAir::tryTrunc):
+        (JSC::B3::Air::LowerToAir::tryArgumentReg):
+        (JSC::B3::Air::LowerToAir::tryConst32):
+        (JSC::B3::Air::LowerToAir::tryConst64):
+        (JSC::B3::Air::LowerToAir::tryIdentity):
+        (JSC::B3::Air::LowerToAir::tryReturn):
+        (JSC::B3::lowerToAir):
+        * b3/B3LowerToAir.h: Added.
+        * b3/B3LoweringMatcher.patterns: Added.
+        * b3/B3MemoryValue.cpp: Added.
+        (JSC::B3::MemoryValue::~MemoryValue):
+        (JSC::B3::MemoryValue::dumpMeta):
+        * b3/B3MemoryValue.h: Added.
+        * b3/B3Opcode.cpp: Added.
+        (WTF::printInternal):
+        * b3/B3Opcode.h: Added.
+        (JSC::B3::isCheckMath):
+        * b3/B3Origin.cpp: Added.
+        (JSC::B3::Origin::dump):
+        * b3/B3Origin.h: Added.
+        (JSC::B3::Origin::Origin):
+        (JSC::B3::Origin::operator bool):
+        (JSC::B3::Origin::data):
+        * b3/B3PatchpointSpecial.cpp: Added.
+        (JSC::B3::PatchpointSpecial::PatchpointSpecial):
+        (JSC::B3::PatchpointSpecial::~PatchpointSpecial):
+        (JSC::B3::PatchpointSpecial::forEachArg):
+        (JSC::B3::PatchpointSpecial::isValid):
+        (JSC::B3::PatchpointSpecial::admitsStack):
+        (JSC::B3::PatchpointSpecial::generate):
+        (JSC::B3::PatchpointSpecial::dumpImpl):
+        (JSC::B3::PatchpointSpecial::deepDumpImpl):
+        * b3/B3PatchpointSpecial.h: Added.
+        * b3/B3PatchpointValue.cpp: Added.
+        (JSC::B3::PatchpointValue::~PatchpointValue):
+        (JSC::B3::PatchpointValue::dumpMeta):
+        * b3/B3PatchpointValue.h: Added.
+        (JSC::B3::PatchpointValue::accepts):
+        (JSC::B3::PatchpointValue::PatchpointValue):
+        * b3/B3PhaseScope.cpp: Added.
+        (JSC::B3::PhaseScope::PhaseScope):
+        (JSC::B3::PhaseScope::~PhaseScope):
+        * b3/B3PhaseScope.h: Added.
+        * b3/B3Procedure.cpp: Added.
+        (JSC::B3::Procedure::Procedure):
+        (JSC::B3::Procedure::~Procedure):
+        (JSC::B3::Procedure::addBlock):
+        (JSC::B3::Procedure::resetReachability):
+        (JSC::B3::Procedure::dump):
+        (JSC::B3::Procedure::blocksInPreOrder):
+        (JSC::B3::Procedure::blocksInPostOrder):
+        * b3/B3Procedure.h: Added.
+        (JSC::B3::Procedure::size):
+        (JSC::B3::Procedure::at):
+        (JSC::B3::Procedure::operator[]):
+        (JSC::B3::Procedure::iterator::iterator):
+        (JSC::B3::Procedure::iterator::operator*):
+        (JSC::B3::Procedure::iterator::operator++):
+        (JSC::B3::Procedure::iterator::operator==):
+        (JSC::B3::Procedure::iterator::operator!=):
+        (JSC::B3::Procedure::iterator::findNext):
+        (JSC::B3::Procedure::begin):
+        (JSC::B3::Procedure::end):
+        (JSC::B3::Procedure::ValuesCollection::ValuesCollection):
+        (JSC::B3::Procedure::ValuesCollection::iterator::iterator):
+        (JSC::B3::Procedure::ValuesCollection::iterator::operator*):
+        (JSC::B3::Procedure::ValuesCollection::iterator::operator++):
+        (JSC::B3::Procedure::ValuesCollection::iterator::operator==):
+        (JSC::B3::Procedure::ValuesCollection::iterator::operator!=):
+        (JSC::B3::Procedure::ValuesCollection::begin):
+        (JSC::B3::Procedure::ValuesCollection::end):
+        (JSC::B3::Procedure::ValuesCollection::size):
+        (JSC::B3::Procedure::ValuesCollection::at):
+        (JSC::B3::Procedure::ValuesCollection::operator[]):
+        (JSC::B3::Procedure::values):
+        (JSC::B3::Procedure::setLastPhaseName):
+        (JSC::B3::Procedure::lastPhaseName):
+        * b3/B3ProcedureInlines.h: Added.
+        (JSC::B3::Procedure::add):
+        * b3/B3ReduceStrength.cpp: Added.
+        (JSC::B3::reduceStrength):
+        * b3/B3ReduceStrength.h: Added.
+        * b3/B3StackSlotKind.cpp: Added.
+        (WTF::printInternal):
+        * b3/B3StackSlotKind.h: Added.
+        * b3/B3StackSlotValue.cpp: Added.
+        (JSC::B3::StackSlotValue::~StackSlotValue):
+        (JSC::B3::StackSlotValue::dumpMeta):
+        * b3/B3StackSlotValue.h: Added.
+        (JSC::B3::StackSlotValue::accepts):
+        (JSC::B3::StackSlotValue::byteSize):
+        (JSC::B3::StackSlotValue::kind):
+        (JSC::B3::StackSlotValue::offsetFromFP):
+        (JSC::B3::StackSlotValue::setOffsetFromFP):
+        (JSC::B3::StackSlotValue::StackSlotValue):
+        * b3/B3Stackmap.cpp: Added.
+        (JSC::B3::Stackmap::Stackmap):
+        (JSC::B3::Stackmap::~Stackmap):
+        (JSC::B3::Stackmap::dump):
+        * b3/B3Stackmap.h: Added.
+        (JSC::B3::Stackmap::constrain):
+        (JSC::B3::Stackmap::reps):
+        (JSC::B3::Stackmap::clobber):
+        (JSC::B3::Stackmap::clobbered):
+        (JSC::B3::Stackmap::setGenerator):
+        * b3/B3StackmapSpecial.cpp: Added.
+        (JSC::B3::StackmapSpecial::StackmapSpecial):
+        (JSC::B3::StackmapSpecial::~StackmapSpecial):
+        (JSC::B3::StackmapSpecial::reportUsedRegisters):
+        (JSC::B3::StackmapSpecial::extraClobberedRegs):
+        (JSC::B3::StackmapSpecial::forEachArgImpl):
+        (JSC::B3::StackmapSpecial::isValidImpl):
+        (JSC::B3::StackmapSpecial::admitsStackImpl):
+        (JSC::B3::StackmapSpecial::appendRepsImpl):
+        (JSC::B3::StackmapSpecial::repForArg):
+        * b3/B3StackmapSpecial.h: Added.
+        * b3/B3SuccessorCollection.h: Added.
+        (JSC::B3::SuccessorCollection::SuccessorCollection):
+        (JSC::B3::SuccessorCollection::size):
+        (JSC::B3::SuccessorCollection::at):
+        (JSC::B3::SuccessorCollection::operator[]):
+        (JSC::B3::SuccessorCollection::iterator::iterator):
+        (JSC::B3::SuccessorCollection::iterator::operator*):
+        (JSC::B3::SuccessorCollection::iterator::operator++):
+        (JSC::B3::SuccessorCollection::iterator::operator==):
+        (JSC::B3::SuccessorCollection::iterator::operator!=):
+        (JSC::B3::SuccessorCollection::begin):
+        (JSC::B3::SuccessorCollection::end):
+        * b3/B3SwitchCase.cpp: Added.
+        (JSC::B3::SwitchCase::dump):
+        * b3/B3SwitchCase.h: Added.
+        (JSC::B3::SwitchCase::SwitchCase):
+        (JSC::B3::SwitchCase::operator bool):
+        (JSC::B3::SwitchCase::caseValue):
+        (JSC::B3::SwitchCase::target):
+        (JSC::B3::SwitchCase::targetBlock):
+        * b3/B3SwitchValue.cpp: Added.
+        (JSC::B3::SwitchValue::~SwitchValue):
+        (JSC::B3::SwitchValue::removeCase):
+        (JSC::B3::SwitchValue::appendCase):
+        (JSC::B3::SwitchValue::dumpMeta):
+        (JSC::B3::SwitchValue::SwitchValue):
+        * b3/B3SwitchValue.h: Added.
+        (JSC::B3::SwitchValue::accepts):
+        (JSC::B3::SwitchValue::numCaseValues):
+        (JSC::B3::SwitchValue::caseValue):
+        (JSC::B3::SwitchValue::caseValues):
+        (JSC::B3::SwitchValue::fallThrough):
+        (JSC::B3::SwitchValue::size):
+        (JSC::B3::SwitchValue::at):
+        (JSC::B3::SwitchValue::operator[]):
+        (JSC::B3::SwitchValue::iterator::iterator):
+        (JSC::B3::SwitchValue::iterator::operator*):
+        (JSC::B3::SwitchValue::iterator::operator++):
+        (JSC::B3::SwitchValue::iterator::operator==):
+        (JSC::B3::SwitchValue::iterator::operator!=):
+        (JSC::B3::SwitchValue::begin):
+        (JSC::B3::SwitchValue::end):
+        * b3/B3Type.cpp: Added.
+        (WTF::printInternal):
+        * b3/B3Type.h: Added.
+        (JSC::B3::isInt):
+        (JSC::B3::isFloat):
+        (JSC::B3::pointerType):
+        * b3/B3UpsilonValue.cpp: Added.
+        (JSC::B3::UpsilonValue::~UpsilonValue):
+        (JSC::B3::UpsilonValue::dumpMeta):
+        * b3/B3UpsilonValue.h: Added.
+        (JSC::B3::UpsilonValue::accepts):
+        (JSC::B3::UpsilonValue::phi):
+        (JSC::B3::UpsilonValue::UpsilonValue):
+        * b3/B3UseCounts.cpp: Added.
+        (JSC::B3::UseCounts::UseCounts):
+        (JSC::B3::UseCounts::~UseCounts):
+        * b3/B3UseCounts.h: Added.
+        (JSC::B3::UseCounts::operator[]):
+        * b3/B3Validate.cpp: Added.
+        (JSC::B3::validate):
+        * b3/B3Validate.h: Added.
+        * b3/B3Value.cpp: Added.
+        (JSC::B3::Value::~Value):
+        (JSC::B3::Value::replaceWithIdentity):
+        (JSC::B3::Value::replaceWithNop):
+        (JSC::B3::Value::dump):
+        (JSC::B3::Value::deepDump):
+        (JSC::B3::Value::negConstant):
+        (JSC::B3::Value::addConstant):
+        (JSC::B3::Value::subConstant):
+        (JSC::B3::Value::effects):
+        (JSC::B3::Value::performSubstitution):
+        (JSC::B3::Value::dumpMeta):
+        (JSC::B3::Value::typeFor):
+        * b3/B3Value.h: Added.
+        (JSC::B3::DeepValueDump::DeepValueDump):
+        (JSC::B3::DeepValueDump::dump):
+        (JSC::B3::deepDump):
+        * b3/B3ValueInlines.h: Added.
+        (JSC::B3::Value::as):
+        (JSC::B3::Value::isConstant):
+        (JSC::B3::Value::hasInt32):
+        (JSC::B3::Value::asInt32):
+        (JSC::B3::Value::hasInt64):
+        (JSC::B3::Value::asInt64):
+        (JSC::B3::Value::hasInt):
+        (JSC::B3::Value::asInt):
+        (JSC::B3::Value::isInt):
+        (JSC::B3::Value::hasIntPtr):
+        (JSC::B3::Value::asIntPtr):
+        (JSC::B3::Value::hasDouble):
+        (JSC::B3::Value::asDouble):
+        (JSC::B3::Value::stackmap):
+        * b3/B3ValueRep.cpp: Added.
+        (JSC::B3::ValueRep::dump):
+        (WTF::printInternal):
+        * b3/B3ValueRep.h: Added.
+        (JSC::B3::ValueRep::ValueRep):
+        (JSC::B3::ValueRep::reg):
+        (JSC::B3::ValueRep::stack):
+        (JSC::B3::ValueRep::stackArgument):
+        (JSC::B3::ValueRep::constant):
+        (JSC::B3::ValueRep::constantDouble):
+        (JSC::B3::ValueRep::kind):
+        (JSC::B3::ValueRep::operator bool):
+        (JSC::B3::ValueRep::offsetFromFP):
+        (JSC::B3::ValueRep::offsetFromSP):
+        (JSC::B3::ValueRep::value):
+        (JSC::B3::ValueRep::doubleValue):
+        * b3/air: Added.
+        * b3/air/AirAllocateStack.cpp: Added.
+        (JSC::B3::Air::allocateStack):
+        * b3/air/AirAllocateStack.h: Added.
+        * b3/air/AirArg.cpp: Added.
+        (JSC::B3::Air::Arg::dump):
+        * b3/air/AirArg.h: Added.
+        (JSC::B3::Air::Arg::isUse):
+        (JSC::B3::Air::Arg::isDef):
+        (JSC::B3::Air::Arg::typeForB3Type):
+        (JSC::B3::Air::Arg::Arg):
+        (JSC::B3::Air::Arg::imm):
+        (JSC::B3::Air::Arg::imm64):
+        (JSC::B3::Air::Arg::addr):
+        (JSC::B3::Air::Arg::stack):
+        (JSC::B3::Air::Arg::callArg):
+        (JSC::B3::Air::Arg::isValidScale):
+        (JSC::B3::Air::Arg::logScale):
+        (JSC::B3::Air::Arg::index):
+        (JSC::B3::Air::Arg::relCond):
+        (JSC::B3::Air::Arg::resCond):
+        (JSC::B3::Air::Arg::special):
+        (JSC::B3::Air::Arg::operator==):
+        (JSC::B3::Air::Arg::operator!=):
+        (JSC::B3::Air::Arg::operator bool):
+        (JSC::B3::Air::Arg::kind):
+        (JSC::B3::Air::Arg::isTmp):
+        (JSC::B3::Air::Arg::isImm):
+        (JSC::B3::Air::Arg::isImm64):
+        (JSC::B3::Air::Arg::isAddr):
+        (JSC::B3::Air::Arg::isStack):
+        (JSC::B3::Air::Arg::isCallArg):
+        (JSC::B3::Air::Arg::isIndex):
+        (JSC::B3::Air::Arg::isRelCond):
+        (JSC::B3::Air::Arg::isResCond):
+        (JSC::B3::Air::Arg::isSpecial):
+        (JSC::B3::Air::Arg::isAlive):
+        (JSC::B3::Air::Arg::tmp):
+        (JSC::B3::Air::Arg::value):
+        (JSC::B3::Air::Arg::pointerValue):
+        (JSC::B3::Air::Arg::base):
+        (JSC::B3::Air::Arg::hasOffset):
+        (JSC::B3::Air::Arg::offset):
+        (JSC::B3::Air::Arg::stackSlot):
+        (JSC::B3::Air::Arg::scale):
+        (JSC::B3::Air::Arg::isGPTmp):
+        (JSC::B3::Air::Arg::isFPTmp):
+        (JSC::B3::Air::Arg::isGP):
+        (JSC::B3::Air::Arg::isFP):
+        (JSC::B3::Air::Arg::hasType):
+        (JSC::B3::Air::Arg::type):
+        (JSC::B3::Air::Arg::isType):
+        (JSC::B3::Air::Arg::isGPR):
+        (JSC::B3::Air::Arg::gpr):
+        (JSC::B3::Air::Arg::isFPR):
+        (JSC::B3::Air::Arg::fpr):
+        (JSC::B3::Air::Arg::isReg):
+        (JSC::B3::Air::Arg::reg):
+        (JSC::B3::Air::Arg::gpTmpIndex):
+        (JSC::B3::Air::Arg::fpTmpIndex):
+        (JSC::B3::Air::Arg::tmpIndex):
+        (JSC::B3::Air::Arg::withOffset):
+        (JSC::B3::Air::Arg::forEachTmpFast):
+        (JSC::B3::Air::Arg::forEachTmp):
+        (JSC::B3::Air::Arg::asTrustedImm32):
+        (JSC::B3::Air::Arg::asTrustedImm64):
+        (JSC::B3::Air::Arg::asTrustedImmPtr):
+        (JSC::B3::Air::Arg::asAddress):
+        (JSC::B3::Air::Arg::asBaseIndex):
+        (JSC::B3::Air::Arg::asRelationalCondition):
+        (JSC::B3::Air::Arg::asResultCondition):
+        (JSC::B3::Air::Arg::isHashTableDeletedValue):
+        (JSC::B3::Air::Arg::hash):
+        (JSC::B3::Air::ArgHash::hash):
+        (JSC::B3::Air::ArgHash::equal):
+        * b3/air/AirBasicBlock.cpp: Added.
+        (JSC::B3::Air::BasicBlock::addPredecessor):
+        (JSC::B3::Air::BasicBlock::removePredecessor):
+        (JSC::B3::Air::BasicBlock::replacePredecessor):
+        (JSC::B3::Air::BasicBlock::dump):
+        (JSC::B3::Air::BasicBlock::deepDump):
+        (JSC::B3::Air::BasicBlock::BasicBlock):
+        * b3/air/AirBasicBlock.h: Added.
+        (JSC::B3::Air::BasicBlock::index):
+        (JSC::B3::Air::BasicBlock::size):
+        (JSC::B3::Air::BasicBlock::begin):
+        (JSC::B3::Air::BasicBlock::end):
+        (JSC::B3::Air::BasicBlock::at):
+        (JSC::B3::Air::BasicBlock::last):
+        (JSC::B3::Air::BasicBlock::appendInst):
+        (JSC::B3::Air::BasicBlock::append):
+        (JSC::B3::Air::BasicBlock::numSuccessors):
+        (JSC::B3::Air::BasicBlock::successor):
+        (JSC::B3::Air::BasicBlock::successors):
+        (JSC::B3::Air::BasicBlock::successorBlock):
+        (JSC::B3::Air::BasicBlock::successorBlocks):
+        (JSC::B3::Air::BasicBlock::numPredecessors):
+        (JSC::B3::Air::BasicBlock::predecessor):
+        (JSC::B3::Air::BasicBlock::predecessors):
+        (JSC::B3::Air::DeepBasicBlockDump::DeepBasicBlockDump):
+        (JSC::B3::Air::DeepBasicBlockDump::dump):
+        (JSC::B3::Air::deepDump):
+        * b3/air/AirCCallSpecial.cpp: Added.
+        (JSC::B3::Air::CCallSpecial::CCallSpecial):
+        (JSC::B3::Air::CCallSpecial::~CCallSpecial):
+        (JSC::B3::Air::CCallSpecial::forEachArg):
+        (JSC::B3::Air::CCallSpecial::isValid):
+        (JSC::B3::Air::CCallSpecial::admitsStack):
+        (JSC::B3::Air::CCallSpecial::reportUsedRegisters):
+        (JSC::B3::Air::CCallSpecial::generate):
+        (JSC::B3::Air::CCallSpecial::extraClobberedRegs):
+        (JSC::B3::Air::CCallSpecial::dumpImpl):
+        (JSC::B3::Air::CCallSpecial::deepDumpImpl):
+        * b3/air/AirCCallSpecial.h: Added.
+        * b3/air/AirCode.cpp: Added.
+        (JSC::B3::Air::Code::Code):
+        (JSC::B3::Air::Code::~Code):
+        (JSC::B3::Air::Code::addBlock):
+        (JSC::B3::Air::Code::addStackSlot):
+        (JSC::B3::Air::Code::addSpecial):
+        (JSC::B3::Air::Code::cCallSpecial):
+        (JSC::B3::Air::Code::resetReachability):
+        (JSC::B3::Air::Code::dump):
+        (JSC::B3::Air::Code::findFirstBlockIndex):
+        (JSC::B3::Air::Code::findNextBlockIndex):
+        (JSC::B3::Air::Code::findNextBlock):
+        * b3/air/AirCode.h: Added.
+        (JSC::B3::Air::Code::newTmp):
+        (JSC::B3::Air::Code::numTmps):
+        (JSC::B3::Air::Code::callArgAreaSize):
+        (JSC::B3::Air::Code::requestCallArgAreaSize):
+        (JSC::B3::Air::Code::frameSize):
+        (JSC::B3::Air::Code::setFrameSize):
+        (JSC::B3::Air::Code::calleeSaveRegisters):
+        (JSC::B3::Air::Code::size):
+        (JSC::B3::Air::Code::at):
+        (JSC::B3::Air::Code::operator[]):
+        (JSC::B3::Air::Code::iterator::iterator):
+        (JSC::B3::Air::Code::iterator::operator*):
+        (JSC::B3::Air::Code::iterator::operator++):
+        (JSC::B3::Air::Code::iterator::operator==):
+        (JSC::B3::Air::Code::iterator::operator!=):
+        (JSC::B3::Air::Code::begin):
+        (JSC::B3::Air::Code::end):
+        (JSC::B3::Air::Code::StackSlotsCollection::StackSlotsCollection):
+        (JSC::B3::Air::Code::StackSlotsCollection::size):
+        (JSC::B3::Air::Code::StackSlotsCollection::at):
+        (JSC::B3::Air::Code::StackSlotsCollection::operator[]):
+        (JSC::B3::Air::Code::StackSlotsCollection::iterator::iterator):
+        (JSC::B3::Air::Code::StackSlotsCollection::iterator::operator*):
+        (JSC::B3::Air::Code::StackSlotsCollection::iterator::operator++):
+        (JSC::B3::Air::Code::StackSlotsCollection::iterator::operator==):
+        (JSC::B3::Air::Code::StackSlotsCollection::iterator::operator!=):
+        (JSC::B3::Air::Code::StackSlotsCollection::begin):
+        (JSC::B3::Air::Code::StackSlotsCollection::end):
+        (JSC::B3::Air::Code::stackSlots):
+        (JSC::B3::Air::Code::SpecialsCollection::SpecialsCollection):
+        (JSC::B3::Air::Code::SpecialsCollection::size):
+        (JSC::B3::Air::Code::SpecialsCollection::at):
+        (JSC::B3::Air::Code::SpecialsCollection::operator[]):
+        (JSC::B3::Air::Code::SpecialsCollection::iterator::iterator):
+        (JSC::B3::Air::Code::SpecialsCollection::iterator::operator*):
+        (JSC::B3::Air::Code::SpecialsCollection::iterator::operator++):
+        (JSC::B3::Air::Code::SpecialsCollection::iterator::operator==):
+        (JSC::B3::Air::Code::SpecialsCollection::iterator::operator!=):
+        (JSC::B3::Air::Code::SpecialsCollection::begin):
+        (JSC::B3::Air::Code::SpecialsCollection::end):
+        (JSC::B3::Air::Code::specials):
+        (JSC::B3::Air::Code::setLastPhaseName):
+        (JSC::B3::Air::Code::lastPhaseName):
+        * b3/air/AirFrequentedBlock.h: Added.
+        * b3/air/AirGenerate.cpp: Added.
+        (JSC::B3::Air::generate):
+        * b3/air/AirGenerate.h: Added.
+        * b3/air/AirGenerated.cpp: Added.
+        * b3/air/AirGenerationContext.h: Added.
+        * b3/air/AirHandleCalleeSaves.cpp: Added.
+        (JSC::B3::Air::handleCalleeSaves):
+        * b3/air/AirHandleCalleeSaves.h: Added.
+        * b3/air/AirInsertionSet.cpp: Added.
+        (JSC::B3::Air::InsertionSet::execute):
+        * b3/air/AirInsertionSet.h: Added.
+        (JSC::B3::Air::InsertionSet::InsertionSet):
+        (JSC::B3::Air::InsertionSet::code):
+        (JSC::B3::Air::InsertionSet::appendInsertion):
+        (JSC::B3::Air::InsertionSet::insertInst):
+        (JSC::B3::Air::InsertionSet::insert):
+        * b3/air/AirInst.cpp: Added.
+        (JSC::B3::Air::Inst::dump):
+        * b3/air/AirInst.h: Added.
+        (JSC::B3::Air::Inst::Inst):
+        (JSC::B3::Air::Inst::opcode):
+        (JSC::B3::Air::Inst::forEachTmpFast):
+        (JSC::B3::Air::Inst::forEachTmp):
+        * b3/air/AirInstInlines.h: Added.
+        (JSC::B3::Air::ForEach<Tmp>::forEach):
+        (JSC::B3::Air::ForEach<Arg>::forEach):
+        (JSC::B3::Air::Inst::forEach):
+        (JSC::B3::Air::Inst::hasSpecial):
+        (JSC::B3::Air::Inst::extraClobberedRegs):
+        (JSC::B3::Air::Inst::reportUsedRegisters):
+        (JSC::B3::Air::isShiftValid):
+        (JSC::B3::Air::isLshift32Valid):
+        * b3/air/AirLiveness.h: Added.
+        (JSC::B3::Air::Liveness::Liveness):
+        (JSC::B3::Air::Liveness::liveAtHead):
+        (JSC::B3::Air::Liveness::liveAtTail):
+        (JSC::B3::Air::Liveness::LocalCalc::LocalCalc):
+        (JSC::B3::Air::Liveness::LocalCalc::live):
+        (JSC::B3::Air::Liveness::LocalCalc::takeLive):
+        (JSC::B3::Air::Liveness::LocalCalc::execute):
+        * b3/air/AirOpcode.opcodes: Added.
+        * b3/air/AirPhaseScope.cpp: Added.
+        (JSC::B3::Air::PhaseScope::PhaseScope):
+        (JSC::B3::Air::PhaseScope::~PhaseScope):
+        * b3/air/AirPhaseScope.h: Added.
+        * b3/air/AirRegisterPriority.cpp: Added.
+        (JSC::B3::Air::gprsInPriorityOrder):
+        (JSC::B3::Air::fprsInPriorityOrder):
+        (JSC::B3::Air::regsInPriorityOrder):
+        * b3/air/AirRegisterPriority.h: Added.
+        (JSC::B3::Air::RegistersInPriorityOrder<GPRInfo>::inPriorityOrder):
+        (JSC::B3::Air::RegistersInPriorityOrder<FPRInfo>::inPriorityOrder):
+        (JSC::B3::Air::regsInPriorityOrder):
+        * b3/air/AirSpecial.cpp: Added.
+        (JSC::B3::Air::Special::Special):
+        (JSC::B3::Air::Special::~Special):
+        (JSC::B3::Air::Special::name):
+        (JSC::B3::Air::Special::dump):
+        (JSC::B3::Air::Special::deepDump):
+        * b3/air/AirSpecial.h: Added.
+        (JSC::B3::Air::DeepSpecialDump::DeepSpecialDump):
+        (JSC::B3::Air::DeepSpecialDump::dump):
+        (JSC::B3::Air::deepDump):
+        * b3/air/AirSpillEverything.cpp: Added.
+        (JSC::B3::Air::spillEverything):
+        * b3/air/AirSpillEverything.h: Added.
+        * b3/air/AirStackSlot.cpp: Added.
+        (JSC::B3::Air::StackSlot::setOffsetFromFP):
+        (JSC::B3::Air::StackSlot::dump):
+        (JSC::B3::Air::StackSlot::deepDump):
+        (JSC::B3::Air::StackSlot::StackSlot):
+        * b3/air/AirStackSlot.h: Added.
+        (JSC::B3::Air::StackSlot::byteSize):
+        (JSC::B3::Air::StackSlot::kind):
+        (JSC::B3::Air::StackSlot::index):
+        (JSC::B3::Air::StackSlot::alignment):
+        (JSC::B3::Air::StackSlot::value):
+        (JSC::B3::Air::StackSlot::offsetFromFP):
+        (JSC::B3::Air::DeepStackSlotDump::DeepStackSlotDump):
+        (JSC::B3::Air::DeepStackSlotDump::dump):
+        (JSC::B3::Air::deepDump):
+        * b3/air/AirTmp.cpp: Added.
+        (JSC::B3::Air::Tmp::dump):
+        * b3/air/AirTmp.h: Added.
+        (JSC::B3::Air::Tmp::Tmp):
+        (JSC::B3::Air::Tmp::gpTmpForIndex):
+        (JSC::B3::Air::Tmp::fpTmpForIndex):
+        (JSC::B3::Air::Tmp::operator bool):
+        (JSC::B3::Air::Tmp::isGP):
+        (JSC::B3::Air::Tmp::isFP):
+        (JSC::B3::Air::Tmp::isGPR):
+        (JSC::B3::Air::Tmp::isFPR):
+        (JSC::B3::Air::Tmp::isReg):
+        (JSC::B3::Air::Tmp::gpr):
+        (JSC::B3::Air::Tmp::fpr):
+        (JSC::B3::Air::Tmp::reg):
+        (JSC::B3::Air::Tmp::hasTmpIndex):
+        (JSC::B3::Air::Tmp::gpTmpIndex):
+        (JSC::B3::Air::Tmp::fpTmpIndex):
+        (JSC::B3::Air::Tmp::tmpIndex):
+        (JSC::B3::Air::Tmp::isAlive):
+        (JSC::B3::Air::Tmp::operator==):
+        (JSC::B3::Air::Tmp::operator!=):
+        (JSC::B3::Air::Tmp::isHashTableDeletedValue):
+        (JSC::B3::Air::Tmp::hash):
+        (JSC::B3::Air::Tmp::encodeGP):
+        (JSC::B3::Air::Tmp::encodeFP):
+        (JSC::B3::Air::Tmp::encodeGPR):
+        (JSC::B3::Air::Tmp::encodeFPR):
+        (JSC::B3::Air::Tmp::encodeGPTmp):
+        (JSC::B3::Air::Tmp::encodeFPTmp):
+        (JSC::B3::Air::Tmp::isEncodedGP):
+        (JSC::B3::Air::Tmp::isEncodedFP):
+        (JSC::B3::Air::Tmp::isEncodedGPR):
+        (JSC::B3::Air::Tmp::isEncodedFPR):
+        (JSC::B3::Air::Tmp::isEncodedGPTmp):
+        (JSC::B3::Air::Tmp::isEncodedFPTmp):
+        (JSC::B3::Air::Tmp::decodeGPR):
+        (JSC::B3::Air::Tmp::decodeFPR):
+        (JSC::B3::Air::Tmp::decodeGPTmp):
+        (JSC::B3::Air::Tmp::decodeFPTmp):
+        (JSC::B3::Air::TmpHash::hash):
+        (JSC::B3::Air::TmpHash::equal):
+        * b3/air/AirTmpInlines.h: Added.
+        (JSC::B3::Air::Tmp::Tmp):
+        * b3/air/AirValidate.cpp: Added.
+        (JSC::B3::Air::validate):
+        * b3/air/AirValidate.h: Added.
+        * b3/air/opcode_generator.rb: Added.
+        * b3/generate_pattern_matcher.rb: Added.
+        * b3/testb3.cpp: Added.
+        (JSC::B3::compileAndRun):
+        (JSC::B3::test42):
+        (JSC::B3::testLoad42):
+        (JSC::B3::testArg):
+        (JSC::B3::testAddArgs):
+        (JSC::B3::testAddArgs32):
+        (JSC::B3::testStore):
+        (JSC::B3::testTrunc):
+        (JSC::B3::testAdd1):
+        (JSC::B3::testStoreAddLoad):
+        (JSC::B3::testStoreAddAndLoad):
+        (JSC::B3::testAdd1Uncommuted):
+        (JSC::B3::testLoadOffset):
+        (JSC::B3::testLoadOffsetNotConstant):
+        (JSC::B3::testLoadOffsetUsingAdd):
+        (JSC::B3::testLoadOffsetUsingAddNotConstant):
+        (JSC::B3::run):
+        (run):
+        (main):
+        * bytecode/CodeBlock.h:
+        (JSC::CodeBlock::specializationKind):
+        * jit/Reg.h:
+        (JSC::Reg::index):
+        (JSC::Reg::isSet):
+        (JSC::Reg::operator bool):
+        (JSC::Reg::isHashTableDeletedValue):
+        (JSC::Reg::AllRegsIterable::iterator::iterator):
+        (JSC::Reg::AllRegsIterable::iterator::operator*):
+        (JSC::Reg::AllRegsIterable::iterator::operator++):
+        (JSC::Reg::AllRegsIterable::iterator::operator==):
+        (JSC::Reg::AllRegsIterable::iterator::operator!=):
+        (JSC::Reg::AllRegsIterable::begin):
+        (JSC::Reg::AllRegsIterable::end):
+        (JSC::Reg::all):
+        (JSC::Reg::invalid):
+        (JSC::Reg::operator!): Deleted.
+        * jit/RegisterAtOffsetList.cpp:
+        (JSC::RegisterAtOffsetList::RegisterAtOffsetList):
+        * jit/RegisterAtOffsetList.h:
+        (JSC::RegisterAtOffsetList::clear):
+        (JSC::RegisterAtOffsetList::size):
+        (JSC::RegisterAtOffsetList::begin):
+        (JSC::RegisterAtOffsetList::end):
+        * jit/RegisterSet.h:
+        (JSC::RegisterSet::operator==):
+        (JSC::RegisterSet::hash):
+        (JSC::RegisterSet::forEach):
+        (JSC::RegisterSet::setAny):
+
 2015-10-28  Mark Lam  <mark.lam@apple.com>
 
         Rename MacroAssembler::callProbe() to probe().
index 539cb4c..123a117 100644 (file)
@@ -35,6 +35,7 @@ VPATH = \
 
 PYTHON = python
 PERL = perl
+RUBY = ruby
 
 JavaScriptCore_SCRIPTS_DIR = $(JavaScriptCore)/Scripts
 
@@ -59,6 +60,9 @@ all : \
     Lexer.lut.h \
     KeywordLookup.h \
     RegExpJitTables.h \
+    B3LoweringMatcher.h \
+    B3AddressMatcher.h \
+    AirOpcode.h \
 #
 
 # JavaScript builtins.
@@ -262,6 +266,14 @@ INPUT_GENERATOR_SPECIFICATIONS = \
 JSReplayInputs.h : $(INPUT_GENERATOR_SPECIFICATIONS) $(INPUT_GENERATOR_SCRIPTS)
        $(PYTHON) $(JavaScriptCore)/replay/scripts/CodeGeneratorReplayInputs.py --outputDir . --framework JavaScriptCore $(INPUT_GENERATOR_SPECIFICATIONS)
 
+B3LoweringMatcher.h: $(JavaScriptCore)/b3/generate_pattern_matcher.rb $(JavaScriptCore)/b3/B3LoweringMatcher.patterns
+       $(RUBY) $^ 
+B3AddressMatcher.h: $(JavaScriptCore)/b3/generate_pattern_matcher.rb $(JavaScriptCore)/b3/B3AddressMatcher.patterns
+       $(RUBY) $^
+
+AirOpcode.h: $(JavaScriptCore)/b3/air/opcode_generator.rb $(JavaScriptCore)/b3/air/AirOpcode.opcodes
+       $(RUBY) $^
+
 # Dynamically-defined targets are listed below. Static targets belong up top.
 
 all : \
index 8ee6c99..54427d2 100644 (file)
@@ -25,6 +25,7 @@
                        buildPhases = (
                        );
                        dependencies = (
+                               0FEC85B11BDB5D8F0080FF74 /* PBXTargetDependency */,
                                5D6B2A4F152B9E23005231DE /* PBXTargetDependency */,
                                5D6B2A51152B9E23005231DE /* PBXTargetDependency */,
                                5D6B2A55152B9E23005231DE /* PBXTargetDependency */,
                0FEA0A33170D40BF00BB722C /* DFGJITCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A2F170D40BF00BB722C /* DFGJITCode.cpp */; };
                0FEA0A34170D40BF00BB722C /* DFGJITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A30170D40BF00BB722C /* DFGJITCode.h */; };
                0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB3ECE16237F6700AB67AD /* MacroAssembler.cpp */; };
+               0FEC84FE1BDACDAC0080FF74 /* B3ArgumentRegValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84B41BDACDAC0080FF74 /* B3ArgumentRegValue.cpp */; };
+               0FEC84FF1BDACDAC0080FF74 /* B3ArgumentRegValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84B51BDACDAC0080FF74 /* B3ArgumentRegValue.h */; };
+               0FEC85001BDACDAC0080FF74 /* B3BasicBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84B61BDACDAC0080FF74 /* B3BasicBlock.cpp */; };
+               0FEC85011BDACDAC0080FF74 /* B3BasicBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84B71BDACDAC0080FF74 /* B3BasicBlock.h */; };
+               0FEC85021BDACDAC0080FF74 /* B3BasicBlockInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84B81BDACDAC0080FF74 /* B3BasicBlockInlines.h */; };
+               0FEC85031BDACDAC0080FF74 /* B3BasicBlockUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84B91BDACDAC0080FF74 /* B3BasicBlockUtils.h */; };
+               0FEC85041BDACDAC0080FF74 /* B3BlockWorklist.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84BA1BDACDAC0080FF74 /* B3BlockWorklist.h */; };
+               0FEC85051BDACDAC0080FF74 /* B3CheckSpecial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84BB1BDACDAC0080FF74 /* B3CheckSpecial.cpp */; };
+               0FEC85061BDACDAC0080FF74 /* B3CheckSpecial.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84BC1BDACDAC0080FF74 /* B3CheckSpecial.h */; };
+               0FEC85071BDACDAC0080FF74 /* B3CheckValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84BD1BDACDAC0080FF74 /* B3CheckValue.cpp */; };
+               0FEC85081BDACDAC0080FF74 /* B3CheckValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84BE1BDACDAC0080FF74 /* B3CheckValue.h */; };
+               0FEC85091BDACDAC0080FF74 /* B3Common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84BF1BDACDAC0080FF74 /* B3Common.cpp */; };
+               0FEC850A1BDACDAC0080FF74 /* B3Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84C01BDACDAC0080FF74 /* B3Common.h */; };
+               0FEC850B1BDACDAC0080FF74 /* B3Commutativity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84C11BDACDAC0080FF74 /* B3Commutativity.cpp */; };
+               0FEC850C1BDACDAC0080FF74 /* B3Commutativity.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84C21BDACDAC0080FF74 /* B3Commutativity.h */; };
+               0FEC850D1BDACDAC0080FF74 /* B3Const32Value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84C31BDACDAC0080FF74 /* B3Const32Value.cpp */; };
+               0FEC850E1BDACDAC0080FF74 /* B3Const32Value.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84C41BDACDAC0080FF74 /* B3Const32Value.h */; };
+               0FEC850F1BDACDAC0080FF74 /* B3Const64Value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84C51BDACDAC0080FF74 /* B3Const64Value.cpp */; };
+               0FEC85101BDACDAC0080FF74 /* B3Const64Value.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84C61BDACDAC0080FF74 /* B3Const64Value.h */; };
+               0FEC85111BDACDAC0080FF74 /* B3ConstDoubleValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84C71BDACDAC0080FF74 /* B3ConstDoubleValue.cpp */; };
+               0FEC85121BDACDAC0080FF74 /* B3ConstDoubleValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84C81BDACDAC0080FF74 /* B3ConstDoubleValue.h */; };
+               0FEC85131BDACDAC0080FF74 /* B3ControlValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84C91BDACDAC0080FF74 /* B3ControlValue.cpp */; };
+               0FEC85141BDACDAC0080FF74 /* B3ControlValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84CA1BDACDAC0080FF74 /* B3ControlValue.h */; };
+               0FEC85151BDACDAC0080FF74 /* B3FrequencyClass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84CB1BDACDAC0080FF74 /* B3FrequencyClass.cpp */; };
+               0FEC85161BDACDAC0080FF74 /* B3FrequencyClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84CC1BDACDAC0080FF74 /* B3FrequencyClass.h */; };
+               0FEC85171BDACDAC0080FF74 /* B3FrequentedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84CD1BDACDAC0080FF74 /* B3FrequentedBlock.h */; };
+               0FEC85181BDACDAC0080FF74 /* B3Generate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84CE1BDACDAC0080FF74 /* B3Generate.cpp */; };
+               0FEC85191BDACDAC0080FF74 /* B3Generate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84CF1BDACDAC0080FF74 /* B3Generate.h */; };
+               0FEC851A1BDACDAC0080FF74 /* B3GenericFrequentedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84D01BDACDAC0080FF74 /* B3GenericFrequentedBlock.h */; };
+               0FEC851B1BDACDAC0080FF74 /* B3IndexMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84D11BDACDAC0080FF74 /* B3IndexMap.h */; };
+               0FEC851C1BDACDAC0080FF74 /* B3IndexSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84D21BDACDAC0080FF74 /* B3IndexSet.h */; };
+               0FEC851D1BDACDAC0080FF74 /* B3LowerToAir.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84D31BDACDAC0080FF74 /* B3LowerToAir.cpp */; };
+               0FEC851E1BDACDAC0080FF74 /* B3LowerToAir.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84D41BDACDAC0080FF74 /* B3LowerToAir.h */; };
+               0FEC851F1BDACDAC0080FF74 /* B3MemoryValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84D51BDACDAC0080FF74 /* B3MemoryValue.cpp */; };
+               0FEC85201BDACDAC0080FF74 /* B3MemoryValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84D61BDACDAC0080FF74 /* B3MemoryValue.h */; };
+               0FEC85211BDACDAC0080FF74 /* B3Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84D71BDACDAC0080FF74 /* B3Opcode.cpp */; };
+               0FEC85221BDACDAC0080FF74 /* B3Opcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84D81BDACDAC0080FF74 /* B3Opcode.h */; };
+               0FEC85231BDACDAC0080FF74 /* B3Origin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84D91BDACDAC0080FF74 /* B3Origin.cpp */; };
+               0FEC85241BDACDAC0080FF74 /* B3Origin.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84DA1BDACDAC0080FF74 /* B3Origin.h */; };
+               0FEC85251BDACDAC0080FF74 /* B3PatchpointSpecial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84DB1BDACDAC0080FF74 /* B3PatchpointSpecial.cpp */; };
+               0FEC85261BDACDAC0080FF74 /* B3PatchpointSpecial.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84DC1BDACDAC0080FF74 /* B3PatchpointSpecial.h */; };
+               0FEC85271BDACDAC0080FF74 /* B3PatchpointValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84DD1BDACDAC0080FF74 /* B3PatchpointValue.cpp */; };
+               0FEC85281BDACDAC0080FF74 /* B3PatchpointValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84DE1BDACDAC0080FF74 /* B3PatchpointValue.h */; };
+               0FEC85291BDACDAC0080FF74 /* B3PhaseScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84DF1BDACDAC0080FF74 /* B3PhaseScope.cpp */; };
+               0FEC852A1BDACDAC0080FF74 /* B3PhaseScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E01BDACDAC0080FF74 /* B3PhaseScope.h */; };
+               0FEC852B1BDACDAC0080FF74 /* B3Procedure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E11BDACDAC0080FF74 /* B3Procedure.cpp */; };
+               0FEC852C1BDACDAC0080FF74 /* B3Procedure.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E21BDACDAC0080FF74 /* B3Procedure.h */; };
+               0FEC852D1BDACDAC0080FF74 /* B3ProcedureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E31BDACDAC0080FF74 /* B3ProcedureInlines.h */; };
+               0FEC852E1BDACDAC0080FF74 /* B3Stackmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E41BDACDAC0080FF74 /* B3Stackmap.cpp */; };
+               0FEC852F1BDACDAC0080FF74 /* B3Stackmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E51BDACDAC0080FF74 /* B3Stackmap.h */; };
+               0FEC85301BDACDAC0080FF74 /* B3StackmapSpecial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E61BDACDAC0080FF74 /* B3StackmapSpecial.cpp */; };
+               0FEC85311BDACDAC0080FF74 /* B3StackmapSpecial.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E71BDACDAC0080FF74 /* B3StackmapSpecial.h */; };
+               0FEC85321BDACDAC0080FF74 /* B3StackSlotKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E81BDACDAC0080FF74 /* B3StackSlotKind.cpp */; };
+               0FEC85331BDACDAC0080FF74 /* B3StackSlotKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E91BDACDAC0080FF74 /* B3StackSlotKind.h */; };
+               0FEC85341BDACDAC0080FF74 /* B3StackSlotValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84EA1BDACDAC0080FF74 /* B3StackSlotValue.cpp */; };
+               0FEC85351BDACDAC0080FF74 /* B3StackSlotValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84EB1BDACDAC0080FF74 /* B3StackSlotValue.h */; };
+               0FEC85361BDACDAC0080FF74 /* B3SuccessorCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84EC1BDACDAC0080FF74 /* B3SuccessorCollection.h */; };
+               0FEC85371BDACDAC0080FF74 /* B3SwitchCase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84ED1BDACDAC0080FF74 /* B3SwitchCase.cpp */; };
+               0FEC85381BDACDAC0080FF74 /* B3SwitchCase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84EE1BDACDAC0080FF74 /* B3SwitchCase.h */; };
+               0FEC85391BDACDAC0080FF74 /* B3SwitchValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84EF1BDACDAC0080FF74 /* B3SwitchValue.cpp */; };
+               0FEC853A1BDACDAC0080FF74 /* B3SwitchValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84F01BDACDAC0080FF74 /* B3SwitchValue.h */; };
+               0FEC853B1BDACDAC0080FF74 /* B3Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84F11BDACDAC0080FF74 /* B3Type.cpp */; };
+               0FEC853C1BDACDAC0080FF74 /* B3Type.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84F21BDACDAC0080FF74 /* B3Type.h */; };
+               0FEC853D1BDACDAC0080FF74 /* B3UpsilonValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84F31BDACDAC0080FF74 /* B3UpsilonValue.cpp */; };
+               0FEC853E1BDACDAC0080FF74 /* B3UpsilonValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84F41BDACDAC0080FF74 /* B3UpsilonValue.h */; };
+               0FEC853F1BDACDAC0080FF74 /* B3UseCounts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84F51BDACDAC0080FF74 /* B3UseCounts.cpp */; };
+               0FEC85401BDACDAC0080FF74 /* B3UseCounts.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84F61BDACDAC0080FF74 /* B3UseCounts.h */; };
+               0FEC85411BDACDAC0080FF74 /* B3Validate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84F71BDACDAC0080FF74 /* B3Validate.cpp */; };
+               0FEC85421BDACDAC0080FF74 /* B3Validate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84F81BDACDAC0080FF74 /* B3Validate.h */; };
+               0FEC85431BDACDAC0080FF74 /* B3Value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84F91BDACDAC0080FF74 /* B3Value.cpp */; };
+               0FEC85441BDACDAC0080FF74 /* B3Value.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84FA1BDACDAC0080FF74 /* B3Value.h */; };
+               0FEC85451BDACDAC0080FF74 /* B3ValueInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84FB1BDACDAC0080FF74 /* B3ValueInlines.h */; };
+               0FEC85461BDACDAC0080FF74 /* B3ValueRep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84FC1BDACDAC0080FF74 /* B3ValueRep.cpp */; };
+               0FEC85471BDACDAC0080FF74 /* B3ValueRep.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84FD1BDACDAC0080FF74 /* B3ValueRep.h */; };
+               0FEC856D1BDACDC70080FF74 /* AirAllocateStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85481BDACDC70080FF74 /* AirAllocateStack.cpp */; };
+               0FEC856E1BDACDC70080FF74 /* AirAllocateStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85491BDACDC70080FF74 /* AirAllocateStack.h */; };
+               0FEC856F1BDACDC70080FF74 /* AirArg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC854A1BDACDC70080FF74 /* AirArg.cpp */; };
+               0FEC85701BDACDC70080FF74 /* AirArg.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC854B1BDACDC70080FF74 /* AirArg.h */; };
+               0FEC85711BDACDC70080FF74 /* AirBasicBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC854C1BDACDC70080FF74 /* AirBasicBlock.cpp */; };
+               0FEC85721BDACDC70080FF74 /* AirBasicBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC854D1BDACDC70080FF74 /* AirBasicBlock.h */; };
+               0FEC85731BDACDC70080FF74 /* AirCCallSpecial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC854E1BDACDC70080FF74 /* AirCCallSpecial.cpp */; };
+               0FEC85741BDACDC70080FF74 /* AirCCallSpecial.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC854F1BDACDC70080FF74 /* AirCCallSpecial.h */; };
+               0FEC85751BDACDC70080FF74 /* AirCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85501BDACDC70080FF74 /* AirCode.cpp */; };
+               0FEC85761BDACDC70080FF74 /* AirCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85511BDACDC70080FF74 /* AirCode.h */; };
+               0FEC85771BDACDC70080FF74 /* AirFrequentedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85521BDACDC70080FF74 /* AirFrequentedBlock.h */; };
+               0FEC85781BDACDC70080FF74 /* AirGenerate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85531BDACDC70080FF74 /* AirGenerate.cpp */; };
+               0FEC85791BDACDC70080FF74 /* AirGenerate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85541BDACDC70080FF74 /* AirGenerate.h */; };
+               0FEC857A1BDACDC70080FF74 /* AirGenerationContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85551BDACDC70080FF74 /* AirGenerationContext.h */; };
+               0FEC857B1BDACDC70080FF74 /* AirHandleCalleeSaves.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85561BDACDC70080FF74 /* AirHandleCalleeSaves.cpp */; };
+               0FEC857C1BDACDC70080FF74 /* AirHandleCalleeSaves.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85571BDACDC70080FF74 /* AirHandleCalleeSaves.h */; };
+               0FEC857D1BDACDC70080FF74 /* AirInsertionSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85581BDACDC70080FF74 /* AirInsertionSet.cpp */; };
+               0FEC857E1BDACDC70080FF74 /* AirInsertionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85591BDACDC70080FF74 /* AirInsertionSet.h */; };
+               0FEC857F1BDACDC70080FF74 /* AirInst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC855A1BDACDC70080FF74 /* AirInst.cpp */; };
+               0FEC85801BDACDC70080FF74 /* AirInst.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC855B1BDACDC70080FF74 /* AirInst.h */; };
+               0FEC85811BDACDC70080FF74 /* AirInstInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC855C1BDACDC70080FF74 /* AirInstInlines.h */; };
+               0FEC85821BDACDC70080FF74 /* AirLiveness.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC855D1BDACDC70080FF74 /* AirLiveness.h */; };
+               0FEC85831BDACDC70080FF74 /* AirPhaseScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC855E1BDACDC70080FF74 /* AirPhaseScope.cpp */; };
+               0FEC85841BDACDC70080FF74 /* AirPhaseScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC855F1BDACDC70080FF74 /* AirPhaseScope.h */; };
+               0FEC85851BDACDC70080FF74 /* AirRegisterPriority.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85601BDACDC70080FF74 /* AirRegisterPriority.cpp */; };
+               0FEC85861BDACDC70080FF74 /* AirRegisterPriority.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85611BDACDC70080FF74 /* AirRegisterPriority.h */; };
+               0FEC85871BDACDC70080FF74 /* AirSpecial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85621BDACDC70080FF74 /* AirSpecial.cpp */; };
+               0FEC85881BDACDC70080FF74 /* AirSpecial.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85631BDACDC70080FF74 /* AirSpecial.h */; };
+               0FEC85891BDACDC70080FF74 /* AirSpillEverything.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85641BDACDC70080FF74 /* AirSpillEverything.cpp */; };
+               0FEC858A1BDACDC70080FF74 /* AirSpillEverything.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85651BDACDC70080FF74 /* AirSpillEverything.h */; };
+               0FEC858B1BDACDC70080FF74 /* AirStackSlot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85661BDACDC70080FF74 /* AirStackSlot.cpp */; };
+               0FEC858C1BDACDC70080FF74 /* AirStackSlot.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85671BDACDC70080FF74 /* AirStackSlot.h */; };
+               0FEC858D1BDACDC70080FF74 /* AirTmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85681BDACDC70080FF74 /* AirTmp.cpp */; };
+               0FEC858E1BDACDC70080FF74 /* AirTmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85691BDACDC70080FF74 /* AirTmp.h */; };
+               0FEC858F1BDACDC70080FF74 /* AirTmpInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC856A1BDACDC70080FF74 /* AirTmpInlines.h */; };
+               0FEC85901BDACDC70080FF74 /* AirValidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC856B1BDACDC70080FF74 /* AirValidate.cpp */; };
+               0FEC85911BDACDC70080FF74 /* AirValidate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC856C1BDACDC70080FF74 /* AirValidate.h */; };
+               0FEC85931BDB1E100080FF74 /* AirGenerated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85921BDB1E100080FF74 /* AirGenerated.cpp */; };
+               0FEC85A31BDB5CF10080FF74 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; };
+               0FEC85A41BDB5CF10080FF74 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
+               0FEC85AF1BDB5D5E0080FF74 /* testb3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85AE1BDB5D5E0080FF74 /* testb3.cpp */; };
+               0FEC85B31BDED9570080FF74 /* B3ConstPtrValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85B21BDED9570080FF74 /* B3ConstPtrValue.h */; };
+               0FEC85B91BE1462F0080FF74 /* B3InsertionSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85B41BE1462F0080FF74 /* B3InsertionSet.cpp */; };
+               0FEC85BA1BE1462F0080FF74 /* B3InsertionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85B51BE1462F0080FF74 /* B3InsertionSet.h */; };
+               0FEC85BB1BE1462F0080FF74 /* B3InsertionSetInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85B61BE1462F0080FF74 /* B3InsertionSetInlines.h */; };
+               0FEC85BC1BE1462F0080FF74 /* B3ReduceStrength.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85B71BE1462F0080FF74 /* B3ReduceStrength.cpp */; };
+               0FEC85BD1BE1462F0080FF74 /* B3ReduceStrength.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85B81BE1462F0080FF74 /* B3ReduceStrength.h */; };
+               0FEC85C11BE167A00080FF74 /* B3Effects.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85BE1BE167A00080FF74 /* B3Effects.h */; };
+               0FEC85C21BE167A00080FF74 /* B3HeapRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85BF1BE167A00080FF74 /* B3HeapRange.cpp */; };
+               0FEC85C31BE167A00080FF74 /* B3HeapRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC85C01BE167A00080FF74 /* B3HeapRange.h */; };
+               0FEC85C51BE16F5A0080FF74 /* B3Effects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC85C41BE16F5A0080FF74 /* B3Effects.cpp */; };
                0FED67B91B26256D0066CE15 /* DFGConstantHoistingPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FED67B71B26256D0066CE15 /* DFGConstantHoistingPhase.cpp */; };
                0FED67BA1B26256D0066CE15 /* DFGConstantHoistingPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FED67B81B26256D0066CE15 /* DFGConstantHoistingPhase.h */; };
                0FEE98411A8865B700754E93 /* SetupVarargsFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEE98401A8865B600754E93 /* SetupVarargsFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
                        remoteGlobalIDString = 0FCEFAB51805D61600472CE4;
                        remoteInfo = llvmForJSC;
                };
+               0FEC85B01BDB5D8F0080FF74 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 0FEC85941BDB5CF10080FF74;
+                       remoteInfo = testb3;
+               };
                0FF922D214F46B2F0041A24E /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
                0FEA0A2F170D40BF00BB722C /* DFGJITCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCode.cpp; path = dfg/DFGJITCode.cpp; sourceTree = "<group>"; };
                0FEA0A30170D40BF00BB722C /* DFGJITCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGJITCode.h; path = dfg/DFGJITCode.h; sourceTree = "<group>"; };
                0FEB3ECE16237F6700AB67AD /* MacroAssembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssembler.cpp; sourceTree = "<group>"; };
+               0FEC84B41BDACDAC0080FF74 /* B3ArgumentRegValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ArgumentRegValue.cpp; path = b3/B3ArgumentRegValue.cpp; sourceTree = "<group>"; };
+               0FEC84B51BDACDAC0080FF74 /* B3ArgumentRegValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ArgumentRegValue.h; path = b3/B3ArgumentRegValue.h; sourceTree = "<group>"; };
+               0FEC84B61BDACDAC0080FF74 /* B3BasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3BasicBlock.cpp; path = b3/B3BasicBlock.cpp; sourceTree = "<group>"; };
+               0FEC84B71BDACDAC0080FF74 /* B3BasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3BasicBlock.h; path = b3/B3BasicBlock.h; sourceTree = "<group>"; };
+               0FEC84B81BDACDAC0080FF74 /* B3BasicBlockInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3BasicBlockInlines.h; path = b3/B3BasicBlockInlines.h; sourceTree = "<group>"; };
+               0FEC84B91BDACDAC0080FF74 /* B3BasicBlockUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3BasicBlockUtils.h; path = b3/B3BasicBlockUtils.h; sourceTree = "<group>"; };
+               0FEC84BA1BDACDAC0080FF74 /* B3BlockWorklist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3BlockWorklist.h; path = b3/B3BlockWorklist.h; sourceTree = "<group>"; };
+               0FEC84BB1BDACDAC0080FF74 /* B3CheckSpecial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3CheckSpecial.cpp; path = b3/B3CheckSpecial.cpp; sourceTree = "<group>"; };
+               0FEC84BC1BDACDAC0080FF74 /* B3CheckSpecial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3CheckSpecial.h; path = b3/B3CheckSpecial.h; sourceTree = "<group>"; };
+               0FEC84BD1BDACDAC0080FF74 /* B3CheckValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3CheckValue.cpp; path = b3/B3CheckValue.cpp; sourceTree = "<group>"; };
+               0FEC84BE1BDACDAC0080FF74 /* B3CheckValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3CheckValue.h; path = b3/B3CheckValue.h; sourceTree = "<group>"; };
+               0FEC84BF1BDACDAC0080FF74 /* B3Common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Common.cpp; path = b3/B3Common.cpp; sourceTree = "<group>"; };
+               0FEC84C01BDACDAC0080FF74 /* B3Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Common.h; path = b3/B3Common.h; sourceTree = "<group>"; };
+               0FEC84C11BDACDAC0080FF74 /* B3Commutativity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Commutativity.cpp; path = b3/B3Commutativity.cpp; sourceTree = "<group>"; };
+               0FEC84C21BDACDAC0080FF74 /* B3Commutativity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Commutativity.h; path = b3/B3Commutativity.h; sourceTree = "<group>"; };
+               0FEC84C31BDACDAC0080FF74 /* B3Const32Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Const32Value.cpp; path = b3/B3Const32Value.cpp; sourceTree = "<group>"; };
+               0FEC84C41BDACDAC0080FF74 /* B3Const32Value.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Const32Value.h; path = b3/B3Const32Value.h; sourceTree = "<group>"; };
+               0FEC84C51BDACDAC0080FF74 /* B3Const64Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Const64Value.cpp; path = b3/B3Const64Value.cpp; sourceTree = "<group>"; };
+               0FEC84C61BDACDAC0080FF74 /* B3Const64Value.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Const64Value.h; path = b3/B3Const64Value.h; sourceTree = "<group>"; };
+               0FEC84C71BDACDAC0080FF74 /* B3ConstDoubleValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ConstDoubleValue.cpp; path = b3/B3ConstDoubleValue.cpp; sourceTree = "<group>"; };
+               0FEC84C81BDACDAC0080FF74 /* B3ConstDoubleValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ConstDoubleValue.h; path = b3/B3ConstDoubleValue.h; sourceTree = "<group>"; };
+               0FEC84C91BDACDAC0080FF74 /* B3ControlValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ControlValue.cpp; path = b3/B3ControlValue.cpp; sourceTree = "<group>"; };
+               0FEC84CA1BDACDAC0080FF74 /* B3ControlValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ControlValue.h; path = b3/B3ControlValue.h; sourceTree = "<group>"; };
+               0FEC84CB1BDACDAC0080FF74 /* B3FrequencyClass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3FrequencyClass.cpp; path = b3/B3FrequencyClass.cpp; sourceTree = "<group>"; };
+               0FEC84CC1BDACDAC0080FF74 /* B3FrequencyClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3FrequencyClass.h; path = b3/B3FrequencyClass.h; sourceTree = "<group>"; };
+               0FEC84CD1BDACDAC0080FF74 /* B3FrequentedBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3FrequentedBlock.h; path = b3/B3FrequentedBlock.h; sourceTree = "<group>"; };
+               0FEC84CE1BDACDAC0080FF74 /* B3Generate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Generate.cpp; path = b3/B3Generate.cpp; sourceTree = "<group>"; };
+               0FEC84CF1BDACDAC0080FF74 /* B3Generate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Generate.h; path = b3/B3Generate.h; sourceTree = "<group>"; };
+               0FEC84D01BDACDAC0080FF74 /* B3GenericFrequentedBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3GenericFrequentedBlock.h; path = b3/B3GenericFrequentedBlock.h; sourceTree = "<group>"; };
+               0FEC84D11BDACDAC0080FF74 /* B3IndexMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3IndexMap.h; path = b3/B3IndexMap.h; sourceTree = "<group>"; };
+               0FEC84D21BDACDAC0080FF74 /* B3IndexSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3IndexSet.h; path = b3/B3IndexSet.h; sourceTree = "<group>"; };
+               0FEC84D31BDACDAC0080FF74 /* B3LowerToAir.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3LowerToAir.cpp; path = b3/B3LowerToAir.cpp; sourceTree = "<group>"; };
+               0FEC84D41BDACDAC0080FF74 /* B3LowerToAir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3LowerToAir.h; path = b3/B3LowerToAir.h; sourceTree = "<group>"; };
+               0FEC84D51BDACDAC0080FF74 /* B3MemoryValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3MemoryValue.cpp; path = b3/B3MemoryValue.cpp; sourceTree = "<group>"; };
+               0FEC84D61BDACDAC0080FF74 /* B3MemoryValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3MemoryValue.h; path = b3/B3MemoryValue.h; sourceTree = "<group>"; };
+               0FEC84D71BDACDAC0080FF74 /* B3Opcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Opcode.cpp; path = b3/B3Opcode.cpp; sourceTree = "<group>"; };
+               0FEC84D81BDACDAC0080FF74 /* B3Opcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Opcode.h; path = b3/B3Opcode.h; sourceTree = "<group>"; };
+               0FEC84D91BDACDAC0080FF74 /* B3Origin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Origin.cpp; path = b3/B3Origin.cpp; sourceTree = "<group>"; };
+               0FEC84DA1BDACDAC0080FF74 /* B3Origin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Origin.h; path = b3/B3Origin.h; sourceTree = "<group>"; };
+               0FEC84DB1BDACDAC0080FF74 /* B3PatchpointSpecial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3PatchpointSpecial.cpp; path = b3/B3PatchpointSpecial.cpp; sourceTree = "<group>"; };
+               0FEC84DC1BDACDAC0080FF74 /* B3PatchpointSpecial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3PatchpointSpecial.h; path = b3/B3PatchpointSpecial.h; sourceTree = "<group>"; };
+               0FEC84DD1BDACDAC0080FF74 /* B3PatchpointValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3PatchpointValue.cpp; path = b3/B3PatchpointValue.cpp; sourceTree = "<group>"; };
+               0FEC84DE1BDACDAC0080FF74 /* B3PatchpointValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3PatchpointValue.h; path = b3/B3PatchpointValue.h; sourceTree = "<group>"; };
+               0FEC84DF1BDACDAC0080FF74 /* B3PhaseScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3PhaseScope.cpp; path = b3/B3PhaseScope.cpp; sourceTree = "<group>"; };
+               0FEC84E01BDACDAC0080FF74 /* B3PhaseScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3PhaseScope.h; path = b3/B3PhaseScope.h; sourceTree = "<group>"; };
+               0FEC84E11BDACDAC0080FF74 /* B3Procedure.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Procedure.cpp; path = b3/B3Procedure.cpp; sourceTree = "<group>"; };
+               0FEC84E21BDACDAC0080FF74 /* B3Procedure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Procedure.h; path = b3/B3Procedure.h; sourceTree = "<group>"; };
+               0FEC84E31BDACDAC0080FF74 /* B3ProcedureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ProcedureInlines.h; path = b3/B3ProcedureInlines.h; sourceTree = "<group>"; };
+               0FEC84E41BDACDAC0080FF74 /* B3Stackmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Stackmap.cpp; path = b3/B3Stackmap.cpp; sourceTree = "<group>"; };
+               0FEC84E51BDACDAC0080FF74 /* B3Stackmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Stackmap.h; path = b3/B3Stackmap.h; sourceTree = "<group>"; };
+               0FEC84E61BDACDAC0080FF74 /* B3StackmapSpecial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3StackmapSpecial.cpp; path = b3/B3StackmapSpecial.cpp; sourceTree = "<group>"; };
+               0FEC84E71BDACDAC0080FF74 /* B3StackmapSpecial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3StackmapSpecial.h; path = b3/B3StackmapSpecial.h; sourceTree = "<group>"; };
+               0FEC84E81BDACDAC0080FF74 /* B3StackSlotKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3StackSlotKind.cpp; path = b3/B3StackSlotKind.cpp; sourceTree = "<group>"; };
+               0FEC84E91BDACDAC0080FF74 /* B3StackSlotKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3StackSlotKind.h; path = b3/B3StackSlotKind.h; sourceTree = "<group>"; };
+               0FEC84EA1BDACDAC0080FF74 /* B3StackSlotValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3StackSlotValue.cpp; path = b3/B3StackSlotValue.cpp; sourceTree = "<group>"; };
+               0FEC84EB1BDACDAC0080FF74 /* B3StackSlotValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3StackSlotValue.h; path = b3/B3StackSlotValue.h; sourceTree = "<group>"; };
+               0FEC84EC1BDACDAC0080FF74 /* B3SuccessorCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3SuccessorCollection.h; path = b3/B3SuccessorCollection.h; sourceTree = "<group>"; };
+               0FEC84ED1BDACDAC0080FF74 /* B3SwitchCase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3SwitchCase.cpp; path = b3/B3SwitchCase.cpp; sourceTree = "<group>"; };
+               0FEC84EE1BDACDAC0080FF74 /* B3SwitchCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3SwitchCase.h; path = b3/B3SwitchCase.h; sourceTree = "<group>"; };
+               0FEC84EF1BDACDAC0080FF74 /* B3SwitchValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3SwitchValue.cpp; path = b3/B3SwitchValue.cpp; sourceTree = "<group>"; };
+               0FEC84F01BDACDAC0080FF74 /* B3SwitchValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3SwitchValue.h; path = b3/B3SwitchValue.h; sourceTree = "<group>"; };
+               0FEC84F11BDACDAC0080FF74 /* B3Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Type.cpp; path = b3/B3Type.cpp; sourceTree = "<group>"; };
+               0FEC84F21BDACDAC0080FF74 /* B3Type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Type.h; path = b3/B3Type.h; sourceTree = "<group>"; };
+               0FEC84F31BDACDAC0080FF74 /* B3UpsilonValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3UpsilonValue.cpp; path = b3/B3UpsilonValue.cpp; sourceTree = "<group>"; };
+               0FEC84F41BDACDAC0080FF74 /* B3UpsilonValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3UpsilonValue.h; path = b3/B3UpsilonValue.h; sourceTree = "<group>"; };
+               0FEC84F51BDACDAC0080FF74 /* B3UseCounts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3UseCounts.cpp; path = b3/B3UseCounts.cpp; sourceTree = "<group>"; };
+               0FEC84F61BDACDAC0080FF74 /* B3UseCounts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3UseCounts.h; path = b3/B3UseCounts.h; sourceTree = "<group>"; };
+               0FEC84F71BDACDAC0080FF74 /* B3Validate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Validate.cpp; path = b3/B3Validate.cpp; sourceTree = "<group>"; };
+               0FEC84F81BDACDAC0080FF74 /* B3Validate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Validate.h; path = b3/B3Validate.h; sourceTree = "<group>"; };
+               0FEC84F91BDACDAC0080FF74 /* B3Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Value.cpp; path = b3/B3Value.cpp; sourceTree = "<group>"; };
+               0FEC84FA1BDACDAC0080FF74 /* B3Value.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Value.h; path = b3/B3Value.h; sourceTree = "<group>"; };
+               0FEC84FB1BDACDAC0080FF74 /* B3ValueInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ValueInlines.h; path = b3/B3ValueInlines.h; sourceTree = "<group>"; };
+               0FEC84FC1BDACDAC0080FF74 /* B3ValueRep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ValueRep.cpp; path = b3/B3ValueRep.cpp; sourceTree = "<group>"; };
+               0FEC84FD1BDACDAC0080FF74 /* B3ValueRep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ValueRep.h; path = b3/B3ValueRep.h; sourceTree = "<group>"; };
+               0FEC85481BDACDC70080FF74 /* AirAllocateStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirAllocateStack.cpp; path = b3/air/AirAllocateStack.cpp; sourceTree = "<group>"; };
+               0FEC85491BDACDC70080FF74 /* AirAllocateStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirAllocateStack.h; path = b3/air/AirAllocateStack.h; sourceTree = "<group>"; };
+               0FEC854A1BDACDC70080FF74 /* AirArg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirArg.cpp; path = b3/air/AirArg.cpp; sourceTree = "<group>"; };
+               0FEC854B1BDACDC70080FF74 /* AirArg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirArg.h; path = b3/air/AirArg.h; sourceTree = "<group>"; };
+               0FEC854C1BDACDC70080FF74 /* AirBasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirBasicBlock.cpp; path = b3/air/AirBasicBlock.cpp; sourceTree = "<group>"; };
+               0FEC854D1BDACDC70080FF74 /* AirBasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirBasicBlock.h; path = b3/air/AirBasicBlock.h; sourceTree = "<group>"; };
+               0FEC854E1BDACDC70080FF74 /* AirCCallSpecial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirCCallSpecial.cpp; path = b3/air/AirCCallSpecial.cpp; sourceTree = "<group>"; };
+               0FEC854F1BDACDC70080FF74 /* AirCCallSpecial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirCCallSpecial.h; path = b3/air/AirCCallSpecial.h; sourceTree = "<group>"; };
+               0FEC85501BDACDC70080FF74 /* AirCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirCode.cpp; path = b3/air/AirCode.cpp; sourceTree = "<group>"; };
+               0FEC85511BDACDC70080FF74 /* AirCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirCode.h; path = b3/air/AirCode.h; sourceTree = "<group>"; };
+               0FEC85521BDACDC70080FF74 /* AirFrequentedBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirFrequentedBlock.h; path = b3/air/AirFrequentedBlock.h; sourceTree = "<group>"; };
+               0FEC85531BDACDC70080FF74 /* AirGenerate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirGenerate.cpp; path = b3/air/AirGenerate.cpp; sourceTree = "<group>"; };
+               0FEC85541BDACDC70080FF74 /* AirGenerate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirGenerate.h; path = b3/air/AirGenerate.h; sourceTree = "<group>"; };
+               0FEC85551BDACDC70080FF74 /* AirGenerationContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirGenerationContext.h; path = b3/air/AirGenerationContext.h; sourceTree = "<group>"; };
+               0FEC85561BDACDC70080FF74 /* AirHandleCalleeSaves.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirHandleCalleeSaves.cpp; path = b3/air/AirHandleCalleeSaves.cpp; sourceTree = "<group>"; };
+               0FEC85571BDACDC70080FF74 /* AirHandleCalleeSaves.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirHandleCalleeSaves.h; path = b3/air/AirHandleCalleeSaves.h; sourceTree = "<group>"; };
+               0FEC85581BDACDC70080FF74 /* AirInsertionSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirInsertionSet.cpp; path = b3/air/AirInsertionSet.cpp; sourceTree = "<group>"; };
+               0FEC85591BDACDC70080FF74 /* AirInsertionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirInsertionSet.h; path = b3/air/AirInsertionSet.h; sourceTree = "<group>"; };
+               0FEC855A1BDACDC70080FF74 /* AirInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirInst.cpp; path = b3/air/AirInst.cpp; sourceTree = "<group>"; };
+               0FEC855B1BDACDC70080FF74 /* AirInst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirInst.h; path = b3/air/AirInst.h; sourceTree = "<group>"; };
+               0FEC855C1BDACDC70080FF74 /* AirInstInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirInstInlines.h; path = b3/air/AirInstInlines.h; sourceTree = "<group>"; };
+               0FEC855D1BDACDC70080FF74 /* AirLiveness.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirLiveness.h; path = b3/air/AirLiveness.h; sourceTree = "<group>"; };
+               0FEC855E1BDACDC70080FF74 /* AirPhaseScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirPhaseScope.cpp; path = b3/air/AirPhaseScope.cpp; sourceTree = "<group>"; };
+               0FEC855F1BDACDC70080FF74 /* AirPhaseScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirPhaseScope.h; path = b3/air/AirPhaseScope.h; sourceTree = "<group>"; };
+               0FEC85601BDACDC70080FF74 /* AirRegisterPriority.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirRegisterPriority.cpp; path = b3/air/AirRegisterPriority.cpp; sourceTree = "<group>"; };
+               0FEC85611BDACDC70080FF74 /* AirRegisterPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirRegisterPriority.h; path = b3/air/AirRegisterPriority.h; sourceTree = "<group>"; };
+               0FEC85621BDACDC70080FF74 /* AirSpecial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirSpecial.cpp; path = b3/air/AirSpecial.cpp; sourceTree = "<group>"; };
+               0FEC85631BDACDC70080FF74 /* AirSpecial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirSpecial.h; path = b3/air/AirSpecial.h; sourceTree = "<group>"; };
+               0FEC85641BDACDC70080FF74 /* AirSpillEverything.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirSpillEverything.cpp; path = b3/air/AirSpillEverything.cpp; sourceTree = "<group>"; };
+               0FEC85651BDACDC70080FF74 /* AirSpillEverything.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirSpillEverything.h; path = b3/air/AirSpillEverything.h; sourceTree = "<group>"; };
+               0FEC85661BDACDC70080FF74 /* AirStackSlot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirStackSlot.cpp; path = b3/air/AirStackSlot.cpp; sourceTree = "<group>"; };
+               0FEC85671BDACDC70080FF74 /* AirStackSlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirStackSlot.h; path = b3/air/AirStackSlot.h; sourceTree = "<group>"; };
+               0FEC85681BDACDC70080FF74 /* AirTmp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirTmp.cpp; path = b3/air/AirTmp.cpp; sourceTree = "<group>"; };
+               0FEC85691BDACDC70080FF74 /* AirTmp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirTmp.h; path = b3/air/AirTmp.h; sourceTree = "<group>"; };
+               0FEC856A1BDACDC70080FF74 /* AirTmpInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirTmpInlines.h; path = b3/air/AirTmpInlines.h; sourceTree = "<group>"; };
+               0FEC856B1BDACDC70080FF74 /* AirValidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirValidate.cpp; path = b3/air/AirValidate.cpp; sourceTree = "<group>"; };
+               0FEC856C1BDACDC70080FF74 /* AirValidate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirValidate.h; path = b3/air/AirValidate.h; sourceTree = "<group>"; };
+               0FEC85921BDB1E100080FF74 /* AirGenerated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AirGenerated.cpp; path = b3/air/AirGenerated.cpp; sourceTree = "<group>"; };
+               0FEC85AD1BDB5CF10080FF74 /* testb3 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testb3; sourceTree = BUILT_PRODUCTS_DIR; };
+               0FEC85AE1BDB5D5E0080FF74 /* testb3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = testb3.cpp; path = b3/testb3.cpp; sourceTree = "<group>"; };
+               0FEC85B21BDED9570080FF74 /* B3ConstPtrValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ConstPtrValue.h; path = b3/B3ConstPtrValue.h; sourceTree = "<group>"; };
+               0FEC85B41BE1462F0080FF74 /* B3InsertionSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3InsertionSet.cpp; path = b3/B3InsertionSet.cpp; sourceTree = "<group>"; };
+               0FEC85B51BE1462F0080FF74 /* B3InsertionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3InsertionSet.h; path = b3/B3InsertionSet.h; sourceTree = "<group>"; };
+               0FEC85B61BE1462F0080FF74 /* B3InsertionSetInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3InsertionSetInlines.h; path = b3/B3InsertionSetInlines.h; sourceTree = "<group>"; };
+               0FEC85B71BE1462F0080FF74 /* B3ReduceStrength.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ReduceStrength.cpp; path = b3/B3ReduceStrength.cpp; sourceTree = "<group>"; };
+               0FEC85B81BE1462F0080FF74 /* B3ReduceStrength.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ReduceStrength.h; path = b3/B3ReduceStrength.h; sourceTree = "<group>"; };
+               0FEC85BE1BE167A00080FF74 /* B3Effects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Effects.h; path = b3/B3Effects.h; sourceTree = "<group>"; };
+               0FEC85BF1BE167A00080FF74 /* B3HeapRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3HeapRange.cpp; path = b3/B3HeapRange.cpp; sourceTree = "<group>"; };
+               0FEC85C01BE167A00080FF74 /* B3HeapRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3HeapRange.h; path = b3/B3HeapRange.h; sourceTree = "<group>"; };
+               0FEC85C41BE16F5A0080FF74 /* B3Effects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Effects.cpp; path = b3/B3Effects.cpp; sourceTree = "<group>"; };
                0FED67B71B26256D0066CE15 /* DFGConstantHoistingPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGConstantHoistingPhase.cpp; path = dfg/DFGConstantHoistingPhase.cpp; sourceTree = "<group>"; };
                0FED67B81B26256D0066CE15 /* DFGConstantHoistingPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGConstantHoistingPhase.h; path = dfg/DFGConstantHoistingPhase.h; sourceTree = "<group>"; };
                0FEE98401A8865B600754E93 /* SetupVarargsFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetupVarargsFrame.h; sourceTree = "<group>"; };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               0FEC85A21BDB5CF10080FF74 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               0FEC85A31BDB5CF10080FF74 /* Foundation.framework in Frameworks */,
+                               0FEC85A41BDB5CF10080FF74 /* JavaScriptCore.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                0FF922C614F46B130041A24E /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                                141211200A48793C00480255 /* minidom */,
                                14BD59BF0A3E8F9000BAF59C /* testapi */,
                                6511230514046A4C002B101D /* testRegExp */,
+                               0FEC85AD1BDB5CF10080FF74 /* testb3 */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                                A7C225CC139981F100FF1662 /* KeywordLookupGenerator.py */,
                                1432EBD70A34CAD400717B9F /* API */,
                                9688CB120ED12B4E001D649F /* assembler */,
+                               0FEC84B21BDACD5E0080FF74 /* b3 */,
                                A54CF2EA184EA73900237F19 /* bindings */,
                                A7D8019F1880D66E0026C39B /* builtins */,
                                969A078F0ED1D3AE00F1F681 /* bytecode */,
                        name = ftl;
                        sourceTree = "<group>";
                };
+               0FEC84B21BDACD5E0080FF74 /* b3 */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0FEC84B31BDACD880080FF74 /* air */,
+                               0FEC84B41BDACDAC0080FF74 /* B3ArgumentRegValue.cpp */,
+                               0FEC84B51BDACDAC0080FF74 /* B3ArgumentRegValue.h */,
+                               0FEC84B61BDACDAC0080FF74 /* B3BasicBlock.cpp */,
+                               0FEC84B71BDACDAC0080FF74 /* B3BasicBlock.h */,
+                               0FEC84B81BDACDAC0080FF74 /* B3BasicBlockInlines.h */,
+                               0FEC84B91BDACDAC0080FF74 /* B3BasicBlockUtils.h */,
+                               0FEC84BA1BDACDAC0080FF74 /* B3BlockWorklist.h */,
+                               0FEC84BB1BDACDAC0080FF74 /* B3CheckSpecial.cpp */,
+                               0FEC84BC1BDACDAC0080FF74 /* B3CheckSpecial.h */,
+                               0FEC84BD1BDACDAC0080FF74 /* B3CheckValue.cpp */,
+                               0FEC84BE1BDACDAC0080FF74 /* B3CheckValue.h */,
+                               0FEC84BF1BDACDAC0080FF74 /* B3Common.cpp */,
+                               0FEC84C01BDACDAC0080FF74 /* B3Common.h */,
+                               0FEC84C11BDACDAC0080FF74 /* B3Commutativity.cpp */,
+                               0FEC84C21BDACDAC0080FF74 /* B3Commutativity.h */,
+                               0FEC84C31BDACDAC0080FF74 /* B3Const32Value.cpp */,
+                               0FEC84C41BDACDAC0080FF74 /* B3Const32Value.h */,
+                               0FEC84C51BDACDAC0080FF74 /* B3Const64Value.cpp */,
+                               0FEC84C61BDACDAC0080FF74 /* B3Const64Value.h */,
+                               0FEC84C71BDACDAC0080FF74 /* B3ConstDoubleValue.cpp */,
+                               0FEC84C81BDACDAC0080FF74 /* B3ConstDoubleValue.h */,
+                               0FEC85B21BDED9570080FF74 /* B3ConstPtrValue.h */,
+                               0FEC84C91BDACDAC0080FF74 /* B3ControlValue.cpp */,
+                               0FEC84CA1BDACDAC0080FF74 /* B3ControlValue.h */,
+                               0FEC85C41BE16F5A0080FF74 /* B3Effects.cpp */,
+                               0FEC85BE1BE167A00080FF74 /* B3Effects.h */,
+                               0FEC84CB1BDACDAC0080FF74 /* B3FrequencyClass.cpp */,
+                               0FEC84CC1BDACDAC0080FF74 /* B3FrequencyClass.h */,
+                               0FEC84CD1BDACDAC0080FF74 /* B3FrequentedBlock.h */,
+                               0FEC84CE1BDACDAC0080FF74 /* B3Generate.cpp */,
+                               0FEC84CF1BDACDAC0080FF74 /* B3Generate.h */,
+                               0FEC84D01BDACDAC0080FF74 /* B3GenericFrequentedBlock.h */,
+                               0FEC85BF1BE167A00080FF74 /* B3HeapRange.cpp */,
+                               0FEC85C01BE167A00080FF74 /* B3HeapRange.h */,
+                               0FEC84D11BDACDAC0080FF74 /* B3IndexMap.h */,
+                               0FEC84D21BDACDAC0080FF74 /* B3IndexSet.h */,
+                               0FEC85B41BE1462F0080FF74 /* B3InsertionSet.cpp */,
+                               0FEC85B51BE1462F0080FF74 /* B3InsertionSet.h */,
+                               0FEC85B61BE1462F0080FF74 /* B3InsertionSetInlines.h */,
+                               0FEC84D31BDACDAC0080FF74 /* B3LowerToAir.cpp */,
+                               0FEC84D41BDACDAC0080FF74 /* B3LowerToAir.h */,
+                               0FEC84D51BDACDAC0080FF74 /* B3MemoryValue.cpp */,
+                               0FEC84D61BDACDAC0080FF74 /* B3MemoryValue.h */,
+                               0FEC84D71BDACDAC0080FF74 /* B3Opcode.cpp */,
+                               0FEC84D81BDACDAC0080FF74 /* B3Opcode.h */,
+                               0FEC84D91BDACDAC0080FF74 /* B3Origin.cpp */,
+                               0FEC84DA1BDACDAC0080FF74 /* B3Origin.h */,
+                               0FEC84DB1BDACDAC0080FF74 /* B3PatchpointSpecial.cpp */,
+                               0FEC84DC1BDACDAC0080FF74 /* B3PatchpointSpecial.h */,
+                               0FEC84DD1BDACDAC0080FF74 /* B3PatchpointValue.cpp */,
+                               0FEC84DE1BDACDAC0080FF74 /* B3PatchpointValue.h */,
+                               0FEC84DF1BDACDAC0080FF74 /* B3PhaseScope.cpp */,
+                               0FEC84E01BDACDAC0080FF74 /* B3PhaseScope.h */,
+                               0FEC84E11BDACDAC0080FF74 /* B3Procedure.cpp */,
+                               0FEC84E21BDACDAC0080FF74 /* B3Procedure.h */,
+                               0FEC84E31BDACDAC0080FF74 /* B3ProcedureInlines.h */,
+                               0FEC85B71BE1462F0080FF74 /* B3ReduceStrength.cpp */,
+                               0FEC85B81BE1462F0080FF74 /* B3ReduceStrength.h */,
+                               0FEC84E41BDACDAC0080FF74 /* B3Stackmap.cpp */,
+                               0FEC84E51BDACDAC0080FF74 /* B3Stackmap.h */,
+                               0FEC84E61BDACDAC0080FF74 /* B3StackmapSpecial.cpp */,
+                               0FEC84E71BDACDAC0080FF74 /* B3StackmapSpecial.h */,
+                               0FEC84E81BDACDAC0080FF74 /* B3StackSlotKind.cpp */,
+                               0FEC84E91BDACDAC0080FF74 /* B3StackSlotKind.h */,
+                               0FEC84EA1BDACDAC0080FF74 /* B3StackSlotValue.cpp */,
+                               0FEC84EB1BDACDAC0080FF74 /* B3StackSlotValue.h */,
+                               0FEC84EC1BDACDAC0080FF74 /* B3SuccessorCollection.h */,
+                               0FEC84ED1BDACDAC0080FF74 /* B3SwitchCase.cpp */,
+                               0FEC84EE1BDACDAC0080FF74 /* B3SwitchCase.h */,
+                               0FEC84EF1BDACDAC0080FF74 /* B3SwitchValue.cpp */,
+                               0FEC84F01BDACDAC0080FF74 /* B3SwitchValue.h */,
+                               0FEC84F11BDACDAC0080FF74 /* B3Type.cpp */,
+                               0FEC84F21BDACDAC0080FF74 /* B3Type.h */,
+                               0FEC84F31BDACDAC0080FF74 /* B3UpsilonValue.cpp */,
+                               0FEC84F41BDACDAC0080FF74 /* B3UpsilonValue.h */,
+                               0FEC84F51BDACDAC0080FF74 /* B3UseCounts.cpp */,
+                               0FEC84F61BDACDAC0080FF74 /* B3UseCounts.h */,
+                               0FEC84F71BDACDAC0080FF74 /* B3Validate.cpp */,
+                               0FEC84F81BDACDAC0080FF74 /* B3Validate.h */,
+                               0FEC84F91BDACDAC0080FF74 /* B3Value.cpp */,
+                               0FEC84FA1BDACDAC0080FF74 /* B3Value.h */,
+                               0FEC84FB1BDACDAC0080FF74 /* B3ValueInlines.h */,
+                               0FEC84FC1BDACDAC0080FF74 /* B3ValueRep.cpp */,
+                               0FEC84FD1BDACDAC0080FF74 /* B3ValueRep.h */,
+                               0FEC85AE1BDB5D5E0080FF74 /* testb3.cpp */,
+                       );
+                       name = b3;
+                       sourceTree = "<group>";
+               };
+               0FEC84B31BDACD880080FF74 /* air */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0FEC85481BDACDC70080FF74 /* AirAllocateStack.cpp */,
+                               0FEC85491BDACDC70080FF74 /* AirAllocateStack.h */,
+                               0FEC854A1BDACDC70080FF74 /* AirArg.cpp */,
+                               0FEC854B1BDACDC70080FF74 /* AirArg.h */,
+                               0FEC854C1BDACDC70080FF74 /* AirBasicBlock.cpp */,
+                               0FEC854D1BDACDC70080FF74 /* AirBasicBlock.h */,
+                               0FEC854E1BDACDC70080FF74 /* AirCCallSpecial.cpp */,
+                               0FEC854F1BDACDC70080FF74 /* AirCCallSpecial.h */,
+                               0FEC85501BDACDC70080FF74 /* AirCode.cpp */,
+                               0FEC85511BDACDC70080FF74 /* AirCode.h */,
+                               0FEC85521BDACDC70080FF74 /* AirFrequentedBlock.h */,
+                               0FEC85531BDACDC70080FF74 /* AirGenerate.cpp */,
+                               0FEC85541BDACDC70080FF74 /* AirGenerate.h */,
+                               0FEC85921BDB1E100080FF74 /* AirGenerated.cpp */,
+                               0FEC85551BDACDC70080FF74 /* AirGenerationContext.h */,
+                               0FEC85561BDACDC70080FF74 /* AirHandleCalleeSaves.cpp */,
+                               0FEC85571BDACDC70080FF74 /* AirHandleCalleeSaves.h */,
+                               0FEC85581BDACDC70080FF74 /* AirInsertionSet.cpp */,
+                               0FEC85591BDACDC70080FF74 /* AirInsertionSet.h */,
+                               0FEC855A1BDACDC70080FF74 /* AirInst.cpp */,
+                               0FEC855B1BDACDC70080FF74 /* AirInst.h */,
+                               0FEC855C1BDACDC70080FF74 /* AirInstInlines.h */,
+                               0FEC855D1BDACDC70080FF74 /* AirLiveness.h */,
+                               0FEC855E1BDACDC70080FF74 /* AirPhaseScope.cpp */,
+                               0FEC855F1BDACDC70080FF74 /* AirPhaseScope.h */,
+                               0FEC85601BDACDC70080FF74 /* AirRegisterPriority.cpp */,
+                               0FEC85611BDACDC70080FF74 /* AirRegisterPriority.h */,
+                               0FEC85621BDACDC70080FF74 /* AirSpecial.cpp */,
+                               0FEC85631BDACDC70080FF74 /* AirSpecial.h */,
+                               0FEC85641BDACDC70080FF74 /* AirSpillEverything.cpp */,
+                               0FEC85651BDACDC70080FF74 /* AirSpillEverything.h */,
+                               0FEC85661BDACDC70080FF74 /* AirStackSlot.cpp */,
+                               0FEC85671BDACDC70080FF74 /* AirStackSlot.h */,
+                               0FEC85681BDACDC70080FF74 /* AirTmp.cpp */,
+                               0FEC85691BDACDC70080FF74 /* AirTmp.h */,
+                               0FEC856A1BDACDC70080FF74 /* AirTmpInlines.h */,
+                               0FEC856B1BDACDC70080FF74 /* AirValidate.cpp */,
+                               0FEC856C1BDACDC70080FF74 /* AirValidate.h */,
+                       );
+                       name = air;
+                       sourceTree = "<group>";
+               };
                0FF4272E158EBCCE004CB9FF /* disassembler */ = {
                        isa = PBXGroup;
                        children = (
                                0F1FE51C1922A3BC006987C5 /* AbortReason.h in Headers */,
                                860161E30F3A83C100F84710 /* AbstractMacroAssembler.h in Headers */,
                                0F55F0F514D1063C00AC7649 /* AbstractPC.h in Headers */,
+                               0FEC852A1BDACDAC0080FF74 /* B3PhaseScope.h in Headers */,
                                A5EA70E919F5B1010098F5EC /* AlternateDispatchableAgent.h in Headers */,
                                2A48D1911772365B00C65A5F /* APICallbackFunction.h in Headers */,
                                BC18C3E50E16F5CD00B34460 /* APICast.h in Headers */,
                                A5EA70E819F5B1010098F5EC /* AugmentableInspectorControllerClient.h in Headers */,
                                52678F8F1A031009006A306D /* BasicBlockLocation.h in Headers */,
                                147B83AC0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h in Headers */,
+                               0FEC85361BDACDAC0080FF74 /* B3SuccessorCollection.h in Headers */,
                                866739D213BFDE710023D87C /* BigInteger.h in Headers */,
                                0F64B2721A784BAF006E4E66 /* BinarySwitch.h in Headers */,
+                               0FEC858E1BDACDC70080FF74 /* AirTmp.h in Headers */,
                                BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
                                FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */,
                                A7D801A51880D66E0026C39B /* BuiltinExecutables.h in Headers */,
                                99DA00A41BD5993100F4575C /* builtins_model.py in Headers */,
                                99DA00A51BD5993100F4575C /* builtins_templates.py in Headers */,
                                41DEA1321B9F3163006D65DD /* BuiltinUtils.h in Headers */,
+                               0FEC85101BDACDAC0080FF74 /* B3Const64Value.h in Headers */,
                                9E72940B190F0514001A91B5 /* BundlePath.h in Headers */,
                                0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */,
                                0FB7F39815ED8E4600F167B2 /* ButterflyInlines.h in Headers */,
                                0F2DD80B1AB3D85800BBB8E8 /* BytecodeKills.h in Headers */,
                                C2FCAE1317A9C24E0034C735 /* BytecodeLivenessAnalysis.h in Headers */,
                                0F666EC0183566F900D017F1 /* BytecodeLivenessAnalysisInlines.h in Headers */,
+                               0FEC85061BDACDAC0080FF74 /* B3CheckSpecial.h in Headers */,
                                6514F21918B3E1670098FF8B /* Bytecodes.h in Headers */,
                                0F885E111849A3BE00F1E3FA /* BytecodeUseDef.h in Headers */,
                                0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */,
                                0F0B83A714BCF50700885B4F /* CodeType.h in Headers */,
                                A53243981856A489002ED692 /* CombinedDomains.json in Headers */,
                                BC18C3F30E16F5CD00B34460 /* CommonIdentifiers.h in Headers */,
+                               0FEC85BA1BE1462F0080FF74 /* B3InsertionSet.h in Headers */,
                                0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */,
                                6553A33217A1F1EE008CF6F3 /* CommonSlowPathsExceptions.h in Headers */,
                                0FD82E39141AB14D00179C94 /* CompactJITCodeMap.h in Headers */,
+                               0FEC852C1BDACDAC0080FF74 /* B3Procedure.h in Headers */,
                                A7E5A3A81797432D00E893C0 /* CompilationResult.h in Headers */,
                                BC18C3F40E16F5CD00B34460 /* Completion.h in Headers */,
                                996B731D1BDA08EF00331B84 /* JSGlobalObject.lut.h in Headers */,
                                0F6FC751196110A800E1D02D /* ComplexGetStatus.h in Headers */,
                                0FDB2CEA174896C7007B3C1B /* ConcurrentJITLock.h in Headers */,
                                BC18C3F50E16F5CD00B34460 /* config.h in Headers */,
+                               0FEC85881BDACDC70080FF74 /* AirSpecial.h in Headers */,
                                144836E7132DA7BE005BE785 /* ConservativeRoots.h in Headers */,
                                A53CE08A18BC21C300BEDF76 /* ConsoleClient.h in Headers */,
+                               0FEC85081BDACDAC0080FF74 /* B3CheckValue.h in Headers */,
                                A5FD007A189B051000633231 /* ConsoleMessage.h in Headers */,
                                996B73191BDA068000331B84 /* BooleanPrototype.lut.h in Headers */,
                                A53CE08618BC1A5600BEDF76 /* ConsolePrototype.h in Headers */,
                                C2FC9BD316644DFB00810D33 /* CopiedBlockInlines.h in Headers */,
                                C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */,
                                C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlines.h in Headers */,
+                               0FEC85241BDACDAC0080FF74 /* B3Origin.h in Headers */,
                                0F7C11AD1BC3862C00C74CDB /* CopyBarrier.h in Headers */,
                                0F5A52D017ADD717008ECB2D /* CopyToken.h in Headers */,
                                C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */,
                                9959E92B1BD17FA4001AA413 /* cssmin.py in Headers */,
                                2A111246192FCE79005EE18D /* CustomGetterSetter.h in Headers */,
                                0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */,
+                               0FEC85041BDACDAC0080FF74 /* B3BlockWorklist.h in Headers */,
                                0F2B66DF17B6B5AB00A7AE3F /* DataView.h in Headers */,
                                BCD2034A0E17135E002C7E82 /* DateConstructor.h in Headers */,
                                41359CF30FDD89AD00206180 /* DateConversion.h in Headers */,
                                A704D90317A0BAA8006BA554 /* DFGAbstractInterpreter.h in Headers */,
                                A704D90417A0BAA8006BA554 /* DFGAbstractInterpreterInlines.h in Headers */,
                                0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */,
+                               0FEC85701BDACDC70080FF74 /* AirArg.h in Headers */,
                                0FD3E4021B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h in Headers */,
                                0F18D3D01B55A6E0002C5C9F /* DFGAdaptiveStructureWatchpoint.h in Headers */,
                                0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */,
                                0F2DD8141AB3D8BE00BBB8E8 /* DFGArgumentsUtilities.h in Headers */,
                                0F485322187750560083B687 /* DFGArithMode.h in Headers */,
                                0F05C3B41683CF9200BAF45B /* DFGArrayifySlowPathGenerator.h in Headers */,
+                               0FEC85171BDACDAC0080FF74 /* B3FrequentedBlock.h in Headers */,
                                0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */,
+                               0FEC85761BDACDC70080FF74 /* AirCode.h in Headers */,
                                A7D9A29517A0BC7400EE2618 /* DFGAtTailAbstractState.h in Headers */,
                                0F666EC71835672B00D017F1 /* DFGAvailability.h in Headers */,
                                0F2B9CE319D0BA7D00B1D1B5 /* DFGAvailabilityMap.h in Headers */,
                                A7D89CF417A0B8CC00773AD8 /* DFGBlockInsertionSet.h in Headers */,
                                0FC3CCFC19ADA410006AC72A /* DFGBlockMap.h in Headers */,
                                0FC3CCFD19ADA410006AC72A /* DFGBlockMapInlines.h in Headers */,
+                               0FEC852D1BDACDAC0080FF74 /* B3ProcedureInlines.h in Headers */,
                                0FC3CCFE19ADA410006AC72A /* DFGBlockSet.h in Headers */,
                                0FBF158D19B7A53100695DD0 /* DFGBlockSetInlines.h in Headers */,
                                0FC3CD0019ADA410006AC72A /* DFGBlockWorklist.h in Headers */,
                                0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */,
                                A7D9A29617A0BC7400EE2618 /* DFGEdgeDominates.h in Headers */,
                                A7986D5717A0BB1E00A95DD0 /* DFGEdgeUsesStructure.h in Headers */,
+                               0FEC85721BDACDC70080FF74 /* AirBasicBlock.h in Headers */,
                                0F8F14341ADF090100ED792C /* DFGEpoch.h in Headers */,
                                0FBC0AE81496C7C700D4FBDD /* DFGExitProfile.h in Headers */,
+                               0FEC85031BDACDAC0080FF74 /* B3BasicBlockUtils.h in Headers */,
                                A78A9775179738B8009DF744 /* DFGFailedFinalizer.h in Headers */,
                                A7BFF3C0179868940002F462 /* DFGFiltrationResult.h in Headers */,
                                A78A9777179738B8009DF744 /* DFGFinalizer.h in Headers */,
                                62F2AA381B0BEDE300610C7A /* DFGLazyNode.h in Headers */,
                                A7D9A29817A0BC7400EE2618 /* DFGLICMPhase.h in Headers */,
                                79C4B15E1BA2158F00FD592E /* DFGLiveCatchVariablePreservationPhase.h in Headers */,
+                               0FEC85861BDACDC70080FF74 /* AirRegisterPriority.h in Headers */,
                                A7D89CFC17A0B8CC00773AD8 /* DFGLivenessAnalysisPhase.h in Headers */,
                                0FF0F19B16B729FA005DF95B /* DFGLongLivedState.h in Headers */,
                                A767B5B617A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.h in Headers */,
                                0F2BDC451522801B00CD8910 /* DFGMinifiedGraph.h in Headers */,
                                0F2E892D16D02BAF009E4FD2 /* DFGMinifiedID.h in Headers */,
                                0F2BDC461522802000CD8910 /* DFGMinifiedNode.h in Headers */,
+                               0FEC85141BDACDAC0080FF74 /* B3ControlValue.h in Headers */,
                                0F8F14361ADF090100ED792C /* DFGMovHintRemovalPhase.h in Headers */,
                                0FF2CD5C1B61A4F8004955A8 /* DFGMultiGetByOffsetData.h in Headers */,
                                0FC3CD0219ADA411006AC72A /* DFGNaiveDominators.h in Headers */,
                                0FC0976A1468A6F700CF2442 /* DFGOSRExit.h in Headers */,
                                0F235BEC17178E7300690C7F /* DFGOSRExitBase.h in Headers */,
                                0FFB921C16D02F110055A5DB /* DFGOSRExitCompilationInfo.h in Headers */,
+                               0FEC85351BDACDAC0080FF74 /* B3StackSlotValue.h in Headers */,
                                0FC0977114693AF500CF2442 /* DFGOSRExitCompiler.h in Headers */,
                                0F7025AA1714B0FC00382C0E /* DFGOSRExitCompilerCommon.h in Headers */,
                                0F392C8A1B46188400844728 /* DFGOSRExitFuzz.h in Headers */,
                                0FFC92161B94FB3E0071DD66 /* DFGPropertyTypeKey.h in Headers */,
                                0FB17663196B8F9E0091052A /* DFGPureValue.h in Headers */,
                                0F3A1BFA1A9ECB7D000DE01A /* DFGPutStackSinkingPhase.h in Headers */,
+                               0FEC856E1BDACDC70080FF74 /* AirAllocateStack.h in Headers */,
+                               0FEC851C1BDACDAC0080FF74 /* B3IndexSet.h in Headers */,
                                86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */,
                                0F2FCCFC18A60070001A27F8 /* DFGSafepoint.h in Headers */,
                                A77A424317A0BBFD00A8DB81 /* DFGSafeToExecute.h in Headers */,
                                0FD8A32817D51F5700CA2C40 /* DFGTierUpCheckInjectionPhase.h in Headers */,
                                0FD8A32A17D51F5700CA2C40 /* DFGToFTLDeferredCompilationCallback.h in Headers */,
                                0FD8A32C17D51F5700CA2C40 /* DFGToFTLForOSREntryDeferredCompilationCallback.h in Headers */,
+                               0FEC857E1BDACDC70080FF74 /* AirInsertionSet.h in Headers */,
                                0FE7211E193B9C590031F6ED /* DFGTransition.h in Headers */,
                                0F63943F15C75F19006A597C /* DFGTypeCheckHoistingPhase.h in Headers */,
                                0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */,
                                0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */,
                                0FDDBFB61666EEDA00C55FEF /* DFGVariableAccessDataDump.h in Headers */,
                                0F2BDC491522809600CD8910 /* DFGVariableEvent.h in Headers */,
+                               0FEC85381BDACDAC0080FF74 /* B3SwitchCase.h in Headers */,
                                0F2BDC4B1522809D00CD8910 /* DFGVariableEventStream.h in Headers */,
                                0FFFC96014EF90BD00C72532 /* DFGVirtualRegisterAllocationPhase.h in Headers */,
                                996B73181BDA068000331B84 /* ArrayIteratorPrototype.lut.h in Headers */,
                                0FE050181AA9091100D33B33 /* DirectArguments.h in Headers */,
                                0FE050161AA9091100D33B33 /* DirectArgumentsOffset.h in Headers */,
                                0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */,
+                               0FEC85C11BE167A00080FF74 /* B3Effects.h in Headers */,
                                A70447EE17A0BD7000F5898E /* DumpContext.h in Headers */,
                                2A83638618D7D0EE0000EBCC /* EdenGCActivityCallback.h in Headers */,
                                99E45A2418A1B2590026D88F /* EmptyInputCursor.h in Headers */,
                                0F56A1D315000F35002992B1 /* ExecutionCounter.h in Headers */,
                                0F3AC754188E5EC80032029F /* ExitingJITType.h in Headers */,
                                0FB105861675481200F8AB6E /* ExitKind.h in Headers */,
+                               0FEC85011BDACDAC0080FF74 /* B3BasicBlock.h in Headers */,
                                0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */,
                                A7A8AF3817ADB5F3005AB174 /* Float32Array.h in Headers */,
                                A7A8AF3917ADB5F3005AB174 /* Float64Array.h in Headers */,
                                0FEA0A201708B00700BB722C /* FTLTypedPointer.h in Headers */,
                                0F6B1CC61862C47800845D97 /* FTLUnwindInfo.h in Headers */,
                                0FDB2CCA173DA523007B3C1B /* FTLValueFromBlock.h in Headers */,
+                               0FEC85771BDACDC70080FF74 /* AirFrequentedBlock.h in Headers */,
                                0F5A6284188C98D40072C9DF /* FTLValueRange.h in Headers */,
                                0F0332C618B53FA9005F979A /* FTLWeight.h in Headers */,
                                0F0332C818B546EC005F979A /* FTLWeightedTarget.h in Headers */,
                                2A83638A18D7D0FE0000EBCC /* FullGCActivityCallback.h in Headers */,
                                BC18C4040E16F5CD00B34460 /* FunctionConstructor.h in Headers */,
                                0FF0F1A016B72A1A005DF95B /* FunctionExecutableDump.h in Headers */,
+                               0FEC853A1BDACDAC0080FF74 /* B3SwitchValue.h in Headers */,
                                52B310FB1974AE610080857C /* FunctionHasExecutedCache.h in Headers */,
                                FE4BFF2C1AD476E700088F87 /* FunctionOverrides.h in Headers */,
+                               0FEC852F1BDACDAC0080FF74 /* B3Stackmap.h in Headers */,
                                BC18C4050E16F5CD00B34460 /* FunctionPrototype.h in Headers */,
                                62D2D3901ADF103F000206C1 /* FunctionRareData.h in Headers */,
                                2AACE63D18CA5A0300ED0191 /* GCActivityCallback.h in Headers */,
                                C4703CD5192844CC0013FBEA /* generator_templates.py in Headers */,
                                0FE050191AA9091100D33B33 /* GenericArguments.h in Headers */,
                                0FE0501A1AA9091100D33B33 /* GenericArgumentsInlines.h in Headers */,
+                               0FEC850A1BDACDAC0080FF74 /* B3Common.h in Headers */,
                                0FE0501B1AA9091100D33B33 /* GenericOffset.h in Headers */,
                                0F2B66E017B6B5AB00A7AE3F /* GenericTypedArrayView.h in Headers */,
                                0F2B66E117B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h in Headers */,
                                C2E526BE1590EF000054E48D /* HeapTimer.h in Headers */,
                                FE7BA6101A1A7CEC00F1F7B4 /* HeapVerifier.h in Headers */,
                                0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */,
+                               0FEC850C1BDACDAC0080FF74 /* B3Commutativity.h in Headers */,
                                BC18C40F0E16F5CD00B34460 /* Identifier.h in Headers */,
                                8606DDEA18DA44AB00A383D0 /* IdentifierInlines.h in Headers */,
                                A5FD0076189B038C00633231 /* IdentifiersFactory.h in Headers */,
                                A1B9E23C1B4E0D6700BC7FED /* IntlCollatorConstructor.h in Headers */,
                                A18193E31B4E0CDB00FC1029 /* IntlCollatorConstructor.lut.h in Headers */,
                                A1B9E23E1B4E0D6700BC7FED /* IntlCollatorPrototype.h in Headers */,
+                               0FEC85161BDACDAC0080FF74 /* B3FrequencyClass.h in Headers */,
                                A18193E41B4E0CDB00FC1029 /* IntlCollatorPrototype.lut.h in Headers */,
                                A1587D6E1B4DC14100D69849 /* IntlDateTimeFormat.h in Headers */,
                                A1587D701B4DC14100D69849 /* IntlDateTimeFormatConstructor.h in Headers */,
                                0F24E54D17EE274900ABB217 /* JITOperations.h in Headers */,
                                0F766D3115AA8112008F363E /* JITStubRoutine.h in Headers */,
                                0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */,
+                               0FEC85911BDACDC70080FF74 /* AirValidate.h in Headers */,
                                0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */,
                                0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */,
                                A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,
                                0F2B66E517B6B5AB00A7AE3F /* JSArrayBufferConstructor.h in Headers */,
                                0F2B66E717B6B5AB00A7AE3F /* JSArrayBufferPrototype.h in Headers */,
                                0F2B66E917B6B5AB00A7AE3F /* JSArrayBufferView.h in Headers */,
+                               0FEC85B31BDED9570080FF74 /* B3ConstPtrValue.h in Headers */,
                                0F2B66EA17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h in Headers */,
                                A7BDAECB17F4EA1400F6140C /* JSArrayIterator.h in Headers */,
                                8B14186D1B62527F00FB2068 /* JSArrowFunction.h in Headers */,
+                               0FEC85121BDACDAC0080FF74 /* B3ConstDoubleValue.h in Headers */,
                                BC18C4180E16F5CD00B34460 /* JSBase.h in Headers */,
                                140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */,
                                86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
                                865A30F1135007E100CDB49E /* JSCJSValueInlines.h in Headers */,
                                BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */,
                                A53CE08818BC1A5600BEDF76 /* JSConsole.h in Headers */,
+                               0FEC851E1BDACDAC0080FF74 /* B3LowerToAir.h in Headers */,
+                               0FEC858F1BDACDC70080FF74 /* AirTmpInlines.h in Headers */,
                                86E3C613167BABD7006D760A /* JSContext.h in Headers */,
                                86E3C617167BABEE006D760A /* JSContextInternal.h in Headers */,
                                A58C024218E4A41A00032BC5 /* JSContextPrivate.h in Headers */,
                                FE384EE61ADDB7AD0055DE2C /* JSDollarVM.h in Headers */,
                                FE384EE81ADDB7AD0055DE2C /* JSDollarVMPrototype.h in Headers */,
                                BC18C42D0E16F5CD00B34460 /* JSEnvironmentRecord.h in Headers */,
+                               0FEC85201BDACDAC0080FF74 /* B3MemoryValue.h in Headers */,
                                86E3C614167BABD7006D760A /* JSExport.h in Headers */,
                                A7B4ACAF1484C9CE00B38A36 /* JSExportMacros.h in Headers */,
                                0F2B66EF17B6B5AB00A7AE3F /* JSFloat32Array.h in Headers */,
                                0F2B66F117B6B5AB00A7AE3F /* JSGenericTypedArrayView.h in Headers */,
                                0F2B66F217B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h in Headers */,
                                0F2B66F317B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h in Headers */,
+                               0FEC85451BDACDAC0080FF74 /* B3ValueInlines.h in Headers */,
                                0F2B66F417B6B5AB00A7AE3F /* JSGenericTypedArrayViewInlines.h in Headers */,
                                0F2B66F517B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototype.h in Headers */,
                                53917E7B1B7906FA000EBD33 /* JSGenericTypedArrayViewPrototypeFunctions.h in Headers */,
                                0F2B66F617B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototypeInlines.h in Headers */,
                                797E07AA1B8FCFB9008400BA /* JSGlobalLexicalEnvironment.h in Headers */,
+                               0FEC851B1BDACDAC0080FF74 /* B3IndexMap.h in Headers */,
                                BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
                                A5FD0086189B1B7E00633231 /* JSGlobalObjectConsoleAgent.h in Headers */,
                                A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */,
                                A700874217CBE8EB00C3E643 /* JSMap.h in Headers */,
                                A74DEF96182D991400522C22 /* JSMapIterator.h in Headers */,
                                9959E92D1BD17FA4001AA413 /* jsmin.py in Headers */,
+                               0FEC85421BDACDAC0080FF74 /* B3Validate.h in Headers */,
                                E3D239C91B829C1C00BBEF67 /* JSModuleEnvironment.h in Headers */,
                                E318CBC11B8AEF5100A2929D /* JSModuleNamespaceObject.h in Headers */,
                                E39DA4A71B7E8B7C0084F33A /* JSModuleRecord.h in Headers */,
                                A7C1EAF017987AB600299DB2 /* JSStackInlines.h in Headers */,
                                BC18C4270E16F5CD00B34460 /* JSString.h in Headers */,
                                86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */,
+                               0FEC853E1BDACDAC0080FF74 /* B3UpsilonValue.h in Headers */,
                                70EC0EC31AA0D7DA00B6AAFA /* JSStringIterator.h in Headers */,
                                2600B5A7152BAAA70091EE5F /* JSStringJoiner.h in Headers */,
                                BC18C4280E16F5CD00B34460 /* JSStringRef.h in Headers */,
                                A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
                                A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
                                709FB8681AE335C60039D069 /* JSWeakSet.h in Headers */,
+                               0FEC85BB1BE1462F0080FF74 /* B3InsertionSetInlines.h in Headers */,
                                1442566215EDE98D0066A49B /* JSWithScope.h in Headers */,
                                86E3C619167BABEE006D760A /* JSWrapperMap.h in Headers */,
                                BC18C42E0E16F5CD00B34460 /* JSWrapperObject.h in Headers */,
                                0F4680A314BA7F8D00BFE272 /* LLIntExceptions.h in Headers */,
                                0F4680CB14BBB17200BFE272 /* LLIntOfflineAsmConfig.h in Headers */,
                                FED287B215EC9A5700DA8161 /* LLIntOpcode.h in Headers */,
+                               0FEC85191BDACDAC0080FF74 /* B3Generate.h in Headers */,
                                0F4680A514BA7F8D00BFE272 /* LLIntSlowPaths.h in Headers */,
                                0F0B839D14BCF46600885B4F /* LLIntThunks.h in Headers */,
                                0FCEFACE1805E75500472CE4 /* LLVMAPI.h in Headers */,
+                               0FEC858C1BDACDC70080FF74 /* AirStackSlot.h in Headers */,
                                0FCEFACF1805E75500472CE4 /* LLVMAPIFunctions.h in Headers */,
                                A7E5AB381799E4B200D2833D /* LLVMDisassembler.h in Headers */,
                                0FCEFAD31805EDCC00472CE4 /* LLVMHeaders.h in Headers */,
                                86D3B2C610156BDE002865E7 /* MacroAssemblerARM.h in Headers */,
                                A1A009C01831A22D00CF8711 /* MacroAssemblerARM64.h in Headers */,
                                86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */,
+                               0FEC853C1BDACDAC0080FF74 /* B3Type.h in Headers */,
                                863B23E00FC6118900703AA4 /* MacroAssemblerCodeRef.h in Headers */,
                                86C568E111A213EE0007F7F0 /* MacroAssemblerMIPS.h in Headers */,
                                FE68C6371B90DE040042BCB3 /* MacroAssemblerPrinter.h in Headers */,
                                86AE64A9135E5E1C00963012 /* MacroAssemblerSH4.h in Headers */,
                                860161E40F3A83C100F84710 /* MacroAssemblerX86.h in Headers */,
                                860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */,
+                               0FEC858A1BDACDC70080FF74 /* AirSpillEverything.h in Headers */,
                                860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */,
                                A700873A17CBE85300C3E643 /* MapConstructor.h in Headers */,
                                A78507D717CBC6FD0011F6E7 /* MapData.h in Headers */,
                                BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */,
                                BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */,
                                E33E8D211B9013DE00346B52 /* NativeStdFunctionCell.h in Headers */,
+                               0FEC85281BDACDAC0080FF74 /* B3PatchpointValue.h in Headers */,
                                0FFB922016D033B70055A5DB /* NodeConstructors.h in Headers */,
                                BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */,
                                99E45A2818A1B2590026D88F /* NondeterministicInput.h in Headers */,
                                BC18C4410E16F5CD00B34460 /* NumberConstructor.h in Headers */,
                                BC18C4420E16F5CD00B34460 /* NumberConstructor.lut.h in Headers */,
                                BC18C4430E16F5CD00B34460 /* NumberObject.h in Headers */,
+                               0FEC85C31BE167A00080FF74 /* B3HeapRange.h in Headers */,
                                BC18C4440E16F5CD00B34460 /* NumberPrototype.h in Headers */,
                                142D3939103E4560007DCB52 /* NumericStrings.h in Headers */,
                                A5EA710C19F6DE820098F5EC /* objc_generator.py in Headers */,
                                E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */,
                                ADDB1F6318D77DBE009B58A8 /* OpaqueRootSet.h in Headers */,
                                969A079B0ED1D3AE00F1F681 /* Opcode.h in Headers */,
+                               0FEC857C1BDACDC70080FF74 /* AirHandleCalleeSaves.h in Headers */,
                                0F2BDC2C151FDE9100CD8910 /* Operands.h in Headers */,
                                A70447EA17A0BD4600F5898E /* OperandsInlines.h in Headers */,
                                BC18C4480E16F5CD00B34460 /* Operations.h in Headers */,
                                0FF9CE741B9CD6D0004EDCA6 /* PolymorphicAccess.h in Headers */,
                                0FE834181A6EF97B00D04847 /* PolymorphicCallStubRoutine.h in Headers */,
                                0F98206116BFE38300240D02 /* PreciseJumpTargets.h in Headers */,
+                               0FEC857A1BDACDC70080FF74 /* AirGenerationContext.h in Headers */,
+                               0FEC85BD1BE1462F0080FF74 /* B3ReduceStrength.h in Headers */,
                                868916B0155F286300CB2B9A /* PrivateName.h in Headers */,
+                               0FEC85221BDACDAC0080FF74 /* B3Opcode.h in Headers */,
                                BC18C4500E16F5CD00B34460 /* Profile.h in Headers */,
                                95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */,
                                BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */,
                                0FF729A5166AD351000F5BA3 /* ProfilerBytecode.h in Headers */,
+                               0FEC85471BDACDAC0080FF74 /* B3ValueRep.h in Headers */,
                                0FF729B9166AD360000F5BA3 /* ProfilerBytecodes.h in Headers */,
                                0F13912A16771C36009CCB07 /* ProfilerBytecodeSequence.h in Headers */,
+                               0FEC851A1BDACDAC0080FF74 /* B3GenericFrequentedBlock.h in Headers */,
                                0FF729BA166AD360000F5BA3 /* ProfilerCompilation.h in Headers */,
                                0FF729BB166AD360000F5BA3 /* ProfilerCompilationKind.h in Headers */,
                                0FF729BC166AD360000F5BA3 /* ProfilerCompiledBytecode.h in Headers */,
                                0FB7F39C15ED8E4600F167B2 /* PropertyStorage.h in Headers */,
                                BC18C4560E16F5CD00B34460 /* Protect.h in Headers */,
                                1474C33B16AA2D950062F01D /* PrototypeMap.h in Headers */,
+                               0FEC85841BDACDC70080FF74 /* AirPhaseScope.h in Headers */,
                                0F5780A218FE1E98001E72D9 /* PureNaN.h in Headers */,
                                0F15CD231BA5F9860031FFD3 /* PutByIdFlags.h in Headers */,
                                0F9332A414CA7DD90085F3C6 /* PutByIdStatus.h in Headers */,
+                               0FEC85801BDACDC70080FF74 /* AirInst.h in Headers */,
                                0F93B4AA18B92C4D00178A3F /* PutByIdVariant.h in Headers */,
+                               0FEC85791BDACDC70080FF74 /* AirGenerate.h in Headers */,
                                0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */,
                                0F9FC8C514E1B60400D52AE0 /* PutKind.h in Headers */,
                                147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */,
                                0FC314121814559100033232 /* RegisterSet.h in Headers */,
                                A57D23EE1891B5540031C7FA /* RegularExpression.h in Headers */,
                                0FB7F39D15ED8E4600F167B2 /* Reject.h in Headers */,
+                               0FEC85261BDACDAC0080FF74 /* B3PatchpointSpecial.h in Headers */,
                                A5BA15E8182340B300A82E69 /* RemoteInspector.h in Headers */,
                                A5BA15EA182340B400A82E69 /* RemoteInspectorConstants.h in Headers */,
                                A5BA15F0182345AF00A82E69 /* RemoteInspectorDebuggable.h in Headers */,
                                A5BA15ED182340B400A82E69 /* RemoteInspectorXPCConnection.h in Headers */,
                                0F24E55117EE274900ABB217 /* Repatch.h in Headers */,
                                869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */,
+                               0FEC85441BDACDAC0080FF74 /* B3Value.h in Headers */,
                                70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */,
                                52C0611F1AA51E1C00B4ADBA /* RuntimeType.h in Headers */,
                                C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */,
                                A709F2F017A0AC0400512E98 /* SlowPathCall.h in Headers */,
                                933040040E6A749400786E6A /* SmallStrings.h in Headers */,
                                BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */,
+                               0FEC850E1BDACDAC0080FF74 /* B3Const32Value.h in Headers */,
                                BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */,
                                E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */,
                                E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */,
                                BC18C46A0E16F5CD00B34460 /* StringPrototype.h in Headers */,
                                142E313B134FF0A600AFADB5 /* Strong.h in Headers */,
                                145722861437E140005FDE26 /* StrongInlines.h in Headers */,
+                               0FEC85821BDACDC70080FF74 /* AirLiveness.h in Headers */,
                                BCDE3AB80E6C82F5001453A7 /* Structure.h in Headers */,
                                7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */,
                                2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */,
                                0F2D4DEA19832DAC007D4B19 /* TypeLocation.h in Headers */,
                                52B311011975B4670080857C /* TypeLocationCache.h in Headers */,
                                0FFB6C391AF48DDC00DB1BF7 /* TypeofType.h in Headers */,
+                               0FEC85401BDACDAC0080FF74 /* B3UseCounts.h in Headers */,
                                52C952B719A289850069B386 /* TypeProfiler.h in Headers */,
                                0F2D4DEC19832DC4007D4B19 /* TypeProfilerLog.h in Headers */,
                                0F2D4DF019832DD6007D4B19 /* TypeSet.h in Headers */,
                                0FF4274B158EBE91004CB9FF /* udis86.h in Headers */,
+                               0FEC84FF1BDACDAC0080FF74 /* B3ArgumentRegValue.h in Headers */,
                                0FF42741158EBE8D004CB9FF /* udis86_decode.h in Headers */,
                                0FF42742158EBE91004CB9FF /* udis86_extern.h in Headers */,
                                0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */,
                                FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */,
                                0F919D2615853CE3004A4E7D /* Watchpoint.h in Headers */,
                                142E313C134FF0A600AFADB5 /* Weak.h in Headers */,
+                               0FEC85021BDACDAC0080FF74 /* B3BasicBlockInlines.h in Headers */,
                                14E84F9F14EE1ACC00D6D5D4 /* WeakBlock.h in Headers */,
                                14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */,
+                               0FEC85331BDACDAC0080FF74 /* B3StackSlotKind.h in Headers */,
                                AD86A93E1AA4D88D002FE77F /* WeakGCMapInlines.h in Headers */,
                                14F7256614EE265E00B1652B /* WeakHandleOwner.h in Headers */,
                                14E84FA214EE1ACC00D6D5D4 /* WeakImpl.h in Headers */,
                                9959E92E1BD17FA4001AA413 /* xxd.pl in Headers */,
                                451539B912DC994500EF7AC4 /* Yarr.h in Headers */,
                                86704B8512DBA33700A9FE7B /* YarrInterpreter.h in Headers */,
+                               0FEC85311BDACDAC0080FF74 /* B3StackmapSpecial.h in Headers */,
+                               0FEC85741BDACDC70080FF74 /* AirCCallSpecial.h in Headers */,
                                86704B8712DBA33700A9FE7B /* YarrJIT.h in Headers */,
                                86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */,
                                86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */,
+                               0FEC85811BDACDC70080FF74 /* AirInstInlines.h in Headers */,
                                86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        productReference = 0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */;
                        productType = "com.apple.product-type.library.dynamic";
                };
+               0FEC85941BDB5CF10080FF74 /* testb3 */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 0FEC85A81BDB5CF10080FF74 /* Build configuration list for PBXNativeTarget "testb3" */;
+                       buildPhases = (
+                               0FEC85951BDB5CF10080FF74 /* Sources */,
+                               0FEC85A21BDB5CF10080FF74 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = testb3;
+                       productName = testapi;
+                       productReference = 0FEC85AD1BDB5CF10080FF74 /* testb3 */;
+                       productType = "com.apple.product-type.tool";
+               };
                0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = 0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */;
                                14BD59BE0A3E8F9000BAF59C /* testapi */,
                                932F5BDA0822A1C700736975 /* jsc */,
                                651122F714046A4C002B101D /* testRegExp */,
+                               0FEC85941BDB5CF10080FF74 /* testb3 */,
                                5D6B2A47152B9E17005231DE /* Test Tools */,
                        );
                };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               0FEC85951BDB5CF10080FF74 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               0FEC85AF1BDB5D5E0080FF74 /* testb3.cpp in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                0FF922C414F46B130041A24E /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                                0F55F0F414D1063900AC7649 /* AbstractPC.cpp in Sources */,
                                147F39BD107EC37600427A48 /* ArgList.cpp in Sources */,
                                0F743BAA16B88249009F9277 /* ARM64Disassembler.cpp in Sources */,
+                               0FEC85711BDACDC70080FF74 /* AirBasicBlock.cpp in Sources */,
                                86D3B2C310156BDE002865E7 /* ARMAssembler.cpp in Sources */,
                                65C02850171795E200351E35 /* ARMv7Disassembler.cpp in Sources */,
                                65C0285C1717966800351E35 /* ARMv7DOpcode.cpp in Sources */,
                                A7A8AF3417ADB5F3005AB174 /* ArrayBuffer.cpp in Sources */,
                                0FFC99D4184EE318009C10AB /* ArrayBufferNeuteringWatchpoint.cpp in Sources */,
                                A7A8AF3617ADB5F3005AB174 /* ArrayBufferView.cpp in Sources */,
+                               0FEC853D1BDACDAC0080FF74 /* B3UpsilonValue.cpp in Sources */,
                                147F39BF107EC37600427A48 /* ArrayConstructor.cpp in Sources */,
                                A7BDAEC817F4EA1400F6140C /* ArrayIteratorPrototype.cpp in Sources */,
+                               0FEC85251BDACDAC0080FF74 /* B3PatchpointSpecial.cpp in Sources */,
                                0F63945415D07055006A597C /* ArrayProfile.cpp in Sources */,
                                147F39C0107EC37600427A48 /* ArrayPrototype.cpp in Sources */,
                                0F24E54017EA9F5900ABB217 /* AssemblyHelpers.cpp in Sources */,
                                1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */,
                                62EC9BB61B7EB07C00303AD1 /* CallFrameShuffleData.cpp in Sources */,
                                62D755D61B84FB46001801FA /* CallFrameShuffler.cpp in Sources */,
+                               0FEC85131BDACDAC0080FF74 /* B3ControlValue.cpp in Sources */,
                                62D755D51B84FB40001801FA /* CallFrameShuffler32_64.cpp in Sources */,
                                62D755D41B84FB3D001801FA /* CallFrameShuffler64.cpp in Sources */,
+                               0FEC85391BDACDAC0080FF74 /* B3SwitchValue.cpp in Sources */,
                                0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */,
                                0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */,
                                627673231B680C1E00FD9F2E /* CallMode.cpp in Sources */,
                                A77F1821164088B200640A47 /* CodeCache.cpp in Sources */,
                                0F8F9446166764F100D61971 /* CodeOrigin.cpp in Sources */,
                                86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */,
+                               0FEC85931BDB1E100080FF74 /* AirGenerated.cpp in Sources */,
                                86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */,
                                0F8F943C1667631300D61971 /* CodeSpecializationKind.cpp in Sources */,
                                0F8F94421667633500D61971 /* CodeType.cpp in Sources */,
                                A709F2F217A0AC2A00512E98 /* CommonSlowPaths.cpp in Sources */,
                                6553A33117A1F1EE008CF6F3 /* CommonSlowPathsExceptions.cpp in Sources */,
                                A7E5A3A71797432D00E893C0 /* CompilationResult.cpp in Sources */,
+                               0FEC858B1BDACDC70080FF74 /* AirStackSlot.cpp in Sources */,
                                147F39C2107EC37600427A48 /* Completion.cpp in Sources */,
                                0F6FC750196110A800E1D02D /* ComplexGetStatus.cpp in Sources */,
                                146B16D812EB5B59001BEC1B /* ConservativeRoots.cpp in Sources */,
                                2A111245192FCE79005EE18D /* CustomGetterSetter.cpp in Sources */,
                                62E3D5F01B8D0B7300B868BB /* DataFormat.cpp in Sources */,
                                0F2B66DE17B6B5AB00A7AE3F /* DataView.cpp in Sources */,
+                               0FEC85BC1BE1462F0080FF74 /* B3ReduceStrength.cpp in Sources */,
                                147F39C3107EC37600427A48 /* DateConstructor.cpp in Sources */,
                                147F39C4107EC37600427A48 /* DateConversion.cpp in Sources */,
                                147F39C5107EC37600427A48 /* DateInstance.cpp in Sources */,
                                0FC712DE17CD8779008CC93C /* DeferredCompilationCallback.cpp in Sources */,
                                FE5068671AE25E280009DAB7 /* DeferredSourceDump.cpp in Sources */,
                                A77A423D17A0BBFD00A8DB81 /* DFGAbstractHeap.cpp in Sources */,
+                               0FEC858D1BDACDC70080FF74 /* AirTmp.cpp in Sources */,
                                0F55C19417276E4600CEABFD /* DFGAbstractValue.cpp in Sources */,
                                0FD3E4011B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.cpp in Sources */,
                                0F18D3CF1B55A6E0002C5C9F /* DFGAdaptiveStructureWatchpoint.cpp in Sources */,
                                0F63948415E48118006A597C /* DFGArrayMode.cpp in Sources */,
                                A7D9A29417A0BC7400EE2618 /* DFGAtTailAbstractState.cpp in Sources */,
                                0F666EC61835672B00D017F1 /* DFGAvailability.cpp in Sources */,
+                               0FEC85871BDACDC70080FF74 /* AirSpecial.cpp in Sources */,
                                0F2B9CE219D0BA7D00B1D1B5 /* DFGAvailabilityMap.cpp in Sources */,
                                0F714CA416EA92F000F3EBEB /* DFGBackwardsPropagationPhase.cpp in Sources */,
                                A7D89CF217A0B8CC00773AD8 /* DFGBasicBlock.cpp in Sources */,
                                86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */,
                                0FD82E2114172CE300179C94 /* DFGCapabilities.cpp in Sources */,
                                0FFFC95714EF90A000C72532 /* DFGCFAPhase.cpp in Sources */,
+                               0FEC85461BDACDAC0080FF74 /* B3ValueRep.cpp in Sources */,
                                0F3B3A271544C995003ED0FF /* DFGCFGSimplificationPhase.cpp in Sources */,
                                0F9D36941AE9CC33000D4DFB /* DFGCleanUpPhase.cpp in Sources */,
                                A77A423F17A0BBFD00A8DB81 /* DFGClobberize.cpp in Sources */,
                                2A88067819107D5500CB0BBB /* DFGFunctionWhitelist.cpp in Sources */,
                                86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */,
                                0F2FCCF918A60070001A27F8 /* DFGGraphSafepoint.cpp in Sources */,
+                               0FEC856D1BDACDC70080FF74 /* AirAllocateStack.cpp in Sources */,
                                0FB17660196B8F9E0091052A /* DFGHeapLocation.cpp in Sources */,
                                0FC841681BA8C3210061837D /* DFGInferredTypeCheck.cpp in Sources */,
                                A704D90517A0BAA8006BA554 /* DFGInPlaceAbstractState.cpp in Sources */,
                                0FC0977214693AF900CF2442 /* DFGOSRExitCompiler64.cpp in Sources */,
                                0F7025A91714B0FA00382C0E /* DFGOSRExitCompilerCommon.cpp in Sources */,
                                0F392C891B46188400844728 /* DFGOSRExitFuzz.cpp in Sources */,
+                               0FEC85751BDACDC70080FF74 /* AirCode.cpp in Sources */,
                                0FEFC9AA1681A3B300567F53 /* DFGOSRExitJumpPlaceholder.cpp in Sources */,
                                0F235BED17178E7300690C7F /* DFGOSRExitPreparation.cpp in Sources */,
                                0F6237971AE45CA700D402EA /* DFGPhantomInsertionPhase.cpp in Sources */,
                                0FFFC95B14EF90AD00C72532 /* DFGPhase.cpp in Sources */,
+                               0FEC850F1BDACDAC0080FF74 /* B3Const64Value.cpp in Sources */,
                                0F2B9CEA19D0BA7D00B1D1B5 /* DFGPhiChildren.cpp in Sources */,
                                A78A977A179738B8009DF744 /* DFGPlan.cpp in Sources */,
                                0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */,
                                0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */,
+                               0FEC85321BDACDAC0080FF74 /* B3StackSlotKind.cpp in Sources */,
                                0F3E01AA19D353A500F61B7F /* DFGPrePostNumbering.cpp in Sources */,
                                0F2B9CEC19D0BA7D00B1D1B5 /* DFGPromotedHeapLocation.cpp in Sources */,
                                0FB17662196B8F9E0091052A /* DFGPureValue.cpp in Sources */,
                                0FC20CB51852E2C600C9E954 /* DFGStrengthReductionPhase.cpp in Sources */,
                                0F893BDB1936E23C001211F4 /* DFGStructureAbstractValue.cpp in Sources */,
                                0F79085519A290B200F6310C /* DFGStructureRegistrationPhase.cpp in Sources */,
+                               0FEC85341BDACDAC0080FF74 /* B3StackSlotValue.cpp in Sources */,
+                               0FEC85291BDACDAC0080FF74 /* B3PhaseScope.cpp in Sources */,
                                0F2FCCFE18A60070001A27F8 /* DFGThreadData.cpp in Sources */,
                                0FC097A1146B28CA00CF2442 /* DFGThunks.cpp in Sources */,
                                0FD8A32717D51F5700CA2C40 /* DFGTierUpCheckInjectionPhase.cpp in Sources */,
                                2A83638518D7D0EE0000EBCC /* EdenGCActivityCallback.cpp in Sources */,
                                99E45A2518A1B2590026D88F /* EncodedValue.cpp in Sources */,
                                147F39C7107EC37600427A48 /* Error.cpp in Sources */,
+                               0FEC85091BDACDAC0080FF74 /* B3Common.cpp in Sources */,
                                147F39C8107EC37600427A48 /* ErrorConstructor.cpp in Sources */,
                                FEB58C14187B8B160098EF0B /* ErrorHandlingScope.cpp in Sources */,
                                147F39C9107EC37600427A48 /* ErrorInstance.cpp in Sources */,
                                0F8F2B95172E04A0007DBDA5 /* FTLLink.cpp in Sources */,
                                0FCEFADF180738C000472CE4 /* FTLLocation.cpp in Sources */,
                                0FEA0A0F170513DB00BB722C /* FTLLowerDFGToLLVM.cpp in Sources */,
+                               0FEC85001BDACDAC0080FF74 /* B3BasicBlock.cpp in Sources */,
                                0F2B9CF819D0BAC100B1D1B5 /* FTLOperations.cpp in Sources */,
                                0FD8A31B17D51F2200CA2C40 /* FTLOSREntry.cpp in Sources */,
                                0F235BDC17178E1C00690C7F /* FTLOSRExit.cpp in Sources */,
                                0FEA0A2A1709629600BB722C /* FTLOutput.cpp in Sources */,
                                0F485329187DFDEC0083B687 /* FTLRecoveryOpcode.cpp in Sources */,
                                0FCEFAAB1804C13E00472CE4 /* FTLSaveRestore.cpp in Sources */,
+                               0FEC85891BDACDC70080FF74 /* AirSpillEverything.cpp in Sources */,
                                0F25F1B1181635F300522F39 /* FTLSlowPathCall.cpp in Sources */,
                                0F25F1B3181635F300522F39 /* FTLSlowPathCallKey.cpp in Sources */,
                                0F9D339A1803ADB70073C2BC /* FTLStackMaps.cpp in Sources */,
                                147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */,
                                0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */,
                                52B310FD1974AE870080857C /* FunctionHasExecutedCache.cpp in Sources */,
+                               0FEC85C21BE167A00080FF74 /* B3HeapRange.cpp in Sources */,
                                FE4BFF2B1AD476E700088F87 /* FunctionOverrides.cpp in Sources */,
                                147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */,
                                62D2D38F1ADF103F000206C1 /* FunctionRareData.cpp in Sources */,
                                A5FD0075189B038C00633231 /* IdentifiersFactory.cpp in Sources */,
                                C25F8BCD157544A900245B71 /* IncrementalSweeper.cpp in Sources */,
                                0F13E04E16164A1F00DC8DE7 /* IndexingType.cpp in Sources */,
+                               0FEC85271BDACDAC0080FF74 /* B3PatchpointValue.cpp in Sources */,
                                0F0A75221B94BFA900110660 /* InferredType.cpp in Sources */,
                                0FFC92111B94D4DF0071DD66 /* InferredTypeTable.cpp in Sources */,
                                0FF8BDEA1AD4CF7100DFE884 /* InferredValue.cpp in Sources */,
                                9EA5C7A2190F088700508EBE /* InitializeLLVMMac.cpp in Sources */,
                                9E729408190F021E001A91B5 /* InitializeLLVMPOSIX.cpp in Sources */,
                                9E729407190F01A5001A91B5 /* InitializeThreading.cpp in Sources */,
+                               0FEC857B1BDACDC70080FF74 /* AirHandleCalleeSaves.cpp in Sources */,
                                A513E5B7185B8BD3007E95AD /* InjectedScript.cpp in Sources */,
                                A514B2C2185A684400F3C7CB /* InjectedScriptBase.cpp in Sources */,
                                A58E35911860DECF001F24FE /* InjectedScriptHost.cpp in Sources */,
                                A593CF86184038CA00BFCE27 /* InspectorAgentRegistry.cpp in Sources */,
                                A593CF7C1840360300BFCE27 /* InspectorBackendDispatcher.cpp in Sources */,
                                A532438718568335002ED692 /* InspectorBackendDispatchers.cpp in Sources */,
+                               0FEC85371BDACDAC0080FF74 /* B3SwitchCase.cpp in Sources */,
                                A5FD0081189B191A00633231 /* InspectorConsoleAgent.cpp in Sources */,
                                A57D23E51890CEBF0031C7FA /* InspectorDebuggerAgent.cpp in Sources */,
                                A532438918568335002ED692 /* InspectorFrontendDispatchers.cpp in Sources */,
                                86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
                                1440F8AF0A508D200005F061 /* JSCallbackConstructor.cpp in Sources */,
                                1440F8920A508B100005F061 /* JSCallbackFunction.cpp in Sources */,
+                               0FEC856F1BDACDC70080FF74 /* AirArg.cpp in Sources */,
                                14ABDF600A437FEF00ECCA01 /* JSCallbackObject.cpp in Sources */,
                                657CF45819BF6662004ACBF2 /* JSCallee.cpp in Sources */,
                                A7D801A81880D6A80026C39B /* JSCBuiltins.cpp in Sources */,
                                147F39D1107EC37600427A48 /* JSCell.cpp in Sources */,
+                               0FEC85C51BE16F5A0080FF74 /* B3Effects.cpp in Sources */,
                                147F39D6107EC37600427A48 /* JSCJSValue.cpp in Sources */,
                                1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */,
                                A53CE08718BC1A5600BEDF76 /* JSConsole.cpp in Sources */,
+                               0FEC85901BDACDC70080FF74 /* AirValidate.cpp in Sources */,
+                               0FEC85731BDACDC70080FF74 /* AirCCallSpecial.cpp in Sources */,
                                86E3C616167BABEE006D760A /* JSContext.mm in Sources */,
                                14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */,
                                A72028B61797601E0098028C /* JSCTestRunnerUtils.cpp in Sources */,
                                FE384EE71ADDB7AD0055DE2C /* JSDollarVMPrototype.cpp in Sources */,
                                147F39D7107EC37600427A48 /* JSEnvironmentRecord.cpp in Sources */,
                                140566D6107EC271005DBC8D /* JSFunction.cpp in Sources */,
+                               0FEC851D1BDACDAC0080FF74 /* B3LowerToAir.cpp in Sources */,
                                797E07A91B8FCFB9008400BA /* JSGlobalLexicalEnvironment.cpp in Sources */,
                                147F39D2107EC37600427A48 /* JSGlobalObject.cpp in Sources */,
                                A5FD0085189B1B7E00633231 /* JSGlobalObjectConsoleAgent.cpp in Sources */,
                                A5C3A1A518C0490200C9593A /* JSGlobalObjectConsoleClient.cpp in Sources */,
+                               0FEC850D1BDACDAC0080FF74 /* B3Const32Value.cpp in Sources */,
                                A59455921824744700CC3843 /* JSGlobalObjectDebuggable.cpp in Sources */,
                                A57D23E91891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp in Sources */,
                                14E9D17B107EC469004DDA21 /* JSGlobalObjectFunctions.cpp in Sources */,
                                A51007C0187CC3C600B38879 /* JSGlobalObjectInspectorController.cpp in Sources */,
                                A50E4B6318809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp in Sources */,
                                A503FA29188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp in Sources */,
+                               0FEC85231BDACDAC0080FF74 /* B3Origin.cpp in Sources */,
                                A513E5BF185BFACC007E95AD /* JSInjectedScriptHost.cpp in Sources */,
                                A513E5C1185BFACC007E95AD /* JSInjectedScriptHostPrototype.cpp in Sources */,
                                E33F50801B8429A400413856 /* JSInternalPromise.cpp in Sources */,
                                E318CBC01B8AEF5100A2929D /* JSModuleNamespaceObject.cpp in Sources */,
                                E39DA4A61B7E8B7C0084F33A /* JSModuleRecord.cpp in Sources */,
                                E33E8D1C1B9013C300346B52 /* JSNativeStdFunction.cpp in Sources */,
+                               0FEC85181BDACDAC0080FF74 /* B3Generate.cpp in Sources */,
                                A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */,
                                147F39D4107EC37600427A48 /* JSObject.cpp in Sources */,
                                1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */,
                                E3EF88741B66DF23003F26CB /* JSPropertyNameIterator.cpp in Sources */,
                                862553D116136DA9009F17D0 /* JSProxy.cpp in Sources */,
                                A552C37F1ADDB8FE00139726 /* JSRemoteInspector.cpp in Sources */,
+                               0FEC85111BDACDAC0080FF74 /* B3ConstDoubleValue.cpp in Sources */,
                                9928FF3B18AC4AEC00B8CF12 /* JSReplayInputs.cpp in Sources */,
                                14874AE515EBDE4A002E3587 /* JSScope.cpp in Sources */,
                                A7C0C4AD1681067E0017011D /* JSScriptRef.cpp in Sources */,
                                709FB8671AE335C60039D069 /* JSWeakSet.cpp in Sources */,
                                1442566115EDE98D0066A49B /* JSWithScope.cpp in Sources */,
                                86E3C618167BABEE006D760A /* JSWrapperMap.mm in Sources */,
+                               0FEC85151BDACDAC0080FF74 /* B3FrequencyClass.cpp in Sources */,
                                14280870107EC1340013E7B2 /* JSWrapperObject.cpp in Sources */,
                                BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */,
                                0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */,
                                148F21B0107EC5410042EC2C /* Lexer.cpp in Sources */,
                                0FF4275715914A20004CB9FF /* LinkBuffer.cpp in Sources */,
                                A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */,
+                               0FEC857F1BDACDC70080FF74 /* AirInst.cpp in Sources */,
                                FE3913541B794F6E00EDAF71 /* LiveObjectList.cpp in Sources */,
                                FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */,
                                0F4680D214BBD16500BFE272 /* LLIntData.cpp in Sources */,
+                               0FEC84FE1BDACDAC0080FF74 /* B3ArgumentRegValue.cpp in Sources */,
+                               0FEC85411BDACDAC0080FF74 /* B3Validate.cpp in Sources */,
                                0F38B01117CF078000B144D3 /* LLIntEntrypoint.cpp in Sources */,
                                0F4680A814BA7FAB00BFE272 /* LLIntExceptions.cpp in Sources */,
                                0F4680A414BA7F8D00BFE272 /* LLIntSlowPaths.cpp in Sources */,
                                A7E5AB371799E4B200D2833D /* LLVMDisassembler.cpp in Sources */,
                                14469DDE107EC7E700650446 /* Lookup.cpp in Sources */,
                                0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */,
+                               0FEC851F1BDACDAC0080FF74 /* B3MemoryValue.cpp in Sources */,
                                14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */,
                                0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */,
                                86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */,
                                A7A4AE0817973B26005612B1 /* MacroAssemblerX86Common.cpp in Sources */,
                                A700873917CBE85300C3E643 /* MapConstructor.cpp in Sources */,
                                A74DEF93182D991400522C22 /* MapIteratorPrototype.cpp in Sources */,
+                               0FEC85071BDACDAC0080FF74 /* B3CheckValue.cpp in Sources */,
                                A700873D17CBE8D300C3E643 /* MapPrototype.cpp in Sources */,
                                C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */,
                                142D6F0813539A2800B02E86 /* MarkedBlock.cpp in Sources */,
                                14D2F3DA139F4BE200491031 /* MarkedSpace.cpp in Sources */,
+                               0FEC85431BDACDAC0080FF74 /* B3Value.cpp in Sources */,
                                142D6F1113539A4100B02E86 /* MarkStack.cpp in Sources */,
                                4340A4841A9051AF00D73CCA /* MathCommon.cpp in Sources */,
                                14469DDF107EC7E700650446 /* MathObject.cpp in Sources */,
                                0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */,
                                0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */,
                                0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */,
+                               0FEC850B1BDACDAC0080FF74 /* B3Commutativity.cpp in Sources */,
                                0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */,
                                0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */,
                                0FF729B1166AD35C000F5BA3 /* ProfilerCompiledBytecode.cpp in Sources */,
                                0FF729B2166AD35C000F5BA3 /* ProfilerDatabase.cpp in Sources */,
                                0F190CAC189D82F6000AE5F0 /* ProfilerJettisonReason.cpp in Sources */,
+                               0FEC85301BDACDAC0080FF74 /* B3StackmapSpecial.cpp in Sources */,
                                0FF729B3166AD35C000F5BA3 /* ProfilerOrigin.cpp in Sources */,
                                0FF729B4166AD35C000F5BA3 /* ProfilerOriginStack.cpp in Sources */,
+                               0FEC852E1BDACDAC0080FF74 /* B3Stackmap.cpp in Sources */,
                                0FB1058B1675483100F8AB6E /* ProfilerOSRExit.cpp in Sources */,
                                0FB1058D1675483700F8AB6E /* ProfilerOSRExitSite.cpp in Sources */,
                                0F13912B16771C3A009CCB07 /* ProfilerProfiledBytecodes.cpp in Sources */,
                                0FD3E40D1B618B6600C80E1E /* PropertyCondition.cpp in Sources */,
+                               0FEC853B1BDACDAC0080FF74 /* B3Type.cpp in Sources */,
                                A7FB60A4103F7DC20017A286 /* PropertyDescriptor.cpp in Sources */,
                                14469DE8107EC7E700650446 /* PropertySlot.cpp in Sources */,
                                ADE39FFF16DD144B0003CD4A /* PropertyTable.cpp in Sources */,
                                0F15CD221BA5F9860031FFD3 /* PutByIdFlags.cpp in Sources */,
                                0F9332A314CA7DD70085F3C6 /* PutByIdStatus.cpp in Sources */,
                                0F93B4A918B92C4D00178A3F /* PutByIdVariant.cpp in Sources */,
+                               0FEC852B1BDACDAC0080FF74 /* B3Procedure.cpp in Sources */,
                                0FF60AC316740F8800029779 /* ReduceWhitespace.cpp in Sources */,
                                E33637A51B63220200EE0840 /* ReflectObject.cpp in Sources */,
                                0FA7A8EB18B413C80052371D /* Reg.cpp in Sources */,
                                14280841107EC0930013E7B2 /* RegExp.cpp in Sources */,
+                               0FEC85781BDACDC70080FF74 /* AirGenerate.cpp in Sources */,
                                A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */,
                                8642C510151C06A90046D4EF /* RegExpCachedResult.cpp in Sources */,
                                14280842107EC0930013E7B2 /* RegExpConstructor.cpp in Sources */,
                                A5BA15E9182340B300A82E69 /* RemoteInspector.mm in Sources */,
                                A594558F18245EFD00CC3843 /* RemoteInspectorDebuggable.cpp in Sources */,
                                A5BA15EC182340B400A82E69 /* RemoteInspectorDebuggableConnection.mm in Sources */,
+                               0FEC85051BDACDAC0080FF74 /* B3CheckSpecial.cpp in Sources */,
                                A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */,
                                0F24E55017EE274900ABB217 /* Repatch.cpp in Sources */,
                                527773DE1AAF83AC00BDE7E8 /* RuntimeType.cpp in Sources */,
                                A54CF2F9184EAEDA00237F19 /* ScriptObject.cpp in Sources */,
                                A54CF2F5184EAB2400237F19 /* ScriptValue.cpp in Sources */,
                                A7299DA517D12858005F5FF9 /* SetConstructor.cpp in Sources */,
+                               0FEC85851BDACDC70080FF74 /* AirRegisterPriority.cpp in Sources */,
                                A790DD6D182F499700588807 /* SetIteratorPrototype.cpp in Sources */,
                                A7299DA117D12848005F5FF9 /* SetPrototype.cpp in Sources */,
                                0FEE98431A89227500754E93 /* SetupVarargsFrame.cpp in Sources */,
                                0FD82E86141F3FF100179C94 /* SpeculatedType.cpp in Sources */,
                                A7C1EAF117987AB600299DB2 /* StackVisitor.cpp in Sources */,
                                A730B6131250068F009D25B1 /* StrictEvalActivation.cpp in Sources */,
+                               0FEC85211BDACDAC0080FF74 /* B3Opcode.cpp in Sources */,
                                14469DEB107EC7E700650446 /* StringConstructor.cpp in Sources */,
                                70EC0EC61AA0D7DA00B6AAFA /* StringIteratorPrototype.cpp in Sources */,
                                14469DEC107EC7E700650446 /* StringObject.cpp in Sources */,
                                BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */,
                                7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */,
                                2AF7382C18BBBF92008A5A37 /* StructureIDTable.cpp in Sources */,
+                               0FEC85B91BE1462F0080FF74 /* B3InsertionSet.cpp in Sources */,
                                C2F0F2D116BAEEE900187C19 /* StructureRareData.cpp in Sources */,
                                0FB438A319270B1D00E1FBC9 /* StructureSet.cpp in Sources */,
                                0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */,
                                705B41AD1A6E501E00716757 /* SymbolConstructor.cpp in Sources */,
                                705B41AF1A6E501E00716757 /* SymbolObject.cpp in Sources */,
                                705B41B11A6E501E00716757 /* SymbolPrototype.cpp in Sources */,
+                               0FEC853F1BDACDAC0080FF74 /* B3UseCounts.cpp in Sources */,
                                0F919D2815856773004A4E7D /* SymbolTable.cpp in Sources */,
                                70ECA6071AFDBEA200449739 /* TemplateRegistry.cpp in Sources */,
                                0FC314131814559100033232 /* TempRegisterSet.cpp in Sources */,
                                0F24E55817F74EDB00ABB217 /* ValueRecovery.cpp in Sources */,
                                79EE0BFF1B4AFB85000385C9 /* VariableEnvironment.cpp in Sources */,
                                0F6C73501AC9F99F00BE1682 /* VariableWriteFireDetail.cpp in Sources */,
+                               0FEC85831BDACDC70080FF74 /* AirPhaseScope.cpp in Sources */,
                                0FE0502C1AA9095600D33B33 /* VarOffset.cpp in Sources */,
                                0F20C2591A8013AB00DA3229 /* VirtualRegister.cpp in Sources */,
                                E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */,
                                709FB8691AE335C60039D069 /* WeakSetConstructor.cpp in Sources */,
                                709FB86B1AE335C60039D069 /* WeakSetPrototype.cpp in Sources */,
                                2A4EC90B1860D6C20094F782 /* WriteBarrierBuffer.cpp in Sources */,
+                               0FEC857D1BDACDC70080FF74 /* AirInsertionSet.cpp in Sources */,
                                0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */,
                                A7E5AB3A1799E4B200D2833D /* X86Disassembler.cpp in Sources */,
                                863C6D9C1521111A00585E4E /* YarrCanonicalizeUCS2.cpp in Sources */,
                        target = 0FCEFAB51805D61600472CE4 /* llvmForJSC */;
                        targetProxy = 0FCEFABC1805D66300472CE4 /* PBXContainerItemProxy */;
                };
+               0FEC85B11BDB5D8F0080FF74 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 0FEC85941BDB5CF10080FF74 /* testb3 */;
+                       targetProxy = 0FEC85B01BDB5D8F0080FF74 /* PBXContainerItemProxy */;
+               };
                0FF922D314F46B2F0041A24E /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = 0F4680A914BA7FD900BFE272 /* LLInt Offsets */;
                        };
                        name = Production;
                };
+               0FEC85A91BDB5CF10080FF74 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+                       buildSettings = {
+                               PRODUCT_NAME = testb3;
+                       };
+                       name = Debug;
+               };
+               0FEC85AA1BDB5CF10080FF74 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+                       buildSettings = {
+                               PRODUCT_NAME = testb3;
+                       };
+                       name = Release;
+               };
+               0FEC85AB1BDB5CF10080FF74 /* Profiling */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+                       buildSettings = {
+                               PRODUCT_NAME = testb3;
+                       };
+                       name = Profiling;
+               };
+               0FEC85AC1BDB5CF10080FF74 /* Production */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+                       buildSettings = {
+                               PRODUCT_NAME = testb3;
+                       };
+                       name = Production;
+               };
                0FF922CB14F46B130041A24E /* Debug */ = {
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Production;
                };
+               0FEC85A81BDB5CF10080FF74 /* Build configuration list for PBXNativeTarget "testb3" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               0FEC85A91BDB5CF10080FF74 /* Debug */,
+                               0FEC85AA1BDB5CF10080FF74 /* Release */,
+                               0FEC85AB1BDB5CF10080FF74 /* Profiling */,
+                               0FEC85AC1BDB5CF10080FF74 /* Production */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Production;
+               };
                0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
index 88fb87a..517adf6 100644 (file)
@@ -28,6 +28,8 @@
 
 #if ENABLE(ASSEMBLER)
 
+#include <wtf/PrintStream.h>
+
 namespace JSC {
 
 const double MacroAssembler::twoToThe32 = (double)0x100000000ull;
@@ -47,5 +49,70 @@ void MacroAssembler::probe(std::function<void (MacroAssembler::ProbeContext*)> f
 
 } // namespace JSC
 
+namespace WTF {
+
+using namespace JSC;
+
+void printInternal(PrintStream& out, MacroAssembler::RelationalCondition cond)
+{
+    switch (cond) {
+    case MacroAssembler::Equal:
+        out.print("Equal");
+        return;
+    case MacroAssembler::NotEqual:
+        out.print("NotEqual");
+        return;
+    case MacroAssembler::Above:
+        out.print("Above");
+        return;
+    case MacroAssembler::AboveOrEqual:
+        out.print("AboveOrEqual");
+        return;
+    case MacroAssembler::Below:
+        out.print("Below");
+        return;
+    case MacroAssembler::BelowOrEqual:
+        out.print("BelowOrEqual");
+        return;
+    case MacroAssembler::GreaterThan:
+        out.print("GreaterThan");
+        return;
+    case MacroAssembler::GreaterThanOrEqual:
+        out.print("GreaterThanOrEqual");
+        return;
+    case MacroAssembler::LessThan:
+        out.print("LessThan");
+        return;
+    case MacroAssembler::LessThanOrEqual:
+        out.print("LessThanOrEqual");
+        return;
+    }
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+void printInternal(PrintStream& out, MacroAssembler::ResultCondition cond)
+{
+    switch (cond) {
+    case MacroAssembler::Overflow:
+        out.print("Overflow");
+        return;
+    case MacroAssembler::Signed:
+        out.print("Signed");
+        return;
+    case MacroAssembler::PositiveOrZero:
+        out.print("PositiveOrZero");
+        return;
+    case MacroAssembler::Zero:
+        out.print("Zero");
+        return;
+    case MacroAssembler::NonZero:
+        out.print("NonZero");
+        return;
+    }
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+} // namespace WTF
+
 #endif // ENABLE(ASSEMBLER)
 
index 7a7de99..d10362f 100644 (file)
@@ -1598,8 +1598,19 @@ public:
 
 } // namespace JSC
 
+namespace WTF {
+
+class PrintStream;
+
+void printInternal(PrintStream&, JSC::MacroAssembler::RelationalCondition);
+void printInternal(PrintStream&, JSC::MacroAssembler::ResultCondition);
+
+} // namespace WTF
+
 #else // ENABLE(ASSEMBLER)
 
+namespace JSC {
+
 // If there is no assembler for this platform, at least allow code to make references to
 // some of the things it would otherwise define, albeit without giving that code any way
 // of doing anything useful.
@@ -1613,6 +1624,8 @@ public:
     enum FPRegisterID { NoFPRegister };
 };
 
+} // namespace JSC
+
 #endif // ENABLE(ASSEMBLER)
 
 #endif // MacroAssembler_h
diff --git a/Source/JavaScriptCore/b3/B3AddressMatcher.patterns b/Source/JavaScriptCore/b3/B3AddressMatcher.patterns
new file mode 100644 (file)
index 0000000..66e4a1d
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright (C) 2015 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+matcher AddressMatcher
+
+# Note that this relies on B3 doing aggressive reassociation and canoncalization of integer adds.
+# We'll never see Add(Add(x, const1), const2) because it would have already been reassociated into
+# Add(x, const1 + const2). Also, we will never see Add(const, x), because we would have canonicalized
+# it to Add(x, const). That said, in this code we never make assertions about these optimizations
+# having been performed. Also, since the Load/Store instructions in B3 have a built-in offset, we
+# don't need to match Add(x, const). That would have been folded into the Load/Store instructions
+# already. So, the only fancy mathing this can do is just BaseIndex forms.
+
+AddShift1 = Add(Shl(index, $logScale), base)
+AddShift2 = Add(base, Shl(index, $logScale))
+
+Add = Add(left, right)
+
+Direct
diff --git a/Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp b/Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp
new file mode 100644 (file)
index 0000000..f2dec8d
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3ArgumentRegValue.h"
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+ArgumentRegValue::~ArgumentRegValue()
+{
+}
+
+void ArgumentRegValue::dumpMeta(PrintStream& out) const
+{
+    out.print(m_reg);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3ArgumentRegValue.h b/Source/JavaScriptCore/b3/B3ArgumentRegValue.h
new file mode 100644 (file)
index 0000000..8f8fe4c
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3ArgumentRegValue_h
+#define B3ArgumentRegValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3Value.h"
+#include "Reg.h"
+
+namespace JSC { namespace B3 {
+
+class JS_EXPORT_PRIVATE ArgumentRegValue : public Value {
+public:
+    static bool accepts(Opcode opcode) { return opcode == ArgumentReg; }
+    
+    ~ArgumentRegValue();
+
+    Reg argumentReg() const { return m_reg; }
+
+protected:
+    void dumpMeta(PrintStream&) const override;
+
+private:
+    friend class Procedure;
+
+    ArgumentRegValue(unsigned index, Origin origin, Reg reg)
+        : Value(index, ArgumentReg, reg.isGPR() ? pointerType() : Double, origin)
+        , m_reg(reg)
+    {
+        ASSERT(reg.isSet());
+    }
+
+    Reg m_reg;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3ArgumentRegValue_h
+
diff --git a/Source/JavaScriptCore/b3/B3BasicBlock.cpp b/Source/JavaScriptCore/b3/B3BasicBlock.cpp
new file mode 100644 (file)
index 0000000..56c6533
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3BasicBlock.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3BasicBlockUtils.h"
+#include "B3Value.h"
+#include <wtf/ListDump.h>
+
+namespace JSC { namespace B3 {
+
+const char* const BasicBlock::dumpPrefix = "#";
+
+BasicBlock::BasicBlock(unsigned index, double frequency)
+    : m_index(index)
+    , m_frequency(frequency)
+{
+}
+
+BasicBlock::~BasicBlock()
+{
+}
+
+void BasicBlock::append(Value* value)
+{
+    m_values.append(value);
+}
+
+bool BasicBlock::addPredecessor(BasicBlock* block)
+{
+    return B3::addPredecessor(this, block);
+}
+
+bool BasicBlock::removePredecessor(BasicBlock* block)
+{
+    return B3::removePredecessor(this, block);
+}
+
+bool BasicBlock::replacePredecessor(BasicBlock* from, BasicBlock* to)
+{
+    return B3::replacePredecessor(this, from, to);
+}
+
+void BasicBlock::removeNops()
+{
+    unsigned sourceIndex = 0;
+    unsigned targetIndex = 0;
+    while (sourceIndex < size()) {
+        Value* value = m_values[sourceIndex++];
+        if (value->opcode() != Nop)
+            m_values[targetIndex++] = value;
+    }
+    m_values.resize(targetIndex);
+}
+
+void BasicBlock::dump(PrintStream& out) const
+{
+    out.print(dumpPrefix, m_index);
+}
+
+void BasicBlock::deepDump(PrintStream& out) const
+{
+    out.print("BB", *this, ": ; frequency = ", m_frequency, "\n");
+    if (predecessors().size())
+        out.print("  Predecessors: ", pointerListDump(predecessors()), "\n");
+    for (Value* value : *this)
+        out.print("    ", B3::deepDump(value), "\n");
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3BasicBlock.h b/Source/JavaScriptCore/b3/B3BasicBlock.h
new file mode 100644 (file)
index 0000000..7761e24
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3BasicBlock_h
+#define B3BasicBlock_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3FrequentedBlock.h"
+#include "B3SuccessorCollection.h"
+#include <wtf/Vector.h>
+
+namespace JSC { namespace B3 {
+
+class InsertionSet;
+class Procedure;
+class Value;
+
+class BasicBlock {
+    WTF_MAKE_NONCOPYABLE(BasicBlock);
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    typedef Vector<Value*> ValueList;
+    typedef Vector<BasicBlock*, 2> PredecessorList;
+    typedef Vector<FrequentedBlock, 2> SuccessorList; // This matches ControlValue::SuccessorList
+
+    static const char* const dumpPrefix;
+
+    ~BasicBlock();
+
+    unsigned index() const { return m_index; }
+
+    ValueList::iterator begin() { return m_values.begin(); }
+    ValueList::iterator end() { return m_values.end(); }
+    ValueList::const_iterator begin() const { return m_values.begin(); }
+    ValueList::const_iterator end() const { return m_values.end(); }
+
+    size_t size() const { return m_values.size(); }
+    Value* at(size_t index) const { return m_values[index]; }
+    Value*& at(size_t index) { return m_values[index]; }
+
+    Value* last() const { return m_values.last(); }
+    Value*& last() { return m_values.last(); }
+
+    const ValueList& values() const { return m_values; }
+    ValueList& values() { return m_values; }
+
+    JS_EXPORT_PRIVATE void append(Value*);
+
+    template<typename ValueType, typename... Arguments>
+    ValueType* appendNew(Procedure&, Arguments...);
+
+    unsigned numSuccessors() const;
+    const FrequentedBlock& successor(unsigned index) const;
+    FrequentedBlock& successor(unsigned index);
+    const SuccessorList& successors() const;
+    SuccessorList& successors();
+
+    BasicBlock* successorBlock(unsigned index) const;
+    BasicBlock*& successorBlock(unsigned index);
+    SuccessorCollection<BasicBlock, SuccessorList> successorBlocks();
+    SuccessorCollection<const BasicBlock, const SuccessorList> successorBlocks() const;
+
+    unsigned numPredecessors() const { return m_predecessors.size(); }
+    BasicBlock* predecessor(unsigned index) const { return m_predecessors[index]; }
+    BasicBlock*& predecessor(unsigned index) { return m_predecessors[index]; }
+    const PredecessorList& predecessors() const { return m_predecessors; }
+    PredecessorList& predecessors() { return m_predecessors; }
+
+    bool addPredecessor(BasicBlock*);
+    bool removePredecessor(BasicBlock*);
+    bool replacePredecessor(BasicBlock* from, BasicBlock* to);
+
+    double frequency() const { return m_frequency; }
+
+    void removeNops();
+
+    void dump(PrintStream&) const;
+    void deepDump(PrintStream&) const;
+
+private:
+    friend class InsertionSet;
+    friend class Procedure;
+    
+    // Instantiate via Procedure.
+    BasicBlock(unsigned index, double frequency);
+
+    unsigned m_index;
+    ValueList m_values;
+    PredecessorList m_predecessors;
+    double m_frequency;
+};
+
+class DeepBasicBlockDump {
+public:
+    DeepBasicBlockDump(const BasicBlock* block)
+        : m_block(block)
+    {
+    }
+
+    void dump(PrintStream& out) const
+    {
+        if (m_block)
+            m_block->deepDump(out);
+        else
+            out.print("<null>");
+    }
+
+private:
+    const BasicBlock* m_block;
+};
+
+inline DeepBasicBlockDump deepDump(const BasicBlock* block)
+{
+    return DeepBasicBlockDump(block);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3BasicBlock_h
+
diff --git a/Source/JavaScriptCore/b3/B3BasicBlockInlines.h b/Source/JavaScriptCore/b3/B3BasicBlockInlines.h
new file mode 100644 (file)
index 0000000..b9fdd17
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3BasicBlockInlines_h
+#define B3BasicBlockInlines_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3BasicBlock.h"
+#include "B3ControlValue.h"
+#include "B3ProcedureInlines.h"
+
+namespace JSC { namespace B3 {
+
+template<typename ValueType, typename... Arguments>
+ValueType* BasicBlock::appendNew(Procedure& procedure, Arguments... arguments)
+{
+    ValueType* result = procedure.add<ValueType>(arguments...);
+    append(result);
+    return result;
+}
+
+inline unsigned BasicBlock::numSuccessors() const
+{
+    return last()->as<ControlValue>()->numSuccessors();
+}
+
+inline const FrequentedBlock& BasicBlock::successor(unsigned index) const
+{
+    return last()->as<ControlValue>()->successor(index);
+}
+
+inline FrequentedBlock& BasicBlock::successor(unsigned index)
+{
+    return last()->as<ControlValue>()->successor(index);
+}
+
+inline const BasicBlock::SuccessorList& BasicBlock::successors() const
+{
+    return last()->as<ControlValue>()->successors();
+}
+
+inline BasicBlock::SuccessorList& BasicBlock::successors()
+{
+    return last()->as<ControlValue>()->successors();
+}
+
+inline BasicBlock* BasicBlock::successorBlock(unsigned index) const
+{
+    return successor(index).block();
+}
+
+inline BasicBlock*& BasicBlock::successorBlock(unsigned index)
+{
+    return successor(index).block();
+}
+
+inline SuccessorCollection<BasicBlock, BasicBlock::SuccessorList> BasicBlock::successorBlocks()
+{
+    return SuccessorCollection<BasicBlock, SuccessorList>(successors());
+}
+
+inline SuccessorCollection<const BasicBlock, const BasicBlock::SuccessorList> BasicBlock::successorBlocks() const
+{
+    return SuccessorCollection<const BasicBlock, const SuccessorList>(successors());
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3BasicBlockInlines_h
+
diff --git a/Source/JavaScriptCore/b3/B3BasicBlockUtils.h b/Source/JavaScriptCore/b3/B3BasicBlockUtils.h
new file mode 100644 (file)
index 0000000..debd77d
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3BasicBlockUtils_h
+#define B3BasicBlockUtils_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3IndexSet.h"
+#include <wtf/GraphNodeWorklist.h>
+#include <wtf/Vector.h>
+
+namespace JSC { namespace B3 {
+
+template<typename BasicBlock>
+bool addPredecessor(BasicBlock* block, BasicBlock* predecessor)
+{
+    auto& predecessors = block->predecessors();
+
+    if (predecessors.contains(predecessor))
+        return false;
+
+    predecessors.append(predecessor);
+    return true;
+}
+
+template<typename BasicBlock>
+bool removePredecessor(BasicBlock* block, BasicBlock* predecessor)
+{
+    auto& predecessors = block->predecessors();
+    for (unsigned i = 0; i < predecessors.size(); ++i) {
+        if (predecessors[i] == predecessor) {
+            predecessors[i--] = predecessors.last();
+            predecessors.removeLast();
+            ASSERT(!predecessors.contains(predecessor));
+            return true;
+        }
+    }
+    return false;
+}
+
+template<typename BasicBlock>
+bool replacePredecessor(BasicBlock* block, BasicBlock* from, BasicBlock* to)
+{
+    auto& predecessors = block->predecessors();
+    for (unsigned i = 0; i < predecessors.size(); ++i) {
+        if (predecessors[i] == from) {
+            predecessors[i] = to;
+            return true;
+        }
+    }
+    return false;
+}
+
+// This recomputes predecessors and removes blocks that aren't reachable.
+template<typename BasicBlock>
+void resetReachability(Vector<std::unique_ptr<BasicBlock>>& blocks)
+{
+    // Clear all predecessor lists first.
+    for (auto& block : blocks)
+        block->predecessors().resize(0);
+
+    GraphNodeWorklist<BasicBlock*, IndexSet<BasicBlock>> worklist;
+    worklist.push(blocks[0].get());
+    while (BasicBlock* block = worklist.pop()) {
+        for (BasicBlock* successor : block->successorBlocks()) {
+            if (worklist.push(successor))
+                addPredecessor(successor, block);
+        }
+    }
+
+    for (unsigned i = 1; i < blocks.size(); ++i) {
+        if (blocks[i]->predecessors().isEmpty())
+            blocks[i] = nullptr;
+    }
+}
+
+template<typename BasicBlock>
+Vector<BasicBlock*> blocksInPreOrder(BasicBlock* root)
+{
+    Vector<BasicBlock*> result;
+    GraphNodeWorklist<BasicBlock*, IndexSet<BasicBlock>> worklist;
+    worklist.push(root);
+    while (BasicBlock* block = worklist.pop()) {
+        result.append(block);
+        for (BasicBlock* successor : block->successorBlocks())
+            worklist.push(successor);
+    }
+    return result;
+}
+
+template<typename BasicBlock>
+Vector<BasicBlock*> blocksInPostOrder(BasicBlock* root)
+{
+    Vector<BasicBlock*> result;
+    PostOrderGraphNodeWorklist<BasicBlock*, IndexSet<BasicBlock>> worklist;
+    worklist.push(root);
+    while (GraphNodeWithOrder<BasicBlock*> item = worklist.pop()) {
+        switch (item.order) {
+        case GraphVisitOrder::Pre:
+            worklist.pushPost(item.node);
+            for (BasicBlock* successor : item.node->successorBlocks())
+                worklist.push(successor);
+            break;
+        case GraphVisitOrder::Post:
+            result.append(item.node);
+            break;
+        }
+    }
+    return result;
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3BasicBlockUtils_h
+
diff --git a/Source/JavaScriptCore/b3/B3BlockWorklist.h b/Source/JavaScriptCore/b3/B3BlockWorklist.h
new file mode 100644 (file)
index 0000000..63f04d4
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3BlockWorklist_h
+#define B3BlockWorklist_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3BasicBlock.h"
+#include "B3IndexSet.h"
+#include <wtf/GraphNodeWorklist.h>
+#include <wtf/Vector.h>
+
+namespace JSC { namespace B3 {
+
+class BasicBlock;
+
+typedef GraphNodeWorklist<BasicBlock*, IndexSet<BasicBlock>> BlockWorklist;
+
+// When you say BlockWith<int> you should read it as "block with an int".
+template<typename T> using BlockWith = GraphNodeWith<BasicBlock*, T>;
+
+// Extended block worklist is useful for enqueueing some meta-data along with the block. It also
+// permits forcibly enqueueing things even if the block has already been seen. It's useful for
+// things like building a spanning tree, in which case T (the auxiliary payload) would be the
+// successor index.
+template<typename T> using ExtendedBlockWorklist = ExtendedGraphNodeWorklist<BasicBlock*, T, IndexSet<BasicBlock>>;
+
+typedef GraphVisitOrder VisitOrder;
+
+typedef GraphNodeWithOrder<BasicBlock*> BlockWithOrder;
+
+typedef PostOrderGraphNodeWorklist<BasicBlock*, IndexSet<BasicBlock>> PostOrderBlockWorklist;
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3BlockWorklist_h
+
diff --git a/Source/JavaScriptCore/b3/B3CheckSpecial.cpp b/Source/JavaScriptCore/b3/B3CheckSpecial.cpp
new file mode 100644 (file)
index 0000000..f614225
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3CheckSpecial.h"
+
+#if ENABLE(B3_JIT)
+
+#include "AirCode.h"
+#include "AirGenerationContext.h"
+#include "AirInstInlines.h"
+#include "B3ValueInlines.h"
+
+namespace JSC { namespace B3 {
+
+using namespace Air;
+
+namespace {
+
+unsigned numB3Args(Inst& inst)
+{
+    switch (inst.origin->opcode()) {
+    case CheckAdd:
+    case CheckSub:
+    case CheckMul:
+        // ResCond, Tmp, Tmp
+        return 3;
+    case Check:
+        return 1;
+    default:
+        RELEASE_ASSERT_NOT_REACHED();
+        return 0;
+    }
+}
+
+} // anonymous namespace
+
+CheckSpecial::CheckSpecial(Air::Opcode opcode, unsigned numArgs)
+    : m_checkOpcode(opcode)
+    , m_numCheckArgs(numArgs)
+{
+    ASSERT(isTerminal(opcode));
+}
+
+CheckSpecial::~CheckSpecial()
+{
+}
+
+Inst CheckSpecial::hiddenBranch(const Inst& inst) const
+{
+    Inst hiddenBranch(m_checkOpcode, inst.origin);
+    hiddenBranch.args.reserveInitialCapacity(m_numCheckArgs);
+    for (unsigned i = 0; i < m_numCheckArgs; ++i)
+        hiddenBranch.args.append(inst.args[i + 1]);
+    return hiddenBranch;
+}
+
+void CheckSpecial::forEachArg(Inst& inst, const ScopedLambda<Inst::EachArgCallback>& callback)
+{
+    hiddenBranch(inst).forEachArg(callback);
+    forEachArgImpl(numB3Args(inst), m_numCheckArgs + 1, inst, callback);
+}
+
+bool CheckSpecial::isValid(Inst& inst)
+{
+    return hiddenBranch(inst).isValidForm()
+        && isValidImpl(numB3Args(inst), m_numCheckArgs + 1, inst);
+}
+
+bool CheckSpecial::admitsStack(Inst& inst, unsigned argIndex)
+{
+    if (argIndex >= 1 && argIndex < 1 + m_numCheckArgs)
+        return hiddenBranch(inst).admitsStack(argIndex - 1);
+    return admitsStackImpl(numB3Args(inst), m_numCheckArgs + 1, inst, argIndex);
+}
+
+CCallHelpers::Jump CheckSpecial::generate(Inst& inst, CCallHelpers& jit, GenerationContext& context)
+{
+    CCallHelpers::Jump fail = hiddenBranch(inst).generate(jit, context);
+    ASSERT(fail.isSet());
+
+    Value* value = inst.origin;
+
+    Vector<ValueRep> reps;
+    if (isCheckMath(value->opcode())) {
+        if (value->opcode() == CheckMul)
+            reps.append(ValueRep());
+        else if (value->opcode() == CheckSub && value->child(0)->isInt(0))
+            reps.append(ValueRep::constant(0));
+        else
+            reps.append(repForArg(*context.code, inst.args[3]));
+        reps.append(repForArg(*context.code, inst.args[2]));
+    } else {
+        ASSERT(value->opcode() == Check);
+        reps.append(ValueRep::constant(1));
+    }
+
+    appendRepsImpl(context, m_numCheckArgs + 1, inst, reps);
+    
+    context.latePaths.append(
+        createSharedTask<GenerationContext::LatePathFunction>(
+            [=] (CCallHelpers& jit, GenerationContext&) {
+                fail.link(&jit);
+                
+                Stackmap* stackmap = value->stackmap();
+                ASSERT(stackmap);
+
+                Stackmap::GenerationParams params;
+                params.value = value;
+                params.stackmap = stackmap;
+                params.reps = reps;
+                params.usedRegisters = stackmap->m_usedRegisters;
+
+                stackmap->m_generator->run(jit, params);
+            }));
+
+    return CCallHelpers::Jump(); // As far as Air thinks, we are not a terminal.
+}
+
+void CheckSpecial::dumpImpl(PrintStream& out) const
+{
+    out.print(m_checkOpcode, "(", m_numCheckArgs, ")");
+}
+
+void CheckSpecial::deepDumpImpl(PrintStream& out) const
+{
+    out.print("B3::CheckValue lowered to ", m_checkOpcode, " with ", m_numCheckArgs, " args.");
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3CheckSpecial.h b/Source/JavaScriptCore/b3/B3CheckSpecial.h
new file mode 100644 (file)
index 0000000..4f31ff3
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3CheckSpecial_h
+#define B3CheckSpecial_h
+
+#if ENABLE(B3_JIT)
+
+#include "AirOpcode.h"
+#include "B3StackmapSpecial.h"
+
+namespace JSC { namespace B3 {
+
+// We want to lower Check instructions to a branch, but then we want to route that branch to our
+// out-of-line code instead of doing anything else. For this reason, a CheckSpecial will remember
+// which branch opcode we have selected along with the number of args in the overload we want. It
+// will create an Inst with that opcode plus the appropriate args from the owning Inst whenever you
+// call any of the callbacks.
+//
+// Note that for CheckAdd, CheckSub, and CheckMul we expect that the B3 arguments are the reverse
+// of the Air arguments (Add(a, b) => Add32 b, a). Except:
+// - CheckSub(0, x), which turns into BranchNeg32 x.
+// - CheckMul(a, b), which turns into Mul32 b, a but we pass Any for a's ValueRep.
+
+class CheckSpecial : public StackmapSpecial {
+public:
+    CheckSpecial(Air::Opcode, unsigned numArgs);
+    ~CheckSpecial();
+
+protected:
+    // Constructs and returns the Inst representing the branch that this will use.
+    Air::Inst hiddenBranch(const Air::Inst&) const;
+
+    void forEachArg(Air::Inst&, const ScopedLambda<Air::Inst::EachArgCallback>&) override;
+    bool isValid(Air::Inst&) override;
+    bool admitsStack(Air::Inst&, unsigned argIndex) override;
+
+    // NOTE: the generate method will generate the hidden branch and then register a LatePath that
+    // generates the stackmap. Super crazy dude!
+
+    CCallHelpers::Jump generate(Air::Inst&, CCallHelpers&, Air::GenerationContext&) override;
+
+    void dumpImpl(PrintStream&) const override;
+    void deepDumpImpl(PrintStream&) const override;
+
+private:
+    Air::Opcode m_checkOpcode;
+    unsigned m_numCheckArgs;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3CheckSpecial_h
+
diff --git a/Source/JavaScriptCore/b3/B3CheckValue.cpp b/Source/JavaScriptCore/b3/B3CheckValue.cpp
new file mode 100644 (file)
index 0000000..15db2a2
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3CheckValue.h"
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+CheckValue::~CheckValue()
+{
+}
+
+void CheckValue::dumpMeta(PrintStream& out) const
+{
+    out.print("stackmap = ", stackmap);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3CheckValue.h b/Source/JavaScriptCore/b3/B3CheckValue.h
new file mode 100644 (file)
index 0000000..fdab37f
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3CheckValue_h
+#define B3CheckValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3Stackmap.h"
+#include "B3Value.h"
+
+namespace JSC { namespace B3 {
+
+class JS_EXPORT_PRIVATE CheckValue : public Value {
+public:
+    static bool accepts(Opcode opcode)
+    {
+        switch (opcode) {
+        case CheckAdd:
+        case CheckSub:
+        case CheckMul:
+        case Check:
+            return true;
+        default:
+            return false;
+        }
+    }
+
+    ~CheckValue();
+
+    Stackmap stackmap;
+
+protected:
+    void dumpMeta(PrintStream&) const override;
+
+private:
+    friend class Procedure;
+
+    // Use this form for CheckAdd, CheckSub, and CheckMul.
+    CheckValue(unsigned index, Opcode opcode, Origin origin, Value* left, Value* right)
+        : Value(index, opcode, left->type(), origin, left, right)
+    {
+        ASSERT(isInt(type()));
+        ASSERT(left->type() == right->type());
+        ASSERT(opcode == CheckAdd || opcode == CheckSub || opcode == CheckMul);
+    }
+
+    // Use this form for Check.
+    CheckValue(unsigned index, Opcode opcode, Origin origin, Value* predicate)
+        : Value(index, opcode, Void, origin, predicate)
+    {
+        ASSERT(opcode == Check);
+    }
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3CheckValue_h
+
+
diff --git a/Source/JavaScriptCore/b3/B3Common.cpp b/Source/JavaScriptCore/b3/B3Common.cpp
new file mode 100644 (file)
index 0000000..c485c70
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3Common.h"
+
+#if ENABLE(B3_JIT)
+
+#include "DFGCommon.h"
+#include "FTLState.h"
+#include "Options.h"
+
+namespace JSC { namespace B3 {
+
+bool shouldDumpIR()
+{
+    return FTL::verboseCompilationEnabled() || FTL::shouldDumpDisassembly() || shouldDumpIRAtEachPhase();
+}
+
+bool shouldDumpIRAtEachPhase()
+{
+    return Options::dumpGraphAtEachPhase();
+}
+
+bool shouldValidateIR()
+{
+    return DFG::validationEnabled() || shouldValidateIRAtEachPhase();
+}
+
+bool shouldValidateIRAtEachPhase()
+{
+    return Options::validateGraphAtEachPhase();
+}
+
+bool shouldSaveIRBeforePhase()
+{
+    return Options::verboseValidationFailure();
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
diff --git a/Source/JavaScriptCore/b3/B3Common.h b/Source/JavaScriptCore/b3/B3Common.h
new file mode 100644 (file)
index 0000000..0e9a168
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3Common_h
+#define B3Common_h
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+inline bool is64Bit() { return sizeof(void*) == 8; }
+inline bool is32Bit() { return !is64Bit(); }
+
+bool shouldDumpIR();
+bool shouldDumpIRAtEachPhase();
+bool shouldValidateIR();
+bool shouldValidateIRAtEachPhase();
+bool shouldSaveIRBeforePhase();
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3Common_h
+
diff --git a/Source/JavaScriptCore/b3/B3Commutativity.cpp b/Source/JavaScriptCore/b3/B3Commutativity.cpp
new file mode 100644 (file)
index 0000000..5de43e6
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3Commutativity.h"
+
+#if ENABLE(B3_JIT)
+
+#include <wtf/PrintStream.h>
+
+namespace WTF {
+
+using namespace JSC::B3;
+
+void printInternal(PrintStream& out, Commutativity commutativity)
+{
+    switch (commutativity) {
+    case Commutative:
+        out.print("Commutative");
+        return;
+    case NotCommutative:
+        out.print("NotCommutative");
+        return;
+    }
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+} // namespace WTF
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3Commutativity.h b/Source/JavaScriptCore/b3/B3Commutativity.h
new file mode 100644 (file)
index 0000000..d0bcd5b
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3Commutativity_h
+#define B3Commutativity_h
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+enum Commutativity {
+    Commutative,
+    NotCommutative
+};
+
+} } // namespace JSC::B3
+
+namespace WTF {
+
+class PrintStream;
+void printInternal(PrintStream&, JSC::B3::Commutativity);
+
+} // namespace WTF
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3Commutativity_h
+
diff --git a/Source/JavaScriptCore/b3/B3Const32Value.cpp b/Source/JavaScriptCore/b3/B3Const32Value.cpp
new file mode 100644 (file)
index 0000000..4d6723b
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3Const32Value.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3ProcedureInlines.h"
+#include "B3ValueInlines.h"
+
+namespace JSC { namespace B3 {
+
+Const32Value::~Const32Value()
+{
+}
+
+Value* Const32Value::negConstant(Procedure& proc) const
+{
+    return proc.add<Const32Value>(origin(), -m_value);
+}
+
+Value* Const32Value::addConstant(Procedure& proc, int32_t other) const
+{
+    return proc.add<Const32Value>(origin(), m_value + other);
+}
+
+Value* Const32Value::addConstant(Procedure& proc, Value* other) const
+{
+    if (!other->hasInt32())
+        return nullptr;
+    return proc.add<Const32Value>(origin(), m_value + other->asInt32());
+}
+
+Value* Const32Value::subConstant(Procedure& proc, Value* other) const
+{
+    if (!other->hasInt32())
+        return nullptr;
+    return proc.add<Const32Value>(origin(), m_value - other->asInt32());
+}
+
+void Const32Value::dumpMeta(PrintStream& out) const
+{
+    out.print(m_value);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3Const32Value.h b/Source/JavaScriptCore/b3/B3Const32Value.h
new file mode 100644 (file)
index 0000000..8e4afa5
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3Const32Value_h
+#define B3Const32Value_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3Value.h"
+
+namespace JSC { namespace B3 {
+
+class JS_EXPORT_PRIVATE Const32Value : public Value {
+public:
+    static bool accepts(Opcode opcode) { return opcode == Const32; }
+    
+    JS_EXPORT_PRIVATE ~Const32Value();
+    
+    int32_t value() const { return m_value; }
+
+    Value* negConstant(Procedure&) const override;
+    Value* addConstant(Procedure&, int32_t other) const override;
+    Value* addConstant(Procedure&, Value* other) const override;
+    Value* subConstant(Procedure&, Value* other) const override;
+
+protected:
+    JS_EXPORT_PRIVATE void dumpMeta(PrintStream&) const override;
+
+    friend class Procedure;
+
+    Const32Value(unsigned index, Origin origin, int32_t value)
+        : Value(index, Const32, Int32, origin)
+        , m_value(value)
+    {
+    }
+
+private:
+    int32_t m_value;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3Const32Value_h
+
diff --git a/Source/JavaScriptCore/b3/B3Const64Value.cpp b/Source/JavaScriptCore/b3/B3Const64Value.cpp
new file mode 100644 (file)
index 0000000..54a2acf
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3Const64Value.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3ProcedureInlines.h"
+#include "B3ValueInlines.h"
+
+namespace JSC { namespace B3 {
+
+Const64Value::~Const64Value()
+{
+}
+
+Value* Const64Value::negConstant(Procedure& proc) const
+{
+    return proc.add<Const64Value>(origin(), -m_value);
+}
+
+Value* Const64Value::addConstant(Procedure& proc, int32_t other) const
+{
+    return proc.add<Const64Value>(origin(), m_value + static_cast<int64_t>(other));
+}
+
+Value* Const64Value::addConstant(Procedure& proc, Value* other) const
+{
+    if (!other->hasInt64())
+        return nullptr;
+    return proc.add<Const64Value>(origin(), m_value + other->asInt64());
+}
+
+Value* Const64Value::subConstant(Procedure& proc, Value* other) const
+{
+    if (!other->hasInt64())
+        return nullptr;
+    return proc.add<Const64Value>(origin(), m_value - other->asInt64());
+}
+
+void Const64Value::dumpMeta(PrintStream& out) const
+{
+    out.print(m_value);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3Const64Value.h b/Source/JavaScriptCore/b3/B3Const64Value.h
new file mode 100644 (file)
index 0000000..59cb974
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3Const64Value_h
+#define B3Const64Value_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3Value.h"
+
+namespace JSC { namespace B3 {
+
+class JS_EXPORT_PRIVATE Const64Value : public Value {
+public:
+    static bool accepts(Opcode opcode) { return opcode == Const64; }
+    
+    ~Const64Value();
+    
+    int64_t value() const { return m_value; }
+
+    Value* negConstant(Procedure&) const override;
+    Value* addConstant(Procedure&, int32_t other) const override;
+    Value* addConstant(Procedure&, Value* other) const override;
+    Value* subConstant(Procedure&, Value* other) const override;
+
+protected:
+    void dumpMeta(PrintStream&) const override;
+
+    friend class Procedure;
+
+    Const64Value(unsigned index, Origin origin, int64_t value)
+        : Value(index, Const64, Int64, origin)
+        , m_value(value)
+    {
+    }
+    
+private:
+    int64_t m_value;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3Const64Value_h
+
diff --git a/Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp b/Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp
new file mode 100644 (file)
index 0000000..f171c09
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3ConstDoubleValue.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3ProcedureInlines.h"
+#include "B3ValueInlines.h"
+
+namespace JSC { namespace B3 {
+
+ConstDoubleValue::~ConstDoubleValue()
+{
+}
+
+Value* ConstDoubleValue::negConstant(Procedure& proc) const
+{
+    return proc.add<ConstDoubleValue>(origin(), -m_value);
+}
+
+Value* ConstDoubleValue::addConstant(Procedure& proc, int32_t other) const
+{
+    return proc.add<ConstDoubleValue>(origin(), m_value + static_cast<double>(other));
+}
+
+Value* ConstDoubleValue::addConstant(Procedure& proc, Value* other) const
+{
+    if (!other->hasDouble())
+        return nullptr;
+    return proc.add<ConstDoubleValue>(origin(), m_value + other->asDouble());
+}
+
+Value* ConstDoubleValue::subConstant(Procedure& proc, Value* other) const
+{
+    if (!other->hasDouble())
+        return nullptr;
+    return proc.add<ConstDoubleValue>(origin(), m_value - other->asDouble());
+}
+
+void ConstDoubleValue::dumpMeta(PrintStream& out) const
+{
+    out.printf("%le", m_value);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3ConstDoubleValue.h b/Source/JavaScriptCore/b3/B3ConstDoubleValue.h
new file mode 100644 (file)
index 0000000..c9cf347
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3ConstDoubleValue_h
+#define B3ConstDoubleValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3Value.h"
+
+namespace JSC { namespace B3 {
+
+class ConstDoubleValue : public Value {
+public:
+    static bool accepts(Opcode opcode) { return opcode == ConstDouble; }
+    
+    ~ConstDoubleValue();
+    
+    double value() const { return m_value; }
+
+    Value* negConstant(Procedure& proc) const override;
+    Value* addConstant(Procedure& proc, int32_t other) const override;
+    Value* addConstant(Procedure& proc, Value* other) const override;
+    Value* subConstant(Procedure& proc, Value* other) const override;
+
+protected:
+    void dumpMeta(PrintStream&) const override;
+
+private:
+    friend class Procedure;
+
+    ConstDoubleValue(unsigned index, Origin origin, double value)
+        : Value(index, ConstDouble, Double, origin)
+        , m_value(value)
+    {
+    }
+    
+    double m_value;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3ConstDoubleValue_h
+
diff --git a/Source/JavaScriptCore/b3/B3ConstPtrValue.h b/Source/JavaScriptCore/b3/B3ConstPtrValue.h
new file mode 100644 (file)
index 0000000..5fcf898
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3ConstPtrValue_h
+#define B3ConstPtrValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3Const32Value.h"
+#include "B3Const64Value.h"
+
+namespace JSC { namespace B3 {
+
+// Usually you want to use Const32Value or Const64Value directly. But this is useful for writing
+// platform-agnostic code. Note that a ConstPtrValue will behave like either a Const32Value or
+// Const64Value depending on platform.
+
+#if USE(JSVALUE64)
+typedef Const64Value ConstPtrValueBase;
+#else
+typedef Const32Value ConstPtrValueBase;
+#endif
+
+class ConstPtrValue : public ConstPtrValueBase {
+public:
+    void* value() const
+    {
+        return bitwise_cast<void*>(ConstPtrValueBase::value());
+    }
+
+private:
+    friend class Procedure;
+
+    template<typename T>
+    ConstPtrValue(unsigned index, Origin origin, T* pointer)
+        : ConstPtrValueBase(index, origin, bitwise_cast<intptr_t>(pointer))
+    {
+    }
+    template<typename T>
+    ConstPtrValue(unsigned index, Origin origin, T pointer)
+        : ConstPtrValueBase(index, origin, static_cast<intptr_t>(pointer))
+    {
+    }
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3ConstPtrValue_h
+
diff --git a/Source/JavaScriptCore/b3/B3ControlValue.cpp b/Source/JavaScriptCore/b3/B3ControlValue.cpp
new file mode 100644 (file)
index 0000000..545804b
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3ControlValue.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3BasicBlock.h"
+#include <wtf/ListDump.h>
+
+namespace JSC { namespace B3 {
+
+ControlValue::~ControlValue()
+{
+}
+
+void ControlValue::dumpMeta(PrintStream& out) const
+{
+    out.print(listDump(m_successors));
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
diff --git a/Source/JavaScriptCore/b3/B3ControlValue.h b/Source/JavaScriptCore/b3/B3ControlValue.h
new file mode 100644 (file)
index 0000000..8e6b4c9
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3ControlValue_h
+#define B3ControlValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3FrequentedBlock.h"
+#include "B3Value.h"
+
+namespace JSC { namespace B3 {
+
+class BasicBlock;
+
+class JS_EXPORT_PRIVATE ControlValue : public Value {
+public:
+    static bool accepts(Opcode opcode)
+    {
+        switch (opcode) {
+        case Jump:
+        case Branch:
+        case Return:
+        case Oops:
+            return true;
+        case Switch: 
+            // This is here because SwitchValue is a subclass of ControlValue, so we want
+            // switchValue->as<ControlValue>() to return non-null.
+            return true;
+        default:
+            return false;
+        }
+    }
+
+    typedef Vector<FrequentedBlock, 2> SuccessorList;
+
+    JS_EXPORT_PRIVATE ~ControlValue();
+
+    unsigned numSuccessors() const { return m_successors.size(); }
+    const FrequentedBlock& successor(unsigned index) const { return m_successors[index]; }
+    FrequentedBlock& successor(unsigned index) { return m_successors[index]; }
+    const SuccessorList& successors() const { return m_successors; }
+    SuccessorList& successors() { return m_successors; }
+
+protected:
+    JS_EXPORT_PRIVATE void dumpMeta(PrintStream&) const override;
+
+    // Use this for subclasses.
+    template<typename... Arguments>
+    ControlValue(unsigned index, Opcode opcode, Type type, Origin origin, Arguments... arguments)
+        : Value(index, opcode, type, origin, arguments...)
+    {
+    }
+
+    // Subclasses will populate this.
+    SuccessorList m_successors;
+
+private:
+    friend class Procedure;
+
+    // Use this for Oops.
+    ControlValue(unsigned index, Opcode opcode, Origin origin)
+        : Value(index, opcode, Void, origin)
+    {
+        ASSERT(opcode == Oops);
+    }
+
+    // Use this for Return.
+    ControlValue(unsigned index, Opcode opcode, Origin origin, Value* result)
+        : Value(index, opcode, Void, origin, result)
+    {
+        ASSERT(opcode == Return);
+    }
+
+    // Use this for Jump.
+    ControlValue(unsigned index, Opcode opcode, Origin origin, const FrequentedBlock& target)
+        : Value(index, opcode, Void, origin)
+    {
+        ASSERT(opcode == Jump);
+        m_successors.append(target);
+    }
+
+    // Use this for Branch.
+    ControlValue(
+        unsigned index, Opcode opcode, Origin origin, Value* predicate,
+        const FrequentedBlock& yes, const FrequentedBlock& no)
+        : Value(index, opcode, Void, origin, predicate)
+    {
+        ASSERT(opcode == Branch);
+        m_successors.append(yes);
+        m_successors.append(no);
+    }
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3ControlValue_h
+
diff --git a/Source/JavaScriptCore/b3/B3Effects.cpp b/Source/JavaScriptCore/b3/B3Effects.cpp
new file mode 100644 (file)
index 0000000..6c0bf8e
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3Effects.h"
+
+#if ENABLE(B3_JIT)
+
+#include <wtf/CommaPrinter.h>
+
+namespace JSC { namespace B3 {
+
+void Effects::dump(PrintStream& out) const
+{
+    CommaPrinter comma("|");
+    if (terminal)
+        out.print(comma, "Terminal");
+    if (exitsSideways)
+        out.print(comma, "ExitsSideways");
+    if (controlDependent)
+        out.print(comma, "ControlDependent");
+    if (writesSSAState)
+        out.print(comma, "WritesSSAState");
+    if (writes)
+        out.print(comma, "Writes:", writes);
+    if (reads)
+        out.print(comma, "Reads:", reads);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
diff --git a/Source/JavaScriptCore/b3/B3Effects.h b/Source/JavaScriptCore/b3/B3Effects.h
new file mode 100644 (file)
index 0000000..f191c00
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3Effects_h
+#define B3Effects_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3HeapRange.h"
+#include <wtf/PrintStream.h>
+
+namespace JSC { namespace B3 {
+
+struct Effects {
+    // True if this cannot continue execution in the current block.
+    bool terminal { false };
+
+    // True if this value can cause execution to terminate abruptly.
+    bool exitsSideways { false };
+
+    // True if the instruction may change semantics if hoisted above some control flow.
+    bool controlDependent { false };
+
+    // True if this writes to the SSA state. Operations that write SSA state don't write to anything
+    // in "memory" but they have a side-effect anyway. This is for modeling Upsilons. You can ignore
+    // this if you have your own way of modeling Upsilons or if you intend to just rebuild them
+    // anyway.
+    bool writesSSAState { false };
+
+    HeapRange writes;
+    HeapRange reads;
+
+    bool mustExecute() const
+    {
+        return terminal || exitsSideways || writesSSAState || writes;
+    }
+
+    void dump(PrintStream& out) const;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3Effects_h
+
diff --git a/Source/JavaScriptCore/b3/B3FrequencyClass.cpp b/Source/JavaScriptCore/b3/B3FrequencyClass.cpp
new file mode 100644 (file)
index 0000000..816850c
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3FrequencyClass.h"
+
+#if ENABLE(B3_JIT)
+
+#include <wtf/PrintStream.h>
+
+namespace WTF {
+
+using namespace JSC::B3;
+
+void printInternal(PrintStream& out, FrequencyClass frequency)
+{
+    switch (frequency) {
+    case FrequencyClass::Normal:
+        out.print("Normal");
+        return;
+    case FrequencyClass::Rare:
+        out.print("Rare");
+        return;
+    }
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+} // namespace WTF
+
+#endif // ENABLE(B3_JIT)
+
diff --git a/Source/JavaScriptCore/b3/B3FrequencyClass.h b/Source/JavaScriptCore/b3/B3FrequencyClass.h
new file mode 100644 (file)
index 0000000..072bd85
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3FrequencyClass_h
+#define B3FrequencyClass_h
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+enum class FrequencyClass : uint8_t {
+    // We don't have any hypothesis about the frequency of this control flow construct. This is
+    // the common case. We can still use basic block frequency in this case.
+    Normal,
+
+    // We expect that this control flow construct will be reached super rarely. It's valid to
+    // perform optimizations that punish Rare code. Note that there will be situations where you
+    // have to somehow construct a new frequency class from a merging of multiple classes. When
+    // this happens, never choose Rare; always go with Normal. This is necessary because we
+    // really do punish Rare code very badly.
+    Rare
+};
+
+} } // namespace JSC::B3
+
+namespace WTF {
+
+class PrintStream;
+
+void printInternal(PrintStream&, JSC::B3::FrequencyClass);
+
+} // namespace WTF
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3FrequencyClass_h
+
diff --git a/Source/JavaScriptCore/b3/B3FrequentedBlock.h b/Source/JavaScriptCore/b3/B3FrequentedBlock.h
new file mode 100644 (file)
index 0000000..3f98c68
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3FrequentedBlock_h
+#define B3FrequentedBlock_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3GenericFrequentedBlock.h"
+
+namespace JSC { namespace B3 {
+
+class BasicBlock;
+
+typedef GenericFrequentedBlock<BasicBlock> FrequentedBlock;
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3FrequentedBlock_h
+
diff --git a/Source/JavaScriptCore/b3/B3Generate.cpp b/Source/JavaScriptCore/b3/B3Generate.cpp
new file mode 100644 (file)
index 0000000..4e93785
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3Generate.h"
+
+#if ENABLE(B3_JIT)
+
+#include "AirCode.h"
+#include "AirGenerate.h"
+#include "AirInstInlines.h"
+#include "B3Common.h"
+#include "B3LowerToAir.h"
+#include "B3Procedure.h"
+#include "B3ReduceStrength.h"
+#include "B3Validate.h"
+
+namespace JSC { namespace B3 {
+
+void generate(Procedure& procedure, CCallHelpers& jit)
+{
+    Air::Code code;
+    generateToAir(procedure, code);
+    Air::generate(code, jit);
+}
+
+void generateToAir(Procedure& procedure, Air::Code& code)
+{
+    // We don't require the incoming IR to have predecessors computed.
+    procedure.resetReachability();
+    
+    if (shouldValidateIR())
+        validate(procedure);
+
+    // If we're doing super verbose dumping, the phase scope of any phase will already do a dump.
+    if (shouldDumpIR() && !shouldDumpIRAtEachPhase()) {
+        dataLog("Initial B3:\n");
+        dataLog(procedure);
+    }
+
+    reduceStrength(procedure);
+    
+    // FIXME: Add more optimizations here.
+    // https://bugs.webkit.org/show_bug.cgi?id=150507
+
+    if (shouldValidateIR())
+        validate(procedure);
+    
+    // If we're doing super verbose dumping, the phase scope of any phase will already do a dump.
+    // Note that lowerToAir() acts like a phase in this regard.
+    if (shouldDumpIR() && !shouldDumpIRAtEachPhase()) {
+        dataLog("B3 after ", procedure.lastPhaseName(), ", before generation:\n");
+        dataLog(procedure);
+    }
+
+    lowerToAir(procedure, code);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
diff --git a/Source/JavaScriptCore/b3/B3Generate.h b/Source/JavaScriptCore/b3/B3Generate.h
new file mode 100644 (file)
index 0000000..e2dffa7
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3Generate_h
+#define B3Generate_h
+
+#if ENABLE(B3_JIT)
+
+namespace JSC {
+
+class CCallHelpers;
+
+namespace B3 {
+
+class Procedure;
+namespace Air { class Code; }
+
+// This takes a B3::Procedure, optimizes it in-place, and generates it to machine code by first
+// internally converting to an Air::Code and then generating that.
+JS_EXPORT_PRIVATE void generate(Procedure&, CCallHelpers&);
+
+// This takes a B3::Procedure, optimizes it in-place, and lowers it to Air. You can then generate
+// the Air to machine code using Air::generate(). Note that an Air::Code will have pointers into the
+// B3::Procedure, so you need to ensure that the B3::Procedure outlives the Air::Code.
+void generateToAir(Procedure&, Air::Code&);
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3Generate_h
+
diff --git a/Source/JavaScriptCore/b3/B3GenericFrequentedBlock.h b/Source/JavaScriptCore/b3/B3GenericFrequentedBlock.h
new file mode 100644 (file)
index 0000000..ae7f50e
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3GenericFrequentedBlock_h
+#define B3GenericFrequentedBlock_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3FrequencyClass.h"
+#include <wtf/PrintStream.h>
+
+namespace JSC { namespace B3 {
+
+// A frequented block is a tuple of BasicBlock* and FrequencyClass. It's usually used as a
+// successor edge.
+
+template<typename BasicBlock>
+class GenericFrequentedBlock {
+public:
+    explicit GenericFrequentedBlock(
+        BasicBlock* block = nullptr, FrequencyClass frequency = FrequencyClass::Normal)
+        : m_block(block)
+        , m_frequency(frequency)
+    {
+    }
+
+    bool operator==(const GenericFrequentedBlock& other) const
+    {
+        return m_block == other.m_block
+            && m_frequency == other.m_frequency;
+    }
+
+    bool operator!=(const GenericFrequentedBlock& other) const
+    {
+        return !(*this == other);
+    }
+
+    explicit operator bool() const
+    {
+        return *this != GenericFrequentedBlock();
+    }
+
+    BasicBlock* block() const { return m_block; }
+    BasicBlock*& block() { return m_block; }
+    FrequencyClass frequency() const { return m_frequency; }
+
+    void dump(PrintStream& out) const
+    {
+        if (frequency() != FrequencyClass::Normal)
+            out.print(frequency(), ":");
+        out.print(pointerDump(m_block));
+    }
+
+private:
+    BasicBlock* m_block;
+    FrequencyClass m_frequency;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3GenericFrequentedBlock_h
+
diff --git a/Source/JavaScriptCore/b3/B3HeapRange.cpp b/Source/JavaScriptCore/b3/B3HeapRange.cpp
new file mode 100644 (file)
index 0000000..a5768f9
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3HeapRange.h"
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+void HeapRange::dump(PrintStream& out) const
+{
+    if (*this == HeapRange()) {
+        out.print("Bottom");
+        return;
+    }
+    if (*this == top()) {
+        out.print("Top");
+        return;
+    }
+    out.print(m_begin, "...", m_end);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
diff --git a/Source/JavaScriptCore/b3/B3HeapRange.h b/Source/JavaScriptCore/b3/B3HeapRange.h
new file mode 100644 (file)
index 0000000..1001ecc
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3HeapRange_h
+#define B3HeapRange_h
+
+#if ENABLE(B3_JIT)
+
+#include <wtf/MathExtras.h>
+#include <wtf/PrintStream.h>
+
+namespace JSC { namespace B3 {
+
+// Alias analysis in B3 is done by checking if two integer ranges overlap. This is powerful enough
+// to be used for TBAA-style alias analysis used by the DFG, FTL, and LLVM: you just turn each node
+// in the tree of abstract heaps into a pre/post range.
+
+class HeapRange {
+public:
+    HeapRange()
+        : m_begin(0)
+        , m_end(0)
+    {
+    }
+
+    HeapRange(unsigned begin, unsigned end)
+        : m_begin(begin)
+        , m_end(end)
+    {
+        ASSERT(m_end >= m_begin);
+        if (m_begin == m_end) {
+            // Canonicalize empty ranges.
+            m_begin = 0;
+            m_end = 0;
+        }
+    }
+
+    static HeapRange top()
+    {
+        return HeapRange(0, UINT_MAX);
+    }
+
+    bool operator==(const HeapRange& other) const
+    {
+        return m_begin == other.m_begin
+            && m_end == other.m_end;
+    }
+
+    bool operator!=(const HeapRange& other) const
+    {
+        return !(*this == other);
+    }
+    
+    explicit operator bool() const { return m_begin != m_end; }
+
+    unsigned begin() const { return m_begin; }
+    unsigned end() const { return m_end; }
+
+    bool overlaps(const HeapRange& other) const
+    {
+        return WTF::rangesOverlap(m_begin, m_end, other.m_begin, other.m_end);
+    }
+
+    void dump(PrintStream& out) const;
+
+private:
+    unsigned m_begin;
+    unsigned m_end;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3HeapRange_h
+
diff --git a/Source/JavaScriptCore/b3/B3IndexMap.h b/Source/JavaScriptCore/b3/B3IndexMap.h
new file mode 100644 (file)
index 0000000..2922ae8
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3IndexMap_h
+#define B3IndexMap_h
+
+#if ENABLE(B3_JIT)
+
+#include <wtf/Vector.h>
+
+namespace JSC { namespace B3 {
+
+// This is a map for keys that have an index(). It's super efficient for BasicBlocks. It's only
+// efficient for Values if you don't create too many of these maps, since Values can have very
+// sparse indices and there are a lot of Values.
+
+template<typename Key, typename Value>
+class IndexMap {
+public:
+    explicit IndexMap(size_t size = 0)
+    {
+        m_vector.resize(size);
+    }
+
+    void resize(size_t size)
+    {
+        m_vector.resize(size);
+    }
+
+    Value& operator[](Key* key)
+    {
+        return m_vector[key->index()];
+    }
+    
+    const Value& operator[](Key* key) const
+    {
+        return m_vector[key->index()];
+    }
+    
+private:
+    Vector<Value> m_vector;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3IndexMap_h
diff --git a/Source/JavaScriptCore/b3/B3IndexSet.h b/Source/JavaScriptCore/b3/B3IndexSet.h
new file mode 100644 (file)
index 0000000..41d71d8
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3IndexSet_h
+#define B3IndexSet_h
+
+#include <wtf/BitVector.h>
+#include <wtf/CommaPrinter.h>
+
+namespace JSC { namespace B3 {
+
+// This is a set for things that have an index(). It's super efficient for BasicBlocks. It's only
+// efficient for Values if you don't create too many of these sets, since Values can have very sparse
+// indices and there are a lot of Values.
+
+// If you want a set of BasicBlocks, you do IndexSet<BasicBlock>. So, T = BasicBlock.
+template<typename T>
+class IndexSet {
+public:
+    IndexSet()
+    {
+    }
+
+    bool add(T* value)
+    {
+        return !m_set.set(value->index());
+    }
+
+    bool contains(T* value) const
+    {
+        if (!value)
+            return false;
+        return m_set.get(value->index());
+    }
+
+    template<typename CollectionType>
+    class Iterable {
+    public:
+        Iterable(const CollectionType& collection, const IndexSet& set)
+            : m_collection(collection)
+            , m_set(set)
+        {
+        }
+
+        class iterator {
+        public:
+            iterator()
+                : m_collection(nullptr)
+            {
+            }
+
+            iterator(const CollectionType& collection, BitVector::SetBitsIterable::iterator iter)
+                : m_collection(&collection)
+                , m_iter(iter)
+            {
+            }
+
+            T* operator*()
+            {
+                return m_collection->at(*m_iter);
+            }
+
+            iterator& operator++()
+            {
+                m_iter++;
+                return *this;
+            }
+
+            bool operator==(const iterator& other) const
+            {
+                return m_iter == other.m_iter;
+            }
+
+            bool operator!=(const iterator& other) const
+            {
+                return !(*this == other);
+            }
+
+        private:
+            const CollectionType* m_collection;
+            BitVector::SetBitsIterable::iterator m_iter;
+        };
+
+        iterator begin() const { return iterator(m_collection, m_set.begin()); }
+        iterator end() const { return iterator(m_collection, m_set.end()); }
+
+    private:
+        const CollectionType& m_collection;
+        const IndexSet& m_set;
+    };
+
+    // For basic blocks, you do:
+    // indexSet.values(procedure);
+    //
+    // For values, you do:
+    // indexSet.values(procedure.values());
+    template<typename CollectionType>
+    Iterable<CollectionType> values(const CollectionType& collection) const
+    {
+        return Iterable<CollectionType>(collection);
+    }
+
+    const BitVector& indices() const { return m_set; }
+
+    void dump(PrintStream& out) const
+    {
+        CommaPrinter comma;
+        for (size_t index : indices().setBits())
+            out.print(comma, T::dumpPrefix, index);
+    }
+
+private:
+    BitVector m_set;
+};
+
+} } // namespace JSC::B3
+
+#endif // B3IndexSet_h
+
diff --git a/Source/JavaScriptCore/b3/B3InsertionSet.cpp b/Source/JavaScriptCore/b3/B3InsertionSet.cpp
new file mode 100644 (file)
index 0000000..07ebba8
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3InsertionSet.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3BasicBlock.h"
+
+namespace JSC { namespace B3 {
+
+void InsertionSet::execute(BasicBlock* block)
+{
+    executeInsertions(block->m_values, m_insertions);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
diff --git a/Source/JavaScriptCore/b3/B3InsertionSet.h b/Source/JavaScriptCore/b3/B3InsertionSet.h
new file mode 100644 (file)
index 0000000..cdb3e1a
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3InsertionSet_h
+#define B3InsertionSet_h
+
+#if ENABLE(B3_JIT)
+
+#include <wtf/Insertion.h>
+#include <wtf/Vector.h>
+
+namespace JSC { namespace B3 {
+
+class BasicBlock;
+class Procedure;
+class Value;
+
+typedef WTF::Insertion<Value*> Insertion;
+
+class InsertionSet {
+public:
+    InsertionSet(Procedure& procedure)
+        : m_procedure(procedure)
+    {
+    }
+
+    Procedure& code() { return m_procedure; }
+
+    void appendInsertion(const Insertion& insertion)
+    {
+        m_insertions.append(insertion);
+    }
+
+    Value* insertValue(size_t index, Value* value)
+    {
+        appendInsertion(Insertion(index, value));
+        return value;
+    }
+
+    template<typename ValueType, typename... Arguments>
+    Value* insert(size_t index, Arguments... arguments);
+
+    void execute(BasicBlock*);
+
+private:
+    Procedure& m_procedure;
+    Vector<Insertion, 8> m_insertions;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3InsertionSet_h
+
diff --git a/Source/JavaScriptCore/b3/B3InsertionSetInlines.h b/Source/JavaScriptCore/b3/B3InsertionSetInlines.h
new file mode 100644 (file)
index 0000000..8e1587e
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef B3InsertionSetInlines_h
+#define B3InsertionSetInlines_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3InsertionSet.h"
+#include "B3ProcedureInlines.h"
+
+namespace JSC { namespace B3 {
+
+template<typename ValueType, typename... Arguments>
+Value* InsertionSet::insert(size_t index, Arguments... arguments)
+{
+    return insertValue(index, m_procedure.add<ValueType>(arguments...));
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3InsertionSetInlines_h
+
diff --git a/Source/JavaScriptCore/b3/B3LowerToAir.cpp b/Source/JavaScriptCore/b3/B3LowerToAir.cpp
new file mode 100644 (file)
index 0000000..41afc8b
--- /dev/null
@@ -0,0 +1,587 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3LowerToAir.h"
+
+#if ENABLE(B3_JIT)
+
+#include "AirCode.h"
+#include "AirInsertionSet.h"
+#include "AirInstInlines.h"
+#include "B3AddressMatcher.h"
+#include "B3ArgumentRegValue.h"
+#include "B3BasicBlockInlines.h"
+#include "B3Commutativity.h"
+#include "B3IndexMap.h"
+#include "B3IndexSet.h"
+#include "B3LoweringMatcher.h"
+#include "B3MemoryValue.h"
+#include "B3PhaseScope.h"
+#include "B3Procedure.h"
+#include "B3UseCounts.h"
+#include "B3ValueInlines.h"
+#include <wtf/ListDump.h>
+
+namespace JSC { namespace B3 {
+
+using namespace Air;
+
+namespace {
+
+class LowerToAir {
+public:
+    LowerToAir(Procedure& procedure, Code& code)
+        : valueToTmp(procedure.values().size())
+        , blockToBlock(procedure.size())
+        , useCounts(procedure)
+        , addressSelector(*this)
+        , procedure(procedure)
+        , code(code)
+    {
+    }
+
+    void run()
+    {
+        for (B3::BasicBlock* block : procedure)
+            blockToBlock[block] = code.addBlock(block->frequency());
+
+        // Lower defs before uses on a global level. This is a good heuristic to lock down a
+        // hoisted address expression before we duplicate it back into the loop.
+        for (B3::BasicBlock* block : procedure.blocksInPreOrder()) {
+            // Reset some state.
+            insts.resize(0);
+            
+            // Process blocks in reverse order so we see uses before defs. That's what allows us
+            // to match patterns effectively.
+            for (unsigned i = block->size(); i--;) {
+                currentValue = block->at(i);
+                if (locked.contains(currentValue))
+                    continue;
+                insts.append(Vector<Inst>());
+                bool result = runLoweringMatcher(currentValue, *this);
+                if (!result) {
+                    dataLog("FATAL: could not lower ", deepDump(currentValue), "\n");
+                    RELEASE_ASSERT_NOT_REACHED();
+                }
+            }
+
+            // Now append the instructions. insts contains them in reverse order, so we process
+            // it in reverse.
+            for (unsigned i = insts.size(); i--;) {
+                for (Inst& inst : insts[i])
+                    blockToBlock[block]->appendInst(WTF::move(inst));
+            }
+
+            // Make sure that the successors are set up correctly.
+            ASSERT(block->successors().size() <= 2);
+            for (B3::BasicBlock* successor : block->successorBlocks())
+                blockToBlock[block]->successors().append(blockToBlock[successor]);
+        }
+
+        Air::InsertionSet insertionSet(code);
+        for (Inst& inst : prologue)
+            insertionSet.insertInst(0, WTF::move(inst));
+        insertionSet.execute(code[0]);
+    }
+
+    Tmp tmp(Value* value)
+    {
+        Tmp& tmp = valueToTmp[value];
+        if (!tmp)
+            tmp = code.newTmp(isInt(value->type()) ? Arg::GP : Arg::FP);
+        return tmp;
+    }
+
+    // This turns the given operand into an address.
+    Arg effectiveAddr(Value* address)
+    {
+        addressSelector.selectedAddress = Arg();
+        if (runAddressMatcher(address, addressSelector))
+            return addressSelector.selectedAddress;
+
+        return Arg::addr(tmp(address));
+    }
+
+    Arg effectiveAddr(Value* address, Value* memoryValue)
+    {
+        Arg result = effectiveAddr(address);
+        ASSERT(result);
+
+        int32_t offset = memoryValue->as<MemoryValue>()->offset();
+        Arg offsetResult = result.withOffset(offset);
+        if (!offsetResult)
+            return Arg::addr(tmp(address), offset);
+        return offsetResult;
+    }
+
+    // This gives you the address of the given Load or Store. If it's not a Load or Store, then
+    // it returns Arg().
+    Arg addr(Value* memoryValue)
+    {
+        MemoryValue* value = memoryValue->as<MemoryValue>();
+        if (!value)
+            return Arg();
+
+        return effectiveAddr(value->children().last(), value);
+    }
+
+    Arg loadAddr(Value* loadValue)
+    {
+        if (loadValue->opcode() == Load)
+            return addr(loadValue);
+        return Arg();
+    }
+
+    Arg imm(Value* value)
+    {
+        if (value->hasInt32())
+            return Arg::imm(value->asInt32());
+        return Arg();
+    }
+
+    Arg immOrTmp(Value* value)
+    {
+        if (Arg result = imm(value))
+            return result;
+        return tmp(value);
+    }
+
+    template<Air::Opcode opcode, Commutativity commutativity = NotCommutative>
+    void appendBinOp(Value* left, Value* right)
+    {
+        Tmp result = tmp(currentValue);
+        
+        // Three-operand forms like:
+        //     Op a, b, c
+        // mean something like:
+        //