Changeset 237972 in webkit for trunk/Source/JavaScriptCore/bytecode/ArithProfile.cpp
- Timestamp:
- Nov 7, 2018, 5:47:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/ArithProfile.cpp
r222009 r237972 35 35 void ArithProfile::emitObserveResult(CCallHelpers& jit, JSValueRegs regs, TagRegistersMode mode) 36 36 { 37 if (!shouldEmitSetDouble() && !shouldEmitSetNonNum ber())37 if (!shouldEmitSetDouble() && !shouldEmitSetNonNumeric() && !shouldEmitSetBigInt()) 38 38 return; 39 39 40 CCallHelpers::Jump isInt32 = jit.branchIfInt32(regs, mode); 40 CCallHelpers::JumpList done; 41 CCallHelpers::JumpList nonNumeric; 42 43 done.append(jit.branchIfInt32(regs, mode)); 41 44 CCallHelpers::Jump notDouble = jit.branchIfNotDoubleKnownNotInt32(regs, mode); 42 45 emitSetDouble(jit); 43 CCallHelpers::Jump done = jit.jump(); 46 done.append(jit.jump()); 47 44 48 notDouble.link(&jit); 45 emitSetNonNumber(jit); 49 50 nonNumeric.append(jit.branchIfNotCell(regs, mode)); 51 nonNumeric.append(jit.branchIfNotBigInt(regs.payloadGPR())); 52 emitSetBigInt(jit); 53 done.append(jit.jump()); 54 55 nonNumeric.link(&jit); 56 emitSetNonNumeric(jit); 57 46 58 done.link(&jit); 47 isInt32.link(&jit);48 59 } 49 60 … … 60 71 } 61 72 62 bool ArithProfile::shouldEmitSetNonNum ber() const73 bool ArithProfile::shouldEmitSetNonNumeric() const 63 74 { 64 uint32_t mask = ArithProfile::NonNum ber;75 uint32_t mask = ArithProfile::NonNumeric; 65 76 return (m_bits & mask) != mask; 66 77 } 67 78 68 void ArithProfile::emitSetNonNumber(CCallHelpers& jit) const79 bool ArithProfile::shouldEmitSetBigInt() const 69 80 { 70 if (shouldEmitSetNonNumber()) 71 jit.or32(CCallHelpers::TrustedImm32(ArithProfile::NonNumber), CCallHelpers::AbsoluteAddress(addressOfBits())); 81 uint32_t mask = ArithProfile::BigInt; 82 return (m_bits & mask) != mask; 83 } 84 85 void ArithProfile::emitSetNonNumeric(CCallHelpers& jit) const 86 { 87 if (shouldEmitSetNonNumeric()) 88 jit.or32(CCallHelpers::TrustedImm32(ArithProfile::NonNumeric), CCallHelpers::AbsoluteAddress(addressOfBits())); 89 } 90 91 void ArithProfile::emitSetBigInt(CCallHelpers& jit) const 92 { 93 if (shouldEmitSetBigInt()) 94 jit.or32(CCallHelpers::TrustedImm32(ArithProfile::BigInt), CCallHelpers::AbsoluteAddress(addressOfBits())); 72 95 } 73 96 #endif // ENABLE(JIT) … … 96 119 separator = "|"; 97 120 } 98 if (profile.didObserveNonNum ber()) {99 out.print(separator, "NonNum ber");121 if (profile.didObserveNonNumeric()) { 122 out.print(separator, "NonNumeric"); 100 123 separator = "|"; 101 124 } … … 106 129 if (profile.didObserveInt52Overflow()) { 107 130 out.print(separator, "Int52Overflow"); 131 separator = "|"; 132 } 133 if (profile.didObserveBigInt()) { 134 out.print(separator, "BigInt"); 108 135 separator = "|"; 109 136 }
Note:
See TracChangeset
for help on using the changeset viewer.