datahike 0.7.1630
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +226 -0
- package/cljs.analyzer.api.js +427 -0
- package/cljs.analyzer.api.js.map +1 -0
- package/cljs.analyzer.impl.js +86 -0
- package/cljs.analyzer.impl.js.map +1 -0
- package/cljs.analyzer.impl.namespaces.js +219 -0
- package/cljs.analyzer.impl.namespaces.js.map +1 -0
- package/cljs.analyzer.js +7186 -0
- package/cljs.analyzer.js.map +1 -0
- package/cljs.analyzer.passes.and_or.js +141 -0
- package/cljs.analyzer.passes.and_or.js.map +1 -0
- package/cljs.analyzer.passes.js +104 -0
- package/cljs.analyzer.passes.js.map +1 -0
- package/cljs.cache.js +1145 -0
- package/cljs.cache.js.map +1 -0
- package/cljs.cache.wrapped.js +352 -0
- package/cljs.cache.wrapped.js.map +1 -0
- package/cljs.core.async.impl.buffers.js +489 -0
- package/cljs.core.async.impl.buffers.js.map +1 -0
- package/cljs.core.async.impl.channels.js +711 -0
- package/cljs.core.async.impl.channels.js.map +1 -0
- package/cljs.core.async.impl.dispatch.js +81 -0
- package/cljs.core.async.impl.dispatch.js.map +1 -0
- package/cljs.core.async.impl.ioc_helpers.js +192 -0
- package/cljs.core.async.impl.ioc_helpers.js.map +1 -0
- package/cljs.core.async.impl.protocols.js +368 -0
- package/cljs.core.async.impl.protocols.js.map +1 -0
- package/cljs.core.async.impl.timers.js +510 -0
- package/cljs.core.async.impl.timers.js.map +1 -0
- package/cljs.core.async.js +8813 -0
- package/cljs.core.async.js.map +1 -0
- package/cljs.core.js +38764 -0
- package/cljs.core.js.map +1 -0
- package/cljs.env.js +60 -0
- package/cljs.env.js.map +1 -0
- package/cljs.nodejs.js +80 -0
- package/cljs.nodejs.js.map +1 -0
- package/cljs.reader.js +462 -0
- package/cljs.reader.js.map +1 -0
- package/cljs.spec.alpha.js +5312 -0
- package/cljs.spec.alpha.js.map +1 -0
- package/cljs.spec.gen.alpha.js +2020 -0
- package/cljs.spec.gen.alpha.js.map +1 -0
- package/cljs.tagged_literals.js +103 -0
- package/cljs.tagged_literals.js.map +1 -0
- package/cljs.tools.reader.edn.js +960 -0
- package/cljs.tools.reader.edn.js.map +1 -0
- package/cljs.tools.reader.impl.commons.js +217 -0
- package/cljs.tools.reader.impl.commons.js.map +1 -0
- package/cljs.tools.reader.impl.errors.js +441 -0
- package/cljs.tools.reader.impl.errors.js.map +1 -0
- package/cljs.tools.reader.impl.inspect.js +182 -0
- package/cljs.tools.reader.impl.inspect.js.map +1 -0
- package/cljs.tools.reader.impl.utils.js +429 -0
- package/cljs.tools.reader.impl.utils.js.map +1 -0
- package/cljs.tools.reader.js +1830 -0
- package/cljs.tools.reader.js.map +1 -0
- package/cljs.tools.reader.reader_types.js +838 -0
- package/cljs.tools.reader.reader_types.js.map +1 -0
- package/cljs_env.js +18192 -0
- package/cljs_node_io.core.js +1278 -0
- package/cljs_node_io.core.js.map +1 -0
- package/cljs_node_io.file.js +918 -0
- package/cljs_node_io.file.js.map +1 -0
- package/cljs_node_io.fs.js +3911 -0
- package/cljs_node_io.fs.js.map +1 -0
- package/clojure.data.js +319 -0
- package/clojure.data.js.map +1 -0
- package/clojure.edn.js +119 -0
- package/clojure.edn.js.map +1 -0
- package/clojure.set.js +406 -0
- package/clojure.set.js.map +1 -0
- package/clojure.string.js +502 -0
- package/clojure.string.js.map +1 -0
- package/clojure.walk.js +156 -0
- package/clojure.walk.js.map +1 -0
- package/datahike.api.impl.js +621 -0
- package/datahike.api.impl.js.map +1 -0
- package/datahike.api.specification.js +85 -0
- package/datahike.api.specification.js.map +1 -0
- package/datahike.array.js +275 -0
- package/datahike.array.js.map +1 -0
- package/datahike.config.js +437 -0
- package/datahike.config.js.map +1 -0
- package/datahike.connections.js +55 -0
- package/datahike.connections.js.map +1 -0
- package/datahike.connector.js +1248 -0
- package/datahike.connector.js.map +1 -0
- package/datahike.constants.js +66 -0
- package/datahike.constants.js.map +1 -0
- package/datahike.core.js +628 -0
- package/datahike.core.js.map +1 -0
- package/datahike.datom.js +963 -0
- package/datahike.datom.js.map +1 -0
- package/datahike.db.interface.js +819 -0
- package/datahike.db.interface.js.map +1 -0
- package/datahike.db.js +3095 -0
- package/datahike.db.js.map +1 -0
- package/datahike.db.search.js +1004 -0
- package/datahike.db.search.js.map +1 -0
- package/datahike.db.transaction.js +1904 -0
- package/datahike.db.transaction.js.map +1 -0
- package/datahike.db.utils.js +642 -0
- package/datahike.db.utils.js.map +1 -0
- package/datahike.gc.js +1618 -0
- package/datahike.gc.js.map +1 -0
- package/datahike.impl.entity.js +604 -0
- package/datahike.impl.entity.js.map +1 -0
- package/datahike.index.interface.js +484 -0
- package/datahike.index.interface.js.map +1 -0
- package/datahike.index.js +50 -0
- package/datahike.index.js.map +1 -0
- package/datahike.index.persistent_set.js +1250 -0
- package/datahike.index.persistent_set.js.map +1 -0
- package/datahike.js.api.js +2211 -0
- package/datahike.js.api.js.map +1 -0
- package/datahike.lru.js +404 -0
- package/datahike.lru.js.map +1 -0
- package/datahike.pull_api.js +533 -0
- package/datahike.pull_api.js.map +1 -0
- package/datahike.query.js +11891 -0
- package/datahike.query.js.map +1 -0
- package/datahike.query_stats.js +152 -0
- package/datahike.query_stats.js.map +1 -0
- package/datahike.readers.js +166 -0
- package/datahike.readers.js.map +1 -0
- package/datahike.schema.js +251 -0
- package/datahike.schema.js.map +1 -0
- package/datahike.schema_cache.js +66 -0
- package/datahike.schema_cache.js.map +1 -0
- package/datahike.spec.js +70 -0
- package/datahike.spec.js.map +1 -0
- package/datahike.store.js +514 -0
- package/datahike.store.js.map +1 -0
- package/datahike.tools.js +436 -0
- package/datahike.tools.js.map +1 -0
- package/datahike.writer.js +3463 -0
- package/datahike.writer.js.map +1 -0
- package/datahike.writing.js +3168 -0
- package/datahike.writing.js.map +1 -0
- package/datalog.parser.impl.js +1421 -0
- package/datalog.parser.impl.js.map +1 -0
- package/datalog.parser.impl.proto.js +213 -0
- package/datalog.parser.impl.proto.js.map +1 -0
- package/datalog.parser.impl.util.js +117 -0
- package/datalog.parser.impl.util.js.map +1 -0
- package/datalog.parser.js +47 -0
- package/datalog.parser.js.map +1 -0
- package/datalog.parser.pull.js +2603 -0
- package/datalog.parser.pull.js.map +1 -0
- package/datalog.parser.type.js +7502 -0
- package/datalog.parser.type.js.map +1 -0
- package/datalog.parser.util.js +60 -0
- package/datalog.parser.util.js.map +1 -0
- package/environ.core.js +263 -0
- package/environ.core.js.map +1 -0
- package/fress.api.js +607 -0
- package/fress.api.js.map +1 -0
- package/fress.impl.adler32.js +435 -0
- package/fress.impl.adler32.js.map +1 -0
- package/fress.impl.bigint.js +185 -0
- package/fress.impl.bigint.js.map +1 -0
- package/fress.impl.buffer.js +1087 -0
- package/fress.impl.buffer.js.map +1 -0
- package/fress.impl.codes.js +105 -0
- package/fress.impl.codes.js.map +1 -0
- package/fress.impl.hopmap.js +603 -0
- package/fress.impl.hopmap.js.map +1 -0
- package/fress.impl.ranges.js +49 -0
- package/fress.impl.ranges.js.map +1 -0
- package/fress.impl.raw_input.js +837 -0
- package/fress.impl.raw_input.js.map +1 -0
- package/fress.impl.raw_output.js +653 -0
- package/fress.impl.raw_output.js.map +1 -0
- package/fress.impl.table.js +133 -0
- package/fress.impl.table.js.map +1 -0
- package/fress.reader.js +2312 -0
- package/fress.reader.js.map +1 -0
- package/fress.util.js +458 -0
- package/fress.util.js.map +1 -0
- package/fress.writer.js +2141 -0
- package/fress.writer.js.map +1 -0
- package/geheimnis.aes.js +132 -0
- package/geheimnis.aes.js.map +1 -0
- package/hasch.base64.js +42 -0
- package/hasch.base64.js.map +1 -0
- package/hasch.benc.js +201 -0
- package/hasch.benc.js.map +1 -0
- package/hasch.core.js +188 -0
- package/hasch.core.js.map +1 -0
- package/hasch.platform.js +221 -0
- package/hasch.platform.js.map +1 -0
- package/incognito.base.js +276 -0
- package/incognito.base.js.map +1 -0
- package/incognito.edn.js +54 -0
- package/incognito.edn.js.map +1 -0
- package/incognito.fressian.js +330 -0
- package/incognito.fressian.js.map +1 -0
- package/index.d.ts +660 -0
- package/is.simm.partial_cps.async.js +142 -0
- package/is.simm.partial_cps.async.js.map +1 -0
- package/is.simm.partial_cps.runtime.js +65 -0
- package/is.simm.partial_cps.runtime.js.map +1 -0
- package/is.simm.partial_cps.sequence.js +1255 -0
- package/is.simm.partial_cps.sequence.js.map +1 -0
- package/konserve.cache.js +2519 -0
- package/konserve.cache.js.map +1 -0
- package/konserve.compressor.js +502 -0
- package/konserve.compressor.js.map +1 -0
- package/konserve.core.js +8052 -0
- package/konserve.core.js.map +1 -0
- package/konserve.encryptor.js +553 -0
- package/konserve.encryptor.js.map +1 -0
- package/konserve.gc.js +541 -0
- package/konserve.gc.js.map +1 -0
- package/konserve.impl.defaults.js +8290 -0
- package/konserve.impl.defaults.js.map +1 -0
- package/konserve.impl.storage_layout.js +849 -0
- package/konserve.impl.storage_layout.js.map +1 -0
- package/konserve.memory.js +2102 -0
- package/konserve.memory.js.map +1 -0
- package/konserve.node_filestore.js +2951 -0
- package/konserve.node_filestore.js.map +1 -0
- package/konserve.protocols.js +590 -0
- package/konserve.protocols.js.map +1 -0
- package/konserve.serializers.js +562 -0
- package/konserve.serializers.js.map +1 -0
- package/konserve.store.js +2245 -0
- package/konserve.store.js.map +1 -0
- package/konserve.tiered.js +9574 -0
- package/konserve.tiered.js.map +1 -0
- package/konserve.utils.js +180 -0
- package/konserve.utils.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.arrays.js +66 -0
- package/me.tonsky.persistent_sorted_set.arrays.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.branch.js +2779 -0
- package/me.tonsky.persistent_sorted_set.branch.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.btset.js +14196 -0
- package/me.tonsky.persistent_sorted_set.btset.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.impl.node.js +324 -0
- package/me.tonsky.persistent_sorted_set.impl.node.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.impl.storage.js +123 -0
- package/me.tonsky.persistent_sorted_set.impl.storage.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.js +890 -0
- package/me.tonsky.persistent_sorted_set.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.leaf.js +561 -0
- package/me.tonsky.persistent_sorted_set.leaf.js.map +1 -0
- package/me.tonsky.persistent_sorted_set.util.js +402 -0
- package/me.tonsky.persistent_sorted_set.util.js.map +1 -0
- package/medley.core.js +1857 -0
- package/medley.core.js.map +1 -0
- package/package.json +38 -0
- package/spec_tools.core.js +1925 -0
- package/spec_tools.core.js.map +1 -0
- package/spec_tools.data_spec.js +1291 -0
- package/spec_tools.data_spec.js.map +1 -0
- package/spec_tools.form.js +185 -0
- package/spec_tools.form.js.map +1 -0
- package/spec_tools.impl.js +362 -0
- package/spec_tools.impl.js.map +1 -0
- package/spec_tools.parse.js +427 -0
- package/spec_tools.parse.js.map +1 -0
- package/spec_tools.transform.js +288 -0
- package/spec_tools.transform.js.map +1 -0
- package/superv.async.js +8617 -0
- package/superv.async.js.map +1 -0
- package/tailrecursion.priority_map.js +994 -0
- package/tailrecursion.priority_map.js.map +1 -0
- package/taoensso.encore.js +12385 -0
- package/taoensso.encore.js.map +1 -0
- package/taoensso.timbre.appenders.core.js +239 -0
- package/taoensso.timbre.appenders.core.js.map +1 -0
- package/taoensso.timbre.js +1264 -0
- package/taoensso.timbre.js.map +1 -0
- package/taoensso.truss.impl.js +442 -0
- package/taoensso.truss.impl.js.map +1 -0
- package/taoensso.truss.js +743 -0
- package/taoensso.truss.js.map +1 -0
- package/test-config-keys.js +33 -0
- package/test-final.js +36 -0
- package/test-key-duplication.js +67 -0
- package/test.js +557 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
var $CLJS = require("./cljs_env");
|
|
2
|
+
var $jscomp = $CLJS.$jscomp;
|
|
3
|
+
var COMPILED = false;
|
|
4
|
+
require("./cljs.core.js");
|
|
5
|
+
require("./cljs.core.async.impl.protocols.js");
|
|
6
|
+
require("./cljs.core.async.impl.dispatch.js");
|
|
7
|
+
require("./cljs.core.async.impl.buffers.js");
|
|
8
|
+
var environ=$CLJS.environ || ($CLJS.environ = {});
|
|
9
|
+
var fress=$CLJS.fress || ($CLJS.fress = {});
|
|
10
|
+
var datahike=$CLJS.datahike || ($CLJS.datahike = {});
|
|
11
|
+
var clojure=$CLJS.clojure || ($CLJS.clojure = {});
|
|
12
|
+
var hasch=$CLJS.hasch || ($CLJS.hasch = {});
|
|
13
|
+
var tailrecursion=$CLJS.tailrecursion || ($CLJS.tailrecursion = {});
|
|
14
|
+
var superv=$CLJS.superv || ($CLJS.superv = {});
|
|
15
|
+
var geheimnis=$CLJS.geheimnis || ($CLJS.geheimnis = {});
|
|
16
|
+
var is=$CLJS.is || ($CLJS.is = {});
|
|
17
|
+
var cljs=$CLJS.cljs || ($CLJS.cljs = {});
|
|
18
|
+
var cljs_node_io=$CLJS.cljs_node_io || ($CLJS.cljs_node_io = {});
|
|
19
|
+
var goog=$CLJS.goog || ($CLJS.goog = {});
|
|
20
|
+
var konserve=$CLJS.konserve || ($CLJS.konserve = {});
|
|
21
|
+
var datalog=$CLJS.datalog || ($CLJS.datalog = {});
|
|
22
|
+
var spec_tools=$CLJS.spec_tools || ($CLJS.spec_tools = {});
|
|
23
|
+
var taoensso=$CLJS.taoensso || ($CLJS.taoensso = {});
|
|
24
|
+
var incognito=$CLJS.incognito || ($CLJS.incognito = {});
|
|
25
|
+
var medley=$CLJS.medley || ($CLJS.medley = {});
|
|
26
|
+
var me=$CLJS.me || ($CLJS.me = {});
|
|
27
|
+
|
|
28
|
+
$CLJS.SHADOW_ENV.setLoaded("cljs.core.async.impl.channels.js");
|
|
29
|
+
|
|
30
|
+
goog.provide('cljs.core.async.impl.channels');
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @constructor
|
|
34
|
+
* @implements {cljs.core.IMeta}
|
|
35
|
+
* @implements {cljs.core.IDeref}
|
|
36
|
+
* @implements {cljs.core.IWithMeta}
|
|
37
|
+
*/
|
|
38
|
+
cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511 = (function (val,meta23512){
|
|
39
|
+
this.val = val;
|
|
40
|
+
this.meta23512 = meta23512;
|
|
41
|
+
this.cljs$lang$protocol_mask$partition0$ = 425984;
|
|
42
|
+
this.cljs$lang$protocol_mask$partition1$ = 0;
|
|
43
|
+
});
|
|
44
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_23513,meta23512__$1){
|
|
45
|
+
var self__ = this;
|
|
46
|
+
var _23513__$1 = this;
|
|
47
|
+
return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511(self__.val,meta23512__$1));
|
|
48
|
+
}));
|
|
49
|
+
|
|
50
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_23513){
|
|
51
|
+
var self__ = this;
|
|
52
|
+
var _23513__$1 = this;
|
|
53
|
+
return self__.meta23512;
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){
|
|
57
|
+
var self__ = this;
|
|
58
|
+
var ___$1 = this;
|
|
59
|
+
return self__.val;
|
|
60
|
+
}));
|
|
61
|
+
|
|
62
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.getBasis = (function (){
|
|
63
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"val","val",1769233139,null),new cljs.core.Symbol(null,"meta23512","meta23512",-668696387,null)], null);
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.cljs$lang$type = true);
|
|
67
|
+
|
|
68
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.cljs$lang$ctorStr = "cljs.core.async.impl.channels/t_cljs$core$async$impl$channels23511");
|
|
69
|
+
|
|
70
|
+
(cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511.cljs$lang$ctorPrWriter = (function (this__5287__auto__,writer__5288__auto__,opt__5289__auto__){
|
|
71
|
+
return cljs.core._write(writer__5288__auto__,"cljs.core.async.impl.channels/t_cljs$core$async$impl$channels23511");
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Positional factory function for cljs.core.async.impl.channels/t_cljs$core$async$impl$channels23511.
|
|
76
|
+
*/
|
|
77
|
+
cljs.core.async.impl.channels.__GT_t_cljs$core$async$impl$channels23511 = (function cljs$core$async$impl$channels$__GT_t_cljs$core$async$impl$channels23511(val,meta23512){
|
|
78
|
+
return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511(val,meta23512));
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
cljs.core.async.impl.channels.box = (function cljs$core$async$impl$channels$box(val){
|
|
83
|
+
return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels23511(val,cljs.core.PersistentArrayMap.EMPTY));
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @constructor
|
|
88
|
+
*/
|
|
89
|
+
cljs.core.async.impl.channels.PutBox = (function (handler,val){
|
|
90
|
+
this.handler = handler;
|
|
91
|
+
this.val = val;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
(cljs.core.async.impl.channels.PutBox.getBasis = (function (){
|
|
95
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"handler","handler",1444934915,null),new cljs.core.Symbol(null,"val","val",1769233139,null)], null);
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
(cljs.core.async.impl.channels.PutBox.cljs$lang$type = true);
|
|
99
|
+
|
|
100
|
+
(cljs.core.async.impl.channels.PutBox.cljs$lang$ctorStr = "cljs.core.async.impl.channels/PutBox");
|
|
101
|
+
|
|
102
|
+
(cljs.core.async.impl.channels.PutBox.cljs$lang$ctorPrWriter = (function (this__5287__auto__,writer__5288__auto__,opt__5289__auto__){
|
|
103
|
+
return cljs.core._write(writer__5288__auto__,"cljs.core.async.impl.channels/PutBox");
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Positional factory function for cljs.core.async.impl.channels/PutBox.
|
|
108
|
+
*/
|
|
109
|
+
cljs.core.async.impl.channels.__GT_PutBox = (function cljs$core$async$impl$channels$__GT_PutBox(handler,val){
|
|
110
|
+
return (new cljs.core.async.impl.channels.PutBox(handler,val));
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
cljs.core.async.impl.channels.put_active_QMARK_ = (function cljs$core$async$impl$channels$put_active_QMARK_(box){
|
|
114
|
+
return cljs.core.async.impl.protocols.active_QMARK_(box.handler);
|
|
115
|
+
});
|
|
116
|
+
cljs.core.async.impl.channels.MAX_DIRTY = (64);
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @interface
|
|
120
|
+
*/
|
|
121
|
+
cljs.core.async.impl.channels.MMC = function(){};
|
|
122
|
+
|
|
123
|
+
var cljs$core$async$impl$channels$MMC$abort$dyn_23637 = (function (this$){
|
|
124
|
+
var x__5350__auto__ = (((this$ == null))?null:this$);
|
|
125
|
+
var m__5351__auto__ = (cljs.core.async.impl.channels.abort[goog.typeOf(x__5350__auto__)]);
|
|
126
|
+
if((!((m__5351__auto__ == null)))){
|
|
127
|
+
return (m__5351__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5351__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__5351__auto__.call(null, this$));
|
|
128
|
+
} else {
|
|
129
|
+
var m__5349__auto__ = (cljs.core.async.impl.channels.abort["_"]);
|
|
130
|
+
if((!((m__5349__auto__ == null)))){
|
|
131
|
+
return (m__5349__auto__.cljs$core$IFn$_invoke$arity$1 ? m__5349__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__5349__auto__.call(null, this$));
|
|
132
|
+
} else {
|
|
133
|
+
throw cljs.core.missing_protocol("MMC.abort",this$);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
cljs.core.async.impl.channels.abort = (function cljs$core$async$impl$channels$abort(this$){
|
|
138
|
+
if((((!((this$ == null)))) && ((!((this$.cljs$core$async$impl$channels$MMC$abort$arity$1 == null)))))){
|
|
139
|
+
return this$.cljs$core$async$impl$channels$MMC$abort$arity$1(this$);
|
|
140
|
+
} else {
|
|
141
|
+
return cljs$core$async$impl$channels$MMC$abort$dyn_23637(this$);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @constructor
|
|
148
|
+
* @implements {cljs.core.async.impl.channels.MMC}
|
|
149
|
+
* @implements {cljs.core.async.impl.protocols.Channel}
|
|
150
|
+
* @implements {cljs.core.async.impl.protocols.WritePort}
|
|
151
|
+
* @implements {cljs.core.async.impl.protocols.ReadPort}
|
|
152
|
+
*/
|
|
153
|
+
cljs.core.async.impl.channels.ManyToManyChannel = (function (takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_){
|
|
154
|
+
this.takes = takes;
|
|
155
|
+
this.dirty_takes = dirty_takes;
|
|
156
|
+
this.puts = puts;
|
|
157
|
+
this.dirty_puts = dirty_puts;
|
|
158
|
+
this.buf = buf;
|
|
159
|
+
this.closed = closed;
|
|
160
|
+
this.add_BANG_ = add_BANG_;
|
|
161
|
+
});
|
|
162
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$ = cljs.core.PROTOCOL_SENTINEL);
|
|
163
|
+
|
|
164
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$abort$arity$1 = (function (this$){
|
|
165
|
+
var self__ = this;
|
|
166
|
+
var this$__$1 = this;
|
|
167
|
+
while(true){
|
|
168
|
+
var putter_23638 = self__.puts.pop();
|
|
169
|
+
if((putter_23638 == null)){
|
|
170
|
+
} else {
|
|
171
|
+
var put_handler_23639 = putter_23638.handler;
|
|
172
|
+
var val_23640 = putter_23638.val;
|
|
173
|
+
if(put_handler_23639.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, )){
|
|
174
|
+
var put_cb_23641 = put_handler_23639.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
175
|
+
cljs.core.async.impl.dispatch.run(((function (put_cb_23641,put_handler_23639,val_23640,putter_23638,this$__$1){
|
|
176
|
+
return (function (){
|
|
177
|
+
return (put_cb_23641.cljs$core$IFn$_invoke$arity$1 ? put_cb_23641.cljs$core$IFn$_invoke$arity$1(true) : put_cb_23641.call(null, true));
|
|
178
|
+
});})(put_cb_23641,put_handler_23639,val_23640,putter_23638,this$__$1))
|
|
179
|
+
);
|
|
180
|
+
} else {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
self__.puts.cleanup(cljs.core.constantly(false));
|
|
188
|
+
|
|
189
|
+
return this$__$1.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(null, );
|
|
190
|
+
}));
|
|
191
|
+
|
|
192
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$ = cljs.core.PROTOCOL_SENTINEL);
|
|
193
|
+
|
|
194
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = (function (this$,val,handler){
|
|
195
|
+
var self__ = this;
|
|
196
|
+
var this$__$1 = this;
|
|
197
|
+
if((!((val == null)))){
|
|
198
|
+
} else {
|
|
199
|
+
throw (new Error(["Assert failed: ","Can't put nil on a channel","\n","(not (nil? val))"].join('')));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
var closed__$1 = self__.closed;
|
|
203
|
+
if((!(handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, )))){
|
|
204
|
+
return cljs.core.async.impl.channels.box((!(closed__$1)));
|
|
205
|
+
} else {
|
|
206
|
+
if(closed__$1){
|
|
207
|
+
handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
208
|
+
|
|
209
|
+
return cljs.core.async.impl.channels.box(false);
|
|
210
|
+
} else {
|
|
211
|
+
if(cljs.core.truth_((function (){var and__5000__auto__ = self__.buf;
|
|
212
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
213
|
+
return cljs.core.not(self__.buf.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(null, ));
|
|
214
|
+
} else {
|
|
215
|
+
return and__5000__auto__;
|
|
216
|
+
}
|
|
217
|
+
})())){
|
|
218
|
+
handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
219
|
+
|
|
220
|
+
var done_QMARK_ = cljs.core.reduced_QMARK_((self__.add_BANG_.cljs$core$IFn$_invoke$arity$2 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$2(self__.buf,val) : self__.add_BANG_.call(null, self__.buf,val)));
|
|
221
|
+
var take_cbs = (function (){var takers = cljs.core.PersistentVector.EMPTY;
|
|
222
|
+
while(true){
|
|
223
|
+
if((((self__.takes.length > (0))) && ((cljs.core.count(self__.buf) > (0))))){
|
|
224
|
+
var taker = self__.takes.pop();
|
|
225
|
+
if(taker.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, )){
|
|
226
|
+
var ret = taker.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
227
|
+
var val__$1 = self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null, );
|
|
228
|
+
var G__23647 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(takers,((function (takers,ret,val__$1,taker,done_QMARK_,closed__$1,this$__$1){
|
|
229
|
+
return (function (){
|
|
230
|
+
return (ret.cljs$core$IFn$_invoke$arity$1 ? ret.cljs$core$IFn$_invoke$arity$1(val__$1) : ret.call(null, val__$1));
|
|
231
|
+
});})(takers,ret,val__$1,taker,done_QMARK_,closed__$1,this$__$1))
|
|
232
|
+
);
|
|
233
|
+
takers = G__23647;
|
|
234
|
+
continue;
|
|
235
|
+
} else {
|
|
236
|
+
var G__23648 = takers;
|
|
237
|
+
takers = G__23648;
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
return takers;
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
})();
|
|
246
|
+
if(done_QMARK_){
|
|
247
|
+
this$__$1.cljs$core$async$impl$channels$MMC$abort$arity$1(null, );
|
|
248
|
+
} else {
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if(cljs.core.seq(take_cbs)){
|
|
252
|
+
var seq__23567_23649 = cljs.core.seq(take_cbs);
|
|
253
|
+
var chunk__23568_23650 = null;
|
|
254
|
+
var count__23569_23651 = (0);
|
|
255
|
+
var i__23570_23652 = (0);
|
|
256
|
+
while(true){
|
|
257
|
+
if((i__23570_23652 < count__23569_23651)){
|
|
258
|
+
var f_23653 = chunk__23568_23650.cljs$core$IIndexed$_nth$arity$2(null, i__23570_23652);
|
|
259
|
+
cljs.core.async.impl.dispatch.run(f_23653);
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
var G__23654 = seq__23567_23649;
|
|
263
|
+
var G__23655 = chunk__23568_23650;
|
|
264
|
+
var G__23656 = count__23569_23651;
|
|
265
|
+
var G__23657 = (i__23570_23652 + (1));
|
|
266
|
+
seq__23567_23649 = G__23654;
|
|
267
|
+
chunk__23568_23650 = G__23655;
|
|
268
|
+
count__23569_23651 = G__23656;
|
|
269
|
+
i__23570_23652 = G__23657;
|
|
270
|
+
continue;
|
|
271
|
+
} else {
|
|
272
|
+
var temp__5804__auto___23660 = cljs.core.seq(seq__23567_23649);
|
|
273
|
+
if(temp__5804__auto___23660){
|
|
274
|
+
var seq__23567_23661__$1 = temp__5804__auto___23660;
|
|
275
|
+
if(cljs.core.chunked_seq_QMARK_(seq__23567_23661__$1)){
|
|
276
|
+
var c__5525__auto___23662 = cljs.core.chunk_first(seq__23567_23661__$1);
|
|
277
|
+
var G__23663 = cljs.core.chunk_rest(seq__23567_23661__$1);
|
|
278
|
+
var G__23664 = c__5525__auto___23662;
|
|
279
|
+
var G__23665 = cljs.core.count(c__5525__auto___23662);
|
|
280
|
+
var G__23666 = (0);
|
|
281
|
+
seq__23567_23649 = G__23663;
|
|
282
|
+
chunk__23568_23650 = G__23664;
|
|
283
|
+
count__23569_23651 = G__23665;
|
|
284
|
+
i__23570_23652 = G__23666;
|
|
285
|
+
continue;
|
|
286
|
+
} else {
|
|
287
|
+
var f_23668 = cljs.core.first(seq__23567_23661__$1);
|
|
288
|
+
cljs.core.async.impl.dispatch.run(f_23668);
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
var G__23669 = cljs.core.next(seq__23567_23661__$1);
|
|
292
|
+
var G__23670 = null;
|
|
293
|
+
var G__23671 = (0);
|
|
294
|
+
var G__23672 = (0);
|
|
295
|
+
seq__23567_23649 = G__23669;
|
|
296
|
+
chunk__23568_23650 = G__23670;
|
|
297
|
+
count__23569_23651 = G__23671;
|
|
298
|
+
i__23570_23652 = G__23672;
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
} else {
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
} else {
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return cljs.core.async.impl.channels.box(true);
|
|
310
|
+
} else {
|
|
311
|
+
var taker = (function (){while(true){
|
|
312
|
+
var taker = self__.takes.pop();
|
|
313
|
+
if(cljs.core.truth_(taker)){
|
|
314
|
+
if(cljs.core.truth_(taker.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, ))){
|
|
315
|
+
return taker;
|
|
316
|
+
} else {
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
})();
|
|
325
|
+
if(cljs.core.truth_(taker)){
|
|
326
|
+
var take_cb = taker.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
327
|
+
handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
328
|
+
|
|
329
|
+
cljs.core.async.impl.dispatch.run((function (){
|
|
330
|
+
return (take_cb.cljs$core$IFn$_invoke$arity$1 ? take_cb.cljs$core$IFn$_invoke$arity$1(val) : take_cb.call(null, val));
|
|
331
|
+
}));
|
|
332
|
+
|
|
333
|
+
return cljs.core.async.impl.channels.box(true);
|
|
334
|
+
} else {
|
|
335
|
+
if((self__.dirty_puts > (64))){
|
|
336
|
+
(self__.dirty_puts = (0));
|
|
337
|
+
|
|
338
|
+
self__.puts.cleanup(cljs.core.async.impl.channels.put_active_QMARK_);
|
|
339
|
+
} else {
|
|
340
|
+
(self__.dirty_puts = (self__.dirty_puts + (1)));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
if(cljs.core.truth_(handler.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(null, ))){
|
|
344
|
+
if((self__.puts.length < (1024))){
|
|
345
|
+
} else {
|
|
346
|
+
throw (new Error(["Assert failed: ",["No more than ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((1024))," pending puts are allowed on a single channel."," Consider using a windowed buffer."].join(''),"\n","(< (.-length puts) impl/MAX-QUEUE-SIZE)"].join('')));
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
self__.puts.unbounded_unshift((new cljs.core.async.impl.channels.PutBox(handler,val)));
|
|
350
|
+
} else {
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}));
|
|
359
|
+
|
|
360
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$ = cljs.core.PROTOCOL_SENTINEL);
|
|
361
|
+
|
|
362
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = (function (this$,handler){
|
|
363
|
+
var self__ = this;
|
|
364
|
+
var this$__$1 = this;
|
|
365
|
+
if((!(handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, )))){
|
|
366
|
+
return null;
|
|
367
|
+
} else {
|
|
368
|
+
if((((!((self__.buf == null)))) && ((cljs.core.count(self__.buf) > (0))))){
|
|
369
|
+
var temp__5802__auto__ = handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
370
|
+
if(cljs.core.truth_(temp__5802__auto__)){
|
|
371
|
+
var take_cb = temp__5802__auto__;
|
|
372
|
+
var val = self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null, );
|
|
373
|
+
var vec__23574 = ((((cljs.core.not(self__.buf.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(null, ))) && ((self__.puts.length > (0)))))?(function (){var cbs = cljs.core.PersistentVector.EMPTY;
|
|
374
|
+
while(true){
|
|
375
|
+
var putter = self__.puts.pop();
|
|
376
|
+
var put_handler = putter.handler;
|
|
377
|
+
var val__$1 = putter.val;
|
|
378
|
+
var cb = (function (){var and__5000__auto__ = put_handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, );
|
|
379
|
+
if(and__5000__auto__){
|
|
380
|
+
return put_handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
381
|
+
} else {
|
|
382
|
+
return and__5000__auto__;
|
|
383
|
+
}
|
|
384
|
+
})();
|
|
385
|
+
var cbs__$1 = (cljs.core.truth_(cb)?cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cbs,cb):cbs);
|
|
386
|
+
var done_QMARK_ = (cljs.core.truth_(cb)?cljs.core.reduced_QMARK_((self__.add_BANG_.cljs$core$IFn$_invoke$arity$2 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$2(self__.buf,val__$1) : self__.add_BANG_.call(null, self__.buf,val__$1))):null);
|
|
387
|
+
if(((cljs.core.not(done_QMARK_)) && (((cljs.core.not(self__.buf.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(null, ))) && ((self__.puts.length > (0))))))){
|
|
388
|
+
var G__23687 = cbs__$1;
|
|
389
|
+
cbs = G__23687;
|
|
390
|
+
continue;
|
|
391
|
+
} else {
|
|
392
|
+
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [done_QMARK_,cbs__$1], null);
|
|
393
|
+
}
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
})():null);
|
|
397
|
+
var done_QMARK_ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__23574,(0),null);
|
|
398
|
+
var cbs = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__23574,(1),null);
|
|
399
|
+
if(cljs.core.truth_(done_QMARK_)){
|
|
400
|
+
this$__$1.cljs$core$async$impl$channels$MMC$abort$arity$1(null, );
|
|
401
|
+
} else {
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
var seq__23581_23688 = cljs.core.seq(cbs);
|
|
405
|
+
var chunk__23582_23689 = null;
|
|
406
|
+
var count__23583_23690 = (0);
|
|
407
|
+
var i__23584_23691 = (0);
|
|
408
|
+
while(true){
|
|
409
|
+
if((i__23584_23691 < count__23583_23690)){
|
|
410
|
+
var cb_23697 = chunk__23582_23689.cljs$core$IIndexed$_nth$arity$2(null, i__23584_23691);
|
|
411
|
+
cljs.core.async.impl.dispatch.run(((function (seq__23581_23688,chunk__23582_23689,count__23583_23690,i__23584_23691,cb_23697,val,vec__23574,done_QMARK_,cbs,take_cb,temp__5802__auto__,this$__$1){
|
|
412
|
+
return (function (){
|
|
413
|
+
return (cb_23697.cljs$core$IFn$_invoke$arity$1 ? cb_23697.cljs$core$IFn$_invoke$arity$1(true) : cb_23697.call(null, true));
|
|
414
|
+
});})(seq__23581_23688,chunk__23582_23689,count__23583_23690,i__23584_23691,cb_23697,val,vec__23574,done_QMARK_,cbs,take_cb,temp__5802__auto__,this$__$1))
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
var G__23699 = seq__23581_23688;
|
|
419
|
+
var G__23700 = chunk__23582_23689;
|
|
420
|
+
var G__23701 = count__23583_23690;
|
|
421
|
+
var G__23702 = (i__23584_23691 + (1));
|
|
422
|
+
seq__23581_23688 = G__23699;
|
|
423
|
+
chunk__23582_23689 = G__23700;
|
|
424
|
+
count__23583_23690 = G__23701;
|
|
425
|
+
i__23584_23691 = G__23702;
|
|
426
|
+
continue;
|
|
427
|
+
} else {
|
|
428
|
+
var temp__5804__auto___23703 = cljs.core.seq(seq__23581_23688);
|
|
429
|
+
if(temp__5804__auto___23703){
|
|
430
|
+
var seq__23581_23704__$1 = temp__5804__auto___23703;
|
|
431
|
+
if(cljs.core.chunked_seq_QMARK_(seq__23581_23704__$1)){
|
|
432
|
+
var c__5525__auto___23706 = cljs.core.chunk_first(seq__23581_23704__$1);
|
|
433
|
+
var G__23707 = cljs.core.chunk_rest(seq__23581_23704__$1);
|
|
434
|
+
var G__23708 = c__5525__auto___23706;
|
|
435
|
+
var G__23709 = cljs.core.count(c__5525__auto___23706);
|
|
436
|
+
var G__23710 = (0);
|
|
437
|
+
seq__23581_23688 = G__23707;
|
|
438
|
+
chunk__23582_23689 = G__23708;
|
|
439
|
+
count__23583_23690 = G__23709;
|
|
440
|
+
i__23584_23691 = G__23710;
|
|
441
|
+
continue;
|
|
442
|
+
} else {
|
|
443
|
+
var cb_23711 = cljs.core.first(seq__23581_23704__$1);
|
|
444
|
+
cljs.core.async.impl.dispatch.run(((function (seq__23581_23688,chunk__23582_23689,count__23583_23690,i__23584_23691,cb_23711,seq__23581_23704__$1,temp__5804__auto___23703,val,vec__23574,done_QMARK_,cbs,take_cb,temp__5802__auto__,this$__$1){
|
|
445
|
+
return (function (){
|
|
446
|
+
return (cb_23711.cljs$core$IFn$_invoke$arity$1 ? cb_23711.cljs$core$IFn$_invoke$arity$1(true) : cb_23711.call(null, true));
|
|
447
|
+
});})(seq__23581_23688,chunk__23582_23689,count__23583_23690,i__23584_23691,cb_23711,seq__23581_23704__$1,temp__5804__auto___23703,val,vec__23574,done_QMARK_,cbs,take_cb,temp__5802__auto__,this$__$1))
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
var G__23712 = cljs.core.next(seq__23581_23704__$1);
|
|
452
|
+
var G__23713 = null;
|
|
453
|
+
var G__23714 = (0);
|
|
454
|
+
var G__23715 = (0);
|
|
455
|
+
seq__23581_23688 = G__23712;
|
|
456
|
+
chunk__23582_23689 = G__23713;
|
|
457
|
+
count__23583_23690 = G__23714;
|
|
458
|
+
i__23584_23691 = G__23715;
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
} else {
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
return cljs.core.async.impl.channels.box(val);
|
|
468
|
+
} else {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
471
|
+
} else {
|
|
472
|
+
var putter = (function (){while(true){
|
|
473
|
+
var putter = self__.puts.pop();
|
|
474
|
+
if(cljs.core.truth_(putter)){
|
|
475
|
+
if(cljs.core.async.impl.protocols.active_QMARK_(putter.handler)){
|
|
476
|
+
return putter;
|
|
477
|
+
} else {
|
|
478
|
+
continue;
|
|
479
|
+
}
|
|
480
|
+
} else {
|
|
481
|
+
return null;
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
})();
|
|
486
|
+
if(cljs.core.truth_(putter)){
|
|
487
|
+
var put_cb = cljs.core.async.impl.protocols.commit(putter.handler);
|
|
488
|
+
handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
489
|
+
|
|
490
|
+
cljs.core.async.impl.dispatch.run((function (){
|
|
491
|
+
return (put_cb.cljs$core$IFn$_invoke$arity$1 ? put_cb.cljs$core$IFn$_invoke$arity$1(true) : put_cb.call(null, true));
|
|
492
|
+
}));
|
|
493
|
+
|
|
494
|
+
return cljs.core.async.impl.channels.box(putter.val);
|
|
495
|
+
} else {
|
|
496
|
+
if(cljs.core.truth_(self__.closed)){
|
|
497
|
+
if(cljs.core.truth_(self__.buf)){
|
|
498
|
+
(self__.add_BANG_.cljs$core$IFn$_invoke$arity$1 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$1(self__.buf) : self__.add_BANG_.call(null, self__.buf));
|
|
499
|
+
} else {
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if(cljs.core.truth_((function (){var and__5000__auto__ = handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, );
|
|
503
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
504
|
+
return handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
505
|
+
} else {
|
|
506
|
+
return and__5000__auto__;
|
|
507
|
+
}
|
|
508
|
+
})())){
|
|
509
|
+
var has_val = (function (){var and__5000__auto__ = self__.buf;
|
|
510
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
511
|
+
return (cljs.core.count(self__.buf) > (0));
|
|
512
|
+
} else {
|
|
513
|
+
return and__5000__auto__;
|
|
514
|
+
}
|
|
515
|
+
})();
|
|
516
|
+
var val = (cljs.core.truth_(has_val)?self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null, ):null);
|
|
517
|
+
return cljs.core.async.impl.channels.box(val);
|
|
518
|
+
} else {
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
521
|
+
} else {
|
|
522
|
+
if((self__.dirty_takes > (64))){
|
|
523
|
+
(self__.dirty_takes = (0));
|
|
524
|
+
|
|
525
|
+
self__.takes.cleanup(cljs.core.async.impl.protocols.active_QMARK_);
|
|
526
|
+
} else {
|
|
527
|
+
(self__.dirty_takes = (self__.dirty_takes + (1)));
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if(cljs.core.truth_(handler.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(null, ))){
|
|
531
|
+
if((self__.takes.length < (1024))){
|
|
532
|
+
} else {
|
|
533
|
+
throw (new Error(["Assert failed: ",["No more than ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((1024))," pending takes are allowed on a single channel."].join(''),"\n","(< (.-length takes) impl/MAX-QUEUE-SIZE)"].join('')));
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
self__.takes.unbounded_unshift(handler);
|
|
537
|
+
} else {
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
return null;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}));
|
|
546
|
+
|
|
547
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$ = cljs.core.PROTOCOL_SENTINEL);
|
|
548
|
+
|
|
549
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 = (function (_){
|
|
550
|
+
var self__ = this;
|
|
551
|
+
var ___$1 = this;
|
|
552
|
+
return self__.closed;
|
|
553
|
+
}));
|
|
554
|
+
|
|
555
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = (function (this$){
|
|
556
|
+
var self__ = this;
|
|
557
|
+
var this$__$1 = this;
|
|
558
|
+
if(self__.closed){
|
|
559
|
+
return null;
|
|
560
|
+
} else {
|
|
561
|
+
(self__.closed = true);
|
|
562
|
+
|
|
563
|
+
if(cljs.core.truth_((function (){var and__5000__auto__ = self__.buf;
|
|
564
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
565
|
+
return (self__.puts.length === (0));
|
|
566
|
+
} else {
|
|
567
|
+
return and__5000__auto__;
|
|
568
|
+
}
|
|
569
|
+
})())){
|
|
570
|
+
(self__.add_BANG_.cljs$core$IFn$_invoke$arity$1 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$1(self__.buf) : self__.add_BANG_.call(null, self__.buf));
|
|
571
|
+
} else {
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
while(true){
|
|
575
|
+
var taker_23720 = self__.takes.pop();
|
|
576
|
+
if((taker_23720 == null)){
|
|
577
|
+
} else {
|
|
578
|
+
if(taker_23720.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null, )){
|
|
579
|
+
var take_cb_23721 = taker_23720.cljs$core$async$impl$protocols$Handler$commit$arity$1(null, );
|
|
580
|
+
var val_23722 = (cljs.core.truth_((function (){var and__5000__auto__ = self__.buf;
|
|
581
|
+
if(cljs.core.truth_(and__5000__auto__)){
|
|
582
|
+
return (cljs.core.count(self__.buf) > (0));
|
|
583
|
+
} else {
|
|
584
|
+
return and__5000__auto__;
|
|
585
|
+
}
|
|
586
|
+
})())?self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null, ):null);
|
|
587
|
+
cljs.core.async.impl.dispatch.run(((function (take_cb_23721,val_23722,taker_23720,this$__$1){
|
|
588
|
+
return (function (){
|
|
589
|
+
return (take_cb_23721.cljs$core$IFn$_invoke$arity$1 ? take_cb_23721.cljs$core$IFn$_invoke$arity$1(val_23722) : take_cb_23721.call(null, val_23722));
|
|
590
|
+
});})(take_cb_23721,val_23722,taker_23720,this$__$1))
|
|
591
|
+
);
|
|
592
|
+
} else {
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
if(cljs.core.truth_(self__.buf)){
|
|
601
|
+
self__.buf.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1(null, );
|
|
602
|
+
} else {
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
}));
|
|
608
|
+
|
|
609
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.getBasis = (function (){
|
|
610
|
+
return new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"takes","takes",298247964,null),cljs.core.with_meta(new cljs.core.Symbol(null,"dirty-takes","dirty-takes",575642138,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"puts","puts",-1883877054,null),cljs.core.with_meta(new cljs.core.Symbol(null,"dirty-puts","dirty-puts",57041148,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"buf","buf",1426618187,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"tag","tag",-1290361223),new cljs.core.Symbol(null,"not-native","not-native",-236392494,null)], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"closed","closed",720856168,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"mutable","mutable",875778266),true], null)),new cljs.core.Symbol(null,"add!","add!",2046056845,null)], null);
|
|
611
|
+
}));
|
|
612
|
+
|
|
613
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$type = true);
|
|
614
|
+
|
|
615
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorStr = "cljs.core.async.impl.channels/ManyToManyChannel");
|
|
616
|
+
|
|
617
|
+
(cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorPrWriter = (function (this__5287__auto__,writer__5288__auto__,opt__5289__auto__){
|
|
618
|
+
return cljs.core._write(writer__5288__auto__,"cljs.core.async.impl.channels/ManyToManyChannel");
|
|
619
|
+
}));
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Positional factory function for cljs.core.async.impl.channels/ManyToManyChannel.
|
|
623
|
+
*/
|
|
624
|
+
cljs.core.async.impl.channels.__GT_ManyToManyChannel = (function cljs$core$async$impl$channels$__GT_ManyToManyChannel(takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_){
|
|
625
|
+
return (new cljs.core.async.impl.channels.ManyToManyChannel(takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_));
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
cljs.core.async.impl.channels.ex_handler = (function cljs$core$async$impl$channels$ex_handler(ex){
|
|
629
|
+
console.log(ex);
|
|
630
|
+
|
|
631
|
+
return null;
|
|
632
|
+
});
|
|
633
|
+
cljs.core.async.impl.channels.handle = (function cljs$core$async$impl$channels$handle(buf,exh,t){
|
|
634
|
+
var else$ = (function (){var fexpr__23597 = (function (){var or__5002__auto__ = exh;
|
|
635
|
+
if(cljs.core.truth_(or__5002__auto__)){
|
|
636
|
+
return or__5002__auto__;
|
|
637
|
+
} else {
|
|
638
|
+
return cljs.core.async.impl.channels.ex_handler;
|
|
639
|
+
}
|
|
640
|
+
})();
|
|
641
|
+
return (fexpr__23597.cljs$core$IFn$_invoke$arity$1 ? fexpr__23597.cljs$core$IFn$_invoke$arity$1(t) : fexpr__23597.call(null, t));
|
|
642
|
+
})();
|
|
643
|
+
if((else$ == null)){
|
|
644
|
+
return buf;
|
|
645
|
+
} else {
|
|
646
|
+
return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2(buf,else$);
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
cljs.core.async.impl.channels.chan = (function cljs$core$async$impl$channels$chan(var_args){
|
|
650
|
+
var G__23605 = arguments.length;
|
|
651
|
+
switch (G__23605) {
|
|
652
|
+
case 1:
|
|
653
|
+
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
|
|
654
|
+
|
|
655
|
+
break;
|
|
656
|
+
case 2:
|
|
657
|
+
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
|
|
658
|
+
|
|
659
|
+
break;
|
|
660
|
+
case 3:
|
|
661
|
+
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));
|
|
662
|
+
|
|
663
|
+
break;
|
|
664
|
+
default:
|
|
665
|
+
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));
|
|
666
|
+
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
(cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1 = (function (buf){
|
|
671
|
+
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2(buf,null);
|
|
672
|
+
}));
|
|
673
|
+
|
|
674
|
+
(cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2 = (function (buf,xform){
|
|
675
|
+
return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3(buf,xform,null);
|
|
676
|
+
}));
|
|
677
|
+
|
|
678
|
+
(cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3 = (function (buf,xform,exh){
|
|
679
|
+
return (new cljs.core.async.impl.channels.ManyToManyChannel(cljs.core.async.impl.buffers.ring_buffer((32)),(0),cljs.core.async.impl.buffers.ring_buffer((32)),(0),buf,false,(function (){var add_BANG_ = (cljs.core.truth_(xform)?(xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(cljs.core.async.impl.protocols.add_BANG_) : xform.call(null, cljs.core.async.impl.protocols.add_BANG_)):cljs.core.async.impl.protocols.add_BANG_);
|
|
680
|
+
return (function() {
|
|
681
|
+
var G__23735 = null;
|
|
682
|
+
var G__23735__1 = (function (buf__$1){
|
|
683
|
+
try{return (add_BANG_.cljs$core$IFn$_invoke$arity$1 ? add_BANG_.cljs$core$IFn$_invoke$arity$1(buf__$1) : add_BANG_.call(null, buf__$1));
|
|
684
|
+
}catch (e23615){var t = e23615;
|
|
685
|
+
return cljs.core.async.impl.channels.handle(buf__$1,exh,t);
|
|
686
|
+
}});
|
|
687
|
+
var G__23735__2 = (function (buf__$1,val){
|
|
688
|
+
try{return (add_BANG_.cljs$core$IFn$_invoke$arity$2 ? add_BANG_.cljs$core$IFn$_invoke$arity$2(buf__$1,val) : add_BANG_.call(null, buf__$1,val));
|
|
689
|
+
}catch (e23616){var t = e23616;
|
|
690
|
+
return cljs.core.async.impl.channels.handle(buf__$1,exh,t);
|
|
691
|
+
}});
|
|
692
|
+
G__23735 = function(buf__$1,val){
|
|
693
|
+
switch(arguments.length){
|
|
694
|
+
case 1:
|
|
695
|
+
return G__23735__1.call(this,buf__$1);
|
|
696
|
+
case 2:
|
|
697
|
+
return G__23735__2.call(this,buf__$1,val);
|
|
698
|
+
}
|
|
699
|
+
throw(new Error('Invalid arity: ' + arguments.length));
|
|
700
|
+
};
|
|
701
|
+
G__23735.cljs$core$IFn$_invoke$arity$1 = G__23735__1;
|
|
702
|
+
G__23735.cljs$core$IFn$_invoke$arity$2 = G__23735__2;
|
|
703
|
+
return G__23735;
|
|
704
|
+
})()
|
|
705
|
+
})()));
|
|
706
|
+
}));
|
|
707
|
+
|
|
708
|
+
(cljs.core.async.impl.channels.chan.cljs$lang$maxFixedArity = 3);
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
//# sourceMappingURL=cljs.core.async.impl.channels.js.map
|