Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AkihiroSuda/aspectgo
/ functions
Functions
124 in github.com/AkihiroSuda/aspectgo
⨍
Functions
124
◇
Types & classes
27
↓ 14 callers
Method
Args
Args returns the original argument set for the joinpoint. The slice can be empty []interface{}{}, but cannot be nil.
aspect/interface.go:12
↓ 11 callers
Method
Call
Call calls the joinpoint. User must be careful about the length and the type of the []interface{} slices. The slices can be empty []interface{}{}, but
aspect/interface.go:18
↓ 8 callers
Function
testEx
textEx returns the output of the original test and the woven test suite if succeeds. the output contains stderr. if the woven test or aspectgo itself
example/example_test.go:67
↓ 6 callers
Method
Foo
(x string)
example/receiver2/pkg1/pkg1.go:8
↓ 6 callers
Method
typeString
(typ types.Type)
compiler/weave/rewrite.go:660
↓ 5 callers
Method
Foo
(x int)
example/receiver/main.go:8
↓ 4 callers
Function
exists
(name string)
compiler/gopath/gopath.go:42
↓ 4 callers
Function
voidIntfArrayExpr
()
compiler/weave/rewrite.go:106
↓ 3 callers
Method
Receiver
Receiver returns the receiver for methods. For non-method function, it just returns nil.
aspect/interface.go:22
↓ 2 callers
Method
Pointcut
Pointcut returns the pointcut for the aspect. Pointcut is executed on compilation-time.
aspect/interface.go:52
↓ 2 callers
Method
String
()
aspect/interface.go:31
↓ 2 callers
Function
advice
(name string, ctx asp.Context)
example/receiver/main_aspect.go:34
↓ 2 callers
Function
execMainWithGOPATH
(t *testing.T, gopath, pkg, mainFileBasename string)
example/example_test.go:51
↓ 2 callers
Method
proxy
proxy generates addendum and returns new ast.Expr for the node. generated addendum can be obtained via AddendumForASTFile. How it works: Step 1: call
compiler/weave/rewrite.go:567
↓ 2 callers
Function
resolveTarget
resolveTarget resolves target that can contain ... and returns the list of resolved packages.
compiler/compiler.go:84
↓ 1 callers
Method
AddendumForASTFile
()
compiler/weave/rewrite.go:656
↓ 1 callers
Method
Advice
Advice executes the "around" advice. User must be careful about the length and the type of the []interface{} slice. The slice can be empty []interface
aspect/interface.go:58
↓ 1 callers
Method
Do
Do does all the compilation phases.
compiler/compiler.go:33
↓ 1 callers
Method
DoWork
()
example/detreplay/worker/worker.go:22
↓ 1 callers
Method
Rewrite
(node ast.Node)
compiler/weave/rewrite.go:606
↓ 1 callers
Method
Rewrite
(node ast.Node)
compiler/weave/aspectrewrite.go:66
↓ 1 callers
Function
_fixUp
(oc os.FileInfo, oldDir, wovenDir string, writtenFnames []string)
compiler/gopath/gopath.go:62
↓ 1 callers
Function
_parseAspectFile
(aspectFilename string)
compiler/parse/parse.go:56
↓ 1 callers
Method
_pgen
_pgen generates the pgen function. pgen is like this: var f func(int) f := (_ag_pgen_ag_proxy_0(i)) // orig: f := i.Foo f(42) func _ag_pgen_ag_prox
compiler/weave/rewrite.go:517
↓ 1 callers
Method
_pgen_body
(matched types.Object, pdecl *ast.FuncDecl)
compiler/weave/rewrite.go:436
↓ 1 callers
Method
_pgen_decl
(matched types.Object, pdecl *ast.FuncDecl, pgenName string)
compiler/weave/rewrite.go:381
↓ 1 callers
Method
_proxy
(node ast.Node, matched types.Object, proxyName string, asp *types.Named)
compiler/weave/rewrite.go:375
↓ 1 callers
Method
_proxy_body
_proxy_body generates _ag_proxy_func body like this: _ag_res := (&dummyAspect{}).Advice( &ContextImpl{ XArgs: []interface{}{"world"}, XFunc: fun
compiler/weave/rewrite.go:334
↓ 1 callers
Method
_proxy_body_XArgs
_proxy_body_XArgs generates like this: `XArgs: []interface{}{"world"}`
compiler/weave/rewrite.go:151
↓ 1 callers
Method
_proxy_body_XFunc
_proxy_body_XFunc generates like this: `XFunc: func(_ag_args []interface{}) []interface {} { _ag_arg0 := _ag_args[0].(string) sayHello(_ag_arg0) _ag_r
compiler/weave/rewrite.go:169
↓ 1 callers
Method
_proxy_body_XReceiver
(node ast.Node, matched types.Object)
compiler/weave/rewrite.go:269
↓ 1 callers
Method
_proxy_body_callExpr
(node ast.Node, matched types.Object, asp *types.Named)
compiler/weave/rewrite.go:278
↓ 1 callers
Method
_proxy_decl
_proxy_decl generates _ag_proxy_func decl like this: `func _ag_proxy_0(s string)`
compiler/weave/rewrite.go:115
↓ 1 callers
Method
_proxy_fix_up
(node ast.Node, matched types.Object, pgenName string)
compiler/weave/rewrite.go:523
↓ 1 callers
Method
determinePointcuts
compile the aspect and get Pointcut data steps: * copy the aspect file to tmp.go * add main() to tmp.go * compile and run tmp.go * parse the output an
compiler/parse/pointcut.go:24
↓ 1 callers
Method
doActualWork
(workAmount int)
example/detreplay/worker/worker.go:17
↓ 1 callers
Function
execAspectGo
(t *testing.T, wovenGOPATH, pkg, aspectFileBasename string, recursive bool)
example/example_test.go:32
↓ 1 callers
Function
findMatchedThings
(prog *loader.Program, pointcuts map[*types.Named]aspect.Pointcut)
compiler/weave/weave.go:68
↓ 1 callers
Function
fnObjMatchPointcutByRegexp
(fn *types.Func, pointcut aspect.Pointcut)
compiler/weave/match/match.go:26
↓ 1 callers
Method
init
()
compiler/weave/rewrite.go:95
↓ 1 callers
Function
isDir
(name string)
compiler/gopath/gopath.go:50
↓ 1 callers
Function
loadTarget
(target string)
compiler/weave/weave.go:101
↓ 1 callers
Function
locateTmpAspectFile
locate aspectFilename to dir to determine the pointcut value TODO: eliminate aspectStructure.Advice()
compiler/parse/pointcut.go:53
↓ 1 callers
Function
locateTmpAspectMainFile
(aspectStructureName, dir string)
compiler/parse/pointcut.go:89
↓ 1 callers
Function
lookupAspectInterface
(program *loader.Program)
compiler/parse/parse.go:103
↓ 1 callers
Function
lookupAspects
(pkg *types.Package, aspectIntf *types.Named)
compiler/parse/parse.go:79
↓ 1 callers
Function
makeI
()
example/receiver/main.go:22
↓ 1 callers
Function
parseTmpAspectMainOutput
(s string)
compiler/parse/pointcut.go:132
↓ 1 callers
Function
pointcutMapToAspectMap
(pointcuts map[*types.Named]aspect.Pointcut)
compiler/weave/weave.go:56
↓ 1 callers
Function
rewriteAspectFile
(wovenGOPATH string, af *parse.AspectFile)
compiler/weave/aspectrewrite.go:20
↓ 1 callers
Function
rewriteProgram
(wovenGOPATH string, rw *rewriter)
compiler/weave/rewrite.go:24
↓ 1 callers
Function
runTmpAspectMain
(dir string)
compiler/parse/pointcut.go:104
↓ 1 callers
Function
sayHello
(s string)
example/hello2/main.go:7
↓ 1 callers
Function
sayHello
(s string)
example/multipointcut/main.go:7
↓ 1 callers
Function
sayHello
(s string)
example/recursive/main.go:9
↓ 1 callers
Function
sayHello
(s string)
example/hello/main.go:7
↓ 1 callers
Function
sayHello
(s string)
example/hello3/main.go:7
↓ 1 callers
Function
sayHello
(s string)
aspect/rt/rt_test.go:27
Function
ASTDebugString
ASTDebugString returns a debug string for the AST node.
compiler/util/util.go:48
Method
Advice
Executed ONLY on runtime
example/hello2/main_aspect.go:23
Method
Advice
(ctx asp.Context)
example/hello2/main_aspect.go:40
Method
Advice
(ctx asp.Context)
example/receiver/main_aspect.go:18
Method
Advice
(ctx asp.Context)
example/receiver/main_aspect.go:30
Method
Advice
(ctx asp.Context)
example/detreplay/main_aspect.go:19
Method
Advice
(ctx asp.Context)
example/receiver2/main_aspect.go:17
Method
Advice
(ctx asp.Context)
example/multipointcut/main_aspect.go:21
Method
Advice
(ctx asp.Context)
example/multipointcut/main_aspect.go:38
Method
Advice
Executed ONLY on runtime
example/recursive/main_aspect.go:20
Method
Advice
Executed ONLY on runtime
example/hello/main_aspect.go:22
Method
Advice
Executed ONLY on runtime
example/everything/everything_aspect.go:19
Method
Advice
Executed ONLY on runtime
example/hello3/main_aspect.go:18
Method
Advice
(ctx asp.Context)
aspect/rt/rt_test.go:18
Method
Args
Args should NOT be called manually.
aspect/rt/rt.go:18
Method
Call
Call should NOT be called manually.
aspect/rt/rt.go:23
Function
FileForNewGOPATH
FileForNewGOPATH returns the path for new wovenGOPATH (s/oldGOPATH/wovenGOPATH).
compiler/gopath/gopath.go:13
Function
FixUp
FixUp fixes up GOPATH after the weaving phase. It makes some symbolic links from wovenDir to oldDir so that the woven package can be built with wovenD
compiler/gopath/gopath.go:98
Method
Foo
(x int)
example/receiver/main.go:15
Method
Foo
(x string)
example/receiver2/pkg2/pkg2.go:8
Function
LocalTypeString
LocalTypeString returns the local type string for typ, using pkg and imports information. TODO: use regexp.
compiler/util/util.go:19
Function
Main
Main is the CLI for AspectGo.
compiler/cli/cli.go:15
Function
NewCallPointcutFromRegexp
NewCallPointcutFromRegexp creates a "call" pointcut from s. s needs to be a regexp for function/method name.
aspect/interface.go:37
Function
NewExecPointcutFromRegexp
NewExecPointcutFromRegexp creates a "execution" pointcut from s. s needs to be a regexp for function/method name.
aspect/interface.go:43
Function
ObjMatchPointcut
ObjMatchPointcut returns true if obj matches the pointcut. current implementation is very naive: just checks regexp for types.Func.FullName() TODO: su
compiler/weave/match/match.go:18
Function
ParseAspectFile
ParseAspectFile parses an aspect file.
compiler/parse/parse.go:26
Method
Pointcut
Executed on compilation-time
example/hello2/main_aspect.go:16
Method
Pointcut
()
example/hello2/main_aspect.go:35
Method
Pointcut
()
example/receiver/main_aspect.go:14
Method
Pointcut
()
example/receiver/main_aspect.go:26
Method
Pointcut
()
example/detreplay/main_aspect.go:15
Method
Pointcut
()
example/receiver2/main_aspect.go:13
Method
Pointcut
()
example/multipointcut/main_aspect.go:15
Method
Pointcut
()
example/multipointcut/main_aspect.go:32
Method
Pointcut
Executed on compilation-time
example/recursive/main_aspect.go:14
Method
Pointcut
Executed on compilation-time
example/hello/main_aspect.go:15
Method
Pointcut
Executed on compilation-time
example/everything/everything_aspect.go:14
Method
Pointcut
Executed on compilation-time
example/hello3/main_aspect.go:12
Method
Pointcut
()
aspect/rt/rt_test.go:14
Method
Receiver
Receiver should NOT be called manually.
aspect/rt/rt.go:28
Function
SayHello1
()
example/recursive/pkg1/pkg1.go:8
Function
SayHello2
()
example/recursive/pkg1/pkg2/pkg2.go:7
next →
1–100 of 124, ranked by callers