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 12, 2024
1 parent 5638be0 commit b268d4a
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 6 deletions.
80 changes: 78 additions & 2 deletions srcgen2/xats2js/srcgen1/DATS/js1emit_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ ipat.node() of
|I0Pany _ => ((*void*))
|I0Pvar _ => ((*void*))
//
(*
|I0Pint _ =>
(
f0_int0(b0, ival, ipat))
Expand All @@ -282,7 +281,6 @@ ipat.node() of
|I0Pchr _ =>
(
f0_chr0(b0, ival, ipat))
*)
|I0Pstr _ =>
(
f0_str0(b0, ival, ipat))
Expand All @@ -307,6 +305,84 @@ conj(b0); prints('"',ipat,'"'))
(* ****** ****** *)
//
and
f0_int0
( b0: sint
, ival: i1val
, ipat: i0pat): void =
let
//
val-
I0Pint
( tint ) = ipat.node()
//
#impltmp
g_print
<token>(x) = i0intjs1(filr, x)
#impltmp
g_print
<i1val>(x) = i1valjs1(filr, x)
//
in//let
(conj(b0)
;print("XATS000_inteq(")
;prints(ival, ", ", tint, ")"))
end(*let*)//end-of-[f0_int0(...)]
//
(* ****** ****** *)
//
and
f0_btf0
( b0: sint
, ival: i1val
, ipat: i0pat): void =
let
//
val-
I0Pbtf
( btf0 ) = ipat.node()
//
#impltmp
g_print
<sym_t>(x) = i0btfjs1(filr, x)
#impltmp
g_print
<i1val>(x) = i1valjs1(filr, x)
//
in//let
(conj(b0)
;print("XATS000_btfeq(")
;prints(ival, ", ", btf0, ")"))
end(*let*)//end-of-[f0_btf0(...)]
//
(* ****** ****** *)
//
and
f0_chr0
( b0: sint
, ival: i1val
, ipat: i0pat): void =
let
//
val-
I0Pchr
( tchr ) = ipat.node()
//
#impltmp
g_print
<token>(x) = i0chrjs1(filr, x)
#impltmp
g_print
<i1val>(x) = i1valjs1(filr, x)
//
in//let
(conj(b0)
;print("XATS000_chreq(")
;prints(ival, ", ", tchr, ")"))
end(*let*)//end-of-[f0_chr0(...)]
//
(* ****** ****** *)
//
and
f0_str0
( b0: sint
, ival: i1val
Expand Down
11 changes: 9 additions & 2 deletions srcgen2/xats2js/srcgen1/xshared/runtime/xats2js_js1emit.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,17 @@ let XATSADDR = (addr) => addr // HX: no-op
let XATSFLAT = (addr) => XATS000_lvget(addr)
//
////////////////////////////////////////////////////////////////////////.

//
let XATSCTAG = (_, t) => t
//
let XATS000_inteq = (x, y) => (x===y)
let XATS000_btfeq = (x, y) => (x===y)
let XATS000_chreq = (x, y) => (x===y)
//
let XATS000_streq = (x, y) => (x == y)
//
let XATS000_ctgeq = (v, t) => (v[0] == t)

//
////////////////////////////////////////////////////////////////////////.

let XATS000_casef = function()
Expand Down
2 changes: 1 addition & 1 deletion srcgen2/xats2js/srcgen1/xshared/runtime/xats2js_prelude.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Mon 09 Sep 2024 10:21:04 PM EDT
// Wed 11 Sep 2024 11:24:04 PM EDT
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/*
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 @@
// Mon 09 Sep 2024 10:21:04 PM EDT
// Wed 11 Sep 2024 11:24:04 PM EDT
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/*
Expand Down

0 comments on commit b268d4a

Please sign in to comment.