Commit e912c18c authored by Robert Griesemer's avatar Robert Griesemer

- missing changes from prev. commit

SVN=128064
parent f87a960a
...@@ -260,16 +260,16 @@ func (E *Exporter) WritePackage(pkg *Globals.Package) { ...@@ -260,16 +260,16 @@ func (E *Exporter) WritePackage(pkg *Globals.Package) {
func (E *Exporter) Export(comp* Globals.Compilation, file_name string) { func (E *Exporter) Export(comp* Globals.Compilation, file_name string) {
if E.debug {
print "exporting to ", file_name;
}
E.comp = comp; E.comp = comp;
E.debug = true; E.debug = true;
E.pos = 0; E.pos = 0;
E.pkg_ref = 0; E.pkg_ref = 0;
E.type_ref = 0; E.type_ref = 0;
if E.debug {
print "exporting to ", file_name;
}
// Predeclared types are "pre-exported". // Predeclared types are "pre-exported".
// TODO run the loop below only in debug mode // TODO run the loop below only in debug mode
{ i := 0; { i := 0;
...@@ -297,4 +297,8 @@ func (E *Exporter) Export(comp* Globals.Compilation, file_name string) { ...@@ -297,4 +297,8 @@ func (E *Exporter) Export(comp* Globals.Compilation, file_name string) {
data := string(E.buf)[0 : E.pos]; data := string(E.buf)[0 : E.pos];
ok := sys.writefile(file_name, data); ok := sys.writefile(file_name, data);
if !ok {
panic "export failed";
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment