Hello iant@google.com (cc: gofrontend-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/gofrontend/
I haven't really tried to understand what this code is doing, just some quick comments on style. It seems like a lot of entries aren't implemented--can you describe what is implemented? https://codereview.appspot.com/127260043/diff/40001/go/escape.cc File go/escape.cc (right): https://codereview.appspot.com/127260043/diff/40001/go/escape.cc#newcode1 go/escape.cc:1: #include <stdio.h> Copyright header. https://codereview.appspot.com/127260043/diff/40001/go/escape.cc#newcode3 go/escape.cc:3: #include "gogo.h" Always #include "go-system.h" first. https://codereview.appspot.com/127260043/diff/40001/go/escape.cc#newcode12 go/escape.cc:12: class Escape_analysis; No need to declare the classes that are defined in escape.h. https://codereview.appspot.com/127260043/diff/40001/go/escape.cc#newcode40 go/escape.cc:40: // If this variable is globbal, mark it escape to heap directly. s/globbal/global/ https://codereview.appspot.com/127260043/diff/40001/go/escape.h File go/escape.h (right): https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode1 go/escape.h:1: #ifndef GO_ESCAPE_H Needs an intro and copyright header like the other files. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode4 go/escape.h:4: #include <vector> None of these #include's should be needed. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode18 go/escape.h:18: // Escape analysis information about Go program You can drop this line, I think. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode22 go/escape.h:22: // Run eacape analysis on the minimal set of functions. s/eacape/escape/ https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode36 go/escape.h:36: Remove this blank line. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode41 go/escape.h:41: // Destructor This comment doesn't help; remove it. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode46 go/escape.h:46: perform(Gogo*); Don't indent by two spaces here--see the other class definitions. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode78 go/escape.h:78: typedef std::map<Named_object*, Escape_analysis_info*> Escape_info_map; The Go frontend mostly uses Unordered_map for this sort of thing. https://codereview.appspot.com/127260043/diff/40001/go/escape.h#newcode80 go/escape.h:80: typedef std::set<Named_object*> Named_object_set; Usually this is Unordered_set.
Hello iant@google.com, iant@golang.org (cc: gofrontend-dev@googlegroups.com), Please take another look.
https://codereview.appspot.com/127260043/diff/80001/go/escape.cc File go/escape.cc (right): https://codereview.appspot.com/127260043/diff/80001/go/escape.cc#newcode227 go/escape.cc:227: Variable* newvar = new Variable(NULL, NULL, true, false, false, I haven't give a type. I will make some changes here.