}}}
(context *funcContext, stmt *ast.FuncDefStmt)
| 1032 | } // }}} |
| 1033 | |
| 1034 | func compileFuncDefStmt(context *funcContext, stmt *ast.FuncDefStmt) { // {{{ |
| 1035 | if stmt.Name.Func == nil { |
| 1036 | reg := context.RegTop() |
| 1037 | var treg, kreg int |
| 1038 | compileExprWithKMVPropagation(context, stmt.Name.Receiver, ®, &treg) |
| 1039 | kreg = loadRk(context, ®, stmt.Func, LString(stmt.Name.Method)) |
| 1040 | compileExpr(context, reg, stmt.Func, ecfuncdef) |
| 1041 | context.Code.AddABC(OP_SETTABLE, treg, kreg, reg, sline(stmt.Name.Receiver)) |
| 1042 | } else { |
| 1043 | astmt := &ast.AssignStmt{Lhs: []ast.Expr{stmt.Name.Func}, Rhs: []ast.Expr{stmt.Func}} |
| 1044 | astmt.SetLine(sline(stmt.Func)) |
| 1045 | astmt.SetLastLine(eline(stmt.Func)) |
| 1046 | compileAssignStmt(context, astmt) |
| 1047 | } |
| 1048 | } // }}} |
| 1049 | |
| 1050 | func compileNumberForStmt(context *funcContext, stmt *ast.NumberForStmt) { // {{{ |
| 1051 | code := context.Code |
no test coverage detected
searching dependent graphs…