Skip to content

Commit

Permalink
A little setting re-ordering; put NQPStr first, since we need strings…
Browse files Browse the repository at this point in the history
… early on in the bootstrap.
  • Loading branch information
jnthn committed Aug 20, 2010
1 parent c20047e commit 3e7ec36
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions common/NQP/NQPSetting.pm
@@ -1,32 +1,32 @@
knowhow NQPInt is repr('P6int') {
knowhow NQPStr is repr('P6str') {
method new() {
nqp::instance_of(self.WHAT);
}
method Bool() {
nqp::logical_not_int(nqp::equal_ints(self, 0, NQPInt), NQPInt)
}
method Int() {
self
}
method Num() {
nqp::coerce_int_to_num(self, NQPNum)
nqp::logical_not_int(nqp::equal_strs(self, "", NQPInt), NQPInt) &&
nqp::logical_not_int(nqp::equal_strs(self, "0", NQPInt), NQPInt)
}
method Str() {
nqp::coerce_int_to_str(self, NQPStr)
self
}
}

knowhow NQPStr is repr('P6str') {
knowhow NQPInt is repr('P6int') {
method new() {
nqp::instance_of(self.WHAT);
}
method Bool() {
nqp::logical_not_int(nqp::equal_strs(self, "", NQPInt), NQPInt) &&
nqp::logical_not_int(nqp::equal_strs(self, "0", NQPInt), NQPInt)
nqp::logical_not_int(nqp::equal_ints(self, 0, NQPInt), NQPInt)
}
method Str() {
method Int() {
self
}
method Num() {
nqp::coerce_int_to_num(self, NQPNum)
}
method Str() {
nqp::coerce_int_to_str(self, NQPStr)
}
}

knowhow NQPNum is repr('P6num') {
Expand Down

0 comments on commit 3e7ec36

Please sign in to comment.