Skip to content
Open
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
af69d13
Stub out Rust compiler
captbaritone Apr 7, 2021
a51d274
Subtraction
captbaritone Apr 7, 2021
86e08d9
Add multiply
captbaritone Apr 7, 2021
4b3e192
Support division
captbaritone Apr 7, 2021
a1788c9
Stub out test that evaluates generated Wasm
captbaritone Apr 7, 2021
827e6e8
Allow dead opcodes
captbaritone Apr 7, 2021
1ce622e
Compile using parity-wasm
captbaritone Apr 7, 2021
1bbb745
Clean up some unused code
captbaritone Apr 7, 2021
32144b6
wasm-bindgen and compatibility test suite
captbaritone Apr 7, 2021
02c8c74
Hack in assignment
captbaritone Apr 7, 2021
7dfb6ad
Proper globals
captbaritone Apr 7, 2021
5efc6a5
Start to play with imported values
captbaritone Apr 7, 2021
51b520c
Multiple user defined functions
captbaritone Apr 7, 2021
8e033cf
Add function call int()
captbaritone Apr 7, 2021
e9d7012
Custom result types
captbaritone Apr 7, 2021
d4540f4
Improve error reporting
captbaritone Apr 7, 2021
7f422dc
Add snapshot tests
captbaritone Apr 7, 2021
e31466e
Add parser snapshot tests
captbaritone Apr 7, 2021
3fa446e
Clean up comment
captbaritone Apr 7, 2021
551b913
Add pools to programs
captbaritone Apr 7, 2021
298a64e
Add token snapshot tests
captbaritone Apr 7, 2021
2ac0297
Add Cargo tests to GitHub actions
captbaritone Apr 7, 2021
8d442b6
Set CI working directory
captbaritone Apr 7, 2021
10f54af
Another attempt at working directory
captbaritone Apr 7, 2021
d1a01a7
Shims
captbaritone Apr 7, 2021
c0fba27
Add support for reg/d/d
captbaritone Apr 7, 2021
b5add55
Build up a single instruction vec per program
captbaritone Apr 7, 2021
d4cb279
Improve naming
captbaritone Apr 7, 2021
d019ab7
Work toward getting shims working in tests
captbaritone Apr 7, 2021
bf74d5c
Get tests working for globals and shims
captbaritone Apr 7, 2021
f64de0e
Abstract test util and improved signature for globals
captbaritone Apr 7, 2021
210dc60
Support whitespace
captbaritone Apr 7, 2021
fbc044a
Support builtin functions (div)
captbaritone Apr 7, 2021
d24fef1
Improve naming
captbaritone Apr 7, 2021
bf0949b
Move variable access to prefix parsing
captbaritone Apr 7, 2021
74e1612
Unary expressions
captbaritone Apr 7, 2021
94680e2
Read global g in tests
captbaritone Apr 7, 2021
668b07a
Add basic semicolon support
captbaritone Apr 7, 2021
d94ddca
Spelling
captbaritone Apr 7, 2021
ca2b251
Fix unary precedence
captbaritone Apr 7, 2021
d9b67f9
Make variables case insensitive
captbaritone Apr 7, 2021
e91ffd3
Fix peek_prefix
captbaritone Apr 7, 2021
80b7a75
Decimals and parens
captbaritone Apr 7, 2021
a57659b
Support numbers on either side of decimal point
captbaritone Apr 7, 2021
cebbda5
Fix unary !
captbaritone Apr 7, 2021
892bd3b
Commets and lexer cleanup
captbaritone Apr 7, 2021
21a8450
Add expression blocks
captbaritone Apr 7, 2021
3b11134
Don't return from eel functions
captbaritone Apr 7, 2021
85117ad
Variable access
captbaritone Apr 7, 2021
e8e60f1
If function
captbaritone Apr 7, 2021
3a487b4
Allow reading (g)megabuf
captbaritone Apr 7, 2021
27ceca3
Split emitter in two
captbaritone Apr 7, 2021
8f9e9ef
==
captbaritone Apr 7, 2021
a3ceda7
Support mod
captbaritone Apr 7, 2021
e8a79ae
Bitwise operators
captbaritone Apr 7, 2021
b3326c9
Pow
captbaritone Apr 7, 2021
31c8d0f
More inlined functions
captbaritone Apr 7, 2021
95f25b9
Simplify return values
captbaritone Apr 7, 2021
4885f7d
More builtin functions
captbaritone Apr 9, 2021
12538df
Implement all shims
captbaritone Apr 9, 2021
9becdb7
sign()
captbaritone Apr 9, 2021
3835fed
Backslash comments
captbaritone Apr 9, 2021
e315708
Lex +=
captbaritone Apr 9, 2021
609b5dc
Document how to get gzipped size of wasm
captbaritone Apr 9, 2021
4cd01c5
Stub out logical and
captbaritone Apr 9, 2021
17fba38
Unify function index
captbaritone Apr 9, 2021
a376e45
Remove explicit offset
captbaritone Apr 9, 2021
beb437c
Setup the ability to call shims and builtins from bultins
captbaritone Apr 9, 2021
cabfcc3
Clean up builtin type gen
captbaritone Apr 9, 2021
aa2d2de
Move list of shims to shims enum
captbaritone Apr 9, 2021
cb94738
Less than, greater than
captbaritone Apr 9, 2021
4254060
<= >=
captbaritone Apr 9, 2021
08b085b
!=
captbaritone Apr 9, 2021
f7a0653
exec2/3
captbaritone Apr 9, 2021
1867147
While
captbaritone Apr 9, 2021
659f446
Loop
captbaritone Apr 9, 2021
e34468e
||
captbaritone Apr 9, 2021
ab876d6
Update assignment
captbaritone Apr 9, 2021
7b58b8a
Assign
captbaritone Apr 10, 2021
27fd103
Write to buffers
captbaritone Apr 10, 2021
e35acab
+= etc for buffer
captbaritone Apr 11, 2021
f0e9b0f
Enable passing test
captbaritone Apr 11, 2021
ccb5ad9
Clean up CLI
captbaritone Apr 11, 2021
afd7ae7
Allow function args to be expression blocks
captbaritone Apr 12, 2021
baf216c
Cleanup
captbaritone Apr 12, 2021
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
Simplify return values
  • Loading branch information
captbaritone committed Apr 7, 2021
commit 95f25b9aaf90b4836c78750e4cb37a9f102ab923
6 changes: 2 additions & 4 deletions compiler-rs/src/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ impl Shim {
vec![ValueType::F64; self.arity()]
}

// All shims return a value
pub fn get_return(&self) -> Vec<ValueType> {
match self {
Shim::Sin => vec![ValueType::F64],
Shim::Pow => vec![ValueType::F64],
}
vec![ValueType::F64]
}
pub fn arity(&self) -> usize {
match self {
Expand Down