File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ class QAST::Block is QAST::Node does QAST::Children {
11
11
has % ! symbol ;
12
12
has % ! local_debug_map ;
13
13
14
+ my $ knowhow := nqp ::knowhow(). new_type(: repr(" P6bigint" ));
15
+
14
16
method new (str : $ name , str : $ blocktype , * @ children , * % options ) {
15
17
my $ node := nqp ::create(self );
16
18
nqp ::bindattr_i($ node , QAST ::Node, ' $!flags' , 0 );
@@ -44,7 +46,12 @@ class QAST::Block is QAST::Node does QAST::Children {
44
46
method cuid ($ value = NO_VALUE) {
45
47
if ! ($ value =:= NO_VALUE) {
46
48
# Set ID if we are provided one.
47
- $ ! cuid := $ value ;
49
+ if nqp ::isint($ value ) {
50
+ $ ! cuid := nqp ::base_I(nqp ::box_i($ value , $ knowhow ), 36 );
51
+ }
52
+ else {
53
+ $ ! cuid := $ value ;
54
+ }
48
55
}
49
56
elsif $ ! cuid {
50
57
# If we already have an ID, return it.
@@ -53,7 +60,7 @@ class QAST::Block is QAST::Node does QAST::Children {
53
60
else {
54
61
# Otherwise, generate one.
55
62
$ cur_cuid := $ cur_cuid + 1 ;
56
- $ ! cuid := ~ $ cur_cuid ;
63
+ $ ! cuid := nqp ::base_I( nqp ::box_i( $ cur_cuid , $ knowhow ), 36 ) ;
57
64
}
58
65
}
59
66
You can’t perform that action at this time.
0 commit comments