Home
last modified time | relevance | path

Searched refs:leftType (Results 1 - 20 of 20) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/checker/ets/
H A Darithmetic.cpp179 bool ETSChecker::CheckBinaryPlusMultDivOperandsForUnionType(const Type *leftType, const Type *rightType, in CheckBinaryPlusMultDivOperandsForUnionType() argument
183 if (leftType->IsETSUnionType()) { in CheckBinaryPlusMultDivOperandsForUnionType()
184 leftType->AsETSUnionType()->ToString(ss, false); in CheckBinaryPlusMultDivOperandsForUnionType()
205 auto [leftType, rightType, unboxedL, unboxedR] = types; in CheckBinaryOperatorMulDivMod()
208 RepairTypeErrorsInOperands(&leftType, &rightType); in CheckBinaryOperatorMulDivMod()
210 if (leftType->IsTypeError()) { // both are errors in CheckBinaryOperatorMulDivMod()
218 FlagExpressionWithUnboxing(leftType, unboxedL, left); in CheckBinaryOperatorMulDivMod()
221 if (!CheckBinaryPlusMultDivOperandsForUnionType(leftType, rightType, left, right)) { in CheckBinaryOperatorMulDivMod()
231 tsType = HandleArithmeticOperationOnTypes(leftType, rightType, operationType); in CheckBinaryOperatorMulDivMod()
238 checker::Type *ETSChecker::CheckBinaryOperatorPlusForEnums(const checker::Type *const leftType, in CheckBinaryOperatorPlusForEnums() argument
413 CheckBinaryOperatorLogical(ir::Expression *left, ir::Expression *right, ir::Expression *expr, lexer::SourcePosition pos, checker::Type *leftType, checker::Type *rightType, Type *unboxedL, Type *unboxedR) CheckBinaryOperatorLogical() argument
449 LogOperatorCannotBeApplied(lexer::TokenType operationType, checker::Type *const leftType, checker::Type *const rightType, lexer::SourcePosition pos) LogOperatorCannotBeApplied() argument
456 CheckValidEqualReferenceType(checker::Type *const leftType, checker::Type *const rightType) CheckValidEqualReferenceType() argument
497 CheckBinaryOperatorStrictEqual(ir::Expression *left, lexer::TokenType operationType, lexer::SourcePosition pos, checker::Type *leftType, checker::Type *rightType) CheckBinaryOperatorStrictEqual() argument
533 CheckBinaryOperatorEqualError(checker::Type *const leftType, checker::Type *const rightType, checker::Type *tsType, lexer::SourcePosition pos) CheckBinaryOperatorEqualError() argument
561 CheckBinaryOperatorEqual(ir::Expression *left, ir::Expression *right, lexer::TokenType operationType, lexer::SourcePosition pos, checker::Type *leftType, checker::Type *rightType, Type *unboxedL, Type *unboxedR) CheckBinaryOperatorEqual() argument
643 NonNumericTypesAreAppropriateForComparison(Type *leftType, Type *rightType) NonNumericTypesAreAppropriateForComparison() argument
651 CheckBinaryOperatorLessGreater(ir::Expression *left, ir::Expression *right, lexer::TokenType operationType, lexer::SourcePosition pos, bool isEqualOp, checker::Type *leftType, checker::Type *rightType, Type *unboxedL, Type *unboxedR) CheckBinaryOperatorLessGreater() argument
712 CheckBinaryOperatorInstanceOf(lexer::SourcePosition pos, checker::Type *leftType, checker::Type *rightType) CheckBinaryOperatorInstanceOf() argument
757 auto *leftType = left->TsType(); CheckBinaryOperatorNullishCoalescing() local
838 checker::Type *leftType; global() member
851 checker::Type *const leftType = typeParams.leftType; CheckBinaryOperatorHelper() member in ark::es2panda::checker::checker
1050 checker::Type *leftType = left->Check(this); CheckBinaryOperator() local
[all...]
H A Dhelpers.cpp437 Type *ETSChecker::HandleBooleanLogicalOperatorsExtended(Type *leftType, Type *rightType, ir::BinaryExpression *expr) in HandleBooleanLogicalOperatorsExtended() argument
439 ASSERT(leftType->IsConditionalExprType() && rightType->IsConditionalExprType()); in HandleBooleanLogicalOperatorsExtended()
441 auto [resolveLeft, leftValue] = IsResolvedAndValue(expr->Left(), leftType); in HandleBooleanLogicalOperatorsExtended()
444 if (!resolveLeft && !resolveRight && IsTypeIdenticalTo(leftType, rightType)) { in HandleBooleanLogicalOperatorsExtended()
445 return leftType; in HandleBooleanLogicalOperatorsExtended()
452 return leftType->IsETSBooleanType() ? CreateETSBooleanType(true) : leftType; in HandleBooleanLogicalOperatorsExtended()
465 return leftType->IsETSBooleanType() ? CreateETSBooleanType(false) : leftType; in HandleBooleanLogicalOperatorsExtended()
475 Type *ETSChecker::HandleBooleanLogicalOperators(Type *leftType, Typ argument
1502 HandleStringConcatenation(Type *leftType, Type *rightType) HandleStringConcatenation() argument
[all...]
/arkcompiler/ets_frontend/es2panda/typescript/core/
H A DbinaryLikeExpression.cpp23 Type *Checker::CheckBinaryOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr, in CheckBinaryOperator() argument
26 CheckNonNullType(leftType, leftExpr->Start()); in CheckBinaryOperator()
29 if (leftType->HasTypeFlag(TypeFlag::BOOLEAN_LIKE) && rightType->HasTypeFlag(TypeFlag::BOOLEAN_LIKE)) { in CheckBinaryOperator()
60 if (!leftType->HasTypeFlag(TypeFlag::VALID_ARITHMETIC_TYPE)) { in CheckBinaryOperator()
77 if ((leftType->IsAnyType() && rightType->IsAnyType()) || in CheckBinaryOperator()
78 !(leftType->HasTypeFlag(TypeFlag::BIGINT_LIKE) || rightType->HasTypeFlag(TypeFlag::BIGINT_LIKE))) { in CheckBinaryOperator()
80 } else if (leftType->HasTypeFlag(TypeFlag::BIGINT_LIKE) && rightType->HasTypeFlag(TypeFlag::BIGINT_LIKE)) { in CheckBinaryOperator()
87 ThrowBinaryLikeError(op, leftType, rightType, expr->Start()); in CheckBinaryOperator()
90 CheckAssignmentOperator(op, leftExpr, leftType, resultType); in CheckBinaryOperator()
94 Type *Checker::CheckPlusOperator(Type *leftType, Typ argument
126 CheckCompareOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr, const ir::Expression *rightExpr, const ir::AstNode *expr, lexer::TokenType op) CheckCompareOperator() argument
142 CheckAndOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr) CheckAndOperator() argument
154 CheckOrOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr) CheckOrOperator() argument
173 CheckInstanceofExpression(Type *leftType, Type *rightType, const ir::Expression *rightExpr, const ir::AstNode *expr) CheckInstanceofExpression() argument
192 CheckInExpression(Type *leftType, Type *rightType, const ir::Expression *leftExpr, const ir::Expression *rightExpr, const ir::AstNode *expr) CheckInExpression() argument
213 CheckAssignmentOperator(lexer::TokenType op, const ir::Expression *leftExpr, Type *leftType, Type *valueType) CheckAssignmentOperator() argument
[all...]
H A Dhelpers.cpp281 void Checker::ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType, lexer::SourcePosition lineInfo) in ThrowBinaryLikeError() argument
284 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", AsSrc(rightType)}, in ThrowBinaryLikeError()
288 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", rightType}, lineInfo); in ThrowBinaryLikeError()
/arkcompiler/ets_frontend/ets2panda/checker/ts/
H A DbinaryLikeExpression.cpp23 void TSChecker::CheckBooleanLikeType(Type *leftType, Type *rightType, ir::AstNode *expr, lexer::TokenType op) in CheckBooleanLikeType() argument
25 if (leftType->HasTypeFlag(TypeFlag::BOOLEAN_LIKE) && rightType->HasTypeFlag(TypeFlag::BOOLEAN_LIKE)) { in CheckBooleanLikeType()
59 CheckNonNullType(leftRightType->leftType, leftExpr->Start()); in CheckBinaryOperator()
62 CheckBooleanLikeType(leftRightType->leftType, leftRightType->rightType, expr, op); in CheckBinaryOperator()
64 if (!leftRightType->leftType->HasTypeFlag(TypeFlag::VALID_ARITHMETIC_TYPE)) { in CheckBinaryOperator()
81 if ((leftRightType->leftType->IsAnyType() && leftRightType->rightType->IsAnyType()) || in CheckBinaryOperator()
82 !(leftRightType->leftType->HasTypeFlag(TypeFlag::BIGINT_LIKE) || in CheckBinaryOperator()
85 } else if (leftRightType->leftType->HasTypeFlag(TypeFlag::BIGINT_LIKE) && in CheckBinaryOperator()
93 ThrowBinaryLikeError(op, leftRightType->leftType, leftRightType->rightType, expr->Start()); in CheckBinaryOperator()
96 CheckAssignmentOperator(op, leftExpr, leftRightType->leftType, resultTyp in CheckBinaryOperator()
153 CheckAndOperator(Type *leftType, Type *rightType, ir::Expression *leftExpr) CheckAndOperator() argument
165 CheckOrOperator(Type *leftType, Type *rightType, ir::Expression *leftExpr) CheckOrOperator() argument
184 CheckInstanceofExpression(Type *leftType, Type *rightType, ir::Expression *rightExpr, ir::AstNode *expr) CheckInstanceofExpression() argument
203 CheckInExpression(Type *leftType, Type *rightType, ir::Expression *leftExpr, ir::Expression *rightExpr, ir::AstNode *expr) CheckInExpression() argument
224 CheckAssignmentOperator(lexer::TokenType op, ir::Expression *leftExpr, Type *leftType, Type *valueType) CheckAssignmentOperator() argument
[all...]
H A Dhelpers.cpp279 void TSChecker::ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType, in ThrowBinaryLikeError() argument
283 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", AsSrc(rightType)}, in ThrowBinaryLikeError()
287 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", rightType}, lineInfo); in ThrowBinaryLikeError()
/arkcompiler/ets_frontend/es2panda/ir/expressions/
H A DbinaryExpression.cpp131 auto *leftType = left_->Check(checker); in Check() local
146 return checker->CheckBinaryOperator(leftType, rightType, left_, right_, this, operator_); in Check()
149 return checker->CheckPlusOperator(leftType, rightType, left_, right_, this, operator_); in Check()
153 return checker->CheckCompareOperator(leftType, rightType, left_, right_, this, operator_); in Check()
159 if (checker->IsTypeEqualityComparableTo(leftType, rightType) || in Check()
160 checker->IsTypeEqualityComparableTo(rightType, leftType)) { in Check()
164 checker->ThrowBinaryLikeError(operator_, leftType, rightType, Start()); in Check()
167 return checker->CheckInstanceofExpression(leftType, rightType, right_, this); in Check()
170 return checker->CheckInExpression(leftType, rightType, left_, right_, this); in Check()
173 return checker->CheckAndOperator(leftType, rightTyp in Check()
[all...]
H A DassignmentExpression.cpp190 auto *leftType = left_->Check(checker); in Check() local
192 if (leftType->HasTypeFlag(checker::TypeFlag::READONLY)) { in Check()
197 checker->ElaborateElementwise(leftType, right_, left_->Start()); in Check()
215 return checker->CheckBinaryOperator(leftType, rightType, left_, right_, this, operator_); in Check()
218 return checker->CheckPlusOperator(leftType, rightType, left_, right_, this, operator_); in Check()
222 return checker->CheckCompareOperator(leftType, rightType, left_, right_, this, operator_); in Check()
225 checker->CheckAssignmentOperator(operator_, left_, leftType, rightType); in Check()
/arkcompiler/ets_frontend/ets2panda/checker/
H A DTSchecker.h110 Type *leftType; member
283 [[noreturn]] void ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType,
378 Type *CheckAndOperator(Type *leftType, Type *rightType, ir::Expression *leftExpr);
379 Type *CheckOrOperator(Type *leftType, Type *rightType, ir::Expression *leftExpr);
380 Type *CheckInstanceofExpression(Type *leftType, Type *rightType, ir::Expression *rightExpr, ir::AstNode *expr);
381 Type *CheckInExpression(Type *leftType, Type *rightType, ir::Expression *leftExpr, ir::Expression *rightExpr,
383 void CheckAssignmentOperator(lexer::TokenType op, ir::Expression *leftExpr, Type *leftType, Type *valueType);
391 void CheckBooleanLikeType(Type *leftType, Type *rightType, ir::AstNode *expr, lexer::TokenType op);
H A DETSAnalyzer.h43 Type *leftType) const;
55 checker::Type *GetSmartType(ir::AssignmentExpression *expr, checker::Type *leftType,
H A DETSchecker.h290 [[nodiscard]] bool CheckBinaryPlusMultDivOperandsForUnionType(const Type *leftType, const Type *rightType,
303 checker::Type *CheckBinaryOperatorPlusForEnums(const checker::Type *const leftType,
315 lexer::SourcePosition pos, checker::Type *leftType,
318 lexer::SourcePosition pos, checker::Type *leftType,
320 std::optional<std::tuple<Type *, Type *>> CheckBinaryOperatorEqualError(checker::Type *const leftType,
326 checker::Type *leftType, checker::Type *rightType,
332 bool isEqualOp, checker::Type *leftType,
334 std::tuple<Type *, Type *> CheckBinaryOperatorInstanceOf(lexer::SourcePosition pos, checker::Type *leftType,
520 Type *HandleBooleanLogicalOperators(Type *leftType, Type *rightType, lexer::TokenType tokenType);
521 Type *HandleBooleanLogicalOperatorsExtended(Type *leftType, Typ
[all...]
H A DTSAnalyzer.cpp339 checker::Type *TSAnalyzer::CheckAssignmentExprOperatorType(ir::AssignmentExpression *expr, checker::Type *leftType, in CheckAssignmentExprOperatorType() argument
344 leftRightType.leftType = leftType; in CheckAssignmentExprOperatorType()
365 checker->CheckAssignmentOperator(expr->OperatorType(), expr->Left(), leftType, rightType); in CheckAssignmentExprOperatorType()
403 auto *leftType = expr->Left()->Check(checker); in Check() local
405 if (leftType->HasTypeFlag(checker::TypeFlag::READONLY)) { in Check()
410 checker->ElaborateElementwise(leftType, expr->Right(), expr->Left()->Start()); in Check()
416 return CheckAssignmentExprOperatorType(expr, leftType, rightType); in Check()
447 return checker->CheckAndOperator(leftRightType->leftType, leftRightType->rightType, expr->Left()); in CheckBinaryExprArithmLogical()
450 return checker->CheckOrOperator(leftRightType->leftType, leftRightTyp in CheckBinaryExprArithmLogical()
[all...]
H A DTSAnalyzer.h41 checker::Type *CheckAssignmentExprOperatorType(ir::AssignmentExpression *expr, checker::Type *leftType,
H A DETSAnalyzer.cpp806 checker::Type *ETSAnalyzer::GetSmartType(ir::AssignmentExpression *expr, checker::Type *leftType, in GetSmartType() argument
810 checker::Type *smartType = leftType; in GetSmartType()
814 smartType = checker->ResolveSmartType(rightType, leftType); in GetSmartType()
824 if (checker->Relation()->IsIdenticalTo(leftType, smartType)) { in GetSmartType()
842 auto *const leftType = expr->Left()->Check(checker); in Check() local
863 auto [rightType, relationNode] = CheckAssignmentExprOperatorType(expr, leftType); in Check()
869 const checker::Type *targetType = checker->TryGettingFunctionTypeFromInvokeFunction(leftType); in Check()
872 checker::AssignmentContext(checker->Relation(), relationNode, rightType, leftType, expr->Right()->Start(), in Check()
875 checker::Type *smartType = GetSmartType(expr, leftType, rightType); in Check()
882 Type *const leftType) cons in CheckAssignmentExprOperatorType()
[all...]
/arkcompiler/ets_frontend/es2panda/typescript/
H A Dchecker.h360 [[noreturn]] void ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType,
459 Type *CheckBinaryOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr,
461 Type *CheckPlusOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr,
463 Type *CheckCompareOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr,
465 Type *CheckAndOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr);
466 Type *CheckOrOperator(Type *leftType, Type *rightType, const ir::Expression *leftExpr);
467 Type *CheckInstanceofExpression(Type *leftType, Type *rightType, const ir::Expression *rightExpr,
469 Type *CheckInExpression(Type *leftType, Type *rightType, const ir::Expression *leftExpr,
471 void CheckAssignmentOperator(lexer::TokenType op, const ir::Expression *leftExpr, Type *leftType, Type *valueType);
/arkcompiler/ets_runtime/ecmascript/compiler/
H A Dnumber_speculative_retype.h143 void ConvertForIntOperator(GateRef gate, GateType leftType, GateType rightType);
144 void ConvertForShiftAndLogicalOperator(GateRef gate, GateType leftType, GateType rightType);
145 void ConvertForDoubleOperator(GateRef gate, GateType leftType, GateType rightType);
H A Dcompiler_log.cpp274 GateType leftType = acc_.GetGateType(left); in CollectGateTypeLogInfo() local
276 if (leftType.IsIntType()) { in CollectGateTypeLogInfo()
278 } else if (leftType.IsDoubleType()) { in CollectGateTypeLogInfo()
H A Dshare_gate_meta_data.h448 static uint64_t ToValue(ParamType leftType, GateType rightType) in ToValue() argument
450 return LeftBits::Encode(leftType.Value()) | RightBits::Encode(rightType.Value()); in ToValue()
H A Dnumber_speculative_retype.cpp1035 void NumberSpeculativeRetype::ConvertForIntOperator(GateRef gate, GateType leftType, GateType rightType) in ConvertForIntOperator() argument
1040 acc_.ReplaceValueIn(gate, CheckAndConvertToInt32(left, leftType), 0); in ConvertForIntOperator()
1047 void NumberSpeculativeRetype::ConvertForShiftAndLogicalOperator(GateRef gate, GateType leftType, GateType rightType) in ConvertForShiftAndLogicalOperator() argument
1051 GateRef cLeft = CheckAndConvertToInt32(left, leftType, ConvertSupport::ENABLE, OpType::SHIFT_AND_LOGICAL); in ConvertForShiftAndLogicalOperator()
1061 void NumberSpeculativeRetype::ConvertForDoubleOperator(GateRef gate, GateType leftType, GateType rightType) in ConvertForDoubleOperator() argument
1066 acc_.ReplaceValueIn(gate, CheckAndConvertToFloat64(left, leftType), 0); in ConvertForDoubleOperator()
H A Dtyped_hcr_lowering.cpp738 ParamType leftType = accessor.GetLeftType(); in LowerTypeConvert() local
743 if (leftType.HasNumberType()) { in LowerTypeConvert()
744 LowerPrimitiveToNumber(gate, value, leftType); in LowerTypeConvert()

Completed in 28 milliseconds