aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-05 10:38:22 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-05 10:38:22 +0200
commit5db39ab95395b60c5629a84812086f720adc9ccf (patch)
tree75fac9b668196f734366d219ca35613576596bd6 /pkg/compiler
parentc34180fca06cc29d2a29f3c1eec3131c6a0caf16 (diff)
sys: rename Call to Syscall
In preparation for moving sys types to prog to avoid confusion between sys.Call and prog.Call.
Diffstat (limited to 'pkg/compiler')
-rw-r--r--pkg/compiler/compiler.go2
-rw-r--r--pkg/compiler/gen.go10
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go
index fe9f286ad..8cccf53c4 100644
--- a/pkg/compiler/compiler.go
+++ b/pkg/compiler/compiler.go
@@ -34,7 +34,7 @@ import (
// Prog is description compilation result.
type Prog struct {
Resources []*sys.ResourceDesc
- Syscalls []*sys.Call
+ Syscalls []*sys.Syscall
StructDescs []*sys.KeyedStruct
// Set of unsupported syscalls/flags.
Unsupported map[string]bool
diff --git a/pkg/compiler/gen.go b/pkg/compiler/gen.go
index 9f705cf74..e3b7ffd66 100644
--- a/pkg/compiler/gen.go
+++ b/pkg/compiler/gen.go
@@ -44,8 +44,8 @@ func (comp *compiler) genResource(n *ast.Resource) *sys.ResourceDesc {
return res
}
-func (comp *compiler) genSyscalls() []*sys.Call {
- var calls []*sys.Call
+func (comp *compiler) genSyscalls() []*sys.Syscall {
+ var calls []*sys.Syscall
for _, decl := range comp.desc.Nodes {
if n, ok := decl.(*ast.Call); ok {
calls = append(calls, comp.genSyscall(n))
@@ -60,12 +60,12 @@ func (comp *compiler) genSyscalls() []*sys.Call {
return calls
}
-func (comp *compiler) genSyscall(n *ast.Call) *sys.Call {
+func (comp *compiler) genSyscall(n *ast.Call) *sys.Syscall {
var ret sys.Type
if n.Ret != nil {
ret = comp.genType(n.Ret, "ret", sys.DirOut, true)
}
- return &sys.Call{
+ return &sys.Syscall{
Name: n.Name.Name,
CallName: n.CallName,
NR: n.NR,
@@ -74,7 +74,7 @@ func (comp *compiler) genSyscall(n *ast.Call) *sys.Call {
}
}
-func (comp *compiler) genStructDescs(syscalls []*sys.Call) []*sys.KeyedStruct {
+func (comp *compiler) genStructDescs(syscalls []*sys.Syscall) []*sys.KeyedStruct {
// Calculate struct/union/array sizes, add padding to structs and detach
// StructDesc's from StructType's. StructType's can be recursive so it's
// not possible to write them out inline as other types. To break the