Lines Matching refs:ir
39 void ParserImpl::AddCommonjsParams(ArenaVector<ir::Expression *> ¶ms) in AddCommonjsParams()
42 ir::Expression *param = AllocNode<ir::Identifier>(paramName); in AddCommonjsParams()
49 void ParserImpl::AddReflectApplyArgs(ArenaVector<ir::Expression *> &args, ir::FunctionExpression *w… in AddReflectApplyArgs()
55 …ir::Expression *thisValue = AllocNode<ir::Identifier>(binder::Binder::CJS_MANDATORY_PARAM_EXPORTS); in AddReflectApplyArgs()
59 ArenaVector<ir::Expression *> elements(Allocator()->Adapter()); in AddReflectApplyArgs()
61 ir::Expression *arg = AllocNode<ir::Identifier>(argName); in AddReflectApplyArgs()
65 ir::ArrayExpression *wrapperArgsArray = in AddReflectApplyArgs()
66 … AllocNode<ir::ArrayExpression>(ir::AstNodeType::ARRAY_EXPRESSION, std::move(elements), false); in AddReflectApplyArgs()
73 ir::FunctionExpression *wrapper = nullptr; in ParseCommonjs()
79 ArenaVector<ir::Expression *> params(Allocator()->Adapter()); in ParseCommonjs()
90 … AllocNode<ir::ScriptFunction>(functionScope, std::move(params), nullptr, program_.Ast(), nullptr, in ParseCommonjs()
95 wrapper = AllocNode<ir::FunctionExpression>(funcNode); in ParseCommonjs()
99 ArenaVector<ir::Expression *> arguments(Allocator()->Adapter()); in ParseCommonjs()
102 auto *apply = AllocNode<ir::Identifier>("apply"); in ParseCommonjs()
103 auto *reflect = AllocNode<ir::Identifier>("Reflect"); in ParseCommonjs()
104 auto *reflectApply = AllocNode<ir::MemberExpression>(reflect, apply, in ParseCommonjs()
105 ir::MemberExpression::MemberExpressionKind::PROPERTY_ACCESS, false, false); in ParseCommonjs()
107 …auto *callExpr = AllocNode<ir::CallExpression>(reflectApply, std::move(arguments), nullptr, false); in ParseCommonjs()
109 auto *exprStatementNode = AllocNode<ir::ExpressionStatement>(callExpr); in ParseCommonjs()
111 ArenaVector<ir::Statement *> statements(Allocator()->Adapter()); in ParseCommonjs()
114 auto *blockStmt = AllocNode<ir::BlockStatement>(Binder()->GetScope(), std::move(statements)); in ParseCommonjs()