Comments (1)
Thank you for reporting this!
Current approach is to perform constant folding during the semantic analysis, which among other things, replaces all constant references with their values.
Local and private constants end up unreferenced and they are omitted in C output because the compilers would warn. swiftc 5.8.1 doesn't warn.
My goal is to keep the constants and the references to them. This requires reworking the constant folder.
This is not trivial, because compile-time constants are required in some places, such as case
values, array storage sizes and (obviously) values of constants. Fusion supports compile-time function execution (CTFE), unlike C/C#/Java/Python. C++ supports CTFE provided the functions are marked with constexpr
.
from fut.
Related Issues (20)
- `#include <stdio.h>` in `native` blocks doesn't work HOT 1
- Correctly generate the main function for C/C++ HOT 3
- Reference example of Dictionary is not working HOT 1
- Transpile to Golang HOT 2
- Regex C++ issue smatch vs cmatch HOT 1
- Thoughts on expanding the standard lib HOT 3
- JSON parsing support HOT 14
- WIP: Support for starting child processes and reading output
- Emit compiler directives based on language being compiled HOT 6
- Allow delegates / anonymous functions HOT 6
- Promise / Callback Types (Instead of async/await?) HOT 3
- String Comparisons HOT 1
- Revisiting ICU dependency HOT 4
- What is the ref-code in the Playground examples, if C/C++ were supposed to not have GC? HOT 23
- Is there some mailing list, forum, Element/Matrix chat or something for communication? HOT 6
- What exactly guarantees that all of the produced codes have exactly the same behavior? HOT 7
- syntactic sugar for getters/setters HOT 1
- Duplicated symbol error reported on wrong line HOT 1
- false positive error inside #if condition? HOT 1
- Transpiling to Dart
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 fut.