Skip to content

Commit

Permalink
Updating: very very minorly
Browse files Browse the repository at this point in the history
  • Loading branch information
githwxi committed Sep 6, 2024
1 parent f3396f7 commit 13049a1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
5 changes: 1 addition & 4 deletions prelude/DATS/CATS/JS/gint000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ XATS2JS_sint_add_sint
return (i1 + i2) // HX: add
}
//
//
function
XATS2JS_sint_sub_sint
(i1, i2)
Expand All @@ -108,15 +107,13 @@ XATS2JS_sint_mul_sint
return (i1 * i2) // HX: mul
}
//
//
function
XATS2JS_sint_div_sint
(i1, i2)
{
return (i1 / i2) // HX: div
return Math.trunc(i1 / i2)
}
//
//
function
XATS2JS_sint_mod_sint
(i1, i2)
Expand Down
7 changes: 2 additions & 5 deletions srcgen2/xats2js/srcgen1/xshared/runtime/xats2js_prelude.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Thu 05 Sep 2024 01:48:28 PM EDT
// Thu 05 Sep 2024 09:36:56 PM EDT
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/*
Expand Down Expand Up @@ -190,7 +190,6 @@ XATS2JS_sint_add_sint
return (i1 + i2) // HX: add
}
//
//
function
XATS2JS_sint_sub_sint
(i1, i2)
Expand All @@ -206,15 +205,13 @@ XATS2JS_sint_mul_sint
return (i1 * i2) // HX: mul
}
//
//
function
XATS2JS_sint_div_sint
(i1, i2)
{
return (i1 / i2) // HX: div
return Math.trunc(i1 / i2)
}
//
//
function
XATS2JS_sint_mod_sint
(i1, i2)
Expand Down
2 changes: 1 addition & 1 deletion srcgen2/xats2js/srcgen1/xshared/runtime/xats2js_xatslib.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Thu 05 Sep 2024 01:48:28 PM EDT
// Thu 05 Sep 2024 09:36:56 PM EDT
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/*
Expand Down
20 changes: 20 additions & 0 deletions xatslib/githwxi/TEST/CATS/JS/Makefile_jsemit
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ test02_qlist00.dats; \
$(NODE) --stack-size=4096 $(SRCGEN2_XATS2JS) $< >> $@_out.js
########################################################################
########################################################################
test03:: ; \
echo "//" `date` > $@_out.js
############
test03:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_js1emit.js >> $@_out.js
test03:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_prelude.js >> $@_out.js
test03:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_xatslib.js >> $@_out.js
############
test03:: \
test03_gint000.dats; \
$(NODE) --stack-size=4096 $(SRCGEN2_XATS2JS) $< >> $@_out.js
############
test03:: ; \
npx google-closure-compiler -W QUIET \
--compilation_level ADVANCED --js=$@_out.js --js_output_file=$@_out2.js
########################################################################
########################################################################
test99:: ; \
echo "//" `date` > $@_out.js
############
Expand All @@ -82,5 +101,6 @@ $(NODE) --stack-size=4096 $(SRCGEN2_XATS2JS) $< >> $@_out.js
clean:: ; rm -f *~
cleanall:: ; rm -f *~
cleanall:: ; rm -f test??_out.js
cleanall:: ; rm -f test??_out?.js
########################################################################
###################### end of [Makefile_jsemit] ########################
1 change: 1 addition & 0 deletions xatslib/githwxi/TEST/CATS/JS/test02_qlist00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Thu 05 Sep 2024 05:36:54 PM EDT
//
(* ****** ****** *)
(* ****** ****** *)
//
#include
"srcgen2\
/prelude/HATS/prelude_JS_dats.hats"
Expand Down
8 changes: 0 additions & 8 deletions xatslib/githwxi/TEST/CATS/JS/test99_mydiary.dats
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ end//let
(* ****** ****** *)
////
(* ****** ****** *)
//
val ds =
nint_dgt$listize(123456789)
val () = print1s("ds = ", ds,"\n")
//
(* ****** ****** *)
////
(* ****** ****** *)
val f0 =
lam(x:int) => @(x, x=x)
val () =
Expand Down

0 comments on commit 13049a1

Please sign in to comment.