-
Notifications
You must be signed in to change notification settings - Fork 2
/
Op.php
1498 lines (1381 loc) · 54.7 KB
/
Op.php
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
namespace KTemplate\Internal;
// File generated by gen_opcodes/main.go; DO NOT EDIT!
use KTemplate\Internal\Compile\Types;
class Op {
public const UNKNOWN = 0;
// Encoding: 0x01
// Result type: unknown/varying
public const RETURN = 1;
// Encoding: 0x02 arg:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const OUTPUT = 2;
// Encoding: 0x03
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: unknown/varying
public const OUTPUT_SLOT0 = 3;
// Encoding: 0x04 arg:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const OUTPUT_SAFE = 4;
// Encoding: 0x05
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: unknown/varying
public const OUTPUT_SAFE_SLOT0 = 5;
// Encoding: 0x06 val:strindex
// Flags: FLAG_HAS_STRING_ARG
// Result type: unknown/varying
public const OUTPUT_STRING_CONST = 6;
// Encoding: 0x07 val:strindex
// Flags: FLAG_HAS_STRING_ARG
// Result type: unknown/varying
public const OUTPUT_SAFE_STRING_CONST = 7;
// Encoding: 0x08 val:intindex
// Result type: unknown/varying
public const OUTPUT_SAFE_INT_CONST = 8;
// Encoding: 0x09 cache:cacheslot k:keyoffset escapebit:imm8
// Result type: unknown/varying
public const OUTPUT_EXTDATA_1 = 9;
// Encoding: 0x0a cache:cacheslot k:keyoffset escapebit:imm8
// Result type: unknown/varying
public const OUTPUT_EXTDATA_2 = 10;
// Encoding: 0x0b cache:cacheslot k:keyoffset escapebit:imm8
// Result type: unknown/varying
public const OUTPUT_EXTDATA_3 = 11;
// Encoding: 0x0c arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const OUTPUT2_SAFE = 12;
// Encoding: 0x0d dst:wslot val:imm8
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const LOAD_BOOL = 13;
// Encoding: 0x0e val:imm8
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::BOOL
public const LOAD_SLOT0_BOOL = 14;
// Encoding: 0x0f dst:wslot val:intindex
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::INT
public const LOAD_INT_CONST = 15;
// Encoding: 0x10 val:intindex
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::INT
public const LOAD_SLOT0_INT_CONST = 16;
// Encoding: 0x11 dst:wslot val:floatindex
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::FLOAT
public const LOAD_FLOAT_CONST = 17;
// Encoding: 0x12 val:floatindex
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::FLOAT
public const LOAD_SLOT0_FLOAT_CONST = 18;
// Encoding: 0x13 dst:wslot val:strindex
// Flags: FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::STRING
public const LOAD_STRING_CONST = 19;
// Encoding: 0x14 val:strindex
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_STRING_ARG
// Result type: Types::STRING
public const LOAD_SLOT0_STRING_CONST = 20;
// Encoding: 0x15 dst:wslot cache:cacheslot k:keyoffset
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const LOAD_EXTDATA_1 = 21;
// Encoding: 0x16 cache:cacheslot k:keyoffset
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::MIXED
public const LOAD_SLOT0_EXTDATA_1 = 22;
// Encoding: 0x17 dst:wslot cache:cacheslot k:keyoffset
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const LOAD_EXTDATA_2 = 23;
// Encoding: 0x18 cache:cacheslot k:keyoffset
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::MIXED
public const LOAD_SLOT0_EXTDATA_2 = 24;
// Encoding: 0x19 dst:wslot cache:cacheslot k:keyoffset
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const LOAD_EXTDATA_3 = 25;
// Encoding: 0x1a cache:cacheslot k:keyoffset
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::MIXED
public const LOAD_SLOT0_EXTDATA_3 = 26;
// Encoding: 0x1b dst:wslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NULL
public const LOAD_NULL = 27;
// Encoding: 0x1c
// Result type: Types::NULL
public const LOAD_SLOT0_NULL = 28;
// Encoding: 0x1d dst:wslot src:rslot key:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const INDEX = 29;
// Encoding: 0x1e src:rslot key:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const INDEX_SLOT0 = 30;
// Encoding: 0x1f dst:wslot src:rslot key:intindex
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const INDEX_INT_KEY = 31;
// Encoding: 0x20 src:rslot key:intindex
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const INDEX_SLOT0_INT_KEY = 32;
// Encoding: 0x21 dst:wslot src:rslot key:strindex
// Flags: FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::MIXED
public const INDEX_STRING_KEY = 33;
// Encoding: 0x22 src:rslot key:strindex
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::MIXED
public const INDEX_SLOT0_STRING_KEY = 34;
// Encoding: 0x23 dst:wslot src:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const MOVE = 35;
// Encoding: 0x24 src:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const MOVE_SLOT0 = 36;
// Encoding: 0x25 dst:wslot src:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const MOVE_BOOL = 37;
// Encoding: 0x26 src:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const MOVE_SLOT0_BOOL = 38;
// Encoding: 0x27 dst:wslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const CONV_BOOL = 39;
// Encoding: 0x28
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::BOOL
public const CONV_SLOT0_BOOL = 40;
// Encoding: 0x29 pcdelta:rel16
// Result type: unknown/varying
public const JUMP = 41;
// Encoding: 0x2a pcdelta:rel16 cond:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const JUMP_FALSY = 42;
// Encoding: 0x2b pcdelta:rel16
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: unknown/varying
public const JUMP_SLOT0_FALSY = 43;
// Encoding: 0x2c pcdelta:rel16 cond:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const JUMP_TRUTHY = 44;
// Encoding: 0x2d pcdelta:rel16
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: unknown/varying
public const JUMP_SLOT0_TRUTHY = 45;
// Encoding: 0x2e pcdelta:rel16 cond:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const JUMP_NOT_NULL = 46;
// Encoding: 0x2f pcdelta:rel16 cond:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const JUMP_SLOT0_NOT_NULL = 47;
// Encoding: 0x30 pcdelta:rel16 val:wslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const FOR_VAL = 48;
// Encoding: 0x31 pcdelta:rel16 key:wslot val:wslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const FOR_KEY_VAL = 49;
// Encoding: 0x32 dst:wslot arg1:rslot fn:filterid
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_FILTER1 = 50;
// Encoding: 0x33 arg1:rslot fn:filterid
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_SLOT0_FILTER1 = 51;
// Encoding: 0x34 dst:wslot arg1:rslot arg2:rslot fn:filterid
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_FILTER2 = 52;
// Encoding: 0x35 arg1:rslot arg2:rslot fn:filterid
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_SLOT0_FILTER2 = 53;
// Encoding: 0x36 dst:wslot fn:funcid
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_FUNC0 = 54;
// Encoding: 0x37 fn:funcid
// Flags: FLAG_IMPLICIT_SLOT0
// Result type: Types::MIXED
public const CALL_SLOT0_FUNC0 = 55;
// Encoding: 0x38 dst:wslot arg1:rslot fn:funcid
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_FUNC1 = 56;
// Encoding: 0x39 arg1:rslot fn:funcid
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_SLOT0_FUNC1 = 57;
// Encoding: 0x3a dst:wslot arg1:rslot arg2:rslot fn:funcid
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_FUNC2 = 58;
// Encoding: 0x3b arg1:rslot arg2:rslot fn:funcid
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_SLOT0_FUNC2 = 59;
// Encoding: 0x3c dst:wslot arg1:rslot arg2:rslot arg3:rslot fn:funcid
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_FUNC3 = 60;
// Encoding: 0x3d arg1:rslot arg2:rslot arg3:rslot fn:funcid
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const CALL_SLOT0_FUNC3 = 61;
// Encoding: 0x3e dst:wslot arg1:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::INT
public const LENGTH_FILTER = 62;
// Encoding: 0x3f arg1:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::INT
public const LENGTH_SLOT0_FILTER = 63;
// Encoding: 0x40 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const DEFAULT_FILTER = 64;
// Encoding: 0x41 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::MIXED
public const DEFAULT_SLOT0_FILTER = 65;
// Encoding: 0x42 dst:wslot src:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::SAFE_STRING
public const ESCAPE_FILTER1 = 66;
// Encoding: 0x43 src:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::SAFE_STRING
public const ESCAPE_SLOT0_FILTER1 = 67;
// Encoding: 0x44 dst:wslot src:rslot strategy:strindex
// Flags: FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::SAFE_STRING
public const ESCAPE_FILTER2 = 68;
// Encoding: 0x45 src:rslot strategy:strindex
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::SAFE_STRING
public const ESCAPE_SLOT0_FILTER2 = 69;
// Encoding: 0x46 dst:wslot arg:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const NOT = 70;
// Encoding: 0x47 arg:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const NOT_SLOT0 = 71;
// Encoding: 0x48 dst:wslot arg:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const NEG = 72;
// Encoding: 0x49 arg:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const NEG_SLOT0 = 73;
// Encoding: 0x4a dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const OR = 74;
// Encoding: 0x4b arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const OR_SLOT0 = 75;
// Encoding: 0x4c dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const AND = 76;
// Encoding: 0x4d arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const AND_SLOT0 = 77;
// Encoding: 0x4e dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::STRING
public const CONCAT = 78;
// Encoding: 0x4f arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::STRING
public const CONCAT_SLOT0 = 79;
// Encoding: 0x50 dst:wslot arg1:rslot arg2:rslot arg3:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::STRING
public const CONCAT3 = 80;
// Encoding: 0x51 arg1:rslot arg2:rslot arg3:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::STRING
public const CONCAT3_SLOT0 = 81;
// Encoding: 0x52 dst:wslot arg:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::STRING
public const APPEND = 82;
// Encoding: 0x53 arg:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::STRING
public const APPEND_SLOT0 = 83;
// Encoding: 0x54 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const EQ = 84;
// Encoding: 0x55 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const EQ_SLOT0 = 85;
// Encoding: 0x56 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const LT = 86;
// Encoding: 0x57 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const LT_SLOT0 = 87;
// Encoding: 0x58 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const LT_EQ = 88;
// Encoding: 0x59 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const LT_EQ_SLOT0 = 89;
// Encoding: 0x5a dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const NOT_EQ = 90;
// Encoding: 0x5b arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::BOOL
public const NOT_EQ_SLOT0 = 91;
// Encoding: 0x5c dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const ADD = 92;
// Encoding: 0x5d arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const ADD_SLOT0 = 93;
// Encoding: 0x5e dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const SUB = 94;
// Encoding: 0x5f arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const SUB_SLOT0 = 95;
// Encoding: 0x60 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const MUL = 96;
// Encoding: 0x61 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const MUL_SLOT0 = 97;
// Encoding: 0x62 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const QUO = 98;
// Encoding: 0x63 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const QUO_SLOT0 = 99;
// Encoding: 0x64 dst:wslot arg1:rslot arg2:rslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const MOD = 100;
// Encoding: 0x65 arg1:rslot arg2:rslot
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG
// Result type: Types::NUMERIC
public const MOD_SLOT0 = 101;
// Encoding: 0x66 dst:wslot s:rslot regexp:strindex
// Flags: FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::BOOL
public const MATCHES = 102;
// Encoding: 0x67 s:rslot regexp:strindex
// Flags: FLAG_IMPLICIT_SLOT0 | FLAG_HAS_SLOT_ARG | FLAG_HAS_STRING_ARG
// Result type: Types::BOOL
public const MATCHES_SLOT0 = 103;
// Encoding: 0x68
// Result type: unknown/varying
public const START_TMP_OUTPUT = 104;
// Encoding: 0x69 dst:wslot
// Flags: FLAG_HAS_SLOT_ARG
// Result type: unknown/varying
public const FINISH_TMP_OUTPUT = 105;
// Encoding: 0x6a path:strindex
// Flags: FLAG_HAS_STRING_ARG
// Result type: unknown/varying
public const PREPARE_TEMPLATE = 106;
// Encoding: 0x6b
// Result type: unknown/varying
public const INCLUDE_TEMPLATE = 107;
/**
* @param int $op
* @return int
*/
public static function opcodeKind($op) {
switch ($op) {
case self::RETURN:
return OpInfo::KIND_OTHER;
case self::OUTPUT:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_SLOT0:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_SAFE:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_SAFE_SLOT0:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_STRING_CONST:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_SAFE_STRING_CONST:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_SAFE_INT_CONST:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_EXTDATA_1:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_EXTDATA_2:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT_EXTDATA_3:
return OpInfo::KIND_OUTPUT;
case self::OUTPUT2_SAFE:
return OpInfo::KIND_OUTPUT;
case self::LOAD_BOOL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_BOOL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_INT_CONST:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_INT_CONST:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_FLOAT_CONST:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_FLOAT_CONST:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_STRING_CONST:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_STRING_CONST:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_EXTDATA_1:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_EXTDATA_1:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_EXTDATA_2:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_EXTDATA_2:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_EXTDATA_3:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_EXTDATA_3:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_NULL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LOAD_SLOT0_NULL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::INDEX:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::INDEX_SLOT0:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::INDEX_INT_KEY:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::INDEX_SLOT0_INT_KEY:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::INDEX_STRING_KEY:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::INDEX_SLOT0_STRING_KEY:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::MOVE:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MOVE_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MOVE_BOOL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MOVE_SLOT0_BOOL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::CONV_BOOL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::CONV_SLOT0_BOOL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::JUMP:
return OpInfo::KIND_JUMP;
case self::JUMP_FALSY:
return OpInfo::KIND_JUMP;
case self::JUMP_SLOT0_FALSY:
return OpInfo::KIND_JUMP;
case self::JUMP_TRUTHY:
return OpInfo::KIND_JUMP;
case self::JUMP_SLOT0_TRUTHY:
return OpInfo::KIND_JUMP;
case self::JUMP_NOT_NULL:
return OpInfo::KIND_JUMP;
case self::JUMP_SLOT0_NOT_NULL:
return OpInfo::KIND_JUMP;
case self::FOR_VAL:
return OpInfo::KIND_JUMP;
case self::FOR_KEY_VAL:
return OpInfo::KIND_JUMP;
case self::CALL_FILTER1:
return OpInfo::KIND_CALL;
case self::CALL_SLOT0_FILTER1:
return OpInfo::KIND_CALL;
case self::CALL_FILTER2:
return OpInfo::KIND_CALL;
case self::CALL_SLOT0_FILTER2:
return OpInfo::KIND_CALL;
case self::CALL_FUNC0:
return OpInfo::KIND_CALL;
case self::CALL_SLOT0_FUNC0:
return OpInfo::KIND_CALL;
case self::CALL_FUNC1:
return OpInfo::KIND_CALL;
case self::CALL_SLOT0_FUNC1:
return OpInfo::KIND_CALL;
case self::CALL_FUNC2:
return OpInfo::KIND_CALL;
case self::CALL_SLOT0_FUNC2:
return OpInfo::KIND_CALL;
case self::CALL_FUNC3:
return OpInfo::KIND_CALL;
case self::CALL_SLOT0_FUNC3:
return OpInfo::KIND_CALL;
case self::LENGTH_FILTER:
return OpInfo::KIND_CALL;
case self::LENGTH_SLOT0_FILTER:
return OpInfo::KIND_CALL;
case self::DEFAULT_FILTER:
return OpInfo::KIND_CALL;
case self::DEFAULT_SLOT0_FILTER:
return OpInfo::KIND_CALL;
case self::ESCAPE_FILTER1:
return OpInfo::KIND_CALL;
case self::ESCAPE_SLOT0_FILTER1:
return OpInfo::KIND_CALL;
case self::ESCAPE_FILTER2:
return OpInfo::KIND_CALL;
case self::ESCAPE_SLOT0_FILTER2:
return OpInfo::KIND_CALL;
case self::NOT:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::NOT_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::NEG:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::NEG_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::OR:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::OR_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::AND:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::AND_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::CONCAT:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::CONCAT_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::CONCAT3:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::CONCAT3_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::APPEND:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::APPEND_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::EQ:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::EQ_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LT:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LT_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LT_EQ:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::LT_EQ_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::NOT_EQ:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::NOT_EQ_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::ADD:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::ADD_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::SUB:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::SUB_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MUL:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MUL_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::QUO:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::QUO_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MOD:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MOD_SLOT0:
return OpInfo::KIND_SIMPLE_ASSIGN;
case self::MATCHES:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::MATCHES_SLOT0:
return OpInfo::KIND_COMPLEX_ASSIGN;
case self::START_TMP_OUTPUT:
return OpInfo::KIND_OTHER;
case self::FINISH_TMP_OUTPUT:
return OpInfo::KIND_OTHER;
case self::PREPARE_TEMPLATE:
return OpInfo::KIND_OTHER;
case self::INCLUDE_TEMPLATE:
return OpInfo::KIND_OTHER;
default:
return OpInfo::KIND_OTHER;
}
}
/**
* @param int $op
* @return string
*/
public static function opcodeString($op) {
switch ($op) {
case self::RETURN:
return 'RETURN';
case self::OUTPUT:
return 'OUTPUT';
case self::OUTPUT_SLOT0:
return 'OUTPUT_SLOT0';
case self::OUTPUT_SAFE:
return 'OUTPUT_SAFE';
case self::OUTPUT_SAFE_SLOT0:
return 'OUTPUT_SAFE_SLOT0';
case self::OUTPUT_STRING_CONST:
return 'OUTPUT_STRING_CONST';
case self::OUTPUT_SAFE_STRING_CONST:
return 'OUTPUT_SAFE_STRING_CONST';
case self::OUTPUT_SAFE_INT_CONST:
return 'OUTPUT_SAFE_INT_CONST';
case self::OUTPUT_EXTDATA_1:
return 'OUTPUT_EXTDATA_1';
case self::OUTPUT_EXTDATA_2:
return 'OUTPUT_EXTDATA_2';
case self::OUTPUT_EXTDATA_3:
return 'OUTPUT_EXTDATA_3';
case self::OUTPUT2_SAFE:
return 'OUTPUT2_SAFE';
case self::LOAD_BOOL:
return 'LOAD_BOOL';
case self::LOAD_SLOT0_BOOL:
return 'LOAD_SLOT0_BOOL';
case self::LOAD_INT_CONST:
return 'LOAD_INT_CONST';
case self::LOAD_SLOT0_INT_CONST:
return 'LOAD_SLOT0_INT_CONST';
case self::LOAD_FLOAT_CONST:
return 'LOAD_FLOAT_CONST';
case self::LOAD_SLOT0_FLOAT_CONST:
return 'LOAD_SLOT0_FLOAT_CONST';
case self::LOAD_STRING_CONST:
return 'LOAD_STRING_CONST';
case self::LOAD_SLOT0_STRING_CONST:
return 'LOAD_SLOT0_STRING_CONST';
case self::LOAD_EXTDATA_1:
return 'LOAD_EXTDATA_1';
case self::LOAD_SLOT0_EXTDATA_1:
return 'LOAD_SLOT0_EXTDATA_1';
case self::LOAD_EXTDATA_2:
return 'LOAD_EXTDATA_2';
case self::LOAD_SLOT0_EXTDATA_2:
return 'LOAD_SLOT0_EXTDATA_2';
case self::LOAD_EXTDATA_3:
return 'LOAD_EXTDATA_3';
case self::LOAD_SLOT0_EXTDATA_3:
return 'LOAD_SLOT0_EXTDATA_3';
case self::LOAD_NULL:
return 'LOAD_NULL';
case self::LOAD_SLOT0_NULL:
return 'LOAD_SLOT0_NULL';
case self::INDEX:
return 'INDEX';
case self::INDEX_SLOT0:
return 'INDEX_SLOT0';
case self::INDEX_INT_KEY:
return 'INDEX_INT_KEY';
case self::INDEX_SLOT0_INT_KEY:
return 'INDEX_SLOT0_INT_KEY';
case self::INDEX_STRING_KEY:
return 'INDEX_STRING_KEY';
case self::INDEX_SLOT0_STRING_KEY:
return 'INDEX_SLOT0_STRING_KEY';
case self::MOVE:
return 'MOVE';
case self::MOVE_SLOT0:
return 'MOVE_SLOT0';
case self::MOVE_BOOL:
return 'MOVE_BOOL';
case self::MOVE_SLOT0_BOOL:
return 'MOVE_SLOT0_BOOL';
case self::CONV_BOOL:
return 'CONV_BOOL';
case self::CONV_SLOT0_BOOL:
return 'CONV_SLOT0_BOOL';
case self::JUMP:
return 'JUMP';
case self::JUMP_FALSY:
return 'JUMP_FALSY';
case self::JUMP_SLOT0_FALSY:
return 'JUMP_SLOT0_FALSY';
case self::JUMP_TRUTHY:
return 'JUMP_TRUTHY';
case self::JUMP_SLOT0_TRUTHY:
return 'JUMP_SLOT0_TRUTHY';
case self::JUMP_NOT_NULL:
return 'JUMP_NOT_NULL';
case self::JUMP_SLOT0_NOT_NULL:
return 'JUMP_SLOT0_NOT_NULL';
case self::FOR_VAL:
return 'FOR_VAL';
case self::FOR_KEY_VAL:
return 'FOR_KEY_VAL';
case self::CALL_FILTER1:
return 'CALL_FILTER1';
case self::CALL_SLOT0_FILTER1:
return 'CALL_SLOT0_FILTER1';
case self::CALL_FILTER2:
return 'CALL_FILTER2';
case self::CALL_SLOT0_FILTER2:
return 'CALL_SLOT0_FILTER2';
case self::CALL_FUNC0:
return 'CALL_FUNC0';
case self::CALL_SLOT0_FUNC0:
return 'CALL_SLOT0_FUNC0';
case self::CALL_FUNC1:
return 'CALL_FUNC1';
case self::CALL_SLOT0_FUNC1:
return 'CALL_SLOT0_FUNC1';
case self::CALL_FUNC2:
return 'CALL_FUNC2';
case self::CALL_SLOT0_FUNC2:
return 'CALL_SLOT0_FUNC2';
case self::CALL_FUNC3:
return 'CALL_FUNC3';
case self::CALL_SLOT0_FUNC3:
return 'CALL_SLOT0_FUNC3';
case self::LENGTH_FILTER:
return 'LENGTH_FILTER';
case self::LENGTH_SLOT0_FILTER:
return 'LENGTH_SLOT0_FILTER';
case self::DEFAULT_FILTER:
return 'DEFAULT_FILTER';
case self::DEFAULT_SLOT0_FILTER:
return 'DEFAULT_SLOT0_FILTER';
case self::ESCAPE_FILTER1:
return 'ESCAPE_FILTER1';
case self::ESCAPE_SLOT0_FILTER1:
return 'ESCAPE_SLOT0_FILTER1';
case self::ESCAPE_FILTER2:
return 'ESCAPE_FILTER2';
case self::ESCAPE_SLOT0_FILTER2:
return 'ESCAPE_SLOT0_FILTER2';
case self::NOT:
return 'NOT';
case self::NOT_SLOT0:
return 'NOT_SLOT0';
case self::NEG:
return 'NEG';
case self::NEG_SLOT0:
return 'NEG_SLOT0';
case self::OR:
return 'OR';
case self::OR_SLOT0:
return 'OR_SLOT0';
case self::AND:
return 'AND';
case self::AND_SLOT0:
return 'AND_SLOT0';
case self::CONCAT:
return 'CONCAT';
case self::CONCAT_SLOT0:
return 'CONCAT_SLOT0';
case self::CONCAT3:
return 'CONCAT3';
case self::CONCAT3_SLOT0:
return 'CONCAT3_SLOT0';
case self::APPEND:
return 'APPEND';
case self::APPEND_SLOT0:
return 'APPEND_SLOT0';
case self::EQ:
return 'EQ';
case self::EQ_SLOT0:
return 'EQ_SLOT0';
case self::LT:
return 'LT';
case self::LT_SLOT0:
return 'LT_SLOT0';
case self::LT_EQ:
return 'LT_EQ';
case self::LT_EQ_SLOT0:
return 'LT_EQ_SLOT0';
case self::NOT_EQ:
return 'NOT_EQ';
case self::NOT_EQ_SLOT0:
return 'NOT_EQ_SLOT0';
case self::ADD:
return 'ADD';
case self::ADD_SLOT0:
return 'ADD_SLOT0';
case self::SUB:
return 'SUB';
case self::SUB_SLOT0:
return 'SUB_SLOT0';
case self::MUL:
return 'MUL';
case self::MUL_SLOT0:
return 'MUL_SLOT0';
case self::QUO:
return 'QUO';
case self::QUO_SLOT0:
return 'QUO_SLOT0';
case self::MOD:
return 'MOD';
case self::MOD_SLOT0:
return 'MOD_SLOT0';
case self::MATCHES:
return 'MATCHES';
case self::MATCHES_SLOT0:
return 'MATCHES_SLOT0';
case self::START_TMP_OUTPUT:
return 'START_TMP_OUTPUT';
case self::FINISH_TMP_OUTPUT:
return 'FINISH_TMP_OUTPUT';
case self::PREPARE_TEMPLATE:
return 'PREPARE_TEMPLATE';
case self::INCLUDE_TEMPLATE:
return 'INCLUDE_TEMPLATE';
default:
return '?';
}
}
/**
* @param int $op
* @return int
*/
public static function opcodeResultType($op) {
switch ($op) {
case self::LOAD_BOOL:
return Types::BOOL;
case self::LOAD_SLOT0_BOOL:
return Types::BOOL;
case self::LOAD_INT_CONST:
return Types::INT;