var searchIndex = {}; searchIndex["gluon"] = {"doc":"This crate contains contains the implementation for the gluon programming language.","items":[[3,"RootedThread","gluon","An instance of `Thread` which is rooted. See the `Thread` type for documentation on interacting\nwith the type.",null,null],[3,"Thread","","Representation of the virtual machine",null,null],[3,"Compiler","","Type which makes parsing, typechecking and compiling an AST into bytecode",null,null],[4,"Error","","Error type wrapping all possible errors that can be generated from gluon",null,null],[13,"Parse","","Error found when parsing gluon code",0,null],[13,"Typecheck","","Error found when typechecking gluon code",0,null],[13,"IO","","Error found when performing an IO action such as loading a file",0,null],[13,"VM","","Error found when executing code in the virtual machine",0,null],[13,"Macro","","Error found when expanding macros",0,null],[5,"filename_to_module","","",null,{"inputs":[{"name":"str"}],"output":{"name":"stdstring"}}],[5,"new_vm","","Creates a new virtual machine with support for importing other modules and with all primitives\nloaded.",null,{"inputs":[],"output":{"name":"rootedthread"}}],[0,"import","","Implementation of the `import` macro.",null,null],[3,"DefaultImporter","gluon::import","",null,null],[3,"CheckImporter","","",null,null],[12,"0","","",1,null],[3,"Import","","Macro which rewrites occurances of `import "filename"` to a load of that file if it is not\nalready loaded and then a global access to the loaded module",null,null],[12,"importer","","",2,null],[4,"Error","","Error type for the import macro",null,null],[13,"CyclicDependency","","The importer found a cyclic dependency when loading files",3,null],[13,"String","","Generic message error",3,null],[13,"IO","","The importer could not load the imported file",3,null],[8,"Importer","","",null,null],[10,"import","","",4,null],[11,"fmt","","",3,null],[11,"fmt","","",3,null],[11,"description","","",3,null],[11,"cause","","",3,null],[11,"from","","",3,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"clone","","",5,null],[11,"import","","",5,null],[11,"clone","","",1,null],[11,"new","","",1,{"inputs":[],"output":{"name":"checkimporter"}}],[11,"import","","",1,null],[11,"new","","Creates a new import macro",2,{"inputs":[{"name":"i"}],"output":{"name":"import"}}],[11,"add_path","","Adds a path to the list of paths which the importer uses to find files",2,null],[11,"expand","","",2,null],[11,"clone","","",2,null],[0,"compiler_pipeline","gluon","Advanced compiler pipeline which ensures that the compilation phases are run in order even if\nnot the entire compilation procedure is needed",null,null],[3,"MacroValue","gluon::compiler_pipeline","",null,null],[12,"0","","",6,null],[3,"TypecheckValue","","",null,null],[12,"0","","",7,null],[12,"1","","",7,null],[3,"CompileValue","","",null,null],[12,"0","","",8,null],[12,"1","","",8,null],[12,"2","","",8,null],[8,"MacroExpandable","","",null,null],[10,"expand_macro","","",9,null],[8,"Typecheckable","","",null,null],[11,"typecheck","","",10,null],[10,"typecheck_expected","","",10,null],[8,"Compileable","","",null,null],[10,"compile","","",11,null],[8,"Executable","","",null,null],[10,"run_expr","","",12,null],[10,"load_script","","",12,null],[11,"typecheck_expected","","",6,null],[11,"compile","","",7,null],[11,"run_expr","","",8,null],[11,"load_script","","",8,null],[6,"Result","gluon","Type alias for results returned by gluon",null,null],[11,"fmt","","",0,null],[11,"fmt","","",0,null],[11,"description","","",0,null],[11,"cause","","",0,null],[11,"from","","",0,{"inputs":[{"name":"errors"}],"output":{"name":"error"}}],[11,"from","","",0,{"inputs":[{"name":"infile"}],"output":{"name":"error"}}],[11,"from","","",0,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"from","","",0,{"inputs":[{"name":"error"}],"output":{"name":"error"}}],[11,"from","","",0,{"inputs":[{"name":"errors"}],"output":{"name":"error"}}],[11,"new","","Creates a new compiler with default settings",13,{"inputs":[],"output":{"name":"compiler"}}],[11,"implicit_prelude","","Sets wheter the implicit prelude should be include when compiling a file using this\ncompiler (default: true)",13,null],[11,"parse_expr","","Parse `input`, returning an expression if successful",13,null],[11,"parse_partial_expr","","Parse `input`, returning an expression if successful",13,null],[11,"typecheck_expr","","Parse and typecheck `expr_str` returning the typechecked expression and type of the\nexpression",13,null],[11,"typecheck_str","","",13,null],[11,"compile_script","","Compiles `expr` into a function which can be added and run by the `vm`",13,null],[11,"extract_metadata","","Parses and typechecks `expr_str` followed by extracting metadata from the created\nexpression",13,null],[11,"load_script","","Compiles `input` and if it is successful runs the resulting code and stores the resulting\nvalue in the vm.",13,null],[11,"load_file","","Loads `filename` and compiles and runs its input by calling `load_script`",13,null],[11,"run_expr","","Compiles and runs the expression in `expr_str`. If successful the value from running the\nexpression is returned",13,null],[11,"run_io_expr","","",13,null],[11,"new","","Creates a new virtual machine with an empty global environment",14,{"inputs":[],"output":{"name":"rootedthread"}}],[11,"into_raw","","Converts a `RootedThread` into a raw pointer allowing to be passed through a C api.\nThe reference count for the thread is not modified",14,null],[11,"from_raw","","Converts a raw pointer into a `RootedThread`.\nThe reference count for the thread is not modified so it is up to the caller to ensure that\nthe count is correct.",14,null],[11,"traverse","","",15,null],[11,"eq","","",15,null],[11,"push","","",14,null],[11,"drop","","",14,null],[11,"new_thread","","Spawns a new gluon thread with its own stack and heap but while still sharing the same\nglobal environment",15,null],[11,"define_global","","Creates a new global value at `name`.\nFails if a global called `name` already exists.",15,null],[11,"get_global","","Retrieves the global called `name`.\nFails if the global does not exist or it does not have the correct type.",15,null],[11,"find_type_info","","Retrieves type information about the type `name`. Types inside records can be accessed\nusing dot notation (std.prelude.Option)",15,null],[11,"get_type","","Returns the gluon type that was bound to `T`",15,null],[11,"register_type","","Registers the type `T` as being a gluon type called `name` with generic arguments `args`",15,null],[11,"get_env","","Locks and retrieves the global environment of the vm",15,null],[11,"get_stack","","Locks and retrives this threads stack",15,null],[11,"get_macros","","Retrieves the macros defined for this vm",15,null],[11,"collect","","Runs a garbage collection.",15,null],[11,"push","","Pushes a value to the top of the stack",15,null],[11,"pop","","Removes the top value from the stack",15,null],[11,"deref","","",14,null],[11,"clone","","",14,null],[11,"traverse","","",14,null],[11,"current_frame","","Returns the current stackframe",15,null],[11,"root","","Roots a userdata",15,null],[11,"root_string","","Roots a string",15,null],[11,"root_value","","Roots a value",15,null],[11,"root_value_ref","","Roots a value",15,null],[11,"alloc","","Allocates a new value from a given `DataDef`.\nTakes the stack as it may collect if the collection limit has been reached.",15,null],[11,"new_data","","",15,null],[11,"add_bytecode","","",15,null],[11,"call_module","","Calls a module, allowed to to run IO expressions",15,null],[11,"call_function","","Calls a function on the stack.\nWhen this function is called it is expected that the function exists at\n`stack.len() - args - 1` and that the arguments are of the correct type",15,null],[11,"resume","","",15,null],[11,"global_env","","",15,null],[11,"deep_clone","","",15,null]],"paths":[[4,"Error"],[3,"CheckImporter"],[3,"Import"],[4,"Error"],[8,"Importer"],[3,"DefaultImporter"],[3,"MacroValue"],[3,"TypecheckValue"],[3,"CompileValue"],[8,"MacroExpandable"],[8,"Typecheckable"],[8,"Compileable"],[8,"Executable"],[3,"Compiler"],[3,"RootedThread"],[3,"Thread"]]}; initSearch(searchIndex);