rsc.io/go@v0.0.0-20150416155037-e040fd465409/src/cmd/internal/obj/mgc0.go (about)

     1  // Copyright 2013 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package obj
     6  
     7  // Garbage collector liveness bitmap generation.
     8  
     9  // The command line flag -live causes this code to print debug information.
    10  // The levels are:
    11  //
    12  //	-live (aka -live=1): print liveness lists as code warnings at safe points
    13  //	-live=2: print an assembly listing with liveness annotations
    14  //	-live=3: print information during each computation phase (much chattier)
    15  //
    16  // Each level includes the earlier output as well.
    17  
    18  // Copyright 2012 The Go Authors. All rights reserved.
    19  // Use of this source code is governed by a BSD-style
    20  // license that can be found in the LICENSE file.
    21  
    22  // Used by cmd/gc.
    23  
    24  const (
    25  	GcBits          = 4
    26  	BitsPerPointer  = 2
    27  	BitsDead        = 0
    28  	BitsScalar      = 1
    29  	BitsPointer     = 2
    30  	BitsMask        = 3
    31  	PointersPerByte = 8 / BitsPerPointer
    32  )
    33  
    34  const (
    35  	InsData = 1 + iota
    36  	InsArray
    37  	InsArrayEnd
    38  	InsEnd
    39  	MaxGCMask = 65536
    40  )