Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9fbd359
initial stub implementation of match statements
arihant2math Jan 19, 2025
bfb4091
formatting
arihant2math Jan 19, 2025
c021326
solved compilation errors
arihant2math Jan 20, 2025
6c7a543
almost working
arihant2math Jan 20, 2025
8617786
formatting
arihant2math Jan 20, 2025
a01240f
as and * support for switch case
arihant2math Jan 20, 2025
d8c4cff
replace todos with errors
arihant2math Jan 20, 2025
aaccadb
fix compile
arihant2math Jan 20, 2025
f9d2418
added Noop instruction
arihant2math Jan 20, 2025
5839dfd
finished default for switch case
arihant2math Jan 20, 2025
40e380e
fix compile
arihant2math Jan 20, 2025
8af2c42
formatting
arihant2math Jan 20, 2025
0774cbd
more implementation
arihant2math Jan 20, 2025
cd0f1cf
rename codegen_* to compile_*
arihant2math Jan 21, 2025
223fbe4
implement SWAP instruction
arihant2math Jan 21, 2025
4ef2a50
applied fix
youknowone Jan 21, 2025
aa6a040
enabled IR debug and attempted to fix codegen
arihant2math Jan 22, 2025
822d565
formatting
arihant2math Jan 22, 2025
ad164c0
basic match statement working
arihant2math Jan 22, 2025
e955ede
basic match statement working
arihant2math Jan 22, 2025
4649898
working as pattern (default works too by extension)
arihant2math Jan 23, 2025
493fc6e
fix rust tests
arihant2math Jan 23, 2025
fe7f8a3
cleanup
arihant2math Jan 23, 2025
805757a
fix clippy errors
arihant2math Jan 23, 2025
b176f9c
formatting
arihant2math Jan 23, 2025
8e78c6d
trivial edits
youknowone Jan 25, 2025
4beef2c
Remove currently unused Nop,Swap op
youknowone Jan 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
finished default for switch case
  • Loading branch information
arihant2math committed Jan 22, 2025
commit 5839dfdffbb1a37e965b47af4e467011c5c545b9
4 changes: 1 addition & 3 deletions compiler/codegen/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2102,11 +2102,9 @@ impl Compiler {
// ADDOP(c, LOC(m->pattern), POP_TOP);
emit!(self, Instruction::Pop);
} else {
todo!("Noop instruction");
// Show line coverage for default case (it doesn't create bytecode)
// TODO: Below
// ADDOP(c, LOC(m->pattern), NOP);
// emit!(cases, Instruction::Nop);
emit!(cases, Instruction::Noop);
}
self.compile_statements(&m.body)?;
}
Expand Down