Comments (4)
In the case of adding floats to ints, did we decide on promoting the ints to floats? Originally, we said we'll just take whatever comes first, but I couldn't remember what we decided on.
from dice.
I thought we decided to promote ints to floats (for binops) because when we got together last time, we tried out the llvm library's build_add function with an int and a "float" by casting the int to const_double, then using const_uitofp
from dice.
Ah gotcha. But if we have the addition of two integers, it stays type int, correct?
from dice.
In the current implementation, yup indeed:
https://github.com/DavidWatkins/Dice/blob/emily/Compiler/analyzer.ml#L115
from dice.
Related Issues (20)
- Test args
- Exit not working in runtime
- Test overloading std-lib functions HOT 1
- Test default constructor HOT 1
- Test max/min floats HOT 1
- char[][] args does not work in main HOT 1
- Maximum float is limited to 6 digits after the decimal HOT 2
- test-constructor1.dice is written incorrectly HOT 1
- test-gcd.dice Bug. You cannot assign values to parameters HOT 1
- Add error message for assigning parameters
- Create test for cyclical inheritance HOT 1
- E-test-privateFieldsAccess.dice HOT 1
- passing in an inherited class for classes HOT 1
- Expected stderr: "exception Exceptions.LocalAssignTypeMismatch("B", "C")" HOT 1
- this should raise no exceptions HOT 1
- fix delete test, no multiple arrays HOT 1
- string length tests HOT 1
- Fix error test messages, more useful error messages are now being printed
- Awesome! HOT 1
- Update the Wiki
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dice.