Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

4/4 - Implement native compilation - plug backend + more tests. #114

Merged
merged 10 commits into from
Apr 4, 2019
Merged

4/4 - Implement native compilation - plug backend + more tests. #114

merged 10 commits into from
Apr 4, 2019

Conversation

twitchyliquid64
Copy link
Contributor

Please review/merge the other PRs in this series first - this builds on those commits.

This is the final PR that enables a minimal (but working) amd64 native backend.

Future PRs will be small additions to support more and more opcodes.

@codecov-io
Copy link

codecov-io commented Mar 24, 2019

Codecov Report

Merging #114 into master will increase coverage by 0.93%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
+ Coverage   64.58%   65.51%   +0.93%     
==========================================
  Files          40       41       +1     
  Lines        3871     3883      +12     
==========================================
+ Hits         2500     2544      +44     
+ Misses       1109     1072      -37     
- Partials      262      267       +5
Impacted Files Coverage Δ
exec/native_compile_nogae.go 100% <100%> (ø)
exec/vm.go 84.13% <0%> (+1.84%) ⬆️
exec/native_compile.go 58% <0%> (+54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84221c2...ad12dfa. Read the comment docs.

@twitchyliquid64
Copy link
Contributor Author

I've merged master in, this should be good for review :)

// setup mocks.
nc.Scanner.(*mockSequenceScanner).emit = []compile.CompilationCandidate{
// Sequence with single integer op - should not compiled.
compile.CompilationCandidate{Start: 0, End: 7, EndInstruction: 3, Metrics: compile.Metrics{IntegerOps: 1}},
Copy link
Contributor

Choose a reason for hiding this comment

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

looking at the history of the changes, it doesn't seem to me EndInstruction's value was changed here, nor below.
shouldn't they be (resp.) 4 and 10 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Note: Start/EndInstruction is not part of the code under test, this test just tests tryNativeCompile(), and mocks everything else.

Copy link
Contributor

@sbinet sbinet left a comment

Choose a reason for hiding this comment

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

LGTM.

@sbinet sbinet merged commit 90eec92 into go-interpreter:master Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants