Skip to content
Permalink
Browse files

[js] Add a bunch of ifdefs to work around problems with serializing

weird low level things

They are usually special cased during serialization unless they get
forced into a serialization context
  • Loading branch information...
pmurias committed Mar 27, 2019
1 parent 75e2fb7 commit 9d1872871c6a8bd20471c56190543f7985378656
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/core/Rakudo/Internals.pm6
@@ -851,7 +851,12 @@ implementation detail and has no serviceable parts inside"
my int constant $initial-offset = 10;
# TAI - UTC at the Unix epoch (1970-01-01T00:00:00Z).

#?if !js
my constant $dates = nqp::list_s(
#?endif
#?if js
my $dates := nqp::list_s(
#?endif
#BEGIN leap-second-dates
'1972-06-30',
'1972-12-31',
@@ -891,7 +896,12 @@ implementation detail and has no serviceable parts inside"
# %leap-seconds{$d} seconds behind TAI.

# Ambiguous POSIX times.
#?if !js
my constant $posixes = nqp::list_i(
#?endif
#?if js
my $posixes := nqp::list_i(
#?endif
#BEGIN leap-second-posix
78796800,
94694400,
@@ -922,7 +932,12 @@ implementation detail and has no serviceable parts inside"
1483228800,
#END leap-second-posix
);
#?if !js
my int constant $elems = nqp::elems($dates);
#?endif
#?if js
my int $elems = nqp::elems($dates);
#?endif

method is-leap-second-date(\date) {
nqp::hllbool(

0 comments on commit 9d18728

Please sign in to comment.
You can’t perform that action at this time.