mirror of
https://github.com/golang/go.git
synced 2025-11-01 17:20:56 +00:00
runtime: remove duplicated Go constants
The C header files are the single point of truth: every C enum constant Foo is available to Go as _Foo. Remove or redirect duplicate Go declarations so they cannot be out of sync. Eventually we will need to put constants in Go, but for now having them be out of sync with C is too risky. These predate the build support for auto-generating Go constants from the C definitions. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/141510043
This commit is contained in:
parent
8d61334dd5
commit
d2574e2adb
27 changed files with 117 additions and 129 deletions
|
|
@ -423,6 +423,52 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) {
|
|||
" _Genqueue = 7;" +
|
||||
" _Gcopystack = 8;" +
|
||||
" _NSIG = 32;" +
|
||||
" _FlagNoScan = iota;" +
|
||||
" _FlagNoZero;" +
|
||||
" _TinySize;" +
|
||||
" _TinySizeClass;" +
|
||||
" _MaxSmallSize;" +
|
||||
" _PageShift;" +
|
||||
" _PageSize;" +
|
||||
" _PageMask;" +
|
||||
" _BitsPerPointer;" +
|
||||
" _BitsMask;" +
|
||||
" _PointersPerByte;" +
|
||||
" _MaxGCMask;" +
|
||||
" _BitsDead;" +
|
||||
" _BitsPointer;" +
|
||||
" _MSpanInUse;" +
|
||||
" _ConcurrentSweep;" +
|
||||
" _KindBool;" +
|
||||
" _KindInt;" +
|
||||
" _KindInt8;" +
|
||||
" _KindInt16;" +
|
||||
" _KindInt32;" +
|
||||
" _KindInt64;" +
|
||||
" _KindUint;" +
|
||||
" _KindUint8;" +
|
||||
" _KindUint16;" +
|
||||
" _KindUint32;" +
|
||||
" _KindUint64;" +
|
||||
" _KindUintptr;" +
|
||||
" _KindFloat32;" +
|
||||
" _KindFloat64;" +
|
||||
" _KindComplex64;" +
|
||||
" _KindComplex128;" +
|
||||
" _KindArray;" +
|
||||
" _KindChan;" +
|
||||
" _KindFunc;" +
|
||||
" _KindInterface;" +
|
||||
" _KindMap;" +
|
||||
" _KindPtr;" +
|
||||
" _KindSlice;" +
|
||||
" _KindString;" +
|
||||
" _KindStruct;" +
|
||||
" _KindUnsafePointer;" +
|
||||
" _KindDirectIface;" +
|
||||
" _KindGCProg;" +
|
||||
" _KindNoPointers;" +
|
||||
" _KindMask;" +
|
||||
")"
|
||||
f, err = parser.ParseFile(fset, filename, src, 0)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue