From 4b1a7d8a1d315090fb808ba4695bbacdc91e1aff Mon Sep 17 00:00:00 2001 From: johannst Date: Fri, 24 Sep 2021 22:49:57 +0000 Subject: deploy: 6eb6ad9f574c783d471f6a863299af25b6f5a8c7 --- COPYRIGHT.txt | 14 +- FiraSans-LICENSE.txt | 4 +- SourceCodePro-It.ttf.woff2 | Bin 0 -> 44896 bytes SourceCodePro-Regular.ttf.woff2 | Bin 0 -> 52228 bytes SourceCodePro-Semibold.ttf.woff2 | Bin 0 -> 52348 bytes SourceSerif4-Bold.ttf.woff2 | Bin 0 -> 81320 bytes SourceSerif4-It.ttf.woff2 | Bin 0 -> 59860 bytes SourceSerif4-Regular.ttf.woff2 | Bin 0 -> 76180 bytes ayu.css | 2 +- dark.css | 2 +- implementors/core/clone/trait.Clone.js | 2 +- implementors/core/cmp/trait.PartialEq.js | 2 +- implementors/core/convert/trait.TryFrom.js | 2 +- implementors/core/fmt/trait.Debug.js | 2 +- implementors/core/marker/trait.Copy.js | 2 +- implementors/core/marker/trait.Freeze.js | 2 +- implementors/core/marker/trait.Send.js | 2 +- .../core/marker/trait.StructuralPartialEq.js | 2 +- implementors/core/marker/trait.Sync.js | 2 +- implementors/core/marker/trait.Unpin.js | 2 +- implementors/core/ops/deref/trait.Deref.js | 2 +- implementors/core/ops/drop/trait.Drop.js | 2 +- implementors/std/panic/trait.RefUnwindSafe.js | 2 +- implementors/std/panic/trait.UnwindSafe.js | 2 +- light.css | 2 +- llvm_kaleidoscope_rs/all.html | 8 +- llvm_kaleidoscope_rs/codegen/index.html | 10 +- llvm_kaleidoscope_rs/codegen/struct.Codegen.html | 28 +- llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html | 8 +- llvm_kaleidoscope_rs/enum.Either.html | 28 +- llvm_kaleidoscope_rs/index.html | 22 +- llvm_kaleidoscope_rs/lexer/enum.Token.html | 42 +- llvm_kaleidoscope_rs/lexer/index.html | 10 +- llvm_kaleidoscope_rs/lexer/struct.Lexer.html | 26 +- .../llvm/builder/struct.IRBuilder.html | 11 + .../llvm/fn.initialize_native_taget.html | 4 + llvm_kaleidoscope_rs/llvm/fn.shutdown.html | 4 + llvm_kaleidoscope_rs/llvm/index.html | 28 +- llvm_kaleidoscope_rs/llvm/lljit/struct.LLJit.html | 11 + .../llvm/lljit/struct.ResourceTracker.html | 11 + .../llvm/module/struct.Module.html | 11 + .../pass_manager/struct.FunctionPassManager.html | 11 + llvm_kaleidoscope_rs/llvm/sidebar-items.js | 2 +- llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html | 38 +- llvm_kaleidoscope_rs/llvm/struct.Builder.html | 39 - llvm_kaleidoscope_rs/llvm/struct.FnValue.html | 64 +- .../llvm/struct.FunctionPassManager.html | 25 + llvm_kaleidoscope_rs/llvm/struct.IRBuilder.html | 39 + llvm_kaleidoscope_rs/llvm/struct.LLJit.html | 25 + llvm_kaleidoscope_rs/llvm/struct.Module.html | 42 +- .../llvm/struct.ResourceTracker.html | 15 + llvm_kaleidoscope_rs/llvm/struct.Type.html | 42 +- llvm_kaleidoscope_rs/llvm/struct.Value.html | 50 +- llvm_kaleidoscope_rs/llvm/type_/struct.Type.html | 11 + .../llvm/value/struct.FnValue.html | 11 + llvm_kaleidoscope_rs/llvm/value/struct.Value.html | 11 + llvm_kaleidoscope_rs/parser/enum.ExprAST.html | 52 +- llvm_kaleidoscope_rs/parser/index.html | 16 +- .../parser/struct.FunctionAST.html | 34 +- llvm_kaleidoscope_rs/parser/struct.Parser.html | 36 +- .../parser/struct.PrototypeAST.html | 40 +- llvm_kaleidoscope_rs/struct.SmallCStr.html | 44 +- main.js | 2 +- normalize.css | 4 +- rustdoc.css | 2 +- search-index.js | 2 +- search.js | 2 +- settings.html | 8 +- source-files.js | 2 +- src/llvm_kaleidoscope_rs/codegen.rs.html | 82 +- src/llvm_kaleidoscope_rs/lexer.rs.html | 8 +- src/llvm_kaleidoscope_rs/lib.rs.html | 8 +- src/llvm_kaleidoscope_rs/llvm.rs.html | 1073 -------------------- src/llvm_kaleidoscope_rs/llvm/builder.rs.html | 383 +++++++ src/llvm_kaleidoscope_rs/llvm/lljit.rs.html | 307 ++++++ src/llvm_kaleidoscope_rs/llvm/mod.rs.html | 161 +++ src/llvm_kaleidoscope_rs/llvm/module.rs.html | 397 ++++++++ src/llvm_kaleidoscope_rs/llvm/pass_manager.rs.html | 155 +++ src/llvm_kaleidoscope_rs/llvm/type_.rs.html | 121 +++ src/llvm_kaleidoscope_rs/llvm/value.rs.html | 341 +++++++ src/llvm_kaleidoscope_rs/parser.rs.html | 12 +- 81 files changed, 2525 insertions(+), 1506 deletions(-) create mode 100644 SourceCodePro-It.ttf.woff2 create mode 100644 SourceCodePro-Regular.ttf.woff2 create mode 100644 SourceCodePro-Semibold.ttf.woff2 create mode 100644 SourceSerif4-Bold.ttf.woff2 create mode 100644 SourceSerif4-It.ttf.woff2 create mode 100644 SourceSerif4-Regular.ttf.woff2 create mode 100644 llvm_kaleidoscope_rs/llvm/builder/struct.IRBuilder.html create mode 100644 llvm_kaleidoscope_rs/llvm/fn.initialize_native_taget.html create mode 100644 llvm_kaleidoscope_rs/llvm/fn.shutdown.html create mode 100644 llvm_kaleidoscope_rs/llvm/lljit/struct.LLJit.html create mode 100644 llvm_kaleidoscope_rs/llvm/lljit/struct.ResourceTracker.html create mode 100644 llvm_kaleidoscope_rs/llvm/module/struct.Module.html create mode 100644 llvm_kaleidoscope_rs/llvm/pass_manager/struct.FunctionPassManager.html delete mode 100644 llvm_kaleidoscope_rs/llvm/struct.Builder.html create mode 100644 llvm_kaleidoscope_rs/llvm/struct.FunctionPassManager.html create mode 100644 llvm_kaleidoscope_rs/llvm/struct.IRBuilder.html create mode 100644 llvm_kaleidoscope_rs/llvm/struct.LLJit.html create mode 100644 llvm_kaleidoscope_rs/llvm/struct.ResourceTracker.html create mode 100644 llvm_kaleidoscope_rs/llvm/type_/struct.Type.html create mode 100644 llvm_kaleidoscope_rs/llvm/value/struct.FnValue.html create mode 100644 llvm_kaleidoscope_rs/llvm/value/struct.Value.html delete mode 100644 src/llvm_kaleidoscope_rs/llvm.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/builder.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/lljit.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/mod.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/module.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/pass_manager.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/type_.rs.html create mode 100644 src/llvm_kaleidoscope_rs/llvm/value.rs.html diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 16d7903..c2629a8 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -2,7 +2,8 @@ These documentation pages include resources by third parties. This copyright file applies only to those resources. The following third party resources are included, and carry their own copyright notices and license terms: -* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2, + FiraSans-Regular.woff, FiraSans-Medium.woff): Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ with Reserved Font Name Fira Sans. @@ -23,8 +24,10 @@ included, and carry their own copyright notices and license terms: Copyright (c) Nicolas Gallagher and Jonathan Neal. Licensed under the MIT license (see LICENSE-MIT.txt). -* Source Code Pro (SourceCodePro-Regular.ttf.woff, - SourceCodePro-Semibold.ttf.woff, SourceCodePro-It.ttf.woff): +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2, + SourceCodePro-Regular.ttf.woff, SourceCodePro-Semibold.ttf.woff, + SourceCodePro-It.ttf.woff): Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark @@ -33,8 +36,9 @@ included, and carry their own copyright notices and license terms: Licensed under the SIL Open Font License, Version 1.1. See SourceCodePro-LICENSE.txt. -* Source Serif 4 (SourceSerif4-Regular.ttf.woff, SourceSerif4-Bold.ttf.woff, - SourceSerif4-It.ttf.woff): +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2, SourceSerif4-Regular.ttf.woff, + SourceSerif4-Bold.ttf.woff, SourceSerif4-It.ttf.woff): Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United diff --git a/FiraSans-LICENSE.txt b/FiraSans-LICENSE.txt index d444ea9..ff9afab 100644 --- a/FiraSans-LICENSE.txt +++ b/FiraSans-LICENSE.txt @@ -1,5 +1,5 @@ Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, +with Reserved Font Name < Fira >, This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: @@ -19,7 +19,7 @@ with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, +fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The diff --git a/SourceCodePro-It.ttf.woff2 b/SourceCodePro-It.ttf.woff2 new file mode 100644 index 0000000..462c34e Binary files /dev/null and b/SourceCodePro-It.ttf.woff2 differ diff --git a/SourceCodePro-Regular.ttf.woff2 b/SourceCodePro-Regular.ttf.woff2 new file mode 100644 index 0000000..10b558e Binary files /dev/null and b/SourceCodePro-Regular.ttf.woff2 differ diff --git a/SourceCodePro-Semibold.ttf.woff2 b/SourceCodePro-Semibold.ttf.woff2 new file mode 100644 index 0000000..5ec64ee Binary files /dev/null and b/SourceCodePro-Semibold.ttf.woff2 differ diff --git a/SourceSerif4-Bold.ttf.woff2 b/SourceSerif4-Bold.ttf.woff2 new file mode 100644 index 0000000..db57d21 Binary files /dev/null and b/SourceSerif4-Bold.ttf.woff2 differ diff --git a/SourceSerif4-It.ttf.woff2 b/SourceSerif4-It.ttf.woff2 new file mode 100644 index 0000000..1cbc021 Binary files /dev/null and b/SourceSerif4-It.ttf.woff2 differ diff --git a/SourceSerif4-Regular.ttf.woff2 b/SourceSerif4-Regular.ttf.woff2 new file mode 100644 index 0000000..2db73fe Binary files /dev/null and b/SourceSerif4-Regular.ttf.woff2 differ diff --git a/ayu.css b/ayu.css index 94ffc1c..4a52bc3 100644 --- a/ayu.css +++ b/ayu.css @@ -1 +1 @@ - body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-input:disabled{background-color:#3e3e3e;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}.docblock code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-input:disabled{background-color:#3e3e3e;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:rgba(255,236,164,0.06);}:target{border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/dark.css b/dark.css index 227deb9..fc1f54f 100644 --- a/dark.css +++ b/dark.css @@ -1 +1 @@ -body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-mod:focus{background-color:#803a1b;}a.result-externcrate:focus{background-color:#396bac;}a.result-enum:focus{background-color:#5b4e68;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#38902c;}a.result-foreigntype:focus{background-color:#b200d6;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#0063cc;}a.result-primitive:focus{background-color:#00708a;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-input:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background-color:#494a3d;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file +body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-mod:focus{background-color:#803a1b;}a.result-externcrate:focus{background-color:#396bac;}a.result-enum:focus{background-color:#5b4e68;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#38902c;}a.result-foreigntype:focus{background-color:#b200d6;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#0063cc;}a.result-primitive:focus{background-color:#00708a;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-input:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background-color:#494a3d;}:target{border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js index 39839e9..6761d51 100644 --- a/implementors/core/clone/trait.Clone.js +++ b/implementors/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> Clone for BasicBlock<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> Clone for Type<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> Clone for Value<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> Clone for FnValue<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> Clone for Type<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> Clone for Value<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> Clone for FnValue<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> Clone for BasicBlock<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl Clone for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.PartialEq.js b/implementors/core/cmp/trait.PartialEq.js index 6700c3f..6f6ea9c 100644 --- a/implementors/core/cmp/trait.PartialEq.js +++ b/implementors/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl PartialEq<Token> for Token","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl PartialEq<ExprAST> for ExprAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl PartialEq<PrototypeAST> for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl PartialEq<FunctionAST> for FunctionAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl PartialEq<SmallCStr> for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl PartialEq<Token> for Token","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl PartialEq<ExprAST> for ExprAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl PartialEq<PrototypeAST> for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl PartialEq<FunctionAST> for FunctionAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl PartialEq<SmallCStr> for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.TryFrom.js b/implementors/core/convert/trait.TryFrom.js index e44e34a..9a85077 100644 --- a/implementors/core/convert/trait.TryFrom.js +++ b/implementors/core/convert/trait.TryFrom.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl TryFrom<&'_ str> for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl TryFrom<&'_ str> for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index fecfabc..bfeceb3 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl Debug for Token","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl Debug for ExprAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Debug for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Debug for FunctionAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl Debug for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl Debug for Token","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl Debug for ExprAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Debug for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Debug for FunctionAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl Debug for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Copy.js b/implementors/core/marker/trait.Copy.js index a41981a..dcb8195 100644 --- a/implementors/core/marker/trait.Copy.js +++ b/implementors/core/marker/trait.Copy.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> Copy for BasicBlock<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> Copy for Type<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> Copy for Value<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> Copy for FnValue<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> Copy for Type<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> Copy for Value<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> Copy for FnValue<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> Copy for BasicBlock<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js index 3716d3c..5bd64fe 100644 --- a/implementors/core/marker/trait.Freeze.js +++ b/implementors/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> Freeze for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Freeze for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Freeze for Lexer<I> where
    I: Freeze, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl Freeze for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> Freeze for Builder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> Freeze for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> Freeze for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> Freeze for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> Freeze for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl Freeze for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Freeze for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Freeze for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Freeze for Parser<I> where
    I: Freeze, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Freeze for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Freeze for Either<A, B> where
    A: Freeze,
    B: Freeze, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> Freeze for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Freeze for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Freeze for Lexer<I> where
    I: Freeze, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl<'llvm> Freeze for IRBuilder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl Freeze for LLJit","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::LLJit"]},{"text":"impl<'jit> Freeze for ResourceTracker<'jit>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl Freeze for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl<'llvm> Freeze for FunctionPassManager<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]},{"text":"impl<'llvm> Freeze for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> Freeze for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> Freeze for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> Freeze for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl Freeze for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Freeze for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Freeze for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Freeze for Parser<I> where
    I: Freeze, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Freeze for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Freeze for Either<A, B> where
    A: Freeze,
    B: Freeze, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js index 6d1e315..24cd49b 100644 --- a/implementors/core/marker/trait.Send.js +++ b/implementors/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !Send for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Send for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Send for Lexer<I> where
    I: Send
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl !Send for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> !Send for Builder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> !Send for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> !Send for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> !Send for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> !Send for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl Send for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Send for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Send for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Send for Parser<I> where
    I: Send
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Send for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Send for Either<A, B> where
    A: Send,
    B: Send
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !Send for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Send for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Send for Lexer<I> where
    I: Send
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl<'llvm> !Send for IRBuilder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl !Send for LLJit","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::LLJit"]},{"text":"impl<'jit> !Send for ResourceTracker<'jit>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl !Send for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl<'llvm> !Send for FunctionPassManager<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]},{"text":"impl<'llvm> !Send for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> !Send for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> !Send for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> !Send for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl Send for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Send for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Send for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Send for Parser<I> where
    I: Send
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Send for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Send for Either<A, B> where
    A: Send,
    B: Send
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralPartialEq.js b/implementors/core/marker/trait.StructuralPartialEq.js index f1fc453..8f95cdc 100644 --- a/implementors/core/marker/trait.StructuralPartialEq.js +++ b/implementors/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl StructuralPartialEq for Token","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl StructuralPartialEq for ExprAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl StructuralPartialEq for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl StructuralPartialEq for FunctionAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl StructuralPartialEq for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl StructuralPartialEq for Token","synthetic":false,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl StructuralPartialEq for ExprAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl StructuralPartialEq for PrototypeAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl StructuralPartialEq for FunctionAST","synthetic":false,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl StructuralPartialEq for SmallCStr","synthetic":false,"types":["llvm_kaleidoscope_rs::SmallCStr"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js index 35fdad5..4ed45ff 100644 --- a/implementors/core/marker/trait.Sync.js +++ b/implementors/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !Sync for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Sync for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Sync for Lexer<I> where
    I: Sync
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl !Sync for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> !Sync for Builder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> !Sync for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> !Sync for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> !Sync for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> !Sync for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl Sync for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Sync for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Sync for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Sync for Parser<I> where
    I: Sync
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Sync for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Sync for Either<A, B> where
    A: Sync,
    B: Sync
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !Sync for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Sync for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Sync for Lexer<I> where
    I: Sync
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl<'llvm> !Sync for IRBuilder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl !Sync for LLJit","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::LLJit"]},{"text":"impl<'jit> !Sync for ResourceTracker<'jit>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl !Sync for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl<'llvm> !Sync for FunctionPassManager<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]},{"text":"impl<'llvm> !Sync for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> !Sync for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> !Sync for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> !Sync for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl Sync for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Sync for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Sync for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Sync for Parser<I> where
    I: Sync
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Sync for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Sync for Either<A, B> where
    A: Sync,
    B: Sync
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js index 216ddc5..26512c0 100644 --- a/implementors/core/marker/trait.Unpin.js +++ b/implementors/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> Unpin for Codegen<'llvm, 'a> where
    'llvm: 'a, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Unpin for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Unpin for Lexer<I> where
    I: Unpin
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl Unpin for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> Unpin for Builder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> Unpin for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> Unpin for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> Unpin for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> Unpin for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl Unpin for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Unpin for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Unpin for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Unpin for Parser<I> where
    I: Unpin
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Unpin for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Unpin for Either<A, B> where
    A: Unpin,
    B: Unpin
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> Unpin for Codegen<'llvm, 'a> where
    'llvm: 'a, 
","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl Unpin for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> Unpin for Lexer<I> where
    I: Unpin
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl<'llvm> Unpin for IRBuilder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl Unpin for LLJit","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::LLJit"]},{"text":"impl<'jit> Unpin for ResourceTracker<'jit>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl Unpin for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl<'llvm> Unpin for FunctionPassManager<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]},{"text":"impl<'llvm> Unpin for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> Unpin for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> Unpin for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> Unpin for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl Unpin for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl Unpin for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl Unpin for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> Unpin for Parser<I> where
    I: Unpin
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl Unpin for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> Unpin for Either<A, B> where
    A: Unpin,
    B: Unpin
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/deref/trait.Deref.js b/implementors/core/ops/deref/trait.Deref.js index c17e51f..1f5eeda 100644 --- a/implementors/core/ops/deref/trait.Deref.js +++ b/implementors/core/ops/deref/trait.Deref.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> Deref for FnValue<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm> Deref for FnValue<'llvm>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/drop/trait.Drop.js b/implementors/core/ops/drop/trait.Drop.js index f2e3e5a..6ed70d3 100644 --- a/implementors/core/ops/drop/trait.Drop.js +++ b/implementors/core/ops/drop/trait.Drop.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl Drop for Module","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl Drop for Builder<'_>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::Builder"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl Drop for IRBuilder<'_>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl Drop for ResourceTracker<'_>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl Drop for Module","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl Drop for FunctionPassManager<'_>","synthetic":false,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/std/panic/trait.RefUnwindSafe.js b/implementors/std/panic/trait.RefUnwindSafe.js index efd22f6..edb60c1 100644 --- a/implementors/std/panic/trait.RefUnwindSafe.js +++ b/implementors/std/panic/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> RefUnwindSafe for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl RefUnwindSafe for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> RefUnwindSafe for Lexer<I> where
    I: RefUnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl RefUnwindSafe for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> RefUnwindSafe for Builder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> RefUnwindSafe for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> RefUnwindSafe for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> RefUnwindSafe for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> RefUnwindSafe for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl RefUnwindSafe for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl RefUnwindSafe for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl RefUnwindSafe for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> RefUnwindSafe for Parser<I> where
    I: RefUnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl RefUnwindSafe for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> RefUnwindSafe for Either<A, B> where
    A: RefUnwindSafe,
    B: RefUnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> RefUnwindSafe for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl RefUnwindSafe for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> RefUnwindSafe for Lexer<I> where
    I: RefUnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl<'llvm> RefUnwindSafe for IRBuilder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl RefUnwindSafe for LLJit","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::LLJit"]},{"text":"impl<'jit> RefUnwindSafe for ResourceTracker<'jit>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl RefUnwindSafe for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl<'llvm> RefUnwindSafe for FunctionPassManager<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]},{"text":"impl<'llvm> RefUnwindSafe for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> RefUnwindSafe for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> RefUnwindSafe for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> RefUnwindSafe for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl RefUnwindSafe for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl RefUnwindSafe for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl RefUnwindSafe for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> RefUnwindSafe for Parser<I> where
    I: RefUnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl RefUnwindSafe for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> RefUnwindSafe for Either<A, B> where
    A: RefUnwindSafe,
    B: RefUnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/std/panic/trait.UnwindSafe.js b/implementors/std/panic/trait.UnwindSafe.js index 2faa942..2fcfb73 100644 --- a/implementors/std/panic/trait.UnwindSafe.js +++ b/implementors/std/panic/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> UnwindSafe for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl UnwindSafe for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> UnwindSafe for Lexer<I> where
    I: UnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl UnwindSafe for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Module"]},{"text":"impl<'llvm> UnwindSafe for Builder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Builder"]},{"text":"impl<'llvm> UnwindSafe for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl<'llvm> UnwindSafe for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Type"]},{"text":"impl<'llvm> UnwindSafe for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::Value"]},{"text":"impl<'llvm> UnwindSafe for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::FnValue"]},{"text":"impl UnwindSafe for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl UnwindSafe for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl UnwindSafe for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> UnwindSafe for Parser<I> where
    I: UnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl UnwindSafe for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> UnwindSafe for Either<A, B> where
    A: UnwindSafe,
    B: UnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; +implementors["llvm_kaleidoscope_rs"] = [{"text":"impl<'llvm, 'a> !UnwindSafe for Codegen<'llvm, 'a>","synthetic":true,"types":["llvm_kaleidoscope_rs::codegen::Codegen"]},{"text":"impl UnwindSafe for Token","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Token"]},{"text":"impl<I> UnwindSafe for Lexer<I> where
    I: UnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::lexer::Lexer"]},{"text":"impl<'llvm> UnwindSafe for IRBuilder<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::builder::IRBuilder"]},{"text":"impl UnwindSafe for LLJit","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::LLJit"]},{"text":"impl<'jit> UnwindSafe for ResourceTracker<'jit>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::lljit::ResourceTracker"]},{"text":"impl UnwindSafe for Module","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::module::Module"]},{"text":"impl<'llvm> UnwindSafe for FunctionPassManager<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::pass_manager::FunctionPassManager"]},{"text":"impl<'llvm> UnwindSafe for Type<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::type_::Type"]},{"text":"impl<'llvm> UnwindSafe for Value<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::Value"]},{"text":"impl<'llvm> UnwindSafe for FnValue<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::value::FnValue"]},{"text":"impl<'llvm> UnwindSafe for BasicBlock<'llvm>","synthetic":true,"types":["llvm_kaleidoscope_rs::llvm::BasicBlock"]},{"text":"impl UnwindSafe for ExprAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::ExprAST"]},{"text":"impl UnwindSafe for PrototypeAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::PrototypeAST"]},{"text":"impl UnwindSafe for FunctionAST","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::FunctionAST"]},{"text":"impl<I> UnwindSafe for Parser<I> where
    I: UnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::parser::Parser"]},{"text":"impl UnwindSafe for SmallCStr","synthetic":true,"types":["llvm_kaleidoscope_rs::SmallCStr"]},{"text":"impl<A, B> UnwindSafe for Either<A, B> where
    A: UnwindSafe,
    B: UnwindSafe
","synthetic":true,"types":["llvm_kaleidoscope_rs::Either"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/light.css b/light.css index a5aa6d0..fbbba65 100644 --- a/light.css +++ b/light.css @@ -1 +1 @@ - body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#b4d1b9;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#ffc891;}a.result-foreigntype:focus{background-color:#f5c4ff;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#c3e0ff;}a.result-primitive:focus{background-color:#9aecff;}a.result-keyword:focus{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-input:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:#FDFFD3;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file + body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#b4d1b9;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#ffc891;}a.result-foreigntype:focus{background-color:#f5c4ff;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#c3e0ff;}a.result-primitive:focus{background-color:#9aecff;}a.result-keyword:focus{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-input:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:#FDFFD3;}:target{border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/all.html b/llvm_kaleidoscope_rs/all.html index 722e4e9..80e26df 100644 --- a/llvm_kaleidoscope_rs/all.html +++ b/llvm_kaleidoscope_rs/all.html @@ -1,5 +1,5 @@ -List of all items in this crate - -

List of all items[] +List of all items in this crate

List of all items[] -

Structs

Enums

Constants

\ No newline at end of file +

Structs

Enums

Functions

Constants

+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/codegen/index.html b/llvm_kaleidoscope_rs/codegen/index.html index 3646e69..7405dc4 100644 --- a/llvm_kaleidoscope_rs/codegen/index.html +++ b/llvm_kaleidoscope_rs/codegen/index.html @@ -1,5 +1,5 @@ -llvm_kaleidoscope_rs::codegen - Rust - -

Module llvm_kaleidoscope_rs::codegen[][src]

Structs

-
Codegen

Code generator from kaleidoscope AST to LLVM IR.

-
\ No newline at end of file +llvm_kaleidoscope_rs::codegen - Rust

Module llvm_kaleidoscope_rs::codegen[][src]

Structs

+

Code generator from kaleidoscope AST to LLVM IR.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/codegen/struct.Codegen.html b/llvm_kaleidoscope_rs/codegen/struct.Codegen.html index d31396a..9f9ece8 100644 --- a/llvm_kaleidoscope_rs/codegen/struct.Codegen.html +++ b/llvm_kaleidoscope_rs/codegen/struct.Codegen.html @@ -1,14 +1,14 @@ -Codegen in llvm_kaleidoscope_rs::codegen - Rust - -

Struct llvm_kaleidoscope_rs::codegen::Codegen[][src]

pub struct Codegen<'llvm, 'a> { /* fields omitted */ }
Expand description

Code generator from kaleidoscope AST to LLVM IR.

-

Implementations

Compile either a PrototypeAST or a FunctionAST into the LLVM module.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +Codegen in llvm_kaleidoscope_rs::codegen - Rust

Struct llvm_kaleidoscope_rs::codegen::Codegen[][src]

pub struct Codegen<'llvm, 'a> { /* fields omitted */ }
Expand description

Code generator from kaleidoscope AST to LLVM IR.

+

Implementations

Compile either a PrototypeAST or a FunctionAST into the LLVM module.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html b/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html index d1b75ce..ae632c8 100644 --- a/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html +++ b/llvm_kaleidoscope_rs/constant.SMALL_STR_SIZE.html @@ -1,4 +1,4 @@ -SMALL_STR_SIZE in llvm_kaleidoscope_rs - Rust - -

Constant llvm_kaleidoscope_rs::SMALL_STR_SIZE[][src]

pub const SMALL_STR_SIZE: usize = 16;
Expand description

Fixed size of SmallCStr including the trailing \0 byte.

-
\ No newline at end of file +SMALL_STR_SIZE in llvm_kaleidoscope_rs - Rust

Constant llvm_kaleidoscope_rs::SMALL_STR_SIZE[][src]

pub const SMALL_STR_SIZE: usize = 16;
Expand description

Fixed size of SmallCStr including the trailing \0 byte.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/enum.Either.html b/llvm_kaleidoscope_rs/enum.Either.html index baf950a..4a79368 100644 --- a/llvm_kaleidoscope_rs/enum.Either.html +++ b/llvm_kaleidoscope_rs/enum.Either.html @@ -1,18 +1,16 @@ -Either in llvm_kaleidoscope_rs - Rust - -

Enum llvm_kaleidoscope_rs::Either[][src]

pub enum Either<A, B> {
+Either in llvm_kaleidoscope_rs - Rust

Enum llvm_kaleidoscope_rs::Either[][src]

pub enum Either<A, B> {
     A(A),
     B(B),
 }
Expand description

Either type, for APIs accepting two types.

-

- Variants

-
A(A)
B(B)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Variants

A(A)
B(B)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/index.html b/llvm_kaleidoscope_rs/index.html index a2716bf..b38f113 100644 --- a/llvm_kaleidoscope_rs/index.html +++ b/llvm_kaleidoscope_rs/index.html @@ -1,11 +1,11 @@ -llvm_kaleidoscope_rs - Rust - -

Crate llvm_kaleidoscope_rs[][src]

Modules

-
codegen
lexer
llvm

Safe wrapper around the LLVM C API.

-
parser

Structs

-
SmallCStr

Small C string on the stack with fixed size SMALL_STR_SIZE.

-

Enums

-
Either

Either type, for APIs accepting two types.

-

Constants

-
SMALL_STR_SIZE

Fixed size of SmallCStr including the trailing \0 byte.

-
\ No newline at end of file +llvm_kaleidoscope_rs - Rust

Crate llvm_kaleidoscope_rs[][src]

Modules

+

Safe wrapper around the LLVM C API.

+

Structs

+

Small C string on the stack with fixed size SMALL_STR_SIZE.

+

Enums

+

Either type, for APIs accepting two types.

+

Constants

+

Fixed size of SmallCStr including the trailing \0 byte.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/enum.Token.html b/llvm_kaleidoscope_rs/lexer/enum.Token.html index e93e300..9ecc208 100644 --- a/llvm_kaleidoscope_rs/lexer/enum.Token.html +++ b/llvm_kaleidoscope_rs/lexer/enum.Token.html @@ -1,25 +1,23 @@ -Token in llvm_kaleidoscope_rs::lexer - Rust - -

Enum llvm_kaleidoscope_rs::lexer::Token[][src]

pub enum Token {
+Token in llvm_kaleidoscope_rs::lexer - Rust

Enum llvm_kaleidoscope_rs::lexer::Token[][src]

pub enum Token {
     Eof,
     Def,
     Extern,
-    Identifier(String),
-    Number(f64),
-    Char(char),
-}

- Variants

-
Eof
Def
Extern
Identifier(String)
Number(f64)
Char(char)

Trait Implementations

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file + Identifier(String), + Number(f64), + Char(char), +}

Variants

Eof
Def
Extern
Identifier(String)
Number(f64)
Char(char)

Trait Implementations

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/index.html b/llvm_kaleidoscope_rs/lexer/index.html index ad9e36f..972ee08 100644 --- a/llvm_kaleidoscope_rs/lexer/index.html +++ b/llvm_kaleidoscope_rs/lexer/index.html @@ -1,5 +1,5 @@ -llvm_kaleidoscope_rs::lexer - Rust - -

Module llvm_kaleidoscope_rs::lexer[][src]

Structs

-
Lexer

Enums

-
Token
\ No newline at end of file +llvm_kaleidoscope_rs::lexer - Rust

Module llvm_kaleidoscope_rs::lexer[][src]

Structs

+

Enums

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/lexer/struct.Lexer.html b/llvm_kaleidoscope_rs/lexer/struct.Lexer.html index b85a138..2892920 100644 --- a/llvm_kaleidoscope_rs/lexer/struct.Lexer.html +++ b/llvm_kaleidoscope_rs/lexer/struct.Lexer.html @@ -1,14 +1,14 @@ -Lexer in llvm_kaleidoscope_rs::lexer - Rust - -

Struct llvm_kaleidoscope_rs::lexer::Lexer[][src]

pub struct Lexer<I> where
    I: Iterator<Item = char>, 
{ /* fields omitted */ }

Implementations

Lex and return the next token.

+Lexer in llvm_kaleidoscope_rs::lexer - Rust

Struct llvm_kaleidoscope_rs::lexer::Lexer[][src]

pub struct Lexer<I> where
    I: Iterator<Item = char>, 
{ /* fields omitted */ }

Implementations

Lex and return the next token.

Implement int gettok(); from the tutorial.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/builder/struct.IRBuilder.html b/llvm_kaleidoscope_rs/llvm/builder/struct.IRBuilder.html new file mode 100644 index 0000000..014612a --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/builder/struct.IRBuilder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.IRBuilder.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/fn.initialize_native_taget.html b/llvm_kaleidoscope_rs/llvm/fn.initialize_native_taget.html new file mode 100644 index 0000000..d74774c --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/fn.initialize_native_taget.html @@ -0,0 +1,4 @@ +initialize_native_taget in llvm_kaleidoscope_rs::llvm - Rust

Function llvm_kaleidoscope_rs::llvm::initialize_native_taget[][src]

pub fn initialize_native_taget()
Expand description

Initialize native target for corresponding to host (useful for jitting).

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/fn.shutdown.html b/llvm_kaleidoscope_rs/llvm/fn.shutdown.html new file mode 100644 index 0000000..a2f6a11 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/fn.shutdown.html @@ -0,0 +1,4 @@ +shutdown in llvm_kaleidoscope_rs::llvm - Rust

Function llvm_kaleidoscope_rs::llvm::shutdown[][src]

pub fn shutdown()
Expand description

Deallocate and destroy all “ManagedStatic” variables.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/index.html b/llvm_kaleidoscope_rs/llvm/index.html index acd0ba4..9707eea 100644 --- a/llvm_kaleidoscope_rs/llvm/index.html +++ b/llvm_kaleidoscope_rs/llvm/index.html @@ -1,15 +1,23 @@ -llvm_kaleidoscope_rs::llvm - Rust - -

Module llvm_kaleidoscope_rs::llvm[][src]

Expand description

Safe wrapper around the LLVM C API.

+llvm_kaleidoscope_rs::llvm - Rust

Module llvm_kaleidoscope_rs::llvm[][src]

Expand description

Safe wrapper around the LLVM C API.

References returned from the LLVM API are tied to the 'llvm lifetime which is bound to the context where the objects are created in. We do not offer wrappers to remove or delete any objects in the context and therefore all the references will be valid for the liftime of the context.

+

For the scope of this tutorial we mainly use assertions to validate the results from the LLVM +API calls.

Structs

-
BasicBlock

Wrapper for a LLVM Basic Block.

-
Builder

Wrapper for a LLVM IR Builder.

-
FnValue

Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.

-
Module

Wrapper for a LLVM Module with its own LLVM Context.

-
Type

Wrapper for a LLVM Type Reference.

-
Value

Wrapper for a LLVM Value Reference.

-
\ No newline at end of file +

Wrapper for a LLVM Basic Block.

+

Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.

+

Wrapper for a LLVM Function PassManager (legacy).

+

Wrapper for a LLVM IR Builder.

+

Wrapper for a LLVM Module with its own LLVM Context.

+

A resource handle to code added to an LLJit instance. When a ResourceTracker handle is +dropped, the code corresponding to the handle will be removed from the JIT.

+

Wrapper for a LLVM Type Reference.

+

Wrapper for a LLVM Value Reference.

+

Functions

+

Initialize native target for corresponding to host (useful for jitting).

+

Deallocate and destroy all “ManagedStatic” variables.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/lljit/struct.LLJit.html b/llvm_kaleidoscope_rs/llvm/lljit/struct.LLJit.html new file mode 100644 index 0000000..879e101 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/lljit/struct.LLJit.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.LLJit.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/lljit/struct.ResourceTracker.html b/llvm_kaleidoscope_rs/llvm/lljit/struct.ResourceTracker.html new file mode 100644 index 0000000..4c0fb7a --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/lljit/struct.ResourceTracker.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.ResourceTracker.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/module/struct.Module.html b/llvm_kaleidoscope_rs/llvm/module/struct.Module.html new file mode 100644 index 0000000..9f476e6 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/module/struct.Module.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.Module.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/pass_manager/struct.FunctionPassManager.html b/llvm_kaleidoscope_rs/llvm/pass_manager/struct.FunctionPassManager.html new file mode 100644 index 0000000..7824383 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/pass_manager/struct.FunctionPassManager.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.FunctionPassManager.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/sidebar-items.js b/llvm_kaleidoscope_rs/llvm/sidebar-items.js index 71ace87..8a16a0d 100644 --- a/llvm_kaleidoscope_rs/llvm/sidebar-items.js +++ b/llvm_kaleidoscope_rs/llvm/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"struct":[["BasicBlock","Wrapper for a LLVM Basic Block."],["Builder","Wrapper for a LLVM IR Builder."],["FnValue","Wrapper for a LLVM Value Reference specialized for contexts where function values are needed."],["Module","Wrapper for a LLVM Module with its own LLVM Context."],["Type","Wrapper for a LLVM Type Reference."],["Value","Wrapper for a LLVM Value Reference."]]}); \ No newline at end of file +initSidebarItems({"fn":[["initialize_native_taget","Initialize native target for corresponding to host (useful for jitting)."],["shutdown","Deallocate and destroy all “ManagedStatic” variables."]],"struct":[["BasicBlock","Wrapper for a LLVM Basic Block."],["FnValue","Wrapper for a LLVM Value Reference specialized for contexts where function values are needed."],["FunctionPassManager","Wrapper for a LLVM Function PassManager (legacy)."],["IRBuilder","Wrapper for a LLVM IR Builder."],["LLJit",""],["Module","Wrapper for a LLVM Module with its own LLVM Context."],["ResourceTracker","A resource handle to code added to an [`LLJit`] instance. When a `ResourceTracker` handle is dropped, the code corresponding to the handle will be removed from the JIT."],["Type","Wrapper for a LLVM Type Reference."],["Value","Wrapper for a LLVM Value Reference."]]}); \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html b/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html index 2b943b1..7379b3f 100644 --- a/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html +++ b/llvm_kaleidoscope_rs/llvm/struct.BasicBlock.html @@ -1,19 +1,19 @@ -BasicBlock in llvm_kaleidoscope_rs::llvm - Rust - -

Struct llvm_kaleidoscope_rs::llvm::BasicBlock[][src]

pub struct BasicBlock<'llvm>(_, _);
Expand description

Wrapper for a LLVM Basic Block.

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

-

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +BasicBlock in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::BasicBlock[][src]

pub struct BasicBlock<'llvm>(_, _);
Expand description

Wrapper for a LLVM Basic Block.

+

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Builder.html b/llvm_kaleidoscope_rs/llvm/struct.Builder.html deleted file mode 100644 index dd33e3e..0000000 --- a/llvm_kaleidoscope_rs/llvm/struct.Builder.html +++ /dev/null @@ -1,39 +0,0 @@ -Builder in llvm_kaleidoscope_rs::llvm - Rust - -

Struct llvm_kaleidoscope_rs::llvm::Builder[][src]

pub struct Builder<'llvm> { /* fields omitted */ }
Expand description

Wrapper for a LLVM IR Builder.

-

Implementations

Create a new LLVM IR Builder with the modules context.

-

Panics

-

Panics if creating the IR Builder fails.

-

Position the IR Builder at the end of the given Basic Block.

-

Emit a fadd instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Emit a fsub instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Emit a fmul instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Emit a fcmult instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Emit a uitofp instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Emit a call instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Emit a ret instruction.

-

Panics

-

Panics if LLVM API returns a null pointer.

-

Trait Implementations

Executes the destructor for this type. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.FnValue.html b/llvm_kaleidoscope_rs/llvm/struct.FnValue.html index 64ff22c..ec8f1e6 100644 --- a/llvm_kaleidoscope_rs/llvm/struct.FnValue.html +++ b/llvm_kaleidoscope_rs/llvm/struct.FnValue.html @@ -1,42 +1,42 @@ -FnValue in llvm_kaleidoscope_rs::llvm - Rust - -

Struct llvm_kaleidoscope_rs::llvm::FnValue[][src]

#[repr(transparent)]
pub struct FnValue<'llvm>(_);
Expand description

Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.

-

Implementations

Get a type reference representing the return value of the given function value.

+FnValue in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::FnValue[][src]

#[repr(transparent)]
pub struct FnValue<'llvm>(_);
Expand description

Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.

+

Implementations

Get a type reference representing the return value of the given function value.

Panics

Panics if LLVM API returns a null pointer.

-

Get the number of function arguments for the given function value.

-

Get a value reference for the function argument at index idx.

+

Get the number of function arguments for the given function value.

+

Get a value reference for the function argument at index idx.

Panics

Panics if LLVM API returns a null pointer or indexed out of bounds.

-

Get the number of Basic Blocks for the given function value.

-

Verify that the given function is valid.

-

Methods from Deref<Target = Value<'llvm>>

Dump the LLVM Value to stdout.

-

Get a type reference representing for the given value reference.

+

Get the number of Basic Blocks for the given function value.

+

Verify that the given function is valid.

+

Methods from Deref<Target = Value<'llvm>>

Dump the LLVM Value to stdout.

+

Get a type reference representing for the given value reference.

Panics

Panics if LLVM API returns a null pointer.

-

Set the name for the given value reference.

+

Set the name for the given value reference.

Panics

Panics if LLVM API returns a null pointer.

-

Get the name for the given value reference.

+

Get the name for the given value reference.

Panics

Panics if LLVM API returns a null pointer.

-

Check if value is of f64 type.

-

Check if value is of integer type.

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

The resulting type after dereferencing.

-

Dereferences the value.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

-

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Check if value is of f64 type.

+

Check if value is of integer type.

+

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

The resulting type after dereferencing.

+

Dereferences the value.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.FunctionPassManager.html b/llvm_kaleidoscope_rs/llvm/struct.FunctionPassManager.html new file mode 100644 index 0000000..b31d7f3 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.FunctionPassManager.html @@ -0,0 +1,25 @@ +FunctionPassManager in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::FunctionPassManager[][src]

pub struct FunctionPassManager<'llvm> { /* fields omitted */ }
Expand description

Wrapper for a LLVM Function PassManager (legacy).

+

Implementations

Create a new Function PassManager with the following optimization passes

+
    +
  • InstructionCombiningPass
  • +
  • ReassociatePass
  • +
  • NewGVNPass
  • +
  • CFGSimplificationPass
  • +
+

The list of selected optimization passes is taken from the tutorial chapter LLVM +Optimization Passes.

+

Run the optimization passes registered with the Function PassManager on the function +referenced by fn_value.

+

Trait Implementations

Executes the destructor for this type. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.IRBuilder.html b/llvm_kaleidoscope_rs/llvm/struct.IRBuilder.html new file mode 100644 index 0000000..f8d13a5 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.IRBuilder.html @@ -0,0 +1,39 @@ +IRBuilder in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::IRBuilder[][src]

pub struct IRBuilder<'llvm> { /* fields omitted */ }
Expand description

Wrapper for a LLVM IR Builder.

+

Implementations

Create a new LLVM IR Builder with the modules context.

+

Panics

+

Panics if creating the IR Builder fails.

+

Position the IR Builder at the end of the given Basic Block.

+

Emit a fadd instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Emit a fsub instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Emit a fmul instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Emit a fcmult instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Emit a uitofp instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Emit a call instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Emit a ret instruction.

+

Panics

+

Panics if LLVM API returns a null pointer.

+

Trait Implementations

Executes the destructor for this type. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.LLJit.html b/llvm_kaleidoscope_rs/llvm/struct.LLJit.html new file mode 100644 index 0000000..9ba3405 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.LLJit.html @@ -0,0 +1,25 @@ +LLJit in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::LLJit[][src]

pub struct LLJit { /* fields omitted */ }

Implementations

Create a new LLJit instance.

+

Panics

+

Panics if LLVM API returns a null pointer or an error.

+

Add an LLVM IR module to the JIT. Return a ResourceTracker, which when dropped, will +remove the code of the LLVM IR module from the JIT.

+

Panics

+

Panics if LLVM API returns a null pointer or an error.

+

Find the symbol with the name sym in the JIT.

+

Panics

+

Panics if the symbol is not found in the JIT.

+

Enable lookup of dynamic symbols available in the current process from the JIT.

+

Panics

+

Panics if LLVM API returns an error.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Module.html b/llvm_kaleidoscope_rs/llvm/struct.Module.html index 6d9cb60..71f28fd 100644 --- a/llvm_kaleidoscope_rs/llvm/struct.Module.html +++ b/llvm_kaleidoscope_rs/llvm/struct.Module.html @@ -1,37 +1,37 @@ -Module in llvm_kaleidoscope_rs::llvm - Rust - -

Struct llvm_kaleidoscope_rs::llvm::Module[][src]

pub struct Module { /* fields omitted */ }
Expand description

Wrapper for a LLVM Module with its own LLVM Context.

-

Implementations

Create a new Module instance.

+Module in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::Module[][src]

pub struct Module { /* fields omitted */ }
Expand description

Wrapper for a LLVM Module with its own LLVM Context.

+

Implementations

Create a new Module instance.

Panics

Panics if creating the context or the module fails.

-

Dump LLVM IR emitted into the Module to stdout.

-

Get a type reference representing a f64 float.

+

Dump LLVM IR emitted into the Module to stdout.

+

Get a type reference representing a f64 float.

Panics

Panics if LLVM API returns a null pointer.

-

Get a type reference representing a fn(args) -> ret function.

+

Get a type reference representing a fn(args) -> ret function.

Panics

Panics if LLVM API returns a null pointer.

-

Add a function with the given name and fn_type to the module and return a value +

Add a function with the given name and fn_type to the module and return a value reference representing the function.

Panics

Panics if LLVM API returns a null pointer or name could not be converted to a SmallCStr.

-

Get a function value reference to the function with the given name if it was previously +

Get a function value reference to the function with the given name if it was previously added to the module with add_fn.

Panics

Panics if name could not be converted to a SmallCStr.

-

Append a Basic Block to the end of the function referenced by the value reference +

Append a Basic Block to the end of the function referenced by the value reference fn_value.

Panics

Panics if LLVM API returns a null pointer.

-

Trait Implementations

Executes the destructor for this type. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Trait Implementations

Executes the destructor for this type. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.ResourceTracker.html b/llvm_kaleidoscope_rs/llvm/struct.ResourceTracker.html new file mode 100644 index 0000000..6914c3a --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/struct.ResourceTracker.html @@ -0,0 +1,15 @@ +ResourceTracker in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::ResourceTracker[][src]

pub struct ResourceTracker<'jit>(_, _);
Expand description

A resource handle to code added to an LLJit instance. When a ResourceTracker handle is +dropped, the code corresponding to the handle will be removed from the JIT.

+

Trait Implementations

Executes the destructor for this type. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Type.html b/llvm_kaleidoscope_rs/llvm/struct.Type.html index 51fcaf8..516589d 100644 --- a/llvm_kaleidoscope_rs/llvm/struct.Type.html +++ b/llvm_kaleidoscope_rs/llvm/struct.Type.html @@ -1,23 +1,23 @@ -Type in llvm_kaleidoscope_rs::llvm - Rust - -

Struct llvm_kaleidoscope_rs::llvm::Type[][src]

#[repr(transparent)]
pub struct Type<'llvm>(_, _);
Expand description

Wrapper for a LLVM Type Reference.

-

Implementations

Dump the LLVM Type to stdout.

-

Get a value reference representing the const f64 value.

+Type in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::Type[][src]

#[repr(transparent)]
pub struct Type<'llvm>(_, _);
Expand description

Wrapper for a LLVM Type Reference.

+

Implementations

Dump the LLVM Type to stdout.

+

Get a value reference representing the const f64 value.

Panics

Panics if LLVM API returns a null pointer.

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

-

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/struct.Value.html b/llvm_kaleidoscope_rs/llvm/struct.Value.html index 7f6e117..14d0e81 100644 --- a/llvm_kaleidoscope_rs/llvm/struct.Value.html +++ b/llvm_kaleidoscope_rs/llvm/struct.Value.html @@ -1,31 +1,31 @@ -Value in llvm_kaleidoscope_rs::llvm - Rust - -

Struct llvm_kaleidoscope_rs::llvm::Value[][src]

#[repr(transparent)]
pub struct Value<'llvm>(_, _);
Expand description

Wrapper for a LLVM Value Reference.

-

Implementations

Dump the LLVM Value to stdout.

-

Get a type reference representing for the given value reference.

+Value in llvm_kaleidoscope_rs::llvm - Rust

Struct llvm_kaleidoscope_rs::llvm::Value[][src]

#[repr(transparent)]
pub struct Value<'llvm>(_, _);
Expand description

Wrapper for a LLVM Value Reference.

+

Implementations

Dump the LLVM Value to stdout.

+

Get a type reference representing for the given value reference.

Panics

Panics if LLVM API returns a null pointer.

-

Set the name for the given value reference.

+

Set the name for the given value reference.

Panics

Panics if LLVM API returns a null pointer.

-

Get the name for the given value reference.

+

Get the name for the given value reference.

Panics

Panics if LLVM API returns a null pointer.

-

Check if value is of f64 type.

-

Check if value is of integer type.

-

Trait Implementations

Returns a copy of the value. Read more

-

Performs copy-assignment from source. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The resulting type after obtaining ownership.

-

Creates owned data from borrowed data, usually by cloning. Read more

-
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

-

Uses borrowed data to replace owned data, usually by cloning. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Check if value is of f64 type.

+

Check if value is of integer type.

+

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/type_/struct.Type.html b/llvm_kaleidoscope_rs/llvm/type_/struct.Type.html new file mode 100644 index 0000000..fb8f339 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/type_/struct.Type.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.Type.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/value/struct.FnValue.html b/llvm_kaleidoscope_rs/llvm/value/struct.FnValue.html new file mode 100644 index 0000000..8107d06 --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/value/struct.FnValue.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.FnValue.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/llvm/value/struct.Value.html b/llvm_kaleidoscope_rs/llvm/value/struct.Value.html new file mode 100644 index 0000000..b3cc2ca --- /dev/null +++ b/llvm_kaleidoscope_rs/llvm/value/struct.Value.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../llvm_kaleidoscope_rs/llvm/struct.Value.html...

+ + + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/enum.ExprAST.html b/llvm_kaleidoscope_rs/parser/enum.ExprAST.html index d718684..60d61ee 100644 --- a/llvm_kaleidoscope_rs/parser/enum.ExprAST.html +++ b/llvm_kaleidoscope_rs/parser/enum.ExprAST.html @@ -1,27 +1,25 @@ -ExprAST in llvm_kaleidoscope_rs::parser - Rust - -

Enum llvm_kaleidoscope_rs::parser::ExprAST[][src]

pub enum ExprAST {
-    Number(f64),
-    Variable(String),
-    Binary(charBox<ExprAST>, Box<ExprAST>),
-    Call(StringVec<ExprAST>),
-}

- Variants

-
Number(f64)

Number - Expression class for numeric literals like “1.0”.

-
Variable(String)

Variable - Expression class for referencing a variable, like “a”.

-
Binary(charBox<ExprAST>, Box<ExprAST>)

Binary - Expression class for a binary operator.

-
Call(StringVec<ExprAST>)

Call - Expression class for function calls.

-

Trait Implementations

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +ExprAST in llvm_kaleidoscope_rs::parser - Rust

Enum llvm_kaleidoscope_rs::parser::ExprAST[][src]

pub enum ExprAST {
+    Number(f64),
+    Variable(String),
+    Binary(charBox<ExprAST>, Box<ExprAST>),
+    Call(StringVec<ExprAST>),
+}

Variants

Number(f64)

Number - Expression class for numeric literals like “1.0”.

+
Variable(String)

Variable - Expression class for referencing a variable, like “a”.

+
Binary(charBox<ExprAST>, Box<ExprAST>)

Binary - Expression class for a binary operator.

+
Call(StringVec<ExprAST>)

Call - Expression class for function calls.

+

Trait Implementations

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/index.html b/llvm_kaleidoscope_rs/parser/index.html index 79a8a5c..9974ef7 100644 --- a/llvm_kaleidoscope_rs/parser/index.html +++ b/llvm_kaleidoscope_rs/parser/index.html @@ -1,10 +1,10 @@ -llvm_kaleidoscope_rs::parser - Rust - -

Module llvm_kaleidoscope_rs::parser[][src]

Structs

-
FunctionAST

FunctionAST - This class represents a function definition itself.

-
Parser

Parser for the kaleidoscope language.

-
PrototypeAST

PrototypeAST - This class represents the “prototype” for a function, +llvm_kaleidoscope_rs::parser - Rust

Module llvm_kaleidoscope_rs::parser[][src]

Structs

+

FunctionAST - This class represents a function definition itself.

+

Parser for the kaleidoscope language.

+

PrototypeAST - This class represents the “prototype” for a function, which captures its name, and its argument names (thus implicitly the number of arguments the function takes).

-

Enums

-
ExprAST
\ No newline at end of file +

Enums

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html b/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html index 9592bbb..6ffdd4f 100644 --- a/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html +++ b/llvm_kaleidoscope_rs/parser/struct.FunctionAST.html @@ -1,17 +1,17 @@ -FunctionAST in llvm_kaleidoscope_rs::parser - Rust - -

Struct llvm_kaleidoscope_rs::parser::FunctionAST[][src]

pub struct FunctionAST(pub PrototypeAST, pub ExprAST);
Expand description

FunctionAST - This class represents a function definition itself.

-

Trait Implementations

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +FunctionAST in llvm_kaleidoscope_rs::parser - Rust

Struct llvm_kaleidoscope_rs::parser::FunctionAST[][src]

pub struct FunctionAST(pub PrototypeAST, pub ExprAST);
Expand description

FunctionAST - This class represents a function definition itself.

+

Trait Implementations

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/struct.Parser.html b/llvm_kaleidoscope_rs/parser/struct.Parser.html index 860dfc4..36154fe 100644 --- a/llvm_kaleidoscope_rs/parser/struct.Parser.html +++ b/llvm_kaleidoscope_rs/parser/struct.Parser.html @@ -1,24 +1,24 @@ -Parser in llvm_kaleidoscope_rs::parser - Rust - -

Struct llvm_kaleidoscope_rs::parser::Parser[][src]

pub struct Parser<I> where
    I: Iterator<Item = char>, 
{ /* fields omitted */ }
Expand description

Parser for the kaleidoscope language.

-

Implementations

Implement the global variable int CurTok; from the tutorial.

+Parser in llvm_kaleidoscope_rs::parser - Rust

Struct llvm_kaleidoscope_rs::parser::Parser[][src]

pub struct Parser<I> where
    I: Iterator<Item = char>, 
{ /* fields omitted */ }
Expand description

Parser for the kaleidoscope language.

+

Implementations

Implement the global variable int CurTok; from the tutorial.

Panics

Panics if the parser doesn’t have a current token.

-

Advance the cur_tok by getting the next token from the lexer.

+

Advance the cur_tok by getting the next token from the lexer.

Implement the fucntion int getNextToken(); from the tutorial.

-

definition ::= ‘def’ prototype expression

+

definition ::= ‘def’ prototype expression

Implement std::unique_ptr<FunctionAST> ParseDefinition(); from the tutorial.

-

external ::= ‘extern’ prototype

+

external ::= ‘extern’ prototype

Implement std::unique_ptr<PrototypeAST> ParseExtern(); from the tutorial.

-

toplevelexpr ::= expression

+

toplevelexpr ::= expression

Implement std::unique_ptr<FunctionAST> ParseTopLevelExpr(); from the tutorial.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html b/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html index 96148d4..f8bab49 100644 --- a/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html +++ b/llvm_kaleidoscope_rs/parser/struct.PrototypeAST.html @@ -1,19 +1,25 @@ -PrototypeAST in llvm_kaleidoscope_rs::parser - Rust - -

Struct llvm_kaleidoscope_rs::parser::PrototypeAST[][src]

pub struct PrototypeAST(pub String, pub Vec<String>);
Expand description

PrototypeAST - This class represents the “prototype” for a function, +PrototypeAST in llvm_kaleidoscope_rs::parser - Rust

Struct llvm_kaleidoscope_rs::parser::PrototypeAST[][src]

pub struct PrototypeAST(pub String, pub Vec<String>);
Expand description

PrototypeAST - This class represents the “prototype” for a function, which captures its name, and its argument names (thus implicitly the number of arguments the function takes).

-

Trait Implementations

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Trait Implementations

Returns a copy of the value. Read more

+

Performs copy-assignment from source. Read more

+

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The resulting type after obtaining ownership.

+

Creates owned data from borrowed data, usually by cloning. Read more

+
🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

+

Uses borrowed data to replace owned data, usually by cloning. Read more

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/llvm_kaleidoscope_rs/struct.SmallCStr.html b/llvm_kaleidoscope_rs/struct.SmallCStr.html index 7f8df75..e0d7625 100644 --- a/llvm_kaleidoscope_rs/struct.SmallCStr.html +++ b/llvm_kaleidoscope_rs/struct.SmallCStr.html @@ -1,23 +1,23 @@ -SmallCStr in llvm_kaleidoscope_rs - Rust - -

Struct llvm_kaleidoscope_rs::SmallCStr[][src]

pub struct SmallCStr(_);
Expand description

Small C string on the stack with fixed size SMALL_STR_SIZE.

+SmallCStr in llvm_kaleidoscope_rs - Rust

Struct llvm_kaleidoscope_rs::SmallCStr[][src]

pub struct SmallCStr(_);
Expand description

Small C string on the stack with fixed size SMALL_STR_SIZE.

This is specially crafted to interact with the LLVM C API and get rid of some heap allocations.

-

Implementations

Create a new C string from src. -Returns None if src exceeds the fixed size or contains any \0 bytes.

-

Return pointer to C string.

-

Trait Implementations

Formats the value using the given formatter. Read more

-

This method tests for self and other values to be equal, and is used -by ==. Read more

-

This method tests for !=.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Performs the conversion.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file +

Implementations

Create a new C string from src. +Returns None if src exceeds the fixed size or contains any \0 bytes.

+

Return pointer to C string.

+

Trait Implementations

Formats the value using the given formatter. Read more

+

This method tests for self and other values to be equal, and is used +by ==. Read more

+

This method tests for !=.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Immutably borrows from an owned value. Read more

+

Mutably borrows from an owned value. Read more

+

Performs the conversion.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+

The type returned in the event of a conversion error.

+

Performs the conversion.

+
+ + \ No newline at end of file diff --git a/main.js b/main.js index a4d3fe4..f365539 100644 --- a/main.js +++ b/main.js @@ -1,4 +1,4 @@ -if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value;window.searchIndexJS=rustdocVars.attributes["data-search-index-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=["ayu","dark","light"];function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});search_input.removeAttribute('disabled');searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function toggleAllDocs(){var innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}var sectionIsCollapsed=false;if(hasClass(innerToggle,"will-expand")){removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs"}else{addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(e.parentNode.id!=="main"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});sectionIsCollapsed=true;innerToggle.title="expand all docs"}innerToggle.children[0].innerText=labelForToggleButton(sectionIsCollapsed)}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var hideImplementations=getSettingValue("auto-hide-trait-implementations")!=="false";var hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function openImplementors(id){var list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),function(e){e.open=true})}}if(!hideImplementations){openImplementors("trait-implementations-list");openImplementors("blanket-implementations-list")}if(!hideImplementors){openImplementors("implementors-list")}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),function(e){if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});var pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());(function(){var lineNumbersFunc=function(){};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value;window.searchIndexJS=rustdocVars.attributes["data-search-index-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=["ayu","dark","light"];function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});search_input.removeAttribute('disabled');searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i .in-band > .trait").textContent;var baseIdName="impl-"+traitName+"-";var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"
"+x[0].split(" ").map(function(y,index){return(index&1)===0?""+y+"":" "+y+" "}).join("")+"
"+x[1]+"
"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ enum, trait, type, macro, \ diff --git a/normalize.css b/normalize.css index 6d692b5..469959f 100644 --- a/normalize.css +++ b/normalize.css @@ -1,2 +1,2 @@ - /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/rustdoc.css b/rustdoc.css index 9b9be79..651e73c 100644 --- a/rustdoc.css +++ b/rustdoc.css @@ -1 +1 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff") format('woff');font-display:swap;}@font-face {font-family:'Noto Sans KR';src:url("noto-sans-kr-v13-korean-regular.woff") format("woff");font-display:swap;unicode-range:U+A960-A97F,U+AC00-D7AF,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif 4","Noto Sans KR",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3,h4{font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{display:flex;border-bottom:1px dashed;margin-top:0;padding-left:1px;}h1.fqn>.in-band>a:hover{text-decoration:underline;}#main>h2,#main>h3,#main>h4{border-bottom:1px solid;}h3.code-header,h4.code-header{font-size:1em;font-weight:600;border:none;padding:0;margin:0;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}.impl,.method.trait-impl,.type.trait-impl,.associatedconstant.trait-impl,.associatedtype.trait-impl{padding-left:15px;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,div.item-list .out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,details.undocumented>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main>ul.docblock>li>a{font-family:"Fira Sans",Arial,sans-serif;}.content ul.crate a.crate{font-size:16px/1.6;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code{padding:0;padding-right:1ex;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;font-weight:inherit;padding:0;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.location a:hover{text-decoration:underline;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;font-weight:inherit;padding:0;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}.top-doc .docblock h1{font-size:1.3em;}.top-doc .docblock h2{font-size:1.15em;}.top-doc .docblock h3,.top-doc .docblock h4,.top-doc .docblock h5{font-size:1em;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{flex-grow:0;text-align:right;font-size:23px;margin:0px;padding:0 0 0 12px;font-weight:normal;}.method>.code-header,.trait-impl>.code-header,.invisible>.code-header{max-width:calc(100% - 41px);display:block;flex-grow:1;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;}.in-band>code,.in-band>.code-header{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-6px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:0px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype,.content .impl-items details>summary>.type,.impl-items details>summary>.associatedconstant,.impl-items details>summary>.associatedtype{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,.method>.code-header+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:6px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.has-srclink{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.code-attribute{font-weight:300;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.sub-variant,.sub-variant>h3{margin-top:0px !important;padding-top:1px;}#main>details>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}#main>.variant,#main>.structfield{display:block;}:target>code,:target>.code-header{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:19px;font-weight:600;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,#help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:17px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary,details.undocumented>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker,details.undocumented>summary::-webkit-details-marker,details.undocumented>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"[+]";font-weight:300;font-size:0.8em;letter-spacing:1px;cursor:pointer;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:16px;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-23px;top:3px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,.undocumented>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-2px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle,details.undocumented{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before{content:"[−]";display:inline;}details.undocumented>summary::before{content:"[+] Show hidden undocumented items";cursor:pointer;font-size:16px;font-weight:300;}details.undocumented[open] >summary::before{content:"[−] Hide undocumented items";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;top:45px;bottom:0;width:246px;left:-246px;overflow-y:auto;border-right:1px solid;}.sidebar>.block.version{border-bottom:none;margin-top:12px;margin-bottom:0;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype{display:flex;}.anchor{display:none !important;}.theme-picker{left:10px;top:54px;z-index:1;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it{left:0;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main>details.rustdoc-toggle>summary::before,#main>div>details.rustdoc-toggle>summary::before{left:-11px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.search-container>div{width:calc(100% - 32px);}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description{padding-left:2em;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}} \ No newline at end of file + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2"),url("FiraSans-Regular.woff") format('woff');font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2"),url("FiraSans-Medium.woff") format('woff');font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2"),url("SourceSerif4-Regular.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2"),url("SourceSerif4-It.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2"),url("SourceSerif4-Bold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2"),url("SourceCodePro-Regular.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2"),url("SourceCodePro-It.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),url("SourceCodePro-Semibold.ttf.woff") format("woff");font-display:swap;}@font-face {font-family:'Noto Sans KR';src:url("noto-sans-kr-v13-korean-regular.woff") format("woff");font-display:swap;unicode-range:U+A960-A97F,U+AC00-D7AF,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif 4","Noto Sans KR",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3,h4{font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{display:flex;border-bottom:1px dashed;margin-top:0;padding-left:1px;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3,h4{border-bottom:1px solid;}h3.code-header,h4.code-header{font-size:1em;font-weight:600;border:none;padding:0;margin:0;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}.impl,.method.trait-impl,.type.trait-impl,.associatedconstant.trait-impl,.associatedtype.trait-impl{padding-left:15px;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,div.item-list .out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,details.undocumented>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main>ul.docblock>li>a{font-family:"Fira Sans",Arial,sans-serif;}.content ul.crate a.crate{font-size:16px/1.6;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code{padding:0;padding-right:1ex;}pre{padding:14px;}.type-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;height:100%;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;font-weight:inherit;padding:0;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.location a:hover{text-decoration:underline;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;font-weight:inherit;padding:0;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}.top-doc .docblock h1{font-size:1.3em;}.top-doc .docblock h2{font-size:1.15em;}.top-doc .docblock h3,.top-doc .docblock h4,.top-doc .docblock h5{font-size:1em;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{flex-grow:0;text-align:right;font-size:23px;margin:0px;padding:0 0 0 12px;font-weight:normal;}.method>.code-header,.trait-impl>.code-header,.invisible>.code-header{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;}.in-band>code,.in-band>.code-header{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant,.impl-items>.associatedtype,.content .impl-items details>summary>.type,.impl-items details>summary>.associatedconstant,.impl-items details>summary>.associatedtype{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,.method>.code-header+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.item-table{display:grid;column-gap:1.2rem;row-gap:0.0rem;grid-template-columns:auto 1fr;justify-items:start;}.item-left,.item-right{display:block;}.item-left{grid-column:1;}.item-right{grid-column:2;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{min-width:115px;margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.item-info .stab{display:table;}.stab{border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.5em;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-left:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.impl-items .since,.impl .since,.methods .since{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-size:17px;font-weight:normal;}.rightside{float:right;}.has-srclink{font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.code-attribute{font-weight:300;}.since+.srclink{padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.sub-variant,.sub-variant>h3{margin-top:0px !important;padding-top:1px;}#main .sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:19px;font-weight:600;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,#help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}#theme-picker,#settings-menu,#help-button,#copy-path{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#help-button{right:30px;font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:17px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary,details.undocumented>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker,details.undocumented>summary::-webkit-details-marker,details.undocumented>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"[+]";font-weight:300;font-size:0.8em;letter-spacing:1px;cursor:pointer;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:16px;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-23px;top:3px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,.undocumented>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-2px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle,details.undocumented{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.rustdoc-toggle[open] >summary::before{content:"[−]";display:inline;}details.undocumented>summary::before{content:"[+] Show hidden undocumented items";cursor:pointer;font-size:16px;font-weight:300;}details.undocumented[open] >summary::before{content:"[−] Hide undocumented items";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;top:45px;bottom:0;width:246px;left:-246px;overflow-y:auto;border-right:1px solid;}.sidebar>.block.version{overflow:hidden;border-bottom:none;margin-bottom:0;height:100%;padding-left:12px;}.sidebar>.block.version>div.narrow-helper{float:left;width:1px;height:100%;}.sidebar>.block.version>p{margin:0;min-width:55px;display:flex;align-items:center;height:100%;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}#search{margin-left:0;}.anchor{display:none !important;}.theme-picker{left:10px;top:54px;z-index:1;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it,.sidebar-elems:focus-within{z-index:2;left:0;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main>details.rustdoc-toggle>summary::before,#main>div>details.rustdoc-toggle>summary::before{left:-11px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-container>div{width:calc(100% - 32px);}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}} \ No newline at end of file diff --git a/search-index.js b/search-index.js index 22e30cf..333a64c 100644 --- a/search-index.js +++ b/search-index.js @@ -1,4 +1,4 @@ var searchIndex = JSON.parse('{\ -"llvm_kaleidoscope_rs":{"doc":"","t":[13,13,4,17,3,11,11,11,11,11,0,11,11,11,11,11,11,0,0,11,11,0,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,13,13,13,13,13,3,13,4,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,3,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,4,3,13,3,3,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["A","B","Either","SMALL_STR_SIZE","SmallCStr","as_ptr","borrow","borrow","borrow_mut","borrow_mut","codegen","eq","fmt","from","from","into","into","lexer","llvm","ne","new","parser","try_from","try_from","try_from","try_into","try_into","type_id","type_id","Codegen","borrow","borrow_mut","compile","from","into","try_from","try_into","type_id","Char","Def","Eof","Extern","Identifier","Lexer","Number","Token","borrow","borrow","borrow_mut","borrow_mut","eq","fmt","from","from","gettok","into","into","ne","new","try_from","try_from","try_into","try_into","type_id","type_id","BasicBlock","Builder","FnValue","Module","Type","Value","add_fn","append_basic_block","arg","args","basic_blocks","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","call","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","const_f64","deref","drop","drop","dump","dump","dump","fadd","fcmpult","fmul","from","from","from","from","from","from","fsub","get_fn","get_name","into","into","into","into","into","into","is_f64","is_int","new","pos_at_end","ret","ret_type","set_name","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_f64","type_fn","type_id","type_id","type_id","type_id","type_id","type_id","type_of","uitofp","verify","with_ctx","0","0","1","1","Binary","Call","ExprAST","FunctionAST","Number","Parser","PrototypeAST","Variable","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cur_tok","eq","eq","eq","fmt","fmt","fmt","from","from","from","from","get_next_token","into","into","into","into","ne","ne","ne","new","parse_definition","parse_extern","parse_top_level_expr","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id"],"q":["llvm_kaleidoscope_rs","","","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::codegen","","","","","","","","","llvm_kaleidoscope_rs::lexer","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::llvm","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::parser","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["","","Either type, for APIs accepting two types.","Fixed size of [SmallCStr] including the trailing \\\\0 byte.","Small C string on the stack with fixed size […","Return pointer to C string.","","","","","","","","","","","","","Safe wrapper around the LLVM C API.","","Create a new C string from src. Returns [None] if src …","","","","","","","","","Code generator from kaleidoscope AST to LLVM IR.","","","Compile either a [PrototypeAST] or a [FunctionAST] into …","","","","","","","","","","","","","","","","","","","","","","Lex and return the next token.","","","","","","","","","","","Wrapper for a LLVM Basic Block.","Wrapper for a LLVM IR Builder.","Wrapper for a LLVM Value Reference specialized for …","Wrapper for a LLVM Module with its own LLVM Context.","Wrapper for a LLVM Type Reference.","Wrapper for a LLVM Value Reference.","Add a function with the given name and fn_type to the …","Append a Basic Block to the end of the function …","Get a value reference for the function argument at index …","Get the number of function arguments for the given …","Get the number of Basic Blocks for the given function …","","","","","","","","","","","","","Emit a call instruction.","","","","","","","","","Get a value reference representing the const f64 value.","","","","Dump LLVM IR emitted into the Module to stdout.","Dump the LLVM Type to stdout.","Dump the LLVM Value to stdout.","Emit a fadd instruction.","Emit a fcmult instruction.","Emit a fmul instruction.","","","","","","","Emit a fsub instruction.","Get a function value reference to the function with the …","Get the name for the given value reference.","","","","","","","Check if value is of f64 type.","Check if value is of integer type.","Create a new Module instance.","Position the IR Builder at the end of the given Basic …","Emit a ret instruction.","Get a type reference representing the return value of the …","Set the name for the given value reference.","","","","","","","","","","","","","","","","","Get a type reference representing a f64 float.","Get a type reference representing a fn(args) -> ret …","","","","","","","Get a type reference representing for the given value …","Emit a uitofp instruction.","Verify that the given function is valid.","Create a new LLVM IR Builder with the modules context.","","","","","Binary - Expression class for a binary operator.","Call - Expression class for function calls.","","FunctionAST - This class represents a function definition …","Number - Expression class for numeric literals like “1.0…","Parser for the kaleidoscope language.","PrototypeAST - This class represents the “prototype” …","Variable - Expression class for referencing a variable, …","","","","","","","","","Implement the global variable int CurTok; from the …","","","","","","","","","","","Advance the cur_tok by getting the next token from the …","","","","","","","","","definition ::= ‘def’ prototype expression","external ::= ‘extern’ prototype","toplevelexpr ::= expression","","","","","","","","","","","",""],"i":[1,1,0,0,0,2,1,2,1,2,0,2,2,1,2,1,2,0,0,2,2,0,1,2,2,1,2,1,2,0,3,3,3,3,3,3,3,3,4,4,4,4,4,0,4,0,5,4,5,4,4,4,5,4,5,5,4,4,5,5,4,5,4,5,4,0,0,0,0,0,0,6,6,7,7,7,6,8,9,10,11,7,6,8,9,10,11,7,8,9,10,11,7,9,10,11,7,10,7,6,8,6,10,11,8,8,8,6,8,9,10,11,7,8,6,11,6,8,9,10,11,7,11,11,6,8,8,7,11,9,10,11,7,6,8,9,10,11,7,6,8,9,10,11,7,6,6,6,8,9,10,11,7,11,8,7,8,12,13,12,13,14,14,0,0,14,0,0,14,15,14,12,13,15,14,12,13,15,14,12,13,14,12,13,15,14,12,13,15,15,14,12,13,14,12,13,15,15,15,15,15,14,12,13,15,14,12,13,15,14,12,13],"f":[null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],null,[[["smallcstr",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],null,null,[[["smallcstr",3]],["bool",15]],[[],[["option",4],["smallcstr",3]]],null,[[],["result",4]],[[["str",15]],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],null,[[]],[[]],[[["either",4],["prototypeast",3],["module",3],["functionast",3]],[["string",3],["result",4],["fnvalue",3]]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[["token",4]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[]],[[],["token",4]],[[]],[[]],[[["token",4]],["bool",15]],[[],["lexer",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],null,null,null,null,null,null,[[["str",15],["type",3]],["fnvalue",3]],[[["fnvalue",3]],["basicblock",3]],[[["usize",15]],["value",3]],[[],["usize",15]],[[],["usize",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["fnvalue",3]],["value",3]],[[],["basicblock",3]],[[],["type",3]],[[],["value",3]],[[],["fnvalue",3]],[[]],[[]],[[]],[[]],[[["f64",15]],["value",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[["value",3]],["value",3]],[[["value",3]],["value",3]],[[["value",3]],["value",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[["value",3]],["value",3]],[[["str",15]],[["option",4],["fnvalue",3]]],[[],["str",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["bool",15]],[[],["bool",15]],[[]],[[["basicblock",3]]],[[["value",3]]],[[],["type",3]],[[["str",15]]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["type",3]],[[["type",3]],["type",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["type",3]],[[["type",3],["value",3]],["value",3]],[[],["bool",15]],[[["module",3]],["builder",3]],null,null,null,null,null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["token",4]],[[["exprast",4]],["bool",15]],[[["prototypeast",3]],["bool",15]],[[["functionast",3]],["bool",15]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["exprast",4]],["bool",15]],[[["prototypeast",3]],["bool",15]],[[["functionast",3]],["bool",15]],[[["lexer",3]]],[[],[["functionast",3],["result",4],["string",3]]],[[],[["result",4],["string",3],["prototypeast",3]]],[[],[["functionast",3],["result",4],["string",3]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[4,"Either"],[3,"SmallCStr"],[3,"Codegen"],[4,"Token"],[3,"Lexer"],[3,"Module"],[3,"FnValue"],[3,"Builder"],[3,"BasicBlock"],[3,"Type"],[3,"Value"],[3,"PrototypeAST"],[3,"FunctionAST"],[4,"ExprAST"],[3,"Parser"]]}\ +"llvm_kaleidoscope_rs":{"doc":"","t":[13,13,4,17,3,11,11,11,11,11,0,11,11,11,11,11,11,0,0,11,11,0,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,13,13,13,13,13,3,13,4,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,3,3,3,3,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,13,13,4,3,13,3,3,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["A","B","Either","SMALL_STR_SIZE","SmallCStr","as_ptr","borrow","borrow","borrow_mut","borrow_mut","codegen","eq","fmt","from","from","into","into","lexer","llvm","ne","new","parser","try_from","try_from","try_from","try_into","try_into","type_id","type_id","Codegen","borrow","borrow_mut","compile","from","into","try_from","try_into","type_id","Char","Def","Eof","Extern","Identifier","Lexer","Number","Token","borrow","borrow","borrow_mut","borrow_mut","eq","fmt","from","from","gettok","into","into","ne","new","try_from","try_from","try_into","try_into","type_id","type_id","BasicBlock","FnValue","FunctionPassManager","IRBuilder","LLJit","Module","ResourceTracker","Type","Value","add_fn","add_module","append_basic_block","arg","args","basic_blocks","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","call","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","const_f64","deref","drop","drop","drop","drop","dump","dump","dump","enable_process_symbols","fadd","fcmpult","find_symbol","fmul","from","from","from","from","from","from","from","from","from","fsub","get_fn","get_name","initialize_native_taget","into","into","into","into","into","into","into","into","into","is_f64","is_int","new","new","pos_at_end","ret","ret_type","run","set_name","shutdown","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_f64","type_fn","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_of","uitofp","verify","with_ctx","with_ctx","0","0","1","1","Binary","Call","ExprAST","FunctionAST","Number","Parser","PrototypeAST","Variable","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","cur_tok","eq","eq","eq","fmt","fmt","fmt","from","from","from","from","get_next_token","into","into","into","into","ne","ne","ne","new","parse_definition","parse_extern","parse_top_level_expr","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id"],"q":["llvm_kaleidoscope_rs","","","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::codegen","","","","","","","","","llvm_kaleidoscope_rs::lexer","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::llvm","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","llvm_kaleidoscope_rs::parser","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["","","Either type, for APIs accepting two types.","Fixed size of SmallCStr including the trailing \\\\0 byte.","Small C string on the stack with fixed size SMALL_STR_SIZE…","Return pointer to C string.","","","","","","","","","","","","","Safe wrapper around the LLVM C API.","","Create a new C string from src. Returns None if src …","","","","","","","","","Code generator from kaleidoscope AST to LLVM IR.","","","Compile either a PrototypeAST or a FunctionAST into the …","","","","","","","","","","","","","","","","","","","","","","Lex and return the next token.","","","","","","","","","","","Wrapper for a LLVM Basic Block.","Wrapper for a LLVM Value Reference specialized for …","Wrapper for a LLVM Function PassManager (legacy).","Wrapper for a LLVM IR Builder.","","Wrapper for a LLVM Module with its own LLVM Context.","A resource handle to code added to an LLJit instance. …","Wrapper for a LLVM Type Reference.","Wrapper for a LLVM Value Reference.","Add a function with the given name and fn_type to the …","Add an LLVM IR module to the JIT. Return a ResourceTracker…","Append a Basic Block to the end of the function …","Get a value reference for the function argument at index …","Get the number of function arguments for the given …","Get the number of Basic Blocks for the given function …","","","","","","","","","","","","","","","","","","","Emit a call instruction.","","","","","","","","","Get a value reference representing the const f64 value.","","","","","","Dump LLVM IR emitted into the Module to stdout.","Dump the LLVM Type to stdout.","Dump the LLVM Value to stdout.","Enable lookup of dynamic symbols available in the current …","Emit a fadd instruction.","Emit a fcmult instruction.","Find the symbol with the name sym in the JIT.","Emit a fmul instruction.","","","","","","","","","","Emit a fsub instruction.","Get a function value reference to the function with the …","Get the name for the given value reference.","Initialize native target for corresponding to host …","","","","","","","","","","Check if value is of f64 type.","Check if value is of integer type.","Create a new LLJit instance.","Create a new Module instance.","Position the IR Builder at the end of the given Basic …","Emit a ret instruction.","Get a type reference representing the return value of the …","Run the optimization passes registered with the Function …","Set the name for the given value reference.","Deallocate and destroy all “ManagedStatic” variables.","","","","","","","","","","","","","","","","","","","","","","","Get a type reference representing a f64 float.","Get a type reference representing a fn(args) -> ret …","","","","","","","","","","Get a type reference representing for the given value …","Emit a uitofp instruction.","Verify that the given function is valid.","Create a new LLVM IR Builder with the modules context.","Create a new Function PassManager with the following …","","","","","Binary - Expression class for a binary operator.","Call - Expression class for function calls.","","FunctionAST - This class represents a function definition …","Number - Expression class for numeric literals like “1.0…","Parser for the kaleidoscope language.","PrototypeAST - This class represents the “prototype” …","Variable - Expression class for referencing a variable, …","","","","","","","","","","","Implement the global variable int CurTok; from the …","","","","","","","","","","","Advance the cur_tok by getting the next token from the …","","","","","","","","","definition ::= ‘def’ prototype expression","external ::= ‘extern’ prototype","toplevelexpr ::= expression","","","","","","","","","","","","",""],"i":[1,1,0,0,0,2,1,2,1,2,0,2,2,1,2,1,2,0,0,2,2,0,1,2,2,1,2,1,2,0,3,3,3,3,3,3,3,3,4,4,4,4,4,0,4,0,5,4,5,4,4,4,5,4,5,5,4,4,5,5,4,5,4,5,4,0,0,0,0,0,0,0,0,0,6,7,6,8,8,8,9,7,10,6,11,12,13,8,14,9,7,10,6,11,12,13,8,14,9,12,13,8,14,12,13,8,14,12,8,9,10,6,11,6,12,13,7,9,9,7,9,9,7,10,6,11,12,13,8,14,9,6,13,0,9,7,10,6,11,12,13,8,14,13,13,7,6,9,9,8,11,13,0,12,13,8,14,9,7,10,6,11,12,13,8,14,9,7,10,6,11,12,13,8,14,6,6,9,7,10,6,11,12,13,8,14,13,9,8,9,11,15,16,15,16,17,17,0,0,17,0,0,17,18,17,15,16,18,17,15,16,15,15,18,17,15,16,17,15,16,18,17,15,16,18,18,17,15,16,17,15,16,18,18,18,18,15,18,17,15,16,18,17,15,16,18,17,15,16],"f":[null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],null,[[["smallcstr",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],null,null,[[["smallcstr",3]],["bool",15]],[[],[["option",4,["smallcstr"]],["smallcstr",3]]],null,[[],["result",4]],[[["str",15]],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],null,[[]],[[]],[[["prototypeast",3],["module",3],["hashmap",3],["either",4,["prototypeast","functionast"]],["functionast",3]],[["string",3],["result",4,["fnvalue","string"]],["fnvalue",3]]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[["token",4]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[]],[[],["token",4]],[[]],[[]],[[["token",4]],["bool",15]],[[],["lexer",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],null,null,null,null,null,null,null,null,null,[[["type",3],["str",15]],["fnvalue",3]],[[["module",3]],["resourcetracker",3]],[[["fnvalue",3]],["basicblock",3]],[[["usize",15]],["value",3]],[[],["usize",15]],[[],["usize",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["fnvalue",3]],["value",3]],[[],["type",3]],[[],["value",3]],[[],["fnvalue",3]],[[],["basicblock",3]],[[]],[[]],[[]],[[]],[[["f64",15]],["value",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["value",3]],["value",3]],[[["value",3]],["value",3]],[[["str",15]],["jitfn",8]],[[["value",3]],["value",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["value",3]],["value",3]],[[["str",15]],[["option",4,["fnvalue"]],["fnvalue",3]]],[[],["str",15]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["bool",15]],[[],["bool",15]],[[],["lljit",3]],[[]],[[["basicblock",3]]],[[["value",3]]],[[],["type",3]],[[["fnvalue",3]]],[[["str",15]]],[[]],[[]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["type",3]],[[["type",3]],["type",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["type",3]],[[["type",3],["value",3]],["value",3]],[[],["bool",15]],[[["module",3]],["irbuilder",3]],[[["module",3]],["functionpassmanager",3]],null,null,null,null,null,null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["prototypeast",3]],[[]],[[],["token",4]],[[["exprast",4]],["bool",15]],[[["prototypeast",3]],["bool",15]],[[["functionast",3]],["bool",15]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["exprast",4]],["bool",15]],[[["prototypeast",3]],["bool",15]],[[["functionast",3]],["bool",15]],[[["lexer",3]]],[[],[["string",3],["result",4,["functionast","string"]],["functionast",3]]],[[],[["string",3],["prototypeast",3],["result",4,["prototypeast","string"]]]],[[],[["string",3],["result",4,["functionast","string"]],["functionast",3]]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[4,"Either"],[3,"SmallCStr"],[3,"Codegen"],[4,"Token"],[3,"Lexer"],[3,"Module"],[3,"LLJit"],[3,"FnValue"],[3,"IRBuilder"],[3,"ResourceTracker"],[3,"FunctionPassManager"],[3,"Type"],[3,"Value"],[3,"BasicBlock"],[3,"PrototypeAST"],[3,"FunctionAST"],[4,"ExprAST"],[3,"Parser"]]}\ }'); if (window.initSearch) {window.initSearch(searchIndex)}; \ No newline at end of file diff --git a/search.js b/search.js index af0714e..91de2a1 100644 --- a/search.js +++ b/search.js @@ -1 +1 @@ -(function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectNameFromId(id){if(typeof id==="number"){return searchIndex[id].name}return id}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev,j;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var duplicates={};var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results){var search=searchState.outputElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText)){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
";var resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() \ No newline at end of file +(function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}}}else if(literalSearch){if((!val.generics||val.generics.length===0)&&obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev,j;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(typePassesFilter(typeFilter,ty.ty)&&(index!==-1||lev<=MAX_LEV_DISTANCE)){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var duplicates={};var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first){var search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){var elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}var query=getQuery(searchState.input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
";var resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}function tokenizeQuery(raw){var i,matched;var l=raw.length;var depth=0;var nextAngle=/(<|>)/g;var ret=[];var start=0;for(i=0;i'){depth+=1}break;case">":if(depth>0){depth-=1}break;case",":if(depth===0){ret.push(raw.substring(start,i));start=i+1}break}}if(start!==i){ret.push(raw.substring(start,i))}return ret}var queries=tokenizeQuery(query.raw);var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates),params.go_to_first)}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() \ No newline at end of file diff --git a/settings.html b/settings.html index f623d7c..b51da3b 100644 --- a/settings.html +++ b/settings.html @@ -1,4 +1,4 @@ -Rustdoc settings - -

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
-
Auto-hide item contents for large items.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file +Rustdoc settings

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item contents for large items.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
+ + \ No newline at end of file diff --git a/source-files.js b/source-files.js index 5d7863a..93c7984 100644 --- a/source-files.js +++ b/source-files.js @@ -1,3 +1,3 @@ var N = null;var sourcesIndex = {}; -sourcesIndex["llvm_kaleidoscope_rs"] = {"name":"","files":["codegen.rs","lexer.rs","lib.rs","llvm.rs","parser.rs"]}; +sourcesIndex["llvm_kaleidoscope_rs"] = {"name":"","dirs":[{"name":"llvm","files":["builder.rs","lljit.rs","mod.rs","module.rs","pass_manager.rs","type_.rs","value.rs"]}],"files":["codegen.rs","lexer.rs","lib.rs","parser.rs"]}; createSourceSidebar(); diff --git a/src/llvm_kaleidoscope_rs/codegen.rs.html b/src/llvm_kaleidoscope_rs/codegen.rs.html index bcaa770..e94ac8d 100644 --- a/src/llvm_kaleidoscope_rs/codegen.rs.html +++ b/src/llvm_kaleidoscope_rs/codegen.rs.html @@ -1,6 +1,4 @@ -codegen.rs - source - -
  1
+codegen.rs - source
  1
   2
   3
   4
@@ -135,10 +133,37 @@
 133
 134
 135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
 
 use std::collections::HashMap;
 
-use crate::llvm::{Builder, FnValue, Module, Value};
+use crate::llvm::{FnValue, FunctionPassManager, IRBuilder, Module, Value};
 use crate::parser::{ExprAST, FunctionAST, PrototypeAST};
 use crate::Either;
 
@@ -147,18 +172,23 @@
 /// Code generator from kaleidoscope AST to LLVM IR.
 pub struct Codegen<'llvm, 'a> {
     module: &'llvm Module,
-    builder: &'a Builder<'llvm>,
+    builder: &'a IRBuilder<'llvm>,
+    fpm: &'a FunctionPassManager<'llvm>,
+    fn_protos: &'a mut HashMap<String, PrototypeAST>,
 }
 
 impl<'llvm, 'a> Codegen<'llvm, 'a> {
     /// Compile either a [`PrototypeAST`] or a [`FunctionAST`] into the LLVM `module`.
     pub fn compile(
         module: &'llvm Module,
+        fn_protos: &mut HashMap<String, PrototypeAST>,
         compilee: Either<&PrototypeAST, &FunctionAST>,
     ) -> CodegenResult<FnValue<'llvm>> {
-        let cg = Codegen {
+        let mut cg = Codegen {
             module,
-            builder: &Builder::with_ctx(module),
+            builder: &IRBuilder::with_ctx(module),
+            fpm: &FunctionPassManager::with_ctx(module),
+            fn_protos,
         };
         let mut variables = HashMap::new();
 
@@ -195,7 +225,7 @@
                     _ => Err("invalid binary operator".into()),
                 }
             }
-            ExprAST::Call(callee, args) => match self.module.get_fn(callee) {
+            ExprAST::Call(callee, args) => match self.get_function(callee) {
                 Some(callee) => {
                     if callee.args() != args.len() {
                         return Err("Incorrect # arguments passed".into());
@@ -235,14 +265,16 @@
     }
 
     fn codegen_function(
-        &self,
+        &mut self,
         FunctionAST(proto, body): &FunctionAST,
         named_values: &mut HashMap<&'llvm str, Value<'llvm>>,
     ) -> CodegenResult<FnValue<'llvm>> {
-        let the_function = match self.module.get_fn(&proto.0) {
-            Some(f) => f,
-            None => self.codegen_prototype(proto),
-        };
+        // Insert the function prototype into the `fn_protos` map to keep track for re-generating
+        // declarations in other modules.
+        self.fn_protos.insert(proto.0.clone(), proto.clone());
+
+        let the_function = self.get_function(&proto.0)
+            .expect("If proto not already generated, get_function will do for us since we updated fn_protos before-hand!");
 
         if the_function.basic_blocks() > 0 {
             return Err("Function cannot be redefined.".into());
@@ -265,11 +297,33 @@
         if let Ok(ret) = self.codegen_expr(body, named_values) {
             self.builder.ret(ret);
             assert!(the_function.verify());
+
+            // Run the optimization passes on the function.
+            self.fpm.run(the_function);
+
             Ok(the_function)
         } else {
             todo!("Failed to codegen function body, erase from module!");
         }
     }
+
+    /// Lookup function with `name` in the LLVM module and return the corresponding value reference.
+    /// If the function is not available in the module, check if the prototype is known and codegen
+    /// it.
+    /// Return [`None`] if the prototype is not known.
+    fn get_function(&self, name: &str) -> Option<FnValue<'llvm>> {
+        let callee = match self.module.get_fn(name) {
+            Some(callee) => callee,
+            None => {
+                let proto = self.fn_protos.get(name)?;
+                self.codegen_prototype(proto)
+            }
+        };
+
+        Some(callee)
+    }
 }
 
-
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/lexer.rs.html b/src/llvm_kaleidoscope_rs/lexer.rs.html index 3524648..4b13fd9 100644 --- a/src/llvm_kaleidoscope_rs/lexer.rs.html +++ b/src/llvm_kaleidoscope_rs/lexer.rs.html @@ -1,6 +1,4 @@ -lexer.rs - source - -
  1
+lexer.rs - source
  1
   2
   3
   4
@@ -364,4 +362,6 @@
     }
 }
 
-
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/lib.rs.html b/src/llvm_kaleidoscope_rs/lib.rs.html index a752947..955f3c8 100644 --- a/src/llvm_kaleidoscope_rs/lib.rs.html +++ b/src/llvm_kaleidoscope_rs/lib.rs.html @@ -1,6 +1,4 @@ -lib.rs - source - -
  1
+lib.rs - source
  1
   2
   3
   4
@@ -224,4 +222,6 @@
     }
 }
 
-
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm.rs.html b/src/llvm_kaleidoscope_rs/llvm.rs.html deleted file mode 100644 index 2da418a..0000000 --- a/src/llvm_kaleidoscope_rs/llvm.rs.html +++ /dev/null @@ -1,1073 +0,0 @@ -llvm.rs - source - -
  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-
-//! Safe wrapper around the LLVM C API.
-//!
-//! References returned from the LLVM API are tied to the `'llvm` lifetime which is bound to the
-//! context where the objects are created in.
-//! We do not offer wrappers to remove or delete any objects in the context and therefore all the
-//! references will be valid for the liftime of the context.
-
-use llvm_sys::analysis::{LLVMVerifierFailureAction, LLVMVerifyFunction};
-use llvm_sys::core::{
-    LLVMAddFunction, LLVMAppendBasicBlockInContext, LLVMBuildFAdd, LLVMBuildFCmp, LLVMBuildFMul,
-    LLVMBuildFSub, LLVMBuildRet, LLVMBuildUIToFP, LLVMConstReal, LLVMContextCreate,
-    LLVMContextDispose, LLVMCountBasicBlocks, LLVMCountParams, LLVMCreateBuilderInContext,
-    LLVMDisposeBuilder, LLVMDisposeModule, LLVMDoubleTypeInContext, LLVMDumpModule, LLVMDumpType,
-    LLVMDumpValue, LLVMGetNamedFunction, LLVMGetParam, LLVMGetReturnType, LLVMGetTypeKind,
-    LLVMGetValueKind, LLVMGetValueName2, LLVMModuleCreateWithNameInContext,
-    LLVMPositionBuilderAtEnd, LLVMSetValueName2, LLVMTypeOf,
-};
-use llvm_sys::prelude::{
-    LLVMBasicBlockRef, LLVMBool, LLVMBuilderRef, LLVMContextRef, LLVMModuleRef, LLVMTypeRef,
-    LLVMValueRef,
-};
-use llvm_sys::{LLVMRealPredicate, LLVMTypeKind, LLVMValueKind};
-
-use std::convert::TryFrom;
-use std::ffi::CStr;
-use std::marker::PhantomData;
-use std::ops::Deref;
-
-use crate::SmallCStr;
-
-// Definition of LLVM C API functions using our `repr(transparent)` types.
-extern "C" {
-    fn LLVMFunctionType(
-        ReturnType: Type<'_>,
-        ParamTypes: *mut Type<'_>,
-        ParamCount: ::libc::c_uint,
-        IsVarArg: LLVMBool,
-    ) -> LLVMTypeRef;
-    fn LLVMBuildCall2(
-        arg1: LLVMBuilderRef,
-        arg2: Type<'_>,
-        Fn: FnValue<'_>,
-        Args: *mut Value<'_>,
-        NumArgs: ::libc::c_uint,
-        Name: *const ::libc::c_char,
-    ) -> LLVMValueRef;
-}
-
-// ====================
-//   Module / Context
-// ====================
-
-/// Wrapper for a LLVM Module with its own LLVM Context.
-pub struct Module {
-    ctx: LLVMContextRef,
-    module: LLVMModuleRef,
-}
-
-impl<'llvm> Module {
-    /// Create a new Module instance.
-    ///
-    /// # Panics
-    ///
-    /// Panics if creating the context or the module fails.
-    pub fn new() -> Self {
-        let (ctx, module) = unsafe {
-            let c = LLVMContextCreate();
-            let m = LLVMModuleCreateWithNameInContext(b"module\0".as_ptr().cast(), c);
-            assert!(!c.is_null() && !m.is_null());
-            (c, m)
-        };
-
-        Module { ctx, module }
-    }
-
-    /// Dump LLVM IR emitted into the Module to stdout.
-    pub fn dump(&self) {
-        unsafe { LLVMDumpModule(self.module) };
-    }
-
-    /// Get a type reference representing a `f64` float.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn type_f64(&self) -> Type<'llvm> {
-        let type_ref = unsafe { LLVMDoubleTypeInContext(self.ctx) };
-        Type::new(type_ref)
-    }
-
-    /// Get a type reference representing a `fn(args) -> ret` function.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn type_fn(&'llvm self, args: &mut [Type<'llvm>], ret: Type<'llvm>) -> Type<'llvm> {
-        let type_ref = unsafe {
-            LLVMFunctionType(
-                ret,
-                args.as_mut_ptr(),
-                args.len() as libc::c_uint,
-                0, /* IsVarArg */
-            )
-        };
-        Type::new(type_ref)
-    }
-
-    /// Add a function with the given `name` and `fn_type` to the module and return a value
-    /// reference representing the function.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer or `name` could not be converted to a
-    /// [`SmallCStr`].
-    pub fn add_fn(&'llvm self, name: &str, fn_type: Type<'llvm>) -> FnValue<'llvm> {
-        debug_assert_eq!(
-            fn_type.kind(),
-            LLVMTypeKind::LLVMFunctionTypeKind,
-            "Expected a function type when adding a function!"
-        );
-
-        let name = SmallCStr::try_from(name)
-            .expect("Failed to convert 'name' argument to small C string!");
-
-        let value_ref = unsafe { LLVMAddFunction(self.module, name.as_ptr(), fn_type.0) };
-        FnValue::new(value_ref)
-    }
-
-    /// Get a function value reference to the function with the given `name` if it was previously
-    /// added to the module with [`add_fn`][Module::add_fn].
-    ///
-    /// # Panics
-    ///
-    /// Panics if `name` could not be converted to a [`SmallCStr`].
-    pub fn get_fn(&'llvm self, name: &str) -> Option<FnValue<'llvm>> {
-        let name = SmallCStr::try_from(name)
-            .expect("Failed to convert 'name' argument to small C string!");
-
-        let value_ref = unsafe { LLVMGetNamedFunction(self.module, name.as_ptr()) };
-
-        (!value_ref.is_null()).then(|| FnValue::new(value_ref))
-    }
-
-    /// Append a Basic Block to the end of the function referenced by the value reference
-    /// `fn_value`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn append_basic_block(&'llvm self, fn_value: FnValue<'llvm>) -> BasicBlock<'llvm> {
-        let block = unsafe {
-            LLVMAppendBasicBlockInContext(
-                self.ctx,
-                fn_value.value_ref(),
-                b"block\0".as_ptr().cast(),
-            )
-        };
-        assert!(!block.is_null());
-
-        BasicBlock(block, PhantomData)
-    }
-}
-
-impl Drop for Module {
-    fn drop(&mut self) {
-        unsafe {
-            LLVMDisposeModule(self.module);
-            LLVMContextDispose(self.ctx);
-        }
-    }
-}
-
-// ===========
-//   Builder
-// ===========
-
-/// Wrapper for a LLVM IR Builder.
-pub struct Builder<'llvm> {
-    builder: LLVMBuilderRef,
-    _ctx: PhantomData<&'llvm ()>,
-}
-
-impl<'llvm> Builder<'llvm> {
-    /// Create a new LLVM IR Builder with the `module`s context.
-    ///
-    /// # Panics
-    ///
-    /// Panics if creating the IR Builder fails.
-    pub fn with_ctx(module: &'llvm Module) -> Builder<'llvm> {
-        let builder = unsafe { LLVMCreateBuilderInContext(module.ctx) };
-        assert!(!builder.is_null());
-
-        Builder {
-            builder,
-            _ctx: PhantomData,
-        }
-    }
-
-    /// Position the IR Builder at the end of the given Basic Block.
-    pub fn pos_at_end(&self, bb: BasicBlock<'llvm>) {
-        unsafe {
-            LLVMPositionBuilderAtEnd(self.builder, bb.0);
-        }
-    }
-
-    /// Emit a [fadd](https://llvm.org/docs/LangRef.html#fadd-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn fadd(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
-        debug_assert!(lhs.is_f64(), "fadd: Expected f64 as lhs operand!");
-        debug_assert!(rhs.is_f64(), "fadd: Expected f64 as rhs operand!");
-
-        let value_ref = unsafe {
-            LLVMBuildFAdd(
-                self.builder,
-                lhs.value_ref(),
-                rhs.value_ref(),
-                b"fadd\0".as_ptr().cast(),
-            )
-        };
-        Value::new(value_ref)
-    }
-
-    /// Emit a [fsub](https://llvm.org/docs/LangRef.html#fsub-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn fsub(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
-        debug_assert!(lhs.is_f64(), "fsub: Expected f64 as lhs operand!");
-        debug_assert!(rhs.is_f64(), "fsub: Expected f64 as rhs operand!");
-
-        let value_ref = unsafe {
-            LLVMBuildFSub(
-                self.builder,
-                lhs.value_ref(),
-                rhs.value_ref(),
-                b"fsub\0".as_ptr().cast(),
-            )
-        };
-        Value::new(value_ref)
-    }
-
-    /// Emit a [fmul](https://llvm.org/docs/LangRef.html#fmul-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn fmul(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
-        debug_assert!(lhs.is_f64(), "fmul: Expected f64 as lhs operand!");
-        debug_assert!(rhs.is_f64(), "fmul: Expected f64 as rhs operand!");
-
-        let value_ref = unsafe {
-            LLVMBuildFMul(
-                self.builder,
-                lhs.value_ref(),
-                rhs.value_ref(),
-                b"fmul\0".as_ptr().cast(),
-            )
-        };
-        Value::new(value_ref)
-    }
-
-    /// Emit a [fcmult](https://llvm.org/docs/LangRef.html#fcmp-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn fcmpult(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
-        debug_assert!(lhs.is_f64(), "fcmplt: Expected f64 as lhs operand!");
-        debug_assert!(rhs.is_f64(), "fcmplt: Expected f64 as rhs operand!");
-
-        let value_ref = unsafe {
-            LLVMBuildFCmp(
-                self.builder,
-                LLVMRealPredicate::LLVMRealULT,
-                lhs.value_ref(),
-                rhs.value_ref(),
-                b"fcmplt\0".as_ptr().cast(),
-            )
-        };
-        Value::new(value_ref)
-    }
-
-    /// Emit a [uitofp](https://llvm.org/docs/LangRef.html#uitofp-to-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn uitofp(&self, val: Value<'llvm>, dest_type: Type<'llvm>) -> Value<'llvm> {
-        debug_assert!(val.is_int(), "uitofp: Expected integer operand!");
-
-        let value_ref = unsafe {
-            LLVMBuildUIToFP(
-                self.builder,
-                val.value_ref(),
-                dest_type.0,
-                b"uitofp\0".as_ptr().cast(),
-            )
-        };
-        Value::new(value_ref)
-    }
-
-    /// Emit a [call](https://llvm.org/docs/LangRef.html#call-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn call(&self, fn_value: FnValue<'llvm>, args: &mut [Value<'llvm>]) -> Value<'llvm> {
-        let value_ref = unsafe {
-            LLVMBuildCall2(
-                self.builder,
-                fn_value.ret_type(),
-                fn_value,
-                args.as_mut_ptr(),
-                args.len() as libc::c_uint,
-                b"call\0".as_ptr().cast(),
-            )
-        };
-        Value::new(value_ref)
-    }
-
-    /// Emit a [ret](https://llvm.org/docs/LangRef.html#ret-instruction) instruction.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn ret(&self, ret: Value<'llvm>) {
-        let ret = unsafe { LLVMBuildRet(self.builder, ret.value_ref()) };
-        assert!(!ret.is_null());
-    }
-}
-
-impl Drop for Builder<'_> {
-    fn drop(&mut self) {
-        unsafe { LLVMDisposeBuilder(self.builder) }
-    }
-}
-
-// ==============
-//   BasicBlock
-// ==============
-
-/// Wrapper for a LLVM Basic Block.
-#[derive(Copy, Clone)]
-pub struct BasicBlock<'llvm>(LLVMBasicBlockRef, PhantomData<&'llvm ()>);
-
-// ========
-//   Type
-// ========
-
-/// Wrapper for a LLVM Type Reference.
-#[derive(Copy, Clone)]
-#[repr(transparent)]
-pub struct Type<'llvm>(LLVMTypeRef, PhantomData<&'llvm ()>);
-
-impl<'llvm> Type<'llvm> {
-    fn new(type_ref: LLVMTypeRef) -> Self {
-        assert!(!type_ref.is_null());
-        Type(type_ref, PhantomData)
-    }
-
-    fn kind(&self) -> LLVMTypeKind {
-        unsafe { LLVMGetTypeKind(self.0) }
-    }
-
-    /// Dump the LLVM Type to stdout.
-    pub fn dump(&self) {
-        unsafe { LLVMDumpType(self.0) };
-    }
-
-    /// Get a value reference representing the const `f64` value.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn const_f64(self, n: f64) -> Value<'llvm> {
-        debug_assert_eq!(
-            self.kind(),
-            LLVMTypeKind::LLVMDoubleTypeKind,
-            "Expected a double type when creating const f64 value!"
-        );
-
-        let value_ref = unsafe { LLVMConstReal(self.0, n) };
-        Value::new(value_ref)
-    }
-}
-
-// =========
-//   Value
-// =========
-
-/// Wrapper for a LLVM Value Reference.
-#[derive(Copy, Clone)]
-#[repr(transparent)]
-pub struct Value<'llvm>(LLVMValueRef, PhantomData<&'llvm ()>);
-
-impl<'llvm> Value<'llvm> {
-    fn new(value_ref: LLVMValueRef) -> Self {
-        assert!(!value_ref.is_null());
-        Value(value_ref, PhantomData)
-    }
-
-    #[inline]
-    fn value_ref(&self) -> LLVMValueRef {
-        self.0
-    }
-
-    fn kind(&self) -> LLVMValueKind {
-        unsafe { LLVMGetValueKind(self.value_ref()) }
-    }
-
-    /// Dump the LLVM Value to stdout.
-    pub fn dump(&self) {
-        unsafe { LLVMDumpValue(self.value_ref()) };
-    }
-
-    /// Get a type reference representing for the given value reference.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn type_of(&self) -> Type<'llvm> {
-        let type_ref = unsafe { LLVMTypeOf(self.value_ref()) };
-        Type::new(type_ref)
-    }
-
-    /// Set the name for the given value reference.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn set_name(&self, name: &str) {
-        unsafe { LLVMSetValueName2(self.value_ref(), name.as_ptr().cast(), name.len()) };
-    }
-
-    /// Get the name for the given value reference.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn get_name(&self) -> &'llvm str {
-        let name = unsafe {
-            let mut len: libc::size_t = 0;
-            let name = LLVMGetValueName2(self.0, &mut len as _);
-            assert!(!name.is_null());
-
-            CStr::from_ptr(name)
-        };
-
-        // TODO: Does this string live for the time of the LLVM context?!
-        name.to_str()
-            .expect("Expected valid UTF8 string from LLVM API")
-    }
-
-    /// Check if value is of `f64` type.
-    pub fn is_f64(&self) -> bool {
-        self.type_of().kind() == LLVMTypeKind::LLVMDoubleTypeKind
-    }
-
-    /// Check if value is of integer type.
-    pub fn is_int(&self) -> bool {
-        self.type_of().kind() == LLVMTypeKind::LLVMIntegerTypeKind
-    }
-}
-
-/// Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.
-#[derive(Copy, Clone)]
-#[repr(transparent)]
-pub struct FnValue<'llvm>(Value<'llvm>);
-
-impl<'llvm> Deref for FnValue<'llvm> {
-    type Target = Value<'llvm>;
-    fn deref(&self) -> &Self::Target {
-        &self.0
-    }
-}
-
-impl<'llvm> FnValue<'llvm> {
-    fn new(value_ref: LLVMValueRef) -> Self {
-        let value = Value::new(value_ref);
-        debug_assert_eq!(
-            value.kind(),
-            LLVMValueKind::LLVMFunctionValueKind,
-            "Expected a fn value when constructing FnValue!"
-        );
-
-        FnValue(value)
-    }
-
-    /// Get a type reference representing the return value of the given function value.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn ret_type(&self) -> Type<'llvm> {
-        let type_ref = unsafe { LLVMGetReturnType(LLVMTypeOf(self.value_ref())) };
-        Type::new(type_ref)
-    }
-
-    /// Get the number of function arguments for the given function value.
-    pub fn args(&self) -> usize {
-        unsafe { LLVMCountParams(self.value_ref()) as usize }
-    }
-
-    /// Get a value reference for the function argument at index `idx`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer or indexed out of bounds.
-    pub fn arg(&self, idx: usize) -> Value<'llvm> {
-        assert!(idx < self.args());
-
-        let value_ref = unsafe { LLVMGetParam(self.value_ref(), idx as libc::c_uint) };
-        Value::new(value_ref)
-    }
-
-    /// Get the number of Basic Blocks for the given function value.
-    pub fn basic_blocks(&self) -> usize {
-        unsafe { LLVMCountBasicBlocks(self.value_ref()) as usize }
-    }
-
-    /// Verify that the given function is valid.
-    pub fn verify(&self) -> bool {
-        unsafe {
-            LLVMVerifyFunction(
-                self.value_ref(),
-                LLVMVerifierFailureAction::LLVMPrintMessageAction,
-            ) == 0
-        }
-    }
-}
-
-
\ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/builder.rs.html b/src/llvm_kaleidoscope_rs/llvm/builder.rs.html new file mode 100644 index 0000000..9ac539b --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/builder.rs.html @@ -0,0 +1,383 @@ +builder.rs - source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+
+use llvm_sys::{
+    core::{
+        LLVMBuildFAdd, LLVMBuildFCmp, LLVMBuildFMul, LLVMBuildFSub, LLVMBuildRet, LLVMBuildUIToFP,
+        LLVMCreateBuilderInContext, LLVMDisposeBuilder, LLVMPositionBuilderAtEnd,
+    },
+    prelude::{LLVMBuilderRef, LLVMValueRef},
+    LLVMRealPredicate,
+};
+
+use std::marker::PhantomData;
+
+use super::{BasicBlock, FnValue, Module, Type, Value};
+
+// Definition of LLVM C API functions using our `repr(transparent)` types.
+extern "C" {
+    fn LLVMBuildCall2(
+        arg1: LLVMBuilderRef,
+        arg2: Type<'_>,
+        Fn: FnValue<'_>,
+        Args: *mut Value<'_>,
+        NumArgs: ::libc::c_uint,
+        Name: *const ::libc::c_char,
+    ) -> LLVMValueRef;
+}
+
+/// Wrapper for a LLVM IR Builder.
+pub struct IRBuilder<'llvm> {
+    builder: LLVMBuilderRef,
+    _ctx: PhantomData<&'llvm ()>,
+}
+
+impl<'llvm> IRBuilder<'llvm> {
+    /// Create a new LLVM IR Builder with the `module`s context.
+    ///
+    /// # Panics
+    ///
+    /// Panics if creating the IR Builder fails.
+    pub fn with_ctx(module: &'llvm Module) -> IRBuilder<'llvm> {
+        let builder = unsafe { LLVMCreateBuilderInContext(module.ctx()) };
+        assert!(!builder.is_null());
+
+        IRBuilder {
+            builder,
+            _ctx: PhantomData,
+        }
+    }
+
+    /// Position the IR Builder at the end of the given Basic Block.
+    pub fn pos_at_end(&self, bb: BasicBlock<'llvm>) {
+        unsafe {
+            LLVMPositionBuilderAtEnd(self.builder, bb.0);
+        }
+    }
+
+    /// Emit a [fadd](https://llvm.org/docs/LangRef.html#fadd-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn fadd(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
+        debug_assert!(lhs.is_f64(), "fadd: Expected f64 as lhs operand!");
+        debug_assert!(rhs.is_f64(), "fadd: Expected f64 as rhs operand!");
+
+        let value_ref = unsafe {
+            LLVMBuildFAdd(
+                self.builder,
+                lhs.value_ref(),
+                rhs.value_ref(),
+                b"fadd\0".as_ptr().cast(),
+            )
+        };
+        Value::new(value_ref)
+    }
+
+    /// Emit a [fsub](https://llvm.org/docs/LangRef.html#fsub-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn fsub(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
+        debug_assert!(lhs.is_f64(), "fsub: Expected f64 as lhs operand!");
+        debug_assert!(rhs.is_f64(), "fsub: Expected f64 as rhs operand!");
+
+        let value_ref = unsafe {
+            LLVMBuildFSub(
+                self.builder,
+                lhs.value_ref(),
+                rhs.value_ref(),
+                b"fsub\0".as_ptr().cast(),
+            )
+        };
+        Value::new(value_ref)
+    }
+
+    /// Emit a [fmul](https://llvm.org/docs/LangRef.html#fmul-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn fmul(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
+        debug_assert!(lhs.is_f64(), "fmul: Expected f64 as lhs operand!");
+        debug_assert!(rhs.is_f64(), "fmul: Expected f64 as rhs operand!");
+
+        let value_ref = unsafe {
+            LLVMBuildFMul(
+                self.builder,
+                lhs.value_ref(),
+                rhs.value_ref(),
+                b"fmul\0".as_ptr().cast(),
+            )
+        };
+        Value::new(value_ref)
+    }
+
+    /// Emit a [fcmult](https://llvm.org/docs/LangRef.html#fcmp-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn fcmpult(&self, lhs: Value<'llvm>, rhs: Value<'llvm>) -> Value<'llvm> {
+        debug_assert!(lhs.is_f64(), "fcmplt: Expected f64 as lhs operand!");
+        debug_assert!(rhs.is_f64(), "fcmplt: Expected f64 as rhs operand!");
+
+        let value_ref = unsafe {
+            LLVMBuildFCmp(
+                self.builder,
+                LLVMRealPredicate::LLVMRealULT,
+                lhs.value_ref(),
+                rhs.value_ref(),
+                b"fcmplt\0".as_ptr().cast(),
+            )
+        };
+        Value::new(value_ref)
+    }
+
+    /// Emit a [uitofp](https://llvm.org/docs/LangRef.html#uitofp-to-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn uitofp(&self, val: Value<'llvm>, dest_type: Type<'llvm>) -> Value<'llvm> {
+        debug_assert!(val.is_int(), "uitofp: Expected integer operand!");
+
+        let value_ref = unsafe {
+            LLVMBuildUIToFP(
+                self.builder,
+                val.value_ref(),
+                dest_type.type_ref(),
+                b"uitofp\0".as_ptr().cast(),
+            )
+        };
+        Value::new(value_ref)
+    }
+
+    /// Emit a [call](https://llvm.org/docs/LangRef.html#call-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn call(&self, fn_value: FnValue<'llvm>, args: &mut [Value<'llvm>]) -> Value<'llvm> {
+        let value_ref = unsafe {
+            LLVMBuildCall2(
+                self.builder,
+                fn_value.ret_type(),
+                fn_value,
+                args.as_mut_ptr(),
+                args.len() as libc::c_uint,
+                b"call\0".as_ptr().cast(),
+            )
+        };
+        Value::new(value_ref)
+    }
+
+    /// Emit a [ret](https://llvm.org/docs/LangRef.html#ret-instruction) instruction.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn ret(&self, ret: Value<'llvm>) {
+        let ret = unsafe { LLVMBuildRet(self.builder, ret.value_ref()) };
+        assert!(!ret.is_null());
+    }
+}
+
+impl Drop for IRBuilder<'_> {
+    fn drop(&mut self) {
+        unsafe { LLVMDisposeBuilder(self.builder) }
+    }
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html b/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html new file mode 100644 index 0000000..20420f8 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html @@ -0,0 +1,307 @@ +lljit.rs - source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+
+use llvm_sys::orc2::{
+    lljit::{
+        LLVMOrcCreateLLJIT, LLVMOrcLLJITAddLLVMIRModuleWithRT, LLVMOrcLLJITGetGlobalPrefix,
+        LLVMOrcLLJITGetMainJITDylib, LLVMOrcLLJITLookup, LLVMOrcLLJITRef,
+    },
+    LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess, LLVMOrcDefinitionGeneratorRef,
+    LLVMOrcJITDylibAddGenerator, LLVMOrcJITDylibCreateResourceTracker, LLVMOrcJITDylibRef,
+    LLVMOrcReleaseResourceTracker, LLVMOrcResourceTrackerRef, LLVMOrcResourceTrackerRemove,
+};
+
+use std::convert::TryFrom;
+use std::marker::PhantomData;
+
+use super::{Error, Module};
+use crate::SmallCStr;
+
+/// Marker trait to constrain function signatures that can be looked up in the JIT.
+pub trait JitFn {}
+
+impl JitFn for unsafe extern "C" fn() -> f64 {}
+
+pub struct LLJit {
+    jit: LLVMOrcLLJITRef,
+    dylib: LLVMOrcJITDylibRef,
+}
+
+impl LLJit {
+    /// Create a new LLJit instance.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer or an error.
+    pub fn new() -> LLJit {
+        let (jit, dylib) = unsafe {
+            let mut jit = std::ptr::null_mut();
+            let err = LLVMOrcCreateLLJIT(
+                &mut jit as _,
+                std::ptr::null_mut(), /* builder: nullptr -> default */
+            );
+
+            if let Some(err) = Error::from(err) {
+                panic!("Error: {}", err.as_str());
+            }
+
+            let dylib = LLVMOrcLLJITGetMainJITDylib(jit);
+            assert!(!dylib.is_null());
+
+            (jit, dylib)
+        };
+
+        LLJit { jit, dylib }
+    }
+
+    /// Add an LLVM IR module to the JIT. Return a [`ResourceTracker`], which when dropped, will
+    /// remove the code of the LLVM IR module from the JIT.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer or an error.
+    pub fn add_module(&self, module: Module) -> ResourceTracker<'_> {
+        let tsmod = module.into_raw_thread_safe_module();
+
+        let rt = unsafe {
+            let rt = LLVMOrcJITDylibCreateResourceTracker(self.dylib);
+            let err = LLVMOrcLLJITAddLLVMIRModuleWithRT(self.jit, rt, tsmod);
+
+            if let Some(err) = Error::from(err) {
+                panic!("Error: {}", err.as_str());
+            }
+
+            rt
+        };
+
+        ResourceTracker::new(rt)
+    }
+
+    /// Find the symbol with the name `sym` in the JIT.
+    ///
+    /// # Panics
+    ///
+    /// Panics if the symbol is not found in the JIT.
+    pub fn find_symbol<F: JitFn>(&self, sym: &str) -> F {
+        let sym =
+            SmallCStr::try_from(sym).expect("Failed to convert 'sym' argument to small C string!");
+
+        unsafe {
+            let mut addr = 0u64;
+            let err = LLVMOrcLLJITLookup(self.jit, &mut addr as _, sym.as_ptr());
+
+            if let Some(err) = Error::from(err) {
+                panic!("Error: {}", err.as_str());
+            }
+
+            debug_assert_eq!(core::mem::size_of_val(&addr), core::mem::size_of::<F>());
+            std::mem::transmute_copy(&addr)
+        }
+    }
+
+    /// Enable lookup of dynamic symbols available in the current process from the JIT.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns an error.
+    pub fn enable_process_symbols(&self) {
+        unsafe {
+            let mut proc_syms_gen: LLVMOrcDefinitionGeneratorRef = std::ptr::null_mut();
+            let err = LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(
+                &mut proc_syms_gen as _,
+                self.global_prefix(),
+                None,                 /* filter */
+                std::ptr::null_mut(), /* filter ctx */
+            );
+
+            if let Some(err) = Error::from(err) {
+                panic!("Error: {}", err.as_str());
+            }
+
+            LLVMOrcJITDylibAddGenerator(self.dylib, proc_syms_gen);
+        }
+    }
+
+    /// Return the global prefix character according to the LLJITs data layout.
+    fn global_prefix(&self) -> libc::c_char {
+        unsafe { LLVMOrcLLJITGetGlobalPrefix(self.jit) }
+    }
+}
+
+/// A resource handle to code added to an [`LLJit`] instance. When a `ResourceTracker` handle is
+/// dropped, the code corresponding to the handle will be removed from the JIT.
+pub struct ResourceTracker<'jit>(LLVMOrcResourceTrackerRef, PhantomData<&'jit ()>);
+
+impl<'jit> ResourceTracker<'jit> {
+    fn new(rt: LLVMOrcResourceTrackerRef) -> ResourceTracker<'jit> {
+        assert!(!rt.is_null());
+        ResourceTracker(rt, PhantomData)
+    }
+}
+
+impl Drop for ResourceTracker<'_> {
+    fn drop(&mut self) {
+        unsafe {
+            let err = LLVMOrcResourceTrackerRemove(self.0);
+
+            if let Some(err) = Error::from(err) {
+                panic!("Error: {}", err.as_str());
+            }
+
+            LLVMOrcReleaseResourceTracker(self.0);
+        };
+    }
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/mod.rs.html b/src/llvm_kaleidoscope_rs/llvm/mod.rs.html new file mode 100644 index 0000000..d6eb8b2 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/mod.rs.html @@ -0,0 +1,161 @@ +mod.rs - source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
+//! Safe wrapper around the LLVM C API.
+//!
+//! References returned from the LLVM API are tied to the `'llvm` lifetime which is bound to the
+//! context where the objects are created in.
+//! We do not offer wrappers to remove or delete any objects in the context and therefore all the
+//! references will be valid for the liftime of the context.
+//!
+//! For the scope of this tutorial we mainly use assertions to validate the results from the LLVM
+//! API calls.
+
+use llvm_sys::{
+    core::LLVMShutdown,
+    error::{LLVMDisposeErrorMessage, LLVMErrorRef, LLVMGetErrorMessage},
+    prelude::LLVMBasicBlockRef,
+    target::{
+        LLVM_InitializeNativeAsmParser, LLVM_InitializeNativeAsmPrinter,
+        LLVM_InitializeNativeTarget,
+    },
+};
+
+use std::ffi::CStr;
+use std::marker::PhantomData;
+
+mod builder;
+mod lljit;
+mod module;
+mod pass_manager;
+mod type_;
+mod value;
+
+pub use builder::IRBuilder;
+pub use lljit::{LLJit, ResourceTracker};
+pub use module::Module;
+pub use pass_manager::FunctionPassManager;
+pub use type_::Type;
+pub use value::{FnValue, Value};
+
+/// Wrapper for a LLVM Basic Block.
+#[derive(Copy, Clone)]
+pub struct BasicBlock<'llvm>(LLVMBasicBlockRef, PhantomData<&'llvm ()>);
+
+struct Error<'llvm>(&'llvm mut libc::c_char);
+
+impl<'llvm> Error<'llvm> {
+    fn from(err: LLVMErrorRef) -> Option<Error<'llvm>> {
+        (!err.is_null()).then(|| Error(unsafe { &mut *LLVMGetErrorMessage(err) }))
+    }
+
+    fn as_str(&self) -> &str {
+        unsafe { CStr::from_ptr(self.0) }
+            .to_str()
+            .expect("Expected valid UTF8 string from LLVM API")
+    }
+}
+
+impl Drop for Error<'_> {
+    fn drop(&mut self) {
+        unsafe {
+            LLVMDisposeErrorMessage(self.0 as *mut libc::c_char);
+        }
+    }
+}
+
+/// Initialize native target for corresponding to host (useful for jitting).
+pub fn initialize_native_taget() {
+    unsafe {
+        assert_eq!(LLVM_InitializeNativeTarget(), 0);
+        assert_eq!(LLVM_InitializeNativeAsmParser(), 0);
+        assert_eq!(LLVM_InitializeNativeAsmPrinter(), 0);
+    }
+}
+
+/// Deallocate and destroy all "ManagedStatic" variables.
+pub fn shutdown() {
+    unsafe {
+        LLVMShutdown();
+    };
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/module.rs.html b/src/llvm_kaleidoscope_rs/llvm/module.rs.html new file mode 100644 index 0000000..be37a0b --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/module.rs.html @@ -0,0 +1,397 @@ +module.rs - source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+
+use llvm_sys::{
+    core::{
+        LLVMAddFunction, LLVMAppendBasicBlockInContext, LLVMDisposeModule, LLVMDoubleTypeInContext,
+        LLVMDumpModule, LLVMGetNamedFunction, LLVMModuleCreateWithNameInContext,
+    },
+    orc2::{
+        LLVMOrcCreateNewThreadSafeContext, LLVMOrcCreateNewThreadSafeModule,
+        LLVMOrcDisposeThreadSafeContext, LLVMOrcThreadSafeContextGetContext,
+        LLVMOrcThreadSafeContextRef, LLVMOrcThreadSafeModuleRef,
+    },
+    prelude::{LLVMBool, LLVMContextRef, LLVMModuleRef, LLVMTypeRef},
+    LLVMTypeKind,
+};
+
+use std::convert::TryFrom;
+use std::marker::PhantomData;
+
+use super::{BasicBlock, FnValue, Type};
+use crate::SmallCStr;
+
+// Definition of LLVM C API functions using our `repr(transparent)` types.
+extern "C" {
+    fn LLVMFunctionType(
+        ReturnType: Type<'_>,
+        ParamTypes: *mut Type<'_>,
+        ParamCount: ::libc::c_uint,
+        IsVarArg: LLVMBool,
+    ) -> LLVMTypeRef;
+}
+
+/// Wrapper for a LLVM Module with its own LLVM Context.
+pub struct Module {
+    tsctx: LLVMOrcThreadSafeContextRef,
+    ctx: LLVMContextRef,
+    module: LLVMModuleRef,
+}
+
+impl<'llvm> Module {
+    /// Create a new Module instance.
+    ///
+    /// # Panics
+    ///
+    /// Panics if creating the context or the module fails.
+    pub fn new() -> Self {
+        let (tsctx, ctx, module) = unsafe {
+            // We generate a thread safe context because we are going to jit this IR module and
+            // there is no method to create a thread safe context wrapper from an existing context
+            // reference (at the time of writing this).
+            //
+            // ThreadSafeContext has shared ownership (start with ref count 1).
+            // We must explicitly dispose our reference (dec ref count).
+            let tc = LLVMOrcCreateNewThreadSafeContext();
+            assert!(!tc.is_null());
+
+            let c = LLVMOrcThreadSafeContextGetContext(tc);
+            let m = LLVMModuleCreateWithNameInContext(b"module\0".as_ptr().cast(), c);
+            assert!(!c.is_null() && !m.is_null());
+            (tc, c, m)
+        };
+
+        Module { tsctx, ctx, module }
+    }
+
+    /// Get the raw LLVM context reference.
+    #[inline]
+    pub(super) fn ctx(&self) -> LLVMContextRef {
+        self.ctx
+    }
+
+    /// Get the raw LLVM module reference.
+    #[inline]
+    pub(super) fn module(&self) -> LLVMModuleRef {
+        self.module
+    }
+
+    /// Consume the module and turn in into a raw LLVM ThreadSafeModule reference.
+    ///
+    /// If ownership of the raw reference is not transferred (eg to the JIT), memory will be leaked
+    /// in case the reference is disposed explicitly with LLVMOrcDisposeThreadSafeModule.
+    #[inline]
+    pub(super) fn into_raw_thread_safe_module(mut self) -> LLVMOrcThreadSafeModuleRef {
+        let m = std::mem::replace(&mut self.module, std::ptr::null_mut());
+
+        // ThreadSafeModule has unique ownership.
+        // Takes ownership of module and increments ThreadSafeContext ref count.
+        //
+        // We must not reference/dispose `m` after this call, but we need to dispose our `tsctx`
+        // reference.
+        let tm = unsafe { LLVMOrcCreateNewThreadSafeModule(m, self.tsctx) };
+        assert!(!tm.is_null());
+
+        tm
+    }
+
+    /// Dump LLVM IR emitted into the Module to stdout.
+    pub fn dump(&self) {
+        unsafe { LLVMDumpModule(self.module) };
+    }
+
+    /// Get a type reference representing a `f64` float.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn type_f64(&self) -> Type<'llvm> {
+        let type_ref = unsafe { LLVMDoubleTypeInContext(self.ctx) };
+        Type::new(type_ref)
+    }
+
+    /// Get a type reference representing a `fn(args) -> ret` function.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn type_fn(&'llvm self, args: &mut [Type<'llvm>], ret: Type<'llvm>) -> Type<'llvm> {
+        let type_ref = unsafe {
+            LLVMFunctionType(
+                ret,
+                args.as_mut_ptr(),
+                args.len() as libc::c_uint,
+                0, /* IsVarArg */
+            )
+        };
+        Type::new(type_ref)
+    }
+
+    /// Add a function with the given `name` and `fn_type` to the module and return a value
+    /// reference representing the function.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer or `name` could not be converted to a
+    /// [`SmallCStr`].
+    pub fn add_fn(&'llvm self, name: &str, fn_type: Type<'llvm>) -> FnValue<'llvm> {
+        debug_assert_eq!(
+            fn_type.kind(),
+            LLVMTypeKind::LLVMFunctionTypeKind,
+            "Expected a function type when adding a function!"
+        );
+
+        let name = SmallCStr::try_from(name)
+            .expect("Failed to convert 'name' argument to small C string!");
+
+        let value_ref = unsafe { LLVMAddFunction(self.module, name.as_ptr(), fn_type.type_ref()) };
+        FnValue::new(value_ref)
+    }
+
+    /// Get a function value reference to the function with the given `name` if it was previously
+    /// added to the module with [`add_fn`][Module::add_fn].
+    ///
+    /// # Panics
+    ///
+    /// Panics if `name` could not be converted to a [`SmallCStr`].
+    pub fn get_fn(&'llvm self, name: &str) -> Option<FnValue<'llvm>> {
+        let name = SmallCStr::try_from(name)
+            .expect("Failed to convert 'name' argument to small C string!");
+
+        let value_ref = unsafe { LLVMGetNamedFunction(self.module, name.as_ptr()) };
+
+        (!value_ref.is_null()).then(|| FnValue::new(value_ref))
+    }
+
+    /// Append a Basic Block to the end of the function referenced by the value reference
+    /// `fn_value`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn append_basic_block(&'llvm self, fn_value: FnValue<'llvm>) -> BasicBlock<'llvm> {
+        let block = unsafe {
+            LLVMAppendBasicBlockInContext(
+                self.ctx,
+                fn_value.value_ref(),
+                b"block\0".as_ptr().cast(),
+            )
+        };
+        assert!(!block.is_null());
+
+        BasicBlock(block, PhantomData)
+    }
+}
+
+impl Drop for Module {
+    fn drop(&mut self) {
+        unsafe {
+            // In case we turned the module into a ThreadSafeModule, we must not dispose the module
+            // reference because ThreadSafeModule took ownership!
+            if !self.module.is_null() {
+                LLVMDisposeModule(self.module);
+            }
+
+            // Dispose ThreadSafeContext reference (dec ref count) in any case.
+            LLVMOrcDisposeThreadSafeContext(self.tsctx);
+        }
+    }
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/pass_manager.rs.html b/src/llvm_kaleidoscope_rs/llvm/pass_manager.rs.html new file mode 100644 index 0000000..ab73029 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/pass_manager.rs.html @@ -0,0 +1,155 @@ +pass_manager.rs - source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+use llvm_sys::{
+    core::{
+        LLVMCreateFunctionPassManagerForModule, LLVMDisposePassManager,
+        LLVMInitializeFunctionPassManager, LLVMRunFunctionPassManager,
+    },
+    prelude::LLVMPassManagerRef,
+    transforms::{
+        instcombine::LLVMAddInstructionCombiningPass,
+        scalar::{LLVMAddCFGSimplificationPass, LLVMAddNewGVNPass, LLVMAddReassociatePass},
+    },
+};
+
+use std::marker::PhantomData;
+
+use super::{FnValue, Module};
+
+/// Wrapper for a LLVM Function PassManager (legacy).
+pub struct FunctionPassManager<'llvm> {
+    fpm: LLVMPassManagerRef,
+    _ctx: PhantomData<&'llvm ()>,
+}
+
+impl<'llvm> FunctionPassManager<'llvm> {
+    /// Create a new Function PassManager with the following optimization passes
+    /// - InstructionCombiningPass
+    /// - ReassociatePass
+    /// - NewGVNPass
+    /// - CFGSimplificationPass
+    ///
+    /// The list of selected optimization passes is taken from the tutorial chapter [LLVM
+    /// Optimization Passes](https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.html#id3).
+    pub fn with_ctx(module: &'llvm Module) -> FunctionPassManager<'llvm> {
+        let fpm = unsafe {
+            // Borrows module reference.
+            LLVMCreateFunctionPassManagerForModule(module.module())
+        };
+        assert!(!fpm.is_null());
+
+        unsafe {
+            // Do simple "peephole" optimizations and bit-twiddling optzns.
+            LLVMAddInstructionCombiningPass(fpm);
+            // Reassociate expressions.
+            LLVMAddReassociatePass(fpm);
+            // Eliminate Common SubExpressions.
+            LLVMAddNewGVNPass(fpm);
+            // Simplify the control flow graph (deleting unreachable blocks, etc).
+            LLVMAddCFGSimplificationPass(fpm);
+
+            let fail = LLVMInitializeFunctionPassManager(fpm);
+            assert_eq!(fail, 0);
+        }
+
+        FunctionPassManager {
+            fpm,
+            _ctx: PhantomData,
+        }
+    }
+
+    /// Run the optimization passes registered with the Function PassManager on the function
+    /// referenced by `fn_value`.
+    pub fn run(&'llvm self, fn_value: FnValue<'llvm>) {
+        unsafe {
+            // Returns 1 if any of the passes modified the function, false otherwise.
+            LLVMRunFunctionPassManager(self.fpm, fn_value.value_ref());
+        }
+    }
+}
+
+impl Drop for FunctionPassManager<'_> {
+    fn drop(&mut self) {
+        unsafe {
+            LLVMDisposePassManager(self.fpm);
+        }
+    }
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/type_.rs.html b/src/llvm_kaleidoscope_rs/llvm/type_.rs.html new file mode 100644 index 0000000..89e332a --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/type_.rs.html @@ -0,0 +1,121 @@ +type_.rs - source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+
+use llvm_sys::{
+    core::{LLVMConstReal, LLVMDumpType, LLVMGetTypeKind},
+    prelude::LLVMTypeRef,
+    LLVMTypeKind,
+};
+
+use std::marker::PhantomData;
+
+use super::Value;
+
+/// Wrapper for a LLVM Type Reference.
+#[derive(Copy, Clone)]
+#[repr(transparent)]
+pub struct Type<'llvm>(LLVMTypeRef, PhantomData<&'llvm ()>);
+
+impl<'llvm> Type<'llvm> {
+    /// Create a new Type instance.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `type_ref` is a null pointer.
+    pub(super) fn new(type_ref: LLVMTypeRef) -> Self {
+        assert!(!type_ref.is_null());
+        Type(type_ref, PhantomData)
+    }
+
+    /// Get the raw LLVM type reference.
+    #[inline]
+    pub(super) fn type_ref(&self) -> LLVMTypeRef {
+        self.0
+    }
+
+    /// Get the LLVM type kind for the given type reference.
+    pub(super) fn kind(&self) -> LLVMTypeKind {
+        unsafe { LLVMGetTypeKind(self.type_ref()) }
+    }
+
+    /// Dump the LLVM Type to stdout.
+    pub fn dump(&self) {
+        unsafe { LLVMDumpType(self.type_ref()) };
+    }
+
+    /// Get a value reference representing the const `f64` value.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn const_f64(self, n: f64) -> Value<'llvm> {
+        debug_assert_eq!(
+            self.kind(),
+            LLVMTypeKind::LLVMDoubleTypeKind,
+            "Expected a double type when creating const f64 value!"
+        );
+
+        let value_ref = unsafe { LLVMConstReal(self.type_ref(), n) };
+        Value::new(value_ref)
+    }
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/llvm/value.rs.html b/src/llvm_kaleidoscope_rs/llvm/value.rs.html new file mode 100644 index 0000000..950eae0 --- /dev/null +++ b/src/llvm_kaleidoscope_rs/llvm/value.rs.html @@ -0,0 +1,341 @@ +value.rs - source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+
+use llvm_sys::{
+    analysis::{LLVMVerifierFailureAction, LLVMVerifyFunction},
+    core::{
+        LLVMCountBasicBlocks, LLVMCountParams, LLVMDumpValue, LLVMGetParam, LLVMGetReturnType,
+        LLVMGetValueKind, LLVMGetValueName2, LLVMSetValueName2, LLVMTypeOf,
+    },
+    prelude::LLVMValueRef,
+    LLVMTypeKind, LLVMValueKind,
+};
+
+use std::ffi::CStr;
+use std::marker::PhantomData;
+use std::ops::Deref;
+
+use super::Type;
+
+/// Wrapper for a LLVM Value Reference.
+#[derive(Copy, Clone)]
+#[repr(transparent)]
+pub struct Value<'llvm>(LLVMValueRef, PhantomData<&'llvm ()>);
+
+impl<'llvm> Value<'llvm> {
+    /// Create a new Value instance.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `value_ref` is a null pointer.
+    pub(super) fn new(value_ref: LLVMValueRef) -> Self {
+        assert!(!value_ref.is_null());
+        Value(value_ref, PhantomData)
+    }
+
+    /// Get the raw LLVM value reference.
+    #[inline]
+    pub(super) fn value_ref(&self) -> LLVMValueRef {
+        self.0
+    }
+
+    /// Get the LLVM value kind for the given value reference.
+    pub(super) fn kind(&self) -> LLVMValueKind {
+        unsafe { LLVMGetValueKind(self.value_ref()) }
+    }
+
+    /// Dump the LLVM Value to stdout.
+    pub fn dump(&self) {
+        unsafe { LLVMDumpValue(self.value_ref()) };
+    }
+
+    /// Get a type reference representing for the given value reference.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn type_of(&self) -> Type<'llvm> {
+        let type_ref = unsafe { LLVMTypeOf(self.value_ref()) };
+        Type::new(type_ref)
+    }
+
+    /// Set the name for the given value reference.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn set_name(&self, name: &str) {
+        unsafe { LLVMSetValueName2(self.value_ref(), name.as_ptr().cast(), name.len()) };
+    }
+
+    /// Get the name for the given value reference.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn get_name(&self) -> &'llvm str {
+        let name = unsafe {
+            let mut len: libc::size_t = 0;
+            let name = LLVMGetValueName2(self.0, &mut len as _);
+            assert!(!name.is_null());
+
+            CStr::from_ptr(name)
+        };
+
+        // TODO: Does this string live for the time of the LLVM context?!
+        name.to_str()
+            .expect("Expected valid UTF8 string from LLVM API")
+    }
+
+    /// Check if value is of `f64` type.
+    pub fn is_f64(&self) -> bool {
+        self.type_of().kind() == LLVMTypeKind::LLVMDoubleTypeKind
+    }
+
+    /// Check if value is of integer type.
+    pub fn is_int(&self) -> bool {
+        self.type_of().kind() == LLVMTypeKind::LLVMIntegerTypeKind
+    }
+}
+
+/// Wrapper for a LLVM Value Reference specialized for contexts where function values are needed.
+#[derive(Copy, Clone)]
+#[repr(transparent)]
+pub struct FnValue<'llvm>(Value<'llvm>);
+
+impl<'llvm> Deref for FnValue<'llvm> {
+    type Target = Value<'llvm>;
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+
+impl<'llvm> FnValue<'llvm> {
+    /// Create a new FnValue instance.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `value_ref` is a null pointer.
+    pub(super) fn new(value_ref: LLVMValueRef) -> Self {
+        let value = Value::new(value_ref);
+        debug_assert_eq!(
+            value.kind(),
+            LLVMValueKind::LLVMFunctionValueKind,
+            "Expected a fn value when constructing FnValue!"
+        );
+
+        FnValue(value)
+    }
+
+    /// Get a type reference representing the return value of the given function value.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn ret_type(&self) -> Type<'llvm> {
+        let type_ref = unsafe { LLVMGetReturnType(LLVMTypeOf(self.value_ref())) };
+        Type::new(type_ref)
+    }
+
+    /// Get the number of function arguments for the given function value.
+    pub fn args(&self) -> usize {
+        unsafe { LLVMCountParams(self.value_ref()) as usize }
+    }
+
+    /// Get a value reference for the function argument at index `idx`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer or indexed out of bounds.
+    pub fn arg(&self, idx: usize) -> Value<'llvm> {
+        assert!(idx < self.args());
+
+        let value_ref = unsafe { LLVMGetParam(self.value_ref(), idx as libc::c_uint) };
+        Value::new(value_ref)
+    }
+
+    /// Get the number of Basic Blocks for the given function value.
+    pub fn basic_blocks(&self) -> usize {
+        unsafe { LLVMCountBasicBlocks(self.value_ref()) as usize }
+    }
+
+    /// Verify that the given function is valid.
+    pub fn verify(&self) -> bool {
+        unsafe {
+            LLVMVerifyFunction(
+                self.value_ref(),
+                LLVMVerifierFailureAction::LLVMPrintMessageAction,
+            ) == 0
+        }
+    }
+}
+
+
+ + \ No newline at end of file diff --git a/src/llvm_kaleidoscope_rs/parser.rs.html b/src/llvm_kaleidoscope_rs/parser.rs.html index 3bd0dc8..9093695 100644 --- a/src/llvm_kaleidoscope_rs/parser.rs.html +++ b/src/llvm_kaleidoscope_rs/parser.rs.html @@ -1,6 +1,4 @@ -parser.rs - source - -
  1
+parser.rs - source
  1
   2
   3
   4
@@ -481,7 +479,7 @@
 /// PrototypeAST - This class represents the "prototype" for a function,
 /// which captures its name, and its argument names (thus implicitly the number
 /// of arguments the function takes).
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Clone)]
 pub struct PrototypeAST(pub String, pub Vec<String>);
 
 /// FunctionAST - This class represents a function definition itself.
@@ -770,7 +768,7 @@
     /// Implement `std::unique_ptr<FunctionAST> ParseTopLevelExpr();` from the tutorial.
     pub fn parse_top_level_expr(&mut self) -> ParseResult<FunctionAST> {
         let e = self.parse_expression()?;
-        let proto = PrototypeAST("".into(), Vec::new());
+        let proto = PrototypeAST("__anon_expr".into(), Vec::new());
         Ok(FunctionAST(proto, e))
     }
 }
@@ -922,4 +920,6 @@
     }
 }
 
-
\ No newline at end of file +
+ + \ No newline at end of file -- cgit v1.2.3