mirror of
https://github.com/golang/go.git
synced 2025-11-03 10:10:55 +00:00
cmd/compile/internal/gc: update old c-style comments
Update old c-style comments to look like Go comments. Also replace some lingering references to old .c files that don't exist anymore. Change-Id: I72b2407a40fc76c23e9048643e0622fd70b4cf90 Reviewed-on: https://go-review.googlesource.com/16190 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
6410e67a1e
commit
6327e8dc69
26 changed files with 527 additions and 852 deletions
|
|
@ -17,13 +17,11 @@ package gc
|
|||
// a->offset += v;
|
||||
// break;
|
||||
|
||||
/*
|
||||
* a function named init is a special case.
|
||||
* it is called by the initialization before
|
||||
* main is run. to make it unique within a
|
||||
* package and also uncallable, the name,
|
||||
* normally "pkg.init", is altered to "pkg.init.1".
|
||||
*/
|
||||
// a function named init is a special case.
|
||||
// it is called by the initialization before
|
||||
// main is run. to make it unique within a
|
||||
// package and also uncallable, the name,
|
||||
// normally "pkg.init", is altered to "pkg.init.1".
|
||||
|
||||
var renameinit_initgen int
|
||||
|
||||
|
|
@ -32,24 +30,22 @@ func renameinit() *Sym {
|
|||
return Lookupf("init.%d", renameinit_initgen)
|
||||
}
|
||||
|
||||
/*
|
||||
* hand-craft the following initialization code
|
||||
* var initdone· uint8 (1)
|
||||
* func init() (2)
|
||||
* if initdone· != 0 { (3)
|
||||
* if initdone· == 2 (4)
|
||||
* return
|
||||
* throw(); (5)
|
||||
* }
|
||||
* initdone· = 1; (6)
|
||||
* // over all matching imported symbols
|
||||
* <pkg>.init() (7)
|
||||
* { <init stmts> } (8)
|
||||
* init.<n>() // if any (9)
|
||||
* initdone· = 2; (10)
|
||||
* return (11)
|
||||
* }
|
||||
*/
|
||||
// hand-craft the following initialization code
|
||||
// var initdone· uint8 (1)
|
||||
// func init() (2)
|
||||
// if initdone· != 0 { (3)
|
||||
// if initdone· == 2 (4)
|
||||
// return
|
||||
// throw(); (5)
|
||||
// }
|
||||
// initdone· = 1; (6)
|
||||
// // over all matching imported symbols
|
||||
// <pkg>.init() (7)
|
||||
// { <init stmts> } (8)
|
||||
// init.<n>() // if any (9)
|
||||
// initdone· = 2; (10)
|
||||
// return (11)
|
||||
// }
|
||||
func anyinit(n *NodeList) bool {
|
||||
// are there any interesting init statements
|
||||
for l := n; l != nil; l = l.Next {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue