Browse code

app_jsdt: updated duktape js engine to v2.3.0

Daniel-Constantin Mierla authored on 06/12/2018 08:48:37
Showing 3 changed files
... ...
@@ -1,9 +1,9 @@
1 1
 /*
2 2
  *  duk_config.h configuration header generated by genconfig.py.
3 3
  *
4
- *  Git commit: 25420e773c5fbc50d5b46bf487fc45717e35b94f
5
- *  Git describe: v2.2.1
6
- *  Git branch: v2.2-maintenance
4
+ *  Git commit: d7fdb67f18561a50e06bafd196c6b423af9ad6fe
5
+ *  Git describe: v2.3.0
6
+ *  Git branch: master
7 7
  *
8 8
  *  Supported platforms:
9 9
  *      - Mac OSX, iPhone, Darwin
... ...
@@ -218,12 +218,6 @@
218 218
 #define DUK_F_UNIX
219 219
 #endif
220 220
 
221
-/* C++ */
222
-#undef DUK_F_CPP
223
-#if defined(__cplusplus)
224
-#define DUK_F_CPP
225
-#endif
226
-
227 221
 /* Intel x86 (32-bit), x64 (64-bit) or x32 (64-bit but 32-bit pointers),
228 222
  * define only one of DUK_F_X86, DUK_F_X64, DUK_F_X32.
229 223
  * https://sites.google.com/site/x32abi/
... ...
@@ -301,6 +295,12 @@
301 301
 #define DUK_F_CLANG
302 302
 #endif
303 303
 
304
+/* C++ */
305
+#undef DUK_F_CPP
306
+#if defined(__cplusplus)
307
+#define DUK_F_CPP
308
+#endif
309
+
304 310
 /* C99 or above */
305 311
 #undef DUK_F_C99
306 312
 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
... ...
@@ -836,9 +836,7 @@
836 836
 #include <stdint.h>
837 837
 #endif
838 838
 
839
-#if defined(DUK_F_CPP)
840
-#include <exception>  /* std::exception */
841
-#endif
839
+/* <exception> is only included if needed, based on DUK_USE_xxx flags. */
842 840
 
843 841
 /*
844 842
  *  Architecture autodetection
... ...
@@ -850,13 +848,16 @@
850 850
 #if !defined(DUK_USE_BYTEORDER)
851 851
 #define DUK_USE_BYTEORDER 1
852 852
 #endif
853
-/* XXX: This is technically not guaranteed because it's possible to configure
854
- * an x86 to require aligned accesses with Alignment Check (AC) flag.
853
+
854
+#define DUK_USE_PACKED_TVAL
855
+
856
+/* FreeBSD, -m32, and clang prior to 5.0 has union aliasing issues which
857
+ * break duk_tval copying.  Disable packed duk_tval automatically.
855 858
  */
856
-#if !defined(DUK_USE_ALIGN_BY)
857
-#define DUK_USE_ALIGN_BY 1
859
+#if defined(DUK_F_FREEBSD) && defined(DUK_F_X86) && \
860
+    defined(__clang__) && defined(__clang_major__) && (__clang_major__ < 5)
861
+#undef DUK_USE_PACKED_TVAL
858 862
 #endif
859
-#define DUK_USE_PACKED_TVAL
860 863
 #define DUK_F_PACKED_TVAL_PROVIDED
861 864
 #elif defined(DUK_F_X64)
862 865
 /* --- x64 --- */
... ...
@@ -864,12 +865,6 @@
864 864
 #if !defined(DUK_USE_BYTEORDER)
865 865
 #define DUK_USE_BYTEORDER 1
866 866
 #endif
867
-/* XXX: This is technically not guaranteed because it's possible to configure
868
- * an x86 to require aligned accesses with Alignment Check (AC) flag.
869
- */
870
-#if !defined(DUK_USE_ALIGN_BY)
871
-#define DUK_USE_ALIGN_BY 1
872
-#endif
873 867
 #undef DUK_USE_PACKED_TVAL
874 868
 #define DUK_F_PACKED_TVAL_PROVIDED
875 869
 #elif defined(DUK_F_X32)
... ...
@@ -878,48 +873,30 @@
878 878
 #if !defined(DUK_USE_BYTEORDER)
879 879
 #define DUK_USE_BYTEORDER 1
880 880
 #endif
881
-/* XXX: This is technically not guaranteed because it's possible to configure
882
- * an x86 to require aligned accesses with Alignment Check (AC) flag.
883
- */
884
-#if !defined(DUK_USE_ALIGN_BY)
885
-#define DUK_USE_ALIGN_BY 1
886
-#endif
887 881
 #define DUK_USE_PACKED_TVAL
888 882
 #define DUK_F_PACKED_TVAL_PROVIDED
889 883
 #elif defined(DUK_F_ARM32)
890 884
 /* --- ARM 32-bit --- */
891 885
 #define DUK_USE_ARCH_STRING "arm32"
892 886
 /* Byte order varies, so rely on autodetect. */
893
-#if !defined(DUK_USE_ALIGN_BY)
894
-#define DUK_USE_ALIGN_BY 4
895
-#endif
896 887
 #define DUK_USE_PACKED_TVAL
897 888
 #define DUK_F_PACKED_TVAL_PROVIDED
898 889
 #elif defined(DUK_F_ARM64)
899 890
 /* --- ARM 64-bit --- */
900 891
 #define DUK_USE_ARCH_STRING "arm64"
901 892
 /* Byte order varies, so rely on autodetect. */
902
-#if !defined(DUK_USE_ALIGN_BY)
903
-#define DUK_USE_ALIGN_BY 8
904
-#endif
905 893
 #undef DUK_USE_PACKED_TVAL
906 894
 #define DUK_F_PACKED_TVAL_PROVIDED
907 895
 #elif defined(DUK_F_MIPS32)
908 896
 /* --- MIPS 32-bit --- */
909 897
 #define DUK_USE_ARCH_STRING "mips32"
910 898
 /* MIPS byte order varies so rely on autodetection. */
911
-#if !defined(DUK_USE_ALIGN_BY)
912
-#define DUK_USE_ALIGN_BY 8
913
-#endif
914 899
 #define DUK_USE_PACKED_TVAL
915 900
 #define DUK_F_PACKED_TVAL_PROVIDED
916 901
 #elif defined(DUK_F_MIPS64)
917 902
 /* --- MIPS 64-bit --- */
918 903
 #define DUK_USE_ARCH_STRING "mips64"
919 904
 /* MIPS byte order varies so rely on autodetection. */
920
-#if !defined(DUK_USE_ALIGN_BY)
921
-#define DUK_USE_ALIGN_BY 8
922
-#endif
923 905
 #undef DUK_USE_PACKED_TVAL
924 906
 #define DUK_F_PACKED_TVAL_PROVIDED
925 907
 #elif defined(DUK_F_PPC32)
... ...
@@ -928,9 +905,6 @@
928 928
 #if !defined(DUK_USE_BYTEORDER)
929 929
 #define DUK_USE_BYTEORDER 3
930 930
 #endif
931
-#if !defined(DUK_USE_ALIGN_BY)
932
-#define DUK_USE_ALIGN_BY 8
933
-#endif
934 931
 #define DUK_USE_PACKED_TVAL
935 932
 #define DUK_F_PACKED_TVAL_PROVIDED
936 933
 #elif defined(DUK_F_PPC64)
... ...
@@ -939,39 +913,24 @@
939 939
 #if !defined(DUK_USE_BYTEORDER)
940 940
 #define DUK_USE_BYTEORDER 3
941 941
 #endif
942
-#if !defined(DUK_USE_ALIGN_BY)
943
-#define DUK_USE_ALIGN_BY 8
944
-#endif
945 942
 #undef DUK_USE_PACKED_TVAL
946 943
 #define DUK_F_PACKED_TVAL_PROVIDED
947 944
 #elif defined(DUK_F_SPARC32)
948 945
 /* --- SPARC 32-bit --- */
949 946
 #define DUK_USE_ARCH_STRING "sparc32"
950 947
 /* SPARC byte order varies so rely on autodetection. */
951
-#if !defined(DUK_USE_ALIGN_BY)
952
-#define DUK_USE_ALIGN_BY 8
953
-#endif
954 948
 #define DUK_USE_PACKED_TVAL
955 949
 #define DUK_F_PACKED_TVAL_PROVIDED
956 950
 #elif defined(DUK_F_SPARC64)
957 951
 /* --- SPARC 64-bit --- */
958 952
 #define DUK_USE_ARCH_STRING "sparc64"
959 953
 /* SPARC byte order varies so rely on autodetection. */
960
-#if !defined(DUK_USE_ALIGN_BY)
961
-#define DUK_USE_ALIGN_BY 8
962
-#endif
963 954
 #undef DUK_USE_PACKED_TVAL
964 955
 #define DUK_F_PACKED_TVAL_PROVIDED
965 956
 #elif defined(DUK_F_SUPERH)
966 957
 /* --- SuperH --- */
967 958
 #define DUK_USE_ARCH_STRING "sh"
968 959
 /* Byte order varies, rely on autodetection. */
969
-/* Based on 'make checkalign' there are no alignment requirements on
970
- * Linux SH4, but align by 4 is probably a good basic default.
971
- */
972
-#if !defined(DUK_USE_ALIGN_BY)
973
-#define DUK_USE_ALIGN_BY 4
974
-#endif
975 960
 #define DUK_USE_PACKED_TVAL
976 961
 #define DUK_F_PACKED_TVAL_PROVIDED
977 962
 #elif defined(DUK_F_M68K)
... ...
@@ -980,9 +939,6 @@
980 980
 #if !defined(DUK_USE_BYTEORDER)
981 981
 #define DUK_USE_BYTEORDER 3
982 982
 #endif
983
-#if !defined(DUK_USE_ALIGN_BY)
984
-#define DUK_USE_ALIGN_BY 8
985
-#endif
986 983
 #define DUK_USE_PACKED_TVAL
987 984
 #define DUK_F_PACKED_TVAL_PROVIDED
988 985
 #elif defined(DUK_F_EMSCRIPTEN)
... ...
@@ -991,9 +947,6 @@
991 991
 #if !defined(DUK_USE_BYTEORDER)
992 992
 #define DUK_USE_BYTEORDER 1
993 993
 #endif
994
-#if !defined(DUK_USE_ALIGN_BY)
995
-#define DUK_USE_ALIGN_BY 8
996
-#endif
997 994
 #undef DUK_USE_PACKED_TVAL
998 995
 #define DUK_F_PACKED_TVAL_PROVIDED
999 996
 #else
... ...
@@ -2540,10 +2493,13 @@ typedef struct duk_hthread duk_context;
2540 2540
  *
2541 2541
  *  Assume unaligned accesses are not supported unless specifically allowed
2542 2542
  *  in the target platform.  Some platforms may support unaligned accesses
2543
- *  but alignment to 4 or 8 may still be desirable.
2543
+ *  but alignment to 4 or 8 may still be desirable.  Note that unaligned
2544
+ *  accesses (and even pointers) relative to natural alignment (regardless
2545
+ *  of target alignment) are technically undefined behavior and thus
2546
+ *  compiler/architecture specific.
2544 2547
  */
2545 2548
 
2546
-/* If not provided, use safe default for alignment. */
2549
+/* If not forced, use safe default for alignment. */
2547 2550
 #if !defined(DUK_USE_ALIGN_BY)
2548 2551
 #define DUK_USE_ALIGN_BY 8
2549 2552
 #endif
... ...
@@ -2595,6 +2551,7 @@ typedef struct duk_hthread duk_context;
2595 2595
  */
2596 2596
 #define DUK_CAUSE_SEGFAULT()  do { *((volatile duk_uint32_t *) NULL) = (duk_uint32_t) 0xdeadbeefUL; } while (0)
2597 2597
 #endif
2598
+
2598 2599
 #if !defined(DUK_UNREF)
2599 2600
 /* Macro for suppressing warnings for potentially unreferenced variables.
2600 2601
  * The variables can be actually unreferenced or unreferenced in some
... ...
@@ -2604,9 +2561,24 @@ typedef struct duk_hthread duk_context;
2604 2604
  */
2605 2605
 #define DUK_UNREF(x)  do { (void) (x); } while (0)
2606 2606
 #endif
2607
-#if !defined(DUK_NORETURN)
2607
+
2608
+/* Fillin for DUK_NORETURN; DUK_WO_NORETURN() is used to insert dummy
2609
+ * dummy statements after noreturn calls to silence harmless compiler
2610
+ * warnings, e.g.:
2611
+ *
2612
+ *   DUK_ERROR_TYPE(thr, "aiee");
2613
+ *   DUK_WO_NORETURN(return 0;);
2614
+ *
2615
+ * Statements inside DUK_WO_NORETURN() must NEVER be actually reachable,
2616
+ * and they're only included to satisfy the compiler.
2617
+ */
2618
+#if defined(DUK_NORETURN)
2619
+#define DUK_WO_NORETURN(stmt) do { } while (0)
2620
+#else
2608 2621
 #define DUK_NORETURN(decl)  decl
2622
+#define DUK_WO_NORETURN(stmt) do { stmt } while (0)
2609 2623
 #endif
2624
+
2610 2625
 #if !defined(DUK_UNREACHABLE)
2611 2626
 /* Don't know how to declare unreachable point, so don't do it; this
2612 2627
  * may cause some spurious compilation warnings (e.g. "variable used
... ...
@@ -2614,6 +2586,7 @@ typedef struct duk_hthread duk_context;
2614 2614
  */
2615 2615
 #define DUK_UNREACHABLE()  do { } while (0)
2616 2616
 #endif
2617
+
2617 2618
 #if !defined(DUK_LOSE_CONST)
2618 2619
 /* Convert any input pointer into a "void *", losing a const qualifier.
2619 2620
  * This is not fully portable because casting through duk_uintptr_t may
... ...
@@ -2781,8 +2754,8 @@ typedef struct duk_hthread duk_context;
2781 2781
 #if defined(DUK_F_PACKED_TVAL_POSSIBLE)
2782 2782
 #define DUK_USE_PACKED_TVAL
2783 2783
 #endif
2784
-
2785 2784
 #undef DUK_F_PACKED_TVAL_POSSIBLE
2785
+
2786 2786
 #endif  /* DUK_F_PACKED_TVAL_PROVIDED */
2787 2787
 /* Object property allocation layout has implications for memory and code
2788 2788
  * footprint and generated code size/speed.  The best layout also depends
... ...
@@ -2817,6 +2790,7 @@ typedef struct duk_hthread duk_context;
2817 2817
  *  Autogenerated defaults
2818 2818
  */
2819 2819
 
2820
+#undef DUK_USE_ALLOW_UNDEFINED_BEHAVIOR
2820 2821
 #define DUK_USE_ARRAY_BUILTIN
2821 2822
 #define DUK_USE_ARRAY_FASTPATH
2822 2823
 #define DUK_USE_ARRAY_PROP_FASTPATH
... ...
@@ -2825,6 +2799,7 @@ typedef struct duk_hthread duk_context;
2825 2825
 #define DUK_USE_AUGMENT_ERROR_THROW
2826 2826
 #define DUK_USE_AVOID_PLATFORM_FUNCPTRS
2827 2827
 #define DUK_USE_BASE64_FASTPATH
2828
+#define DUK_USE_BASE64_SUPPORT
2828 2829
 #define DUK_USE_BOOLEAN_BUILTIN
2829 2830
 #define DUK_USE_BUFFEROBJECT_SUPPORT
2830 2831
 #undef DUK_USE_BUFLEN16
... ...
@@ -2902,6 +2877,7 @@ typedef struct duk_hthread duk_context;
2902 2902
 #undef DUK_USE_HEAPPTR_DEC16
2903 2903
 #undef DUK_USE_HEAPPTR_ENC16
2904 2904
 #define DUK_USE_HEX_FASTPATH
2905
+#define DUK_USE_HEX_SUPPORT
2905 2906
 #define DUK_USE_HOBJECT_ARRAY_ABANDON_LIMIT 2
2906 2907
 #define DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT 9
2907 2908
 #define DUK_USE_HOBJECT_ARRAY_MINGROW_ADD 16
... ...
@@ -2932,11 +2908,10 @@ typedef struct duk_hthread duk_context;
2932 2932
 #define DUK_USE_JX
2933 2933
 #define DUK_USE_LEXER_SLIDING_WINDOW
2934 2934
 #undef DUK_USE_LIGHTFUNC_BUILTINS
2935
+#define DUK_USE_LITCACHE_SIZE 256
2935 2936
 #define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256
2936 2937
 #define DUK_USE_MATH_BUILTIN
2937 2938
 #define DUK_USE_NATIVE_CALL_RECLIMIT 1000
2938
-#define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER
2939
-#define DUK_USE_NONSTD_ARRAY_MAP_TRAILER
2940 2939
 #define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT
2941 2940
 #undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY
2942 2941
 #undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY
... ...
@@ -3012,6 +2987,15 @@ typedef struct duk_hthread duk_context;
3012 3012
 /* __OVERRIDE_DEFINES__ */
3013 3013
 
3014 3014
 /*
3015
+ *  Conditional includes
3016
+ */
3017
+
3018
+#if defined(DUK_F_CPP) && defined(DUK_USE_CPP_EXCEPTIONS)
3019
+#include <exception>  /* std::exception */
3020
+#include <stdexcept>  /* std::runtime_error */
3021
+#endif
3022
+
3023
+/*
3015 3024
  *  Date provider selection
3016 3025
  *
3017 3026
  *  User may define DUK_USE_DATE_GET_NOW() etc directly, in which case we'll
... ...
@@ -3552,6 +3536,12 @@ typedef struct duk_hthread duk_context;
3552 3552
 #if defined(DUK_USE_MS_STRINGTABLE_RESIZE)
3553 3553
 #error unsupported config option used (option has been removed): DUK_USE_MS_STRINGTABLE_RESIZE
3554 3554
 #endif
3555
+#if defined(DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER)
3556
+#error unsupported config option used (option has been removed): DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER
3557
+#endif
3558
+#if defined(DUK_USE_NONSTD_ARRAY_MAP_TRAILER)
3559
+#error unsupported config option used (option has been removed): DUK_USE_NONSTD_ARRAY_MAP_TRAILER
3560
+#endif
3555 3561
 #if defined(DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE)
3556 3562
 #error unsupported config option used (option has been removed): DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE
3557 3563
 #endif
... ...
@@ -1,8 +1,8 @@
1 1
 /*
2
- *  Single source autogenerated distributable for Duktape 2.2.1.
2
+ *  Single source autogenerated distributable for Duktape 2.3.0.
3 3
  *
4
- *  Git commit 25420e773c5fbc50d5b46bf487fc45717e35b94f (v2.2.1).
5
- *  Git branch v2.2-maintenance.
4
+ *  Git commit d7fdb67f18561a50e06bafd196c6b423af9ad6fe (v2.3.0).
5
+ *  Git branch master.
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-2017 by Duktape authors (see AUTHORS.rst)
19
+*  Copyright (c) 2013-2018 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
... ...
@@ -87,6 +87,14 @@
87 87
 *  * Steven Don (https://github.com/shdon)
88 88
 *  * Simon Stone (https://github.com/sstone1)
89 89
 *  * \J. McC. (https://github.com/jmhmccr)
90
+*  * Jakub Nowakowski (https://github.com/jimvonmoon)
91
+*  * Tommy Nguyen (https://github.com/tn0502)
92
+*  * Fabrice Fontaine (https://github.com/ffontaine)
93
+*  * Christopher Hiller (https://github.com/boneskull)
94
+*  * Gonzalo Diethelm (https://github.com/gonzus)
95
+*  * Michal Kasperek (https://github.com/michalkas)
96
+*  * Andrew Janke (https://github.com/apjanke)
97
+*  * Steve Fan (https://github.com/stevefan1999)
90 98
 *
91 99
 *  Other contributions
92 100
 *  ===================
... ...
@@ -125,6 +133,8 @@
125 125
 *  * https://github.com/chris-y
126 126
 *  * Laurent Zubiaur (https://github.com/lzubiaur)
127 127
 *  * Neil Kolban (https://github.com/nkolban)
128
+*  * Wilhelm Wanecek (https://github.com/wanecek)
129
+*  * Andrew Janke (https://github.com/apjanke)
128 130
 *
129 131
 *  If you are accidentally missing from this list, send me an e-mail
130 132
 *  (``sami.vaarala@iki.fi``) and I'll fix the omission.
... ...
@@ -669,20 +679,32 @@ struct duk_jmpbuf {
669 669
 /* #include duk_exception.h */
670 670
 #line 1 "duk_exception.h"
671 671
 /*
672
- *  Exception for Duktape internal throws when C++ exceptions are used
672
+ *  Exceptions for Duktape internal throws when C++ exceptions are used
673 673
  *  for long control transfers.
674
- *
675
- *  Doesn't inherit from any exception base class to minimize the chance
676
- *  that user code would accidentally catch this exception.
677 674
  */
678 675
 
679 676
 #if !defined(DUK_EXCEPTION_H_INCLUDED)
680 677
 #define DUK_EXCEPTION_H_INCLUDED
681 678
 
682 679
 #if defined(DUK_USE_CPP_EXCEPTIONS)
680
+/* Internal exception used as a setjmp-longjmp replacement.  User code should
681
+ * NEVER see or catch this exception, so it doesn't inherit from any base
682
+ * class which should minimize the chance of user code accidentally catching
683
+ * the exception.
684
+ */
683 685
 class duk_internal_exception {
684 686
 	/* intentionally empty */
685 687
 };
688
+
689
+/* Fatal error, thrown as a specific C++ exception with C++ exceptions
690
+ * enabled.  It is unsafe to continue; doing so may cause crashes or memory
691
+ * leaks.  This is intended to be either uncaught, or caught by user code
692
+ * aware of the "unsafe to continue" semantics.
693
+ */
694
+class duk_fatal_exception : public virtual std::runtime_error {
695
+ public:
696
+	duk_fatal_exception(const char *message) : std::runtime_error(message) {}
697
+};
686 698
 #endif
687 699
 
688 700
 #endif  /* DUK_EXCEPTION_H_INCLUDED */
... ...
@@ -734,8 +756,9 @@ struct duk_breakpoint;
734 734
 
735 735
 struct duk_activation;
736 736
 struct duk_catcher;
737
-struct duk_strcache;
738 737
 struct duk_ljstate;
738
+struct duk_strcache_entry;
739
+struct duk_litcache_entry;
739 740
 struct duk_strtab_entry;
740 741
 
741 742
 #if defined(DUK_USE_DEBUG)
... ...
@@ -794,8 +817,9 @@ typedef struct duk_breakpoint duk_breakpoint;
794 794
 
795 795
 typedef struct duk_activation duk_activation;
796 796
 typedef struct duk_catcher duk_catcher;
797
-typedef struct duk_strcache duk_strcache;
798 797
 typedef struct duk_ljstate duk_ljstate;
798
+typedef struct duk_strcache_entry duk_strcache_entry;
799
+typedef struct duk_litcache_entry duk_litcache_entry;
799 800
 typedef struct duk_strtab_entry duk_strtab_entry;
800 801
 
801 802
 #if defined(DUK_USE_DEBUG)
... ...
@@ -1694,278 +1718,290 @@ DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_slow(duk_tval *tv, duk_double
1694 1694
 #define DUK_STRIDX_OWN_KEYS                                           75                             /* 'ownKeys' */
1695 1695
 #define DUK_HEAP_STRING_OWN_KEYS(heap)                                DUK_HEAP_GET_STRING((heap),DUK_STRIDX_OWN_KEYS)
1696 1696
 #define DUK_HTHREAD_STRING_OWN_KEYS(thr)                              DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_OWN_KEYS)
1697
-#define DUK_STRIDX_SET_PROTOTYPE_OF                                   76                             /* 'setPrototypeOf' */
1697
+#define DUK_STRIDX_WELLKNOWN_SYMBOL_TO_PRIMITIVE                      76                             /* '\x81Symbol.toPrimitive\xff' */
1698
+#define DUK_HEAP_STRING_WELLKNOWN_SYMBOL_TO_PRIMITIVE(heap)           DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WELLKNOWN_SYMBOL_TO_PRIMITIVE)
1699
+#define DUK_HTHREAD_STRING_WELLKNOWN_SYMBOL_TO_PRIMITIVE(thr)         DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WELLKNOWN_SYMBOL_TO_PRIMITIVE)
1700
+#define DUK_STRIDX_WELLKNOWN_SYMBOL_HAS_INSTANCE                      77                             /* '\x81Symbol.hasInstance\xff' */
1701
+#define DUK_HEAP_STRING_WELLKNOWN_SYMBOL_HAS_INSTANCE(heap)           DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WELLKNOWN_SYMBOL_HAS_INSTANCE)
1702
+#define DUK_HTHREAD_STRING_WELLKNOWN_SYMBOL_HAS_INSTANCE(thr)         DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WELLKNOWN_SYMBOL_HAS_INSTANCE)
1703
+#define DUK_STRIDX_WELLKNOWN_SYMBOL_TO_STRING_TAG                     78                             /* '\x81Symbol.toStringTag\xff' */
1704
+#define DUK_HEAP_STRING_WELLKNOWN_SYMBOL_TO_STRING_TAG(heap)          DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WELLKNOWN_SYMBOL_TO_STRING_TAG)
1705
+#define DUK_HTHREAD_STRING_WELLKNOWN_SYMBOL_TO_STRING_TAG(thr)        DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WELLKNOWN_SYMBOL_TO_STRING_TAG)
1706
+#define DUK_STRIDX_WELLKNOWN_SYMBOL_IS_CONCAT_SPREADABLE              79                             /* '\x81Symbol.isConcatSpreadable\xff' */
1707
+#define DUK_HEAP_STRING_WELLKNOWN_SYMBOL_IS_CONCAT_SPREADABLE(heap)   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WELLKNOWN_SYMBOL_IS_CONCAT_SPREADABLE)
1708
+#define DUK_HTHREAD_STRING_WELLKNOWN_SYMBOL_IS_CONCAT_SPREADABLE(thr)  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WELLKNOWN_SYMBOL_IS_CONCAT_SPREADABLE)
1709
+#define DUK_STRIDX_SET_PROTOTYPE_OF                                   80                             /* 'setPrototypeOf' */
1698 1710
 #define DUK_HEAP_STRING_SET_PROTOTYPE_OF(heap)                        DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SET_PROTOTYPE_OF)
1699 1711
 #define DUK_HTHREAD_STRING_SET_PROTOTYPE_OF(thr)                      DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SET_PROTOTYPE_OF)
1700
-#define DUK_STRIDX___PROTO__                                          77                             /* '__proto__' */
1712
+#define DUK_STRIDX___PROTO__                                          81                             /* '__proto__' */
1701 1713
 #define DUK_HEAP_STRING___PROTO__(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX___PROTO__)
1702 1714
 #define DUK_HTHREAD_STRING___PROTO__(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX___PROTO__)
1703
-#define DUK_STRIDX_TO_STRING                                          78                             /* 'toString' */
1715
+#define DUK_STRIDX_TO_STRING                                          82                             /* 'toString' */
1704 1716
 #define DUK_HEAP_STRING_TO_STRING(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TO_STRING)
1705 1717
 #define DUK_HTHREAD_STRING_TO_STRING(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TO_STRING)
1706
-#define DUK_STRIDX_TO_JSON                                            79                             /* 'toJSON' */
1718
+#define DUK_STRIDX_TO_JSON                                            83                             /* 'toJSON' */
1707 1719
 #define DUK_HEAP_STRING_TO_JSON(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TO_JSON)
1708 1720
 #define DUK_HTHREAD_STRING_TO_JSON(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TO_JSON)
1709
-#define DUK_STRIDX_TYPE                                               80                             /* 'type' */
1721
+#define DUK_STRIDX_TYPE                                               84                             /* 'type' */
1710 1722
 #define DUK_HEAP_STRING_TYPE(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TYPE)
1711 1723
 #define DUK_HTHREAD_STRING_TYPE(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TYPE)
1712
-#define DUK_STRIDX_DATA                                               81                             /* 'data' */
1724
+#define DUK_STRIDX_DATA                                               85                             /* 'data' */
1713 1725
 #define DUK_HEAP_STRING_DATA(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DATA)
1714 1726
 #define DUK_HTHREAD_STRING_DATA(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DATA)
1715
-#define DUK_STRIDX_LENGTH                                             82                             /* 'length' */
1727
+#define DUK_STRIDX_LENGTH                                             86                             /* 'length' */
1716 1728
 #define DUK_HEAP_STRING_LENGTH(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LENGTH)
1717 1729
 #define DUK_HTHREAD_STRING_LENGTH(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LENGTH)
1718
-#define DUK_STRIDX_SET                                                83                             /* 'set' */
1730
+#define DUK_STRIDX_SET                                                87                             /* 'set' */
1719 1731
 #define DUK_HEAP_STRING_SET(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SET)
1720 1732
 #define DUK_HTHREAD_STRING_SET(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SET)
1721
-#define DUK_STRIDX_STACK                                              84                             /* 'stack' */
1733
+#define DUK_STRIDX_STACK                                              88                             /* 'stack' */
1722 1734
 #define DUK_HEAP_STRING_STACK(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_STACK)
1723 1735
 #define DUK_HTHREAD_STRING_STACK(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_STACK)
1724
-#define DUK_STRIDX_PC                                                 85                             /* 'pc' */
1736
+#define DUK_STRIDX_PC                                                 89                             /* 'pc' */
1725 1737
 #define DUK_HEAP_STRING_PC(heap)                                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PC)
1726 1738
 #define DUK_HTHREAD_STRING_PC(thr)                                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PC)
1727
-#define DUK_STRIDX_LINE_NUMBER                                        86                             /* 'lineNumber' */
1739
+#define DUK_STRIDX_LINE_NUMBER                                        90                             /* 'lineNumber' */
1728 1740
 #define DUK_HEAP_STRING_LINE_NUMBER(heap)                             DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LINE_NUMBER)
1729 1741
 #define DUK_HTHREAD_STRING_LINE_NUMBER(thr)                           DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LINE_NUMBER)
1730
-#define DUK_STRIDX_INT_TRACEDATA                                      87                             /* '\x82Tracedata' */
1742
+#define DUK_STRIDX_INT_TRACEDATA                                      91                             /* '\x82Tracedata' */
1731 1743
 #define DUK_HEAP_STRING_INT_TRACEDATA(heap)                           DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_TRACEDATA)
1732 1744
 #define DUK_HTHREAD_STRING_INT_TRACEDATA(thr)                         DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_TRACEDATA)
1733
-#define DUK_STRIDX_NAME                                               88                             /* 'name' */
1745
+#define DUK_STRIDX_NAME                                               92                             /* 'name' */
1734 1746
 #define DUK_HEAP_STRING_NAME(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_NAME)
1735 1747
 #define DUK_HTHREAD_STRING_NAME(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_NAME)
1736
-#define DUK_STRIDX_FILE_NAME                                          89                             /* 'fileName' */
1748
+#define DUK_STRIDX_FILE_NAME                                          93                             /* 'fileName' */
1737 1749
 #define DUK_HEAP_STRING_FILE_NAME(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FILE_NAME)
1738 1750
 #define DUK_HTHREAD_STRING_FILE_NAME(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FILE_NAME)
1739
-#define DUK_STRIDX_LC_POINTER                                         90                             /* 'pointer' */
1751
+#define DUK_STRIDX_LC_POINTER                                         94                             /* 'pointer' */
1740 1752
 #define DUK_HEAP_STRING_LC_POINTER(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_POINTER)
1741 1753
 #define DUK_HTHREAD_STRING_LC_POINTER(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_POINTER)
1742
-#define DUK_STRIDX_INT_TARGET                                         91                             /* '\x82Target' */
1754
+#define DUK_STRIDX_INT_TARGET                                         95                             /* '\x82Target' */
1743 1755
 #define DUK_HEAP_STRING_INT_TARGET(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_TARGET)
1744 1756
 #define DUK_HTHREAD_STRING_INT_TARGET(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_TARGET)
1745
-#define DUK_STRIDX_INT_NEXT                                           92                             /* '\x82Next' */
1757
+#define DUK_STRIDX_INT_NEXT                                           96                             /* '\x82Next' */
1746 1758
 #define DUK_HEAP_STRING_INT_NEXT(heap)                                DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_NEXT)
1747 1759
 #define DUK_HTHREAD_STRING_INT_NEXT(thr)                              DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_NEXT)
1748
-#define DUK_STRIDX_INT_BYTECODE                                       93                             /* '\x82Bytecode' */
1760
+#define DUK_STRIDX_INT_BYTECODE                                       97                             /* '\x82Bytecode' */
1749 1761
 #define DUK_HEAP_STRING_INT_BYTECODE(heap)                            DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_BYTECODE)
1750 1762
 #define DUK_HTHREAD_STRING_INT_BYTECODE(thr)                          DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_BYTECODE)
1751
-#define DUK_STRIDX_INT_FORMALS                                        94                             /* '\x82Formals' */
1763
+#define DUK_STRIDX_INT_FORMALS                                        98                             /* '\x82Formals' */
1752 1764
 #define DUK_HEAP_STRING_INT_FORMALS(heap)                             DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_FORMALS)
1753 1765
 #define DUK_HTHREAD_STRING_INT_FORMALS(thr)                           DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_FORMALS)
1754
-#define DUK_STRIDX_INT_VARMAP                                         95                             /* '\x82Varmap' */
1766
+#define DUK_STRIDX_INT_VARMAP                                         99                             /* '\x82Varmap' */
1755 1767
 #define DUK_HEAP_STRING_INT_VARMAP(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VARMAP)
1756 1768
 #define DUK_HTHREAD_STRING_INT_VARMAP(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VARMAP)
1757
-#define DUK_STRIDX_INT_SOURCE                                         96                             /* '\x82Source' */
1769
+#define DUK_STRIDX_INT_SOURCE                                         100                            /* '\x82Source' */
1758 1770
 #define DUK_HEAP_STRING_INT_SOURCE(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_SOURCE)
1759 1771
 #define DUK_HTHREAD_STRING_INT_SOURCE(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_SOURCE)
1760
-#define DUK_STRIDX_INT_PC2LINE                                        97                             /* '\x82Pc2line' */
1772
+#define DUK_STRIDX_INT_PC2LINE                                        101                            /* '\x82Pc2line' */
1761 1773
 #define DUK_HEAP_STRING_INT_PC2LINE(heap)                             DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_PC2LINE)
1762 1774
 #define DUK_HTHREAD_STRING_INT_PC2LINE(thr)                           DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_PC2LINE)
1763
-#define DUK_STRIDX_INT_MAP                                            98                             /* '\x82Map' */
1775
+#define DUK_STRIDX_INT_MAP                                            102                            /* '\x82Map' */
1764 1776
 #define DUK_HEAP_STRING_INT_MAP(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_MAP)
1765 1777
 #define DUK_HTHREAD_STRING_INT_MAP(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_MAP)
1766
-#define DUK_STRIDX_INT_VARENV                                         99                             /* '\x82Varenv' */
1778
+#define DUK_STRIDX_INT_VARENV                                         103                            /* '\x82Varenv' */
1767 1779
 #define DUK_HEAP_STRING_INT_VARENV(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VARENV)
1768 1780
 #define DUK_HTHREAD_STRING_INT_VARENV(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VARENV)
1769
-#define DUK_STRIDX_INT_FINALIZER                                      100                            /* '\x82Finalizer' */
1781
+#define DUK_STRIDX_INT_FINALIZER                                      104                            /* '\x82Finalizer' */
1770 1782
 #define DUK_HEAP_STRING_INT_FINALIZER(heap)                           DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_FINALIZER)
1771 1783
 #define DUK_HTHREAD_STRING_INT_FINALIZER(thr)                         DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_FINALIZER)
1772
-#define DUK_STRIDX_INT_VALUE                                          101                            /* '\x82Value' */
1784
+#define DUK_STRIDX_INT_VALUE                                          105                            /* '\x82Value' */
1773 1785
 #define DUK_HEAP_STRING_INT_VALUE(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VALUE)
1774 1786
 #define DUK_HTHREAD_STRING_INT_VALUE(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VALUE)
1775
-#define DUK_STRIDX_COMPILE                                            102                            /* 'compile' */
1787
+#define DUK_STRIDX_COMPILE                                            106                            /* 'compile' */
1776 1788
 #define DUK_HEAP_STRING_COMPILE(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_COMPILE)
1777 1789
 #define DUK_HTHREAD_STRING_COMPILE(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_COMPILE)
1778
-#define DUK_STRIDX_INPUT                                              103                            /* 'input' */
1790
+#define DUK_STRIDX_INPUT                                              107                            /* 'input' */
1779 1791
 #define DUK_HEAP_STRING_INPUT(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INPUT)
1780 1792
 #define DUK_HTHREAD_STRING_INPUT(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INPUT)
1781
-#define DUK_STRIDX_ERR_CREATE                                         104                            /* 'errCreate' */
1793
+#define DUK_STRIDX_ERR_CREATE                                         108                            /* 'errCreate' */
1782 1794
 #define DUK_HEAP_STRING_ERR_CREATE(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ERR_CREATE)
1783 1795
 #define DUK_HTHREAD_STRING_ERR_CREATE(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ERR_CREATE)
1784
-#define DUK_STRIDX_ERR_THROW                                          105                            /* 'errThrow' */
1796
+#define DUK_STRIDX_ERR_THROW                                          109                            /* 'errThrow' */
1785 1797
 #define DUK_HEAP_STRING_ERR_THROW(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ERR_THROW)
1786 1798
 #define DUK_HTHREAD_STRING_ERR_THROW(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ERR_THROW)
1787
-#define DUK_STRIDX_ENV                                                106                            /* 'env' */
1799
+#define DUK_STRIDX_ENV                                                110                            /* 'env' */
1788 1800
 #define DUK_HEAP_STRING_ENV(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ENV)
1789 1801
 #define DUK_HTHREAD_STRING_ENV(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ENV)
1790
-#define DUK_STRIDX_HEX                                                107                            /* 'hex' */
1802
+#define DUK_STRIDX_HEX                                                111                            /* 'hex' */
1791 1803
 #define DUK_HEAP_STRING_HEX(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_HEX)
1792 1804
 #define DUK_HTHREAD_STRING_HEX(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_HEX)
1793
-#define DUK_STRIDX_BASE64                                             108                            /* 'base64' */
1805
+#define DUK_STRIDX_BASE64                                             112                            /* 'base64' */
1794 1806
 #define DUK_HEAP_STRING_BASE64(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_BASE64)
1795 1807
 #define DUK_HTHREAD_STRING_BASE64(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_BASE64)
1796
-#define DUK_STRIDX_JX                                                 109                            /* 'jx' */
1808
+#define DUK_STRIDX_JX                                                 113                            /* 'jx' */
1797 1809
 #define DUK_HEAP_STRING_JX(heap)                                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JX)
1798 1810
 #define DUK_HTHREAD_STRING_JX(thr)                                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JX)
1799
-#define DUK_STRIDX_JC                                                 110                            /* 'jc' */
1811
+#define DUK_STRIDX_JC                                                 114                            /* 'jc' */
1800 1812
 #define DUK_HEAP_STRING_JC(heap)                                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JC)
1801 1813
 #define DUK_HTHREAD_STRING_JC(thr)                                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JC)
1802
-#define DUK_STRIDX_JSON_EXT_UNDEFINED                                 111                            /* '{"_undef":true}' */
1814
+#define DUK_STRIDX_JSON_EXT_UNDEFINED                                 115                            /* '{"_undef":true}' */
1803 1815
 #define DUK_HEAP_STRING_JSON_EXT_UNDEFINED(heap)                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_UNDEFINED)
1804 1816
 #define DUK_HTHREAD_STRING_JSON_EXT_UNDEFINED(thr)                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_UNDEFINED)
1805
-#define DUK_STRIDX_JSON_EXT_NAN                                       112                            /* '{"_nan":true}' */
1817
+#define DUK_STRIDX_JSON_EXT_NAN                                       116                            /* '{"_nan":true}' */
1806 1818
 #define DUK_HEAP_STRING_JSON_EXT_NAN(heap)                            DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_NAN)
1807 1819
 #define DUK_HTHREAD_STRING_JSON_EXT_NAN(thr)                          DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_NAN)
1808
-#define DUK_STRIDX_JSON_EXT_POSINF                                    113                            /* '{"_inf":true}' */
1820
+#define DUK_STRIDX_JSON_EXT_POSINF                                    117                            /* '{"_inf":true}' */
1809 1821
 #define DUK_HEAP_STRING_JSON_EXT_POSINF(heap)                         DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_POSINF)
1810 1822
 #define DUK_HTHREAD_STRING_JSON_EXT_POSINF(thr)                       DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_POSINF)
1811
-#define DUK_STRIDX_JSON_EXT_NEGINF                                    114                            /* '{"_ninf":true}' */
1823
+#define DUK_STRIDX_JSON_EXT_NEGINF                                    118                            /* '{"_ninf":true}' */
1812 1824
 #define DUK_HEAP_STRING_JSON_EXT_NEGINF(heap)                         DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_NEGINF)
1813 1825
 #define DUK_HTHREAD_STRING_JSON_EXT_NEGINF(thr)                       DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_NEGINF)
1814
-#define DUK_STRIDX_JSON_EXT_FUNCTION1                                 115                            /* '{"_func":true}' */
1826
+#define DUK_STRIDX_JSON_EXT_FUNCTION1                                 119                            /* '{"_func":true}' */
1815 1827
 #define DUK_HEAP_STRING_JSON_EXT_FUNCTION1(heap)                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_FUNCTION1)
1816 1828
 #define DUK_HTHREAD_STRING_JSON_EXT_FUNCTION1(thr)                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_FUNCTION1)
1817
-#define DUK_STRIDX_JSON_EXT_FUNCTION2                                 116                            /* '{_func:true}' */
1829
+#define DUK_STRIDX_JSON_EXT_FUNCTION2                                 120                            /* '{_func:true}' */
1818 1830
 #define DUK_HEAP_STRING_JSON_EXT_FUNCTION2(heap)                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_FUNCTION2)
1819 1831
 #define DUK_HTHREAD_STRING_JSON_EXT_FUNCTION2(thr)                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_FUNCTION2)
1820
-#define DUK_STRIDX_BREAK                                              117                            /* 'break' */
1832
+#define DUK_STRIDX_BREAK                                              121                            /* 'break' */
1821 1833
 #define DUK_HEAP_STRING_BREAK(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_BREAK)
1822 1834
 #define DUK_HTHREAD_STRING_BREAK(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_BREAK)
1823
-#define DUK_STRIDX_CASE                                               118                            /* 'case' */
1835
+#define DUK_STRIDX_CASE                                               122                            /* 'case' */
1824 1836
 #define DUK_HEAP_STRING_CASE(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CASE)
1825 1837
 #define DUK_HTHREAD_STRING_CASE(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CASE)
1826
-#define DUK_STRIDX_CATCH                                              119                            /* 'catch' */
1838
+#define DUK_STRIDX_CATCH                                              123                            /* 'catch' */
1827 1839
 #define DUK_HEAP_STRING_CATCH(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CATCH)
1828 1840
 #define DUK_HTHREAD_STRING_CATCH(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CATCH)
1829
-#define DUK_STRIDX_CONTINUE                                           120                            /* 'continue' */
1841
+#define DUK_STRIDX_CONTINUE                                           124                            /* 'continue' */
1830 1842
 #define DUK_HEAP_STRING_CONTINUE(heap)                                DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CONTINUE)
1831 1843
 #define DUK_HTHREAD_STRING_CONTINUE(thr)                              DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CONTINUE)
1832
-#define DUK_STRIDX_DEBUGGER                                           121                            /* 'debugger' */
1844
+#define DUK_STRIDX_DEBUGGER                                           125                            /* 'debugger' */
1833 1845
 #define DUK_HEAP_STRING_DEBUGGER(heap)                                DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DEBUGGER)
1834 1846
 #define DUK_HTHREAD_STRING_DEBUGGER(thr)                              DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DEBUGGER)
1835
-#define DUK_STRIDX_DEFAULT                                            122                            /* 'default' */
1847
+#define DUK_STRIDX_DEFAULT                                            126                            /* 'default' */
1836 1848
 #define DUK_HEAP_STRING_DEFAULT(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DEFAULT)
1837 1849
 #define DUK_HTHREAD_STRING_DEFAULT(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DEFAULT)
1838
-#define DUK_STRIDX_DELETE                                             123                            /* 'delete' */
1850
+#define DUK_STRIDX_DELETE                                             127                            /* 'delete' */
1839 1851
 #define DUK_HEAP_STRING_DELETE(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DELETE)
1840 1852
 #define DUK_HTHREAD_STRING_DELETE(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DELETE)
1841
-#define DUK_STRIDX_DO                                                 124                            /* 'do' */
1853
+#define DUK_STRIDX_DO                                                 128                            /* 'do' */
1842 1854
 #define DUK_HEAP_STRING_DO(heap)                                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DO)
1843 1855
 #define DUK_HTHREAD_STRING_DO(thr)                                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DO)
1844
-#define DUK_STRIDX_ELSE                                               125                            /* 'else' */
1856
+#define DUK_STRIDX_ELSE                                               129                            /* 'else' */
1845 1857
 #define DUK_HEAP_STRING_ELSE(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ELSE)
1846 1858
 #define DUK_HTHREAD_STRING_ELSE(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ELSE)
1847
-#define DUK_STRIDX_FINALLY                                            126                            /* 'finally' */
1859
+#define DUK_STRIDX_FINALLY                                            130                            /* 'finally' */
1848 1860
 #define DUK_HEAP_STRING_FINALLY(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FINALLY)
1849 1861
 #define DUK_HTHREAD_STRING_FINALLY(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FINALLY)
1850
-#define DUK_STRIDX_FOR                                                127                            /* 'for' */
1862
+#define DUK_STRIDX_FOR                                                131                            /* 'for' */
1851 1863
 #define DUK_HEAP_STRING_FOR(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FOR)
1852 1864
 #define DUK_HTHREAD_STRING_FOR(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FOR)
1853
-#define DUK_STRIDX_LC_FUNCTION                                        128                            /* 'function' */
1865
+#define DUK_STRIDX_LC_FUNCTION                                        132                            /* 'function' */
1854 1866
 #define DUK_HEAP_STRING_LC_FUNCTION(heap)                             DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_FUNCTION)
1855 1867
 #define DUK_HTHREAD_STRING_LC_FUNCTION(thr)                           DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_FUNCTION)
1856
-#define DUK_STRIDX_IF                                                 129                            /* 'if' */
1868
+#define DUK_STRIDX_IF                                                 133                            /* 'if' */
1857 1869
 #define DUK_HEAP_STRING_IF(heap)                                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IF)
1858 1870
 #define DUK_HTHREAD_STRING_IF(thr)                                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IF)
1859
-#define DUK_STRIDX_IN                                                 130                            /* 'in' */
1871
+#define DUK_STRIDX_IN                                                 134                            /* 'in' */
1860 1872
 #define DUK_HEAP_STRING_IN(heap)                                      DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IN)
1861 1873
 #define DUK_HTHREAD_STRING_IN(thr)                                    DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IN)
1862
-#define DUK_STRIDX_INSTANCEOF                                         131                            /* 'instanceof' */
1874
+#define DUK_STRIDX_INSTANCEOF                                         135                            /* 'instanceof' */
1863 1875
 #define DUK_HEAP_STRING_INSTANCEOF(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INSTANCEOF)
1864 1876
 #define DUK_HTHREAD_STRING_INSTANCEOF(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INSTANCEOF)
1865
-#define DUK_STRIDX_NEW                                                132                            /* 'new' */
1877
+#define DUK_STRIDX_NEW                                                136                            /* 'new' */
1866 1878
 #define DUK_HEAP_STRING_NEW(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_NEW)
1867 1879
 #define DUK_HTHREAD_STRING_NEW(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_NEW)
1868
-#define DUK_STRIDX_RETURN                                             133                            /* 'return' */
1880
+#define DUK_STRIDX_RETURN                                             137                            /* 'return' */
1869 1881
 #define DUK_HEAP_STRING_RETURN(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_RETURN)
1870 1882
 #define DUK_HTHREAD_STRING_RETURN(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_RETURN)
1871
-#define DUK_STRIDX_SWITCH                                             134                            /* 'switch' */
1883
+#define DUK_STRIDX_SWITCH                                             138                            /* 'switch' */
1872 1884
 #define DUK_HEAP_STRING_SWITCH(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SWITCH)
1873 1885
 #define DUK_HTHREAD_STRING_SWITCH(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SWITCH)
1874
-#define DUK_STRIDX_THIS                                               135                            /* 'this' */
1886
+#define DUK_STRIDX_THIS                                               139                            /* 'this' */
1875 1887
 #define DUK_HEAP_STRING_THIS(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_THIS)
1876 1888
 #define DUK_HTHREAD_STRING_THIS(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_THIS)
1877
-#define DUK_STRIDX_THROW                                              136                            /* 'throw' */
1889
+#define DUK_STRIDX_THROW                                              140                            /* 'throw' */
1878 1890
 #define DUK_HEAP_STRING_THROW(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_THROW)
1879 1891
 #define DUK_HTHREAD_STRING_THROW(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_THROW)
1880
-#define DUK_STRIDX_TRY                                                137                            /* 'try' */
1892
+#define DUK_STRIDX_TRY                                                141                            /* 'try' */
1881 1893
 #define DUK_HEAP_STRING_TRY(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TRY)
1882 1894
 #define DUK_HTHREAD_STRING_TRY(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TRY)
1883
-#define DUK_STRIDX_TYPEOF                                             138                            /* 'typeof' */
1895
+#define DUK_STRIDX_TYPEOF                                             142                            /* 'typeof' */
1884 1896
 #define DUK_HEAP_STRING_TYPEOF(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TYPEOF)
1885 1897
 #define DUK_HTHREAD_STRING_TYPEOF(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TYPEOF)
1886
-#define DUK_STRIDX_VAR                                                139                            /* 'var' */
1898
+#define DUK_STRIDX_VAR                                                143                            /* 'var' */
1887 1899
 #define DUK_HEAP_STRING_VAR(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_VAR)
1888 1900
 #define DUK_HTHREAD_STRING_VAR(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_VAR)
1889
-#define DUK_STRIDX_CONST                                              140                            /* 'const' */
1901
+#define DUK_STRIDX_CONST                                              144                            /* 'const' */
1890 1902
 #define DUK_HEAP_STRING_CONST(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CONST)
1891 1903
 #define DUK_HTHREAD_STRING_CONST(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CONST)
1892
-#define DUK_STRIDX_VOID                                               141                            /* 'void' */
1904
+#define DUK_STRIDX_VOID                                               145                            /* 'void' */
1893 1905
 #define DUK_HEAP_STRING_VOID(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_VOID)
1894 1906
 #define DUK_HTHREAD_STRING_VOID(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_VOID)
1895
-#define DUK_STRIDX_WHILE                                              142                            /* 'while' */
1907
+#define DUK_STRIDX_WHILE                                              146                            /* 'while' */
1896 1908
 #define DUK_HEAP_STRING_WHILE(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WHILE)
1897 1909
 #define DUK_HTHREAD_STRING_WHILE(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WHILE)
1898
-#define DUK_STRIDX_WITH                                               143                            /* 'with' */
1910
+#define DUK_STRIDX_WITH                                               147                            /* 'with' */
1899 1911
 #define DUK_HEAP_STRING_WITH(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WITH)
1900 1912
 #define DUK_HTHREAD_STRING_WITH(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WITH)
1901
-#define DUK_STRIDX_CLASS                                              144                            /* 'class' */
1913
+#define DUK_STRIDX_CLASS                                              148                            /* 'class' */
1902 1914
 #define DUK_HEAP_STRING_CLASS(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CLASS)
1903 1915
 #define DUK_HTHREAD_STRING_CLASS(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CLASS)
1904
-#define DUK_STRIDX_ENUM                                               145                            /* 'enum' */
1916
+#define DUK_STRIDX_ENUM                                               149                            /* 'enum' */
1905 1917
 #define DUK_HEAP_STRING_ENUM(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ENUM)
1906 1918
 #define DUK_HTHREAD_STRING_ENUM(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ENUM)
1907
-#define DUK_STRIDX_EXPORT                                             146                            /* 'export' */
1919
+#define DUK_STRIDX_EXPORT                                             150                            /* 'export' */
1908 1920
 #define DUK_HEAP_STRING_EXPORT(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_EXPORT)
1909 1921
 #define DUK_HTHREAD_STRING_EXPORT(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_EXPORT)
1910
-#define DUK_STRIDX_EXTENDS                                            147                            /* 'extends' */
1922
+#define DUK_STRIDX_EXTENDS                                            151                            /* 'extends' */
1911 1923
 #define DUK_HEAP_STRING_EXTENDS(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_EXTENDS)
1912 1924
 #define DUK_HTHREAD_STRING_EXTENDS(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_EXTENDS)
1913
-#define DUK_STRIDX_IMPORT                                             148                            /* 'import' */
1925
+#define DUK_STRIDX_IMPORT                                             152                            /* 'import' */
1914 1926
 #define DUK_HEAP_STRING_IMPORT(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IMPORT)
1915 1927
 #define DUK_HTHREAD_STRING_IMPORT(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IMPORT)
1916
-#define DUK_STRIDX_SUPER                                              149                            /* 'super' */
1928
+#define DUK_STRIDX_SUPER                                              153                            /* 'super' */
1917 1929
 #define DUK_HEAP_STRING_SUPER(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SUPER)
1918 1930
 #define DUK_HTHREAD_STRING_SUPER(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SUPER)
1919
-#define DUK_STRIDX_LC_NULL                                            150                            /* 'null' */
1931
+#define DUK_STRIDX_LC_NULL                                            154                            /* 'null' */
1920 1932
 #define DUK_HEAP_STRING_LC_NULL(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_NULL)
1921 1933
 #define DUK_HTHREAD_STRING_LC_NULL(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_NULL)
1922
-#define DUK_STRIDX_TRUE                                               151                            /* 'true' */
1934
+#define DUK_STRIDX_TRUE                                               155                            /* 'true' */
1923 1935
 #define DUK_HEAP_STRING_TRUE(heap)                                    DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TRUE)
1924 1936
 #define DUK_HTHREAD_STRING_TRUE(thr)                                  DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TRUE)
1925
-#define DUK_STRIDX_FALSE                                              152                            /* 'false' */
1937
+#define DUK_STRIDX_FALSE                                              156                            /* 'false' */
1926 1938
 #define DUK_HEAP_STRING_FALSE(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FALSE)
1927 1939
 #define DUK_HTHREAD_STRING_FALSE(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FALSE)
1928
-#define DUK_STRIDX_IMPLEMENTS                                         153                            /* 'implements' */
1940
+#define DUK_STRIDX_IMPLEMENTS                                         157                            /* 'implements' */
1929 1941
 #define DUK_HEAP_STRING_IMPLEMENTS(heap)                              DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IMPLEMENTS)
1930 1942
 #define DUK_HTHREAD_STRING_IMPLEMENTS(thr)                            DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IMPLEMENTS)
1931
-#define DUK_STRIDX_INTERFACE                                          154                            /* 'interface' */
1943
+#define DUK_STRIDX_INTERFACE                                          158                            /* 'interface' */
1932 1944
 #define DUK_HEAP_STRING_INTERFACE(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INTERFACE)
1933 1945
 #define DUK_HTHREAD_STRING_INTERFACE(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INTERFACE)
1934
-#define DUK_STRIDX_LET                                                155                            /* 'let' */
1946
+#define DUK_STRIDX_LET                                                159                            /* 'let' */
1935 1947
 #define DUK_HEAP_STRING_LET(heap)                                     DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LET)
1936 1948
 #define DUK_HTHREAD_STRING_LET(thr)                                   DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LET)
1937
-#define DUK_STRIDX_PACKAGE                                            156                            /* 'package' */
1949
+#define DUK_STRIDX_PACKAGE                                            160                            /* 'package' */
1938 1950
 #define DUK_HEAP_STRING_PACKAGE(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PACKAGE)
1939 1951
 #define DUK_HTHREAD_STRING_PACKAGE(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PACKAGE)
1940
-#define DUK_STRIDX_PRIVATE                                            157                            /* 'private' */
1952
+#define DUK_STRIDX_PRIVATE                                            161                            /* 'private' */
1941 1953
 #define DUK_HEAP_STRING_PRIVATE(heap)                                 DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PRIVATE)
1942 1954
 #define DUK_HTHREAD_STRING_PRIVATE(thr)                               DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PRIVATE)
1943
-#define DUK_STRIDX_PROTECTED                                          158                            /* 'protected' */
1955
+#define DUK_STRIDX_PROTECTED                                          162                            /* 'protected' */
1944 1956
 #define DUK_HEAP_STRING_PROTECTED(heap)                               DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PROTECTED)
1945 1957
 #define DUK_HTHREAD_STRING_PROTECTED(thr)                             DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PROTECTED)
1946
-#define DUK_STRIDX_PUBLIC                                             159                            /* 'public' */
1958
+#define DUK_STRIDX_PUBLIC                                             163                            /* 'public' */
1947 1959
 #define DUK_HEAP_STRING_PUBLIC(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PUBLIC)
1948 1960
 #define DUK_HTHREAD_STRING_PUBLIC(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PUBLIC)
1949
-#define DUK_STRIDX_STATIC                                             160                            /* 'static' */
1961
+#define DUK_STRIDX_STATIC                                             164                            /* 'static' */
1950 1962
 #define DUK_HEAP_STRING_STATIC(heap)                                  DUK_HEAP_GET_STRING((heap),DUK_STRIDX_STATIC)
1951 1963
 #define DUK_HTHREAD_STRING_STATIC(thr)                                DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_STATIC)
1952
-#define DUK_STRIDX_YIELD                                              161                            /* 'yield' */
1964
+#define DUK_STRIDX_YIELD                                              165                            /* 'yield' */
1953 1965
 #define DUK_HEAP_STRING_YIELD(heap)                                   DUK_HEAP_GET_STRING((heap),DUK_STRIDX_YIELD)
1954 1966
 #define DUK_HTHREAD_STRING_YIELD(thr)                                 DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_YIELD)
1955 1967
 
1956
-#define DUK_HEAP_NUM_STRINGS                                          162
1957
-#define DUK_STRIDX_START_RESERVED                                     117
1958
-#define DUK_STRIDX_START_STRICT_RESERVED                              153
1959
-#define DUK_STRIDX_END_RESERVED                                       162                            /* exclusive endpoint */
1968
+#define DUK_HEAP_NUM_STRINGS                                          166
1969
+#define DUK_STRIDX_START_RESERVED                                     121
1970
+#define DUK_STRIDX_START_STRICT_RESERVED                              157
1971
+#define DUK_STRIDX_END_RESERVED                                       166                            /* exclusive endpoint */
1960 1972
 
1961 1973
 /* To convert a heap stridx to a token number, subtract
1962 1974
  * DUK_STRIDX_START_RESERVED and add DUK_TOK_START_RESERVED.
1963 1975
  */
1964 1976
 #if !defined(DUK_SINGLE_FILE)
1965
-DUK_INTERNAL_DECL const duk_uint8_t duk_strings_data[892];
1977
+DUK_INTERNAL_DECL const duk_uint8_t duk_strings_data[967];
1966 1978
 #endif  /* !DUK_SINGLE_FILE */
1967
-#define DUK_STRDATA_MAX_STRLEN                                        17
1968
-#define DUK_STRDATA_DATA_LENGTH                                       892
1979
+#define DUK_STRDATA_MAX_STRLEN                                        27
1980
+#define DUK_STRDATA_DATA_LENGTH                                       967
1969 1981
 #endif  /* DUK_USE_ROM_STRINGS */
1970 1982
 
1971 1983
 #if defined(DUK_USE_ROM_OBJECTS)
... ...
@@ -1982,6 +2018,8 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_date_constructor(duk_context *ctx);
1982 1982
 DUK_INTERNAL_DECL duk_ret_t duk_bi_regexp_constructor(duk_context *ctx);
1983 1983
 DUK_INTERNAL_DECL duk_ret_t duk_bi_error_constructor_shared(duk_context *ctx);
1984 1984
 DUK_INTERNAL_DECL duk_ret_t duk_bi_type_error_thrower(duk_context *ctx);
1985
+DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_parse_int(duk_context *ctx);
1986
+DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_parse_float(duk_context *ctx);
1985 1987
 DUK_INTERNAL_DECL duk_ret_t duk_bi_thread_constructor(duk_context *ctx);
1986 1988
 DUK_INTERNAL_DECL duk_ret_t duk_bi_pointer_constructor(duk_context *ctx);
1987 1989
 DUK_INTERNAL_DECL duk_ret_t duk_bi_proxy_constructor(duk_context *ctx);
... ...
@@ -1992,8 +2030,6 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_constructor(duk_context *ctx);
1992 1992
 DUK_INTERNAL_DECL duk_ret_t duk_bi_textencoder_constructor(duk_context *ctx);
1993 1993
 DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_constructor(duk_context *ctx);
1994 1994
 DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_eval(duk_context *ctx);
1995
-DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_parse_int(duk_context *ctx);
1996
-DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_parse_float(duk_context *ctx);
1997 1995
 DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_is_nan(duk_context *ctx);
1998 1996
 DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_is_finite(duk_context *ctx);
1999 1997
 DUK_INTERNAL_DECL duk_ret_t duk_bi_global_object_decode_uri(duk_context *ctx);
... ...
@@ -2065,6 +2101,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_string_prototype_startswith_endswith(duk_cont
2065 2065
 DUK_INTERNAL_DECL duk_ret_t duk_bi_string_prototype_includes(duk_context *ctx);
2066 2066
 DUK_INTERNAL_DECL duk_ret_t duk_bi_string_prototype_substr(duk_context *ctx);
2067 2067
 DUK_INTERNAL_DECL duk_ret_t duk_bi_boolean_prototype_tostring_shared(duk_context *ctx);
2068
+DUK_INTERNAL_DECL duk_ret_t duk_bi_number_check_shared(duk_context *ctx);
2068 2069
 DUK_INTERNAL_DECL duk_ret_t duk_bi_number_prototype_to_string(duk_context *ctx);
2069 2070
 DUK_INTERNAL_DECL duk_ret_t duk_bi_number_prototype_to_locale_string(duk_context *ctx);
2070 2071
 DUK_INTERNAL_DECL duk_ret_t duk_bi_number_prototype_value_of(duk_context *ctx);
... ...
@@ -2147,7 +2184,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_prototype_shared_getter(duk_conte
2147 2147
 DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_prototype_decode(duk_context *ctx);
2148 2148
 DUK_INTERNAL_DECL duk_ret_t duk_bi_performance_now(duk_context *ctx);
2149 2149
 #if !defined(DUK_SINGLE_FILE)
2150
-DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[176];
2150
+DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[177];
2151 2151
 #endif  /* !DUK_SINGLE_FILE */
2152 2152
 #define DUK_BIDX_GLOBAL                                               0
2153 2153
 #define DUK_BIDX_GLOBAL_ENV                                           1
... ...
@@ -2202,22 +2239,22 @@ DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[176];
2202 2202
 #define DUK_BIDX_NODEJS_BUFFER_PROTOTYPE                              50
2203 2203
 #define DUK_NUM_BUILTINS                                              51
2204 2204
 #define DUK_NUM_BIDX_BUILTINS                                         51
2205
-#define DUK_NUM_ALL_BUILTINS                                          76
2205
+#define DUK_NUM_ALL_BUILTINS                                          78
2206 2206
 #if defined(DUK_USE_DOUBLE_LE)
2207 2207
 #if !defined(DUK_SINGLE_FILE)
2208
-DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[3972];
2208
+DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4116];
2209 2209
 #endif  /* !DUK_SINGLE_FILE */
2210
-#define DUK_BUILTINS_DATA_LENGTH                                      3972
2210
+#define DUK_BUILTINS_DATA_LENGTH                                      4116
2211 2211
 #elif defined(DUK_USE_DOUBLE_BE)
2212 2212
 #if !defined(DUK_SINGLE_FILE)
2213
-DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[3972];
2213
+DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4116];
2214 2214
 #endif  /* !DUK_SINGLE_FILE */
2215
-#define DUK_BUILTINS_DATA_LENGTH                                      3972
2215
+#define DUK_BUILTINS_DATA_LENGTH                                      4116
2216 2216
 #elif defined(DUK_USE_DOUBLE_ME)
2217 2217
 #if !defined(DUK_SINGLE_FILE)
2218
-DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[3972];
2218
+DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4116];
2219 2219
 #endif  /* !DUK_SINGLE_FILE */
2220
-#define DUK_BUILTINS_DATA_LENGTH                                      3972
2220
+#define DUK_BUILTINS_DATA_LENGTH                                      4116
2221 2221
 #else
2222 2222
 #error invalid endianness defines
2223 2223
 #endif
... ...
@@ -2544,12 +2581,13 @@ struct duk_bufwriter_ctx {
2544 2544
 		(bw_ctx)->p += duk__enc_len; \
2545 2545
 	} while (0)
2546 2546
 /* XXX: add temporary duk__p pointer here too; sharing */
2547
+/* XXX: avoid unsafe variants */
2547 2548
 #define DUK_BW_WRITE_RAW_BYTES(thr,bw_ctx,valptr,valsz) do { \
2548 2549
 		const void *duk__valptr; \
2549 2550
 		duk_size_t duk__valsz; \
2550 2551
 		duk__valptr = (const void *) (valptr); \
2551 2552
 		duk__valsz = (duk_size_t) (valsz); \
2552
-		DUK_MEMCPY((void *) ((bw_ctx)->p), duk__valptr, duk__valsz); \
2553
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), duk__valptr, duk__valsz); \
2553 2554
 		(bw_ctx)->p += duk__valsz; \
2554 2555
 	} while (0)
2555 2556
 #define DUK_BW_WRITE_RAW_CSTRING(thr,bw_ctx,val) do { \
... ...
@@ -2557,31 +2595,31 @@ struct duk_bufwriter_ctx {
2557 2557
 		duk_size_t duk__val_len; \
2558 2558
 		duk__val = (const duk_uint8_t *) (val); \
2559 2559
 		duk__val_len = DUK_STRLEN((const char *) duk__val); \
2560
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) duk__val, duk__val_len); \
2560
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) duk__val, duk__val_len); \
2561 2561
 		(bw_ctx)->p += duk__val_len; \
2562 2562
 	} while (0)
2563 2563
 #define DUK_BW_WRITE_RAW_HSTRING(thr,bw_ctx,val) do { \
2564 2564
 		duk_size_t duk__val_len; \
2565 2565
 		duk__val_len = DUK_HSTRING_GET_BYTELEN((val)); \
2566
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HSTRING_GET_DATA((val)), duk__val_len); \
2566
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HSTRING_GET_DATA((val)), duk__val_len); \
2567 2567
 		(bw_ctx)->p += duk__val_len; \
2568 2568
 	} while (0)
2569 2569
 #define DUK_BW_WRITE_RAW_HBUFFER(thr,bw_ctx,val) do { \
2570 2570
 		duk_size_t duk__val_len; \
2571 2571
 		duk__val_len = DUK_HBUFFER_GET_SIZE((val)); \
2572
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2572
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2573 2573
 		(bw_ctx)->p += duk__val_len; \
2574 2574
 	} while (0)
2575 2575
 #define DUK_BW_WRITE_RAW_HBUFFER_FIXED(thr,bw_ctx,val) do { \
2576 2576
 		duk_size_t duk__val_len; \
2577 2577
 		duk__val_len = DUK_HBUFFER_FIXED_GET_SIZE((val)); \
2578
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2578
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2579 2579
 		(bw_ctx)->p += duk__val_len; \
2580 2580
 	} while (0)
2581 2581
 #define DUK_BW_WRITE_RAW_HBUFFER_DYNAMIC(thr,bw_ctx,val) do { \
2582 2582
 		duk_size_t duk__val_len; \
2583 2583
 		duk__val_len = DUK_HBUFFER_DYNAMIC_GET_SIZE((val)); \
2584
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2584
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2585 2585
 		(bw_ctx)->p += duk__val_len; \
2586 2586
 	} while (0)
2587 2587
 
... ...
@@ -2645,13 +2683,14 @@ struct duk_bufwriter_ctx {
2645 2645
 		DUK_BW_WRITE_RAW_CESU8((thr), (bw_ctx), (cp)); \
2646 2646
 	} while (0)
2647 2647
 /* XXX: add temporary duk__p pointer here too; sharing */
2648
+/* XXX: avoid unsafe */
2648 2649
 #define DUK_BW_WRITE_ENSURE_BYTES(thr,bw_ctx,valptr,valsz) do { \
2649 2650
 		const void *duk__valptr; \
2650 2651
 		duk_size_t duk__valsz; \
2651 2652
 		duk__valptr = (const void *) (valptr); \
2652 2653
 		duk__valsz = (duk_size_t) (valsz); \
2653 2654
 		DUK_BW_ENSURE((thr), (bw_ctx), duk__valsz); \
2654
-		DUK_MEMCPY((void *) ((bw_ctx)->p), duk__valptr, duk__valsz); \
2655
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), duk__valptr, duk__valsz); \
2655 2656
 		(bw_ctx)->p += duk__valsz; \
2656 2657
 	} while (0)
2657 2658
 #define DUK_BW_WRITE_ENSURE_CSTRING(thr,bw_ctx,val) do { \
... ...
@@ -2660,35 +2699,35 @@ struct duk_bufwriter_ctx {
2660 2660
 		duk__val = (const duk_uint8_t *) (val); \
2661 2661
 		duk__val_len = DUK_STRLEN((const char *) duk__val); \
2662 2662
 		DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
2663
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) duk__val, duk__val_len); \
2663
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) duk__val, duk__val_len); \
2664 2664
 		(bw_ctx)->p += duk__val_len; \
2665 2665
 	} while (0)
2666 2666
 #define DUK_BW_WRITE_ENSURE_HSTRING(thr,bw_ctx,val) do { \
2667 2667
 		duk_size_t duk__val_len; \
2668 2668
 		duk__val_len = DUK_HSTRING_GET_BYTELEN((val)); \
2669 2669
 		DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
2670
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HSTRING_GET_DATA((val)), duk__val_len); \
2670
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HSTRING_GET_DATA((val)), duk__val_len); \
2671 2671
 		(bw_ctx)->p += duk__val_len; \
2672 2672
 	} while (0)
2673 2673
 #define DUK_BW_WRITE_ENSURE_HBUFFER(thr,bw_ctx,val) do { \
2674 2674
 		duk_size_t duk__val_len; \
2675 2675
 		duk__val_len = DUK_HBUFFER_GET_SIZE((val)); \
2676 2676
 		DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
2677
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2677
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2678 2678
 		(bw_ctx)->p += duk__val_len; \
2679 2679
 	} while (0)
2680 2680
 #define DUK_BW_WRITE_ENSURE_HBUFFER_FIXED(thr,bw_ctx,val) do { \
2681 2681
 		duk_size_t duk__val_len; \
2682 2682
 		duk__val_len = DUK_HBUFFER_FIXED_GET_SIZE((val)); \
2683 2683
 		DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
2684
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2684
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2685 2685
 		(bw_ctx)->p += duk__val_len; \
2686 2686
 	} while (0)
2687 2687
 #define DUK_BW_WRITE_ENSURE_HBUFFER_DYNAMIC(thr,bw_ctx,val) do { \
2688 2688
 		duk_size_t duk__val_len; \
2689 2689
 		duk__val_len = DUK_HBUFFER_DYNAMIC_GET_SIZE((val)); \
2690 2690
 		DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
2691
-		DUK_MEMCPY((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2691
+		duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
2692 2692
 		(bw_ctx)->p += duk__val_len; \
2693 2693
 	} while (0)
2694 2694
 
... ...
@@ -2717,10 +2756,6 @@ DUK_INTERNAL_DECL const duk_int8_t duk_hex_dectab[256];
2717 2717
 DUK_INTERNAL_DECL const duk_int16_t duk_hex_dectab_shift4[256];
2718 2718
 DUK_INTERNAL_DECL const duk_uint16_t duk_hex_enctab[256];
2719 2719
 #endif
2720
-#if defined(DUK_USE_BASE64_FASTPATH)
2721
-DUK_INTERNAL_DECL const duk_uint8_t duk_base64_enctab[64];
2722
-DUK_INTERNAL_DECL const duk_int8_t duk_base64_dectab[256];
2723
-#endif
2724 2720
 #endif  /* !DUK_SINGLE_FILE */
2725 2721
 
2726 2722
 /* Note: assumes that duk_util_probe_steps size is 32 */
... ...
@@ -2775,6 +2810,127 @@ DUK_INTERNAL_DECL void duk_raw_write_double_be(duk_uint8_t **p, duk_double_t val
2775 2775
 DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
2776 2776
 #endif
2777 2777
 
2778
+/* memcpy(), memmove() etc wrappers.  The plain variants like duk_memcpy()
2779
+ * assume C99+ and 'src' and 'dst' pointers must be non-NULL even when the
2780
+ * operation size is zero.  The unsafe variants like duk_memcpy_safe() deal
2781
+ * with the zero size case explicitly, and allow NULL pointers in that case
2782
+ * (which is undefined behavior in C99+).  For the majority of actual targets
2783
+ * a NULL pointer with a zero length is fine in practice.  These wrappers are
2784
+ * macros to force inlining; because there are hundreds of call sites, even a
2785
+ * few extra bytes per call site adds up to ~1kB footprint.
2786
+ */
2787
+#if defined(DUK_USE_ALLOW_UNDEFINED_BEHAVIOR)
2788
+#define duk_memcpy(dst,src,len)  do { \
2789
+		void *duk__dst = (dst); \
2790
+		const void *duk__src = (src); \
2791
+		duk_size_t duk__len = (len); \
2792
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2793
+		DUK_ASSERT(duk__src != NULL || duk__len == 0U); \
2794
+		(void) DUK_MEMCPY(duk__dst, duk__src, (size_t) duk__len); \
2795
+	} while (0)
2796
+#define duk_memcpy_unsafe(dst,src,len)  duk_memcpy((dst), (src), (len))
2797
+#define duk_memmove(dst,src,len)  do { \
2798
+		void *duk__dst = (dst); \
2799
+		const void *duk__src = (src); \
2800
+		duk_size_t duk__len = (len); \
2801
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2802
+		DUK_ASSERT(duk__src != NULL || duk__len == 0U); \
2803
+		(void) DUK_MEMMOVE(duk__dst, duk__src, (size_t) duk__len); \
2804
+	} while (0)
2805
+#define duk_memmove_unsafe(dst,src,len)  duk_memmove((dst), (src), (len))
2806
+#define duk_memset(dst,val,len)  do { \
2807
+		void *duk__dst = (dst); \
2808
+		duk_small_int_t duk__val = (val); \
2809
+		duk_size_t duk__len = (len); \
2810
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2811
+		(void) DUK_MEMSET(duk__dst, duk__val, (size_t) duk__len); \
2812
+	} while (0)
2813
+#define duk_memset_unsafe(dst,val,len)  duk_memset((dst), (val), (len))
2814
+#define duk_memzero(dst,len)  do { \
2815
+		void *duk__dst = (dst); \
2816
+		duk_size_t duk__len = (len); \
2817
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2818
+		(void) DUK_MEMZERO(duk__dst, (size_t) duk__len); \
2819
+	} while (0)
2820
+#define duk_memzero_unsafe(dst,len)  duk_memzero((dst), (len))
2821
+#else  /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
2822
+#define duk_memcpy(dst,src,len)  do { \
2823
+		void *duk__dst = (dst); \
2824
+		const void *duk__src = (src); \
2825
+		duk_size_t duk__len = (len); \
2826
+		DUK_ASSERT(duk__dst != NULL); \
2827
+		DUK_ASSERT(duk__src != NULL); \
2828
+		(void) DUK_MEMCPY(duk__dst, duk__src, (size_t) duk__len); \
2829
+	} while (0)
2830
+#define duk_memcpy_unsafe(dst,src,len)  do { \
2831
+		void *duk__dst = (dst); \
2832
+		const void *duk__src = (src); \
2833
+		duk_size_t duk__len = (len); \
2834
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2835
+		DUK_ASSERT(duk__src != NULL || duk__len == 0U); \
2836
+		if (DUK_LIKELY(duk__len > 0U)) { \
2837
+			DUK_ASSERT(duk__dst != NULL); \
2838
+			DUK_ASSERT(duk__src != NULL); \
2839
+			(void) DUK_MEMCPY(duk__dst, duk__src, (size_t) duk__len); \
2840
+		} \
2841
+	} while (0)
2842
+#define duk_memmove(dst,src,len)  do { \
2843
+		void *duk__dst = (dst); \
2844
+		const void *duk__src = (src); \
2845
+		duk_size_t duk__len = (len); \
2846
+		DUK_ASSERT(duk__dst != NULL); \
2847
+		DUK_ASSERT(duk__src != NULL); \
2848
+		(void) DUK_MEMMOVE(duk__dst, duk__src, (size_t) duk__len); \
2849
+	} while (0)
2850
+#define duk_memmove_unsafe(dst,src,len)  do { \
2851
+		void *duk__dst = (dst); \
2852
+		const void *duk__src = (src); \
2853
+		duk_size_t duk__len = (len); \
2854
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2855
+		DUK_ASSERT(duk__src != NULL || duk__len == 0U); \
2856
+		if (DUK_LIKELY(duk__len > 0U)) { \
2857
+			DUK_ASSERT(duk__dst != NULL); \
2858
+			DUK_ASSERT(duk__src != NULL); \
2859
+			(void) DUK_MEMMOVE(duk__dst, duk__src, (size_t) duk__len); \
2860
+		} \
2861
+	} while (0)
2862
+#define duk_memset(dst,val,len)  do { \
2863
+		void *duk__dst = (dst); \
2864
+		duk_small_int_t duk__val = (val); \
2865
+		duk_size_t duk__len = (len); \
2866
+		DUK_ASSERT(duk__dst != NULL); \
2867
+		(void) DUK_MEMSET(duk__dst, duk__val, (size_t) duk__len); \
2868
+	} while (0)
2869
+#define duk_memset_unsafe(dst,val,len)  do { \
2870
+		void *duk__dst = (dst); \
2871
+		duk_small_int_t duk__val = (val); \
2872
+		duk_size_t duk__len = (len); \
2873
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2874
+		if (DUK_LIKELY(duk__len > 0U)) { \
2875
+			DUK_ASSERT(duk__dst != NULL); \
2876
+			(void) DUK_MEMSET(duk__dst, duk__val, (size_t) duk__len); \
2877
+		} \
2878
+	} while (0)
2879
+#define duk_memzero(dst,len)  do { \
2880
+		void *duk__dst = (dst); \
2881
+		duk_size_t duk__len = (len); \
2882
+		DUK_ASSERT(duk__dst != NULL); \
2883
+		(void) DUK_MEMZERO(duk__dst, (size_t) duk__len); \
2884
+	} while (0)
2885
+#define duk_memzero_unsafe(dst,len)  do { \
2886
+		void *duk__dst = (dst); \
2887
+		duk_size_t duk__len = (len); \
2888
+		DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
2889
+		if (DUK_LIKELY(duk__len > 0U)) { \
2890
+			DUK_ASSERT(duk__dst != NULL); \
2891
+			(void) DUK_MEMZERO(duk__dst, (size_t) duk__len); \
2892
+		} \
2893
+	} while (0)
2894
+#endif  /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
2895
+
2896
+DUK_INTERNAL_DECL duk_small_int_t duk_memcmp(const void *s1, const void *s2, duk_size_t len);
2897
+DUK_INTERNAL_DECL duk_small_int_t duk_memcmp_unsafe(const void *s1, const void *s2, duk_size_t len);
2898
+
2778 2899
 DUK_INTERNAL_DECL duk_bool_t duk_is_whole_get_int32_nonegzero(duk_double_t x, duk_int32_t *ival);
2779 2900
 DUK_INTERNAL_DECL duk_bool_t duk_is_whole_get_int32(duk_double_t x, duk_int32_t *ival);
2780 2901
 DUK_INTERNAL_DECL duk_bool_t duk_double_is_anyinf(duk_double_t x);
... ...
@@ -2789,6 +2945,33 @@ DUK_INTERNAL_DECL duk_double_t duk_double_trunc_towards_zero(duk_double_t x);
2789 2789
 DUK_INTERNAL_DECL duk_bool_t duk_double_same_sign(duk_double_t x, duk_double_t y);
2790 2790
 DUK_INTERNAL_DECL duk_double_t duk_double_fmin(duk_double_t x, duk_double_t y);
2791 2791
 DUK_INTERNAL_DECL duk_double_t duk_double_fmax(duk_double_t x, duk_double_t y);
2792
+DUK_INTERNAL_DECL duk_bool_t duk_double_is_finite(duk_double_t x);
2793
+DUK_INTERNAL_DECL duk_bool_t duk_double_is_integer(duk_double_t x);
2794
+DUK_INTERNAL_DECL duk_bool_t duk_double_is_safe_integer(duk_double_t x);
2795
+
2796
+DUK_INTERNAL_DECL duk_double_t duk_double_div(duk_double_t x, duk_double_t y);
2797
+DUK_INTERNAL_DECL duk_int_t duk_double_to_int_t(duk_double_t x);
2798
+DUK_INTERNAL_DECL duk_uint_t duk_double_to_uint_t(duk_double_t x);
2799
+DUK_INTERNAL_DECL duk_int32_t duk_double_to_int32_t(duk_double_t x);
2800
+DUK_INTERNAL_DECL duk_uint32_t duk_double_to_uint32_t(duk_double_t x);
2801
+DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
2802
+
2803
+/*
2804
+ *  Miscellaneous
2805
+ */
2806
+
2807
+/* Example: x     = 0x10 = 0b00010000
2808
+ *          x - 1 = 0x0f = 0b00001111
2809
+ *          x & (x - 1) == 0
2810
+ *
2811
+ *          x     = 0x07 = 0b00000111
2812
+ *          x - 1 = 0x06 = 0b00000110
2813
+ *          x & (x - 1) != 0
2814
+ *
2815
+ * However, incorrectly true for x == 0 so check for that explicitly.
2816
+ */
2817
+#define DUK_IS_POWER_OF_TWO(x) \
2818
+	((x) != 0U && ((x) & ((x) - 1U)) == 0U)
2792 2819
 
2793 2820
 #endif  /* DUK_UTIL_H_INCLUDED */
2794 2821
 /* #include duk_strings.h */
... ...
@@ -2963,7 +3146,7 @@ DUK_INTERNAL_DECL duk_double_t duk_double_fmax(duk_double_t x, duk_double_t y);
2963 2963
 /* #include duk_js_bytecode.h */
2964 2964
 #line 1 "duk_js_bytecode.h"
2965 2965
 /*
2966
- *  Ecmascript bytecode
2966
+ *  ECMAScript bytecode
2967 2967
  */
2968 2968
 
2969 2969
 #if !defined(DUK_JS_BYTECODE_H_INCLUDED)
... ...
@@ -3836,7 +4019,7 @@ struct duk_lexer_codepoint {
3836 3836
 	duk_int_t line;
3837 3837
 };
3838 3838
 
3839
-/* Lexer context.  Same context is used for Ecmascript and Regexp parsing. */
3839
+/* Lexer context.  Same context is used for ECMAScript and Regexp parsing. */
3840 3840
 struct duk_lexer_ctx {
3841 3841
 #if defined(DUK_USE_LEXER_SLIDING_WINDOW)
3842 3842
 	duk_lexer_codepoint *window; /* unicode code points, window[0] is always next, points to 'buffer' */
... ...
@@ -3887,13 +4070,13 @@ DUK_INTERNAL_DECL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_
3887 3887
 /* #include duk_js_compiler.h */
3888 3888
 #line 1 "duk_js_compiler.h"
3889 3889
 /*
3890
- *  Ecmascript compiler.
3890
+ *  ECMAScript compiler.
3891 3891
  */
3892 3892
 
3893 3893
 #if !defined(DUK_JS_COMPILER_H_INCLUDED)
3894 3894
 #define DUK_JS_COMPILER_H_INCLUDED
3895 3895
 
3896
-/* ecmascript compiler limits */
3896
+/* ECMAScript compiler limits */
3897 3897
 #define DUK_COMPILER_TOKEN_LIMIT           100000000L  /* 1e8: protects against deeply nested inner functions */
3898 3898
 
3899 3899
 /* maximum loopcount for peephole optimization */
... ...
@@ -4075,6 +4258,7 @@ struct duk_compiler_func {
4075 4075
 	duk_uint8_t is_arguments_shadowed;   /* argument/function declaration shadows 'arguments' */
4076 4076
 	duk_uint8_t needs_shuffle;           /* function needs shuffle registers */
4077 4077
 	duk_uint8_t reject_regexp_in_adv;    /* reject RegExp literal on next advance() call; needed for handling IdentifierName productions */
4078
+	duk_uint8_t allow_regexp_in_adv;     /* allow RegExp literal on next advance() call */
4078 4079
 };
4079 4080
 
4080 4081
 struct duk_compiler_ctx {
... ...
@@ -5378,10 +5562,12 @@ DUK_INTERNAL_DECL duk_hobject *duk_to_hobject(duk_hthread *thr, duk_idx_t idx);
5378 5378
 DUK_INTERNAL_DECL duk_double_t duk_to_number_m1(duk_hthread *thr);
5379 5379
 DUK_INTERNAL_DECL duk_double_t duk_to_number_m2(duk_hthread *thr);
5380 5380
 
5381
+DUK_INTERNAL_DECL duk_bool_t duk_to_boolean_top_pop(duk_hthread *thr);
5382
+
5381 5383
 #if defined(DUK_USE_DEBUGGER_SUPPORT)  /* only needed by debugger for now */
5382 5384
 DUK_INTERNAL_DECL duk_hstring *duk_safe_to_hstring(duk_hthread *thr, duk_idx_t idx);
5383 5385
 #endif
5384
-DUK_INTERNAL_DECL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv);
5386
+DUK_INTERNAL_DECL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk_bool_t avoid_side_effects);
5385 5387
 
5386 5388
 DUK_INTERNAL_DECL duk_int_t duk_to_int_clamped_raw(duk_hthread *thr, duk_idx_t idx, duk_int_t minval, duk_int_t maxval, duk_bool_t *out_clamped);  /* out_clamped=NULL, RangeError if outside range */
5387 5389
 DUK_INTERNAL_DECL duk_int_t duk_to_int_clamped(duk_hthread *thr, duk_idx_t idx, duk_int_t minval, duk_int_t maxval);
... ...
@@ -5519,6 +5705,8 @@ DUK_INTERNAL_DECL void duk_xdef_prop_stridx_builtin(duk_hthread *thr, duk_idx_t
5519 5519
 
5520 5520
 DUK_INTERNAL_DECL void duk_xdef_prop_stridx_thrower(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx);  /* [] -> [] */
5521 5521
 
5522
+DUK_INTERNAL_DECL duk_bool_t duk_get_method_stridx(duk_hthread *thr, duk_idx_t idx, duk_small_uint_t stridx);
5523
+
5522 5524
 DUK_INTERNAL_DECL void duk_pack(duk_hthread *thr, duk_idx_t count);
5523 5525
 DUK_INTERNAL_DECL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx);
5524 5526
 #if 0
... ...
@@ -5555,6 +5743,10 @@ DUK_INTERNAL_DECL void duk_concat_2(duk_hthread *thr);
5555 5555
 
5556 5556
 DUK_INTERNAL_DECL duk_int_t duk_pcall_method_flags(duk_hthread *thr, duk_idx_t nargs, duk_small_uint_t call_flags);
5557 5557
 
5558
+#if defined(DUK_USE_SYMBOL_BUILTIN)
5559
+DUK_INTERNAL_DECL void duk_to_primitive_ordinary(duk_hthread *thr, duk_idx_t idx, duk_int_t hint);
5560
+#endif
5561
+
5558 5562
 /* Raw internal valstack access macros: access is unsafe so call site
5559 5563
  * must have a guarantee that the index is valid.  When that is the case,
5560 5564
  * using these macro results in faster and smaller code than duk_get_tval().
... ...
@@ -5594,7 +5786,7 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5594 5594
  *  strings used as internal property names and raw buffers converted to
5595 5595
  *  strings.  In such cases the 'clen' field contains an inaccurate value.
5596 5596
  *
5597
- *  Ecmascript requires support for 32-bit long strings.  However, since each
5597
+ *  ECMAScript requires support for 32-bit long strings.  However, since each
5598 5598
  *  16-bit codepoint can take 3 bytes in CESU-8, this representation can only
5599 5599
  *  support about 1.4G codepoint long strings in extreme cases.  This is not
5600 5600
  *  really a practical issue.
... ...
@@ -5618,12 +5810,15 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5618 5618
 #define DUK_HSTRING_MAX_BYTELEN                     (0x7fffffffUL)
5619 5619
 #endif
5620 5620
 
5621
-/* XXX: could add flags for "is valid CESU-8" (Ecmascript compatible strings),
5621
+/* XXX: could add flags for "is valid CESU-8" (ECMAScript compatible strings),
5622 5622
  * "is valid UTF-8", "is valid extended UTF-8" (internal strings are not,
5623 5623
  * regexp bytecode is), and "contains non-BMP characters".  These are not
5624 5624
  * needed right now.
5625 5625
  */
5626 5626
 
5627
+/* With lowmem builds the high 16 bits of duk_heaphdr are used for other
5628
+ * purposes, so this leaves 7 duk_heaphdr flags and 9 duk_hstring flags.
5629
+ */
5627 5630
 #define DUK_HSTRING_FLAG_ASCII                      DUK_HEAPHDR_USER_FLAG(0)  /* string is ASCII, clen == blen */
5628 5631
 #define DUK_HSTRING_FLAG_ARRIDX                     DUK_HEAPHDR_USER_FLAG(1)  /* string is a valid array index */
5629 5632
 #define DUK_HSTRING_FLAG_SYMBOL                     DUK_HEAPHDR_USER_FLAG(2)  /* string is a symbol (invalid utf-8) */
... ...
@@ -5632,6 +5827,7 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5632 5632
 #define DUK_HSTRING_FLAG_STRICT_RESERVED_WORD       DUK_HEAPHDR_USER_FLAG(5)  /* string is a reserved word (strict) */
5633 5633
 #define DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS          DUK_HEAPHDR_USER_FLAG(6)  /* string is 'eval' or 'arguments' */
5634 5634
 #define DUK_HSTRING_FLAG_EXTDATA                    DUK_HEAPHDR_USER_FLAG(7)  /* string data is external (duk_hstring_external) */
5635
+#define DUK_HSTRING_FLAG_PINNED_LITERAL             DUK_HEAPHDR_USER_FLAG(8)  /* string is a literal, and pinned */
5635 5636
 
5636 5637
 #define DUK_HSTRING_HAS_ASCII(x)                    DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
5637 5638
 #define DUK_HSTRING_HAS_ARRIDX(x)                   DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
... ...
@@ -5641,6 +5837,7 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5641 5641
 #define DUK_HSTRING_HAS_STRICT_RESERVED_WORD(x)     DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
5642 5642
 #define DUK_HSTRING_HAS_EVAL_OR_ARGUMENTS(x)        DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
5643 5643
 #define DUK_HSTRING_HAS_EXTDATA(x)                  DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
5644
+#define DUK_HSTRING_HAS_PINNED_LITERAL(x)           DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
5644 5645
 
5645 5646
 #define DUK_HSTRING_SET_ASCII(x)                    DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
5646 5647
 #define DUK_HSTRING_SET_ARRIDX(x)                   DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
... ...
@@ -5650,6 +5847,7 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5650 5650
 #define DUK_HSTRING_SET_STRICT_RESERVED_WORD(x)     DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
5651 5651
 #define DUK_HSTRING_SET_EVAL_OR_ARGUMENTS(x)        DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
5652 5652
 #define DUK_HSTRING_SET_EXTDATA(x)                  DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
5653
+#define DUK_HSTRING_SET_PINNED_LITERAL(x)           DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
5653 5654
 
5654 5655
 #define DUK_HSTRING_CLEAR_ASCII(x)                  DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
5655 5656
 #define DUK_HSTRING_CLEAR_ARRIDX(x)                 DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
... ...
@@ -5659,6 +5857,7 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
5659 5659
 #define DUK_HSTRING_CLEAR_STRICT_RESERVED_WORD(x)   DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
5660 5660
 #define DUK_HSTRING_CLEAR_EVAL_OR_ARGUMENTS(x)      DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
5661 5661
 #define DUK_HSTRING_CLEAR_EXTDATA(x)                DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
5662
+#define DUK_HSTRING_CLEAR_PINNED_LITERAL(x)         DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
5662 5663
 
5663 5664
 #if 0  /* Slightly smaller code without explicit flag, but explicit flag
5664 5665
         * is very useful when 'clen' is dropped.
... ...
@@ -5827,12 +6026,12 @@ DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
5827 5827
 /*
5828 5828
  *  Heap object representation.
5829 5829
  *
5830
- *  Heap objects are used for Ecmascript objects, arrays, and functions,
5830
+ *  Heap objects are used for ECMAScript objects, arrays, and functions,
5831 5831
  *  but also for internal control like declarative and object environment
5832 5832
  *  records.  Compiled functions, native functions, and threads are also
5833 5833
  *  objects but with an extended C struct.
5834 5834
  *
5835
- *  Objects provide the required Ecmascript semantics and exotic behaviors
5835
+ *  Objects provide the required ECMAScript semantics and exotic behaviors
5836 5836
  *  especially for property access.
5837 5837
  *
5838 5838
  *  Properties are stored in three conceptual parts:
... ...
@@ -6461,7 +6660,7 @@ DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
6461 6461
 #define DUK_HOBJECT_PROTOTYPE_CHAIN_SANITY      10000L
6462 6462
 
6463 6463
 /*
6464
- *  Ecmascript [[Class]]
6464
+ *  ECMAScript [[Class]]
6465 6465
  */
6466 6466
 
6467 6467
 /* range check not necessary because all 4-bit values are mapped */
... ...
@@ -6825,9 +7024,9 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype(duk_hthread *thr);
6825 6825
 /* #include duk_hcompfunc.h */
6826 6826
 #line 1 "duk_hcompfunc.h"
6827 6827
 /*
6828
- *  Heap compiled function (Ecmascript function) representation.
6828
+ *  Heap compiled function (ECMAScript function) representation.
6829 6829
  *
6830
- *  There is a single data buffer containing the Ecmascript function's
6830
+ *  There is a single data buffer containing the ECMAScript function's
6831 6831
  *  bytecode, constants, and inner functions.
6832 6832
  */
6833 6833
 
... ...
@@ -7221,7 +7420,8 @@ struct duk_hboundfunc {
7221 7221
 	} while (0)
7222 7222
 
7223 7223
 /* Get the current data pointer (caller must ensure buf != NULL) as a
7224
- * duk_uint8_t ptr.
7224
+ * duk_uint8_t ptr.  Note that the result may be NULL if the underlying
7225
+ * buffer has zero size and is not a fixed buffer.
7225 7226
  */
7226 7227
 #define DUK_HBUFOBJ_GET_SLICE_BASE(heap,h) \
7227 7228
 	(DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), \
... ...
@@ -7540,14 +7740,14 @@ struct duk_activation {
7540 7540
 	duk_instr_t *curr_pc;   /* next instruction to execute (points to 'func' bytecode, stable pointer), NULL for native calls */
7541 7541
 
7542 7542
 	/* bottom_byteoff and retval_byteoff are only used for book-keeping
7543
-	 * of Ecmascript-initiated calls, to allow returning to an Ecmascript
7543
+	 * of ECMAScript-initiated calls, to allow returning to an ECMAScript
7544 7544
 	 * function properly.
7545 7545
 	 */
7546 7546
 
7547 7547
 	/* Bottom of valstack for this activation, used to reset
7548 7548
 	 * valstack_bottom on return; offset is absolute.  There's
7549 7549
 	 * no need to track 'top' because native call handling deals
7550
-	 * with that using locals, and for Ecmascript returns 'nregs'
7550
+	 * with that using locals, and for ECMAScript returns 'nregs'
7551 7551
 	 * indicates the necessary top.
7552 7552
 	 */
7553 7553
 	duk_size_t bottom_byteoff;