Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(66)

Side by Side Diff: src/pkg/runtime/mgc0.c

Issue 869045: code review 869045: runtime: fix bad status throw (Closed)
Patch Set: code review 869045: runtime: fix bad status throw Created 14 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/pkg/runtime/proc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Garbage collector -- step 0. 5 // Garbage collector -- step 0.
6 // 6 //
7 // Stop the world, mark and sweep garbage collector. 7 // Stop the world, mark and sweep garbage collector.
8 // NOT INTENDED FOR PRODUCTION USE. 8 // NOT INTENDED FOR PRODUCTION USE.
9 // 9 //
10 // A mark and sweep collector provides a way to exercise 10 // A mark and sweep collector provides a way to exercise
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 case Gdead: 128 case Gdead:
129 break; 129 break;
130 case Grunning: 130 case Grunning:
131 if(gp != g) 131 if(gp != g)
132 throw("mark - world not stopped"); 132 throw("mark - world not stopped");
133 scanstack(gp); 133 scanstack(gp);
134 break; 134 break;
135 case Grunnable: 135 case Grunnable:
136 case Gsyscall: 136 case Gsyscall:
137 case Gwaiting: 137 case Gwaiting:
138 case Grecovery:
138 scanstack(gp); 139 scanstack(gp);
139 break; 140 break;
140 } 141 }
141 } 142 }
142 143
143 // mark things pointed at by objects with finalizers 144 // mark things pointed at by objects with finalizers
144 walkfintab(markfin); 145 walkfintab(markfin);
145 } 146 }
146 147
147 // free RefNone, free & queue finalizers for RefNone|RefHasFinalizer, reset RefS ome 148 // free RefNone, free & queue finalizers for RefNone|RefHasFinalizer, reset RefS ome
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 *(void**)frame = f->arg; 356 *(void**)frame = f->arg;
356 reflect·call((byte*)f->fn, frame, sizeof(uintptr) + f->n ret); 357 reflect·call((byte*)f->fn, frame, sizeof(uintptr) + f->n ret);
357 free(frame); 358 free(frame);
358 f->fn = nil; 359 f->fn = nil;
359 f->arg = nil; 360 f->arg = nil;
360 f->next = nil; 361 f->next = nil;
361 } 362 }
362 gc(1); // trigger another gc to clean up the finalized objects, if possible 363 gc(1); // trigger another gc to clean up the finalized objects, if possible
363 } 364 }
364 } 365 }
OLDNEW
« no previous file with comments | « no previous file | src/pkg/runtime/proc.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b