duktape 2.3.0.0 → 2.6.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fb1c81939c930da5931c156d092800ce1a1d46db
4
- data.tar.gz: fddc0fee4d0b9b047ca9ccab96f80e7e5e511590
2
+ SHA256:
3
+ metadata.gz: 59934a8c5572f90df28d5e202453c1d2132d4aff1b90e331dcf1f8ea4cea882e
4
+ data.tar.gz: 6d5ce1f6d72224c5a4b44203d4cee264497b9505950c41f851986c1f2e6be900
5
5
  SHA512:
6
- metadata.gz: 2235641010578d7a47564799435145360357389e358f6a1611372782629fff551e0c70d998189afda7801479847c098e5d49d0b80bba0ec34ee34d5f9d4bd8b4
7
- data.tar.gz: 80e1165ed988c883fa90f59f2ce7a38d12d66e50f923ac30f94acadb7b473f7d05feb8f192673be1306eb39b069170739f8df97ee021eb8598769f3c5f4901d5
6
+ metadata.gz: 6916fe12e123d766ba876464bf3e99b5fa79786fcbf056af02b1d97d63cfb07dad78bb4da8ec0463d53d6b8d184272fea8ffb753689335fe3c995fe27694119b
7
+ data.tar.gz: afad8ad4d8e4dd205dea1948dec9ee77cac0a40e459a2959c9e859812df9b8749198369596c507b8abf756bbdb49abbfd52585f32736a5e18e88c75980cadce3
@@ -1,5 +1,9 @@
1
1
  # ChangeLog
2
2
 
3
+ ## v2.6.0.0 (2021-01-31)
4
+
5
+ * Upgrade to Duktape v2.6.0
6
+
3
7
  ## v2.3.0.0 (2019-05-15)
4
8
 
5
9
  * Upgrade to Duktape v2.3.0
@@ -1,9 +1,9 @@
1
1
  /*
2
2
  * duk_config.h configuration header generated by genconfig.py.
3
3
  *
4
- * Git commit: 7551eee6615c2633375bff51ceb297bc3bc7c77e
5
- * Git describe: v2.0.1.0-5-g7551eee-dirty
6
- * Git branch: master
4
+ * Git commit: ee81aa9e0076e8049edbfe6aea96702e04f1827d
5
+ * Git describe: v2.0.1.0-13-gee81aa9-dirty
6
+ * Git branch: duktape-2.6
7
7
  *
8
8
  * Supported platforms:
9
9
  * - Mac OSX, iPhone, Darwin
@@ -18,6 +18,7 @@
18
18
  * - QNX
19
19
  * - TI-Nspire
20
20
  * - Emscripten
21
+ * - Android
21
22
  * - Linux
22
23
  * - Solaris
23
24
  * - AIX
@@ -39,6 +40,8 @@
39
40
  * - PowerPC 64-bit
40
41
  * - SPARC 32-bit
41
42
  * - SPARC 64-bit
43
+ * - RISC-V 32-bit
44
+ * - RISC-V 64-bit
42
45
  * - SuperH
43
46
  * - Motorola 68k
44
47
  * - Emscripten
@@ -170,6 +173,10 @@
170
173
  #define DUK_F_BCC
171
174
  #endif
172
175
 
176
+ #if defined(ANDROID) || defined(__ANDROID__)
177
+ #define DUK_F_ANDROID
178
+ #endif
179
+
173
180
  /* Linux */
174
181
  #if defined(__linux) || defined(__linux__) || defined(linux)
175
182
  #define DUK_F_LINUX
@@ -246,9 +253,9 @@
246
253
  #endif
247
254
 
248
255
  /* ARM */
249
- #if defined(__arm__) || defined(__thumb__) || defined(_ARM) || defined(_M_ARM) || defined(__aarch64__)
256
+ #if defined(__arm__) || defined(__thumb__) || defined(_ARM) || defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__)
250
257
  #define DUK_F_ARM
251
- #if defined(__LP64__) || defined(_LP64) || defined(__arm64) || defined(__arm64__) || defined(__aarch64__)
258
+ #if defined(__LP64__) || defined(_LP64) || defined(__arm64) || defined(__arm64__) || defined(_M_ARM64) || defined(__aarch64__)
252
259
  #define DUK_F_ARM64
253
260
  #else
254
261
  #define DUK_F_ARM32
@@ -280,6 +287,22 @@
280
287
  #endif
281
288
  #endif
282
289
 
290
+ /* RISC-V, https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions */
291
+ #if defined(__riscv)
292
+ #define DUK_F_RISCV
293
+ #if defined(__riscv_xlen)
294
+ #if (__riscv_xlen == 32)
295
+ #define DUK_F_RISCV32
296
+ #elif (__riscv_xlen == 64)
297
+ #define DUK_F_RISCV64
298
+ #else
299
+ #error __riscv_xlen has unsupported value (not 32 or 64)
300
+ #endif
301
+ #else
302
+ #error __riscv defined without __riscv_xlen
303
+ #endif
304
+ #endif /* __riscv */
305
+
283
306
  /* SuperH */
284
307
  #if defined(__sh__) || \
285
308
  defined(__sh1__) || defined(__SH1__) || \
@@ -356,10 +379,6 @@
356
379
  #define DUK_F_VBCC
357
380
  #endif
358
381
 
359
- #if defined(ANDROID) || defined(__ANDROID__)
360
- #define DUK_F_ANDROID
361
- #endif
362
-
363
382
  /* Atari Mint */
364
383
  #if defined(__MINT__)
365
384
  #define DUK_F_MINT
@@ -665,6 +684,41 @@
665
684
  #define DUK_USE_DATE_FMT_STRFTIME
666
685
 
667
686
  #define DUK_USE_OS_STRING "emscripten"
687
+ #elif defined(DUK_F_ANDROID)
688
+ /* --- Android --- */
689
+ #if defined(DUK_COMPILING_DUKTAPE)
690
+ #if !defined(_POSIX_C_SOURCE)
691
+ #define _POSIX_C_SOURCE 200809L
692
+ #endif
693
+ #if !defined(_GNU_SOURCE)
694
+ #define _GNU_SOURCE /* e.g. getdate_r */
695
+ #endif
696
+ #if !defined(_XOPEN_SOURCE)
697
+ #define _XOPEN_SOURCE /* e.g. strptime */
698
+ #endif
699
+ #endif /* DUK_COMPILING_DUKTAPE */
700
+
701
+ #include <sys/types.h>
702
+ #if defined(DUK_F_BCC)
703
+ /* no endian.h or stdint.h */
704
+ #else
705
+ #include <endian.h>
706
+ #include <stdint.h>
707
+ #endif /* DUK_F_BCC */
708
+ #include <sys/param.h>
709
+ #include <sys/time.h>
710
+ #include <time.h>
711
+
712
+ #define DUK_USE_DATE_NOW_GETTIMEOFDAY
713
+ #define DUK_USE_DATE_TZO_GMTIME_R
714
+ #define DUK_USE_DATE_PRS_STRPTIME
715
+ #define DUK_USE_DATE_FMT_STRFTIME
716
+
717
+ #if 0 /* XXX: safe condition? */
718
+ #define DUK_USE_GET_MONOTONIC_TIME_CLOCK_GETTIME
719
+ #endif
720
+
721
+ #define DUK_USE_OS_STRING "android"
668
722
  #elif defined(DUK_F_LINUX)
669
723
  /* --- Linux --- */
670
724
  #if defined(DUK_COMPILING_DUKTAPE)
@@ -715,7 +769,7 @@
715
769
  #define DUK_USE_BYTEORDER 3
716
770
  #endif
717
771
  #else /* DUK_F_OLD_SOLARIS */
718
- #include <ast/endian.h>
772
+ #include <sys/param.h>
719
773
  #endif /* DUK_F_OLD_SOLARIS */
720
774
 
721
775
  #include <sys/param.h>
@@ -910,9 +964,7 @@
910
964
  #elif defined(DUK_F_PPC64)
911
965
  /* --- PowerPC 64-bit --- */
912
966
  #define DUK_USE_ARCH_STRING "ppc64"
913
- #if !defined(DUK_USE_BYTEORDER)
914
- #define DUK_USE_BYTEORDER 3
915
- #endif
967
+ /* No forced byteorder (both little and big endian are possible). */
916
968
  #undef DUK_USE_PACKED_TVAL
917
969
  #define DUK_F_PACKED_TVAL_PROVIDED
918
970
  #elif defined(DUK_F_SPARC32)
@@ -927,6 +979,18 @@
927
979
  /* SPARC byte order varies so rely on autodetection. */
928
980
  #undef DUK_USE_PACKED_TVAL
929
981
  #define DUK_F_PACKED_TVAL_PROVIDED
982
+ #elif defined(DUK_F_RISCV32)
983
+ /* --- RISC-V 32-bit --- */
984
+ #define DUK_USE_ARCH_STRING "riscv32"
985
+ #define DUK_USE_BYTEORDER 1
986
+ #define DUK_USE_PACKED_TVAL
987
+ #define DUK_F_PACKED_TVAL_PROVIDED
988
+ #elif defined(DUK_F_RISCV64)
989
+ /* --- RISC-V 64-bit --- */
990
+ #define DUK_USE_ARCH_STRING "riscv64"
991
+ #define DUK_USE_BYTEORDER 1
992
+ #undef DUK_USE_PACKED_TVAL
993
+ #define DUK_F_PACKED_TVAL_PROVIDED
930
994
  #elif defined(DUK_F_SUPERH)
931
995
  /* --- SuperH --- */
932
996
  #define DUK_USE_ARCH_STRING "sh"
@@ -1067,8 +1131,20 @@
1067
1131
  #define DUK_USE_FLEX_ZEROSIZE
1068
1132
  #endif
1069
1133
 
1070
- #undef DUK_USE_GCC_PRAGMAS
1134
+ #define DUK_USE_CLANG_PRAGMAS
1071
1135
  #define DUK_USE_PACK_CLANG_ATTR
1136
+
1137
+ #if defined(__clang__) && defined(__has_builtin)
1138
+ #if __has_builtin(__builtin_bswap64)
1139
+ #define DUK_BSWAP64(x) ((duk_uint64_t) __builtin_bswap64((duk_uint64_t) (x)))
1140
+ #endif
1141
+ #if __has_builtin(__builtin_bswap32)
1142
+ #define DUK_BSWAP32(x) ((duk_uint32_t) __builtin_bswap32((duk_uint32_t) (x)))
1143
+ #endif
1144
+ #if __has_builtin(__builtin_bswap16)
1145
+ #define DUK_BSWAP16(x) ((duk_uint16_t) __builtin_bswap16((duk_uint16_t) (x)))
1146
+ #endif
1147
+ #endif
1072
1148
  #elif defined(DUK_F_GCC)
1073
1149
  /* --- GCC --- */
1074
1150
  #if defined(DUK_F_C99) || defined(DUK_F_CPP11)
@@ -1079,13 +1155,17 @@
1079
1155
  #define DUK_VA_COPY(dest,src) __va_copy(dest,src)
1080
1156
  #endif
1081
1157
 
1082
- #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 20500L)
1083
- /* since gcc-2.5 */
1158
+ #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 20500L) && (DUK_F_GCC_VERSION < 50000L)
1159
+ /* Since gcc-2.5.
1160
+ *
1161
+ * Disabled temporarily in GCC 5+ because of an unresolved noreturn-related
1162
+ * issue: https://github.com/svaarala/duktape/issues/2155.
1163
+ */
1084
1164
  #define DUK_NORETURN(decl) decl __attribute__((noreturn))
1085
1165
  #endif
1086
1166
 
1087
1167
  #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 40500L)
1088
- /* since gcc-4.5 */
1168
+ /* Since gcc-4.5. */
1089
1169
  #define DUK_UNREACHABLE() do { __builtin_unreachable(); } while (0)
1090
1170
  #endif
1091
1171
 
@@ -1191,6 +1271,7 @@
1191
1271
  #define DUK_USE_FLEX_ZEROSIZE
1192
1272
  #endif
1193
1273
 
1274
+ /* Since 4.6 one can '#pragma GCC diagnostic push/pop'. */
1194
1275
  #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 40600)
1195
1276
  #define DUK_USE_GCC_PRAGMAS
1196
1277
  #else
@@ -1198,6 +1279,16 @@
1198
1279
  #endif
1199
1280
 
1200
1281
  #define DUK_USE_PACK_GCC_ATTR
1282
+
1283
+ /* Availability varies based on platform (between GCC 4.4 and 4.8), and there
1284
+ * are apparently some bugs in GCC 4.x. Check for GCC 5.0 before enabling
1285
+ * these to be safe.
1286
+ */
1287
+ #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 50000L)
1288
+ #define DUK_BSWAP64(x) ((duk_uint64_t) __builtin_bswap64((duk_uint64_t) (x)))
1289
+ #define DUK_BSWAP32(x) ((duk_uint32_t) __builtin_bswap32((duk_uint32_t) (x)))
1290
+ #define DUK_BSWAP16(x) ((duk_uint16_t) __builtin_bswap16((duk_uint16_t) (x)))
1291
+ #endif
1201
1292
  #elif defined(DUK_F_MSVC)
1202
1293
  /* --- MSVC --- */
1203
1294
  /* http://msdn.microsoft.com/en-us/library/aa235362(VS.60).aspx */
@@ -2504,7 +2595,7 @@ typedef struct duk_hthread duk_context;
2504
2595
  #define DUK_USE_ALIGN_BY 8
2505
2596
  #endif
2506
2597
 
2507
- /* Compiler specific hackery needed to force struct size to match aligment,
2598
+ /* Compiler specific hackery needed to force struct size to match alignment,
2508
2599
  * see e.g. duk_hbuffer.h.
2509
2600
  *
2510
2601
  * http://stackoverflow.com/questions/11130109/c-struct-size-alignment
@@ -2515,6 +2606,13 @@ typedef struct duk_hthread duk_context;
2515
2606
  #define DUK_USE_PACK_DUMMY_MEMBER
2516
2607
  #endif
2517
2608
 
2609
+ #if !defined(DUK_U64_CONSTANT)
2610
+ #define DUK_U64_CONSTANT(x) x##ULL
2611
+ #endif
2612
+ #if !defined(DUK_I64_CONSTANT)
2613
+ #define DUK_I64_CONSTANT(x) x##LL
2614
+ #endif
2615
+
2518
2616
  #if !defined(DUK_VA_COPY)
2519
2617
  /* We need va_copy() which is defined in C99 / C++11, so an awkward
2520
2618
  * replacement is needed for pre-C99 / pre-C++11 environments. This
@@ -2579,12 +2677,15 @@ typedef struct duk_hthread duk_context;
2579
2677
  #define DUK_WO_NORETURN(stmt) do { stmt } while (0)
2580
2678
  #endif
2581
2679
 
2582
- #if !defined(DUK_UNREACHABLE)
2680
+ #if defined(DUK_UNREACHABLE)
2681
+ #define DUK_WO_UNREACHABLE(stmt) do { } while (0)
2682
+ #else
2583
2683
  /* Don't know how to declare unreachable point, so don't do it; this
2584
2684
  * may cause some spurious compilation warnings (e.g. "variable used
2585
2685
  * uninitialized").
2586
2686
  */
2587
2687
  #define DUK_UNREACHABLE() do { } while (0)
2688
+ #define DUK_WO_UNREACHABLE(stmt) do { stmt } while (0)
2588
2689
  #endif
2589
2690
 
2590
2691
  #if !defined(DUK_LOSE_CONST)
@@ -2665,17 +2766,30 @@ typedef struct duk_hthread duk_context;
2665
2766
  #endif
2666
2767
  #endif
2667
2768
 
2769
+ #if defined(DUK_F_HAVE_64BIT)
2770
+ #if !defined(DUK_BSWAP64)
2771
+ #define DUK_BSWAP64(x) \
2772
+ ((((duk_uint64_t) (x)) >> 56U) | \
2773
+ ((((duk_uint64_t) (x)) >> 40U) & DUK_U64_CONSTANT(0xff00)) | \
2774
+ ((((duk_uint64_t) (x)) >> 24U) & DUK_U64_CONSTANT(0xff0000)) | \
2775
+ ((((duk_uint64_t) (x)) >> 8U) & DUK_U64_CONSTANT(0xff000000)) | \
2776
+ ((((duk_uint64_t) (x)) << 8U) & DUK_U64_CONSTANT(0xff00000000)) | \
2777
+ ((((duk_uint64_t) (x)) << 24U) & DUK_U64_CONSTANT(0xff0000000000)) | \
2778
+ ((((duk_uint64_t) (x)) << 40U) & DUK_U64_CONSTANT(0xff000000000000)) | \
2779
+ (((duk_uint64_t) (x)) << 56U))
2780
+ #endif
2781
+ #endif
2668
2782
  #if !defined(DUK_BSWAP32)
2669
2783
  #define DUK_BSWAP32(x) \
2670
- ((((duk_uint32_t) (x)) >> 24) | \
2671
- ((((duk_uint32_t) (x)) >> 8) & 0xff00UL) | \
2672
- ((((duk_uint32_t) (x)) << 8) & 0xff0000UL) | \
2673
- (((duk_uint32_t) (x)) << 24))
2784
+ ((((duk_uint32_t) (x)) >> 24U) | \
2785
+ ((((duk_uint32_t) (x)) >> 8U) & 0xff00UL) | \
2786
+ ((((duk_uint32_t) (x)) << 8U) & 0xff0000UL) | \
2787
+ (((duk_uint32_t) (x)) << 24U))
2674
2788
  #endif
2675
2789
  #if !defined(DUK_BSWAP16)
2676
2790
  #define DUK_BSWAP16(x) \
2677
- ((duk_uint16_t) (x) >> 8) | \
2678
- ((duk_uint16_t) (x) << 8)
2791
+ ((duk_uint16_t) (x) >> 8U) | \
2792
+ ((duk_uint16_t) (x) << 8U)
2679
2793
  #endif
2680
2794
 
2681
2795
  /* DUK_USE_VARIADIC_MACROS: required from compilers, so no fill-in. */
@@ -2698,13 +2812,6 @@ typedef struct duk_hthread duk_context;
2698
2812
  #undef DUK_USE_GCC_PRAGMAS
2699
2813
  #endif
2700
2814
 
2701
- #if !defined(DUK_U64_CONSTANT)
2702
- #define DUK_U64_CONSTANT(x) x##ULL
2703
- #endif
2704
- #if !defined(DUK_I64_CONSTANT)
2705
- #define DUK_I64_CONSTANT(x) x##LL
2706
- #endif
2707
-
2708
2815
  /* Workaround for GH-323: avoid inlining control when compiling from
2709
2816
  * multiple sources, as it causes compiler portability trouble.
2710
2817
  */
@@ -2807,7 +2914,10 @@ typedef struct duk_hthread duk_context;
2807
2914
  #define DUK_USE_CACHE_ACTIVATION
2808
2915
  #define DUK_USE_CACHE_CATCHER
2809
2916
  #define DUK_USE_CALLSTACK_LIMIT 10000
2810
- #define DUK_USE_COMMONJS_MODULES
2917
+ #define DUK_USE_CBOR_BUILTIN
2918
+ #define DUK_USE_CBOR_DEC_RECLIMIT 1000
2919
+ #define DUK_USE_CBOR_ENC_RECLIMIT 1000
2920
+ #define DUK_USE_CBOR_SUPPORT
2811
2921
  #define DUK_USE_COMPILER_RECLIMIT 2500
2812
2922
  #define DUK_USE_COROUTINE_SUPPORT
2813
2923
  #undef DUK_USE_CPP_EXCEPTIONS
@@ -2871,7 +2981,7 @@ typedef struct duk_hthread duk_context;
2871
2981
  #undef DUK_USE_GC_TORTURE
2872
2982
  #undef DUK_USE_GET_MONOTONIC_TIME
2873
2983
  #undef DUK_USE_GET_RANDOM_DOUBLE
2874
- #undef DUK_USE_GLOBAL_BINDING
2984
+ #define DUK_USE_GLOBAL_BINDING
2875
2985
  #define DUK_USE_GLOBAL_BUILTIN
2876
2986
  #undef DUK_USE_HEAPPTR16
2877
2987
  #undef DUK_USE_HEAPPTR_DEC16
@@ -2879,6 +2989,7 @@ typedef struct duk_hthread duk_context;
2879
2989
  #define DUK_USE_HEX_FASTPATH
2880
2990
  #define DUK_USE_HEX_SUPPORT
2881
2991
  #define DUK_USE_HOBJECT_ARRAY_ABANDON_LIMIT 2
2992
+ #define DUK_USE_HOBJECT_ARRAY_ABANDON_MINSIZE 257
2882
2993
  #define DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT 9
2883
2994
  #define DUK_USE_HOBJECT_ARRAY_MINGROW_ADD 16
2884
2995
  #define DUK_USE_HOBJECT_ARRAY_MINGROW_DIVISOR 8
@@ -2912,6 +3023,7 @@ typedef struct duk_hthread duk_context;
2912
3023
  #define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256
2913
3024
  #define DUK_USE_MATH_BUILTIN
2914
3025
  #define DUK_USE_NATIVE_CALL_RECLIMIT 1000
3026
+ #undef DUK_USE_NATIVE_STACK_CHECK
2915
3027
  #define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT
2916
3028
  #undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY
2917
3029
  #undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY
@@ -2962,12 +3074,11 @@ typedef struct duk_hthread duk_context;
2962
3074
  #define DUK_USE_STRTAB_RESIZE_CHECK_MASK 255
2963
3075
  #define DUK_USE_STRTAB_SHRINK_LIMIT 6
2964
3076
  #undef DUK_USE_STRTAB_TORTURE
2965
- #undef DUK_USE_SYMBOL_BUILTIN
3077
+ #define DUK_USE_SYMBOL_BUILTIN
2966
3078
  #define DUK_USE_TAILCALL
2967
3079
  #define DUK_USE_TARGET_INFO "unknown"
2968
3080
  #define DUK_USE_TRACEBACKS
2969
3081
  #define DUK_USE_TRACEBACK_DEPTH 10
2970
- #define DUK_USE_USER_DECLARE() /* no user declarations */
2971
3082
  #define DUK_USE_VALSTACK_GROW_SHIFT 2
2972
3083
  #define DUK_USE_VALSTACK_LIMIT 1000000L
2973
3084
  #define DUK_USE_VALSTACK_SHRINK_CHECK_SHIFT 2
@@ -1,8 +1,8 @@
1
1
  /*
2
- * Single source autogenerated distributable for Duktape 2.3.0.
2
+ * Single source autogenerated distributable for Duktape 2.6.0.
3
3
  *
4
- * Git commit 7551eee6615c2633375bff51ceb297bc3bc7c77e (v2.0.1.0-5-g7551eee-dirty).
5
- * Git branch master.
4
+ * Git commit ee81aa9e0076e8049edbfe6aea96702e04f1827d (v2.0.1.0-13-gee81aa9-dirty).
5
+ * Git branch duktape-2.6.
6
6
  *
7
7
  * See Duktape AUTHORS.rst and LICENSE.txt for copyright and
8
8
  * licensing information.
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * (http://opensource.org/licenses/MIT)
18
18
  *
19
- * Copyright (c) 2013-2018 by Duktape authors (see AUTHORS.rst)
19
+ * Copyright (c) 2013-2019 by Duktape authors (see AUTHORS.rst)
20
20
  *
21
21
  * Permission is hereby granted, free of charge, to any person obtaining a copy
22
22
  * of this software and associated documentation files (the "Software"), to deal
@@ -95,6 +95,16 @@
95
95
  * * Michal Kasperek (https://github.com/michalkas)
96
96
  * * Andrew Janke (https://github.com/apjanke)
97
97
  * * Steve Fan (https://github.com/stevefan1999)
98
+ * * Edward Betts (https://github.com/edwardbetts)
99
+ * * Ozhan Duz (https://github.com/webfolderio)
100
+ * * Akos Kiss (https://github.com/akosthekiss)
101
+ * * TheBrokenRail (https://github.com/TheBrokenRail)
102
+ * * Jesse Doyle (https://github.com/jessedoyle)
103
+ * * Gero Kuehn (https://github.com/dc6jgk)
104
+ * * James Swift (https://github.com/phraemer)
105
+ * * Luis de Bethencourt (https://github.com/luisbg)
106
+ * * Ian Whyman (https://github.com/v00d00)
107
+ * * Rick Sayre (https://github.com/whorfin)
98
108
  *
99
109
  * Other contributions
100
110
  * ===================
@@ -135,6 +145,8 @@
135
145
  * * Neil Kolban (https://github.com/nkolban)
136
146
  * * Wilhelm Wanecek (https://github.com/wanecek)
137
147
  * * Andrew Janke (https://github.com/apjanke)
148
+ * * Unamer (https://github.com/unamer)
149
+ * * Karl Dahlke (eklhad@gmail.com)
138
150
  *
139
151
  * If you are accidentally missing from this list, send me an e-mail
140
152
  * (``sami.vaarala@iki.fi``) and I'll fix the omission.
@@ -176,13 +188,6 @@
176
188
  #define DUK_COMPILING_DUKTAPE
177
189
  #include "duktape.h"
178
190
 
179
- /*
180
- * User declarations, e.g. prototypes for user functions used by Duktape
181
- * macros.
182
- */
183
-
184
- DUK_USE_USER_DECLARE()
185
-
186
191
  /*
187
192
  * Duktape includes (other than duk_features.h)
188
193
  *
@@ -221,13 +226,14 @@ DUK_USE_USER_DECLARE()
221
226
  *
222
227
  * A B C D E F G H Big endian (e.g. 68k) DUK_USE_DOUBLE_BE
223
228
  * H G F E D C B A Little endian (e.g. x86) DUK_USE_DOUBLE_LE
224
- * D C B A H G F E Mixed/cross endian (e.g. ARM) DUK_USE_DOUBLE_ME
229
+ * D C B A H G F E Mixed endian (e.g. ARM FPA) DUK_USE_DOUBLE_ME
225
230
  *
226
- * ARM is a special case: ARM double values are in mixed/cross endian
227
- * format while ARM duk_uint64_t values are in standard little endian
231
+ * Legacy ARM (FPA) is a special case: ARM double values are in mixed
232
+ * endian format while ARM duk_uint64_t values are in standard little endian
228
233
  * format (H G F E D C B A). When a double is read as a duk_uint64_t
229
234
  * from memory, the register will contain the (logical) value
230
235
  * E F G H A B C D. This requires some special handling below.
236
+ * See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0056d/Bcfhgcgd.html.
231
237
  *
232
238
  * Indexes of various types (8-bit, 16-bit, 32-bit) in memory relative to
233
239
  * the logical (big endian) order:
@@ -516,7 +522,8 @@ typedef union duk_double_union duk_double_union;
516
522
  } while (0)
517
523
 
518
524
  #define DUK__DBLUNION_NORMALIZE_NAN_CHECK_NOTFULL(u) do { \
519
- if (DUK__DBLUNION_IS_NAN_NOTFULL((u))) { \
525
+ /* Check must be full. */ \
526
+ if (DUK__DBLUNION_IS_NAN_FULL((u))) { \
520
527
  DUK__DBLUNION_SET_NAN_NOTFULL((u)); \
521
528
  } \
522
529
  } while (0)
@@ -528,12 +535,11 @@ typedef union duk_double_union duk_double_union;
528
535
  */
529
536
 
530
537
  #if defined(DUK_USE_PACKED_TVAL)
531
- #if defined(DUK_USE_FULL_TVAL)
532
538
  #define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) DUK__DBLUNION_NORMALIZE_NAN_CHECK_FULL((u))
533
539
  #define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u))
534
540
  #define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NORMALIZED_NAN_FULL((u))
535
541
  #define DUK_DBLUNION_SET_NAN(d) DUK__DBLUNION_SET_NAN_FULL((d))
536
- #else
542
+ #if 0
537
543
  #define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) DUK__DBLUNION_NORMALIZE_NAN_CHECK_NOTFULL((u))
538
544
  #define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_NOTFULL((u))
539
545
  #define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NORMALIZED_NAN_NOTFULL((u))
@@ -616,6 +622,46 @@ typedef union duk_double_union duk_double_union;
616
622
  #endif
617
623
 
618
624
  #endif /* DUK_DBLUNION_H_INCLUDED */
625
+ /* #include duk_fltunion.h */
626
+ /*
627
+ * Union to access IEEE float memory representation.
628
+ */
629
+
630
+ #if !defined(DUK_FLTUNION_H_INCLUDED)
631
+ #define DUK_FLTUNION_H_INCLUDED
632
+
633
+ /* #include duk_internal.h -> already included */
634
+
635
+ union duk_float_union {
636
+ float f;
637
+ duk_uint32_t ui[1];
638
+ duk_uint16_t us[2];
639
+ duk_uint8_t uc[4];
640
+ };
641
+
642
+ typedef union duk_float_union duk_float_union;
643
+
644
+ #if defined(DUK_USE_DOUBLE_LE) || defined(DUK_USE_DOUBLE_ME)
645
+ #define DUK_FLT_IDX_UI0 0
646
+ #define DUK_FLT_IDX_US0 1
647
+ #define DUK_FLT_IDX_US1 0
648
+ #define DUK_FLT_IDX_UC0 3
649
+ #define DUK_FLT_IDX_UC1 2
650
+ #define DUK_FLT_IDX_UC2 1
651
+ #define DUK_FLT_IDX_UC3 0
652
+ #elif defined(DUK_USE_DOUBLE_BE)
653
+ #define DUK_FLT_IDX_UI0 0
654
+ #define DUK_FLT_IDX_US0 0
655
+ #define DUK_FLT_IDX_US1 1
656
+ #define DUK_FLT_IDX_UC0 0
657
+ #define DUK_FLT_IDX_UC1 1
658
+ #define DUK_FLT_IDX_UC2 2
659
+ #define DUK_FLT_IDX_UC3 3
660
+ #else
661
+ #error internal error
662
+ #endif
663
+
664
+ #endif /* DUK_FLTUNION_H_INCLUDED */
619
665
  /* #include duk_replacements.h */
620
666
  #if !defined(DUK_REPLACEMENTS_H_INCLUDED)
621
667
  #define DUK_REPLACEMENTS_H_INCLUDED
@@ -1469,6 +1515,13 @@ DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_fast(duk_tval *tv, duk_double
1469
1515
  DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_slow(duk_tval *tv, duk_double_t x);
1470
1516
  #endif
1471
1517
 
1518
+ #if defined(DUK_USE_ASSERTIONS)
1519
+ DUK_INTERNAL_DECL void duk_tval_assert_valid(duk_tval *tv);
1520
+ #define DUK_TVAL_ASSERT_VALID(tv) do { duk_tval_assert_valid((tv)); } while (0)
1521
+ #else
1522
+ #define DUK_TVAL_ASSERT_VALID(tv) do {} while (0)
1523
+ #endif
1524
+
1472
1525
  #endif /* DUK_TVAL_H_INCLUDED */
1473
1526
  /* #include duk_builtins.h */
1474
1527
  /*
@@ -1499,9 +1552,9 @@ DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_slow(duk_tval *tv, duk_double
1499
1552
  #define DUK_STRIDX_UC_FUNCTION 5 /* 'Function' */
1500
1553
  #define DUK_HEAP_STRING_UC_FUNCTION(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_FUNCTION)
1501
1554
  #define DUK_HTHREAD_STRING_UC_FUNCTION(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_FUNCTION)
1502
- #define DUK_STRIDX_ARRAY 6 /* 'Array' */
1503
- #define DUK_HEAP_STRING_ARRAY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ARRAY)
1504
- #define DUK_HTHREAD_STRING_ARRAY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ARRAY)
1555
+ #define DUK_STRIDX_UC_ARRAY 6 /* 'Array' */
1556
+ #define DUK_HEAP_STRING_UC_ARRAY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_ARRAY)
1557
+ #define DUK_HTHREAD_STRING_UC_ARRAY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_ARRAY)
1505
1558
  #define DUK_STRIDX_UC_STRING 7 /* 'String' */
1506
1559
  #define DUK_HEAP_STRING_UC_STRING(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_STRING)
1507
1560
  #define DUK_HTHREAD_STRING_UC_STRING(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_STRING)
@@ -1511,9 +1564,9 @@ DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_slow(duk_tval *tv, duk_double
1511
1564
  #define DUK_STRIDX_UC_NUMBER 9 /* 'Number' */
1512
1565
  #define DUK_HEAP_STRING_UC_NUMBER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_NUMBER)
1513
1566
  #define DUK_HTHREAD_STRING_UC_NUMBER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_NUMBER)
1514
- #define DUK_STRIDX_DATE 10 /* 'Date' */
1515
- #define DUK_HEAP_STRING_DATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DATE)
1516
- #define DUK_HTHREAD_STRING_DATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DATE)
1567
+ #define DUK_STRIDX_UC_DATE 10 /* 'Date' */
1568
+ #define DUK_HEAP_STRING_UC_DATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_DATE)
1569
+ #define DUK_HTHREAD_STRING_UC_DATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_DATE)
1517
1570
  #define DUK_STRIDX_REG_EXP 11 /* 'RegExp' */
1518
1571
  #define DUK_HEAP_STRING_REG_EXP(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_REG_EXP)
1519
1572
  #define DUK_HTHREAD_STRING_REG_EXP(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_REG_EXP)
@@ -1739,260 +1792,263 @@ DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_slow(duk_tval *tv, duk_double
1739
1792
  #define DUK_STRIDX_DATA 85 /* 'data' */
1740
1793
  #define DUK_HEAP_STRING_DATA(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DATA)
1741
1794
  #define DUK_HTHREAD_STRING_DATA(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DATA)
1742
- #define DUK_STRIDX_LENGTH 86 /* 'length' */
1795
+ #define DUK_STRIDX_LC_BUFFER 86 /* 'buffer' */
1796
+ #define DUK_HEAP_STRING_LC_BUFFER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_BUFFER)
1797
+ #define DUK_HTHREAD_STRING_LC_BUFFER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_BUFFER)
1798
+ #define DUK_STRIDX_LENGTH 87 /* 'length' */
1743
1799
  #define DUK_HEAP_STRING_LENGTH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LENGTH)
1744
1800
  #define DUK_HTHREAD_STRING_LENGTH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LENGTH)
1745
- #define DUK_STRIDX_SET 87 /* 'set' */
1801
+ #define DUK_STRIDX_SET 88 /* 'set' */
1746
1802
  #define DUK_HEAP_STRING_SET(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SET)
1747
1803
  #define DUK_HTHREAD_STRING_SET(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SET)
1748
- #define DUK_STRIDX_STACK 88 /* 'stack' */
1804
+ #define DUK_STRIDX_STACK 89 /* 'stack' */
1749
1805
  #define DUK_HEAP_STRING_STACK(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_STACK)
1750
1806
  #define DUK_HTHREAD_STRING_STACK(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_STACK)
1751
- #define DUK_STRIDX_PC 89 /* 'pc' */
1807
+ #define DUK_STRIDX_PC 90 /* 'pc' */
1752
1808
  #define DUK_HEAP_STRING_PC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PC)
1753
1809
  #define DUK_HTHREAD_STRING_PC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PC)
1754
- #define DUK_STRIDX_LINE_NUMBER 90 /* 'lineNumber' */
1810
+ #define DUK_STRIDX_LINE_NUMBER 91 /* 'lineNumber' */
1755
1811
  #define DUK_HEAP_STRING_LINE_NUMBER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LINE_NUMBER)
1756
1812
  #define DUK_HTHREAD_STRING_LINE_NUMBER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LINE_NUMBER)
1757
- #define DUK_STRIDX_INT_TRACEDATA 91 /* '\x82Tracedata' */
1813
+ #define DUK_STRIDX_INT_TRACEDATA 92 /* '\x82Tracedata' */
1758
1814
  #define DUK_HEAP_STRING_INT_TRACEDATA(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_TRACEDATA)
1759
1815
  #define DUK_HTHREAD_STRING_INT_TRACEDATA(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_TRACEDATA)
1760
- #define DUK_STRIDX_NAME 92 /* 'name' */
1816
+ #define DUK_STRIDX_NAME 93 /* 'name' */
1761
1817
  #define DUK_HEAP_STRING_NAME(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_NAME)
1762
1818
  #define DUK_HTHREAD_STRING_NAME(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_NAME)
1763
- #define DUK_STRIDX_FILE_NAME 93 /* 'fileName' */
1819
+ #define DUK_STRIDX_FILE_NAME 94 /* 'fileName' */
1764
1820
  #define DUK_HEAP_STRING_FILE_NAME(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FILE_NAME)
1765
1821
  #define DUK_HTHREAD_STRING_FILE_NAME(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FILE_NAME)
1766
- #define DUK_STRIDX_LC_POINTER 94 /* 'pointer' */
1822
+ #define DUK_STRIDX_LC_POINTER 95 /* 'pointer' */
1767
1823
  #define DUK_HEAP_STRING_LC_POINTER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_POINTER)
1768
1824
  #define DUK_HTHREAD_STRING_LC_POINTER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_POINTER)
1769
- #define DUK_STRIDX_INT_TARGET 95 /* '\x82Target' */
1825
+ #define DUK_STRIDX_INT_TARGET 96 /* '\x82Target' */
1770
1826
  #define DUK_HEAP_STRING_INT_TARGET(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_TARGET)
1771
1827
  #define DUK_HTHREAD_STRING_INT_TARGET(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_TARGET)
1772
- #define DUK_STRIDX_INT_NEXT 96 /* '\x82Next' */
1828
+ #define DUK_STRIDX_INT_NEXT 97 /* '\x82Next' */
1773
1829
  #define DUK_HEAP_STRING_INT_NEXT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_NEXT)
1774
1830
  #define DUK_HTHREAD_STRING_INT_NEXT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_NEXT)
1775
- #define DUK_STRIDX_INT_BYTECODE 97 /* '\x82Bytecode' */
1831
+ #define DUK_STRIDX_INT_BYTECODE 98 /* '\x82Bytecode' */
1776
1832
  #define DUK_HEAP_STRING_INT_BYTECODE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_BYTECODE)
1777
1833
  #define DUK_HTHREAD_STRING_INT_BYTECODE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_BYTECODE)
1778
- #define DUK_STRIDX_INT_FORMALS 98 /* '\x82Formals' */
1834
+ #define DUK_STRIDX_INT_FORMALS 99 /* '\x82Formals' */
1779
1835
  #define DUK_HEAP_STRING_INT_FORMALS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_FORMALS)
1780
1836
  #define DUK_HTHREAD_STRING_INT_FORMALS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_FORMALS)
1781
- #define DUK_STRIDX_INT_VARMAP 99 /* '\x82Varmap' */
1837
+ #define DUK_STRIDX_INT_VARMAP 100 /* '\x82Varmap' */
1782
1838
  #define DUK_HEAP_STRING_INT_VARMAP(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VARMAP)
1783
1839
  #define DUK_HTHREAD_STRING_INT_VARMAP(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VARMAP)
1784
- #define DUK_STRIDX_INT_SOURCE 100 /* '\x82Source' */
1840
+ #define DUK_STRIDX_INT_SOURCE 101 /* '\x82Source' */
1785
1841
  #define DUK_HEAP_STRING_INT_SOURCE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_SOURCE)
1786
1842
  #define DUK_HTHREAD_STRING_INT_SOURCE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_SOURCE)
1787
- #define DUK_STRIDX_INT_PC2LINE 101 /* '\x82Pc2line' */
1843
+ #define DUK_STRIDX_INT_PC2LINE 102 /* '\x82Pc2line' */
1788
1844
  #define DUK_HEAP_STRING_INT_PC2LINE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_PC2LINE)
1789
1845
  #define DUK_HTHREAD_STRING_INT_PC2LINE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_PC2LINE)
1790
- #define DUK_STRIDX_INT_MAP 102 /* '\x82Map' */
1846
+ #define DUK_STRIDX_INT_MAP 103 /* '\x82Map' */
1791
1847
  #define DUK_HEAP_STRING_INT_MAP(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_MAP)
1792
1848
  #define DUK_HTHREAD_STRING_INT_MAP(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_MAP)
1793
- #define DUK_STRIDX_INT_VARENV 103 /* '\x82Varenv' */
1849
+ #define DUK_STRIDX_INT_VARENV 104 /* '\x82Varenv' */
1794
1850
  #define DUK_HEAP_STRING_INT_VARENV(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VARENV)
1795
1851
  #define DUK_HTHREAD_STRING_INT_VARENV(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VARENV)
1796
- #define DUK_STRIDX_INT_FINALIZER 104 /* '\x82Finalizer' */
1852
+ #define DUK_STRIDX_INT_FINALIZER 105 /* '\x82Finalizer' */
1797
1853
  #define DUK_HEAP_STRING_INT_FINALIZER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_FINALIZER)
1798
1854
  #define DUK_HTHREAD_STRING_INT_FINALIZER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_FINALIZER)
1799
- #define DUK_STRIDX_INT_VALUE 105 /* '\x82Value' */
1855
+ #define DUK_STRIDX_INT_VALUE 106 /* '\x82Value' */
1800
1856
  #define DUK_HEAP_STRING_INT_VALUE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VALUE)
1801
1857
  #define DUK_HTHREAD_STRING_INT_VALUE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VALUE)
1802
- #define DUK_STRIDX_COMPILE 106 /* 'compile' */
1858
+ #define DUK_STRIDX_COMPILE 107 /* 'compile' */
1803
1859
  #define DUK_HEAP_STRING_COMPILE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_COMPILE)
1804
1860
  #define DUK_HTHREAD_STRING_COMPILE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_COMPILE)
1805
- #define DUK_STRIDX_INPUT 107 /* 'input' */
1861
+ #define DUK_STRIDX_INPUT 108 /* 'input' */
1806
1862
  #define DUK_HEAP_STRING_INPUT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INPUT)
1807
1863
  #define DUK_HTHREAD_STRING_INPUT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INPUT)
1808
- #define DUK_STRIDX_ERR_CREATE 108 /* 'errCreate' */
1864
+ #define DUK_STRIDX_ERR_CREATE 109 /* 'errCreate' */
1809
1865
  #define DUK_HEAP_STRING_ERR_CREATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ERR_CREATE)
1810
1866
  #define DUK_HTHREAD_STRING_ERR_CREATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ERR_CREATE)
1811
- #define DUK_STRIDX_ERR_THROW 109 /* 'errThrow' */
1867
+ #define DUK_STRIDX_ERR_THROW 110 /* 'errThrow' */
1812
1868
  #define DUK_HEAP_STRING_ERR_THROW(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ERR_THROW)
1813
1869
  #define DUK_HTHREAD_STRING_ERR_THROW(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ERR_THROW)
1814
- #define DUK_STRIDX_ENV 110 /* 'env' */
1870
+ #define DUK_STRIDX_ENV 111 /* 'env' */
1815
1871
  #define DUK_HEAP_STRING_ENV(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ENV)
1816
1872
  #define DUK_HTHREAD_STRING_ENV(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ENV)
1817
- #define DUK_STRIDX_HEX 111 /* 'hex' */
1873
+ #define DUK_STRIDX_HEX 112 /* 'hex' */
1818
1874
  #define DUK_HEAP_STRING_HEX(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_HEX)
1819
1875
  #define DUK_HTHREAD_STRING_HEX(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_HEX)
1820
- #define DUK_STRIDX_BASE64 112 /* 'base64' */
1876
+ #define DUK_STRIDX_BASE64 113 /* 'base64' */
1821
1877
  #define DUK_HEAP_STRING_BASE64(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_BASE64)
1822
1878
  #define DUK_HTHREAD_STRING_BASE64(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_BASE64)
1823
- #define DUK_STRIDX_JX 113 /* 'jx' */
1879
+ #define DUK_STRIDX_JX 114 /* 'jx' */
1824
1880
  #define DUK_HEAP_STRING_JX(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JX)
1825
1881
  #define DUK_HTHREAD_STRING_JX(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JX)
1826
- #define DUK_STRIDX_JC 114 /* 'jc' */
1882
+ #define DUK_STRIDX_JC 115 /* 'jc' */
1827
1883
  #define DUK_HEAP_STRING_JC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JC)
1828
1884
  #define DUK_HTHREAD_STRING_JC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JC)
1829
- #define DUK_STRIDX_JSON_EXT_UNDEFINED 115 /* '{"_undef":true}' */
1885
+ #define DUK_STRIDX_JSON_EXT_UNDEFINED 116 /* '{"_undef":true}' */
1830
1886
  #define DUK_HEAP_STRING_JSON_EXT_UNDEFINED(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_UNDEFINED)
1831
1887
  #define DUK_HTHREAD_STRING_JSON_EXT_UNDEFINED(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_UNDEFINED)
1832
- #define DUK_STRIDX_JSON_EXT_NAN 116 /* '{"_nan":true}' */
1888
+ #define DUK_STRIDX_JSON_EXT_NAN 117 /* '{"_nan":true}' */
1833
1889
  #define DUK_HEAP_STRING_JSON_EXT_NAN(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_NAN)
1834
1890
  #define DUK_HTHREAD_STRING_JSON_EXT_NAN(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_NAN)
1835
- #define DUK_STRIDX_JSON_EXT_POSINF 117 /* '{"_inf":true}' */
1891
+ #define DUK_STRIDX_JSON_EXT_POSINF 118 /* '{"_inf":true}' */
1836
1892
  #define DUK_HEAP_STRING_JSON_EXT_POSINF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_POSINF)
1837
1893
  #define DUK_HTHREAD_STRING_JSON_EXT_POSINF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_POSINF)
1838
- #define DUK_STRIDX_JSON_EXT_NEGINF 118 /* '{"_ninf":true}' */
1894
+ #define DUK_STRIDX_JSON_EXT_NEGINF 119 /* '{"_ninf":true}' */
1839
1895
  #define DUK_HEAP_STRING_JSON_EXT_NEGINF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_NEGINF)
1840
1896
  #define DUK_HTHREAD_STRING_JSON_EXT_NEGINF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_NEGINF)
1841
- #define DUK_STRIDX_JSON_EXT_FUNCTION1 119 /* '{"_func":true}' */
1897
+ #define DUK_STRIDX_JSON_EXT_FUNCTION1 120 /* '{"_func":true}' */
1842
1898
  #define DUK_HEAP_STRING_JSON_EXT_FUNCTION1(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_FUNCTION1)
1843
1899
  #define DUK_HTHREAD_STRING_JSON_EXT_FUNCTION1(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_FUNCTION1)
1844
- #define DUK_STRIDX_JSON_EXT_FUNCTION2 120 /* '{_func:true}' */
1900
+ #define DUK_STRIDX_JSON_EXT_FUNCTION2 121 /* '{_func:true}' */
1845
1901
  #define DUK_HEAP_STRING_JSON_EXT_FUNCTION2(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_FUNCTION2)
1846
1902
  #define DUK_HTHREAD_STRING_JSON_EXT_FUNCTION2(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_FUNCTION2)
1847
- #define DUK_STRIDX_BREAK 121 /* 'break' */
1903
+ #define DUK_STRIDX_BREAK 122 /* 'break' */
1848
1904
  #define DUK_HEAP_STRING_BREAK(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_BREAK)
1849
1905
  #define DUK_HTHREAD_STRING_BREAK(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_BREAK)
1850
- #define DUK_STRIDX_CASE 122 /* 'case' */
1906
+ #define DUK_STRIDX_CASE 123 /* 'case' */
1851
1907
  #define DUK_HEAP_STRING_CASE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CASE)
1852
1908
  #define DUK_HTHREAD_STRING_CASE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CASE)
1853
- #define DUK_STRIDX_CATCH 123 /* 'catch' */
1909
+ #define DUK_STRIDX_CATCH 124 /* 'catch' */
1854
1910
  #define DUK_HEAP_STRING_CATCH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CATCH)
1855
1911
  #define DUK_HTHREAD_STRING_CATCH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CATCH)
1856
- #define DUK_STRIDX_CONTINUE 124 /* 'continue' */
1912
+ #define DUK_STRIDX_CONTINUE 125 /* 'continue' */
1857
1913
  #define DUK_HEAP_STRING_CONTINUE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CONTINUE)
1858
1914
  #define DUK_HTHREAD_STRING_CONTINUE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CONTINUE)
1859
- #define DUK_STRIDX_DEBUGGER 125 /* 'debugger' */
1915
+ #define DUK_STRIDX_DEBUGGER 126 /* 'debugger' */
1860
1916
  #define DUK_HEAP_STRING_DEBUGGER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DEBUGGER)
1861
1917
  #define DUK_HTHREAD_STRING_DEBUGGER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DEBUGGER)
1862
- #define DUK_STRIDX_DEFAULT 126 /* 'default' */
1918
+ #define DUK_STRIDX_DEFAULT 127 /* 'default' */
1863
1919
  #define DUK_HEAP_STRING_DEFAULT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DEFAULT)
1864
1920
  #define DUK_HTHREAD_STRING_DEFAULT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DEFAULT)
1865
- #define DUK_STRIDX_DELETE 127 /* 'delete' */
1921
+ #define DUK_STRIDX_DELETE 128 /* 'delete' */
1866
1922
  #define DUK_HEAP_STRING_DELETE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DELETE)
1867
1923
  #define DUK_HTHREAD_STRING_DELETE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DELETE)
1868
- #define DUK_STRIDX_DO 128 /* 'do' */
1924
+ #define DUK_STRIDX_DO 129 /* 'do' */
1869
1925
  #define DUK_HEAP_STRING_DO(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DO)
1870
1926
  #define DUK_HTHREAD_STRING_DO(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DO)
1871
- #define DUK_STRIDX_ELSE 129 /* 'else' */
1927
+ #define DUK_STRIDX_ELSE 130 /* 'else' */
1872
1928
  #define DUK_HEAP_STRING_ELSE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ELSE)
1873
1929
  #define DUK_HTHREAD_STRING_ELSE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ELSE)
1874
- #define DUK_STRIDX_FINALLY 130 /* 'finally' */
1930
+ #define DUK_STRIDX_FINALLY 131 /* 'finally' */
1875
1931
  #define DUK_HEAP_STRING_FINALLY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FINALLY)
1876
1932
  #define DUK_HTHREAD_STRING_FINALLY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FINALLY)
1877
- #define DUK_STRIDX_FOR 131 /* 'for' */
1933
+ #define DUK_STRIDX_FOR 132 /* 'for' */
1878
1934
  #define DUK_HEAP_STRING_FOR(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FOR)
1879
1935
  #define DUK_HTHREAD_STRING_FOR(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FOR)
1880
- #define DUK_STRIDX_LC_FUNCTION 132 /* 'function' */
1936
+ #define DUK_STRIDX_LC_FUNCTION 133 /* 'function' */
1881
1937
  #define DUK_HEAP_STRING_LC_FUNCTION(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_FUNCTION)
1882
1938
  #define DUK_HTHREAD_STRING_LC_FUNCTION(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_FUNCTION)
1883
- #define DUK_STRIDX_IF 133 /* 'if' */
1939
+ #define DUK_STRIDX_IF 134 /* 'if' */
1884
1940
  #define DUK_HEAP_STRING_IF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IF)
1885
1941
  #define DUK_HTHREAD_STRING_IF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IF)
1886
- #define DUK_STRIDX_IN 134 /* 'in' */
1942
+ #define DUK_STRIDX_IN 135 /* 'in' */
1887
1943
  #define DUK_HEAP_STRING_IN(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IN)
1888
1944
  #define DUK_HTHREAD_STRING_IN(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IN)
1889
- #define DUK_STRIDX_INSTANCEOF 135 /* 'instanceof' */
1945
+ #define DUK_STRIDX_INSTANCEOF 136 /* 'instanceof' */
1890
1946
  #define DUK_HEAP_STRING_INSTANCEOF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INSTANCEOF)
1891
1947
  #define DUK_HTHREAD_STRING_INSTANCEOF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INSTANCEOF)
1892
- #define DUK_STRIDX_NEW 136 /* 'new' */
1948
+ #define DUK_STRIDX_NEW 137 /* 'new' */
1893
1949
  #define DUK_HEAP_STRING_NEW(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_NEW)
1894
1950
  #define DUK_HTHREAD_STRING_NEW(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_NEW)
1895
- #define DUK_STRIDX_RETURN 137 /* 'return' */
1951
+ #define DUK_STRIDX_RETURN 138 /* 'return' */
1896
1952
  #define DUK_HEAP_STRING_RETURN(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_RETURN)
1897
1953
  #define DUK_HTHREAD_STRING_RETURN(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_RETURN)
1898
- #define DUK_STRIDX_SWITCH 138 /* 'switch' */
1954
+ #define DUK_STRIDX_SWITCH 139 /* 'switch' */
1899
1955
  #define DUK_HEAP_STRING_SWITCH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SWITCH)
1900
1956
  #define DUK_HTHREAD_STRING_SWITCH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SWITCH)
1901
- #define DUK_STRIDX_THIS 139 /* 'this' */
1957
+ #define DUK_STRIDX_THIS 140 /* 'this' */
1902
1958
  #define DUK_HEAP_STRING_THIS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_THIS)
1903
1959
  #define DUK_HTHREAD_STRING_THIS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_THIS)
1904
- #define DUK_STRIDX_THROW 140 /* 'throw' */
1960
+ #define DUK_STRIDX_THROW 141 /* 'throw' */
1905
1961
  #define DUK_HEAP_STRING_THROW(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_THROW)
1906
1962
  #define DUK_HTHREAD_STRING_THROW(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_THROW)
1907
- #define DUK_STRIDX_TRY 141 /* 'try' */
1963
+ #define DUK_STRIDX_TRY 142 /* 'try' */
1908
1964
  #define DUK_HEAP_STRING_TRY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TRY)
1909
1965
  #define DUK_HTHREAD_STRING_TRY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TRY)
1910
- #define DUK_STRIDX_TYPEOF 142 /* 'typeof' */
1966
+ #define DUK_STRIDX_TYPEOF 143 /* 'typeof' */
1911
1967
  #define DUK_HEAP_STRING_TYPEOF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TYPEOF)
1912
1968
  #define DUK_HTHREAD_STRING_TYPEOF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TYPEOF)
1913
- #define DUK_STRIDX_VAR 143 /* 'var' */
1969
+ #define DUK_STRIDX_VAR 144 /* 'var' */
1914
1970
  #define DUK_HEAP_STRING_VAR(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_VAR)
1915
1971
  #define DUK_HTHREAD_STRING_VAR(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_VAR)
1916
- #define DUK_STRIDX_CONST 144 /* 'const' */
1972
+ #define DUK_STRIDX_CONST 145 /* 'const' */
1917
1973
  #define DUK_HEAP_STRING_CONST(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CONST)
1918
1974
  #define DUK_HTHREAD_STRING_CONST(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CONST)
1919
- #define DUK_STRIDX_VOID 145 /* 'void' */
1975
+ #define DUK_STRIDX_VOID 146 /* 'void' */
1920
1976
  #define DUK_HEAP_STRING_VOID(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_VOID)
1921
1977
  #define DUK_HTHREAD_STRING_VOID(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_VOID)
1922
- #define DUK_STRIDX_WHILE 146 /* 'while' */
1978
+ #define DUK_STRIDX_WHILE 147 /* 'while' */
1923
1979
  #define DUK_HEAP_STRING_WHILE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WHILE)
1924
1980
  #define DUK_HTHREAD_STRING_WHILE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WHILE)
1925
- #define DUK_STRIDX_WITH 147 /* 'with' */
1981
+ #define DUK_STRIDX_WITH 148 /* 'with' */
1926
1982
  #define DUK_HEAP_STRING_WITH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WITH)
1927
1983
  #define DUK_HTHREAD_STRING_WITH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WITH)
1928
- #define DUK_STRIDX_CLASS 148 /* 'class' */
1984
+ #define DUK_STRIDX_CLASS 149 /* 'class' */
1929
1985
  #define DUK_HEAP_STRING_CLASS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CLASS)
1930
1986
  #define DUK_HTHREAD_STRING_CLASS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CLASS)
1931
- #define DUK_STRIDX_ENUM 149 /* 'enum' */
1987
+ #define DUK_STRIDX_ENUM 150 /* 'enum' */
1932
1988
  #define DUK_HEAP_STRING_ENUM(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ENUM)
1933
1989
  #define DUK_HTHREAD_STRING_ENUM(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ENUM)
1934
- #define DUK_STRIDX_EXPORT 150 /* 'export' */
1990
+ #define DUK_STRIDX_EXPORT 151 /* 'export' */
1935
1991
  #define DUK_HEAP_STRING_EXPORT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_EXPORT)
1936
1992
  #define DUK_HTHREAD_STRING_EXPORT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_EXPORT)
1937
- #define DUK_STRIDX_EXTENDS 151 /* 'extends' */
1993
+ #define DUK_STRIDX_EXTENDS 152 /* 'extends' */
1938
1994
  #define DUK_HEAP_STRING_EXTENDS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_EXTENDS)
1939
1995
  #define DUK_HTHREAD_STRING_EXTENDS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_EXTENDS)
1940
- #define DUK_STRIDX_IMPORT 152 /* 'import' */
1996
+ #define DUK_STRIDX_IMPORT 153 /* 'import' */
1941
1997
  #define DUK_HEAP_STRING_IMPORT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IMPORT)
1942
1998
  #define DUK_HTHREAD_STRING_IMPORT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IMPORT)
1943
- #define DUK_STRIDX_SUPER 153 /* 'super' */
1999
+ #define DUK_STRIDX_SUPER 154 /* 'super' */
1944
2000
  #define DUK_HEAP_STRING_SUPER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SUPER)
1945
2001
  #define DUK_HTHREAD_STRING_SUPER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SUPER)
1946
- #define DUK_STRIDX_LC_NULL 154 /* 'null' */
2002
+ #define DUK_STRIDX_LC_NULL 155 /* 'null' */
1947
2003
  #define DUK_HEAP_STRING_LC_NULL(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_NULL)
1948
2004
  #define DUK_HTHREAD_STRING_LC_NULL(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_NULL)
1949
- #define DUK_STRIDX_TRUE 155 /* 'true' */
2005
+ #define DUK_STRIDX_TRUE 156 /* 'true' */
1950
2006
  #define DUK_HEAP_STRING_TRUE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TRUE)
1951
2007
  #define DUK_HTHREAD_STRING_TRUE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TRUE)
1952
- #define DUK_STRIDX_FALSE 156 /* 'false' */
2008
+ #define DUK_STRIDX_FALSE 157 /* 'false' */
1953
2009
  #define DUK_HEAP_STRING_FALSE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FALSE)
1954
2010
  #define DUK_HTHREAD_STRING_FALSE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FALSE)
1955
- #define DUK_STRIDX_IMPLEMENTS 157 /* 'implements' */
2011
+ #define DUK_STRIDX_IMPLEMENTS 158 /* 'implements' */
1956
2012
  #define DUK_HEAP_STRING_IMPLEMENTS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IMPLEMENTS)
1957
2013
  #define DUK_HTHREAD_STRING_IMPLEMENTS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IMPLEMENTS)
1958
- #define DUK_STRIDX_INTERFACE 158 /* 'interface' */
2014
+ #define DUK_STRIDX_INTERFACE 159 /* 'interface' */
1959
2015
  #define DUK_HEAP_STRING_INTERFACE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INTERFACE)
1960
2016
  #define DUK_HTHREAD_STRING_INTERFACE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INTERFACE)
1961
- #define DUK_STRIDX_LET 159 /* 'let' */
2017
+ #define DUK_STRIDX_LET 160 /* 'let' */
1962
2018
  #define DUK_HEAP_STRING_LET(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LET)
1963
2019
  #define DUK_HTHREAD_STRING_LET(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LET)
1964
- #define DUK_STRIDX_PACKAGE 160 /* 'package' */
2020
+ #define DUK_STRIDX_PACKAGE 161 /* 'package' */
1965
2021
  #define DUK_HEAP_STRING_PACKAGE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PACKAGE)
1966
2022
  #define DUK_HTHREAD_STRING_PACKAGE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PACKAGE)
1967
- #define DUK_STRIDX_PRIVATE 161 /* 'private' */
2023
+ #define DUK_STRIDX_PRIVATE 162 /* 'private' */
1968
2024
  #define DUK_HEAP_STRING_PRIVATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PRIVATE)
1969
2025
  #define DUK_HTHREAD_STRING_PRIVATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PRIVATE)
1970
- #define DUK_STRIDX_PROTECTED 162 /* 'protected' */
2026
+ #define DUK_STRIDX_PROTECTED 163 /* 'protected' */
1971
2027
  #define DUK_HEAP_STRING_PROTECTED(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PROTECTED)
1972
2028
  #define DUK_HTHREAD_STRING_PROTECTED(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PROTECTED)
1973
- #define DUK_STRIDX_PUBLIC 163 /* 'public' */
2029
+ #define DUK_STRIDX_PUBLIC 164 /* 'public' */
1974
2030
  #define DUK_HEAP_STRING_PUBLIC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PUBLIC)
1975
2031
  #define DUK_HTHREAD_STRING_PUBLIC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PUBLIC)
1976
- #define DUK_STRIDX_STATIC 164 /* 'static' */
2032
+ #define DUK_STRIDX_STATIC 165 /* 'static' */
1977
2033
  #define DUK_HEAP_STRING_STATIC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_STATIC)
1978
2034
  #define DUK_HTHREAD_STRING_STATIC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_STATIC)
1979
- #define DUK_STRIDX_YIELD 165 /* 'yield' */
2035
+ #define DUK_STRIDX_YIELD 166 /* 'yield' */
1980
2036
  #define DUK_HEAP_STRING_YIELD(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_YIELD)
1981
2037
  #define DUK_HTHREAD_STRING_YIELD(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_YIELD)
1982
2038
 
1983
- #define DUK_HEAP_NUM_STRINGS 166
1984
- #define DUK_STRIDX_START_RESERVED 121
1985
- #define DUK_STRIDX_START_STRICT_RESERVED 157
1986
- #define DUK_STRIDX_END_RESERVED 166 /* exclusive endpoint */
2039
+ #define DUK_HEAP_NUM_STRINGS 167
2040
+ #define DUK_STRIDX_START_RESERVED 122
2041
+ #define DUK_STRIDX_START_STRICT_RESERVED 158
2042
+ #define DUK_STRIDX_END_RESERVED 167 /* exclusive endpoint */
1987
2043
 
1988
2044
  /* To convert a heap stridx to a token number, subtract
1989
2045
  * DUK_STRIDX_START_RESERVED and add DUK_TOK_START_RESERVED.
1990
2046
  */
1991
2047
  #if !defined(DUK_SINGLE_FILE)
1992
- DUK_INTERNAL_DECL const duk_uint8_t duk_strings_data[967];
2048
+ DUK_INTERNAL_DECL const duk_uint8_t duk_strings_data[972];
1993
2049
  #endif /* !DUK_SINGLE_FILE */
1994
2050
  #define DUK_STRDATA_MAX_STRLEN 27
1995
- #define DUK_STRDATA_DATA_LENGTH 967
2051
+ #define DUK_STRDATA_DATA_LENGTH 972
1996
2052
  #endif /* DUK_USE_ROM_STRINGS */
1997
2053
 
1998
2054
  #if defined(DUK_USE_ROM_OBJECTS)
@@ -2014,6 +2070,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_parse_float(duk_context *ctx);
2014
2070
  DUK_INTERNAL_DECL duk_ret_t duk_bi_thread_constructor(duk_context *ctx);
2015
2071
  DUK_INTERNAL_DECL duk_ret_t duk_bi_pointer_constructor(duk_context *ctx);
2016
2072
  DUK_INTERNAL_DECL duk_ret_t duk_bi_proxy_constructor(duk_context *ctx);
2073
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_symbol_constructor_shared(duk_context *ctx);
2017
2074
  DUK_INTERNAL_DECL duk_ret_t duk_bi_arraybuffer_constructor(duk_context *ctx);
2018
2075
  DUK_INTERNAL_DECL duk_ret_t duk_bi_dataview_constructor(duk_context *ctx);
2019
2076
  DUK_INTERNAL_DECL duk_ret_t duk_bi_typedarray_constructor(duk_context *ctx);
@@ -2054,6 +2111,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype_to_string(duk_context *ctx
2054
2111
  DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype_apply(duk_context *ctx);
2055
2112
  DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype_call(duk_context *ctx);
2056
2113
  DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype_bind(duk_context *ctx);
2114
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype_hasinstance(duk_context *ctx);
2057
2115
  DUK_INTERNAL_DECL duk_ret_t duk_bi_native_function_length(duk_context *ctx);
2058
2116
  DUK_INTERNAL_DECL duk_ret_t duk_bi_native_function_name(duk_context *ctx);
2059
2117
  DUK_INTERNAL_DECL duk_ret_t duk_bi_array_constructor_is_array(duk_context *ctx);
@@ -2109,6 +2167,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_date_prototype_get_shared(duk_context *ctx);
2109
2167
  DUK_INTERNAL_DECL duk_ret_t duk_bi_date_prototype_get_timezone_offset(duk_context *ctx);
2110
2168
  DUK_INTERNAL_DECL duk_ret_t duk_bi_date_prototype_set_time(duk_context *ctx);
2111
2169
  DUK_INTERNAL_DECL duk_ret_t duk_bi_date_prototype_set_shared(duk_context *ctx);
2170
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_date_prototype_toprimitive(duk_context *ctx);
2112
2171
  DUK_INTERNAL_DECL duk_ret_t duk_bi_regexp_prototype_exec(duk_context *ctx);
2113
2172
  DUK_INTERNAL_DECL duk_ret_t duk_bi_regexp_prototype_test(duk_context *ctx);
2114
2173
  DUK_INTERNAL_DECL duk_ret_t duk_bi_regexp_prototype_tostring(duk_context *ctx);
@@ -2149,6 +2208,9 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_reflect_object_delete_property(duk_context *c
2149
2208
  DUK_INTERNAL_DECL duk_ret_t duk_bi_reflect_object_get(duk_context *ctx);
2150
2209
  DUK_INTERNAL_DECL duk_ret_t duk_bi_reflect_object_has(duk_context *ctx);
2151
2210
  DUK_INTERNAL_DECL duk_ret_t duk_bi_reflect_object_set(duk_context *ctx);
2211
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_symbol_key_for(duk_context *ctx);
2212
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_symbol_tostring_shared(duk_context *ctx);
2213
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_symbol_toprimitive(duk_context *ctx);
2152
2214
  DUK_INTERNAL_DECL duk_ret_t duk_bi_arraybuffer_isview(duk_context *ctx);
2153
2215
  DUK_INTERNAL_DECL duk_ret_t duk_bi_typedarray_bytelength_getter(duk_context *ctx);
2154
2216
  DUK_INTERNAL_DECL duk_ret_t duk_bi_buffer_slice_shared(duk_context *ctx);
@@ -2169,13 +2231,15 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_tojson(duk_context *ctx);
2169
2231
  DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_fill(duk_context *ctx);
2170
2232
  DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_copy(duk_context *ctx);
2171
2233
  DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_write(duk_context *ctx);
2234
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_cbor_encode(duk_context *ctx);
2235
+ DUK_INTERNAL_DECL duk_ret_t duk_bi_cbor_decode(duk_context *ctx);
2172
2236
  DUK_INTERNAL_DECL duk_ret_t duk_bi_textencoder_prototype_encoding_getter(duk_context *ctx);
2173
2237
  DUK_INTERNAL_DECL duk_ret_t duk_bi_textencoder_prototype_encode(duk_context *ctx);
2174
2238
  DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_prototype_shared_getter(duk_context *ctx);
2175
2239
  DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_prototype_decode(duk_context *ctx);
2176
2240
  DUK_INTERNAL_DECL duk_ret_t duk_bi_performance_now(duk_context *ctx);
2177
2241
  #if !defined(DUK_SINGLE_FILE)
2178
- DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[177];
2242
+ DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[185];
2179
2243
  #endif /* !DUK_SINGLE_FILE */
2180
2244
  #define DUK_BIDX_GLOBAL 0
2181
2245
  #define DUK_BIDX_GLOBAL_ENV 1
@@ -2230,22 +2294,22 @@ DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[177];
2230
2294
  #define DUK_BIDX_NODEJS_BUFFER_PROTOTYPE 50
2231
2295
  #define DUK_NUM_BUILTINS 51
2232
2296
  #define DUK_NUM_BIDX_BUILTINS 51
2233
- #define DUK_NUM_ALL_BUILTINS 78
2297
+ #define DUK_NUM_ALL_BUILTINS 80
2234
2298
  #if defined(DUK_USE_DOUBLE_LE)
2235
2299
  #if !defined(DUK_SINGLE_FILE)
2236
- DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4116];
2300
+ DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4281];
2237
2301
  #endif /* !DUK_SINGLE_FILE */
2238
- #define DUK_BUILTINS_DATA_LENGTH 4116
2302
+ #define DUK_BUILTINS_DATA_LENGTH 4281
2239
2303
  #elif defined(DUK_USE_DOUBLE_BE)
2240
2304
  #if !defined(DUK_SINGLE_FILE)
2241
- DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4116];
2305
+ DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4281];
2242
2306
  #endif /* !DUK_SINGLE_FILE */
2243
- #define DUK_BUILTINS_DATA_LENGTH 4116
2307
+ #define DUK_BUILTINS_DATA_LENGTH 4281
2244
2308
  #elif defined(DUK_USE_DOUBLE_ME)
2245
2309
  #if !defined(DUK_SINGLE_FILE)
2246
- DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4116];
2310
+ DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4281];
2247
2311
  #endif /* !DUK_SINGLE_FILE */
2248
- #define DUK_BUILTINS_DATA_LENGTH 4116
2312
+ #define DUK_BUILTINS_DATA_LENGTH 4281
2249
2313
  #else
2250
2314
  #error invalid endianness defines
2251
2315
  #endif
@@ -2322,40 +2386,49 @@ struct duk_bitencoder_ctx {
2322
2386
 
2323
2387
  /*
2324
2388
  * Raw write/read macros for big endian, unaligned basic values.
2325
- * Caller ensures there's enough space. The macros update the pointer
2326
- * argument automatically on resizes. The idiom seems a bit odd, but
2327
- * leads to compact code.
2389
+ * Caller ensures there's enough space. The INC macro variants
2390
+ * update the pointer argument automatically.
2328
2391
  */
2329
2392
 
2330
2393
  #define DUK_RAW_WRITE_U8(ptr,val) do { \
2331
- *(ptr)++ = (duk_uint8_t) (val); \
2332
- } while (0)
2333
- #define DUK_RAW_WRITE_U16_BE(ptr,val) duk_raw_write_u16_be(&(ptr), (duk_uint16_t) (val))
2334
- #define DUK_RAW_WRITE_U32_BE(ptr,val) duk_raw_write_u32_be(&(ptr), (duk_uint32_t) (val))
2335
- #define DUK_RAW_WRITE_DOUBLE_BE(ptr,val) duk_raw_write_double_be(&(ptr), (duk_double_t) (val))
2336
- #define DUK_RAW_WRITE_XUTF8(ptr,val) do { \
2337
- /* 'ptr' is evaluated both as LHS and RHS. */ \
2338
- duk_uint8_t *duk__ptr; \
2339
- duk_small_int_t duk__len; \
2340
- duk__ptr = (duk_uint8_t *) (ptr); \
2341
- duk__len = duk_unicode_encode_xutf8((duk_ucodepoint_t) (val), duk__ptr); \
2342
- duk__ptr += duk__len; \
2343
- (ptr) = duk__ptr; \
2394
+ *(ptr) = (duk_uint8_t) (val); \
2344
2395
  } while (0)
2345
- #define DUK_RAW_WRITE_CESU8(ptr,val) do { \
2346
- /* 'ptr' is evaluated both as LHS and RHS. */ \
2347
- duk_uint8_t *duk__ptr; \
2348
- duk_small_int_t duk__len; \
2349
- duk__ptr = (duk_uint8_t *) (ptr); \
2350
- duk__len = duk_unicode_encode_cesu8((duk_ucodepoint_t) (val), duk__ptr); \
2351
- duk__ptr += duk__len; \
2352
- (ptr) = duk__ptr; \
2396
+ #define DUK_RAW_WRITE_U16_BE(ptr,val) duk_raw_write_u16_be((ptr), (duk_uint16_t) (val))
2397
+ #define DUK_RAW_WRITE_U32_BE(ptr,val) duk_raw_write_u32_be((ptr), (duk_uint32_t) (val))
2398
+ #define DUK_RAW_WRITE_FLOAT_BE(ptr,val) duk_raw_write_float_be((ptr), (duk_float_t) (val))
2399
+ #define DUK_RAW_WRITE_DOUBLE_BE(ptr,val) duk_raw_write_double_be((ptr), (duk_double_t) (val))
2400
+ #define DUK_RAW_WRITE_XUTF8(ptr,val) duk_raw_write_xutf8((ptr), (duk_ucodepoint_t) (val))
2401
+
2402
+ #define DUK_RAW_WRITEINC_U8(ptr,val) do { \
2403
+ *(ptr)++ = (duk_uint8_t) (val); \
2353
2404
  } while (0)
2405
+ #define DUK_RAW_WRITEINC_U16_BE(ptr,val) duk_raw_writeinc_u16_be(&(ptr), (duk_uint16_t) (val))
2406
+ #define DUK_RAW_WRITEINC_U32_BE(ptr,val) duk_raw_writeinc_u32_be(&(ptr), (duk_uint32_t) (val))
2407
+ #define DUK_RAW_WRITEINC_FLOAT_BE(ptr,val) duk_raw_writeinc_float_be(&(ptr), (duk_float_t) (val))
2408
+ #define DUK_RAW_WRITEINC_DOUBLE_BE(ptr,val) duk_raw_writeinc_double_be(&(ptr), (duk_double_t) (val))
2409
+ #define DUK_RAW_WRITEINC_XUTF8(ptr,val) duk_raw_writeinc_xutf8(&(ptr), (duk_ucodepoint_t) (val))
2410
+ #define DUK_RAW_WRITEINC_CESU8(ptr,val) duk_raw_writeinc_cesu8(&(ptr), (duk_ucodepoint_t) (val))
2411
+
2412
+ #define DUK_RAW_READ_U8(ptr) ((duk_uint8_t) (*(ptr)))
2413
+ #define DUK_RAW_READ_U16_BE(ptr) duk_raw_read_u16_be((ptr));
2414
+ #define DUK_RAW_READ_U32_BE(ptr) duk_raw_read_u32_be((ptr));
2415
+ #define DUK_RAW_READ_DOUBLE_BE(ptr) duk_raw_read_double_be((ptr));
2416
+
2417
+ #define DUK_RAW_READINC_U8(ptr) ((duk_uint8_t) (*(ptr)++))
2418
+ #define DUK_RAW_READINC_U16_BE(ptr) duk_raw_readinc_u16_be(&(ptr));
2419
+ #define DUK_RAW_READINC_U32_BE(ptr) duk_raw_readinc_u32_be(&(ptr));
2420
+ #define DUK_RAW_READINC_DOUBLE_BE(ptr) duk_raw_readinc_double_be(&(ptr));
2421
+
2422
+ /*
2423
+ * Double and float byte order operations.
2424
+ */
2354
2425
 
2355
- #define DUK_RAW_READ_U8(ptr) ((duk_uint8_t) (*(ptr)++))
2356
- #define DUK_RAW_READ_U16_BE(ptr) duk_raw_read_u16_be(&(ptr));
2357
- #define DUK_RAW_READ_U32_BE(ptr) duk_raw_read_u32_be(&(ptr));
2358
- #define DUK_RAW_READ_DOUBLE_BE(ptr) duk_raw_read_double_be(&(ptr));
2426
+ DUK_INTERNAL_DECL void duk_dblunion_host_to_little(duk_double_union *u);
2427
+ DUK_INTERNAL_DECL void duk_dblunion_little_to_host(duk_double_union *u);
2428
+ DUK_INTERNAL_DECL void duk_dblunion_host_to_big(duk_double_union *u);
2429
+ DUK_INTERNAL_DECL void duk_dblunion_big_to_host(duk_double_union *u);
2430
+ DUK_INTERNAL_DECL void duk_fltunion_host_to_big(duk_float_union *u);
2431
+ DUK_INTERNAL_DECL void duk_fltunion_big_to_host(duk_float_union *u);
2359
2432
 
2360
2433
  /*
2361
2434
  * Buffer writer (dynamic buffer only)
@@ -2414,24 +2487,20 @@ struct duk_bufwriter_ctx {
2414
2487
  (const char *) (bw_ctx)->p_base, \
2415
2488
  (duk_size_t) ((bw_ctx)->p - (bw_ctx)->p_base)); \
2416
2489
  } while (0)
2490
+
2417
2491
  /* Pointers may be NULL for a while when 'buf' size is zero and before any
2418
2492
  * ENSURE calls have been made. Once an ENSURE has been made, the pointers
2419
2493
  * are required to be non-NULL so that it's always valid to use memcpy() and
2420
2494
  * memmove(), even for zero size.
2421
2495
  */
2422
- #define DUK_BW_ASSERT_VALID_EXPR(thr,bw_ctx) \
2423
- DUK_ASSERT_EXPR((bw_ctx) != NULL && \
2424
- (bw_ctx)->buf != NULL && \
2425
- ((DUK_HBUFFER_DYNAMIC_GET_SIZE((bw_ctx)->buf) == 0) || \
2426
- ((bw_ctx)->p != NULL && \
2427
- (bw_ctx)->p_base != NULL && \
2428
- (bw_ctx)->p_limit != NULL && \
2429
- (bw_ctx)->p_limit >= (bw_ctx)->p_base && \
2430
- (bw_ctx)->p >= (bw_ctx)->p_base && \
2431
- (bw_ctx)->p <= (bw_ctx)->p_limit)))
2432
- #define DUK_BW_ASSERT_VALID(thr,bw_ctx) do { \
2433
- DUK_BW_ASSERT_VALID_EXPR((thr), (bw_ctx)); \
2434
- } while (0)
2496
+ #if defined(DUK_USE_ASSERTIONS)
2497
+ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *bw_ctx);
2498
+ #define DUK_BW_ASSERT_VALID_EXPR(thr,bw_ctx) (duk_bw_assert_valid((thr), (bw_ctx)))
2499
+ #define DUK_BW_ASSERT_VALID(thr,bw_ctx) do { duk_bw_assert_valid((thr), (bw_ctx)); } while (0)
2500
+ #else
2501
+ #define DUK_BW_ASSERT_VALID_EXPR(thr,bw_ctx) DUK_ASSERT_EXPR(1)
2502
+ #define DUK_BW_ASSERT_VALID(thr,bw_ctx) do {} while (0)
2503
+ #endif
2435
2504
 
2436
2505
  /* Working with the pointer and current size. */
2437
2506
 
@@ -2788,12 +2857,26 @@ DUK_INTERNAL_DECL duk_uint8_t *duk_bw_insert_ensure_area(duk_hthread *thr, duk_b
2788
2857
  DUK_INTERNAL_DECL void duk_bw_remove_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t off, duk_size_t len);
2789
2858
  /* No duk_bw_remove_ensure_slice(), functionality would be identical. */
2790
2859
 
2791
- DUK_INTERNAL_DECL duk_uint16_t duk_raw_read_u16_be(duk_uint8_t **p);
2792
- DUK_INTERNAL_DECL duk_uint32_t duk_raw_read_u32_be(duk_uint8_t **p);
2793
- DUK_INTERNAL_DECL duk_double_t duk_raw_read_double_be(duk_uint8_t **p);
2794
- DUK_INTERNAL_DECL void duk_raw_write_u16_be(duk_uint8_t **p, duk_uint16_t val);
2795
- DUK_INTERNAL_DECL void duk_raw_write_u32_be(duk_uint8_t **p, duk_uint32_t val);
2796
- DUK_INTERNAL_DECL void duk_raw_write_double_be(duk_uint8_t **p, duk_double_t val);
2860
+ DUK_INTERNAL_DECL duk_uint16_t duk_raw_read_u16_be(const duk_uint8_t *p);
2861
+ DUK_INTERNAL_DECL duk_uint32_t duk_raw_read_u32_be(const duk_uint8_t *p);
2862
+ DUK_INTERNAL_DECL duk_float_t duk_raw_read_float_be(const duk_uint8_t *p);
2863
+ DUK_INTERNAL_DECL duk_double_t duk_raw_read_double_be(const duk_uint8_t *p);
2864
+ DUK_INTERNAL_DECL duk_uint16_t duk_raw_readinc_u16_be(const duk_uint8_t **p);
2865
+ DUK_INTERNAL_DECL duk_uint32_t duk_raw_readinc_u32_be(const duk_uint8_t **p);
2866
+ DUK_INTERNAL_DECL duk_float_t duk_raw_readinc_float_be(const duk_uint8_t **p);
2867
+ DUK_INTERNAL_DECL duk_double_t duk_raw_readinc_double_be(const duk_uint8_t **p);
2868
+ DUK_INTERNAL_DECL void duk_raw_write_u16_be(duk_uint8_t *p, duk_uint16_t val);
2869
+ DUK_INTERNAL_DECL void duk_raw_write_u32_be(duk_uint8_t *p, duk_uint32_t val);
2870
+ DUK_INTERNAL_DECL void duk_raw_write_float_be(duk_uint8_t *p, duk_float_t val);
2871
+ DUK_INTERNAL_DECL void duk_raw_write_double_be(duk_uint8_t *p, duk_double_t val);
2872
+ DUK_INTERNAL_DECL duk_small_int_t duk_raw_write_xutf8(duk_uint8_t *p, duk_ucodepoint_t val);
2873
+ DUK_INTERNAL_DECL duk_small_int_t duk_raw_write_cesu8(duk_uint8_t *p, duk_ucodepoint_t val);
2874
+ DUK_INTERNAL_DECL void duk_raw_writeinc_u16_be(duk_uint8_t **p, duk_uint16_t val);
2875
+ DUK_INTERNAL_DECL void duk_raw_writeinc_u32_be(duk_uint8_t **p, duk_uint32_t val);
2876
+ DUK_INTERNAL_DECL void duk_raw_writeinc_float_be(duk_uint8_t **p, duk_float_t val);
2877
+ DUK_INTERNAL_DECL void duk_raw_writeinc_double_be(duk_uint8_t **p, duk_double_t val);
2878
+ DUK_INTERNAL_DECL void duk_raw_writeinc_xutf8(duk_uint8_t **p, duk_ucodepoint_t val);
2879
+ DUK_INTERNAL_DECL void duk_raw_writeinc_cesu8(duk_uint8_t **p, duk_ucodepoint_t val);
2797
2880
 
2798
2881
  #if defined(DUK_USE_DEBUGGER_SUPPORT) /* For now only needed by the debugger. */
2799
2882
  DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
@@ -2944,6 +3027,8 @@ DUK_INTERNAL_DECL duk_uint_t duk_double_to_uint_t(duk_double_t x);
2944
3027
  DUK_INTERNAL_DECL duk_int32_t duk_double_to_int32_t(duk_double_t x);
2945
3028
  DUK_INTERNAL_DECL duk_uint32_t duk_double_to_uint32_t(duk_double_t x);
2946
3029
  DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
3030
+ DUK_INTERNAL_DECL duk_bool_t duk_double_equals(duk_double_t x, duk_double_t y);
3031
+ DUK_INTERNAL_DECL duk_bool_t duk_float_equals(duk_float_t x, duk_float_t y);
2947
3032
 
2948
3033
  /*
2949
3034
  * Miscellaneous
@@ -3043,10 +3128,12 @@ DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
3043
3128
  /* JSON */
3044
3129
  #define DUK_STR_FMT_PTR "%p"
3045
3130
  #define DUK_STR_FMT_INVALID_JSON "invalid json (at offset %ld)"
3046
- #define DUK_STR_JSONDEC_RECLIMIT "json decode recursion limit"
3047
- #define DUK_STR_JSONENC_RECLIMIT "json encode recursion limit"
3048
3131
  #define DUK_STR_CYCLIC_INPUT "cyclic input"
3049
3132
 
3133
+ /* Generic codec */
3134
+ #define DUK_STR_DEC_RECLIMIT "decode recursion limit"
3135
+ #define DUK_STR_ENC_RECLIMIT "encode recursion limit"
3136
+
3050
3137
  /* Object property access */
3051
3138
  #define DUK_STR_INVALID_BASE "invalid base value"
3052
3139
  #define DUK_STR_STRICT_CALLER_READ "cannot read strict 'caller'"
@@ -3119,7 +3206,7 @@ DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
3119
3206
  #define DUK_STR_CALLSTACK_LIMIT "callstack limit"
3120
3207
  #define DUK_STR_PROTOTYPE_CHAIN_LIMIT "prototype chain limit"
3121
3208
  #define DUK_STR_BOUND_CHAIN_LIMIT "function call bound chain limit"
3122
- #define DUK_STR_C_CALLSTACK_LIMIT "C call stack depth limit"
3209
+ #define DUK_STR_NATIVE_STACK_LIMIT "C stack depth limit"
3123
3210
  #define DUK_STR_COMPILER_RECURSION_LIMIT "compiler recursion limit"
3124
3211
  #define DUK_STR_BYTECODE_LIMIT "bytecode limit"
3125
3212
  #define DUK_STR_REG_LIMIT "register limit"
@@ -4652,25 +4739,17 @@ struct duk_heaphdr_string {
4652
4739
  /* Check that prev/next links are consistent: if e.g. h->prev is != NULL,
4653
4740
  * h->prev->next should point back to h.
4654
4741
  */
4655
- #if defined(DUK_USE_DOUBLE_LINKED_HEAP) && defined(DUK_USE_ASSERTIONS)
4656
- #define DUK_ASSERT_HEAPHDR_LINKS(heap,h) do { \
4657
- if ((h) != NULL) { \
4658
- duk_heaphdr *h__prev, *h__next; \
4659
- h__prev = DUK_HEAPHDR_GET_PREV((heap), (h)); \
4660
- h__next = DUK_HEAPHDR_GET_NEXT((heap), (h)); \
4661
- DUK_ASSERT(h__prev == NULL || (DUK_HEAPHDR_GET_NEXT((heap), h__prev) == (h))); \
4662
- DUK_ASSERT(h__next == NULL || (DUK_HEAPHDR_GET_PREV((heap), h__next) == (h))); \
4663
- } \
4664
- } while (0)
4742
+ #if defined(DUK_USE_ASSERTIONS)
4743
+ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid_subclassed(duk_heaphdr *h);
4744
+ DUK_INTERNAL_DECL void duk_heaphdr_assert_links(duk_heap *heap, duk_heaphdr *h);
4745
+ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
4746
+ #define DUK_HEAPHDR_ASSERT_LINKS(heap,h) do { duk_heaphdr_assert_links((heap), (h)); } while (0)
4747
+ #define DUK_HEAPHDR_ASSERT_VALID(h) do { duk_heaphdr_assert_valid((h)); } while (0)
4665
4748
  #else
4666
- #define DUK_ASSERT_HEAPHDR_LINKS(heap,h) do {} while (0)
4749
+ #define DUK_HEAPHDR_ASSERT_LINKS(heap,h) do {} while (0)
4750
+ #define DUK_HEAPHDR_ASSERT_VALID(h) do {} while (0)
4667
4751
  #endif
4668
4752
 
4669
- #define DUK_ASSERT_HEAPHDR_VALID(h) do { \
4670
- DUK_ASSERT((h) != NULL); \
4671
- DUK_ASSERT(DUK_HEAPHDR_HTYPE_VALID((h))); \
4672
- } while (0)
4673
-
4674
4753
  #endif /* DUK_HEAPHDR_H_INCLUDED */
4675
4754
  /* #include duk_refcount.h */
4676
4755
  /*
@@ -5407,7 +5486,27 @@ DUK_INTERNAL_DECL void duk_heaphdr_decref_norz(duk_hthread *thr, duk_heaphdr *h)
5407
5486
  #if !defined(DUK_API_INTERNAL_H_INCLUDED)
5408
5487
  #define DUK_API_INTERNAL_H_INCLUDED
5409
5488
 
5410
- #define DUK_INTERNAL_SYMBOL(x) ("\x82" x)
5489
+ /* Inline macro helpers. */
5490
+ #if defined(DUK_USE_PREFER_SIZE)
5491
+ #define DUK_INLINE_PERF
5492
+ #define DUK_ALWAYS_INLINE_PERF
5493
+ #define DUK_NOINLINE_PERF
5494
+ #else
5495
+ #define DUK_INLINE_PERF DUK_INLINE
5496
+ #define DUK_ALWAYS_INLINE_PERF DUK_ALWAYS_INLINE
5497
+ #define DUK_NOINLINE_PERF DUK_NOINLINE
5498
+ #endif
5499
+
5500
+ /* Inline macro helpers, for bytecode executor. */
5501
+ #if defined(DUK_USE_EXEC_PREFER_SIZE)
5502
+ #define DUK_EXEC_INLINE_PERF
5503
+ #define DUK_EXEC_ALWAYS_INLINE_PERF
5504
+ #define DUK_EXEC_NOINLINE_PERF
5505
+ #else
5506
+ #define DUK_EXEC_INLINE_PERF DUK_INLINE
5507
+ #define DUK_EXEC_ALWAYS_INLINE_PERF DUK_ALWAYS_INLINE
5508
+ #define DUK_EXEC_NOINLINE_PERF DUK_NOINLINE
5509
+ #endif
5411
5510
 
5412
5511
  /* duk_push_sprintf constants */
5413
5512
  #define DUK_PUSH_SPRINTF_INITIAL_SIZE 256L
@@ -5501,6 +5600,8 @@ DUK_INTERNAL_DECL duk_bool_t duk_is_string_notsymbol(duk_hthread *thr, duk_idx_t
5501
5600
 
5502
5601
  DUK_INTERNAL_DECL duk_bool_t duk_is_callable_tval(duk_hthread *thr, duk_tval *tv);
5503
5602
 
5603
+ DUK_INTERNAL_DECL duk_bool_t duk_is_bare_object(duk_hthread *thr, duk_idx_t idx);
5604
+
5504
5605
  DUK_INTERNAL_DECL duk_hstring *duk_get_hstring(duk_hthread *thr, duk_idx_t idx);
5505
5606
  DUK_INTERNAL_DECL duk_hstring *duk_get_hstring_notsymbol(duk_hthread *thr, duk_idx_t idx);
5506
5607
  DUK_INTERNAL_DECL const char *duk_get_string_notsymbol(duk_hthread *thr, duk_idx_t idx);
@@ -5627,6 +5728,14 @@ DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx_short_raw(duk_hthread *thr, duk
5627
5728
  duk_get_prop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
5628
5729
  DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx_boolean(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx, duk_bool_t *out_has_prop); /* [] -> [] */
5629
5730
 
5731
+ DUK_INTERNAL_DECL duk_bool_t duk_xget_owndataprop(duk_hthread *thr, duk_idx_t obj_idx);
5732
+ DUK_INTERNAL_DECL duk_bool_t duk_xget_owndataprop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx);
5733
+ DUK_INTERNAL_DECL duk_bool_t duk_xget_owndataprop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
5734
+ #define duk_xget_owndataprop_stridx_short(thr,obj_idx,stridx) \
5735
+ (DUK_ASSERT_EXPR((duk_int_t) (obj_idx) >= -0x8000L && (duk_int_t) (obj_idx) <= 0x7fffL), \
5736
+ DUK_ASSERT_EXPR((duk_int_t) (stridx) >= 0 && (duk_int_t) (stridx) <= 0xffffL), \
5737
+ duk_xget_owndataprop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
5738
+
5630
5739
  DUK_INTERNAL_DECL duk_bool_t duk_put_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [val] -> [] */
5631
5740
  DUK_INTERNAL_DECL duk_bool_t duk_put_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
5632
5741
  #define duk_put_prop_stridx_short(thr,obj_idx,stridx) \
@@ -5694,8 +5803,6 @@ DUK_INTERNAL_DECL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t id
5694
5803
  DUK_INTERNAL_DECL void duk_unpack(duk_hthread *thr);
5695
5804
  #endif
5696
5805
 
5697
- DUK_INTERNAL_DECL void duk_require_constructor_call(duk_hthread *thr);
5698
- DUK_INTERNAL_DECL void duk_require_constructable(duk_hthread *thr, duk_idx_t idx);
5699
5806
  DUK_INTERNAL_DECL void duk_push_symbol_descriptive_string(duk_hthread *thr, duk_hstring *h);
5700
5807
 
5701
5808
  DUK_INTERNAL_DECL void duk_resolve_nonbound_function(duk_hthread *thr);
@@ -5728,6 +5835,8 @@ DUK_INTERNAL_DECL duk_int_t duk_pcall_method_flags(duk_hthread *thr, duk_idx_t n
5728
5835
  DUK_INTERNAL_DECL void duk_to_primitive_ordinary(duk_hthread *thr, duk_idx_t idx, duk_int_t hint);
5729
5836
  #endif
5730
5837
 
5838
+ DUK_INTERNAL_DECL void duk_clear_prototype(duk_hthread *thr, duk_idx_t idx);
5839
+
5731
5840
  /* Raw internal valstack access macros: access is unsafe so call site
5732
5841
  * must have a guarantee that the index is valid. When that is the case,
5733
5842
  * using these macro results in faster and smaller code than duk_get_tval().
@@ -5926,6 +6035,14 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5926
6035
  #define DUK_SYMBOL_TYPE_LOCAL 2
5927
6036
  #define DUK_SYMBOL_TYPE_WELLKNOWN 3
5928
6037
 
6038
+ /* Assertion for duk_hstring validity. */
6039
+ #if defined(DUK_USE_ASSERTIONS)
6040
+ DUK_INTERNAL_DECL void duk_hstring_assert_valid(duk_hstring *h);
6041
+ #define DUK_HSTRING_ASSERT_VALID(h) do { duk_hstring_assert_valid((h)); } while (0)
6042
+ #else
6043
+ #define DUK_HSTRING_ASSERT_VALID(h) do {} while (0)
6044
+ #endif
6045
+
5929
6046
  /*
5930
6047
  * Misc
5931
6048
  */
@@ -6337,26 +6454,12 @@ DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
6337
6454
  * Assert for currently guaranteed relations between flags, for instance.
6338
6455
  */
6339
6456
 
6340
- #define DUK_ASSERT_HOBJECT_VALID(h) do { \
6341
- DUK_ASSERT((h) != NULL); \
6342
- DUK_ASSERT(!DUK_HOBJECT_IS_CALLABLE((h)) || \
6343
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_FUNCTION); \
6344
- DUK_ASSERT(!DUK_HOBJECT_IS_BUFOBJ((h)) || \
6345
- (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_ARRAYBUFFER || \
6346
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_DATAVIEW || \
6347
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_INT8ARRAY || \
6348
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_UINT8ARRAY || \
6349
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY || \
6350
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_INT16ARRAY || \
6351
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_UINT16ARRAY || \
6352
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_INT32ARRAY || \
6353
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_UINT32ARRAY || \
6354
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_FLOAT32ARRAY || \
6355
- DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_FLOAT64ARRAY)); \
6356
- /* Object is an Array <=> object has exotic array behavior */ \
6357
- DUK_ASSERT((DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_ARRAY && DUK_HOBJECT_HAS_EXOTIC_ARRAY((h))) || \
6358
- (DUK_HOBJECT_GET_CLASS_NUMBER((h)) != DUK_HOBJECT_CLASS_ARRAY && !DUK_HOBJECT_HAS_EXOTIC_ARRAY((h)))); \
6359
- } while (0)
6457
+ #if defined(DUK_USE_ASSERTIONS)
6458
+ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
6459
+ #define DUK_HOBJECT_ASSERT_VALID(h) do { duk_hobject_assert_valid((h)); } while (0)
6460
+ #else
6461
+ #define DUK_HOBJECT_ASSERT_VALID(h) do {} while (0)
6462
+ #endif
6360
6463
 
6361
6464
  /*
6362
6465
  * Macros to access the 'props' allocation.
@@ -6907,18 +7010,13 @@ DUK_INTERNAL_DECL void duk_hobject_resize_arraypart(duk_hthread *thr,
6907
7010
  #endif
6908
7011
 
6909
7012
  /* low-level property functions */
6910
- DUK_INTERNAL_DECL duk_bool_t duk_hobject_find_existing_entry(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_int_t *e_idx, duk_int_t *h_idx);
6911
- DUK_INTERNAL_DECL duk_tval *duk_hobject_find_existing_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_hstring *key);
6912
- DUK_INTERNAL_DECL duk_tval *duk_hobject_find_existing_entry_tval_ptr_and_attrs(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_uint_t *out_attrs);
6913
- DUK_INTERNAL_DECL duk_tval *duk_hobject_find_existing_array_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_uarridx_t i);
7013
+ DUK_INTERNAL_DECL duk_bool_t duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_int_t *e_idx, duk_int_t *h_idx);
7014
+ DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_hstring *key);
7015
+ DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr_stridx(duk_heap *heap, duk_hobject *obj, duk_small_uint_t stridx);
7016
+ DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr_and_attrs(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_uint_t *out_attrs);
7017
+ DUK_INTERNAL_DECL duk_tval *duk_hobject_find_array_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_uarridx_t i);
6914
7018
  DUK_INTERNAL_DECL duk_bool_t duk_hobject_get_own_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags);
6915
7019
 
6916
- /* XXX: when optimizing for guaranteed property slots, use a guaranteed
6917
- * slot for internal value; this call can then access it directly.
6918
- */
6919
- #define duk_hobject_get_internal_value_tval_ptr(heap,obj) \
6920
- duk_hobject_find_existing_entry_tval_ptr((heap), (obj), DUK_HEAP_STRING_INT_VALUE((heap)))
6921
-
6922
7020
  /* core property functions */
6923
7021
  DUK_INTERNAL_DECL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key);
6924
7022
  DUK_INTERNAL_DECL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key, duk_tval *tv_val, duk_bool_t throw_flag);
@@ -6962,8 +7060,10 @@ DUK_INTERNAL_DECL duk_bool_t duk_hobject_object_is_sealed_frozen_helper(duk_hthr
6962
7060
  DUK_INTERNAL_DECL duk_bool_t duk_hobject_object_ownprop_helper(duk_hthread *thr, duk_small_uint_t required_desc_flags);
6963
7061
 
6964
7062
  /* internal properties */
6965
- DUK_INTERNAL_DECL duk_bool_t duk_hobject_get_internal_value(duk_heap *heap, duk_hobject *obj, duk_tval *tv);
7063
+ DUK_INTERNAL_DECL duk_tval *duk_hobject_get_internal_value_tval_ptr(duk_heap *heap, duk_hobject *obj);
6966
7064
  DUK_INTERNAL_DECL duk_hstring *duk_hobject_get_internal_value_string(duk_heap *heap, duk_hobject *obj);
7065
+ DUK_INTERNAL_DECL duk_harray *duk_hobject_get_formals(duk_hthread *thr, duk_hobject *obj);
7066
+ DUK_INTERNAL_DECL duk_hobject *duk_hobject_get_varmap(duk_hthread *thr, duk_hobject *obj);
6967
7067
 
6968
7068
  /* hobject management functions */
6969
7069
  DUK_INTERNAL_DECL void duk_hobject_compact_props(duk_hthread *thr, duk_hobject *obj);
@@ -7134,9 +7234,12 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype(duk_hthread *thr);
7134
7234
  * Validity assert
7135
7235
  */
7136
7236
 
7137
- #define DUK_ASSERT_HCOMPFUNC_VALID(h) do { \
7138
- DUK_ASSERT((h) != NULL); \
7139
- } while (0)
7237
+ #if defined(DUK_USE_ASSERTIONS)
7238
+ DUK_INTERNAL_DECL void duk_hcompfunc_assert_valid(duk_hcompfunc *h);
7239
+ #define DUK_HCOMPFUNC_ASSERT_VALID(h) do { duk_hcompfunc_assert_valid((h)); } while (0)
7240
+ #else
7241
+ #define DUK_HCOMPFUNC_ASSERT_VALID(h) do {} while (0)
7242
+ #endif
7140
7243
 
7141
7244
  /*
7142
7245
  * Main struct
@@ -7279,6 +7382,13 @@ struct duk_hcompfunc {
7279
7382
  #if !defined(DUK_HNATFUNC_H_INCLUDED)
7280
7383
  #define DUK_HNATFUNC_H_INCLUDED
7281
7384
 
7385
+ #if defined(DUK_USE_ASSERTIONS)
7386
+ DUK_INTERNAL_DECL void duk_hnatfunc_assert_valid(duk_hnatfunc *h);
7387
+ #define DUK_HNATFUNC_ASSERT_VALID(h) do { duk_hnatfunc_assert_valid((h)); } while (0)
7388
+ #else
7389
+ #define DUK_HNATFUNC_ASSERT_VALID(h) do {} while (0)
7390
+ #endif
7391
+
7282
7392
  #define DUK_HNATFUNC_NARGS_VARARGS ((duk_int16_t) -1)
7283
7393
  #define DUK_HNATFUNC_NARGS_MAX ((duk_int16_t) 0x7fff)
7284
7394
 
@@ -7317,15 +7427,12 @@ struct duk_hnatfunc {
7317
7427
  */
7318
7428
  #define DUK_HBOUNDFUNC_MAX_ARGS 0x20000000UL
7319
7429
 
7320
- #define DUK_ASSERT_HBOUNDFUNC_VALID(h) do { \
7321
- DUK_ASSERT((h) != NULL); \
7322
- DUK_ASSERT(DUK_HOBJECT_IS_BOUNDFUNC((duk_hobject *) (h))); \
7323
- DUK_ASSERT(DUK_TVAL_IS_LIGHTFUNC(&(h)->target) || \
7324
- (DUK_TVAL_IS_OBJECT(&(h)->target) && \
7325
- DUK_HOBJECT_IS_CALLABLE(DUK_TVAL_GET_OBJECT(&(h)->target)))); \
7326
- DUK_ASSERT(!DUK_TVAL_IS_UNUSED(&(h)->this_binding)); \
7327
- DUK_ASSERT((h)->nargs == 0 || (h)->args != NULL); \
7328
- } while (0)
7430
+ #if defined(DUK_USE_ASSERTIONS)
7431
+ DUK_INTERNAL_DECL void duk_hboundfunc_assert_valid(duk_hboundfunc *h);
7432
+ #define DUK_HBOUNDFUNC_ASSERT_VALID(h) do { duk_hboundfunc_assert_valid((h)); } while (0)
7433
+ #else
7434
+ #define DUK_HBOUNDFUNC_ASSERT_VALID(h) do {} while (0)
7435
+ #endif
7329
7436
 
7330
7437
  struct duk_hboundfunc {
7331
7438
  /* Shared object part. */
@@ -7367,32 +7474,12 @@ struct duk_hboundfunc {
7367
7474
  #define DUK_HBUFOBJ_ELEM_FLOAT64 8
7368
7475
  #define DUK_HBUFOBJ_ELEM_MAX 8
7369
7476
 
7370
- #define DUK_ASSERT_HBUFOBJ_VALID(h) do { \
7371
- DUK_ASSERT((h) != NULL); \
7372
- DUK_ASSERT((h)->shift <= 3); \
7373
- DUK_ASSERT((h)->elem_type <= DUK_HBUFOBJ_ELEM_MAX); \
7374
- DUK_ASSERT(((h)->shift == 0 && (h)->elem_type == DUK_HBUFOBJ_ELEM_UINT8) || \
7375
- ((h)->shift == 0 && (h)->elem_type == DUK_HBUFOBJ_ELEM_UINT8CLAMPED) || \
7376
- ((h)->shift == 0 && (h)->elem_type == DUK_HBUFOBJ_ELEM_INT8) || \
7377
- ((h)->shift == 1 && (h)->elem_type == DUK_HBUFOBJ_ELEM_UINT16) || \
7378
- ((h)->shift == 1 && (h)->elem_type == DUK_HBUFOBJ_ELEM_INT16) || \
7379
- ((h)->shift == 2 && (h)->elem_type == DUK_HBUFOBJ_ELEM_UINT32) || \
7380
- ((h)->shift == 2 && (h)->elem_type == DUK_HBUFOBJ_ELEM_INT32) || \
7381
- ((h)->shift == 2 && (h)->elem_type == DUK_HBUFOBJ_ELEM_FLOAT32) || \
7382
- ((h)->shift == 3 && (h)->elem_type == DUK_HBUFOBJ_ELEM_FLOAT64)); \
7383
- DUK_ASSERT((h)->is_typedarray == 0 || (h)->is_typedarray == 1); \
7384
- DUK_ASSERT(DUK_HOBJECT_IS_BUFOBJ((duk_hobject *) (h))); \
7385
- if ((h)->buf == NULL) { \
7386
- DUK_ASSERT((h)->offset == 0); \
7387
- DUK_ASSERT((h)->length == 0); \
7388
- } else { \
7389
- /* No assertions for offset or length; in particular, \
7390
- * it's OK for length to be longer than underlying \
7391
- * buffer. Just ensure they don't wrap when added. \
7392
- */ \
7393
- DUK_ASSERT((h)->offset + (h)->length >= (h)->offset); \
7394
- } \
7395
- } while (0)
7477
+ #if defined(DUK_USE_ASSERTIONS)
7478
+ DUK_INTERNAL_DECL void duk_hbufobj_assert_valid(duk_hbufobj *h);
7479
+ #define DUK_HBUFOBJ_ASSERT_VALID(h) do { duk_hbufobj_assert_valid((h)); } while (0)
7480
+ #else
7481
+ #define DUK_HBUFOBJ_ASSERT_VALID(h) do {} while (0)
7482
+ #endif
7396
7483
 
7397
7484
  /* Get the current data pointer (caller must ensure buf != NULL) as a
7398
7485
  * duk_uint8_t ptr. Note that the result may be NULL if the underlying
@@ -7487,6 +7574,10 @@ DUK_INTERNAL_DECL void duk_hbufobj_push_validated_read(duk_hthread *thr, duk_hbu
7487
7574
  DUK_INTERNAL_DECL void duk_hbufobj_validated_write(duk_hthread *thr, duk_hbufobj *h_bufobj, duk_uint8_t *p, duk_small_uint_t elem_size);
7488
7575
  DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx);
7489
7576
 
7577
+ #else /* DUK_USE_BUFFEROBJECT_SUPPORT */
7578
+
7579
+ /* nothing */
7580
+
7490
7581
  #endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
7491
7582
  #endif /* DUK_HBUFOBJ_H_INCLUDED */
7492
7583
  /* #include duk_hthread.h */
@@ -7636,37 +7727,24 @@ DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx
7636
7727
  * diagnose behavior so it's worth checking even when the check is not 100%.
7637
7728
  */
7638
7729
 
7730
+ #if defined(DUK_USE_ASSERTIONS)
7639
7731
  /* Assertions for internals. */
7640
- #define DUK_ASSERT_HTHREAD_VALID(thr) do { \
7641
- DUK_ASSERT((thr) != NULL); \
7642
- DUK_ASSERT(DUK_HEAPHDR_GET_TYPE((duk_heaphdr *) (thr)) == DUK_HTYPE_OBJECT); \
7643
- DUK_ASSERT(DUK_HOBJECT_IS_THREAD((duk_hobject *) (thr))); \
7644
- DUK_ASSERT((thr)->unused1 == 0); \
7645
- DUK_ASSERT((thr)->unused2 == 0); \
7646
- } while (0)
7732
+ DUK_INTERNAL_DECL void duk_hthread_assert_valid(duk_hthread *thr);
7733
+ #define DUK_HTHREAD_ASSERT_VALID(thr) do { duk_hthread_assert_valid((thr)); } while (0)
7647
7734
 
7648
7735
  /* Assertions for public API calls; a bit stronger. */
7649
- #define DUK_ASSERT_CTX_VALID(thr) do { \
7650
- DUK_ASSERT((thr) != NULL); \
7651
- DUK_ASSERT_HTHREAD_VALID((thr)); \
7652
- DUK_ASSERT((thr)->valstack != NULL); \
7653
- DUK_ASSERT((thr)->valstack_bottom != NULL); \
7654
- DUK_ASSERT((thr)->valstack_top != NULL); \
7655
- DUK_ASSERT((thr)->valstack_end != NULL); \
7656
- DUK_ASSERT((thr)->valstack_alloc_end != NULL); \
7657
- DUK_ASSERT((thr)->valstack_alloc_end >= (thr)->valstack); \
7658
- DUK_ASSERT((thr)->valstack_end >= (thr)->valstack); \
7659
- DUK_ASSERT((thr)->valstack_top >= (thr)->valstack); \
7660
- DUK_ASSERT((thr)->valstack_top >= (thr)->valstack_bottom); \
7661
- DUK_ASSERT((thr)->valstack_end >= (thr)->valstack_top); \
7662
- DUK_ASSERT((thr)->valstack_alloc_end >= (thr)->valstack_end); \
7663
- } while (0)
7736
+ DUK_INTERNAL_DECL void duk_ctx_assert_valid(duk_hthread *thr);
7737
+ #define DUK_CTX_ASSERT_VALID(thr) do { duk_ctx_assert_valid((thr)); } while (0)
7738
+ #else
7739
+ #define DUK_HTHREAD_ASSERT_VALID(thr) do {} while (0)
7740
+ #define DUK_CTX_ASSERT_VALID(thr) do {} while (0)
7741
+ #endif
7664
7742
 
7665
7743
  /* Assertions for API call entry specifically. Checks 'ctx' but also may
7666
7744
  * check internal state (e.g. not in a debugger transport callback).
7667
7745
  */
7668
7746
  #define DUK_ASSERT_API_ENTRY(thr) do { \
7669
- DUK_ASSERT_CTX_VALID((thr)); \
7747
+ DUK_CTX_ASSERT_VALID((thr)); \
7670
7748
  DUK_ASSERT((thr)->heap != NULL); \
7671
7749
  DUK_ASSERT((thr)->heap->dbg_calling_transport == 0); \
7672
7750
  } while (0)
@@ -7923,11 +8001,12 @@ DUK_INTERNAL_DECL void duk_hthread_sync_and_null_currpc(duk_hthread *thr);
7923
8001
  #if !defined(DUK_HARRAY_H_INCLUDED)
7924
8002
  #define DUK_HARRAY_H_INCLUDED
7925
8003
 
7926
- #define DUK_ASSERT_HARRAY_VALID(h) do { \
7927
- DUK_ASSERT((h) != NULL); \
7928
- DUK_ASSERT(DUK_HOBJECT_IS_ARRAY((duk_hobject *) (h))); \
7929
- DUK_ASSERT(DUK_HOBJECT_HAS_EXOTIC_ARRAY((duk_hobject *) (h))); \
7930
- } while (0)
8004
+ #if defined(DUK_USE_ASSERTIONS)
8005
+ DUK_INTERNAL_DECL void duk_harray_assert_valid(duk_harray *h);
8006
+ #define DUK_HARRAY_ASSERT_VALID(h) do { duk_harray_assert_valid((h)); } while (0)
8007
+ #else
8008
+ #define DUK_HARRAY_ASSERT_VALID(h) do {} while (0)
8009
+ #endif
7931
8010
 
7932
8011
  #define DUK_HARRAY_LENGTH_WRITABLE(h) (!(h)->length_nonwritable)
7933
8012
  #define DUK_HARRAY_LENGTH_NONWRITABLE(h) ((h)->length_nonwritable)
@@ -7967,18 +8046,15 @@ struct duk_harray {
7967
8046
  #if !defined(DUK_HENV_H_INCLUDED)
7968
8047
  #define DUK_HENV_H_INCLUDED
7969
8048
 
7970
- #define DUK_ASSERT_HDECENV_VALID(h) do { \
7971
- DUK_ASSERT((h) != NULL); \
7972
- DUK_ASSERT(DUK_HOBJECT_IS_DECENV((duk_hobject *) (h))); \
7973
- DUK_ASSERT((h)->thread == NULL || (h)->varmap != NULL); \
7974
- } while (0)
7975
-
7976
- #define DUK_ASSERT_HOBJENV_VALID(h) do { \
7977
- DUK_ASSERT((h) != NULL); \
7978
- DUK_ASSERT(DUK_HOBJECT_IS_OBJENV((duk_hobject *) (h))); \
7979
- DUK_ASSERT((h)->target != NULL); \
7980
- DUK_ASSERT((h)->has_this == 0 || (h)->has_this == 1); \
7981
- } while (0)
8049
+ #if defined(DUK_USE_ASSERTIONS)
8050
+ DUK_INTERNAL_DECL void duk_hdecenv_assert_valid(duk_hdecenv *h);
8051
+ DUK_INTERNAL_DECL void duk_hobjenv_assert_valid(duk_hobjenv *h);
8052
+ #define DUK_HDECENV_ASSERT_VALID(h) do { duk_hdecenv_assert_valid((h)); } while (0)
8053
+ #define DUK_HOBJENV_ASSERT_VALID(h) do { duk_hobjenv_assert_valid((h)); } while (0)
8054
+ #else
8055
+ #define DUK_HDECENV_ASSERT_VALID(h) do {} while (0)
8056
+ #define DUK_HOBJENV_ASSERT_VALID(h) do {} while (0)
8057
+ #endif
7982
8058
 
7983
8059
  struct duk_hdecenv {
7984
8060
  /* Shared object part. */
@@ -8173,6 +8249,14 @@ struct duk_hobjenv {
8173
8249
  )
8174
8250
  #endif
8175
8251
 
8252
+ /* Validity assert. */
8253
+ #if defined(DUK_USE_ASSERTIONS)
8254
+ DUK_INTERNAL_DECL void duk_hbuffer_assert_valid(duk_hbuffer *h);
8255
+ #define DUK_HBUFFER_ASSERT_VALID(h) do { duk_hbuffer_assert_valid((h)); } while (0)
8256
+ #else
8257
+ #define DUK_HBUFFER_ASSERT_VALID(h) do {} while (0)
8258
+ #endif
8259
+
8176
8260
  /*
8177
8261
  * Structs
8178
8262
  */
@@ -8345,12 +8429,12 @@ DUK_INTERNAL_DECL void duk_hbuffer_reset(duk_hthread *thr, duk_hbuffer_dynamic *
8345
8429
  #if !defined(DUK_HPROXY_H_INCLUDED)
8346
8430
  #define DUK_HPROXY_H_INCLUDED
8347
8431
 
8348
- #define DUK_ASSERT_HPROXY_VALID(h) do { \
8349
- DUK_ASSERT((h) != NULL); \
8350
- DUK_ASSERT((h)->target != NULL); \
8351
- DUK_ASSERT((h)->handler != NULL); \
8352
- DUK_ASSERT(DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ((duk_hobject *) (h))); \
8353
- } while (0)
8432
+ #if defined(DUK_USE_ASSERTIONS)
8433
+ DUK_INTERNAL_DECL void duk_hproxy_assert_valid(duk_hproxy *h);
8434
+ #define DUK_HPROXY_ASSERT_VALID(h) do { duk_hproxy_assert_valid((h)); } while (0)
8435
+ #else
8436
+ #define DUK_HPROXY_ASSERT_VALID(h) do {} while (0)
8437
+ #endif
8354
8438
 
8355
8439
  struct duk_hproxy {
8356
8440
  /* Shared object part. */
@@ -8435,20 +8519,17 @@ struct duk_hproxy {
8435
8519
  */
8436
8520
  #define DUK_MS_FLAG_EMERGENCY (1U << 0)
8437
8521
 
8438
- /* Voluntary mark-and-sweep: triggered periodically. */
8439
- #define DUK_MS_FLAG_VOLUNTARY (1U << 1)
8440
-
8441
8522
  /* Postpone rescue decisions for reachable objects with FINALIZED set.
8442
8523
  * Used during finalize_list processing to avoid incorrect rescue
8443
8524
  * decisions due to finalize_list being a reachability root.
8444
8525
  */
8445
- #define DUK_MS_FLAG_POSTPONE_RESCUE (1U << 2)
8526
+ #define DUK_MS_FLAG_POSTPONE_RESCUE (1U << 1)
8446
8527
 
8447
8528
  /* Don't compact objects; needed during object property table resize
8448
8529
  * to prevent a recursive resize. It would suffice to protect only the
8449
8530
  * current object being resized, but this is not yet implemented.
8450
8531
  */
8451
- #define DUK_MS_FLAG_NO_OBJECT_COMPACTION (1U << 3)
8532
+ #define DUK_MS_FLAG_NO_OBJECT_COMPACTION (1U << 2)
8452
8533
 
8453
8534
  /*
8454
8535
  * Thread switching
@@ -8705,6 +8786,13 @@ struct duk_litcache_entry {
8705
8786
  * Main heap structure
8706
8787
  */
8707
8788
 
8789
+ #if defined(DUK_USE_ASSERTIONS)
8790
+ DUK_INTERNAL_DECL void duk_heap_assert_valid(duk_heap *heap);
8791
+ #define DUK_HEAP_ASSERT_VALID(heap) do { duk_heap_assert_valid((heap)); } while (0)
8792
+ #else
8793
+ #define DUK_HEAP_ASSERT_VALID(heap) do {} while (0)
8794
+ #endif
8795
+
8708
8796
  struct duk_heap {
8709
8797
  duk_small_uint_t flags;
8710
8798
 
@@ -8776,6 +8864,11 @@ struct duk_heap {
8776
8864
 
8777
8865
  /* Mark-and-sweep running flag. Prevents re-entry, and also causes
8778
8866
  * refzero events to be ignored (= objects won't be queued to refzero_list).
8867
+ *
8868
+ * 0: mark-and-sweep not running
8869
+ * 1: mark-and-sweep is running
8870
+ * 2: heap destruction active or debugger active, prevent mark-and-sweep
8871
+ * and refzero processing (but mark-and-sweep not itself running)
8779
8872
  */
8780
8873
  duk_uint_t ms_running;
8781
8874
 
@@ -8994,6 +9087,11 @@ struct duk_heap {
8994
9087
  duk_int_t stats_putprop_proxy;
8995
9088
  duk_int_t stats_getvar_all;
8996
9089
  duk_int_t stats_putvar_all;
9090
+ duk_int_t stats_envrec_delayedcreate;
9091
+ duk_int_t stats_envrec_create;
9092
+ duk_int_t stats_envrec_newenv;
9093
+ duk_int_t stats_envrec_oldenv;
9094
+ duk_int_t stats_envrec_pushclosure;
8997
9095
  #endif
8998
9096
  };
8999
9097
 
@@ -9595,6 +9693,10 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
9595
9693
  #define DUK_ERROR_UNSUPPORTED(thr) do { \
9596
9694
  DUK_ERROR((thr), DUK_ERR_ERROR, DUK_STR_UNSUPPORTED); \
9597
9695
  } while (0)
9696
+ #define DUK_DCERROR_UNSUPPORTED(thr) do { \
9697
+ DUK_ERROR_UNSUPPORTED((thr)); \
9698
+ return 0; \
9699
+ } while (0)
9598
9700
  #define DUK_ERROR_ERROR(thr,msg) do { \
9599
9701
  duk_err_error((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (msg)); \
9600
9702
  } while (0)
@@ -9683,6 +9785,10 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
9683
9785
  #define DUK_ERROR_UNSUPPORTED(thr) do { \
9684
9786
  duk_err_error((thr)); \
9685
9787
  } while (0)
9788
+ #define DUK_DCERROR_UNSUPPORTED(thr) do { \
9789
+ DUK_UNREF((thr)); \
9790
+ return DUK_RET_ERROR; \
9791
+ } while (0)
9686
9792
  #define DUK_ERROR_ERROR(thr,msg) do { \
9687
9793
  duk_err_error((thr)); \
9688
9794
  } while (0)
@@ -10115,13 +10221,13 @@ DUK_INTERNAL_DECL duk_hobject *duk_error_prototype_from_code(duk_hthread *thr, d
10115
10221
  * Automatically generated by extract_chars.py, do not edit!
10116
10222
  */
10117
10223
 
10118
- extern const duk_uint8_t duk_unicode_ids_noa[1063];
10224
+ extern const duk_uint8_t duk_unicode_ids_noa[1116];
10119
10225
  #else
10120
10226
  /*
10121
10227
  * Automatically generated by extract_chars.py, do not edit!
10122
10228
  */
10123
10229
 
10124
- extern const duk_uint8_t duk_unicode_ids_noabmp[626];
10230
+ extern const duk_uint8_t duk_unicode_ids_noabmp[625];
10125
10231
  #endif
10126
10232
 
10127
10233
  #if defined(DUK_USE_SOURCE_NONBMP)
@@ -10143,7 +10249,7 @@ extern const duk_uint8_t duk_unicode_ids_m_let_noabmp[24];
10143
10249
  * Automatically generated by extract_chars.py, do not edit!
10144
10250
  */
10145
10251
 
10146
- extern const duk_uint8_t duk_unicode_idp_m_ids_noa[549];
10252
+ extern const duk_uint8_t duk_unicode_idp_m_ids_noa[576];
10147
10253
  #else
10148
10254
  /*
10149
10255
  * Automatically generated by extract_chars.py, do not edit!
@@ -10156,8 +10262,8 @@ extern const duk_uint8_t duk_unicode_idp_m_ids_noabmp[358];
10156
10262
  * Automatically generated by extract_caseconv.py, do not edit!
10157
10263
  */
10158
10264
 
10159
- extern const duk_uint8_t duk_unicode_caseconv_uc[1386];
10160
- extern const duk_uint8_t duk_unicode_caseconv_lc[680];
10265
+ extern const duk_uint8_t duk_unicode_caseconv_uc[1411];
10266
+ extern const duk_uint8_t duk_unicode_caseconv_lc[706];
10161
10267
 
10162
10268
  #if defined(DUK_USE_REGEXP_CANON_WORKAROUND)
10163
10269
  /*
@@ -10207,6 +10313,7 @@ DUK_INTERNAL_DECL duk_small_int_t duk_unicode_encode_cesu8(duk_ucodepoint_t cp,
10207
10313
  DUK_INTERNAL_DECL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end, duk_ucodepoint_t *out_cp);
10208
10314
  DUK_INTERNAL_DECL duk_ucodepoint_t duk_unicode_decode_xutf8_checked(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end);
10209
10315
  DUK_INTERNAL_DECL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *data, duk_size_t blen);
10316
+ DUK_INTERNAL_DECL duk_bool_t duk_unicode_is_utf8_compatible(const duk_uint8_t *buf, duk_size_t len);
10210
10317
  DUK_INTERNAL_DECL duk_small_int_t duk_unicode_is_whitespace(duk_codepoint_t cp);
10211
10318
  DUK_INTERNAL_DECL duk_small_int_t duk_unicode_is_line_terminator(duk_codepoint_t cp);
10212
10319
  DUK_INTERNAL_DECL duk_small_int_t duk_unicode_is_identifier_start(duk_codepoint_t cp);
@@ -10339,6 +10446,8 @@ DUK_INTERNAL_DECL duk_bool_t duk_js_instanceof_ordinary(duk_hthread *thr, duk_tv
10339
10446
  #endif
10340
10447
  DUK_INTERNAL_DECL duk_bool_t duk_js_in(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y);
10341
10448
  DUK_INTERNAL_DECL duk_small_uint_t duk_js_typeof_stridx(duk_tval *tv_x);
10449
+ DUK_INTERNAL_DECL duk_bool_t duk_js_isarray_hobject(duk_hobject *h);
10450
+ DUK_INTERNAL_DECL duk_bool_t duk_js_isarray(duk_tval *tv);
10342
10451
 
10343
10452
  /* arithmetic */
10344
10453
  DUK_INTERNAL_DECL double duk_js_arith_pow(double x, double y);
@@ -10390,12 +10499,13 @@ DUK_INTERNAL_DECL void duk_js_push_closure(duk_hthread *thr,
10390
10499
  duk_bool_t add_auto_proto);
10391
10500
 
10392
10501
  /* call handling */
10502
+ DUK_INTERNAL_DECL void duk_native_stack_check(duk_hthread *thr);
10393
10503
  DUK_INTERNAL_DECL duk_int_t duk_handle_call_unprotected(duk_hthread *thr, duk_idx_t idx_func, duk_small_uint_t call_flags);
10394
10504
  DUK_INTERNAL_DECL duk_int_t duk_handle_call_unprotected_nargs(duk_hthread *thr, duk_idx_t nargs, duk_small_uint_t call_flags);
10395
10505
  DUK_INTERNAL_DECL duk_int_t duk_handle_safe_call(duk_hthread *thr, duk_safe_call_function func, void *udata, duk_idx_t num_stack_args, duk_idx_t num_stack_res);
10396
10506
  DUK_INTERNAL_DECL void duk_call_construct_postprocess(duk_hthread *thr, duk_small_uint_t proxy_invariant);
10397
10507
  #if defined(DUK_USE_VERBOSE_ERRORS)
10398
- DUK_INTERNAL_DECL void duk_call_setup_propcall_error(duk_hthread *thr, duk_tval *tv_targ, duk_tval *tv_base, duk_tval *tv_key);
10508
+ DUK_INTERNAL_DECL void duk_call_setup_propcall_error(duk_hthread *thr, duk_tval *tv_base, duk_tval *tv_key);
10399
10509
  #endif
10400
10510
 
10401
10511
  /* bytecode execution */
@@ -10786,7 +10896,7 @@ DUK_INTERNAL void duk_debug_log(const char *fmt, ...) {
10786
10896
  #if defined(DUK_USE_ROM_STRINGS)
10787
10897
  #error ROM support not enabled, rerun configure.py with --rom-support
10788
10898
  #else /* DUK_USE_ROM_STRINGS */
10789
- DUK_INTERNAL const duk_uint8_t duk_strings_data[967] = {
10899
+ DUK_INTERNAL const duk_uint8_t duk_strings_data[972] = {
10790
10900
  79,40,209,144,168,105,6,78,54,139,89,185,44,48,46,90,120,8,154,140,35,103,
10791
10901
  35,113,193,73,5,52,112,180,104,166,135,52,188,4,98,12,27,146,156,80,211,31,
10792
10902
  129,115,150,64,52,220,109,24,18,68,156,24,38,67,114,36,55,9,119,151,132,
@@ -10814,34 +10924,34 @@ DUK_INTERNAL const duk_uint8_t duk_strings_data[967] = {
10814
10924
  113,67,77,201,128,223,255,223,224,121,44,48,46,95,203,145,46,9,205,16,39,
10815
10925
  201,62,36,0,192,21,147,255,238,145,39,199,197,211,116,240,242,113,197,78,
10816
10926
  214,211,226,233,187,107,105,19,119,37,56,161,166,52,221,212,201,205,36,240,
10817
- 242,16,96,152,12,178,52,211,56,228,73,150,83,0,148,39,137,75,67,73,198,209,
10818
- 129,36,85,185,201,196,2,32,193,48,17,160,97,16,84,44,156,104,24,67,189,200,
10819
- 108,201,19,238,114,96,137,137,50,238,113,164,188,211,185,192,226,100,19,
10820
- 134,68,110,112,174,139,0,185,31,115,149,4,88,7,159,115,146,117,34,34,35,
10821
- 115,143,22,146,208,210,19,115,140,3,207,185,202,130,36,109,85,185,194,161,
10822
- 160,90,50,72,155,115,149,2,232,67,137,204,122,22,66,161,175,164,210,72,199,
10823
- 130,137,1,50,32,145,143,38,120,186,195,35,106,51,146,230,8,36,77,109,65,38,
10824
- 226,72,159,191,189,181,70,140,133,222,249,212,227,66,125,245,187,251,219,
10825
- 77,3,119,190,117,56,208,159,125,110,254,246,210,26,93,239,157,78,52,39,223,
10826
- 93,191,189,180,212,52,187,223,58,156,104,79,190,187,127,123,104,180,104,
10827
- 183,190,117,56,208,159,125,102,254,209,104,209,124,234,113,161,62,250,80,
10828
- 196,128,81,4,9,16,162,4,196,116,9,205,154,27,66,32,100,13,12,98,68,227,33,
10829
- 65,69,204,195,34,201,50,8,110,33,23,34,28,168,104,22,188,12,174,138,11,70,
10830
- 138,104,115,68,130,137,13,82,27,41,129,162,35,138,54,146,198,137,39,72,180,
10831
- 210,178,38,35,146,103,68,139,51,197,214,28,227,131,79,15,35,138,58,130,37,
10832
- 19,155,41,146,174,64,203,99,161,100,37,145,51,148,75,4,164,66,54,140,49,46,
10833
- 247,70,103,37,230,70,142,70,67,30,232,204,178,163,201,18,54,139,89,39,26,
10834
- 16,165,2,228,69,33,143,89,24,70,206,73,67,102,72,148,2,32,214,73,157,224,
10835
- 18,128,98,29,241,69,65,50,37,241,116,200,41,144,102,125,2,180,8,210,152,38,
10836
- 129,23,8,34,198,
10927
+ 242,16,96,152,12,26,20,164,137,150,70,154,103,28,137,50,202,96,18,132,241,
10928
+ 41,104,105,56,218,48,36,138,183,57,56,128,68,24,38,2,52,12,34,10,133,147,
10929
+ 141,3,8,119,185,13,153,34,125,206,76,17,49,38,93,206,52,151,154,119,56,28,
10930
+ 76,130,112,200,141,206,21,209,96,23,35,238,114,160,139,0,243,238,114,78,
10931
+ 164,68,68,110,113,226,210,90,26,66,110,113,128,121,247,57,80,68,141,170,
10932
+ 183,56,84,52,11,70,73,19,110,114,160,93,8,113,57,143,66,200,84,53,244,154,
10933
+ 73,24,240,81,32,38,68,18,49,228,207,23,88,100,109,70,114,92,193,4,137,173,
10934
+ 168,36,220,73,19,247,247,182,168,209,144,187,223,58,156,104,79,190,183,127,
10935
+ 123,105,160,110,247,206,167,26,19,239,173,223,222,218,67,75,189,243,169,
10936
+ 198,132,251,235,183,247,182,154,134,151,123,231,83,141,9,247,215,111,239,
10937
+ 109,22,141,22,247,206,167,26,19,239,172,223,218,45,26,47,157,78,52,39,223,
10938
+ 74,24,144,10,32,129,34,20,64,152,142,129,57,179,67,104,68,12,129,161,140,
10939
+ 72,156,100,40,40,185,152,100,89,38,65,13,196,34,228,67,149,13,2,215,129,
10940
+ 149,209,65,104,209,77,14,104,144,81,33,170,67,101,48,52,68,113,70,210,88,
10941
+ 209,36,233,22,154,86,68,196,114,76,232,145,102,120,186,195,156,112,105,225,
10942
+ 228,113,71,80,68,162,115,101,50,85,200,25,108,116,44,132,178,38,114,137,96,
10943
+ 148,136,70,209,134,37,222,232,204,228,188,200,209,200,200,99,221,25,150,84,
10944
+ 121,34,70,209,107,36,227,66,20,160,92,136,164,49,235,35,8,217,201,40,108,
10945
+ 201,18,128,68,26,201,51,188,2,80,12,67,190,40,168,38,68,190,46,153,5,50,12,
10946
+ 207,160,86,129,26,83,4,208,34,225,4,88,192,
10837
10947
  };
10838
10948
  #endif /* DUK_USE_ROM_STRINGS */
10839
10949
 
10840
10950
  #if defined(DUK_USE_ROM_OBJECTS)
10841
10951
  #error ROM support not enabled, rerun configure.py with --rom-support
10842
10952
  #else /* DUK_USE_ROM_OBJECTS */
10843
- /* native functions: 177 */
10844
- DUK_INTERNAL const duk_c_function duk_bi_native_functions[177] = {
10953
+ /* native functions: 185 */
10954
+ DUK_INTERNAL const duk_c_function duk_bi_native_functions[185] = {
10845
10955
  NULL,
10846
10956
  duk_bi_array_constructor,
10847
10957
  duk_bi_array_constructor_is_array,
@@ -10867,6 +10977,8 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[177] = {
10867
10977
  duk_bi_buffer_readfield,
10868
10978
  duk_bi_buffer_slice_shared,
10869
10979
  duk_bi_buffer_writefield,
10980
+ duk_bi_cbor_decode,
10981
+ duk_bi_cbor_encode,
10870
10982
  duk_bi_dataview_constructor,
10871
10983
  duk_bi_date_constructor,
10872
10984
  duk_bi_date_constructor_now,
@@ -10877,6 +10989,7 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[177] = {
10877
10989
  duk_bi_date_prototype_set_shared,
10878
10990
  duk_bi_date_prototype_set_time,
10879
10991
  duk_bi_date_prototype_to_json,
10992
+ duk_bi_date_prototype_toprimitive,
10880
10993
  duk_bi_date_prototype_tostring_shared,
10881
10994
  duk_bi_date_prototype_value_of,
10882
10995
  duk_bi_duktape_object_act,
@@ -10899,6 +11012,7 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[177] = {
10899
11012
  duk_bi_function_prototype_apply,
10900
11013
  duk_bi_function_prototype_bind,
10901
11014
  duk_bi_function_prototype_call,
11015
+ duk_bi_function_prototype_hasinstance,
10902
11016
  duk_bi_function_prototype_to_string,
10903
11017
  duk_bi_global_object_decode_uri,
10904
11018
  duk_bi_global_object_decode_uri_component,
@@ -11001,6 +11115,10 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[177] = {
11001
11115
  duk_bi_string_prototype_substring,
11002
11116
  duk_bi_string_prototype_to_string,
11003
11117
  duk_bi_string_prototype_trim,
11118
+ duk_bi_symbol_constructor_shared,
11119
+ duk_bi_symbol_key_for,
11120
+ duk_bi_symbol_toprimitive,
11121
+ duk_bi_symbol_tostring_shared,
11004
11122
  duk_bi_textdecoder_constructor,
11005
11123
  duk_bi_textdecoder_prototype_decode,
11006
11124
  duk_bi_textdecoder_prototype_shared_getter,
@@ -11021,577 +11139,604 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[177] = {
11021
11139
  duk_bi_uint8array_plainof,
11022
11140
  };
11023
11141
  #if defined(DUK_USE_DOUBLE_LE)
11024
- DUK_INTERNAL const duk_uint8_t duk_builtins_data[4116] = {
11025
- 144,148,105,224,32,68,52,228,62,12,104,200,165,132,52,167,194,138,105,243,
11026
- 124,57,28,211,57,18,64,52,238,126,44,138,111,171,241,164,19,87,129,30,33,
11027
- 167,16,145,159,8,211,136,9,225,42,5,240,145,139,163,163,8,211,136,10,228,
11028
- 64,211,19,132,140,93,29,56,70,156,64,119,34,66,146,36,104,137,194,70,46,
11029
- 142,172,35,78,32,47,146,195,102,11,240,145,139,163,175,8,211,136,9,228,240,
11030
- 242,112,145,139,163,179,8,211,136,8,237,34,130,118,49,116,118,225,26,48,0,
11031
- 1,82,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
11032
- 33,8,66,26,179,233,97,167,60,150,34,33,154,112,0,1,75,247,35,79,95,237,198,
11033
- 174,200,47,31,23,95,17,13,51,19,35,93,68,216,209,128,0,10,208,174,79,15,32,
11034
- 248,8,196,24,8,107,192,0,5,106,118,27,94,0,0,43,83,227,94,0,0,43,84,46,215,
11035
- 128,0,10,213,28,198,188,0,0,86,169,100,53,224,0,2,181,79,85,175,0,0,21,170,
11036
- 154,45,120,0,0,173,85,217,107,192,0,5,106,182,243,86,193,106,52,127,130,
11037
- 249,50,94,124,35,68,225,146,49,13,31,186,23,201,146,243,224,200,39,12,145,
11038
- 136,67,134,19,49,0,0,0,0,0,0,3,225,255,51,0,0,0,0,0,0,3,193,255,47,18,1,
11039
- 172,19,120,71,10,25,196,136,113,162,156,136,199,42,57,204,144,115,132,240,
11040
- 149,2,248,72,197,209,58,2,185,16,52,196,225,35,23,68,233,14,228,72,82,68,
11041
- 141,17,56,72,197,209,58,130,249,44,54,96,191,9,24,186,39,88,79,39,135,147,
11042
- 132,140,93,19,176,35,180,138,9,216,197,209,59,82,79,35,40,242,65,248,58,42,
11043
- 96,121,14,232,94,62,46,190,15,42,31,145,33,86,65,76,242,214,143,73,48,242,
11044
- 243,79,49,56,243,115,207,57,64,243,180,79,61,72,243,244,207,65,80,244,53,
11045
- 79,69,88,244,98,30,8,200,156,67,102,120,241,79,4,100,78,21,110,4,207,32,47,
11046
- 147,37,231,194,52,78,25,34,122,81,124,153,47,62,12,130,112,201,19,211,139,
11047
- 121,34,87,69,128,104,137,239,83,18,238,108,165,2,162,92,104,56,220,233,1,8,
11048
- 151,10,134,162,100,206,16,18,50,9,195,39,105,20,101,136,18,25,4,225,147,
11049
- 180,138,5,215,49,238,105,27,60,185,1,36,104,156,50,118,145,70,96,129,34,52,
11050
- 78,25,59,72,160,93,115,30,230,145,179,204,144,12,73,8,15,38,104,128,138,52,
11051
- 146,16,30,77,1,0,2,11,132,193,198,36,248,248,186,110,158,30,78,56,188,194,
11052
- 70,183,170,136,48,98,79,142,179,120,248,185,228,140,241,193,146,66,138,31,
11053
- 55,71,138,128,153,137,62,58,205,227,226,231,146,51,199,26,6,18,92,146,64,
11054
- 96,74,72,51,120,43,192,97,68,128,153,56,72,7,12,133,67,73,199,197,207,36,
11055
- 103,142,35,2,3,33,80,210,113,241,115,201,25,160,146,225,160,9,34,1,124,178,
11056
- 1,139,18,19,36,229,146,8,190,36,169,27,62,18,243,35,100,135,54,92,162,2,17,
11057
- 46,72,128,89,7,200,32,33,18,225,98,236,145,188,130,64,196,75,132,188,200,
11058
- 217,32,43,39,28,128,69,19,18,228,144,42,98,79,142,179,120,248,185,228,140,
11059
- 241,201,97,129,114,229,201,37,2,68,184,200,1,147,93,159,153,213,34,235,250,
11060
- 96,48,157,32,24,94,160,1,199,4,184,235,55,143,139,158,72,207,28,226,3,81,
11061
- 46,62,46,155,167,135,147,142,47,60,129,71,197,207,36,103,142,34,92,35,104,
11062
- 194,68,1,89,58,36,8,109,109,12,133,67,73,195,18,115,36,118,182,185,168,8,
11063
- 109,109,12,133,67,73,201,18,115,36,118,182,185,168,130,27,91,75,115,149,71,
11064
- 240,196,156,201,29,173,174,129,2,27,91,75,115,149,71,242,68,156,201,29,173,
11065
- 174,129,34,12,16,28,128,62,191,42,3,71,146,68,4,16,22,188,161,240,16,40,
11066
- 104,242,103,196,16,93,158,125,96,110,115,235,64,131,16,16,58,37,192,70,32,
11067
- 194,144,114,25,67,95,40,6,18,8,32,48,156,209,2,108,124,96,224,144,6,247,62,
11068
- 16,0,143,164,143,12,248,15,18,84,145,145,34,128,11,35,160,179,140,0,44,150,
11069
- 129,18,58,0,146,116,103,32,128,105,61,104,17,36,175,1,232,217,29,5,156,179,
11070
- 224,58,26,50,95,142,43,159,64,181,130,83,226,26,50,95,142,43,159,192,7,255,
11071
- 248,41,42,72,226,1,160,18,78,97,32,26,64,114,186,60,32,4,120,6,148,13,128,
11072
- 124,3,76,12,84,46,100,140,3,78,13,18,14,130,36,67,232,23,18,14,130,39,34,
11073
- 131,30,113,15,224,3,255,253,6,48,40,194,197,204,224,142,8,240,78,25,60,231,
11074
- 192,210,197,204,224,156,50,113,238,67,103,232,62,28,138,156,104,82,170,107,
11075
- 255,32,48,191,144,1,132,112,71,128,159,168,128,161,28,17,224,156,50,112,19,
11076
- 245,144,22,39,12,156,123,144,217,240,19,245,146,3,9,205,16,39,236,62,3,161,
11077
- 163,37,248,226,251,141,1,107,4,167,196,52,100,191,28,95,113,164,13,91,132,
11078
- 5,147,130,115,30,8,147,222,64,43,1,49,31,224,64,60,72,245,128,68,249,32,13,
11079
- 34,2,34,63,204,128,89,45,2,39,209,0,89,61,104,159,213,0,153,80,50,156,80,
11080
- 211,126,16,11,155,184,183,88,145,224,129,34,122,64,17,155,184,183,8,11,39,
11081
- 22,235,18,60,16,36,79,72,1,115,119,40,247,146,60,16,36,79,72,32,140,221,
11082
- 197,184,64,89,57,71,188,145,224,129,34,122,65,1,39,20,51,244,0,52,72,242,2,
11083
- 127,18,2,165,48,70,114,229,145,51,253,141,1,4,104,229,203,34,103,251,26,64,
11084
- 132,52,75,160,201,47,105,160,26,84,12,167,31,186,8,50,0,114,58,113,163,46,
11085
- 190,120,35,11,60,4,25,68,81,61,96,47,181,80,46,132,129,255,255,255,255,255,
11086
- 255,222,254,39,172,67,118,170,5,208,144,0,64,0,0,0,0,0,0,51,16,0,0,0,0,0,0,
11087
- 62,31,200,245,238,146,38,138,147,105,13,42,26,137,226,0,0,0,0,0,0,7,131,
11088
- 249,30,180,134,4,209,82,109,33,165,67,81,60,64,0,0,0,0,0,0,240,255,15,210,
11089
- 62,72,91,155,0,0,0,0,0,0,2,192,240,135,88,11,237,72,5,38,210,27,50,24,145,
11090
- 129,255,255,255,255,255,254,126,134,67,172,67,118,164,2,147,105,13,153,12,
11091
- 72,192,255,255,255,255,255,255,63,195,16,240,70,68,226,27,51,199,138,120,
11092
- 35,34,112,171,112,38,121,7,16,137,112,168,106,38,77,193,1,40,151,16,217,
11093
- 144,196,142,224,144,21,18,227,65,198,238,9,67,81,46,72,5,39,16,217,144,196,
11094
- 142,224,152,228,148,227,64,0,0,0,0,0,0,0,0,131,175,223,16,194,111,8,97,119,
11095
- 224,3,205,220,42,46,65,238,200,13,155,184,75,189,205,35,102,128,47,116,64,
11096
- 92,221,199,196,130,68,144,230,239,72,65,152,12,21,224,140,137,92,128,62,
11097
- 210,98,177,252,3,107,173,88,3,146,211,141,32,0,0,0,0,0,3,225,255,19,175,
11098
- 188,0,100,221,193,130,100,228,167,20,52,215,129,3,38,238,77,12,39,37,56,
11099
- 161,166,188,10,194,94,6,18,155,184,183,8,11,39,6,9,147,146,156,80,211,94,7,
11100
- 18,155,184,183,8,11,39,38,134,19,146,156,80,211,94,8,12,53,224,130,195,222,
11101
- 8,77,133,210,24,91,224,3,152,147,228,208,194,95,0,44,196,159,11,69,175,152,
11102
- 32,35,100,33,135,24,147,237,38,34,246,139,95,48,64,70,200,68,8,49,39,198,
11103
- 57,179,61,144,138,22,98,79,180,152,153,215,54,103,178,17,129,204,73,240,96,
11104
- 153,44,132,112,163,18,125,164,196,62,130,100,178,18,1,140,73,240,96,197,
11105
- 144,146,18,98,79,180,152,135,208,98,200,74,8,49,39,195,186,145,149,144,150,
11106
- 22,98,79,180,152,143,215,82,50,178,19,2,140,73,241,136,109,38,73,89,9,161,
11107
- 166,36,251,73,137,157,67,105,50,74,200,78,10,49,39,201,16,78,104,229,100,
11108
- 39,134,152,147,237,38,41,116,130,115,71,43,33,64,60,196,159,24,133,173,18,
11109
- 32,156,209,202,200,81,18,49,39,218,76,76,234,22,180,72,130,115,71,43,33,72,
11110
- 68,196,159,38,134,19,46,105,56,226,150,68,157,160,1,228,73,242,104,97,46,
11111
- 16,31,34,79,140,66,214,137,16,78,104,229,108,169,137,72,147,237,38,38,117,
11112
- 11,90,36,65,57,163,149,178,168,21,34,79,146,32,156,209,202,218,250,161,178,
11113
- 36,251,73,138,93,32,156,209,202,218,250,193,82,36,248,196,54,147,36,173,
11114
- 191,174,27,34,79,180,152,153,212,54,147,36,173,191,176,17,34,79,135,117,35,
11115
- 43,115,236,133,200,147,237,38,35,245,212,140,173,207,180,15,34,79,131,4,
11116
- 201,108,173,133,72,147,237,38,33,244,19,37,178,184,17,34,79,140,115,102,
11117
- 123,107,238,133,200,147,237,38,38,117,205,153,237,175,188,23,34,79,133,162,
11118
- 215,204,16,17,182,254,248,116,137,62,210,98,47,104,181,243,4,4,109,191,192,
11119
- 131,152,147,230,8,8,217,12,16,60,137,62,96,128,141,178,193,160,206,1,201,
11120
- 176,113,146,0,0,0,0,0,0,0,0,49,185,252,65,137,207,227,37,215,207,227,12,86,
11121
- 127,24,152,188,254,49,88,33,46,65,120,72,4,153,37,63,33,13,127,148,4,26,0,
11122
- 57,62,6,228,163,228,74,86,215,62,55,28,110,179,226,113,70,223,62,47,24,38,
11123
- 191,30,2,125,32,40,20,87,114,41,225,42,5,240,145,139,163,145,41,68,250,128,
11124
- 80,41,174,228,85,200,129,166,39,9,24,186,57,18,148,79,172,5,2,170,238,69,
11125
- 220,137,10,72,145,162,39,9,24,186,57,18,148,79,176,5,2,186,238,69,124,150,
11126
- 27,48,95,132,140,93,28,137,74,39,218,2,129,101,119,34,158,79,15,39,9,24,
11127
- 186,57,18,148,79,184,5,2,218,238,69,29,164,80,78,198,46,142,68,165,16,64,
11128
- 28,24,61,73,25,33,205,128,0,0,0,0,1,167,166,129,108,242,151,15,39,8,34,26,
11129
- 87,97,200,3,0,167,129,32,8,194,195,16,6,84,55,10,60,3,35,69,132,30,1,140,
11130
- 130,193,143,1,196,230,60,2,158,8,131,153,64,115,42,46,191,176,8,194,246,0,
11131
- 80,5,220,193,95,6,234,5,100,225,35,23,71,35,6,228,140,93,29,180,55,108,145,
11132
- 139,163,182,112,52,107,67,76,56,3,153,132,20,28,76,156,89,26,105,158,62,0,
11133
- 0,42,193,2,201,104,17,41,34,156,204,176,160,226,100,226,200,211,76,241,240,
11134
- 0,1,86,2,131,137,147,142,41,100,73,199,192,0,5,96,6,13,10,82,70,62,0,0,42,
11135
- 130,88,115,18,124,67,103,177,69,49,129,6,36,249,68,54,123,20,82,216,65,137,
11136
- 62,33,179,209,214,162,152,208,147,18,124,162,27,61,29,106,41,112,32,196,
11137
- 159,16,217,233,233,81,76,112,73,137,62,81,13,158,158,149,20,186,20,98,79,
11138
- 133,91,129,61,61,42,41,120,40,196,159,10,183,2,122,218,148,82,248,60,137,
11139
- 62,33,179,216,166,216,192,137,18,124,162,27,61,138,109,108,34,68,159,16,
11140
- 217,232,235,83,108,104,76,137,62,81,13,158,142,181,54,184,17,34,79,136,108,
11141
- 244,244,169,182,56,38,68,159,40,134,207,79,74,155,93,10,145,39,194,173,192,
11142
- 158,158,149,54,188,21,34,79,133,91,129,61,109,74,109,125,155,51,136,71,161,
11143
- 196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,7,129,249,155,51,168,71,
11144
- 161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,7,129,249,155,51,200,
11145
- 71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,7,129,249,155,51,
11146
- 232,71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,0,2,1,155,52,
11147
- 8,71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,0,2,1,155,52,40,
11148
- 71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,0,130,1,155,52,72,
11149
- 71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,0,130,1,155,52,
11150
- 104,71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,0,130,1,155,
11151
- 52,136,71,161,196,201,45,167,146,59,68,89,24,70,206,0,0,0,0,0,0,1,2,1,135,
11152
- 52,166,32,76,72,1,246,136,235,103,177,69,0,136,144,3,226,27,61,138,41,44,
11153
- 50,36,0,251,68,117,179,209,214,234,201,69,16,50,36,0,251,68,117,179,209,
11154
- 214,232,73,69,34,5,196,128,31,16,217,232,235,117,100,162,147,2,226,64,15,
11155
- 136,108,244,117,186,18,81,74,129,145,32,7,218,35,173,158,158,151,86,74,40,
11156
- 161,145,32,7,218,35,173,158,158,151,66,74,41,20,46,36,0,248,134,207,79,75,
11157
- 171,37,20,154,23,18,0,124,67,103,167,165,208,146,138,85,11,137,0,62,21,110,
11158
- 4,250,178,81,70,11,137,0,62,21,110,4,250,18,81,72,193,145,32,7,193,186,129,
11159
- 89,58,178,81,71,12,137,0,62,13,212,10,201,208,146,138,71,10,137,0,62,209,
11160
- 29,108,250,178,81,104,1,81,32,7,218,35,173,159,66,74,45,32,38,36,0,248,134,
11161
- 207,171,37,22,160,19,18,0,124,67,103,208,146,139,88,10,180,81,50,118,136,
11162
- 235,103,177,77,128,155,69,19,39,16,217,236,83,105,97,182,138,38,78,209,29,
11163
- 108,244,117,186,178,83,100,13,180,81,50,118,136,235,103,163,173,208,146,
11164
- 155,68,12,180,81,50,113,13,158,142,183,86,74,109,48,50,209,68,201,196,54,
11165
- 122,58,221,9,41,181,64,219,69,19,39,104,142,182,122,122,93,89,41,178,134,
11166
- 218,40,153,59,68,117,179,211,210,232,73,77,162,134,90,40,153,56,134,207,79,
11167
- 75,171,37,54,154,25,104,162,100,226,27,61,61,46,132,148,218,168,101,162,
11168
- 137,147,133,91,129,62,172,148,217,131,45,20,76,156,42,220,9,244,36,166,209,
11169
- 131,109,20,76,156,27,168,21,147,171,37,54,112,219,69,19,39,6,234,5,100,232,
11170
- 73,77,163,133,218,40,153,59,68,117,179,234,201,78,32,5,218,40,153,59,68,
11171
- 117,179,232,73,78,36,5,90,40,153,56,134,207,171,37,56,160,21,104,162,100,
11172
- 226,27,62,132,148,226,195,95,182,97,176,218,128,8,84,45,123,38,1,137,10,1,
11173
- 114,160,64,56,156,199,130,36,160,72,8,39,63,27,24,1,100,180,8,148,146,0,45,
11174
- 162,137,147,111,2,8,4,16,7,8,96,120,72,13,42,226,145,97,87,224,168,1,58,
11175
- 182,232,232,64,22,85,181,187,177,107,2,64,7,213,183,74,7,121,207,215,242,
11176
- 17,119,49,248,94,173,198,210,36,15,232,34,182,84,113,95,115,240,221,91,141,
11177
- 163,160,72,1,220,164,194,175,121,123,103,224,186,244,64,24,45,68,84,251,33,
11178
- 9,64,15,217,66,51,209,218,210,129,154,118,254,205,61,65,204,126,23,178,132,
11179
- 103,165,3,52,237,253,154,122,131,216,254,168,48,6,90,130,1,0,39,75,80,72,8,
11180
- 9,33,186,130,80,64,76,13,212,19,2,130,96,110,150,173,0,65,6,51,212,20,128,
11181
- 65,17,11,212,19,130,137,121,211,210,209,144,6,39,75,80,80,0,201,119,234,10,
11182
- 8,41,86,231,71,80,80,129,79,135,186,122,69,224,34,25,69,233,80,3,91,141,
11183
- 168,40,96,139,113,180,181,5,36,21,110,54,142,134,160,165,1,176,23,211,47,0,
11184
- 216,134,233,215,128,111,117,181,104,128,209,3,70,230,106,64,5,139,168,209,
11185
- 234,10,32,36,144,102,234,136,3,146,27,168,40,160,146,132,103,168,40,192,
11186
- 115,3,117,5,28,22,113,163,69,168,41,103,1,66,188,17,145,52,40,4,202,113,67,
11187
- 76,130,227,68,194,13,240,108,0,0,83,96,0,2,161,0,104,146,84,97,48,0,1,78,
11188
- 192,56,169,24,145,179,192,0,5,48,8,56,16,32,128,56,18,52,125,166,86,147,
11189
- 182,140,28,50,21,13,39,31,23,60,145,158,56,140,141,47,113,6,155,186,188,24,
11190
- 49,39,199,89,188,124,92,242,70,120,224,201,33,69,15,155,163,197,68,14,49,
11191
- 39,199,197,211,116,240,242,113,197,230,18,180,253,228,3,17,46,18,243,35,
11192
- 100,128,172,156,114,70,163,146,76,34,248,146,164,108,248,75,204,141,146,28,
11193
- 217,114,137,27,78,251,241,173,234,162,160,225,1,3,34,92,170,9,105,164,32,
11194
- 225,64,131,155,1,193,133,7,19,39,22,70,154,103,143,128,0,10,176,20,28,76,
11195
- 156,113,75,34,78,62,0,0,43,0,48,104,82,146,49,240,0,1,84,11,180,192,0,5,
11196
- 114,1,18,160,65,24,131,20,145,25,172,48,132,122,28,76,146,218,121,35,180,
11197
- 69,145,132,108,224,0,0,0,0,0,0,120,31,153,172,56,132,122,28,76,146,218,121,
11198
- 35,180,69,145,132,108,224,0,0,0,0,0,0,120,31,168,160,45,110,23,30,176,33,
11199
- 184,0,0,175,32,29,235,2,27,199,23,0,0,22,4,51,88,129,8,244,56,153,37,180,
11200
- 242,71,104,139,35,8,217,192,0,0,0,0,0,0,240,63,51,88,145,8,244,56,153,37,
11201
- 180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,0,64,51,88,161,8,244,56,153,37,
11202
- 180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,0,64,51,88,177,8,244,56,153,37,
11203
- 180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,88,193,8,244,56,153,
11204
- 37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,88,209,8,244,56,
11205
- 153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,88,225,8,244,
11206
- 56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,32,64,32,227,194,0,
11207
- 97,57,162,4,245,232,5,34,92,35,68,225,161,166,218,16,16,137,112,52,41,73,
11208
- 29,153,1,65,196,201,197,145,166,153,245,200,3,137,204,120,34,74,8,200,58,
11209
- 112,28,211,32,130,52,78,26,26,110,248,0,0,164,4,12,70,137,195,39,252,73,
11210
- 240,117,32,57,168,97,4,104,156,52,52,221,255,160,20,160,152,23,223,250,32,
11211
- 148,25,174,137,58,23,51,191,244,84,12,50,9,195,39,240,81,238,2,3,107,173,
11212
- 214,3,192,
11142
+ DUK_INTERNAL const duk_uint8_t duk_builtins_data[4281] = {
11143
+ 144,148,105,226,32,68,52,228,254,12,104,202,37,132,52,167,194,138,105,245,
11144
+ 124,57,28,211,57,18,64,52,239,126,44,138,111,175,241,164,19,87,145,30,33,
11145
+ 167,22,145,159,8,211,139,9,225,42,5,240,145,139,163,163,8,211,139,10,228,
11146
+ 64,211,19,132,140,93,29,56,70,156,88,119,34,66,146,36,104,137,194,70,46,
11147
+ 142,172,35,78,44,47,146,195,102,11,240,145,139,163,175,8,211,139,9,228,240,
11148
+ 242,112,145,139,163,179,8,211,139,8,237,34,130,118,49,116,118,225,26,48,0,
11149
+ 1,98,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
11150
+ 33,8,66,26,180,105,97,167,68,150,34,33,154,112,0,1,91,247,35,79,111,237,
11151
+ 198,174,232,47,31,23,95,17,13,31,249,96,211,49,50,53,214,77,141,24,0,0,181,
11152
+ 10,228,240,242,15,128,140,65,128,134,188,0,0,90,167,97,181,224,0,2,213,62,
11153
+ 53,224,0,2,213,66,237,120,0,0,181,81,204,107,192,0,5,170,150,67,94,0,0,45,
11154
+ 84,245,90,240,0,1,106,169,162,215,128,0,11,85,93,150,188,0,0,90,171,111,53,
11155
+ 109,22,162,26,48,0,1,84,23,201,146,243,225,26,39,12,145,136,104,192,0,5,61,
11156
+ 11,228,201,121,240,100,19,134,72,196,33,195,14,40,203,112,64,190,76,232,
11157
+ 145,153,136,0,0,0,0,0,0,31,15,249,152,0,0,0,0,0,0,30,15,249,120,144,13,96,
11158
+ 155,194,56,80,206,36,67,141,20,228,70,57,81,206,100,131,156,39,132,168,23,
11159
+ 194,70,46,137,208,21,200,129,166,39,9,24,186,39,72,119,34,66,146,36,104,
11160
+ 137,194,70,46,137,212,23,201,97,179,5,248,72,197,209,58,194,121,60,60,156,
11161
+ 36,98,232,157,129,29,164,80,78,198,46,137,218,146,121,25,71,146,9,209,5,
11162
+ 209,61,48,126,14,138,152,30,67,186,23,143,139,175,131,202,135,228,72,85,
11163
+ 144,83,60,179,30,94,209,233,102,30,98,105,230,103,30,114,121,231,104,30,
11164
+ 122,137,231,233,30,130,153,232,106,30,138,169,232,235,30,144,67,193,25,19,
11165
+ 136,108,207,30,41,224,140,137,194,173,192,153,228,5,242,100,188,248,70,137,
11166
+ 195,36,79,78,47,147,37,231,193,144,78,25,34,122,145,111,36,74,232,176,13,
11167
+ 17,61,234,226,93,207,148,160,84,75,141,7,27,161,32,33,18,225,80,212,76,154,
11168
+ 2,2,70,65,56,100,237,34,140,209,2,67,32,156,50,118,145,64,186,230,61,205,
11169
+ 35,103,155,32,36,141,19,134,78,210,40,206,16,36,70,137,195,39,105,20,11,
11170
+ 174,99,220,210,54,121,210,1,137,33,1,228,207,16,17,70,146,66,3,201,164,32,
11171
+ 0,65,112,152,56,196,159,31,23,77,211,195,201,199,23,160,72,214,246,81,6,12,
11172
+ 73,241,214,111,31,23,60,145,158,56,50,72,81,67,230,232,242,80,19,49,39,199,
11173
+ 89,188,124,92,242,70,120,227,64,194,75,154,72,12,9,73,6,111,21,120,12,40,
11174
+ 144,19,39,25,0,225,144,168,105,56,248,185,228,140,241,200,96,64,100,42,26,
11175
+ 78,62,46,121,35,52,18,92,116,1,36,64,47,158,64,49,98,66,100,156,242,65,23,
11176
+ 196,149,35,103,194,94,100,108,144,230,203,156,64,66,37,201,16,11,32,249,
11177
+ 132,4,34,92,44,93,146,55,152,72,24,137,112,151,153,27,36,5,100,229,144,8,
11178
+ 162,98,92,210,5,76,73,241,214,111,31,23,60,145,158,57,44,48,46,92,185,164,
11179
+ 160,72,151,41,0,50,107,179,244,59,36,93,127,92,6,19,172,3,11,216,0,56,224,
11180
+ 151,29,102,241,241,115,201,25,227,164,64,106,37,199,197,211,116,240,242,
11181
+ 113,197,233,144,40,248,185,228,140,241,196,75,132,109,24,72,128,43,39,84,
11182
+ 129,13,173,161,144,168,105,56,98,78,100,142,214,215,69,1,13,173,161,144,
11183
+ 168,105,57,34,78,100,142,214,215,69,16,67,107,105,110,114,168,254,24,147,
11184
+ 153,35,181,181,212,32,67,107,105,110,114,168,254,72,147,153,35,181,181,212,
11185
+ 36,65,130,3,144,8,26,252,200,13,30,85,16,16,64,90,242,231,192,64,161,163,
11186
+ 203,31,26,172,193,17,4,23,105,159,96,27,172,251,16,32,196,4,14,137,112,17,
11187
+ 136,48,164,28,134,80,215,202,1,132,130,8,12,39,52,64,155,31,24,56,36,1,189,
11188
+ 207,132,0,35,233,35,195,62,3,196,149,36,100,72,160,2,200,232,44,227,0,11,
11189
+ 37,160,68,142,128,36,157,25,200,32,26,79,90,4,73,43,192,122,54,71,65,103,
11190
+ 44,248,14,134,140,151,227,138,231,208,45,96,148,248,134,140,151,227,138,
11191
+ 231,240,1,255,254,10,74,146,56,128,104,4,147,152,72,6,144,28,174,143,8,1,
11192
+ 30,1,165,3,96,31,0,211,3,21,11,153,35,0,211,131,68,131,160,137,16,250,5,
11193
+ 196,131,160,137,200,160,199,156,67,248,0,255,255,65,140,10,48,177,115,56,
11194
+ 35,130,60,19,134,79,89,240,52,177,115,56,39,12,156,123,144,217,251,15,135,
11195
+ 34,167,30,20,170,154,255,232,12,47,244,0,97,28,17,224,39,238,32,40,71,4,
11196
+ 120,39,12,156,4,253,228,5,137,195,39,30,228,54,124,4,253,228,128,194,115,
11197
+ 68,9,252,15,128,232,104,201,126,56,191,35,64,90,193,41,241,13,25,47,199,23,
11198
+ 228,105,3,86,225,1,100,224,156,199,130,36,249,144,10,192,76,71,250,16,15,
11199
+ 18,61,96,17,62,200,3,72,128,136,143,247,32,22,75,64,137,248,64,22,79,90,39,
11200
+ 249,64,38,84,12,167,20,52,223,196,2,230,238,45,214,36,120,32,72,158,208,4,
11201
+ 102,238,45,194,2,201,197,186,196,143,4,9,19,218,0,92,221,202,61,228,143,4,
11202
+ 9,19,218,8,35,55,113,110,16,22,78,81,239,36,120,32,72,158,208,64,73,197,12,
11203
+ 255,0,13,18,60,128,159,212,128,169,76,17,156,185,100,76,255,163,64,65,26,
11204
+ 57,114,200,153,255,70,144,33,13,18,232,50,75,226,104,6,149,3,41,199,246,
11205
+ 130,12,128,28,142,156,120,203,175,158,8,194,207,1,6,81,20,79,88,11,237,84,
11206
+ 11,161,32,127,255,255,255,255,255,247,191,137,235,16,221,170,129,116,36,0,
11207
+ 16,0,0,0,0,0,0,12,196,0,0,0,0,0,0,15,135,242,61,123,164,137,162,164,218,67,
11208
+ 74,134,162,120,128,0,0,0,0,0,1,224,254,71,173,33,129,52,84,155,72,105,80,
11209
+ 212,79,16,0,0,0,0,0,0,60,63,195,244,143,146,22,230,192,0,0,0,0,0,0,176,60,
11210
+ 33,214,2,251,82,1,73,180,134,204,134,36,96,127,255,255,255,255,255,159,161,
11211
+ 144,235,16,221,169,0,164,218,67,102,67,18,48,63,255,255,255,255,255,207,
11212
+ 240,196,60,17,145,56,134,204,241,226,158,8,200,156,42,220,9,158,65,196,34,
11213
+ 92,42,26,137,147,120,64,74,37,196,54,100,49,35,188,36,5,68,184,208,113,187,
11214
+ 194,80,212,75,146,1,73,196,54,100,49,35,188,38,57,37,56,240,0,0,0,0,0,0,0,
11215
+ 0,32,235,248,68,48,156,2,24,94,24,0,243,119,10,139,144,123,242,3,102,238,
11216
+ 18,239,115,72,217,160,11,223,16,23,55,113,241,32,145,36,57,188,18,16,102,3,
11217
+ 5,120,35,34,89,32,15,180,152,173,127,0,218,235,88,0,228,180,227,200,0,0,0,
11218
+ 0,0,0,248,127,197,107,240,64,6,77,220,24,38,78,74,113,67,77,130,4,12,155,
11219
+ 185,52,48,156,148,226,134,155,4,10,194,96,129,132,166,238,45,194,2,201,193,
11220
+ 130,100,228,167,20,52,216,32,113,41,187,139,112,128,178,114,104,97,57,41,
11221
+ 197,13,54,8,32,48,216,32,130,195,224,130,19,97,124,134,23,6,0,57,137,62,77,
11222
+ 12,38,12,0,179,18,124,45,22,190,96,128,141,176,134,28,98,79,180,152,139,
11223
+ 218,45,124,193,1,27,97,16,32,196,159,24,230,204,246,194,40,89,137,62,210,
11224
+ 98,103,92,217,158,216,70,7,49,39,193,130,100,182,17,194,140,73,246,147,16,
11225
+ 250,9,146,216,72,6,49,39,193,131,22,194,72,73,137,62,210,98,31,65,139,97,
11226
+ 40,32,196,159,14,234,70,86,194,88,89,137,62,210,98,63,93,72,202,216,76,10,
11227
+ 49,39,198,33,180,153,37,108,38,134,152,147,237,38,38,117,13,164,201,43,97,
11228
+ 56,40,196,159,36,65,57,163,149,176,158,26,98,79,180,152,165,210,9,205,28,
11229
+ 173,133,0,243,18,124,98,22,180,72,130,115,71,43,97,68,72,196,159,105,49,51,
11230
+ 168,90,209,34,9,205,28,173,133,33,19,18,124,154,24,76,185,164,227,138,89,
11231
+ 18,119,0,7,145,39,201,161,132,188,64,124,137,62,49,11,90,36,65,57,163,149,
11232
+ 210,166,37,34,79,180,152,153,212,45,104,145,4,230,142,87,74,160,84,137,62,
11233
+ 72,130,115,71,43,171,234,134,200,147,237,38,41,116,130,115,71,43,171,235,5,
11234
+ 72,147,227,16,218,76,146,186,254,184,108,137,62,210,98,103,80,218,76,146,
11235
+ 186,254,192,68,137,62,29,212,140,174,207,178,23,34,79,180,152,143,215,82,
11236
+ 50,187,62,208,60,137,62,12,19,37,210,182,21,34,79,180,152,135,208,76,151,
11237
+ 74,224,68,137,62,49,205,153,238,175,186,23,34,79,180,152,153,215,54,103,
11238
+ 186,190,240,92,137,62,22,139,95,48,64,70,235,251,225,210,36,251,73,136,189,
11239
+ 162,215,204,16,17,186,255,2,14,98,79,152,32,35,108,48,64,242,36,249,130,2,
11240
+ 55,75,6,212,224,72,200,51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,
11241
+ 48,98,115,249,201,117,243,249,195,21,159,206,38,47,63,156,86,8,75,144,94,
11242
+ 82,1,38,73,79,208,67,95,233,1,6,128,14,79,129,186,40,249,18,149,182,207,
11243
+ 144,200,155,188,248,204,105,184,207,142,199,137,175,201,0,159,72,10,5,21,
11244
+ 221,10,120,74,129,124,36,98,232,228,74,81,62,160,20,10,107,186,21,114,32,
11245
+ 105,137,194,70,46,142,68,165,19,235,1,64,170,187,161,119,34,66,146,36,104,
11246
+ 137,194,70,46,142,68,165,19,236,1,64,174,187,161,95