commit | c488df6dd7bd7257b6e9a57b645b69b96206dac6 | [log] [tgz] |
---|---|---|
author | justin_michaud@apple.com <justin_michaud@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Thu Mar 03 06:49:38 2022 +0000 |
committer | justin_michaud@apple.com <justin_michaud@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Thu Mar 03 06:49:38 2022 +0000 |
tree | aca8b31406a98adb1b84baa79b6d2b67f62419de | |
parent | 7923c9e3bd919a3f09b4d7873306a99355e5efce [diff] |
Refactor OpcodeTraits to support the possibility of having 2-byte WASM opcode ids in bytecode streams https://bugs.webkit.org/show_bug.cgi?id=237347 The number of WASM opcodes will increase beyond 255 when WASM SIMD is implemented, and so this patch changes OpcodeTraits to allow for the possibility of having two-byte WASM opcodes without regressing JS. We have to thread these OpcodeTraits everywhere that they are used so that code can read the correct value when decoding an instruction stream. This patch does not change the size of WASM opcodes yet, although I have tested that the test suite still passes if we do increase the opcode size. Reviewed by Keith Miller. * bytecode/BytecodeBasicBlock.cpp: (JSC::BytecodeBasicBlock<OpcodeTraits>::BytecodeBasicBlock): (JSC::BytecodeBasicBlock<OpcodeTraits>::addLength): (JSC::BytecodeBasicBlock<OpcodeTraits>::shrinkToFit): (JSC::isJumpTarget): (JSC::BytecodeBasicBlock<OpcodeTraits>::computeImpl): (JSC::BytecodeBasicBlock<JSOpcodeTraits>::compute): (JSC::BytecodeBasicBlock::BytecodeBasicBlock): Deleted. (JSC::BytecodeBasicBlock::addLength): Deleted. (JSC::BytecodeBasicBlock::shrinkToFit): Deleted. (JSC::BytecodeBasicBlock::computeImpl): Deleted. (JSC::BytecodeBasicBlock::compute): Deleted. * bytecode/BytecodeBasicBlock.h: (JSC::BytecodeBasicBlock::addSuccessor): * bytecode/BytecodeDumper.cpp: (JSC::BytecodeDumperBase<InstructionStreamType>::printLocationAndOp): (JSC::BytecodeDumperBase<InstructionStreamType>::dumpValue): (JSC::BytecodeDumper<Block>::outOfLineJumpOffset const): (JSC::BytecodeDumper<Block>::dumpBytecode): (JSC::dumpHeader): (JSC::CodeBlockBytecodeDumper<Block>::dumpBlock): (JSC::CodeBlockBytecodeDumper<Block>::dumpGraph): (JSC::Wasm::BytecodeDumper::dumpBlock): (JSC::Wasm::BytecodeDumper::registerName const): (JSC::Wasm::BytecodeDumper::outOfLineJumpOffset const): (JSC::BytecodeDumperBase::printLocationAndOp): Deleted. (JSC::BytecodeDumperBase::dumpValue): Deleted. * bytecode/BytecodeDumper.h: * bytecode/BytecodeGeneratorification.cpp: (JSC::BytecodeGeneratorification::BytecodeGeneratorification): (JSC::BytecodeGeneratorification::enterPoint const): (JSC::BytecodeGeneratorification::instructions const): (JSC::GeneratorLivenessAnalysis::run): (JSC::performGeneratorification): * bytecode/BytecodeGeneratorification.h: * bytecode/BytecodeGraph.h: (JSC::BytecodeGraph::blockContainsBytecodeOffset): (JSC::BytecodeGraph::findBasicBlockForBytecodeOffset): (JSC::BytecodeGraph::findBasicBlockWithLeaderOffset): (JSC::BytecodeGraph::at const): (JSC::BytecodeGraph::operator[] const): (JSC::BytecodeGraph::first): (JSC::BytecodeGraph::last): (JSC::BytecodeGraph::dump): (JSC::BytecodeGraph::BytecodeGraph): * bytecode/BytecodeLivenessAnalysis.cpp: (JSC::BytecodeLivenessAnalysis::computeFullLiveness): (JSC::BytecodeLivenessAnalysis::dumpResults): * bytecode/BytecodeLivenessAnalysis.h: * bytecode/BytecodeLivenessAnalysisInlines.h: (JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexDef): (JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexUse): (JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexUseInExceptionHandler): (JSC::BytecodeLivenessPropagation::stepOverBytecodeIndex): (JSC::BytecodeLivenessPropagation::stepOverInstruction): (JSC::BytecodeLivenessPropagation::computeLocalLivenessForInstruction): (JSC::BytecodeLivenessPropagation::computeLocalLivenessForBlock): (JSC::BytecodeLivenessPropagation::getLivenessInfoAtInstruction): (JSC::BytecodeLivenessPropagation::runLivenessFixpoint): * bytecode/BytecodeRewriter.cpp: (JSC::BytecodeRewriter::insertImpl): (JSC::BytecodeRewriter::adjustJumpTargets): * bytecode/BytecodeRewriter.h: (JSC::BytecodeRewriter::InsertionPoint::InsertionPoint): (JSC::BytecodeRewriter::Fragment::Fragment): (JSC::BytecodeRewriter::BytecodeRewriter): (JSC::BytecodeRewriter::insertFragmentBefore): (JSC::BytecodeRewriter::insertFragmentAfter): (JSC::BytecodeRewriter::replaceBytecodeWithFragment): (JSC::BytecodeRewriter::adjustAbsoluteOffset): (JSC::BytecodeRewriter::adjustJumpTarget): * bytecode/BytecodeUseDef.cpp: (JSC::computeUsesForBytecodeIndexImpl): (JSC::computeDefsForBytecodeIndexImpl): * bytecode/BytecodeUseDef.h: (JSC::computeUsesForBytecodeIndex): (JSC::computeDefsForBytecodeIndex): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dumpBytecode): (JSC::CodeBlock::finishCreation): (JSC::CodeBlock::hasOpDebugForLineAndColumn): (JSC::CodeBlock::notifyLexicalBindingUpdate): (JSC::CodeBlock::validate): (JSC::CodeBlock::outOfLineJumpOffset): (JSC::CodeBlock::outOfLineJumpTarget): (JSC::CodeBlock::binaryArithProfileForPC): (JSC::CodeBlock::unaryArithProfileForPC): (JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler): * bytecode/CodeBlock.h: (JSC::CodeBlock::outOfLineJumpOffset): (JSC::CodeBlock::bytecodeOffset): (JSC::CodeBlock::bytecodeIndex): (JSC::CodeBlock::instructions const): (JSC::CodeBlock::instructionAt const): * bytecode/Instruction.h: (JSC::BaseInstruction::opcodeID const): (JSC::BaseInstruction::name const): (JSC::BaseInstruction::isWide16 const): (JSC::BaseInstruction::isWide32 const): (JSC::BaseInstruction::width const): (JSC::BaseInstruction::hasMetadata const): (JSC::BaseInstruction::hasCheckpoints const): (JSC::BaseInstruction::numberOfCheckpoints const): (JSC::BaseInstruction::sizeShiftAmount const): (JSC::BaseInstruction::opcodeIDWidth const): (JSC::BaseInstruction::opcodeIDBytes const): (JSC::BaseInstruction::size const): (JSC::BaseInstruction::is const): (JSC::BaseInstruction::as const): (JSC::BaseInstruction::asKnownWidth const): (JSC::BaseInstruction::cast): (JSC::BaseInstruction::cast const): (JSC::BaseInstruction::wide16 const): (JSC::BaseInstruction::wide32 const): * bytecode/InstructionStream.cpp: (JSC::InstructionStream::InstructionStream): Deleted. (JSC::InstructionStream::sizeInBytes const): Deleted. (JSC::InstructionStream::contains const): Deleted. * bytecode/InstructionStream.h: (JSC::InstructionStream::sizeInBytes const): (JSC::InstructionStream::BaseRef::operator-> const): (JSC::InstructionStream::BaseRef::ptr const): (JSC::InstructionStream::BaseRef::unwrap const): (JSC::InstructionStream::MutableRef::operator->): (JSC::InstructionStream::MutableRef::operator-> const): (JSC::InstructionStream::MutableRef::ptr): (JSC::InstructionStream::MutableRef::ptr const): (JSC::InstructionStream::MutableRef::unwrap): (JSC::InstructionStream::MutableRef::unwrap const): (JSC::InstructionStream::iterator::operator++): (JSC::InstructionStream::contains const): (JSC::InstructionStream::InstructionStream): (JSC::InstructionStreamWriter::InstructionStreamWriter): (JSC::InstructionStreamWriter::finalize): (JSC::InstructionStreamWriter::swap): (JSC::InstructionStreamWriter::iterator::operator++): * bytecode/Opcode.h: * bytecode/OpcodeInlines.h: (JSC::isOpcodeShape): * bytecode/OpcodeSize.h: * bytecode/PreciseJumpTargets.cpp: (JSC::getJumpTargetsForInstruction): (JSC::computePreciseJumpTargetsInternal): (JSC::computePreciseJumpTargets): (JSC::recomputePreciseJumpTargets): (JSC::findJumpTargetsForInstruction): * bytecode/PreciseJumpTargets.h: * bytecode/PreciseJumpTargetsInlines.h: (JSC::jumpTargetForInstruction): (JSC::extractStoredJumpTargetsForInstruction): (JSC::updateStoredJumpTargetsForInstruction): * bytecode/UnlinkedCodeBlock.cpp: (JSC::dumpLineColumnEntry): (JSC::UnlinkedCodeBlock::instructions const): (JSC::UnlinkedCodeBlock::outOfLineJumpOffset): * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedCodeBlock::instructionAt const): (JSC::UnlinkedCodeBlock::bytecodeOffset): (JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets const): (JSC::UnlinkedCodeBlock::outOfLineJumpOffset): * bytecode/UnlinkedCodeBlockGenerator.cpp: (JSC::UnlinkedCodeBlockGenerator::finalize): (JSC::UnlinkedCodeBlockGenerator::applyModification): (JSC::UnlinkedCodeBlockGenerator::addOutOfLineJumpTarget): (JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset): * bytecode/UnlinkedCodeBlockGenerator.h: (JSC::UnlinkedCodeBlockGenerator::addOpProfileControlFlowBytecodeOffset): (JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::instructions const): (JSC::BytecodeGenerator::withWriter): * bytecompiler/BytecodeGeneratorBase.h: * bytecompiler/BytecodeGeneratorBaseInlines.h: (JSC::BytecodeGeneratorBase<Traits>::recordOpcode): (JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode16): (JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode32): * bytecompiler/StaticPropertyAnalysis.h: (JSC::StaticPropertyAnalysis::create): (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis): * bytecompiler/StaticPropertyAnalyzer.h: (JSC::StaticPropertyAnalyzer::createThis): (JSC::StaticPropertyAnalyzer::newObject): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleCall): (JSC::DFG::ByteCodeParser::handleVarargsCall): (JSC::DFG::ByteCodeParser::handleRecursiveTailCall): (JSC::DFG::ByteCodeParser::inlineCall): (JSC::DFG::ByteCodeParser::parseGetById): (JSC::DFG::ByteCodeParser::parseBlock): (JSC::DFG::ByteCodeParser::parseCodeBlock): * dfg/DFGCapabilities.cpp: (JSC::DFG::capabilityLevel): * dfg/DFGCapabilities.h: (JSC::DFG::capabilityLevel): * dfg/DFGOSRExit.cpp: (JSC::DFG::OSRExit::compileExit): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::callerReturnPC): (JSC::DFG::adjustAndJumpToTarget): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileLoopHint): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * ftl/FTLOSRExitCompiler.cpp: (JSC::FTL::compileStub): * ftl/FTLOperations.cpp: (JSC::FTL::JSC_DEFINE_JIT_OPERATION): * generator/Argument.rb: * generator/DSL.rb: * generator/Opcode.rb: * interpreter/AbstractPC.h: * interpreter/CallFrame.cpp: (JSC::CallFrame::currentVPC const): (JSC::CallFrame::setCurrentVPC): * interpreter/CallFrame.h: * interpreter/Interpreter.cpp: (JSC::CatchInfo::CatchInfo): * interpreter/Interpreter.h: * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases): * jit/JIT.h: * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_jless): (JSC::JIT::emit_op_jlesseq): (JSC::JIT::emit_op_jgreater): (JSC::JIT::emit_op_jgreatereq): (JSC::JIT::emit_op_jnless): (JSC::JIT::emit_op_jnlesseq): (JSC::JIT::emit_op_jngreater): (JSC::JIT::emit_op_jngreatereq): (JSC::JIT::emitSlow_op_jless): (JSC::JIT::emitSlow_op_jlesseq): (JSC::JIT::emitSlow_op_jgreater): (JSC::JIT::emitSlow_op_jgreatereq): (JSC::JIT::emitSlow_op_jnless): (JSC::JIT::emitSlow_op_jnlesseq): (JSC::JIT::emitSlow_op_jngreater): (JSC::JIT::emitSlow_op_jngreatereq): (JSC::JIT::emit_op_below): (JSC::JIT::emit_op_beloweq): (JSC::JIT::emit_op_jbelow): (JSC::JIT::emit_op_jbeloweq): (JSC::JIT::emit_op_unsigned): (JSC::JIT::emit_compareAndJump): (JSC::JIT::emit_compareUnsignedAndJump): (JSC::JIT::emit_compareUnsigned): (JSC::JIT::emit_compareAndJumpSlow): (JSC::JIT::emit_op_inc): (JSC::JIT::emit_op_dec): (JSC::JIT::emit_op_mod): (JSC::JIT::emitSlow_op_mod): (JSC::JIT::emit_op_pow): (JSC::JIT::emitSlow_op_pow): (JSC::JIT::emit_op_negate): (JSC::JIT::emitSlow_op_negate): (JSC::JIT::emitBitBinaryOpFastPath): (JSC::JIT::emit_op_bitnot): (JSC::JIT::emit_op_bitand): (JSC::JIT::emit_op_bitor): (JSC::JIT::emit_op_bitxor): (JSC::JIT::emit_op_lshift): (JSC::JIT::emitRightShiftFastPath): (JSC::JIT::emit_op_rshift): (JSC::JIT::emit_op_urshift): (JSC::JIT::emit_op_add): (JSC::JIT::emitSlow_op_add): (JSC::JIT::emitMathICFast): (JSC::JIT::emitMathICSlow): (JSC::JIT::emit_op_div): (JSC::JIT::emit_op_mul): (JSC::JIT::emitSlow_op_mul): (JSC::JIT::emit_op_sub): (JSC::JIT::emitSlow_op_sub): * jit/JITCall.cpp: (JSC::JIT::emit_op_ret): (JSC::JIT::compileCallEvalSlowCase): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase): (JSC::JIT::emit_op_call): (JSC::JIT::emit_op_tail_call): (JSC::JIT::emit_op_call_eval): (JSC::JIT::emit_op_call_varargs): (JSC::JIT::emit_op_tail_call_varargs): (JSC::JIT::emit_op_tail_call_forward_arguments): (JSC::JIT::emit_op_construct_varargs): (JSC::JIT::emit_op_construct): (JSC::JIT::emitSlow_op_call): (JSC::JIT::emitSlow_op_tail_call): (JSC::JIT::emitSlow_op_call_eval): (JSC::JIT::emitSlow_op_call_varargs): (JSC::JIT::emitSlow_op_tail_call_varargs): (JSC::JIT::emitSlow_op_tail_call_forward_arguments): (JSC::JIT::emitSlow_op_construct_varargs): (JSC::JIT::emitSlow_op_construct): (JSC::JIT::emit_op_iterator_open): (JSC::JIT::emitSlow_op_iterator_open): (JSC::JIT::emit_op_iterator_next): (JSC::JIT::emitSlow_op_iterator_next): * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITInlines.h: (JSC::JIT::fastPathResumePoint const): (JSC::JIT::jumpTarget): * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_mov): (JSC::JIT::emit_op_end): (JSC::JIT::emit_op_jmp): (JSC::JIT::emit_op_new_object): (JSC::JIT::emitSlow_op_new_object): (JSC::JIT::emit_op_overrides_has_instance): (JSC::JIT::emit_op_instanceof): (JSC::JIT::emitSlow_op_instanceof): (JSC::JIT::emit_op_is_empty): (JSC::JIT::emit_op_typeof_is_undefined): (JSC::JIT::emit_op_is_undefined_or_null): (JSC::JIT::emit_op_is_boolean): (JSC::JIT::emit_op_is_number): (JSC::JIT::emit_op_is_big_int): (JSC::JIT::emit_op_is_cell_with_type): (JSC::JIT::emit_op_is_object): (JSC::JIT::emit_op_to_primitive): (JSC::JIT::emit_op_to_property_key): (JSC::JIT::emit_op_set_function_name): (JSC::JIT::emit_op_not): (JSC::JIT::emit_op_jfalse): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_jundefined_or_null): (JSC::JIT::emit_op_jnundefined_or_null): (JSC::JIT::emit_op_jeq_ptr): (JSC::JIT::emit_op_jneq_ptr): (JSC::JIT::emit_op_eq): (JSC::JIT::emit_op_jeq): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_neq): (JSC::JIT::emit_op_jneq): (JSC::JIT::emit_op_throw): (JSC::JIT::compileOpStrictEq): (JSC::JIT::emit_op_stricteq): (JSC::JIT::emit_op_nstricteq): (JSC::JIT::compileOpStrictEqJump): (JSC::JIT::emit_op_jstricteq): (JSC::JIT::emit_op_jnstricteq): (JSC::JIT::emitSlow_op_jstricteq): (JSC::JIT::emitSlow_op_jnstricteq): (JSC::JIT::emit_op_to_number): (JSC::JIT::emit_op_to_numeric): (JSC::JIT::emit_op_to_string): (JSC::JIT::emit_op_to_object): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_identity_with_profile): (JSC::JIT::emit_op_get_parent_scope): (JSC::JIT::emit_op_switch_imm): (JSC::JIT::emit_op_switch_char): (JSC::JIT::emit_op_switch_string): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_enter): (JSC::JIT::emit_op_get_scope): (JSC::JIT::emit_op_to_this): (JSC::JIT::emit_op_create_this): (JSC::JIT::emit_op_check_tdz): (JSC::JIT::emitSlow_op_eq): (JSC::JIT::emitSlow_op_neq): (JSC::JIT::emitSlow_op_jeq): (JSC::JIT::emitSlow_op_jneq): (JSC::JIT::emit_op_debug): (JSC::JIT::emit_op_loop_hint): (JSC::JIT::emitSlow_op_loop_hint): (JSC::JIT::emit_op_check_traps): (JSC::JIT::emit_op_nop): (JSC::JIT::emit_op_super_sampler_begin): (JSC::JIT::emit_op_super_sampler_end): (JSC::JIT::emitSlow_op_check_traps): (JSC::JIT::emit_op_new_regexp): (JSC::JIT::emitNewFuncCommon): (JSC::JIT::emit_op_new_func): (JSC::JIT::emit_op_new_generator_func): (JSC::JIT::emit_op_new_async_generator_func): (JSC::JIT::emit_op_new_async_func): (JSC::JIT::emitNewFuncExprCommon): (JSC::JIT::emit_op_new_func_exp): (JSC::JIT::emit_op_new_generator_func_exp): (JSC::JIT::emit_op_new_async_func_exp): (JSC::JIT::emit_op_new_async_generator_func_exp): (JSC::JIT::emit_op_new_array): (JSC::JIT::emit_op_new_array_with_size): (JSC::JIT::emit_op_profile_type): (JSC::JIT::emit_op_log_shadow_chicken_prologue): (JSC::JIT::emit_op_log_shadow_chicken_tail): (JSC::JIT::emit_op_profile_control_flow): (JSC::JIT::emit_op_argument_count): (JSC::JIT::emit_op_get_rest_length): (JSC::JIT::emit_op_get_argument): (JSC::JIT::emit_op_get_prototype_of): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_eq): (JSC::JIT::emit_op_neq): (JSC::JIT::emit_op_jeq): (JSC::JIT::emit_op_jneq): (JSC::JIT::emitSlow_op_eq): (JSC::JIT::emitSlow_op_neq): (JSC::JIT::emitSlow_op_jeq): (JSC::JIT::emitSlow_op_jneq): (JSC::JIT::emit_op_stricteq): (JSC::JIT::emit_op_nstricteq): (JSC::JIT::emit_op_jstricteq): (JSC::JIT::emit_op_jnstricteq): (JSC::JIT::emitSlow_op_jstricteq): (JSC::JIT::emitSlow_op_jnstricteq): * jit/JITOperations.cpp: (JSC::JSC_DEFINE_JIT_OPERATION): * jit/JITOperations.h: * jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emitSlow_op_get_by_val): (JSC::JIT::emit_op_get_private_name): (JSC::JIT::emitSlow_op_get_private_name): (JSC::JIT::emit_op_set_private_brand): (JSC::JIT::emitSlow_op_set_private_brand): (JSC::JIT::emit_op_check_private_brand): (JSC::JIT::emitSlow_op_check_private_brand): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emit_op_put_by_val_direct): (JSC::JIT::emitSlow_op_put_by_val): (JSC::JIT::emit_op_put_private_name): (JSC::JIT::emitSlow_op_put_private_name): (JSC::JIT::emit_op_put_getter_by_id): (JSC::JIT::emit_op_put_setter_by_id): (JSC::JIT::emit_op_put_getter_setter_by_id): (JSC::JIT::emit_op_put_getter_by_val): (JSC::JIT::emit_op_put_setter_by_val): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emitSlow_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (JSC::JIT::emitSlow_op_del_by_val): (JSC::JIT::emit_op_try_get_by_id): (JSC::JIT::emitSlow_op_try_get_by_id): (JSC::JIT::emit_op_get_by_id_direct): (JSC::JIT::emitSlow_op_get_by_id_direct): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emitSlow_op_get_by_id): (JSC::JIT::emit_op_get_by_id_with_this): (JSC::JIT::emitSlow_op_get_by_id_with_this): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emitSlow_op_put_by_id): (JSC::JIT::emit_op_in_by_id): (JSC::JIT::emitSlow_op_in_by_id): (JSC::JIT::emit_op_in_by_val): (JSC::JIT::emitSlow_op_in_by_val): (JSC::JIT::emit_op_has_private_name): (JSC::JIT::emitSlow_op_has_private_name): (JSC::JIT::emit_op_has_private_brand): (JSC::JIT::emitSlow_op_has_private_brand): (JSC::JIT::emit_op_resolve_scope): (JSC::JIT::emit_op_get_from_scope): (JSC::JIT::emit_op_put_to_scope): (JSC::JIT::emitSlow_op_put_to_scope): (JSC::JIT::emit_op_get_from_arguments): (JSC::JIT::emit_op_put_to_arguments): (JSC::JIT::emit_op_get_internal_field): (JSC::JIT::emit_op_put_internal_field): (JSC::JIT::emit_op_get_property_enumerator): (JSC::JIT::emit_op_enumerator_next): (JSC::JIT::emit_op_enumerator_get_by_val): (JSC::JIT::emitSlow_op_enumerator_get_by_val): (JSC::JIT::emit_op_enumerator_in_by_val): (JSC::JIT::emit_op_enumerator_has_own_property): * llint/LLIntData.cpp: (JSC::LLInt::initialize): * llint/LLIntData.h: (JSC::LLInt::exceptionInstructions): (JSC::LLInt::wasmExceptionInstructions): * llint/LLIntExceptions.cpp: (JSC::LLInt::returnToThrow): (JSC::LLInt::wasmReturnToThrow): * llint/LLIntExceptions.h: * llint/LLIntSlowPaths.cpp: (JSC::LLInt::llint_trace_operand): (JSC::LLInt::llint_trace_value): (JSC::LLInt::setupGetByIdPrototypeCache): (JSC::LLInt::performLLIntGetByID): (JSC::LLInt::varargsSetup): (JSC::LLInt::commonCallEval): (JSC::LLInt::dispatchToNextInstructionDuringExit): * llint/LLIntSlowPaths.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter.cpp: (JSC::CLoopRegister::operator const JSInstruction*): (JSC::CLoop::execute): (JSC::CLoopRegister::operator const Instruction*): Deleted. * llint/LowLevelInterpreter32_64.asm: * llint/LowLevelInterpreter64.asm: * llint/WebAssembly.asm: * runtime/CachedTypes.cpp: (JSC::CachedInstructionStream::encode): (JSC::CachedInstructionStream::decode const): (JSC::CachedCodeBlock::instructions const): * runtime/CommonSlowPaths.cpp: (JSC::updateArithProfileForBinaryArithOp): (JSC::iteratorOpenTryFastImpl): (JSC::iteratorNextTryFastImpl): * runtime/CommonSlowPaths.h: * runtime/JSCConfig.h: * runtime/JSCJSValue.h: * runtime/SlowPathFunction.h: * runtime/VM.cpp: (JSC::VM::addLoopHintExecutionCounter): (JSC::VM::getLoopHintExecutionCounter): (JSC::VM::removeLoopHintExecutionCounter): * runtime/VM.h: * wasm/WasmCallee.cpp: (JSC::Wasm::LLIntCallee::LLIntCallee): (JSC::Wasm::LLIntCallee::outOfLineJumpOffset): (JSC::Wasm::LLIntCallee::outOfLineJumpTarget): * wasm/WasmCallee.h: * wasm/WasmFunctionCodeBlockGenerator.cpp: (JSC::Wasm::FunctionCodeBlockGenerator::setInstructions): (JSC::Wasm::FunctionCodeBlockGenerator::addOutOfLineJumpTarget): (JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset): * wasm/WasmFunctionCodeBlockGenerator.h: (JSC::Wasm::FunctionCodeBlockGenerator::constantRegisters const): (JSC::Wasm::FunctionCodeBlockGenerator::instructions const): (JSC::Wasm::FunctionCodeBlockGenerator::addJumpTarget): (JSC::Wasm::FunctionCodeBlockGenerator::numberOfJumpTargets): (JSC::Wasm::FunctionCodeBlockGenerator::lastJumpTarget): (JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset): (JSC::Wasm::FunctionCodeBlockGenerator::bytecodeOffset): (JSC::Wasm::FunctionCodeBlockGenerator::tierUpCounter): * wasm/WasmGeneratorTraits.h: * wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::addSwitch): (JSC::GenericLabel<Wasm::GeneratorTraits>::setLocation): * wasm/WasmLLIntTierUpCounter.cpp: (JSC::Wasm::LLIntTierUpCounter::addOSREntryDataForLoop): (JSC::Wasm::LLIntTierUpCounter::osrEntryDataForLoop const const): * wasm/WasmLLIntTierUpCounter.h: (JSC::Wasm::LLIntTierUpCounter::LLIntTierUpCounter): * wasm/WasmSlowPaths.cpp: (JSC::LLInt::WASM_SLOW_PATH_DECL): (JSC::LLInt::slow_path_wasm_throw_exception): (JSC::LLInt::slow_path_wasm_popcount): (JSC::LLInt::slow_path_wasm_popcountll): * wasm/WasmSlowPaths.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@290768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, iBooks, and many other applications.
Visit WebKit Feature Status page to see which Web API has been implemented, in development, or under consideration.
On macOS, download Safari Technology Preview to test the latest version of WebKit. On Linux, download Epiphany Technology Preview. On Windows, you'll have to build it yourself.
Once your bug is filed, you will receive email when it is updated at each stage in the bug life cycle. After the bug is considered fixed, you may be asked to download the latest nightly and confirm that the fix works for you.
On Windows, follow the instructions on our website.
Run the following command to clone WebKit's Git SVN repository:
git clone git@github.com:WebKit/WebKit.git WebKit
or
git clone https://github.com/WebKit/WebKit.git WebKit
If you want to be able to track Subversion revision from your git checkout, you can run the following command to do so:
Tools/Scripts/git-webkit setup-git-svn
For information about this, and other aspects of using Git with WebKit, read the wiki page.
If you don‘t want to use Git, run the following command to check out WebKit’s Subversion repository:
svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
Install Xcode and its command line tools if you haven't done so already:
xcode-select --install
Run the following command to build a debug build with debugging symbols and assertions:
Tools/Scripts/build-webkit --debug
For performance testing, and other purposes, use --release
instead.
You can open WebKit.xcworkspace
to build and debug WebKit within Xcode.
If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use WebKitBuild
directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select “Custom”, “Relative to Workspace”, and enter WebKitBuild
for both Products and Intermediates.
iOS, tvOS and watchOS are all considered embedded builds. The first time after you install a new Xcode, you will need to run:
sudo Tools/Scripts/configure-xcode-for-embedded-development
Without this step, you will see the error message: “target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform.
” when building target JSCLLIntOffsetsExtractor
of project JavaScriptCore
.
Run the following command to build a debug build with debugging symbols and assertions for embedded simulators:
Tools/Scripts/build-webkit --debug --<platform>-simulator
or embedded devices:
Tools/Scripts/build-webkit --debug --<platform>-device
where platform
is ios
, tvos
or watchos
.
For production builds:
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/gtk/install-dependencies Tools/Scripts/update-webkitgtk-libs Tools/Scripts/build-webkit --gtk --debug
For more information on building WebKitGTK+, see the wiki page.
For production builds:
cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/wpe/install-dependencies Tools/Scripts/update-webkitwpe-libs Tools/Scripts/build-webkit --wpe --debug
For building WebKit on Windows, see the wiki page.
Run the following command to launch Safari with your local build of WebKit:
Tools/Scripts/run-safari --debug
The run-safari
script sets the DYLD_FRAMEWORK_PATH
environment variable to point to your build products, and then launches /Applications/Safari.app
. DYLD_FRAMEWORK_PATH
tells the system loader to prefer your build products over the frameworks installed in /System/Library/Frameworks
.
To run other applications with your local build of WebKit, run the following command:
Tools/Scripts/run-webkit-app <application-path>
Run the following command to launch iOS simulator with your local build of WebKit:
run-safari --debug --ios-simulator
In both cases, if you have built release builds instead, use --release
instead of --debug
.
If you have a development build, you can use the run-minibrowser script, e.g.:
run-minibrowser --debug --wpe
Pass one of --gtk
, --jsc-only
, or --wpe
to indicate the port to use.
Congratulations! You’re up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read Contributing Code.