1
0
mirror of https://github.com/golang/go synced 2024-10-02 10:18:33 -06:00
Commit Graph

2847 Commits

Author SHA1 Message Date
Rob Pike
c1ad0509ee remove special trap-handling code for array out of bounds -
compiler doesn't generate them any more

R=ken
OCL=15309
CL=15309
2008-09-13 13:13:36 -07:00
Ken Thompson
904d4045d3 1 got rid if static 'fn wo return' test
2 added dynamic calls to throw for array bounds
  and 'fn wo return'
3 small optimization on index[constant]

R=r
OCL=15281
CL=15281
2008-09-12 16:48:35 -07:00
Rob Pike
ab9f27b227 fix up linux trap handling - INTB 5 gives SEGV
R=rsc
OCL=15244
CL=15244
2008-09-12 12:35:06 -07:00
Rob Pike
e9047d1fc2 fix silly portability bug
R=gri
OCL=15238
CL=15238
2008-09-12 12:17:13 -07:00
Rob Pike
6e8dbc2051 - catch trace traps
- disassemble the instructions in a trace trap to see if it's a run-time trap
- if so, print relevant info
- avoid double-printing traceback on panic

R=ken,rsc
DELTA=66  (50 added, 7 deleted, 9 changed)
OCL=15199
CL=15224
2008-09-12 09:44:41 -07:00
Ken Thompson
47580f79b4 bug075
R=r
OCL=15192
CL=15192
2008-09-11 19:09:25 -07:00
Russ Cox
376898ca8b go threads for OS X
R=r
OCL=14944
CL=15013
2008-09-09 11:50:14 -07:00
Rob Pike
24838a2df6 fix bug in stack limit calculation - was setting limit reg in wrong place.
R=ken
OCL=14981
CL=14981
2008-09-08 19:30:14 -07:00
Ken Thompson
66a603c986 arrays
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Rob Pike
968701beb1 - fix signedness bug in sys.Inf()
- add NaN, Inf printing to fmt
- fix a couple of bugs in fmt
- add a test for fmt

R=ken
OCL=14092
CL=14092
2008-08-11 15:04:54 -07:00
Russ Cox
f7f6329e26 kill trailing white space.
(apparently my first attempt didn't work.)

R=r
OCL=13888
CL=13888
2008-08-05 14:21:42 -07:00
Russ Cox
96824000ed * comment, clean up scheduler
* rewrite lock implementation to be correct
  (tip: never assume that an algorithm you found
  in a linux man page is correct.)
* delete unneeded void* arg from clone fn
* replace Rendez with Note
* comment mal better
* use 6c -w, fix warnings
* mark all assembly functions 7

R=r
DELTA=828  (338 added, 221 deleted, 269 changed)
OCL=13884
CL=13886
2008-08-05 14:18:47 -07:00
Rob Pike
5adbacb8e7 allow pointers as keys in maps, treating them the same as ints - ptr eq not value equality
R=ken,gri
OCL=13879
CL=13879
2008-08-05 11:14:35 -07:00
Russ Cox
c8dee2770d acid. works only on Linux for now
R=r
DELTA=7031  (6906 added, 113 deleted, 12 changed)
OCL=13847
CL=13852
2008-08-04 17:24:25 -07:00
Russ Cox
d28acc42ec first cut at multithreading. works on Linux.
* kick off new os procs (machs) as needed
* add sys·sleep for testing
* add Lock, Rendez
* properly lock mal, sys·newproc, scheduler
* linux syscall arg #4 is in R10, not CX
* chans are not multithread-safe yet
* multithreading disabled by default;
  set $gomaxprocs=2 (or 1000) to turn it on

This should build on OS X but may not.
Rob and I will fix soon after submitting.

TBR=r
OCL=13784
CL=13842
2008-08-04 16:43:49 -07:00
Russ Cox
873ba78b79 Remove doubled #else
R=r
DELTA=4  (2 added, 2 deleted, 0 changed)
OCL=13775
CL=13779
2008-08-03 00:34:05 -07:00
Russ Cox
4feda71b7d slightly gratuitous reorg of scheduler code
* rename select (very loaded word) nextgoroutine
	* separate out "enter scheduler" (sys·gosched)
	  from the scheduler itself (scheduler)

R=r
APPROVED=r
DELTA=36  (17 added, 15 deleted, 4 changed)
OCL=13772
CL=13774
2008-08-02 22:34:04 -07:00
Rob Pike
ebec99179f fix a comment
fix a register name

R=gri
OCL=13548
CL=13548
2008-07-29 15:17:27 -07:00
Rob Pike
3835e01d97 print tracebacks for all goroutines, not just the crashing one
R=ken
OCL=13518
CL=13518
2008-07-28 11:29:41 -07:00
Ken Thompson
120827284e select/chan
R=r
DELTA=517  (137 added, 98 deleted, 282 changed)
OCL=13495
CL=13495
2008-07-26 14:21:21 -07:00
Ken Thompson
949ab5c7ff select
R=r
APPROVED=r
DELTA=41  (24 added, 13 deleted, 4 changed)
OCL=13480
CL=13480
2008-07-25 17:03:27 -07:00
Ken Thompson
e963cba8a1 select
R=r
APPROVED=r
DELTA=147  (94 added, 14 deleted, 39 changed)
OCL=13477
CL=13477
2008-07-25 15:55:12 -07:00
Ken Thompson
ece3e57c85 read select
R=r
APPROVED=r
DELTA=120  (108 added, 0 deleted, 12 changed)
OCL=13468
CL=13468
2008-07-25 11:58:26 -07:00
Ken Thompson
cb9b1038db select
R=r
APPROVED=r
DELTA=638  (433 added, 21 deleted, 184 changed)
OCL=13426
CL=13438
2008-07-24 15:57:30 -07:00
Ken Thompson
b78676a49d start of select
random bugs fixed

SVN=128149
2008-07-20 20:13:07 -07:00
Ken Thompson
90da636c15 init filename vs pkgname
SVN=128117
2008-07-19 14:20:46 -07:00
Ken Thompson
fb3af53f4e initialization
SVN=128115
2008-07-19 13:38:29 -07:00
Ken Thompson
9e2d185040 div bug
[]ptr bug
proc reuses old g* structures
differnt assignment of offsets to parameters

SVN=127888
2008-07-17 15:03:39 -07:00
Ken Thompson
e7d549fbd7 new (more fifo) schedulint algorithm
newproc will reuse dead procs

SVN=127565
2008-07-16 13:50:23 -07:00
Ken Thompson
44b8934d35 back out last chan fix
allow print of pointers

SVN=127548
2008-07-16 12:44:21 -07:00
Ken Thompson
90da10d7ac chan bool offset bug
SVN=127537
2008-07-16 11:46:33 -07:00
Ken Thompson
ac048ce7f4 new chan syntax
SVN=127437
2008-07-15 21:07:59 -07:00
Rob Pike
cbdaa10f8c add linkage for writefile on darwin
SVN=127208
2008-07-15 08:27:50 -07:00
Rob Pike
c870ac239e add sys.writefile; support for darwin only in this CL
SVN=127153
2008-07-14 20:54:55 -07:00
Ken Thompson
2d9ff40774 chan asynch
SVN=127121
2008-07-14 17:41:38 -07:00
Rob Pike
bad8c3d5dd stop traceback when pc leaves text segment
SVN=127088
2008-07-14 16:00:44 -07:00
Ken Thompson
af58f17af9 synch chan
SVN=127057
2008-07-14 14:34:27 -07:00
Ken Thompson
526200345c synch chan
SVN=127055
2008-07-14 14:33:39 -07:00
Ken Thompson
97cab903af chan
SVN=126959
2008-07-13 16:20:27 -07:00
Ken Thompson
594175d0b5 chan
SVN=126958
2008-07-13 14:29:46 -07:00
Ken Thompson
3f982aeaf6 morestack magic number
automatically generated in 6g and 6c,
manually set in 6a. format is
	TEXT	a(SB),, $a-b
where a is auto size and b is parameter size

SVN=126946
2008-07-12 17:16:22 -07:00
Rob Pike
2da9783e2b preserve AX across stack jump so C routines return correct value when triggering morestack.
SVN=126935
2008-07-12 11:30:53 -07:00
Rob Pike
b07e084a99 delete dead code
SVN=126932
2008-07-11 19:40:03 -07:00
Rob Pike
c8bce425b0 fix comment
SVN=126931
2008-07-11 19:37:47 -07:00
Rob Pike
44f65c8f08 fix traceback to know about new segmenting
SVN=126930
2008-07-11 19:35:14 -07:00
Ken Thompson
751ce3a77a segmented stacks AND goroutines
SVN=126929
2008-07-11 19:16:39 -07:00
Ken Thompson
7b454bb1d9 defined external registers g and m
SVN=126521
2008-07-09 11:35:26 -07:00
Rob Pike
41b9617be4 fix ldexp, frexp, and make math package compile and test correctly
SVN=126423
2008-07-08 17:26:10 -07:00
Ken Thompson
4528854308 unique import/export names
more on go statement

SVN=126421
2008-07-08 17:19:17 -07:00
Rob Pike
6db99de606 add bytestorune and stringtorune to sys.
SVN=126321
2008-07-08 10:36:43 -07:00
Ken Thompson
1d31a25d83 more coroutine
fixed a,b,c := x,x,x

SVN=126250
2008-07-07 17:59:32 -07:00
Rob Pike
5b904a3bde update to Unicode 5
SVN=126184
2008-07-07 14:07:46 -07:00
Ken Thompson
ac5a887d5d floating point print
SVN=126038
2008-07-04 18:01:35 -07:00
Rob Pike
ef12ae4631 drop some superfluous file prefixes in runtime
SVN=125956
2008-07-03 13:42:04 -07:00
Rob Pike
6973e3813f update golden
fix a comment

SVN=125405
2008-06-30 16:30:53 -07:00
Rob Pike
03febb6773 clean up rearrangement of runtime functions in the source
add isNaN, isInf, NaN, Inf

SVN=125389
2008-06-30 15:30:47 -07:00
Rob Pike
d3204ef19f makes stack traces work for segmented stacks
SVN=125371
2008-06-30 14:39:47 -07:00
Rob Pike
8e82a673db Break runtime.c into separate pieces for maps, strings, print, etc.
Share common assembler for amd64 runtime

SVN=125317
2008-06-30 11:50:36 -07:00
Ken Thompson
b987f7a757 segmented stacks
SVN=125267
2008-06-29 20:40:08 -07:00
Rob Pike
34cb7c299e export sys.exit
update tests to use exit rather than return
ignore return value from main (actually done in prior CL)

SVN=125173
2008-06-27 14:15:06 -07:00
Rob Pike
3719aa4d9a update darwin for segmented stacks
SVN=125154
2008-06-27 13:10:56 -07:00
Ken Thompson
1f6828bcdf segmented stack
SVN=125151
2008-06-27 13:03:19 -07:00
Rob Pike
f977e251fa add a test
fix make.bash for runtime - sysfile.6 depends on OS so simplest thing is to build just our own version

SVN=125130
2008-06-27 11:36:40 -07:00
Rob Pike
bcfd31f0e9 repair struct definition
SVN=124985
2008-06-26 15:35:43 -07:00
Rob Pike
f28ec1af7f slight change to file names
SVN=124982
2008-06-26 15:27:21 -07:00
Rob Pike
66b240c7a4 make readfile work on darwin
parameterize the system interface a bit

SVN=124981
2008-06-26 15:26:27 -07:00
Ken Thompson
e42d6a5fe2 add pointer to val type of maps
SVN=124971
2008-06-26 14:58:23 -07:00
Rob Pike
3e4e83ab1e add sys.readfile()
add args to linux runtime

SVN=124961
2008-06-26 14:09:26 -07:00
Rob Pike
9ff0e6288e runtime needs runtime.c
6l needs to know that there is no rt_amd64.6

SVN=124766
2008-06-25 21:31:17 -07:00
Rob Pike
c87597de2c put a makefile into runtime
make the runtime library an archive (rt0 is still separate)
update 6l to use the archive
add fakeobj.c, missing from prior change

SVN=124762
2008-06-25 21:19:05 -07:00
Robert Griesemer
3311e1b673 - dump registers in case of signal (linux)
SVN=124702
2008-06-25 17:07:22 -07:00
Rob Pike
1bef250f33 center dots into argument code
SVN=124433
2008-06-24 18:00:24 -07:00
Rob Pike
1e774d9e6a put center dot into main_main
restore smashed arg code, lost in incorrect resolve

SVN=124432
2008-06-24 17:58:18 -07:00
Ken Thompson
7d11924c13 middle dot as alpha package separator
SVN=124419
2008-06-24 17:16:06 -07:00
Robert Griesemer
206daeabda - added access to thread state info from the signal handler
SVN=124404
2008-06-24 16:48:54 -07:00
Rob Pike
2987c8434b arguments available
argc, argv, envc, envv all in sys now
sys.argc() etc.

SVN=124398
2008-06-24 15:31:03 -07:00
Ken Thompson
87dae02a63 string nil same as string ""
SVN=124381
2008-06-24 14:11:20 -07:00
Ken Thompson
90846cd447 map[int] bug
SVN=124332
2008-06-24 11:10:47 -07:00
Rob Pike
d4c2da409b safety checks, waiting for gri's real tracking of PC and SP
extant code is too fragile

SVN=124223
2008-06-23 20:12:39 -07:00
Rob Pike
7b210c5b2f add signal handling to mac runtime
SVN=124184
2008-06-23 16:34:17 -07:00
Ken Thompson
dee07c884e maps
SVN=124030
2008-06-22 21:02:06 -07:00
Rob Pike
12c2864e4f more nearly correct interface code for signals on linux
SVN=124021
2008-06-21 17:28:37 -07:00
Rob Pike
aeb43984ec add signal handling and traceback support therein.
factor the runtime into architecture-dependent and -independent pieces.
ditto for the OS dependence.

SVN=124020
2008-06-21 15:36:23 -07:00
Rob Pike
85785fe577 delete incorrect offset print
SVN=123857
2008-06-20 10:55:53 -07:00
Rob Pike
1a2421e406 improved formatting of traceback
SVN=123527
2008-06-18 23:25:37 -07:00
Rob Pike
d6f25597bb print rudimentary stack traceback after panic
SVN=123524
2008-06-18 23:17:39 -07:00
Ken Thompson
4e8142c929 maps
SVN=123089
2008-06-16 22:34:50 -07:00
Rob Pike
88a3371a91 print pc on faults
SVN=123030
2008-06-16 17:04:30 -07:00
Ken Thompson
e1a06ccc80 now checks for lvalue/rvalue context of
expressions.
start of generics for calling builtin
     functions
start of map type
'any' demoted from reserved word to type

SVN=122808
2008-06-15 20:24:30 -07:00
Rob Pike
54bca54655 make paths explicit for easier installation
SVN=122488
2008-06-12 13:43:47 -07:00
Rob Pike
69b74c3953 import the plan 9 libraries libc (lib9) and libbio into the tree.
remove the dependency on /home/r.

SVN=122482
2008-06-12 13:26:16 -07:00
Ken Thompson
0b3093f0a5 debugging to get fmt to run
SVN=122046
2008-06-10 21:29:57 -07:00
Ken Thompson
fa259ff89c fix different ANON flag between
darwin and linux

SVN=121371
2008-06-05 21:02:55 -07:00
Ken Thompson
959f9fb3d4 goos garch
SVN=121368
2008-06-05 19:53:15 -07:00
Ken Thompson
bbb2073223 goos garch
SVN=121367
2008-06-05 19:38:39 -07:00
Ken Thompson
28429aaaa6 goos and goarch
SVN=121346
2008-06-05 16:55:06 -07:00
Ken Thompson
2b77d87fca goos and goarch
SVN=121345
2008-06-05 16:54:34 -07:00