Skip to content
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

Merged
merged 2 commits into from
May 28, 2020

Conversation

dfellis
Copy link
Member

@dfellis dfellis commented May 28, 2020

No description provided.

…es, reduce interpreter runs, and speed it up a bit (while the compiler path slows it back down)
@dfellis dfellis self-assigned this May 28, 2020
@dfellis dfellis requested a review from depombo May 28, 2020 03:09
from @std/app import start, print, exit
on start {
print('Hello, World')
emit exit 0
}
"
}
Before before
BeforeAll before
Copy link
Member

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?

Copy link
Member Author

@dfellis dfellis May 28, 2020

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.

When run alan-interpreter interpret temp.ln
It "runs js"
When run node temp.js
The output should eq "false
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? Let me think.

Copy link
Member Author

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];
Copy link
Member

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

Copy link
Member Author

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.

@dfellis dfellis merged commit ef41f46 into master May 28, 2020
@dfellis dfellis deleted the bdd-improvements branch May 28, 2020 03:42
@depombo depombo mentioned this pull request Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants