Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 1 | // Copyright 2012 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Rob Pike | 8bca148 | 2014-08-12 17:04:45 -0700 | [diff] [blame] | 5 | #include "textflag.h" |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 6 | #include "funcdata.h" |
Keith Randall | 8b789e1 | 2013-08-12 10:25:36 -0700 | [diff] [blame] | 7 | |
Russ Cox | b1b67a3 | 2013-02-22 15:23:57 -0500 | [diff] [blame] | 8 | // makeFuncStub is the code half of the function returned by MakeFunc. |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 9 | // See the comment on the declaration of makeFuncStub in makefunc.go |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 10 | // for more details. |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 11 | // No arg size here; runtime pulls arg map out of the func value. |
Russ Cox | 7276c02 | 2013-09-12 14:00:16 -0400 | [diff] [blame] | 12 | TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$16 |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 13 | NO_LOCAL_POINTERS |
Russ Cox | b1b67a3 | 2013-02-22 15:23:57 -0500 | [diff] [blame] | 14 | MOVQ DX, 0(SP) |
Russ Cox | 07720b6 | 2013-03-22 12:57:55 -0400 | [diff] [blame] | 15 | LEAQ argframe+0(FP), CX |
Russ Cox | b1b67a3 | 2013-02-22 15:23:57 -0500 | [diff] [blame] | 16 | MOVQ CX, 8(SP) |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 17 | CALL ·callReflect(SB) |
| 18 | RET |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 19 | |
| 20 | // methodValueCall is the code half of the function returned by makeMethodValue. |
| 21 | // See the comment on the declaration of methodValueCall in makefunc.go |
| 22 | // for more details. |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 23 | // No arg size here; runtime pulls arg map out of the func value. |
Russ Cox | 7276c02 | 2013-09-12 14:00:16 -0400 | [diff] [blame] | 24 | TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$16 |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 25 | NO_LOCAL_POINTERS |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 26 | MOVQ DX, 0(SP) |
Russ Cox | 07720b6 | 2013-03-22 12:57:55 -0400 | [diff] [blame] | 27 | LEAQ argframe+0(FP), CX |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 28 | MOVQ CX, 8(SP) |
| 29 | CALL ·callMethod(SB) |
| 30 | RET |