]> Cypherpunks repositories - gostls13.git/commitdiff
Fix bug where nothing could ever be added to a code buffer.
authorAustin Clements <aclements@csail.mit.edu>
Mon, 27 Jul 2009 22:21:32 +0000 (15:21 -0700)
committerAustin Clements <aclements@csail.mit.edu>
Mon, 27 Jul 2009 22:21:32 +0000 (15:21 -0700)
R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=32245
CL=32247

usr/austin/eval/func.go

index cc198e4868c1a4aaaf80c208e7ae1f92cbc676eb..29bc05b225b4201cff0461b31d833bbf82a36968 100644 (file)
@@ -49,7 +49,7 @@ func newCodeBuf() *codeBuf {
        return &codeBuf{make(code, 0, 16)};
 }
 
-func (b codeBuf) push(instr func(*vm)) {
+func (b *codeBuf) push(instr func(*vm)) {
        n := len(b.instrs);
        if n >= cap(b.instrs) {
                a := make(code, n, n*2);
@@ -62,7 +62,7 @@ func (b codeBuf) push(instr func(*vm)) {
        b.instrs[n] = instr;
 }
 
-func (b codeBuf) get() code {
+func (b *codeBuf) get() code {
        // Freeze this buffer into an array of exactly the right size
        a := make(code, len(b.instrs));
        for i := range b.instrs {