1 /* Copyright JS Foundation and other contributors, http://js.foundation 2 * 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 /* Description of built-in objects 17 in format (ECMA_BUILTIN_ID_id, object_type, prototype_id, is_extensible, is_static, underscored_id) */ 18 19 /* The Object.prototype object (15.2.4) */ 20 BUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 21 ECMA_OBJECT_TYPE_GENERAL, 22 ECMA_BUILTIN_ID__COUNT /* no prototype */, 23 true, 24 object_prototype) 25 26 /* The Object object (15.2.1) */ 27 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_OBJECT, 28 ECMA_OBJECT_TYPE_FUNCTION, 29 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 30 true, 31 object) 32 33 #if ENABLED (JERRY_BUILTIN_ARRAY) 34 /* The Array.prototype object (15.4.4) */ 35 BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE, 36 ECMA_OBJECT_TYPE_ARRAY, 37 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 38 true, 39 array_prototype) 40 41 /* The Array object (15.4.1) */ 42 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAY, 43 ECMA_OBJECT_TYPE_FUNCTION, 44 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 45 true, 46 array) 47 #endif /* ENABLED (JERRY_BUILTIN_ARRAY) */ 48 49 #if ENABLED (JERRY_ES2015) 50 # if ENABLED (JERRY_BUILTIN_STRING) 51 /* The String.prototype object (21.1.3) */ 52 BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE, 53 ECMA_OBJECT_TYPE_GENERAL, 54 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 55 true, 56 string_prototype) 57 # endif /* ENABLED (JERRY_BUILTIN_STRING) */ 58 59 # if ENABLED (JERRY_BUILTIN_BOOLEAN) 60 /* The Boolean.prototype object (19.3.3) */ 61 BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE, 62 ECMA_OBJECT_TYPE_GENERAL, 63 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 64 true, 65 boolean_prototype) 66 # endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */ 67 68 # if ENABLED (JERRY_BUILTIN_NUMBER) 69 /* The Number.prototype object (20.1.3) */ 70 BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE, 71 ECMA_OBJECT_TYPE_GENERAL, 72 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 73 true, 74 number_prototype) 75 # endif /* ENABLED (JERRY_BUILTIN_NUMBER) */ 76 77 # if ENABLED (JERRY_BUILTIN_DATE) 78 /* The Date.prototype object (20.3.4) */ 79 BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE, 80 ECMA_OBJECT_TYPE_GENERAL, 81 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 82 true, 83 date_prototype) 84 # endif /* ENABLED (JERRY_BUILTIN_DATE) */ 85 86 # if ENABLED (JERRY_BUILTIN_REGEXP) 87 /* The RegExp.prototype object (21.2.5) */ 88 BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE, 89 ECMA_OBJECT_TYPE_GENERAL, 90 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 91 true, 92 regexp_prototype) 93 # endif /* ENABLED (JERRY_BUILTIN_REGEXP) */ 94 #else /* !ENABLED (JERRY_ES2015) */ 95 # if ENABLED (JERRY_BUILTIN_STRING) 96 /* The String.prototype object (15.5.4) */ 97 BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE, 98 ECMA_OBJECT_TYPE_CLASS, 99 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 100 true, 101 string_prototype) 102 # endif /* ENABLED (JERRY_BUILTIN_STRING) */ 103 104 # if ENABLED (JERRY_BUILTIN_BOOLEAN) 105 /* The Boolean.prototype object (15.6.4) */ 106 BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE, 107 ECMA_OBJECT_TYPE_CLASS, 108 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 109 true, 110 boolean_prototype) 111 # endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */ 112 113 # if ENABLED (JERRY_BUILTIN_NUMBER) 114 /* The Number.prototype object (15.7.4) */ 115 BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE, 116 ECMA_OBJECT_TYPE_CLASS, 117 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 118 true, 119 number_prototype) 120 # endif /* ENABLED (JERRY_BUILTIN_NUMBER) */ 121 122 # if ENABLED (JERRY_BUILTIN_DATE) 123 /* The Date.prototype object (15.9.4) */ 124 BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE, 125 ECMA_OBJECT_TYPE_CLASS, 126 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 127 true, 128 date_prototype) 129 # endif /* ENABLED (JERRY_BUILTIN_DATE) */ 130 131 # if ENABLED (JERRY_BUILTIN_REGEXP) 132 /* The RegExp.prototype object (15.10.6) */ 133 BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE, 134 ECMA_OBJECT_TYPE_CLASS, 135 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 136 true, 137 regexp_prototype) 138 # endif /* ENABLED (JERRY_BUILTIN_REGEXP) */ 139 #endif /* !ENABLED (JERRY_ES2015) */ 140 141 #if ENABLED (JERRY_BUILTIN_STRING) 142 /* The String object (15.5.1) */ 143 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_STRING, 144 ECMA_OBJECT_TYPE_FUNCTION, 145 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 146 true, 147 string) 148 #endif /* ENABLED (JERRY_BUILTIN_STRING) */ 149 150 #if ENABLED (JERRY_BUILTIN_BOOLEAN) 151 /* The Boolean object (15.6.1) */ 152 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_BOOLEAN, 153 ECMA_OBJECT_TYPE_FUNCTION, 154 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 155 true, 156 boolean) 157 #endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */ 158 159 #if ENABLED (JERRY_BUILTIN_NUMBER) 160 /* The Number object (15.7.1) */ 161 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_NUMBER, 162 ECMA_OBJECT_TYPE_FUNCTION, 163 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 164 true, 165 number) 166 #endif /* ENABLED (JERRY_BUILTIN_NUMBER) */ 167 168 /* The Function.prototype object (15.3.4) */ 169 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 170 ECMA_OBJECT_TYPE_FUNCTION, 171 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 172 true, 173 function_prototype) 174 175 /* The Function object (15.3.1) */ 176 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION, 177 ECMA_OBJECT_TYPE_FUNCTION, 178 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 179 true, 180 function) 181 182 #if ENABLED (JERRY_BUILTIN_MATH) 183 /* The Math object (15.8) */ 184 BUILTIN (ECMA_BUILTIN_ID_MATH, 185 ECMA_OBJECT_TYPE_GENERAL, 186 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 187 true, 188 math) 189 #endif /* ENABLED (JERRY_BUILTIN_MATH) */ 190 191 #if ENABLED (JERRY_ES2015_BUILTIN_REFLECT) 192 193 /* The Reflect object (26.1) */ 194 BUILTIN (ECMA_BUILTIN_ID_REFLECT, 195 ECMA_OBJECT_TYPE_GENERAL, 196 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 197 true, 198 reflect) 199 #endif /* ENABLED (JERRY_ES2015_BUILTIN_REFLECT) */ 200 201 #if ENABLED (JERRY_BUILTIN_JSON) 202 /* The JSON object (15.12) */ 203 BUILTIN (ECMA_BUILTIN_ID_JSON, 204 ECMA_OBJECT_TYPE_GENERAL, 205 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 206 true, 207 json) 208 #endif /* ENABLED (JERRY_BUILTIN_JSON) */ 209 210 #if ENABLED (JERRY_BUILTIN_DATE) 211 /* The Date object (15.9.3) */ 212 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATE, 213 ECMA_OBJECT_TYPE_FUNCTION, 214 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 215 true, 216 date) 217 #endif /* ENABLED (JERRY_BUILTIN_DATE) */ 218 219 #if ENABLED (JERRY_BUILTIN_REGEXP) 220 /* The RegExp object (15.10) */ 221 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REGEXP, 222 ECMA_OBJECT_TYPE_FUNCTION, 223 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 224 true, 225 regexp) 226 #endif /* ENABLED (JERRY_BUILTIN_REGEXP) */ 227 228 #if ENABLED (JERRY_ES2015) 229 #define ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID ECMA_BUILTIN_ID_ERROR 230 #else /* !ENABLED (JERRY_ES2015) */ 231 #define ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE 232 #endif /* ENABLED (JERRY_ES2015 */ 233 234 /* The Error object (15.11.1) */ 235 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ERROR, 236 ECMA_OBJECT_TYPE_FUNCTION, 237 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 238 true, 239 error) 240 241 /* The Error.prototype object (15.11.4) */ 242 BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 243 ECMA_OBJECT_TYPE_GENERAL, 244 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 245 true, 246 error_prototype) 247 248 #if ENABLED (JERRY_BUILTIN_ERRORS) 249 /* The EvalError.prototype object (15.11.6.1) */ 250 BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE, 251 ECMA_OBJECT_TYPE_GENERAL, 252 ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 253 true, 254 eval_error_prototype) 255 256 /* The EvalError object (15.11.6.1) */ 257 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_EVAL_ERROR, 258 ECMA_OBJECT_TYPE_FUNCTION, 259 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID, 260 true, 261 eval_error) 262 263 /* The RangeError.prototype object (15.11.6.2) */ 264 BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE, 265 ECMA_OBJECT_TYPE_GENERAL, 266 ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 267 true, 268 range_error_prototype) 269 270 /* The RangeError object (15.11.6.2) */ 271 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_RANGE_ERROR, 272 ECMA_OBJECT_TYPE_FUNCTION, 273 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID, 274 true, 275 range_error) 276 277 /* The ReferenceError.prototype object (15.11.6.3) */ 278 BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE, 279 ECMA_OBJECT_TYPE_GENERAL, 280 ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 281 true, 282 reference_error_prototype) 283 284 /* The ReferenceError object (15.11.6.3) */ 285 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REFERENCE_ERROR, 286 ECMA_OBJECT_TYPE_FUNCTION, 287 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID, 288 true, 289 reference_error) 290 291 /* The SyntaxError.prototype object (15.11.6.4) */ 292 BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE, 293 ECMA_OBJECT_TYPE_GENERAL, 294 ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 295 true, 296 syntax_error_prototype) 297 298 /* The SyntaxError object (15.11.6.4) */ 299 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYNTAX_ERROR, 300 ECMA_OBJECT_TYPE_FUNCTION, 301 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID, 302 true, 303 syntax_error) 304 305 /* The TypeError.prototype object (15.11.6.5) */ 306 BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE, 307 ECMA_OBJECT_TYPE_GENERAL, 308 ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 309 true, 310 type_error_prototype) 311 312 /* The TypeError object (15.11.6.5) */ 313 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR, 314 ECMA_OBJECT_TYPE_FUNCTION, 315 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID, 316 true, 317 type_error) 318 319 /* The URIError.prototype object (15.11.6.6) */ 320 BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE, 321 ECMA_OBJECT_TYPE_GENERAL, 322 ECMA_BUILTIN_ID_ERROR_PROTOTYPE, 323 true, 324 uri_error_prototype) 325 326 /* The URIError object (15.11.6.6) */ 327 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_URI_ERROR, 328 ECMA_OBJECT_TYPE_FUNCTION, 329 ECMA_BUILTIN_NATIVE_ERROR_PROTOTYPE_ID, 330 true, 331 uri_error) 332 #endif /* ENABLED (JERRY_BUILTIN_ERRORS) */ 333 334 /**< The [[ThrowTypeError]] object (13.2.3) */ 335 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER, 336 ECMA_OBJECT_TYPE_FUNCTION, 337 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 338 false, 339 type_error_thrower) 340 341 #if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) 342 343 /* The ArrayBuffer.prototype object (ES2015 24.1.4) */ 344 BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE, 345 ECMA_OBJECT_TYPE_GENERAL, 346 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 347 true, 348 arraybuffer_prototype) 349 350 /* The ArrayBuffer object (ES2015 24.1.2) */ 351 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAYBUFFER, 352 ECMA_OBJECT_TYPE_FUNCTION, 353 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 354 true, 355 arraybuffer) 356 357 /* The %TypedArrayPrototype% object (ES2015 24.2.3) */ 358 BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 359 ECMA_OBJECT_TYPE_GENERAL, 360 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 361 true, 362 typedarray_prototype) 363 364 /* The %TypedArray% intrinsic object (ES2015 22.2.1) 365 Note: The routines must be in this order. */ 366 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPEDARRAY, 367 ECMA_OBJECT_TYPE_FUNCTION, 368 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 369 true, 370 typedarray) 371 372 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT8ARRAY, 373 ECMA_OBJECT_TYPE_FUNCTION, 374 ECMA_BUILTIN_ID_TYPEDARRAY, 375 true, 376 int8array) 377 378 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8ARRAY, 379 ECMA_OBJECT_TYPE_FUNCTION, 380 ECMA_BUILTIN_ID_TYPEDARRAY, 381 true, 382 uint8array) 383 384 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY, 385 ECMA_OBJECT_TYPE_FUNCTION, 386 ECMA_BUILTIN_ID_TYPEDARRAY, 387 true, 388 uint8clampedarray) 389 390 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT16ARRAY, 391 ECMA_OBJECT_TYPE_FUNCTION, 392 ECMA_BUILTIN_ID_TYPEDARRAY, 393 true, 394 int16array) 395 396 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT16ARRAY, 397 ECMA_OBJECT_TYPE_FUNCTION, 398 ECMA_BUILTIN_ID_TYPEDARRAY, 399 true, 400 uint16array) 401 402 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT32ARRAY, 403 ECMA_OBJECT_TYPE_FUNCTION, 404 ECMA_BUILTIN_ID_TYPEDARRAY, 405 true, 406 int32array) 407 408 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT32ARRAY, 409 ECMA_OBJECT_TYPE_FUNCTION, 410 ECMA_BUILTIN_ID_TYPEDARRAY, 411 true, 412 uint32array) 413 414 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT32ARRAY, 415 ECMA_OBJECT_TYPE_FUNCTION, 416 ECMA_BUILTIN_ID_TYPEDARRAY, 417 true, 418 float32array) 419 420 #if ENABLED (JERRY_NUMBER_TYPE_FLOAT64) 421 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT64ARRAY, 422 ECMA_OBJECT_TYPE_FUNCTION, 423 ECMA_BUILTIN_ID_TYPEDARRAY, 424 true, 425 float64array) 426 #endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */ 427 428 BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE, 429 ECMA_OBJECT_TYPE_GENERAL, 430 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 431 true, 432 int8array_prototype) 433 434 BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE, 435 ECMA_OBJECT_TYPE_GENERAL, 436 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 437 true, 438 uint8array_prototype) 439 440 BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE, 441 ECMA_OBJECT_TYPE_GENERAL, 442 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 443 true, 444 uint8clampedarray_prototype) 445 446 BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE, 447 ECMA_OBJECT_TYPE_GENERAL, 448 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 449 true, 450 int16array_prototype) 451 452 BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE, 453 ECMA_OBJECT_TYPE_GENERAL, 454 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 455 true, 456 uint16array_prototype) 457 458 BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE, 459 ECMA_OBJECT_TYPE_GENERAL, 460 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 461 true, 462 int32array_prototype) 463 464 BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE, 465 ECMA_OBJECT_TYPE_GENERAL, 466 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 467 true, 468 uint32array_prototype) 469 470 BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE, 471 ECMA_OBJECT_TYPE_GENERAL, 472 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 473 true, 474 float32array_prototype) 475 476 #if ENABLED (JERRY_NUMBER_TYPE_FLOAT64) 477 BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE, 478 ECMA_OBJECT_TYPE_GENERAL, 479 ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, 480 true, 481 float64array_prototype) 482 #endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */ 483 #endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */ 484 485 #if ENABLED (JERRY_ES2015_BUILTIN_PROMISE) 486 487 BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE, 488 ECMA_OBJECT_TYPE_GENERAL, 489 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 490 true, 491 promise_prototype) 492 493 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE, 494 ECMA_OBJECT_TYPE_FUNCTION, 495 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 496 true, 497 promise) 498 499 #endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */ 500 501 #if ENABLED (JERRY_ES2015_BUILTIN_MAP) 502 503 /* The Map prototype object (23.1.3) */ 504 BUILTIN (ECMA_BUILTIN_ID_MAP_PROTOTYPE, 505 ECMA_OBJECT_TYPE_GENERAL, 506 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 507 true, 508 map_prototype) 509 510 /* The Map routine (ECMA-262 v6, 23.1.1.1) */ 511 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_MAP, 512 ECMA_OBJECT_TYPE_FUNCTION, 513 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 514 true, 515 map) 516 517 #endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */ 518 519 #if ENABLED (JERRY_ES2015_BUILTIN_SET) 520 521 /* The Set prototype object (23.1.3) */ 522 BUILTIN (ECMA_BUILTIN_ID_SET_PROTOTYPE, 523 ECMA_OBJECT_TYPE_GENERAL, 524 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 525 true, 526 set_prototype) 527 528 /* The Set routine (ECMA-262 v6, 23.1.1.1) */ 529 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SET, 530 ECMA_OBJECT_TYPE_FUNCTION, 531 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 532 true, 533 set) 534 535 #endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */ 536 537 #if ENABLED (JERRY_ES2015_BUILTIN_WEAKMAP) 538 539 /* The WeakMap prototype object (23.1.3) */ 540 BUILTIN (ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE, 541 ECMA_OBJECT_TYPE_GENERAL, 542 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 543 true, 544 weakmap_prototype) 545 546 /* The WeakMap routine (ECMA-262 v6, 23.1.1.1) */ 547 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_WEAKMAP, 548 ECMA_OBJECT_TYPE_FUNCTION, 549 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 550 true, 551 weakmap) 552 553 #endif /* ENABLED (JERRY_ES2015_BUILTIN_WEAKMAP) */ 554 555 #if ENABLED (JERRY_ES2015_BUILTIN_WEAKSET) 556 557 /* The WeakSet prototype object (23.1.3) */ 558 BUILTIN (ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE, 559 ECMA_OBJECT_TYPE_GENERAL, 560 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 561 true, 562 weakset_prototype) 563 564 /* The WeakSet routine (ECMA-262 v6, 23.1.1.1) */ 565 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_WEAKSET, 566 ECMA_OBJECT_TYPE_FUNCTION, 567 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 568 true, 569 weakset) 570 571 #endif /* ENABLED (JERRY_ES2015_BUILTIN_WEAKSET) */ 572 573 #if ENABLED (JERRY_ES2015_BUILTIN_PROXY) 574 /* The Proxy routine (ECMA-262 v6, 26.2.1) */ 575 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROXY, 576 ECMA_OBJECT_TYPE_FUNCTION, 577 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 578 true, 579 proxy) 580 #endif /* ENABLED (JERRY_ES2015_BUILTIN_PROXY) */ 581 582 #if ENABLED (JERRY_ES2015) 583 584 /* Intrinsic hidden builtin object */ 585 BUILTIN (ECMA_BUILTIN_ID_INTRINSIC_OBJECT, 586 ECMA_OBJECT_TYPE_GENERAL, 587 ECMA_BUILTIN_ID__COUNT, 588 true, 589 intrinsic) 590 591 /* The Array.prototype[@@unscopables] object */ 592 BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE_UNSCOPABLES, 593 ECMA_OBJECT_TYPE_GENERAL, 594 ECMA_BUILTIN_ID__COUNT, 595 true, 596 array_prototype_unscopables) 597 598 /* The Symbol prototype object (ECMA-262 v6, 19.4.2.7) */ 599 BUILTIN (ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE, 600 ECMA_OBJECT_TYPE_GENERAL, 601 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 602 true, 603 symbol_prototype) 604 605 /* The Symbol routine (ECMA-262 v6, 19.4.2.1) */ 606 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYMBOL, 607 ECMA_OBJECT_TYPE_FUNCTION, 608 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 609 true, 610 symbol) 611 612 /* The %IteratorPrototype% object (ECMA-262 v6, 25.1.2) */ 613 BUILTIN (ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE, 614 ECMA_OBJECT_TYPE_GENERAL, 615 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 616 true, 617 iterator_prototype) 618 619 /* The %ArrayIteratorPrototype% object (ECMA-262 v6, 22.1.5.2) */ 620 BUILTIN (ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE, 621 ECMA_OBJECT_TYPE_GENERAL, 622 ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE, 623 true, 624 array_iterator_prototype) 625 626 /* The %StringIteratorPrototype% object (ECMA-262 v6, 22.1.5.2) */ 627 BUILTIN (ECMA_BUILTIN_ID_STRING_ITERATOR_PROTOTYPE, 628 ECMA_OBJECT_TYPE_GENERAL, 629 ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE, 630 true, 631 string_iterator_prototype) 632 633 /* The %(GeneratorFunction)% object */ 634 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_GENERATOR_FUNCTION, 635 ECMA_OBJECT_TYPE_FUNCTION, 636 ECMA_BUILTIN_ID_FUNCTION, 637 true, 638 generator_function) 639 640 /* The %(Generator)% object */ 641 BUILTIN (ECMA_BUILTIN_ID_GENERATOR, 642 ECMA_OBJECT_TYPE_GENERAL, 643 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 644 true, 645 generator) 646 647 /* The %(Generator).prototype% object */ 648 BUILTIN (ECMA_BUILTIN_ID_GENERATOR_PROTOTYPE, 649 ECMA_OBJECT_TYPE_GENERAL, 650 ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE, 651 true, 652 generator_prototype) 653 654 #if ENABLED (JERRY_ES2015_BUILTIN_SET) 655 /* The %SetIteratorPrototype% object (ECMA-262 v6, 23.2.5.2) */ 656 BUILTIN (ECMA_BUILTIN_ID_SET_ITERATOR_PROTOTYPE, 657 ECMA_OBJECT_TYPE_GENERAL, 658 ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE, 659 true, 660 set_iterator_prototype) 661 #endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */ 662 663 #if ENABLED (JERRY_ES2015_BUILTIN_MAP) 664 /* The %MapIteratorPrototype% object (ECMA-262 v6, 23.1.5.2) */ 665 BUILTIN (ECMA_BUILTIN_ID_MAP_ITERATOR_PROTOTYPE, 666 ECMA_OBJECT_TYPE_GENERAL, 667 ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE, 668 true, 669 map_iterator_prototype) 670 #endif /* ENABLED (JERRY_ES2015_BUILTIN_SET) */ 671 #endif /* ENABLED (JERRY_ES2015) */ 672 673 #if ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW) 674 /* The DataView prototype object (ECMA-262 v6, 24.2.3.1) */ 675 BUILTIN (ECMA_BUILTIN_ID_DATAVIEW_PROTOTYPE, 676 ECMA_OBJECT_TYPE_GENERAL, 677 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, 678 true, 679 dataview_prototype) 680 681 /* The DataView routine (ECMA-262 v6, 24.2.2.1) */ 682 BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATAVIEW, 683 ECMA_OBJECT_TYPE_FUNCTION, 684 ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, 685 true, 686 dataview) 687 #endif /* ENABLED (JERRY_ES2015_BUILTIN_DATAVIEW */ 688 689 /* The Global object (15.1) */ 690 BUILTIN (ECMA_BUILTIN_ID_GLOBAL, 691 ECMA_OBJECT_TYPE_GENERAL, 692 ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, /* Implementation-dependent */ 693 true, 694 global) 695 696 #undef BUILTIN 697