Skip to content

Commit

Permalink
Revert "Make first call to $*KERNEL.bits 21x faster"
Browse files Browse the repository at this point in the history
This reverts commit 34f62de.

$?BITS is how many bits a native int is, not the bits of the architecture
  • Loading branch information
zoffixznet committed Jun 2, 2017
1 parent 34f62de commit b879060
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Kernel.pm
Expand Up @@ -7,6 +7,7 @@ class Kernel does Systemic {
has Str $.release;
has Str $!hardware;
has Str $!arch;
has Int $!bits;

sub uname($opt) {
state $has_uname = "/bin/uname".IO.s || "/usr/bin/uname".IO.s;
Expand Down Expand Up @@ -96,7 +97,9 @@ class Kernel does Systemic {
self.hardware ~ '-' ~ self.name
}

method bits { $?BITS }
method bits {
$!bits //= $.hardware ~~ m/_64|w|amd64/ ?? 64 !! 32; # naive approach
}

has @!signals; # Signal
#?if jvm
Expand Down

0 comments on commit b879060

Please sign in to comment.