Commit Graph
269 Commits
Author SHA1 Message Date
Nigel Tao d33db6dae0 Introduce "array[N] T" and "slice T" type syntax 2018-04-05 22:21:08 +10:00
Nigel Tao 2b91e7861c Prepare array and slice tokens 2018-04-05 21:51:38 +10:00
Nigel Tao 97aab37462 Rename buf1, reader1, etc to io_buffer, io_reader
Also remove the unused Buf1, Buf2 and Usize tokens.
2018-04-05 20:49:48 +10:00
Nigel Tao e700bcd4f8 Bounds check consts by value, not type
This lets us prove "c == 123" given "pri const c u32 = 123".

Fixes #5
2018-03-31 16:43:53 +11:00
Nigel Tao 3a7ccfe9b4 Implement crc32's ieee.update 2018-03-25 18:09:51 +11:00
Nigel Tao 4675efdcc5 Fix deflate decode when the distance is 32768 2018-03-23 12:49:42 +11:00
Nigel Tao 7de631fb96 Tighten copy_from_history32__bco preconditions 2018-03-23 11:42:41 +11:00
Nigel Tao 7e90967717 Fill in a GIF image_config 2018-02-09 16:05:04 +11:00
Nigel Tao d750ea7653 Add an image_config concept 2018-02-09 14:46:37 +11:00
Nigel Tao ad277871f5 Fix lang/check tests 2018-01-06 17:03:36 +11:00
Nigel Tao 0b06dbcf02 Simplify big.Int comparisons to zero 2018-01-04 11:08:41 +11:00
Nigel Tao 457235a382 Use qualified IDs instead of a usee map 2017-12-29 14:23:58 +11:00
Nigel Tao 117a6c829b Unexport some unused lang/check API 2017-12-29 14:02:56 +11:00
Nigel Tao 1004d898d5 Add statusPkg arg to ast.NewExpr 2017-12-29 13:33:46 +11:00
Nigel Tao 139bcfa7f1 Add pkg to ast Expr nodes 2017-12-29 13:28:31 +11:00
Nigel Tao 8b4ba30a36 Rename some ast.Expr methods 2017-12-29 12:58:01 +11:00
Nigel Tao ed03c5943a Add pkg to ast Func, Struct and TypeExpr nodes 2017-12-29 12:08:17 +11:00
Nigel Tao 10e4936f08 Add pkg to ast Const and Status nodes 2017-12-28 15:14:55 +11:00
Nigel Tao f6159a1c95 Consistently use a and t for ast and token 2017-12-28 11:47:46 +11:00
Nigel Tao bdc47bd6e2 Save the "t" name for the token package 2017-12-28 11:42:09 +11:00
Nigel Tao 8b0c63df09 Clean up tcheckDot 2017-12-28 11:39:24 +11:00
Nigel Tao 1255b162ea Resolve used packages during type checking 2017-12-28 11:24:59 +11:00
Nigel Tao 7fb19d7669 Fix lang/check tests 2017-12-28 11:04:31 +11:00
Nigel Tao 7fea629f10 Check missing packageid declaration 2017-12-27 10:43:50 +11:00
Nigel Tao 172bbdbc3f Add even more built-in slice functions 2017-12-21 14:32:53 +11:00
Nigel Tao c59f65674b Add some more built-in slice functions 2017-12-21 14:25:00 +11:00
Nigel Tao 339673ae82 Add built-in slice functions 2017-12-16 17:23:49 +11:00
Nigel Tao 333b11dc65 Add some more built-in functions 2017-12-16 15:05:26 +11:00
Nigel Tao d14b56ea39 Type check built-in functions more thoroughly 2017-12-16 13:25:26 +11:00
Nigel Tao 3b822f8b17 Rename some arguments for consistency 2017-12-09 16:03:18 +11:00
Nigel Tao 90f1fcc328 Bounds check call arguments more thoroughly 2017-12-09 16:01:01 +11:00
Nigel Tao b92c782f95 Type check call arguments more thoroughly 2017-12-09 14:44:32 +11:00
Nigel Tao bf00d114e4 Let ast.TypeExpr represent method types 2017-12-09 13:55:59 +11:00
Nigel Tao 8e2255916e Drop the "flate_" in "deflate.flate_decoder" 2017-12-04 10:35:08 +11:00
Nigel Tao 1388f84e5c Rename std/flate to std/deflate 2017-12-04 10:27:48 +11:00
Nigel Tao 0a32c01014 Allow referring to types from used packages 2017-12-03 13:21:23 +11:00
Nigel Tao 5f5791e56d Remove redundant builtin.TrimQuotes function 2017-12-02 12:25:50 +11:00
Nigel Tao 906bca4e39 Drop volatile facts after a yield statement 2017-12-01 16:24:54 +11:00
Nigel Tao 65dcf6a5b9 Add a yield keyword 2017-12-01 15:24:48 +11:00
Nigel Tao 7601fb45ce Rename String(*token.Map) to Str(*token.Map) 2017-12-01 11:22:08 +11:00
Nigel Tao 024dc7f97a Rename PUFFS to WUFFS, part 11 of N 2017-11-30 18:18:40 +11:00
Nigel Tao 79a94558be Rename PUFFS to WUFFS, part 5 of N 2017-11-30 16:37:20 +11:00
Nigel Tao 0cea46531b Rename PUFFS to WUFFS, part 2 of N 2017-11-30 16:23:16 +11:00
Nigel Tao 1cee9c6ea2 Add note to consider a read_u8_fast method. 2017-11-10 09:56:27 +11:00
Nigel Tao 693af478d6 Rename some bcheckOptimizeXxx methods. 2017-11-09 15:15:30 +11:00
Nigel Tao d2a01dd938 Refactor lang/check/bounds.go. 2017-11-09 15:11:45 +11:00
Nigel Tao 9b4cc179c4 Use puffs_base__writer1__copy_from_history32__bco.
name                           old speed      new speed      delta

puffs_adler32_10k/clang        2.45GB/s ± 0%  2.45GB/s ± 0%    ~     (p=0.063 n=5+5)
puffs_adler32_100k/clang       2.45GB/s ± 0%  2.45GB/s ± 0%    ~     (p=0.905 n=5+4)
puffs_flate_decode_1k/clang     144MB/s ± 1%   146MB/s ± 0%  +1.41%  (p=0.016 n=5+5)
puffs_flate_decode_10k/clang    186MB/s ± 0%   204MB/s ± 0%  +9.39%  (p=0.008 n=5+5)
puffs_flate_decode_100k/clang   228MB/s ± 0%   240MB/s ± 0%  +5.24%  (p=0.008 n=5+5)
puffs_zlib_decode_10k/clang     173MB/s ± 0%   188MB/s ± 0%  +8.69%  (p=0.008 n=5+5)
puffs_zlib_decode_100k/clang    209MB/s ± 0%   219MB/s ± 0%  +4.81%  (p=0.008 n=5+5)

puffs_adler32_10k/gcc          3.26GB/s ± 0%  3.26GB/s ± 0%    ~     (p=0.286 n=5+4)
puffs_adler32_100k/gcc         3.26GB/s ± 0%  3.26GB/s ± 0%    ~     (p=0.190 n=5+4)
puffs_flate_decode_1k/gcc       148MB/s ± 0%   148MB/s ± 0%  +0.27%  (p=0.016 n=5+4)
puffs_flate_decode_10k/gcc      245MB/s ± 0%   254MB/s ± 0%  +3.73%  (p=0.008 n=5+5)
puffs_flate_decode_100k/gcc     284MB/s ± 0%   298MB/s ± 0%  +4.90%  (p=0.008 n=5+5)
puffs_zlib_decode_10k/gcc       228MB/s ± 0%   236MB/s ± 0%  +3.33%  (p=0.008 n=5+5)
puffs_zlib_decode_100k/gcc      261MB/s ± 0%   273MB/s ± 0%  +4.46%  (p=0.016 n=5+4)
2017-11-09 15:08:28 +11:00
Nigel Tao 67fb7bf1dc Prepare to optimize w.since_mark.
It's not obvious why the benchmark numbers don't improve, so the
intuitively-better codegen is disabled for now. I'm also having trouble
exactly reproducing the numbers from yesterdays' commits. While I'm
investigating, land this commit and move on.
2017-11-09 12:03:38 +11:00
Nigel Tao 3bdd515e47 Allow "assert foo", not just "assert foo < bar". 2017-11-09 10:53:37 +11:00
Nigel Tao e2ce9f1b1d Add a writer1.is_marked method. 2017-11-09 10:38:24 +11:00