Rename __bco to _fast

This commit is contained in:
Nigel Tao committed 2018-07-08 21:10:40 +10:00
1 parent 13284015cb
commit 8a449fa92e
13 files changed
+61 -61

No files matched your search

+7 -7
View File
@@ -158,8 +158,8 @@ var Funcs = []string{
"io_reader.read_u64be?()(ret u64)",
"io_reader.read_u64le?()(ret u64)",
// TODO: these should have an explicit precondition "available() >= N". For
// now, that's implicitly checked (i.e. hard coded).
// TODO: these should have an explicit pre-condition "available() >= N".
// For now, that's implicitly checked (i.e. hard coded).
//
// The io_reader has peek_etc methods and skip_fast, not read_etc_fast,
// because we sometimes advance the pointer by less than what's read. See
@@ -188,9 +188,9 @@ var Funcs = []string{
"io_reader.skip?(n u32)()",
// TODO: this should have explicit preconditions "actual <= worst_case" and
// "worst_case <= available()". As an implementation restriction, we also
// require that worst_case has a constant value. For now, that's all
// TODO: this should have explicit pre-conditions "actual <= worst_case"
// and "worst_case <= available()". As an implementation restriction, we
// also require that worst_case has a constant value. For now, that's all
// implicitly checked (i.e. hard coded).
"io_reader.skip_fast!(actual u32, worst_case u32)()",
@@ -212,8 +212,8 @@ var Funcs = []string{
"io_writer.write_u64be?(x u64)()",
"io_writer.write_u64le?(x u64)()",
// TODO: these should have an explicit precondition "available() >= N". For
// now, that's implicitly checked (i.e. hard coded).
// TODO: these should have an explicit pre-condition "available() >= N".
// For now, that's implicitly checked (i.e. hard coded).
//
// The io_writer has write_fast_etc methods, not poke_etc and skip_fast,
// because skip_fast could leave uninitialized bytes in the io_buffer.
+2 -2
View File
@@ -976,7 +976,7 @@ func (q *checker) bcheckExprCallSpecialCases(n *a.Expr, depth uint32) (a.Bounds,
actual := args[0].AsArg().Value()
worstCase := args[1].AsArg().Value()
if err := q.proveBinaryOp(t.IDXBinaryLessEq, actual, worstCase); err == errFailed {
return a.Bounds{}, fmt.Errorf("check: could not prove skip_fast precondition: %s <= %s",
return a.Bounds{}, fmt.Errorf("check: could not prove skip_fast pre-condition: %s <= %s",
actual.Str(q.tm), worstCase.Str(q.tm))
} else if err != nil {
return a.Bounds{}, err
@@ -997,7 +997,7 @@ func (q *checker) bcheckExprCallSpecialCases(n *a.Expr, depth uint32) (a.Bounds,
if ok, err := q.optimizeIOMethodAdvance(recv, advance, update); err != nil {
return a.Bounds{}, err
} else if !ok {
return a.Bounds{}, fmt.Errorf("check: could not prove %s precondition: %s.available() >= %v",
return a.Bounds{}, fmt.Errorf("check: could not prove %s pre-condition: %s.available() >= %v",
method.Str(q.tm), recv.Str(q.tm), advance)
}
// TODO: drop other recv-related facts?