B-C
view release on metacpan or search on metacpan
ByteLoader/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
s++; if (s < send && (*s == 'I' || *s == 'i')) {
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
return 0;
if (sawinf) {
numtype &= IS_NUMBER_NEG; /* Keep track of sign */
numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
Re-add PL_sv_objcount on cperl
Fixed XSUB CONSTSUB alias (44,45,... PR #228) (atoomic)
and anonymous CVs for 5.22 (#246, #305)
Proper utf8 support for gv_fetchpv, gv_stashpv and cv_get,
cache gv_stashpv calls.
Fix 5.22 for empty hash keys, share_hek("") (272, GH#249)
Fixed refcounts for shared hek's, fixing the notorious unshare_hek assertions
since 5.10 (GH #251, #255). See 1.06: "Had to disable -O1 -fcog (pv_copy_on_grow)
on 5.10 and higher until I find out how to fool S_unshare_hek_or_pvn. This fixes
all C -O1 and -O2 tests. Warn about this."
Fix Inf/NaN support for C (GH#287)
Fix handling of READONLY hashes in 5.22, i.e. use feature (GH#250)
Support custom op Devel_Peek_Dump, added with 5.20 (GH#274)
Defer regex compilation to new init1 for SWASHNEW (GH#273)
Support unicode labels (upstream B bug) (GH#318)
Skip unneeded init-time lexwarn checks,
support optimized cperl PERL_SUPPORT_STATIC_COP (cperl #70)
Fixed overload stringify broken since 5.18 (GH #219)
by adding a mro_isa_changed_in() to the overloaded stash.
Support multiple stash ENAMES, needed since 5.14 (GH #331)
This fixed many old 5.14 limitations. (Added to our version of B)
Support %^H, storing the hints_hash (features, pragmas) (GH#220)
This fixed many old 5.14 limitations.
Improve MATCH once (m??) handling with reset, find PMOP from
the Regexp dynamically (GH#252)
Bump refcounts of dynamic get_cv refs (#293). Fixes Coro in global destruction.
Skip more XS defined POSIX constants: all that start with 'M' (GH#335, #345)
One more "Eval-group not allowed at runtime" fix (GH#137, GH#346)
* CC (1.16_01): Encode unicode labels (GH#318)
* Stackobj (1.12_01): fix Inf/NaN support for CC (GH#287)
* t/CORE: versioned the core tests and moved to a external submodule
perl11/p5-coretests on github. (GH#332)
1.52 2014-09-09 rurban
* C: Protect against empty SV ptr in SV magic (\0) with $` with 5.20 (#370)
Save new pmop (?{}) code_list with 5.18 (#372)
Unset PL_use_safe_putenv as in perlmain, which initializes PL_origalen properly,
which fixes setting long a $0 string (#194)
Force Moose when only Class::MOP is loaded to give the needed path hint to XSLoader,
when "Assuming xs loaded $stashname".
}
$sval = '0' if $sval =~ /(NAN|inf)$/i;
return $sval;
#return $C99 ? ".xivu_uv = $sval" : $sval; # this is version dependent
}
# protect from warning: floating constant exceeds range of âdoubleâ [-Woverflow]
sub nvx ($) {
my $nvx = shift;
# Handle infinite and NaN values
if ( defined $nvx ) {
if ( $Config{d_isinf} or $] < 5.012 ) {
return 'INFINITY' if $nvx =~ /^Inf/i;
return '-INFINITY' if $nvx =~ /^-Inf/i;
}
return 'NAN' if $nvx =~ /^NaN/i and ($Config{d_isnan} or $] < 5.012);
# TODO NANL for long double
}
my $nvgformat = $Config{nvgformat};
$nvgformat =~ s/["\0]//g; #" poor editor
$nvgformat =~ s/".$/"/; # cperl bug 5.22.2 #61
unless ($nvgformat) {
$nvgformat = 'g';
}
my $dblmax = "1.79769313486232e+308";
lib/B/Stackobj.pm view on Meta::CPAN
runtime("$obj->{iv} = $sval;");
$obj->{flags} &= ~( VALID_SV | VALID_NUM );
$obj->{flags} |= VALID_INT | SAVE_INT;
$obj->{flags} |= VALID_UNSIGNED if $unsigned;
}
sub set_double {
my ( $obj, $expr ) = @_;
my $sval;
if ($expr =~ /^-?(Inf|NaN)$/i) {
$sval = B::C::nvx($expr);
$sval = $expr if $sval eq '0' and $expr;
# bullshit detector for non numeric expr, expr 'lnv0 + rnv0'
} elsif ($expr =~ /[ a-dfzA-DF-Z]/) { # looks not like number
$sval = $expr;
} else {
$sval = B::C::nvx($expr);
$sval = $expr if $sval eq '0' and $expr;
}
ramblings/remark.js view on Meta::CPAN
require=function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t)...
this.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[this.BACKSLASH_ESCAPE]};this.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)...
SUBST.contains=EXPRESSIONS;return{aliases:["coffee","cson","iced"],keywords:KEYWORDS,contains:EXPRESSIONS.concat([{className:"comment",begin:"###",end:"###"},hljs.HASH_COMMENT_MODE,{className:"function",begin:"("+JS_IDENT_RE+"\\s*=\\s*)?(\\(.*\\))?\\...
}()},{}],8:[function(require,module,exports){exports.addClass=function(element,className){element.className=exports.getClasses(element).concat([className]).join(" ")};exports.removeClass=function(element,className){element.className=exports.getClasse...
events.on("slideChanged",updateHash);navigateByHash()}function navigateByHash(){var slideNoOrName=(dom.getLocationHash()||"").substr(1);events.emit("gotoSlide",slideNoOrName)}function updateHash(slideNoOrName){dom.setLocationHash("#"+slideNoOrName)}}...
$x
.
open OUT, ">ccode.tmp";
write(OUT);
close(OUT);
print `cat "ccode.tmp"`'
result[2841]='123
456
789'
# issue 287 with Inf and NaN
tests[2870]='my $i = "Inf" + 0; print $i <= 0 ? "not $i " : "", "ok\n";'
tests[2871]='my $i = "-Inf" + 0; print $i >= 0 ? "not $i " : "", "ok\n";'
tests[2872]='my $i = "NaN" + 0; print $i <= 0 ? "not $i " : "", "ok\n"'
tests[284]='use Encode; find_encoding("euc-jp") and print qq/ok\n/'
# mojibake
tests[288]='use utf8; package Diáªád_A; sub á { "A" } package Diáªád_B; our @ISA = ("Diáªád_A"); sub á { "B => " . (shift)->SUPER::á } package Diáªád_C; our @ISA = ("Diáªád_B"); sub á { "C => " . (shift)->SUPER::á }...
tests[289]='no warnings; sub z_zwap (&); print qq{ok\n} if eval q{sub z_zwap {return @_}; 1;}'
tests[2901]='sub f;print "ok" if exists &f && not defined &f;'
tests[290]='print "ok\n"if "IO::File" eq ref *STDOUT{IO}'
tests[293]='use Coro; print q(ok)'
tests[294]='#!perl -w
BEGIN { $SIG{__WARN__} = sub { my $s = shift; do { warn $s; die $s } if $s =~ qr{Constant subroutine.*redefined}i }; }
t/testcc.sh view on Meta::CPAN
$x
.
open OUT, ">ccode.tmp";
write(OUT);
close(OUT);
print `cat "ccode.tmp"`'
result[2841]='123
456
789'
# issue 287 with Inf and NaN
tests[2870]='my $i = "Inf" + 0; print $i <= 0 ? "not $i " : "", "ok\n";'
tests[2871]='my $i = "-Inf" + 0; print $i >= 0 ? "not $i " : "", "ok\n";'
tests[2872]='my $i = "NaN" + 0; print $i <= 0 ? "not $i " : "", "ok\n"'
tests[284]='use Encode; find_encoding("euc-jp") and print qq/ok\n/'
# mojibake
tests[288]='use utf8; package Diáªád_A; sub á { "A" } package Diáªád_B; our @ISA = ("Diáªád_A"); sub á { "B => " . (shift)->SUPER::á } package Diáªád_C; our @ISA = ("Diáªád_B"); sub á { "C => " . (shift)->SUPER::á }...
tests[289]='no warnings; sub z_zwap (&); print qq{ok\n} if eval q{sub z_zwap {return @_}; 1;}'
tests[2901]='sub f;print "ok" if exists &f && not defined &f;'
tests[290]='print "ok\n"if "IO::File" eq ref *STDOUT{IO}'
tests[293]='use Coro; print q(ok)'
tests[294]='#!perl -w
BEGIN { $SIG{__WARN__} = sub { my $s = shift; do { warn $s; die $s } if $s =~ qr{Constant subroutine.*redefined}i }; }
( run in 0.313 second using v1.01-cache-2.11-cpan-4d50c553e7e )