(apply, n_binders, type_hint)
| 17417 | return new torch._C.SimpleValue(this.emitSimpleExpr(tree, type_hint)); |
| 17418 | } |
| 17419 | emitApplyExpr(apply, n_binders, type_hint) { |
| 17420 | type_hint = type_hint || null; |
| 17421 | const sv = this.emitSugaredExpr(apply.func, 1); |
| 17422 | const loc = apply.func.range(); |
| 17423 | if (sv instanceof torch._C.SpecialFormValue) { |
| 17424 | return this.emitApplySpecialForm(sv.form(), apply, sv, type_hint); |
| 17425 | } |
| 17426 | const args = this.getNamedValues(apply.args, true); |
| 17427 | const kwargs = this.emitAttributes(apply.keywords); |
| 17428 | return sv.call(loc, this.method, args, kwargs, n_binders); |
| 17429 | } |
| 17430 | emitAttributes(attributes) { |
| 17431 | return attributes.map((attr) => new torch._C.NamedValue(attr.range(), attr.arg, this.emitExpr(attr.value))); |
| 17432 | } |
no test coverage detected