Commit 33c10450 authored by Austin Clements's avatar Austin Clements

Fix bug where nothing could ever be added to a code buffer.

R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=32245
CL=32247
parent 811e59f2
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment