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 Feb 2, 2025
1 parent 04c90ef commit 4845417
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 89 deletions.
56 changes: 56 additions & 0 deletions contrib/githwxi/BOOTJS1/Makefile_xjsemit
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ dynexp2_sats: \
$(SRCGEN2)/SATS/dynexp2.sats; \
$(NODE) --stack-size=4096 $(XATSOPT_TCHECK00) $<
########################################################################
boot_sats:: \
nmspace_sats
nmspace_sats: \
$(SRCGEN2)/SATS/nmspace.sats; \
$(NODE) --stack-size=4096 $(XATSOPT_TCHECK00) $<
########################################################################
boot_sats:: \
trans12_sats
trans12_sats: \
$(SRCGEN2)/SATS/trans12.sats; \
$(NODE) --stack-size=4096 $(XATSOPT_TCHECK00) $<
########################################################################
########################################################################
boot_dats:: \
xbasics_dats
Expand Down Expand Up @@ -583,6 +595,43 @@ dynexp2_print0_dats
dynexp2_print0_dats: \
$(SRCGEN2)/DATS/dynexp2_print0.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
dynexp2_utils0_dats
dynexp2_utils0_dats: \
$(SRCGEN2)/DATS/dynexp2_utils0.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
########################################################################
boot_dats:: \
nmspace_dats
nmspace_dats: \
$(SRCGEN2)/DATS/nmspace.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
trans11_myenv0_dats
trans11_myenv0_dats: \
$(SRCGEN2)/DATS/trans11_myenv0.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
trans12_myenv0_dats
trans12_myenv0_dats: \
$(SRCGEN2)/DATS/trans12_myenv0.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
trans11_gmacro_dats
trans11_gmacro_dats: \
$(SRCGEN2)/DATS/trans11_gmacro.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
trans12_gmacro_dats
trans12_gmacro_dats: \
$(SRCGEN2)/DATS/trans12_gmacro.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
########################################################################
boot_dats:: \
trans12_dats
trans12_dats: \
$(SRCGEN2)/DATS/trans12.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
########################################################################
########################################################################
clean:: ; rm -f *~
Expand Down Expand Up @@ -668,6 +717,13 @@ cleanall:: ; rm -f BUILD/statyp2_utils2_dats_out.js
cleanall:: ; rm -f BUILD/statyp2_tmplib_dats_out.js
cleanall:: ; rm -f BUILD/dynexp2_dats_out.js
cleanall:: ; rm -f BUILD/dynexp2_print0_dats_out.js
cleanall:: ; rm -f BUILD/dynexp2_utils0_dats_out.js
cleanall:: ; rm -f BUILD/nmspace_dats_out.js
cleanall:: ; rm -f BUILD/trans12_dats_out.js
cleanall:: ; rm -f BUILD/trans11_myenv0_dats_out.js
cleanall:: ; rm -f BUILD/trans12_myenv0_dats_out.js
cleanall:: ; rm -f BUILD/trans11_gmacro_dats_out.js
cleanall:: ; rm -f BUILD/trans12_gmacro_dats_out.js
########################################################################
########################################################################
SRCGEN2_XSHARED=$(SRCGEN2)/xats2js/srcgenx/xshared/runtime
Expand Down
27 changes: 9 additions & 18 deletions srcgen2/DATS/dynexp2_print0.dats
Original file line number Diff line number Diff line change
Expand Up @@ -1165,29 +1165,20 @@ let
#implfun
g_print$out<>() = out
in//let
//
case+
dimp.node() of
//
|
DIMPLone1
( d2c1 ) =>
prints("DIMPLone1(",d2c1,")")
|DIMPLnon1(dqid) =>
(
prints("DIMPLnon1(",dqid,")"))
|DIMPLone1(d2c1) =>
(
prints("DIMPLone1(",d2c1,")"))
|
DIMPLone2
(d2c1, svts) =>
prints
("DIMPLone2(",d2c1,";",svts,")")
//
|
DIMPLall1
(dqid, d2cs) =>
prints
("DIMPLall1(",dqid,";",d2cs,")")
|
DIMPLopt2
(dqid,dcs1,dcs2) =>
prints
("DIMPLopt2(",dqid,";",dcs1,";",dcs2,")")
( prints
("DIMPLone2(",d2c1,";",svts,")"))
//
end (*let*) // end of [dimpl_fprint(...)]
//
Expand Down
21 changes: 9 additions & 12 deletions srcgen2/DATS/dynexp2_utils0.dats
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,18 @@ dimpl_tempq
(
case+
dimp.node() of
|
DIMPLone1
//
|DIMPLnon1
( dqid ) => (false)
//
|DIMPLone1
( d2c1 ) => d2cst_tempq(d2c1)
|
DIMPLone2
//
|DIMPLone2
(
d2c1,svts) => d2cst_tempq(d2c1)
|
DIMPLall1
(
dqid,d2cs) => d2cstlst_tempq(d2cs)
|
DIMPLopt2
(_,d2cs,_) => d2cstlst_tempq(d2cs)
)
//
)(*case+*)//end-of-[dimpl_tempq]
//
(* ****** ****** *)
//
Expand Down
2 changes: 2 additions & 0 deletions srcgen2/DATS/dynexp3_utils0.dats
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ dimpl_make_node
(loc1, DIMPLone2(d2c0, svts))
//
end//let
//
| _(* otherwise *) => ( dimp )
//
)
//
(*
Expand Down
2 changes: 1 addition & 1 deletion srcgen2/DATS/trans11_gmacro.dats
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fun
g1env_addlst
( genv: g1env
, gids: g1ids
, g1ms: g1maclst) =
, g1ms: g1maclst): g1env =
(
case+ gids of
|
Expand Down
34 changes: 12 additions & 22 deletions srcgen2/DATS/trans12_decl00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -2882,23 +2882,15 @@ f1_dqid
, dqid: d1qid): dimpl =
(
if
(*
HX-2025-02-02:
Too restrictive:
list_singq(d2cs)
*)
list_consq(d2cs)
list_nilq(d2cs)
then
dimpl(loc0, DIMPLnon1(dqid))
else
let
val
d2c1 = d2cs.head()
val d2c1 = d2cs.head()
in
dimpl
(loc0, DIMPLone1(d2c1))
dimpl(loc0, DIMPLone1(d2c1))
end
else
dimpl // d2cs = list_nil()
(loc0, DIMPLall1(dqid, d2cs))
) where
{
//
Expand Down Expand Up @@ -3025,23 +3017,21 @@ val tqas =
case-
dimp.node() of
//
|DIMPLnon1
( dqid ) =>
(
trans12_t1qaglst
( env0, tqas ))//DIMPnon1
//
|DIMPLone1
( d2c1 ) =>
( d2c1 ) =>
(
trans12_t1qaglst_wth
( env0, tqas, t2qs )) where
{
val
t2qs = d2cst_get_tqas(d2c1)}
//
(*
HX-2024-01-07:
Should this be disallowed?
*)
|DIMPLall1
(dqid, d2cs) =>
trans12_t1qaglst(env0, tqas)
//
) : t2qaglst//end(val(tqas))
//
val ( ) =
Expand Down
8 changes: 4 additions & 4 deletions srcgen2/DATS/trans3a_myenv0.dats
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,16 @@ in//let
//
case+
dimp.node() of
//
|DIMPnon1 _ => ( (*nothing*) )
//
|DIMPLone1
( d2c1 ) =>
(
tr3aenv_d2cins$any(env0, d2c1, d3cl) )
tr3aenv_d2cins$any(env0, d2c1, d3cl)
|DIMPLone2
(d2c1, svts) =>
(
tr3aenv_d2cins$any(env0, d2c1, d3cl) )
| // HX: DIMPLall1/DIMPLopt2
_ (* otherwise *) => ( (* nothing *) )
//
end(*let*)//end-of-[f0_implmnt0(env0,d3cl)]
//
Expand Down
18 changes: 5 additions & 13 deletions srcgen2/DATS/tread12_decl00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -1338,21 +1338,13 @@ tread12_dimpl
(
case+
dimp.node() of
|
DIMPLone1 _ => dimp
//
|
DIMPLall1
(dqid, d2cs) => dimp where
{
val () =
(
case+ d2cs of
|list_nil() =>
(err := err+1) | list_cons _ => ())
}
|DIMPLone1 _ => dimp
|DIMPLone2 _ => dimp
//
|DIMPLopt2(dqid, d2cs, dopt) => dimp
|DIMPLnon1 _ => dimp
where{
val () = (err := err+1) }
//
) where
{
Expand Down
17 changes: 4 additions & 13 deletions srcgen2/SATS/dynexp2.sats
Original file line number Diff line number Diff line change
Expand Up @@ -1513,19 +1513,10 @@ SIMPLopt2 of
and
dimpl_node =
//
|
DIMPLone1 of
(d2cst(*res*))
|
DIMPLone2 of
(d2cst(*res*), s2vts)
//
|
DIMPLall1 of
(d1qid, d2cstlst(*all*))
|
DIMPLopt2 of
(d1qid, d2cstlst, d2cstlst)
|DIMPLnon1 of (d1qid)
|DIMPLone1 of (d2cst(*res*))
|DIMPLone2 of
(d2cst(*res*), s2vts(*arg*))
//
(* ****** ****** *)
//
Expand Down
10 changes: 4 additions & 6 deletions srcgen2/xats2js/srcgen1/DATS/js1emit_decl00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,12 @@ dimp.node() of
(dcst, svts) =>
(
d2cstjs1(filr, dcst))
|DIMPLall1
(dqid, d2cs) =>
//
|DIMPLnon1
( dqid ) =>
(
d1qid_fprint(filr, dqid))
|DIMPLopt2
(dqid, _, _) =>
(
d1qid_fprint(filr, dqid)))
)(*case+*)//end-of-(dicstjs1)
//
(* ****** ****** *)
//
Expand Down

0 comments on commit 4845417

Please sign in to comment.