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

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

Issue 12520043: code review 12520043: runtime: change int32 to intgo in findnull and findnullw (Closed)
Patch Set: diff -r fbc1a650b595 https://code.google.com/p/go/ Created 11 years, 7 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/string.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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 int8* name; 386 int8* name;
387 int32* value; 387 int32* value;
388 } dbgvar[] = { 388 } dbgvar[] = {
389 {"gctrace", &runtime·debug.gctrace}, 389 {"gctrace", &runtime·debug.gctrace},
390 }; 390 };
391 391
392 void 392 void
393 runtime·parsedebugvars(void) 393 runtime·parsedebugvars(void)
394 { 394 {
395 byte *p; 395 byte *p;
396 » int32 i, n; 396 » intgo i, n;
397 397
398 p = runtime·getenv("GODEBUG"); 398 p = runtime·getenv("GODEBUG");
399 if(p == nil) 399 if(p == nil)
400 return; 400 return;
401 for(;;) { 401 for(;;) {
402 for(i=0; i<nelem(dbgvar); i++) { 402 for(i=0; i<nelem(dbgvar); i++) {
403 n = runtime·findnull((byte*)dbgvar[i].name); 403 n = runtime·findnull((byte*)dbgvar[i].name);
404 if(runtime·mcmp(p, (byte*)dbgvar[i].name, n) == 0 && p[n ] == '=') 404 if(runtime·mcmp(p, (byte*)dbgvar[i].name, n) == 0 && p[n ] == '=')
405 *dbgvar[i].value = runtime·atoi(p+n+1); 405 *dbgvar[i].value = runtime·atoi(p+n+1);
406 } 406 }
(...skipping 23 matching lines...) Expand all
430 for(bit = 30; bit >= 0; bit--) { 430 for(bit = 30; bit >= 0; bit--) {
431 if(v >= ((int64)div<<bit)) { 431 if(v >= ((int64)div<<bit)) {
432 v = v - ((int64)div<<bit); 432 v = v - ((int64)div<<bit);
433 res += 1<<bit; 433 res += 1<<bit;
434 } 434 }
435 } 435 }
436 if(rem != nil) 436 if(rem != nil)
437 *rem = v; 437 *rem = v;
438 return res; 438 return res;
439 } 439 }
OLDNEW
« no previous file with comments | « src/pkg/runtime/runtime.h ('k') | src/pkg/runtime/string.goc » ('j') | no next file with comments »

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