Commit Graph

25 Commits

Author SHA1 Message Date
Rafael Weinstein
e75f5097c7 Allow Map & Set to order by natural ordering of element type if available. 2015-11-16 14:30:30 -08:00
Erik Arvidsson
a72ce41a1d Go: TypeRef -> Type
Remaining identifiers
2015-11-13 17:54:53 -05:00
Chris Masone
eda9b92870 Rename types.TypeRef to types.Type
There are probably still a lot of variable names and comments to fix,
but this updates all the Go code.

Towards #441
2015-11-09 08:26:32 -08:00
Aaron Boodman
69a86f3036 Rewrite walk() to walk value tree instead of chunks
Also fix quad_tree to take advantage of that to be generic again.

Fixes #445, #497
2015-11-05 16:12:02 -08:00
Erik Arvidsson
756b893e8f Remove FromVal functions
The generated objects are all type.Values now so FromVal is not needed
2015-11-04 12:13:55 -05:00
Erik Arvidsson
62fad2d615 Merge pull request #536 from arv/equals-by-ref
Make Equals compare by Ref (after comparing TypeRef)
2015-10-30 18:35:08 -04:00
Erik Arvidsson
3c0ef5bcbb Make primitives reasonable 2015-10-30 17:33:47 -04:00
Erik Arvidsson
30cc7d518f Make Equals compare by Ref (after comparing TypeRef)
This changes equal to compare by ref. Since computing the ref can be
expensive we first check that the type refs are equal.

Fixes #532
2015-10-30 16:50:49 -04:00
Aaron Boodman
c52bf0bbf5 Convert NewBlob() away from using resolvedFutures
Instead, use a backing MemoryStore. This is part of removing Futures.
2015-10-30 12:50:56 -07:00
Aaron Boodman
a9bc416a2f Change Chunks() to return []ref.Ref 2015-10-30 09:24:58 -07:00
Erik Arvidsson
16353f38f8 NomDL: Make the new serialization default
This makes the new typed serialization the default (the old
serialization is not used but the code has not been cleaned up yet).

Some things are no working in the new world:

Chunking -  The compound list is not working correctly any more. The
Chunks method is having issues because it assumed things based on the
old implicit chunking.

Commit - uses a `Set(Commit)` which means that the parent commit is
embedded. We need to change that to be `Set(Ref(Commit))` so that the
parent commit is referenced instead.
2015-10-21 19:04:22 -04:00
Erik Arvidsson
ede5f43204 Value should also have a TypeRef
This is so that we can get the runtime type of a value
2015-09-30 16:15:13 -04:00
Erik Arvidsson
1a4bdae624 Make types.Ref explicit
No more implicit Get or Equals
2015-09-18 14:03:19 -04:00
Erik Arvidsson
4e69837ef0 This introduce two new internal values, blobLeaf and compoundBlob. At
this point the compoundBlob only contains blob leafs but a future
change will create multiple tiers. Both these implement the new Blob
interface.

The splitting is done by using a rolling hash over the last 64 bytes,
when that hash ends with 13 consecutive ones we split the data.

Issue #17
2015-08-03 20:09:42 -04:00
Erik Arvidsson
c5964aadcd Make Blob take a Reader instead of byte array
This is in preparation for chunking
2015-07-30 18:53:22 -04:00
Aaron Boodman
7944c1b3af Revert "Make WriteValue return a "skinny" copy of input value" 2015-07-30 09:23:35 -07:00
Aaron Boodman
a84893c0d8 Make WriteValue return a "skinny" copy of input value
Fixes #141
2015-07-29 16:06:54 -07:00
Chris Masone
4fe00d4f81 Address aa's comments
- Return factory methods to privacy
- use tighter syntax inside Chunks() methods
- Rename Futures() -> Chunks()
2015-07-23 15:32:38 -07:00
Chris Masone
a560139d73 Make types.future public
This will enable us to walk the chunk graph without having to go
through weird contortions to figure out which values don't have
chunks in any chunkstore (because they were inlined).

Towards issue #82
2015-07-23 15:32:26 -07:00
Erik Arvidsson
3fdc008f5c Codegen: Add support for noms types
This makes it possible to do a List of Bool or Map of Int32 etc
2015-07-22 12:24:27 -07:00
Rafael Weinstein
50029d1380 Removing cachedRef inferior of func ensureRef() 2015-07-10 16:16:13 -07:00
Aaron Boodman
96f21c4a60 Remove the Foo/flatFoo abstraction in the types package.
Fixes #24.
2015-07-10 11:29:03 -07:00
Aaron Boodman
53003f23f2 Add Value::Ref() 2015-06-12 15:22:27 -07:00
Aaron Boodman
266a96a084 Factor Blob back out into a method of String, rather than embedded. Embedding makes branching on nom type hard. 2015-06-09 22:56:17 -07:00
Aaron Boodman
7d00f1bf12 Add initial String implementation 2015-06-04 14:42:28 -07:00