File: ops.markdown

package info (click to toggle)
rakudo 2024.09-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,508 kB
  • sloc: perl: 4,815; ansic: 2,724; java: 2,622; javascript: 590; makefile: 434; sh: 370; cpp: 152
file content (231 lines) | stat: -rw-r--r-- 5,590 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# TABLE OF CONTENTS
- [Rakudo Opcodes]
    - [p6argsfordispatcher](#p6argsfordispatcher)
    - [p6argvmarray](#p6argvmarray)
    - [p6bindassert](#p6bindassert)
    - [p6bindattrinvres](#p6bindattrinvres)
    - [p6bindcaptosig](#p6bindcaptosig)
    - [p6bindsig](#p6bindsig)
    - [p6box_i](#p6box_i)
    - [p6box_n](#p6box_n)
    - [p6box_s](#p6box_s)
    - [p6box_u](#p6box_u)
    - [p6capturelex](#p6capturelex)
    - [p6capturelexwhere](#p6capturelexwhere)
    - [p6captureouters2](#p6captureouters2)
    - [p6clearpre](#p6clearpre)
    - [p6configposbindfailover](#p6configposbindfailover)
    - [p6decontrv](#p6decontrv)
    - [p6definite](#p6definite)
    - [p6finddispatcher](#p6finddispatcher)
    - [p6getlexclient](#p6getlexclient)
    - [p6getouterctx](#p6getouterctx)
    - [p6init](#p6init)
    - [p6inpre](#p6inpre)
    - [p6invokeflat](#p6invokeflat)
    - [p6invokehandler](#p6invokehandler)
    - [p6invokeunder](#p6invokeunder)
    - [p6isbindable](#p6isbindable)
    - [p6recont_ro](#p6recont_ro)
    - [p6reprname](#p6reprname)
    - [p6return](#p6return)
    - [p6scalarfromdesc](#p6scalarfromdesc)
    - [p6setautothreader](#p6setautothreader)
    - [p6setbinder](#p6setbinder)
    - [p6setfirstflag](#p6setfirstflag)
    - [p6setpre](#p6setpre)
    - [p6settypes](#p6settypes)
    - [p6sink](#p6sink)
    - [p6stateinit](#p6stateinit)
    - [p6staticouter](#p6staticouter)
    - [p6store](#p6store)
    - [p6takefirstflag](#p6takefirstflag)
    - [p6trialbind](#p6trialbind)
    - [p6typecheckrv](#p6typecheckrv)
    - [p6var](#p6var)


## p6argsfordispatcher
* p6argsfordispatcher(Sub $dispatcher)

## p6argvmarray
* p6argvmarray()

## p6bindassert
* p6bindassert(Mu $obj, Mu $target)

Check if $obj can bind into a container typed with type $target and return $obj.

## p6bindattrinvres
* p6bindattrinvres(Mu $obj, Mu $type, str $attr-name, Mu $value)

Bind $value into Attribute $attr-name of object $obj of type $type and return $obj.
This desugars to:

    {
        bindattr($obj, $type, $attr-name, $value);
        $obj;
    }

## p6bindcaptosig
* p6bindcaptosig(Mu $signature, Mu $capture)

## p6bindsig
* p6bindsig()

## p6box_i
* p6box_i(int $value)

Box a native int into a Raku Int.

## p6box_n
* p6box_n(num $value)

Box a native num into a Raku Num.

## p6box_s
* p6box_s(str $value)

Box a native str into a Raku Str.

## p6box_u
* p6box_u(uint $value)

Box a native uint into a Raku UInt.

## p6capturelex
* p6capturelex(Mu $closure)

Given the specified code object, sets its outer to the current scope.
Must be called in the immediate outer scope of the block in question.

## p6capturelexwhere
* p6capturelexwhere(Mu $closure)

## p6captureouters2
* p6captureouters2(Mu $coderef)

## p6clearpre
* p6clearpre()

Clears the "pre" flag in the current frame.

## p6configposbindfailover
* p6configposbindfailover(Mu $type, Mu $failover-type)

Configures the Binder to allow $failover-type to bind to $type in subroutine invocation.

## p6decontrv
* p6decontrv(Mu $type, Mu $value)

## p6definite
* p6definite(Mu $obj)

## p6finddispatcher
* p6finddispatcher(str $value)

## p6getlexclient
* p6getlexclient(str $symbol, int $setting-only)

Takes a name and finds corresponding symbol in lexical scope of [p6clientctx](#p6clientctx). If `$setting-only` is set
to a _true_ value then lookup is performed only in client's SETTING.

## p6getouterctx
* p6getouterctx(Mu $closure)

## p6init
* p6init()

Initializes the GlobalContext extensions for Raku.

## p6inpre
* p6inpre()

Checks for the "pre" flag on the current frame, returns it, and clears it if it was set.

## p6invokeflat
* p6invokeflat(Mu $block, Mu $value-buffer)

## p6invokehandler
* p6invokehandler(Mu $handler-name, Mu $exception)

Invokes handler $handler-name to handle Exception $exception.

## p6invokeunder
* p6invokeunder(Mu $code, Mu $closure)

Invokes $code under $closure.

## p6isbindable
* p6isbindable(Mu $signature, Mu $capture)

Checks if Capture $capture can bind to Signature $signature.

## p6recont_ro
* p6recont_ro(Mu $value)

Recontainerizes $value into a read-only container.

## p6reprname
* p6reprname(Mu $obj)

Returns the name of the REPR underlying $obj.

## p6return
* p6return(Mu $value)

## p6scalarfromdesc
* p6scalarfromdesc(Mu $container-descriptor)

## p6setautothreader
* p6setautothreader(Mu $auto-threader)

Registers a callable that handles the case where a call didn't succeed because it contained Junction arguments.

## p6setbinder
* p6setbinder(Mu $binder)

Register the class that handles binding. Its methods `bind`, `bind_sig`, `is_bindable`, and `trial_bind` are used throughout the rakudo codebase.

## p6setfirstflag
* p6setfirstflag(Mu $coderef)

Sets the "first" flag on a code object, then returns that code object. Used to handle FIRST phaser blocks.

## p6setpre
* p6setpre()

Sets the "pre" flag on the current frame.

## p6settypes
* p6settypes(Mu $stash)

## p6sink
* p6sink(Mu $past)

## p6stateinit
* p6stateinit()

## p6staticouter
* p6staticouter(Mu $coderef)

## p6store
* p6store(Mu $container, Mu $value)

## p6takefirstflag
* p6takefirstflag(Mu $coderef)

Returns the value of the "first" flag of a code object and clears it. Used to handle FIRST phaser blocks.

## p6trialbind
* p6trialbind(Mu $signature, Mu @types, Mu @flags)

Tries a compile-time signature bind against @types with @flags

## p6typecheckrv
* p6typecheckrv(Mu $return-value, Mu $routine, Mu $bypass-type)

Checks if $return-value satisifies the declared return type of $routine, letting $bypass-type bypass the typecheck.

## p6var
* p6var(Mu $variable)