Changeset 200034 in webkit
- Timestamp:
- Apr 25, 2016, 10:48:46 AM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/JavaScriptCore/ChangeLog ¶
r199968 r200034 1 2016-04-25 Mark Lam <mark.lam@apple.com> 2 3 Renaming SpecInt32, SpecInt52, MachineInt to SpecInt32Only, SpecInt52Only, AnyInt. 4 https://bugs.webkit.org/show_bug.cgi?id=156941 5 6 Reviewed by Filip Pizlo. 7 8 While looking at https://bugs.webkit.org/show_bug.cgi?id=153431, it was decided 9 that SpecInt32Only, SpecInt52Only, and AnyInt would be better names for 10 SpecInt32, SpecInt52, and MachineInt. Let's do a bulk rename. 11 12 This is only a renaming patch, and deletion of a piece of unused code. There are 13 no semantic changes. 14 15 * bindings/ScriptValue.cpp: 16 (Inspector::jsToInspectorValue): 17 * bytecode/SpeculatedType.cpp: 18 (JSC::dumpSpeculation): 19 (JSC::speculationToAbbreviatedString): 20 (JSC::speculationFromValue): 21 (JSC::leastUpperBoundOfStrictlyEquivalentSpeculations): 22 (JSC::typeOfDoubleNegation): 23 (JSC::typeOfDoubleRounding): 24 * bytecode/SpeculatedType.h: 25 (JSC::isInt32Speculation): 26 (JSC::isInt32OrBooleanSpeculation): 27 (JSC::isInt32SpeculationForArithmetic): 28 (JSC::isInt32OrBooleanSpeculationForArithmetic): 29 (JSC::isInt32OrBooleanSpeculationExpectingDefined): 30 (JSC::isInt52Speculation): 31 (JSC::isAnyIntSpeculation): 32 (JSC::isAnyIntAsDoubleSpeculation): 33 (JSC::isDoubleRealSpeculation): 34 (JSC::isMachineIntSpeculation): Deleted. 35 (JSC::isInt52AsDoubleSpeculation): Deleted. 36 (JSC::isIntegerSpeculation): Deleted. 37 * dfg/DFGAbstractInterpreterInlines.h: 38 (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): 39 * dfg/DFGAbstractValue.cpp: 40 (JSC::DFG::AbstractValue::set): 41 (JSC::DFG::AbstractValue::fixTypeForRepresentation): 42 (JSC::DFG::AbstractValue::checkConsistency): 43 (JSC::DFG::AbstractValue::resultType): 44 * dfg/DFGAbstractValue.h: 45 (JSC::DFG::AbstractValue::validateType): 46 * dfg/DFGArgumentsUtilities.cpp: 47 (JSC::DFG::emitCodeToGetArgumentsArrayLength): 48 * dfg/DFGByteCodeParser.cpp: 49 (JSC::DFG::ByteCodeParser::handleInlining): 50 (JSC::DFG::ByteCodeParser::handleIntrinsicCall): 51 * dfg/DFGFixupPhase.cpp: 52 (JSC::DFG::FixupPhase::fixupNode): 53 (JSC::DFG::FixupPhase::fixupToThis): 54 (JSC::DFG::FixupPhase::observeUseKindOnNode): 55 (JSC::DFG::FixupPhase::fixIntConvertingEdge): 56 (JSC::DFG::FixupPhase::fixIntOrBooleanEdge): 57 (JSC::DFG::FixupPhase::fixDoubleOrBooleanEdge): 58 (JSC::DFG::FixupPhase::truncateConstantToInt32): 59 (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd): 60 (JSC::DFG::FixupPhase::prependGetArrayLength): 61 (JSC::DFG::FixupPhase::fixupChecksInBlock): 62 * dfg/DFGGraph.h: 63 (JSC::DFG::Graph::addShouldSpeculateInt32): 64 (JSC::DFG::Graph::addShouldSpeculateAnyInt): 65 (JSC::DFG::Graph::binaryArithShouldSpeculateInt32): 66 (JSC::DFG::Graph::binaryArithShouldSpeculateAnyInt): 67 (JSC::DFG::Graph::unaryArithShouldSpeculateInt32): 68 (JSC::DFG::Graph::unaryArithShouldSpeculateAnyInt): 69 (JSC::DFG::Graph::addShouldSpeculateMachineInt): Deleted. 70 (JSC::DFG::Graph::binaryArithShouldSpeculateMachineInt): Deleted. 71 (JSC::DFG::Graph::unaryArithShouldSpeculateMachineInt): Deleted. 72 * dfg/DFGInPlaceAbstractState.cpp: 73 (JSC::DFG::InPlaceAbstractState::initialize): 74 * dfg/DFGJITCompiler.cpp: 75 (JSC::DFG::JITCompiler::noticeOSREntry): 76 * dfg/DFGNode.cpp: 77 (JSC::DFG::Node::convertToIdentityOn): 78 * dfg/DFGNode.h: 79 (JSC::DFG::Node::asNumber): 80 (JSC::DFG::Node::isAnyIntConstant): 81 (JSC::DFG::Node::asAnyInt): 82 (JSC::DFG::Node::isBooleanConstant): 83 (JSC::DFG::Node::shouldSpeculateInt32OrBooleanExpectingDefined): 84 (JSC::DFG::Node::shouldSpeculateAnyInt): 85 (JSC::DFG::Node::shouldSpeculateDouble): 86 (JSC::DFG::Node::shouldSpeculateNumber): 87 (JSC::DFG::Node::isMachineIntConstant): Deleted. 88 (JSC::DFG::Node::asMachineInt): Deleted. 89 (JSC::DFG::Node::shouldSpeculateMachineInt): Deleted. 90 * dfg/DFGOSREntry.cpp: 91 (JSC::DFG::OSREntryData::dumpInContext): 92 (JSC::DFG::prepareOSREntry): 93 * dfg/DFGOSREntry.h: 94 * dfg/DFGPredictionPropagationPhase.cpp: 95 * dfg/DFGSSALoweringPhase.cpp: 96 (JSC::DFG::SSALoweringPhase::handleNode): 97 (JSC::DFG::SSALoweringPhase::lowerBoundsCheck): 98 * dfg/DFGSafeToExecute.h: 99 (JSC::DFG::SafeToExecuteEdge::operator()): 100 * dfg/DFGSpeculativeJIT.cpp: 101 (JSC::DFG::SpeculativeJIT::silentFill): 102 (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): 103 (JSC::DFG::SpeculativeJIT::compileArithAdd): 104 (JSC::DFG::SpeculativeJIT::compileArithSub): 105 (JSC::DFG::SpeculativeJIT::compileArithNegate): 106 (JSC::DFG::SpeculativeJIT::speculateInt32): 107 (JSC::DFG::SpeculativeJIT::speculateNumber): 108 (JSC::DFG::SpeculativeJIT::speculateMisc): 109 (JSC::DFG::SpeculativeJIT::speculate): 110 * dfg/DFGSpeculativeJIT.h: 111 (JSC::DFG::SpeculativeJIT::spill): 112 (JSC::DFG::SpeculativeJIT::isKnownInteger): 113 (JSC::DFG::SpeculativeJIT::isKnownCell): 114 (JSC::DFG::SpeculativeJIT::isKnownNotInteger): 115 (JSC::DFG::SpeculativeJIT::isKnownNotNumber): 116 (JSC::DFG::SpeculativeJIT::isKnownNotCell): 117 (JSC::DFG::SpeculativeJIT::isKnownNotOther): 118 * dfg/DFGSpeculativeJIT32_64.cpp: 119 (JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal): 120 (JSC::DFG::SpeculativeJIT::compile): 121 * dfg/DFGSpeculativeJIT64.cpp: 122 (JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal): 123 (JSC::DFG::SpeculativeJIT::fillSpeculateInt52): 124 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): 125 (JSC::DFG::SpeculativeJIT::emitBranch): 126 (JSC::DFG::SpeculativeJIT::compile): 127 (JSC::DFG::SpeculativeJIT::blessBoolean): 128 (JSC::DFG::SpeculativeJIT::convertAnyInt): 129 (JSC::DFG::SpeculativeJIT::speculateAnyInt): 130 (JSC::DFG::SpeculativeJIT::speculateDoubleRepAnyInt): 131 (JSC::DFG::SpeculativeJIT::convertMachineInt): Deleted. 132 (JSC::DFG::SpeculativeJIT::speculateMachineInt): Deleted. 133 (JSC::DFG::SpeculativeJIT::speculateDoubleRepMachineInt): Deleted. 134 * dfg/DFGUseKind.cpp: 135 (WTF::printInternal): 136 * dfg/DFGUseKind.h: 137 (JSC::DFG::typeFilterFor): 138 (JSC::DFG::isNumerical): 139 (JSC::DFG::isDouble): 140 * dfg/DFGValidate.cpp: 141 * dfg/DFGVariableAccessData.cpp: 142 (JSC::DFG::VariableAccessData::makePredictionForDoubleFormat): 143 (JSC::DFG::VariableAccessData::couldRepresentInt52Impl): 144 (JSC::DFG::VariableAccessData::flushFormat): 145 * ftl/FTLCapabilities.cpp: 146 (JSC::FTL::canCompile): 147 * ftl/FTLLowerDFGToB3.cpp: 148 (JSC::FTL::DFG::LowerDFGToB3::compileInt52Constant): 149 (JSC::FTL::DFG::LowerDFGToB3::compileInt52Rep): 150 (JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub): 151 (JSC::FTL::DFG::LowerDFGToB3::compileArithNegate): 152 (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal): 153 (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal): 154 (JSC::FTL::DFG::LowerDFGToB3::compileArrayPush): 155 (JSC::FTL::DFG::LowerDFGToB3::lowInt32): 156 (JSC::FTL::DFG::LowerDFGToB3::strictInt52ToInt32): 157 (JSC::FTL::DFG::LowerDFGToB3::isInt32): 158 (JSC::FTL::DFG::LowerDFGToB3::isNotInt32): 159 (JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52): 160 (JSC::FTL::DFG::LowerDFGToB3::doubleToStrictInt52): 161 (JSC::FTL::DFG::LowerDFGToB3::speculate): 162 (JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther): 163 (JSC::FTL::DFG::LowerDFGToB3::speculateAnyInt): 164 (JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepReal): 165 (JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepAnyInt): 166 (JSC::FTL::DFG::LowerDFGToB3::speculateMachineInt): Deleted. 167 (JSC::FTL::DFG::LowerDFGToB3::speculateDoubleRepMachineInt): Deleted. 168 * jit/JITOpcodes.cpp: 169 (JSC::JIT::emit_op_profile_type): 170 * jit/JITOpcodes32_64.cpp: 171 (JSC::JIT::emit_op_profile_type): 172 * runtime/JSCJSValue.h: 173 * runtime/JSCJSValueInlines.h: 174 (JSC::isInt52): 175 (JSC::JSValue::isAnyInt): 176 (JSC::JSValue::asAnyInt): 177 (JSC::JSValue::isMachineInt): Deleted. 178 (JSC::JSValue::asMachineInt): Deleted. 179 * runtime/RuntimeType.cpp: 180 (JSC::runtimeTypeForValue): 181 (JSC::runtimeTypeAsString): 182 * runtime/RuntimeType.h: 183 * runtime/TypeSet.cpp: 184 (JSC::TypeSet::dumpTypes): 185 (JSC::TypeSet::displayName): 186 (JSC::TypeSet::inspectorTypeSet): 187 (JSC::TypeSet::toJSONString): 188 1 189 2016-04-24 Yusuke Suzuki <utatane.tea@gmail.com> 2 190 -
TabularUnified trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp ¶
r199619 r200034 59 59 if (value.isNumber() && value.isDouble()) 60 60 return InspectorValue::create(value.asNumber()); 61 if (value.isNumber() && value.is MachineInt())62 return InspectorValue::create(static_cast<int>(value.as MachineInt()));61 if (value.isNumber() && value.isAnyInt()) 62 return InspectorValue::create(static_cast<int>(value.asAnyInt())); 63 63 if (value.isString()) 64 64 return InspectorValue::create(value.getString(&scriptState)); -
TabularUnified trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp ¶
r199638 r200034 169 169 } 170 170 171 if (value == SpecInt32 )171 if (value == SpecInt32Only) 172 172 myOut.print("Int32"); 173 173 else { … … 183 183 } 184 184 185 if (value & SpecInt52 )185 if (value & SpecInt52Only) 186 186 myOut.print("Int52"); 187 187 … … 189 189 myOut.print("Bytecodedouble"); 190 190 else { 191 if (value & Spec Int52AsDouble)192 myOut.print(" Int52asdouble");191 if (value & SpecAnyIntAsDouble) 192 myOut.print("AnyIntAsDouble"); 193 193 else 194 194 isTop = false; … … 275 275 if (isInt32Speculation(prediction)) 276 276 return "<Int32>"; 277 if (is Int52AsDoubleSpeculation(prediction))278 return "< Int52AsDouble>";277 if (isAnyIntAsDoubleSpeculation(prediction)) 278 return "<AnyIntAsDouble>"; 279 279 if (isInt52Speculation(prediction)) 280 280 return "<Int52>"; 281 if (is MachineIntSpeculation(prediction))282 return "< MachineInt>";281 if (isAnyIntSpeculation(prediction)) 282 return "<AnyInt>"; 283 283 if (isDoubleSpeculation(prediction)) 284 284 return "<Double>"; … … 394 394 if (number != number) 395 395 return SpecDoublePureNaN; 396 if (value.is MachineInt())397 return Spec Int52AsDouble;396 if (value.isAnyInt()) 397 return SpecAnyIntAsDouble; 398 398 return SpecNonIntAsDouble; 399 399 } … … 440 440 SpeculatedType leastUpperBoundOfStrictlyEquivalentSpeculations(SpeculatedType type) 441 441 { 442 if (type & SpecInteger)443 type |= SpecInteger;442 if (type & (SpecAnyInt | SpecAnyIntAsDouble)) 443 type |= (SpecAnyInt | SpecAnyIntAsDouble); 444 444 if (type & SpecString) 445 445 type |= SpecString; … … 527 527 if (value & SpecDoubleNaN) 528 528 value |= SpecDoubleNaN; 529 // We could get negative zero, which mixes Spec Int52AsDouble and SpecNotIntAsDouble.529 // We could get negative zero, which mixes SpecAnyIntAsDouble and SpecNotIntAsDouble. 530 530 // We could also overflow a large negative int into something that is no longer 531 531 // representable as an int. … … 548 548 // We might lose bits, which leads to a value becoming integer-representable. 549 549 if (value & SpecNonIntAsDouble) 550 value |= Spec Int52AsDouble;550 value |= SpecAnyIntAsDouble; 551 551 return value; 552 552 } -
TabularUnified trunk/Source/JavaScriptCore/bytecode/SpeculatedType.h ¶
r199935 r200034 67 67 static const SpeculatedType SpecBoolInt32 = 1u << 21; // It's definitely an Int32 with value 0 or 1. 68 68 static const SpeculatedType SpecNonBoolInt32 = 1u << 22; // It's definitely an Int32 with value other than 0 or 1. 69 static const SpeculatedType SpecInt32 = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32. 70 static const SpeculatedType SpecInt52 = 1u << 23; // It's definitely an Int52 and we intend it to unbox it. It's also definitely not an Int32. 71 static const SpeculatedType SpecMachineInt = SpecInt32 | SpecInt52; // It's something that we can do machine int arithmetic on. 72 static const SpeculatedType SpecInt52AsDouble = 1u << 24; // It's definitely an Int52 and it's inside a double. 73 static const SpeculatedType SpecInteger = SpecMachineInt | SpecInt52AsDouble; // It's definitely some kind of integer. 69 static const SpeculatedType SpecInt32Only = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32. 70 static const SpeculatedType SpecInt52Only = 1u << 23; // It's definitely an Int52 and we intend it to unbox it. It's also definitely not an Int32. 71 static const SpeculatedType SpecAnyInt = SpecInt32Only | SpecInt52Only; // It's something that we can do machine int arithmetic on. 72 static const SpeculatedType SpecAnyIntAsDouble = 1u << 24; // It's definitely an Int52 and it's inside a double. 74 73 static const SpeculatedType SpecNonIntAsDouble = 1u << 25; // It's definitely not an Int52 but it's a real number and it's a double. 75 static const SpeculatedType SpecDoubleReal = SpecNonIntAsDouble | Spec Int52AsDouble; // It's definitely a non-NaN double.74 static const SpeculatedType SpecDoubleReal = SpecNonIntAsDouble | SpecAnyIntAsDouble; // It's definitely a non-NaN double. 76 75 static const SpeculatedType SpecDoublePureNaN = 1u << 26; // It's definitely a NaN that is sae to tag (i.e. pure). 77 76 static const SpeculatedType SpecDoubleImpureNaN = 1u << 27; // It's definitely a NaN that is unsafe to tag (i.e. impure). … … 79 78 static const SpeculatedType SpecBytecodeDouble = SpecDoubleReal | SpecDoublePureNaN; // It's either a non-NaN or a NaN double, but it's definitely not impure NaN. 80 79 static const SpeculatedType SpecFullDouble = SpecDoubleReal | SpecDoubleNaN; // It's either a non-NaN or a NaN double. 81 static const SpeculatedType SpecBytecodeRealNumber = SpecInt32 | SpecDoubleReal; // It's either an Int32 or a DoubleReal.82 static const SpeculatedType SpecFullRealNumber = Spec MachineInt | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or a Int52.83 static const SpeculatedType SpecBytecodeNumber = SpecInt32 | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN.84 static const SpeculatedType SpecFullNumber = Spec MachineInt | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN.80 static const SpeculatedType SpecBytecodeRealNumber = SpecInt32Only | SpecDoubleReal; // It's either an Int32 or a DoubleReal. 81 static const SpeculatedType SpecFullRealNumber = SpecAnyInt | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or a Int52. 82 static const SpeculatedType SpecBytecodeNumber = SpecInt32Only | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN. 83 static const SpeculatedType SpecFullNumber = SpecAnyInt | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN. 85 84 static const SpeculatedType SpecBoolean = 1u << 28; // It's definitely a Boolean. 86 85 static const SpeculatedType SpecOther = 1u << 29; // It's definitely either Null or Undefined. 87 86 static const SpeculatedType SpecMisc = SpecBoolean | SpecOther; // It's definitely either a boolean, Null, or Undefined. 88 static const SpeculatedType SpecHeapTop = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52 and SpecDoubleImpureNaN.87 static const SpeculatedType SpecHeapTop = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN. 89 88 static const SpeculatedType SpecPrimitive = SpecString | SpecSymbol | SpecBytecodeNumber | SpecMisc; // It's any non-Object JSValue. 90 89 static const SpeculatedType SpecEmpty = 1u << 30; // It's definitely an empty value marker. 91 static const SpeculatedType SpecBytecodeTop = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52 and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local.90 static const SpeculatedType SpecBytecodeTop = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local. 92 91 static const SpeculatedType SpecFullTop = SpecBytecodeTop | SpecFullNumber; // It can be anything that bytecode could see plus exotic encodings of numbers. 93 92 … … 289 288 inline bool isInt32Speculation(SpeculatedType value) 290 289 { 291 return value && !(value & ~SpecInt32 );290 return value && !(value & ~SpecInt32Only); 292 291 } 293 292 294 293 inline bool isInt32OrBooleanSpeculation(SpeculatedType value) 295 294 { 296 return value && !(value & ~(SpecBoolean | SpecInt32 ));295 return value && !(value & ~(SpecBoolean | SpecInt32Only)); 297 296 } 298 297 299 298 inline bool isInt32SpeculationForArithmetic(SpeculatedType value) 300 299 { 301 return !(value & (SpecFullDouble | SpecInt52 ));300 return !(value & (SpecFullDouble | SpecInt52Only)); 302 301 } 303 302 304 303 inline bool isInt32OrBooleanSpeculationForArithmetic(SpeculatedType value) 305 304 { 306 return !(value & (SpecFullDouble | SpecInt52 ));305 return !(value & (SpecFullDouble | SpecInt52Only)); 307 306 } 308 307 … … 314 313 inline bool isInt52Speculation(SpeculatedType value) 315 314 { 316 return value == SpecInt52; 317 } 318 319 inline bool isMachineIntSpeculation(SpeculatedType value) 320 { 321 return !!value && (value & SpecMachineInt) == value; 322 } 323 324 inline bool isInt52AsDoubleSpeculation(SpeculatedType value) 325 { 326 return value == SpecInt52AsDouble; 327 } 328 329 inline bool isIntegerSpeculation(SpeculatedType value) 330 { 331 return !!value && (value & SpecInteger) == value; 315 return value == SpecInt52Only; 316 } 317 318 inline bool isAnyIntSpeculation(SpeculatedType value) 319 { 320 return !!value && (value & SpecAnyInt) == value; 321 } 322 323 inline bool isAnyIntAsDoubleSpeculation(SpeculatedType value) 324 { 325 return value == SpecAnyIntAsDouble; 332 326 } 333 327 -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h ¶
r199967 r200034 238 238 clobberWorld(node->origin.semantic, clobberLimit); 239 239 LoadVarargsData* data = node->loadVarargsData(); 240 m_state.variables().operand(data->count).setType(SpecInt32 );240 m_state.variables().operand(data->count).setType(SpecInt32Only); 241 241 for (unsigned i = data->limit - 1; i--;) 242 242 m_state.variables().operand(data->start.offset() + i).makeHeapTop(); … … 252 252 if (node->child1().useKind() == UntypedUse || node->child2().useKind() == UntypedUse) { 253 253 clobberWorld(node->origin.semantic, clobberLimit); 254 forNode(node).setType(m_graph, SpecInt32 );254 forNode(node).setType(m_graph, SpecInt32Only); 255 255 break; 256 256 } … … 294 294 } 295 295 296 forNode(node).setType(SpecInt32 );296 forNode(node).setType(SpecInt32Only); 297 297 break; 298 298 } … … 302 302 if (doesOverflow(node->arithMode())) { 303 303 if (enableInt52()) { 304 if (child && child.is MachineInt()) {305 setConstant(node, jsNumber(child.as MachineInt()));306 break; 307 } 308 forNode(node).setType(Spec MachineInt);304 if (child && child.isAnyInt()) { 305 setConstant(node, jsNumber(child.asAnyInt())); 306 break; 307 } 308 forNode(node).setType(SpecAnyInt); 309 309 break; 310 310 } … … 314 314 break; 315 315 } 316 forNode(node).setType(Spec Int52AsDouble);316 forNode(node).setType(SpecAnyIntAsDouble); 317 317 break; 318 318 } … … 324 324 } 325 325 } 326 forNode(node).setType(SpecInt32 );326 forNode(node).setType(SpecInt32Only); 327 327 break; 328 328 } … … 358 358 } 359 359 } 360 forNode(node).setType(SpecInt32 );360 forNode(node).setType(SpecInt32Only); 361 361 break; 362 362 } … … 387 387 } 388 388 389 forNode(node).setType(SpecInt32 );389 forNode(node).setType(SpecInt32Only); 390 390 break; 391 391 } … … 442 442 case Int52Rep: { 443 443 JSValue child = forNode(node->child1()).value(); 444 if (child && child.is MachineInt()) {444 if (child && child.isAnyInt()) { 445 445 setConstant(node, child); 446 446 break; 447 447 } 448 448 449 forNode(node).setType(SpecInt32 );449 forNode(node).setType(SpecInt32Only); 450 450 break; 451 451 } … … 491 491 } 492 492 } 493 forNode(node).setType(SpecInt32 );493 forNode(node).setType(SpecInt32Only); 494 494 break; 495 495 case Int52RepUse: 496 if (left && right && left.is MachineInt() && right.isMachineInt()) {497 JSValue result = jsNumber(left.as MachineInt() + right.asMachineInt());498 if (result.is MachineInt()) {496 if (left && right && left.isAnyInt() && right.isAnyInt()) { 497 JSValue result = jsNumber(left.asAnyInt() + right.asAnyInt()); 498 if (result.isAnyInt()) { 499 499 setConstant(node, result); 500 500 break; 501 501 } 502 502 } 503 forNode(node).setType(Spec MachineInt);503 forNode(node).setType(SpecAnyInt); 504 504 break; 505 505 case DoubleRepUse: … … 526 526 break; 527 527 } 528 forNode(node).setType(SpecInt32 );528 forNode(node).setType(SpecInt32Only); 529 529 break; 530 530 } … … 551 551 } 552 552 } 553 forNode(node).setType(SpecInt32 );553 forNode(node).setType(SpecInt32Only); 554 554 break; 555 555 case Int52RepUse: 556 if (left && right && left.is MachineInt() && right.isMachineInt()) {557 JSValue result = jsNumber(left.as MachineInt() - right.asMachineInt());558 if (result.is MachineInt() || !shouldCheckOverflow(node->arithMode())) {556 if (left && right && left.isAnyInt() && right.isAnyInt()) { 557 JSValue result = jsNumber(left.asAnyInt() - right.asAnyInt()); 558 if (result.isAnyInt() || !shouldCheckOverflow(node->arithMode())) { 559 559 setConstant(node, result); 560 560 break; 561 561 } 562 562 } 563 forNode(node).setType(Spec MachineInt);563 forNode(node).setType(SpecAnyInt); 564 564 break; 565 565 case DoubleRepUse: … … 603 603 } 604 604 } 605 forNode(node).setType(SpecInt32 );605 forNode(node).setType(SpecInt32Only); 606 606 break; 607 607 case Int52RepUse: 608 if (child && child.is MachineInt()) {608 if (child && child.isAnyInt()) { 609 609 double doubleResult; 610 610 if (shouldCheckNegativeZero(node->arithMode())) … … 613 613 doubleResult = 0 - child.asNumber(); 614 614 JSValue valueResult = jsNumber(doubleResult); 615 if (valueResult.is MachineInt()) {615 if (valueResult.isAnyInt()) { 616 616 setConstant(node, valueResult); 617 617 break; 618 618 } 619 619 } 620 forNode(node).setType(Spec MachineInt);620 forNode(node).setType(SpecAnyInt); 621 621 break; 622 622 case DoubleRepUse: … … 655 655 } 656 656 } 657 forNode(node).setType(SpecInt32 );657 forNode(node).setType(SpecInt32Only); 658 658 break; 659 659 case Int52RepUse: 660 if (left && right && left.is MachineInt() && right.isMachineInt()) {660 if (left && right && left.isAnyInt() && right.isAnyInt()) { 661 661 double doubleResult = left.asNumber() * right.asNumber(); 662 662 if (!shouldCheckNegativeZero(node->arithMode())) 663 663 doubleResult += 0; 664 664 JSValue valueResult = jsNumber(doubleResult); 665 if (valueResult.is MachineInt()) {665 if (valueResult.isAnyInt()) { 666 666 setConstant(node, valueResult); 667 667 break; 668 668 } 669 669 } 670 forNode(node).setType(Spec MachineInt);670 forNode(node).setType(SpecAnyInt); 671 671 break; 672 672 case DoubleRepUse: … … 707 707 } 708 708 } 709 forNode(node).setType(SpecInt32 );709 forNode(node).setType(SpecInt32Only); 710 710 break; 711 711 case DoubleRepUse: … … 746 746 } 747 747 } 748 forNode(node).setType(SpecInt32 );748 forNode(node).setType(SpecInt32Only); 749 749 break; 750 750 case DoubleRepUse: … … 773 773 break; 774 774 } 775 forNode(node).setType(SpecInt32 );775 forNode(node).setType(SpecInt32Only); 776 776 break; 777 777 case DoubleRepUse: … … 802 802 break; 803 803 } 804 forNode(node).setType(SpecInt32 );804 forNode(node).setType(SpecInt32Only); 805 805 break; 806 806 case DoubleRepUse: … … 833 833 } 834 834 } 835 forNode(node).setType(SpecInt32 );835 forNode(node).setType(SpecInt32Only); 836 836 break; 837 837 case DoubleRepUse: … … 909 909 } 910 910 if (producesInteger(node->arithRoundingMode())) 911 forNode(node).setType(SpecInt32 );911 forNode(node).setType(SpecInt32Only); 912 912 else 913 913 forNode(node).setType(typeOfDoubleRounding(forNode(node->child1()).m_type)); … … 1463 1463 1464 1464 case StringCharCodeAt: 1465 forNode(node).setType(SpecInt32 );1465 forNode(node).setType(SpecInt32Only); 1466 1466 break; 1467 1467 … … 1523 1523 forNode(node).makeHeapTop(); 1524 1524 } else 1525 forNode(node).setType(SpecInt32 );1525 forNode(node).setType(SpecInt32Only); 1526 1526 break; 1527 1527 case Array::Double: … … 1542 1542 break; 1543 1543 case Array::Int8Array: 1544 forNode(node).setType(SpecInt32 );1544 forNode(node).setType(SpecInt32Only); 1545 1545 break; 1546 1546 case Array::Int16Array: 1547 forNode(node).setType(SpecInt32 );1547 forNode(node).setType(SpecInt32Only); 1548 1548 break; 1549 1549 case Array::Int32Array: 1550 forNode(node).setType(SpecInt32 );1550 forNode(node).setType(SpecInt32Only); 1551 1551 break; 1552 1552 case Array::Uint8Array: 1553 forNode(node).setType(SpecInt32 );1553 forNode(node).setType(SpecInt32Only); 1554 1554 break; 1555 1555 case Array::Uint8ClampedArray: 1556 forNode(node).setType(SpecInt32 );1556 forNode(node).setType(SpecInt32Only); 1557 1557 break; 1558 1558 case Array::Uint16Array: 1559 forNode(node).setType(SpecInt32 );1559 forNode(node).setType(SpecInt32Only); 1560 1560 break; 1561 1561 case Array::Uint32Array: 1562 1562 if (node->shouldSpeculateInt32()) 1563 forNode(node).setType(SpecInt32 );1564 else if (enableInt52() && node->shouldSpeculate MachineInt())1565 forNode(node).setType(Spec MachineInt);1563 forNode(node).setType(SpecInt32Only); 1564 else if (enableInt52() && node->shouldSpeculateAnyInt()) 1565 forNode(node).setType(SpecAnyInt); 1566 1566 else 1567 forNode(node).setType(Spec Int52AsDouble);1567 forNode(node).setType(SpecAnyIntAsDouble); 1568 1568 break; 1569 1569 case Array::Float32Array: … … 1968 1968 1969 1969 case GetArgumentCount: 1970 forNode(node).setType(SpecInt32 );1970 forNode(node).setType(SpecInt32Only); 1971 1971 break; 1972 1972 1973 1973 case GetRestLength: 1974 forNode(node).setType(SpecInt32 );1974 forNode(node).setType(SpecInt32Only); 1975 1975 break; 1976 1976 … … 2125 2125 break; 2126 2126 } 2127 forNode(node).setType(SpecInt32 );2127 forNode(node).setType(SpecInt32Only); 2128 2128 break; 2129 2129 } … … 2351 2351 break; 2352 2352 } 2353 forNode(node).setType(SpecInt32 );2353 forNode(node).setType(SpecInt32Only); 2354 2354 break; 2355 2355 } … … 2633 2633 2634 2634 case GetEnumerableLength: { 2635 forNode(node).setType(SpecInt32 );2635 forNode(node).setType(SpecInt32Only); 2636 2636 break; 2637 2637 } -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp ¶
r199391 r200034 131 131 return; 132 132 case InferredType::Int32: 133 setType(SpecInt32 );133 setType(SpecInt32Only); 134 134 return; 135 135 case InferredType::Number: … … 179 179 m_value = jsDoubleNumber(m_value.asNumber()); 180 180 } 181 if (m_type & Spec MachineInt) {182 m_type &= ~Spec MachineInt;183 m_type |= Spec Int52AsDouble;181 if (m_type & SpecAnyInt) { 182 m_type &= ~SpecAnyInt; 183 m_type |= SpecAnyIntAsDouble; 184 184 } 185 185 if (m_type & ~SpecFullDouble) 186 186 DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for double node has type outside SpecFullDouble.\n").data()); 187 187 } else if (representation == NodeResultInt52) { 188 if (m_type & Spec Int52AsDouble) {189 m_type &= ~Spec Int52AsDouble;190 m_type |= SpecInt52 ;191 } 192 if (m_type & ~Spec MachineInt)193 DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for int52 node has type outside Spec MachineInt.\n").data());188 if (m_type & SpecAnyIntAsDouble) { 189 m_type &= ~SpecAnyIntAsDouble; 190 m_type |= SpecInt52Only; 191 } 192 if (m_type & ~SpecAnyInt) 193 DFG_CRASH(graph, node, toCString("Abstract value ", *this, " for int52 node has type outside SpecAnyInt.\n").data()); 194 194 } else { 195 if (m_type & SpecInt52 ) {196 m_type &= ~SpecInt52 ;197 m_type |= Spec Int52AsDouble;195 if (m_type & SpecInt52Only) { 196 m_type &= ~SpecInt52Only; 197 m_type |= SpecAnyIntAsDouble; 198 198 } 199 199 if (m_type & ~SpecBytecodeTop) … … 481 481 // This relaxes the assertion below a bit, since we don't know the representation of the 482 482 // node. 483 if (type & SpecInt52 )484 type |= Spec Int52AsDouble;483 if (type & SpecInt52Only) 484 type |= SpecAnyIntAsDouble; 485 485 ASSERT(mergeSpeculations(type, speculationFromValue(m_value)) == type); 486 486 } … … 503 503 if (isType(SpecBoolean)) 504 504 return ResultType::booleanType(); 505 if (isType(SpecInt32 ))505 if (isType(SpecInt32Only)) 506 506 return ResultType::numberTypeIsInt32(); 507 507 if (isType(SpecBytecodeNumber)) -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h ¶
r191224 r200034 377 377 // and the set of cell values that have the given structure. This abstract 378 378 // value is then the intersection of the m_structure and the set of values 379 // whose type is m_type. So, for example if m_type is SpecFinal|SpecInt32 and379 // whose type is m_type. So, for example if m_type is SpecFinal|SpecInt32Only and 380 380 // m_structure is [0x12345] then this abstract value corresponds to the set of 381 381 // all integers unified with the set of all objects with structure 0x12345. … … 420 420 return true; 421 421 422 // Constant folding always represents Int52's in a double (i.e. Int52AsDouble).423 // So speculationFromValue(value) for an Int52 value will return Int52AsDouble,422 // Constant folding always represents Int52's in a double (i.e. AnyIntAsDouble). 423 // So speculationFromValue(value) for an Int52 value will return AnyIntAsDouble, 424 424 // and that's fine - the type validates just fine. 425 425 SpeculatedType type = m_type; 426 if (type & SpecInt52 )427 type |= Spec Int52AsDouble;426 if (type & SpecInt52Only) 427 type |= SpecAnyIntAsDouble; 428 428 429 429 if (mergeSpeculations(type, speculationFromValue(value)) != type) -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGArgumentsUtilities.cpp ¶
r181993 r200034 77 77 Node* argumentCount; 78 78 if (!inlineCallFrame) 79 argumentCount = insertionSet.insertNode(nodeIndex, SpecInt32 , GetArgumentCount, origin);79 argumentCount = insertionSet.insertNode(nodeIndex, SpecInt32Only, GetArgumentCount, origin); 80 80 else { 81 81 VirtualRegister argumentCountRegister(inlineCallFrame->stackOffset + JSStack::ArgumentCount); 82 82 83 83 argumentCount = insertionSet.insertNode( 84 nodeIndex, SpecInt32 , GetStack, origin,84 nodeIndex, SpecInt32Only, GetStack, origin, 85 85 OpInfo(graph.m_stackAccessData.add(argumentCountRegister, FlushedInt32))); 86 86 } 87 87 88 88 return insertionSet.insertNode( 89 nodeIndex, SpecInt32 , ArithSub, origin, OpInfo(Arith::Unchecked),89 nodeIndex, SpecInt32Only, ArithSub, origin, OpInfo(Arith::Unchecked), 90 90 Edge(argumentCount, Int32Use), 91 91 insertionSet.insertConstantForUse( -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp ¶
r199801 r200034 1745 1745 // matter very much, since our use of a SetArgument and Flushes for this local slot is 1746 1746 // mostly just a formality. 1747 countVariable->predict(SpecInt32 );1747 countVariable->predict(SpecInt32Only); 1748 1748 countVariable->mergeIsProfitableToUnbox(true); 1749 1749 Node* setArgumentCount = addToGraph(SetArgument, OpInfo(countVariable)); … … 2347 2347 Node* node = get(virtualRegisterForArgument(i, registerOffset)); 2348 2348 if (node->hasHeapPrediction()) 2349 node->setHeapPrediction(SpecInt32 );2349 node->setHeapPrediction(SpecInt32Only); 2350 2350 } 2351 2351 set(VirtualRegister(resultOperand), addToGraph(JSConstant, OpInfo(m_constantUndefined))); -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp ¶
r199967 r200034 220 220 break; 221 221 } 222 if (m_graph.unaryArithShouldSpeculate MachineInt(node, FixupPass)) {222 if (m_graph.unaryArithShouldSpeculateAnyInt(node, FixupPass)) { 223 223 fixEdge<Int52RepUse>(node->child1()); 224 224 if (bytecodeCanIgnoreNegativeZero(node->arithNodeFlags())) … … 256 256 break; 257 257 } 258 if (m_graph.binaryArithShouldSpeculate MachineInt(node, FixupPass)) {258 if (m_graph.binaryArithShouldSpeculateAnyInt(node, FixupPass)) { 259 259 fixEdge<Int52RepUse>(leftChild); 260 260 fixEdge<Int52RepUse>(rightChild); … … 447 447 } 448 448 if (enableInt52() 449 && Node::shouldSpeculate MachineInt(node->child1().node(), node->child2().node())) {449 && Node::shouldSpeculateAnyInt(node->child1().node(), node->child2().node())) { 450 450 fixEdge<Int52RepUse>(node->child1()); 451 451 fixEdge<Int52RepUse>(node->child2()); … … 552 552 } 553 553 if (enableInt52() 554 && Node::shouldSpeculate MachineInt(node->child1().node(), node->child2().node())) {554 && Node::shouldSpeculateAnyInt(node->child1().node(), node->child2().node())) { 555 555 fixEdge<Int52RepUse>(node->child1()); 556 556 fixEdge<Int52RepUse>(node->child2()); … … 764 764 if (node->shouldSpeculateInt32()) 765 765 break; 766 if (node->shouldSpeculate MachineInt() && enableInt52())766 if (node->shouldSpeculateAnyInt() && enableInt52()) 767 767 node->setResult(NodeResultInt52); 768 768 else … … 830 830 if (child3->shouldSpeculateInt32()) 831 831 fixIntOrBooleanEdge(child3); 832 else if (child3->shouldSpeculate MachineInt())832 else if (child3->shouldSpeculateAnyInt()) 833 833 fixEdge<Int52RepUse>(child3); 834 834 else … … 870 870 m_graph, node, 871 871 node->child1()->prediction() & SpecCell, 872 SpecInt32 ,872 SpecInt32Only, 873 873 node->child2()->prediction())); 874 874 blessArrayOperation(node->child1(), Edge(), node->child3()); … … 1434 1434 RefPtr<TypeSet> typeSet = node->typeLocation()->m_instructionTypeSet; 1435 1435 RuntimeTypeMask seenTypes = typeSet->seenTypes(); 1436 if (typeSet->doesTypeConformTo(Type MachineInt)) {1436 if (typeSet->doesTypeConformTo(TypeAnyInt)) { 1437 1437 if (node->child1()->shouldSpeculateInt32()) 1438 1438 fixEdge<Int32Use>(node->child1()); 1439 1439 else 1440 fixEdge< MachineIntUse>(node->child1());1440 fixEdge<AnyIntUse>(node->child1()); 1441 1441 node->remove(); 1442 } else if (typeSet->doesTypeConformTo(TypeNumber | Type MachineInt)) {1442 } else if (typeSet->doesTypeConformTo(TypeNumber | TypeAnyInt)) { 1443 1443 fixEdge<NumberUse>(node->child1()); 1444 1444 node->remove(); … … 1679 1679 } 1680 1680 1681 if (enableInt52() && node->child1()->shouldSpeculate MachineInt()) {1681 if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) { 1682 1682 fixEdge<Int52RepUse>(node->child1()); 1683 1683 node->convertToIdentity(); … … 2033 2033 break; 2034 2034 case Int52RepUse: 2035 if (is MachineIntSpeculation(variable->prediction()))2035 if (isAnyIntSpeculation(variable->prediction())) 2036 2036 m_profitabilityChanged |= variable->mergeIsProfitableToUnbox(true); 2037 2037 break; … … 2110 2110 2111 2111 UseKind useKind; 2112 if (node->shouldSpeculate MachineInt())2112 if (node->shouldSpeculateAnyInt()) 2113 2113 useKind = Int52RepUse; 2114 2114 else if (node->shouldSpeculateNumber()) … … 2117 2117 useKind = NotCellUse; 2118 2118 Node* newNode = m_insertionSet.insertNode( 2119 m_indexInBlock, SpecInt32 , ValueToInt32, m_currentNode->origin,2119 m_indexInBlock, SpecInt32Only, ValueToInt32, m_currentNode->origin, 2120 2120 Edge(node, useKind)); 2121 2121 observeUseKindOnNode(node, useKind); … … 2138 2138 useKind = UntypedUse; 2139 2139 Node* newNode = m_insertionSet.insertNode( 2140 m_indexInBlock, SpecInt32 , BooleanToNumber, m_currentNode->origin,2140 m_indexInBlock, SpecInt32Only, BooleanToNumber, m_currentNode->origin, 2141 2141 Edge(node, useKind)); 2142 2142 observeUseKindOnNode(node, useKind); … … 2159 2159 useKind = UntypedUse; 2160 2160 Node* newNode = m_insertionSet.insertNode( 2161 m_indexInBlock, SpecInt32 , BooleanToNumber, m_currentNode->origin,2161 m_indexInBlock, SpecInt32Only, BooleanToNumber, m_currentNode->origin, 2162 2162 Edge(node, useKind)); 2163 2163 observeUseKindOnNode(node, useKind); … … 2177 2177 ASSERT(value.isInt32()); 2178 2178 edge.setNode(m_insertionSet.insertNode( 2179 m_indexInBlock, SpecInt32 , JSConstant, m_currentNode->origin,2179 m_indexInBlock, SpecInt32Only, JSConstant, m_currentNode->origin, 2180 2180 OpInfo(m_graph.freeze(value)))); 2181 2181 } … … 2207 2207 } 2208 2208 2209 if (m_graph.addShouldSpeculate MachineInt(node)) {2209 if (m_graph.addShouldSpeculateAnyInt(node)) { 2210 2210 fixEdge<Int52RepUse>(node->child1()); 2211 2211 fixEdge<Int52RepUse>(node->child2()); … … 2280 2280 Node* storage = checkArray(arrayMode, origin, child, 0, lengthNeedsStorage); 2281 2281 return m_insertionSet.insertNode( 2282 m_indexInBlock, SpecInt32 , GetArrayLength, origin,2282 m_indexInBlock, SpecInt32Only, GetArrayLength, origin, 2283 2283 OpInfo(arrayMode.asWord()), Edge(child, KnownCellUse), Edge(storage)); 2284 2284 } … … 2370 2370 case DoubleRepUse: 2371 2371 case DoubleRepRealUse: 2372 case DoubleRep MachineIntUse: {2372 case DoubleRepAnyIntUse: { 2373 2373 if (edge->hasDoubleResult()) 2374 2374 break; … … 2380 2380 } else if (edge->hasInt52Result()) { 2381 2381 result = m_insertionSet.insertNode( 2382 indexForChecks, Spec Int52AsDouble, DoubleRep, originForChecks,2382 indexForChecks, SpecAnyIntAsDouble, DoubleRep, originForChecks, 2383 2383 Edge(edge.node(), Int52RepUse)); 2384 2384 } else { … … 2404 2404 break; 2405 2405 2406 if (edge->is MachineIntConstant()) {2406 if (edge->isAnyIntConstant()) { 2407 2407 result = m_insertionSet.insertNode( 2408 indexForChecks, Spec MachineInt, Int52Constant, originForChecks,2408 indexForChecks, SpecAnyInt, Int52Constant, originForChecks, 2409 2409 OpInfo(edge->constant())); 2410 2410 } else if (edge->hasDoubleResult()) { 2411 2411 result = m_insertionSet.insertNode( 2412 indexForChecks, Spec MachineInt, Int52Rep, originForChecks,2413 Edge(edge.node(), DoubleRep MachineIntUse));2412 indexForChecks, SpecAnyInt, Int52Rep, originForChecks, 2413 Edge(edge.node(), DoubleRepAnyIntUse)); 2414 2414 } else if (edge->shouldSpeculateInt32ForArithmetic()) { 2415 2415 result = m_insertionSet.insertNode( 2416 indexForChecks, SpecInt32 , Int52Rep, originForChecks,2416 indexForChecks, SpecInt32Only, Int52Rep, originForChecks, 2417 2417 Edge(edge.node(), Int32Use)); 2418 2418 } else { 2419 2419 result = m_insertionSet.insertNode( 2420 indexForChecks, Spec MachineInt, Int52Rep, originForChecks,2421 Edge(edge.node(), MachineIntUse));2420 indexForChecks, SpecAnyInt, Int52Rep, originForChecks, 2421 Edge(edge.node(), AnyIntUse)); 2422 2422 } 2423 2423 … … 2436 2436 } else { 2437 2437 result = m_insertionSet.insertNode( 2438 indexForChecks, SpecInt32 | SpecInt52AsDouble, ValueRep,2438 indexForChecks, SpecInt32Only | SpecAnyIntAsDouble, ValueRep, 2439 2439 originForChecks, Edge(edge.node(), Int52RepUse)); 2440 2440 } -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGGraph.h ¶
r198981 r200034 264 264 } 265 265 266 bool addShouldSpeculate MachineInt(Node* add)266 bool addShouldSpeculateAnyInt(Node* add) 267 267 { 268 268 if (!enableInt52()) … … 272 272 Node* right = add->child2().node(); 273 273 274 bool speculation = Node::shouldSpeculate MachineInt(left, right);274 bool speculation = Node::shouldSpeculateAnyInt(left, right); 275 275 return speculation && !hasExitSite(add, Int52Overflow); 276 276 } … … 285 285 } 286 286 287 bool binaryArithShouldSpeculate MachineInt(Node* node, PredictionPass pass)287 bool binaryArithShouldSpeculateAnyInt(Node* node, PredictionPass pass) 288 288 { 289 289 if (!enableInt52()) … … 293 293 Node* right = node->child2().node(); 294 294 295 return Node::shouldSpeculate MachineInt(left, right)295 return Node::shouldSpeculateAnyInt(left, right) 296 296 && node->canSpeculateInt52(pass) 297 297 && !hasExitSite(node, Int52Overflow); … … 304 304 } 305 305 306 bool unaryArithShouldSpeculate MachineInt(Node* node, PredictionPass pass)306 bool unaryArithShouldSpeculateAnyInt(Node* node, PredictionPass pass) 307 307 { 308 308 if (!enableInt52()) 309 309 return false; 310 return node->child1()->shouldSpeculate MachineInt()310 return node->child1()->shouldSpeculateAnyInt() 311 311 && node->canSpeculateInt52(pass) 312 312 && !hasExitSite(node, Int52Overflow); -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.cpp ¶
r198979 r200034 119 119 switch (format) { 120 120 case FlushedInt32: 121 root->valuesAtHead.argument(i).setType(SpecInt32 );121 root->valuesAtHead.argument(i).setType(SpecInt32Only); 122 122 break; 123 123 case FlushedBoolean: -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp ¶
r199303 r200034 543 543 break; 544 544 case FlushedInt52: 545 entry->m_localsForced MachineInt.set(local);545 entry->m_localsForcedAnyInt.set(local); 546 546 break; 547 547 default: -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGNode.cpp ¶
r197833 r200034 133 133 switch (input) { 134 134 case NodeResultDouble: 135 child1().setUseKind(DoubleRep MachineIntUse);135 child1().setUseKind(DoubleRepAnyIntUse); 136 136 return; 137 137 case NodeResultJS: 138 child1().setUseKind( MachineIntUse);138 child1().setUseKind(AnyIntUse); 139 139 return; 140 140 default: -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGNode.h ¶
r199699 r200034 682 682 } 683 683 684 bool is MachineIntConstant()685 { 686 return isConstant() && constant()->value().is MachineInt();684 bool isAnyIntConstant() 685 { 686 return isConstant() && constant()->value().isAnyInt(); 687 687 } 688 688 689 int64_t as MachineInt()690 { 691 return asJSValue().as MachineInt();689 int64_t asAnyInt() 690 { 691 return asJSValue().asAnyInt(); 692 692 } 693 693 … … 1921 1921 } 1922 1922 1923 bool shouldSpeculate MachineInt()1924 { 1925 return is MachineIntSpeculation(prediction());1923 bool shouldSpeculateAnyInt() 1924 { 1925 return isAnyIntSpeculation(prediction()); 1926 1926 } 1927 1927 … … 2154 2154 } 2155 2155 2156 static bool shouldSpeculate MachineInt(Node* op1, Node* op2)2157 { 2158 return op1->shouldSpeculate MachineInt() && op2->shouldSpeculateMachineInt();2156 static bool shouldSpeculateAnyInt(Node* op1, Node* op2) 2157 { 2158 return op1->shouldSpeculateAnyInt() && op2->shouldSpeculateAnyInt(); 2159 2159 } 2160 2160 -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp ¶
r191058 r200034 68 68 if (reg.isLocal() && m_localsForcedDouble.get(reg.toLocal())) 69 69 out.print(", forced double"); 70 if (reg.isLocal() && m_localsForced MachineInt.get(reg.toLocal()))70 if (reg.isLocal() && m_localsForcedAnyInt.get(reg.toLocal())) 71 71 out.print(", forced machine int"); 72 72 out.print(")"); … … 214 214 continue; 215 215 } 216 if (entry->m_localsForced MachineInt.get(local)) {217 if (!exec->registers()[localOffset].asanUnsafeJSValue().is MachineInt()) {216 if (entry->m_localsForcedAnyInt.get(local)) { 217 if (!exec->registers()[localOffset].asanUnsafeJSValue().isAnyInt()) { 218 218 if (Options::verboseOSR()) { 219 219 dataLog( … … 286 286 } 287 287 288 if (entry->m_localsForced MachineInt.get(reg.toLocal())) {289 *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().as MachineInt() << JSValue::int52ShiftAmount;288 if (entry->m_localsForcedAnyInt.get(reg.toLocal())) { 289 *bitwise_cast<int64_t*>(pivot + index) = exec->registers()[reg.offset()].asanUnsafeJSValue().asAnyInt() << JSValue::int52ShiftAmount; 290 290 continue; 291 291 } -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGOSREntry.h ¶
r186691 r200034 58 58 // Use bitvectors here because they tend to only require one word. 59 59 BitVector m_localsForcedDouble; 60 BitVector m_localsForced MachineInt;60 BitVector m_localsForcedAnyInt; 61 61 Vector<OSREntryReshuffling> m_reshufflings; 62 62 BitVector m_machineStackUsed; -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp ¶
r199967 r200034 156 156 VariableAccessData* variable = node->variableAccessData(); 157 157 SpeculatedType prediction = variable->prediction(); 158 if (!variable->couldRepresentInt52() && (prediction & SpecInt52 ))159 prediction = (prediction | Spec Int52AsDouble) & ~SpecInt52;158 if (!variable->couldRepresentInt52() && (prediction & SpecInt52Only)) 159 prediction = (prediction | SpecAnyIntAsDouble) & ~SpecInt52Only; 160 160 if (prediction) 161 161 changed |= mergePrediction(prediction); … … 171 171 case UInt32ToNumber: { 172 172 if (node->canSpeculateInt32(m_pass)) 173 changed |= mergePrediction(SpecInt32 );173 changed |= mergePrediction(SpecInt32Only); 174 174 else if (enableInt52()) 175 changed |= mergePrediction(Spec MachineInt);175 changed |= mergePrediction(SpecAnyInt); 176 176 else 177 177 changed |= mergePrediction(SpecBytecodeNumber); … … 187 187 && isFullNumberOrBooleanSpeculationExpectingDefined(right)) { 188 188 if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32) 189 changed |= mergePrediction(SpecInt32 );190 else if (m_graph.addShouldSpeculate MachineInt(node))191 changed |= mergePrediction(SpecInt52 );189 changed |= mergePrediction(SpecInt32Only); 190 else if (m_graph.addShouldSpeculateAnyInt(node)) 191 changed |= mergePrediction(SpecInt52Only); 192 192 else 193 193 changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right)); … … 198 198 changed |= mergePrediction(SpecString); 199 199 } else 200 changed |= mergePrediction(SpecString | SpecInt32 | SpecBytecodeDouble);200 changed |= mergePrediction(SpecString | SpecInt32Only | SpecBytecodeDouble); 201 201 } 202 202 break; … … 209 209 if (left && right) { 210 210 if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32) 211 changed |= mergePrediction(SpecInt32 );212 else if (m_graph.addShouldSpeculate MachineInt(node))213 changed |= mergePrediction(SpecInt52 );211 changed |= mergePrediction(SpecInt32Only); 212 else if (m_graph.addShouldSpeculateAnyInt(node)) 213 changed |= mergePrediction(SpecInt52Only); 214 214 else 215 215 changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right)); … … 226 226 && isFullNumberOrBooleanSpeculationExpectingDefined(right)) { 227 227 if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32) 228 changed |= mergePrediction(SpecInt32 );229 else if (m_graph.addShouldSpeculate MachineInt(node))230 changed |= mergePrediction(SpecInt52 );228 changed |= mergePrediction(SpecInt32Only); 229 else if (m_graph.addShouldSpeculateAnyInt(node)) 230 changed |= mergePrediction(SpecInt52Only); 231 231 else 232 232 changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right)); 233 233 } else 234 changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);234 changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble); 235 235 } 236 236 break; … … 240 240 if (node->child1()->prediction()) { 241 241 if (m_graph.unaryArithShouldSpeculateInt32(node, m_pass)) 242 changed |= mergePrediction(SpecInt32 );243 else if (m_graph.unaryArithShouldSpeculate MachineInt(node, m_pass))244 changed |= mergePrediction(SpecInt52 );242 changed |= mergePrediction(SpecInt32Only); 243 else if (m_graph.unaryArithShouldSpeculateAnyInt(node, m_pass)) 244 changed |= mergePrediction(SpecInt52Only); 245 245 else 246 246 changed |= mergePrediction(speculatedDoubleTypeForPrediction(node->child1()->prediction())); … … 256 256 if (Node::shouldSpeculateInt32OrBooleanForArithmetic(node->child1().node(), node->child2().node()) 257 257 && node->canSpeculateInt32(m_pass)) 258 changed |= mergePrediction(SpecInt32 );258 changed |= mergePrediction(SpecInt32Only); 259 259 else 260 260 changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right)); … … 271 271 && isFullNumberOrBooleanSpeculationExpectingDefined(right)) { 272 272 if (m_graph.binaryArithShouldSpeculateInt32(node, m_pass)) 273 changed |= mergePrediction(SpecInt32 );274 else if (m_graph.binaryArithShouldSpeculate MachineInt(node, m_pass))275 changed |= mergePrediction(SpecInt52 );273 changed |= mergePrediction(SpecInt32Only); 274 else if (m_graph.binaryArithShouldSpeculateAnyInt(node, m_pass)) 275 changed |= mergePrediction(SpecInt52Only); 276 276 else 277 277 changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right)); 278 278 } else { 279 279 if (node->mayHaveNonIntResult()) 280 changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);280 changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble); 281 281 else 282 changed |= mergePrediction(SpecInt32 );282 changed |= mergePrediction(SpecInt32Only); 283 283 } 284 284 } … … 295 295 && isFullNumberOrBooleanSpeculationExpectingDefined(right)) { 296 296 if (m_graph.binaryArithShouldSpeculateInt32(node, m_pass)) 297 changed |= mergePrediction(SpecInt32 );297 changed |= mergePrediction(SpecInt32Only); 298 298 else 299 299 changed |= mergePrediction(SpecBytecodeDouble); 300 300 } else 301 changed |= mergePrediction(SpecInt32 | SpecBytecodeDouble);301 changed |= mergePrediction(SpecInt32Only | SpecBytecodeDouble); 302 302 } 303 303 break; … … 309 309 case ArithTrunc: { 310 310 if (isInt32OrBooleanSpeculation(node->getHeapPrediction()) && m_graph.roundShouldSpeculateInt32(node, m_pass)) 311 changed |= setPrediction(SpecInt32 );311 changed |= setPrediction(SpecInt32Only); 312 312 else 313 313 changed |= setPrediction(SpecBytecodeDouble); … … 319 319 if (isInt32OrBooleanSpeculationForArithmetic(child) 320 320 && node->canSpeculateInt32(m_pass)) 321 changed |= mergePrediction(SpecInt32 );321 changed |= mergePrediction(SpecInt32Only); 322 322 else 323 323 changed |= mergePrediction(speculatedDoubleTypeForPrediction(child)); … … 338 338 case Array::Int32: 339 339 if (arrayMode.isOutOfBounds()) 340 changed |= mergePrediction(node->getHeapPrediction() | SpecInt32 );340 changed |= mergePrediction(node->getHeapPrediction() | SpecInt32Only); 341 341 else 342 changed |= mergePrediction(SpecInt32 );342 changed |= mergePrediction(SpecInt32Only); 343 343 break; 344 344 case Array::Double: … … 354 354 case Array::Uint32Array: 355 355 if (isInt32SpeculationForArithmetic(node->getHeapPrediction())) 356 changed |= mergePrediction(SpecInt32 );356 changed |= mergePrediction(SpecInt32Only); 357 357 else if (enableInt52()) 358 changed |= mergePrediction(Spec MachineInt);358 changed |= mergePrediction(SpecAnyInt); 359 359 else 360 changed |= mergePrediction(SpecInt32 | SpecInt52AsDouble);360 changed |= mergePrediction(SpecInt32Only | SpecAnyIntAsDouble); 361 361 break; 362 362 case Array::Int8Array: … … 365 365 case Array::Uint16Array: 366 366 case Array::Int32Array: 367 changed |= mergePrediction(SpecInt32 );367 changed |= mergePrediction(SpecInt32Only); 368 368 break; 369 369 default: … … 384 384 385 385 if (node->child1()->shouldSpeculateInt32()) { 386 changed |= mergePrediction(SpecInt32 );386 changed |= mergePrediction(SpecInt32Only); 387 387 break; 388 388 } 389 389 390 if (enableInt52() && node->child1()->shouldSpeculate MachineInt()) {391 changed |= mergePrediction(Spec MachineInt);390 if (enableInt52() && node->child1()->shouldSpeculateAnyInt()) { 391 changed |= mergePrediction(SpecAnyInt); 392 392 break; 393 393 } 394 394 395 395 if (node->child1()->shouldSpeculateNumber()) { 396 changed |= mergePrediction(Spec MachineInt);396 changed |= mergePrediction(SpecAnyInt); 397 397 break; 398 398 } … … 483 483 && isFullNumberSpeculation(right) 484 484 && !m_graph.addShouldSpeculateInt32(node, m_pass) 485 && !m_graph.addShouldSpeculate MachineInt(node))485 && !m_graph.addShouldSpeculateAnyInt(node)) 486 486 ballot = VoteDouble; 487 487 else … … 502 502 && isFullNumberSpeculation(right) 503 503 && !m_graph.binaryArithShouldSpeculateInt32(node, m_pass) 504 && !m_graph.binaryArithShouldSpeculate MachineInt(node, m_pass))504 && !m_graph.binaryArithShouldSpeculateAnyInt(node, m_pass)) 505 505 ballot = VoteDouble; 506 506 else … … 559 559 node->variableAccessData()->vote(VoteDouble, weight); 560 560 else if (!isFullNumberSpeculation(prediction) 561 || isInt32Speculation(prediction) || is MachineIntSpeculation(prediction))561 || isInt32Speculation(prediction) || isAnyIntSpeculation(prediction)) 562 562 node->variableAccessData()->vote(VoteValue, weight); 563 563 break; … … 644 644 case JSConstant: { 645 645 SpeculatedType type = speculationFromValue(m_currentNode->asJSValue()); 646 if (type == Spec Int52AsDouble && enableInt52())647 type = SpecInt52 ;646 if (type == SpecAnyIntAsDouble && enableInt52()) 647 type = SpecInt52Only; 648 648 setPrediction(type); 649 649 break; … … 662 662 case ArithIMul: 663 663 case ArithClz32: { 664 setPrediction(SpecInt32 );664 setPrediction(SpecInt32Only); 665 665 break; 666 666 } … … 718 718 719 719 case GetArgumentCount: { 720 setPrediction(SpecInt32 );720 setPrediction(SpecInt32Only); 721 721 break; 722 722 } 723 723 724 724 case GetRestLength: { 725 setPrediction(SpecInt32 );725 setPrediction(SpecInt32Only); 726 726 break; 727 727 } … … 729 729 case GetTypedArrayByteOffset: 730 730 case GetArrayLength: { 731 setPrediction(SpecInt32 );731 setPrediction(SpecInt32Only); 732 732 break; 733 733 } 734 734 735 735 case StringCharCodeAt: { 736 setPrediction(SpecInt32 );736 setPrediction(SpecInt32Only); 737 737 break; 738 738 } … … 867 867 case FiatInt52: { 868 868 RELEASE_ASSERT(enableInt52()); 869 setPrediction(Spec MachineInt);869 setPrediction(SpecAnyInt); 870 870 break; 871 871 } … … 880 880 881 881 case GetEnumerableLength: { 882 setPrediction(SpecInt32 );882 setPrediction(SpecInt32Only); 883 883 break; 884 884 } -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp ¶
r198364 r200034 84 84 if (m_node->arrayMode().typedArrayType() != NotTypedArray && m_node->arrayMode().isOutOfBounds()) { 85 85 Node* length = m_insertionSet.insertNode( 86 m_nodeIndex, SpecInt32 , GetArrayLength, m_node->origin,86 m_nodeIndex, SpecInt32Only, GetArrayLength, m_node->origin, 87 87 OpInfo(m_node->arrayMode().asWord()), base, storage); 88 88 … … 107 107 108 108 Node* length = m_insertionSet.insertNode( 109 m_nodeIndex, SpecInt32 , GetArrayLength, m_node->origin,109 m_nodeIndex, SpecInt32Only, GetArrayLength, m_node->origin, 110 110 OpInfo(m_node->arrayMode().asWord()), base, storage); 111 111 m_insertionSet.insertNode( 112 m_nodeIndex, SpecInt32 , CheckInBounds, m_node->origin,112 m_nodeIndex, SpecInt32Only, CheckInBounds, m_node->origin, 113 113 index, Edge(length, KnownInt32Use)); 114 114 return true; -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h ¶
r199967 r200034 70 70 case OtherUse: 71 71 case MiscUse: 72 case MachineIntUse:73 case DoubleRep MachineIntUse:72 case AnyIntUse: 73 case DoubleRepAnyIntUse: 74 74 return; 75 75 76 76 case KnownInt32Use: 77 if (m_state.forNode(edge).m_type & ~SpecInt32 )77 if (m_state.forNode(edge).m_type & ~SpecInt32Only) 78 78 m_result = false; 79 79 return; -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp ¶
r199967 r200034 610 610 #if USE(JSVALUE64) 611 611 case SetInt52Constant: 612 m_jit.move(Imm64(plan.node()->as MachineInt() << JSValue::int52ShiftAmount), plan.gpr());612 m_jit.move(Imm64(plan.node()->asAnyInt() << JSValue::int52ShiftAmount), plan.gpr()); 613 613 break; 614 614 case SetStrictInt52Constant: 615 m_jit.move(Imm64(plan.node()->as MachineInt()), plan.gpr());615 m_jit.move(Imm64(plan.node()->asAnyInt()), plan.gpr()); 616 616 break; 617 617 #endif // USE(JSVALUE64) … … 2637 2637 2638 2638 #if USE(JSVALUE64) 2639 if (node->shouldSpeculate MachineInt()) {2639 if (node->shouldSpeculateAnyInt()) { 2640 2640 m_jit.zeroExtend32ToPtr(resultReg, resultReg); 2641 2641 strictInt52Result(resultReg, node); … … 3562 3562 // Will we need an overflow check? If we can prove that neither input can be 3563 3563 // Int52 then the overflow check will not be necessary. 3564 if (!m_state.forNode(node->child1()).couldBeType(SpecInt52 )3565 && !m_state.forNode(node->child2()).couldBeType(SpecInt52 )) {3564 if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only) 3565 && !m_state.forNode(node->child2()).couldBeType(SpecInt52Only)) { 3566 3566 SpeculateWhicheverInt52Operand op1(this, node->child1()); 3567 3567 SpeculateWhicheverInt52Operand op2(this, node->child2(), op1); … … 3754 3754 // Will we need an overflow check? If we can prove that neither input can be 3755 3755 // Int52 then the overflow check will not be necessary. 3756 if (!m_state.forNode(node->child1()).couldBeType(SpecInt52 )3757 && !m_state.forNode(node->child2()).couldBeType(SpecInt52 )) {3756 if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only) 3757 && !m_state.forNode(node->child2()).couldBeType(SpecInt52Only)) { 3758 3758 SpeculateWhicheverInt52Operand op1(this, node->child1()); 3759 3759 SpeculateWhicheverInt52Operand op2(this, node->child2(), op1); … … 3876 3876 ASSERT(shouldCheckOverflow(node->arithMode())); 3877 3877 3878 if (!m_state.forNode(node->child1()).couldBeType(SpecInt52 )) {3878 if (!m_state.forNode(node->child1()).couldBeType(SpecInt52Only)) { 3879 3879 SpeculateWhicheverInt52Operand op1(this, node->child1()); 3880 3880 GPRTemporary result(this); … … 6901 6901 void SpeculativeJIT::speculateInt32(Edge edge) 6902 6902 { 6903 if (!needsTypeCheck(edge, SpecInt32 ))6903 if (!needsTypeCheck(edge, SpecInt32Only)) 6904 6904 return; 6905 6905 … … 6921 6921 GPRReg tagGPR = value.tagGPR(); 6922 6922 DFG_TYPE_CHECK( 6923 value.jsValueRegs(), edge, ~SpecInt32 ,6923 value.jsValueRegs(), edge, ~SpecInt32Only, 6924 6924 m_jit.branch32(MacroAssembler::Equal, tagGPR, TrustedImm32(JSValue::Int32Tag))); 6925 6925 DFG_TYPE_CHECK( … … 7249 7249 #else 7250 7250 DFG_TYPE_CHECK( 7251 regs, edge, ~SpecInt32 ,7251 regs, edge, ~SpecInt32Only, 7252 7252 m_jit.branch32(MacroAssembler::Equal, regs.tagGPR(), MacroAssembler::TrustedImm32(JSValue::Int32Tag))); 7253 7253 DFG_TYPE_CHECK( … … 7272 7272 break; 7273 7273 case KnownInt32Use: 7274 ASSERT(!needsTypeCheck(edge, SpecInt32 ));7274 ASSERT(!needsTypeCheck(edge, SpecInt32Only)); 7275 7275 break; 7276 7276 case DoubleRepUse: … … 7278 7278 break; 7279 7279 case Int52RepUse: 7280 ASSERT(!needsTypeCheck(edge, Spec MachineInt));7280 ASSERT(!needsTypeCheck(edge, SpecAnyInt)); 7281 7281 break; 7282 7282 case KnownCellUse: … … 7302 7302 break; 7303 7303 #if USE(JSVALUE64) 7304 case MachineIntUse:7305 speculate MachineInt(edge);7306 break; 7307 case DoubleRep MachineIntUse:7308 speculateDoubleRep MachineInt(edge);7304 case AnyIntUse: 7305 speculateAnyInt(edge); 7306 break; 7307 case DoubleRepAnyIntUse: 7308 speculateDoubleRepAnyInt(edge); 7309 7309 break; 7310 7310 #endif -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h ¶
r199867 r200034 565 565 } 566 566 567 bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32 ); }567 bool isKnownInteger(Node* node) { return m_state.forNode(node).isType(SpecInt32Only); } 568 568 bool isKnownCell(Node* node) { return m_state.forNode(node).isType(SpecCell); } 569 569 570 bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32 ); }570 bool isKnownNotInteger(Node* node) { return !(m_state.forNode(node).m_type & SpecInt32Only); } 571 571 bool isKnownNotNumber(Node* node) { return !(m_state.forNode(node).m_type & SpecFullNumber); } 572 572 bool isKnownNotCell(Node* node) { return !(m_state.forNode(node).m_type & SpecCell); } … … 2675 2675 void speculateInt32(Edge); 2676 2676 #if USE(JSVALUE64) 2677 void convert MachineInt(Edge, GPRReg resultGPR);2678 void speculate MachineInt(Edge);2679 void speculateDoubleRep MachineInt(Edge);2677 void convertAnyInt(Edge, GPRReg resultGPR); 2678 void speculateAnyInt(Edge); 2679 void speculateDoubleRepAnyInt(Edge); 2680 2680 #endif // USE(JSVALUE64) 2681 2681 void speculateNumber(Edge); -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp ¶
r199967 r200034 944 944 AbstractValue& value = m_state.forNode(edge); 945 945 SpeculatedType type = value.m_type; 946 ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32 ));947 948 m_interpreter.filter(value, SpecInt32 );946 ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32Only)); 947 948 m_interpreter.filter(value, SpecInt32Only); 949 949 if (value.isClear()) { 950 950 terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0); … … 973 973 974 974 // If we know this was spilled as an integer we can fill without checking. 975 if (type & ~SpecInt32 )975 if (type & ~SpecInt32Only) 976 976 speculationCheck(BadType, JSValueSource(JITCompiler::addressFor(virtualRegister)), edge, m_jit.branch32(MacroAssembler::NotEqual, JITCompiler::tagFor(virtualRegister), TrustedImm32(JSValue::Int32Tag))); 977 977 … … 991 991 m_gprs.lock(tagGPR); 992 992 m_gprs.lock(payloadGPR); 993 if (type & ~SpecInt32 )993 if (type & ~SpecInt32Only) 994 994 speculationCheck(BadType, JSValueRegs(tagGPR, payloadGPR), edge, m_jit.branch32(MacroAssembler::NotEqual, tagGPR, TrustedImm32(JSValue::Int32Tag))); 995 995 m_gprs.unlock(tagGPR); … … 1900 1900 } 1901 1901 case Int52RepUse: 1902 case MachineIntUse:1903 case DoubleRep MachineIntUse: {1902 case AnyIntUse: 1903 case DoubleRepAnyIntUse: { 1904 1904 RELEASE_ASSERT_NOT_REACHED(); 1905 1905 break; -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp ¶
r199967 r200034 902 902 AbstractValue& value = m_state.forNode(edge); 903 903 SpeculatedType type = value.m_type; 904 ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32 ));905 906 m_interpreter.filter(value, SpecInt32 );904 ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32Only)); 905 906 m_interpreter.filter(value, SpecInt32Only); 907 907 if (value.isClear()) { 908 908 terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0); … … 959 959 960 960 case DataFormatJS: { 961 DFG_ASSERT(m_jit.graph(), m_currentNode, !(type & SpecInt52 ));961 DFG_ASSERT(m_jit.graph(), m_currentNode, !(type & SpecInt52Only)); 962 962 // Check the value is an integer. 963 963 GPRReg gpr = info.gpr(); 964 964 m_gprs.lock(gpr); 965 if (type & ~SpecInt32 )965 if (type & ~SpecInt32Only) 966 966 speculationCheck(BadType, JSValueRegs(gpr), edge, m_jit.branch64(MacroAssembler::Below, gpr, GPRInfo::tagTypeNumberRegister)); 967 967 info.fillJSValue(*m_stream, gpr, DataFormatJSInt32); … … 1046 1046 AbstractValue& value = m_state.forNode(edge); 1047 1047 1048 m_interpreter.filter(value, Spec MachineInt);1048 m_interpreter.filter(value, SpecAnyInt); 1049 1049 if (value.isClear()) { 1050 1050 terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0); … … 1061 1061 if (edge->hasConstant()) { 1062 1062 JSValue jsValue = edge->asJSValue(); 1063 ASSERT(jsValue.is MachineInt());1063 ASSERT(jsValue.isAnyInt()); 1064 1064 m_gprs.retain(gpr, virtualRegister, SpillOrderConstant); 1065 int64_t value = jsValue.as MachineInt();1065 int64_t value = jsValue.asAnyInt(); 1066 1066 if (desiredFormat == DataFormatInt52) 1067 1067 value = value << JSValue::int52ShiftAmount; … … 1132 1132 FPRReg SpeculativeJIT::fillSpeculateDouble(Edge edge) 1133 1133 { 1134 ASSERT(edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRep MachineIntUse);1134 ASSERT(edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepAnyIntUse); 1135 1135 ASSERT(edge->hasDoubleResult()); 1136 1136 VirtualRegister virtualRegister = edge->virtualRegister(); … … 1933 1933 GPRReg resultGPR = result.gpr(); 1934 1934 1935 if (node->child1()->prediction() & SpecInt32 ) {1935 if (node->child1()->prediction() & SpecInt32Only) { 1936 1936 branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(0))), notTaken); 1937 1937 branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister, taken); … … 1988 1988 case DoubleRepUse: 1989 1989 case DoubleRepRealUse: 1990 case DoubleRep MachineIntUse: {1990 case DoubleRepAnyIntUse: { 1991 1991 SpeculateDoubleOperand op(this, node->child1()); 1992 1992 FPRTemporary scratch(this, op); … … 2223 2223 } 2224 2224 2225 case MachineIntUse: {2225 case AnyIntUse: { 2226 2226 GPRTemporary result(this); 2227 2227 GPRReg resultGPR = result.gpr(); 2228 2228 2229 convert MachineInt(node->child1(), resultGPR);2229 convertAnyInt(node->child1(), resultGPR); 2230 2230 2231 2231 strictInt52Result(resultGPR, node); … … 2233 2233 } 2234 2234 2235 case DoubleRep MachineIntUse: {2235 case DoubleRepAnyIntUse: { 2236 2236 SpeculateDoubleOperand value(this, node->child1()); 2237 2237 FPRReg valueFPR = value.fpr(); … … 2245 2245 2246 2246 DFG_TYPE_CHECK_WITH_EXIT_KIND(Int52Overflow, 2247 JSValueRegs(), node->child1(), Spec Int52AsDouble,2247 JSValueRegs(), node->child1(), SpecAnyIntAsDouble, 2248 2248 m_jit.branch64( 2249 2249 JITCompiler::Equal, resultGPR, … … 2828 2828 if (arrayMode.type() == Array::Int32) { 2829 2829 DFG_TYPE_CHECK( 2830 JSValueRegs(valueReg), child3, SpecInt32 ,2830 JSValueRegs(valueReg), child3, SpecInt32Only, 2831 2831 m_jit.branch64( 2832 2832 MacroAssembler::Below, valueReg, GPRInfo::tagTypeNumberRegister)); … … 3220 3220 if (node->arrayMode().type() == Array::Int32) { 3221 3221 DFG_TYPE_CHECK( 3222 JSValueRegs(valueGPR), node->child2(), SpecInt32 ,3222 JSValueRegs(valueGPR), node->child2(), SpecInt32Only, 3223 3223 m_jit.branch64( 3224 3224 MacroAssembler::Below, valueGPR, GPRInfo::tagTypeNumberRegister)); … … 3600 3600 if (hasInt32(node->indexingType())) { 3601 3601 DFG_TYPE_CHECK( 3602 JSValueRegs(opGPR), use, SpecInt32 ,3602 JSValueRegs(opGPR), use, SpecInt32Only, 3603 3603 m_jit.branch64( 3604 3604 MacroAssembler::Below, opGPR, GPRInfo::tagTypeNumberRegister)); … … 3666 3666 if (hasInt32(node->indexingType())) { 3667 3667 DFG_TYPE_CHECK( 3668 JSValueRegs(opGPR), use, SpecInt32 ,3668 JSValueRegs(opGPR), use, SpecInt32Only, 3669 3669 m_jit.branch64( 3670 3670 MacroAssembler::Below, opGPR, GPRInfo::tagTypeNumberRegister)); … … 4999 4999 m_jit.and64(TrustedImm32(~1), scratch2GPR); 5000 5000 jumpToEnd.append(m_jit.branch64(MacroAssembler::Equal, scratch2GPR, MacroAssembler::TrustedImm64(ValueFalse))); 5001 } else if (cachedTypeLocation->m_lastSeenType == Type MachineInt)5001 } else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt) 5002 5002 jumpToEnd.append(m_jit.branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister)); 5003 5003 else if (cachedTypeLocation->m_lastSeenType == TypeNumber) … … 5208 5208 } 5209 5209 5210 void SpeculativeJIT::convert MachineInt(Edge valueEdge, GPRReg resultGPR)5210 void SpeculativeJIT::convertAnyInt(Edge valueEdge, GPRReg resultGPR) 5211 5211 { 5212 5212 JSValueOperand value(this, valueEdge, ManualOperandSpeculation); … … 5225 5225 5226 5226 DFG_TYPE_CHECK( 5227 JSValueRegs(valueGPR), valueEdge, SpecInt32 | SpecInt52AsDouble,5227 JSValueRegs(valueGPR), valueEdge, SpecInt32Only | SpecAnyIntAsDouble, 5228 5228 m_jit.branch64( 5229 5229 JITCompiler::Equal, resultGPR, … … 5232 5232 } 5233 5233 5234 void SpeculativeJIT::speculate MachineInt(Edge edge)5234 void SpeculativeJIT::speculateAnyInt(Edge edge) 5235 5235 { 5236 if (!needsTypeCheck(edge, SpecInt32 | SpecInt52AsDouble))5236 if (!needsTypeCheck(edge, SpecInt32Only | SpecAnyIntAsDouble)) 5237 5237 return; 5238 5238 5239 5239 GPRTemporary temp(this); 5240 convert MachineInt(edge, temp.gpr());5240 convertAnyInt(edge, temp.gpr()); 5241 5241 } 5242 5242 5243 void SpeculativeJIT::speculateDoubleRep MachineInt(Edge edge)5243 void SpeculativeJIT::speculateDoubleRepAnyInt(Edge edge) 5244 5244 { 5245 if (!needsTypeCheck(edge, Spec Int52AsDouble))5245 if (!needsTypeCheck(edge, SpecAnyIntAsDouble)) 5246 5246 return; 5247 5247 … … 5257 5257 5258 5258 DFG_TYPE_CHECK( 5259 JSValueRegs(), edge, Spec Int52AsDouble,5259 JSValueRegs(), edge, SpecAnyIntAsDouble, 5260 5260 m_jit.branch64( 5261 5261 JITCompiler::Equal, resultGPR, -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGUseKind.cpp ¶
r197649 r200034 50 50 out.print("Int52Rep"); 51 51 return; 52 case MachineIntUse:53 out.print(" MachineInt");52 case AnyIntUse: 53 out.print("AnyInt"); 54 54 return; 55 55 case NumberUse: … … 65 65 out.print("DoubleRepReal"); 66 66 return; 67 case DoubleRep MachineIntUse:68 out.print("DoubleRep MachineInt");67 case DoubleRepAnyIntUse: 68 out.print("DoubleRepAnyInt"); 69 69 return; 70 70 case BooleanUse: -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGUseKind.h ¶
r197649 r200034 45 45 Int32Use, 46 46 KnownInt32Use, 47 MachineIntUse,47 AnyIntUse, 48 48 NumberUse, 49 49 RealNumberUse, … … 75 75 DoubleRepUse, 76 76 DoubleRepRealUse, 77 DoubleRep MachineIntUse,77 DoubleRepAnyIntUse, 78 78 79 79 // 3. The Int52 representation for an unboxed integer value that must be stored … … 91 91 case Int32Use: 92 92 case KnownInt32Use: 93 return SpecInt32 ;93 return SpecInt32Only; 94 94 case Int52RepUse: 95 return Spec MachineInt;96 case MachineIntUse:97 return SpecInt32 | SpecInt52AsDouble;95 return SpecAnyInt; 96 case AnyIntUse: 97 return SpecInt32Only | SpecAnyIntAsDouble; 98 98 case NumberUse: 99 99 return SpecBytecodeNumber; … … 104 104 case DoubleRepRealUse: 105 105 return SpecDoubleReal; 106 case DoubleRep MachineIntUse:107 return Spec Int52AsDouble;106 case DoubleRepAnyIntUse: 107 return SpecAnyIntAsDouble; 108 108 case BooleanUse: 109 109 case KnownBooleanUse: … … 185 185 case DoubleRepUse: 186 186 case DoubleRepRealUse: 187 case MachineIntUse:188 case DoubleRep MachineIntUse:187 case AnyIntUse: 188 case DoubleRepAnyIntUse: 189 189 return true; 190 190 default: … … 198 198 case DoubleRepUse: 199 199 case DoubleRepRealUse: 200 case DoubleRep MachineIntUse:200 case DoubleRepAnyIntUse: 201 201 return true; 202 202 default: -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp ¶
r199967 r200034 695 695 return; 696 696 697 VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRep MachineIntUse);697 VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepAnyIntUse); 698 698 } 699 699 -
TabularUnified trunk/Source/JavaScriptCore/dfg/DFGVariableAccessData.cpp ¶
r181993 r200034 157 157 if (type & ~SpecBytecodeNumber) 158 158 type |= SpecDoublePureNaN; 159 if (type & Spec MachineInt)160 type |= Spec Int52AsDouble;159 if (type & SpecAnyInt) 160 type |= SpecAnyIntAsDouble; 161 161 return checkAndSet(m_prediction, type); 162 162 } … … 181 181 182 182 // The argument-aware prediction -- which merges all of an (inlined or machine) 183 // argument's variable access datas' predictions -- must possibly be MachineInt.184 return !(argumentAwarePrediction() & ~Spec MachineInt);183 // argument's variable access datas' predictions -- must possibly be AnyInt. 184 return !(argumentAwarePrediction() & ~SpecAnyInt); 185 185 } 186 186 -
TabularUnified trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp ¶
r199967 r200034 501 501 case StringIdentUse: 502 502 case NotStringVarUse: 503 case MachineIntUse:504 case DoubleRep MachineIntUse:503 case AnyIntUse: 504 case DoubleRepAnyIntUse: 505 505 // These are OK. 506 506 break; -
TabularUnified trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp ¶
r199967 r200034 1083 1083 void compileInt52Constant() 1084 1084 { 1085 int64_t value = m_node->as MachineInt();1085 int64_t value = m_node->asAnyInt(); 1086 1086 1087 1087 setInt52(m_out.constInt64(value << JSValue::int52ShiftAmount)); … … 1262 1262 return; 1263 1263 1264 case MachineIntUse:1264 case AnyIntUse: 1265 1265 setStrictInt52( 1266 1266 jsValueToStrictInt52( … … 1268 1268 return; 1269 1269 1270 case DoubleRep MachineIntUse:1270 case DoubleRepAnyIntUse: 1271 1271 setStrictInt52( 1272 1272 doubleToStrictInt52( … … 1539 1539 1540 1540 case Int52RepUse: { 1541 if (!abstractValue(m_node->child1()).couldBeType(SpecInt52 )1542 && !abstractValue(m_node->child2()).couldBeType(SpecInt52 )) {1541 if (!abstractValue(m_node->child1()).couldBeType(SpecInt52Only) 1542 && !abstractValue(m_node->child2()).couldBeType(SpecInt52Only)) { 1543 1543 Int52Kind kind; 1544 1544 LValue left = lowWhicheverInt52(m_node->child1(), kind); … … 2086 2086 2087 2087 case Int52RepUse: { 2088 if (!abstractValue(m_node->child1()).couldBeType(SpecInt52 )) {2088 if (!abstractValue(m_node->child1()).couldBeType(SpecInt52Only)) { 2089 2089 Int52Kind kind; 2090 2090 LValue value = lowWhicheverInt52(m_node->child1(), kind); … … 2859 2859 } 2860 2860 2861 if (m_node->shouldSpeculate MachineInt()) {2861 if (m_node->shouldSpeculateAnyInt()) { 2862 2862 setStrictInt52(m_out.zeroExt(result, m_out.int64)); 2863 2863 return; … … 3000 3000 3001 3001 if (m_node->arrayMode().type() == Array::Int32) 3002 FTL_TYPE_CHECK(jsValueValue(value), child3, SpecInt32 , isNotInt32(value));3002 FTL_TYPE_CHECK(jsValueValue(value), child3, SpecInt32Only, isNotInt32(value)); 3003 3003 3004 3004 TypedPointer elementPointer = m_out.baseIndex( … … 3250 3250 if (m_node->arrayMode().type() == Array::Int32) { 3251 3251 FTL_TYPE_CHECK( 3252 jsValueValue(value), m_node->child2(), SpecInt32 , isNotInt32(value));3252 jsValueValue(value), m_node->child2(), SpecInt32Only, isNotInt32(value)); 3253 3253 } 3254 3254 storeType = Output::Store64; … … 9314 9314 LValue boxedResult = value.value(); 9315 9315 FTL_TYPE_CHECK( 9316 jsValueValue(boxedResult), edge, SpecInt32 , isNotInt32(boxedResult));9316 jsValueValue(boxedResult), edge, SpecInt32Only, isNotInt32(boxedResult)); 9317 9317 LValue result = unboxInt32(boxedResult); 9318 9318 setInt32(edge.node(), result); … … 9320 9320 } 9321 9321 9322 DFG_ASSERT(m_graph, m_node, !(provenType(edge) & SpecInt32 ));9322 DFG_ASSERT(m_graph, m_node, !(provenType(edge) & SpecInt32Only)); 9323 9323 terminate(Uncountable); 9324 9324 return m_out.int32Zero; … … 9569 9569 LValue result = m_out.castToInt32(value); 9570 9570 FTL_TYPE_CHECK( 9571 noValue(), edge, SpecInt32 ,9571 noValue(), edge, SpecInt32Only, 9572 9572 m_out.notEqual(m_out.signExt32To64(result), value)); 9573 9573 setInt32(edge.node(), result); … … 9619 9619 LValue isInt32(LValue jsValue, SpeculatedType type = SpecFullTop) 9620 9620 { 9621 if (LValue proven = isProvenValue(type, SpecInt32 ))9621 if (LValue proven = isProvenValue(type, SpecInt32Only)) 9622 9622 return proven; 9623 9623 return m_out.aboveOrEqual(jsValue, m_tagTypeNumber); … … 9625 9625 LValue isNotInt32(LValue jsValue, SpeculatedType type = SpecFullTop) 9626 9626 { 9627 if (LValue proven = isProvenValue(type, ~SpecInt32 ))9627 if (LValue proven = isProvenValue(type, ~SpecInt32Only)) 9628 9628 return proven; 9629 9629 return m_out.below(jsValue, m_tagTypeNumber); … … 9667 9667 9668 9668 LValue isNotInt32; 9669 if (!m_interpreter.needsTypeCheck(edge, SpecInt32 ))9669 if (!m_interpreter.needsTypeCheck(edge, SpecInt32Only)) 9670 9670 isNotInt32 = m_out.booleanFalse; 9671 else if (!m_interpreter.needsTypeCheck(edge, ~SpecInt32 ))9671 else if (!m_interpreter.needsTypeCheck(edge, ~SpecInt32Only)) 9672 9672 isNotInt32 = m_out.booleanTrue; 9673 9673 else … … 9686 9686 m_out.int64, m_out.operation(operationConvertBoxedDoubleToInt52), boxedValue); 9687 9687 FTL_TYPE_CHECK( 9688 jsValueValue(boxedValue), edge, SpecInt32 | SpecInt52AsDouble,9688 jsValueValue(boxedValue), edge, SpecInt32Only | SpecAnyIntAsDouble, 9689 9689 m_out.equal(possibleResult, m_out.constInt64(JSValue::notInt52))); 9690 9690 … … 9702 9702 m_out.int64, m_out.operation(operationConvertDoubleToInt52), value); 9703 9703 FTL_TYPE_CHECK_WITH_EXIT_KIND(Int52Overflow, 9704 doubleValue(value), edge, Spec Int52AsDouble,9704 doubleValue(value), edge, SpecAnyIntAsDouble, 9705 9705 m_out.equal(possibleResult, m_out.constInt64(JSValue::notInt52))); 9706 9706 … … 9849 9849 ASSERT(!m_interpreter.needsTypeCheck(edge)); 9850 9850 break; 9851 case MachineIntUse:9852 speculate MachineInt(edge);9851 case AnyIntUse: 9852 speculateAnyInt(edge); 9853 9853 break; 9854 9854 case ObjectUse: … … 9894 9894 speculateDoubleRepReal(edge); 9895 9895 break; 9896 case DoubleRep MachineIntUse:9897 speculateDoubleRep MachineInt(edge);9896 case DoubleRepAnyIntUse: 9897 speculateDoubleRepAnyInt(edge); 9898 9898 break; 9899 9899 case BooleanUse: … … 9948 9948 } 9949 9949 9950 void speculate MachineInt(Edge edge)9950 void speculateAnyInt(Edge edge) 9951 9951 { 9952 9952 if (!m_interpreter.needsTypeCheck(edge)) … … 10346 10346 } 10347 10347 10348 void speculateDoubleRep MachineInt(Edge edge)10348 void speculateDoubleRepAnyInt(Edge edge) 10349 10349 { 10350 10350 if (!m_interpreter.needsTypeCheck(edge)) -
TabularUnified trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp ¶
r199724 r200034 1298 1298 and64(TrustedImm32(~1), regT1); 1299 1299 jumpToEnd.append(branch64(Equal, regT1, TrustedImm64(ValueFalse))); 1300 } else if (cachedTypeLocation->m_lastSeenType == Type MachineInt)1300 } else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt) 1301 1301 jumpToEnd.append(emitJumpIfInt(regT0)); 1302 1302 else if (cachedTypeLocation->m_lastSeenType == TypeNumber) -
TabularUnified trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp ¶
r199724 r200034 1299 1299 else if (cachedTypeLocation->m_lastSeenType == TypeBoolean) 1300 1300 jumpToEnd.append(branch32(Equal, regT3, TrustedImm32(JSValue::BooleanTag))); 1301 else if (cachedTypeLocation->m_lastSeenType == Type MachineInt)1301 else if (cachedTypeLocation->m_lastSeenType == TypeAnyInt) 1302 1302 jumpToEnd.append(branch32(Equal, regT3, TrustedImm32(JSValue::Int32Tag))); 1303 1303 else if (cachedTypeLocation->m_lastSeenType == TypeNumber) { -
TabularUnified trunk/Source/JavaScriptCore/runtime/JSCJSValue.h ¶
r199382 r200034 215 215 int32_t asInt32() const; 216 216 uint32_t asUInt32() const; 217 int64_t as MachineInt() const;217 int64_t asAnyInt() const; 218 218 double asDouble() const; 219 219 bool asBoolean() const; … … 233 233 bool isUndefinedOrNull() const; 234 234 bool isBoolean() const; 235 bool is MachineInt() const;235 bool isAnyInt() const; 236 236 bool isNumber() const; 237 237 bool isString() const; -
TabularUnified trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h ¶
r199382 r200034 531 531 } 532 532 533 inline bool JSValue::is MachineInt() const533 inline bool JSValue::isAnyInt() const 534 534 { 535 535 if (isInt32()) … … 540 540 } 541 541 542 inline int64_t JSValue::as MachineInt() const543 { 544 ASSERT(is MachineInt());542 inline int64_t JSValue::asAnyInt() const 543 { 544 ASSERT(isAnyInt()); 545 545 if (isInt32()) 546 546 return asInt32(); -
TabularUnified trunk/Source/JavaScriptCore/runtime/RuntimeType.cpp ¶
r196300 r200034 43 43 if (value.isNull()) 44 44 return TypeNull; 45 if (value.is MachineInt())46 return Type MachineInt;45 if (value.isAnyInt()) 46 return TypeAnyInt; 47 47 if (value.isNumber()) 48 48 return TypeNumber; … … 67 67 if (type == TypeNull) 68 68 return ASCIILiteral("Null"); 69 if (type == Type MachineInt)69 if (type == TypeAnyInt) 70 70 return ASCIILiteral("Integer"); 71 71 if (type == TypeNumber) -
TabularUnified trunk/Source/JavaScriptCore/runtime/RuntimeType.h ¶
r197614 r200034 38 38 TypeNull = 0x4, 39 39 TypeBoolean = 0x8, 40 Type MachineInt= 0x10,40 TypeAnyInt = 0x10, 41 41 TypeNumber = 0x20, 42 42 TypeString = 0x40, … … 47 47 typedef uint16_t RuntimeTypeMask; 48 48 49 static const RuntimeTypeMask RuntimeTypeMaskAllTypes = TypeFunction | TypeUndefined | TypeNull | TypeBoolean | Type MachineInt | TypeNumber | TypeString | TypeObject | TypeSymbol;49 static const RuntimeTypeMask RuntimeTypeMaskAllTypes = TypeFunction | TypeUndefined | TypeNull | TypeBoolean | TypeAnyInt | TypeNumber | TypeString | TypeObject | TypeSymbol; 50 50 51 51 class JSValue; -
TabularUnified trunk/Source/JavaScriptCore/runtime/TypeSet.cpp ¶
r194496 r200034 101 101 if (m_seenTypes & TypeBoolean) 102 102 seen.appendLiteral("Boolean "); 103 if (m_seenTypes & Type MachineInt)104 seen.appendLiteral(" MachineInt ");103 if (m_seenTypes & TypeAnyInt) 104 seen.appendLiteral("AnyInt "); 105 105 if (m_seenTypes & TypeNumber) 106 106 seen.appendLiteral("Number "); … … 180 180 if (doesTypeConformTo(TypeBoolean)) 181 181 return ASCIILiteral("Boolean"); 182 if (doesTypeConformTo(Type MachineInt))182 if (doesTypeConformTo(TypeAnyInt)) 183 183 return ASCIILiteral("Integer"); 184 if (doesTypeConformTo(TypeNumber | Type MachineInt))184 if (doesTypeConformTo(TypeNumber | TypeAnyInt)) 185 185 return ASCIILiteral("Number"); 186 186 if (doesTypeConformTo(TypeString)) … … 196 196 if (doesTypeConformTo(TypeBoolean | TypeNull | TypeUndefined)) 197 197 return ASCIILiteral("Boolean?"); 198 if (doesTypeConformTo(Type MachineInt | TypeNull | TypeUndefined))198 if (doesTypeConformTo(TypeAnyInt | TypeNull | TypeUndefined)) 199 199 return ASCIILiteral("Integer?"); 200 if (doesTypeConformTo(TypeNumber | Type MachineInt | TypeNull | TypeUndefined))200 if (doesTypeConformTo(TypeNumber | TypeAnyInt | TypeNull | TypeUndefined)) 201 201 return ASCIILiteral("Number?"); 202 202 if (doesTypeConformTo(TypeString | TypeNull | TypeUndefined)) … … 235 235 .setIsNull((m_seenTypes & TypeNull) != TypeNothing) 236 236 .setIsBoolean((m_seenTypes & TypeBoolean) != TypeNothing) 237 .setIsInteger((m_seenTypes & Type MachineInt) != TypeNothing)237 .setIsInteger((m_seenTypes & TypeAnyInt) != TypeNothing) 238 238 .setIsNumber((m_seenTypes & TypeNumber) != TypeNothing) 239 239 .setIsString((m_seenTypes & TypeString) != TypeNothing) … … 278 278 json.appendLiteral("\"Boolean\""); 279 279 } 280 if (m_seenTypes & Type MachineInt) {280 if (m_seenTypes & TypeAnyInt) { 281 281 if (hasAnItem) 282 282 json.append(',');
Note:
See TracChangeset
for help on using the changeset viewer.