save work, working on function clause guards, extra pop instructions are showing up after function definitions
This commit is contained in:
parent
0f8645d2eb
commit
5ae4742840
|
@ -1083,7 +1083,6 @@ impl<'a> Compiler<'a> {
|
|||
self.emit_constant(init_val);
|
||||
self.bind(name);
|
||||
|
||||
// TODO: close over everything accessed in the function
|
||||
for upvalue in upvalues {
|
||||
self.emit_op(Op::SetUpvalue);
|
||||
self.emit_byte(upvalue.stack_pos);
|
||||
|
|
|
@ -76,12 +76,11 @@ pub fn run(src: &'static str) {
|
|||
pub fn main() {
|
||||
env::set_var("RUST_BACKTRACE", "1");
|
||||
let src = "
|
||||
fn foo {
|
||||
() if false -> :no
|
||||
() if true -> :yes
|
||||
}
|
||||
fn foo () -> :foo
|
||||
|
||||
foo
|
||||
|
||||
|
||||
foo ()
|
||||
";
|
||||
run(src);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user