Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Some pir:: => nqp:: for the setting.

  • Loading branch information...
commit b9ee89a9e1521d862a0a105d91d9d8a42b0b6a56 1 parent 10dac76
Jonathan Worthington authored
6  src/core/Attribute.pm
@@ -8,7 +8,7 @@ my class Attribute {
8 8
             unless $package.HOW.declares_method($package, $meth_name) {
9 9
                 my $dcpkg := nqp::p6decont($package);
10 10
                 my $meth;
11  
-                my int $attr_type = pir::repr_get_primitive_type_spec__IP($!type);
  11
+                my int $attr_type = nqp::objprimspec($!type);
12 12
                 if self.rw {
13 13
                     $meth  := nqp::p6bool(nqp::iseq_i($attr_type, 0))
14 14
                         ??
@@ -78,7 +78,7 @@ my class Attribute {
78 78
     
79 79
     method get_value(Mu $obj) {
80 80
         my $decont := nqp::p6decont($obj);
81  
-        given nqp::p6box_i(pir::repr_get_primitive_type_spec__IP($!type)) {
  81
+        given nqp::p6box_i(nqp::objprimspec($!type)) {
82 82
             when 0 { nqp::getattr($decont, $!package, $!name) }
83 83
             when 1 { nqp::p6box_i(nqp::getattr_i($decont, $!package, $!name)) }
84 84
             when 2 { nqp::p6box_n(nqp::getattr_n($decont, $!package, $!name)) }
@@ -88,7 +88,7 @@ my class Attribute {
88 88
     
89 89
     method set_value(Mu $obj, Mu \value) {
90 90
         my $decont := nqp::p6decont($obj);
91  
-        given nqp::p6box_i(pir::repr_get_primitive_type_spec__IP($!type)) {
  91
+        given nqp::p6box_i(nqp::objprimspec($!type)) {
92 92
             when 0 { nqp::bindattr($decont, $!package, $!name, value) }
93 93
             when 1 { nqp::p6box_i(nqp::bindattr_i($decont, $!package, $!name, value)) }
94 94
             when 2 { nqp::p6box_n(nqp::bindattr_n($decont, $!package, $!name, value)) }
2  src/core/Cursor.pm
@@ -27,7 +27,7 @@ my class Cursor does NQPCursorRole {
27 27
                 else {
28 28
                     $value := nqp::p6list($value, List, Mu)
29 29
                         if nqp::islist($value);
30  
-                    nqp::iscclass(pir::const::CCLASS_NUMERIC, $key, 0)
  30
+                    nqp::iscclass(nqp::const::CCLASS_NUMERIC, $key, 0)
31 31
                       ?? nqp::bindpos($list, $key, $value)
32 32
                       !! nqp::bindkey($hash, $key, $value);
33 33
                 }
6  src/core/Exception.pm
@@ -210,7 +210,7 @@ do {
210 210
                 $err.print: $ex;
211 211
                 $err.print: "\n";
212 212
             }
213  
-            $_() for pir::perl6ize_type__PP(@*END_PHASERS);
  213
+            $_() for nqp::p6type(@*END_PHASERS);
214 214
         }
215 215
         if $! {
216 216
             pir::perl6_based_rethrow__0PP(nqp::getattr(nqp::p6decont($!), Exception, '$!ex'), $ex);
@@ -255,7 +255,7 @@ do {
255 255
         }
256 256
     }
257 257
             
258  
-    my Mu $comp := pir::compreg__Ps('perl6');
  258
+    my Mu $comp := nqp::getcomp('perl6');
259 259
     $comp.HOW.add_method($comp, 'handle-exception',
260 260
         method (|) {
261 261
             my Mu $ex := nqp::atpos(pir::perl6_current_args_rpa__P(), 1);
@@ -1204,7 +1204,7 @@ my class X::Item is Exception {
1204 1204
             X::NoDispatcher.new(:$redispatcher).throw;
1205 1205
         };
1206 1206
     my Mu $parrot_c_ex := nqp::getattr(%c_ex, EnumMap, '$!storage');
1207  
-    pir::set_hll_global__vsP('P6EX', $parrot_c_ex);
  1207
+    nqp::bindcurhllsym('P6EX', $parrot_c_ex);
1208 1208
     0;
1209 1209
 }
1210 1210
 
6  src/core/Mu.pm
@@ -271,13 +271,13 @@ my class Mu {
271 271
     }
272 272
     
273 273
     method clone(*%twiddles) {
274  
-        my $cloned := pir::repr_clone__PP(nqp::p6decont(self));
  274
+        my $cloned := nqp::clone(nqp::p6decont(self));
275 275
         for self.^attributes() -> $attr {
276 276
             my $name := $attr.name;
277 277
             my $package := $attr.package;
278  
-            unless pir::repr_get_primitive_type_spec__IP($attr.type) {
  278
+            unless nqp::objprimspec($attr.type) {
279 279
                 my $attr_val := nqp::getattr($cloned, $package, $name);
280  
-                nqp::bindattr($cloned, $package, $name, pir::repr_clone__PP($attr_val.VAR))
  280
+                nqp::bindattr($cloned, $package, $name, nqp::clone($attr_val.VAR))
281 281
                     if nqp::iscont($attr_val);
282 282
             }
283 283
             my $acc_name := $name.substr(2);
4  src/core/Routine.pm
@@ -21,7 +21,7 @@ my class Routine {
21 21
     
22 22
     method candidates() {
23 23
         self.is_dispatcher ??
24  
-            pir::perl6ize_type__PP($!dispatchees) !!
  24
+            nqp::p6type($!dispatchees) !!
25 25
             (self,)
26 26
     }
27 27
     
@@ -37,7 +37,7 @@ my class Routine {
37 37
         # Call this lexical sub to get rid of 'self' in the signature.
38 38
         sub checker(|) {
39 39
             my Mu $cap := pir::find_lex__Ps('call_sig');
40  
-            pir::perl6ize_type__PP(pir::perl6_get_matching_multis__PPP($disp, $cap))
  40
+            nqp::p6type(pir::perl6_get_matching_multis__PPP($disp, $cap))
41 41
         }
42 42
         checker(|$c);
43 43
     }
12  src/core/Str.pm
@@ -219,13 +219,13 @@ my class Str does Stringy {
219 219
         my int $eos = nqp::chars($str);
220 220
 
221 221
         # S02:3276-3277: Ignore leading and trailing whitespace
222  
-        my int $pos = nqp::findnotcclass(pir::const::CCLASS_WHITESPACE,
  222
+        my int $pos = nqp::findnotcclass(nqp::const::CCLASS_WHITESPACE,
223 223
                                                   $str, 0, $eos);
224 224
         my int $end = nqp::sub_i($eos, 1);
225 225
 
226 226
         $end = nqp::sub_i($end, 1)
227 227
             while nqp::isge_i($end, $pos)
228  
-               && nqp::iscclass(pir::const::CCLASS_WHITESPACE, $str, $end);
  228
+               && nqp::iscclass(nqp::const::CCLASS_WHITESPACE, $str, $end);
229 229
 
230 230
         # Return 0 if no non-whitespace characters in string
231 231
         return 0 if nqp::islt_i($end, $pos);
@@ -729,7 +729,7 @@ my class Str does Stringy {
729 729
     method trim-leading(Str:D:) {
730 730
         my str $str = nqp::unbox_s(self);
731 731
         my int $pos = nqp::findnotcclass(
732  
-                          pir::const::CCLASS_WHITESPACE,
  732
+                          nqp::const::CCLASS_WHITESPACE,
733 733
                           $str, 0, nqp::chars($str));
734 734
         nqp::p6box_s(nqp::substr($str, $pos));
735 735
     }
@@ -739,7 +739,7 @@ my class Str does Stringy {
739 739
         my int $pos = nqp::chars($str) - 1;
740 740
         $pos = $pos - 1
741 741
             while nqp::isge_i($pos, 0)
742  
-               && nqp::iscclass(pir::const::CCLASS_WHITESPACE, $str, $pos);
  742
+               && nqp::iscclass(nqp::const::CCLASS_WHITESPACE, $str, $pos);
743 743
         nqp::islt_i($pos, 0) ?? '' !! nqp::p6box_s(nqp::substr($str, 0, $pos + 1));
744 744
     }
745 745
 
@@ -747,10 +747,10 @@ my class Str does Stringy {
747 747
         my str $str  = nqp::unbox_s(self);
748 748
         my int $pos  = nqp::chars($str) - 1;
749 749
         my int $left = nqp::findnotcclass(
750  
-                           pir::const::CCLASS_WHITESPACE, $str, 0, $pos + 1);
  750
+                           nqp::const::CCLASS_WHITESPACE, $str, 0, $pos + 1);
751 751
         $pos = $pos - 1
752 752
             while nqp::isge_i($pos, $left)
753  
-               && nqp::iscclass(pir::const::CCLASS_WHITESPACE, $str, $pos);
  753
+               && nqp::iscclass(nqp::const::CCLASS_WHITESPACE, $str, $pos);
754 754
         nqp::islt_i($pos, $left) ?? '' !! nqp::p6box_s(nqp::substr($str, $left, $pos + 1 - $left));
755 755
     }
756 756
 
2  src/core/control.pm
@@ -148,7 +148,7 @@ proto sub eval($, *%) {*}
148 148
 multi sub eval(Str $code, :$lang = 'perl6', PseudoStash :$context) {
149 149
     my $eval_ctx := nqp::getattr(nqp::p6decont($context // CALLER::), PseudoStash, '$!ctx');
150 150
     my $?FILES   := 'eval_' ~ (state $no)++;
151  
-    my $compiler := pir::compreg__PS($lang);
  151
+    my $compiler := nqp::getcomp($lang);
152 152
     X::Eval::NoSuchLang.new(:$lang).throw
153 153
         if nqp::isnull($compiler);
154 154
     my $pbc      := $compiler.compile($code, :outer_ctx($eval_ctx), :global(GLOBAL));
28  src/core/terms.pm
@@ -2,9 +2,9 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
2 2
 
3 3
 {
4 4
     my @ARGS;
5  
-    my Mu $argiter := pir::get_hll_global__Ps('$!ARGITER');
  5
+    my Mu $argiter := nqp::getcurhllsym('$!ARGITER');
6 6
     @ARGS.push(nqp::p6box_s(nqp::shift($argiter))) while $argiter;
7  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '@ARGS', @ARGS);
  7
+    nqp::bindkey(nqp::who(PROCESS), '@ARGS', @ARGS);
8 8
     $PROCESS::ARGFILES = IO::ArgFiles.new(:args(@ARGS));
9 9
 
10 10
     my %ENV;
@@ -39,14 +39,14 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
39 39
             return $ret;
40 40
         }
41 41
     }
42  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '%ENV', %ENV);
  42
+    nqp::bindkey(nqp::who(PROCESS), '%ENV', %ENV);
43 43
 
44 44
     my $VM = {
45 45
         name    => 'parrot', # XXX: should be made dynamical
46  
-        config  => pir::perl6ize_type__PP(
  46
+        config  => nqp::p6type(
47 47
                         nqp::atpos(pir::getinterp__P, pir::const::IGLOBALS_CONFIG_HASH))
48 48
     }
49  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$VM', $VM);
  49
+    nqp::bindkey(nqp::who(PROCESS), '$VM', $VM);
50 50
 
51 51
     my Mu $compiler := pir::find_caller_lex__PS('$COMPILER_CONFIG');
52 52
     my $PERL = {
@@ -59,10 +59,10 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
59 59
             codename => nqp::p6box_s(nqp::atkey($compiler, 'codename')),
60 60
         }
61 61
     };
62  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$PERL', $PERL);
  62
+    nqp::bindkey(nqp::who(PROCESS), '$PERL', $PERL);
63 63
 
64 64
     my $CWD = nqp::p6box_s(pir::new__PS('OS').cwd);
65  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$CWD', $CWD);
  65
+    nqp::bindkey(nqp::who(PROCESS), '$CWD', $CWD);
66 66
 
67 67
     my @INC;
68 68
     @INC.push(%ENV<RAKUDOLIB>.split($VM<config><osname> eq 'MSWin32' ?? ';' !! ':')) if %ENV<RAKUDOLIB>;
@@ -82,7 +82,7 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
82 82
         %CUSTOM_LIB<home> = "$home/.perl6/$ver";
83 83
         @INC.push(%CUSTOM_LIB<home> ~ '/lib');
84 84
     }
85  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '%CUSTOM_LIB', %CUSTOM_LIB);
  85
+    nqp::bindkey(nqp::who(PROCESS), '%CUSTOM_LIB', %CUSTOM_LIB);
86 86
 
87 87
     my $I := nqp::atkey(nqp::atkey(%*COMPILING, '%?OPTIONS'), 'I');
88 88
     if nqp::defined($I) {
@@ -95,23 +95,23 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
95 95
         }
96 96
     }
97 97
 
98  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '@INC', @INC);
  98
+    nqp::bindkey(nqp::who(PROCESS), '@INC', @INC);
99 99
 
100 100
     my $PID = nqp::p6box_i(pir::getinterp__P().getpid());
101  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$PID', $PID);
  101
+    nqp::bindkey(nqp::who(PROCESS), '$PID', $PID);
102 102
 
103 103
     my $OS = $VM<config><osname>; # XXX: master gets this information with the sysinfo dynop
104  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$OS', $OS);
  104
+    nqp::bindkey(nqp::who(PROCESS), '$OS', $OS);
105 105
 
106 106
     my $OSVER = $VM<config><osvers>; # XXX: master gets this information with the sysinfo dynop
107  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$OSVER', $OSVER);
  107
+    nqp::bindkey(nqp::who(PROCESS), '$OSVER', $OSVER);
108 108
 
109 109
     my $EXECUTABLE_NAME = 
110 110
         nqp::p6box_s(pir::interpinfo__Si(pir::const::INTERPINFO_EXECUTABLE_FULLNAME));
111  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$EXECUTABLE_NAME', $EXECUTABLE_NAME);
  111
+    nqp::bindkey(nqp::who(PROCESS), '$EXECUTABLE_NAME', $EXECUTABLE_NAME);
112 112
     my Mu $comp := pir::compreg__Ps('perl6');
113 113
 
114 114
     my $PROGRAM_NAME = $comp.user-progname();
115  
-    nqp::bindkey(pir::get_who__PP(PROCESS), '$PROGRAM_NAME', $PROGRAM_NAME);
  115
+    nqp::bindkey(nqp::who(PROCESS), '$PROGRAM_NAME', $PROGRAM_NAME);
116 116
 
117 117
 }
2  tools/build/NQP_REVISION
... ...
@@ -1 +1 @@
1  
-2013.01-160-gc41c8f4
  1
+2013.01-192-g98a623e

0 notes on commit b9ee89a

Please sign in to comment.
Something went wrong with that request. Please try again.