aboutsummaryrefslogtreecommitdiff
path: root/src/internal/pkgbits/syncmarker_string.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2022-02-14 09:41:19 -0800
committerMatthew Dempsky <mdempsky@google.com>2022-03-01 07:36:05 +0000
commit7c151f328056c354d3db13c17b3d96bec316cff6 (patch)
tree01327d059a54a85d4cfe4f83bdcefeb2626d6c9f /src/internal/pkgbits/syncmarker_string.go
parent6d881da9c894dfcd8c3dda0057a7c63a3ab59ea2 (diff)
downloadgo-7c151f328056c354d3db13c17b3d96bec316cff6.tar.xz
internal/pkgbits: extract unified IR coding-level logic
This logic is needed for the go/types unified IR importer, so extract it into a separate internal package so we can reuse a single copy. Change-Id: I5f734b76e580fdb69ee39e45ac553c22d01c5909 Reviewed-on: https://go-review.googlesource.com/c/go/+/386000 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/internal/pkgbits/syncmarker_string.go')
-rw-r--r--src/internal/pkgbits/syncmarker_string.go87
1 files changed, 87 insertions, 0 deletions
diff --git a/src/internal/pkgbits/syncmarker_string.go b/src/internal/pkgbits/syncmarker_string.go
new file mode 100644
index 0000000000..91154a001d
--- /dev/null
+++ b/src/internal/pkgbits/syncmarker_string.go
@@ -0,0 +1,87 @@
+// Code generated by "stringer -type=SyncMarker -trimprefix=Sync"; DO NOT EDIT.
+
+package pkgbits
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[SyncEOF-1]
+ _ = x[SyncBool-2]
+ _ = x[SyncInt64-3]
+ _ = x[SyncUint64-4]
+ _ = x[SyncString-5]
+ _ = x[SyncValue-6]
+ _ = x[SyncVal-7]
+ _ = x[SyncRelocs-8]
+ _ = x[SyncReloc-9]
+ _ = x[SyncUseReloc-10]
+ _ = x[SyncPublic-11]
+ _ = x[SyncPos-12]
+ _ = x[SyncPosBase-13]
+ _ = x[SyncObject-14]
+ _ = x[SyncObject1-15]
+ _ = x[SyncPkg-16]
+ _ = x[SyncPkgDef-17]
+ _ = x[SyncMethod-18]
+ _ = x[SyncType-19]
+ _ = x[SyncTypeIdx-20]
+ _ = x[SyncTypeParamNames-21]
+ _ = x[SyncSignature-22]
+ _ = x[SyncParams-23]
+ _ = x[SyncParam-24]
+ _ = x[SyncCodeObj-25]
+ _ = x[SyncSym-26]
+ _ = x[SyncLocalIdent-27]
+ _ = x[SyncSelector-28]
+ _ = x[SyncPrivate-29]
+ _ = x[SyncFuncExt-30]
+ _ = x[SyncVarExt-31]
+ _ = x[SyncTypeExt-32]
+ _ = x[SyncPragma-33]
+ _ = x[SyncExprList-34]
+ _ = x[SyncExprs-35]
+ _ = x[SyncExpr-36]
+ _ = x[SyncOp-37]
+ _ = x[SyncFuncLit-38]
+ _ = x[SyncCompLit-39]
+ _ = x[SyncDecl-40]
+ _ = x[SyncFuncBody-41]
+ _ = x[SyncOpenScope-42]
+ _ = x[SyncCloseScope-43]
+ _ = x[SyncCloseAnotherScope-44]
+ _ = x[SyncDeclNames-45]
+ _ = x[SyncDeclName-46]
+ _ = x[SyncStmts-47]
+ _ = x[SyncBlockStmt-48]
+ _ = x[SyncIfStmt-49]
+ _ = x[SyncForStmt-50]
+ _ = x[SyncSwitchStmt-51]
+ _ = x[SyncRangeStmt-52]
+ _ = x[SyncCaseClause-53]
+ _ = x[SyncCommClause-54]
+ _ = x[SyncSelectStmt-55]
+ _ = x[SyncDecls-56]
+ _ = x[SyncLabeledStmt-57]
+ _ = x[SyncUseObjLocal-58]
+ _ = x[SyncAddLocal-59]
+ _ = x[SyncLinkname-60]
+ _ = x[SyncStmt1-61]
+ _ = x[SyncStmtsEnd-62]
+ _ = x[SyncLabel-63]
+ _ = x[SyncOptLabel-64]
+}
+
+const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabel"
+
+var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 220, 227, 234, 238, 246, 255, 265, 282, 291, 299, 304, 313, 319, 326, 336, 345, 355, 365, 375, 380, 391, 402, 410, 418, 423, 431, 436, 444}
+
+func (i SyncMarker) String() string {
+ i -= 1
+ if i < 0 || i >= SyncMarker(len(_SyncMarker_index)-1) {
+ return "SyncMarker(" + strconv.FormatInt(int64(i+1), 10) + ")"
+ }
+ return _SyncMarker_name[_SyncMarker_index[i]:_SyncMarker_index[i+1]]
+}