UNPKG

minigrace

Version:

A compiler for the Grace programming language

812 lines (811 loc) 79 kB
let gracecode_standardBundle_sourceFile = "/Users/black/Development/mg/gracelang/minigrace/standardBundle.grace"; let gracecode_standardBundle_sha256 = "7ae97ce42c7998e5a88e547ed5704778c1ad144f1af9834b3470064b36ee0799"; let gracecode_standardBundle_minigraceRevision = "b57591d29fc5ee5270d114920bf671367b8c3ecb"; let gracecode_standardBundle_minigraceGeneration = "5171"; if (typeof gctCache !== "undefined") gctCache["standardBundle"] = "dialect:\nfreshScopes:\n $106 trait\n $107 trait\n $108 trait\n $110 trait\n $111 trait\n $112 trait\n $113\n $114\n $115 trait\n $116 trait\n $117 trait\n $118\n $119 trait\n $121\nmodules:\n basicTypesBundle\n collections\n intrinsic\n pattern+typeBundle\n pointBundle\npath:\n /Users/black/Development/mg/gracelang/minigrace/standardBundle.grace\nscope:$106:\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 isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\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 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 isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$109:\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 open Unknown (mth) $110\nscope:$110:\n AndPattern(2) Unknown (mth) $112\n AndType(2) Unknown (mth) $113\n BarType(2) Unknown (mth) $114\n BasePattern Unknown (mth) $106\n BaseType Unknown (mth) $115\n Binding type\n Boolean type\n BoundsError Unknown (mth) $scope_done\n Collection type\n CollectionFactory type\n ConcurrentModification Unknown (mth) $scope_done\n DialectError Unknown (mth) $scope_done\n Dictionary type\n Done type\n Enumerable type\n EnvironmentException Unknown (mth) $scope_done\n EqualityObject type\n Exception Unknown (mth) $scope_done\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 IteratorExhausted Unknown (mth) $scope_done\n List type\n NoSuchMethod Unknown (mth) $scope_done\n NoSuchObject Unknown (mth) $scope_done\n None type\n NotPattern(1) Unknown (mth) $116\n Number type\n Object type\n OrPattern(2) Unknown (mth) $117\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 ProgrammingError Unknown (mth) $scope_done\n RequestError Unknown (mth) $scope_done\n ResourceException Unknown (mth) $scope_done\n RuntimeError Unknown (mth) $scope_done\n SelfType type\n Sequence type\n Sequenceable type\n Set type\n Signature type\n Sink type\n String type\n SubobjectResponsibility Unknown (mth) $scope_done\n Type type\n TypeError Unknown (mth) $scope_done\n TypeExclusion(2) Unknown (mth) $118\n TypeIntersection(2) Unknown (mth) $scope_done\n TypeVariant(2) Unknown (mth) $scope_done\n UnimplementedMethod Unknown (mth) $scope_done\n UninitializedVariable Unknown (mth) $scope_done\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) $scope_done\n collection Unknown (mth) $scope_done\n confidential Unknown (mth) $scope_done\n dictionary Unknown (mth) $scope_done\n dictionary(1) Unknown (mth) $scope_done\n do(1)while(1) Unknown (mth) $scope_done\n done Unknown (mth) $scope_done\n enumerable Unknown (mth) $scope_done\n equality Unknown (mth) $119\n for(1)and(1)do(1) Unknown (mth) $scope_done\n for(1)do(1) Unknown (mth) $scope_done\n hashCombine(2) Unknown (mth) $scope_done\n identityEquality Unknown (mth) $107\n indexable Unknown (mth) $scope_done\n infinity Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n list Unknown (mth) $scope_done\n list(1) Unknown (mth) $scope_done\n max(2) Unknown (mth) $scope_done\n min(2) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n override Unknown (mth) $scope_done\n pi Unknown (mth) $scope_done\n point2Dx(1)y(1) Unknown (mth) $121\n primitiveArray Unknown (mth) $120\n public Unknown (mth) $scope_done\n range Unknown (mth) $scope_done\n readable Unknown (mth) $scope_done\n repeat(1)times(1) Unknown (mth) $scope_done\n required Unknown (mth) $scope_done\n sequence Unknown (mth) $scope_done\n sequence(1) Unknown (mth) $scope_done\n set Unknown (mth) $scope_done\n set(1) Unknown (mth) $scope_done\n singleton Unknown (mth) $108\n singleton(1) Unknown (mth) $111\n valueOf(1) Unknown (mth) $scope_done\n while(1)do(1) Unknown (mth) $scope_done\n writable Unknown (mth) $scope_done\n \u03c0 Unknown (mth) $scope_done\nscope:$111:\n &(1) Unknown (mth) $scope_done\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\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 isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$112:\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 isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\nscope:$113:\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 hash Unknown (mth) $scope_done\n interfaces Unknown (def) $scope_done\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (var) $scopeEmpty\n name:=(1) Unknown (var) $scopeEmpty\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$114:\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 String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (mth) $scope_done\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (var) $scopeEmpty\n name:=(1) Unknown (var) $scopeEmpty\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$115:\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 String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (req) $scopeUniv\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (req) $scopeUniv\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (req) $scopeUniv\n name:=(1) Unknown (req) $scopeUniv\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$116:\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 isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\nscope:$117:\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 isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\nscope:$118:\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 String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (mth) $scope_done\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (req) $scopeUniv\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (var) $scopeEmpty\n name:=(1) Unknown (var) $scopeEmpty\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$119:\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:$120:\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 new(1) Unknown (mth) $scope_done\nscope:$121:\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\n y Unknown (def) $scopeEmpty\n \u2260(1) Unknown (mth) $scope_done\n \u22c5(1) Number (mth) $scope_done\nself:\n $109\ntypedec:$110.Collection:\n type Collection\u27e6T\u27e7 = collections.Collection\u27e6T\u27e7\ntypedec:$110.Dictionary:\n type Dictionary\u27e6K, T\u27e7 = collections.Dictionary\u27e6K, T\u27e7\ntypedec:$110.List:\n type List\u27e6T\u27e7 = collections.List\u27e6T\u27e7\ntypedec:$110.Set:\n type Set\u27e6T\u27e7 = collections.Set\u27e6T\u27e7\ntypes:\n $110.Collection\n $110.Dictionary\n $110.List\n $110.Set\n"; if (typeof originalSourceLines !== "undefined") { originalSourceLines["standardBundle"] = [ "dialect \"none\"", "import \"intrinsic\" as intrinsic", "import \"basicTypesBundle\" as basicTypesBundle", "import \"collections\" as collections", "import \"pattern+typeBundle\" as patternAndTypeBundle", "import \"pointBundle\" as pointBundle", "", "trait open {", " use basicTypesBundle.open", " use patternAndTypeBundle.open", " use intrinsic.controlStructures", " use intrinsic.constants", " use intrinsic.annotations", " use pointBundle.open", "", " method do(action)while(condition) {", " self.while {", " action.apply", " condition.apply", " } do { }", " }", "", " method repeat(n)times(action) {", " if (n.isInteger.not) then {", " self.ProgrammingError.raise \"you can't repeat {n} times, because {n} is not an integer\"", " }", " var ix := n", " self.while {ix > 0} do {", " ix := ix - 1", " action.apply", " }", " }", "", " method for (collection) do (block) {", " collection.do(block)", " }", "", " method for (cs) and (ds) do (action) {", " def dIter = ds.iterator", " cs.do { c ->", " if (dIter.hasNext) then {", " action.apply(c, dIter.next)", " } else {", " return", " }", " }", " }", "", " method min(a, b) {", " if (a < b) then { a } else { b }", " }", "", " method max(a, b) {", " if (a > b) then { a } else { b }", " }", "", " method valueOf (nullaryBlock) {", " nullaryBlock.apply", " }", "", " trait singleton {", " use BasePattern", " use identityEquality", " method matches(other) { self.isMe(other) }", " }", "", " trait singleton (nameString) {", " use singleton", " method asString { nameString }", " }", "", " type Collection⟦T⟧ = collections.Collection⟦T⟧", " // type Sequence⟦T⟧ is defined in basicTypeBundle", " type List⟦T⟧ = collections.List⟦T⟧", " type Set⟦T⟧ = collections.Set⟦T⟧", " type Dictionary⟦K,T⟧ = collections.Dictionary⟦K,T⟧", "", " once method BoundsError { collections.BoundsError }", " once method IteratorExhausted { collections.IteratorExhausted }", " once method NoSuchObject { collections.NoSuchObject }", " once method RequestError { collections.RequestError }", " once method SubobjectResponsibility { collections.SubobjectResponsibility }", " once method ConcurrentModification { collections.ConcurrentModification }", " once method UninitializedVariable { self.ProgrammingError.refine \"UninitializedVariable\" }", "", " once method π { 3.141592653589793 }", " once method pi { π }", "", " method collection⟦T⟧ { collections.collection⟦T⟧ }", " method enumerable⟦T⟧ { collections.enumerable⟦T⟧ }", " method indexable⟦T⟧ { collections.indexable⟦T⟧ }", "", " method sequence⟦T⟧ { collections.sequence⟦T⟧ }", " method sequence⟦T⟧(arg) { collections.sequence⟦T⟧.withAll(arg) }", "", " method list⟦T⟧ { collections.list⟦T⟧ }", " method list⟦T⟧(arg) { collections.list⟦T⟧.withAll(arg) }", "", " method set⟦T⟧ { collections.set⟦T⟧ }", " method set⟦T⟧(arg) { collections.set⟦T⟧.withAll(arg) }", "", " method dictionary⟦K, T⟧ { collections.dictionary⟦K, T⟧ }", " method dictionary⟦K, T⟧(arg) { collections.dictionary⟦K, T⟧.withAll(arg) }", "", " once method binding { collections.binding }", " once method range { collections.range }", "", " method hashCombine(h1, h2) { intrinsic.hashCombine(h1, h2) }", "", "}" ]; } function gracecode_standardBundle() { importedModules["standardBundle"] = this; const var_$module = this; this.definitionModule = "standardBundle"; 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 = "standardBundle"; 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 = "standardBundle"; func1.debug = "import"; func1.confidential = true; setLineNumber(4); // compilenode import // Import of "collections" as collections if (typeof gracecode_collections == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module collections")); var var_collections = do_import("collections", gracecode_collections); var func2 = function(argcv) { // accessor method collections, line 4 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("collections", 0, numArgs - 0); return var_collections; }; // end of method collections this.methods["collections"] = func2; func2.methodName = "collections"; func2.paramCounts = [0]; func2.paramNames = []; func2.definitionLine = 4; func2.definitionModule = "standardBundle"; func2.debug = "import"; func2.confidential = true; setLineNumber(5); // compilenode import // Import of "pattern+typeBundle" as patternAndTypeBundle if (typeof gracecode_pattern__43__typeBundle == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module pattern+typeBundle")); var var_patternAndTypeBundle = do_import("pattern+typeBundle", gracecode_pattern__43__typeBundle); var func3 = function(argcv) { // accessor method patternAndTypeBundle, line 5 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("patternAndTypeBundle", 0, numArgs - 0); return var_patternAndTypeBundle; }; // end of method patternAndTypeBundle this.methods["patternAndTypeBundle"] = func3; func3.methodName = "patternAndTypeBundle"; func3.paramCounts = [0]; func3.paramNames = []; func3.definitionLine = 5; func3.definitionModule = "standardBundle"; func3.debug = "import"; func3.confidential = true; setLineNumber(6); // compilenode import // Import of "pointBundle" as pointBundle if (typeof gracecode_pointBundle == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module pointBundle")); var var_pointBundle = do_import("pointBundle", gracecode_pointBundle); var func4 = function(argcv) { // accessor method pointBundle, line 6 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("pointBundle", 0, numArgs - 0); return var_pointBundle; }; // end of method pointBundle this.methods["pointBundle"] = func4; func4.methodName = "pointBundle"; func4.paramCounts = [0]; func4.paramNames = []; func4.definitionLine = 6; func4.definitionModule = "standardBundle"; func4.debug = "import"; func4.confidential = true; this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_standardBundle_1"); this.outer_standardBundle_1 = var_$dialect; var func5 = 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", "standardBundle", 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"] = func5; func5.methodName = "open"; func5.paramCounts = [0]; func5.paramNames = []; func5.definitionLine = 8; func5.definitionModule = "standardBundle"; var func6 = 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 obj7_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_standardBundle_8"); this.outer_standardBundle_8 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(9); // reuse call var initFun8 = request(var_basicTypesBundle, "open$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(10); // reuse call var initFun9 = request(var_patternAndTypeBundle, "open$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(11); // reuse call var initFun10 = request(var_intrinsic, "controlStructures$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(12); // reuse call var initFun11 = request(var_intrinsic, "constants$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(13); // reuse call var initFun12 = request(var_intrinsic, "annotations$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(14); // reuse call var initFun13 = request(var_pointBundle, "open$build(3)", [null], this, [], []); // compileReuseCall var func14 = function(argcv, var_action, var_condition) { // method do(_)while(_), line 16 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("do(_)while(_)", 0, numArgs - 2); } setLineNumber(17); // compilenode block var block16 = new GraceBlock(this, 17, 0); block16.guard = jsTrue; block16.real = function block16() { setLineNumber(18); // compilenode member // call case 4: other requests var call17 = request(var_action, "apply", [0]); setLineNumber(19); // compilenode member // call case 4: other requests var call18 = request(var_condition, "apply", [0]); return call18; }; let applyMeth16 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth16.methodName = "apply"; applyMeth16.paramCounts = [0]; applyMeth16.paramNames = []; applyMeth16.definitionLine = 17; applyMeth16.definitionModule = "standardBundle"; block16.methods["apply"] = applyMeth16; setLineNumber(20); // compilenode block var block19 = new GraceBlock(this, 20, 0); block19.guard = jsTrue; block19.real = function block19() { setLineNumber(20); // compileBlock return GraceDone; }; let applyMeth19 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth19.methodName = "apply"; applyMeth19.paramCounts = [0]; applyMeth19.paramNames = []; applyMeth19.definitionLine = 20; applyMeth19.definitionModule = "standardBundle"; block19.methods["apply"] = applyMeth19; var call15 = selfRequest(this, "while(1)do(1)", [1, 1], block16, block19); return call15; }; // end of method do(_)while(_) this.methods["do(1)while(1)"] = func14; func14.methodName = "do(1)while(1)"; func14.paramCounts = [1, 1]; func14.paramNames = ["action", "condition"]; func14.definitionLine = 16; func14.definitionModule = "standardBundle"; var func20 = function(argcv, var_n, var_action) { // method repeat(_)times(_), line 23 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("repeat(_)times(_)", 0, numArgs - 2); } var if21 = GraceDone; setLineNumber(24); // compilenode member // call case 4: other requests // call case 4: other requests var call23 = request(var_n, "isInteger", [0]); var call22 = request(call23, "not", [0]); if (Grace_isTrue(call22)) { setLineNumber(25); // compilenode string var string26 = new GraceString(" is not an integer"); // call case 4: other requests // call case 4: other requests var string29 = new GraceString(" times, because "); // call case 4: other requests // call case 4: other requests var string31 = new GraceString("you can't repeat "); var concat30 = request(string31, "++(1)", [1], var_n); var concat28 = request(concat30, "++(1)", [1], string29); var concat27 = request(concat28, "++(1)", [1], var_n); var concat25 = request(concat27, "++(1)", [1], string26); // call case 4: other requests var call32 = selfRequest(this, "ProgrammingError", [0]); var call24 = request(call32, "raise(1)", [1], concat25); if21 = call24; } setLineNumber(27); // compilenode vardec var var_ix = var_n; setLineNumber(28); // compilenode block var block34 = new GraceBlock(this, 28, 0); block34.guard = jsTrue; block34.real = function block34() { setLineNumber(28); // compilenode num // call case 4: other requests if (var_ix === undefined) raiseUninitializedVariable("ix"); var term35 = request(var_ix, ">(1)", [1], new GraceNum(0)); return term35; }; let applyMeth34 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth34.methodName = "apply"; applyMeth34.paramCounts = [0]; applyMeth34.paramNames = []; applyMeth34.definitionLine = 28; applyMeth34.definitionModule = "standardBundle"; block34.methods["apply"] = applyMeth34; var block36 = new GraceBlock(this, 28, 0); block36.guard = jsTrue; block36.real = function block36() { setLineNumber(29); // compilenode num // call case 4: other requests if (var_ix === undefined) raiseUninitializedVariable("ix"); var diff37 = request(var_ix, "-(1)", [1], new GraceNum(1)); var_ix = diff37; setLineNumber(30); // compilenode member // call case 4: other requests var call38 = request(var_action, "apply", [0]); return call38; }; let applyMeth36 = function apply (argcv) { return this.real.apply(this.receiver); }; applyMeth36.methodName = "apply"; applyMeth36.paramCounts = [0]; applyMeth36.paramNames = []; applyMeth36.definitionLine = 28; applyMeth36.definitionModule = "standardBundle"; block36.methods["apply"] = applyMeth36; var call33 = selfRequest(this, "while(1)do(1)", [1, 1], block34, block36); return call33; }; // end of method repeat(_)times(_) this.methods["repeat(1)times(1)"] = func20; func20.methodName = "repeat(1)times(1)"; func20.paramCounts = [1, 1]; func20.paramNames = ["n", "action"]; func20.definitionLine = 23; func20.definitionModule = "standardBundle"; var func39 = function(argcv, var_collection, var_block) { // method for(_)do(_), line 34 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("for(_)do(_)", 0, numArgs - 2); } setLineNumber(35); // compilenode call // call case 4: other requests var call40 = request(var_collection, "do(1)", [1], var_block); return call40; }; // end of method for(_)do(_) this.methods["for(1)do(1)"] = func39; func39.methodName = "for(1)do(1)"; func39.paramCounts = [1, 1]; func39.paramNames = ["collection", "block"]; func39.definitionLine = 34; func39.definitionModule = "standardBundle"; var func41 = function(argcv, var_cs, var_ds, var_action) { // method for(_)and(_)do(_), line 38 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 3) && (numArgs !== 3)) { raiseTypeArgError("for(_)and(_)do(_)", 0, numArgs - 3); } setLineNumber(39); // compilenode member // call case 4: other requests var call42 = request(var_ds, "iterator", [0]); var var_dIter = call42; setLineNumber(40); // compilenode block var block44 = new GraceBlock(this, 40, 1); block44.guard = jsTrue; block44.real = function block44(var_c) { var if45 = GraceDone; setLineNumber(41); // compilenode member // call case 4: other requests if (var_dIter === undefined) raiseUninitializedVariable("dIter"); var call46 = request(var_dIter, "hasNext", [0]); if (Grace_isTrue(call46)) { setLineNumber(42); // compilenode member // call case 4: other requests if (var_dIter === undefined) raiseUninitializedVariable("dIter"); var call48 = request(var_dIter, "next", [0]); // call case 4: other requests var call47 = request(var_action, "apply(2)", [2], var_c, call48); if45 = call47; } else { setLineNumber(44); // compilenode return var call49 = selfRequest(this, "done", [0]); throw new ReturnException(call49, returnTarget); } return if45; }; let applyMeth44 = function apply_1 (argcv, ...args) { if (this.guard.apply(this.receiver, args)) return this.real.apply(this.receiver, args); badBlockArgs.apply(this, args); }; applyMeth44.methodName = "apply(1)"; applyMeth44.paramCounts = [1]; applyMeth44.paramNames = ["c"]; applyMeth44.definitionLine = 40; applyMeth44.definitionModule = "standardBundle"; block44.methods["apply(1)"] = applyMeth44; let matchesMeth44 = function matches_1 (argcv, ...args) { return this.guard.apply(this.receiver, args) ? GraceTrue : GraceFalse; }; matchesMeth44.methodName = "matches(1)"; matchesMeth44.paramCounts = [1]; matchesMeth44.paramNames = ["c"]; matchesMeth44.definitionLine = 40; matchesMeth44.definitionModule = "standardBundle"; block44.methods["matches(1)"] = matchesMeth44; // call case 4: other requests var call43 = request(var_cs, "do(1)", [1], block44); return call43; }; // end of method for(_)and(_)do(_) this.methods["for(1)and(1)do(1)"] = func41; func41.methodName = "for(1)and(1)do(1)"; func41.paramCounts = [1, 1, 1]; func41.paramNames = ["cs", "ds", "action"]; func41.definitionLine = 38; func41.definitionModule = "standardBundle"; var func50 = function(argcv, var_a, var_b) { // method min(_,_), line 49 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("min(_,_)", 0, numArgs - 2); } var if51 = GraceDone; setLineNumber(50); // compilenode op // call case 4: other requests var term52 = request(var_a, "<(1)", [1], var_b); if (Grace_isTrue(term52)) { if51 = var_a; } else { if51 = var_b; } return if51; }; // end of method min(_,_) this.methods["min(2)"] = func50; func50.methodName = "min(2)"; func50.paramCounts = [2]; func50.paramNames = ["a", "b"]; func50.definitionLine = 49; func50.definitionModule = "standardBundle"; var func53 = function(argcv, var_a, var_b) { // method max(_,_), line 53 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("max(_,_)", 0, numArgs - 2); } var if54 = GraceDone; setLineNumber(54); // compilenode op // call case 4: other requests var term55 = request(var_a, ">(1)", [1], var_b); if (Grace_isTrue(term55)) { if54 = var_a; } else { if54 = var_b; } return if54; }; // end of method max(_,_) this.methods["max(2)"] = func53; func53.methodName = "max(2)"; func53.paramCounts = [2]; func53.paramNames = ["a", "b"]; func53.definitionLine = 53; func53.definitionModule = "standardBundle"; var func56 = function(argcv, var_nullaryBlock) { // method valueOf(_), line 57 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("valueOf(_)", 0, numArgs - 1); } setLineNumber(58); // compilenode member // call case 4: other requests var call57 = request(var_nullaryBlock, "apply", [0]); return call57; }; // end of method valueOf(_) this.methods["valueOf(1)"] = func56; func56.methodName = "valueOf(1)"; func56.paramCounts = [1]; func56.paramNames = ["nullaryBlock"]; func56.definitionLine = 57; func56.definitionModule = "standardBundle"; var func58 = function(argcv) { // method singleton, line 61 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("singleton", 0, numArgs - 0); } var ouc = emptyGraceObject("open.singleton", "standardBundle", 61); var ouc_init = this.methods["singleton$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method singleton this.methods["singleton"] = func58; func58.methodName = "singleton"; func58.paramCounts = [0]; func58.paramNames = []; func58.definitionLine = 61; func58.definitionModule = "standardBundle"; var func59 = function(argcv, inheritingObject, aliases, exclusions) { // method singleton$build(_,_,_), line 61 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("singleton", 0, numArgs - 0); } var obj60_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_standardBundle_61"); this.outer_standardBundle_61 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(62); // compilenode yourself var initFun61 = selfRequest(this.outer_standardBundle_61, "BasePattern$build(3)", [null], this, [], []); // compileReuseCall setLineNumber(63); // compilenode yourself var initFun62 = selfRequest(this.outer_standardBundle_61, "identityEquality$build(3)", [null], this, [], []); // compileReuseCall var func63 = function(argcv, var_other) { // method matches(_), line 64 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("matches(_)", 0, numArgs - 1); } setLineNumber(64); // compilenode call var call64 = selfRequest(this, "isMe(1)", [1], var_other); return call64; }; // end of method matches(_) this.methods["matches(1)"] = func63; func63.methodName = "matches(1)"; func63.paramCounts = [1]; func63.paramNames = ["other"]; func63.definitionLine = 64; func63.definitionModule = "standardBundle"; 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 = 61; m.definitionModule = "standardBundle"; 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 obj60_init = function() { // init of object on line 61 }; return obj60_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj60_init = obj60_build.call(inheritingObject, null, this, aliases, exclusions); return obj60_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method singleton$build(_,_,_) this.methods["singleton$build(3)"] = func59; func59.methodName = "singleton$build(3)"; func59.paramCounts = [0]; func59.paramNames = []; func59.definitionLine = 61; func59.definitionModule = "standardBundle"; var func65 = function(argcv, var_nameString) { // method singleton(_), line 67 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("singleton(_)", 0, numArgs - 1); } var ouc = emptyGraceObject("open.singleton(_)", "standardBundle", 67); var ouc_init = this.methods["singleton(1)$build(3)"].call(this, null, var_nameString, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method singleton(_) this.methods["singleton(1)"] = func65; func65.methodName = "singleton(1)"; func65.paramCounts = [1]; func65.paramNames = ["nameString"]; func65.definitionLine = 67; func65.definitionModule = "standardBundle"; var func66 = function(argcv, var_nameString, inheritingObject, aliases, exclusions) { // method singleton(_)$build(_,_,_), line 67 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("singleton(_)", 0, numArgs - 1); } var obj67_build = function(ignore, var_nameString, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_standardBundle_67"); this.outer_standardBundle_67 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(68); // compilenode yourself var initFun68 = selfRequest(this.outer_standardBundle_67, "singleton$build(3)", [null], this, [], []); // compileReuseCall var func69 = function(argcv) { // accessor method asString, line 69 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("asString", 0, numArgs - 0); return var_nameString; }; // end of method asString this.methods["asString"] = func69; func69.methodName = "asString"; func69.paramCounts = [0]; func69.paramNames = []; func69.definitionLine = 69; func69.definitionModule = "standardBundle"; 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 = 67; m.definitionModule = "standardBundle"; 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 obj67_init = function() { // init of object on line 67 }; return obj67_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj67_init = obj67_build.call(inheritingObject, null, var_nameString, this, aliases, exclusions); return obj67_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method singleton(_)$build(_,_,_) this.methods["singleton(1)$build(3)"] = func66; func66.methodName = "singleton(1)$build(3)"; func66.paramCounts = [1]; func66.paramNames = ["nameString"]; func66.definitionLine = 67; func66.definitionModule = "standardBundle"; // Type decl Collection var func71 = function(argcv, var_T) { // method Collection, line 1 var returnTarget = invocationCount; invocationCount++; setLineNumber(72); // compilenode member // call case 4: other requests var call72 = request(var_collections, "Collection", [0, 1], var_T); return call72; }; // end of method Collection function memofunc71(argcv, var_T) { if (! var_T) var_T = type_Unknown; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 1)) { raiseTypeArgError("Collection", 1, numArgs - 0); } let memoTable = this.data["memo$Collection"] || ( this.data["memo$Collection"] = request(var_HashMap, 'empty', [0]) ); let tableKey = var_T; let absentBlock = new GraceBlock(this, 1, 0); absentBlock.guard = jsTrue; absentBlock.real = function ifAbsentBlock() { let newResult = func71.call(this, argcv, var_T); request(memoTable, 'at(1)put(1)', [1,1], tableKey, newResult); return newResult; }; absentBlock.methods.apply = function apply (argcv) { return this.real.apply(this.receiver); }; return request(memoTable, 'at(1)ifAbsent(1)', [1,1], tableKey, absentBlock); }; this.methods["Collection"] = memofunc71; memofunc71.methodName = "Collection"; memofunc71.paramCounts = [0]; memofunc71.paramNames = []; memofunc71.typeParamNames = ["T"]; memofunc71.definitionLine = 1; memofunc71.definitionModule = "standardBundle"; func71.methodName = "Collection"; func71.paramCounts = [0]; func71.paramNames = []; func71.typeParamNames = ["T"]; func71.definitionLine = 1; func71.definitionModule = "standardBundle"; // Type decl List var func74 = function(argcv, var_T) { // method List, line 1 var returnTarget = invocationCount; invocationCount++; setLineNumber(74); // compilenode member // call case 4: other requests var call75 = request(var_collections, "List", [0, 1], var_T); return call75; }; // end of method List function memofunc74(argcv, var_T) { if (! var_T) var_T = type_Unknown; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 1)) { raiseTypeArgError("List", 1, numArgs - 0); } let memoTable = this.data["memo$List"] || ( this.data["memo$List"] = request(var_HashMap, 'empty', [0]) ); let tableKey = var_T; let absentBlock = new GraceBlock(this, 1, 0); absentBlock.guard = jsTrue; absentBlock.real = function ifAbsentBlock() { let newResult = func74.call(this, argcv, var_T); request(memoTable, 'at(1)put(1)', [1,1], tableKey, newResult); return newResult; }; absentBlock.methods.apply = function apply (argcv) { return this.real.apply(this.receiver); }; return request(memoTable, 'at(1)ifAbsent(1)', [1,1], tableKey, absentBlock); }; this.methods["List"] = memofunc74; memofunc74.methodName = "List"; memofunc74.paramCounts = [0]; memofunc74.paramNames = []; memofunc74.typeParamNames = ["T"]; memofunc74.definitionLine = 1; memofunc74.definitionModule = "standardBundle"; func74.methodName = "List"; func74.paramCounts = [0]; func74.paramNames = []; func74.typeParamNames = ["T"]; func74.definitionLine = 1; func74.definitionModule = "standardBundle"; // Type decl Set