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

Add some compiler features and documentation #147

Merged
merged 3 commits into from
Dec 2, 2020
Merged

Conversation

water111
Copy link
Collaborator

@water111 water111 commented Dec 1, 2020

Turn on type checking for "memory places", but add an exception for putting a signed integer in an unsigned integer. Fix up some small type issues (pointers vs. uint32).

Add a debug option to compile and display assembly of the result.

Update the GOAL doc.

@coveralls
Copy link

coveralls commented Dec 1, 2020

Pull Request Test Coverage Report for Build 395190589

  • 69 of 284 (24.3%) changed or added relevant lines in 19 files are covered.
  • 7 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.2%) to 80.963%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/goos/TextDB.h 0 1 0.0%
goalc/compiler/CompilerException.h 0 1 0.0%
goalc/compiler/compilation/Block.cpp 0 3 0.0%
goalc/compiler/compilation/ControlFlow.cpp 1 4 25.0%
common/goos/TextDB.cpp 4 9 44.44%
goalc/compiler/compilation/Atoms.cpp 2 7 28.57%
goalc/compiler/Util.cpp 0 6 0.0%
goalc/compiler/Compiler.h 0 8 0.0%
goalc/compiler/compilation/Macro.cpp 0 8 0.0%
goalc/compiler/compilation/Define.cpp 3 13 23.08%
Files with Coverage Reduction New Missed Lines %
goalc/compiler/compilation/Define.cpp 1 89.19%
goalc/compiler/Compiler.cpp 1 55.21%
goalc/compiler/compilation/Debug.cpp 5 4.65%
Totals Coverage Status
Change from base Build 390495665: -0.2%
Covered Lines: 17178
Relevant Lines: 21217

💛 - Coveralls

@water111
Copy link
Collaborator Author

water111 commented Dec 2, 2020

Making some progress toward reasonable error messages! It's not perfect, but it's so much better than before:

  > (m "goal_src/kernel/gcommon.gc")
-- Compilation Error! --
The symbol asdf was looked up as a global variable, but it does not exist.
Form:
asdf
Location:
?
Code:
asdf
--------------------------------------------------------------------------------
Location:
?
Code:
(begin (label gensym9) asdf (if (or (eq? a b) (zero? a)) (return-from #f #t)) (s...
--------------------------------------------------------------------------------
Location:
text from /home/water/jak-project/goal_src/kernel/gcommon.gc, line: 256
  (until (eq? a object)
Code:
(until (eq? a object) asdf (if (or (eq? a b) (zero? a)) (return-from #f #t)) (se...
--------------------------------------------------------------------------------
REPL Error: Compilation Error

@water111 water111 merged commit 71dda76 into master Dec 2, 2020
@water111 water111 deleted the w/compiler-features branch December 2, 2020 02:39
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.

2 participants