Remove dbg prints
This commit is contained in:
parent
6937c76a86
commit
21300b71cf
@ -889,7 +889,6 @@ impl Parse for TableConstructorEntry {
|
|||||||
(stream.peek(), stream.peek2())
|
(stream.peek(), stream.peek2())
|
||||||
{
|
{
|
||||||
let key = stream.parse::<Node<String>>()?;
|
let key = stream.parse::<Node<String>>()?;
|
||||||
dbg!(&key);
|
|
||||||
let key = key.with(Expression::Literal(Literal::String(key.kind.clone())));
|
let key = key.with(Expression::Literal(Literal::String(key.kind.clone())));
|
||||||
if let Some(Token::Symbol('=')) = stream.peek() {
|
if let Some(Token::Symbol('=')) = stream.peek() {
|
||||||
stream.next();
|
stream.next();
|
||||||
|
|||||||
@ -523,8 +523,6 @@ impl Statement {
|
|||||||
expr_regs.extend(regs);
|
expr_regs.extend(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg!(&expr_regs);
|
|
||||||
|
|
||||||
let mut inner_scope = scope.clone();
|
let mut inner_scope = scope.clone();
|
||||||
|
|
||||||
let iterator_reg = *expr_regs.get(0).unwrap();
|
let iterator_reg = *expr_regs.get(0).unwrap();
|
||||||
@ -987,15 +985,11 @@ impl Expression {
|
|||||||
scope.highest_upvalue + scope.register_counter.0 as i32;
|
scope.highest_upvalue + scope.register_counter.0 as i32;
|
||||||
inner_scope.upvalues = scope.upvalues.clone();
|
inner_scope.upvalues = scope.upvalues.clone();
|
||||||
|
|
||||||
dbg!(&scope.highest_upvalue, &scope.register_counter.0);
|
|
||||||
|
|
||||||
for (name, reg) in &scope.locals {
|
for (name, reg) in &scope.locals {
|
||||||
let upvalue_reg = *reg + (scope.highest_upvalue + 1) as u16;
|
let upvalue_reg = *reg + (scope.highest_upvalue + 1) as u16;
|
||||||
inner_scope.upvalues.insert(name.clone(), upvalue_reg);
|
inner_scope.upvalues.insert(name.clone(), upvalue_reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg!(&inner_scope.upvalues);
|
|
||||||
|
|
||||||
let instructions = block.compile(state, &mut inner_scope);
|
let instructions = block.compile(state, &mut inner_scope);
|
||||||
state.prototypes.push(Prototype {
|
state.prototypes.push(Prototype {
|
||||||
instructions: process_pre_instrs(instructions),
|
instructions: process_pre_instrs(instructions),
|
||||||
|
|||||||
@ -110,8 +110,6 @@ pub fn compile(
|
|||||||
let chunk = stream.parse::<Block>()?;
|
let chunk = stream.parse::<Block>()?;
|
||||||
stream.expect(Token::Eof)?;
|
stream.expect(Token::Eof)?;
|
||||||
|
|
||||||
dbg!(&chunk);
|
|
||||||
|
|
||||||
let constants = chunk
|
let constants = chunk
|
||||||
.find_constants(
|
.find_constants(
|
||||||
&mut Default::default(),
|
&mut Default::default(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user