Skip to content

Commit

Permalink
Noted in the documentation that the bug is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlatAssembler committed Aug 30, 2021
1 parent 7fd916b commit d755ece
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions AEC_specification.html
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ <h2 style="text-align: center">AEC Specification</h2>
<a href="https://github.com/FlatAssembler/AECforWebAssembly"
>AEC-to-WebAssembly compiler</a
>
has around 5'000 lines of code, and it's written in C++ (a language much
has around 5'500 lines of code, and it's written in C++ (a language much
more suitable for writing compilers than JavaScript). <br />
WebAssembly is one of the reasons I am a libertarian, because it shows
that, when a private company makes a mistake, no matter how hopeless the
Expand Down Expand Up @@ -748,7 +748,7 @@ <h2 style="text-align: center">AEC Specification</h2>
alt="Total alerts"
src="https://img.shields.io/lgtm/alerts/g/FlatAssembler/AECforWebAssembly.svg?logo=lgtm&logoWidth=18"
/></a>
potential bugs per 5'000 lines of code, most of them being unnecessarily
potential bugs per 5'500 lines of code, most of them being unnecessarily
doing deep copies of C++ objects (wasting time and memory), and quite a
few of them being using potentially uninitialized variables in
JavaScript. If you want to collaborate with me, perhaps one of the first
Expand Down Expand Up @@ -815,7 +815,7 @@ <h2 style="text-align: center">AEC Specification</h2>
može i neki drugi programski jezik. Kako je WebAssembly lagan cilj za
compilere, relativno je lagano dizajnirati svoj programski jezik i
napraviti compiler koji će ga prevoditi u WebAssembly. To sam i ja
napravio, i to je najveći program koji sam napisao do sada, ima 5'000
napravio, i to je najveći program koji sam napisao do sada, ima 5'500
redaka i pisan je u C++-u.
</div>
Sorry about that, but it will take me a lot of time to translate that to
Expand Down Expand Up @@ -1831,6 +1831,7 @@ <h2 style="text-align: center">AEC Specification</h2>
// Since 'a' is set to default to 1 in the declaration of the
// "solveQuadraticEquation" function, it does not need to be written
// if it is indeed 1 when calling that function.
InstantiateStructure QuadraticEquationSolution solution[1 * 2 * 3];
solveQuadraticEquation(a := 1 , b := -1, c := -1, AddressOf(solution[0]));
solveQuadraticEquation(c := -1, b := -1, solution := AddressOf(solution[1]));
solveQuadraticEquation(b := -1, c := -1, solution := AddressOf(solution[2]));
Expand Down Expand Up @@ -1967,11 +1968,13 @@ <h2 style="text-align: center">AEC Specification</h2>
assignments is slower than one produced by C++ compilers, but, in my
opinion, the assembly code by AEC behaves way more intuitively in cases
like this.<br />
<b>UPDATE</b> on 28/08/2021: There is a weird bug in my compiler causing
internal compiler errors in case somebody tries to instantiate an array
of nested structures inside a function. I have found it while writing
the <a href="namedArgumentsTest.aec.html">Named Arguments Test</a>.
There is a simple work-around for now: declare that array globally.
<b>UPDATE</b> on 28/08/2021: There <del>is</del> was a weird bug in my
compiler causing internal compiler errors in case somebody tries to
instantiate an array of nested structures inside a function. I have
found it while writing the
<a href="namedArgumentsTest.aec.html">Named Arguments Test</a>. There is
a simple work-around <del>for now</del> for AECforWebAssembly versions
v1.6.2 and older: declare that array globally.
<pre>
Structure ComplexNumber Consists Of
Decimal32 real, imaginary;
Expand All @@ -1983,12 +1986,17 @@ <h2 style="text-align: center">AEC Specification</h2>

InstantiateStructure QuadraticEquationSolution solution[1 * 2 * 3];
/*
* TODO: Figure out why the compiler crashes if `solutions` is made to be a
* TODO: Figure out why the compiler crashes if `solution` is made to be a
* local variable. I suppose it has something to do with the fact that
* it is an array of nested structures.
*/
</pre
>
<b>UPDATE</b> on 31/08/2021: I have found a
<a
href="https://github.com/FlatAssembler/AECforWebAssembly/commit/8747e0ef33238ab3a598e187da6c0b490bafbc31"
>relatively simple fix</a
>.
<br />
<br /><b id="Assembly">Inline assembly</b><br />
AEC for x86 passes everything between the
Expand Down

0 comments on commit d755ece

Please sign in to comment.