Changeset 168776 in webkit
- Timestamp:
- May 13, 2014 8:57:18 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r168729 r168776 1 2014-05-13 Filip Pizlo <fpizlo@apple.com> 2 3 JIT breakpoints should be more informative 4 https://bugs.webkit.org/show_bug.cgi?id=132882 5 6 Reviewed by Oliver Hunt. 7 8 Introduce the notion of an AbortReason, which is a nice enumeration of coded assertion 9 failure names. This means that all you need to figure out why the JIT SIGTRAP'd is to look 10 at that platform's abort reason register (r11 on X86-64 for example). 11 12 * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: 13 * JavaScriptCore.xcodeproj/project.pbxproj: 14 * assembler/AbortReason.h: Added. 15 * assembler/AbstractMacroAssembler.h: 16 * assembler/MacroAssemblerARM64.h: 17 (JSC::MacroAssemblerARM64::abortWithReason): 18 * assembler/MacroAssemblerARMv7.h: 19 (JSC::MacroAssemblerARMv7::abortWithReason): 20 * assembler/MacroAssemblerX86.h: 21 (JSC::MacroAssemblerX86::abortWithReason): 22 * assembler/MacroAssemblerX86_64.h: 23 (JSC::MacroAssemblerX86_64::abortWithReason): 24 * dfg/DFGSlowPathGenerator.h: 25 (JSC::DFG::SlowPathGenerator::generate): 26 * dfg/DFGSpeculativeJIT.cpp: 27 (JSC::DFG::SpeculativeJIT::bail): 28 (JSC::DFG::SpeculativeJIT::compileCurrentBlock): 29 (JSC::DFG::SpeculativeJIT::compileMakeRope): 30 * dfg/DFGSpeculativeJIT.h: 31 (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage): 32 * dfg/DFGSpeculativeJIT32_64.cpp: 33 (JSC::DFG::SpeculativeJIT::compile): 34 * dfg/DFGSpeculativeJIT64.cpp: 35 (JSC::DFG::SpeculativeJIT::fillSpeculateCell): 36 (JSC::DFG::SpeculativeJIT::compile): 37 * dfg/DFGThunks.cpp: 38 (JSC::DFG::osrEntryThunkGenerator): 39 * jit/AssemblyHelpers.cpp: 40 (JSC::AssemblyHelpers::jitAssertIsInt32): 41 (JSC::AssemblyHelpers::jitAssertIsJSInt32): 42 (JSC::AssemblyHelpers::jitAssertIsJSNumber): 43 (JSC::AssemblyHelpers::jitAssertIsJSDouble): 44 (JSC::AssemblyHelpers::jitAssertIsCell): 45 (JSC::AssemblyHelpers::jitAssertTagsInPlace): 46 (JSC::AssemblyHelpers::jitAssertHasValidCallFrame): 47 (JSC::AssemblyHelpers::jitAssertIsNull): 48 (JSC::AssemblyHelpers::jitAssertArgumentCountSane): 49 (JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo): 50 * jit/AssemblyHelpers.h: 51 (JSC::AssemblyHelpers::checkStackPointerAlignment): 52 (JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo): Deleted. 53 * jit/JIT.h: 54 * jit/JITArithmetic.cpp: 55 (JSC::JIT::emitSlow_op_div): 56 * jit/JITOpcodes.cpp: 57 (JSC::JIT::emitSlow_op_loop_hint): 58 * jit/JITOpcodes32_64.cpp: 59 (JSC::JIT::privateCompileCTINativeCall): 60 * jit/JITPropertyAccess.cpp: 61 (JSC::JIT::emit_op_get_by_val): 62 (JSC::JIT::compileGetDirectOffset): 63 (JSC::JIT::addStructureTransitionCheck): Deleted. 64 (JSC::JIT::testPrototype): Deleted. 65 * jit/JITPropertyAccess32_64.cpp: 66 (JSC::JIT::emit_op_get_by_val): 67 (JSC::JIT::compileGetDirectOffset): 68 * jit/RegisterPreservationWrapperGenerator.cpp: 69 (JSC::generateRegisterRestoration): 70 * jit/Repatch.cpp: 71 (JSC::addStructureTransitionCheck): 72 (JSC::linkClosureCall): 73 * jit/ThunkGenerators.cpp: 74 (JSC::emitPointerValidation): 75 (JSC::nativeForGenerator): 76 * yarr/YarrJIT.cpp: 77 (JSC::Yarr::YarrGenerator::generate): 78 1 79 2014-05-13 peavo@outlook.com <peavo@outlook.com> 2 80 -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
r168178 r168776 819 819 <ClInclude Include="..\API\OpaqueJSString.h" /> 820 820 <ClInclude Include="..\API\WebKitAvailability.h" /> 821 <ClInclude Include="..\assembler\AbortReason.h" /> 821 822 <ClInclude Include="..\assembler\AbstractMacroAssembler.h" /> 822 823 <ClInclude Include="..\assembler\AssemblerBuffer.h" /> -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r168443 r168776 108 108 0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1E3A441534CBAD000F9456 /* DFGDoubleFormatState.h */; settings = {ATTRIBUTES = (Private, ); }; }; 109 109 0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1E3A65153A21DF000F9456 /* DFGSilentRegisterSavePlan.h */; settings = {ATTRIBUTES = (Private, ); }; }; 110 0F1FE51C1922A3BC006987C5 /* AbortReason.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1FE51B1922A3BC006987C5 /* AbortReason.h */; settings = {ATTRIBUTES = (Private, ); }; }; 110 111 0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F21C27914BE727300ADC64B /* CodeSpecializationKind.h */; settings = {ATTRIBUTES = (Private, ); }; }; 111 112 0F21C27F14BEAA8200ADC64B /* BytecodeConventions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F21C27E14BEAA8000ADC64B /* BytecodeConventions.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1915 1916 0F1E3A501537C2CB000F9456 /* DFGSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGSlowPathGenerator.h; path = dfg/DFGSlowPathGenerator.h; sourceTree = "<group>"; }; 1916 1917 0F1E3A65153A21DF000F9456 /* DFGSilentRegisterSavePlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGSilentRegisterSavePlan.h; path = dfg/DFGSilentRegisterSavePlan.h; sourceTree = "<group>"; }; 1918 0F1FE51B1922A3BC006987C5 /* AbortReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbortReason.h; sourceTree = "<group>"; }; 1917 1919 0F21C27914BE727300ADC64B /* CodeSpecializationKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeSpecializationKind.h; sourceTree = "<group>"; }; 1918 1920 0F21C27E14BEAA8000ADC64B /* BytecodeConventions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BytecodeConventions.h; sourceTree = "<group>"; }; … … 4897 4899 isa = PBXGroup; 4898 4900 children = ( 4901 0F1FE51B1922A3BC006987C5 /* AbortReason.h */, 4899 4902 860161DF0F3A83C100F84710 /* AbstractMacroAssembler.h */, 4900 4903 8640923B156EED3B00566CB2 /* ARM64Assembler.h */, … … 5826 5829 A532439418569709002ED692 /* generate-combined-inspector-json.py in Headers */, 5827 5830 0F2B66E017B6B5AB00A7AE3F /* GenericTypedArrayView.h in Headers */, 5831 0F1FE51C1922A3BC006987C5 /* AbortReason.h in Headers */, 5828 5832 0F2B66E117B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h in Headers */, 5829 5833 0F9332A014CA7DCD0085F3C6 /* GetByIdStatus.h in Headers */, -
trunk/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
r165842 r168776 1 1 /* 2 * Copyright (C) 2008, 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2012, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #define AbstractMacroAssembler_h 28 28 29 #include "AbortReason.h" 29 30 #include "AssemblerBuffer.h" 30 31 #include "CodeLocation.h" -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
r168729 r168776 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 807 807 } 808 808 809 void abortWithReason(AbortReason reason) 810 { 811 move(TrustedImm32(reason), dataTempRegister); 812 breakpoint(); 813 } 814 809 815 ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest) 810 816 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
r168729 r168776 1 1 /* 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2009, 2010, 2014 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2010 University of Szeged 4 4 * … … 633 633 } 634 634 635 void abortWithReason(AbortReason reason) 636 { 637 move(TrustedImm32(reason), dataTempRegister); 638 breakpoint(); 639 } 640 635 641 ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest) 636 642 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86.h
r168729 r168776 1 1 /* 2 * Copyright (C) 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 112 112 } 113 113 114 void abortWithReason(AbortReason reason) 115 { 116 move(TrustedImm32(reason), X86Registers::eax); 117 breakpoint(); 118 } 119 114 120 ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest) 115 121 { -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h
r165366 r168776 1 1 /* 2 * Copyright (C) 2008, 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2012, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 628 628 neg64(srcDest); 629 629 return Jump(m_assembler.jCC(x86Condition(cond))); 630 } 631 632 void abortWithReason(AbortReason reason) 633 { 634 move(TrustedImm32(reason), X86Registers::r11); 635 breakpoint(); 630 636 } 631 637 -
trunk/Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h
r164424 r168776 51 51 generateInternal(jit); 52 52 if (!ASSERT_DISABLED) 53 jit->m_jit. breakpoint(); // make sure that the generator jumps back to somewhere53 jit->m_jit.abortWithReason(DFGSlowPathGeneratorFellThrough); 54 54 } 55 55 MacroAssembler::Label label() const { return m_label; } -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r168729 r168776 1342 1342 { 1343 1343 m_compileOkay = true; 1344 m_jit. breakpoint();1344 m_jit.abortWithReason(DFGBailed); 1345 1345 clearGenerationInfo(); 1346 1346 } … … 1361 1361 // But to be sure that nobody has generated a jump to this block, drop in a 1362 1362 // breakpoint here. 1363 m_jit. breakpoint();1363 m_jit.abortWithReason(DFGUnreachableBasicBlock); 1364 1364 return; 1365 1365 } … … 2822 2822 JITCompiler::Jump ok = m_jit.branch32( 2823 2823 JITCompiler::GreaterThanOrEqual, allocatorGPR, TrustedImm32(0)); 2824 m_jit. breakpoint();2824 m_jit.abortWithReason(DFGNegativeStringLength); 2825 2825 ok.link(&m_jit); 2826 2826 } … … 2838 2838 JITCompiler::Jump ok = m_jit.branch32( 2839 2839 JITCompiler::GreaterThanOrEqual, allocatorGPR, TrustedImm32(0)); 2840 m_jit. breakpoint();2840 m_jit.abortWithReason(DFGNegativeStringLength); 2841 2841 ok.link(&m_jit); 2842 2842 } -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r168443 r168776 2144 2144 m_jit.move(size, resultGPR); 2145 2145 MacroAssembler::Jump nonZeroSize = m_jit.branchTest32(MacroAssembler::NonZero, resultGPR); 2146 m_jit. breakpoint();2146 m_jit.abortWithReason(DFGBasicStorageAllocatorZeroSize); 2147 2147 nonZeroSize.link(&m_jit); 2148 2148 #endif -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r168729 r168776 3710 3710 SpeculateCellOperand op1(this, node->child1()); 3711 3711 JITCompiler::Jump isOK = m_jit.branchPtr(JITCompiler::Equal, JITCompiler::Address(op1.gpr(), JSCell::structureIDOffset()), TrustedImmPtr(node->structure())); 3712 m_jit. breakpoint();3712 m_jit.abortWithReason(DFGIneffectiveWatchpoint); 3713 3713 isOK.link(&m_jit); 3714 3714 #else -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r168443 r168776 1037 1037 if (!ASSERT_DISABLED) { 1038 1038 MacroAssembler::Jump checkCell = branchIsCell(JSValueRegs(gpr)); 1039 m_jit. breakpoint();1039 m_jit.abortWithReason(DFGIsNotCell); 1040 1040 checkCell.link(&m_jit); 1041 1041 } … … 3783 3783 JITCompiler::Address(op1.gpr(), JSCell::structureIDOffset()), 3784 3784 node->structure()); 3785 m_jit. breakpoint();3785 m_jit.abortWithReason(DFGIneffectiveWatchpoint); 3786 3786 isOK.link(&m_jit); 3787 3787 #else -
trunk/Source/JavaScriptCore/dfg/DFGThunks.cpp
r164229 r168776 128 128 jit.loadPtr(MacroAssembler::Address(GPRInfo::regT0, offsetOfTargetPC), GPRInfo::regT1); 129 129 MacroAssembler::Jump ok = jit.branchPtr(MacroAssembler::Above, GPRInfo::regT1, MacroAssembler::TrustedImmPtr(bitwise_cast<void*>(static_cast<intptr_t>(1000)))); 130 jit. breakpoint();130 jit.abortWithReason(DFGUnreasonableOSREntryJumpDestination); 131 131 ok.link(&jit); 132 132 jit.jump(GPRInfo::regT1); -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp
r168729 r168776 85 85 #if CPU(X86_64) 86 86 Jump checkInt32 = branch64(BelowOrEqual, gpr, TrustedImm64(static_cast<uintptr_t>(0xFFFFFFFFu))); 87 breakpoint();87 abortWithReason(AHIsNotInt32); 88 88 checkInt32.link(this); 89 89 #else … … 95 95 { 96 96 Jump checkJSInt32 = branch64(AboveOrEqual, gpr, GPRInfo::tagTypeNumberRegister); 97 breakpoint();97 abortWithReason(AHIsNotJSInt32); 98 98 checkJSInt32.link(this); 99 99 } … … 102 102 { 103 103 Jump checkJSNumber = branchTest64(MacroAssembler::NonZero, gpr, GPRInfo::tagTypeNumberRegister); 104 breakpoint();104 abortWithReason(AHIsNotJSNumber); 105 105 checkJSNumber.link(this); 106 106 } … … 111 111 Jump checkJSNumber = branchTest64(MacroAssembler::NonZero, gpr, GPRInfo::tagTypeNumberRegister); 112 112 checkJSInt32.link(this); 113 breakpoint();113 abortWithReason(AHIsNotJSDouble); 114 114 checkJSNumber.link(this); 115 115 } … … 118 118 { 119 119 Jump checkCell = branchTest64(MacroAssembler::Zero, gpr, GPRInfo::tagMaskRegister); 120 breakpoint();120 abortWithReason(AHIsNotCell); 121 121 checkCell.link(this); 122 122 } … … 125 125 { 126 126 Jump ok = branch64(Equal, GPRInfo::tagTypeNumberRegister, TrustedImm64(TagTypeNumber)); 127 abortWithReason(AHTagTypeNumberNotInPlace); 127 128 breakpoint(); 128 129 ok.link(this); 129 130 130 131 ok = branch64(Equal, GPRInfo::tagMaskRegister, TrustedImm64(TagMask)); 131 breakpoint();132 abortWithReason(AHTagMaskNotInPlace); 132 133 ok.link(this); 133 134 } … … 141 142 { 142 143 Jump checkJSInt32 = branch32(Equal, gpr, TrustedImm32(JSValue::Int32Tag)); 143 breakpoint();144 abortWithReason(AHIsNotJSInt32); 144 145 checkJSInt32.link(this); 145 146 } … … 149 150 Jump checkJSInt32 = branch32(Equal, gpr, TrustedImm32(JSValue::Int32Tag)); 150 151 Jump checkJSDouble = branch32(Below, gpr, TrustedImm32(JSValue::LowestTag)); 151 breakpoint();152 abortWithReason(AHIsNotJSNumber); 152 153 checkJSInt32.link(this); 153 154 checkJSDouble.link(this); … … 157 158 { 158 159 Jump checkJSDouble = branch32(Below, gpr, TrustedImm32(JSValue::LowestTag)); 159 breakpoint();160 abortWithReason(AHIsNotJSDouble); 160 161 checkJSDouble.link(this); 161 162 } … … 164 165 { 165 166 Jump checkCell = branch32(Equal, gpr, TrustedImm32(JSValue::CellTag)); 166 breakpoint();167 abortWithReason(AHIsNotCell); 167 168 checkCell.link(this); 168 169 } … … 176 177 { 177 178 Jump checkCFR = branchTestPtr(Zero, GPRInfo::callFrameRegister, TrustedImm32(7)); 178 breakpoint();179 abortWithReason(AHCallFrameMisaligned); 179 180 checkCFR.link(this); 180 181 } … … 183 184 { 184 185 Jump checkNull = branchTestPtr(Zero, gpr); 185 breakpoint();186 abortWithReason(AHIsNotNull); 186 187 checkNull.link(this); 187 188 } … … 190 191 { 191 192 Jump ok = branch32(Below, payloadFor(JSStack::ArgumentCount), TrustedImm32(10000000)); 192 breakpoint();193 abortWithReason(AHInsaneArgumentCount); 193 194 ok.link(this); 194 195 } 195 196 #endif // !ASSERT_DISABLED 196 197 198 void AssemblyHelpers::emitStoreStructureWithTypeInfo(AssemblyHelpers& jit, TrustedImmPtr structure, RegisterID dest) 199 { 200 const Structure* structurePtr = static_cast<const Structure*>(structure.m_value); 201 #if USE(JSVALUE64) 202 jit.store64(TrustedImm64(structurePtr->idBlob()), MacroAssembler::Address(dest, JSCell::structureIDOffset())); 203 if (!ASSERT_DISABLED) { 204 Jump correctStructure = jit.branch32(Equal, MacroAssembler::Address(dest, JSCell::structureIDOffset()), TrustedImm32(structurePtr->id())); 205 jit.abortWithReason(AHStructureIDIsValid); 206 correctStructure.link(&jit); 207 208 Jump correctIndexingType = jit.branch8(Equal, MacroAssembler::Address(dest, JSCell::indexingTypeOffset()), TrustedImm32(structurePtr->indexingType())); 209 jit.abortWithReason(AHIndexingTypeIsValid); 210 correctIndexingType.link(&jit); 211 212 Jump correctType = jit.branch8(Equal, MacroAssembler::Address(dest, JSCell::typeInfoTypeOffset()), TrustedImm32(structurePtr->typeInfo().type())); 213 jit.abortWithReason(AHTypeInfoIsValid); 214 correctType.link(&jit); 215 216 Jump correctFlags = jit.branch8(Equal, MacroAssembler::Address(dest, JSCell::typeInfoFlagsOffset()), TrustedImm32(structurePtr->typeInfo().inlineTypeFlags())); 217 jit.abortWithReason(AHTypeInfoInlineTypeFlagsAreValid); 218 correctFlags.link(&jit); 219 } 220 #else 221 // Do a 32-bit wide store to initialize the cell's fields. 222 jit.store32(TrustedImm32(structurePtr->objectInitializationBlob()), MacroAssembler::Address(dest, JSCell::indexingTypeOffset())); 223 jit.storePtr(structure, MacroAssembler::Address(dest, JSCell::structureIDOffset())); 224 #endif 225 } 226 197 227 } // namespace JSC 198 228 -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h
r167394 r168776 63 63 #if !defined(NDEBUG) && !CPU(ARM64) 64 64 Jump stackPointerAligned = branchTestPtr(Zero, stackPointerRegister, TrustedImm32(0xf)); 65 breakpoint();65 abortWithReason(AHStackPointerMisaligned); 66 66 stackPointerAligned.link(this); 67 67 #endif … … 630 630 } 631 631 632 static void emitStoreStructureWithTypeInfo(AssemblyHelpers& jit, TrustedImmPtr structure, RegisterID dest) 633 { 634 const Structure* structurePtr = static_cast<const Structure*>(structure.m_value); 635 #if USE(JSVALUE64) 636 jit.store64(TrustedImm64(structurePtr->idBlob()), MacroAssembler::Address(dest, JSCell::structureIDOffset())); 637 #ifndef NDEBUG 638 Jump correctStructure = jit.branch32(Equal, MacroAssembler::Address(dest, JSCell::structureIDOffset()), TrustedImm32(structurePtr->id())); 639 jit.breakpoint(); 640 correctStructure.link(&jit); 641 642 Jump correctIndexingType = jit.branch8(Equal, MacroAssembler::Address(dest, JSCell::indexingTypeOffset()), TrustedImm32(structurePtr->indexingType())); 643 jit.breakpoint(); 644 correctIndexingType.link(&jit); 645 646 Jump correctType = jit.branch8(Equal, MacroAssembler::Address(dest, JSCell::typeInfoTypeOffset()), TrustedImm32(structurePtr->typeInfo().type())); 647 jit.breakpoint(); 648 correctType.link(&jit); 649 650 Jump correctFlags = jit.branch8(Equal, MacroAssembler::Address(dest, JSCell::typeInfoFlagsOffset()), TrustedImm32(structurePtr->typeInfo().inlineTypeFlags())); 651 jit.breakpoint(); 652 correctFlags.link(&jit); 653 #endif 654 #else 655 // Do a 32-bit wide store to initialize the cell's fields. 656 jit.store32(TrustedImm32(structurePtr->objectInitializationBlob()), MacroAssembler::Address(dest, JSCell::indexingTypeOffset())); 657 jit.storePtr(structure, MacroAssembler::Address(dest, JSCell::structureIDOffset())); 658 #endif 659 } 632 static void emitStoreStructureWithTypeInfo(AssemblyHelpers& jit, TrustedImmPtr structure, RegisterID dest); 660 633 661 634 Jump checkMarkByte(GPRReg cell) -
trunk/Source/JavaScriptCore/jit/JIT.h
r166392 r168776 306 306 void emitLoadInt32ToDouble(int index, FPRegisterID value); 307 307 Jump emitJumpIfCellNotObject(RegisterID cellReg); 308 309 Jump addStructureTransitionCheck(JSCell*, Structure*, StructureStubInfo*, RegisterID scratch);310 void addStructureTransitionCheck(JSCell*, Structure*, StructureStubInfo*, JumpList& failureCases, RegisterID scratch);311 void testPrototype(JSValue, JumpList& failureCases, StructureStubInfo*);312 308 313 309 enum WriteBarrierMode { UnconditionalWriteBarrier, ShouldFilterBase, ShouldFilterValue, ShouldFilterBaseAndValue }; -
trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
r163844 r168776 956 956 OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); 957 957 if (types.first().definitelyIsNumber() && types.second().definitelyIsNumber()) { 958 #ifndef NDEBUG 959 breakpoint(); 960 #endif 958 if (!ASSERT_DISABLED) 959 abortWithReason(JITDivOperandsAreNotNumbers); 961 960 return; 962 961 } -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r168443 r168776 1107 1107 if (!ASSERT_DISABLED) { 1108 1108 Jump ok = branchPtr(MacroAssembler::Above, regT0, TrustedImmPtr(bitwise_cast<void*>(static_cast<intptr_t>(1000)))); 1109 breakpoint();1109 abortWithReason(JITUnreasonableLoopHintJumpTarget); 1110 1110 ok.link(this); 1111 1111 } -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r167646 r168776 102 102 #else 103 103 #error "JIT not supported on this platform." 104 breakpoint();104 abortWithReason(JITNotSupported); 105 105 #endif // CPU(X86) 106 106 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r168729 r168776 140 140 Label done = label(); 141 141 142 #if !ASSERT_DISABLED 143 Jump resultOK = branchTest64(NonZero, regT0);144 breakpoint();145 resultOK.link(this);146 #endif 142 if (!ASSERT_DISABLED) { 143 Jump resultOK = branchTest64(NonZero, regT0); 144 abortWithReason(JITGetByValResultIsNotEmpty); 145 resultOK.link(this); 146 } 147 147 148 148 emitValueProfilingSite(); … … 253 253 done.link(this); 254 254 } else { 255 #if !ASSERT_DISABLED 256 Jump isOutOfLine = branch32(GreaterThanOrEqual, offset, TrustedImm32(firstOutOfLineOffset));257 breakpoint();258 isOutOfLine.link(this);259 #endif 255 if (!ASSERT_DISABLED) { 256 Jump isOutOfLine = branch32(GreaterThanOrEqual, offset, TrustedImm32(firstOutOfLineOffset)); 257 abortWithReason(JITOffsetIsNotOutOfLine); 258 isOutOfLine.link(this); 259 } 260 260 loadPtr(Address(base, JSObject::butterflyOffset()), scratch); 261 261 neg32(offset); … … 975 975 UNUSED_PARAM(owner); 976 976 #endif // ENABLE(GGC) 977 }978 979 JIT::Jump JIT::addStructureTransitionCheck(JSCell* object, Structure* structure, StructureStubInfo* stubInfo, RegisterID scratch)980 {981 if (object->structure() == structure && structure->transitionWatchpointSetIsStillValid()) {982 structure->addTransitionWatchpoint(stubInfo->addWatchpoint(m_codeBlock));983 #if !ASSERT_DISABLED984 move(TrustedImmPtr(object), scratch);985 Jump ok = branchStructure(Equal, Address(scratch, JSCell::structureIDOffset()), structure);986 breakpoint();987 ok.link(this);988 #endif989 Jump result; // Returning an unset jump this way because otherwise VC++ would complain.990 return result;991 }992 993 move(TrustedImmPtr(object), scratch);994 return branchStructure(NotEqual, Address(scratch, JSCell::structureIDOffset()), structure);995 }996 997 void JIT::addStructureTransitionCheck(JSCell* object, Structure* structure, StructureStubInfo* stubInfo, JumpList& failureCases, RegisterID scratch)998 {999 Jump failureCase = addStructureTransitionCheck(object, structure, stubInfo, scratch);1000 if (!failureCase.isSet())1001 return;1002 1003 failureCases.append(failureCase);1004 }1005 1006 void JIT::testPrototype(JSValue prototype, JumpList& failureCases, StructureStubInfo* stubInfo)1007 {1008 if (prototype.isNull())1009 return;1010 1011 ASSERT(prototype.isCell());1012 addStructureTransitionCheck(prototype.asCell(), prototype.asCell()->structure(), stubInfo, failureCases, regT3);1013 977 } 1014 978 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r168443 r168776 162 162 Label done = label(); 163 163 164 #if !ASSERT_DISABLED 165 Jump resultOK = branch32(NotEqual, regT1, TrustedImm32(JSValue::EmptyValueTag));166 breakpoint();167 resultOK.link(this);168 #endif 164 if (!ASSERT_DISABLED) { 165 Jump resultOK = branch32(NotEqual, regT1, TrustedImm32(JSValue::EmptyValueTag)); 166 abortWithReason(JITGetByValResultIsNotEmpty); 167 resultOK.link(this); 168 } 169 169 170 170 emitValueProfilingSite(); … … 602 602 done.link(this); 603 603 } else { 604 #if !ASSERT_DISABLED 605 Jump isOutOfLine = branch32(GreaterThanOrEqual, offset, TrustedImm32(firstOutOfLineOffset));606 breakpoint();607 isOutOfLine.link(this);608 #endif 604 if (!ASSERT_DISABLED) { 605 Jump isOutOfLine = branch32(GreaterThanOrEqual, offset, TrustedImm32(firstOutOfLineOffset)); 606 abortWithReason(JITOffsetIsNotOutOfLine); 607 isOutOfLine.link(this); 608 } 609 609 loadPtr(Address(base, JSObject::butterflyOffset()), base); 610 610 neg32(offset); -
trunk/Source/JavaScriptCore/jit/RegisterPreservationWrapperGenerator.cpp
r164241 r168776 212 212 AssemblyHelpers::Jump ok = jit.branchPtr( 213 213 AssemblyHelpers::Above, GPRInfo::regT1, AssemblyHelpers::TrustedImmPtr(static_cast<size_t>(0x1000))); 214 jit. breakpoint();214 jit.abortWithReason(RPWUnreasonableJumpTarget); 215 215 ok.link(&jit); 216 216 } -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r168548 r168776 133 133 if (object->structure() == structure && structure->transitionWatchpointSetIsStillValid()) { 134 134 structure->addTransitionWatchpoint(stubInfo.addWatchpoint(codeBlock)); 135 #if !ASSERT_DISABLED 136 // If we execute this code, the object must have the structure we expect. Assert 137 // this in debug modes. 138 jit.move(MacroAssembler::TrustedImmPtr(object), scratchGPR); 139 MacroAssembler::Jump ok = branchStructure(jit, 140 MacroAssembler::Equal, 141 MacroAssembler::Address(scratchGPR, JSCell::structureIDOffset()), 142 structure); 143 jit.breakpoint(); 144 ok.link(&jit); 145 #endif 135 if (!ASSERT_DISABLED) { 136 // If we execute this code, the object must have the structure we expect. Assert 137 // this in debug modes. 138 jit.move(MacroAssembler::TrustedImmPtr(object), scratchGPR); 139 MacroAssembler::Jump ok = branchStructure( 140 jit, 141 MacroAssembler::Equal, 142 MacroAssembler::Address(scratchGPR, JSCell::structureIDOffset()), 143 structure); 144 jit.abortWithReason(RepatchIneffectiveWatchpoint); 145 ok.link(&jit); 146 } 146 147 return; 147 148 } … … 1572 1573 CCallHelpers::Jump okArgumentCount = stubJit.branch32( 1573 1574 CCallHelpers::Below, CCallHelpers::Address(CCallHelpers::stackPointerRegister, static_cast<ptrdiff_t>(sizeof(Register) * JSStack::ArgumentCount) + offsetToFrame + PayloadOffset), CCallHelpers::TrustedImm32(10000000)); 1574 stubJit. breakpoint();1575 stubJit.abortWithReason(RepatchInsaneArgumentCount); 1575 1576 okArgumentCount.link(&stubJit); 1576 1577 } -
trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp
r168729 r168776 46 46 inline void emitPointerValidation(CCallHelpers& jit, GPRReg pointerGPR) 47 47 { 48 #if !ASSERT_DISABLED 48 if (ASSERT_DISABLED) 49 return; 49 50 CCallHelpers::Jump isNonZero = jit.branchTestPtr(CCallHelpers::NonZero, pointerGPR); 50 jit. breakpoint();51 jit.abortWithReason(TGInvalidPointer); 51 52 isNonZero.link(&jit); 52 53 jit.pushToSave(pointerGPR); 53 54 jit.load8(pointerGPR, pointerGPR); 54 55 jit.popToRestore(pointerGPR); 55 #else56 UNUSED_PARAM(jit);57 UNUSED_PARAM(pointerGPR);58 #endif59 56 } 60 57 … … 374 371 #error "JIT not supported on this platform." 375 372 UNUSED_PARAM(executableOffsetToFunction); 376 breakpoint();373 abortWithReason(TGNotSupported); 377 374 #endif 378 375 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r158208 r168776 1640 1640 ASSERT(term->quantityCount == 1); 1641 1641 1642 #ifndef NDEBUG1643 1642 // Runtime ASSERT to make sure that the nested alternative handled the 1644 1643 // "no input consumed" check. 1645 if ( term->quantityType != QuantifierFixedCount && !term->parentheses.disjunction->m_minimumSize) {1644 if (!ASSERT_DISABLED && term->quantityType != QuantifierFixedCount && !term->parentheses.disjunction->m_minimumSize) { 1646 1645 Jump pastBreakpoint; 1647 1646 pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*))); 1648 breakpoint();1647 abortWithReason(YARRNoInputConsumed); 1649 1648 pastBreakpoint.link(this); 1650 1649 } 1651 #endif1652 1650 1653 1651 // If the parenthese are capturing, store the ending index value to the … … 1696 1694 case OpParenthesesSubpatternTerminalEnd: { 1697 1695 YarrOp& beginOp = m_ops[op.m_previousOp]; 1698 #ifndef NDEBUG 1699 PatternTerm* term = op.m_term;1700 1701 // Runtime ASSERT to make sure that the nested alternative handled the1702 // "no input consumed" check.1703 Jump pastBreakpoint;1704 pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*)));1705 breakpoint();1706 pastBreakpoint.link(this);1707 #endif 1696 if (!ASSERT_DISABLED) { 1697 PatternTerm* term = op.m_term; 1698 1699 // Runtime ASSERT to make sure that the nested alternative handled the 1700 // "no input consumed" check. 1701 Jump pastBreakpoint; 1702 pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*))); 1703 abortWithReason(YARRNoInputConsumed); 1704 pastBreakpoint.link(this); 1705 } 1708 1706 1709 1707 // We know that the match is non-zero, we can accept it and
Note: See TracChangeset
for help on using the changeset viewer.