-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to the BDD tests to better tests the compiler and runtimes, reduce interpreter runs, and speed it up a bit (while the compiler path slows it back down) #13
Conversation
…es, reduce interpreter runs, and speed it up a bit (while the compiler path slows it back down)
from @std/app import start, print, exit | ||
on start { | ||
print('Hello, World') | ||
emit exit 0 | ||
} | ||
" | ||
} | ||
Before before | ||
BeforeAll before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does switching to BeforeAll
and AfterAll
speed things up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it only runs the compilation step once per block.
bdd/spec/007_comparator_spec.sh
Outdated
When run alan-interpreter interpret temp.ln | ||
It "runs js" | ||
When run node temp.js | ||
The output should eq "false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to store this string in a variable and reuse it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? Let me think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How's this?
@@ -820,7 +820,7 @@ pub static OPCODES: Lazy<HashMap<i64, ByteOpcode>> = Lazy::new(|| { | |||
}); | |||
cpu!("andbool", |args, mem_frag, _, _| { | |||
let a = mem_frag.read(args[0], 1)[0]; | |||
let b = mem_frag.read(args[0], 1)[0]; | |||
let b = mem_frag.read(args[1], 1)[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is kinda nice to be able to make small changes that span multiple repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the wins of a monorepo, for sure.
No description provided.