1 ; Copyright (C) 2024 Mikulas Patocka
3 ; This file is part of Ajla.
5 ; Ajla is free software: you can redistribute it and/or modify it under the
6 ; terms of the GNU General Public License as published by the Free Software
7 ; Foundation, either version 3 of the License, or (at your option) any later
10 ; Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
11 ; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 ; A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License along with
15 ; Ajla. If not, see <https://www.gnu.org/licenses/>.
17 P_BinaryOp ; op, result, (ref_flag1, strict flag), src1, (ref_flag2), src2
18 P_UnaryOp ; op, result, (ref_flag, strict_flag), src
19 P_Copy ; dest, ref_flag, src
20 P_Copy_Type_Cast ; dest, def_flag, src
24 P_Fn ; result, n_args, n_return_values, args..., return_values...
25 P_Load_Local_Type ; result, function var (-1 if we are referring to record entries), index
26 P_Load_Fn ; result, n_curried_args, call_mode, [path_idx, fn_idx, n_unit_chars, (unit_name)], (ref_flag, arg_idx)
27 P_Curry ; result, n_curried_args, ref_flag, function, (ref_flag, arg_idx)
28 P_Call ; call_mode, n_return_values, n_args, [path_idx, fn_idx, n_unit_chars, (unit_name)], (ref_flag, arg_idx), (return_value_idx)
29 P_Call_Indirect ; call_mode, n_return_values, n_args, ref_flag, function, (ref_flag, arg_idx), (return_value_idx)
30 P_Load_Const ; result, n_bytes, lsb...msb
31 P_Structured_Write ; n_steps, structured_result, ref_flag, structured_struct, ref_flag, scalar, ... (Structured_Record, local_type, idx) | (Structured_Option, idx) | (Structured_Array, idx, local_type)
32 P_Record_Type ; result, n_entries, (entries), [path_idx, fn_idx, n_unit_chars, (unit_name)]
33 P_Option_Type ; result, n_entries, (entries), [path_idx, fn_idx, n_unit_chars, (unit_name)]
34 P_Record_Create ; result, n_args, (ref_flag, arg_idx)
35 P_Record_Load_Slot ; scalar, record, slot
36 P_Record_Load ; scalar, Flag_Evaluate | Flag_Borrow, record, slot
37 P_Option_Create ; result, index, ref_flag, value
38 P_Option_Load ; scalar, Flag_Evaluate | Flag_Borrow, option, index
39 P_Option_Test ; result, option, index
40 P_Option_Ord ; result, option
41 P_Array_Flexible ; result, type
42 P_Array_Fixed ; result, type, dim_var
43 P_Array_Create ; result, local_type, length, length_var, (ref_flag, arg_idx)
44 P_Array_Fill ; result, local_type, (ref_flag | sparse_flag), content_var, length_var
45 P_Array_String ; result, n_chars, (chars)
46 P_Array_Unicode ; result, (chars)
47 P_Array_Load ; scalar, Flag_Evaluate | Flag_Borrow | Flag_Index_In_Range, array, index
48 P_Array_Len ; result, array, Flag_Evaluate
49 P_Array_Len_Greater_Than ; result, array, length, Flag_Evaluate
50 P_Array_Sub ; result, (ref_flag | Flag_Evaluate), array, start, end
51 P_Array_Skip ; result, (ref_flag | Flag_Evaluate), array, start
52 P_Array_Append ; result, (ref_flag, arg1), (ref_flag, arg2)
53 P_Array_Append_One ; result, (ref_flag, arg1), (ref_flag, arg2)
54 P_Array_Flatten ; result, (ref_flag, arg1)
56 P_Jmp_False ; variable, label if false, label if exception
58 P_IO ; io_type, n_outputs, n_inputs, n_params, outputs, inputs, params
60 P_Return_Vars ; (ret ...)
61 P_Return ; ((ref_flag, arg) ...)
62 P_Checkpoint ; (must-be-flat-var ...)
63 P_Line_Info ; line_number
64 P_Phi ; result, (arg ...)
90 T_EmptyOption ; used in option declaration for typeless fields
91 T_FlatOption ; these are used in variable runtime types
92 T_Undetermined ; this must be the last type that may appear as runtime type in pcode
93 T_TypeOfType ; these are not used in pcode
97 T_InferredType ; this must have the lowest number
111 Flag_Array_Fill_Sparse
196 Local_Type_Flat_Record
197 Local_Type_Flat_Array
200 Call_Mode_Unspecified
213 SystemProperty_Charset
214 SystemProperty_Charset_Console
217 SystemProperty_Privileged
218 SystemProperty_Compile
221 SystemProperty_OS_Posix
222 SystemProperty_OS_DOS
223 SystemProperty_OS_OS2
224 SystemProperty_OS_Cygwin
225 SystemProperty_OS_Windows
237 IO_Stream_Read_Partial
240 IO_Read_Console_Packet
241 IO_Write_Console_Packet
284 IO_Wait_For_Dereferenced
305 IO_MsgQueue_Is_Nonempty
309 IO_Consume_Parameters
313 IO_Load_Optimized_Pcode
314 IO_Register_Dependence
320 IO_FFI_Get_Size_Alignment
321 IO_FFI_Create_Structure
322 IO_FFI_Structure_Offset
327 IO_FFI_Handle_To_Number
328 IO_FFI_Number_To_Handle
329 IO_FFI_Create_Function
333 IO_FFI_Destructor_New
334 IO_FFI_Destructor_Allocate
335 IO_FFI_Destructor_Free
336 IO_FFI_Destructor_Call
344 IO_Open_Flag_Must_Create
345 IO_Open_Flag_No_Follow
349 IO_Stat_Flag_DevMajor
350 IO_Stat_Flag_DevMinor
357 IO_Stat_Flag_RDevMajor
358 IO_Stat_Flag_RDevMinor
360 IO_Stat_Flag_OptimalIOSize
361 IO_Stat_Flag_Allocated
368 IO_Stat_Type_Directory
372 IO_Stat_Type_BlockDev
377 IO_StatFS_Flag_FrSize
378 IO_StatFS_Flag_FrTotal
379 IO_StatFS_Flag_FrFree
380 IO_StatFS_Flag_FrAvail
381 IO_StatFS_Flag_InTotal
382 IO_StatFS_Flag_InFree
383 IO_StatFS_Flag_InAvail
386 IO_StatFS_Flag_NameLen
389 IO_StatFS_ST_ReadOnly
393 IO_StatFS_ST_Synchronous
394 IO_StatFS_ST_MandLock
396 IO_StatFS_ST_NoDirAtime
397 IO_StatFS_ST_RelAtime
400 IO_UName_Flag_Ajla_Version
403 IO_UName_Flag_Release
404 IO_UName_Flag_Version
405 IO_UName_Flag_Machine
414 IO_Action_Mk_BlockDev
427 IO_Stty_Flag_Nosignal
441 AJLA_ERROR_UNKNOWN_ERROR
442 AJLA_ERROR_OUT_OF_MEMORY
443 AJLA_ERROR_SIZE_OVERFLOW
444 AJLA_ERROR_INT_TOO_LARGE
445 AJLA_ERROR_DOESNT_FIT
446 AJLA_ERROR_INVALID_OPERATION
447 AJLA_ERROR_NOT_SUPPORTED
448 AJLA_ERROR_NEGATIVE_INDEX
449 AJLA_ERROR_INDEX_OUT_OF_RANGE
450 AJLA_ERROR_OPTION_DOESNT_MATCH
451 AJLA_ERROR_RECORD_FIELD_NOT_INITIALIZED
452 AJLA_ERROR_ARRAY_ENTRY_NOT_INITIALIZED
454 AJLA_ERROR_NON_ABSOLUTE_PATH
458 AJLA_ERROR_SYSTEM_RETURNED_INVALID_DATA
459 AJLA_ERROR_COMPILER_ERROR
460 AJLA_ERROR_OPTIMIZER_ERROR
464 AJLA_ERROR_OS2_SOCKET
468 AJLA_ERROR_SUBPROCESS
469 AJLA_ERROR_LIBRARY_NOT_FOUND
470 AJLA_ERROR_SYMBOL_NOT_FOUND
515 SYSTEM_ERROR_ENAMETOOLONG
518 SYSTEM_ERROR_ENOTEMPTY
523 SYSTEM_ERROR_EL2NSYNC
549 SYSTEM_ERROR_EMULTIHOP
552 SYSTEM_ERROR_EOVERFLOW
553 SYSTEM_ERROR_ENOTUNIQ
560 SYSTEM_ERROR_ELIBEXEC
562 SYSTEM_ERROR_ERESTART
563 SYSTEM_ERROR_ESTRPIPE
565 SYSTEM_ERROR_ENOTSOCK
566 SYSTEM_ERROR_EDESTADDRREQ
567 SYSTEM_ERROR_EMSGSIZE
568 SYSTEM_ERROR_EPROTOTYPE
569 SYSTEM_ERROR_ENOPROTOOPT
570 SYSTEM_ERROR_EPROTONOSUPPORT
571 SYSTEM_ERROR_ESOCKTNOSUPPORT
572 SYSTEM_ERROR_EOPNOTSUPP
573 SYSTEM_ERROR_EPFNOSUPPORT
574 SYSTEM_ERROR_EAFNOSUPPORT
575 SYSTEM_ERROR_EADDRINUSE
576 SYSTEM_ERROR_EADDRNOTAVAIL
577 SYSTEM_ERROR_ENETDOWN
578 SYSTEM_ERROR_ENETUNREACH
579 SYSTEM_ERROR_ENETRESET
580 SYSTEM_ERROR_ECONNABORTED
581 SYSTEM_ERROR_ECONNRESET
584 SYSTEM_ERROR_ENOTCONN
585 SYSTEM_ERROR_ESHUTDOWN
586 SYSTEM_ERROR_ETOOMANYREFS
587 SYSTEM_ERROR_ETIMEDOUT
588 SYSTEM_ERROR_ECONNREFUSED
589 SYSTEM_ERROR_EHOSTDOWN
590 SYSTEM_ERROR_EHOSTUNREACH
591 SYSTEM_ERROR_EALREADY
592 SYSTEM_ERROR_EINPROGRESS
598 SYSTEM_ERROR_EREMOTEIO
600 SYSTEM_ERROR_ENOMEDIUM
601 SYSTEM_ERROR_EMEDIUMTYPE
602 SYSTEM_ERROR_ECANCELED
604 SYSTEM_ERROR_EKEYEXPIRED
605 SYSTEM_ERROR_EKEYREVOKED
606 SYSTEM_ERROR_EKEYREJECTED
607 SYSTEM_ERROR_EOWNERDEAD
608 SYSTEM_ERROR_ENOTRECOVERABLE
610 SYSTEM_ERROR_EHWPOISON