2020-06-24 06:32:23 +00:00
|
|
|
load("//tools:defs.bzl", "go_library")
|
2019-10-16 23:27:55 +00:00
|
|
|
load("//tools/go_generics:defs.bzl", "go_template_instance")
|
2018-10-23 07:19:11 +00:00
|
|
|
|
2019-01-31 19:11:44 +00:00
|
|
|
package(licenses = ["notice"])
|
2018-10-23 07:19:11 +00:00
|
|
|
|
2020-06-24 06:32:23 +00:00
|
|
|
go_template_instance(
|
|
|
|
name = "pending_list",
|
|
|
|
out = "pending_list.go",
|
|
|
|
package = "state",
|
|
|
|
prefix = "pending",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
|
|
|
"Element": "*objectEncodeState",
|
|
|
|
"ElementMapper": "pendingMapper",
|
|
|
|
"Linker": "*pendingEntry",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_template_instance(
|
|
|
|
name = "deferred_list",
|
|
|
|
out = "deferred_list.go",
|
|
|
|
package = "state",
|
|
|
|
prefix = "deferred",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
|
|
|
"Element": "*objectEncodeState",
|
|
|
|
"ElementMapper": "deferredMapper",
|
|
|
|
"Linker": "*deferredEntry",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_template_instance(
|
|
|
|
name = "complete_list",
|
|
|
|
out = "complete_list.go",
|
|
|
|
package = "state",
|
|
|
|
prefix = "complete",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
|
|
|
"Element": "*objectDecodeState",
|
|
|
|
"Linker": "*objectDecodeState",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2018-04-27 17:37:02 +00:00
|
|
|
go_template_instance(
|
|
|
|
name = "addr_range",
|
|
|
|
out = "addr_range.go",
|
|
|
|
package = "state",
|
|
|
|
prefix = "addr",
|
|
|
|
template = "//pkg/segment:generic_range",
|
|
|
|
types = {
|
|
|
|
"T": "uintptr",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_template_instance(
|
|
|
|
name = "addr_set",
|
|
|
|
out = "addr_set.go",
|
|
|
|
consts = {
|
|
|
|
"minDegree": "10",
|
|
|
|
},
|
|
|
|
imports = {
|
|
|
|
"reflect": "reflect",
|
|
|
|
},
|
|
|
|
package = "state",
|
|
|
|
prefix = "addr",
|
|
|
|
template = "//pkg/segment:generic_set",
|
|
|
|
types = {
|
|
|
|
"Key": "uintptr",
|
|
|
|
"Range": "addrRange",
|
2020-06-24 06:32:23 +00:00
|
|
|
"Value": "*objectEncodeState",
|
2018-04-27 17:37:02 +00:00
|
|
|
"Functions": "addrSetFunctions",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "state",
|
|
|
|
srcs = [
|
|
|
|
"addr_range.go",
|
|
|
|
"addr_set.go",
|
2020-06-24 06:32:23 +00:00
|
|
|
"complete_list.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"decode.go",
|
2020-06-24 06:32:23 +00:00
|
|
|
"decode_unsafe.go",
|
|
|
|
"deferred_list.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"encode.go",
|
|
|
|
"encode_unsafe.go",
|
2020-06-24 06:32:23 +00:00
|
|
|
"pending_list.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"state.go",
|
2020-06-24 06:32:23 +00:00
|
|
|
"state_norace.go",
|
|
|
|
"state_race.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"stats.go",
|
2020-06-24 06:32:23 +00:00
|
|
|
"types.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
2020-05-21 01:33:51 +00:00
|
|
|
marshal = False,
|
2020-01-27 18:04:07 +00:00
|
|
|
stateify = False,
|
2018-04-27 17:37:02 +00:00
|
|
|
visibility = ["//:sandbox"],
|
|
|
|
deps = [
|
2020-06-24 06:32:23 +00:00
|
|
|
"//pkg/log",
|
|
|
|
"//pkg/state/wire",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
|
|
|
)
|