UNPKG

minigrace

Version:

A compiler for the Grace programming language

809 lines (808 loc) 42.9 kB
let gracecode_equalityBundle_sourceFile = "/Users/black/Development/mg/gracelang/minigrace/equalityBundle.grace"; let gracecode_equalityBundle_sha256 = "2f2dac6ca6445dbc60a1c2de7c8f60a76b40d2d6d05fad9b2f9203218a701a3b"; let gracecode_equalityBundle_minigraceRevision = "b57591d29fc5ee5270d114920bf671367b8c3ecb"; let gracecode_equalityBundle_minigraceGeneration = "5171"; if (typeof gctCache !== "undefined") gctCache["equalityBundle"] = "dialect:\nfreshScopes:\n $102 trait\n $104 trait\n $105 trait\n $106 trait\n $107\nmodules:\n basicTypesBundle\n intrinsic\npath:\n /Users/black/Development/mg/gracelang/minigrace/equalityBundle.grace\nscope:$102:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (req) $scopeUniv required\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n hash Unknown (req) $scopeUniv required\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$103:\n Binding type\n Boolean type\n Collection type\n CollectionFactory type\n Done type\n Enumerable type\n EqualityObject type\n ExceptionKind type\n ExceptionPacket type\n Function0 type\n Function1 type\n Function2 type\n Function3 type\n Interface type\n Iterator type\n None type\n Number type\n Object type\n Pattern type\n Point type\n Predicate0 type\n Predicate1 type\n Predicate2 type\n Predicate3 type\n Procedure0 type\n Procedure1 type\n Procedure2 type\n Procedure3 type\n SelfType type\n Sequence type\n Sequenceable type\n Signature type\n Sink type\n String type\n Type type\n abstract Unknown (mth) $scope_done\n annotation Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n confidential Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n open Unknown (mth) $104\n override Unknown (mth) $scope_done\n public Unknown (mth) $scope_done\n readable Unknown (mth) $scope_done\n required Unknown (mth) $scope_done\n writable Unknown (mth) $scope_done\nscope:$104:\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n binding Unknown (mth) $106\n equality Unknown (mth) $102\n identityEquality Unknown (mth) $105\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\nscope:$105:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$106:\n asDebugString String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n key(1)value(1) Unknown (mth) $107\n myIdentityHash Number (go) $scope_number\nscope:$107:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString Unknown (mth) $scope_done\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n key Unknown (def) $scopeEmpty public\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n value Unknown (def) $scopeEmpty public\n \u2260(1) Unknown (mth) $scope_done\nself:\n $103\ntypes:\n"; if (typeof originalSourceLines !== "undefined") { originalSourceLines["equalityBundle"] = [ "dialect \"none\"", "import \"intrinsic\" as intrinsic", "import \"basicTypesBundle\" as basicTypesBundle", "", "use intrinsic.annotations", "use basicTypesBundle.open", "", "trait open {", "", " trait equality {", " method == (other) is required", " method hash is required // should obey invariant (a == b) => (a.hash == b.hash)", " method ≠ (other) { (self == other).not }", " method :: (obj) { binding.key (self) value (obj) }", " method prefix == { intrinsic.curriedPredicate(self, \"==(_)\") }", " method prefix ≠ { intrinsic.curriedPredicate(self, \"≠(_)\") }", " }", "", " trait identityEquality {", " use equality", " method == (other) { self.isMe(other) }", " method hash { self.myIdentityHash }", " }", "", " class binding⟦K, T⟧ {", " method asString { \"the binding factory\" }", "", " class key(k)value(v) {", " use equality", " def key is public = k", " def value is public = v", " method asString { \"{key}::{value}\" }", " method asDebugString { \"{key.asDebugString}::{value.asDebugString}\" }", " method hash { intrinsic.hashCombine (key.hash, value.hash) }", " method == (other) {", " match (other)", " case { o:Binding -> (key == o.key) && (value == o.value) }", " else { false }", " }", " }", " }", "}" ]; } function gracecode_equalityBundle() { importedModules["equalityBundle"] = this; const var_$module = this; this.definitionModule = "equalityBundle"; this.definitionLine = 1; setLineNumber(1); // compilenode dialect // Dialect "none" const var_$dialect = new GraceModule("none"); this.outer = var_$dialect; setLineNumber(2); // compilenode import // Import of "intrinsic" as intrinsic if (typeof gracecode_intrinsic == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module intrinsic")); var var_intrinsic = do_import("intrinsic", gracecode_intrinsic); var func0 = function(argcv) { // accessor method intrinsic, line 2 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("intrinsic", 0, numArgs - 0); return var_intrinsic; }; // end of method intrinsic this.methods["intrinsic"] = func0; func0.methodName = "intrinsic"; func0.paramCounts = [0]; func0.paramNames = []; func0.definitionLine = 2; func0.definitionModule = "equalityBundle"; func0.debug = "import"; func0.confidential = true; setLineNumber(3); // compilenode import // Import of "basicTypesBundle" as basicTypesBundle if (typeof gracecode_basicTypesBundle == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module basicTypesBundle")); var var_basicTypesBundle = do_import("basicTypesBundle", gracecode_basicTypesBundle); var func1 = function(argcv) { // accessor method basicTypesBundle, line 3 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("basicTypesBundle", 0, numArgs - 0); return var_basicTypesBundle; }; // end of method basicTypesBundle this.methods["basicTypesBundle"] = func1; func1.methodName = "basicTypesBundle"; func1.paramCounts = [0]; func1.paramNames = []; func1.definitionLine = 3; func1.definitionModule = "equalityBundle"; func1.debug = "import"; func1.confidential = true; this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_equalityBundle_1"); this.outer_equalityBundle_1 = var_$dialect; setLineNumber(5); // reuse call var initFun2 = request(var_intrinsic, "annotations$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(6); // reuse call var initFun3 = request(var_basicTypesBundle, "open$build(3)", [null], this, [], []); // compileReuseCall var func4 = function(argcv) { // method open, line 8 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("open", 0, numArgs - 0); } var ouc = emptyGraceObject("open", "equalityBundle", 8); var ouc_init = this.methods["open$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method open this.methods["open"] = func4; func4.methodName = "open"; func4.paramCounts = [0]; func4.paramNames = []; func4.definitionLine = 8; func4.definitionModule = "equalityBundle"; var func5 = function(argcv, inheritingObject, aliases, exclusions) { // method open$build(_,_,_), line 8 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("open", 0, numArgs - 0); } var obj6_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_equalityBundle_8"); this.outer_equalityBundle_8 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; var func7 = function(argcv) { // method equality, line 10 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("equality", 0, numArgs - 0); } var ouc = emptyGraceObject("open.equality", "equalityBundle", 10); var ouc_init = this.methods["equality$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method equality this.methods["equality"] = func7; func7.methodName = "equality"; func7.paramCounts = [0]; func7.paramNames = []; func7.definitionLine = 10; func7.definitionModule = "equalityBundle"; var func8 = function(argcv, inheritingObject, aliases, exclusions) { // method equality$build(_,_,_), line 10 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("equality", 0, numArgs - 0); } var obj9_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_equalityBundle_10"); this.outer_equalityBundle_10 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; if (! this.methods["==(1)"]) { var func10 = function(argcv, var_other) { // method ==(_), line 11 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("==(_)", 0, numArgs - 1); } setLineNumber(11); // required method throw new GraceExceptionPacket(ProgrammingErrorObject, new GraceString("required method ==(_) " + "was not supplied for " + safeJsString(this))); }; // end of method ==(_) this.methods["==(1)"] = func10; func10.methodName = "==(1)"; func10.paramCounts = [1]; func10.paramNames = ["other"]; func10.definitionLine = 11; func10.definitionModule = "equalityBundle"; }; if (! this.methods["hash"]) { var func11 = function(argcv) { // method hash, line 12 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("hash", 0, numArgs - 0); } setLineNumber(12); // required method throw new GraceExceptionPacket(ProgrammingErrorObject, new GraceString("required method hash " + "was not supplied for " + safeJsString(this))); }; // end of method hash this.methods["hash"] = func11; func11.methodName = "hash"; func11.paramCounts = [0]; func11.paramNames = []; func11.definitionLine = 12; func11.definitionModule = "equalityBundle"; }; var func12 = function(argcv, var_other) { // method ≠(_), line 13 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("≠(_)", 0, numArgs - 1); } setLineNumber(13); // compilenode member // call case 4: other requests // call case 4: other requests var term14 = selfRequest(this, "==(1)", [1], var_other); var call13 = request(term14, "not", [0]); return call13; }; // end of method ≠(_) this.methods["\u2260(1)"] = func12; func12.methodName = "\u2260(1)"; func12.paramCounts = [1]; func12.paramNames = ["other"]; func12.definitionLine = 13; func12.definitionModule = "equalityBundle"; var func15 = function(argcv, var_obj) { // method ::(_), line 14 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("::(_)", 0, numArgs - 1); } setLineNumber(14); // compilenode yourself // call case 4: other requests var call17 = selfRequest(this.outer_equalityBundle_10, "binding", [0]); var call16 = request(call17, "key(1)value(1)", [1, 1], this, var_obj); return call16; }; // end of method ::(_) this.methods["::(1)"] = func15; func15.methodName = "::(1)"; func15.paramCounts = [1]; func15.paramNames = ["obj"]; func15.definitionLine = 14; func15.definitionModule = "equalityBundle"; var func18 = function(argcv) { // method prefix==, line 15 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("prefix==", 0, numArgs - 0); } setLineNumber(15); // compilenode string var string20 = new GraceString("==(_)"); // call case 4: other requests var call19 = request(var_intrinsic, "curriedPredicate(2)", [2], this, string20); return call19; }; // end of method prefix== this.methods["prefix=="] = func18; func18.methodName = "prefix=="; func18.paramCounts = [0]; func18.paramNames = []; func18.definitionLine = 15; func18.definitionModule = "equalityBundle"; var func21 = function(argcv) { // method prefix≠, line 16 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("prefix≠", 0, numArgs - 0); } setLineNumber(16); // compilenode string var string23 = new GraceString("\u2260(_)"); // call case 4: other requests var call22 = request(var_intrinsic, "curriedPredicate(2)", [2], this, string23); return call22; }; // end of method prefix≠ this.methods["prefix\u2260"] = func21; func21.methodName = "prefix\u2260"; func21.paramCounts = [0]; func21.paramNames = []; func21.definitionLine = 16; func21.definitionModule = "equalityBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 10; m.definitionModule = "equalityBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj9_init = function() { // init of object on line 10 }; return obj9_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj9_init = obj9_build.call(inheritingObject, null, this, aliases, exclusions); return obj9_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method equality$build(_,_,_) this.methods["equality$build(3)"] = func8; func8.methodName = "equality$build(3)"; func8.paramCounts = [0]; func8.paramNames = []; func8.definitionLine = 10; func8.definitionModule = "equalityBundle"; var func24 = function(argcv) { // method identityEquality, line 19 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("identityEquality", 0, numArgs - 0); } var ouc = emptyGraceObject("open.identityEquality", "equalityBundle", 19); var ouc_init = this.methods["identityEquality$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method identityEquality this.methods["identityEquality"] = func24; func24.methodName = "identityEquality"; func24.paramCounts = [0]; func24.paramNames = []; func24.definitionLine = 19; func24.definitionModule = "equalityBundle"; var func25 = function(argcv, inheritingObject, aliases, exclusions) { // method identityEquality$build(_,_,_), line 19 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("identityEquality", 0, numArgs - 0); } var obj26_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_equalityBundle_19"); this.outer_equalityBundle_19 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(20); // compilenode yourself var initFun27 = selfRequest(this.outer_equalityBundle_19, "equality$build(3)", [null], this, [], []); // compileReuseCall var func28 = function(argcv, var_other) { // method ==(_), line 21 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("==(_)", 0, numArgs - 1); } setLineNumber(21); // compilenode call var call29 = selfRequest(this, "isMe(1)", [1], var_other); return call29; }; // end of method ==(_) this.methods["==(1)"] = func28; func28.methodName = "==(1)"; func28.paramCounts = [1]; func28.paramNames = ["other"]; func28.definitionLine = 21; func28.definitionModule = "equalityBundle"; var func30 = function(argcv) { // method hash, line 22 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("hash", 0, numArgs - 0); } setLineNumber(22); // compilenode member var call31 = selfRequest(this, "myIdentityHash", [0]); return call31; }; // end of method hash this.methods["hash"] = func30; func30.methodName = "hash"; func30.paramCounts = [0]; func30.paramNames = []; func30.definitionLine = 22; func30.definitionModule = "equalityBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 19; m.definitionModule = "equalityBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj26_init = function() { // init of object on line 19 }; return obj26_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj26_init = obj26_build.call(inheritingObject, null, this, aliases, exclusions); return obj26_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method identityEquality$build(_,_,_) this.methods["identityEquality$build(3)"] = func25; func25.methodName = "identityEquality$build(3)"; func25.paramCounts = [0]; func25.paramNames = []; func25.definitionLine = 19; func25.definitionModule = "equalityBundle"; var func32 = function(argcv, var_K, var_T) { // method binding, line 25 var returnTarget = invocationCount; invocationCount++; if (! var_K) var_K = type_Unknown; if (! var_T) var_T = type_Unknown; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 2)) { raiseTypeArgError("binding", 2, numArgs - 0); } var ouc = emptyGraceObject("open.binding", "equalityBundle", 25); var ouc_init = this.methods["binding$build(3)"].call(this, null, ouc, [], [], var_K, var_T); ouc_init.call(ouc); return ouc; }; // end of method binding this.methods["binding"] = func32; func32.methodName = "binding"; func32.paramCounts = [0]; func32.paramNames = []; func32.typeParamNames = ["K", "T"]; func32.definitionLine = 25; func32.definitionModule = "equalityBundle"; var func33 = function(argcv, inheritingObject, aliases, exclusions, var_K, var_T) { // method binding$build(_,_,_), line 25 var returnTarget = invocationCount; invocationCount++; if (! var_K) var_K = type_Unknown; if (! var_T) var_T = type_Unknown; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 2)) { raiseTypeArgError("binding", 2, numArgs - 0); } var obj34_build = function(ignore, outerObj, aliases, exclusions, var_K, var_T) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_equalityBundle_25"); this.outer_equalityBundle_25 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; var func35 = function(argcv) { // method asString, line 26 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("asString", 0, numArgs - 0); } setLineNumber(26); // compilenode string var string36 = new GraceString("the binding factory"); return string36; }; // end of method asString this.methods["asString"] = func35; func35.methodName = "asString"; func35.paramCounts = [0]; func35.paramNames = []; func35.definitionLine = 26; func35.definitionModule = "equalityBundle"; var func37 = function(argcv, var_k, var_v) { // method key(_)value(_), line 28 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("key(_)value(_)", 0, numArgs - 2); } var ouc = emptyGraceObject("open.binding.key(_)value(_)", "equalityBundle", 28); var ouc_init = this.methods["key(1)value(1)$build(3)"].call(this, null, var_k, var_v, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method key(_)value(_) this.methods["key(1)value(1)"] = func37; func37.methodName = "key(1)value(1)"; func37.paramCounts = [1, 1]; func37.paramNames = ["k", "v"]; func37.definitionLine = 28; func37.definitionModule = "equalityBundle"; var func38 = function(argcv, var_k, var_v, inheritingObject, aliases, exclusions) { // method key(_)value(_)$build(_,_,_), line 28 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("key(_)value(_)", 0, numArgs - 2); } var obj39_build = function(ignore, var_k, var_v, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_equalityBundle_28"); this.outer_equalityBundle_28 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(29); // compilenode yourself var initFun40 = selfRequest(this.outer_equalityBundle_28.outer_equalityBundle_25, "equality$build(3)", [null], this, [], []); // compileReuseCall this.data.key = undefined; var reader41_key = function() { // reader method key if (this.data.key === undefined) raiseUninitializedVariable("key"); return this.data.key; }; reader41_key.isDef = true; this.methods["key"] = reader41_key; this.data.value = undefined; var reader42_value = function() { // reader method value if (this.data.value === undefined) raiseUninitializedVariable("value"); return this.data.value; }; reader42_value.isDef = true; this.methods["value"] = reader42_value; var func43 = function(argcv) { // method asString, line 32 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("asString", 0, numArgs - 0); } setLineNumber(32); // compilenode string // call case 4: other requests var call46 = selfRequest(this, "value", [0]); // call case 4: other requests var string48 = new GraceString("::"); // call case 4: other requests var call50 = selfRequest(this, "key", [0]); // call case 4: other requests var concat49 = request(GraceEmptyString, "++(1)", [1], call50); var concat47 = request(concat49, "++(1)", [1], string48); var concat45 = request(concat47, "++(1)", [1], call46); var concat44 = request(concat45, "++(1)", [1], GraceEmptyString); return concat44; }; // end of method asString this.methods["asString"] = func43; func43.methodName = "asString"; func43.paramCounts = [0]; func43.paramNames = []; func43.definitionLine = 32; func43.definitionModule = "equalityBundle"; var func51 = function(argcv) { // method asDebugString, line 33 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("asDebugString", 0, numArgs - 0); } setLineNumber(33); // compilenode string // call case 4: other requests // call case 4: other requests var call55 = selfRequest(this, "value", [0]); var call54 = request(call55, "asDebugString", [0]); // call case 4: other requests var string57 = new GraceString("::"); // call case 4: other requests // call case 4: other requests var call60 = selfRequest(this, "key", [0]); var call59 = request(call60, "asDebugString", [0]); // call case 4: other requests var concat58 = request(GraceEmptyString, "++(1)", [1], call59); var concat56 = request(concat58, "++(1)", [1], string57); var concat53 = request(concat56, "++(1)", [1], call54); var concat52 = request(concat53, "++(1)", [1], GraceEmptyString); return concat52; }; // end of method asDebugString this.methods["asDebugString"] = func51; func51.methodName = "asDebugString"; func51.paramCounts = [0]; func51.paramNames = []; func51.definitionLine = 33; func51.definitionModule = "equalityBundle"; var func61 = function(argcv) { // method hash, line 34 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("hash", 0, numArgs - 0); } setLineNumber(34); // compilenode member // call case 4: other requests var call64 = selfRequest(this, "key", [0]); var call63 = request(call64, "hash", [0]); // call case 4: other requests var call66 = selfRequest(this, "value", [0]); var call65 = request(call66, "hash", [0]); // call case 4: other requests var call62 = request(var_intrinsic, "hashCombine(2)", [2], call63, call65); return call62; }; // end of method hash this.methods["hash"] = func61; func61.methodName = "hash"; func61.paramCounts = [0]; func61.paramNames = []; func61.definitionLine = 34; func61.definitionModule = "equalityBundle"; var func67 = function(argcv, var_other) { // method ==(_), line 35 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("==(_)", 0, numArgs - 1); } setLineNumber(36); // compilenode matchcase var cases68 = []; setLineNumber(37); // compilenode block var block69 = new GraceBlock(this, 37, 1); var call70 = selfRequest(var_$module, "Binding", [0]); block69.paramTypes = [call70]; var matches71 = function(var_o) { var call72 = selfRequest(var_$module, "Binding", [0]); if (!Grace_isTrue(request(call72, "matches(1)", [1], var_o))) return false; return true; }; block69.guard = matches71; block69.real = function block69(var_o) { setLineNumber(37); // compilenode member // call case 4: other requests var call75 = request(var_o, "value", [0]); // call case 4: other requests var call76 = selfRequest(this, "value", [0]); var term74 = request(call76, "==(1)", [1], call75); // call case 4: other requests // call case 4: other requests var call78 = request(var_o, "key", [0]); // call case 4: other requests var call79 = selfRequest(this, "key", [0]); var term77 = request(call79, "==(1)", [1], call78); var term73 = request(term77, "&&(1)", [1], term74); return term73; }; let applyMeth69 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth69.methodName = "apply(1)"; applyMeth69.paramCounts = [1]; applyMeth69.paramNames = ["o"]; applyMeth69.definitionLine = 37; applyMeth69.definitionModule = "equalityBundle"; block69.methods["apply(1)"] = applyMeth69; let matchesMeth69 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth69.methodName = "matches(1)"; matchesMeth69.paramCounts = [1]; matchesMeth69.paramNames = ["o"]; matchesMeth69.definitionLine = 37; matchesMeth69.definitionModule = "equalityBundle"; block69.methods["matches(1)"] = matchesMeth69; cases68.push(block69); setLineNumber(38); // compilenode block var block80 = new GraceBlock(this, 38, 0); block80.guard = jsTrue; block80.real = function block80() { setLineNumber(38); // compilenode member return GraceFalse; }; let applyMeth80 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth80.methodName = "apply"; applyMeth80.paramCounts = [0]; applyMeth80.paramNames = []; applyMeth80.definitionLine = 38; applyMeth80.definitionModule = "equalityBundle"; block80.methods["apply"] = applyMeth80; setLineNumber(36); // compilematchcase var matchres68 = matchCase(var_other,cases68,block80); return matchres68; }; // end of method ==(_) this.methods["==(1)"] = func67; func67.methodName = "==(1)"; func67.paramCounts = [1]; func67.paramNames = ["other"]; func67.definitionLine = 35; func67.definitionModule = "equalityBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 28; m.definitionModule = "equalityBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj39_init = function() { // init of object on line 28 this.data.key = var_k; this.data.value = var_v; }; return obj39_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj39_init = obj39_build.call(inheritingObject, null, var_k, var_v, this, aliases, exclusions); return obj39_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method key(_)value(_)$build(_,_,_) this.methods["key(1)value(1)$build(3)"] = func38; func38.methodName = "key(1)value(1)$build(3)"; func38.paramCounts = [1, 1]; func38.paramNames = ["k", "v"]; func38.definitionLine = 28; func38.definitionModule = "equalityBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 25; m.definitionModule = "equalityBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj34_init = function() { // init of object on line 25 }; return obj34_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj34_init = obj34_build.call(inheritingObject, null, this, aliases, exclusions, var_K, var_T); return obj34_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method binding$build(_,_,_) this.methods["binding$build(3)"] = func33; func33.methodName = "binding$build(3)"; func33.paramCounts = [0]; func33.paramNames = []; func33.typeParamNames = ["K", "T"]; func33.definitionLine = 25; func33.definitionModule = "equalityBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 8; m.definitionModule = "equalityBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj6_init = function() { // init of object on line 8 }; return obj6_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj6_init = obj6_build.call(inheritingObject, null, this, aliases, exclusions); return obj6_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method open$build(_,_,_) this.methods["open$build(3)"] = func5; func5.methodName = "open$build(3)"; func5.paramCounts = [0]; func5.paramNames = []; func5.definitionLine = 8; func5.definitionModule = "equalityBundle"; return this; } if (typeof global !== "undefined") global.gracecode_equalityBundle = gracecode_equalityBundle; if (typeof window !== "undefined") window.gracecode_equalityBundle = gracecode_equalityBundle; gracecode_equalityBundle.definitionModule = "equalityBundle"; gracecode_equalityBundle.sourceFile = gracecode_equalityBundle_sourceFile; gracecode_equalityBundle.sha256 = gracecode_equalityBundle_sha256; gracecode_equalityBundle.minigraceRevision = gracecode_equalityBundle_minigraceRevision; gracecode_equalityBundle.minigraceGeneration = gracecode_equalityBundle_minigraceGeneration; gracecode_equalityBundle.imports = [ ["intrinsic", "6e94e04bf55793f159478abdfb7bf89d7b49b4e53761ccc740bb1c62429755cc"], ["basicTypesBundle", "a92f82688bb1cc8115ef137253879a01af7417b0271f4c86a9044d2a72bb6f2c"] ]; gracecode_equalityBundle.definitionLine = 1;