Ignore:
Timestamp:
Mar 28, 2011, 10:14:57 AM (14 years ago)
Author:
[email protected]
Message:

2011-03-27 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Add additional immediate types to allow us to distinguish the source of a JIT immediate
https://bugs.webkit.org/show_bug.cgi?id=57190

Allow us to distinguish whether a JIT immediate is a value that we
control (TrustedImm32 and TrustedImmPtr) vs. ones that can be controlled
or influenced by code we are compiling. Currently we do nothing with this
information -- this change is large and mechanical but would obscure any
logic changes that we would have made.

  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr): (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr): (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32): (JSC::AbstractMacroAssembler::Imm32::Imm32):
  • assembler/MacroAssembler.h: (JSC::MacroAssembler::pop): (JSC::MacroAssembler::poke): (JSC::MacroAssembler::branchPtr): (JSC::MacroAssembler::branch32): (JSC::MacroAssembler::addPtr): (JSC::MacroAssembler::andPtr): (JSC::MacroAssembler::orPtr): (JSC::MacroAssembler::subPtr): (JSC::MacroAssembler::xorPtr): (JSC::MacroAssembler::setPtr): (JSC::MacroAssembler::storePtr): (JSC::MacroAssembler::branchTestPtr): (JSC::MacroAssembler::branchSubPtr): (JSC::MacroAssembler::branchTest8):
  • assembler/MacroAssemblerARM.h: (JSC::MacroAssemblerARM::add32): (JSC::MacroAssemblerARM::and32): (JSC::MacroAssemblerARM::lshift32): (JSC::MacroAssemblerARM::mul32): (JSC::MacroAssemblerARM::or32): (JSC::MacroAssemblerARM::rshift32): (JSC::MacroAssemblerARM::urshift32): (JSC::MacroAssemblerARM::sub32): (JSC::MacroAssemblerARM::xor32): (JSC::MacroAssemblerARM::store32): (JSC::MacroAssemblerARM::push): (JSC::MacroAssemblerARM::move): (JSC::MacroAssemblerARM::branch8): (JSC::MacroAssemblerARM::branch32): (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords): (JSC::MacroAssemblerARM::branch16): (JSC::MacroAssemblerARM::branchTest8): (JSC::MacroAssemblerARM::branchTest32): (JSC::MacroAssemblerARM::branchAdd32): (JSC::MacroAssemblerARM::branchMul32): (JSC::MacroAssemblerARM::branchSub32): (JSC::MacroAssemblerARM::set32Compare32): (JSC::MacroAssemblerARM::set8Compare32): (JSC::MacroAssemblerARM::set32Test32): (JSC::MacroAssemblerARM::set32Test8): (JSC::MacroAssemblerARM::moveWithPatch): (JSC::MacroAssemblerARM::branchPtrWithPatch): (JSC::MacroAssemblerARM::storePtrWithPatch):
  • assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::add32): (JSC::MacroAssemblerARMv7::and32): (JSC::MacroAssemblerARMv7::lshift32): (JSC::MacroAssemblerARMv7::mul32): (JSC::MacroAssemblerARMv7::or32): (JSC::MacroAssemblerARMv7::rshift32): (JSC::MacroAssemblerARMv7::urshift32): (JSC::MacroAssemblerARMv7::sub32): (JSC::MacroAssemblerARMv7::xor32): (JSC::MacroAssemblerARMv7::load32): (JSC::MacroAssemblerARMv7::load32WithAddressOffsetPatch): (JSC::MacroAssemblerARMv7::load16): (JSC::MacroAssemblerARMv7::store32WithAddressOffsetPatch): (JSC::MacroAssemblerARMv7::store32): (JSC::MacroAssemblerARMv7::loadDouble): (JSC::MacroAssemblerARMv7::storeDouble): (JSC::MacroAssemblerARMv7::push): (JSC::MacroAssemblerARMv7::move): (JSC::MacroAssemblerARMv7::compare32): (JSC::MacroAssemblerARMv7::test32): (JSC::MacroAssemblerARMv7::branch32): (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords): (JSC::MacroAssemblerARMv7::branch16): (JSC::MacroAssemblerARMv7::branch8): (JSC::MacroAssemblerARMv7::branchTest32): (JSC::MacroAssemblerARMv7::branchTest8): (JSC::MacroAssemblerARMv7::branchAdd32): (JSC::MacroAssemblerARMv7::branchMul32): (JSC::MacroAssemblerARMv7::branchSub32): (JSC::MacroAssemblerARMv7::nearCall): (JSC::MacroAssemblerARMv7::call): (JSC::MacroAssemblerARMv7::set32Compare32): (JSC::MacroAssemblerARMv7::set8Compare32): (JSC::MacroAssemblerARMv7::set32Test32): (JSC::MacroAssemblerARMv7::set32Test8): (JSC::MacroAssemblerARMv7::moveWithPatch): (JSC::MacroAssemblerARMv7::branchPtrWithPatch): (JSC::MacroAssemblerARMv7::storePtrWithPatch): (JSC::MacroAssemblerARMv7::tailRecursiveCall): (JSC::MacroAssemblerARMv7::makeJump): (JSC::MacroAssemblerARMv7::makeBranch): (JSC::MacroAssemblerARMv7::setupArmAddress): (JSC::MacroAssemblerARMv7::makeBaseIndexBase): (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
  • assembler/MacroAssemblerMIPS.h: (JSC::MacroAssemblerMIPS::add32): (JSC::MacroAssemblerMIPS::and32): (JSC::MacroAssemblerMIPS::lshift32): (JSC::MacroAssemblerMIPS::mul32): (JSC::MacroAssemblerMIPS::or32): (JSC::MacroAssemblerMIPS::rshift32): (JSC::MacroAssemblerMIPS::urshift32): (JSC::MacroAssemblerMIPS::sub32): (JSC::MacroAssemblerMIPS::xor32): (JSC::MacroAssemblerMIPS::load32): (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch): (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch): (JSC::MacroAssemblerMIPS::store32): (JSC::MacroAssemblerMIPS::push): (JSC::MacroAssemblerMIPS::move): (JSC::MacroAssemblerMIPS::branch8): (JSC::MacroAssemblerMIPS::branch32): (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords): (JSC::MacroAssemblerMIPS::branch16): (JSC::MacroAssemblerMIPS::branchTest32): (JSC::MacroAssemblerMIPS::branchTest8): (JSC::MacroAssemblerMIPS::branchAdd32): (JSC::MacroAssemblerMIPS::branchMul32): (JSC::MacroAssemblerMIPS::branchSub32): (JSC::MacroAssemblerMIPS::set8Compare32): (JSC::MacroAssemblerMIPS::set32Compare32): (JSC::MacroAssemblerMIPS::set32Test8): (JSC::MacroAssemblerMIPS::set32Test32): (JSC::MacroAssemblerMIPS::moveWithPatch): (JSC::MacroAssemblerMIPS::branchPtrWithPatch): (JSC::MacroAssemblerMIPS::storePtrWithPatch): (JSC::MacroAssemblerMIPS::tailRecursiveCall): (JSC::MacroAssemblerMIPS::loadDouble): (JSC::MacroAssemblerMIPS::storeDouble): (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
  • assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::add32): (JSC::MacroAssemblerX86::addWithCarry32): (JSC::MacroAssemblerX86::and32): (JSC::MacroAssemblerX86::or32): (JSC::MacroAssemblerX86::sub32): (JSC::MacroAssemblerX86::store32): (JSC::MacroAssemblerX86::branch32): (JSC::MacroAssemblerX86::moveWithPatch): (JSC::MacroAssemblerX86::branchPtrWithPatch): (JSC::MacroAssemblerX86::storePtrWithPatch):
  • assembler/MacroAssemblerX86Common.h: (JSC::MacroAssemblerX86Common::add32): (JSC::MacroAssemblerX86Common::and32): (JSC::MacroAssemblerX86Common::lshift32): (JSC::MacroAssemblerX86Common::mul32): (JSC::MacroAssemblerX86Common::or32): (JSC::MacroAssemblerX86Common::rshift32): (JSC::MacroAssemblerX86Common::urshift32): (JSC::MacroAssemblerX86Common::sub32): (JSC::MacroAssemblerX86Common::xor32): (JSC::MacroAssemblerX86Common::store32): (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): (JSC::MacroAssemblerX86Common::push): (JSC::MacroAssemblerX86Common::move): (JSC::MacroAssemblerX86Common::branch8): (JSC::MacroAssemblerX86Common::branch32): (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords): (JSC::MacroAssemblerX86Common::branch16): (JSC::MacroAssemblerX86Common::branchTest32): (JSC::MacroAssemblerX86Common::branchTest8): (JSC::MacroAssemblerX86Common::branchAdd32): (JSC::MacroAssemblerX86Common::branchMul32): (JSC::MacroAssemblerX86Common::branchSub32): (JSC::MacroAssemblerX86Common::set8Compare32): (JSC::MacroAssemblerX86Common::set32Compare32): (JSC::MacroAssemblerX86Common::set32Test8): (JSC::MacroAssemblerX86Common::set32Test32):
  • assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::add32): (JSC::MacroAssemblerX86_64::and32): (JSC::MacroAssemblerX86_64::or32): (JSC::MacroAssemblerX86_64::sub32): (JSC::MacroAssemblerX86_64::loadDouble): (JSC::MacroAssemblerX86_64::addDouble): (JSC::MacroAssemblerX86_64::convertInt32ToDouble): (JSC::MacroAssemblerX86_64::store32): (JSC::MacroAssemblerX86_64::call): (JSC::MacroAssemblerX86_64::tailRecursiveCall): (JSC::MacroAssemblerX86_64::makeTailRecursiveCall): (JSC::MacroAssemblerX86_64::addPtr): (JSC::MacroAssemblerX86_64::andPtr): (JSC::MacroAssemblerX86_64::orPtr): (JSC::MacroAssemblerX86_64::subPtr): (JSC::MacroAssemblerX86_64::xorPtr): (JSC::MacroAssemblerX86_64::storePtr): (JSC::MacroAssemblerX86_64::setPtr): (JSC::MacroAssemblerX86_64::branchPtr): (JSC::MacroAssemblerX86_64::branchTestPtr): (JSC::MacroAssemblerX86_64::branchSubPtr): (JSC::MacroAssemblerX86_64::moveWithPatch): (JSC::MacroAssemblerX86_64::branchPtrWithPatch): (JSC::MacroAssemblerX86_64::storePtrWithPatch): (JSC::MacroAssemblerX86_64::branchTest8):
  • dfg/DFGJITCodeGenerator.h: (JSC::DFG::JITCodeGenerator::callOperation):
  • dfg/DFGJITCompiler.cpp: (JSC::DFG::JITCompiler::jitAssertIsInt32): (JSC::DFG::JITCompiler::emitCount):
  • dfg/DFGJITCompiler.h: (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
  • dfg/DFGNonSpeculativeJIT.cpp: (JSC::DFG::NonSpeculativeJIT::compile):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::fillSpeculateCell): (JSC::DFG::SpeculativeJIT::compile):
  • jit/JIT.cpp: (JSC::JIT::emitTimeoutCheck): (JSC::JIT::privateCompile):
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::emit_op_urshift): (JSC::JIT::emitSlow_op_urshift): (JSC::JIT::emit_op_post_inc): (JSC::JIT::emit_op_post_dec): (JSC::JIT::emit_op_pre_inc): (JSC::JIT::emit_op_pre_dec): (JSC::JIT::emit_op_mod):
  • jit/JITArithmetic32_64.cpp: (JSC::JIT::emit_op_negate): (JSC::JIT::emit_op_jnless): (JSC::JIT::emit_op_jless): (JSC::JIT::emit_op_jlesseq): (JSC::JIT::emit_op_lshift): (JSC::JIT::emitRightShift): (JSC::JIT::emitRightShiftSlowCase): (JSC::JIT::emit_op_bitand): (JSC::JIT::emit_op_bitor): (JSC::JIT::emit_op_bitxor): (JSC::JIT::emit_op_bitnot): (JSC::JIT::emit_op_post_inc): (JSC::JIT::emit_op_post_dec): (JSC::JIT::emitSlow_op_post_dec): (JSC::JIT::emit_op_pre_inc): (JSC::JIT::emit_op_pre_dec): (JSC::JIT::emit_op_add): (JSC::JIT::emitAdd32Constant): (JSC::JIT::emit_op_sub): (JSC::JIT::emitSub32Constant): (JSC::JIT::emitBinaryDoubleOp): (JSC::JIT::emit_op_mul): (JSC::JIT::emitSlow_op_mul): (JSC::JIT::emit_op_div): (JSC::JIT::emit_op_mod):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallVarargs): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITCall32_64.cpp: (JSC::JIT::compileOpCallVarargs): (JSC::JIT::emit_op_ret_object_or_this): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITInlineMethods.h: (JSC::JIT::emitPutCellToCallFrameHeader): (JSC::JIT::emitPutIntToCallFrameHeader): (JSC::JIT::emitPutImmediateToCallFrameHeader): (JSC::JIT::emitLoadCharacterString): (JSC::JIT::restoreArgumentReferenceForTrampoline): (JSC::JIT::checkStructure): (JSC::JIT::setSamplingFlag): (JSC::JIT::clearSamplingFlag): (JSC::JIT::emitCount): (JSC::JIT::sampleInstruction): (JSC::JIT::sampleCodeBlock): (JSC::JIT::emitStoreInt32): (JSC::JIT::emitStoreCell): (JSC::JIT::emitStoreBool): (JSC::JIT::emitJumpSlowCaseIfNotJSCell): (JSC::JIT::emitInitRegister): (JSC::JIT::emitJumpIfJSCell): (JSC::JIT::emitJumpIfNotJSCell): (JSC::JIT::emitJumpIfImmediateInteger): (JSC::JIT::emitJumpIfNotImmediateInteger): (JSC::JIT::emitFastArithDeTagImmediate): (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): (JSC::JIT::emitFastArithReTagImmediate): (JSC::JIT::emitTagAsBoolImmediate):
  • jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): (JSC::JIT::privateCompileCTINativeCall): (JSC::JIT::emit_op_check_has_instance): (JSC::JIT::emit_op_instanceof): (JSC::JIT::emit_op_ret_object_or_this): (JSC::JIT::emit_op_resolve): (JSC::JIT::emit_op_to_primitive): (JSC::JIT::emit_op_resolve_base): (JSC::JIT::emit_op_ensure_property_exists): (JSC::JIT::emit_op_resolve_skip): (JSC::JIT::emit_op_resolve_global): (JSC::JIT::emitSlow_op_resolve_global): (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_jneq_ptr): (JSC::JIT::emit_op_jsr): (JSC::JIT::emit_op_resolve_with_base): (JSC::JIT::emit_op_new_func_exp): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_get_pnames): (JSC::JIT::emit_op_next_pname): (JSC::JIT::emit_op_to_jsnumber): (JSC::JIT::emit_op_push_new_scope): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_init_lazy_reg): (JSC::JIT::emit_op_convert_this): (JSC::JIT::emit_op_convert_this_strict): (JSC::JIT::emitSlow_op_not): (JSC::JIT::emitSlow_op_neq): (JSC::JIT::emit_op_get_arguments_length): (JSC::JIT::emitSlow_op_get_arguments_length): (JSC::JIT::emit_op_get_argument_by_val): (JSC::JIT::emitSlow_op_resolve_global_dynamic): (JSC::JIT::emit_op_new_regexp): (JSC::JIT::emit_op_load_varargs): (JSC::JIT::emitSlow_op_load_varargs): (JSC::JIT::emit_op_new_func):
  • jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): (JSC::JIT::privateCompileCTINativeCall): (JSC::JIT::emit_op_loop_if_lesseq): (JSC::JIT::emit_op_check_has_instance): (JSC::JIT::emit_op_instanceof): (JSC::JIT::emit_op_get_scoped_var): (JSC::JIT::emit_op_put_scoped_var): (JSC::JIT::emit_op_tear_off_activation): (JSC::JIT::emit_op_tear_off_arguments): (JSC::JIT::emit_op_resolve): (JSC::JIT::emit_op_to_primitive): (JSC::JIT::emit_op_resolve_base): (JSC::JIT::emit_op_ensure_property_exists): (JSC::JIT::emit_op_resolve_skip): (JSC::JIT::emit_op_resolve_global): (JSC::JIT::emitSlow_op_resolve_global): (JSC::JIT::emit_op_not): (JSC::JIT::emit_op_jfalse): (JSC::JIT::emit_op_jtrue): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_jneq_ptr): (JSC::JIT::emit_op_jsr): (JSC::JIT::emit_op_eq): (JSC::JIT::emitSlow_op_eq): (JSC::JIT::emit_op_neq): (JSC::JIT::emitSlow_op_neq): (JSC::JIT::compileOpStrictEq): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_resolve_with_base): (JSC::JIT::emit_op_new_func_exp): (JSC::JIT::emit_op_get_pnames): (JSC::JIT::emit_op_next_pname): (JSC::JIT::emit_op_to_jsnumber): (JSC::JIT::emit_op_push_new_scope): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_create_activation): (JSC::JIT::emit_op_create_arguments): (JSC::JIT::emit_op_convert_this): (JSC::JIT::emit_op_convert_this_strict): (JSC::JIT::emit_op_get_arguments_length): (JSC::JIT::emitSlow_op_get_arguments_length): (JSC::JIT::emit_op_get_argument_by_val): (JSC::JIT::softModulo):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::stringGetByValStubGenerator): (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emitSlow_op_get_by_val): (JSC::JIT::emit_op_get_by_pname): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emit_op_put_by_index): (JSC::JIT::emit_op_put_getter): (JSC::JIT::emit_op_put_setter): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emit_op_method_check): (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compileGetByIdSlowCase): (JSC::JIT::emitSlow_op_put_by_id): (JSC::JIT::testPrototype): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain):
  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_put_getter): (JSC::JIT::emit_op_put_setter): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emit_op_method_check): (JSC::JIT::stringGetByValStubGenerator): (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emitSlow_op_get_by_val): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compileGetByIdSlowCase): (JSC::JIT::emitSlow_op_put_by_id): (JSC::JIT::testPrototype): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain): (JSC::JIT::emit_op_get_by_pname):
  • jit/JITStubCall.h: (JSC::JITStubCall::addArgument):
  • jit/JITStubs.cpp: (JSC::getPolymorphicAccessStructureListSlot): (JSC::DEFINE_STUB_FUNCTION):
  • jit/JSInterfaceJIT.h: (JSC::JSInterfaceJIT::emitJumpIfNotJSCell): (JSC::JSInterfaceJIT::emitLoadInt32): (JSC::JSInterfaceJIT::emitLoadDouble):
  • jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::SpecializedThunkJIT): (JSC::SpecializedThunkJIT::loadJSStringArgument): (JSC::SpecializedThunkJIT::tagReturnAsInt32): (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
  • jit/ThunkGenerators.cpp: (JSC::charToString): (JSC::powThunkGenerator):
  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::matchCharacterClass): (JSC::Yarr::YarrGenerator::storeToFrame): (JSC::Yarr::YarrGenerator::storeToFrameWithPatch): (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode): (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle): (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed): (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy): (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy): (JSC::Yarr::YarrGenerator::generateCharacterClassFixed): (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): (JSC::Yarr::YarrGenerator::generateParenthesesSingle): (JSC::Yarr::YarrGenerator::generateDisjunction):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r80969 r82130  
    5555    JSInterfaceJIT jit;
    5656    JumpList failures;
    57     failures.append(jit.branchPtr(NotEqual, Address(regT0), ImmPtr(globalData->jsStringVPtr)));
     57    failures.append(jit.branchPtr(NotEqual, Address(regT0), TrustedImmPtr(globalData->jsStringVPtr)));
    5858    failures.append(jit.branchTest32(NonZero, Address(regT0, OBJECT_OFFSETOF(JSString, m_fiberCount))));
    5959
     
    6969    jit.load16(BaseIndex(regT0, regT1, TimesTwo, 0), regT0);
    7070   
    71     failures.append(jit.branch32(AboveOrEqual, regT0, Imm32(0x100)));
    72     jit.move(ImmPtr(globalData->smallStrings.singleCharacterStrings()), regT1);
     71    failures.append(jit.branch32(AboveOrEqual, regT0, TrustedImm32(0x100)));
     72    jit.move(TrustedImmPtr(globalData->smallStrings.singleCharacterStrings()), regT1);
    7373    jit.loadPtr(BaseIndex(regT1, regT0, ScalePtr, 0), regT0);
    7474    jit.ret();
    7575   
    7676    failures.link(&jit);
    77     jit.move(Imm32(0), regT0);
     77    jit.move(TrustedImm32(0), regT0);
    7878    jit.ret();
    7979   
     
    100100
    101101    emitJumpSlowCaseIfNotJSCell(regT0, base);
    102     addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr)));
     102    addSlowCase(branchPtr(NotEqual, Address(regT0), TrustedImmPtr(m_globalData->jsArrayVPtr)));
    103103
    104104    loadPtr(Address(regT0, JSArray::storageOffset()), regT2);
     
    121121    Jump nonCell = jump();
    122122    linkSlowCase(iter); // base array check
    123     Jump notString = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsStringVPtr));
     123    Jump notString = branchPtr(NotEqual, Address(regT0), TrustedImmPtr(m_globalData->jsStringVPtr));
    124124    emitNakedCall(m_globalData->getCTIStub(stringGetByValStubGenerator));
    125125    Jump failed = branchTestPtr(Zero, regT0);
     
    163163    addSlowCase(branchPtr(NotEqual, regT2, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure))));
    164164    load32(addressFor(i), regT3);
    165     sub32(Imm32(1), regT3);
     165    sub32(TrustedImm32(1), regT3);
    166166    addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots))));
    167167    compileGetDirectOffset(regT0, regT0, regT3, regT1);
     
    198198    zeroExtend32ToPtr(regT1, regT1);
    199199    emitJumpSlowCaseIfNotJSCell(regT0, base);
    200     addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr)));
     200    addSlowCase(branchPtr(NotEqual, Address(regT0), TrustedImmPtr(m_globalData->jsArrayVPtr)));
    201201    addSlowCase(branch32(AboveOrEqual, regT1, Address(regT0, JSArray::vectorLengthOffset())));
    202202
     
    210210   
    211211    empty.link(this);
    212     add32(Imm32(1), Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_numValuesInVector)));
     212    add32(TrustedImm32(1), Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_numValuesInVector)));
    213213    branch32(Below, regT1, Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_length))).linkTo(storeResult, this);
    214214
    215215    move(regT1, regT0);
    216     add32(Imm32(1), regT0);
     216    add32(TrustedImm32(1), regT0);
    217217    store32(regT0, Address(regT2, OBJECT_OFFSETOF(ArrayStorage, m_length)));
    218218    jump().linkTo(storeResult, this);
     
    225225    JITStubCall stubCall(this, cti_op_put_by_index);
    226226    stubCall.addArgument(currentInstruction[1].u.operand, regT2);
    227     stubCall.addArgument(Imm32(currentInstruction[2].u.operand));
     227    stubCall.addArgument(TrustedImm32(currentInstruction[2].u.operand));
    228228    stubCall.addArgument(currentInstruction[3].u.operand, regT2);
    229229    stubCall.call();
     
    234234    JITStubCall stubCall(this, cti_op_put_getter);
    235235    stubCall.addArgument(currentInstruction[1].u.operand, regT2);
    236     stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(currentInstruction[2].u.operand)));
     236    stubCall.addArgument(TrustedImmPtr(&m_codeBlock->identifier(currentInstruction[2].u.operand)));
    237237    stubCall.addArgument(currentInstruction[3].u.operand, regT2);
    238238    stubCall.call();
     
    243243    JITStubCall stubCall(this, cti_op_put_setter);
    244244    stubCall.addArgument(currentInstruction[1].u.operand, regT2);
    245     stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(currentInstruction[2].u.operand)));
     245    stubCall.addArgument(TrustedImmPtr(&m_codeBlock->identifier(currentInstruction[2].u.operand)));
    246246    stubCall.addArgument(currentInstruction[3].u.operand, regT2);
    247247    stubCall.call();
     
    252252    JITStubCall stubCall(this, cti_op_del_by_id);
    253253    stubCall.addArgument(currentInstruction[2].u.operand, regT2);
    254     stubCall.addArgument(ImmPtr(&m_codeBlock->identifier(currentInstruction[3].u.operand)));
     254    stubCall.addArgument(TrustedImmPtr(&m_codeBlock->identifier(currentInstruction[3].u.operand)));
    255255    stubCall.call(currentInstruction[1].u.operand);
    256256}
     
    277277    JITStubCall stubCall(this, cti_op_get_by_id_generic);
    278278    stubCall.addArgument(regT0);
    279     stubCall.addArgument(ImmPtr(ident));
     279    stubCall.addArgument(TrustedImmPtr(ident));
    280280    stubCall.call(resultVReg);
    281281
     
    299299    JITStubCall stubCall(this, direct ? cti_op_put_by_id_direct_generic, cti_op_put_by_id_generic);
    300300    stubCall.addArgument(regT0);
    301     stubCall.addArgument(ImmPtr(ident));
     301    stubCall.addArgument(TrustedImmPtr(ident));
    302302    stubCall.addArgument(regT1);
    303303    stubCall.call();
     
    337337    BEGIN_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck);
    338338
    339     Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), info.structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
    340     DataLabelPtr protoStructureToCompare, protoObj = moveWithPatch(ImmPtr(0), regT1);
    341     Jump protoStructureCheck = branchPtrWithPatch(NotEqual, Address(regT1, JSCell::structureOffset()), protoStructureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
     339    Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), info.structureToCompare, TrustedImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
     340    DataLabelPtr protoStructureToCompare, protoObj = moveWithPatch(TrustedImmPtr(0), regT1);
     341    Jump protoStructureCheck = branchPtrWithPatch(NotEqual, Address(regT1, JSCell::structureOffset()), protoStructureToCompare, TrustedImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
    342342
    343343    // This will be relinked to load the function without doing a load.
    344     DataLabelPtr putFunction = moveWithPatch(ImmPtr(0), regT0);
     344    DataLabelPtr putFunction = moveWithPatch(TrustedImmPtr(0), regT0);
    345345
    346346    END_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck);
     
    415415
    416416    DataLabelPtr structureToCompare;
    417     Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
     417    Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, TrustedImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
    418418    addSlowCase(structureCheck);
    419419    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure);
     
    458458    JITStubCall stubCall(this, isMethodCheck ? cti_op_get_by_id_method_check : cti_op_get_by_id);
    459459    stubCall.addArgument(regT0);
    460     stubCall.addArgument(ImmPtr(ident));
     460    stubCall.addArgument(TrustedImmPtr(ident));
    461461    Call call = stubCall.call(resultVReg);
    462462
     
    493493    // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over.
    494494    DataLabelPtr structureToCompare;
    495     addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
     495    addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, TrustedImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
    496496    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure);
    497497
     
    517517    JITStubCall stubCall(this, direct ? cti_op_put_by_id_direct : cti_op_put_by_id);
    518518    stubCall.addArgument(regT0);
    519     stubCall.addArgument(ImmPtr(ident));
     519    stubCall.addArgument(TrustedImmPtr(ident));
    520520    stubCall.addArgument(regT1);
    521521    Call call = stubCall.call();
     
    565565    // two less instructions and doesn't require any scratch registers.
    566566#if CPU(X86_64)
    567     move(ImmPtr(prototype.asCell()->structure()), regT3);
     567    move(TrustedImmPtr(prototype.asCell()->structure()), regT3);
    568568    failureCases.append(branchPtr(NotEqual, AbsoluteAddress(prototype.asCell()->addressOfStructure()), regT3));
    569569#else
    570     failureCases.append(branchPtr(NotEqual, AbsoluteAddress(prototype.asCell()->addressOfStructure()), ImmPtr(prototype.asCell()->structure())));
     570    failureCases.append(branchPtr(NotEqual, AbsoluteAddress(prototype.asCell()->addressOfStructure()), TrustedImmPtr(prototype.asCell()->structure())));
    571571#endif
    572572}
     
    577577    // Check eax is an object of the right Structure.
    578578    failureCases.append(emitJumpIfNotJSCell(regT0));
    579     failureCases.append(branchPtr(NotEqual, Address(regT0, JSCell::structureOffset()), ImmPtr(oldStructure)));
     579    failureCases.append(branchPtr(NotEqual, Address(regT0, JSCell::structureOffset()), TrustedImmPtr(oldStructure)));
    580580    testPrototype(oldStructure->storedPrototype(), failureCases);
    581581
     
    599599        stubCall.skipArgument(); // ident
    600600        stubCall.skipArgument(); // value
    601         stubCall.addArgument(Imm32(oldStructure->propertyStorageCapacity()));
    602         stubCall.addArgument(Imm32(newStructure->propertyStorageCapacity()));
     601        stubCall.addArgument(TrustedImm32(oldStructure->propertyStorageCapacity()));
     602        stubCall.addArgument(TrustedImm32(newStructure->propertyStorageCapacity()));
    603603        stubCall.call(regT0);
    604604        emitGetJITStubArg(2, regT1);
     
    609609    // Assumes m_refCount can be decremented easily, refcount decrement is safe as
    610610    // codeblock should ensure oldStructure->m_refCount > 0
    611     sub32(Imm32(1), AbsoluteAddress(oldStructure->addressOfCount()));
    612     add32(Imm32(1), AbsoluteAddress(newStructure->addressOfCount()));
    613     storePtr(ImmPtr(newStructure), Address(regT0, JSCell::structureOffset()));
     611    sub32(TrustedImm32(1), AbsoluteAddress(oldStructure->addressOfCount()));
     612    add32(TrustedImm32(1), AbsoluteAddress(newStructure->addressOfCount()));
     613    storePtr(TrustedImmPtr(newStructure), Address(regT0, JSCell::structureOffset()));
    614614
    615615    // write the value
     
    693693
    694694    // Check eax is an array
    695     Jump failureCases1 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr));
     695    Jump failureCases1 = branchPtr(NotEqual, Address(regT0), TrustedImmPtr(m_globalData->jsArrayVPtr));
    696696
    697697    // Checks out okay! - get the length from the storage
    698698    loadPtr(Address(regT0, JSArray::storageOffset()), regT3);
    699699    load32(Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length)), regT2);
    700     Jump failureCases2 = branch32(Above, regT2, Imm32(JSImmediate::maxImmediateInt));
     700    Jump failureCases2 = branch32(Above, regT2, TrustedImm32(JSImmediate::maxImmediateInt));
    701701
    702702    emitFastArithIntToImmNoCheck(regT2, regT0);
     
    738738    Structure* const * prototypeStructureAddress = protoObject->addressOfStructure();
    739739#if CPU(X86_64)
    740     move(ImmPtr(prototypeStructure), regT3);
     740    move(TrustedImmPtr(prototypeStructure), regT3);
    741741    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
    742742#else
    743     Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
     743    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), TrustedImmPtr(prototypeStructure));
    744744#endif
    745745
     
    753753        stubCall.addArgument(regT1);
    754754        stubCall.addArgument(regT0);
    755         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     755        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    756756        stubCall.call();
    757757    } else if (slot.cachedPropertyType() == PropertySlot::Custom) {
    758758        needsStubLink = true;
    759759        JITStubCall stubCall(this, cti_op_get_by_id_custom_stub);
    760         stubCall.addArgument(ImmPtr(protoObject));
    761         stubCall.addArgument(ImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
    762         stubCall.addArgument(ImmPtr(const_cast<Identifier*>(&ident)));
    763         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     760        stubCall.addArgument(TrustedImmPtr(protoObject));
     761        stubCall.addArgument(TrustedImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
     762        stubCall.addArgument(TrustedImmPtr(const_cast<Identifier*>(&ident)));
     763        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    764764        stubCall.call();
    765765    } else
     
    805805        stubCall.addArgument(regT1);
    806806        stubCall.addArgument(regT0);
    807         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     807        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    808808        stubCall.call();
    809809    } else if (slot.cachedPropertyType() == PropertySlot::Custom) {
     
    811811        JITStubCall stubCall(this, cti_op_get_by_id_custom_stub);
    812812        stubCall.addArgument(regT0);
    813         stubCall.addArgument(ImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
    814         stubCall.addArgument(ImmPtr(const_cast<Identifier*>(&ident)));
    815         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     813        stubCall.addArgument(TrustedImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
     814        stubCall.addArgument(TrustedImmPtr(const_cast<Identifier*>(&ident)));
     815        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    816816        stubCall.call();
    817817    } else
     
    861861    Structure* const * prototypeStructureAddress = protoObject->addressOfStructure();
    862862#if CPU(X86_64)
    863     move(ImmPtr(prototypeStructure), regT3);
     863    move(TrustedImmPtr(prototypeStructure), regT3);
    864864    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
    865865#else
    866     Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
     866    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), TrustedImmPtr(prototypeStructure));
    867867#endif
    868868
     
    875875        stubCall.addArgument(regT1);
    876876        stubCall.addArgument(regT0);
    877         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     877        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    878878        stubCall.call();
    879879    } else if (slot.cachedPropertyType() == PropertySlot::Custom) {
    880880        needsStubLink = true;
    881881        JITStubCall stubCall(this, cti_op_get_by_id_custom_stub);
    882         stubCall.addArgument(ImmPtr(protoObject));
    883         stubCall.addArgument(ImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
    884         stubCall.addArgument(ImmPtr(const_cast<Identifier*>(&ident)));
    885         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     882        stubCall.addArgument(TrustedImmPtr(protoObject));
     883        stubCall.addArgument(TrustedImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
     884        stubCall.addArgument(TrustedImmPtr(const_cast<Identifier*>(&ident)));
     885        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    886886        stubCall.call();
    887887    } else
     
    945945        stubCall.addArgument(regT1);
    946946        stubCall.addArgument(regT0);
    947         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     947        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    948948        stubCall.call();
    949949    } else if (slot.cachedPropertyType() == PropertySlot::Custom) {
    950950        needsStubLink = true;
    951951        JITStubCall stubCall(this, cti_op_get_by_id_custom_stub);
    952         stubCall.addArgument(ImmPtr(protoObject));
    953         stubCall.addArgument(ImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
    954         stubCall.addArgument(ImmPtr(const_cast<Identifier*>(&ident)));
    955         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     952        stubCall.addArgument(TrustedImmPtr(protoObject));
     953        stubCall.addArgument(TrustedImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
     954        stubCall.addArgument(TrustedImmPtr(const_cast<Identifier*>(&ident)));
     955        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    956956        stubCall.call();
    957957    } else
     
    980980    // Track the stub we have created so that it will be deleted later.
    981981    structure->ref();
    982     chain->ref();
    983982    prototypeStructures->list[currentIndex].set(entryLabel, structure, chain);
    984983
     
    10151014        stubCall.addArgument(regT1);
    10161015        stubCall.addArgument(regT0);
    1017         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     1016        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    10181017        stubCall.call();
    10191018    } else if (slot.cachedPropertyType() == PropertySlot::Custom) {
    10201019        needsStubLink = true;
    10211020        JITStubCall stubCall(this, cti_op_get_by_id_custom_stub);
    1022         stubCall.addArgument(ImmPtr(protoObject));
    1023         stubCall.addArgument(ImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
    1024         stubCall.addArgument(ImmPtr(const_cast<Identifier*>(&ident)));
    1025         stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress()));
     1021        stubCall.addArgument(TrustedImmPtr(protoObject));
     1022        stubCall.addArgument(TrustedImmPtr(FunctionPtr(slot.customGetter()).executableAddress()));
     1023        stubCall.addArgument(TrustedImmPtr(const_cast<Identifier*>(&ident)));
     1024        stubCall.addArgument(TrustedImmPtr(stubInfo->callReturnLocation.executableAddress()));
    10261025        stubCall.call();
    10271026    } else
Note: See TracChangeset for help on using the changeset viewer.