I am in the process of restructuring atscc2js. I will have something more
modular soon.On Wed, May 20, 2015 at 1:38 PM, Hongwei Xi gmh...@gmail.com wrote:
Because it has never been implemented. I will fix it shortly.
On Wed, May 20, 2015 at 12:50 PM, ‘Yannick Duchêne’ via ats-lang-users < ats-lan...@googlegroups.com> wrote:
Le vendredi 22 août 2014 20:58:09 UTC+2, gmhwxi a écrit :
I am currently targeting Node.js. This is the first running example I
had:
[…]
Not a big issue, just a bit annoying, atscc2js does not output the file
name with its error messages (or it’s just with me?), just the
“line=”/“offs=”.
I will add the finishing time at the end of each generated file.
On Wednesday, August 27, 2014 8:16:07 PM UTC-4, Raoul Duke wrote:
warning: this comment can easily be interpreted to mean the compiler
is slow, taking 19+ hours to compile! pretty please reword it to avoid
fudding ats2js. (and even possibly do include the actual
compilation time stats.)
/*
**
** The JavaScript code is generated by atscc2js
** The compilation time is: 2014-8-27: 19h:27m
**
*/
I am currently targeting Node.js. This is the first running example I had:
[…]
What’s the difference between pats_ccomp_instrset.h and pats_ccomp.h?
They both seems to define similar things.
I came to this question trying to understand how ATSCC2JS generate a JS
file. I guess it parse the file, searching for macros it expects to find,
but they are defined at two places.
Also, as the compilation from C source to the final binary target make uses
of macro, why not do the same for C to JS and use the C preprocessor to
generate JS files from the C files, as the C files seems to be made of a
predefined set of macros?
Because it has never been implemented. I will fix it shortly.On Wed, May 20, 2015 at 12:50 PM, ‘Yannick Duchêne’ via ats-lang-users < ats-lan...@googlegroups.com> wrote:
Le vendredi 22 août 2014 20:58:09 UTC+2, gmhwxi a écrit :
I am currently targeting Node.js. This is the first running example I had:
[…]
Not a big issue, just a bit annoying, atscc2js does not output the file
name with its error messages (or it’s just with me?), just the
“line=”/“offs=”.
not_null is a template, and it is never implemented.On Thu, May 14, 2015 at 12:12 AM, ‘Yannick Duchêne’ via ats-lang-users < ats-lan...@googlegroups.com> wrote:
Le vendredi 22 août 2014 20:58:09 UTC+2, gmhwxi a écrit :
extern fun element{r: reference | not_null(r)}(r: reference r): element
extern fun reference(k: string): reference
val r: reference = reference(“foo”)
val b: bool = not_null(r)
val () =
if b then
let val e: element = element(r)
in () end
%{$
js_main_dynload();
%}
The error ATSCC2JS complains about:
Hello from atscc2js!
ParsingErrors:
:236:35:
error(parsing): the keyword [)] is needed.
:236:1:
error(parsing): the keyword [}] is needed.
Here is the corresponding line #236 in the C file:
ATSINSmove(statmp1, PMVtmpltcstmat0(
statmp0)) ;
Offset 35 is at the “[” character. It also seems PMVtmpltcstmat is not
defined anywhere.
Exciting. If I understand based on your previous assessment, atscc2js
would probably be the best existing template for a atscc2java?
While there are multiple paths to target the JVM, I’m guessing that
having an atscc2java is the most reasonable for the moment, and will
probably still generate fairly performant code.
My medium term plans would be to write atscc2java, then convert
IntelliJATS to it … I hope this might generate more interest for
others in the community as well, but I would say my primary reason is
to just have something to program ATS in, and this seems to be some
potentially nice synergy.On Wed, May 20, 2015 at 2:03 PM, Hongwei Xi gmh...@gmail.com wrote:
Okay, I added a quick fix.
I am in the process of restructuring atscc2js. I will have something more
modular soon.
On Wed, May 20, 2015 at 1:38 PM, Hongwei Xi gmh...@gmail.com wrote:
Because it has never been implemented. I will fix it shortly.
I am currently targeting Node.js. This is the first running example I
had:
[…]
Not a big issue, just a bit annoying, atscc2js does not output the file
name with its error messages (or it’s just with me?), just the
“line=”/“offs=”.
extern fun element{r: reference | not_null(r)}(r: reference r): element
extern fun reference(k: string): reference
val r: reference = reference(“foo”)
val b: bool = not_null(r)
val () =
if b then
let val e: element = element(r)
in () end
%{$
js_main_dynload();
%}
The error ATSCC2JS complains about:
Hello from atscc2js!
ParsingErrors:
:236:35:
error(parsing): the keyword [)] is needed.
:236:1:
error(parsing): the keyword [}] is needed.
Here is the corresponding line #236 in the C file:
ATSINSmove(statmp1, PMVtmpltcstmat0(
statmp0)) ;
Offset 35 is at the “[” character. It also seems PMVtmpltcstmat is not
defined anywhere.
I will add the finishing time at the end of each generated file.On Wednesday, August 27, 2014 8:16:07 PM UTC-4, Raoul Duke wrote:
warning: this comment can easily be interpreted to mean the compiler
is slow, taking 19+ hours to compile! pretty please reword it to avoid
fudding ats2js. (and even possibly do include the actual
compilation time stats.)
/*
**
** The JavaScript code is generated by atscc2js
** The compilation time is: 2014-8-27: 19h:27m
**
*/
I am currently targeting Node.js. This is the first running example I
had: […]
What’s the difference between pats_ccomp_instrset.h and pats_ccomp.h?
They both seems to define similar things.
I came to this question trying to understand how ATSCC2JS generate a JS
file. I guess it parse the file, searching for macros it expects to find,
but they are defined at two places.
Also, as the compilation from C source to the final binary target make
uses of macro, why not do the same for C to JS and use the C preprocessor
to generate JS files from the C files, as the C files seems to be made of a
predefined set of macros?
Also, as the compilation from C source to the final binary target make
uses of macro, why not do the same for C to JS and use the C preprocessor
to generate JS files from the C files, as the C files seems to be made of a
predefined set of macros?
Just gave it a try, and as there are other includes, this cannot be that
easy. The includes are really made for C.
Can I still use either one of these two include files as a reference or
should I look to other things too?