• Home
  • Raw
  • Download

Lines Matching +full:0 +full:x

31     return TruncInt32ToInt1(Int32(0));  in False()
39 GateRef CircuitBuilder::Equal(GateRef x, GateRef y) in Equal() argument
41 auto xType = acc_.GetMachineType(x); in Equal()
50 return BinaryCmp(circuit_->Icmp(static_cast<uint64_t>(ICmpCondition::EQ)), x, y); in Equal()
53 return BinaryCmp(circuit_->Fcmp(static_cast<uint64_t>(FCmpCondition::OEQ)), x, y); in Equal()
59 GateRef CircuitBuilder::NotEqual(GateRef x, GateRef y) in NotEqual() argument
61 auto xType = acc_.GetMachineType(x); in NotEqual()
70 return BinaryCmp(circuit_->Icmp(static_cast<uint64_t>(ICmpCondition::NE)), x, y); in NotEqual()
73 return BinaryCmp(circuit_->Fcmp(static_cast<uint64_t>(FCmpCondition::ONE)), x, y); in NotEqual()
93 GateRef CircuitBuilder::GetInt64OfTInt(GateRef x) in GetInt64OfTInt() argument
95 GateRef tagged = ChangeTaggedPointerToInt64(x); in GetInt64OfTInt()
99 GateRef CircuitBuilder::GetInt32OfTInt(GateRef x) in GetInt32OfTInt() argument
101 return TruncInt64ToInt32(GetInt64OfTInt(x)); in GetInt32OfTInt()
104 GateRef CircuitBuilder::TaggedCastToIntPtr(GateRef x) in TaggedCastToIntPtr() argument
107 return cmpCfg_->Is32Bit() ? GetInt32OfTInt(x) : GetInt64OfTInt(x); in TaggedCastToIntPtr()
110 GateRef CircuitBuilder::GetDoubleOfTDouble(GateRef x) in GetDoubleOfTDouble() argument
112 GateRef tagged = ChangeTaggedPointerToInt64(x); in GetDoubleOfTDouble()
117 GateRef CircuitBuilder::GetDoubleOfTNumber(GateRef x) in GetDoubleOfTNumber() argument
124 DEFVAlUE(result, env_, VariableType::FLOAT64(), Double(0)); in GetDoubleOfTNumber()
125 Branch(TaggedIsInt(x), &isInt, &isDouble); in GetDoubleOfTNumber()
128 result = ChangeInt32ToFloat64(GetInt32OfTInt(x)); in GetDoubleOfTNumber()
133 result = GetDoubleOfTDouble(x); in GetDoubleOfTNumber()
142 GateRef CircuitBuilder::Int8Equal(GateRef x, GateRef y) in Int8Equal() argument
144 return Equal(x, y); in Int8Equal()
147 GateRef CircuitBuilder::Int32NotEqual(GateRef x, GateRef y) in Int32NotEqual() argument
149 return NotEqual(x, y); in Int32NotEqual()
152 GateRef CircuitBuilder::Int64NotEqual(GateRef x, GateRef y) in Int64NotEqual() argument
154 return NotEqual(x, y); in Int64NotEqual()
157 GateRef CircuitBuilder::DoubleEqual(GateRef x, GateRef y) in DoubleEqual() argument
159 return Equal(x, y); in DoubleEqual()
162 GateRef CircuitBuilder::DoubleNotEqual(GateRef x, GateRef y) in DoubleNotEqual() argument
164 return NotEqual(x, y); in DoubleNotEqual()
167 GateRef CircuitBuilder::Int64Equal(GateRef x, GateRef y) in Int64Equal() argument
169 return Equal(x, y); in Int64Equal()
172 GateRef CircuitBuilder::Int32Equal(GateRef x, GateRef y) in Int32Equal() argument
174 return Equal(x, y); in Int32Equal()
177 GateRef CircuitBuilder::IntPtrGreaterThan(GateRef x, GateRef y) in IntPtrGreaterThan() argument
179 return env_->Is32Bit() ? Int32GreaterThan(x, y) : Int64GreaterThan(x, y); in IntPtrGreaterThan()
183 GateRef CircuitBuilder::BinaryOp(GateRef x, GateRef y) in BinaryOp() argument
186 return BinaryArithmetic(circuit_->Add(), Type, x, y); in BinaryOp()
188 return BinaryArithmetic(circuit_->Sub(), Type, x, y); in BinaryOp()
190 return BinaryArithmetic(circuit_->Mul(), Type, x, y); in BinaryOp()
196 GateRef CircuitBuilder::IntPtrLSR(GateRef x, GateRef y) in IntPtrLSR() argument
199 return BinaryArithmetic(circuit_->Lsr(), ptrSize, x, y); in IntPtrLSR()
202 GateRef CircuitBuilder::IntPtrLSL(GateRef x, GateRef y) in IntPtrLSL() argument
205 return BinaryArithmetic(circuit_->Lsl(), ptrSize, x, y); in IntPtrLSL()
208 GateRef CircuitBuilder::IntPtrOr(GateRef x, GateRef y) in IntPtrOr() argument
211 return BinaryArithmetic(circuit_->Or(), ptrsize, x, y); in IntPtrOr()
214 GateRef CircuitBuilder::IntPtrDiv(GateRef x, GateRef y) in IntPtrDiv() argument
216 return env_->Is32Bit() ? Int32Div(x, y) : Int64Div(x, y); in IntPtrDiv()
219 GateRef CircuitBuilder::Int64ToTaggedPtr(GateRef x) in Int64ToTaggedPtr() argument
222 MachineType::I64, { x }, GateType::TaggedValue()); in Int64ToTaggedPtr()
225 GateRef CircuitBuilder::Int32ToTaggedPtr(GateRef x) in Int32ToTaggedPtr() argument
227 GateRef val = SExtInt32ToInt64(x); in Int32ToTaggedPtr()
231 GateRef CircuitBuilder::Int32ToTaggedInt(GateRef x) in Int32ToTaggedInt() argument
233 GateRef val = SExtInt32ToInt64(x); in Int32ToTaggedInt()
238 GateRef CircuitBuilder::IsSpecial(GateRef x, JSTaggedType type) in IsSpecial() argument
243 return Equal(x, specialValue); in IsSpecial()
246 GateRef CircuitBuilder::TaggedIsInt(GateRef x) in TaggedIsInt() argument
248 x = ChangeTaggedPointerToInt64(x); in TaggedIsInt()
249 return Equal(Int64And(x, Int64(JSTaggedValue::TAG_MARK)), in TaggedIsInt()
253 GateRef CircuitBuilder::TaggedIsDouble(GateRef x) in TaggedIsDouble() argument
255 return BoolAnd(TaggedIsNumber(x), BoolNot(TaggedIsInt(x))); in TaggedIsDouble()
258 GateRef CircuitBuilder::TaggedIsObject(GateRef x) in TaggedIsObject() argument
260 x = ChangeTaggedPointerToInt64(x); in TaggedIsObject()
261 return Equal(Int64And(x, Int64(JSTaggedValue::TAG_MARK)), in TaggedIsObject()
265 GateRef CircuitBuilder::TaggedIsNumber(GateRef x) in TaggedIsNumber() argument
267 return BoolNot(TaggedIsObject(x)); in TaggedIsNumber()
270 GateRef CircuitBuilder::TaggedIsNumeric(GateRef x) in TaggedIsNumeric() argument
272 return BoolOr(TaggedIsNumber(x), TaggedIsBigInt(x)); in TaggedIsNumeric()
275 GateRef CircuitBuilder::DoubleIsINF(GateRef x) in DoubleIsINF() argument
279 GateRef diff1 = DoubleEqual(x, infinity); in DoubleIsINF()
280 GateRef diff2 = DoubleEqual(x, negativeInfinity); in DoubleIsINF()
284 GateRef CircuitBuilder::TaggedIsHole(GateRef x) in TaggedIsHole() argument
286 return Equal(x, HoleConstant()); in TaggedIsHole()
289 GateRef CircuitBuilder::TaggedIsNotHole(GateRef x) in TaggedIsNotHole() argument
291 return NotEqual(x, HoleConstant()); in TaggedIsNotHole()
294 GateRef CircuitBuilder::TaggedIsUndefined(GateRef x) in TaggedIsUndefined() argument
296 return Equal(x, UndefineConstant()); in TaggedIsUndefined()
299 GateRef CircuitBuilder::TaggedIsException(GateRef x) in TaggedIsException() argument
301 return Equal(x, ExceptionConstant()); in TaggedIsException()
304 GateRef CircuitBuilder::TaggedIsSpecial(GateRef x) in TaggedIsSpecial() argument
307 Equal(Int64And(ChangeTaggedPointerToInt64(x), Int64(JSTaggedValue::TAG_SPECIAL_MASK)), in TaggedIsSpecial()
309 TaggedIsHole(x)); in TaggedIsSpecial()
317 GateRef CircuitBuilder::TaggedIsHeapObject(GateRef x) in TaggedIsHeapObject() argument
319 x = ChangeTaggedPointerToInt64(x); in TaggedIsHeapObject()
320 return Equal(Int64And(x, Int64(JSTaggedValue::TAG_HEAPOBJECT_MASK)), Int64(0)); in TaggedIsHeapObject()
323 GateRef CircuitBuilder::TaggedIsAsyncGeneratorObject(GateRef x) in TaggedIsAsyncGeneratorObject() argument
325 GateRef isHeapObj = TaggedIsHeapObject(x); in TaggedIsAsyncGeneratorObject()
326 GateRef objType = GetObjectType(LoadHClass(x)); in TaggedIsAsyncGeneratorObject()
332 GateRef CircuitBuilder::TaggedIsGeneratorObject(GateRef x) in TaggedIsGeneratorObject() argument
334 GateRef isHeapObj = TaggedIsHeapObject(x); in TaggedIsGeneratorObject()
335 GateRef objType = GetObjectType(LoadHClass(x)); in TaggedIsGeneratorObject()
341 GateRef CircuitBuilder::TaggedIsPropertyBox(GateRef x) in TaggedIsPropertyBox() argument
343 return LogicAnd(TaggedIsHeapObject(x), in TaggedIsPropertyBox()
344 IsJsType(x, JSType::PROPERTY_BOX)); in TaggedIsPropertyBox()
347 GateRef CircuitBuilder::TaggedIsWeak(GateRef x) in TaggedIsWeak() argument
349 return LogicAnd(TaggedIsHeapObject(x), in TaggedIsWeak()
350 Equal(Int64And(ChangeTaggedPointerToInt64(x), Int64(JSTaggedValue::TAG_WEAK)), Int64(1))); in TaggedIsWeak()
353 GateRef CircuitBuilder::TaggedIsPrototypeHandler(GateRef x) in TaggedIsPrototypeHandler() argument
355 return LogicAnd(TaggedIsHeapObject(x), in TaggedIsPrototypeHandler()
356 IsJsType(x, JSType::PROTOTYPE_HANDLER)); in TaggedIsPrototypeHandler()
359 GateRef CircuitBuilder::TaggedIsTransitionHandler(GateRef x) in TaggedIsTransitionHandler() argument
361 return LogicAnd(TaggedIsHeapObject(x), in TaggedIsTransitionHandler()
362 IsJsType(x, JSType::TRANSITION_HANDLER)); in TaggedIsTransitionHandler()
365 GateRef CircuitBuilder::TaggedIsStoreTSHandler(GateRef x) in TaggedIsStoreTSHandler() argument
367 return LogicAnd(TaggedIsHeapObject(x), in TaggedIsStoreTSHandler()
368 IsJsType(x, JSType::STORE_TS_HANDLER)); in TaggedIsStoreTSHandler()
371 GateRef CircuitBuilder::TaggedIsTransWithProtoHandler(GateRef x) in TaggedIsTransWithProtoHandler() argument
373 return LogicAnd(TaggedIsHeapObject(x), in TaggedIsTransWithProtoHandler()
374 IsJsType(x, JSType::TRANS_WITH_PROTO_HANDLER)); in TaggedIsTransWithProtoHandler()
377 GateRef CircuitBuilder::TaggedIsUndefinedOrNull(GateRef x) in TaggedIsUndefinedOrNull() argument
379 return BoolOr(TaggedIsUndefined(x), TaggedIsNull(x)); in TaggedIsUndefinedOrNull()
382 GateRef CircuitBuilder::TaggedIsTrue(GateRef x) in TaggedIsTrue() argument
384 return Equal(x, TaggedTrue()); in TaggedIsTrue()
387 GateRef CircuitBuilder::TaggedIsFalse(GateRef x) in TaggedIsFalse() argument
389 return Equal(x, TaggedFalse()); in TaggedIsFalse()
392 GateRef CircuitBuilder::TaggedIsNull(GateRef x) in TaggedIsNull() argument
394 return Equal(x, NullConstant()); in TaggedIsNull()
397 GateRef CircuitBuilder::TaggedIsBoolean(GateRef x) in TaggedIsBoolean() argument
399 return BoolOr(TaggedIsFalse(x), TaggedIsTrue(x)); in TaggedIsBoolean()
402 GateRef CircuitBuilder::IsAOTLiteralInfo(GateRef x) in IsAOTLiteralInfo() argument
404 GateRef isHeapObj = TaggedIsHeapObject(x); in IsAOTLiteralInfo()
405 GateRef objType = GetObjectType(LoadHClass(x)); in IsAOTLiteralInfo()
411 GateRef CircuitBuilder::TaggedGetInt(GateRef x) in TaggedGetInt() argument
413 x = ChangeTaggedPointerToInt64(x); in TaggedGetInt()
414 return TruncInt64ToInt32(Int64And(x, Int64(~JSTaggedValue::TAG_MARK))); in TaggedGetInt()
417 GateRef CircuitBuilder::ToTaggedInt(GateRef x) in ToTaggedInt() argument
419 return Int64Or(x, Int64(JSTaggedValue::TAG_INT)); in ToTaggedInt()
422 GateRef CircuitBuilder::ToTaggedIntPtr(GateRef x) in ToTaggedIntPtr() argument
424 return Int64ToTaggedPtr(Int64Or(x, Int64(JSTaggedValue::TAG_INT))); in ToTaggedIntPtr()
427 GateRef CircuitBuilder::DoubleToTaggedDoublePtr(GateRef x) in DoubleToTaggedDoublePtr() argument
429 GateRef val = CastDoubleToInt64(x); in DoubleToTaggedDoublePtr()
433 GateRef CircuitBuilder::BooleanToTaggedBooleanPtr(GateRef x) in BooleanToTaggedBooleanPtr() argument
435 auto val = ZExtInt1ToInt64(x); in BooleanToTaggedBooleanPtr()
439 GateRef CircuitBuilder::Float32ToTaggedDoublePtr(GateRef x) in Float32ToTaggedDoublePtr() argument
441 GateRef val = ExtFloat32ToDouble(x); in Float32ToTaggedDoublePtr()
445 GateRef CircuitBuilder::TaggedDoublePtrToFloat32(GateRef x) in TaggedDoublePtrToFloat32() argument
447 GateRef val = GetDoubleOfTDouble(x); in TaggedDoublePtrToFloat32()
451 GateRef CircuitBuilder::TaggedIntPtrToFloat32(GateRef x) in TaggedIntPtrToFloat32() argument
453 GateRef val = GetInt32OfTInt(x); in TaggedIntPtrToFloat32()
457 GateRef CircuitBuilder::DoubleToTaggedDouble(GateRef x) in DoubleToTaggedDouble() argument
459 GateRef val = CastDoubleToInt64(x); in DoubleToTaggedDouble()
463 GateRef CircuitBuilder::DoubleIsNAN(GateRef x) in DoubleIsNAN() argument
465 GateRef diff = Equal(x, x); in DoubleIsNAN()
466 return Equal(SExtInt1ToInt32(diff), Int32(0)); in DoubleIsNAN()
469 GateRef CircuitBuilder::DoubleToTagged(GateRef x) in DoubleToTagged() argument
471 GateRef val = CastDoubleToInt64(x); in DoubleToTagged()
544 Int32(0)); in IsDictionaryModeByHClass()
554 Int32(0)); in IsDictionaryElement()
565 Int32(0)); in IsClassConstructor()
577 Int32(0)); in IsClassPrototype()
588 Int32(0)); in IsExtensible()
608 GateRef CircuitBuilder::TaggedObjectBothAreString(GateRef x, GateRef y) in TaggedObjectBothAreString() argument
610 return BoolAnd(IsJsType(x, JSType::STRING), IsJsType(y, JSType::STRING)); in TaggedObjectBothAreString()
618 Int32(0)); in IsCallableFromBitField()
629 GateRef CircuitBuilder::BothAreString(GateRef x, GateRef y) in BothAreString() argument
637 Branch(BoolAnd(TaggedIsHeapObject(x), TaggedIsHeapObject(y)), &bothAreHeapObjet, &exit); in BothAreString()
640 Branch(TaggedObjectBothAreString(x, y), &bothAreStringType, &exit); in BothAreString()
664 GateRef CircuitBuilder::TypedBinaryOp(GateRef x, GateRef y, GateType xType, GateType yType, GateTyp… in TypedBinaryOp() argument
670 {currentControl, currentDepend, x, y}, gateType); in TypedBinaryOp()
677 GateRef CircuitBuilder::TypedUnaryOp(GateRef x, GateType xType, GateType gateType) in TypedUnaryOp() argument
683 …UnaryOp = TypedUnaryOperator(machineType, Op, xType, {currentControl, currentDepend, x}, gateType); in TypedUnaryOp()
719 GateRef CircuitBuilder::NumberBinaryOp(GateRef x, GateRef y) in NumberBinaryOp() argument
726 … {currentControl, currentDepend, x, y}, GateType::AnyType()); in NumberBinaryOp()
732 GateRef CircuitBuilder::PrimitiveToNumber(GateRef x, VariableType type) in PrimitiveToNumber() argument
738 {currentControl, currentDepend, x}); in PrimitiveToNumber()
744 GateRef CircuitBuilder::LogicAnd(GateRef x, GateRef y) in LogicAnd() argument
751 DEFVAlUE(result, env_, VariableType::BOOL(), x); in LogicAnd()
752 Branch(x, &isX, &notX); in LogicAnd()
768 GateRef CircuitBuilder::LogicOr(GateRef x, GateRef y) in LogicOr() argument
775 DEFVAlUE(result, env_, VariableType::BOOL(), x); in LogicOr()
776 Branch(x, &isX, &notX); in LogicOr()
892 inline GateRef CircuitBuilder::TypedCallBuiltin(GateRef x, BuiltinsStubCSigns::ID id) in TypedCallBuiltin() argument
898 …auto numberMathOp = TypedCallOperator(MachineType::I64, {currentControl, currentDepend, x, idGate}… in TypedCallBuiltin()