1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 // CC-OFFNXT(超大头文件[C++] Oversized Header File) huge header file 17 18 #ifndef LIBABCKIT_ISA_ISA_DYNAMIC_H 19 #define LIBABCKIT_ISA_ISA_DYNAMIC_H 20 21 #ifndef __cplusplus 22 #include <stdbool.h> 23 #include <stddef.h> 24 #include <stdint.h> 25 #else 26 #include <cstddef> 27 #include <cstdint> 28 #endif 29 30 #include "../declarations.h" 31 #include "../api_version.h" 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 enum AbckitIsaApiDynamicOpcode { 38 ABCKIT_ISA_API_DYNAMIC_OPCODE_INVALID, 39 ABCKIT_ISA_API_DYNAMIC_OPCODE_CONSTANT, 40 ABCKIT_ISA_API_DYNAMIC_OPCODE_PARAMETER, 41 ABCKIT_ISA_API_DYNAMIC_OPCODE_LOADSTRING, 42 ABCKIT_ISA_API_DYNAMIC_OPCODE_TRY, 43 ABCKIT_ISA_API_DYNAMIC_OPCODE_CATCHPHI, 44 ABCKIT_ISA_API_DYNAMIC_OPCODE_PHI, 45 46 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASYNCFUNCTIONENTER, 47 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASYNCFUNCTIONREJECT, 48 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASYNCFUNCTIONRESOLVE, 49 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASYNCGENERATORREJECT, 50 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASYNCGENERATORRESOLVE, 51 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLARG0, 52 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLTHIS0, 53 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLARG1, 54 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLTHIS1, 55 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLARGS2, 56 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLTHIS2, 57 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLARGS3, 58 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLTHIS3, 59 ABCKIT_ISA_API_DYNAMIC_OPCODE_COPYDATAPROPERTIES, 60 ABCKIT_ISA_API_DYNAMIC_OPCODE_COPYRESTARGS, 61 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEARRAYWITHBUFFER, 62 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEASYNCGENERATOROBJ, 63 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEEMPTYARRAY, 64 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEEMPTYOBJECT, 65 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEGENERATOROBJ, 66 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEITERRESULTOBJ, 67 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEOBJECTWITHBUFFER, 68 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEOBJECTWITHEXCLUDEDKEYS, 69 ABCKIT_ISA_API_DYNAMIC_OPCODE_CREATEREGEXPWITHLITERAL, 70 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEBUGGER, 71 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEC, 72 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEFINECLASSWITHBUFFER, 73 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEFINEGETTERSETTERBYVALUE, 74 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEFINEMETHOD, 75 ABCKIT_ISA_API_DYNAMIC_OPCODE_DELOBJPROP, 76 ABCKIT_ISA_API_DYNAMIC_OPCODE_EQ, 77 ABCKIT_ISA_API_DYNAMIC_OPCODE_EXP, 78 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETASYNCITERATOR, 79 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETITERATOR, 80 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETNEXTPROPNAME, 81 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETPROPITERATOR, 82 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETRESUMEMODE, 83 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETTEMPLATEOBJECT, 84 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETUNMAPPEDARGS, 85 ABCKIT_ISA_API_DYNAMIC_OPCODE_GREATER, 86 ABCKIT_ISA_API_DYNAMIC_OPCODE_GREATEREQ, 87 ABCKIT_ISA_API_DYNAMIC_OPCODE_INC, 88 ABCKIT_ISA_API_DYNAMIC_OPCODE_ISFALSE, 89 ABCKIT_ISA_API_DYNAMIC_OPCODE_ISIN, 90 ABCKIT_ISA_API_DYNAMIC_OPCODE_ISTRUE, 91 ABCKIT_ISA_API_DYNAMIC_OPCODE_IF, 92 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDBIGINT, 93 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDFALSE, 94 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDGLOBAL, 95 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDGLOBALVAR, 96 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDHOLE, 97 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDINFINITY, 98 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDLEXVAR, 99 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDNAN, 100 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDNULL, 101 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDOBJBYINDEX, 102 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDOBJBYNAME, 103 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDOBJBYVALUE, 104 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDSUPERBYNAME, 105 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDSUPERBYVALUE, 106 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDSYMBOL, 107 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDTRUE, 108 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDUNDEFINED, 109 ABCKIT_ISA_API_DYNAMIC_OPCODE_LESS, 110 ABCKIT_ISA_API_DYNAMIC_OPCODE_LESSEQ, 111 ABCKIT_ISA_API_DYNAMIC_OPCODE_NEWLEXENV, 112 ABCKIT_ISA_API_DYNAMIC_OPCODE_NOTEQ, 113 ABCKIT_ISA_API_DYNAMIC_OPCODE_POPLEXENV, 114 ABCKIT_ISA_API_DYNAMIC_OPCODE_RESUMEGENERATOR, 115 ABCKIT_ISA_API_DYNAMIC_OPCODE_RETURN, 116 ABCKIT_ISA_API_DYNAMIC_OPCODE_RETURNUNDEFINED, 117 ABCKIT_ISA_API_DYNAMIC_OPCODE_SETGENERATORSTATE, 118 ABCKIT_ISA_API_DYNAMIC_OPCODE_SETOBJECTWITHPROTO, 119 ABCKIT_ISA_API_DYNAMIC_OPCODE_STARRAYSPREAD, 120 ABCKIT_ISA_API_DYNAMIC_OPCODE_STGLOBALVAR, 121 ABCKIT_ISA_API_DYNAMIC_OPCODE_STLEXVAR, 122 ABCKIT_ISA_API_DYNAMIC_OPCODE_STMODULEVAR, 123 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOBJBYINDEX, 124 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOBJBYNAME, 125 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOBJBYVALUE, 126 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOWNBYINDEX, 127 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOWNBYNAME, 128 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOWNBYVALUE, 129 ABCKIT_ISA_API_DYNAMIC_OPCODE_STRICTEQ, 130 ABCKIT_ISA_API_DYNAMIC_OPCODE_STRICTNOTEQ, 131 ABCKIT_ISA_API_DYNAMIC_OPCODE_STSUPERBYNAME, 132 ABCKIT_ISA_API_DYNAMIC_OPCODE_STSUPERBYVALUE, 133 ABCKIT_ISA_API_DYNAMIC_OPCODE_SUPERCALLSPREAD, 134 ABCKIT_ISA_API_DYNAMIC_OPCODE_SUSPENDGENERATOR, 135 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_CONSTASSIGNMENT, 136 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_DELETESUPERPROPERTY, 137 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_IFNOTOBJECT, 138 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_IFSUPERNOTCORRECTCALL, 139 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_PATTERNNONCOERCIBLE, 140 ABCKIT_ISA_API_DYNAMIC_OPCODE_TONUMBER, 141 ABCKIT_ISA_API_DYNAMIC_OPCODE_TRYLDGLOBALBYNAME, 142 ABCKIT_ISA_API_DYNAMIC_OPCODE_TRYSTGLOBALBYNAME, 143 ABCKIT_ISA_API_DYNAMIC_OPCODE_TYPEOF, 144 ABCKIT_ISA_API_DYNAMIC_OPCODE_APPLY, 145 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASYNCFUNCTIONAWAITUNCAUGHT, 146 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRANGE, 147 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_CALLINIT, 148 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_CREATEPRIVATEPROPERTY, 149 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_DEFINEFIELDBYINDEX, 150 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_DEFINEFIELDBYVALUE, 151 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_DEFINEPRIVATEPROPERTY, 152 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_DEFINESENDABLECLASS, 153 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_LDSENDABLECLASS, 154 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_NOTIFYCONCURRENTRESULT, 155 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_TOPROPERTYKEY, 156 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_LDSENDABLEEXTERNALMODULEVAR, 157 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDELDSENDABLEEXTERNALMODULEVAR, 158 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_LDSENDABLELOCALMODULEVAR, 159 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDELDSENDABLELOCALMODULEVAR, 160 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_NEWSENDABLEENV, 161 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDENEWSENDABLEENV, 162 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_STSENDABLEVAR, 163 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDESTSENDABLEVAR, 164 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_LDSENDABLEVAR, 165 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDELDSENDABLEVAR, 166 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_ISTRUE, 167 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_ISFALSE, 168 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_LDLAZYMODULEVAR, 169 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDELDLAZYMODULEVAR, 170 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_LDLAZYSENDABLEMODULEVAR, 171 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_WIDELDLAZYSENDABLEMODULEVAR, 172 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLRUNTIME_SUPERCALLFORWARDALLARGS, 173 174 ABCKIT_ISA_API_DYNAMIC_OPCODE_CALLTHISRANGE, 175 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEFINEPROPERTYBYNAME, 176 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEFINEFIELDBYNAME, 177 ABCKIT_ISA_API_DYNAMIC_OPCODE_DEFINEFUNC, 178 179 ABCKIT_ISA_API_DYNAMIC_OPCODE_ADD2, 180 ABCKIT_ISA_API_DYNAMIC_OPCODE_SUB2, 181 ABCKIT_ISA_API_DYNAMIC_OPCODE_MUL2, 182 ABCKIT_ISA_API_DYNAMIC_OPCODE_DIV2, 183 ABCKIT_ISA_API_DYNAMIC_OPCODE_MOD2, 184 ABCKIT_ISA_API_DYNAMIC_OPCODE_AND2, 185 ABCKIT_ISA_API_DYNAMIC_OPCODE_OR2, 186 ABCKIT_ISA_API_DYNAMIC_OPCODE_XOR2, 187 ABCKIT_ISA_API_DYNAMIC_OPCODE_ASHR2, 188 ABCKIT_ISA_API_DYNAMIC_OPCODE_SHL2, 189 ABCKIT_ISA_API_DYNAMIC_OPCODE_SHR2, 190 ABCKIT_ISA_API_DYNAMIC_OPCODE_NEG, 191 ABCKIT_ISA_API_DYNAMIC_OPCODE_NOT, 192 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDA_STR, 193 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW, 194 195 ABCKIT_ISA_API_DYNAMIC_OPCODE_DYNAMICIMPORT, 196 ABCKIT_ISA_API_DYNAMIC_OPCODE_GETMODULENAMESPACE, 197 ABCKIT_ISA_API_DYNAMIC_OPCODE_INSTANCEOF, 198 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDEXTERNALMODULEVAR, 199 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDFUNCTION, 200 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDLOCALMODULEVAR, 201 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDNEWTARGET, 202 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDPRIVATEPROPERTY, 203 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDTHIS, 204 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDTHISBYNAME, 205 ABCKIT_ISA_API_DYNAMIC_OPCODE_LDTHISBYVALUE, 206 ABCKIT_ISA_API_DYNAMIC_OPCODE_NEWLEXENVWITHNAME, 207 ABCKIT_ISA_API_DYNAMIC_OPCODE_NEWOBJAPPLY, 208 ABCKIT_ISA_API_DYNAMIC_OPCODE_NEWOBJRANGE, 209 ABCKIT_ISA_API_DYNAMIC_OPCODE_STCONSTTOGLOBALRECORD, 210 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOWNBYNAMEWITHNAMESET, 211 ABCKIT_ISA_API_DYNAMIC_OPCODE_STOWNBYVALUEWITHNAMESET, 212 ABCKIT_ISA_API_DYNAMIC_OPCODE_STPRIVATEPROPERTY, 213 ABCKIT_ISA_API_DYNAMIC_OPCODE_STTHISBYNAME, 214 ABCKIT_ISA_API_DYNAMIC_OPCODE_STTHISBYVALUE, 215 ABCKIT_ISA_API_DYNAMIC_OPCODE_STTOGLOBALRECORD, 216 ABCKIT_ISA_API_DYNAMIC_OPCODE_SUPERCALLARROWRANGE, 217 ABCKIT_ISA_API_DYNAMIC_OPCODE_SUPERCALLTHISRANGE, 218 ABCKIT_ISA_API_DYNAMIC_OPCODE_TESTIN, 219 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_NOTEXISTS, 220 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_UNDEFINEDIFHOLE, 221 ABCKIT_ISA_API_DYNAMIC_OPCODE_THROW_UNDEFINEDIFHOLEWITHNAME, 222 ABCKIT_ISA_API_DYNAMIC_OPCODE_TONUMERIC, 223 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_CALLRANGE, 224 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_CALLTHISRANGE, 225 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_COPYRESTARGS, 226 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_CREATEOBJECTWITHEXCLUDEDKEYS, 227 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_GETMODULENAMESPACE, 228 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_LDEXTERNALMODULEVAR, 229 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_LDLEXVAR, 230 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_LDLOCALMODULEVAR, 231 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_LDOBJBYINDEX, 232 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_LDPATCHVAR, 233 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_NEWLEXENV, 234 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_NEWLEXENVWITHNAME, 235 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_NEWOBJRANGE, 236 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_STLEXVAR, 237 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_STMODULEVAR, 238 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_STOBJBYINDEX, 239 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_STOWNBYINDEX, 240 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_STPATCHVAR, 241 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_SUPERCALLARROWRANGE, 242 ABCKIT_ISA_API_DYNAMIC_OPCODE_WIDE_SUPERCALLTHISRANGE, 243 }; 244 245 enum AbckitIsaApiDynamicConditionCode { 246 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_NONE = 0, 247 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_EQ, /* == */ 248 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_NE, /* != */ 249 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_LT, /* < */ 250 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_LE, /* <= */ 251 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_GT, /* > */ 252 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_GE, /* >= */ 253 // Unsigned integers. 254 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_B, /* < */ 255 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_BE, /* <= */ 256 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_A, /* > */ 257 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_AE, /* >= */ 258 // Compare result of bitwise AND with zero 259 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_TST_EQ, /* (lhs AND rhs) == 0 */ 260 ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_TST_NE, /* (lhs AND rhs) != 0 */ 261 }; 262 263 /** 264 * @brief Struct that holds the pointers to the API used to work with dynamic ISA. 265 * @note Valid targets: `ABCKIT_TARGET_TS`, `ABCKIT_TARGET_JS`, `ABCKIT_TARGET_ARK_TS_V1`. 266 */ 267 struct AbckitIsaApiDynamic { 268 /** 269 * @brief Retruns Module for `inst`. 270 * @return Pointer to `AbckitCoreModule`. 271 * @param [ in ] inst - Inst to be inspected. 272 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 273 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is not Intrinsic. 274 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if Intrinsic opcode is not GETMODULENAMESPACE or 275 * WIDE_GETMODULENAMESPACE. 276 */ 277 AbckitCoreModule *(*iGetModule)(AbckitInst *inst); 278 279 /** 280 * @brief Sets Module for `inst`. 281 * @return None. 282 * @param [ in ] inst - Inst to be modified. 283 * @param [ in ] md - Module to be set. 284 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 285 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `md` is NULL. 286 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is not Intrinsic. 287 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if Intrinsic opcode is not GETMODULENAMESPACE or 288 * WIDE_GETMODULENAMESPACE. 289 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `inst` and `md` differs. 290 */ 291 void (*iSetModule)(AbckitInst *inst, AbckitCoreModule *md); 292 293 /** 294 * @brief Returns condition code of `inst`. 295 * @return enum value of `AbckitIsaApiDynamicConditionCode`. 296 * @param [ in ] inst - Inst to be inspected. 297 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 298 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is not Intrinsic. 299 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` opcode is not IF. 300 */ 301 enum AbckitIsaApiDynamicConditionCode (*iGetConditionCode)(AbckitInst *inst); 302 303 /** 304 * @brief Sets condition code of `inst`. 305 * @return None. 306 * @param [ in ] inst - Inst to be modified. 307 * @param [ in ] cc - Condition code to be set. 308 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 309 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `cc` is CC_NONE. 310 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` opcode is not IF. 311 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` opcode is CC_NE or CC_EQ. 312 */ 313 void (*iSetConditionCode)(AbckitInst *inst, enum AbckitIsaApiDynamicConditionCode cc); 314 315 /** 316 * @brief Returns opcode of `inst`. 317 * @return `AbckitIsaApiDynamicOpcode` enum value. 318 * @param [ in ] inst - Inst to be inspected. 319 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 320 */ 321 enum AbckitIsaApiDynamicOpcode (*iGetOpcode)(AbckitInst *inst); 322 323 /** 324 * @brief Returns import descriptor of `inst`. 325 * @return Pointer to `AbckitCoreImportDescriptor`. 326 * @param [ in ] inst - Inst to be inspected. 327 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 328 */ 329 AbckitCoreImportDescriptor *(*iGetImportDescriptor)(AbckitInst *inst); 330 331 /** 332 * @brief Sets import descriptor of `inst`. 333 * @return None. 334 * @param [ in ] inst - Inst to be modified. 335 * @param [ in ] id - Import descriptor to be set. 336 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 337 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `id` is NULL. 338 */ 339 void (*iSetImportDescriptor)(AbckitInst *inst, AbckitCoreImportDescriptor *id); 340 341 /** 342 * @brief Returns export descriptor of `inst`. 343 * @return Pointer to `AbckitCoreExportDescriptor`. 344 * @param [ in ] inst - Inst to be inspected. 345 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 346 */ 347 AbckitCoreExportDescriptor *(*iGetExportDescriptor)(AbckitInst *inst); 348 349 /** 350 * @brief Sets export descriptor of `inst`. 351 * @return None. 352 * @param [ in ] inst - Inst to be modified. 353 * @param [ in ] id - Export descriptor to be set. 354 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `inst` is NULL. 355 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `ed` is NULL. 356 */ 357 void (*iSetExportDescriptor)(AbckitInst *inst, AbckitCoreExportDescriptor *ed); 358 359 /** 360 * @brief Creates instruction with opcode LOAD_STRING. This instruction loads the string `str` into `acc`. 361 * @return Pointer to created `AbckitInst`. 362 * @param [ in ] graph - Graph where instruction will be inserted. 363 * @param [ in ] str - String to load. 364 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 365 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `str` is NULL. 366 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 367 * @note Allocates 368 */ 369 AbckitInst *(*iCreateLoadString)(AbckitGraph *graph, AbckitString *str); 370 371 /** 372 * @brief Creates instruction with opcode LDNAN. This instruction loads the `nan` into `acc`. 373 * @return Pointer to created `AbckitInst`. 374 * @param [ in ] graph - Graph where instruction will be inserted. 375 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 376 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 377 * @note Allocates 378 */ 379 AbckitInst *(*iCreateLdnan)(AbckitGraph *graph); 380 381 /** 382 * @brief Creates instruction with opcode LDINFINITY. This instruction loads the `infinity` into `acc`. 383 * @return Pointer to created `AbckitInst`. 384 * @param [ in ] graph - Graph where instruction will be inserted. 385 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 386 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 387 * @note Allocates 388 */ 389 AbckitInst *(*iCreateLdinfinity)(AbckitGraph *graph); 390 391 /** 392 * @brief Creates instruction with opcode LDUNDEFINED. This instruction loads the `undefined` into `acc`. 393 * @return Pointer to created `AbckitInst`. 394 * @param [ in ] graph - Graph where instruction will be inserted. 395 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 396 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 397 * @note Allocates 398 */ 399 AbckitInst *(*iCreateLdundefined)(AbckitGraph *graph); 400 401 /** 402 * @brief Creates instruction with opcode LDNULL. This instruction loads the `null` into `acc`. 403 * @return Pointer to created `AbckitInst`. 404 * @param [ in ] graph - Graph where instruction will be inserted. 405 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 406 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 407 * @note Allocates 408 */ 409 AbckitInst *(*iCreateLdnull)(AbckitGraph *graph); 410 411 /** 412 * @brief Creates instruction with opcode LDSYMBOL. This instruction loads the object `Symbol` in `acc`. 413 * @return Pointer to created `AbckitInst`. 414 * @param [ in ] graph - Graph where instruction will be inserted. 415 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 416 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 417 * @note Allocates 418 */ 419 AbckitInst *(*iCreateLdsymbol)(AbckitGraph *graph); 420 421 /** 422 * @brief Creates instruction with opcode LDGLOBAL. This instruction loads the object `global` into `acc`. 423 * @return Pointer to created `AbckitInst`. 424 * @param [ in ] graph - Graph where instruction will be inserted. 425 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 426 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 427 * @note Allocates 428 */ 429 AbckitInst *(*iCreateLdglobal)(AbckitGraph *graph); 430 431 /** 432 * @brief Creates instruction with opcode LDTRUE. This instruction loads `true` into `acc`. 433 * @return Pointer to created `AbckitInst`. 434 * @param [ in ] graph - Graph where instruction will be inserted. 435 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 436 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 437 * @note Allocates 438 */ 439 AbckitInst *(*iCreateLdtrue)(AbckitGraph *graph); 440 441 /** 442 * @brief Creates instruction with opcode LDFALSE. This instruction loads `false` into `acc`. 443 * @return Pointer to created `AbckitInst`. 444 * @param [ in ] graph - Graph where instruction will be inserted. 445 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 446 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 447 * @note Allocates 448 */ 449 AbckitInst *(*iCreateLdfalse)(AbckitGraph *graph); 450 451 /** 452 * @brief Creates instruction with opcode LDHOLE. This instruction loads `hole` into `acc`. 453 * @return Pointer to created `AbckitInst`. 454 * @param [ in ] graph - Graph where instruction will be inserted. 455 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 456 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 457 * @note Allocates 458 */ 459 AbckitInst *(*iCreateLdhole)(AbckitGraph *graph); 460 461 /** 462 * @brief Creates instruction with opcode LDNEWTARGET. This instruction loads the implicit parameter `new.target` of 463 * the current function into `acc`. 464 * @return Pointer to created `AbckitInst`. 465 * @param [ in ] graph - Graph where instruction will be inserted. 466 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 467 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 468 * @note Allocates 469 */ 470 AbckitInst *(*iCreateLdnewtarget)(AbckitGraph *graph); 471 472 /** 473 * @brief Creates instruction with opcode LDTHIS. This instruction loads `this` into `acc`. 474 * @return Pointer to created `AbckitInst`. 475 * @param [ in ] graph - Graph where instruction will be inserted. 476 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 477 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 478 * @note Allocates 479 */ 480 AbckitInst *(*iCreateLdthis)(AbckitGraph *graph); 481 482 /** 483 * @brief Creates instruction with opcode POPLEXENV. This instruction pops the current lexical environment. 484 * @return Pointer to created `AbckitInst`. 485 * @param [ in ] graph - Graph where instruction will be inserted. 486 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 487 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 488 * @note Allocates 489 */ 490 AbckitInst *(*iCreatePoplexenv)(AbckitGraph *graph); 491 492 /** 493 * @brief Creates instruction with opcode GETUNMAPPEDARGS. This instruction loads the arguments object of the 494 * current function into `acc`. 495 * @return Pointer to created `AbckitInst`. 496 * @param [ in ] graph - Graph where instruction will be inserted. 497 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 498 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 499 * @note Allocates 500 */ 501 AbckitInst *(*iCreateGetunmappedargs)(AbckitGraph *graph); 502 503 /** 504 * @brief Creates instruction with opcode ASYNCFUNCTIONENTER. This instruction creates an async function object, 505 * and store the object in `acc`. 506 * @return Pointer to created `AbckitInst`. 507 * @param [ in ] graph - Graph where instruction will be inserted. 508 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 509 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 510 * @note Allocates 511 */ 512 AbckitInst *(*iCreateAsyncfunctionenter)(AbckitGraph *graph); 513 514 /** 515 * @brief Creates instruction with opcode LDFUNCTION. This instruction loads the current function object in `acc`. 516 * @return Pointer to created `AbckitInst`. 517 * @param [ in ] graph - Graph where instruction will be inserted. 518 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 519 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 520 * @note Allocates 521 */ 522 AbckitInst *(*iCreateLdfunction)(AbckitGraph *graph); 523 524 /** 525 * @brief Creates instruction with opcode DEBUGGER. This instruction pauses execution during debugging. 526 * @return Pointer to created `AbckitInst`. 527 * @param [ in ] graph - Graph where instruction will be inserted. 528 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 529 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 530 * @note Allocates 531 */ 532 AbckitInst *(*iCreateDebugger)(AbckitGraph *graph); 533 534 /** 535 * @brief Creates instruction with opcode GETPROPITERATOR. This instruction loads `acc`'s for-in iterator into 536 * `acc`. 537 * @return Pointer to created `AbckitInst`. 538 * @param [ in ] graph - Graph where instruction will be inserted. 539 * @param [ in ] acc - Inst containing object. 540 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 541 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 542 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 543 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 544 * @note Allocates 545 */ 546 AbckitInst *(*iCreateGetpropiterator)(AbckitGraph *graph, AbckitInst *acc); 547 548 /** 549 * @brief Creates instruction with opcode GETITERATOR. This instruction executes GetIterator(acc, sync), and stores 550 * the result into `acc`. 551 * @return Pointer to created `AbckitInst`. 552 * @param [ in ] graph - Graph where instruction will be inserted. 553 * @param [ in ] acc - Inst containing object. 554 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 555 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 556 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 557 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 558 * @note Allocates 559 */ 560 AbckitInst *(*iCreateGetiterator)(AbckitGraph *graph, AbckitInst *acc); 561 562 /** 563 * @brief Creates instruction with opcode GETASYNCITERATOR. This instruction executes GetIterator(acc, sync), and 564 * stores the result into `acc`. 565 * @return Pointer to created `AbckitInst`. 566 * @param [ in ] graph - Graph where instruction will be inserted. 567 * @param [ in ] acc - Inst containing object. 568 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 569 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 570 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 571 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 572 * @note Allocates 573 */ 574 AbckitInst *(*iCreateGetasynciterator)(AbckitGraph *graph, AbckitInst *acc); 575 576 /** 577 * @brief Creates instruction with opcode LDPRIVATEPROPERTY. This instruction loads the property of `acc` of the 578 * key obtained from the specified lexical position into `acc`. 579 * @return Pointer to created `AbckitInst`. 580 * @param [ in ] graph - Graph where instruction will be inserted. 581 * @param [ in ] acc - Inst containing object. 582 * @param [ in ] imm0 - Lexical environment level. 583 * @param [ in ] imm1 - Slot number. 584 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 585 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 586 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 587 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 588 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 589 * @note Allocates 590 */ 591 AbckitInst *(*iCreateLdprivateproperty)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, uint64_t imm1); 592 593 /** 594 * @brief Creates instruction with opcode STPRIVATEPROPERTY. This instruction loads the property of `input0` of the 595 * key obtained from the specified lexical position into `acc`. 596 * @return Pointer to created `AbckitInst`. 597 * @param [ in ] graph - Graph where instruction will be inserted. 598 * @param [ in ] acc - ??????????. 599 * @param [ in ] imm0 - Lexical environment level. 600 * @param [ in ] imm1 - Slot number. 601 * @param [ in ] input0 - Inst containing object. 602 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 603 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 604 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 605 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 606 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 607 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 608 * @note Allocates 609 */ 610 AbckitInst *(*iCreateStprivateproperty)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, uint64_t imm1, 611 AbckitInst *input0); 612 613 /** 614 * @brief Creates instruction with opcode TESTIN. This instruction loads a token from the specified lexical 615 * position, checks whether it is a property of the object stored in `acc`. 616 * @return Pointer to created `AbckitInst`. 617 * @param [ in ] graph - Graph where instruction will be inserted. 618 * @param [ in ] acc - Inst containing object. 619 * @param [ in ] imm0 - Lexical environment level. 620 * @param [ in ] imm1 - Slot number. 621 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 622 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 623 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 624 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 625 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 626 * @note Allocates 627 */ 628 AbckitInst *(*iCreateTestin)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, uint64_t imm1); 629 630 /** 631 * @brief Creates instruction with opcode DEFINEFIELDBYNAME. This instruction defines a property named 'string` for 632 * object `input0`, and stores value `acc` in `string` 633 * @return Pointer to created `AbckitInst`. 634 * @param [ in ] graph - Graph where instruction will be inserted. 635 * @param [ in ] acc - Value to be stored. 636 * @param [ in ] string - Field name. 637 * @param [ in ] input0 - Inst containing object. 638 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 639 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 640 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 641 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 642 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 643 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 644 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 645 * @note Allocates 646 */ 647 AbckitInst *(*iCreateDefinefieldbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string, 648 AbckitInst *input0); 649 650 /** 651 * @brief Creates instruction with opcode DEFINEPROPERTYBYNAME. 652 * @return Pointer to created `AbckitInst`. 653 * @param [ in ] graph - Graph where instruction will be inserted. 654 * @param [ in ] acc - Value to be stored. 655 * @param [ in ] string - Property name. 656 * @param [ in ] input0 - Inst containing object. 657 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 658 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 659 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 660 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 661 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 662 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 663 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 664 * @note Allocates 665 */ 666 AbckitInst *(*iCreateDefinepropertybyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string, 667 AbckitInst *input0); 668 669 /** 670 * @brief Creates instruction with opcode CREATEEMPTYOBJECT. This instruction creates an empty object, and stores 671 * it in `acc`. 672 * @return Pointer to created `AbckitInst`. 673 * @param [ in ] graph - Graph where instruction will be inserted. 674 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 675 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 676 * @note Allocates 677 */ 678 AbckitInst *(*iCreateCreateemptyobject)(AbckitGraph *graph); 679 680 /** 681 * @brief Creates instruction with opcode CREATEEMPTYARRAY. This instruction creates an empty array, and stores 682 * it in `acc`. 683 * @return Pointer to created `AbckitInst`. 684 * @param [ in ] graph - Graph where instruction will be inserted. 685 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 686 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 687 * @note Allocates 688 */ 689 AbckitInst *(*iCreateCreateemptyarray)(AbckitGraph *graph); 690 691 /** 692 * @brief Creates instruction with opcode CREATEGENERATOROBJ. This instruction creates a generator with the 693 * function object `input0`, and stores it in `acc`. 694 * @return Pointer to created `AbckitInst`. 695 * @param [ in ] graph - Graph where instruction will be inserted. 696 * @param [ in ] input0 - Inst containing function object. 697 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 698 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 699 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 700 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 701 * @note Allocates 702 */ 703 AbckitInst *(*iCreateCreategeneratorobj)(AbckitGraph *graph, AbckitInst *input0); 704 705 /** 706 * @brief Creates instruction with opcode CREATEITERRESULTOBJ. This instruction executes `CreateIterResultObject` 707 * with arguments `value` `input0` and `done` `input1`. 708 * @return Pointer to created `AbckitInst`. 709 * @param [ in ] graph - Graph where instruction will be inserted. 710 * @param [ in ] input0 - Inst containing object. 711 * @param [ in ] input0 - Inst containing boolean. 712 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 713 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 714 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 715 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 716 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 717 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 718 * @note Allocates 719 */ 720 AbckitInst *(*iCreateCreateiterresultobj)(AbckitGraph *graph, AbckitInst *input0, AbckitInst *input1); 721 722 /** 723 * @brief Creates instruction with opcode CREATEOBJECTWITHEXCLUDEDKEYS. This instruction creates an object based on 724 * object `input0` with excluded properties of the keys `input1`, `inputs[0]`, ..., `inputs[imm0-1]`, and stores 725 * it in `acc`. 726 * @return Pointer to created `AbckitInst`. 727 * @param [ in ] graph - Graph where instruction will be inserted. 728 * @param [ in ] input0 - Inst containing object. 729 * @param [ in ] input1 - Inst containing first `key`. 730 * @param [ in ] imm0 - Number of optional insts containing `key`s. 731 * @param [ in ] ... - Optional insts containing `key`s. 732 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 733 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 734 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 735 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 736 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 737 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 738 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 739 * @note Allocates 740 */ 741 AbckitInst *(*iCreateCreateobjectwithexcludedkeys)(AbckitGraph *graph, AbckitInst *input0, AbckitInst *input1, 742 uint64_t imm0, ...); 743 744 /** 745 * @brief Creates instruction with opcode WIDE_CREATEOBJECTWITHEXCLUDEDKEYS. This instruction creates an object 746 * based on object `input0` with excluded properties of the keys `input1`, `inputs[0]`, ..., `inputs[imm0-1]`, and 747 * stores it in `acc`. 748 * @return Pointer to created `AbckitInst`. 749 * @param [ in ] graph - Graph where instruction will be inserted. 750 * @param [ in ] input0 - Inst containing object. 751 * @param [ in ] input1 - Inst containing first `key`. 752 * @param [ in ] imm0 - Number of optional insts containing `key`s. 753 * @param [ in ] ... - Optional insts containing `key`s. 754 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 755 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 756 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 757 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 758 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 759 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 760 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 761 * @note Allocates 762 */ 763 AbckitInst *(*iCreateWideCreateobjectwithexcludedkeys)(AbckitGraph *graph, AbckitInst *input0, AbckitInst *input1, 764 uint64_t imm0, ...); 765 766 /** 767 * @brief Creates instruction with opcode CREATEARRAYWITHBUFFER. This instruction creates an array using literal 768 * array indexed by `literalArray`, and stores it in `acc`. 769 * @return Pointer to created `AbckitInst`. 770 * @param [ in ] graph - Graph where instruction will be inserted. 771 * @param [ in ] literalArray - Literal array used in array creation. 772 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 773 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `literalArray` is NULL. 774 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 775 * @note Allocates 776 */ 777 AbckitInst *(*iCreateCreatearraywithbuffer)(AbckitGraph *graph, AbckitLiteralArray *literalArray); 778 779 /** 780 * @brief Creates instruction with opcode CREATEOBJECTWITHBUFFER. This instruction creates an object using literal 781 * array indexed by `literalArray`, and stores it in `acc`. 782 * @return Pointer to created `AbckitInst`. 783 * @param [ in ] graph - Graph where instruction will be inserted. 784 * @param [ in ] literalArray - Literal array used in object creation. 785 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 786 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `literalArray` is NULL. 787 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 788 * @note Allocates 789 */ 790 AbckitInst *(*iCreateCreateobjectwithbuffer)(AbckitGraph *graph, AbckitLiteralArray *literalArray); 791 792 /** 793 * @brief Creates instruction with opcode NEWOBJAPPLY. This instruction creates an instance of `input0` with 794 * arguments list `acc`, and stores the instance in `acc`. 795 * @return Pointer to created `AbckitInst`. 796 * @param [ in ] graph - Graph where instruction will be inserted. 797 * @param [ in ] acc - Inst containing parameter list. 798 * @param [ in ] input0 - Inst containing class object. 799 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 800 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 801 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 802 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 803 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 804 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 805 * @note Allocates 806 */ 807 AbckitInst *(*iCreateNewobjapply)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 808 809 /** 810 * @brief Creates instruction with opcode NEWOBJRANGE. This instruction invokes the constructor of `inputs[0]` with 811 * arguments `inputs[1]`, ..., `inputs[argCount-1]` to create a class instance, and stores the instance in `acc`. 812 * @return Pointer to created `AbckitInst`. 813 * @param [ in ] graph - Graph where instruction will be inserted. 814 * @param [ in ] argCount - Number of insts containing class object and arguments. 815 * @param [ in ] ... - Insts containing class object and arguments. 816 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 817 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 818 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 819 * @note Allocates 820 */ 821 AbckitInst *(*iCreateNewobjrange)(AbckitGraph *graph, size_t argCount, ... /* in AbckitInst *inputs... */); 822 823 /** 824 * @brief Creates instruction with opcode WIDE_NEWOBJRANGE. This instruction invokes the constructor of `inputs[0]` 825 * with arguments `inputs[1]`, ..., `inputs[argCount-1]` to create a class instance, and stores the instance in 826 * `acc`. 827 * @return Pointer to created `AbckitInst`. 828 * @param [ in ] graph - Graph where instruction will be inserted. 829 * @param [ in ] argCount - Number of insts containing class object and arguments. 830 * @param [ in ] ... - Insts containing class object and arguments. 831 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 832 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 833 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 834 * @note Allocates 835 */ 836 AbckitInst *(*iCreateWideNewobjrange)(AbckitGraph *graph, size_t argCount, ... /* in AbckitInst *inputs... */); 837 838 /** 839 * @brief Creates instruction with opcode NEWLEXENV. This instruction creates a lexical environment with `imm0` 840 * slots, and stores it in `acc`. 841 * @return Pointer to created `AbckitInst`. 842 * @param [ in ] graph - Graph where instruction will be inserted. 843 * @param [ in ] imm0 - Number of slots in the lexical environment. 844 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 845 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 846 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 847 * @note Allocates 848 */ 849 AbckitInst *(*iCreateNewlexenv)(AbckitGraph *graph, uint64_t imm0); 850 851 /** 852 * @brief Creates instruction with opcode WIDE_NEWLEXENV. This instruction creates a lexical environment with `imm0` 853 * slots, and stores it in `acc`. 854 * @return Pointer to created `AbckitInst`. 855 * @param [ in ] graph - Graph where instruction will be inserted. 856 * @param [ in ] imm0 - Number of slots in the lexical environment. 857 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 858 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 859 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 860 * @note Allocates 861 */ 862 AbckitInst *(*iCreateWideNewlexenv)(AbckitGraph *graph, uint64_t imm0); 863 864 /** 865 * @brief Creates instruction with opcode NEWLEXENVWITHNAME. This instruction creates a lexical environment with 866 * `imm0` slots using the names of lexical variables stored in literal array `literalArray`, and stores the 867 * created environment in `acc`. 868 * @return Pointer to created `AbckitInst`. 869 * @param [ in ] graph - Graph where instruction will be inserted. 870 * @param [ in ] imm0 - Number of slots in the lexical environment. 871 * @param [ in ] literalArray - Literal array with names of lexical variables. 872 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 873 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `literalArray` is NULL. 874 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 875 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 876 * @note Allocates 877 */ 878 AbckitInst *(*iCreateNewlexenvwithname)(AbckitGraph *graph, uint64_t imm0, AbckitLiteralArray *literalArray); 879 880 /** 881 * @brief Creates instruction with opcode WIDE_NEWLEXENVWITHNAME. This instruction creates a lexical environment 882 * with `imm0` slots using the names of lexical variables stored in literal array `literalArray`, and stores the 883 * created environment in `acc`. 884 * @return Pointer to created `AbckitInst`. 885 * @param [ in ] graph - Graph where instruction will be inserted. 886 * @param [ in ] imm0 - Number of slots in the lexical environment. 887 * @param [ in ] literalArray - Literal array with names of lexical variables. 888 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 889 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `literalArray` is NULL. 890 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 891 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 892 * @note Allocates 893 */ 894 AbckitInst *(*iCreateWideNewlexenvwithname)(AbckitGraph *graph, uint64_t imm0, AbckitLiteralArray *literalArray); 895 896 /** 897 * @brief Creates instruction with opcode CREATEASYNCGENERATOROBJ. This instruction creates an async generator 898 * function object with the function object `input0`, and stores the generator in `acc`. 899 * @return Pointer to created `AbckitInst`. 900 * @param [ in ] graph - Graph where instruction will be inserted. 901 * @param [ in ] input0 - Inst containing function object. 902 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 903 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 904 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 905 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 906 * @note Allocates 907 */ 908 AbckitInst *(*iCreateCreateasyncgeneratorobj)(AbckitGraph *graph, AbckitInst *input0); 909 910 /** 911 * @brief Creates instruction with opcode ASYNCGENERATORRESOLVE. This instruction executes `AsyncGeneratorResolve` 912 * with arguments `generator input0`, `value input1`, and `done input2`. 913 * @return Pointer to created `AbckitInst`. 914 * @param [ in ] graph - Graph where instruction will be inserted. 915 * @param [ in ] input0 - Inst containing `generator`. 916 * @param [ in ] input1 - Inst containing `value` object. 917 * @param [ in ] input2 - Inst containing `done` boolean. 918 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 919 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 920 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 921 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input2` is NULL. 922 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 923 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 924 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input2` and `graph` differs. 925 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 926 * @note Allocates 927 */ 928 AbckitInst *(*iCreateAsyncgeneratorresolve)(AbckitGraph *graph, AbckitInst *input0, AbckitInst *input1, 929 AbckitInst *input2); 930 931 /** 932 * @brief Creates instruction with opcode ADD2. This instruction computes the binary operation `input0 + acc`, and 933 * stores the result in `acc`. 934 * @return Pointer to created `AbckitInst`. 935 * @param [ in ] graph - Graph where instruction will be inserted. 936 * @param [ in ] acc - Inst containing right operand. 937 * @param [ in ] input0 - Inst containing left operand. 938 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 939 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 940 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 941 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 942 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 943 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 944 * @note Allocates 945 */ 946 AbckitInst *(*iCreateAdd2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 947 948 /** 949 * @brief Creates instruction with opcode SUB2. This instruction computes the binary operation `input0 - acc`, and 950 * stores the result in `acc`. 951 * @return Pointer to created `AbckitInst`. 952 * @param [ in ] graph - Graph where instruction will be inserted. 953 * @param [ in ] acc - Inst containing right operand. 954 * @param [ in ] input0 - Inst containing left operand. 955 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 956 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 957 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 958 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 959 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 960 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 961 * @note Allocates 962 */ 963 AbckitInst *(*iCreateSub2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 964 965 /** 966 * @brief Creates instruction with opcode MUL2. This instruction computes the binary operation `input0 * acc`, and 967 * stores the result in `acc`. 968 * @return Pointer to created `AbckitInst`. 969 * @param [ in ] graph - Graph where instruction will be inserted. 970 * @param [ in ] acc - Inst containing right operand. 971 * @param [ in ] input0 - Inst containing left operand. 972 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 973 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 974 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 975 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 976 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 977 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 978 * @note Allocates 979 */ 980 AbckitInst *(*iCreateMul2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 981 982 /** 983 * @brief Creates instruction with opcode DIV2. This instruction computes the binary operation `input0 / acc`, and 984 * stores the result in `acc`. 985 * @return Pointer to created `AbckitInst`. 986 * @param [ in ] graph - Graph where instruction will be inserted. 987 * @param [ in ] acc - Inst containing right operand. 988 * @param [ in ] input0 - Inst containing left operand. 989 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 990 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 991 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 992 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 993 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 994 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 995 * @note Allocates 996 */ 997 AbckitInst *(*iCreateDiv2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 998 999 /** 1000 * @brief Creates instruction with opcode MOD2. This instruction computes the binary operation `input0 % acc`, and 1001 * stores the result in `acc`. 1002 * @return Pointer to created `AbckitInst`. 1003 * @param [ in ] graph - Graph where instruction will be inserted. 1004 * @param [ in ] acc - Inst containing right operand. 1005 * @param [ in ] input0 - Inst containing left operand. 1006 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1007 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1008 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1009 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1010 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1011 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1012 * @note Allocates 1013 */ 1014 AbckitInst *(*iCreateMod2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1015 1016 /** 1017 * @brief Creates instruction with opcode EQ. This instruction computes the binary operation `input0 == acc`, and 1018 * stores the result in `acc`. 1019 * @return Pointer to created `AbckitInst`. 1020 * @param [ in ] graph - Graph where instruction will be inserted. 1021 * @param [ in ] acc - Inst containing right operand. 1022 * @param [ in ] input0 - Inst containing left operand. 1023 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1024 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1025 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1026 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1027 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1028 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1029 * @note Allocates 1030 */ 1031 AbckitInst *(*iCreateEq)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1032 1033 /** 1034 * @brief Creates instruction with opcode NOTEQ. This instruction computes the binary operation `input0 != acc`, and 1035 * stores the result in `acc`. 1036 * @return Pointer to created `AbckitInst`. 1037 * @param [ in ] graph - Graph where instruction will be inserted. 1038 * @param [ in ] acc - Inst containing right operand. 1039 * @param [ in ] input0 - Inst containing left operand. 1040 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1041 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1042 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1043 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1044 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1045 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1046 * @note Allocates 1047 */ 1048 AbckitInst *(*iCreateNoteq)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1049 1050 /** 1051 * @brief Creates instruction with opcode LESS. This instruction computes the binary operation `input0 < acc`, and 1052 * stores the result in `acc`. 1053 * @return Pointer to created `AbckitInst`. 1054 * @param [ in ] graph - Graph where instruction will be inserted. 1055 * @param [ in ] acc - Inst containing right operand. 1056 * @param [ in ] input0 - Inst containing left operand. 1057 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1058 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1059 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1060 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1061 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1062 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1063 * @note Allocates 1064 */ 1065 AbckitInst *(*iCreateLess)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1066 1067 /** 1068 * @brief Creates instruction with opcode LESSEQ. This instruction computes the binary operation `input0 <= acc`. 1069 * @return Pointer to created `AbckitInst`. 1070 * @param [ in ] graph - Graph where instruction will be inserted. 1071 * @param [ in ] acc - Inst containing right operand. 1072 * @param [ in ] input0 - Inst containing left operand. 1073 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1074 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1075 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1076 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1077 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1078 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1079 * @note Allocates 1080 */ 1081 AbckitInst *(*iCreateLesseq)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1082 1083 /** 1084 * @brief Creates instruction with opcode GREATER. This instruction computes the binary operation `input0 > acc`. 1085 * @return Pointer to created `AbckitInst`. 1086 * @param [ in ] graph - Graph where instruction will be inserted. 1087 * @param [ in ] acc - Inst containing right operand. 1088 * @param [ in ] input0 - Inst containing left operand. 1089 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1090 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1091 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1092 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1093 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1094 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1095 * @note Allocates 1096 */ 1097 AbckitInst *(*iCreateGreater)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1098 1099 /** 1100 * @brief Creates instruction with opcode GREATEREQ. This instruction computes the binary operation `input0 >= acc`. 1101 * @return Pointer to created `AbckitInst`. 1102 * @param [ in ] graph - Graph where instruction will be inserted. 1103 * @param [ in ] acc - Inst containing right operand. 1104 * @param [ in ] input0 - Inst containing left operand. 1105 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1106 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1107 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1108 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1109 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1110 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1111 * @note Allocates 1112 */ 1113 AbckitInst *(*iCreateGreatereq)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1114 1115 /** 1116 * @brief Creates instruction with opcode SHL2. This instruction computes the binary operation `input0 << acc`. 1117 * @return Pointer to created `AbckitInst`. 1118 * @param [ in ] graph - Graph where instruction will be inserted. 1119 * @param [ in ] acc - Inst containing right operand. 1120 * @param [ in ] input0 - Inst containing left operand. 1121 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1122 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1123 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1124 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1125 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1126 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1127 * @note Allocates 1128 */ 1129 AbckitInst *(*iCreateShl2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1130 1131 /** 1132 * @brief Creates instruction with opcode SHR2. This instruction computes the binary operation `input0 >> acc`. 1133 * @return Pointer to created `AbckitInst`. 1134 * @param [ in ] graph - Graph where instruction will be inserted. 1135 * @param [ in ] acc - Inst containing right operand. 1136 * @param [ in ] input0 - Inst containing left operand. 1137 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1138 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1139 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1140 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1141 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1142 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1143 * @note Allocates 1144 */ 1145 AbckitInst *(*iCreateShr2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1146 1147 /** 1148 * @brief Creates instruction with opcode ASHR2. This instruction computes the binary operation `input0 >>> acc`. 1149 * @return Pointer to created `AbckitInst`. 1150 * @param [ in ] graph - Graph where instruction will be inserted. 1151 * @param [ in ] acc - Inst containing right operand. 1152 * @param [ in ] input0 - Inst containing left operand. 1153 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1154 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1155 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1156 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1157 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1158 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1159 * @note Allocates 1160 */ 1161 AbckitInst *(*iCreateAshr2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1162 1163 /** 1164 * @brief Creates instruction with opcode AND2. This instruction computes the binary operation `input0 & acc`. 1165 * @return Pointer to created `AbckitInst`. 1166 * @param [ in ] graph - Graph where instruction will be inserted. 1167 * @param [ in ] acc - Inst containing right operand. 1168 * @param [ in ] input0 - Inst containing left operand. 1169 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1170 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1171 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1172 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1173 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1174 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1175 * @note Allocates 1176 */ 1177 AbckitInst *(*iCreateAnd2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1178 1179 /** 1180 * @brief Creates instruction with opcode OR2. This instruction computes the binary operation `input0 | acc`. 1181 * @return Pointer to created `AbckitInst`. 1182 * @param [ in ] graph - Graph where instruction will be inserted. 1183 * @param [ in ] acc - Inst containing right operand. 1184 * @param [ in ] input0 - Inst containing left operand. 1185 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1186 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1187 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1188 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1189 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1190 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1191 * @note Allocates 1192 */ 1193 AbckitInst *(*iCreateOr2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1194 1195 /** 1196 * @brief Creates instruction with opcode XOR2. This instruction computes the binary operation `input0 ^ acc`. 1197 * @return Pointer to created `AbckitInst`. 1198 * @param [ in ] graph - Graph where instruction will be inserted. 1199 * @param [ in ] acc - Inst containing right operand. 1200 * @param [ in ] input0 - Inst containing left operand. 1201 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1202 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1203 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1204 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1205 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1206 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1207 * @note Allocates 1208 */ 1209 AbckitInst *(*iCreateXor2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1210 1211 /** 1212 * @brief Creates instruction with opcode EXP. This instruction computes the binary operation `input0 ** acc`. 1213 * @return Pointer to created `AbckitInst`. 1214 * @param [ in ] graph - Graph where instruction will be inserted. 1215 * @param [ in ] acc - Inst containing right operand. 1216 * @param [ in ] input0 - Inst containing left operand. 1217 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1218 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1219 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1220 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1221 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1222 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1223 * @note Allocates 1224 */ 1225 AbckitInst *(*iCreateExp)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1226 1227 /** 1228 * @brief Creates instruction with opcode TYPEOF. This instruction computes `typeof acc`. 1229 * @return Pointer to created `AbckitInst`. 1230 * @param [ in ] graph - Graph where instruction will be inserted. 1231 * @param [ in ] acc - Inst containing object to be inspected. 1232 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1233 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1234 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1235 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1236 * @note Allocates 1237 */ 1238 AbckitInst *(*iCreateTypeof)(AbckitGraph *graph, AbckitInst *acc); 1239 1240 /** 1241 * @brief Creates instruction with opcode TONUMBER. This instruction executes `ToNumber` with argument `acc`, and 1242 * stores the result in `acc`. 1243 * @return Pointer to created `AbckitInst`. 1244 * @param [ in ] graph - Graph where instruction will be inserted. 1245 * @param [ in ] acc - Inst containing object. 1246 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1247 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1248 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1249 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1250 * @note Allocates 1251 */ 1252 AbckitInst *(*iCreateTonumber)(AbckitGraph *graph, AbckitInst *acc); 1253 1254 /** 1255 * @brief Creates instruction with opcode TONUMERIC. This instruction executes `ToNumeric` with argument `acc`, and 1256 * stores the result in `acc`. 1257 * @return Pointer to created `AbckitInst`. 1258 * @param [ in ] graph - Graph where instruction will be inserted. 1259 * @param [ in ] acc - Inst containing object. 1260 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1261 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1262 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1263 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1264 * @note Allocates 1265 */ 1266 AbckitInst *(*iCreateTonumeric)(AbckitGraph *graph, AbckitInst *acc); 1267 1268 /** 1269 * @brief Creates instruction with opcode NEG. This instruction computes `-acc`. 1270 * @return Pointer to created `AbckitInst`. 1271 * @param [ in ] graph - Graph where instruction will be inserted. 1272 * @param [ in ] acc - Inst containing operand. 1273 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1274 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1275 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1276 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1277 * @note Allocates 1278 */ 1279 AbckitInst *(*iCreateNeg)(AbckitGraph *graph, AbckitInst *acc); 1280 1281 /** 1282 * @brief Creates instruction with opcode NOT. This instruction computes `!acc`. 1283 * @return Pointer to created `AbckitInst`. 1284 * @param [ in ] graph - Graph where instruction will be inserted. 1285 * @param [ in ] acc - Inst containing operand. 1286 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1287 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1288 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1289 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1290 * @note Allocates 1291 */ 1292 AbckitInst *(*iCreateNot)(AbckitGraph *graph, AbckitInst *acc); 1293 1294 /** 1295 * @brief Creates instruction with opcode INC. This instruction computes `acc + 1`. 1296 * @return Pointer to created `AbckitInst`. 1297 * @param [ in ] graph - Graph where instruction will be inserted. 1298 * @param [ in ] acc - Inst containing operand. 1299 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1300 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1301 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1302 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1303 * @note Allocates 1304 */ 1305 AbckitInst *(*iCreateInc)(AbckitGraph *graph, AbckitInst *acc); 1306 1307 /** 1308 * @brief Creates instruction with opcode DEC. This instruction computes `acc - 1`. 1309 * @return Pointer to created `AbckitInst`. 1310 * @param [ in ] graph - Graph where instruction will be inserted. 1311 * @param [ in ] acc - Inst containing operand. 1312 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1313 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1314 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1315 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1316 * @note Allocates 1317 */ 1318 AbckitInst *(*iCreateDec)(AbckitGraph *graph, AbckitInst *acc); 1319 1320 /** 1321 * @brief Creates instruction with opcode ISTRUE. This instruction computes `acc == true`. 1322 * @return Pointer to created `AbckitInst`. 1323 * @param [ in ] graph - Graph where instruction will be inserted. 1324 * @param [ in ] acc - Inst containing object. 1325 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1326 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1327 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1328 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1329 * @note Allocates 1330 */ 1331 AbckitInst *(*iCreateIstrue)(AbckitGraph *graph, AbckitInst *acc); 1332 1333 /** 1334 * @brief Creates instruction with opcode ISFALSE. This instruction computes `acc == false`. 1335 * @return Pointer to created `AbckitInst`. 1336 * @param [ in ] graph - Graph where instruction will be inserted. 1337 * @param [ in ] acc - Inst containing object. 1338 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1339 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1340 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1341 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1342 * @note Allocates 1343 */ 1344 AbckitInst *(*iCreateIsfalse)(AbckitGraph *graph, AbckitInst *acc); 1345 1346 /** 1347 * @brief Creates instruction with opcode ISIN. This instruction computes `input0 in acc`. 1348 * @return Pointer to created `AbckitInst`. 1349 * @param [ in ] graph - Graph where instruction will be inserted. 1350 * @param [ in ] acc - Inst containing object. 1351 * @param [ in ] input0 - Inst containing object. 1352 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1353 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1354 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1355 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1356 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1357 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1358 * @note Allocates 1359 */ 1360 AbckitInst *(*iCreateIsin)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1361 1362 /** 1363 * @brief Creates instruction with opcode INSTANCEOF. This instruction computes `input0 instanceof acc`, and stores 1364 * the result in `acc`. 1365 * @return Pointer to created `AbckitInst`. 1366 * @param [ in ] graph - Graph where instruction will be inserted. 1367 * @param [ in ] acc - Inst containing object. 1368 * @param [ in ] input0 - Inst containing object. 1369 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1370 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1371 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1372 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1373 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1374 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1375 * @note Allocates 1376 */ 1377 AbckitInst *(*iCreateInstanceof)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1378 1379 /** 1380 * @brief Creates instruction with opcode STRICTNOTEQ. This instruction computes `input0 !== acc`, and stores 1381 * the result in `acc`. 1382 * @return Pointer to created `AbckitInst`. 1383 * @param [ in ] graph - Graph where instruction will be inserted. 1384 * @param [ in ] acc - Inst containing object. 1385 * @param [ in ] input0 - Inst containing object. 1386 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1387 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1388 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1389 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1390 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1391 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1392 * @note Allocates 1393 */ 1394 AbckitInst *(*iCreateStrictnoteq)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1395 1396 /** 1397 * @brief Creates instruction with opcode STRICTEQ. This instruction computes `input0 === acc`, and stores 1398 * the result in `acc`. 1399 * @return Pointer to created `AbckitInst`. 1400 * @param [ in ] graph - Graph where instruction will be inserted. 1401 * @param [ in ] acc - Inst containing object. 1402 * @param [ in ] input0 - Inst containing object. 1403 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1404 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1405 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1406 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1407 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1408 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1409 * @note Allocates 1410 */ 1411 AbckitInst *(*iCreateStricteq)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1412 1413 /** 1414 * @brief Creates instruction with opcode CALLRUNTIME_NOTIFYCONCURRENTRESULT. This instruction notifies runtime with 1415 * the return value of the underlying concurrent function. This instruction appears only in concurrent functions. 1416 * @return Pointer to created `AbckitInst`. 1417 * @param [ in ] graph - Graph where instruction will be inserted. 1418 * @param [ in ] acc - Inst containing concurrent function result. 1419 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1420 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1421 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1422 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1423 * @note Allocates 1424 */ 1425 AbckitInst *(*iCreateCallruntimeNotifyconcurrentresult)(AbckitGraph *graph, AbckitInst *acc); 1426 1427 /** 1428 * @brief Creates instruction with opcode CALLRUNTIME_DEFINEFIELDBYVALUE. This instruction defines a property with 1429 * key `input0` for object `input1`, and stores the value of `acc` in it. 1430 * @return Pointer to created `AbckitInst`. 1431 * @param [ in ] graph - Graph where instruction will be inserted. 1432 * @param [ in ] acc - Inst containing value for a property. 1433 * @param [ in ] input0 - Inst containing key for property. 1434 * @param [ in ] input1 - Inst containing object to be modified. 1435 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1436 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1437 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1438 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 1439 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1440 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1441 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 1442 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1443 * @note Allocates 1444 */ 1445 AbckitInst *(*iCreateCallruntimeDefinefieldbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, 1446 AbckitInst *input1); 1447 1448 /** 1449 * @brief Creates instruction with opcode CALLRUNTIME_DEFINEFIELDBYINDEX. This instruction defines a property with 1450 * key `imm0` for object `input0`, and stores the value of `acc` in it. 1451 * @return Pointer to created `AbckitInst`. 1452 * @param [ in ] graph - Graph where instruction will be inserted. 1453 * @param [ in ] acc - Inst containing value for a property. 1454 * @param [ in ] imm0 - Key for property. 1455 * @param [ in ] input0 - Inst containing object to be modified. 1456 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1457 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1458 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1459 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1460 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1461 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1462 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1463 * @note Allocates 1464 */ 1465 AbckitInst *(*iCreateCallruntimeDefinefieldbyindex)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, 1466 AbckitInst *input0); 1467 1468 /** 1469 * @brief Creates instruction with opcode CALLRUNTIME_TOPROPERTYKEY. This instruction converts `acc` to property 1470 * key, if fails, throw an exception. 1471 * @return Pointer to created `AbckitInst`. 1472 * @param [ in ] graph - Graph where instruction will be inserted. 1473 * @param [ in ] acc - Inst containing value. 1474 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1475 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1476 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1477 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1478 * @note Allocates 1479 */ 1480 AbckitInst *(*iCreateCallruntimeTopropertykey)(AbckitGraph *graph, AbckitInst *acc); 1481 1482 /** 1483 * @brief Creates instruction with opcode CALLRUNTIME_CREATEPRIVATEPROPERTY. This instruction creates `imm0` 1484 * symbols. Obtains the stored private method according to the literal array `literalArray`. If a private instance 1485 * method exists, creates an additional symbol ("method"). Puts all the created symbols at the end of the lexical 1486 * environment of the current class according to the creation sequence. This instruction appears only in the 1487 * class definition. 1488 * @return Pointer to created `AbckitInst`. 1489 * @param [ in ] graph - Graph where instruction will be inserted. 1490 * @param [ in ] imm0 - Number of symbols to create. 1491 * @param [ in ] literalArray - Literal array of symbols. 1492 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1493 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `literalArray` is NULL. 1494 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1495 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1496 * @note Allocates 1497 */ 1498 AbckitInst *(*iCreateCallruntimeCreateprivateproperty)(AbckitGraph *graph, uint64_t imm0, 1499 AbckitLiteralArray *literalArray); 1500 1501 /** 1502 * @brief Creates instruction with opcode CALLRUNTIME_DEFINEPRIVATEPROPERTY. This instruction gets a token from the 1503 * specified lexical position, and appends it to object `input0` as a property. 1504 * @return Pointer to created `AbckitInst`. 1505 * @param [ in ] graph - Graph where instruction will be inserted. 1506 * @param [ in ] acc - Inst containing a value of a property. 1507 * @param [ in ] imm0 - Lexical environment layer number. 1508 * @param [ in ] imm0 - Slot number. 1509 * @param [ in ] imm0 - Inst containing object. 1510 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1511 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1512 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1513 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1514 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1515 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1516 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 1517 * @note Allocates 1518 */ 1519 AbckitInst *(*iCreateCallruntimeDefineprivateproperty)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, 1520 uint64_t imm1, AbckitInst *input0); 1521 1522 /** 1523 * @brief Creates instruction with opcode CALLRUNTIME_CALLINIT. This instruction sets the value of this as `input0`, 1524 * invokes the function object stored in `acc` with no argument. 1525 * @return Pointer to created `AbckitInst`. 1526 * @param [ in ] graph - Graph where instruction will be inserted. 1527 * @param [ in ] acc - Inst containing function object. 1528 * @param [ in ] input0 - Inst containing object. 1529 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1530 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1531 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1532 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1533 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1534 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1535 * @note Allocates 1536 */ 1537 AbckitInst *(*iCreateCallruntimeCallinit)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1538 1539 /** 1540 * @brief Creates instruction with opcode CALLRUNTIME_DEFINESENDABLECLASS. This instruction creates a sendable class 1541 * object of `function` with literal `literalArray` and superclass `input0`, and stores it in `acc`. 1542 * @return Pointer to created `AbckitInst`. 1543 * @param [ in ] graph - Graph where instruction will be inserted. 1544 * @param [ in ] function - Method of the constructor of the sendable class. 1545 * @param [ in ] literalArray - Literal array. 1546 * @param [ in ] imm0 - Number of formal parameters of method. 1547 * @param [ in ] input0 - Inst contatining superclass object. 1548 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1549 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `function` is NULL. 1550 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `literalArray` is NULL. 1551 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1552 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1553 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile` containing `function` and `graph` 1554 * differs. 1555 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1556 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1557 * @note Allocates 1558 */ 1559 AbckitInst *(*iCreateCallruntimeDefinesendableclass)(AbckitGraph *graph, AbckitCoreFunction *function, 1560 AbckitLiteralArray *literalArray, uint64_t imm0, 1561 AbckitInst *input0); 1562 1563 /** 1564 * @brief Creates instruction with opcode CALLRUNTIME_LDSENDABLECLASS. This instruction loads the sendable class in 1565 * lexical environment `imm0` into `acc`. 1566 * @return Pointer to created `AbckitInst`. 1567 * @param [ in ] graph - Graph where instruction will be inserted. 1568 * @param [ in ] imm0 - Lexical environment. 1569 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1570 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1571 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1572 * @note Allocates 1573 */ 1574 AbckitInst *(*iCreateCallruntimeLdsendableclass)(AbckitGraph *graph, uint64_t imm0); 1575 1576 /** 1577 * @brief Creates instruction with opcode CALLRUNTIME_LDSENDABLEEXTERNALMODULEVAR. 1578 * @return Pointer to created `AbckitInst`. 1579 * @param [ in ] graph - Graph where instruction will be inserted. 1580 * @param [ in ] imm0 - Index 1581 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1582 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1583 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1584 * @note Allocates 1585 */ 1586 AbckitInst *(*iCreateCallruntimeLdsendableexternalmodulevar)(AbckitGraph *graph, uint64_t imm0); 1587 1588 /** 1589 * @brief Creates instruction with opcode CALLRUNTIME_WIDELDSENDABLEEXTERNALMODULEVAR. 1590 * @return Pointer to created `AbckitInst`. 1591 * @param [ in ] graph - Graph where instruction will be inserted. 1592 * @param [ in ] imm0 - Index 1593 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1594 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1595 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1596 * @note Allocates 1597 */ 1598 AbckitInst *(*iCreateCallruntimeWideldsendableexternalmodulevar)(AbckitGraph *graph, uint64_t imm0); 1599 1600 /** 1601 * @brief Creates instruction with opcode CALLRUNTIME_NEWSENDABLEENV. 1602 * @return Pointer to created `AbckitInst`. 1603 * @param [ in ] graph - Graph where instruction will be inserted. 1604 * @param [ in ] imm0 - Number of slots in a shared lexical environment. 1605 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1606 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1607 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1608 * @note Allocates 1609 */ 1610 AbckitInst *(*iCreateCallruntimeNewsendableenv)(AbckitGraph *graph, uint64_t imm0); 1611 1612 /** 1613 * @brief Creates instruction with opcode CALLRUNTIME_WIDENEWSENDABLEENV. 1614 * @return Pointer to created `AbckitInst`. 1615 * @param [ in ] graph - Graph where instruction will be inserted. 1616 * @param [ in ] imm0 - Number of slots in a shared lexical environment. 1617 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1618 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1619 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1620 * @note Allocates 1621 */ 1622 AbckitInst *(*iCreateCallruntimeWidenewsendableenv)(AbckitGraph *graph, uint64_t imm0); 1623 1624 /** 1625 * @brief Creates instruction with opcode CALLRUNTIME_STSENDABLEVAR. 1626 * @return Pointer to created `AbckitInst`. 1627 * @param [ in ] graph - Graph where instruction will be inserted. 1628 * @param [ in ] acc - Object to store. 1629 * @param [ in ] imm0 - Lexical environment level. 1630 * @param [ in ] imm1 - Slot number. 1631 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1632 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1633 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1634 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1635 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 1636 * @note Allocates 1637 */ 1638 AbckitInst *(*iCreateCallruntimeStsendablevar)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, uint64_t imm1); 1639 1640 /** 1641 * @brief Creates instruction with opcode CALLRUNTIME_WIDESTSENDABLEVAR. 1642 * @return Pointer to created `AbckitInst`. 1643 * @param [ in ] graph - Graph where instruction will be inserted. 1644 * @param [ in ] acc - Object to store. 1645 * @param [ in ] imm0 - Lexical environment level. 1646 * @param [ in ] imm1 - Slot number. 1647 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1648 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1649 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` and `AbckitInst` differs. 1650 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1651 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1652 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 1653 * @note Allocates 1654 */ 1655 AbckitInst *(*iCreateCallruntimeWidestsendablevar)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, 1656 uint64_t imm1); 1657 1658 /** 1659 * @brief Creates instruction with opcode CALLRUNTIME_LDSENDABLEVAR. 1660 * @return Pointer to created `AbckitInst`. 1661 * @param [ in ] graph - Graph where instruction will be inserted. 1662 * @param [ in ] imm0 - Lexical environment level. 1663 * @param [ in ] imm1 - Slot number. 1664 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1665 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1666 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 1667 * @note Allocates 1668 */ 1669 AbckitInst *(*iCreateCallruntimeLdsendablevar)(AbckitGraph *graph, uint64_t imm0, uint64_t imm1); 1670 1671 /** 1672 * @brief Creates instruction with opcode CALLRUNTIME_WIDELDSENDABLEVAR. 1673 * @return Pointer to created `AbckitInst`. 1674 * @param [ in ] graph - Graph where instruction will be inserted. 1675 * @param [ in ] imm0 - Lexical environment level. 1676 * @param [ in ] imm1 - Slot number. 1677 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1678 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1679 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 1680 * @note Allocates 1681 */ 1682 AbckitInst *(*iCreateCallruntimeWideldsendablevar)(AbckitGraph *graph, uint64_t imm0, uint64_t imm1); 1683 1684 /** 1685 * @brief Creates instruction with opcode CALLRUNTIME_ISTRUE. 1686 * @return Pointer to created `AbckitInst`. 1687 * @param [ in ] graph - Graph where instruction will be inserted. 1688 * @param [ in ] acc - Input object. 1689 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1690 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1691 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1692 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1693 * @note Allocates 1694 */ 1695 AbckitInst *(*iCreateCallruntimeIstrue)(AbckitGraph *graph, AbckitInst *acc); 1696 1697 /** 1698 * @brief Creates instruction with opcode CALLRUNTIME_ISFALSE. 1699 * @return Pointer to created `AbckitInst`. 1700 * @param [ in ] graph - Graph where instruction will be inserted. 1701 * @param [ in ] acc - Input object. 1702 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1703 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1704 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1705 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1706 * @note Allocates 1707 */ 1708 AbckitInst *(*iCreateCallruntimeIsfalse)(AbckitGraph *graph, AbckitInst *acc); 1709 1710 // AbckitInst *(*iCreateCallruntimeLdlazymodulevar)( 1711 // AbckitGraph *graph, 1712 // uint64_t imm1); 1713 1714 // AbckitInst *(*iCreateCallruntimeWideldlazymodulevar)( 1715 // AbckitGraph *graph, 1716 // uint64_t imm1); 1717 1718 // AbckitInst *(*iCreateCallruntimeLdlazysendablemodulevar)( 1719 // AbckitGraph *graph, 1720 // uint64_t imm1); 1721 1722 // AbckitInst *(*iCreateCallruntimeWideldlazysendablemodulevar)( 1723 // AbckitGraph *graph, 1724 // uint64_t imm1); 1725 1726 // AbckitInst *(*iCreateCallruntimeSupercallforwardallargs)( 1727 // AbckitGraph *graph, 1728 // uint64_t imm1); 1729 1730 /** 1731 * @brief Creates instruction with opcode THROW. This instruction throws the exception stored in `acc`. 1732 * @return Pointer to created `AbckitInst`. 1733 * @param [ in ] graph - Graph where instruction will be inserted. 1734 * @param [ in ] acc - Inst containing exception. 1735 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1736 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1737 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1738 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1739 * @note Allocates 1740 */ 1741 AbckitInst *(*iCreateThrow)(AbckitGraph *graph, AbckitInst *acc); 1742 1743 /** 1744 * @brief Creates instruction with opcode THROW_NOTEXISTS. This instruction throws the exception that the method is 1745 * undefined. 1746 * @return Pointer to created `AbckitInst`. 1747 * @param [ in ] graph - Graph where instruction will be inserted. 1748 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1749 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1750 * @note Allocates 1751 */ 1752 AbckitInst *(*iCreateThrowNotexists)(AbckitGraph *graph); 1753 1754 /** 1755 * @brief Creates instruction with opcode THROW_PATTERNNONCOERCIBLE. This instruction throws the exception that the 1756 * object is not coercible. 1757 * @return Pointer to created `AbckitInst`. 1758 * @param [ in ] graph - Graph where instruction will be inserted. 1759 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1760 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1761 * @note Allocates 1762 */ 1763 AbckitInst *(*iCreateThrowPatternnoncoercible)(AbckitGraph *graph); 1764 1765 /** 1766 * @brief Creates instruction with opcode THROW_DELETESUPERPROPERTY. This instruction throws the exception of 1767 * deleting the property of the superclass. 1768 * @return Pointer to created `AbckitInst`. 1769 * @param [ in ] graph - Graph where instruction will be inserted. 1770 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1771 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1772 * @note Allocates 1773 */ 1774 AbckitInst *(*iCreateThrowDeletesuperproperty)(AbckitGraph *graph); 1775 1776 /** 1777 * @brief Creates instruction with opcode THROW_CONSTASSIGNMENT. This instruction throws the exception of 1778 * assignment to the const variable `input0`. 1779 * @return Pointer to created `AbckitInst`. 1780 * @param [ in ] graph - Graph where instruction will be inserted. 1781 * @param [ in ] input0 - Inst containing name of a const variable. 1782 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1783 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1784 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1785 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1786 * @note Allocates 1787 */ 1788 AbckitInst *(*iCreateThrowConstassignment)(AbckitGraph *graph, AbckitInst *input0); 1789 1790 /** 1791 * @brief Creates instruction with opcode THROW_IFNOTOBJECT. This instruction throws exception if `input0` is not an 1792 * object. 1793 * @return Pointer to created `AbckitInst`. 1794 * @param [ in ] graph - Graph where instruction will be inserted. 1795 * @param [ in ] input0 - Inst containing name of a const variable. 1796 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1797 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1798 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1799 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1800 * @note Allocates 1801 */ 1802 AbckitInst *(*iCreateThrowIfnotobject)(AbckitGraph *graph, AbckitInst *input0); 1803 1804 /** 1805 * @brief Creates instruction with opcode THROW_UNDEFINEDIFHOLE. This instruction throws the exception that `input1` 1806 * is `undefined` if `input0` is hole. 1807 * @return Pointer to created `AbckitInst`. 1808 * @param [ in ] graph - Graph where instruction will be inserted. 1809 * @param [ in ] input0 - Inst containing value of the object. 1810 * @param [ in ] input0 - Inst containing name of the object. 1811 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1812 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1813 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 1814 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1815 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 1816 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1817 * @note Allocates 1818 */ 1819 AbckitInst *(*iCreateThrowUndefinedifhole)(AbckitGraph *graph, AbckitInst *input0, AbckitInst *input1); 1820 1821 /** 1822 * @brief Creates instruction with opcode THROW_IFSUPERNOTCORRECTCALL. This instruction throws the exception if 1823 * `super()` is not called correctly. 1824 * @return Pointer to created `AbckitInst`. 1825 * @param [ in ] graph - Graph where instruction will be inserted. 1826 * @param [ in ] acc - Inst containing class object. 1827 * @param [ in ] input0 - Error type. 1828 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1829 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1830 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1831 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1832 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 1833 * @note Allocates 1834 */ 1835 AbckitInst *(*iCreateThrowIfsupernotcorrectcall)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0); 1836 1837 /** 1838 * @brief Creates instruction with opcode THROW_UNDEFINEDIFHOLEWITHNAME. This instruction throws the exception that 1839 * `string` is `undefined` if `acc` is hole. 1840 * @return Pointer to created `AbckitInst`. 1841 * @param [ in ] graph - Graph where instruction will be inserted. 1842 * @param [ in ] acc - Inst containing value of the object. 1843 * @param [ in ] string - String for exception. 1844 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1845 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1846 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 1847 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1848 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1849 * @note Allocates 1850 */ 1851 AbckitInst *(*iCreateThrowUndefinedifholewithname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string); 1852 1853 /** 1854 * @brief Creates instruction with opcode CALLARG0. This instruction invokes the function object stored in `acc` 1855 * with no argument. 1856 * @return Pointer to created `AbckitInst`. 1857 * @param [ in ] graph - Graph where instruction will be inserted. 1858 * @param [ in ] acc - Inst containing function object. 1859 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1860 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1861 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1862 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1863 * @note Allocates 1864 */ 1865 AbckitInst *(*iCreateCallarg0)(AbckitGraph *graph, AbckitInst *acc); 1866 1867 /** 1868 * @brief Creates instruction with opcode CALLARG1. This instruction invokes the function object stored in `acc` 1869 * with `input0` argument. 1870 * @return Pointer to created `AbckitInst`. 1871 * @param [ in ] graph - Graph where instruction will be inserted. 1872 * @param [ in ] acc - Inst containing function object. 1873 * @param [ in ] input0 - Inst containing argument. 1874 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1875 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1876 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1877 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1878 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1879 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1880 * @note Allocates 1881 */ 1882 AbckitInst *(*iCreateCallarg1)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1883 1884 /** 1885 * @brief Creates instruction with opcode CALLARGS2. This instruction invokes the function object stored in `acc` 1886 * with `input0` and `input1` arguments. 1887 * @return Pointer to created `AbckitInst`. 1888 * @param [ in ] graph - Graph where instruction will be inserted. 1889 * @param [ in ] acc - Inst containing function object. 1890 * @param [ in ] input0 - Inst containing first argument. 1891 * @param [ in ] input1 - Inst containing second argument. 1892 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1893 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1894 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1895 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 1896 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1897 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1898 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 1899 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1900 * @note Allocates 1901 */ 1902 AbckitInst *(*iCreateCallargs2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 1903 1904 /** 1905 * @brief Creates instruction with opcode CALLARGS3. This instruction invokes the function object stored in `acc` 1906 * with `input0`, `input1`, `input2` arguments. 1907 * @return Pointer to created `AbckitInst`. 1908 * @param [ in ] graph - Graph where instruction will be inserted. 1909 * @param [ in ] acc - Inst containing function object. 1910 * @param [ in ] input0 - Inst containing first argument. 1911 * @param [ in ] input1 - Inst containing second argument. 1912 * @param [ in ] input2 - Inst containing third argument. 1913 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1914 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1915 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1916 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 1917 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input2` is NULL. 1918 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1919 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1920 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input1` and `graph` differs. 1921 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input2` and `graph` differs. 1922 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1923 * @note Allocates 1924 */ 1925 AbckitInst *(*iCreateCallargs3)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1, 1926 AbckitInst *input2); 1927 1928 /** 1929 * @brief Creates instruction with opcode CALLRANGE. This instruction invokes `acc` with arguments `inputs[0]`, ..., 1930 * `inputs[argCount-1]`. 1931 * @return Pointer to created `AbckitInst`. 1932 * @param [ in ] graph - Graph where instruction will be inserted. 1933 * @param [ in ] acc - Inst containing function object. 1934 * @param [ in ] argCount - Number of arguments. 1935 * @param [ in ] ... - Arguments. 1936 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1937 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1938 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1939 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1940 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 1941 * @note Allocates 1942 */ 1943 AbckitInst *(*iCreateCallrange)(AbckitGraph *graph, AbckitInst *acc, size_t argCount, ...); 1944 1945 /** 1946 * @brief Creates instruction with opcode WIDE_CALLRANGE. This instruction invokes `acc` with arguments `inputs[0]`, 1947 * ..., `inputs[argCount-1]`. 1948 * @return Pointer to created `AbckitInst`. 1949 * @param [ in ] graph - Graph where instruction will be inserted. 1950 * @param [ in ] acc - Inst containing function object. 1951 * @param [ in ] argCount - Number of arguments. 1952 * @param [ in ] ... - Arguments. 1953 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1954 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1955 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1956 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1957 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 1958 * @note Allocates 1959 */ 1960 AbckitInst *(*iCreateWideCallrange)(AbckitGraph *graph, AbckitInst *acc, size_t argCount, ...); 1961 1962 /** 1963 * @brief Creates instruction with opcode SUPERCALLSPREAD. This instruction invokes `acc`'s superclass constructor 1964 * with argument list `input0`. 1965 * @return Pointer to created `AbckitInst`. 1966 * @param [ in ] graph - Graph where instruction will be inserted. 1967 * @param [ in ] acc - Inst containing class object. 1968 * @param [ in ] acc - Inst containing parameter list. 1969 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1970 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1971 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1972 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 1973 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 1974 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1975 * @note Allocates 1976 */ 1977 AbckitInst *(*iCreateSupercallspread)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 1978 1979 /** 1980 * @brief Creates instruction with opcode APPLY. 1981 * Sets the value of this as `input0`, 1982 * invokes the function object stored in `acc` with arguments list `input1`. 1983 * @return Pointer to created `AbckitInst`. 1984 * @param [ in ] graph - Graph where instruction will be inserted. 1985 * @param [ in ] acc - Function object. 1986 * @param [ in ] input0 - This object . 1987 * @param [ in ] input1 - Arguments object. 1988 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 1989 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 1990 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 1991 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *input1 is NULL. 1992 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 1993 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 1994 * @note Allocates 1995 */ 1996 AbckitInst *(*iCreateApply)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 1997 1998 /** 1999 * @brief Creates instruction with opcode CALLTHIS0. 2000 * Sets the value of this as `input0`, invokes the function object stored in `acc`. 2001 * @return Pointer to created `AbckitInst`. 2002 * @param [ in ] graph - Graph where instruction will be inserted. 2003 * @param [ in ] acc - Function object. 2004 * @param [ in ] input0 - This object. 2005 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2006 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2007 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2008 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2009 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2010 * @note Allocates 2011 */ 2012 AbckitInst *(*iCreateCallthis0)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2013 2014 /** 2015 * @brief Creates instruction with opcode CALLTHIS1. 2016 * Sets the value of this as `input0`, 2017 * invokes the function object stored in `acc` with argument `input1`. 2018 * @return Pointer to created `AbckitInst`. 2019 * @param [ in ] graph - Graph where instruction will be inserted. 2020 * @param [ in ] acc - Function object. 2021 * @param [ in ] input0 - This object. 2022 * @param [ in ] input1 - First argument. 2023 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2024 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2025 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2026 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *input1 is NULL. 2027 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2028 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2029 * @note Allocates 2030 */ 2031 AbckitInst *(*iCreateCallthis1)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 2032 2033 /** 2034 * @brief Creates instruction with opcode CALLTHIS2. 2035 * Sets the value of this as `input0`, 2036 * invokes the function object stored in `acc` with arguments `input1`, `input2`. 2037 * @return Pointer to created `AbckitInst`. 2038 * @param [ in ] graph - Graph where instruction will be inserted. 2039 * @param [ in ] acc - Function object. 2040 * @param [ in ] input0 - This object. 2041 * @param [ in ] input1 - First argument. 2042 * @param [ in ] input2 - Second argument. 2043 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2044 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2045 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2046 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *input1 is NULL. 2047 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input2` is NULL. 2048 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2049 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2050 * @note Allocates 2051 */ 2052 AbckitInst *(*iCreateCallthis2)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1, 2053 AbckitInst *input2); 2054 2055 /** 2056 * @brief Creates instruction with opcode CALLTHIS3. 2057 * Sets the value of this as `input0`, 2058 * invokes the function object stored in `acc` with arguments `input1`, `input2`, and `input3`. 2059 * @return Pointer to created `AbckitInst`. 2060 * @param [ in ] graph - Graph where instruction will be inserted. 2061 * @param [ in ] acc - Function object. 2062 * @param [ in ] input0 - This object. 2063 * @param [ in ] input1 - First argument. 2064 * @param [ in ] input2 - Second argument. 2065 * @param [ in ] input3 - Third argument. 2066 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2067 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2068 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2069 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *input1 is NULL. 2070 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input2` is NULL. 2071 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *input3 is NULL. 2072 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2073 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2074 * @note Allocates 2075 */ 2076 AbckitInst *(*iCreateCallthis3)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1, 2077 AbckitInst *input2, AbckitInst *input3); 2078 2079 /** 2080 * @brief Creates instruction with opcode CALLTHISRANGE. 2081 * Sets the value of this as first variadic argument, invokes the function object stored in `acc` with arguments 2082 * `...`. 2083 * @return Pointer to created `AbckitInst`. 2084 * @param [ in ] graph - Graph where instruction will be inserted. 2085 * @param [ in ] acc - Function object. 2086 * @param [ in ] argCount - Number of arguments . 2087 * @param [ in ] ... - Object + arguments. 2088 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2089 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2090 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2091 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2092 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 2093 * @note Allocates 2094 */ 2095 AbckitInst *(*iCreateCallthisrange)(AbckitGraph *graph, AbckitInst *acc, size_t argCount, ...); 2096 2097 /** 2098 * @brief Creates instruction with opcode WIDE_CALLTHISRANGE. 2099 * Sets the value of this as first variadic argument, invokes the function object stored in `acc` with arguments 2100 * `...`. 2101 * @return Pointer to created `AbckitInst`. 2102 * @param [ in ] graph - Graph where instruction will be inserted. 2103 * @param [ in ] acc - Function object. 2104 * @param [ in ] argCount - Number of arguments . 2105 * @param [ in ] ... - Object + arguments. 2106 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2107 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2108 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2109 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2110 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 2111 * @note Allocates 2112 */ 2113 AbckitInst *(*iCreateWideCallthisrange)(AbckitGraph *graph, AbckitInst *acc, size_t argCount, ...); 2114 2115 /** 2116 * @brief Creates instruction with opcode SUPERCALLTHISRANGE. 2117 * Invokes super with arguments ... 2118 * This instruction appears only in non-arrow functions. 2119 * @return Pointer to created `AbckitInst`. 2120 * @param [ in ] graph - Graph where instruction will be inserted. 2121 * @param [ in ] argCount - Number of parameters. 2122 * @param [ in ] ... - Parameters. 2123 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2124 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2125 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2126 * @note Allocates 2127 */ 2128 AbckitInst *(*iCreateSupercallthisrange)(AbckitGraph *graph, size_t argCount, ...); 2129 2130 /** 2131 * @brief Creates instruction with opcode WIDE_SUPERCALLTHISRANGE. 2132 * Invokes super with arguments ... 2133 * This instruction appears only in non-arrow functions. 2134 * @return Pointer to created `AbckitInst`. 2135 * @param [ in ] graph - Graph where instruction will be inserted. 2136 * @param [ in ] argCount - Number of parameters. 2137 * @param [ in ] ... - Parameters. 2138 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2139 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2140 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2141 * @note Allocates 2142 */ 2143 AbckitInst *(*iCreateWideSupercallthisrange)(AbckitGraph *graph, size_t argCount, ...); 2144 2145 /** 2146 * @brief Creates instruction with opcode SUPERCALLARROWRANGE. 2147 * Invokes `acc`'s superclass constructor with arguments `...`. 2148 * This instruction appears only in arrow functions. 2149 * @return Pointer to created `AbckitInst`. 2150 * @param [ in ] graph - Graph where instruction will be inserted. 2151 * @param [ in ] acc - Class object. 2152 * @param [ in ] argCount - Number of parameters. 2153 * @param [ in ] ... - Parameters. 2154 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2155 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2156 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2157 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2158 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 2159 * @note Allocates 2160 */ 2161 AbckitInst *(*iCreateSupercallarrowrange)(AbckitGraph *graph, AbckitInst *acc, size_t argCount, ...); 2162 2163 /** 2164 * @brief Creates instruction with opcode WIDE_SUPERCALLARROWRANGE. 2165 * Invokes `acc`'s superclass constructor with arguments `...`. 2166 * This instruction appears only in arrow functions. 2167 * @return Pointer to created `AbckitInst`. 2168 * @param [ in ] graph - Graph where instruction will be inserted. 2169 * @param [ in ] acc - Class object. 2170 * @param [ in ] argCount - Number of parameters. 2171 * @param [ in ] ... - Parameters. 2172 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2173 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2174 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2175 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2176 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `argCount` type overflow. 2177 * @note Allocates 2178 */ 2179 AbckitInst *(*iCreateWideSupercallarrowrange)(AbckitGraph *graph, AbckitInst *acc, size_t argCount, ...); 2180 2181 /** 2182 * @brief Creates instruction with opcode DEFINEGETTERSETTERBYVALUE. 2183 * Defines accessors for `input0`'s property of the key `input1` with getter method `input2` 2184 * and setter method `input3`. If `input2` (`input3`) is undefined, then getter (setter) will not be set. 2185 * @return Pointer to created `AbckitInst`. 2186 * @param [ in ] graph - Graph where instruction will be inserted. 2187 * @param [ in ] acc - Whether to set a name for the accessor. 2188 * @param [ in ] input0 - Destination object. 2189 * @param [ in ] input1 - Property key value. 2190 * @param [ in ] input2 - Getter function object. 2191 * @param [ in ] input3 - Setter function object. 2192 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2193 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2194 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2195 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 2196 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input2` is NULL. 2197 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input3` is NULL. 2198 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2199 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2200 * @note Allocates 2201 */ 2202 AbckitInst *(*iCreateDefinegettersetterbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, 2203 AbckitInst *input1, AbckitInst *input2, AbckitInst *input3); 2204 2205 /** 2206 * @brief Creates instruction with opcode DEFINEFUNC. Creates a function instance of `function`. 2207 * @return Pointer to created `AbckitInst`. 2208 * @param [ in ] graph - Graph where instruction will be inserted. 2209 * @param [ in ] function - Pointer to AbckitFunction. 2210 * @param [ in ] imm0 - Number of form parameters. 2211 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2212 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitCoreFunction *function is NULL. 2213 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2214 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2215 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2216 * @note Allocates 2217 */ 2218 AbckitInst *(*iCreateDefinefunc)(AbckitGraph *graph, AbckitCoreFunction *function, uint64_t imm0); 2219 2220 /** 2221 * @brief Creates instruction with opcode DEFINEMETHOD. 2222 * Creates a class method instance of `function` for the prototype `acc`. 2223 * @return Pointer to created `AbckitInst`. 2224 * @param [ in ] graph - Graph where instruction will be inserted. 2225 * @param [ in ] acc - Prototype object of the class. 2226 * @param [ in ] function - Method. 2227 * @param [ in ] imm0 - Number of formal parameters. 2228 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2229 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2230 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitCoreFunction *function is NULL. 2231 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2232 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2233 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2234 * @note Allocates 2235 */ 2236 AbckitInst *(*iCreateDefinemethod)(AbckitGraph *graph, AbckitInst *acc, AbckitCoreFunction *function, 2237 uint64_t imm0); 2238 2239 /** 2240 * @brief Creates instruction with opcode DEFINECLASSWITHBUFFER. 2241 * Creates a class object of `function` with literal `literalArray` and superclass `input0`. 2242 * @return Pointer to created `AbckitInst`. 2243 * @param [ in ] graph - Graph where instruction will be inserted. 2244 * @param [ in ] function - Class constructor. 2245 * @param [ in ] literalArray - Literal array. 2246 * @param [ in ] imm0 - parameter count of `function`. 2247 * @param [ in ] input0 - Object containing parent class. 2248 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2249 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitCoreFunction *function is NULL. 2250 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitLiteralArray *literalArray is NULL. 2251 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2252 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2253 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2254 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2255 * @note Allocates 2256 */ 2257 AbckitInst *(*iCreateDefineclasswithbuffer)(AbckitGraph *graph, AbckitCoreFunction *function, 2258 AbckitLiteralArray *literalArray, uint64_t imm0, AbckitInst *input0); 2259 2260 /** 2261 * @brief Creates instruction with opcode RESUMEGENERATOR. Executes `GeneratorResume` for the generator `acc`. 2262 * @return Pointer to created `AbckitInst`. 2263 * @param [ in ] graph - Graph where instruction will be inserted. 2264 * @param [ in ] acc - Generator object. 2265 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2266 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2267 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2268 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2269 * @note Allocates 2270 */ 2271 AbckitInst *(*iCreateResumegenerator)(AbckitGraph *graph, AbckitInst *acc); 2272 2273 /** 2274 * @brief Creates instruction with opcode GETRESUMEMODE. 2275 * Gets the type of completion resumption value for the generator `acc`. 2276 * @return Pointer to created `AbckitInst`. 2277 * @param [ in ] graph - Graph where instruction will be inserted. 2278 * @param [ in ] acc - Generator object. 2279 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2280 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2281 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2282 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2283 * @note Allocates 2284 */ 2285 AbckitInst *(*iCreateGetresumemode)(AbckitGraph *graph, AbckitInst *acc); 2286 2287 /** 2288 * @brief Creates instruction with opcode Gettemplateobject. 2289 * Executes `GetTemplateObject` with argument `acc` of type templateLiteral. 2290 * @return Pointer to created `AbckitInst`. 2291 * @param [ in ] graph - Graph where instruction will be inserted. 2292 * @param [ in ] `acc` - Argument object. 2293 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2294 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2295 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2296 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2297 * @note Allocates 2298 */ 2299 AbckitInst *(*iCreateGettemplateobject)(AbckitGraph *graph, AbckitInst *acc); 2300 2301 /** 2302 * @brief Creates instruction with opcode GETNEXTPROPNAME. 2303 * Executes the `next()` method of the for-in iterator `input0`. 2304 * @return Pointer to created `AbckitInst`. 2305 * @param [ in ] graph - Graph where instruction will be inserted. 2306 * @param [ in ] input0 - Iterator object. 2307 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2308 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2309 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `input0` and `graph` differs. 2310 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2311 * @note Allocates 2312 */ 2313 AbckitInst *(*iCreateGetnextpropname)(AbckitGraph *graph, AbckitInst *input0); 2314 2315 /** 2316 * @brief Creates instruction with opcode DELOBJPROP. Delete the `input0`'s property of the key `acc`. 2317 * @return Pointer to created `AbckitInst`. 2318 * @param [ in ] graph - Graph where instruction will be inserted. 2319 * @param [ in ] acc - Key. 2320 * @param [ in ] input0 - Object to delete property from. 2321 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2322 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2323 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2324 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2325 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2326 * @note Allocates 2327 */ 2328 AbckitInst *(*iCreateDelobjprop)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2329 2330 /** 2331 * @brief Creates instruction with opcode SUSPENDGENERATOR. Suspends the generator `input0` with value `acc`. 2332 * @return Pointer to created `AbckitInst`. 2333 * @param [ in ] graph - Graph where instruction will be inserted. 2334 * @param [ in ] acc - Value. 2335 * @param [ in ] input0 - Generator object. 2336 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2337 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2338 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2339 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2340 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2341 * @note Allocates 2342 */ 2343 AbckitInst *(*iCreateSuspendgenerator)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2344 2345 /** 2346 * @brief Creates instruction with opcode ASYNCFUNCTIONAWAITUNCAUGHT. 2347 * Executes `AwaitExpression` with function object `input0` and value `acc`. 2348 * @return Pointer to created `AbckitInst`. 2349 * @param [ in ] graph - Graph where instruction will be inserted. 2350 * @param [ in ] acc - Value. 2351 * @param [ in ] input0 - Function object. 2352 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2353 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2354 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2355 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2356 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2357 * @note Allocates 2358 */ 2359 AbckitInst *(*iCreateAsyncfunctionawaituncaught)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2360 2361 /** 2362 * @brief Creates instruction with opcode COPYDATAPROPERTIES. Copies the properties of `acc` into `input0`. 2363 * @return Pointer to created `AbckitInst`. 2364 * @param [ in ] graph - Graph where instruction will be inserted. 2365 * @param [ in ] acc - Object to load properties from. 2366 * @param [ in ] input0 - Destintaion object. 2367 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2368 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2369 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2370 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2371 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2372 * @note Allocates 2373 */ 2374 AbckitInst *(*iCreateCopydataproperties)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2375 2376 /** 2377 * @brief Creates instruction with opcode STARRAYSPREAD. 2378 * Stores `acc` in spreading way into `input0`'s elements starting from the index `input1`. 2379 * @return Pointer to created `AbckitInst`. 2380 * @param [ in ] graph - Graph where instruction will be inserted. 2381 * @param [ in ] acc - Object to store. 2382 * @param [ in ] input0 - Destination object. 2383 * @param [ in ] input1 - Index. 2384 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2385 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2386 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2387 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 2388 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2389 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2390 * @note Allocates 2391 */ 2392 AbckitInst *(*iCreateStarrayspread)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 2393 2394 /** 2395 * @brief Creates instruction with opcode SETOBJECTWITHPROTO. Set `acc`'s `__proto__` property as `input0`. 2396 * @return Pointer to created `AbckitInst`. 2397 * @param [ in ] graph - Graph where instruction will be inserted. 2398 * @param [ in ] acc - Destination object. 2399 * @param [ in ] input0 - Object to store. 2400 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2401 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2402 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2403 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2404 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2405 * @note Allocates 2406 */ 2407 AbckitInst *(*iCreateSetobjectwithproto)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2408 2409 /** 2410 * @brief Creates instruction with opcode LDOBJBYVALUE. Loads `input0`'s property of the key `acc`. 2411 * @return Pointer to created `AbckitInst`. 2412 * @param [ in ] graph - Graph where instruction will be inserted. 2413 * @param [ in ] acc - Key. 2414 * @param [ in ] input0 - Object to load from. 2415 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2416 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2417 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2418 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2419 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2420 * @note Allocates 2421 */ 2422 AbckitInst *(*iCreateLdobjbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2423 2424 /** 2425 * @brief Creates instruction with opcode STOBJBYVALUE. Stores `acc` to `input0`'s property of the key `input1`. 2426 * @return Pointer to created `AbckitInst`. 2427 * @param [ in ] graph - Graph where instruction will be inserted. 2428 * @param [ in ] acc - Object to store. 2429 * @param [ in ] input0 - Destonation object. 2430 * @param [ in ] input1 - Key. 2431 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2432 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2433 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2434 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 2435 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2436 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2437 * @note Allocates 2438 */ 2439 AbckitInst *(*iCreateStobjbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 2440 2441 /** 2442 * @brief Creates instruction with opcode STOWNBYVALUE. Stores `acc` to object `input0`'s property of the key 2443 * `input1`. 2444 * @return Pointer to created `AbckitInst`. 2445 * @param [ in ] graph - Graph where instruction will be inserted. 2446 * @param [ in ] acc - Object to store . 2447 * @param [ in ] input0 - Destination object. 2448 * @param [ in ] input1 - Key. 2449 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2450 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2451 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2452 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 2453 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2454 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2455 * @note Allocates 2456 */ 2457 AbckitInst *(*iCreateStownbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 2458 2459 /** 2460 * @brief Creates instruction with opcode LDSUPERBYVALUE. Loads the property of `input0`'s superclass of the key 2461 * acc. 2462 * @return Pointer to created `AbckitInst`. 2463 * @param [ in ] graph - Graph where instruction will be inserted. 2464 * @param [ in ] acc - Key . 2465 * @param [ in ] input0 - Object to load from. 2466 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2467 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2468 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2469 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2470 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2471 * @note Allocates 2472 */ 2473 AbckitInst *(*iCreateLdsuperbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2474 2475 /** 2476 * @brief Creates instruction with opcode STSUPERBYVALUE. 2477 * Stores `acc` to the property of `input0`'s superclass of the key `input1`. 2478 * @return Pointer to created `AbckitInst`. 2479 * @param [ in ] graph - Graph where instruction will be inserted. 2480 * @param [ in ] acc - Object to store. 2481 * @param [ in ] input0 - Destination object. 2482 * @param [ in ] input1 - Key. 2483 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2484 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2485 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2486 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 2487 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2488 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2489 * @note Allocates 2490 */ 2491 AbckitInst *(*iCreateStsuperbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, AbckitInst *input1); 2492 2493 /** 2494 * @brief Creates instruction with opcode LDOBJBYINDEX. Loads `acc`'s property of the key `imm0`. 2495 * @return Pointer to created `AbckitInst`. 2496 * @param [ in ] graph - Graph where instruction will be inserted. 2497 * @param [ in ] acc - Object to load from. 2498 * @param [ in ] imm0 - Index. 2499 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2500 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2501 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2502 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2503 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2504 * @note Allocates 2505 */ 2506 AbckitInst *(*iCreateLdobjbyindex)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0); 2507 2508 /** 2509 * @brief Creates instruction with opcode WIDE_LDOBJBYINDEX. Loads `acc`'s property of the key `imm0`. 2510 * @return Pointer to created `AbckitInst`. 2511 * @param [ in ] graph - Graph where instruction will be inserted. 2512 * @param [ in ] acc - Object to load from. 2513 * @param [ in ] imm0 - Index. 2514 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2515 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2516 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2517 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2518 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2519 * @note Allocates 2520 */ 2521 AbckitInst *(*iCreateWideLdobjbyindex)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0); 2522 2523 /** 2524 * @brief Creates instruction with opcode STOBJBYINDEX. Stores `acc` to `input0`'s property of the key `imm0`. 2525 * @return Pointer to created `AbckitInst`. 2526 * @param [ in ] graph - Graph where instruction will be inserted. 2527 * @param [ in ] acc - Object to store . 2528 * @param [ in ] input0 - Destination object . 2529 * @param [ in ] imm0 - Index. 2530 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2531 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2532 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2533 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2534 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2535 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2536 * @note Allocates 2537 */ 2538 AbckitInst *(*iCreateStobjbyindex)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, uint64_t imm0); 2539 2540 /** 2541 * @brief Creates instruction with opcode WIDE_STOBJBYINDEX. Stores `acc` to `input0`'s property of the key `imm0`. 2542 * @return Pointer to created `AbckitInst`. 2543 * @param [ in ] graph - Graph where instruction will be inserted. 2544 * @param [ in ] acc - Object to store . 2545 * @param [ in ] input0 - Destination object . 2546 * @param [ in ] imm0 - Index. 2547 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2548 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2549 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2550 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2551 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2552 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2553 * @note Allocates 2554 */ 2555 AbckitInst *(*iCreateWideStobjbyindex)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, uint64_t imm0); 2556 2557 /** 2558 * @brief Creates instruction with opcode STOWNBYINDEX. Stores `acc` to object `input0`'s property of the key 2559 * `imm0`. 2560 * @return Pointer to created `AbckitInst`. 2561 * @param [ in ] graph - Graph where instruction will be inserted. 2562 * @param [ in ] acc - Object to store. 2563 * @param [ in ] input0 - Destination object. 2564 * @param [ in ] imm0 - Index. 2565 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2566 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2567 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2568 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2569 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2570 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2571 * @note Allocates 2572 */ 2573 AbckitInst *(*iCreateStownbyindex)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, uint64_t imm0); 2574 2575 /** 2576 * @brief Creates instruction with opcode WIDE_STOWNBYINDEX. Stores `acc` to object `input0`'s property of the key 2577 * `imm0`. 2578 * @return Pointer to created `AbckitInst`. 2579 * @param [ in ] graph - Graph where instruction will be inserted. 2580 * @param [ in ] acc - Object to store. 2581 * @param [ in ] input0 - Destination object. 2582 * @param [ in ] imm0 - Index. 2583 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2584 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2585 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2586 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2587 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2588 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2589 * @note Allocates 2590 */ 2591 AbckitInst *(*iCreateWideStownbyindex)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, uint64_t imm0); 2592 2593 /** 2594 * @brief Creates instruction with opcode Asyncfunctionresolve. Resolves the Promise object of `input0` with value 2595 * `acc`. 2596 * @return Pointer to created `AbckitInst`. 2597 * @param [ in ] graph - Graph where instruction will be inserted. 2598 * @param [ in ] acc - Value. 2599 * @param [ in ] input0 - Promise object. 2600 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2601 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2602 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2603 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2604 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2605 * @note Allocates 2606 */ 2607 AbckitInst *(*iCreateAsyncfunctionresolve)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2608 2609 /** 2610 * @brief Creates instruction with opcode ASYNCFUNCTIONREJECT. Rejects the Promise object of `input0` with value 2611 * `acc`. 2612 * @return Pointer to created `AbckitInst`. 2613 * @param [ in ] graph - Graph where instruction will be inserted. 2614 * @param [ in ] acc - Value. 2615 * @param [ in ] input0 - Promise object. 2616 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2617 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2618 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2619 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2620 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2621 * @note Allocates 2622 */ 2623 AbckitInst *(*iCreateAsyncfunctionreject)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 2624 2625 /** 2626 * @brief Creates instruction with opcode COPYRESTARGS. Copies the rest parameters. 2627 * @return Pointer to created `AbckitInst`. 2628 * @param [ in ] graph - Graph where instruction will be inserted. 2629 * @param [ in ] imm0 - The order in which the remaining parameters in the parameter list start. 2630 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2631 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2632 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2633 * @note Allocates 2634 */ 2635 AbckitInst *(*iCreateCopyrestargs)(AbckitGraph *graph, uint64_t imm0); 2636 2637 /** 2638 * @brief Creates instruction with opcode WIDE_COPYRESTARGS. Copies the rest parameters. 2639 * @return Pointer to created `AbckitInst`. 2640 * @param [ in ] graph - Graph where instruction will be inserted. 2641 * @param [ in ] imm0 - The order in which the remaining parameters in the parameter list start. 2642 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2643 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2644 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 2645 * @note Allocates 2646 */ 2647 AbckitInst *(*iCreateWideCopyrestargs)(AbckitGraph *graph, uint64_t imm0); 2648 2649 /** 2650 * @brief Creates instruction with opcode LDLEXVAR. 2651 * Loads the value at the `imm1`-th slot of the lexical environment beyond level `imm0`. 2652 * @return Pointer to created `AbckitInst`. 2653 * @param [ in ] graph - Graph where instruction will be inserted. 2654 * @param [ in ] imm0 - Lexical environment level. 2655 * @param [ in ] imm1 - Slot number. 2656 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2657 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2658 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 2659 * @note Allocates 2660 */ 2661 AbckitInst *(*iCreateLdlexvar)(AbckitGraph *graph, uint64_t imm0, uint64_t imm1); 2662 2663 /** 2664 * @brief Creates instruction with opcode WIDE_LDLEXVAR. 2665 * Loads the value at the `imm1`-th slot of the lexical environment beyond level `imm0`. 2666 * @return Pointer to created `AbckitInst`. 2667 * @param [ in ] graph - Graph where instruction will be inserted. 2668 * @param [ in ] imm0 - Lexical environment level. 2669 * @param [ in ] imm1 - Slot number. 2670 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2671 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2672 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 2673 * @note Allocates 2674 */ 2675 AbckitInst *(*iCreateWideLdlexvar)(AbckitGraph *graph, uint64_t imm0, uint64_t imm1); 2676 2677 /** 2678 * @brief Creates instruction with opcode STLEXVAR. 2679 * Stores `acc` in the `imm1`-th slot of the lexical environment beyond `imm0` level. 2680 * @return Pointer to created `AbckitInst`. 2681 * @param [ in ] graph - Graph where instruction will be inserted. 2682 * @param [ in ] acc - Object to store. 2683 * @param [ in ] imm0 - Lexical environment level. 2684 * @param [ in ] imm1 - Slot number. 2685 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2686 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2687 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2688 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2689 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 2690 * @note Allocates 2691 */ 2692 AbckitInst *(*iCreateStlexvar)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, uint64_t imm1); 2693 2694 /** 2695 * @brief Creates instruction with opcode WIDE_STLEXVAR. 2696 * Stores `acc` in the `imm1`-th slot of the lexical environment beyond `imm0` level. 2697 * @return Pointer to created `AbckitInst`. 2698 * @param [ in ] graph - Graph where instruction will be inserted. 2699 * @param [ in ] acc - Object to store. 2700 * @param [ in ] imm0 - Lexical environment level. 2701 * @param [ in ] imm1 - Slot number. 2702 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2703 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2704 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2705 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2706 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` or `imm1` type overflow. 2707 * @note Allocates 2708 */ 2709 AbckitInst *(*iCreateWideStlexvar)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0, uint64_t imm1); 2710 2711 /** 2712 * @brief Creates instruction with opcode GETMODULENAMESPACE. Executes GetModuleNamespace for the `md`. 2713 * @return Pointer to created `AbckitInst`. 2714 * @param [ in ] graph - Graph where instruction will be inserted. 2715 * @param [ in ] md - Module descriptor. 2716 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2717 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `md` and `graph` differs. 2718 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2719 * @note Allocates 2720 */ 2721 AbckitInst *(*iCreateGetmodulenamespace)(AbckitGraph *graph, AbckitCoreModule *md); 2722 2723 /** 2724 * @brief Creates instruction with opcode WIDE_GETMODULENAMESPACE. Executes GetModuleNamespace for the `md`. 2725 * @return Pointer to created `AbckitInst`. 2726 * @param [ in ] graph - Graph where instruction will be inserted. 2727 * @param [ in ] md - Module descriptor. 2728 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2729 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `md` and `graph` differs. 2730 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2731 * @note Allocates 2732 */ 2733 AbckitInst *(*iCreateWideGetmodulenamespace)(AbckitGraph *graph, AbckitCoreModule *md); 2734 2735 /** 2736 * @brief Creates instruction with opcode STMODULEVAR. Stores `acc` to the module variable in the `ed`. 2737 * @return Pointer to created `AbckitInst`. 2738 * @param [ in ] graph - Graph where instruction will be inserted. 2739 * @param [ in ] acc - Object to store. 2740 * @param [ in ] ed - Destination export descriptor. 2741 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2742 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2743 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2744 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2745 * @note Allocates 2746 */ 2747 AbckitInst *(*iCreateStmodulevar)(AbckitGraph *graph, AbckitInst *acc, AbckitCoreExportDescriptor *ed); 2748 2749 /** 2750 * @brief Creates instruction with opcode WIDE_STMODULEVAR. Stores `acc` to the module variable in the `ed`. 2751 * @return Pointer to created `AbckitInst`. 2752 * @param [ in ] graph - Graph where instruction will be inserted. 2753 * @param [ in ] acc - Object to store. 2754 * @param [ in ] ed - Destination export descriptor. 2755 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2756 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2757 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2758 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2759 * @note Allocates 2760 */ 2761 AbckitInst *(*iCreateWideStmodulevar)(AbckitGraph *graph, AbckitInst *acc, AbckitCoreExportDescriptor *ed); 2762 2763 /** 2764 * @brief Creates instruction with opcode TRYLDGLOBALBYNAME. Loads the global variable of the name `string`. 2765 * If the global variable `string` does not exist, an exception is thrown. 2766 * @return Pointer to created `AbckitInst`. 2767 * @param [ in ] graph - Graph where instruction will be inserted. 2768 * @param [ in ] string - String containing name of global variable. 2769 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2770 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitString *string is NULL. 2771 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2772 * @note Allocates 2773 */ 2774 AbckitInst *(*iCreateTryldglobalbyname)(AbckitGraph *graph, AbckitString *string); 2775 2776 /** 2777 * @brief Creates instruction with opcode TRYSTGLOBALBYNAME. Stores `acc` to the global variable of the name 2778 * `string`. If the global variable `string` does not exist, an exception is thrown. 2779 * @return Pointer to created `AbckitInst`. 2780 * @param [ in ] graph - Graph where instruction will be inserted. 2781 * @param [ in ] acc - Object to store. 2782 * @param [ in ] string - String containing name of global variable. 2783 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2784 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2785 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2786 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2787 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2788 * @note Allocates 2789 */ 2790 AbckitInst *(*iCreateTrystglobalbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string); 2791 2792 /** 2793 * @brief Creates instruction with opcode LDGLOBALVAR. Loads the global variable of the name `string`. 2794 * This variable must exist. 2795 * @return Pointer to created `AbckitInst`. 2796 * @param [ in ] graph - Graph where instruction will be inserted. 2797 * @param [ in ] string - String containing name of global variable. 2798 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2799 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitString *string is NULL. 2800 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2801 * @note Allocates 2802 */ 2803 AbckitInst *(*iCreateLdglobalvar)(AbckitGraph *graph, AbckitString *string); 2804 2805 /** 2806 * @brief Creates instruction with opcode STGLOBALVAR. Stores `acc` to the global variable of the name `string`. 2807 * This variable must exist. 2808 * @return Pointer to created `AbckitInst`. 2809 * @param [ in ] graph - Graph where instruction will be inserted. 2810 * @param [ in ] acc - Object to store. 2811 * @param [ in ] string - String containing name of global variable. 2812 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2813 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2814 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2815 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2816 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2817 * @note Allocates 2818 */ 2819 AbckitInst *(*iCreateStglobalvar)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string); 2820 2821 /** 2822 * @brief Creates instruction with opcode LDOBJBYNAME. Loads `acc`'s property of the key `string`. 2823 * @return Pointer to created `AbckitInst`. 2824 * @param [ in ] graph - Graph where instruction will be inserted. 2825 * @param [ in ] acc - Object to load property from. 2826 * @param [ in ] string - String containing property key. 2827 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2828 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2829 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2830 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2831 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2832 * @note Allocates 2833 */ 2834 AbckitInst *(*iCreateLdobjbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string); 2835 2836 /** 2837 * @brief Creates instruction with opcode STOBJBYNAME. Stores `acc` to `input0`'s property of the key `string`. 2838 * @return Pointer to created `AbckitInst`. 2839 * @param [ in ] graph - Graph where instruction will be inserted. 2840 * @param [ in ] acc - Object to store. 2841 * @param [ in ] string - String containing property key. 2842 * @param [ in ] input0 - Destination object. 2843 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2844 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2845 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2846 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2847 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2848 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2849 * @note Allocates 2850 */ 2851 AbckitInst *(*iCreateStobjbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string, AbckitInst *input0); 2852 2853 /** 2854 * @brief Creates instruction with opcode STOWNBYNAME. Stores `acc` to `input0`'s property of the key `string`. 2855 * @return Pointer to created `AbckitInst`. 2856 * @param [ in ] graph - Graph where instruction will be inserted. 2857 * @param [ in ] acc - Object to store. 2858 * @param [ in ] string - String containing property key. 2859 * @param [ in ] input0 - Destination object. 2860 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2861 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2862 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2863 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2864 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2865 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2866 * @note Allocates 2867 */ 2868 AbckitInst *(*iCreateStownbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string, AbckitInst *input0); 2869 2870 /** 2871 * @brief Creates instruction with opcode LDSUPERBYNAME. Load the property of `acc`'s superclass of the key 2872 * `string`. 2873 * @return Pointer to created `AbckitInst`. 2874 * @param [ in ] graph - Graph where instruction will be inserted. 2875 * @param [ in ] acc - Object to load property from. 2876 * @param [ in ] string - String containing property key. 2877 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2878 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2879 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2880 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning `acc` and `graph` differs. 2881 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2882 * @note Allocates 2883 */ 2884 AbckitInst *(*iCreateLdsuperbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string); 2885 2886 /** 2887 * @brief Creates instruction with opcode STSUPERBYNAME. 2888 * Stores `acc` to the property of `input0`'s superclass of the key `string`. 2889 * @return Pointer to created `AbckitInst`. 2890 * @param [ in ] graph - Graph where instruction will be inserted. 2891 * @param [ in ] acc - Object to store. 2892 * @param [ in ] string - String containing property key. 2893 * @param [ in ] input0 - Destination object. 2894 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2895 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2896 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2897 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2898 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitGraph` owning one of `AbckitInst` and `graph` differs. 2899 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2900 * @note Allocates 2901 */ 2902 AbckitInst *(*iCreateStsuperbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string, AbckitInst *input0); 2903 2904 /** 2905 * @brief Creates instruction with opcode LDLOCALMODULEVAR. Loads the local module variable. 2906 * @return Pointer to created `AbckitInst`. 2907 * @param [ in ] graph - Graph where instruction will be inserted. 2908 * @param [ in ] ed - Export descriptor to load. 2909 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2910 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `ed` and `graph` differs. 2911 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2912 * @note Allocates 2913 */ 2914 AbckitInst *(*iCreateLdlocalmodulevar)(AbckitGraph *graph, AbckitCoreExportDescriptor *ed); 2915 2916 /** 2917 * @brief Creates instruction with opcode WIDE_LDLOCALMODULEVAR. Loads the local module variable. 2918 * @return Pointer to created `AbckitInst`. 2919 * @param [ in ] graph - Graph where instruction will be inserted. 2920 * @param [ in ] ed - Export descriptor to load. 2921 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2922 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `ed` and `graph` differs. 2923 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2924 * @note Allocates 2925 */ 2926 AbckitInst *(*iCreateWideLdlocalmodulevar)(AbckitGraph *graph, AbckitCoreExportDescriptor *ed); 2927 2928 /** 2929 * @brief Creates instruction with opcode LDEXTERNALMODULEVAR. Loads the external module variable. 2930 * @return Pointer to created `AbckitInst`. 2931 * @param [ in ] graph - Graph where instruction will be inserted. 2932 * @param [ in ] id - Import descriptor to load. 2933 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2934 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `id` and `graph` differs. 2935 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph`'s mode is not DYNAMIC. 2936 * @note Allocates 2937 */ 2938 AbckitInst *(*iCreateLdexternalmodulevar)(AbckitGraph *graph, AbckitCoreImportDescriptor *id); 2939 2940 /** 2941 * @brief Creates instruction with opcode WIDE_LDEXTERNALMODULEVAR. Loads the external module variable. 2942 * @return Pointer to created `AbckitInst`. 2943 * @param [ in ] graph - Graph where instruction will be inserted. 2944 * @param [ in ] id - Import descriptor to load. 2945 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2946 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `id` and `graph` differs. 2947 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 2948 * @note Allocates 2949 */ 2950 AbckitInst *(*iCreateWideLdexternalmodulevar)(AbckitGraph *graph, AbckitCoreImportDescriptor *id); 2951 2952 /** 2953 * @brief Creates instruction with opcode STOWNBYVALUEWITHNAMESET. 2954 * Stores `acc` to object `input0`'s property of the key `input1`. 2955 * @return Pointer to created `AbckitInst`. 2956 * @param [ in ] graph - Graph where instruction will be inserted. 2957 * @param [ in ] acc - Object to store. 2958 * @param [ in ] input0 - Destination object. 2959 * @param [ in ] input1 - Property key. 2960 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2961 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2962 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2963 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input1` is NULL. 2964 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `id` and `graph` differs. 2965 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 2966 * @note Allocates 2967 */ 2968 AbckitInst *(*iCreateStownbyvaluewithnameset)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0, 2969 AbckitInst *input1); 2970 2971 /** 2972 * @brief Creates instruction with opcode STOWNBYNAMEWITHNAMESET. 2973 * Stores `acc` to `input0`'s property of the key `string`. 2974 * @return Pointer to created `AbckitInst`. 2975 * @param [ in ] graph - Graph where instruction will be inserted. 2976 * @param [ in ] acc - Object to store. 2977 * @param [ in ] string - String containing property key. 2978 * @param [ in ] input0 - Destination object. 2979 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2980 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 2981 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2982 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 2983 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if `AbckitFile` owning `id` and `graph` differs. 2984 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 2985 * @note Allocates 2986 */ 2987 AbckitInst *(*iCreateStownbynamewithnameset)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string, 2988 AbckitInst *input0); 2989 2990 /** 2991 * @brief Creates instruction with opcode LDBIGINT. Loads the BigInt instance defined by the `string`. 2992 * @return Pointer to created `AbckitInst`. 2993 * @param [ in ] graph - Graph where instruction will be inserted. 2994 * @param [ in ] string - String containing value. 2995 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 2996 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 2997 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 2998 * @note Allocates 2999 */ 3000 AbckitInst *(*iCreateLdbigint)(AbckitGraph *graph, AbckitString *string); 3001 3002 /** 3003 * @brief Creates instruction with opcode LDTHISBYNAME. Loads this 's property of the key `string`, and stores it in 3004 * `acc`. 3005 * @return Pointer to created `AbckitInst`. 3006 * @param [ in ] graph - Graph where instruction will be inserted. 3007 * @param [ in ] string - String containing the key. 3008 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3009 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 3010 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3011 */ 3012 AbckitInst *(*iCreateLdthisbyname)(AbckitGraph *graph, AbckitString *string); 3013 3014 /** 3015 * @brief Creates instruction with opcode STTHISBYNAME. Stores `acc` to this's property of the key `string`. 3016 * @return Pointer to created `AbckitInst`. 3017 * @param [ in ] graph - Graph where instruction will be inserted. 3018 * @param [ in ] acc - Inst containing attribute key value. 3019 * @param [ in ] string - String containing the key. 3020 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3021 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3022 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `string` is NULL. 3023 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3024 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3025 */ 3026 AbckitInst *(*iCreateStthisbyname)(AbckitGraph *graph, AbckitInst *acc, AbckitString *string); 3027 3028 /** 3029 * @brief Creates instruction with opcode LDTHISBYVALUE. Loads this's property of the key `acc`, and stores it in 3030 * `acc`. 3031 * @return Pointer to created `AbckitInst`. 3032 * @param [ in ] graph - Graph where instruction will be inserted. 3033 * @param [ in ] acc - Inst containing attribute key value. 3034 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3035 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3036 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3037 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3038 */ 3039 AbckitInst *(*iCreateLdthisbyvalue)(AbckitGraph *graph, AbckitInst *acc); 3040 3041 /** 3042 * @brief Creates instruction with opcode STTHISBYVALUE. Stores `acc` to this's property of the key `input0`. 3043 * @return Pointer to created `AbckitInst`. 3044 * @param [ in ] graph - Graph where instruction will be inserted. 3045 * @param [ in ] acc - Inst containing value. 3046 * @param [ in ] input0 - Inst containing attribute key value. 3047 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3048 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3049 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 3050 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3051 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `input0` are differ. 3052 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3053 */ 3054 AbckitInst *(*iCreateStthisbyvalue)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 3055 3056 /** 3057 * @brief Creates instruction with opcode WIDE_LDPATCHVAR. Load` the patch variable in the `imm0`-th slot into 3058 * `acc`. 3059 * @return Pointer to created `AbckitInst`. 3060 * @param [ in ] graph - Graph where instruction will be inserted. 3061 * @param [ in ] imm0 - Long value containing patch variable index. 3062 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3063 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3064 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 3065 */ 3066 AbckitInst *(*iCreateWideLdpatchvar)(AbckitGraph *graph, uint64_t imm0); 3067 3068 /** 3069 * @brief Creates instruction with opcode WIDE_STPATCHVAR. Stores `acc` to the patch variable at the `imm0`-th slot. 3070 * @return Pointer to created `AbckitInst`. 3071 * @param [ in ] graph - Graph where instruction will be inserted. 3072 * @param [ in ] acc - Inst containing value. 3073 * @param [ in ] imm0 - Long value containing patch variable index. 3074 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3075 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3076 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3077 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3078 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 3079 */ 3080 AbckitInst *(*iCreateWideStpatchvar)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0); 3081 3082 /** 3083 * @brief Creates instruction with opcode DYNAMICIMPORT. Executes ImportCall with argument `acc`, and stores the 3084 * result in `acc`. 3085 * @return Pointer to created `AbckitInst`. 3086 * @param [ in ] graph - Graph where instruction will be inserted. 3087 * @param [ in ] acc - Inst containing argument for ImportCall. 3088 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3089 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3090 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3091 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3092 */ 3093 AbckitInst *(*iCreateDynamicimport)(AbckitGraph *graph, AbckitInst *acc); 3094 3095 /** 3096 * @brief Creates instruction with opcode ASYNCGENERATORREJECT. Executes the abstract operation AsyncGeneratorReject 3097 * with generator `input0` and exception `acc`. 3098 * @return Pointer to created `AbckitInst`. 3099 * @param [ in ] graph - Graph where instruction will be inserted. 3100 * @param [ in ] acc - Inst containing exception object. 3101 * @param [ in ] input0 - Inst containing generator object. 3102 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3103 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3104 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input0` is NULL. 3105 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3106 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `input0` are differ. 3107 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3108 */ 3109 AbckitInst *(*iCreateAsyncgeneratorreject)(AbckitGraph *graph, AbckitInst *acc, AbckitInst *input0); 3110 3111 /** 3112 * @brief Creates instruction with opcode SETGENERATORSTATE. Sets the state of acc as B. 3113 * @return Pointer to created `AbckitInst`. 3114 * @param [ in ] graph - Graph where instruction will be inserted. 3115 * @param [ in ] acc - Inst containing generator object. 3116 * @param [ in ] imm0 - Long value that is generator status. 3117 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3118 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3119 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `acc` are differ. 3120 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3121 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if there is `imm0` type overflow. 3122 */ 3123 AbckitInst *(*iCreateSetgeneratorstate)(AbckitGraph *graph, AbckitInst *acc, uint64_t imm0); 3124 3125 /** 3126 * @brief Creates instruction with opcode RETURN. This instruction returns `acc`. 3127 * @return Pointer to created `AbckitInst`. 3128 * @param [ in ] graph - Graph where instruction will be inserted. 3129 * @param [ in ] acc - Instruction to be returned. 3130 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3131 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `acc` is NULL. 3132 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `input` are differ. 3133 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3134 */ 3135 AbckitInst *(*iCreateReturn)(AbckitGraph *graph, AbckitInst *acc); 3136 3137 /** 3138 * @brief Creates instruction with opcode RETURNUNDEFINED. 3139 * @return Pointer to created `AbckitInst`. 3140 * @param [ in ] graph - Graph where instruction will be inserted. 3141 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3142 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3143 */ 3144 AbckitInst *(*iCreateReturnundefined)(AbckitGraph *graph); 3145 3146 /** 3147 * @brief Creates instruction with opcode IF. 3148 * @return Pointer to created `AbckitInst`. 3149 * @param [ in ] graph - Graph where instruction will be inserted. 3150 * @param [ in ] input - Instruction that will be compared to zero. 3151 * @param [ in ] cc - Condition code. 3152 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `graph` is NULL. 3153 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `input` is NULL. 3154 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if `cc` is `ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_NONE` or 3155 * if `cc` is not `ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_EQ` or `ABCKIT_ISA_API_DYNAMIC_CONDITION_CODE_CC_NE`. 3156 * @note Set `ABCKIT_STATUS_WRONG_CTX` error if corresponding `AbckitFile`s owning `graph` and `input` are differ. 3157 * @note Set `ABCKIT_STATUS_WRONG_MODE` error if `graph` is not DYNAMIC. 3158 */ 3159 AbckitInst *(*iCreateIf)(AbckitGraph *graph, AbckitInst *input, enum AbckitIsaApiDynamicConditionCode cc); 3160 }; 3161 3162 /** 3163 * @brief Instantiates API for working with dynamic ISA. 3164 * @return Instance of the `AbckitIsaApiDynamic` struct with valid function pointers. 3165 * @param [ in ] version - Version of the API to instantiate. 3166 * @note Set `ABCKIT_STATUS_UNKNOWN_API_VERSION` error if `version` value is not in the `AbckitApiVersion` enum. 3167 */ 3168 struct AbckitIsaApiDynamic const *AbckitGetIsaApiDynamicImpl(enum AbckitApiVersion version); 3169 3170 #ifdef __cplusplus 3171 } 3172 #endif 3173 3174 #endif // LIBABCKIT_ISA_ISA_DYNAMIC_H 3175