| /arkcompiler/ets_frontend/ts2panda/src/expression/ |
| D | templateExpression.ts | 20 function genRawString(pandaGen: PandaGen, expr: ts.TemplateExpression | ts.NoSubstitutionTemplateLi… 22 if (ts.isTemplateExpression(expr)) { 23 text = expr.head.rawText!; 25 text = expr.rawText!; 29 pandaGen.loadAccumulatorString(expr, text); 32 function genCookedString(pandaGen: PandaGen, expr: ts.TemplateExpression | ts.NoSubstitutionTemplat… 34 if (ts.isTemplateExpression(expr)) { 35 text = expr.head.text; 37 text = expr.text; 45 pandaGen.loadAccumulatorString(expr, text); [all …]
|
| D | yieldExpression.ts | 23 export function compileYieldExpression(compiler: Compiler, expr: ts.YieldExpression): void { 25 …throw new DiagnosticError(expr.parent, DiagnosticCode.A_yield_expression_is_only_allowed_in_a_gene… 28 expr.asteriskToken ? genYieldStarExpr(compiler, expr) : genYieldExpr(compiler, expr); 31 function genYieldExpr(compiler: Compiler, expr: ts.YieldExpression): void { 34 if (expr.expression) { 35 compiler.compileExpression(expr.expression); 36 funcBuilder.yield(expr); 38 pandaGen.loadAccumulator(expr, getVregisterCache(pandaGen, CacheList.UNDEFINED)); 39 funcBuilder.yield(expr); 43 function genYieldStarExpr(compiler: Compiler, expr: ts.YieldExpression): void { [all …]
|
| D | callExpression.ts | 27 export function compileCallExpression(expr: ts.CallExpression, compiler: Compiler, inTailPos?: bool… 30 let innerExpression = ts.skipPartiallyEmittedExpressions(expr.expression); 33 compiler.compileExpression(expr.arguments[0]); 34 pandaGen.dynamicImportCall(expr); 47 let hasSpread = emitCallArguments(compiler, expr, args); 48 compileSuperCall(compiler, expr, args, hasSpread); 56 emitCall(expr, args, passThis, compiler); 60 export function getHiddenParameters(expr: ts.Expression, compiler: Compiler) { 65 if (isMemberExpression(expr)) { 70 …= getObjAndProp(<ts.PropertyAccessExpression | ts.ElementAccessExpression>expr, thisReg, propReg, … [all …]
|
| D | newExpression.ts | 22 export function compileNewExpression(expr: ts.NewExpression, compiler: Compiler): void { 27 compiler.compileExpression(expr.expression); 28 pandaGen.storeAccumulator(expr, ctorReg); 30 if (containSpreadElement(expr.arguments)) { 32 … createArrayFromElements(expr, compiler, <ts.NodeArray<ts.Expression>>expr.arguments, argRegs); 34 pandaGen.newObjSpread(expr, ctorReg); 42 if (expr.arguments) { 43 numArgs += expr.arguments.length; 50 if (expr.arguments) { 52 expr.arguments.forEach((argExpr: ts.Expression) => { [all …]
|
| D | parenthesizedExpression.ts | 18 export function findInnerExprOfParenthesis(expr: ts.ParenthesizedExpression): ts.Expression { 19 while (expr.expression.kind === ts.SyntaxKind.ParenthesizedExpression) { 20 expr = <ts.ParenthesizedExpression>expr.expression; 22 return expr.expression; 25 export function findOuterNodeOfParenthesis(expr: ts.Node): ts.Node { 26 let parent = expr.parent;
|
| D | metaProperty.ts | 21 export function compileMetaProperty(expr: ts.MetaProperty, compiler: Compiler): void { 23 let id = jshelpers.getTextOfIdentifierOrLiteral(expr.name); 30 compiler.loadTarget(expr, { scope, level, v });
|
| D | compileCommaListExpression.ts | 21 exprList.elements.forEach(expr => { 22 compiler.compileExpression(expr);
|
| D | objectLiteralExpression.ts | 28 export function compileObjectLiteralExpression(compiler: Compiler, expr: ts.ObjectLiteralExpression… 32 let properties: Property[] = generatePropertyFromExpr(expr); 39 pandaGen.createEmptyObject(expr); 40 pandaGen.storeAccumulator(expr, objReg); 49 createObject(expr, pandaGen, objReg, literalBuffer, hasMethod, compiler); 54 pandaGen.loadAccumulator(expr, objReg); 110 function createObject(expr: ts.ObjectLiteralExpression, pandaGen: PandaGen, objReg: VReg, 113 pandaGen.createEmptyObject(expr); 116 pandaGen.createObjectWithBuffer(expr, bufferId); 118 pandaGen.storeAccumulator(expr, objReg);
|
| /arkcompiler/ets_frontend/ts2panda/src/function/ |
| D | generatorFunctionBuilder.ts | 84 yieldStar(expr: ts.YieldExpression): void { 103 let iterator: IteratorRecord = getIteratorRecord(pandaGen, expr, method, object, type); 106 pandaGen.moveVreg(expr, receivedValue, getVregisterCache(pandaGen, CacheList.UNDEFINED)); 109 pandaGen.loadAccumulatorInt(expr, ResumeMode.NEXT); 110 pandaGen.storeAccumulator(expr, modeType); 113 pandaGen.label(expr, loopStartLabel); 114 pandaGen.loadAccumulatorInt(expr, ResumeMode.NEXT); 115 pandaGen.condition(expr, ts.SyntaxKind.EqualsEqualsToken, modeType, callreturnLabel); 118 pandaGen.call(expr, [iterator.getNextMethod(), iterator.getObject(), receivedValue], true); 119 pandaGen.branch(expr, iteratorCompletionLabel); [all …]
|
| /arkcompiler/ets_frontend/ts2panda/src/ |
| D | compiler.ts | 741 compileCondition(expr: ts.Expression, ifFalseLabel: Label): void { 743 if (expr.kind === ts.SyntaxKind.BinaryExpression) { 744 let binExpr = <ts.BinaryExpression>expr; 790 this.compileExpression(expr); 791 pandaGen.jumpIfFalse(expr, ifFalseLabel); 794 compileExpression(expr: ts.Expression): void { 796 LOGD(this.debugTag, "compile expr: " + ts.SyntaxKind[expr.kind] + " " + expr.kind); 797 switch (expr.kind) { 799 compileNumericLiteral(this.pandaGen, <ts.NumericLiteral>expr); 802 compileBigIntLiteral(this.pandaGen, <ts.BigIntLiteral>expr); [all …]
|
| /arkcompiler/ets_frontend/es2panda/compiler/base/ |
| D | condition.cpp | 24 void Condition::Compile(PandaGen *pg, const ir::Expression *expr, Label *falseLabel) in Compile() argument 26 if (expr->IsBinaryExpression()) { in Compile() 27 const auto *binExpr = expr->AsBinaryExpression(); in Compile() 75 } else if (expr->IsUnaryExpression() && in Compile() 76 … expr->AsUnaryExpression()->OperatorType() == lexer::TokenType::PUNCTUATOR_EXCLAMATION_MARK) { in Compile() 77 expr->AsUnaryExpression()->Argument()->Compile(pg); in Compile() 79 pg->Negate(expr); in Compile() 80 pg->BranchIfFalse(expr, falseLabel); in Compile() 85 expr->Compile(pg); in Compile() 86 pg->BranchIfFalse(expr, falseLabel); in Compile()
|
| /arkcompiler/ets_frontend/es2panda/ir/ts/ |
| D | tsEnumDeclaration.cpp | 72 const ir::Identifier *expr) in EvaluateIdentifier() argument 74 if (expr->Name() == "NaN") { in EvaluateIdentifier() 77 if (expr->Name() == "Infinity") { in EvaluateIdentifier() 81 binder::Variable *enumMember = expr->AsIdentifier()->Variable(); in EvaluateIdentifier() 84 checker->ThrowTypeError({"Cannot find name ", expr->AsIdentifier()->Name()}, in EvaluateIdentifier() 105 const ir::UnaryExpression *expr) in EvaluateUnaryExpression() argument 107 …binder::EnumMemberResult value = TSEnumDeclaration::EvaluateEnumMember(checker, enumVar, expr->Arg… in EvaluateUnaryExpression() 112 switch (expr->OperatorType()) { in EvaluateUnaryExpression() 132 const ir::MemberExpression *expr) in EvaluateMemberExpression() argument 134 if (checker::Checker::IsConstantMemberAccess(expr->AsExpression())) { in EvaluateMemberExpression() [all …]
|
| D | tsExternalModuleReference.h | 34 explicit TSExternalModuleReference(Expression *expr) in TSExternalModuleReference() argument 35 : Expression(AstNodeType::TS_EXTERNAL_MODULE_REFERENCE), expr_(expr) in TSExternalModuleReference()
|
| D | tsInterfaceHeritage.h | 37 …explicit TSInterfaceHeritage(Expression *expr) : Expression(AstNodeType::TS_INTERFACE_HERITAGE), e… in TSInterfaceHeritage() argument
|
| /arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
| D | forInStatement3.ts | 22 let expr: T; 23 AssertType(expr, "T"); 25 for (let a in expr) { 27 AssertType(expr, "T");
|
| D | forInStatement1.ts | 21 let expr: any; 22 AssertType(expr, "any"); 24 for (let a in expr) {
|
| D | forInStatement5.ts | 24 let expr: any; 25 AssertType(expr, "any"); 27 for (a in expr) {
|
| D | forInStatement6.ts | 24 let expr: any; 25 AssertType(expr, "any"); 27 for (a in expr) {
|
| /arkcompiler/ets_frontend/ts2panda/src/statement/ |
| D | returnStatement.ts | 39 let expr = stmt.expression; 43 if (!expr) { 46 if (ts.isCallExpression(expr) && expr.expression.kind === ts.SyntaxKind.SuperKeyword) { 52 if (expr.kind === ts.SyntaxKind.ThisKeyword) { 55 compiler.compileExpression(expr); 74 if (expr) { 75 compiler.compileExpression(expr); 108 let expr = stmt.expression; 112 if (expr) { 113 compiler.compileExpression(expr);
|
| /arkcompiler/ets_frontend/es2panda/typescript/core/ |
| D | util.cpp | 37 …st ir::MemberExpression *Checker::ResolveLeftMostMemberExpression(const ir::MemberExpression *expr) in ResolveLeftMostMemberExpression() argument 39 const ir::MemberExpression *iter = expr; in ResolveLeftMostMemberExpression() 183 bool Checker::IsConstantMemberAccess(const ir::Expression *expr) in IsConstantMemberAccess() argument 185 switch (expr->Type()) { in IsConstantMemberAccess() 190 bool res = IsConstantMemberAccess(expr->AsMemberExpression()->Object()); in IsConstantMemberAccess() 191 return !expr->AsMemberExpression()->IsComputed() in IsConstantMemberAccess() 193 : (res && IsStringLike(expr->AsMemberExpression()->Property())); in IsConstantMemberAccess() 200 bool Checker::IsStringLike(const ir::Expression *expr) in IsStringLike() argument 202 if (expr->IsStringLiteral()) { in IsStringLike() 206 if (expr->IsTemplateLiteral() && expr->AsTemplateLiteral()->Quasis().empty()) { in IsStringLike()
|
| D | binaryLikeExpression.cpp | 24 … const ir::Expression *rightExpr, const ir::AstNode *expr, lexer::TokenType op) in CheckBinaryOperator() argument 56 expr->Start()); in CheckBinaryOperator() 65 expr->Start()); in CheckBinaryOperator() 83 …owTypeError({"operator ", op, " cannot be applied to types 'bigint' and 'bigint'"}, expr->Start()); in CheckBinaryOperator() 87 ThrowBinaryLikeError(op, leftType, rightType, expr->Start()); in CheckBinaryOperator() 95 … const ir::Expression *rightExpr, const ir::AstNode *expr, lexer::TokenType op) in CheckPlusOperator() argument 116 ThrowBinaryLikeError(op, leftType, rightType, expr->Start()); in CheckPlusOperator() 127 … const ir::Expression *rightExpr, const ir::AstNode *expr, lexer::TokenType op) in CheckCompareOperator() argument 137 ThrowBinaryLikeError(op, leftType, rightType, expr->Start()); in CheckCompareOperator() 174 const ir::AstNode *expr) in CheckInstanceofExpression() argument [all …]
|
| /arkcompiler/ets_frontend/test262/ |
| D | dynamicImport_tests.txt | 8 nested-function-return-assignment-expr-not-optional.js 9 nested-else-braceless-assignment-expr-not-optional.js 20 nested-async-function-assignment-expr-not-optional.js 24 nested-async-function-return-await-assignment-expr-not-optional.js 33 nested-async-gen-await-assignment-expr-not-optional.js 34 nested-arrow-assignment-expr-not-optional.js 39 nested-block-assignment-expr-not-optional.js 43 nested-while-assignment-expr-not-optional.js 49 nested-async-arrow-function-await-assignment-expr-not-optional.js 55 nested-arrow-assignment-expression-assignment-expr-not-optional.js [all …]
|
| /arkcompiler/ets_frontend/es2panda/typescript/ |
| D | checker.cpp | 85 Type *Checker::CheckTypeCached(const ir::Expression *expr) in CheckTypeCached() argument 87 auto res = nodeCache_.find(expr); in CheckTypeCached() 92 Type *returnType = expr->Check(this); in CheckTypeCached() 93 nodeCache_.insert({expr, returnType}); in CheckTypeCached()
|
| /arkcompiler/ets_frontend/es2panda/util/ |
| D | concurrent.cpp | 40 …current::ThrowInvalidConcurrentFunction(const lexer::LineIndex &lineIndex, const ir::AstNode *expr, in ThrowInvalidConcurrentFunction() argument 43 auto line = expr->Range().start.line; in ThrowInvalidConcurrentFunction() 44 …auto column = (const_cast<lexer::LineIndex &>(lineIndex)).GetLocation(expr->Range().start).col - 1; in ThrowInvalidConcurrentFunction()
|
| /arkcompiler/runtime_core/libpandabase/utils/ |
| D | debug.cpp | 24 [[noreturn]] void AssertionFail(const char *expr, const char *file, unsigned line, const char *func… in AssertionFail() argument 26 std::cerr << "ASSERTION FAILED: " << expr << std::endl; in AssertionFail()
|