UNPKG

minigrace

Version:

A compiler for the Grace programming language

922 lines (921 loc) 56 kB
let gracecode_pointBundle_sourceFile = "/Users/black/Development/mg/gracelang/minigrace/pointBundle.grace"; let gracecode_pointBundle_sha256 = "737fe26c1c204a35db5d1fef35aaad82abc24a00d2f7c645bbb8826ac54ca3a2"; let gracecode_pointBundle_minigraceRevision = "b57591d29fc5ee5270d114920bf671367b8c3ecb"; let gracecode_pointBundle_minigraceGeneration = "5171"; if (typeof gctCache !== "undefined") gctCache["pointBundle"] = "dialect:\nfreshScopes:\n $103 trait\n $105 trait\n $106 trait\n $107 trait\n $108\n $109\nmethodTypes:$108:\n *(other:Number) \u2192 Unknown\n /(other:Number) \u2192 Unknown\n distanceTo(other:Point) \u2192 Unknown\n dot(other:Point) \u2192 Number\n \u22c5(other:Point) \u2192 Number\nmodules:\n basicTypesBundle\n equalityBundle\n intrinsic\npath:\n /Users/black/Development/mg/gracelang/minigrace/pointBundle.grace\nscope:$103:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (req) $scopeUniv\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n hash Unknown (req) $scopeUniv\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:$104:\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 binding Unknown (mth) $106\n confidential Unknown (mth) $scope_done\n equality Unknown (mth) $103\n identityEquality Unknown (mth) $107\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n open Unknown (mth) $105\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:$105:\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n point2Dx(1)y(1) Unknown (mth) $108\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) $109\n myIdentityHash Number (go) $scope_number\nscope:$107:\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:$108:\n *(1) Unknown (mth) $scope_done\n +(1) Unknown (mth) $scope_done\n -(1) Unknown (mth) $scope_done\n /(1) Unknown (mth) $scope_done\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 distanceTo(1) Unknown (mth) $scope_done\n dot(1) Number (mth) $scope_done\n hash Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n length Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n norm Unknown (mth) $scope_done\n prefix- Unknown (mth) $scope_done\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n reverseDivideNumber(1) Unknown (mth) $scope_done\n reverseMinusNumber(1) Unknown (mth) $scope_done\n reversePlusNumber(1) Unknown (mth) $scope_done\n reverseTimesNumber(1) Unknown (mth) $scope_done\n x Unknown (def) $scopeEmpty readable\n y Unknown (def) $scopeEmpty readable\n \u2260(1) Unknown (mth) $scope_done\n \u22c5(1) Number (mth) $scope_done\nscope:$109:\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\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n value Unknown (def) $scopeEmpty\n \u2260(1) Unknown (mth) $scope_done\nself:\n $104\ntypes:\n"; if (typeof originalSourceLines !== "undefined") { originalSourceLines["pointBundle"] = [ "dialect \"none\"", "import \"intrinsic\" as intrinsic", "import \"basicTypesBundle\" as basicTypesBundle", "import \"equalityBundle\" as equalityBundle", "", "use equalityBundle.open", "use basicTypesBundle.open", "use intrinsic.annotations", "", "trait open {", "", " class point2Dx (x') y (y') {", " use equality", " def x is readable = x'", " def y is readable = y'", " method asString { \"({x}@{y})\" }", " method asDebugString { self.asString }", " method distanceTo(other:Point) {", " (((x - other.x)^2) + ((y - other.y)^2)).sqrt", " }", " method -(other) {", " match(other)", " case { o:Point -> point2Dx (x - o.x) y (y - o.y) }", " case { n:Number -> point2Dx (x - n) y (y - n) }", " else { other.reverseMinusPoint(self) }", " }", " method +(other) {", " match(other)", " case { o:Point -> point2Dx (x + o.x) y (y + o.y) }", " case { n:Number -> point2Dx (x + n) y (y + n) }", " else { other.reversePlusPoint(self) }", " }", " method /(other:Number) { point2Dx (x / other) y (y / other) }", " method *(other:Number) { point2Dx (x * other) y (y * other) }", " method length { ((x^2) + (y^2)).sqrt }", " method ==(other) {", " match (other)", " case { o:Point -> (x == o.x) && (y == o.y) }", " else { false }", " }", " method prefix - { point2Dx (-x) y (-y) }", " method dot (other:Point) -> Number {", " // dot product", " (x * other.x) + (y * other.y)", " }", " method ⋅ (other:Point) -> Number {", " // dot product", " (x * other.x) + (y * other.y)", " }", " method reverseTimesNumber(n) { point2Dx (n * x) y (n * y) }", " method reversePlusNumber(n) { point2Dx (n + x) y (n + y) }", " method reverseDivideNumber(n) { point2Dx (n / x) y (n / y) }", " method reverseMinusNumber(n) { point2Dx (n - x) y (n - y) }", " method norm { self / self.length }", " method hash { intrinsic.hashCombine(x.hash, y.hash) }", " }", "}" ]; } function gracecode_pointBundle() { importedModules["pointBundle"] = this; const var_$module = this; this.definitionModule = "pointBundle"; 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 = "pointBundle"; 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 = "pointBundle"; func1.debug = "import"; func1.confidential = true; setLineNumber(4); // compilenode import // Import of "equalityBundle" as equalityBundle if (typeof gracecode_equalityBundle == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module equalityBundle")); var var_equalityBundle = do_import("equalityBundle", gracecode_equalityBundle); var func2 = function(argcv) { // accessor method equalityBundle, line 4 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("equalityBundle", 0, numArgs - 0); return var_equalityBundle; }; // end of method equalityBundle this.methods["equalityBundle"] = func2; func2.methodName = "equalityBundle"; func2.paramCounts = [0]; func2.paramNames = []; func2.definitionLine = 4; func2.definitionModule = "pointBundle"; func2.debug = "import"; func2.confidential = true; this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pointBundle_1"); this.outer_pointBundle_1 = var_$dialect; setLineNumber(6); // reuse call var initFun3 = request(var_equalityBundle, "open$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(7); // reuse call var initFun4 = request(var_basicTypesBundle, "open$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(8); // reuse call var initFun5 = request(var_intrinsic, "annotations$build(3)", [null], this, [], []); // compileReuseCall var func6 = function(argcv) { // method open, line 10 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("open", 0, numArgs - 0); } var ouc = emptyGraceObject("open", "pointBundle", 10); 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"] = func6; func6.methodName = "open"; func6.paramCounts = [0]; func6.paramNames = []; func6.definitionLine = 10; func6.definitionModule = "pointBundle"; var func7 = function(argcv, inheritingObject, aliases, exclusions) { // method open$build(_,_,_), line 10 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("open", 0, numArgs - 0); } var obj8_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pointBundle_10"); this.outer_pointBundle_10 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; var func9 = function(argcv, var_x__39__, var_y__39__) { // method point2Dx(_)y(_), line 12 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("point2Dx(_)y(_)", 0, numArgs - 2); } var ouc = emptyGraceObject("open.point2Dx(_)y(_)", "pointBundle", 12); var ouc_init = this.methods["point2Dx(1)y(1)$build(3)"].call(this, null, var_x__39__, var_y__39__, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method point2Dx(_)y(_) this.methods["point2Dx(1)y(1)"] = func9; func9.methodName = "point2Dx(1)y(1)"; func9.paramCounts = [1, 1]; func9.paramNames = ["x'", "y'"]; func9.definitionLine = 12; func9.definitionModule = "pointBundle"; var func10 = function(argcv, var_x__39__, var_y__39__, inheritingObject, aliases, exclusions) { // method point2Dx(_)y(_)$build(_,_,_), line 12 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("point2Dx(_)y(_)", 0, numArgs - 2); } var obj11_build = function(ignore, var_x__39__, var_y__39__, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pointBundle_12"); this.outer_pointBundle_12 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(13); // reuse call var initFun12 = selfRequest(var_$module, "equality$build(3)", [null], this, [], []); // compileReuseCall this.data.x = undefined; var reader13_x = function() { // reader method x if (this.data.x === undefined) raiseUninitializedVariable("x"); return this.data.x; }; reader13_x.isDef = true; this.methods["x"] = reader13_x; this.data.y = undefined; var reader14_y = function() { // reader method y if (this.data.y === undefined) raiseUninitializedVariable("y"); return this.data.y; }; reader14_y.isDef = true; this.methods["y"] = reader14_y; var func15 = function(argcv) { // method asString, line 16 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("asString", 0, numArgs - 0); } setLineNumber(16); // compilenode string var string17 = new GraceString(")"); // call case 4: other requests var call19 = selfRequest(this, "y", [0]); // call case 4: other requests var string21 = new GraceString("@"); // call case 4: other requests var call23 = selfRequest(this, "x", [0]); // call case 4: other requests var string24 = new GraceString("("); var concat22 = request(string24, "++(1)", [1], call23); var concat20 = request(concat22, "++(1)", [1], string21); var concat18 = request(concat20, "++(1)", [1], call19); var concat16 = request(concat18, "++(1)", [1], string17); return concat16; }; // end of method asString this.methods["asString"] = func15; func15.methodName = "asString"; func15.paramCounts = [0]; func15.paramNames = []; func15.definitionLine = 16; func15.definitionModule = "pointBundle"; var func25 = function(argcv) { // method asDebugString, line 17 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("asDebugString", 0, numArgs - 0); } setLineNumber(17); // compilenode member var call26 = selfRequest(this, "asString", [0]); return call26; }; // end of method asDebugString this.methods["asDebugString"] = func25; func25.methodName = "asDebugString"; func25.paramCounts = [0]; func25.paramNames = []; func25.definitionLine = 17; func25.definitionModule = "pointBundle"; var func27 = function(argcv, var_other) { // method distanceTo(_), line 18 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("distanceTo(_)", 0, numArgs - 1); } setLineNumber(18); // compilenode member var call28 = selfRequest(var_$module, "Point", [0]); assertTypeOrMsg(var_other, call28, "argument to request of `distanceTo(_)`", "Point"); setLineNumber(19); // compilenode member // call case 4: other requests // call case 4: other requests // call case 4: other requests var call33 = request(var_other, "y", [0]); // call case 4: other requests var call34 = selfRequest(this, "y", [0]); var diff32 = request(call34, "-(1)", [1], call33); var term31 = request(diff32, "^(1)", [1], new GraceNum(2)); // call case 4: other requests // call case 4: other requests // call case 4: other requests var call37 = request(var_other, "x", [0]); // call case 4: other requests var call38 = selfRequest(this, "x", [0]); var diff36 = request(call38, "-(1)", [1], call37); var term35 = request(diff36, "^(1)", [1], new GraceNum(2)); var sum30 = request(term35, "+(1)", [1], term31); var call29 = request(sum30, "sqrt", [0]); return call29; }; // end of method distanceTo(_) setLineNumber(18); // compilenode member var call39 = selfRequest(var_$module, "Point", [0]); func27.paramTypes = [call39]; this.methods["distanceTo(1)"] = func27; func27.methodName = "distanceTo(1)"; func27.paramCounts = [1]; func27.paramNames = ["other"]; func27.definitionLine = 18; func27.definitionModule = "pointBundle"; var func40 = 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(22); // compilenode matchcase var cases41 = []; setLineNumber(23); // compilenode block var block42 = new GraceBlock(this, 23, 1); var call43 = selfRequest(var_$module, "Point", [0]); block42.paramTypes = [call43]; var matches44 = function(var_o) { var call45 = selfRequest(var_$module, "Point", [0]); if (!Grace_isTrue(request(call45, "matches(1)", [1], var_o))) return false; return true; }; block42.guard = matches44; block42.real = function block42(var_o) { setLineNumber(23); // compilenode member // call case 4: other requests var call48 = request(var_o, "x", [0]); // call case 4: other requests var call49 = selfRequest(this, "x", [0]); var diff47 = request(call49, "-(1)", [1], call48); // call case 4: other requests var call51 = request(var_o, "y", [0]); // call case 4: other requests var call52 = selfRequest(this, "y", [0]); var diff50 = request(call52, "-(1)", [1], call51); var call46 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], diff47, diff50); return call46; }; let applyMeth42 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth42.methodName = "apply(1)"; applyMeth42.paramCounts = [1]; applyMeth42.paramNames = ["o"]; applyMeth42.definitionLine = 23; applyMeth42.definitionModule = "pointBundle"; block42.methods["apply(1)"] = applyMeth42; let matchesMeth42 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth42.methodName = "matches(1)"; matchesMeth42.paramCounts = [1]; matchesMeth42.paramNames = ["o"]; matchesMeth42.definitionLine = 23; matchesMeth42.definitionModule = "pointBundle"; block42.methods["matches(1)"] = matchesMeth42; cases41.push(block42); setLineNumber(24); // compilenode block var block53 = new GraceBlock(this, 24, 1); var call54 = selfRequest(var_$module, "Number", [0]); block53.paramTypes = [call54]; var matches55 = function(var_n) { var call56 = selfRequest(var_$module, "Number", [0]); if (!Grace_isTrue(request(call56, "matches(1)", [1], var_n))) return false; return true; }; block53.guard = matches55; block53.real = function block53(var_n) { setLineNumber(24); // compilenode op // call case 4: other requests var call59 = selfRequest(this, "x", [0]); var diff58 = request(call59, "-(1)", [1], var_n); // call case 4: other requests var call61 = selfRequest(this, "y", [0]); var diff60 = request(call61, "-(1)", [1], var_n); var call57 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], diff58, diff60); return call57; }; let applyMeth53 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth53.methodName = "apply(1)"; applyMeth53.paramCounts = [1]; applyMeth53.paramNames = ["n"]; applyMeth53.definitionLine = 24; applyMeth53.definitionModule = "pointBundle"; block53.methods["apply(1)"] = applyMeth53; let matchesMeth53 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth53.methodName = "matches(1)"; matchesMeth53.paramCounts = [1]; matchesMeth53.paramNames = ["n"]; matchesMeth53.definitionLine = 24; matchesMeth53.definitionModule = "pointBundle"; block53.methods["matches(1)"] = matchesMeth53; cases41.push(block53); setLineNumber(25); // compilenode block var block62 = new GraceBlock(this, 25, 0); block62.guard = jsTrue; block62.real = function block62() { setLineNumber(25); // compilenode yourself // call case 4: other requests var call63 = request(var_other, "reverseMinusPoint(1)", [1], this); return call63; }; let applyMeth62 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth62.methodName = "apply"; applyMeth62.paramCounts = [0]; applyMeth62.paramNames = []; applyMeth62.definitionLine = 25; applyMeth62.definitionModule = "pointBundle"; block62.methods["apply"] = applyMeth62; setLineNumber(22); // compilematchcase var matchres41 = matchCase(var_other,cases41,block62); return matchres41; }; // end of method -(_) this.methods["-(1)"] = func40; func40.methodName = "-(1)"; func40.paramCounts = [1]; func40.paramNames = ["other"]; func40.definitionLine = 21; func40.definitionModule = "pointBundle"; var func64 = function(argcv, var_other) { // method +(_), line 27 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("+(_)", 0, numArgs - 1); } setLineNumber(28); // compilenode matchcase var cases65 = []; setLineNumber(29); // compilenode block var block66 = new GraceBlock(this, 29, 1); var call67 = selfRequest(var_$module, "Point", [0]); block66.paramTypes = [call67]; var matches68 = function(var_o) { var call69 = selfRequest(var_$module, "Point", [0]); if (!Grace_isTrue(request(call69, "matches(1)", [1], var_o))) return false; return true; }; block66.guard = matches68; block66.real = function block66(var_o) { setLineNumber(29); // compilenode member // call case 4: other requests var call72 = request(var_o, "x", [0]); // call case 4: other requests var call73 = selfRequest(this, "x", [0]); var sum71 = request(call73, "+(1)", [1], call72); // call case 4: other requests var call75 = request(var_o, "y", [0]); // call case 4: other requests var call76 = selfRequest(this, "y", [0]); var sum74 = request(call76, "+(1)", [1], call75); var call70 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], sum71, sum74); return call70; }; let applyMeth66 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth66.methodName = "apply(1)"; applyMeth66.paramCounts = [1]; applyMeth66.paramNames = ["o"]; applyMeth66.definitionLine = 29; applyMeth66.definitionModule = "pointBundle"; block66.methods["apply(1)"] = applyMeth66; let matchesMeth66 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth66.methodName = "matches(1)"; matchesMeth66.paramCounts = [1]; matchesMeth66.paramNames = ["o"]; matchesMeth66.definitionLine = 29; matchesMeth66.definitionModule = "pointBundle"; block66.methods["matches(1)"] = matchesMeth66; cases65.push(block66); setLineNumber(30); // compilenode block var block77 = new GraceBlock(this, 30, 1); var call78 = selfRequest(var_$module, "Number", [0]); block77.paramTypes = [call78]; var matches79 = function(var_n) { var call80 = selfRequest(var_$module, "Number", [0]); if (!Grace_isTrue(request(call80, "matches(1)", [1], var_n))) return false; return true; }; block77.guard = matches79; block77.real = function block77(var_n) { setLineNumber(30); // compilenode op // call case 4: other requests var call83 = selfRequest(this, "x", [0]); var sum82 = request(call83, "+(1)", [1], var_n); // call case 4: other requests var call85 = selfRequest(this, "y", [0]); var sum84 = request(call85, "+(1)", [1], var_n); var call81 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], sum82, sum84); return call81; }; let applyMeth77 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth77.methodName = "apply(1)"; applyMeth77.paramCounts = [1]; applyMeth77.paramNames = ["n"]; applyMeth77.definitionLine = 30; applyMeth77.definitionModule = "pointBundle"; block77.methods["apply(1)"] = applyMeth77; let matchesMeth77 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth77.methodName = "matches(1)"; matchesMeth77.paramCounts = [1]; matchesMeth77.paramNames = ["n"]; matchesMeth77.definitionLine = 30; matchesMeth77.definitionModule = "pointBundle"; block77.methods["matches(1)"] = matchesMeth77; cases65.push(block77); setLineNumber(31); // compilenode block var block86 = new GraceBlock(this, 31, 0); block86.guard = jsTrue; block86.real = function block86() { setLineNumber(31); // compilenode yourself // call case 4: other requests var call87 = request(var_other, "reversePlusPoint(1)", [1], this); return call87; }; let applyMeth86 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth86.methodName = "apply"; applyMeth86.paramCounts = [0]; applyMeth86.paramNames = []; applyMeth86.definitionLine = 31; applyMeth86.definitionModule = "pointBundle"; block86.methods["apply"] = applyMeth86; setLineNumber(28); // compilematchcase var matchres65 = matchCase(var_other,cases65,block86); return matchres65; }; // end of method +(_) this.methods["+(1)"] = func64; func64.methodName = "+(1)"; func64.paramCounts = [1]; func64.paramNames = ["other"]; func64.definitionLine = 27; func64.definitionModule = "pointBundle"; var func88 = function(argcv, var_other) { // method /(_), line 33 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("/(_)", 0, numArgs - 1); } setLineNumber(33); // compilenode member var call89 = selfRequest(var_$module, "Number", [0]); assertTypeOrMsg(var_other, call89, "argument to request of `/(_)`", "Number"); // call case 4: other requests var call92 = selfRequest(this, "x", [0]); var quotient91 = request(call92, "/(1)", [1], var_other); // call case 4: other requests var call94 = selfRequest(this, "y", [0]); var quotient93 = request(call94, "/(1)", [1], var_other); var call90 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], quotient91, quotient93); return call90; }; // end of method /(_) var call95 = selfRequest(var_$module, "Number", [0]); func88.paramTypes = [call95]; this.methods["/(1)"] = func88; func88.methodName = "/(1)"; func88.paramCounts = [1]; func88.paramNames = ["other"]; func88.definitionLine = 33; func88.definitionModule = "pointBundle"; var func96 = function(argcv, var_other) { // method *(_), line 34 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("*(_)", 0, numArgs - 1); } setLineNumber(34); // compilenode member var call97 = selfRequest(var_$module, "Number", [0]); assertTypeOrMsg(var_other, call97, "argument to request of `*(_)`", "Number"); // call case 4: other requests var call100 = selfRequest(this, "x", [0]); var prod99 = request(call100, "*(1)", [1], var_other); // call case 4: other requests var call102 = selfRequest(this, "y", [0]); var prod101 = request(call102, "*(1)", [1], var_other); var call98 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], prod99, prod101); return call98; }; // end of method *(_) var call103 = selfRequest(var_$module, "Number", [0]); func96.paramTypes = [call103]; this.methods["*(1)"] = func96; func96.methodName = "*(1)"; func96.paramCounts = [1]; func96.paramNames = ["other"]; func96.definitionLine = 34; func96.definitionModule = "pointBundle"; var func104 = function(argcv) { // method length, line 35 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("length", 0, numArgs - 0); } setLineNumber(35); // compilenode member // call case 4: other requests // call case 4: other requests var call108 = selfRequest(this, "y", [0]); var term107 = request(call108, "^(1)", [1], new GraceNum(2)); // call case 4: other requests // call case 4: other requests var call110 = selfRequest(this, "x", [0]); var term109 = request(call110, "^(1)", [1], new GraceNum(2)); var sum106 = request(term109, "+(1)", [1], term107); var call105 = request(sum106, "sqrt", [0]); return call105; }; // end of method length this.methods["length"] = func104; func104.methodName = "length"; func104.paramCounts = [0]; func104.paramNames = []; func104.definitionLine = 35; func104.definitionModule = "pointBundle"; var func111 = function(argcv, var_other) { // method ==(_), line 36 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("==(_)", 0, numArgs - 1); } setLineNumber(37); // compilenode matchcase var cases112 = []; setLineNumber(38); // compilenode block var block113 = new GraceBlock(this, 38, 1); var call114 = selfRequest(var_$module, "Point", [0]); block113.paramTypes = [call114]; var matches115 = function(var_o) { var call116 = selfRequest(var_$module, "Point", [0]); if (!Grace_isTrue(request(call116, "matches(1)", [1], var_o))) return false; return true; }; block113.guard = matches115; block113.real = function block113(var_o) { setLineNumber(38); // compilenode member // call case 4: other requests var call119 = request(var_o, "y", [0]); // call case 4: other requests var call120 = selfRequest(this, "y", [0]); var term118 = request(call120, "==(1)", [1], call119); // call case 4: other requests // call case 4: other requests var call122 = request(var_o, "x", [0]); // call case 4: other requests var call123 = selfRequest(this, "x", [0]); var term121 = request(call123, "==(1)", [1], call122); var term117 = request(term121, "&&(1)", [1], term118); return term117; }; let applyMeth113 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth113.methodName = "apply(1)"; applyMeth113.paramCounts = [1]; applyMeth113.paramNames = ["o"]; applyMeth113.definitionLine = 38; applyMeth113.definitionModule = "pointBundle"; block113.methods["apply(1)"] = applyMeth113; let matchesMeth113 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth113.methodName = "matches(1)"; matchesMeth113.paramCounts = [1]; matchesMeth113.paramNames = ["o"]; matchesMeth113.definitionLine = 38; matchesMeth113.definitionModule = "pointBundle"; block113.methods["matches(1)"] = matchesMeth113; cases112.push(block113); setLineNumber(39); // compilenode block var block124 = new GraceBlock(this, 39, 0); block124.guard = jsTrue; block124.real = function block124() { setLineNumber(39); // compilenode member return GraceFalse; }; let applyMeth124 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth124.methodName = "apply"; applyMeth124.paramCounts = [0]; applyMeth124.paramNames = []; applyMeth124.definitionLine = 39; applyMeth124.definitionModule = "pointBundle"; block124.methods["apply"] = applyMeth124; setLineNumber(37); // compilematchcase var matchres112 = matchCase(var_other,cases112,block124); return matchres112; }; // end of method ==(_) this.methods["==(1)"] = func111; func111.methodName = "==(1)"; func111.paramCounts = [1]; func111.paramNames = ["other"]; func111.definitionLine = 36; func111.definitionModule = "pointBundle"; var func126 = function(argcv) { // method prefix-, line 41 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("prefix-", 0, numArgs - 0); } setLineNumber(41); // compilenode call // call case 4: other requests var call129 = selfRequest(this, "x", [0]); var call128 = request(call129, "prefix-", [0]); // call case 4: other requests var call131 = selfRequest(this, "y", [0]); var call130 = request(call131, "prefix-", [0]); var call127 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], call128, call130); return call127; }; // end of method prefix- this.methods["prefix-"] = func126; func126.methodName = "prefix-"; func126.paramCounts = [0]; func126.paramNames = []; func126.definitionLine = 41; func126.definitionModule = "pointBundle"; var func132 = function(argcv, var_other) { // method dot(_), line 42 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("dot(_)", 0, numArgs - 1); } setLineNumber(42); // compilenode member var call133 = selfRequest(var_$module, "Point", [0]); assertTypeOrMsg(var_other, call133, "argument to request of `dot(_)`", "Point"); setLineNumber(44); // compilenode member // call case 4: other requests var call136 = request(var_other, "y", [0]); // call case 4: other requests var call137 = selfRequest(this, "y", [0]); var prod135 = request(call137, "*(1)", [1], call136); // call case 4: other requests // call case 4: other requests var call139 = request(var_other, "x", [0]); // call case 4: other requests var call140 = selfRequest(this, "x", [0]); var prod138 = request(call140, "*(1)", [1], call139); var sum134 = request(prod138, "+(1)", [1], prod135); setLineNumber(42); // compilenode member var call141 = selfRequest(var_$module, "Number", [0]); setLineNumber(44); // typecheck assertTypeOrMsg(sum134, call141, "result of method dot(_)", "Number"); return sum134; }; // end of method dot(_) setLineNumber(42); // compilenode member var call142 = selfRequest(var_$module, "Point", [0]); func132.paramTypes = [call142]; var call143 = selfRequest(var_$module, "Number", [0]); func132.returnType = call143; this.methods["dot(1)"] = func132; func132.methodName = "dot(1)"; func132.paramCounts = [1]; func132.paramNames = ["other"]; func132.definitionLine = 42; func132.definitionModule = "pointBundle"; var func144 = function(argcv, var_other) { // method ⋅(_), line 46 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("⋅(_)", 0, numArgs - 1); } setLineNumber(46); // compilenode member var call145 = selfRequest(var_$module, "Point", [0]); assertTypeOrMsg(var_other, call145, "argument to request of `⋅(_)`", "Point"); setLineNumber(48); // compilenode member // call case 4: other requests var call148 = request(var_other, "y", [0]); // call case 4: other requests var call149 = selfRequest(this, "y", [0]); var prod147 = request(call149, "*(1)", [1], call148); // call case 4: other requests // call case 4: other requests var call151 = request(var_other, "x", [0]); // call case 4: other requests var call152 = selfRequest(this, "x", [0]); var prod150 = request(call152, "*(1)", [1], call151); var sum146 = request(prod150, "+(1)", [1], prod147); setLineNumber(46); // compilenode member var call153 = selfRequest(var_$module, "Number", [0]); setLineNumber(48); // typecheck assertTypeOrMsg(sum146, call153, "result of method ⋅(_)", "Number"); return sum146; }; // end of method ⋅(_) setLineNumber(46); // compilenode member var call154 = selfRequest(var_$module, "Point", [0]); func144.paramTypes = [call154]; var call155 = selfRequest(var_$module, "Number", [0]); func144.returnType = call155; this.methods["\u22c5(1)"] = func144; func144.methodName = "\u22c5(1)"; func144.paramCounts = [1]; func144.paramNames = ["other"]; func144.definitionLine = 46; func144.definitionModule = "pointBundle"; var func156 = function(argcv, var_n) { // method reverseTimesNumber(_), line 50 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("reverseTimesNumber(_)", 0, numArgs - 1); } setLineNumber(50); // compilenode member var call159 = selfRequest(this, "x", [0]); // call case 4: other requests var prod158 = request(var_n, "*(1)", [1], call159); var call161 = selfRequest(this, "y", [0]); // call case 4: other requests var prod160 = request(var_n, "*(1)", [1], call161); var call157 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], prod158, prod160); return call157; }; // end of method reverseTimesNumber(_) this.methods["reverseTimesNumber(1)"] = func156; func156.methodName = "reverseTimesNumber(1)"; func156.paramCounts = [1]; func156.paramNames = ["n"]; func156.definitionLine = 50; func156.definitionModule = "pointBundle"; var func162 = function(argcv, var_n) { // method reversePlusNumber(_), line 51 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("reversePlusNumber(_)", 0, numArgs - 1); } setLineNumber(51); // compilenode member var call165 = selfRequest(this, "x", [0]); // call case 4: other requests var sum164 = request(var_n, "+(1)", [1], call165); var call167 = selfRequest(this, "y", [0]); // call case 4: other requests var sum166 = request(var_n, "+(1)", [1], call167); var call163 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], sum164, sum166); return call163; }; // end of method reversePlusNumber(_) this.methods["reversePlusNumber(1)"] = func162; func162.methodName = "reversePlusNumber(1)"; func162.paramCounts = [1]; func162.paramNames = ["n"]; func162.definitionLine = 51; func162.definitionModule = "pointBundle"; var func168 = function(argcv, var_n) { // method reverseDivideNumber(_), line 52 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("reverseDivideNumber(_)", 0, numArgs - 1); } setLineNumber(52); // compilenode member var call171 = selfRequest(this, "x", [0]); // call case 4: other requests var quotient170 = request(var_n, "/(1)", [1], call171); var call173 = selfRequest(this, "y", [0]); // call case 4: other requests var quotient172 = request(var_n, "/(1)", [1], call173); var call169 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], quotient170, quotient172); return call169; }; // end of method reverseDivideNumber(_) this.methods["reverseDivideNumber(1)"] = func168; func168.methodName = "reverseDivideNumber(1)"; func168.paramCounts = [1]; func168.paramNames = ["n"]; func168.definitionLine = 52; func168.definitionModule = "pointBundle"; var func174 = function(argcv, var_n) { // method reverseMinusNumber(_), line 53 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("reverseMinusNumber(_)", 0, numArgs - 1); } setLineNumber(53); // compilenode member var call177 = selfRequest(this, "x", [0]); // call case 4: other requests var diff176 = request(var_n, "-(1)", [1], call177); var call179 = selfRequest(this, "y", [0]); // call case 4: other requests var diff178 = request(var_n, "-(1)", [1], call179); var call175 = selfRequest(this.outer_pointBundle_12, "point2Dx(1)y(1)", [1, 1], diff176, diff178); return call175; }; // end of method reverseMinusNumber(_) this.methods["reverseMinusNumber(1)"] = func174; func174.methodName = "reverseMinusNumber(1)"; func174.paramCounts = [1]; func174.paramNames = ["n"]; func174.definitionLine = 53; func174.definitionModule = "pointBundle";