This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |
index f4b3c47..ede71f6 100644 | |
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |
@@ -20,6 +20,10 @@ | |
#include "core/arm/skyeye_common/armmmu.h" | |
#include "core/arm/skyeye_common/vfp/vfp.h" | |
+#include "boost/container/flat_set.hpp" | |
+#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{File, SeekSet}; | |
use std::num::min; | |
pub struct ChunkReader<'a> { | |
data_file: &'a mut File, | |
chunk_pos: i64, | |
chunk_start: i64, | |
chunk_end: i64, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 yuriks@reinforce ~/projects/OpenVikings/tools-ng (git)-[master] % make :( | |
rustc -O -L ./lib --dep-info build/liblvtools-42c25618-0.0.rlib.d src/lvtools/lib.rs --out-dir lib/ | |
src/lvtools/util.rs:56:17: 56:81 error: internal compiler error: Cannot relate bound region: ReScope(848) <= ReLateBound(803, BrNamed(syntax::ast::DefId{crate: 0u32, node: 833u32}, a)) | |
This message reflects a bug in the Rust compiler. | |
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html | |
src/lvtools/util.rs:56 Req => Value(arg_iter.next().expect("Impossibly missing required argument.").clone()), | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Makefile:28: recipe for target 'lib/liblvtools-42c25618-0.0.rlib' failed | |
make: *** [lib/liblvtools-42c25618-0.0.rlib] Error 101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn test_func() { | |
let flags = [ | |
flag("--banana", "Desc").alias("-b").required().has_option(Required), | |
flag("--012345", "Desc").alias("-a").has_option(Required).default("20"), | |
flag("--kiwi", "Desc").alias("-k"), | |
flag("-p", "Desc").has_option(Optional).default("30"), | |
flag("-l", "Desc").has_option(Required).multiple(), | |
]; | |
let params = [ | |
parameter("foo", Required), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn alias(&self, name: &str) -> Flag { | |
Flag { | |
aliases: std::vec::append_one(self.aliases.to_owned(), name.to_owned()), | |
..self.clone() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<'a> Flag { | |
pub fn alias(&'a mut self, name: &str) -> &'a mut Flag { | |
self.aliases.push(name.to_owned()); self | |
} | |
pub fn required(&'a mut self) -> &'a mut Flag { | |
self.is_required = Required; self | |
} | |
pub fn has_option(&'a mut self, required: IsRequired) -> &'a mut Flag { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl Flag { | |
pub fn alias(mut self, name: &str) -> Flag { | |
self.aliases.push(name.to_owned()); self | |
} | |
pub fn required(mut self) -> Flag { | |
self.is_required = Required; self | |
} | |
pub fn has_option(mut self, required: IsRequired) -> Flag { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rustc -O --test --dep-info build/lib.rs.d src/lib.rs -o build/argparse-test | |
src/lib.rs:118:46: 118:51 error: cannot move out of `flags` because it is borrowed | |
src/lib.rs:118 handle_help(flags, params, argparse_args(flags, params, args.slice_from(1)), args[0]) | |
^~~~~ | |
src/lib.rs:118:17: 118:22 note: borrow of `(*flags)[]` occurs here | |
src/lib.rs:118 handle_help(flags, params, argparse_args(flags, params, args.slice_from(1)), args[0]) | |
^~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mut iter = args.move_iter().peekable(); | |
match &mut iter { | |
i => | |
loop { | |
match i.next() { | |
None => break , | |
Some(arg) => { | |
if arg.starts_with("-") { | |
// TODO | |
} else { free_args.push(arg); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <type_traits> | |
#include <tuple> | |
#include <cstddef> | |
namespace detail { | |
template <typename T, size_t Index, typename... Tuple> | |
class find_type_impl; |
OlderNewer