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

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

Issue 6551067: code review 6551067: runtime: prepare for 64-bit ints (Closed)
Patch Set: diff -r e0a3e88ff2ae https://go.googlecode.com/hg/ Created 12 years, 6 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 | « src/pkg/runtime/runtime.h ('k') | src/pkg/runtime/runtime1.goc » ('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 #include "runtime.h" 5 #include "runtime.h"
6 #include "arch_GOARCH.h" 6 #include "arch_GOARCH.h"
7 7
8 enum { 8 enum {
9 maxround = sizeof(uintptr), 9 maxround = sizeof(uintptr),
10 }; 10 };
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 *(uint32*)&i1 = ~1UL; 283 *(uint32*)&i1 = ~1UL;
284 if(i == i1) 284 if(i == i1)
285 runtime·throw("float32nan2"); 285 runtime·throw("float32nan2");
286 if(!(i != i1)) 286 if(!(i != i1))
287 runtime·throw("float32nan3"); 287 runtime·throw("float32nan3");
288 288
289 TestAtomic64(); 289 TestAtomic64();
290 } 290 }
291 291
292 void 292 void
293 runtime·Caller(int32 skip, uintptr retpc, String retfile, int32 retline, bool re tbool) 293 runtime·Caller(intgo skip, uintptr retpc, String retfile, intgo retline, bool re tbool)
294 { 294 {
295 Func *f, *g; 295 Func *f, *g;
296 uintptr pc; 296 uintptr pc;
297 uintptr rpc[2]; 297 uintptr rpc[2];
298 298
299 /* 299 /*
300 * Ask for two PCs: the one we were asked for 300 * Ask for two PCs: the one we were asked for
301 * and what it called, so that we can see if it 301 * and what it called, so that we can see if it
302 * "called" sigpanic. 302 * "called" sigpanic.
303 */ 303 */
(...skipping 16 matching lines...) Expand all
320 retline = runtime·funcline(f, pc); 320 retline = runtime·funcline(f, pc);
321 retbool = true; 321 retbool = true;
322 } 322 }
323 FLUSH(&retpc); 323 FLUSH(&retpc);
324 FLUSH(&retfile); 324 FLUSH(&retfile);
325 FLUSH(&retline); 325 FLUSH(&retline);
326 FLUSH(&retbool); 326 FLUSH(&retbool);
327 } 327 }
328 328
329 void 329 void
330 runtime·Callers(int32 skip, Slice pc, int32 retn) 330 runtime·Callers(intgo skip, Slice pc, intgo retn)
331 { 331 {
332 // runtime.callers uses pc.array==nil as a signal 332 // runtime.callers uses pc.array==nil as a signal
333 // to print a stack trace. Pick off 0-length pc here 333 // to print a stack trace. Pick off 0-length pc here
334 // so that we don't let a nil pc slice get to it. 334 // so that we don't let a nil pc slice get to it.
335 if(pc.len == 0) 335 if(pc.len == 0)
336 retn = 0; 336 retn = 0;
337 else 337 else
338 retn = runtime·callers(skip, (uintptr*)pc.array, pc.len); 338 retn = runtime·callers(skip, (uintptr*)pc.array, pc.len);
339 FLUSH(&retn); 339 FLUSH(&retn);
340 } 340 }
(...skipping 10 matching lines...) Expand all
351 { 351 {
352 uint32 x; 352 uint32 x;
353 353
354 x = m->fastrand; 354 x = m->fastrand;
355 x += x; 355 x += x;
356 if(x & 0x80000000L) 356 if(x & 0x80000000L)
357 x ^= 0x88888eefUL; 357 x ^= 0x88888eefUL;
358 m->fastrand = x; 358 m->fastrand = x;
359 return x; 359 return x;
360 } 360 }
OLDNEW
« no previous file with comments | « src/pkg/runtime/runtime.h ('k') | src/pkg/runtime/runtime1.goc » ('j') | no next file with comments »

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