summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yaml111
-rw-r--r--.github/workflows/monkey-test.yaml69
-rw-r--r--.github/workflows/static-analysis.yaml65
-rw-r--r--Makefile56
-rw-r--r--Makefile.defaults13
-rw-r--r--Makefile.tools118
-rw-r--r--README.md8
-rw-r--r--content/fetch.h24
-rw-r--r--content/fetchers/about/certificate.c306
-rw-r--r--content/fetchers/about/chart.c2
-rw-r--r--content/fetchers/curl.c675
-rw-r--r--content/fetchers/file/dirlist.c3
-rw-r--r--content/fs_backing_store.c14
-rw-r--r--content/handlers/css/dump.c28
-rw-r--r--content/handlers/css/hints.c18
-rw-r--r--content/handlers/css/utils.h25
-rw-r--r--content/handlers/html/Makefile1
-rw-r--r--content/handlers/html/box.h4
-rw-r--r--content/handlers/html/box_construct.c121
-rw-r--r--content/handlers/html/box_inspect.c13
-rw-r--r--content/handlers/html/box_inspect.h12
-rw-r--r--content/handlers/html/box_normalise.c202
-rw-r--r--content/handlers/html/box_normalise.h9
-rw-r--r--content/handlers/html/box_special.c37
-rw-r--r--content/handlers/html/css.c11
-rw-r--r--content/handlers/html/dom_event.c12
-rw-r--r--content/handlers/html/form.c31
-rw-r--r--content/handlers/html/html.c24
-rw-r--r--content/handlers/html/interaction.c10
-rw-r--r--content/handlers/html/layout.c770
-rw-r--r--content/handlers/html/layout_flex.c1117
-rw-r--r--content/handlers/html/layout_internal.h738
-rw-r--r--content/handlers/html/redraw_border.c9
-rw-r--r--content/handlers/html/script.c1
-rw-r--r--content/handlers/html/table.c49
-rw-r--r--content/handlers/image/Makefile3
-rw-r--r--content/handlers/image/bmp.c12
-rw-r--r--content/handlers/image/gif.c390
-rw-r--r--content/handlers/image/ico.c49
-rw-r--r--content/handlers/image/image.c10
-rw-r--r--content/handlers/image/image_cache.c26
-rw-r--r--content/handlers/image/jpeg.c184
-rw-r--r--content/handlers/image/jpegxl.c340
-rw-r--r--content/handlers/image/jpegxl.h28
-rw-r--r--content/handlers/image/nssprite.c24
-rw-r--r--content/handlers/image/png.c53
-rw-r--r--content/handlers/image/rsvg.c44
-rw-r--r--content/handlers/image/rsvg246.c280
-rw-r--r--content/handlers/image/webp.c38
-rw-r--r--content/handlers/javascript/duktape/CSSRule.bnd22
-rw-r--r--content/handlers/javascript/duktape/CSSStyleSheet.bnd22
-rw-r--r--content/handlers/javascript/duktape/CanvasRenderingContext2D.bnd6
-rw-r--r--content/handlers/javascript/duktape/Console.bnd2
-rw-r--r--content/handlers/javascript/duktape/DOMSettableTokenList.bnd44
-rw-r--r--content/handlers/javascript/duktape/DOMTokenList.bnd163
-rw-r--r--content/handlers/javascript/duktape/Element.bnd31
-rw-r--r--content/handlers/javascript/duktape/ImageData.bnd2
-rw-r--r--content/handlers/javascript/duktape/duk_config.h51
-rw-r--r--content/handlers/javascript/duktape/dukky.c8
-rw-r--r--content/handlers/javascript/duktape/duktape.c26721
-rw-r--r--content/handlers/javascript/duktape/duktape.h21
-rw-r--r--content/handlers/javascript/duktape/netsurf.bnd6
-rw-r--r--content/handlers/javascript/duktape/polyfill.js18
-rw-r--r--content/handlers/text/textplain.c2
-rw-r--r--content/hlcache.c10
-rw-r--r--content/llcache.c31
-rw-r--r--content/mimesniff.c13
-rw-r--r--content/urldb.c10
-rw-r--r--desktop/Makefile2
-rw-r--r--desktop/bitmap.c338
-rw-r--r--desktop/bitmap.h147
-rw-r--r--desktop/browser_history.c4
-rw-r--r--desktop/browser_window.c5
-rw-r--r--desktop/cookie_manager.c30
-rw-r--r--desktop/global_history.c22
-rw-r--r--desktop/gui_factory.c30
-rw-r--r--desktop/hotlist.c39
-rw-r--r--desktop/netsurf.c2
-rw-r--r--desktop/options.h6
-rw-r--r--desktop/save_complete.c4
-rw-r--r--desktop/searchweb.c6
-rw-r--r--desktop/searchweb.h2
-rw-r--r--desktop/selection.c2
-rw-r--r--desktop/textarea.c101
-rw-r--r--desktop/treeview.c97
-rw-r--r--desktop/version.c4
-rw-r--r--docs/PACKAGING-GTK15
-rw-r--r--docs/UnimplementedJavascript.md17
-rw-r--r--docs/env.sh156
-rw-r--r--frontends/amiga/Makefile2
-rw-r--r--frontends/amiga/Makefile.defaults1
-rw-r--r--frontends/amiga/bitmap.c75
-rwxr-xr-xfrontends/amiga/bitmap.h16
-rw-r--r--frontends/amiga/dist/Rexx/YT_download_page.nsrx21
-rw-r--r--frontends/amiga/dist/Rexx/YT_open.nsrx21
-rw-r--r--frontends/amiga/dist/Rexx/YT_play.nsrx19
-rw-r--r--frontends/amiga/dt_anim.c2
-rw-r--r--frontends/amiga/dt_picture.c4
-rw-r--r--frontends/amiga/font_bullet.c7
-rw-r--r--frontends/amiga/font_diskfont.c16
-rw-r--r--frontends/amiga/gui_menu.c31
-rw-r--r--frontends/amiga/gui_menu.h5
-rwxr-xr-xfrontends/amiga/gui_options.c59
-rw-r--r--frontends/amiga/icon.c2
-rw-r--r--frontends/amiga/libs.c4
-rw-r--r--frontends/amiga/pkg/SearchEngines2
-rwxr-xr-xfrontends/amiga/pkg/netsurf.readme4
-rw-r--r--frontends/amiga/pkg/netsurf_os3.readme10
-rw-r--r--frontends/amiga/plotters.c26
-rw-r--r--frontends/amiga/version.c2
-rw-r--r--frontends/atari/Makefile2
-rw-r--r--frontends/atari/bitmap.c96
-rw-r--r--frontends/atari/bitmap.h2
-rw-r--r--frontends/atari/plot/font_freetype.c1
-rw-r--r--frontends/atari/plot/font_internal.c1
-rw-r--r--frontends/beos/Makefile2
-rw-r--r--frontends/beos/bitmap.cpp76
-rw-r--r--frontends/framebuffer/bitmap.c69
-rw-r--r--frontends/framebuffer/font_internal.c13
-rw-r--r--frontends/framebuffer/gui.c2
-rw-r--r--frontends/gtk/Makefile12
-rw-r--r--frontends/gtk/bitmap.c274
-rw-r--r--frontends/gtk/bitmap.h2
-rw-r--r--frontends/gtk/download.c7
-rw-r--r--frontends/gtk/fetch.c1
-rw-r--r--frontends/gtk/gdk.c2
-rw-r--r--frontends/gtk/gui.c14
-rw-r--r--frontends/gtk/misc.c2
l---------frontends/gtk/res/fr/credits.html1
l---------frontends/gtk/res/fr/licence.html1
l---------frontends/gtk/res/fr/welcome.html1
-rw-r--r--frontends/gtk/res/netsurf.gresource.xml3
-rw-r--r--frontends/gtk/scaffolding.c13
-rw-r--r--frontends/gtk/search.c3
-rw-r--r--frontends/gtk/toolbar.c15
-rw-r--r--frontends/monkey/bitmap.c45
-rw-r--r--frontends/riscos/Makefile12
-rw-r--r--frontends/riscos/Makefile.tools64
-rw-r--r--frontends/riscos/appdir/!Boot,feb4
-rw-r--r--frontends/riscos/appdir/Resources/SearchEngines43
-rw-r--r--frontends/riscos/appdir/Resources/en/!Help8
-rw-r--r--frontends/riscos/appdir/Resources/nl/!Help8
-rw-r--r--frontends/riscos/bitmap.c84
-rw-r--r--frontends/riscos/bitmap.h11
-rw-r--r--frontends/riscos/configure/con_content.c14
-rw-r--r--frontends/riscos/configure/con_image.c2
-rw-r--r--frontends/riscos/content-handlers/artworks.c2
-rw-r--r--frontends/riscos/content-handlers/awrender.s82
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb2
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help6
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb2
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive)bin29516 -> 29516 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646])bin64 -> 64 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429])bin64 -> 64 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K])0
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7])0
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932)bin996 -> 996 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames14016
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites,ff9 (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites,ff9)bin5780 -> 5780 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites11,ff9 (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites11,ff9)bin11132 -> 11132 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites22,ff9 (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites22,ff9)bin7324 -> 7324 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9bin0 -> 996 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9bin0 -> 1892 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9bin0 -> 1684 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9bin0 -> 3268 bytes
-rw-r--r--frontends/riscos/distribution/!System/310/Modules/Network/URI,ffabin9188 -> 7120 bytes
-rw-r--r--[-rwxr-xr-x]frontends/riscos/distribution/!System/310/Modules/SharedULib,ffabin3116 -> 3192 bytes
-rw-r--r--frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffabin0 -> 26504 bytes
-rw-r--r--frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright20
-rw-r--r--frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe34
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0202
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/Copying526
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Cache/Copyright20
-rw-r--r--frontends/riscos/distribution/3rdParty/Cache/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/CryptRand/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/COPYING140
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/ReadMe21
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0202
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2481
-rw-r--r--frontends/riscos/distribution/3rdParty/SharedULib/Copyright15
-rw-r--r--frontends/riscos/distribution/3rdParty/SharedULib/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Tinct/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0202
-rw-r--r--frontends/riscos/distribution/3rdParty/Unicode/Copyright66
-rw-r--r--frontends/riscos/distribution/3rdParty/Unicode/Origin,b281
-rw-r--r--frontends/riscos/distribution/LeesMij14
-rw-r--r--frontends/riscos/distribution/ReadMe23
-rw-r--r--frontends/riscos/download.c19
-rw-r--r--frontends/riscos/gui.c86
-rw-r--r--frontends/riscos/gui/button_bar.c3
-rw-r--r--frontends/riscos/gui/throbber.c4
-rw-r--r--frontends/riscos/gui/url_bar.c7
-rw-r--r--frontends/riscos/iconbar.c2
-rw-r--r--frontends/riscos/image.c39
-rw-r--r--frontends/riscos/print.c6
-rw-r--r--frontends/riscos/save.c12
-rw-r--r--frontends/riscos/scripts/Run13
-rw-r--r--frontends/riscos/templates/de8
-rw-r--r--frontends/riscos/templates/en8
-rw-r--r--frontends/riscos/templates/fr8
-rw-r--r--frontends/riscos/templates/nl8
-rw-r--r--frontends/riscos/textarea.c3
-rw-r--r--frontends/riscos/ucstables.c219
-rw-r--r--frontends/riscos/window.c14
-rw-r--r--frontends/windows/Makefile2
-rw-r--r--frontends/windows/bitmap.c65
-rw-r--r--frontends/windows/bitmap.h2
-rw-r--r--frontends/windows/download.c1
-rw-r--r--frontends/windows/prefs.c1
-rw-r--r--frontends/windows/res/installer.nsi8
-rw-r--r--frontends/windows/window.c8
-rw-r--r--frontends/windows/window.h1
-rw-r--r--include/netsurf/bitmap.h154
-rw-r--r--include/netsurf/fetch.h17
-rw-r--r--include/netsurf/inttypes.h5
-rw-r--r--include/netsurf/keypress.h2
-rw-r--r--include/netsurf/plot_style.h4
-rw-r--r--resources/FatMessages1177
-rw-r--r--resources/SearchEngines37
-rw-r--r--resources/ca-bundle2302
-rw-r--r--resources/de/welcome.html30
-rw-r--r--resources/en/credits.html2
-rw-r--r--resources/en/licence.html56
-rw-r--r--resources/en/welcome.html32
-rw-r--r--resources/fr/credits.html98
-rw-r--r--resources/fr/licence.html1876
-rw-r--r--resources/fr/welcome.html64
-rw-r--r--resources/it/credits.html2
-rw-r--r--resources/it/licence.html42
-rw-r--r--resources/it/welcome.html30
-rw-r--r--resources/ja/welcome.html30
-rw-r--r--resources/nl/credits.html2
-rw-r--r--resources/nl/licence.html56
-rw-r--r--resources/nl/welcome.html36
-rw-r--r--resources/zh_CN/credits.html2
-rw-r--r--resources/zh_CN/licence.html60
-rw-r--r--resources/zh_CN/welcome.html30
-rw-r--r--test/assert.c19
-rw-r--r--test/corestrings.c2
-rw-r--r--test/data/Choices-all2
-rw-r--r--test/js/class-list.html29
-rw-r--r--test/js/index.html1
-rwxr-xr-xtest/monkey-see-monkey-do2
-rwxr-xr-xtools/jenkins-build.sh24
-rw-r--r--utils/config.h9
-rw-r--r--utils/corestringlist.h1
-rw-r--r--utils/file.c57
-rw-r--r--utils/filename.c88
-rw-r--r--utils/idna.c8
-rw-r--r--utils/inet.h11
-rw-r--r--utils/libdom.c123
-rw-r--r--utils/libdom.h23
-rw-r--r--utils/log.c5
-rw-r--r--utils/log.h1
-rw-r--r--utils/nscolour.c31
-rw-r--r--utils/nsoption.c13
-rw-r--r--utils/ssl_certs.c35
-rw-r--r--utils/useragent.c15
-rw-r--r--utils/utf8.c206
-rw-r--r--utils/utils.h27
328 files changed, 41904 insertions, 17243 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 000000000..eb92cdda1
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,111 @@
+name: "Linux Build"
+
+on: [push]
+
+jobs:
+ linux:
+ name: '${{ matrix.os }}: ${{ matrix.compiler.vendor }}'
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-22.04
+ - ubuntu-20.04
+ compiler:
+ # The NetSurf build system can't find LLVM AR (it looks for it
+ # in /usr/lib instead of /usr/bin:
+ # `make: /usr/lib/llvm-ar: No such file or directory`).
+ # So we need to make it explicit for llvm.
+ - { vendor: gnu, CC: gcc }
+ - { vendor: llvm, CC: clang, AR: llvm-ar }
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+
+ - name: apt-get install packages
+ run: sudo apt-get update -qq &&
+ sudo apt-get install --no-install-recommends -y
+ bison
+ build-essential
+ ccache
+ check
+ clang
+ flex
+ git
+ gperf
+ libcurl4-openssl-dev
+ libgtk-3-dev
+ libhtml-parser-perl
+ libjpeg-dev
+ libpng-dev
+ librsvg2-dev
+ llvm
+ pkg-config
+ wbritish # Needed for `/usr/share/dict/words`, used by test
+
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.compiler.vendor }}
+ max-size: 128M
+
+ - name: Build and install project libs
+ env:
+ CC: ${{ matrix.compiler.CC }}
+ CXX: ${{ matrix.compiler.CXX }}
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ ns-clone -d -s
+ ns-make-tools install
+ ns-make-libs install
+
+ - name: Disable -Werror
+ # We can remove this step if we ever move to GitHub properly.
+ run: |
+ find . -type f -name Makefile | xargs sed -i 's/-Werror//'
+
+ - name: Unit Tests
+ # Fails when built with clang:
+ # test/corestrings.c:58:F:corestrings:corestrings_test:486:
+ # Assertion 'ires == NSERROR_NOMEM' failed: ires == 0, NSERROR_NOMEM == 2
+ # Looks like `malloc_limit()` not working.
+ if: ${{ matrix.compiler.vendor != 'llvm' }}
+ env:
+ CC: ${{ matrix.compiler.CC }}
+ CXX: ${{ matrix.compiler.CXX }}
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ make test
+
+ - name: Build NetSurf GTK
+ env:
+ CC: ${{ matrix.compiler.CC }}
+ CXX: ${{ matrix.compiler.CXX }}
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ make -j"$(nproc)" TARGET=gtk
+
+ - name: Build NetSurf Monkey
+ env:
+ CC: ${{ matrix.compiler.CC }}
+ CXX: ${{ matrix.compiler.CXX }}
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ make -j"$(nproc)" TARGET=monkey
+
+ - name: Build NetSurf Framebuffer
+ env:
+ CC: ${{ matrix.compiler.CC }}
+ CXX: ${{ matrix.compiler.CXX }}
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ make -j"$(nproc)" TARGET=framebuffer
diff --git a/.github/workflows/monkey-test.yaml b/.github/workflows/monkey-test.yaml
new file mode 100644
index 000000000..e95c9796f
--- /dev/null
+++ b/.github/workflows/monkey-test.yaml
@@ -0,0 +1,69 @@
+name: "Monkey Test"
+
+on: [pull_request]
+
+jobs:
+ test:
+ name: '${{ matrix.test }}'
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ test:
+ - short-internet
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+
+ - name: apt-get install packages
+ run: sudo apt-get update -qq &&
+ sudo apt-get install --no-install-recommends -y
+ bison
+ build-essential
+ ccache
+ check
+ clang
+ flex
+ git
+ gperf
+ libcurl4-openssl-dev
+ libgtk-3-dev
+ libhtml-parser-perl
+ libjpeg-dev
+ libpng-dev
+ librsvg2-dev
+ llvm
+ pkg-config
+ wbritish # Needed for `/usr/share/dict/words`, used by test
+
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ key: ${{ github.job }}
+ max-size: 128M
+
+ - name: Build and install project libs
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ ns-clone -d -s
+ ns-make-tools install
+ ns-make-libs install
+
+ - name: Disable -Werror
+ # We can remove this step if we ever move to GitHub properly.
+ run: |
+ find . -type f -name Makefile | xargs sed -i 's/-Werror//'
+
+ - name: Build NetSurf Monkey
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ make -j"$(nproc)" TARGET=monkey
+
+ - name: Run Monkey Test
+ run: |
+ LC_ALL=C.UTF-8 test/monkey-see-monkey-do -v -d ${{ matrix.test }}
diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml
new file mode 100644
index 000000000..8604761fe
--- /dev/null
+++ b/.github/workflows/static-analysis.yaml
@@ -0,0 +1,65 @@
+name: "Static Analysis"
+
+on: [push]
+
+jobs:
+ codeql:
+ name: codeql
+ runs-on: ubuntu-22.04
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: ['cpp']
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - name: apt-get install packages
+ run: sudo apt-get update -qq &&
+ sudo apt-get install --no-install-recommends -y
+ bison
+ build-essential
+ ccache
+ flex
+ git
+ gperf
+ libcurl4-openssl-dev
+ libgtk-3-dev
+ libhtml-parser-perl
+ libjpeg-dev
+ libpng-dev
+ librsvg2-dev
+ pkg-config
+
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ key: ${{ github.job }}
+ max-size: 128M
+
+ - name: Build and install project libs
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ ns-clone -d -s
+ ns-make-tools install
+ ns-make-libs install
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+
+ - name: Build NetSurf
+ run: |
+ export TARGET_WORKSPACE="$(pwd)/projects"
+ source docs/env.sh
+ make -j"$(nproc)"
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/Makefile b/Makefile
index ac38b50ea..18665ed3d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
#
# Copyright 2007 Daniel Silverstone <dsilvers@netsurf-browser.org>
# Copyright 2008 Rob Kendrick <rjek@netsurf-browser.org>
+# Copyright 2024 Vincent Sanders <vince@netsurf-browser.org>
#
# Trivially, invoke as:
# make
@@ -39,13 +40,6 @@ MESSAGES_LANGUAGES=de en fr it nl zh_CN
# The target directory for the split messages
MESSAGES_TARGET=resources
-# Defaults for tools
-PERL=perl
-MKDIR=mkdir
-TOUCH=touch
-STRIP?=strip
-INSTALL?=install
-
# build verbosity
ifeq ($(V),1)
Q:=
@@ -54,31 +48,11 @@ else
endif
VQ=@
-# Override this only if the host compiler is called something different
-BUILD_CC := cc
-BUILD_CFLAGS = -g -W -Wall -Wundef -Wpointer-arith -Wcast-align \
- -Wwrite-strings -Wmissing-declarations -Wuninitialized \
- -Wno-unused-parameter
-
# compute HOST, TARGET and SUBTARGET
include frontends/Makefile.hts
-# target specific tool overrides
-include frontends/$(TARGET)/Makefile.tools
-
-# compiler versioning to adjust warning flags
-CC_VERSION := $(shell $(CC) -dumpfullversion -dumpversion)
-CC_MAJOR := $(word 1,$(subst ., ,$(CC_VERSION)))
-CC_MINOR := $(word 2,$(subst ., ,$(CC_VERSION)))
-define cc_ver_ge
-$(shell expr $(CC_MAJOR) \> $(1) \| \( $(CC_MAJOR) = $(1) \& $(CC_MINOR) \>= $(2) \) )
-endef
-
-# CCACHE
-ifeq ($(origin CCACHE),undefined)
- CCACHE=$(word 1,$(shell ccache -V 2>/dev/null))
-endif
-CC := $(CCACHE) $(CC)
+# tools used in builds
+include Makefile.tools
# Target paths
OBJROOT = build/$(HOST)-$(TARGET)$(SUBTARGET)
@@ -96,6 +70,11 @@ include Makefile.macros
# General flag setup
# ----------------------------------------------------------------------------
+# host compiler flags
+BUILD_CFLAGS = -g -W -Wall -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wmissing-declarations -Wuninitialized \
+ -Wno-unused-parameter
+
# Set up the warning flags here so that they can be overridden in the
# Makefile.config
COMMON_WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-align \
@@ -110,9 +89,14 @@ ifeq ($(call cc_ver_ge,4,6),1)
COMMON_WARNFLAGS += -Wno-unused-but-set-variable
endif
-# Implicit fallthrough warnings suppressed by comment
-ifeq ($(call cc_ver_ge,7,1),1)
- COMMON_WARNFLAGS += -Wimplicit-fallthrough=3
+ifeq ($(TOOLCHAIN),gcc)
+ # Implicit fallthrough warnings
+ ifeq ($(call cc_ver_ge,7,1),1)
+ COMMON_WARNFLAGS += -Wimplicit-fallthrough=5
+ endif
+else
+ # non gcc has different warning syntax
+ COMMON_WARNFLAGS += -Wimplicit-fallthrough
endif
# deal with chaging warning flags for different platforms
@@ -171,6 +155,7 @@ endif
$(eval $(call pkg_config_find_and_add_enabled,OPENSSL,openssl,OpenSSL))
$(eval $(call pkg_config_find_and_add_enabled,UTF8PROC,libutf8proc,utf8))
+$(eval $(call pkg_config_find_and_add_enabled,JPEGXL,libjxl,JPEGXL))
$(eval $(call pkg_config_find_and_add_enabled,WEBP,libwebp,WEBP))
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG))
$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
@@ -329,12 +314,17 @@ IFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
$(EXETARGET): $(OBJECTS) $(RESOURCES) $(MESSAGES) tools/linktrace-to-depfile.pl
$(VQ)echo " LINK: $(EXETARGET)"
-ifneq ($(TARGET)$(SUBTARGET),riscos-elf)
+ifneq ($(TARGET),riscos)
$(Q)$(CC) -o $(EXETARGET) $(OBJECTS) $(LDFLAGS) > $(DEPROOT)/link-raw.d
else
+ @# RISC OS targets are a bit special: we need to convert ELF -> AIF
+ ifeq ($(SUBTARGET),-aof)
+ $(Q)$(CC) -o $(EXETARGET) $(OBJECTS) $(LDFLAGS) > $(DEPROOT)/link-raw.d
+ else
$(Q)$(CXX) -o $(EXETARGET:,ff8=,e1f) $(OBJECTS) $(LDFLAGS) > $(DEPROOT)/link-raw.d
$(Q)$(ELF2AIF) $(EXETARGET:,ff8=,e1f) $(EXETARGET)
$(Q)$(RM) $(EXETARGET:,ff8=,e1f)
+ endif
endif
$(VQ)echo "LINKDEPS: $(EXETARGET)"
$(Q)echo -n "$(EXETARGET) $(DEPROOT)/link.d: " > $(DEPROOT)/link.d
diff --git a/Makefile.defaults b/Makefile.defaults
index edf491a6f..bbff68814 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -51,6 +51,10 @@ NETSURF_USE_GIF := AUTO
# Valid options: YES, NO (highly recommended)
NETSURF_USE_JPEG := YES
+# Enable NetSurf's use of libjxl for displaying JPEGXLs
+# Valid options: YES, NO, AUTO (highly recommended)
+NETSURF_USE_JPEGXL := AUTO
+
# Enable NetSurf's use of libpng for displaying PNGs.
# Valid options: YES, NO, AUTO (highly recommended)
NETSURF_USE_PNG := AUTO
@@ -101,10 +105,11 @@ NETSURF_USE_UTF8PROC := YES
# Valid options: YES, NO
NETSURF_STRIP_BINARY := NO
-# Template used for constructing the User Agent: string. The first two
-# replacements are major/minor version, next is OS.
-# Please don't be tempted to mention Mozilla here! Let's let that lie die.
-NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s)"
+# Template used for constructing the User Agent: string. The first
+# replacement is OS, the next two are major/minor version.
+# Note that the "Mozilla/5.0" prefix is a requirement to enable modern
+# web standards on many websites. It should not be removed or modified.
+NETSURF_UA_FORMAT_STRING := "Mozilla/5.0 (%s) NetSurf/%d.%d"
# Default home page, if one is not defined by the user. Note that this
# option does not apply to the RISC OS version, as it has its own local
diff --git a/Makefile.tools b/Makefile.tools
new file mode 100644
index 000000000..3226d13b0
--- /dev/null
+++ b/Makefile.tools
@@ -0,0 +1,118 @@
+# -*- mode: makefile-gmake -*-
+##
+## Setup tools to build project including compiler
+##
+
+# Expected inputs:
+#
+# HOST
+# TARGET
+# SUBTARGET
+#
+# output:
+# variables:
+# CC
+# BUILD_CC
+# CCACHE
+# TOOLCHAIN
+# PERL
+# MKDIR
+# TOUCH
+# STRIP
+# INSTALL
+# CC_VERSION
+# CC_MAJOR
+# CC_MINOR
+#
+# macros:
+# cc_ver_ge
+
+# Defaults for tools
+PERL=perl
+MKDIR=mkdir
+TOUCH=touch
+STRIP?=strip
+INSTALL?=install
+# Override this only if the host compiler is called something different
+BUILD_CC := cc
+
+# target specific tool overrides
+include frontends/$(TARGET)/Makefile.tools
+
+# CCACHE
+ifeq ($(origin CCACHE),undefined)
+ CCACHE=$(word 1,$(shell ccache -V 2>/dev/null))
+endif
+CC := $(CCACHE) $(CC)
+
+###############################################################################
+# Auto-detect the toolchain
+###############################################################################
+
+# Check for GCC first, as that's most likely
+# TODO: Using shell redirection like this probably hurts portability
+CC_SPECS := $(shell $(CC) -dumpspecs 2>&1)
+ifeq ($(findstring libgcc,$(CC_SPECS)),libgcc)
+ # Looks like GCC
+ TOOLCHAIN := gcc
+else
+ # Not GCC, so enquire further
+ ccvsn := $(shell $(CC) --version 2>&1)
+ ifeq ($(ccvsn),)
+ # Version string is blank
+ ifeq ($(BUILD),arm-unknown-riscos)
+ # For some reason we never see the output of SCL apps, so might be
+ # Norcroft. However it might also be a GCC linked against a buggy
+ # UnixLib.
+ # TODO: Something more useful than blindly assuming GCC.
+ ccvsn := GCC
+ # ccvsn := Norcroft
+ endif
+ endif
+
+ ifeq ($(findstring lcc:,$(ccvsn)),lcc:)
+ # MCST LCC pretends to be gcc
+ TOOLCHAIN := gcc
+ endif
+
+ # "Norcroft ..."
+ ifeq ($(word 1,$(ccvsn)),Norcroft)
+ TOOLCHAIN := norcroft
+ endif
+ # "GCC ..."
+ ifeq ($(word 1,$(ccvsn)),GCC)
+ TOOLCHAIN := gcc
+ endif
+ # "clang ..."
+ ifeq ($(word 1,$(ccvsn)),clang)
+ TOOLCHAIN := clang
+ endif
+ ifeq ($(word 2,$(ccvsn)),clang)
+ # Some newer clangs have distributor as first word
+ # (ie, Debian, Apple, etc)
+ TOOLCHAIN := clang
+ endif
+ ifeq ($(word 2,$(ccvsn)),LLVM)
+ # Apple version is "Apple LLVM" to be differntly awkward
+ TOOLCHAIN := clang
+ endif
+ ifeq ($(word 1,$(ccvsn)),Open64)
+ TOOLCHAIN := open64
+ endif
+endif
+
+ifeq ($(TOOLCHAIN),)
+ $(error Unable to detect toolchain)
+endif
+
+
+###############################################################################
+# Compiler Versioning (to adjust warning flags)
+###############################################################################
+
+CC_VERSION := $(shell $(CC) -dumpfullversion -dumpversion)
+CC_MAJOR := $(word 1,$(subst ., ,$(CC_VERSION)))
+CC_MINOR := $(word 2,$(subst ., ,$(CC_VERSION)))
+define cc_ver_ge
+$(shell expr $(CC_MAJOR) \> $(1) \| \( $(CC_MAJOR) = $(1) \& $(CC_MINOR) \>= $(2) \) )
+endef
diff --git a/README.md b/README.md
index a6b688430..8f3843042 100644
--- a/README.md
+++ b/README.md
@@ -15,13 +15,13 @@ Creating a new port
Look at the existing front ends for example implementations.
The framebuffer front end is simplest and most self-contained.
-Also, you can [contact the developers](http://www.netsurf-browser.org/contact/)
+Also, you can [contact the developers](https://www.netsurf-browser.org/contact/)
for help.
Further documentation
---------------------
-* [Developer documentation](http://www.netsurf-browser.org/developers/)
-* [Developer wiki](http://wiki.netsurf-browser.org/Documentation/)
-* [Code style guide](http://www.netsurf-browser.org/developers/StyleGuide.pdf)
+* [Developer documentation](https://www.netsurf-browser.org/developers/)
+* [Developer wiki](https://wiki.netsurf-browser.org/Documentation/)
+* [Code style guide](https://www.netsurf-browser.org/developers/StyleGuide.pdf)
diff --git a/content/fetch.h b/content/fetch.h
index 843fec96e..e7180d0c3 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -94,6 +94,16 @@ typedef struct fetch_msg {
} fetch_msg;
/**
+ * Fetcher post data types
+ */
+typedef enum {
+ FETCH_POSTDATA_NONE,
+ FETCH_POSTDATA_URLENC,
+ FETCH_POSTDATA_MULTIPART,
+} fetch_postdata_type;
+
+
+/**
* Fetch POST multipart data
*/
struct fetch_multipart_data {
@@ -106,6 +116,20 @@ struct fetch_multipart_data {
bool file; /**< Item is a file */
};
+/**
+ * fetch POST data
+ */
+struct fetch_postdata {
+ fetch_postdata_type type;
+ union {
+ /** Url encoded POST string if type is FETCH_POSTDATA_URLENC */
+ char *urlenc;
+ /** Multipart post data if type is FETCH_POSTDATA_MULTIPART */
+ struct fetch_multipart_data *multipart;
+ } data;
+};
+
+
typedef void (*fetch_callback)(const fetch_msg *msg, void *p);
/**
diff --git a/content/fetchers/about/certificate.c b/content/fetchers/about/certificate.c
index 0d0d6f5dc..6f634d22a 100644
--- a/content/fetchers/about/certificate.c
+++ b/content/fetchers/about/certificate.c
@@ -134,26 +134,29 @@ static nserror free_ns_cert_info(struct ns_cert_info *cinfo)
#include <openssl/ssl.h>
#include <openssl/x509v3.h>
-/* OpenSSL 1.0.x, 1.0.2, 1.1.0 and 1.1.1 API all changed
- * LibreSSL declares its OpenSSL version as 2.1 but only supports 1.0.x API
- */
-#if (defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1010000fL))
-/* 1.0.x */
+#if (OPENSSL_VERSION_NUMBER < 0x30000000L)
+/* OpenSSL 1.1.1 or LibreSSL */
+
+# if defined(LIBRESSL_VERSION_NUMBER)
+ /* LibreSSL */
+# if (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
+ /* LibreSSL <3.5.0 */
-#if (defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1000200fL))
-/* pre 1.0.2 */
+# if (LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+ /* LibreSSL <2.7.0 */
static int ns_X509_get_signature_nid(X509 *cert)
{
return OBJ_obj2nid(cert->cert_info->key->algor->algorithm);
}
-#else
-#define ns_X509_get_signature_nid X509_get_signature_nid
-#endif
static const unsigned char *ns_ASN1_STRING_get0_data(ASN1_STRING *asn1str)
{
return (const unsigned char *)ASN1_STRING_data(asn1str);
}
+# else
+# define ns_X509_get_signature_nid X509_get_signature_nid
+# define ns_ASN1_STRING_get0_data ASN1_STRING_get0_data
+# endif
static const BIGNUM *ns_RSA_get0_n(const RSA *d)
{
@@ -164,58 +167,161 @@ static const BIGNUM *ns_RSA_get0_e(const RSA *d)
{
return d->e;
}
+# else
+ /* LibreSSL >= 3.5.0 */
+# define ns_X509_get_signature_nid X509_get_signature_nid
+# define ns_ASN1_STRING_get0_data ASN1_STRING_get0_data
+# define ns_RSA_get0_n RSA_get0_n
+# define ns_RSA_get0_e RSA_get0_e
+# endif
+# else
+ /* OpenSSL 1.1.1 */
+# define ns_X509_get_signature_nid X509_get_signature_nid
+# define ns_ASN1_STRING_get0_data ASN1_STRING_get0_data
+# define ns_RSA_get0_n RSA_get0_n
+# define ns_RSA_get0_e RSA_get0_e
+# endif
+
+static int ns_EVP_PKEY_get_bn_param(const EVP_PKEY *pkey,
+ const char *key_name, BIGNUM **bn) {
+ RSA *rsa;
+ BIGNUM *result = NULL;
+
+ /* Check parameters: only support allocation-form *bn */
+ if (pkey == NULL || key_name == NULL || bn == NULL || *bn != NULL)
+ return 0;
+
+ /* Only support RSA keys */
+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_RSA)
+ return 0;
+
+ rsa = EVP_PKEY_get1_RSA((EVP_PKEY *) pkey);
+ if (rsa == NULL)
+ return 0;
+
+ if (strcmp(key_name, "n") == 0) {
+ const BIGNUM *n = ns_RSA_get0_n(rsa);
+ if (n != NULL)
+ result = BN_dup(n);
+ } else if (strcmp(key_name, "e") == 0) {
+ const BIGNUM *e = ns_RSA_get0_e(rsa);
+ if (e != NULL)
+ result = BN_dup(e);
+ }
-static int ns_RSA_bits(const RSA *rsa)
-{
- return RSA_size(rsa) * 8;
-}
+ RSA_free(rsa);
-static int ns_DSA_bits(const DSA *dsa)
-{
- return DSA_size(dsa) * 8;
+ *bn = result;
+
+ return (result != NULL) ? 1 : 0;
}
-static int ns_DH_bits(const DH *dh)
+static int ns_EVP_PKEY_get_utf8_string_param(const EVP_PKEY *pkey,
+ const char *key_name, char *str, size_t max_len,
+ size_t *out_len)
{
- return DH_size(dh) * 8;
-}
+ const EC_GROUP *ecgroup;
+ const char *group;
+ EC_KEY *ec;
+ int ret = 0;
-#elif (OPENSSL_VERSION_NUMBER < 0x1010100fL)
-/* 1.1.0 */
-#define ns_X509_get_signature_nid X509_get_signature_nid
-#define ns_ASN1_STRING_get0_data ASN1_STRING_get0_data
+ if (pkey == NULL || key_name == NULL)
+ return 0;
-static const BIGNUM *ns_RSA_get0_n(const RSA *r)
-{
- const BIGNUM *n;
- const BIGNUM *e;
- const BIGNUM *d;
- RSA_get0_key(r, &n, &e, &d);
- return n;
+ /* Only support EC keys */
+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_EC)
+ return 0;
+
+ /* Only support fetching the group */
+ if (strcmp(key_name, "group") != 0)
+ return 0;
+
+ ec = EVP_PKEY_get1_EC_KEY((EVP_PKEY *) pkey);
+
+ ecgroup = EC_KEY_get0_group(ec);
+ if (ecgroup == NULL) {
+ group = "";
+ } else {
+ group = OBJ_nid2ln(EC_GROUP_get_curve_name(ecgroup));
+ }
+
+ if (str != NULL && max_len > strlen(group)) {
+ strcpy(str, group);
+ str[strlen(group)] = '\0';
+ ret = 1;
+ }
+ if (out_len != NULL)
+ *out_len = strlen(group);
+
+ EC_KEY_free(ec);
+
+ return ret;
}
-static const BIGNUM *ns_RSA_get0_e(const RSA *r)
+static int ns_EVP_PKEY_get_octet_string_param(const EVP_PKEY *pkey,
+ const char *key_name, unsigned char *buf, size_t max_len,
+ size_t *out_len)
{
- const BIGNUM *n;
- const BIGNUM *e;
- const BIGNUM *d;
- RSA_get0_key(r, &n, &e, &d);
- return e;
-}
+ const EC_GROUP *ecgroup;
+ const EC_POINT *ecpoint;
+ size_t len;
+ BN_CTX *bnctx;
+ EC_KEY *ec;
+ int ret = 0;
+
+ if (pkey == NULL || key_name == NULL)
+ return 0;
+
+ /* Only support EC keys */
+ if (EVP_PKEY_base_id(pkey) != EVP_PKEY_EC)
+ return 0;
-#define ns_RSA_bits RSA_bits
-#define ns_DSA_bits DSA_bits
-#define ns_DH_bits DH_bits
+ if (strcmp(key_name, "encoded-pub-key") != 0)
+ return 0;
+ ec = EVP_PKEY_get1_EC_KEY((EVP_PKEY *) pkey);
+ if (ec == NULL)
+ return 0;
+
+ ecgroup = EC_KEY_get0_group(ec);
+ if (ecgroup != NULL) {
+ ecpoint = EC_KEY_get0_public_key(ec);
+ if (ecpoint != NULL) {
+ bnctx = BN_CTX_new();
+ len = EC_POINT_point2oct(ecgroup,
+ ecpoint,
+ POINT_CONVERSION_UNCOMPRESSED,
+ NULL,
+ 0,
+ bnctx);
+ if (len != 0 && len <= max_len) {
+ if (EC_POINT_point2oct(ecgroup,
+ ecpoint,
+ POINT_CONVERSION_UNCOMPRESSED,
+ buf,
+ len,
+ bnctx) == len)
+ ret = 1;
+ }
+ if (out_len != NULL)
+ *out_len = len;
+ BN_CTX_free(bnctx);
+ }
+ }
+
+ EC_KEY_free(ec);
+
+ return ret;
+}
#else
-/* 1.1.1 and later */
+/* OpenSSL 3.x and later */
#define ns_X509_get_signature_nid X509_get_signature_nid
#define ns_ASN1_STRING_get0_data ASN1_STRING_get0_data
#define ns_RSA_get0_n RSA_get0_n
#define ns_RSA_get0_e RSA_get0_e
-#define ns_RSA_bits RSA_bits
-#define ns_DSA_bits DSA_bits
-#define ns_DH_bits DH_bits
+#define ns_EVP_PKEY_get_bn_param EVP_PKEY_get_bn_param
+#define ns_EVP_PKEY_get_octet_string_param EVP_PKEY_get_octet_string_param
+#define ns_EVP_PKEY_get_utf8_string_param EVP_PKEY_get_utf8_string_param
#endif
/**
@@ -365,36 +471,43 @@ static char *bindup(unsigned char *bin, unsigned int binlen)
/**
* extract RSA key information to info structure
*
- * \param rsa The RSA key to examine. The reference is dropped on return
+ * \param pkey The RSA key to examine.
* \param ikey The public key info structure to fill
* \rerun NSERROR_OK on success else error code.
*/
static nserror
-rsa_to_info(RSA *rsa, struct ns_cert_pkey *ikey)
+rsa_to_info(EVP_PKEY *pkey, struct ns_cert_pkey *ikey)
{
+ BIGNUM *n = NULL, *e = NULL;
char *tmp;
- if (rsa == NULL) {
+ if (ns_EVP_PKEY_get_bn_param(pkey, "n", &n) != 1) {
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ if (ns_EVP_PKEY_get_bn_param(pkey, "e", &e) != 1) {
+ BN_free(n);
return NSERROR_BAD_PARAMETER;
}
ikey->algor = strdup("RSA");
- ikey->size = ns_RSA_bits(rsa);
+ ikey->size = EVP_PKEY_bits(pkey);
- tmp = BN_bn2hex(ns_RSA_get0_n(rsa));
+ tmp = BN_bn2hex(n);
if (tmp != NULL) {
ikey->modulus = hexdup(tmp);
OPENSSL_free(tmp);
}
- tmp = BN_bn2dec(ns_RSA_get0_e(rsa));
+ tmp = BN_bn2dec(e);
if (tmp != NULL) {
ikey->exponent = strdup(tmp);
OPENSSL_free(tmp);
}
- RSA_free(rsa);
+ BN_free(e);
+ BN_free(n);
return NSERROR_OK;
}
@@ -403,22 +516,16 @@ rsa_to_info(RSA *rsa, struct ns_cert_pkey *ikey)
/**
* extract DSA key information to info structure
*
- * \param dsa The RSA key to examine. The reference is dropped on return
+ * \param pkey The DSA key to examine.
* \param ikey The public key info structure to fill
* \rerun NSERROR_OK on success else error code.
*/
static nserror
-dsa_to_info(DSA *dsa, struct ns_cert_pkey *ikey)
+dsa_to_info(EVP_PKEY *pkey, struct ns_cert_pkey *ikey)
{
- if (dsa == NULL) {
- return NSERROR_BAD_PARAMETER;
- }
-
ikey->algor = strdup("DSA");
- ikey->size = ns_DSA_bits(dsa);
-
- DSA_free(dsa);
+ ikey->size = EVP_PKEY_bits(pkey);
return NSERROR_OK;
}
@@ -427,22 +534,16 @@ dsa_to_info(DSA *dsa, struct ns_cert_pkey *ikey)
/**
* extract DH key information to info structure
*
- * \param dsa The RSA key to examine. The reference is dropped on return
+ * \param pkey The DH key to examine.
* \param ikey The public key info structure to fill
* \rerun NSERROR_OK on success else error code.
*/
static nserror
-dh_to_info(DH *dh, struct ns_cert_pkey *ikey)
+dh_to_info(EVP_PKEY *pkey, struct ns_cert_pkey *ikey)
{
- if (dh == NULL) {
- return NSERROR_BAD_PARAMETER;
- }
-
ikey->algor = strdup("Diffie Hellman");
- ikey->size = ns_DH_bits(dh);
-
- DH_free(dh);
+ ikey->size = EVP_PKEY_bits(pkey);
return NSERROR_OK;
}
@@ -451,49 +552,50 @@ dh_to_info(DH *dh, struct ns_cert_pkey *ikey)
/**
* extract EC key information to info structure
*
- * \param ec The EC key to examine. The reference is dropped on return
+ * \param pkey The EC key to examine.
* \param ikey The public key info structure to fill
* \rerun NSERROR_OK on success else error code.
*/
static nserror
-ec_to_info(EC_KEY *ec, struct ns_cert_pkey *ikey)
+ec_to_info(EVP_PKEY *pkey, struct ns_cert_pkey *ikey)
{
- const EC_GROUP *ecgroup;
- const EC_POINT *ecpoint;
- BN_CTX *bnctx;
- char *ecpoint_hex;
-
- if (ec == NULL) {
- return NSERROR_BAD_PARAMETER;
- }
+ size_t len;
ikey->algor = strdup("Elliptic Curve");
- ecgroup = EC_KEY_get0_group(ec);
-
- if (ecgroup != NULL) {
- ikey->size = EC_GROUP_get_degree(ecgroup);
-
- ikey->curve = strdup(OBJ_nid2ln(EC_GROUP_get_curve_name(ecgroup)));
+ ikey->size = EVP_PKEY_bits(pkey);
+
+ len = 0;
+ ns_EVP_PKEY_get_utf8_string_param(pkey, "group", NULL, 0, &len);
+ if (len != 0) {
+ ikey->curve = malloc(len + 1);
+ if (ikey->curve != NULL) {
+ if (ns_EVP_PKEY_get_utf8_string_param(pkey, "group",
+ ikey->curve, len + 1, NULL) == 0) {
+ free(ikey->curve);
+ ikey->curve = NULL;
+ }
+ }
+ }
- ecpoint = EC_KEY_get0_public_key(ec);
- if (ecpoint != NULL) {
- bnctx = BN_CTX_new();
- ecpoint_hex = EC_POINT_point2hex(ecgroup,
- ecpoint,
- POINT_CONVERSION_UNCOMPRESSED,
- bnctx);
- ikey->public = hexdup(ecpoint_hex);
- OPENSSL_free(ecpoint_hex);
- BN_CTX_free(bnctx);
+ len = 0;
+ ns_EVP_PKEY_get_octet_string_param(pkey, "encoded-pub-key",
+ NULL, 0, &len);
+ if (len != 0) {
+ unsigned char *point = malloc(len);
+ if (point != NULL) {
+ if (ns_EVP_PKEY_get_octet_string_param(pkey,
+ "encoded-pub-key", point, len,
+ NULL) == 1) {
+ ikey->public = bindup(point, len);
+ }
+ free(point);
}
}
- EC_KEY_free(ec);
return NSERROR_OK;
}
-
/**
* extract public key information to info structure
*
@@ -512,19 +614,19 @@ pkey_to_info(EVP_PKEY *pkey, struct ns_cert_pkey *ikey)
switch (EVP_PKEY_base_id(pkey)) {
case EVP_PKEY_RSA:
- res = rsa_to_info(EVP_PKEY_get1_RSA(pkey), ikey);
+ res = rsa_to_info(pkey, ikey);
break;
case EVP_PKEY_DSA:
- res = dsa_to_info(EVP_PKEY_get1_DSA(pkey), ikey);
+ res = dsa_to_info(pkey, ikey);
break;
case EVP_PKEY_DH:
- res = dh_to_info(EVP_PKEY_get1_DH(pkey), ikey);
+ res = dh_to_info(pkey, ikey);
break;
case EVP_PKEY_EC:
- res = ec_to_info(EVP_PKEY_get1_EC_KEY(pkey), ikey);
+ res = ec_to_info(pkey, ikey);
break;
default:
diff --git a/content/fetchers/about/chart.c b/content/fetchers/about/chart.c
index 1565c54d8..c030c12b4 100644
--- a/content/fetchers/about/chart.c
+++ b/content/fetchers/about/chart.c
@@ -33,7 +33,9 @@
#include <math.h>
#include <stdio.h>
+#include "utils/config.h"
#include "netsurf/inttypes.h"
+#include "utils/config.h"
#include "utils/utils.h"
#include "utils/errors.h"
#include "utils/nsurl.h"
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index d36f44c09..680e60456 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -67,21 +67,38 @@
#define UPDATES_PER_SECOND 2
/**
- * The ciphersuites the browser is prepared to use
+ * The ciphersuites the browser is prepared to use for TLS1.3
+ */
+#define CIPHER_SUITES \
+ "TLS_AES_256_GCM_SHA384:" \
+ "TLS_CHACHA20_POLY1305_SHA256:" \
+ "TLS_AES_128_GCM_SHA256"
+
+/**
+ * The ciphersuites the browser is prepared to use for TLS<1.3
*/
#define CIPHER_LIST \
/* disable everything */ \
"-ALL:" \
- /* enable TLSv1.2 PFS suites */ \
- "EECDH+AES+TLSv1.2:EDH+AES+TLSv1.2:" \
- /* enable PFS AES GCM suites */ \
- "EECDH+AESGCM:EDH+AESGCM:" \
- /* Enable PFS AES CBC suites */ \
- "EECDH+AES:EDH+AES:" \
- /* Enable non-PFS fallback suite */ \
- "AES128-SHA:" \
- /* Remove any PFS suites using weak DSA key exchange */ \
- "-DSS"
+ /* enable TLSv1.2 ECDHE AES GCM suites */ \
+ "EECDH+AESGCM+TLSv1.2:" \
+ /* enable ECDHE CHACHA20/POLY1305 suites */ \
+ "EECDH+CHACHA20:" \
+ /* Sort above by strength */ \
+ "@STRENGTH:" \
+ /* enable ECDHE (auth=RSA, mac=SHA1) AES CBC suites */ \
+ "EECDH+aRSA+AES+SHA1"
+
+/**
+ * The legacy cipher suites the browser is prepared to use for TLS<1.3
+ */
+#define CIPHER_LIST_LEGACY \
+ /* as above */ \
+ CIPHER_LIST":" \
+ /* enable (non-PFS) RSA AES GCM suites */ \
+ "RSA+AESGCM:" \
+ /* enable (non-PFS) RSA (mac=SHA1) AES CBC suites */ \
+ "RSA+AES+SHA1"
/* Open SSL compatability for certificate handling */
#ifdef WITH_OPENSSL
@@ -89,33 +106,11 @@
#include <openssl/ssl.h>
#include <openssl/x509v3.h>
-/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed
- * LibreSSL declares its OpenSSL version as 2.1 but only supports the old way
- */
-#if (defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1010000fL))
-static int ns_X509_up_ref(X509 *cert)
-{
- cert->references++;
- return 1;
-}
-
-static void ns_X509_free(X509 *cert)
-{
- cert->references--;
- if (cert->references == 0) {
- X509_free(cert);
- }
-}
-#else
-#define ns_X509_up_ref X509_up_ref
-#define ns_X509_free X509_free
-#endif
-
#else /* WITH_OPENSSL */
typedef char X509;
-static void ns_X509_free(X509 *cert)
+static void X509_free(X509 *cert)
{
free(cert);
}
@@ -216,6 +211,26 @@ struct cert_info {
long err; /**< OpenSSL error code */
};
+#if LIBCURL_VERSION_NUM >= 0x072000 /* 7.32.0 depricated CURLOPT_PROGRESSFUNCTION*/
+#define NSCURLOPT_PROGRESS_FUNCTION CURLOPT_XFERINFOFUNCTION
+#define NSCURLOPT_PROGRESS_DATA CURLOPT_XFERINFODATA
+#define NSCURL_PROGRESS_T curl_off_t
+#else
+#define NSCURLOPT_PROGRESS_FUNCTION CURLOPT_PROGRESSFUNCTION
+#define NSCURLOPT_PROGRESS_DATA CURLOPT_PROGRESSDATA
+#define NSCURL_PROGRESS_T double
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 depricated curl_formadd */
+#define NSCURL_POSTDATA_T curl_mime
+#define NSCURL_POSTDATA_CURLOPT CURLOPT_MIMEPOST
+#define NSCURL_POSTDATA_FREE(x) curl_mime_free(x)
+#else
+#define NSCURL_POSTDATA_T struct curl_httppost
+#define NSCURL_POSTDATA_CURLOPT CURLOPT_HTTPPOST
+#define NSCURL_POSTDATA_FREE(x) curl_formfree(x)
+#endif
+
/** Information for a single fetch. */
struct curl_fetch_info {
struct fetch *fetch_handle; /**< The fetch handle we're parented by. */
@@ -225,7 +240,7 @@ struct curl_fetch_info {
bool abort; /**< Abort requested. */
bool stopped; /**< Download stopped on purpose. */
bool only_2xx; /**< Only HTTP 2xx responses acceptable. */
- bool downgrade_tls; /**< Downgrade to TLS <= 1.0 */
+ bool downgrade_tls; /**< Downgrade to TLS 1.2 */
nsurl *url; /**< URL of this fetch. */
lwc_string *host; /**< The hostname of this fetch. */
struct curl_slist *headers; /**< List of request headers. */
@@ -233,9 +248,11 @@ struct curl_fetch_info {
unsigned long content_length; /**< Response Content-Length, or 0. */
char *cookie_string; /**< Cookie string for this fetch */
char *realm; /**< HTTP Auth Realm */
- char *post_urlenc; /**< Url encoded POST string, or 0. */
+ struct fetch_postdata *postdata; /**< POST data */
+ NSCURL_POSTDATA_T *curl_postdata; /**< POST data in curl representation */
+
long http_code; /**< HTTP result code from cURL. */
- struct curl_httppost *post_multipart; /**< Multipart post data, or 0. */
+
uint64_t last_progress_update; /**< Time of last progress update */
int cert_depth; /**< deepest certificate in use */
struct cert_info cert_data[MAX_CERT_DEPTH]; /**< HTTPS certificate data */
@@ -342,85 +359,95 @@ static bool fetch_curl_can_fetch(const nsurl *url)
}
+
/**
- * Convert a list of struct ::fetch_multipart_data to a list of
- * struct curl_httppost for libcurl.
+ * allocate postdata
*/
-static struct curl_httppost *
-fetch_curl_post_convert(const struct fetch_multipart_data *control)
+static struct fetch_postdata *
+fetch_curl_alloc_postdata(const char *post_urlenc,
+ const struct fetch_multipart_data *post_multipart)
{
- struct curl_httppost *post = 0, *last = 0;
- CURLFORMcode code;
- nserror ret;
-
- for (; control; control = control->next) {
- if (control->file) {
- char *leafname = NULL;
- ret = guit->file->basename(control->value, &leafname, NULL);
- if (ret != NSERROR_OK) {
- continue;
+ struct fetch_postdata *postdata;
+ postdata = calloc(1, sizeof(struct fetch_postdata));
+ if (postdata != NULL) {
+
+ if (post_urlenc) {
+ postdata->type = FETCH_POSTDATA_URLENC;
+ postdata->data.urlenc = strdup(post_urlenc);
+ if (postdata->data.urlenc == NULL) {
+ free(postdata);
+ postdata = NULL;
}
-
- /* We have to special case filenames of "", so curl
- * a) actually attempts the fetch and
- * b) doesn't attempt to open the file ""
- */
- if (control->value[0] == '\0') {
- /* dummy buffer - needs to be static so
- * pointer's still valid when we go out
- * of scope (not that libcurl should be
- * attempting to access it, of course).
- */
- static char buf;
-
- code = curl_formadd(&post, &last,
- CURLFORM_COPYNAME, control->name,
- CURLFORM_BUFFER, control->value,
- /* needed, as basename("") == "." */
- CURLFORM_FILENAME, "",
- CURLFORM_BUFFERPTR, &buf,
- CURLFORM_BUFFERLENGTH, 0,
- CURLFORM_CONTENTTYPE,
- "application/octet-stream",
- CURLFORM_END);
- if (code != CURL_FORMADD_OK)
- NSLOG(netsurf, INFO,
- "curl_formadd: %d (%s)", code,
- control->name);
- } else {
- char *mimetype = guit->fetch->mimetype(control->value);
- code = curl_formadd(&post, &last,
- CURLFORM_COPYNAME, control->name,
- CURLFORM_FILE, control->rawfile,
- CURLFORM_FILENAME, leafname,
- CURLFORM_CONTENTTYPE,
- (mimetype != 0 ? mimetype : "text/plain"),
- CURLFORM_END);
- if (code != CURL_FORMADD_OK)
- NSLOG(netsurf, INFO,
- "curl_formadd: %d (%s=%s)",
- code,
- control->name,
- control->value);
- free(mimetype);
+ } else if (post_multipart) {
+ postdata->type = FETCH_POSTDATA_MULTIPART;
+ postdata->data.multipart = fetch_multipart_data_clone(post_multipart);
+ if (postdata->data.multipart == NULL) {
+ free(postdata);
+ postdata = NULL;
}
- free(leafname);
- }
- else {
- code = curl_formadd(&post, &last,
- CURLFORM_COPYNAME, control->name,
- CURLFORM_COPYCONTENTS, control->value,
- CURLFORM_END);
- if (code != CURL_FORMADD_OK)
- NSLOG(netsurf, INFO,
- "curl_formadd: %d (%s=%s)", code,
- control->name, control->value);
+ } else {
+ postdata->type = FETCH_POSTDATA_NONE;
}
}
+ return postdata;
+}
- return post;
+/**
+ * free postdata
+ */
+static void fetch_curl_free_postdata(struct fetch_postdata *postdata)
+{
+ if (postdata != NULL) {
+ switch (postdata->type) {
+ case FETCH_POSTDATA_NONE:
+ break;
+ case FETCH_POSTDATA_URLENC:
+ free(postdata->data.urlenc);
+ break;
+ case FETCH_POSTDATA_MULTIPART:
+ fetch_multipart_data_destroy(postdata->data.multipart);
+ break;
+ }
+
+ free(postdata);
+ }
}
+/**
+ *construct a new fetch structure
+ */
+static struct curl_fetch_info *fetch_alloc(void)
+{
+ struct curl_fetch_info *fetch;
+ fetch = malloc(sizeof (*fetch));
+ if (fetch == NULL)
+ return NULL;
+
+ fetch->curl_handle = NULL;
+ fetch->sent_ssl_chain = false;
+ fetch->had_headers = false;
+ fetch->abort = false;
+ fetch->stopped = false;
+ fetch->only_2xx = false;
+ fetch->downgrade_tls = false;
+ fetch->headers = NULL;
+ fetch->url = NULL;
+ fetch->host = NULL;
+ fetch->location = NULL;
+ fetch->content_length = 0;
+ fetch->http_code = 0;
+ fetch->cookie_string = NULL;
+ fetch->realm = NULL;
+ fetch->last_progress_update = 0;
+ fetch->postdata = NULL;
+ fetch->curl_postdata = NULL;
+
+ /* Clear certificate chain data */
+ memset(fetch->cert_data, 0, sizeof(fetch->cert_data));
+ fetch->cert_depth = -1;
+
+ return fetch;
+}
/**
* Start fetching data for the given URL.
@@ -456,46 +483,22 @@ fetch_curl_setup(struct fetch *parent_fetch,
struct curl_slist *slist;
int i;
- fetch = malloc(sizeof (*fetch));
+ fetch = fetch_alloc();
if (fetch == NULL)
- return 0;
-
- fetch->fetch_handle = parent_fetch;
+ return NULL;
NSLOG(netsurf, INFO, "fetch %p, url '%s'", fetch, nsurl_access(url));
- /* construct a new fetch structure */
- fetch->curl_handle = NULL;
- fetch->sent_ssl_chain = false;
- fetch->had_headers = false;
- fetch->abort = false;
- fetch->stopped = false;
fetch->only_2xx = only_2xx;
fetch->downgrade_tls = downgrade_tls;
- fetch->headers = NULL;
+ fetch->fetch_handle = parent_fetch;
fetch->url = nsurl_ref(url);
fetch->host = nsurl_get_component(url, NSURL_HOST);
- fetch->location = NULL;
- fetch->content_length = 0;
- fetch->http_code = 0;
- fetch->cookie_string = NULL;
- fetch->realm = NULL;
- fetch->post_urlenc = NULL;
- fetch->post_multipart = NULL;
- if (post_urlenc) {
- fetch->post_urlenc = strdup(post_urlenc);
- } else if (post_multipart) {
- fetch->post_multipart = fetch_curl_post_convert(post_multipart);
+ if (fetch->host == NULL) {
+ goto failed;
}
- fetch->last_progress_update = 0;
-
- /* Clear certificate chain data */
- memset(fetch->cert_data, 0, sizeof(fetch->cert_data));
- fetch->cert_depth = -1;
-
- if ((fetch->host == NULL) ||
- (post_multipart != NULL && fetch->post_multipart == NULL) ||
- (post_urlenc != NULL && fetch->post_urlenc == NULL)) {
+ fetch->postdata = fetch_curl_alloc_postdata(post_urlenc, post_multipart);
+ if (fetch->postdata == NULL) {
goto failed;
}
@@ -548,9 +551,7 @@ failed:
lwc_string_unref(fetch->host);
nsurl_unref(fetch->url);
- free(fetch->post_urlenc);
- if (fetch->post_multipart)
- curl_formfree(fetch->post_multipart);
+ fetch_curl_free_postdata(fetch->postdata);
curl_slist_free_all(fetch->headers);
free(fetch);
return NULL;
@@ -730,7 +731,7 @@ fetch_curl_verify_callback(int verify_ok, X509_STORE_CTX *x509_ctx)
*/
if (!fetch->cert_data[depth].cert) {
fetch->cert_data[depth].cert = X509_STORE_CTX_get_current_cert(x509_ctx);
- ns_X509_up_ref(fetch->cert_data[depth].cert);
+ X509_up_ref(fetch->cert_data[depth].cert);
fetch->cert_data[depth].err = X509_STORE_CTX_get_error(x509_ctx);
}
@@ -805,7 +806,8 @@ fetch_curl_sslctxfun(CURL *curl_handle, void *_sslctx, void *parm)
{
struct curl_fetch_info *f = (struct curl_fetch_info *) parm;
SSL_CTX *sslctx = _sslctx;
- long options = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
+ long options = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 |
+ SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1;
/* set verify callback for each certificate in chain */
SSL_CTX_set_verify(sslctx, SSL_VERIFY_PEER, fetch_curl_verify_callback);
@@ -816,19 +818,14 @@ fetch_curl_sslctxfun(CURL *curl_handle, void *_sslctx, void *parm)
parm);
if (f->downgrade_tls) {
- /* Disable TLS 1.1/1.2 if the server can't cope with them */
-#ifdef SSL_OP_NO_TLSv1_1
- options |= SSL_OP_NO_TLSv1_1;
-#endif
-#ifdef SSL_OP_NO_TLSv1_2
- options |= SSL_OP_NO_TLSv1_2;
+ /* Disable TLS 1.3 if the server can't cope with it */
+#ifdef SSL_OP_NO_TLSv1_3
+ options |= SSL_OP_NO_TLSv1_3;
#endif
#ifdef SSL_MODE_SEND_FALLBACK_SCSV
/* Ensure server rejects the connection if downgraded too far */
SSL_CTX_set_mode(sslctx, SSL_MODE_SEND_FALLBACK_SCSV);
#endif
- /* Disable TLS1.2 ciphersuites */
- SSL_CTX_set_cipher_list(sslctx, CIPHER_LIST ":-TLSv1.2");
}
SSL_CTX_set_options(sslctx, options);
@@ -865,6 +862,301 @@ fetch_curl_report_certs_upstream(struct curl_fetch_info *f)
f->sent_ssl_chain = true;
}
+#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 depricated curl_formadd */
+
+/**
+ * curl mime data context
+ */
+struct curl_mime_ctx {
+ char *buffer;
+ curl_off_t size;
+ curl_off_t position;
+};
+
+static size_t mime_data_read_callback(char *buffer, size_t size, size_t nitems, void *arg)
+{
+ struct curl_mime_ctx *mctx = (struct curl_mime_ctx *) arg;
+ curl_off_t sz = mctx->size - mctx->position;
+
+ nitems *= size;
+ if(sz > (curl_off_t)nitems) {
+ sz = nitems;
+ }
+ if(sz) {
+ memcpy(buffer, mctx->buffer + mctx->position, sz);
+ }
+ mctx->position += sz;
+ return sz;
+}
+
+static int mime_data_seek_callback(void *arg, curl_off_t offset, int origin)
+{
+ struct curl_mime_ctx *mctx = (struct curl_mime_ctx *) arg;
+
+ switch(origin) {
+ case SEEK_END:
+ offset += mctx->size;
+ break;
+ case SEEK_CUR:
+ offset += mctx->position;
+ break;
+ }
+
+ if(offset < 0) {
+ return CURL_SEEKFUNC_FAIL;
+ }
+ mctx->position = offset;
+ return CURL_SEEKFUNC_OK;
+}
+
+static void mime_data_free_callback(void *arg)
+{
+ struct curl_mime_ctx *mctx = (struct curl_mime_ctx *) arg;
+ free(mctx);
+}
+
+/**
+ * Convert a POST data list to a libcurl curl_mime.
+ *
+ * \param chandle curl fetch handle.
+ * \param multipart limked list of struct ::fetch_multipart forming post data.
+ */
+static curl_mime *
+fetch_curl_postdata_convert(CURL *chandle,
+ const struct fetch_multipart_data *multipart)
+{
+ curl_mime *cmime;
+ curl_mimepart *part;
+ CURLcode code = CURLE_OK;
+ size_t value_len;
+
+ cmime = curl_mime_init(chandle);
+ if (cmime == NULL) {
+ NSLOG(netsurf, WARNING, "postdata conversion failed to curl mime context");
+ return NULL;
+ }
+
+ /* iterate post data */
+ for (; multipart != NULL; multipart = multipart->next) {
+ part = curl_mime_addpart(cmime);
+ if (part == NULL) {
+ goto convert_failed;
+ }
+
+ code = curl_mime_name(part, multipart->name);
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ value_len = strlen(multipart->value);
+
+ if (multipart->file && value_len==0) {
+ /* file entries with no filename require special handling */
+ code=curl_mime_data(part, multipart->value, value_len);
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ code = curl_mime_filename(part, "");
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ code = curl_mime_type(part, "application/octet-stream");
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ } else if(multipart->file) {
+ /* file entry */
+ nserror ret;
+ char *leafname = NULL;
+ char *mimetype = NULL;
+
+ code = curl_mime_filedata(part, multipart->rawfile);
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ ret = guit->file->basename(multipart->value, &leafname, NULL);
+ if (ret != NSERROR_OK) {
+ goto convert_failed;
+ }
+ code = curl_mime_filename(part, leafname);
+ free(leafname);
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ mimetype = guit->fetch->mimetype(multipart->value);
+ if (mimetype == NULL) {
+ mimetype=strdup("text/plain");
+ }
+ if (mimetype == NULL) {
+ goto convert_failed;
+ }
+ code = curl_mime_type(part, mimetype);
+ free(mimetype);
+ if (code != CURLE_OK) {
+ goto convert_failed;
+ }
+
+ } else {
+ /* make the curl mime reference the existing multipart
+ * data which requires use of a callback and context.
+ */
+ struct curl_mime_ctx *cb_ctx;
+ cb_ctx = malloc(sizeof(struct curl_mime_ctx));
+ if (cb_ctx == NULL) {
+ goto convert_failed;
+ }
+ cb_ctx->buffer = multipart->value;
+ cb_ctx->size = value_len;
+ cb_ctx->position = 0;
+ code = curl_mime_data_cb(part,
+ value_len,
+ mime_data_read_callback,
+ mime_data_seek_callback,
+ mime_data_free_callback,
+ cb_ctx);
+ if (code != CURLE_OK) {
+ free(cb_ctx);
+ goto convert_failed;
+ }
+ }
+ }
+
+ return cmime;
+
+convert_failed:
+ NSLOG(netsurf, WARNING, "postdata conversion failed with curl code: %d", code);
+ curl_mime_free(cmime);
+ return NULL;
+}
+
+#else /* LIBCURL_VERSION_NUM >= 0x073800 */
+
+/**
+ * Convert a list of struct ::fetch_multipart_data to a list of
+ * struct curl_httppost for libcurl.
+ */
+static struct curl_httppost *
+fetch_curl_postdata_convert(CURL *chandle,
+ const struct fetch_multipart_data *control)
+{
+ struct curl_httppost *post = NULL, *last = NULL;
+ CURLFORMcode code;
+ nserror ret;
+
+ for (; control; control = control->next) {
+ if (control->file) {
+ char *leafname = NULL;
+ ret = guit->file->basename(control->value, &leafname, NULL);
+ if (ret != NSERROR_OK) {
+ continue;
+ }
+
+ /* We have to special case filenames of "", so curl
+ * a) actually attempts the fetch and
+ * b) doesn't attempt to open the file ""
+ */
+ if (control->value[0] == '\0') {
+ /* dummy buffer - needs to be static so
+ * pointer's still valid when we go out
+ * of scope (not that libcurl should be
+ * attempting to access it, of course).
+ */
+ static char buf;
+
+ code = curl_formadd(&post, &last,
+ CURLFORM_COPYNAME, control->name,
+ CURLFORM_BUFFER, control->value,
+ /* needed, as basename("") == "." */
+ CURLFORM_FILENAME, "",
+ CURLFORM_BUFFERPTR, &buf,
+ CURLFORM_BUFFERLENGTH, 0,
+ CURLFORM_CONTENTTYPE,
+ "application/octet-stream",
+ CURLFORM_END);
+ if (code != CURL_FORMADD_OK)
+ NSLOG(netsurf, INFO,
+ "curl_formadd: %d (%s)", code,
+ control->name);
+ } else {
+ char *mimetype = guit->fetch->mimetype(control->value);
+ code = curl_formadd(&post, &last,
+ CURLFORM_COPYNAME, control->name,
+ CURLFORM_FILE, control->rawfile,
+ CURLFORM_FILENAME, leafname,
+ CURLFORM_CONTENTTYPE,
+ (mimetype != 0 ? mimetype : "text/plain"),
+ CURLFORM_END);
+ if (code != CURL_FORMADD_OK)
+ NSLOG(netsurf, INFO,
+ "curl_formadd: %d (%s=%s)",
+ code,
+ control->name,
+ control->value);
+ free(mimetype);
+ }
+ free(leafname);
+ } else {
+ code = curl_formadd(&post, &last,
+ CURLFORM_COPYNAME, control->name,
+ CURLFORM_COPYCONTENTS, control->value,
+ CURLFORM_END);
+ if (code != CURL_FORMADD_OK)
+ NSLOG(netsurf, INFO,
+ "curl_formadd: %d (%s=%s)", code,
+ control->name, control->value);
+ }
+ }
+
+ return post;
+}
+
+#endif /* LIBCURL_VERSION_NUM >= 0x073800 */
+
+/**
+ * Setup multipart post data
+ */
+static CURLcode fetch_curl_set_postdata(struct curl_fetch_info *f)
+{
+ CURLcode code = CURLE_OK;
+
+#undef SETOPT
+#define SETOPT(option, value) { \
+ code = curl_easy_setopt(f->curl_handle, option, value); \
+ if (code != CURLE_OK) \
+ return code; \
+ }
+
+ switch (f->postdata->type) {
+ case FETCH_POSTDATA_NONE:
+ SETOPT(CURLOPT_POSTFIELDS, NULL);
+ SETOPT(NSCURL_POSTDATA_CURLOPT, NULL);
+ SETOPT(CURLOPT_HTTPGET, 1L);
+ break;
+
+ case FETCH_POSTDATA_URLENC:
+ SETOPT(NSCURL_POSTDATA_CURLOPT, NULL);
+ SETOPT(CURLOPT_HTTPGET, 0L);
+ SETOPT(CURLOPT_POSTFIELDS, f->postdata->data.urlenc);
+ break;
+
+ case FETCH_POSTDATA_MULTIPART:
+ SETOPT(CURLOPT_POSTFIELDS, NULL);
+ SETOPT(CURLOPT_HTTPGET, 0L);
+ if (f->curl_postdata == NULL) {
+ f->curl_postdata =
+ fetch_curl_postdata_convert(f->curl_handle,
+ f->postdata->data.multipart);
+ }
+ SETOPT(NSCURL_POSTDATA_CURLOPT, f->curl_postdata);
+ break;
+ }
+ return code;
+}
/**
* Set options specific for a fetch.
@@ -888,20 +1180,11 @@ static CURLcode fetch_curl_set_options(struct curl_fetch_info *f)
SETOPT(CURLOPT_PRIVATE, f);
SETOPT(CURLOPT_WRITEDATA, f);
SETOPT(CURLOPT_WRITEHEADER, f);
- SETOPT(CURLOPT_PROGRESSDATA, f);
+ SETOPT(NSCURLOPT_PROGRESS_DATA, f);
SETOPT(CURLOPT_HTTPHEADER, f->headers);
- if (f->post_urlenc) {
- SETOPT(CURLOPT_HTTPPOST, NULL);
- SETOPT(CURLOPT_HTTPGET, 0L);
- SETOPT(CURLOPT_POSTFIELDS, f->post_urlenc);
- } else if (f->post_multipart) {
- SETOPT(CURLOPT_POSTFIELDS, NULL);
- SETOPT(CURLOPT_HTTPGET, 0L);
- SETOPT(CURLOPT_HTTPPOST, f->post_multipart);
- } else {
- SETOPT(CURLOPT_POSTFIELDS, NULL);
- SETOPT(CURLOPT_HTTPPOST, NULL);
- SETOPT(CURLOPT_HTTPGET, 1L);
+ code = fetch_curl_set_postdata(f);
+ if (code != CURLE_OK) {
+ return code;
}
f->cookie_string = urldb_get_cookie(f->url, true);
@@ -948,6 +1231,12 @@ static CURLcode fetch_curl_set_options(struct curl_fetch_info *f)
SETOPT(CURLOPT_PROXY, NULL);
}
+
+ if (curl_with_openssl) {
+ SETOPT(CURLOPT_SSL_CIPHER_LIST,
+ f->downgrade_tls ? CIPHER_LIST_LEGACY : CIPHER_LIST);
+ }
+
/* Force-enable SSL session ID caching, as some distros are odd. */
SETOPT(CURLOPT_SSL_SESSIONID_CACHE, 1);
@@ -1161,15 +1450,13 @@ static void fetch_curl_free(void *vf)
if (f->headers) {
curl_slist_free_all(f->headers);
}
- free(f->post_urlenc);
- if (f->post_multipart) {
- curl_formfree(f->post_multipart);
- }
+ fetch_curl_free_postdata(f->postdata);
+ NSCURL_POSTDATA_FREE(f->curl_postdata);
/* free certificate data */
for (i = 0; i < MAX_CERT_DEPTH; i++) {
if (f->cert_data[i].cert != NULL) {
- ns_X509_free(f->cert_data[i].cert);
+ X509_free(f->cert_data[i].cert);
}
}
@@ -1199,7 +1486,7 @@ static bool fetch_curl_process_headers(struct curl_fetch_info *f)
http_code = f->http_code;
NSLOG(netsurf, INFO, "HTTP status code %li", http_code);
- if (http_code == 304 && !f->post_urlenc && !f->post_multipart) {
+ if ((http_code == 304) && (f->postdata->type==FETCH_POSTDATA_NONE)) {
/* Not Modified && GET request */
msg.type = FETCH_NOTMODIFIED;
fetch_send_callback(&msg, f->fetch_handle);
@@ -1435,10 +1722,10 @@ static void fetch_curl_poll(lwc_string *scheme_ignored)
*/
static int
fetch_curl_progress(void *clientp,
- double dltotal,
- double dlnow,
- double ultotal,
- double ulnow)
+ NSCURL_PROGRESS_T dltotal,
+ NSCURL_PROGRESS_T dlnow,
+ NSCURL_PROGRESS_T ultotal,
+ NSCURL_PROGRESS_T ulnow)
{
static char fetch_progress_buffer[256]; /**< Progress buffer for cURL */
struct curl_fetch_info *f = (struct curl_fetch_info *) clientp;
@@ -1505,6 +1792,24 @@ fetch_curl_debug(CURL *handle,
}
+static curl_socket_t fetch_curl_socket_open(void *clientp,
+ curlsocktype purpose, struct curl_sockaddr *address)
+{
+ (void) clientp;
+ (void) purpose;
+
+ return (curl_socket_t) guit->fetch->socket_open(
+ address->family, address->socktype,
+ address->protocol);
+}
+
+static int fetch_curl_socket_close(void *clientp, curl_socket_t item)
+{
+ (void) clientp;
+
+ return guit->fetch->socket_close((int) item);
+}
+
/**
* Callback function for cURL.
*/
@@ -1711,8 +2016,10 @@ nserror fetch_curl_register(void)
#undef SETOPT
#define SETOPT(option, value) \
mcode = curl_multi_setopt(fetch_curl_multi, option, value); \
- if (mcode != CURLM_OK) \
- goto curl_multi_setopt_failed;
+ if (mcode != CURLM_OK) { \
+ NSLOG(netsurf, ERROR, "attempting curl_multi_setopt(%s, ...)", #option); \
+ goto curl_multi_setopt_failed; \
+ }
SETOPT(CURLMOPT_MAXCONNECTS, maxconnects);
SETOPT(CURLMOPT_MAX_TOTAL_CONNECTIONS, maxconnects);
@@ -1732,8 +2039,10 @@ nserror fetch_curl_register(void)
#undef SETOPT
#define SETOPT(option, value) \
code = curl_easy_setopt(fetch_blank_curl, option, value); \
- if (code != CURLE_OK) \
- goto curl_easy_setopt_failed;
+ if (code != CURLE_OK) { \
+ NSLOG(netsurf, ERROR, "attempting curl_easy_setopt(%s, ...)", #option); \
+ goto curl_easy_setopt_failed; \
+ }
SETOPT(CURLOPT_ERRORBUFFER, fetch_error_buffer);
SETOPT(CURLOPT_DEBUGFUNCTION, fetch_curl_debug);
@@ -1748,7 +2057,7 @@ nserror fetch_curl_register(void)
SETOPT(CURLOPT_WRITEFUNCTION, fetch_curl_data);
SETOPT(CURLOPT_HEADERFUNCTION, fetch_curl_header);
- SETOPT(CURLOPT_PROGRESSFUNCTION, fetch_curl_progress);
+ SETOPT(NSCURLOPT_PROGRESS_FUNCTION, fetch_curl_progress);
SETOPT(CURLOPT_NOPROGRESS, 0);
SETOPT(CURLOPT_USERAGENT, user_agent_string());
SETOPT(CURLOPT_ENCODING, "gzip");
@@ -1756,6 +2065,8 @@ nserror fetch_curl_register(void)
SETOPT(CURLOPT_LOW_SPEED_TIME, 180L);
SETOPT(CURLOPT_NOSIGNAL, 1L);
SETOPT(CURLOPT_CONNECTTIMEOUT, nsoption_uint(curl_fetch_timeout));
+ SETOPT(CURLOPT_OPENSOCKETFUNCTION, fetch_curl_socket_open);
+ SETOPT(CURLOPT_CLOSESOCKETFUNCTION, fetch_curl_socket_close);
if (nsoption_charp(ca_bundle) &&
strcmp(nsoption_charp(ca_bundle), "")) {
@@ -1785,6 +2096,14 @@ nserror fetch_curl_register(void)
/* only set the cipher list with openssl otherwise the
* fetch fails with "Unknown cipher in list"
*/
+#if LIBCURL_VERSION_NUM >= 0x073d00
+ /* Need libcurl 7.61.0 or later built against OpenSSL with
+ * TLS1.3 support */
+ code = curl_easy_setopt(fetch_blank_curl,
+ CURLOPT_TLS13_CIPHERS, CIPHER_SUITES);
+ if (code != CURLE_OK && code != CURLE_NOT_BUILT_IN)
+ goto curl_easy_setopt_failed;
+#endif
SETOPT(CURLOPT_SSL_CIPHER_LIST, CIPHER_LIST);
}
diff --git a/content/fetchers/file/dirlist.c b/content/fetchers/file/dirlist.c
index d49dc7fe7..345dbd8f3 100644
--- a/content/fetchers/file/dirlist.c
+++ b/content/fetchers/file/dirlist.c
@@ -29,6 +29,7 @@
#include "utils/messages.h"
#include "utils/nscolour.h"
+#include "netsurf/inttypes.h"
#include "netsurf/types.h"
#include "netsurf/plot_style.h"
@@ -158,7 +159,7 @@ bool dirlist_generate_title(const char *title, char *buffer, int buffer_length)
"<title>%s</title>\n"
"<style>\n"
"html {\n"
- "\tbackground-color: #%06x;\n"
+ "\tbackground-color: #%06"PRIx32";\n"
"}\n"
"%s"
"</style>\n"
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index ede729f9a..a145c6fe1 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -89,14 +89,6 @@
#define BLOCK_USE_MAP_SIZE (1 << (BLOCK_ENTRY_COUNT - 3))
/**
- * The type used to store index values referring to store entries. Care
- * must be taken with this type as it is used to build address to
- * entry mapping so changing the size will have large impacts on
- * memory usage.
- */
-typedef uint16_t entry_index_t;
-
-/**
* The type used as a binary identifier for each entry derived from
* the URL. A larger identifier will have fewer collisions but
* requires proportionately more storage.
@@ -1614,7 +1606,7 @@ static nserror store_write_block(struct store_state *state,
offst);
if (wr != (ssize_t)bse->elem[elem_idx].size) {
NSLOG(netsurf, ERROR,
- "Write failed %"PRIssizet" of %d bytes from %p at %"PRIsizet" block %d errno %d",
+ "Write failed %"PRIssizet" of %"PRId32" bytes from %p at %"PRIsizet" block %"PRIu16" errno %d",
wr,
bse->elem[elem_idx].size,
bse->elem[elem_idx].data,
@@ -1661,7 +1653,7 @@ static nserror store_write_file(struct store_state *state,
close(fd);
if (wr != (ssize_t)bse->elem[elem_idx].size) {
NSLOG(netsurf, ERROR,
- "Write failed %"PRIssizet" of %d bytes from %p errno %d",
+ "Write failed %"PRIssizet" of %"PRId32" bytes from %p errno %d",
wr,
bse->elem[elem_idx].size,
bse->elem[elem_idx].data,
@@ -1784,7 +1776,7 @@ static nserror store_read_block(struct store_state *state,
offst);
if (rd != (ssize_t)bse->elem[elem_idx].size) {
NSLOG(netsurf, ERROR,
- "Failed reading %"PRIssizet" of %d bytes into %p from %"PRIsizet" block %d errno %d",
+ "Failed reading %"PRIssizet" of %"PRId32" bytes into %p from %"PRIsizet" block %"PRIu16" errno %d",
rd,
bse->elem[elem_idx].size,
bse->elem[elem_idx].data,
diff --git a/content/handlers/css/dump.c b/content/handlers/css/dump.c
index 1e448e0d4..950a6f8cc 100644
--- a/content/handlers/css/dump.c
+++ b/content/handlers/css/dump.c
@@ -19,6 +19,8 @@
#include <stdio.h>
#include <libcss/libcss.h>
+#include "netsurf/inttypes.h"
+
#include "css/dump.h"
#include "css/utils.h"
@@ -36,7 +38,7 @@ static void dump_css_fixed(FILE *stream, css_fixed f)
uint32_t fracpart = ((NSCSS_ABS(f) & 0x3ff) * 1000 + 500) / (1 << 10);
#undef NSCSS_ABS
- fprintf(stream, "%s%d.%03d", f < 0 ? "-" : "", uintpart, fracpart);
+ fprintf(stream, "%s%"PRIu32".%03"PRIu32, f < 0 ? "-" : "", uintpart, fracpart);
}
/**
@@ -48,7 +50,7 @@ static void dump_css_fixed(FILE *stream, css_fixed f)
static void dump_css_number(FILE *stream, css_fixed val)
{
if (INTTOFIX(FIXTOINT(val)) == val)
- fprintf(stream, "%d", FIXTOINT(val));
+ fprintf(stream, "%"PRId32, FIXTOINT(val));
else
dump_css_fixed(stream, val);
}
@@ -181,7 +183,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
val = css_computed_background_color(style, &color);
switch (val) {
case CSS_BACKGROUND_COLOR_COLOR:
- fprintf(stream, "background-color: #%08x ", color);
+ fprintf(stream, "background-color: #%08"PRIx32" ", color);
break;
default:
break;
@@ -255,7 +257,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
val = css_computed_border_top_color(style, &color);
switch (val) {
case CSS_BORDER_COLOR_COLOR:
- fprintf(stream, "border-top-color: #%08x ", color);
+ fprintf(stream, "border-top-color: #%08"PRIx32" ", color);
break;
default:
break;
@@ -265,7 +267,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
val = css_computed_border_right_color(style, &color);
switch (val) {
case CSS_BORDER_COLOR_COLOR:
- fprintf(stream, "border-right-color: #%08x ", color);
+ fprintf(stream, "border-right-color: #%08"PRIx32" ", color);
break;
default:
break;
@@ -275,7 +277,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
val = css_computed_border_bottom_color(style, &color);
switch (val) {
case CSS_BORDER_COLOR_COLOR:
- fprintf(stream, "border-bottom-color: #%08x ", color);
+ fprintf(stream, "border-bottom-color: #%08"PRIx32" ", color);
break;
default:
break;
@@ -285,7 +287,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
val = css_computed_border_left_color(style, &color);
switch (val) {
case CSS_BORDER_COLOR_COLOR:
- fprintf(stream, "border-left-color: #%08x ", color);
+ fprintf(stream, "border-left-color: #%08"PRIx32" ", color);
break;
default:
break;
@@ -610,7 +612,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
/* color */
val = css_computed_color(style, &color);
if (val == CSS_COLOR_COLOR) {
- fprintf(stream, "color: #%08x ", color);
+ fprintf(stream, "color: #%08"PRIx32" ", color);
}
/* content */
@@ -864,6 +866,12 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
case CSS_DISPLAY_NONE:
fprintf(stream, "display: none ");
break;
+ case CSS_DISPLAY_FLEX:
+ fprintf(stream, "display: flex ");
+ break;
+ case CSS_DISPLAY_INLINE_FLEX:
+ fprintf(stream, "display: inline-flex ");
+ break;
default:
break;
}
@@ -1347,7 +1355,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
fprintf(stream, "outline-color: invert ");
break;
case CSS_OUTLINE_COLOR_COLOR:
- fprintf(stream, "outline-color: #%08x ", color);
+ fprintf(stream, "outline-color: #%08"PRIx32" ", color);
break;
default:
break;
@@ -1814,7 +1822,7 @@ void nscss_dump_computed_style(FILE *stream, const css_computed_style *style)
fprintf(stream, "z-index: auto ");
break;
case CSS_Z_INDEX_SET:
- fprintf(stream, "z-index: %d ", zindex);
+ fprintf(stream, "z-index: %"PRId32" ", zindex);
break;
default:
break;
diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c
index defeae10a..0f246a64c 100644
--- a/content/handlers/css/hints.c
+++ b/content/handlers/css/hints.c
@@ -1624,13 +1624,19 @@ static void css_hint_list(
}
-/* Exported function, documeted in css/hints.h */
+/* Exported function, documented in css/hints.h */
css_error node_presentational_hint(void *pw, void *node,
uint32_t *nhints, css_hint **hints)
{
dom_exception exc;
dom_html_element_type tag_type;
+ if (nsoption_bool(author_level_css) == false) {
+ *nhints = 0;
+ *hints = NULL;
+ return CSS_OK;
+ }
+
css_hint_clean();
exc = dom_html_element_get_tag_type(node, &tag_type);
@@ -1644,22 +1650,22 @@ css_error node_presentational_hint(void *pw, void *node,
css_hint_width(pw, node);
css_hint_table_cell_border_padding(pw, node);
css_hint_white_space_nowrap(pw, node);
- /* fall through */
+ fallthrough;
case DOM_HTML_ELEMENT_TYPE_TR:
css_hint_height(pw, node);
- /* fall through */
+ fallthrough;
case DOM_HTML_ELEMENT_TYPE_THEAD:
case DOM_HTML_ELEMENT_TYPE_TBODY:
case DOM_HTML_ELEMENT_TYPE_TFOOT:
css_hint_text_align_special(pw, node);
- /* fall through */
+ fallthrough;
case DOM_HTML_ELEMENT_TYPE_COL:
css_hint_vertical_align_table_cells(pw, node);
break;
case DOM_HTML_ELEMENT_TYPE_APPLET:
case DOM_HTML_ELEMENT_TYPE_IMG:
css_hint_margin_hspace_vspace(pw, node);
- /* fall through */
+ fallthrough;
case DOM_HTML_ELEMENT_TYPE_EMBED:
case DOM_HTML_ELEMENT_TYPE_IFRAME:
case DOM_HTML_ELEMENT_TYPE_OBJECT:
@@ -1682,7 +1688,7 @@ css_error node_presentational_hint(void *pw, void *node,
break;
case DOM_HTML_ELEMENT_TYPE_CAPTION:
css_hint_caption_side(pw, node);
- /* fall through */
+ fallthrough;
case DOM_HTML_ELEMENT_TYPE_DIV:
css_hint_text_align_special(pw, node);
break;
diff --git a/content/handlers/css/utils.h b/content/handlers/css/utils.h
index 541677a3a..ee241e2cc 100644
--- a/content/handlers/css/utils.h
+++ b/content/handlers/css/utils.h
@@ -28,41 +28,50 @@ extern css_fixed nscss_screen_dpi;
/**
* Temporary helper wrappers for for libcss computed style getter, while
- * we don't support flexbox related property values.
+ * we don't support all values of display.
*/
-
static inline uint8_t ns_computed_display(
const css_computed_style *style, bool root)
{
uint8_t value = css_computed_display(style, root);
- if (value == CSS_DISPLAY_FLEX) {
+ switch (value) {
+ case CSS_DISPLAY_GRID:
return CSS_DISPLAY_BLOCK;
- } else if (value == CSS_DISPLAY_INLINE_FLEX) {
+ case CSS_DISPLAY_INLINE_GRID:
return CSS_DISPLAY_INLINE_BLOCK;
+
+ default:
+ break;
}
return value;
}
-
+/**
+ * Temporary helper wrappers for for libcss computed style getter, while
+ * we don't support all values of display.
+ */
static inline uint8_t ns_computed_display_static(
const css_computed_style *style)
{
uint8_t value = css_computed_display_static(style);
- if (value == CSS_DISPLAY_FLEX) {
+ switch (value) {
+ case CSS_DISPLAY_GRID:
return CSS_DISPLAY_BLOCK;
- } else if (value == CSS_DISPLAY_INLINE_FLEX) {
+ case CSS_DISPLAY_INLINE_GRID:
return CSS_DISPLAY_INLINE_BLOCK;
+
+ default:
+ break;
}
return value;
}
-
static inline uint8_t ns_computed_min_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
diff --git a/content/handlers/html/Makefile b/content/handlers/html/Makefile
index 8bb329b76..e41cc1d22 100644
--- a/content/handlers/html/Makefile
+++ b/content/handlers/html/Makefile
@@ -16,6 +16,7 @@ S_HTML := box_construct.c \
imagemap.c \
interaction.c \
layout.c \
+ layout_flex.c \
object.c \
redraw.c \
redraw_border.c \
diff --git a/content/handlers/html/box.h b/content/handlers/html/box.h
index 1059556e6..df2b99d87 100644
--- a/content/handlers/html/box.h
+++ b/content/handlers/html/box.h
@@ -66,7 +66,9 @@ typedef enum {
BOX_BR,
BOX_TEXT,
BOX_INLINE_END,
- BOX_NONE
+ BOX_NONE,
+ BOX_FLEX,
+ BOX_INLINE_FLEX,
} box_type;
diff --git a/content/handlers/html/box_construct.c b/content/handlers/html/box_construct.c
index 12d9df87c..8519c2b1d 100644
--- a/content/handlers/html/box_construct.c
+++ b/content/handlers/html/box_construct.c
@@ -86,28 +86,30 @@ struct box_construct_props {
static const content_type image_types = CONTENT_IMAGE;
-/**
- * mapping from CSS display to box type this table must be in sync
- * with libcss' css_display enum
- */
+/* mapping from CSS display to box type
+ * this table must be in sync with libcss' css_display enum */
static const box_type box_map[] = {
- 0, /* CSS_DISPLAY_INHERIT, */
- BOX_INLINE, /* CSS_DISPLAY_INLINE, */
- BOX_BLOCK, /* CSS_DISPLAY_BLOCK, */
- BOX_BLOCK, /* CSS_DISPLAY_LIST_ITEM, */
- BOX_INLINE, /* CSS_DISPLAY_RUN_IN, */
- BOX_INLINE_BLOCK, /* CSS_DISPLAY_INLINE_BLOCK, */
- BOX_TABLE, /* CSS_DISPLAY_TABLE, */
- BOX_TABLE, /* CSS_DISPLAY_INLINE_TABLE, */
- BOX_TABLE_ROW_GROUP, /* CSS_DISPLAY_TABLE_ROW_GROUP, */
- BOX_TABLE_ROW_GROUP, /* CSS_DISPLAY_TABLE_HEADER_GROUP, */
- BOX_TABLE_ROW_GROUP, /* CSS_DISPLAY_TABLE_FOOTER_GROUP, */
- BOX_TABLE_ROW, /* CSS_DISPLAY_TABLE_ROW, */
- BOX_NONE, /* CSS_DISPLAY_TABLE_COLUMN_GROUP, */
- BOX_NONE, /* CSS_DISPLAY_TABLE_COLUMN, */
- BOX_TABLE_CELL, /* CSS_DISPLAY_TABLE_CELL, */
- BOX_INLINE, /* CSS_DISPLAY_TABLE_CAPTION, */
- BOX_NONE /* CSS_DISPLAY_NONE */
+ BOX_BLOCK, /* CSS_DISPLAY_INHERIT */
+ BOX_INLINE, /* CSS_DISPLAY_INLINE */
+ BOX_BLOCK, /* CSS_DISPLAY_BLOCK */
+ BOX_BLOCK, /* CSS_DISPLAY_LIST_ITEM */
+ BOX_INLINE, /* CSS_DISPLAY_RUN_IN */
+ BOX_INLINE_BLOCK, /* CSS_DISPLAY_INLINE_BLOCK */
+ BOX_TABLE, /* CSS_DISPLAY_TABLE */
+ BOX_TABLE, /* CSS_DISPLAY_INLINE_TABLE */
+ BOX_TABLE_ROW_GROUP, /* CSS_DISPLAY_TABLE_ROW_GROUP */
+ BOX_TABLE_ROW_GROUP, /* CSS_DISPLAY_TABLE_HEADER_GROUP */
+ BOX_TABLE_ROW_GROUP, /* CSS_DISPLAY_TABLE_FOOTER_GROUP */
+ BOX_TABLE_ROW, /* CSS_DISPLAY_TABLE_ROW */
+ BOX_NONE, /* CSS_DISPLAY_TABLE_COLUMN_GROUP */
+ BOX_NONE, /* CSS_DISPLAY_TABLE_COLUMN */
+ BOX_TABLE_CELL, /* CSS_DISPLAY_TABLE_CELL */
+ BOX_INLINE, /* CSS_DISPLAY_TABLE_CAPTION */
+ BOX_NONE, /* CSS_DISPLAY_NONE */
+ BOX_FLEX, /* CSS_DISPLAY_FLEX */
+ BOX_INLINE_FLEX, /* CSS_DISPLAY_INLINE_FLEX */
+ BOX_BLOCK, /* CSS_DISPLAY_GRID */
+ BOX_INLINE_BLOCK, /* CSS_DISPLAY_INLINE_GRID */
};
@@ -142,7 +144,6 @@ static inline bool box_is_root(dom_node *n)
return true;
}
-
/**
* Extract transient construction properties
*
@@ -248,16 +249,19 @@ box_get_style(html_content *c,
const css_computed_style *root_style,
dom_node *n)
{
- dom_string *s;
- dom_exception err;
+ dom_string *s = NULL;
css_stylesheet *inline_style = NULL;
css_select_results *styles;
nscss_select_ctx ctx;
/* Firstly, construct inline stylesheet, if any */
- err = dom_element_get_attribute(n, corestring_dom_style, &s);
- if (err != DOM_NO_ERR)
- return NULL;
+ if (nsoption_bool(author_level_css)) {
+ dom_exception err;
+ err = dom_element_get_attribute(n, corestring_dom_style, &s);
+ if (err != DOM_NO_ERR) {
+ return NULL;
+ }
+ }
if (s != NULL) {
inline_style = nscss_create_inline_style(
@@ -438,6 +442,23 @@ box_construct_marker(struct box *box,
return true;
}
+static inline bool box__style_is_float(const struct box *box)
+{
+ return css_computed_float(box->style) == CSS_FLOAT_LEFT ||
+ css_computed_float(box->style) == CSS_FLOAT_RIGHT;
+}
+
+static inline bool box__is_flex(const struct box *box)
+{
+ return box->type == BOX_FLEX || box->type == BOX_INLINE_FLEX;
+}
+
+static inline bool box__containing_block_is_flex(
+ const struct box_construct_props *props)
+{
+ return props->containing_block != NULL &&
+ box__is_flex(props->containing_block);
+}
/**
* Construct the box tree for an XML element.
@@ -451,6 +472,7 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
{
dom_string *title0, *s;
lwc_string *id = NULL;
+ enum css_display_e css_display;
struct box *box = NULL, *old_box;
css_select_results *styles = NULL;
lwc_string *bgimage_uri;
@@ -549,16 +571,15 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
dom_string_unref(s);
}
+ css_display = ns_computed_display_static(box->style);
+
/* Set box type from computed display */
if ((css_computed_position(box->style) == CSS_POSITION_ABSOLUTE ||
- css_computed_position(box->style) ==
- CSS_POSITION_FIXED) &&
- (ns_computed_display_static(box->style) ==
- CSS_DISPLAY_INLINE ||
- ns_computed_display_static(box->style) ==
- CSS_DISPLAY_INLINE_BLOCK ||
- ns_computed_display_static(box->style) ==
- CSS_DISPLAY_INLINE_TABLE)) {
+ css_computed_position(box->style) == CSS_POSITION_FIXED) &&
+ (css_display == CSS_DISPLAY_INLINE ||
+ css_display == CSS_DISPLAY_INLINE_BLOCK ||
+ css_display == CSS_DISPLAY_INLINE_TABLE ||
+ css_display == CSS_DISPLAY_INLINE_FLEX)) {
/* Special case for absolute positioning: make absolute inlines
* into inline block so that the boxes are constructed in an
* inline container as if they were not absolutely positioned.
@@ -572,6 +593,21 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
/* Normal mapping */
box->type = box_map[ns_computed_display(box->style,
props.node_is_root)];
+
+ if (props.containing_block->type == BOX_FLEX ||
+ props.containing_block->type == BOX_INLINE_FLEX) {
+ /* Blockification */
+ switch (box->type) {
+ case BOX_INLINE_FLEX:
+ box->type = BOX_FLEX;
+ break;
+ case BOX_INLINE_BLOCK:
+ box->type = BOX_BLOCK;
+ break;
+ default:
+ break;
+ }
+ }
}
if (convert_special_elements(ctx->n,
@@ -587,10 +623,9 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
box->styles->styles[CSS_PSEUDO_ELEMENT_BEFORE]);
}
- if (box->type == BOX_NONE ||
- (ns_computed_display(box->style,
- props.node_is_root) == CSS_DISPLAY_NONE &&
- props.node_is_root == false)) {
+ if (box->type == BOX_NONE || (ns_computed_display(box->style,
+ props.node_is_root) == CSS_DISPLAY_NONE &&
+ props.node_is_root == false)) {
css_select_results_destroy(styles);
box->styles = NULL;
box->style = NULL;
@@ -625,8 +660,9 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
(box->type == BOX_INLINE ||
box->type == BOX_BR ||
box->type == BOX_INLINE_BLOCK ||
- css_computed_float(box->style) == CSS_FLOAT_LEFT ||
- css_computed_float(box->style) == CSS_FLOAT_RIGHT) &&
+ box->type == BOX_INLINE_FLEX ||
+ (box__style_is_float(box) &&
+ !box__containing_block_is_flex(&props))) &&
props.node_is_root == false) {
/* Found an inline child of a block without a current container
* (i.e. this box is the first child of its parent, or was
@@ -674,6 +710,7 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
box->flags |= CONVERT_CHILDREN;
if (box->type == BOX_INLINE || box->type == BOX_BR ||
+ box->type == BOX_INLINE_FLEX ||
box->type == BOX_INLINE_BLOCK) {
/* Inline container must exist, as we'll have
* created it above if it didn't */
@@ -690,6 +727,7 @@ box_construct_element(struct box_construct_ctx *ctx, bool *convert_children)
}
if (props.node_is_root == false &&
+ box__containing_block_is_flex(&props) == false &&
(css_computed_float(box->style) ==
CSS_FLOAT_LEFT ||
css_computed_float(box->style) ==
@@ -1342,7 +1380,6 @@ struct box *box_for_node(dom_node *n)
return box;
}
-
/* exported function documented in html/box_construct.h */
bool
box_extract_link(const html_content *content,
diff --git a/content/handlers/html/box_inspect.c b/content/handlers/html/box_inspect.c
index b4b13940d..6591b6446 100644
--- a/content/handlers/html/box_inspect.c
+++ b/content/handlers/html/box_inspect.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <dom/dom.h>
+#include "utils/utils.h"
#include "utils/nsurl.h"
#include "utils/errors.h"
#include "netsurf/types.h"
@@ -212,7 +213,7 @@ box_move_xy(struct box *b, enum box_walk_dir dir, int *x, int *y)
rb = b;
break;
}
- /* fall through */
+ fallthrough;
case BOX_WALK_NEXT_SIBLING:
do {
@@ -660,7 +661,7 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth, bool style)
if (box->max_width != UNKNOWN_MAX_WIDTH) {
fprintf(stream, "min%i max%i ", box->min_width, box->max_width);
}
- fprintf(stream, "(%i %i %i %i) ",
+ fprintf(stream, "desc(%i %i %i %i) ",
box->descendant_x0, box->descendant_y0,
box->descendant_x1, box->descendant_y1);
@@ -724,6 +725,14 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth, bool style)
fprintf(stream, "TEXT ");
break;
+ case BOX_FLEX:
+ fprintf(stream, "FLEX ");
+ break;
+
+ case BOX_INLINE_FLEX:
+ fprintf(stream, "INLINE_FLEX ");
+ break;
+
default:
fprintf(stream, "Unknown box type ");
}
diff --git a/content/handlers/html/box_inspect.h b/content/handlers/html/box_inspect.h
index b9161f148..a218326d8 100644
--- a/content/handlers/html/box_inspect.h
+++ b/content/handlers/html/box_inspect.h
@@ -139,5 +139,17 @@ static inline bool box_is_first_child(struct box *b)
return (b->parent == NULL || b == b->parent->children);
}
+static inline unsigned box_count_children(const struct box *b)
+{
+ const struct box *c = b->children;
+ unsigned count = 0;
+
+ while (c != NULL) {
+ count++;
+ c = c->next;
+ }
+
+ return count;
+}
#endif
diff --git a/content/handlers/html/box_normalise.c b/content/handlers/html/box_normalise.c
index 1b6a345d5..8f25b031f 100644
--- a/content/handlers/html/box_normalise.c
+++ b/content/handlers/html/box_normalise.c
@@ -177,6 +177,7 @@ box_normalise_table_row(struct box *row,
return false;
cell = child;
break;
+ case BOX_FLEX:
case BOX_BLOCK:
case BOX_INLINE_CONTAINER:
case BOX_TABLE:
@@ -211,6 +212,7 @@ box_normalise_table_row(struct box *row,
cell->prev = child->prev;
while (child != NULL && (
+ child->type == BOX_FLEX ||
child->type == BOX_BLOCK ||
child->type == BOX_INLINE_CONTAINER ||
child->type == BOX_TABLE ||
@@ -238,6 +240,7 @@ box_normalise_table_row(struct box *row,
break;
case BOX_INLINE:
case BOX_INLINE_END:
+ case BOX_INLINE_FLEX:
case BOX_INLINE_BLOCK:
case BOX_FLOAT_LEFT:
case BOX_FLOAT_RIGHT:
@@ -314,6 +317,7 @@ box_normalise_table_row_group(struct box *row_group,
c) == false)
return false;
break;
+ case BOX_FLEX:
case BOX_BLOCK:
case BOX_INLINE_CONTAINER:
case BOX_TABLE:
@@ -348,6 +352,7 @@ box_normalise_table_row_group(struct box *row_group,
row->prev = child->prev;
while (child != NULL && (
+ child->type == BOX_FLEX ||
child->type == BOX_BLOCK ||
child->type == BOX_INLINE_CONTAINER ||
child->type == BOX_TABLE ||
@@ -377,6 +382,7 @@ box_normalise_table_row_group(struct box *row_group,
break;
case BOX_INLINE:
case BOX_INLINE_END:
+ case BOX_INLINE_FLEX:
case BOX_INLINE_BLOCK:
case BOX_FLOAT_LEFT:
case BOX_FLOAT_RIGHT:
@@ -648,6 +654,7 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
return false;
}
break;
+ case BOX_FLEX:
case BOX_BLOCK:
case BOX_INLINE_CONTAINER:
case BOX_TABLE:
@@ -686,6 +693,7 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
row_group->prev = child->prev;
while (child != NULL && (
+ child->type == BOX_FLEX ||
child->type == BOX_BLOCK ||
child->type == BOX_INLINE_CONTAINER ||
child->type == BOX_TABLE ||
@@ -716,6 +724,7 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
break;
case BOX_INLINE:
case BOX_INLINE_END:
+ case BOX_INLINE_FLEX:
case BOX_INLINE_BLOCK:
case BOX_FLOAT_LEFT:
case BOX_FLOAT_RIGHT:
@@ -806,6 +815,181 @@ box_normalise_table(struct box *table, const struct box *root, html_content * c)
return true;
}
+static bool box_normalise_flex(
+ struct box *flex_container,
+ const struct box *root,
+ html_content *c)
+{
+ struct box *child;
+ struct box *next_child;
+ struct box *implied_flex_item;
+ css_computed_style *style;
+ nscss_select_ctx ctx;
+
+ assert(flex_container != NULL);
+ assert(root != NULL);
+
+ ctx.root_style = root->style;
+
+#ifdef BOX_NORMALISE_DEBUG
+ NSLOG(netsurf, INFO, "flex_container %p, flex_container->type %u",
+ flex_container, flex_container->type);
+#endif
+
+ assert(flex_container->type == BOX_FLEX ||
+ flex_container->type == BOX_INLINE_FLEX);
+
+ for (child = flex_container->children; child != NULL; child = next_child) {
+#ifdef BOX_NORMALISE_DEBUG
+ NSLOG(netsurf, INFO, "child %p, child->type = %d",
+ child, child->type);
+#endif
+
+ next_child = child->next; /* child may be destroyed */
+
+ switch (child->type) {
+ case BOX_FLEX:
+ /* ok */
+ if (box_normalise_flex(child, root, c) == false)
+ return false;
+ break;
+ case BOX_BLOCK:
+ /* ok */
+ if (box_normalise_block(child, root, c) == false)
+ return false;
+ break;
+ case BOX_INLINE_CONTAINER:
+ /* insert implied flex item */
+ assert(flex_container->style != NULL);
+
+ ctx.ctx = c->select_ctx;
+ ctx.quirks = (c->quirks == DOM_DOCUMENT_QUIRKS_MODE_FULL);
+ ctx.base_url = c->base_url;
+ ctx.universal = c->universal;
+
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ flex_container->style);
+ if (style == NULL)
+ return false;
+
+ implied_flex_item = box_create(NULL, style, true,
+ flex_container->href,
+ flex_container->target,
+ NULL, NULL, c->bctx);
+ if (implied_flex_item == NULL) {
+ css_computed_style_destroy(style);
+ return false;
+ }
+ implied_flex_item->type = BOX_BLOCK;
+
+ if (child->prev == NULL)
+ flex_container->children = implied_flex_item;
+ else
+ child->prev->next = implied_flex_item;
+
+ implied_flex_item->prev = child->prev;
+
+ while (child != NULL &&
+ child->type == BOX_INLINE_CONTAINER) {
+ box_add_child(implied_flex_item, child);
+
+ next_child = child->next;
+ child->next = NULL;
+ child = next_child;
+ }
+
+ implied_flex_item->last->next = NULL;
+ implied_flex_item->next = next_child = child;
+ if (implied_flex_item->next != NULL)
+ implied_flex_item->next->prev = implied_flex_item;
+ else
+ flex_container->last = implied_flex_item;
+ implied_flex_item->parent = flex_container;
+
+ if (box_normalise_block(implied_flex_item,
+ root, c) == false)
+ return false;
+ break;
+
+ case BOX_TABLE:
+ if (box_normalise_table(child, root, c) == false)
+ return false;
+ break;
+ case BOX_INLINE:
+ case BOX_INLINE_END:
+ case BOX_INLINE_FLEX:
+ case BOX_INLINE_BLOCK:
+ case BOX_FLOAT_LEFT:
+ case BOX_FLOAT_RIGHT:
+ case BOX_BR:
+ case BOX_TEXT:
+ /* should have been wrapped in inline
+ container by convert_xml_to_box() */
+ assert(0);
+ break;
+ case BOX_TABLE_ROW_GROUP:
+ case BOX_TABLE_ROW:
+ case BOX_TABLE_CELL:
+ /* insert implied table */
+ assert(flex_container->style != NULL);
+
+ ctx.ctx = c->select_ctx;
+ ctx.quirks = (c->quirks == DOM_DOCUMENT_QUIRKS_MODE_FULL);
+ ctx.base_url = c->base_url;
+ ctx.universal = c->universal;
+
+ style = nscss_get_blank_style(&ctx, &c->unit_len_ctx,
+ flex_container->style);
+ if (style == NULL)
+ return false;
+
+ implied_flex_item = box_create(NULL, style, true,
+ flex_container->href,
+ flex_container->target,
+ NULL, NULL, c->bctx);
+ if (implied_flex_item == NULL) {
+ css_computed_style_destroy(style);
+ return false;
+ }
+ implied_flex_item->type = BOX_TABLE;
+
+ if (child->prev == NULL)
+ flex_container->children = implied_flex_item;
+ else
+ child->prev->next = implied_flex_item;
+
+ implied_flex_item->prev = child->prev;
+
+ while (child != NULL && (
+ child->type == BOX_TABLE_ROW_GROUP ||
+ child->type == BOX_TABLE_ROW ||
+ child->type == BOX_TABLE_CELL)) {
+ box_add_child(implied_flex_item, child);
+
+ next_child = child->next;
+ child->next = NULL;
+ child = next_child;
+ }
+
+ implied_flex_item->last->next = NULL;
+ implied_flex_item->next = next_child = child;
+ if (implied_flex_item->next != NULL)
+ implied_flex_item->next->prev = implied_flex_item;
+ else
+ flex_container->last = implied_flex_item;
+ implied_flex_item->parent = flex_container;
+
+ if (box_normalise_table(implied_flex_item,
+ root, c) == false)
+ return false;
+ break;
+ default:
+ assert(0);
+ }
+ }
+
+ return true;
+}
static bool
box_normalise_inline_container(struct box *cont,
@@ -836,6 +1020,11 @@ box_normalise_inline_container(struct box *cont,
if (box_normalise_block(child, root, c) == false)
return false;
break;
+ case BOX_INLINE_FLEX:
+ /* ok */
+ if (box_normalise_flex(child, root, c) == false)
+ return false;
+ break;
case BOX_FLOAT_LEFT:
case BOX_FLOAT_RIGHT:
/* ok */
@@ -852,6 +1041,11 @@ box_normalise_inline_container(struct box *cont,
c) == false)
return false;
break;
+ case BOX_FLEX:
+ if (box_normalise_flex(child->children, root,
+ c) == false)
+ return false;
+ break;
default:
assert(0);
}
@@ -870,6 +1064,7 @@ box_normalise_inline_container(struct box *cont,
box_free(child);
}
break;
+ case BOX_FLEX:
case BOX_BLOCK:
case BOX_INLINE_CONTAINER:
case BOX_TABLE:
@@ -888,7 +1083,6 @@ box_normalise_inline_container(struct box *cont,
return true;
}
-
/* Exported function documented in html/box_normalise.h */
bool
box_normalise_block(struct box *block, const struct box *root, html_content *c)
@@ -920,6 +1114,11 @@ box_normalise_block(struct box *block, const struct box *root, html_content *c)
next_child = child->next; /* child may be destroyed */
switch (child->type) {
+ case BOX_FLEX:
+ /* ok */
+ if (box_normalise_flex(child, root, c) == false)
+ return false;
+ break;
case BOX_BLOCK:
/* ok */
if (box_normalise_block(child, root, c) == false)
@@ -935,6 +1134,7 @@ box_normalise_block(struct box *block, const struct box *root, html_content *c)
break;
case BOX_INLINE:
case BOX_INLINE_END:
+ case BOX_INLINE_FLEX:
case BOX_INLINE_BLOCK:
case BOX_FLOAT_LEFT:
case BOX_FLOAT_RIGHT:
diff --git a/content/handlers/html/box_normalise.h b/content/handlers/html/box_normalise.h
index 591feab8d..377cd9019 100644
--- a/content/handlers/html/box_normalise.h
+++ b/content/handlers/html/box_normalise.h
@@ -50,14 +50,15 @@
* The tree is modified to satisfy the following:
* \code
* parent permitted child nodes
- * BLOCK, INLINE_BLOCK BLOCK, INLINE_CONTAINER, TABLE
- * INLINE_CONTAINER INLINE, INLINE_BLOCK, FLOAT_LEFT, FLOAT_RIGHT, BR, TEXT
+ * BLOCK, INLINE_BLOCK BLOCK, INLINE_CONTAINER, TABLE, FLEX
+ * FLEX, INLINE_FLEX BLOCK, INLINE_CONTAINER, TABLE, FLEX
+ * INLINE_CONTAINER INLINE, INLINE_BLOCK, FLOAT_LEFT, FLOAT_RIGHT, BR, TEXT, INLINE_FLEX
* INLINE, TEXT none
* TABLE at least 1 TABLE_ROW_GROUP
* TABLE_ROW_GROUP at least 1 TABLE_ROW
* TABLE_ROW at least 1 TABLE_CELL
- * TABLE_CELL BLOCK, INLINE_CONTAINER, TABLE (same as BLOCK)
- * FLOAT_(LEFT|RIGHT) exactly 1 BLOCK or TABLE
+ * TABLE_CELL BLOCK, INLINE_CONTAINER, TABLE, FLEX (same as BLOCK)
+ * FLOAT_(LEFT|RIGHT) exactly 1 BLOCK, TABLE or FLEX
* \endcode
*/
bool box_normalise_block(struct box *block, const struct box *root, struct html_content *c);
diff --git a/content/handlers/html/box_special.c b/content/handlers/html/box_special.c
index f761557e0..db3c4126d 100644
--- a/content/handlers/html/box_special.c
+++ b/content/handlers/html/box_special.c
@@ -560,8 +560,18 @@ static bool
box_input_text(html_content *html, struct box *box, struct dom_node *node)
{
struct box *inline_container, *inline_box;
+ uint8_t display = css_computed_display_static(box->style);
- box->type = BOX_INLINE_BLOCK;
+ switch (display) {
+ case CSS_DISPLAY_GRID:
+ case CSS_DISPLAY_FLEX:
+ case CSS_DISPLAY_BLOCK:
+ box->type = BOX_BLOCK;
+ break;
+ default:
+ box->type = BOX_INLINE_BLOCK;
+ break;
+ }
inline_container = box_create(NULL, 0, false, 0, 0, 0, 0, html->bctx);
if (!inline_container)
@@ -825,8 +835,8 @@ box_canvas(dom_node *n,
}
*convert_children = false;
- if (box->style &&
- ns_computed_display(box->style, box_is_root(n)) == CSS_DISPLAY_NONE)
+ if (box->style && ns_computed_display(box->style,
+ box_is_root(n)) == CSS_DISPLAY_NONE)
return true;
/* This is replaced content */
@@ -854,8 +864,8 @@ box_embed(dom_node *n,
dom_string *src;
dom_exception err;
- if (box->style &&
- ns_computed_display(box->style, box_is_root(n)) == CSS_DISPLAY_NONE)
+ if (box->style && ns_computed_display(box->style,
+ box_is_root(n)) == CSS_DISPLAY_NONE)
return true;
params = talloc(content->bctx, struct object_params);
@@ -1025,8 +1035,8 @@ box_iframe(dom_node *n,
struct content_html_iframe *iframe;
int i;
- if (box->style &&
- ns_computed_display(box->style, box_is_root(n)) == CSS_DISPLAY_NONE)
+ if (box->style && ns_computed_display(box->style,
+ box_is_root(n)) == CSS_DISPLAY_NONE)
return true;
if (box->style &&
@@ -1154,8 +1164,8 @@ box_image(dom_node *n,
css_unit wunit = CSS_UNIT_PX;
css_unit hunit = CSS_UNIT_PX;
- if (box->style &&
- ns_computed_display(box->style, box_is_root(n)) == CSS_DISPLAY_NONE)
+ if (box->style && ns_computed_display(box->style,
+ box_is_root(n)) == CSS_DISPLAY_NONE)
return true;
/* handle alt text */
@@ -1322,10 +1332,9 @@ box_input(dom_node *n,
corestring_lwc_image)) {
gadget->type = GADGET_IMAGE;
- if (box->style &&
- ns_computed_display(box->style,
+ if (box->style && ns_computed_display(box->style,
box_is_root(n)) != CSS_DISPLAY_NONE &&
- nsoption_bool(foreground_images) == true) {
+ nsoption_bool(foreground_images) == true) {
dom_string *s;
err = dom_element_get_attribute(n, corestring_dom_src, &s);
@@ -1405,8 +1414,8 @@ box_object(dom_node *n,
dom_node *c;
dom_exception err;
- if (box->style &&
- ns_computed_display(box->style, box_is_root(n)) == CSS_DISPLAY_NONE)
+ if (box->style && ns_computed_display(box->style,
+ box_is_root(n)) == CSS_DISPLAY_NONE)
return true;
if (box_get_attribute(n, "usemap", content->bctx, &box->usemap) ==
diff --git a/content/handlers/html/css.c b/content/handlers/html/css.c
index 2434b1783..0bc38844f 100644
--- a/content/handlers/html/css.c
+++ b/content/handlers/html/css.c
@@ -33,6 +33,7 @@
#include "utils/nsoption.h"
#include "utils/corestrings.h"
#include "utils/log.h"
+#include "netsurf/inttypes.h"
#include "netsurf/misc.h"
#include "netsurf/content.h"
#include "content/hlcache.h"
@@ -173,7 +174,7 @@ html_stylesheet_from_domnode(html_content *c,
dom_string_unref(style);
- snprintf(urlbuf, sizeof(urlbuf), "x-ns-css:%u", key);
+ snprintf(urlbuf, sizeof(urlbuf), "x-ns-css:%"PRIu32"", key);
error = nsurl_create(urlbuf, &url);
if (error != NSERROR_OK) {
@@ -395,16 +396,20 @@ bool html_css_process_link(html_content *htmlc, dom_node *node)
if (exc != DOM_NO_ERR || rel == NULL)
return true;
- if (strcasestr(dom_string_data(rel), "stylesheet") == 0) {
+ if (strcasestr(dom_string_data(rel), "stylesheet") == NULL) {
dom_string_unref(rel);
return true;
- } else if (strcasestr(dom_string_data(rel), "alternate") != 0) {
+ } else if (strcasestr(dom_string_data(rel), "alternate") != NULL) {
/* Ignore alternate stylesheets */
dom_string_unref(rel);
return true;
}
dom_string_unref(rel);
+ if (nsoption_bool(author_level_css) == false) {
+ return true;
+ }
+
/* type='text/css' or not present */
exc = dom_element_get_attribute(node, corestring_dom_type, &type_attr);
if (exc == DOM_NO_ERR && type_attr != NULL) {
diff --git a/content/handlers/html/dom_event.c b/content/handlers/html/dom_event.c
index 36a020b6d..d42882515 100644
--- a/content/handlers/html/dom_event.c
+++ b/content/handlers/html/dom_event.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "utils/config.h"
+#include "utils/utils.h"
#include "utils/corestrings.h"
#include "utils/nsoption.h"
#include "utils/log.h"
@@ -622,7 +623,9 @@ dom_default_action_DOMNodeInserted_cb(struct dom_event *evt, void *pw)
break;
case DOM_HTML_ELEMENT_TYPE_STYLE:
- html_css_process_style(htmlc, (dom_node *)node);
+ if (nsoption_bool(author_level_css)) {
+ html_css_process_style(htmlc, (dom_node *)node);
+ }
break;
case DOM_HTML_ELEMENT_TYPE_SCRIPT:
@@ -689,6 +692,7 @@ dom_default_action_DOMNodeInsertedIntoDocument_cb(struct dom_event *evt,
switch (tag_type) {
case DOM_HTML_ELEMENT_TYPE_SCRIPT:
dom_SCRIPT_showed_up(htmlc, (dom_html_script_element *) node);
+ fallthrough;
default:
break;
}
@@ -730,11 +734,15 @@ dom_default_action_DOMSubtreeModified_cb(struct dom_event *evt, void *pw)
switch (tag_type) {
case DOM_HTML_ELEMENT_TYPE_STYLE:
- html_css_update_style(htmlc, (dom_node *)node);
+ if (nsoption_bool(author_level_css)) {
+ html_css_update_style(htmlc,
+ (dom_node *)node);
+ }
break;
case DOM_HTML_ELEMENT_TYPE_TEXTAREA:
case DOM_HTML_ELEMENT_TYPE_INPUT:
html_texty_element_update(htmlc, (dom_node *)node);
+ fallthrough;
default:
break;
}
diff --git a/content/handlers/html/form.c b/content/handlers/html/form.c
index 97ec19518..9b6768a56 100644
--- a/content/handlers/html/form.c
+++ b/content/handlers/html/form.c
@@ -41,6 +41,7 @@
#include "utils/utf8.h"
#include "utils/ascii.h"
#include "netsurf/browser_window.h"
+#include "netsurf/inttypes.h"
#include "netsurf/mouse.h"
#include "netsurf/plotters.h"
#include "netsurf/misc.h"
@@ -486,7 +487,7 @@ form_dom_to_data_select(dom_html_select_element *select_element,
&option_element);
if (exp != DOM_NO_ERR) {
NSLOG(netsurf, INFO,
- "Could not get options item %d", option_index);
+ "Could not get options item %"PRId32, option_index);
res = NSERROR_DOM;
} else {
res = form_dom_to_data_select_option(
@@ -1100,7 +1101,7 @@ form_dom_to_data(struct form *form,
exp = dom_html_collection_item(elements, element_idx, &element);
if (exp != DOM_NO_ERR) {
NSLOG(netsurf, INFO,
- "retrieving form element %d failed with %d",
+ "retrieving form element %"PRIu32" failed with %d",
element_idx, exp);
res = NSERROR_DOM;
goto form_dom_to_data_error;
@@ -1110,7 +1111,7 @@ form_dom_to_data(struct form *form,
exp = dom_node_get_node_name(element, &nodename);
if (exp != DOM_NO_ERR) {
NSLOG(netsurf, INFO,
- "getting element node name %d failed with %d",
+ "getting element node name %"PRIu32" failed with %d",
element_idx, exp);
dom_node_unref(element);
res = NSERROR_DOM;
@@ -2001,15 +2002,33 @@ void form_radio_set(struct form_control *radio)
if (radio->selected)
return;
- for (control = radio->form->controls; control;
- control = control->next) {
+ /* Clear selected state for other controls in
+ * the same radio button group */
+ for (control = radio->form->controls;
+ control != NULL;
+ control = control->next) {
+ /* Only interested in radio inputs */
if (control->type != GADGET_RADIO)
continue;
+
+ /* Ignore ourself */
if (control == radio)
continue;
- if (strcmp(control->name, radio->name) != 0)
+
+ /* Ignore inputs where:
+ * a) this or the other control have no name attribute
+ * b) this or the other control have an empty name attribute
+ * c) the control names do not match
+ */
+ if ((control->name == NULL) ||
+ (radio->name == NULL) ||
+ (control->name[0] == '\0') ||
+ (radio->name[0] == '\0') ||
+ strcmp(control->name, radio->name) != 0)
continue;
+ /* Other control is in the same radio button group: clear its
+ * selected state */
if (control->selected) {
control->selected = false;
dom_html_input_element_set_checked(control->node, false);
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index c6a28724c..82f5f1388 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -123,7 +123,7 @@ bool fire_generic_dom_event(dom_string *type, dom_node *target,
return false;
}
NSLOG(netsurf, INFO, "Dispatching '%*s' against %p",
- dom_string_length(type), dom_string_data(type), target);
+ (int)dom_string_length(type), dom_string_data(type), target);
result = fire_dom_event(evt, target);
dom_event_unref(evt);
return result;
@@ -200,7 +200,7 @@ bool fire_dom_keyboard_event(dom_string *type, dom_node *target,
}
NSLOG(netsurf, INFO, "Dispatching '%*s' against %p",
- dom_string_length(type), dom_string_data(type), target);
+ (int)dom_string_length(type), dom_string_data(type), target);
result = fire_dom_event((dom_event *) evt, target);
dom_event_unref(evt);
@@ -458,6 +458,8 @@ html_create_html_data(html_content *c, const http_parameter *params)
dom_hubbub_error error;
dom_exception err;
void *old_node_data;
+ const char *prefer_color_mode = (nsoption_bool(prefer_dark_mode)) ?
+ "dark" : "light";
c->parser = NULL;
c->parse_completed = false;
@@ -505,6 +507,13 @@ html_create_html_data(html_content *c, const http_parameter *params)
return NSERROR_NOMEM;
}
+ if (lwc_intern_string(prefer_color_mode, strlen(prefer_color_mode),
+ &c->media.prefers_color_scheme) != lwc_error_ok) {
+ lwc_string_unref(c->universal);
+ c->universal = NULL;
+ return NSERROR_NOMEM;
+ }
+
c->sel = selection_create((struct content *)c);
nerror = http_parameter_list_find_item(params, corestring_lwc_charset, &charset);
@@ -516,6 +525,8 @@ html_create_html_data(html_content *c, const http_parameter *params)
if (c->encoding == NULL) {
lwc_string_unref(c->universal);
c->universal = NULL;
+ lwc_string_unref(c->media.prefers_color_scheme);
+ c->media.prefers_color_scheme = NULL;
return NSERROR_NOMEM;
}
@@ -552,6 +563,8 @@ html_create_html_data(html_content *c, const http_parameter *params)
lwc_string_unref(c->universal);
c->universal = NULL;
+ lwc_string_unref(c->media.prefers_color_scheme);
+ c->media.prefers_color_scheme = NULL;
return libdom_hubbub_error_to_nserror(error);
}
@@ -568,6 +581,8 @@ html_create_html_data(html_content *c, const http_parameter *params)
lwc_string_unref(c->universal);
c->universal = NULL;
+ lwc_string_unref(c->media.prefers_color_scheme);
+ c->media.prefers_color_scheme = NULL;
NSLOG(netsurf, INFO, "Unable to set user data.");
return NSERROR_DOM;
@@ -1274,6 +1289,11 @@ static void html_destroy(struct content *c)
html->universal = NULL;
}
+ if (html->media.prefers_color_scheme != NULL) {
+ lwc_string_unref(html->media.prefers_color_scheme);
+ html->media.prefers_color_scheme = NULL;
+ }
+
/* Free stylesheets */
html_css_free_stylesheets(html);
diff --git a/content/handlers/html/interaction.c b/content/handlers/html/interaction.c
index 026ef1ee7..0a843e026 100644
--- a/content/handlers/html/interaction.c
+++ b/content/handlers/html/interaction.c
@@ -899,7 +899,7 @@ gadget_mouse_action(html_content *html,
}
free(oldcoords);
}
- /* Fall through */
+ fallthrough;
case GADGET_SUBMIT:
if (mas->gadget.control->form) {
@@ -1465,7 +1465,7 @@ html_mouse_action(struct content *c,
int x, int y)
{
html_content *html = (html_content *)c;
- nserror res;
+ nserror res = NSERROR_OK;
/* handle open select menu */
if (html->visible_select_menu != NULL) {
@@ -1493,7 +1493,7 @@ html_mouse_action(struct content *c,
break;
case HTML_DRAG_NONE:
- res = mouse_action_drag_none(html, bw, mouse, x, y);
+ res = mouse_action_drag_none(html, bw, mouse, x, y);
break;
default:
@@ -1669,7 +1669,7 @@ void html_set_drag_type(html_content *html, html_drag_type drag_type,
case HTML_DRAG_SELECTION:
assert(drag_owner.no_owner == true);
- /* Fall through */
+ fallthrough;
case HTML_DRAG_TEXTAREA_SELECTION:
case HTML_DRAG_CONTENT_SELECTION:
msg_data.drag.type = CONTENT_DRAG_SELECTION;
@@ -1800,7 +1800,7 @@ void html_set_selection(html_content *html, html_selection_type selection_type,
break;
case HTML_SELECTION_SELF:
assert(selection_owner.none == false);
- /* fall through */
+ fallthrough;
case HTML_SELECTION_TEXTAREA:
case HTML_SELECTION_CONTENT:
msg_data.selection.selection = true;
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index c06fdf690..76ce24df5 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -67,24 +67,11 @@
#include "html/font.h"
#include "html/form_internal.h"
#include "html/layout.h"
+#include "html/layout_internal.h"
#include "html/table.h"
-#define AUTO INT_MIN
-
-/* Fixed point percentage (a) of an integer (b), to an integer */
-#define FPCT_OF_INT_TOINT(a, b) (FIXTOINT(FDIV((a * b), F_100)))
-
-typedef uint8_t (*css_len_func)(
- const css_computed_style *style,
- css_fixed *length, css_unit *unit);
-typedef uint8_t (*css_border_style_func)(
- const css_computed_style *style);
-typedef uint8_t (*css_border_color_func)(
- const css_computed_style *style,
- css_color *color);
-
/** Array of per-side access functions for computed style margins. */
-static const css_len_func margin_funcs[4] = {
+const css_len_func margin_funcs[4] = {
[TOP] = css_computed_margin_top,
[RIGHT] = css_computed_margin_right,
[BOTTOM] = css_computed_margin_bottom,
@@ -92,7 +79,7 @@ static const css_len_func margin_funcs[4] = {
};
/** Array of per-side access functions for computed style paddings. */
-static const css_len_func padding_funcs[4] = {
+const css_len_func padding_funcs[4] = {
[TOP] = css_computed_padding_top,
[RIGHT] = css_computed_padding_right,
[BOTTOM] = css_computed_padding_bottom,
@@ -100,7 +87,7 @@ static const css_len_func padding_funcs[4] = {
};
/** Array of per-side access functions for computed style border_widths. */
-static const css_len_func border_width_funcs[4] = {
+const css_len_func border_width_funcs[4] = {
[TOP] = css_computed_border_top_width,
[RIGHT] = css_computed_border_right_width,
[BOTTOM] = css_computed_border_bottom_width,
@@ -108,7 +95,7 @@ static const css_len_func border_width_funcs[4] = {
};
/** Array of per-side access functions for computed style border styles. */
-static const css_border_style_func border_style_funcs[4] = {
+const css_border_style_func border_style_funcs[4] = {
[TOP] = css_computed_border_top_style,
[RIGHT] = css_computed_border_right_style,
[BOTTOM] = css_computed_border_bottom_style,
@@ -116,7 +103,7 @@ static const css_border_style_func border_style_funcs[4] = {
};
/** Array of per-side access functions for computed style border colors. */
-static const css_border_color_func border_color_funcs[4] = {
+const css_border_color_func border_color_funcs[4] = {
[TOP] = css_computed_border_top_color,
[RIGHT] = css_computed_border_right_color,
[BOTTOM] = css_computed_border_bottom_color,
@@ -124,10 +111,6 @@ static const css_border_color_func border_color_funcs[4] = {
};
/* forward declaration to break cycles */
-static bool layout_block_context(
- struct box *block,
- int viewport_height,
- html_content *content);
static void layout_minmax_block(
struct box *block,
const struct gui_layout_table *font_func,
@@ -263,75 +246,6 @@ static int layout_text_indent(
/**
- * Determine width of margin, borders, and padding on one side of a box.
- *
- * \param unit_len_ctx CSS length conversion context for document
- * \param style style to measure
- * \param side side of box to measure
- * \param margin whether margin width is required
- * \param border whether border width is required
- * \param padding whether padding width is required
- * \param fixed increased by sum of fixed margin, border, and padding
- * \param frac increased by sum of fractional margin and padding
- */
-static void
-calculate_mbp_width(const css_unit_ctx *unit_len_ctx,
- const css_computed_style *style,
- unsigned int side,
- bool margin,
- bool border,
- bool padding,
- int *fixed,
- float *frac)
-{
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- assert(style);
-
- /* margin */
- if (margin) {
- enum css_margin_e type;
-
- type = margin_funcs[side](style, &value, &unit);
- if (type == CSS_MARGIN_SET) {
- if (unit == CSS_UNIT_PCT) {
- *frac += FIXTOINT(FDIV(value, F_100));
- } else {
- *fixed += FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- }
- }
-
- /* border */
- if (border) {
- if (border_style_funcs[side](style) !=
- CSS_BORDER_STYLE_NONE) {
- border_width_funcs[side](style, &value, &unit);
-
- *fixed += FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- }
-
- /* padding */
- if (padding) {
- padding_funcs[side](style, &value, &unit);
- if (unit == CSS_UNIT_PCT) {
- *frac += FIXTOINT(FDIV(value, F_100));
- } else {
- *fixed += FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- }
-}
-
-
-/**
* Calculate minimum and maximum width of a table.
*
* \param table box of type TABLE
@@ -360,7 +274,7 @@ static void layout_minmax_table(struct box *table,
return;
if (table_calculate_column_types(&content->unit_len_ctx, table) == false) {
- NSLOG(netsurf, WARNING,
+ NSLOG(netsurf, ERROR,
"Could not establish table column types.");
return;
}
@@ -588,11 +502,7 @@ layout_minmax_line(struct box *first,
css_fixed value = 0;
css_unit unit = CSS_UNIT_PX;
- assert(b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK ||
- b->type == BOX_FLOAT_LEFT ||
- b->type == BOX_FLOAT_RIGHT ||
- b->type == BOX_BR || b->type == BOX_TEXT ||
- b->type == BOX_INLINE_END);
+ assert(lh__box_is_inline_content(b));
NSLOG(layout, DEBUG, "%p: min %i, max %i", b, min, max);
@@ -601,13 +511,13 @@ layout_minmax_line(struct box *first,
break;
}
- if (b->type == BOX_FLOAT_LEFT || b->type == BOX_FLOAT_RIGHT) {
+ if (lh__box_is_float_box(b)) {
assert(b->children);
- if (b->children->type == BOX_BLOCK)
- layout_minmax_block(b->children, font_func,
+ if (b->children->type == BOX_TABLE)
+ layout_minmax_table(b->children, font_func,
content);
else
- layout_minmax_table(b->children, font_func,
+ layout_minmax_block(b->children, font_func,
content);
b->min_width = b->children->min_width;
b->max_width = b->children->max_width;
@@ -617,7 +527,7 @@ layout_minmax_line(struct box *first,
continue;
}
- if (b->type == BOX_INLINE_BLOCK) {
+ if (b->type == BOX_INLINE_BLOCK || b->type == BOX_INLINE_FLEX) {
layout_minmax_block(b, font_func, content);
if (min < b->min_width)
min = b->min_width;
@@ -668,8 +578,7 @@ layout_minmax_line(struct box *first,
continue;
}
- if (!b->object && !(b->flags & IFRAME) && !b->gadget &&
- !(b->flags & REPLACE_DIM)) {
+ if (lh__box_is_replace(b) == false) {
/* inline non-replaced, 10.3.1 and 10.6.1 */
bool no_wrap_box;
if (!b->text)
@@ -951,7 +860,6 @@ layout_minmax_inline_container(struct box *inline_container,
inline_container->max_width);
}
-
/**
* Calculate minimum and maximum width of a block.
*
@@ -977,9 +885,13 @@ static void layout_minmax_block(
css_fixed height = 0;
css_unit hunit = CSS_UNIT_PX;
enum css_box_sizing_e bs = CSS_BOX_SIZING_CONTENT_BOX;
+ bool using_min_border_box = false;
+ bool using_max_border_box = false;
bool child_has_height = false;
assert(block->type == BOX_BLOCK ||
+ block->type == BOX_FLEX ||
+ block->type == BOX_INLINE_FLEX ||
block->type == BOX_INLINE_BLOCK ||
block->type == BOX_TABLE_CELL);
@@ -994,9 +906,9 @@ static void layout_minmax_block(
}
/* set whether the minimum width is of any interest for this box */
- if (((block->parent && (block->parent->type == BOX_FLOAT_LEFT ||
- block->parent->type == BOX_FLOAT_RIGHT)) ||
- block->type == BOX_INLINE_BLOCK) &&
+ if (((block->parent && lh__box_is_float_box(block->parent)) ||
+ block->type == BOX_INLINE_BLOCK ||
+ block->type == BOX_INLINE_FLEX) &&
wtype != CSS_WIDTH_SET) {
/* box shrinks to fit; need minimum width */
block->flags |= NEED_MIN;
@@ -1007,6 +919,9 @@ static void layout_minmax_block(
wtype != CSS_WIDTH_SET) {
/* box inside shrink-to-fit context; need minimum width */
block->flags |= NEED_MIN;
+ } else if (block->parent && (block->parent->type == BOX_FLEX)) {
+ /* box is flex item */
+ block->flags |= NEED_MIN;
}
if (block->gadget && (block->gadget->type == GADGET_TEXTBOX ||
@@ -1056,6 +971,7 @@ static void layout_minmax_block(
/* recurse through children */
for (child = block->children; child; child = child->next) {
switch (child->type) {
+ case BOX_FLEX:
case BOX_BLOCK:
layout_minmax_block(child, font_func,
content);
@@ -1097,10 +1013,24 @@ static void layout_minmax_block(
continue;
}
- if (min < child->min_width)
- min = child->min_width;
- if (max < child->max_width)
- max = child->max_width;
+ if (lh__box_is_flex_container(block) &&
+ lh__flex_main_is_horizontal(block)) {
+ if (block->style != NULL &&
+ css_computed_flex_wrap(block->style) ==
+ CSS_FLEX_WRAP_NOWRAP) {
+ min += child->min_width;
+ } else {
+ if (min < child->min_width)
+ min = child->min_width;
+ }
+ max += child->max_width;
+
+ } else {
+ if (min < child->min_width)
+ min = child->min_width;
+ if (max < child->max_width)
+ max = child->max_width;
+ }
if (child_has_height)
block->flags |= HAS_HEIGHT;
@@ -1113,23 +1043,40 @@ static void layout_minmax_block(
}
/* fixed width takes priority */
- if (block->type != BOX_TABLE_CELL && wtype == CSS_WIDTH_SET &&
- wunit != CSS_UNIT_PCT) {
- min = max = FIXTOINT(css_unit_len2device_px(block->style,
- &content->unit_len_ctx, width, wunit));
- if (bs == CSS_BOX_SIZING_BORDER_BOX) {
- int border_box_fixed = 0;
- float border_box_frac = 0;
- calculate_mbp_width(&content->unit_len_ctx,
- block->style, LEFT,
- false, true, true,
- &border_box_fixed, &border_box_frac);
- calculate_mbp_width(&content->unit_len_ctx,
- block->style, RIGHT,
- false, true, true,
- &border_box_fixed, &border_box_frac);
- if (min < border_box_fixed) {
- min = max = border_box_fixed;
+ if (block->type != BOX_TABLE_CELL && !lh__box_is_flex_item(block)) {
+ bool border_box = bs == CSS_BOX_SIZING_BORDER_BOX;
+ enum css_max_width_e max_type;
+ enum css_min_width_e min_type;
+ css_unit unit = CSS_UNIT_PX;
+ css_fixed value = 0;
+
+ if (wtype == CSS_WIDTH_SET && wunit != CSS_UNIT_PCT) {
+ min = max = FIXTOINT(
+ css_unit_len2device_px(block->style,
+ &content->unit_len_ctx, width, wunit));
+ using_max_border_box = border_box;
+ using_min_border_box = border_box;
+ }
+
+ min_type = css_computed_min_width(block->style, &value, &unit);
+ if (min_type == CSS_MIN_WIDTH_SET && unit != CSS_UNIT_PCT) {
+ int val = FIXTOINT(css_unit_len2device_px(block->style,
+ &content->unit_len_ctx, value, unit));
+
+ if (min < val) {
+ min = val;
+ using_min_border_box = border_box;
+ }
+ }
+
+ max_type = css_computed_max_width(block->style, &value, &unit);
+ if (max_type == CSS_MAX_WIDTH_SET && unit != CSS_UNIT_PCT) {
+ int val = FIXTOINT(css_unit_len2device_px(block->style,
+ &content->unit_len_ctx, value, unit));
+
+ if (val >= 0 && max > val) {
+ max = val;
+ using_max_border_box = border_box;
}
}
}
@@ -1143,22 +1090,30 @@ static void layout_minmax_block(
/* add margins, border, padding to min, max widths */
/* Note: we don't know available width here so percentage margin
* and paddings are wrong. */
- if (bs == CSS_BOX_SIZING_BORDER_BOX && wtype == CSS_WIDTH_SET) {
- /* Border and padding included in width, so just get margin */
- calculate_mbp_width(&content->unit_len_ctx,
- block->style, LEFT, true, false, false,
- &extra_fixed, &extra_frac);
- calculate_mbp_width(&content->unit_len_ctx,
- block->style, RIGHT, true, false, false,
- &extra_fixed, &extra_frac);
- } else {
- calculate_mbp_width(&content->unit_len_ctx,
- block->style, LEFT, true, true, true,
- &extra_fixed, &extra_frac);
- calculate_mbp_width(&content->unit_len_ctx,
- block->style, RIGHT, true, true, true,
- &extra_fixed, &extra_frac);
+ calculate_mbp_width(&content->unit_len_ctx, block->style, LEFT,
+ false, true, true, &extra_fixed, &extra_frac);
+ calculate_mbp_width(&content->unit_len_ctx, block->style, RIGHT,
+ false, true, true, &extra_fixed, &extra_frac);
+
+ if (using_max_border_box) {
+ max -= extra_fixed;
+ max = max(max, 0);
+ }
+
+ if (using_min_border_box) {
+ min -= extra_fixed;
+ min = max(min, 0);
+ }
+
+ if (max < min) {
+ min = max;
}
+
+ calculate_mbp_width(&content->unit_len_ctx, block->style, LEFT,
+ true, false, false, &extra_fixed, &extra_frac);
+ calculate_mbp_width(&content->unit_len_ctx, block->style, RIGHT,
+ true, false, false, &extra_fixed, &extra_frac);
+
if (extra_fixed < 0)
extra_fixed = 0;
if (extra_frac < 0)
@@ -1177,376 +1132,8 @@ static void layout_minmax_block(
block->max_width = (max + extra_fixed) / (1.0 - extra_frac);
}
- assert(0 <= block->min_width && block->min_width <= block->max_width);
-}
-
-
-/**
- * Adjust a specified width or height for the box-sizing property.
- *
- * This turns the specified dimension into a content-box dimension.
- *
- * \param unit_len_ctx Length conversion context
- * \param box gadget to adjust dimensions of
- * \param available_width width of containing block
- * \param setwidth set true if the dimension to be tweaked is a width,
- * else set false for a height
- * \param dimension current value for given width/height dimension.
- * updated to new value after consideration of
- * gadget properties.
- */
-static void layout_handle_box_sizing(
- const css_unit_ctx *unit_len_ctx,
- struct box *box,
- int available_width,
- bool setwidth,
- int *dimension)
-{
- enum css_box_sizing_e bs;
-
- assert(box && box->style);
-
- bs = css_computed_box_sizing(box->style);
-
- if (bs == CSS_BOX_SIZING_BORDER_BOX) {
- int orig = *dimension;
- int fixed = 0;
- float frac = 0;
-
- calculate_mbp_width(unit_len_ctx, box->style,
- setwidth ? LEFT : TOP,
- false, true, true, &fixed, &frac);
- calculate_mbp_width(unit_len_ctx, box->style,
- setwidth ? RIGHT : BOTTOM,
- false, true, true, &fixed, &frac);
- orig -= frac * available_width + fixed;
- *dimension = orig > 0 ? orig : 0;
- }
-}
-
-
-/**
- * Calculate width, height, and thickness of margins, paddings, and borders.
- *
- * \param unit_len_ctx Length conversion context
- * \param available_width width of containing block
- * \param viewport_height height of viewport in pixels or -ve if unknown
- * \param box current box
- * \param style style giving width, height, margins, paddings,
- * and borders
- * \param width updated to width, may be NULL
- * \param height updated to height, may be NULL
- * \param max_width updated to max-width, may be NULL
- * \param min_width updated to min-width, may be NULL
- * \param max_height updated to max-height, may be NULL
- * \param min_height updated to min-height, may be NULL
- * \param margin filled with margins, may be NULL
- * \param padding filled with paddings, may be NULL
- * \param border filled with border widths, may be NULL
- */
-static void
-layout_find_dimensions(const css_unit_ctx *unit_len_ctx,
- int available_width,
- int viewport_height,
- struct box *box,
- const css_computed_style *style,
- int *width,
- int *height,
- int *max_width,
- int *min_width,
- int *max_height,
- int *min_height,
- int margin[4],
- int padding[4],
- struct box_border border[4])
-{
- struct box *containing_block = NULL;
- unsigned int i;
-
- if (width) {
- enum css_width_e wtype;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- wtype = css_computed_width(style, &value, &unit);
-
- if (wtype == CSS_WIDTH_SET) {
- if (unit == CSS_UNIT_PCT) {
- *width = FPCT_OF_INT_TOINT(
- value, available_width);
- } else {
- *width = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- *width = AUTO;
- }
-
- if (*width != AUTO) {
- layout_handle_box_sizing(unit_len_ctx, box, available_width,
- true, width);
- }
- }
-
- if (height) {
- enum css_height_e htype;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- htype = css_computed_height(style, &value, &unit);
-
- if (htype == CSS_HEIGHT_SET) {
- if (unit == CSS_UNIT_PCT) {
- enum css_height_e cbhtype;
-
- if (css_computed_position(box->style) ==
- CSS_POSITION_ABSOLUTE &&
- box->parent) {
- /* Box is absolutely positioned */
- assert(box->float_container);
- containing_block = box->float_container;
- } else if (box->float_container &&
- css_computed_position(box->style) !=
- CSS_POSITION_ABSOLUTE &&
- (css_computed_float(box->style) ==
- CSS_FLOAT_LEFT ||
- css_computed_float(box->style) ==
- CSS_FLOAT_RIGHT)) {
- /* Box is a float */
- assert(box->parent &&
- box->parent->parent &&
- box->parent->parent->parent);
-
- containing_block =
- box->parent->parent->parent;
- } else if (box->parent && box->parent->type !=
- BOX_INLINE_CONTAINER) {
- /* Box is a block level element */
- containing_block = box->parent;
- } else if (box->parent && box->parent->type ==
- BOX_INLINE_CONTAINER) {
- /* Box is an inline block */
- assert(box->parent->parent);
- containing_block = box->parent->parent;
- }
-
- if (containing_block) {
- css_fixed f = 0;
- css_unit u = CSS_UNIT_PX;
-
- cbhtype = css_computed_height(
- containing_block->style,
- &f, &u);
- }
-
- if (containing_block &&
- containing_block->height != AUTO &&
- (css_computed_position(box->style) ==
- CSS_POSITION_ABSOLUTE ||
- cbhtype == CSS_HEIGHT_SET)) {
- /* Box is absolutely positioned or its
- * containing block has a valid
- * specified height.
- * (CSS 2.1 Section 10.5) */
- *height = FPCT_OF_INT_TOINT(value,
- containing_block->height);
- } else if ((!box->parent ||
- !box->parent->parent) &&
- viewport_height >= 0) {
- /* If root element or it's child
- * (HTML or BODY) */
- *height = FPCT_OF_INT_TOINT(value,
- viewport_height);
- } else {
- /* precentage height not permissible
- * treat height as auto */
- *height = AUTO;
- }
- } else {
- *height = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- *height = AUTO;
- }
-
- if (*height != AUTO) {
- layout_handle_box_sizing(unit_len_ctx, box, available_width,
- false, height);
- }
- }
-
- if (max_width) {
- enum css_max_width_e type;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- type = css_computed_max_width(style, &value, &unit);
-
- if (type == CSS_MAX_WIDTH_SET) {
- if (unit == CSS_UNIT_PCT) {
- *max_width = FPCT_OF_INT_TOINT(value,
- available_width);
- } else {
- *max_width = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- /* Inadmissible */
- *max_width = -1;
- }
-
- if (*max_width != -1) {
- layout_handle_box_sizing(unit_len_ctx, box, available_width,
- true, max_width);
- }
- }
-
- if (min_width) {
- enum css_min_width_e type;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- type = ns_computed_min_width(style, &value, &unit);
-
- if (type == CSS_MIN_WIDTH_SET) {
- if (unit == CSS_UNIT_PCT) {
- *min_width = FPCT_OF_INT_TOINT(value,
- available_width);
- } else {
- *min_width = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- /* Inadmissible */
- *min_width = 0;
- }
-
- if (*min_width != 0) {
- layout_handle_box_sizing(unit_len_ctx, box, available_width,
- true, min_width);
- }
- }
-
- if (max_height) {
- enum css_max_height_e type;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- type = css_computed_max_height(style, &value, &unit);
-
- if (type == CSS_MAX_HEIGHT_SET) {
- if (unit == CSS_UNIT_PCT) {
- /* TODO: handle percentage */
- *max_height = -1;
- } else {
- *max_height = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- /* Inadmissible */
- *max_height = -1;
- }
- }
-
- if (min_height) {
- enum css_min_height_e type;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- type = ns_computed_min_height(style, &value, &unit);
-
- if (type == CSS_MIN_HEIGHT_SET) {
- if (unit == CSS_UNIT_PCT) {
- /* TODO: handle percentage */
- *min_height = 0;
- } else {
- *min_height = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- /* Inadmissible */
- *min_height = 0;
- }
- }
-
- for (i = 0; i != 4; i++) {
- if (margin) {
- enum css_margin_e type = CSS_MARGIN_AUTO;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- type = margin_funcs[i](style, &value, &unit);
-
- if (type == CSS_MARGIN_SET) {
- if (unit == CSS_UNIT_PCT) {
- margin[i] = FPCT_OF_INT_TOINT(value,
- available_width);
- } else {
- margin[i] = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- } else {
- margin[i] = AUTO;
- }
- }
-
- if (padding) {
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- padding_funcs[i](style, &value, &unit);
-
- if (unit == CSS_UNIT_PCT) {
- padding[i] = FPCT_OF_INT_TOINT(value,
- available_width);
- } else {
- padding[i] = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
- }
- }
-
- /* Table cell borders are populated in table.c */
- if (border && box->type != BOX_TABLE_CELL) {
- enum css_border_style_e bstyle = CSS_BORDER_STYLE_NONE;
- css_color color = 0;
- css_fixed value = 0;
- css_unit unit = CSS_UNIT_PX;
-
- border_width_funcs[i](style, &value, &unit);
- bstyle = border_style_funcs[i](style);
- border_color_funcs[i](style, &color);
-
- border[i].style = bstyle;
- border[i].c = color;
-
- if (bstyle == CSS_BORDER_STYLE_HIDDEN ||
- bstyle == CSS_BORDER_STYLE_NONE)
- /* spec unclear: following Mozilla */
- border[i].width = 0;
- else
- border[i].width = FIXTOINT(css_unit_len2device_px(
- style, unit_len_ctx,
- value, unit));
-
- /* Special case for border-collapse: make all borders
- * on table/table-row-group/table-row zero width. */
- if (css_computed_border_collapse(style) ==
- CSS_BORDER_COLLAPSE_COLLAPSE &&
- (box->type == BOX_TABLE ||
- box->type == BOX_TABLE_ROW_GROUP ||
- box->type == BOX_TABLE_ROW))
- border[i].width = 0;
- }
- }
+ assert(0 <= block->min_width);
+ assert(block->min_width <= block->max_width);
}
@@ -2013,15 +1600,10 @@ static void layout_move_children(struct box *box, int x, int y)
}
-/**
- * Layout a table.
- *
- * \param table table to layout
- * \param available_width width of containing block
- * \param content memory pool for any new boxes
- * \return true on success, false on memory exhaustion
- */
-static bool layout_table(struct box *table, int available_width,
+/* Documented in layout_internal.h */
+bool layout_table(
+ struct box *table,
+ int available_width,
html_content *content)
{
unsigned int columns = table->columns; /* total columns */
@@ -2713,7 +2295,9 @@ static bool layout_block_object(struct box *block)
{
assert(block);
assert(block->type == BOX_BLOCK ||
+ block->type == BOX_FLEX ||
block->type == BOX_INLINE_BLOCK ||
+ block->type == BOX_INLINE_FLEX ||
block->type == BOX_TABLE ||
block->type == BOX_TABLE_CELL);
assert(block->object);
@@ -2721,7 +2305,7 @@ static bool layout_block_object(struct box *block)
NSLOG(layout, DEBUG, "block %p, object %p, width %i", block,
hlcache_handle_get_url(block->object), block->width);
- if (content_get_type(block->object) == CONTENT_HTML) {
+ if (content_can_reformat(block->object)) {
content_reformat(block->object, false, block->width, 1);
} else {
/* Non-HTML objects */
@@ -3007,12 +2591,20 @@ layout_float_find_dimensions(
*/
static bool layout_float(struct box *b, int width, html_content *content)
{
- assert(b->type == BOX_TABLE || b->type == BOX_BLOCK ||
- b->type == BOX_INLINE_BLOCK);
+ assert(b->type == BOX_TABLE ||
+ b->type == BOX_BLOCK ||
+ b->type == BOX_INLINE_BLOCK ||
+ b->type == BOX_FLEX ||
+ b->type == BOX_INLINE_FLEX);
layout_float_find_dimensions(&content->unit_len_ctx, width, b->style, b);
- if (b->type == BOX_TABLE) {
- if (!layout_table(b, width, content))
- return false;
+ if (b->type == BOX_TABLE || b->type == BOX_INLINE_FLEX) {
+ if (b->type == BOX_TABLE) {
+ if (!layout_table(b, width, content))
+ return false;
+ } else {
+ if (!layout_flex(b, width, content))
+ return false;
+ }
if (b->margin[LEFT] == AUTO)
b->margin[LEFT] = 0;
if (b->margin[RIGHT] == AUTO)
@@ -3021,8 +2613,9 @@ static bool layout_float(struct box *b, int width, html_content *content)
b->margin[TOP] = 0;
if (b->margin[BOTTOM] == AUTO)
b->margin[BOTTOM] = 0;
- } else
+ } else {
return layout_block_context(b, -1, content);
+ }
return true;
}
@@ -3209,20 +2802,14 @@ layout_line(struct box *first,
for (x = 0, b = first; x <= x1 - x0 && b != 0; b = b->next) {
int min_width, max_width, min_height, max_height;
- assert(b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK ||
- b->type == BOX_FLOAT_LEFT ||
- b->type == BOX_FLOAT_RIGHT ||
- b->type == BOX_BR || b->type == BOX_TEXT ||
- b->type == BOX_INLINE_END);
-
+ assert(lh__box_is_inline_content(b));
NSLOG(layout, DEBUG, "pass 1: b %p, x %i", b, x);
-
if (b->type == BOX_BR)
break;
- if (b->type == BOX_FLOAT_LEFT || b->type == BOX_FLOAT_RIGHT)
+ if (lh__box_is_float_box(b))
continue;
if (b->type == BOX_INLINE_BLOCK &&
(css_computed_position(b->style) ==
@@ -3236,7 +2823,8 @@ layout_line(struct box *first,
x += space_after;
- if (b->type == BOX_INLINE_BLOCK) {
+ if (b->type == BOX_INLINE_BLOCK ||
+ b->type == BOX_INLINE_FLEX) {
if (b->max_width != UNKNOWN_WIDTH)
if (!layout_float(b, *width, content))
return false;
@@ -3288,8 +2876,7 @@ layout_line(struct box *first,
continue;
}
- if (!b->object && !(b->flags & IFRAME) && !b->gadget &&
- !(b->flags & REPLACE_DIM)) {
+ if (lh__box_is_replace(b) == false) {
/* inline non-replaced, 10.3.1 and 10.6.1 */
b->height = line_height(&content->unit_len_ctx,
b->style ? b->style :
@@ -3397,7 +2984,7 @@ layout_line(struct box *first,
}
/* Reformat object to new box size */
- if (b->object && content_get_type(b->object) == CONTENT_HTML &&
+ if (b->object && content_can_reformat(b->object) &&
b->width !=
content_get_available_width(b->object)) {
css_fixed value = 0;
@@ -3449,10 +3036,7 @@ layout_line(struct box *first,
CSS_POSITION_FIXED)) {
b->x = x + space_after;
- } else if (b->type == BOX_INLINE ||
- b->type == BOX_INLINE_BLOCK ||
- b->type == BOX_TEXT ||
- b->type == BOX_INLINE_END) {
+ } else if (lh__box_is_inline_flow(b)) {
assert(b->width != UNKNOWN_WIDTH);
x_previous = x;
@@ -3460,7 +3044,8 @@ layout_line(struct box *first,
b->x = x;
if ((b->type == BOX_INLINE && !b->inline_end) ||
- b->type == BOX_INLINE_BLOCK) {
+ b->type == BOX_INLINE_BLOCK ||
+ b->type == BOX_INLINE_FLEX) {
b->x += b->margin[LEFT] + b->border[LEFT].width;
x = b->x + b->padding[LEFT] + b->width +
b->padding[RIGHT] +
@@ -3791,9 +3376,7 @@ layout_line(struct box *first,
d->y = *y;
continue;
} else if ((d->type == BOX_INLINE &&
- ((d->object || d->gadget) == false) &&
- !(d->flags & IFRAME) &&
- !(d->flags & REPLACE_DIM)) ||
+ lh__box_is_replace(d) == false) ||
d->type == BOX_BR ||
d->type == BOX_TEXT ||
d->type == BOX_INLINE_END) {
@@ -3914,8 +3497,7 @@ static bool layout_inline_container(struct box *inline_container, int width,
whitespace == CSS_WHITE_SPACE_PRE_WRAP);
}
- if ((!c->object && !(c->flags & REPLACE_DIM) &&
- !(c->flags & IFRAME) &&
+ if ((lh__box_is_object(c) == false &&
c->text && (c->length || is_pre)) ||
c->type == BOX_BR)
has_text_children = true;
@@ -3945,21 +3527,11 @@ static bool layout_inline_container(struct box *inline_container, int width,
}
-/**
- * Layout a block formatting context.
- *
- * \param block BLOCK, INLINE_BLOCK, or TABLE_CELL to layout
- * \param viewport_height Height of viewport in pixels or -ve if unknown
- * \param content Memory pool for any new boxes
- * \return true on success, false on memory exhaustion
- *
- * This function carries out layout of a block and its children, as described
- * in CSS 2.1 9.4.1.
- */
-static bool
-layout_block_context(struct box *block,
- int viewport_height,
- html_content *content)
+/* Documented in layout_intertnal.h */
+bool layout_block_context(
+ struct box *block,
+ int viewport_height,
+ html_content *content)
{
struct box *box;
int cx, cy; /**< current coordinates */
@@ -3974,7 +3546,9 @@ layout_block_context(struct box *block,
assert(block->type == BOX_BLOCK ||
block->type == BOX_INLINE_BLOCK ||
- block->type == BOX_TABLE_CELL);
+ block->type == BOX_TABLE_CELL ||
+ block->type == BOX_FLEX ||
+ block->type == BOX_INLINE_FLEX);
assert(block->width != UNKNOWN_WIDTH);
assert(block->width != AUTO);
@@ -4043,7 +3617,9 @@ layout_block_context(struct box *block,
enum css_overflow_e overflow_x = CSS_OVERFLOW_VISIBLE;
enum css_overflow_e overflow_y = CSS_OVERFLOW_VISIBLE;
- assert(box->type == BOX_BLOCK || box->type == BOX_TABLE ||
+ assert(box->type == BOX_BLOCK ||
+ box->type == BOX_FLEX ||
+ box->type == BOX_TABLE ||
box->type == BOX_INLINE_CONTAINER);
/* Tables are laid out before being positioned, because the
@@ -4094,9 +3670,10 @@ layout_block_context(struct box *block,
* left and right margins to avoid any floats. */
lm = rm = 0;
- if (box->type == BOX_BLOCK || box->flags & IFRAME) {
- if (!box->object && !(box->flags & IFRAME) &&
- !(box->flags & REPLACE_DIM) &&
+ if (box->type == BOX_FLEX ||
+ box->type == BOX_BLOCK ||
+ box->flags & IFRAME) {
+ if (lh__box_is_object(box) == false &&
box->style &&
(overflow_x != CSS_OVERFLOW_VISIBLE ||
overflow_y != CSS_OVERFLOW_VISIBLE)) {
@@ -4181,6 +3758,7 @@ layout_block_context(struct box *block,
/* Vertical margin */
if (((box->type == BOX_BLOCK && (box->flags & HAS_HEIGHT)) ||
+ box->type == BOX_FLEX ||
box->type == BOX_TABLE ||
(box->type == BOX_INLINE_CONTAINER &&
!box_is_first_child(box)) ||
@@ -4205,11 +3783,19 @@ layout_block_context(struct box *block,
/* Unless the box has an overflow style of visible, the box
* establishes a new block context. */
- if (box->type == BOX_BLOCK && box->style &&
- (overflow_x != CSS_OVERFLOW_VISIBLE ||
- overflow_y != CSS_OVERFLOW_VISIBLE)) {
+ if (box->type == BOX_FLEX ||
+ (box->type == BOX_BLOCK && box->style &&
+ (overflow_x != CSS_OVERFLOW_VISIBLE ||
+ overflow_y != CSS_OVERFLOW_VISIBLE))) {
- layout_block_context(box, viewport_height, content);
+ if (box->type == BOX_FLEX) {
+ if (!layout_flex(box, box->width, content)) {
+ return false;
+ }
+ } else {
+ layout_block_context(box,
+ viewport_height, content);
+ }
cy += box->padding[TOP];
@@ -4230,7 +3816,8 @@ layout_block_context(struct box *block,
goto advance_to_next_box;
}
- NSLOG(layout, DEBUG, "box %p, cx %i, cy %i", box, cx, cy);
+ NSLOG(layout, DEBUG, "box %p, cx %i, cy %i, width %i",
+ box, cx, cy, box->width);
/* Layout (except tables). */
if (box->object) {
@@ -4607,7 +4194,7 @@ layout__get_ol_reversed(dom_node *ol_node)
*/
static bool
layout__get_list_item_count(
- dom_node *list_owner, int *count_out)
+ dom_node *list_owner, dom_long *count_out)
{
dom_html_element_type tag_type;
dom_exception exc;
@@ -4679,7 +4266,7 @@ layout__ordered_list_count(
dom_exception exc;
dom_node *child;
int step = 1;
- int next;
+ dom_long next;
if (box->node == NULL) {
return;
@@ -4914,9 +4501,9 @@ layout_compute_offsets(const css_unit_ctx *unit_len_ctx,
css_fixed value = 0;
css_unit unit = CSS_UNIT_PX;
- assert(containing_block->width != UNKNOWN_WIDTH &&
- containing_block->width != AUTO &&
- containing_block->height != AUTO);
+ assert(containing_block->width != UNKNOWN_WIDTH);
+ assert(containing_block->width != AUTO);
+ assert(containing_block->height != AUTO);
/* left */
type = css_computed_left(box->style, &value, &unit);
@@ -5006,7 +4593,9 @@ layout_absolute(struct box *box,
int space;
assert(box->type == BOX_BLOCK || box->type == BOX_TABLE ||
- box->type == BOX_INLINE_BLOCK);
+ box->type == BOX_INLINE_BLOCK ||
+ box->type == BOX_FLEX ||
+ box->type == BOX_INLINE_FLEX);
/* The static position is where the box would be if it was not
* absolutely positioned. The x and y are filled in by
@@ -5024,8 +4613,6 @@ layout_absolute(struct box *box,
containing_block->padding[RIGHT];
containing_block->height += containing_block->padding[TOP] +
containing_block->padding[BOTTOM];
- } else {
- /** \todo inline containers */
}
layout_compute_offsets(&content->unit_len_ctx, box, containing_block,
@@ -5243,6 +4830,13 @@ layout_absolute(struct box *box,
box->float_container = NULL;
layout_solve_width(box, box->parent->width, box->width, 0, 0,
-1, -1);
+ } else if (box->type == BOX_FLEX || box->type == BOX_INLINE_FLEX) {
+ /* layout_table also expects the containing block to be
+ * stored in the float_container field */
+ box->float_container = containing_block;
+ if (!layout_flex(box, width, content))
+ return false;
+ box->float_container = NULL;
}
/* 10.6.4 */
@@ -5379,7 +4973,9 @@ layout_position_absolute(struct box *box,
for (c = box->children; c; c = c->next) {
if ((c->type == BOX_BLOCK || c->type == BOX_TABLE ||
- c->type == BOX_INLINE_BLOCK) &&
+ c->type == BOX_INLINE_BLOCK ||
+ c->type == BOX_FLEX ||
+ c->type == BOX_INLINE_FLEX) &&
(css_computed_position(c->style) ==
CSS_POSITION_ABSOLUTE ||
css_computed_position(c->style) ==
diff --git a/content/handlers/html/layout_flex.c b/content/handlers/html/layout_flex.c
new file mode 100644
index 000000000..bde3c5bd1
--- /dev/null
+++ b/content/handlers/html/layout_flex.c
@@ -0,0 +1,1117 @@
+/*
+ * Copyright 2022 Michael Drake <tlsa@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * HTML layout implementation: display: flex.
+ *
+ * Layout is carried out in two stages:
+ *
+ * 1. + calculation of minimum / maximum box widths, and
+ * + determination of whether block level boxes will have >zero height
+ *
+ * 2. + layout (position and dimensions)
+ *
+ * In most cases the functions for the two stages are a corresponding pair
+ * layout_minmax_X() and layout_X().
+ */
+
+#include <string.h>
+
+#include "utils/log.h"
+#include "utils/utils.h"
+
+#include "html/box.h"
+#include "html/html.h"
+#include "html/private.h"
+#include "html/box_inspect.h"
+#include "html/layout_internal.h"
+
+/**
+ * Flex item data
+ */
+struct flex_item_data {
+ enum css_flex_basis_e basis;
+ css_fixed basis_length;
+ css_unit basis_unit;
+ struct box *box;
+
+ css_fixed shrink;
+ css_fixed grow;
+
+ int min_main;
+ int max_main;
+ int min_cross;
+ int max_cross;
+
+ int target_main_size;
+ int base_size;
+ int main_size;
+ size_t line;
+
+ bool freeze;
+ bool min_violation;
+ bool max_violation;
+};
+
+/**
+ * Flex line data
+ */
+struct flex_line_data {
+ int main_size;
+ int cross_size;
+
+ int used_main_size;
+ int main_auto_margin_count;
+
+ int pos;
+
+ size_t first;
+ size_t count;
+ size_t frozen;
+};
+
+/**
+ * Flex layout context
+ */
+struct flex_ctx {
+ html_content *content;
+ const struct box *flex;
+ const css_unit_ctx *unit_len_ctx;
+
+ int main_size;
+ int cross_size;
+
+ int available_main;
+ int available_cross;
+
+ bool horizontal;
+ bool main_reversed;
+ enum css_flex_wrap_e wrap;
+
+ struct flex_items {
+ size_t count;
+ struct flex_item_data *data;
+ } item;
+
+ struct flex_lines {
+ size_t count;
+ size_t alloc;
+ struct flex_line_data *data;
+ } line;
+};
+
+/**
+ * Destroy a flex layout context
+ *
+ * \param[in] ctx Flex layout context
+ */
+static void layout_flex_ctx__destroy(struct flex_ctx *ctx)
+{
+ if (ctx != NULL) {
+ free(ctx->item.data);
+ free(ctx->line.data);
+ free(ctx);
+ }
+}
+
+/**
+ * Create a flex layout context
+ *
+ * \param[in] content HTML content containing flex box
+ * \param[in] flex Box to create layout context for
+ * \return flex layout context or NULL on error
+ */
+static struct flex_ctx *layout_flex_ctx__create(
+ html_content *content,
+ const struct box *flex)
+{
+ struct flex_ctx *ctx;
+
+ ctx = calloc(1, sizeof(*ctx));
+ if (ctx == NULL) {
+ return NULL;
+ }
+ ctx->line.alloc = 1;
+
+ ctx->item.count = box_count_children(flex);
+ ctx->item.data = calloc(ctx->item.count, sizeof(*ctx->item.data));
+ if (ctx->item.data == NULL) {
+ layout_flex_ctx__destroy(ctx);
+ return NULL;
+ }
+
+ ctx->line.alloc = 1;
+ ctx->line.data = calloc(ctx->line.alloc, sizeof(*ctx->line.data));
+ if (ctx->line.data == NULL) {
+ layout_flex_ctx__destroy(ctx);
+ return NULL;
+ }
+
+ ctx->flex = flex;
+ ctx->content = content;
+ ctx->unit_len_ctx = &content->unit_len_ctx;
+
+ ctx->wrap = css_computed_flex_wrap(flex->style);
+ ctx->horizontal = lh__flex_main_is_horizontal(flex);
+ ctx->main_reversed = lh__flex_direction_reversed(flex);
+
+ return ctx;
+}
+
+/**
+ * Find box side representing the start of flex container in main direction.
+ *
+ * \param[in] ctx Flex layout context.
+ * \return the start side.
+ */
+static enum box_side layout_flex__main_start_side(
+ const struct flex_ctx *ctx)
+{
+ if (ctx->horizontal) {
+ return (ctx->main_reversed) ? RIGHT : LEFT;
+ } else {
+ return (ctx->main_reversed) ? BOTTOM : TOP;
+ }
+}
+
+/**
+ * Find box side representing the end of flex container in main direction.
+ *
+ * \param[in] ctx Flex layout context.
+ * \return the end side.
+ */
+static enum box_side layout_flex__main_end_side(
+ const struct flex_ctx *ctx)
+{
+ if (ctx->horizontal) {
+ return (ctx->main_reversed) ? LEFT : RIGHT;
+ } else {
+ return (ctx->main_reversed) ? TOP : BOTTOM;
+ }
+}
+
+/**
+ * Perform layout on a flex item
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] item Item to lay out
+ * \param[in] available_width Available width for item in pixels
+ * \return true on success false on failure
+ */
+static bool layout_flex_item(
+ const struct flex_ctx *ctx,
+ const struct flex_item_data *item,
+ int available_width)
+{
+ bool success;
+ struct box *b = item->box;
+
+ switch (b->type) {
+ case BOX_BLOCK:
+ success = layout_block_context(b, -1, ctx->content);
+ break;
+ case BOX_TABLE:
+ b->float_container = b->parent;
+ success = layout_table(b, available_width, ctx->content);
+ b->float_container = NULL;
+ break;
+ case BOX_FLEX:
+ b->float_container = b->parent;
+ success = layout_flex(b, available_width, ctx->content);
+ b->float_container = NULL;
+ break;
+ default:
+ assert(0 && "Bad flex item back type");
+ success = false;
+ break;
+ }
+
+ if (!success) {
+ NSLOG(flex, ERROR, "box %p: layout failed", b);
+ }
+
+ return success;
+}
+
+/**
+ * Calculate an item's base and target main sizes.
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] item Item to get sizes of
+ * \param[in] available_width Available width in pixels
+ * \return true on success false on failure
+ */
+static inline bool layout_flex__base_and_main_sizes(
+ const struct flex_ctx *ctx,
+ struct flex_item_data *item,
+ int available_width)
+{
+ struct box *b = item->box;
+ int content_min_width = b->min_width;
+ int content_max_width = b->max_width;
+ int delta_outer_main = lh__delta_outer_main(ctx->flex, b);
+
+ NSLOG(flex, DEEPDEBUG, "box %p: delta_outer_main: %i",
+ b, delta_outer_main);
+
+ if (item->basis == CSS_FLEX_BASIS_SET) {
+ if (item->basis_unit == CSS_UNIT_PCT) {
+ item->base_size = FPCT_OF_INT_TOINT(
+ item->basis_length,
+ available_width);
+ } else {
+ item->base_size = FIXTOINT(css_unit_len2device_px(
+ b->style, ctx->unit_len_ctx,
+ item->basis_length,
+ item->basis_unit));
+ }
+
+ } else if (item->basis == CSS_FLEX_BASIS_AUTO) {
+ item->base_size = ctx->horizontal ? b->width : b->height;
+ } else {
+ item->base_size = AUTO;
+ }
+
+ if (ctx->horizontal == false) {
+ if (b->width == AUTO) {
+ b->width = min(max(content_min_width, available_width),
+ content_max_width);
+ b->width -= lh__delta_outer_width(b);
+ }
+
+ if (!layout_flex_item(ctx, item, b->width)) {
+ return false;
+ }
+ }
+
+ if (item->base_size == AUTO) {
+ if (ctx->horizontal == false) {
+ item->base_size = b->height;
+ } else {
+ item->base_size = content_max_width - delta_outer_main;
+ }
+ }
+
+ item->base_size += delta_outer_main;
+
+ if (ctx->horizontal) {
+ item->base_size = min(item->base_size, available_width);
+ item->base_size = max(item->base_size, content_min_width);
+ }
+
+ item->target_main_size = item->base_size;
+ item->main_size = item->base_size;
+
+ if (item->max_main > 0 &&
+ item->main_size > item->max_main + delta_outer_main) {
+ item->main_size = item->max_main + delta_outer_main;
+ }
+
+ if (item->main_size < item->min_main + delta_outer_main) {
+ item->main_size = item->min_main + delta_outer_main;
+ }
+
+ NSLOG(flex, DEEPDEBUG, "flex-item box: %p: base_size: %i, main_size %i",
+ b, item->base_size, item->main_size);
+
+ return true;
+}
+
+/**
+ * Fill out all item's data in a flex container.
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] flex Flex box
+ * \param[in] available_width Available width in pixels
+ */
+static void layout_flex_ctx__populate_item_data(
+ const struct flex_ctx *ctx,
+ const struct box *flex,
+ int available_width)
+{
+ size_t i = 0;
+ bool horizontal = ctx->horizontal;
+
+ for (struct box *b = flex->children; b != NULL; b = b->next) {
+ struct flex_item_data *item = &ctx->item.data[i++];
+
+ b->float_container = b->parent;
+ layout_find_dimensions(ctx->unit_len_ctx, available_width, -1,
+ b, b->style, &b->width, &b->height,
+ horizontal ? &item->max_main : &item->max_cross,
+ horizontal ? &item->min_main : &item->min_cross,
+ horizontal ? &item->max_cross : &item->max_main,
+ horizontal ? &item->min_cross : &item->min_main,
+ b->margin, b->padding, b->border);
+ b->float_container = NULL;
+
+ NSLOG(flex, DEEPDEBUG, "flex-item box: %p: width: %i",
+ b, b->width);
+
+ item->box = b;
+ item->basis = css_computed_flex_basis(b->style,
+ &item->basis_length, &item->basis_unit);
+
+ css_computed_flex_shrink(b->style, &item->shrink);
+ css_computed_flex_grow(b->style, &item->grow);
+
+ layout_flex__base_and_main_sizes(ctx, item, available_width);
+ }
+}
+
+/**
+ * Ensure context's lines array has a free space
+ *
+ * \param[in] ctx Flex layout context
+ * \return true on success false on out of memory
+ */
+static bool layout_flex_ctx__ensure_line(struct flex_ctx *ctx)
+{
+ struct flex_line_data *temp;
+ size_t line_alloc = ctx->line.alloc * 2;
+
+ if (ctx->line.alloc > ctx->line.count) {
+ return true;
+ }
+
+ temp = realloc(ctx->line.data, sizeof(*ctx->line.data) * line_alloc);
+ if (temp == NULL) {
+ return false;
+ }
+ ctx->line.data = temp;
+
+ memset(ctx->line.data + ctx->line.alloc, 0,
+ sizeof(*ctx->line.data) * (line_alloc - ctx->line.alloc));
+ ctx->line.alloc = line_alloc;
+
+ return true;
+}
+
+/**
+ * Assigns flex items to the line and returns the line
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] item_index Index to first item to assign to this line
+ * \return Pointer to the new line, or NULL on error.
+ */
+static struct flex_line_data *layout_flex__build_line(struct flex_ctx *ctx,
+ size_t item_index)
+{
+ enum box_side start_side = layout_flex__main_start_side(ctx);
+ enum box_side end_side = layout_flex__main_end_side(ctx);
+ struct flex_line_data *line;
+ int used_main = 0;
+
+ if (!layout_flex_ctx__ensure_line(ctx)) {
+ return NULL;
+ }
+
+ line = &ctx->line.data[ctx->line.count];
+ line->first = item_index;
+
+ NSLOG(flex, DEEPDEBUG, "flex container %p: available main: %i",
+ ctx->flex, ctx->available_main);
+
+ while (item_index < ctx->item.count) {
+ struct flex_item_data *item = &ctx->item.data[item_index];
+ struct box *b = item->box;
+ int pos_main;
+
+ pos_main = ctx->horizontal ?
+ item->main_size :
+ b->height + lh__delta_outer_main(ctx->flex, b);
+
+ if (ctx->wrap == CSS_FLEX_WRAP_NOWRAP ||
+ pos_main + used_main <= ctx->available_main ||
+ lh__box_is_absolute(item->box) ||
+ ctx->available_main == AUTO ||
+ line->count == 0 ||
+ pos_main == 0) {
+ if (lh__box_is_absolute(item->box) == false) {
+ line->main_size += item->main_size;
+ used_main += pos_main;
+
+ if (b->margin[start_side] == AUTO) {
+ line->main_auto_margin_count++;
+ }
+ if (b->margin[end_side] == AUTO) {
+ line->main_auto_margin_count++;
+ }
+ }
+ item->line = ctx->line.count;
+ line->count++;
+ item_index++;
+ } else {
+ break;
+ }
+ }
+
+ if (line->count > 0) {
+ ctx->line.count++;
+ } else {
+ NSLOG(layout, ERROR, "Failed to fit any flex items");
+ }
+
+ return line;
+}
+
+/**
+ * Freeze an item on a line
+ *
+ * \param[in] line Line to containing item
+ * \param[in] item Item to freeze
+ */
+static inline void layout_flex__item_freeze(
+ struct flex_line_data *line,
+ struct flex_item_data *item)
+{
+ item->freeze = true;
+ line->frozen++;
+
+ if (!lh__box_is_absolute(item->box)){
+ line->used_main_size += item->target_main_size;
+ }
+
+ NSLOG(flex, DEEPDEBUG, "flex-item box: %p: "
+ "Frozen at target_main_size: %i",
+ item->box, item->target_main_size);
+}
+
+/**
+ * Calculate remaining free space and unfrozen item factor sum
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] line Line to calculate free space on
+ * \param[out] unfrozen_factor_sum Returns sum of unfrozen item's flex factors
+ * \param[in] initial_free_main Initial free space in main direction
+ * \param[in] available_main Available space in main direction
+ * \param[in] grow Whether to grow or shrink
+ * return remaining free space on line
+ */
+static inline int layout_flex__remaining_free_main(
+ struct flex_ctx *ctx,
+ struct flex_line_data *line,
+ css_fixed *unfrozen_factor_sum,
+ int initial_free_main,
+ int available_main,
+ bool grow)
+{
+ int remaining_free_main = available_main;
+ size_t item_count = line->first + line->count;
+
+ *unfrozen_factor_sum = 0;
+
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+
+ if (item->freeze) {
+ remaining_free_main -= item->target_main_size;
+ } else {
+ remaining_free_main -= item->base_size;
+
+ *unfrozen_factor_sum += grow ?
+ item->grow : item->shrink;
+ }
+ }
+
+ if (*unfrozen_factor_sum < F_1) {
+ int free_space = FIXTOINT(FMUL(INTTOFIX(initial_free_main),
+ *unfrozen_factor_sum));
+
+ if (free_space < remaining_free_main) {
+ remaining_free_main = free_space;
+ }
+ }
+
+ NSLOG(flex, DEEPDEBUG, "Remaining free space: %i",
+ remaining_free_main);
+
+ return remaining_free_main;
+}
+
+/**
+ * Clamp flex item target main size and get min/max violations
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] line Line to align items on
+ * return total violation in pixels
+ */
+static inline int layout_flex__get_min_max_violations(
+ struct flex_ctx *ctx,
+ struct flex_line_data *line)
+{
+
+ int total_violation = 0;
+ size_t item_count = line->first + line->count;
+
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+ int target_main_size = item->target_main_size;
+
+ NSLOG(flex, DEEPDEBUG, "item %p: target_main_size: %i",
+ item->box, target_main_size);
+
+ if (item->freeze) {
+ continue;
+ }
+
+ if (item->max_main > 0 &&
+ target_main_size > item->max_main) {
+ target_main_size = item->max_main;
+ item->max_violation = true;
+ NSLOG(flex, DEEPDEBUG, "Violation: max_main: %i",
+ item->max_main);
+ }
+
+ if (target_main_size < item->min_main) {
+ target_main_size = item->min_main;
+ item->min_violation = true;
+ NSLOG(flex, DEEPDEBUG, "Violation: min_main: %i",
+ item->min_main);
+ }
+
+ if (target_main_size < item->box->min_width) {
+ target_main_size = item->box->min_width;
+ item->min_violation = true;
+ NSLOG(flex, DEEPDEBUG, "Violation: box min_width: %i",
+ item->box->min_width);
+ }
+
+ if (target_main_size < 0) {
+ target_main_size = 0;
+ item->min_violation = true;
+ NSLOG(flex, DEEPDEBUG, "Violation: less than 0");
+ }
+
+ total_violation += target_main_size - item->target_main_size;
+ item->target_main_size = target_main_size;
+ }
+
+ NSLOG(flex, DEEPDEBUG, "Total violation: %i", total_violation);
+
+ return total_violation;
+}
+
+/**
+ * Distribute remaining free space proportional to the flex factors.
+ *
+ * Remaining free space may be negative.
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] line Line to distribute free space on
+ * \param[in] unfrozen_factor_sum Sum of unfrozen item's flex factors
+ * \param[in] remaining_free_main Remaining free space in main direction
+ * \param[in] grow Whether to grow or shrink
+ */
+static inline void layout_flex__distribute_free_main(
+ struct flex_ctx *ctx,
+ struct flex_line_data *line,
+ css_fixed unfrozen_factor_sum,
+ int remaining_free_main,
+ bool grow)
+{
+ size_t item_count = line->first + line->count;
+
+ if (grow) {
+ css_fixed remainder = 0;
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+ css_fixed result;
+ css_fixed ratio;
+
+ if (item->freeze) {
+ continue;
+ }
+
+ ratio = FDIV(item->grow, unfrozen_factor_sum);
+ result = FMUL(INTTOFIX(remaining_free_main), ratio) +
+ remainder;
+
+ item->target_main_size = item->base_size +
+ FIXTOINT(result);
+ remainder = FIXFRAC(result);
+ }
+ } else {
+ css_fixed scaled_shrink_factor_sum = 0;
+ css_fixed remainder = 0;
+
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+ css_fixed scaled_shrink_factor;
+
+ if (item->freeze) {
+ continue;
+ }
+
+ scaled_shrink_factor = FMUL(
+ item->shrink,
+ INTTOFIX(item->base_size));
+ scaled_shrink_factor_sum += scaled_shrink_factor;
+ }
+
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+ css_fixed scaled_shrink_factor;
+ css_fixed result;
+ css_fixed ratio;
+
+ if (item->freeze) {
+ continue;
+ } else if (scaled_shrink_factor_sum == 0) {
+ item->target_main_size = item->main_size;
+ layout_flex__item_freeze(line, item);
+ continue;
+ }
+
+ scaled_shrink_factor = FMUL(
+ item->shrink,
+ INTTOFIX(item->base_size));
+ ratio = FDIV(scaled_shrink_factor,
+ scaled_shrink_factor_sum);
+ result = FMUL(INTTOFIX(abs(remaining_free_main)),
+ ratio) + remainder;
+
+ item->target_main_size = item->base_size -
+ FIXTOINT(result);
+ remainder = FIXFRAC(result);
+ }
+ }
+}
+
+/**
+ * Resolve flexible item lengths along a line.
+ *
+ * See 9.7 of Tests CSS Flexible Box Layout Module Level 1.
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] line Line to resolve
+ * \return true on success, false on failure.
+ */
+static bool layout_flex__resolve_line(
+ struct flex_ctx *ctx,
+ struct flex_line_data *line)
+{
+ size_t item_count = line->first + line->count;
+ int available_main = ctx->available_main;
+ int initial_free_main;
+ bool grow;
+
+ if (available_main == AUTO) {
+ available_main = INT_MAX;
+ }
+
+ grow = (line->main_size < available_main);
+ initial_free_main = available_main;
+
+ NSLOG(flex, DEEPDEBUG, "box %p: line %zu: first: %zu, count: %zu",
+ ctx->flex, line - ctx->line.data,
+ line->first, line->count);
+ NSLOG(flex, DEEPDEBUG, "Line main_size: %i, available_main: %i",
+ line->main_size, available_main);
+
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+
+ /* 3. Size inflexible items */
+ if (grow) {
+ if (item->grow == 0 ||
+ item->base_size > item->main_size) {
+ item->target_main_size = item->main_size;
+ layout_flex__item_freeze(line, item);
+ }
+ } else {
+ if (item->shrink == 0 ||
+ item->base_size < item->main_size) {
+ item->target_main_size = item->main_size;
+ layout_flex__item_freeze(line, item);
+ }
+ }
+
+ /* 4. Calculate initial free space */
+ if (item->freeze) {
+ initial_free_main -= item->target_main_size;
+ } else {
+ initial_free_main -= item->base_size;
+ }
+ }
+
+ /* 5. Loop */
+ while (line->frozen < line->count) {
+ css_fixed unfrozen_factor_sum;
+ int remaining_free_main;
+ int total_violation;
+
+ NSLOG(flex, DEEPDEBUG, "flex-container: %p: Resolver pass",
+ ctx->flex);
+
+ /* b */
+ remaining_free_main = layout_flex__remaining_free_main(ctx,
+ line, &unfrozen_factor_sum, initial_free_main,
+ available_main, grow);
+
+ /* c */
+ if (remaining_free_main != 0) {
+ layout_flex__distribute_free_main(ctx,
+ line, unfrozen_factor_sum,
+ remaining_free_main, grow);
+ }
+
+ /* d */
+ total_violation = layout_flex__get_min_max_violations(
+ ctx, line);
+
+ /* e */
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+
+ if (item->freeze) {
+ continue;
+ }
+
+ if (total_violation == 0 ||
+ (total_violation > 0 && item->min_violation) ||
+ (total_violation < 0 && item->max_violation)) {
+ layout_flex__item_freeze(line, item);
+ }
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Position items along a line
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] line Line to resolve
+ * \return true on success, false on failure.
+ */
+static bool layout_flex__place_line_items_main(
+ struct flex_ctx *ctx,
+ struct flex_line_data *line)
+{
+ int main_pos = ctx->flex->padding[layout_flex__main_start_side(ctx)];
+ int post_multiplier = ctx->main_reversed ? 0 : 1;
+ int pre_multiplier = ctx->main_reversed ? -1 : 0;
+ size_t item_count = line->first + line->count;
+ int extra_remainder = 0;
+ int extra = 0;
+
+ if (ctx->main_reversed) {
+ main_pos = lh__box_size_main(ctx->horizontal, ctx->flex) -
+ main_pos;
+ }
+
+ if (ctx->available_main != AUTO &&
+ ctx->available_main != UNKNOWN_WIDTH &&
+ ctx->available_main > line->used_main_size) {
+ if (line->main_auto_margin_count > 0) {
+ extra = ctx->available_main - line->used_main_size;
+
+ extra_remainder = extra % line->main_auto_margin_count;
+ extra /= line->main_auto_margin_count;
+ }
+ }
+
+ for (size_t i = line->first; i < item_count; i++) {
+ enum box_side main_end = ctx->horizontal ? RIGHT : BOTTOM;
+ enum box_side main_start = ctx->horizontal ? LEFT : TOP;
+ struct flex_item_data *item = &ctx->item.data[i];
+ struct box *b = item->box;
+ int extra_total = 0;
+ int extra_post = 0;
+ int extra_pre = 0;
+ int box_size_main;
+ int *box_pos_main;
+
+ if (ctx->horizontal) {
+ b->width = item->target_main_size -
+ lh__delta_outer_width(b);
+
+ if (!layout_flex_item(ctx, item, b->width)) {
+ return false;
+ }
+ }
+
+ box_size_main = lh__box_size_main(ctx->horizontal, b);
+ box_pos_main = ctx->horizontal ? &b->x : &b->y;
+
+ if (!lh__box_is_absolute(b)) {
+ if (b->margin[main_start] == AUTO) {
+ extra_pre = extra + extra_remainder;
+ }
+ if (b->margin[main_end] == AUTO) {
+ extra_post = extra + extra_remainder;
+ }
+ extra_total = extra_pre + extra_post;
+
+ main_pos += pre_multiplier *
+ (extra_total + box_size_main +
+ lh__delta_outer_main(ctx->flex, b));
+ }
+
+ *box_pos_main = main_pos + lh__non_auto_margin(b, main_start) +
+ extra_pre + b->border[main_start].width;
+
+ if (!lh__box_is_absolute(b)) {
+ int cross_size;
+ int box_size_cross = lh__box_size_cross(
+ ctx->horizontal, b);
+
+ main_pos += post_multiplier *
+ (extra_total + box_size_main +
+ lh__delta_outer_main(ctx->flex, b));
+
+ cross_size = box_size_cross + lh__delta_outer_cross(
+ ctx->flex, b);
+ if (line->cross_size < cross_size) {
+ line->cross_size = cross_size;
+ }
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Collect items onto lines and place items along the lines
+ *
+ * \param[in] ctx Flex layout context
+ * \return true on success, false on failure.
+ */
+static bool layout_flex__collect_items_into_lines(
+ struct flex_ctx *ctx)
+{
+ size_t pos = 0;
+
+ while (pos < ctx->item.count) {
+ struct flex_line_data *line;
+
+ line = layout_flex__build_line(ctx, pos);
+ if (line == NULL) {
+ return false;
+ }
+
+ pos += line->count;
+
+ NSLOG(flex, DEEPDEBUG, "flex-container: %p: "
+ "fitted: %zu (total: %zu/%zu)",
+ ctx->flex, line->count,
+ pos, ctx->item.count);
+
+ if (!layout_flex__resolve_line(ctx, line)) {
+ return false;
+ }
+
+ if (!layout_flex__place_line_items_main(ctx, line)) {
+ return false;
+ }
+
+ ctx->cross_size += line->cross_size;
+ if (ctx->main_size < line->main_size) {
+ ctx->main_size = line->main_size;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Align items on a line.
+ *
+ * \param[in] ctx Flex layout context
+ * \param[in] line Line to align items on
+ * \param[in] extra Extra line width in pixels
+ */
+static void layout_flex__place_line_items_cross(struct flex_ctx *ctx,
+ struct flex_line_data *line, int extra)
+{
+ enum box_side cross_start = ctx->horizontal ? TOP : LEFT;
+ size_t item_count = line->first + line->count;
+
+ for (size_t i = line->first; i < item_count; i++) {
+ struct flex_item_data *item = &ctx->item.data[i];
+ struct box *b = item->box;
+ int cross_free_space;
+ int *box_size_cross;
+ int *box_pos_cross;
+
+ box_pos_cross = ctx->horizontal ? &b->y : &b->x;
+ box_size_cross = lh__box_size_cross_ptr(ctx->horizontal, b);
+
+ cross_free_space = line->cross_size + extra - *box_size_cross -
+ lh__delta_outer_cross(ctx->flex, b);
+
+ switch (lh__box_align_self(ctx->flex, b)) {
+ default:
+ case CSS_ALIGN_SELF_STRETCH:
+ if (lh__box_size_cross_is_auto(ctx->horizontal, b)) {
+ *box_size_cross += cross_free_space;
+
+ /* Relayout children for stretch. */
+ if (!layout_flex_item(ctx, item, b->width)) {
+ return;
+ }
+ }
+ fallthrough;
+ case CSS_ALIGN_SELF_FLEX_START:
+ *box_pos_cross = ctx->flex->padding[cross_start] +
+ line->pos +
+ lh__non_auto_margin(b, cross_start) +
+ b->border[cross_start].width;
+ break;
+
+ case CSS_ALIGN_SELF_FLEX_END:
+ *box_pos_cross = ctx->flex->padding[cross_start] +
+ line->pos + cross_free_space +
+ lh__non_auto_margin(b, cross_start) +
+ b->border[cross_start].width;
+ break;
+
+ case CSS_ALIGN_SELF_BASELINE:
+ case CSS_ALIGN_SELF_CENTER:
+ *box_pos_cross = ctx->flex->padding[cross_start] +
+ line->pos + cross_free_space / 2 +
+ lh__non_auto_margin(b, cross_start) +
+ b->border[cross_start].width;
+ break;
+ }
+ }
+}
+
+/**
+ * Place the lines and align the items on the line.
+ *
+ * \param[in] ctx Flex layout context
+ */
+static void layout_flex__place_lines(struct flex_ctx *ctx)
+{
+ bool reversed = ctx->wrap == CSS_FLEX_WRAP_WRAP_REVERSE;
+ int line_pos = reversed ? ctx->cross_size : 0;
+ int post_multiplier = reversed ? 0 : 1;
+ int pre_multiplier = reversed ? -1 : 0;
+ int extra_remainder = 0;
+ int extra = 0;
+
+ if (ctx->available_cross != AUTO &&
+ ctx->available_cross > ctx->cross_size &&
+ ctx->line.count > 0) {
+ extra = ctx->available_cross - ctx->cross_size;
+
+ extra_remainder = extra % ctx->line.count;
+ extra /= ctx->line.count;
+ }
+
+ for (size_t i = 0; i < ctx->line.count; i++) {
+ struct flex_line_data *line = &ctx->line.data[i];
+
+ line_pos += pre_multiplier * line->cross_size;
+ line->pos = line_pos;
+ line_pos += post_multiplier * line->cross_size +
+ extra + extra_remainder;
+
+ layout_flex__place_line_items_cross(ctx, line,
+ extra + extra_remainder);
+
+ if (extra_remainder > 0) {
+ extra_remainder--;
+ }
+ }
+}
+
+/**
+ * Layout a flex container.
+ *
+ * \param[in] flex table to layout
+ * \param[in] available_width width of containing block
+ * \param[in] content memory pool for any new boxes
+ * \return true on success, false on memory exhaustion
+ */
+bool layout_flex(struct box *flex, int available_width,
+ html_content *content)
+{
+ int max_height, min_height;
+ struct flex_ctx *ctx;
+ bool success = false;
+
+ ctx = layout_flex_ctx__create(content, flex);
+ if (ctx == NULL) {
+ return false;
+ }
+
+ NSLOG(flex, DEEPDEBUG, "box %p: %s, available_width %i, width: %i",
+ flex, ctx->horizontal ? "horizontal" : "vertical",
+ available_width, flex->width);
+
+ layout_find_dimensions(
+ ctx->unit_len_ctx, available_width, -1,
+ flex, flex->style, NULL, &flex->height,
+ NULL, NULL, &max_height, &min_height,
+ flex->margin, flex->padding, flex->border);
+
+ available_width = min(available_width, flex->width);
+
+ if (ctx->horizontal) {
+ ctx->available_main = available_width;
+ ctx->available_cross = ctx->flex->height;
+ } else {
+ ctx->available_main = ctx->flex->height;
+ ctx->available_cross = available_width;
+ }
+
+ NSLOG(flex, DEEPDEBUG, "box %p: available_main: %i",
+ flex, ctx->available_main);
+ NSLOG(flex, DEEPDEBUG, "box %p: available_cross: %i",
+ flex, ctx->available_cross);
+
+ layout_flex_ctx__populate_item_data(ctx, flex, available_width);
+
+ /* Place items onto lines. */
+ success = layout_flex__collect_items_into_lines(ctx);
+ if (!success) {
+ goto cleanup;
+ }
+
+ layout_flex__place_lines(ctx);
+
+ if (flex->height == AUTO) {
+ flex->height = ctx->horizontal ?
+ ctx->cross_size :
+ ctx->main_size;
+ }
+
+ if (flex->height != AUTO) {
+ if (max_height >= 0 && flex->height > max_height) {
+ flex->height = max_height;
+ }
+ if (min_height > 0 && flex->height < min_height) {
+ flex->height = min_height;
+ }
+ }
+
+ success = true;
+
+cleanup:
+ layout_flex_ctx__destroy(ctx);
+
+ NSLOG(flex, DEEPDEBUG, "box %p: %s: w: %i, h: %i", flex,
+ success ? "success" : "failure",
+ flex->width, flex->height);
+ return success;
+}
diff --git a/content/handlers/html/layout_internal.h b/content/handlers/html/layout_internal.h
new file mode 100644
index 000000000..d094462ec
--- /dev/null
+++ b/content/handlers/html/layout_internal.h
@@ -0,0 +1,738 @@
+/*
+ * Copyright 2003 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * HTML layout private interface.
+ */
+
+#ifndef NETSURF_HTML_LAYOUT_INTERNAL_H
+#define NETSURF_HTML_LAYOUT_INTERNAL_H
+
+#define AUTO INT_MIN
+
+/* Fixed point percentage (a) of an integer (b), to an integer */
+#define FPCT_OF_INT_TOINT(a, b) (FIXTOINT(FDIV((a * b), F_100)))
+
+/**
+ * Layout a block formatting context.
+ *
+ * \param block BLOCK, INLINE_BLOCK, or TABLE_CELL to layout
+ * \param viewport_height Height of viewport in pixels or -ve if unknown
+ * \param content Memory pool for any new boxes
+ * \return true on success, false on memory exhaustion
+ *
+ * This function carries out layout of a block and its children, as described
+ * in CSS 2.1 9.4.1.
+ */
+bool layout_block_context(
+ struct box *block,
+ int viewport_height,
+ html_content *content);
+
+/**
+ * Layout a table.
+ *
+ * \param table table to layout
+ * \param available_width width of containing block
+ * \param content memory pool for any new boxes
+ * \return true on success, false on memory exhaustion
+ */
+bool layout_table(
+ struct box *table,
+ int available_width,
+ html_content *content);
+
+/**
+ * Layout a flex container.
+ *
+ * \param[in] flex table to layout
+ * \param[in] available_width width of containing block
+ * \param[in] content memory pool for any new boxes
+ * \return true on success, false on memory exhaustion
+ */
+bool layout_flex(
+ struct box *flex,
+ int available_width,
+ html_content *content);
+
+typedef uint8_t (*css_len_func)(
+ const css_computed_style *style,
+ css_fixed *length, css_unit *unit);
+typedef uint8_t (*css_border_style_func)(
+ const css_computed_style *style);
+typedef uint8_t (*css_border_color_func)(
+ const css_computed_style *style,
+ css_color *color);
+
+/** Array of per-side access functions for computed style margins. */
+extern const css_len_func margin_funcs[4];
+
+/** Array of per-side access functions for computed style paddings. */
+extern const css_len_func padding_funcs[4];
+
+/** Array of per-side access functions for computed style border_widths. */
+extern const css_len_func border_width_funcs[4];
+
+/** Array of per-side access functions for computed style border styles. */
+extern const css_border_style_func border_style_funcs[4];
+
+/** Array of per-side access functions for computed style border colors. */
+extern const css_border_color_func border_color_funcs[4];
+
+/** Layout helper: Check whether box is a float. */
+static inline bool lh__box_is_float_box(const struct box *b)
+{
+ return b->type == BOX_FLOAT_LEFT ||
+ b->type == BOX_FLOAT_RIGHT;
+}
+
+/** Layout helper: Check whether box takes part in inline flow. */
+static inline bool lh__box_is_inline_flow(const struct box *b)
+{
+ return b->type == BOX_INLINE ||
+ b->type == BOX_INLINE_FLEX ||
+ b->type == BOX_INLINE_BLOCK ||
+ b->type == BOX_TEXT ||
+ b->type == BOX_INLINE_END;
+}
+
+/** Layout helper: Check whether box takes part in inline flow. */
+static inline bool lh__box_is_flex_container(const struct box *b)
+{
+ return b->type == BOX_FLEX ||
+ b->type == BOX_INLINE_FLEX;
+}
+
+/** Layout helper: Check whether box takes part in inline flow. */
+static inline bool lh__box_is_flex_item(const struct box *b)
+{
+ return (b->parent != NULL) && lh__box_is_flex_container(b->parent);
+}
+
+/** Layout helper: Check whether box is inline level. (Includes BR.) */
+static inline bool lh__box_is_inline_level(const struct box *b)
+{
+ return lh__box_is_inline_flow(b) ||
+ b->type == BOX_BR;
+}
+
+/** Layout helper: Check whether box is inline level. (Includes BR, floats.) */
+static inline bool lh__box_is_inline_content(const struct box *b)
+{
+ return lh__box_is_float_box(b) ||
+ lh__box_is_inline_level(b);
+}
+
+/** Layout helper: Check whether box is an object. */
+static inline bool lh__box_is_object(const struct box *b)
+{
+ return b->object ||
+ (b->flags & (IFRAME | REPLACE_DIM));
+}
+
+/** Layout helper: Check whether box is replaced. */
+static inline bool lh__box_is_replace(const struct box *b)
+{
+ return b->gadget ||
+ lh__box_is_object(b);
+}
+
+/** Layout helper: Check for CSS border on given side. */
+static inline bool lh__have_border(
+ enum box_side side,
+ const css_computed_style *style)
+{
+ return border_style_funcs[side](style) != CSS_BORDER_STYLE_NONE;
+}
+
+static inline bool lh__box_is_absolute(const struct box *b)
+{
+ return css_computed_position(b->style) == CSS_POSITION_ABSOLUTE ||
+ css_computed_position(b->style) == CSS_POSITION_FIXED;
+}
+
+static inline bool lh__flex_main_is_horizontal(const struct box *flex)
+{
+ const css_computed_style *style = flex->style;
+
+ assert(style != NULL);
+
+ switch (css_computed_flex_direction(style)) {
+ default: /* Fallthrough. */
+ case CSS_FLEX_DIRECTION_ROW: /* Fallthrough. */
+ case CSS_FLEX_DIRECTION_ROW_REVERSE:
+ return true;
+ case CSS_FLEX_DIRECTION_COLUMN: /* Fallthrough. */
+ case CSS_FLEX_DIRECTION_COLUMN_REVERSE:
+ return false;
+ }
+}
+
+static inline bool lh__flex_direction_reversed(const struct box *flex)
+{
+ switch (css_computed_flex_direction(flex->style)) {
+ default: /* Fallthrough. */
+ case CSS_FLEX_DIRECTION_ROW_REVERSE: /* Fallthrough. */
+ case CSS_FLEX_DIRECTION_COLUMN_REVERSE:
+ return true;
+ case CSS_FLEX_DIRECTION_ROW: /* Fallthrough. */
+ case CSS_FLEX_DIRECTION_COLUMN:
+ return false;
+ }
+}
+
+static inline int lh__non_auto_margin(const struct box *b, enum box_side side)
+{
+ return (b->margin[side] == AUTO) ? 0 : b->margin[side];
+}
+
+static inline int lh__delta_outer_height(const struct box *b)
+{
+ return b->padding[TOP] +
+ b->padding[BOTTOM] +
+ b->border[TOP].width +
+ b->border[BOTTOM].width +
+ lh__non_auto_margin(b, TOP) +
+ lh__non_auto_margin(b, BOTTOM);
+}
+
+static inline int lh__delta_outer_width(const struct box *b)
+{
+ return b->padding[LEFT] +
+ b->padding[RIGHT] +
+ b->border[LEFT].width +
+ b->border[RIGHT].width +
+ lh__non_auto_margin(b, LEFT) +
+ lh__non_auto_margin(b, RIGHT);
+}
+
+static inline int lh__delta_outer_main(
+ const struct box *flex,
+ const struct box *b)
+{
+ if (lh__flex_main_is_horizontal(flex)) {
+ return lh__delta_outer_width(b);
+ } else {
+ return lh__delta_outer_height(b);
+ }
+}
+
+static inline int lh__delta_outer_cross(
+ const struct box *flex,
+ const struct box *b)
+{
+ if (lh__flex_main_is_horizontal(flex) == false) {
+ return lh__delta_outer_width(b);
+ } else {
+ return lh__delta_outer_height(b);
+ }
+}
+
+static inline int *lh__box_size_main_ptr(
+ bool horizontal,
+ struct box *b)
+{
+ return horizontal ? &b->width : &b->height;
+}
+
+static inline int *lh__box_size_cross_ptr(
+ bool horizontal,
+ struct box *b)
+{
+ return horizontal ? &b->height : &b->width;
+}
+
+static inline int lh__box_size_main(
+ bool horizontal,
+ const struct box *b)
+{
+ return horizontal ? b->width : b->height;
+}
+
+static inline int lh__box_size_cross(
+ bool horizontal,
+ const struct box *b)
+{
+ return horizontal ? b->height : b->width;
+}
+
+static inline bool lh__box_size_cross_is_auto(
+ bool horizontal,
+ struct box *b)
+{
+ css_fixed length;
+ css_unit unit;
+
+ if (horizontal) {
+ return css_computed_height(b->style,
+ &length, &unit) == CSS_HEIGHT_AUTO;
+ } else {
+ return css_computed_width(b->style,
+ &length, &unit) == CSS_WIDTH_AUTO;
+ }
+}
+
+static inline enum css_align_self_e lh__box_align_self(
+ const struct box *flex,
+ const struct box *item)
+{
+ enum css_align_self_e align_self = css_computed_align_self(item->style);
+
+ if (align_self == CSS_ALIGN_SELF_AUTO) {
+ align_self = css_computed_align_items(flex->style);
+ }
+
+ return align_self;
+}
+
+/**
+ * Determine width of margin, borders, and padding on one side of a box.
+ *
+ * \param unit_len_ctx CSS length conversion context for document
+ * \param style style to measure
+ * \param side side of box to measure
+ * \param margin whether margin width is required
+ * \param border whether border width is required
+ * \param padding whether padding width is required
+ * \param fixed increased by sum of fixed margin, border, and padding
+ * \param frac increased by sum of fractional margin and padding
+ */
+static inline void calculate_mbp_width(
+ const css_unit_ctx *unit_len_ctx,
+ const css_computed_style *style,
+ unsigned int side,
+ bool margin,
+ bool border,
+ bool padding,
+ int *fixed,
+ float *frac)
+{
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ assert(style);
+
+ /* margin */
+ if (margin) {
+ enum css_margin_e type;
+
+ type = margin_funcs[side](style, &value, &unit);
+ if (type == CSS_MARGIN_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ *frac += FIXTOFLT(FDIV(value, F_100));
+ } else {
+ *fixed += FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ }
+ }
+
+ /* border */
+ if (border) {
+ if (lh__have_border(side, style)) {
+ border_width_funcs[side](style, &value, &unit);
+
+ *fixed += FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ }
+
+ /* padding */
+ if (padding) {
+ padding_funcs[side](style, &value, &unit);
+ if (unit == CSS_UNIT_PCT) {
+ *frac += FIXTOFLT(FDIV(value, F_100));
+ } else {
+ *fixed += FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ }
+}
+
+/**
+ * Adjust a specified width or height for the box-sizing property.
+ *
+ * This turns the specified dimension into a content-box dimension.
+ *
+ * \param unit_len_ctx Length conversion context
+ * \param box gadget to adjust dimensions of
+ * \param available_width width of containing block
+ * \param setwidth set true if the dimension to be tweaked is a width,
+ * else set false for a height
+ * \param dimension current value for given width/height dimension.
+ * updated to new value after consideration of
+ * gadget properties.
+ */
+static inline void layout_handle_box_sizing(
+ const css_unit_ctx *unit_len_ctx,
+ const struct box *box,
+ int available_width,
+ bool setwidth,
+ int *dimension)
+{
+ enum css_box_sizing_e bs;
+
+ assert(box && box->style);
+
+ bs = css_computed_box_sizing(box->style);
+
+ if (bs == CSS_BOX_SIZING_BORDER_BOX) {
+ int orig = *dimension;
+ int fixed = 0;
+ float frac = 0;
+
+ calculate_mbp_width(unit_len_ctx, box->style,
+ setwidth ? LEFT : TOP,
+ false, true, true, &fixed, &frac);
+ calculate_mbp_width(unit_len_ctx, box->style,
+ setwidth ? RIGHT : BOTTOM,
+ false, true, true, &fixed, &frac);
+ orig -= frac * available_width + fixed;
+ *dimension = orig > 0 ? orig : 0;
+ }
+}
+
+/**
+ * Calculate width, height, and thickness of margins, paddings, and borders.
+ *
+ * \param unit_len_ctx Length conversion context
+ * \param available_width width of containing block
+ * \param viewport_height height of viewport in pixels or -ve if unknown
+ * \param box current box
+ * \param style style giving width, height, margins, paddings,
+ * and borders
+ * \param width updated to width, may be NULL
+ * \param height updated to height, may be NULL
+ * \param max_width updated to max-width, may be NULL
+ * \param min_width updated to min-width, may be NULL
+ * \param max_height updated to max-height, may be NULL
+ * \param min_height updated to min-height, may be NULL
+ * \param margin filled with margins, may be NULL
+ * \param padding filled with paddings, may be NULL
+ * \param border filled with border widths, may be NULL
+ */
+static inline void layout_find_dimensions(
+ const css_unit_ctx *unit_len_ctx,
+ int available_width,
+ int viewport_height,
+ const struct box *box,
+ const css_computed_style *style,
+ int *width,
+ int *height,
+ int *max_width,
+ int *min_width,
+ int *max_height,
+ int *min_height,
+ int margin[4],
+ int padding[4],
+ struct box_border border[4])
+{
+ struct box *containing_block = NULL;
+ unsigned int i;
+
+ if (width) {
+ enum css_width_e wtype;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ wtype = css_computed_width(style, &value, &unit);
+
+ if (wtype == CSS_WIDTH_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ *width = FPCT_OF_INT_TOINT(
+ value, available_width);
+ } else {
+ *width = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ *width = AUTO;
+ }
+
+ if (*width != AUTO) {
+ layout_handle_box_sizing(unit_len_ctx, box,
+ available_width, true, width);
+ }
+ }
+
+ if (height) {
+ enum css_height_e htype;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ htype = css_computed_height(style, &value, &unit);
+
+ if (htype == CSS_HEIGHT_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ enum css_height_e cbhtype;
+
+ if (css_computed_position(box->style) ==
+ CSS_POSITION_ABSOLUTE &&
+ box->parent) {
+ /* Box is absolutely positioned */
+ assert(box->float_container);
+ containing_block = box->float_container;
+ } else if (box->float_container &&
+ css_computed_position(box->style) !=
+ CSS_POSITION_ABSOLUTE &&
+ (css_computed_float(box->style) ==
+ CSS_FLOAT_LEFT ||
+ css_computed_float(box->style) ==
+ CSS_FLOAT_RIGHT)) {
+ /* Box is a float */
+ assert(box->parent &&
+ box->parent->parent &&
+ box->parent->parent->parent);
+
+ containing_block =
+ box->parent->parent->parent;
+ } else if (box->parent && box->parent->type !=
+ BOX_INLINE_CONTAINER) {
+ /* Box is a block level element */
+ containing_block = box->parent;
+ } else if (box->parent && box->parent->type ==
+ BOX_INLINE_CONTAINER) {
+ /* Box is an inline block */
+ assert(box->parent->parent);
+ containing_block = box->parent->parent;
+ }
+
+ if (containing_block) {
+ css_fixed f = 0;
+ css_unit u = CSS_UNIT_PX;
+
+ cbhtype = css_computed_height(
+ containing_block->style,
+ &f, &u);
+ }
+
+ if (containing_block &&
+ containing_block->height != AUTO &&
+ (css_computed_position(box->style) ==
+ CSS_POSITION_ABSOLUTE ||
+ cbhtype == CSS_HEIGHT_SET)) {
+ /* Box is absolutely positioned or its
+ * containing block has a valid
+ * specified height.
+ * (CSS 2.1 Section 10.5) */
+ *height = FPCT_OF_INT_TOINT(value,
+ containing_block->height);
+ } else if ((!box->parent ||
+ !box->parent->parent) &&
+ viewport_height >= 0) {
+ /* If root element or it's child
+ * (HTML or BODY) */
+ *height = FPCT_OF_INT_TOINT(value,
+ viewport_height);
+ } else {
+ /* precentage height not permissible
+ * treat height as auto */
+ *height = AUTO;
+ }
+ } else {
+ *height = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ *height = AUTO;
+ }
+
+ if (*height != AUTO) {
+ layout_handle_box_sizing(unit_len_ctx, box,
+ available_width, false, height);
+ }
+ }
+
+ if (max_width) {
+ enum css_max_width_e type;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ type = css_computed_max_width(style, &value, &unit);
+
+ if (type == CSS_MAX_WIDTH_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ *max_width = FPCT_OF_INT_TOINT(value,
+ available_width);
+ } else {
+ *max_width = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ /* Inadmissible */
+ *max_width = -1;
+ }
+
+ if (*max_width != -1) {
+ layout_handle_box_sizing(unit_len_ctx, box,
+ available_width, true, max_width);
+ }
+ }
+
+ if (min_width) {
+ enum css_min_width_e type;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ type = ns_computed_min_width(style, &value, &unit);
+
+ if (type == CSS_MIN_WIDTH_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ *min_width = FPCT_OF_INT_TOINT(value,
+ available_width);
+ } else {
+ *min_width = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ /* Inadmissible */
+ *min_width = 0;
+ }
+
+ if (*min_width != 0) {
+ layout_handle_box_sizing(unit_len_ctx, box,
+ available_width, true, min_width);
+ }
+ }
+
+ if (max_height) {
+ enum css_max_height_e type;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ type = css_computed_max_height(style, &value, &unit);
+
+ if (type == CSS_MAX_HEIGHT_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ /* TODO: handle percentage */
+ *max_height = -1;
+ } else {
+ *max_height = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ /* Inadmissible */
+ *max_height = -1;
+ }
+ }
+
+ if (min_height) {
+ enum css_min_height_e type;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ type = ns_computed_min_height(style, &value, &unit);
+
+ if (type == CSS_MIN_HEIGHT_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ /* TODO: handle percentage */
+ *min_height = 0;
+ } else {
+ *min_height = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ /* Inadmissible */
+ *min_height = 0;
+ }
+ }
+
+ for (i = 0; i != 4; i++) {
+ if (margin) {
+ enum css_margin_e type = CSS_MARGIN_AUTO;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ type = margin_funcs[i](style, &value, &unit);
+
+ if (type == CSS_MARGIN_SET) {
+ if (unit == CSS_UNIT_PCT) {
+ margin[i] = FPCT_OF_INT_TOINT(value,
+ available_width);
+ } else {
+ margin[i] = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ } else {
+ margin[i] = AUTO;
+ }
+ }
+
+ if (padding) {
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ padding_funcs[i](style, &value, &unit);
+
+ if (unit == CSS_UNIT_PCT) {
+ padding[i] = FPCT_OF_INT_TOINT(value,
+ available_width);
+ } else {
+ padding[i] = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+ }
+ }
+
+ /* Table cell borders are populated in table.c */
+ if (border && box->type != BOX_TABLE_CELL) {
+ enum css_border_style_e bstyle = CSS_BORDER_STYLE_NONE;
+ css_color color = 0;
+ css_fixed value = 0;
+ css_unit unit = CSS_UNIT_PX;
+
+ border_width_funcs[i](style, &value, &unit);
+ bstyle = border_style_funcs[i](style);
+ border_color_funcs[i](style, &color);
+
+ border[i].style = bstyle;
+ border[i].c = color;
+
+ if (bstyle == CSS_BORDER_STYLE_HIDDEN ||
+ bstyle == CSS_BORDER_STYLE_NONE)
+ /* spec unclear: following Mozilla */
+ border[i].width = 0;
+ else
+ border[i].width = FIXTOINT(css_unit_len2device_px(
+ style, unit_len_ctx,
+ value, unit));
+
+ /* Special case for border-collapse: make all borders
+ * on table/table-row-group/table-row zero width. */
+ if (css_computed_border_collapse(style) ==
+ CSS_BORDER_COLLAPSE_COLLAPSE &&
+ (box->type == BOX_TABLE ||
+ box->type == BOX_TABLE_ROW_GROUP ||
+ box->type == BOX_TABLE_ROW))
+ border[i].width = 0;
+ }
+ }
+}
+
+#endif
diff --git a/content/handlers/html/redraw_border.c b/content/handlers/html/redraw_border.c
index 39ed432cd..3a1f6f308 100644
--- a/content/handlers/html/redraw_border.c
+++ b/content/handlers/html/redraw_border.c
@@ -25,6 +25,7 @@
#include <stdbool.h>
#include <stdlib.h>
+#include "utils/utils.h"
#include "utils/log.h"
#include "netsurf/plotters.h"
#include "netsurf/css.h"
@@ -121,7 +122,7 @@ html_redraw_border_plot(const int side,
switch (style) {
case CSS_BORDER_STYLE_DOTTED:
plot_style_bdr.stroke_type = PLOT_OP_TYPE_DOT;
- /* fall through */
+ fallthrough;
case CSS_BORDER_STYLE_DASHED:
rect.x0 = (p[0] + p[2]) / 2;
rect.y0 = (p[1] + p[3]) / 2;
@@ -131,7 +132,7 @@ html_redraw_border_plot(const int side,
break;
case CSS_BORDER_STYLE_SOLID:
- /* fall through to default */
+ /* solid is the default */
default:
if (rectangular || thickness == 1) {
@@ -190,7 +191,7 @@ html_redraw_border_plot(const int side,
case CSS_BORDER_STYLE_GROOVE:
light = 3 - light;
- /* fall through */
+ fallthrough;
case CSS_BORDER_STYLE_RIDGE:
/* choose correct colours for each part of the border line */
if (light <= 1) {
@@ -300,7 +301,7 @@ html_redraw_border_plot(const int side,
case CSS_BORDER_STYLE_INSET:
light = (light + 2) % 4;
- /* fall through */
+ fallthrough;
case CSS_BORDER_STYLE_OUTSET:
/* choose correct colours for each part of the border line */
switch (light) {
diff --git a/content/handlers/html/script.c b/content/handlers/html/script.c
index 962386d68..554fc4f70 100644
--- a/content/handlers/html/script.c
+++ b/content/handlers/html/script.c
@@ -495,6 +495,7 @@ exec_src_script(html_content *c,
switch (script_type) {
case HTML_SCRIPT_SYNC:
ret = DOM_HUBBUB_HUBBUB_ERR | HUBBUB_PAUSED;
+ break;
case HTML_SCRIPT_ASYNC:
break;
diff --git a/content/handlers/html/table.c b/content/handlers/html/table.c
index 4ffcceab9..f8762e862 100644
--- a/content/handlers/html/table.c
+++ b/content/handlers/html/table.c
@@ -26,6 +26,7 @@
#include <dom/dom.h>
#include "utils/log.h"
+#include "utils/utils.h"
#include "utils/talloc.h"
#include "css/utils.h"
@@ -93,27 +94,27 @@ table_border_is_more_eyecatching(const css_unit_ctx *unit_len_ctx,
/* 3b -- sort by style */
switch (a->style) {
- case CSS_BORDER_STYLE_DOUBLE: impact++; /* Fall through */
- case CSS_BORDER_STYLE_SOLID: impact++; /* Fall through */
- case CSS_BORDER_STYLE_DASHED: impact++; /* Fall through */
- case CSS_BORDER_STYLE_DOTTED: impact++; /* Fall through */
- case CSS_BORDER_STYLE_RIDGE: impact++; /* Fall through */
- case CSS_BORDER_STYLE_OUTSET: impact++; /* Fall through */
- case CSS_BORDER_STYLE_GROOVE: impact++; /* Fall through */
- case CSS_BORDER_STYLE_INSET: impact++; /* Fall through */
+ case CSS_BORDER_STYLE_DOUBLE: impact++; fallthrough;
+ case CSS_BORDER_STYLE_SOLID: impact++; fallthrough;
+ case CSS_BORDER_STYLE_DASHED: impact++; fallthrough;
+ case CSS_BORDER_STYLE_DOTTED: impact++; fallthrough;
+ case CSS_BORDER_STYLE_RIDGE: impact++; fallthrough;
+ case CSS_BORDER_STYLE_OUTSET: impact++; fallthrough;
+ case CSS_BORDER_STYLE_GROOVE: impact++; fallthrough;
+ case CSS_BORDER_STYLE_INSET: impact++; fallthrough;
default:
break;
}
switch (b->style) {
- case CSS_BORDER_STYLE_DOUBLE: impact--; /* Fall through */
- case CSS_BORDER_STYLE_SOLID: impact--; /* Fall through */
- case CSS_BORDER_STYLE_DASHED: impact--; /* Fall through */
- case CSS_BORDER_STYLE_DOTTED: impact--; /* Fall through */
- case CSS_BORDER_STYLE_RIDGE: impact--; /* Fall through */
- case CSS_BORDER_STYLE_OUTSET: impact--; /* Fall through */
- case CSS_BORDER_STYLE_GROOVE: impact--; /* Fall through */
- case CSS_BORDER_STYLE_INSET: impact--; /* Fall through */
+ case CSS_BORDER_STYLE_DOUBLE: impact--; fallthrough;
+ case CSS_BORDER_STYLE_SOLID: impact--; fallthrough;
+ case CSS_BORDER_STYLE_DASHED: impact--; fallthrough;
+ case CSS_BORDER_STYLE_DOTTED: impact--; fallthrough;
+ case CSS_BORDER_STYLE_RIDGE: impact--; fallthrough;
+ case CSS_BORDER_STYLE_OUTSET: impact--; fallthrough;
+ case CSS_BORDER_STYLE_GROOVE: impact--; fallthrough;
+ case CSS_BORDER_STYLE_INSET: impact--; fallthrough;
default:
break;
}
@@ -128,20 +129,20 @@ table_border_is_more_eyecatching(const css_unit_ctx *unit_len_ctx,
/** \todo COL/COL_GROUP */
switch (a_src) {
- case BOX_TABLE_CELL: impact++; /* Fall through */
- case BOX_TABLE_ROW: impact++; /* Fall through */
- case BOX_TABLE_ROW_GROUP: impact++; /* Fall through */
- case BOX_TABLE: impact++; /* Fall through */
+ case BOX_TABLE_CELL: impact++; fallthrough;
+ case BOX_TABLE_ROW: impact++; fallthrough;
+ case BOX_TABLE_ROW_GROUP: impact++; fallthrough;
+ case BOX_TABLE: impact++; fallthrough;
default:
break;
}
/** \todo COL/COL_GROUP */
switch (b_src) {
- case BOX_TABLE_CELL: impact--; /* Fall through */
- case BOX_TABLE_ROW: impact--; /* Fall through */
- case BOX_TABLE_ROW_GROUP: impact--; /* Fall through */
- case BOX_TABLE: impact--; /* Fall through */
+ case BOX_TABLE_CELL: impact--; fallthrough;
+ case BOX_TABLE_ROW: impact--; fallthrough;
+ case BOX_TABLE_ROW_GROUP: impact--; fallthrough;
+ case BOX_TABLE: impact--; fallthrough;
default:
break;
}
diff --git a/content/handlers/image/Makefile b/content/handlers/image/Makefile
index 1c27f74d7..ac052b37a 100644
--- a/content/handlers/image/Makefile
+++ b/content/handlers/image/Makefile
@@ -7,10 +7,11 @@ S_IMAGE_$(NETSURF_USE_BMP) += bmp.c
S_IMAGE_$(NETSURF_USE_GIF) += gif.c
S_IMAGE_$(NETSURF_USE_BMP) += ico.c
S_IMAGE_$(NETSURF_USE_JPEG) += jpeg.c
+S_IMAGE_$(NETSURF_USE_JPEGXL) += jpegxl.c
S_IMAGE_$(NETSURF_USE_ROSPRITE) += nssprite.c
S_IMAGE_$(NETSURF_USE_PNG) += png.c
S_IMAGE_$(NETSURF_USE_NSSVG) += svg.c
-S_IMAGE_$(NETSURF_USE_RSVG) += rsvg.c
+S_IMAGE_$(NETSURF_USE_RSVG) += rsvg$(RSVG_API).c
S_IMAGE_$(NETSURF_USE_VIDEO) += video.c
S_IMAGE_$(NETSURF_USE_WEBP) += webp.c
diff --git a/content/handlers/image/bmp.c b/content/handlers/image/bmp.c
index a723022fe..3fec2cc75 100644
--- a/content/handlers/image/bmp.c
+++ b/content/handlers/image/bmp.c
@@ -35,6 +35,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/bmp.h"
@@ -57,12 +58,12 @@ typedef struct nsbmp_content {
*/
static void *nsbmp_bitmap_create(int width, int height, unsigned int bmp_state)
{
- unsigned int bitmap_state = BITMAP_NEW;
+ unsigned int bitmap_state = BITMAP_NONE;
/* set bitmap state based on bmp state */
bitmap_state |= (bmp_state & BMP_OPAQUE) ? BITMAP_OPAQUE : 0;
bitmap_state |= (bmp_state & BMP_CLEAR_MEMORY) ?
- BITMAP_CLEAR_MEMORY : 0;
+ BITMAP_CLEAR : 0;
/* return the created bitmap */
return guit->bitmap->create(width, height, bitmap_state);
@@ -74,7 +75,6 @@ static nserror nsbmp_create_bmp_data(nsbmp_content *bmp)
.bitmap_create = nsbmp_bitmap_create,
.bitmap_destroy = guit->bitmap->destroy,
.bitmap_get_buffer = guit->bitmap->get_buffer,
- .bitmap_get_bpp = guit->bitmap->get_bpp
};
bmp->bmp = calloc(sizeof(struct bmp_image), 1);
@@ -151,8 +151,7 @@ static bool nsbmp_convert(struct content *c)
/* Store our content width and description */
c->width = bmp->bmp->width;
c->height = bmp->bmp->height;
- swidth = bmp->bmp->bitmap_callbacks.bitmap_get_bpp(bmp->bmp->bitmap) *
- bmp->bmp->width;
+ swidth = sizeof(uint32_t) * bmp->bmp->width;
c->size += (swidth * bmp->bmp->height) + 16 + 44;
/* set title text */
@@ -191,6 +190,9 @@ static bool nsbmp_redraw(struct content *c, struct content_redraw_data *data,
return false;
}
+ bitmap_format_to_client(bmp->bitmap, &(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_R8G8B8A8,
+ });
guit->bitmap->modified(bmp->bitmap);
}
diff --git a/content/handlers/image/gif.c b/content/handlers/image/gif.c
index e2a0ca5db..4671d1df5 100644
--- a/content/handlers/image/gif.c
+++ b/content/handlers/image/gif.c
@@ -34,8 +34,12 @@
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <libnsgif.h>
+#include <nsutils/assert.h>
+
+#include <nsgif.h>
+
+#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
@@ -47,17 +51,33 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/image.h"
#include "image/gif.h"
-typedef struct nsgif_content {
+typedef struct gif_content {
struct content base;
- struct gif_animation *gif; /**< GIF animation data */
- int current_frame; /**< current frame to display [0...(max-1)] */
-} nsgif_content;
+ nsgif_t *gif; /**< GIF animation data */
+ uint32_t current_frame; /**< current frame to display [0...(max-1)] */
+} gif_content;
+static inline nserror gif__nsgif_error_to_ns(nsgif_error gif_res)
+{
+ nserror err;
+
+ switch (gif_res) {
+ case NSGIF_ERR_OOM:
+ err = NSERROR_NOMEM;
+ break;
+ default:
+ err = NSERROR_GIF_ERROR;
+ break;
+ }
+
+ return err;
+}
/**
* Callback for libnsgif; forwards the call to bitmap_create()
@@ -66,44 +86,60 @@ typedef struct nsgif_content {
* \param height width of image in pixels
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *nsgif_bitmap_create(int width, int height)
+static void *gif_bitmap_create(int width, int height)
{
- return guit->bitmap->create(width, height, BITMAP_NEW);
+ return guit->bitmap->create(width, height, BITMAP_NONE);
}
+/**
+ * Convert client bitmap format to a LibNSGIF format specifier.
+ */
+static nsgif_bitmap_fmt_t nsgif__get_bitmap_format(void)
+{
+ ns_static_assert((int)BITMAP_LAYOUT_R8G8B8A8 == (int)NSGIF_BITMAP_FMT_R8G8B8A8);
+ ns_static_assert((int)BITMAP_LAYOUT_B8G8R8A8 == (int)NSGIF_BITMAP_FMT_B8G8R8A8);
+ ns_static_assert((int)BITMAP_LAYOUT_A8R8G8B8 == (int)NSGIF_BITMAP_FMT_A8R8G8B8);
+ ns_static_assert((int)BITMAP_LAYOUT_A8B8G8R8 == (int)NSGIF_BITMAP_FMT_A8B8G8R8);
+ ns_static_assert((int)BITMAP_LAYOUT_RGBA8888 == (int)NSGIF_BITMAP_FMT_RGBA8888);
+ ns_static_assert((int)BITMAP_LAYOUT_BGRA8888 == (int)NSGIF_BITMAP_FMT_BGRA8888);
+ ns_static_assert((int)BITMAP_LAYOUT_ARGB8888 == (int)NSGIF_BITMAP_FMT_ARGB8888);
+ ns_static_assert((int)BITMAP_LAYOUT_ABGR8888 == (int)NSGIF_BITMAP_FMT_ABGR8888);
+
+ return (nsgif_bitmap_fmt_t)bitmap_fmt.layout;
+}
-static nserror nsgif_create_gif_data(nsgif_content *c)
+static nserror gif_create_gif_data(gif_content *c)
{
- gif_bitmap_callback_vt gif_bitmap_callbacks = {
- .bitmap_create = nsgif_bitmap_create,
- .bitmap_destroy = guit->bitmap->destroy,
- .bitmap_get_buffer = guit->bitmap->get_buffer,
- .bitmap_set_opaque = guit->bitmap->set_opaque,
- .bitmap_test_opaque = guit->bitmap->test_opaque,
- .bitmap_modified = guit->bitmap->modified
+ nsgif_error gif_res;
+ const nsgif_bitmap_cb_vt gif_bitmap_callbacks = {
+ .create = gif_bitmap_create,
+ .destroy = guit->bitmap->destroy,
+ .get_buffer = guit->bitmap->get_buffer,
+ .set_opaque = guit->bitmap->set_opaque,
+ .test_opaque = bitmap_test_opaque,
+ .modified = guit->bitmap->modified,
};
- /* Initialise our data structure */
- c->gif = calloc(sizeof(gif_animation), 1);
- if (c->gif == NULL) {
- content_broadcast_error(&c->base, NSERROR_NOMEM, NULL);
- return NSERROR_NOMEM;
+ gif_res = nsgif_create(&gif_bitmap_callbacks,
+ nsgif__get_bitmap_format(), &c->gif);
+ if (gif_res != NSGIF_OK) {
+ nserror err = gif__nsgif_error_to_ns(gif_res);
+ content_broadcast_error(&c->base, err, NULL);
+ return err;
}
- gif_create(c->gif, &gif_bitmap_callbacks);
+
return NSERROR_OK;
}
-
-
-static nserror nsgif_create(const content_handler *handler,
- lwc_string *imime_type, const struct http_parameter *params,
+static nserror gif_create(const content_handler *handler,
+ lwc_string *imime_type, const struct http_parameter *params,
llcache_handle *llcache, const char *fallback_charset,
bool quirks, struct content **c)
{
- nsgif_content *result;
+ gif_content *result;
nserror error;
- result = calloc(1, sizeof(nsgif_content));
+ result = calloc(1, sizeof(gif_content));
if (result == NULL)
return NSERROR_NOMEM;
@@ -114,7 +150,7 @@ static nserror nsgif_create(const content_handler *handler,
return error;
}
- error = nsgif_create_gif_data(result);
+ error = gif_create_gif_data(result);
if (error != NSERROR_OK) {
free(result);
return error;
@@ -126,99 +162,65 @@ static nserror nsgif_create(const content_handler *handler,
}
/**
+ * Scheduler callback. Performs any necessary animation.
+ *
+ * \param p The content to animate
+*/
+static void gif_animate_cb(void *p);
+
+/**
* Performs any necessary animation.
*
* \param p The content to animate
*/
-static void nsgif_animate(void *p)
+static nserror gif__animate(gif_content *gif, bool redraw)
{
- nsgif_content *gif = p;
- union content_msg_data data;
- int delay;
- int f;
-
- /* Advance by a frame, updating the loop count accordingly */
- gif->current_frame++;
- if (gif->current_frame == (int)gif->gif->frame_count_partial) {
- gif->current_frame = 0;
-
- /* A loop count of 0 has a special meaning of infinite */
- if (gif->gif->loop_count != 0) {
- gif->gif->loop_count--;
- if (gif->gif->loop_count == 0) {
- gif->current_frame =
- gif->gif->frame_count_partial - 1;
- gif->gif->loop_count = -1;
- }
- }
+ nsgif_error gif_res;
+ nsgif_rect_t rect;
+ uint32_t delay;
+ uint32_t f;
+
+ gif_res = nsgif_frame_prepare(gif->gif, &rect, &delay, &f);
+ if (gif_res != NSGIF_OK) {
+ return gif__nsgif_error_to_ns(gif_res);
}
+ gif->current_frame = f;
+
/* Continue animating if we should */
- if (gif->gif->loop_count >= 0) {
- delay = gif->gif->frames[gif->current_frame].frame_delay;
- if (delay <= 1) {
- /* Assuming too fast to be intended, set default. */
- delay = 10;
- }
- guit->misc->schedule(delay * 10, nsgif_animate, gif);
+ if (nsoption_bool(animate_images) && delay != NSGIF_INFINITE) {
+ guit->misc->schedule(delay * 10, gif_animate_cb, gif);
}
- if ((!nsoption_bool(animate_images)) ||
- (!gif->gif->frames[gif->current_frame].display)) {
- return;
- }
+ if (redraw) {
+ union content_msg_data data;
- /* area within gif to redraw */
- f = gif->current_frame;
- data.redraw.x = gif->gif->frames[f].redraw_x;
- data.redraw.y = gif->gif->frames[f].redraw_y;
- data.redraw.width = gif->gif->frames[f].redraw_width;
- data.redraw.height = gif->gif->frames[f].redraw_height;
-
- /* redraw background (true) or plot on top (false) */
- if (gif->current_frame > 0) {
- /* previous frame needed clearing: expand the redraw area to
- * cover it */
- if (gif->gif->frames[f - 1].redraw_required) {
- if (data.redraw.x >
- (int)(gif->gif->frames[f - 1].redraw_x)) {
- data.redraw.width += data.redraw.x -
- gif->gif->frames[f - 1].redraw_x;
- data.redraw.x =
- gif->gif->frames[f - 1].redraw_x;
- }
- if (data.redraw.y >
- (int)(gif->gif->frames[f - 1].redraw_y)) {
- data.redraw.height += (data.redraw.y -
- gif->gif->frames[f - 1].redraw_y);
- data.redraw.y =
- gif->gif->frames[f - 1].redraw_y;
- }
- if ((int)(gif->gif->frames[f - 1].redraw_x +
- gif->gif->frames[f - 1].redraw_width) >
- (data.redraw.x + data.redraw.width))
- data.redraw.width =
- gif->gif->frames[f - 1].redraw_x -
- data.redraw.x +
- gif->gif->frames[f - 1].redraw_width;
- if ((int)(gif->gif->frames[f - 1].redraw_y +
- gif->gif->frames[f - 1].redraw_height) >
- (data.redraw.y + data.redraw.height))
- data.redraw.height =
- gif->gif->frames[f - 1].redraw_y -
- data.redraw.y +
- gif->gif->frames[f - 1].redraw_height;
- }
+ /* area within gif to redraw */
+ data.redraw.x = rect.x0;
+ data.redraw.y = rect.y0;
+ data.redraw.width = rect.x1 - rect.x0;
+ data.redraw.height = rect.y1 - rect.y0;
+
+ content_broadcast(&gif->base, CONTENT_MSG_REDRAW, &data);
}
- content_broadcast(&gif->base, CONTENT_MSG_REDRAW, &data);
+ return NSERROR_OK;
}
-static bool nsgif_convert(struct content *c)
+static void gif_animate_cb(void *p)
{
- nsgif_content *gif = (nsgif_content *) c;
- int res;
+ gif_content *gif = p;
+
+ gif__animate(gif, true);
+}
+
+static bool gif_convert(struct content *c)
+{
+ gif_content *gif = (gif_content *) c;
+ const nsgif_info_t *gif_info;
const uint8_t *data;
+ nsgif_error gif_err;
+ nserror err;
size_t size;
char *title;
@@ -226,37 +228,32 @@ static bool nsgif_convert(struct content *c)
data = content__get_source_data(c, &size);
/* Initialise the GIF */
- do {
- res = gif_initialise(gif->gif, size, (unsigned char *) data);
- if (res != GIF_OK && res != GIF_WORKING &&
- res != GIF_INSUFFICIENT_FRAME_DATA) {
- nserror error = NSERROR_UNKNOWN;
- switch (res) {
- case GIF_FRAME_DATA_ERROR:
- case GIF_INSUFFICIENT_DATA:
- case GIF_DATA_ERROR:
- error = NSERROR_GIF_ERROR;
- break;
- case GIF_INSUFFICIENT_MEMORY:
- error = NSERROR_NOMEM;
- break;
- }
- content_broadcast_error(c, error, NULL);
- return false;
- }
- } while (res != GIF_OK && res != GIF_INSUFFICIENT_FRAME_DATA);
+ gif_err = nsgif_data_scan(gif->gif, size, data);
+ if (gif_err != NSGIF_OK) {
+ NSLOG(netsurf, INFO, "nsgif scan: %s", nsgif_strerror(gif_err));
+ /* Not fatal unless we have no frames. */
+ }
+
+ nsgif_data_complete(gif->gif);
+
+ gif_info = nsgif_get_info(gif->gif);
+ assert(gif_info != NULL);
/* Abort on bad GIFs */
- if ((gif->gif->frame_count_partial == 0) || (gif->gif->width == 0) ||
- (gif->gif->height == 0)) {
- content_broadcast_error(c, NSERROR_GIF_ERROR, NULL);
+ if (gif_info->frame_count == 0) {
+ err = gif__nsgif_error_to_ns(gif_err);
+ content_broadcast_error(c, err, "GIF with no frames.");
+ return false;
+ } else if (gif_info->width == 0 || gif_info->height == 0) {
+ err = gif__nsgif_error_to_ns(gif_err);
+ content_broadcast_error(c, err, "Zero size image.");
return false;
}
/* Store our content width, height and calculate size */
- c->width = gif->gif->width;
- c->height = gif->gif->height;
- c->size += (gif->gif->width * gif->gif->height * 4) + 16 + 44;
+ c->width = gif_info->width;
+ c->height = gif_info->height;
+ c->size += (gif_info->width * gif_info->height * 4) + 16 + 44;
/* set title text */
title = messages_get_buff("GIFTitle",
@@ -267,12 +264,11 @@ static bool nsgif_convert(struct content *c)
free(title);
}
- /* Schedule the animation if we have one */
- gif->current_frame = 0;
- if (gif->gif->frame_count_partial > 1)
- guit->misc->schedule(gif->gif->frames[0].frame_delay * 10,
- nsgif_animate,
- c);
+ err = gif__animate(gif, false);
+ if (err != NSERROR_OK) {
+ content_broadcast_error(c, NSERROR_GIF_ERROR, NULL);
+ return false;
+ }
/* Exit as a success */
content_set_ready(c);
@@ -283,68 +279,51 @@ static bool nsgif_convert(struct content *c)
return true;
}
-
/**
* Updates the GIF bitmap to display the current frame
*
* \param gif The gif context to update.
- * \return GIF_OK on success else apropriate error code.
+ * \return NSGIF_OK on success else apropriate error code.
*/
-static gif_result nsgif_get_frame(nsgif_content *gif)
+static nsgif_error gif_get_frame(gif_content *gif,
+ nsgif_bitmap_t **bitmap)
{
- int previous_frame, current_frame, frame;
- gif_result res = GIF_OK;
-
- current_frame = gif->current_frame;
+ uint32_t current_frame = gif->current_frame;
if (!nsoption_bool(animate_images)) {
current_frame = 0;
}
- if (current_frame < gif->gif->decoded_frame) {
- previous_frame = 0;
- } else {
- previous_frame = gif->gif->decoded_frame + 1;
- }
-
- for (frame = previous_frame; frame <= current_frame; frame++) {
- res = gif_decode_frame(gif->gif, frame);
- }
-
- return res;
+ return nsgif_frame_decode(gif->gif, current_frame, bitmap);
}
-static bool nsgif_redraw(struct content *c, struct content_redraw_data *data,
+static bool gif_redraw(struct content *c, struct content_redraw_data *data,
const struct rect *clip, const struct redraw_context *ctx)
{
- nsgif_content *gif = (nsgif_content *) c;
+ gif_content *gif = (gif_content *) c;
+ nsgif_bitmap_t *bitmap;
- if (gif->current_frame != gif->gif->decoded_frame) {
- if (nsgif_get_frame(gif) != GIF_OK) {
- return false;
- }
+ if (gif_get_frame(gif, &bitmap) != NSGIF_OK) {
+ return false;
}
- return image_bitmap_plot(gif->gif->frame_image, data, clip, ctx);
+ return image_bitmap_plot(bitmap, data, clip, ctx);
}
-
-static void nsgif_destroy(struct content *c)
+static void gif_destroy(struct content *c)
{
- nsgif_content *gif = (nsgif_content *) c;
+ gif_content *gif = (gif_content *) c;
/* Free all the associated memory buffers */
- guit->misc->schedule(-1, nsgif_animate, c);
- gif_finalise(gif->gif);
- free(gif->gif);
+ guit->misc->schedule(-1, gif_animate_cb, c);
+ nsgif_destroy(gif->gif);
}
-
-static nserror nsgif_clone(const struct content *old, struct content **newc)
+static nserror gif_clone(const struct content *old, struct content **newc)
{
- nsgif_content *gif;
+ gif_content *gif;
nserror error;
- gif = calloc(1, sizeof(nsgif_content));
+ gif = calloc(1, sizeof(gif_content));
if (gif == NULL)
return NSERROR_NOMEM;
@@ -355,7 +334,7 @@ static nserror nsgif_clone(const struct content *old, struct content **newc)
}
/* Simply replay creation and conversion of content */
- error = nsgif_create_gif_data(gif);
+ error = gif_create_gif_data(gif);
if (error != NSERROR_OK) {
content_destroy(&gif->base);
return error;
@@ -363,7 +342,7 @@ static nserror nsgif_clone(const struct content *old, struct content **newc)
if (old->status == CONTENT_STATUS_READY ||
old->status == CONTENT_STATUS_DONE) {
- if (nsgif_convert(&gif->base) == false) {
+ if (gif_convert(&gif->base) == false) {
content_destroy(&gif->base);
return NSERROR_CLONE_FAILED;
}
@@ -374,9 +353,9 @@ static nserror nsgif_clone(const struct content *old, struct content **newc)
return NSERROR_OK;
}
-static void nsgif_add_user(struct content *c)
+static void gif_add_user(struct content *c)
{
- nsgif_content *gif = (nsgif_content *) c;
+ gif_content *gif = (gif_content *) c;
/* Ensure this content has already been converted.
* If it hasn't, the animation will start at the conversion phase instead. */
@@ -384,67 +363,66 @@ static void nsgif_add_user(struct content *c)
if (content_count_users(c) == 1) {
/* First user, and content already converted, so start the animation. */
- if (gif->gif->frame_count_partial > 1) {
- guit->misc->schedule(gif->gif->frames[0].frame_delay * 10,
- nsgif_animate, c);
+ if (nsgif_reset(gif->gif) == NSGIF_OK) {
+ gif__animate(gif, true);
}
}
}
-static void nsgif_remove_user(struct content *c)
+static void gif_remove_user(struct content *c)
{
if (content_count_users(c) == 1) {
/* Last user is about to be removed from this content, so stop the animation. */
- guit->misc->schedule(-1, nsgif_animate, c);
+ guit->misc->schedule(-1, gif_animate_cb, c);
}
}
-static void *nsgif_get_internal(const struct content *c, void *context)
+static nsgif_bitmap_t *gif_get_bitmap(
+ const struct content *c, void *context)
{
- nsgif_content *gif = (nsgif_content *) c;
+ gif_content *gif = (gif_content *) c;
+ nsgif_bitmap_t *bitmap;
- if (gif->current_frame != gif->gif->decoded_frame) {
- if (nsgif_get_frame(gif) != GIF_OK)
- return NULL;
+ if (gif_get_frame(gif, &bitmap) != NSGIF_OK) {
+ return NULL;
}
- return gif->gif->frame_image;
+ return bitmap;
}
-static content_type nsgif_content_type(void)
+static content_type gif_content_type(void)
{
return CONTENT_IMAGE;
}
-static bool nsgif_content_is_opaque(struct content *c)
+static bool gif_content_is_opaque(struct content *c)
{
- nsgif_content *gif = (nsgif_content *) c;
+ gif_content *gif = (gif_content *) c;
+ nsgif_bitmap_t *bitmap;
- if (gif->current_frame != gif->gif->decoded_frame) {
- if (nsgif_get_frame(gif) != GIF_OK) {
- return false;
- }
+ if (gif_get_frame(gif, &bitmap) != NSGIF_OK) {
+ return false;
}
- return guit->bitmap->get_opaque(gif->gif->frame_image);
+ return guit->bitmap->get_opaque(bitmap);
}
-static const content_handler nsgif_content_handler = {
- .create = nsgif_create,
- .data_complete = nsgif_convert,
- .destroy = nsgif_destroy,
- .redraw = nsgif_redraw,
- .clone = nsgif_clone,
- .add_user = nsgif_add_user,
- .remove_user = nsgif_remove_user,
- .get_internal = nsgif_get_internal,
- .type = nsgif_content_type,
- .is_opaque = nsgif_content_is_opaque,
+static const content_handler gif_content_handler = {
+ .create = gif_create,
+ .data_complete = gif_convert,
+ .destroy = gif_destroy,
+ .redraw = gif_redraw,
+ .clone = gif_clone,
+ .add_user = gif_add_user,
+ .remove_user = gif_remove_user,
+ .get_internal = gif_get_bitmap,
+ .type = gif_content_type,
+ .is_opaque = gif_content_is_opaque,
.no_share = false,
};
-static const char *nsgif_types[] = {
+static const char *gif_types[] = {
"image/gif"
};
-CONTENT_FACTORY_REGISTER_TYPES(nsgif, nsgif_types, nsgif_content_handler);
+CONTENT_FACTORY_REGISTER_TYPES(nsgif, gif_types, gif_content_handler);
diff --git a/content/handlers/image/ico.c b/content/handlers/image/ico.c
index 2d839b1d1..871da41a9 100644
--- a/content/handlers/image/ico.c
+++ b/content/handlers/image/ico.c
@@ -34,6 +34,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/image.h"
#include "image/ico.h"
@@ -54,12 +55,12 @@ typedef struct nsico_content {
*/
static void *nsico_bitmap_create(int width, int height, unsigned int bmp_state)
{
- unsigned int bitmap_state = BITMAP_NEW;
+ unsigned int bitmap_state = BITMAP_NONE;
/* set bitmap state based on bmp state */
bitmap_state |= (bmp_state & BMP_OPAQUE) ? BITMAP_OPAQUE : 0;
bitmap_state |= (bmp_state & BMP_CLEAR_MEMORY) ?
- BITMAP_CLEAR_MEMORY : 0;
+ BITMAP_CLEAR : 0;
/* return the created bitmap */
return guit->bitmap->create(width, height, bitmap_state);
@@ -71,7 +72,6 @@ static nserror nsico_create_ico_data(nsico_content *c)
.bitmap_create = nsico_bitmap_create,
.bitmap_destroy = guit->bitmap->destroy,
.bitmap_get_buffer = guit->bitmap->get_buffer,
- .bitmap_get_bpp = guit->bitmap->get_bpp
};
c->ico = calloc(sizeof(ico_collection), 1);
@@ -173,6 +173,23 @@ static bool nsico_convert(struct content *c)
return true;
}
+static bool nsico__decode(struct bmp_image *ico)
+{
+ if (ico->decoded == false) {
+ NSLOG(netsurf, DEBUG, "Decoding ICO %p", ico);
+ if (bmp_decode(ico) != BMP_OK) {
+ return false;
+ }
+
+ bitmap_format_to_client(ico->bitmap, &(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_R8G8B8A8,
+ });
+ guit->bitmap->modified(ico->bitmap);
+
+ }
+
+ return true;
+}
static bool nsico_redraw(struct content *c, struct content_redraw_data *data,
const struct rect *clip, const struct redraw_context *ctx)
@@ -189,14 +206,8 @@ static bool nsico_redraw(struct content *c, struct content_redraw_data *data,
}
/* ensure its decided */
- if (bmp->decoded == false) {
- if (bmp_decode(bmp) != BMP_OK) {
- return false;
- } else {
- NSLOG(netsurf, INFO, "Decoding bitmap");
- guit->bitmap->modified(bmp->bitmap);
- }
-
+ if (!nsico__decode(bmp)) {
+ return false;
}
return image_bitmap_plot(bmp->bitmap, data, clip, ctx);
@@ -260,12 +271,8 @@ static void *nsico_get_internal(const struct content *c, void *context)
return NULL;
}
- if (bmp->decoded == false) {
- if (bmp_decode(bmp) != BMP_OK) {
- return NULL;
- } else {
- guit->bitmap->modified(bmp->bitmap);
- }
+ if (!nsico__decode(bmp)) {
+ return NULL;
}
return bmp->bitmap;
@@ -292,12 +299,8 @@ static bool nsico_is_opaque(struct content *c)
return false;
}
- if (bmp->decoded == false) {
- if (bmp_decode(bmp) != BMP_OK) {
- return false;
- }
-
- guit->bitmap->modified(bmp->bitmap);
+ if (!nsico__decode(bmp)) {
+ return false;
}
return guit->bitmap->get_opaque(bmp->bitmap);
diff --git a/content/handlers/image/image.c b/content/handlers/image/image.c
index 4eb366e0b..2bd5f5f8d 100644
--- a/content/handlers/image/image.c
+++ b/content/handlers/image/image.c
@@ -26,11 +26,13 @@
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/bmp.h"
#include "image/gif.h"
#include "image/ico.h"
#include "image/jpeg.h"
+#include "image/jpegxl.h"
#include "image/nssprite.h"
#include "image/png.h"
#include "image/rsvg.h"
@@ -71,6 +73,12 @@ nserror image_init(void)
return error;
#endif
+#ifdef WITH_JPEGXL
+ error = nsjpegxl_init();
+ if (error != NSERROR_OK)
+ return error;
+#endif
+
#ifdef WITH_PNG
error = nspng_init();
if (error != NSERROR_OK)
@@ -124,7 +132,7 @@ bool image_bitmap_plot(struct bitmap *bitmap,
if (height == 1) {
/* optimise 1x1 bitmap plot */
pixel = guit->bitmap->get_buffer(bitmap);
- fill_style.fill_colour = pixel_to_colour(pixel);
+ fill_style.fill_colour = bitmap_pixel_to_colour(pixel);
if (guit->bitmap->get_opaque(bitmap) ||
((fill_style.fill_colour & 0xff000000) == 0xff000000)) {
diff --git a/content/handlers/image/image_cache.c b/content/handlers/image/image_cache.c
index bc0b91408..8f7ff89ff 100644
--- a/content/handlers/image/image_cache.c
+++ b/content/handlers/image/image_cache.c
@@ -438,6 +438,7 @@ image_cache_init(const struct image_cache_parameters *image_cache_parameters)
nserror image_cache_fini(void)
{
unsigned int op_count;
+ uint64_t op_size;
guit->misc->schedule(-1, image_cache__background_update, image_cache);
@@ -452,6 +453,10 @@ nserror image_cache_fini(void)
image_cache->miss_count +
image_cache->fail_count;
+ op_size = image_cache->hit_size +
+ image_cache->miss_size +
+ image_cache->fail_size;
+
NSLOG(netsurf, INFO, "Age %ds", image_cache->current_age / 1000);
NSLOG(netsurf, INFO, "Peak size %"PRIsizet" (in %d)",
image_cache->max_bitmap_size,
@@ -460,12 +465,7 @@ nserror image_cache_fini(void)
image_cache->max_bitmap_count,
image_cache->max_bitmap_count_size);
- if (op_count > 0) {
- uint64_t op_size;
-
- op_size = image_cache->hit_size +
- image_cache->miss_size +
- image_cache->fail_size;
+ if ((op_count > 0) && (op_size >0)) {
NSLOG(netsurf, INFO,
"Cache total/hit/miss/fail (counts) %d/%d/%d/%d (100%%/%d%%/%d%%/%d%%)",
@@ -528,7 +528,7 @@ nserror image_cache_add(struct content *content,
image_cache__link(centry);
centry->content = content;
- centry->bitmap_size = content->width * content->height * 4;
+ centry->bitmap_size = content->width * content->height * 4llu;
}
NSLOG(netsurf, INFO, "centry %p, content %p, bitmap %p", centry,
@@ -632,15 +632,15 @@ case chr : \
slen++;
break;
- FMTCHR('a', PRIssizet, params.limit);
- FMTCHR('b', PRIssizet, params.hysteresis);
- FMTCHR('c', PRIssizet, total_bitmap_size);
+ FMTCHR('a', PRIsizet, params.limit);
+ FMTCHR('b', PRIsizet, params.hysteresis);
+ FMTCHR('c', PRIsizet, total_bitmap_size);
FMTCHR('d', "d", bitmap_count);
FMTCHR('e', "u", current_age / 1000);
- FMTCHR('f', PRIssizet, max_bitmap_size);
+ FMTCHR('f', PRIsizet, max_bitmap_size);
FMTCHR('g', "d", max_bitmap_size_count);
FMTCHR('h', "d", max_bitmap_count);
- FMTCHR('i', PRIssizet, max_bitmap_count_size);
+ FMTCHR('i', PRIsizet, max_bitmap_count_size);
case 'j':
@@ -770,7 +770,7 @@ image_cache_snentryf(char *string,
if (centry->bitmap != NULL) {
slen += snprintf(string + slen,
size - slen,
- "%" PRIssizet,
+ "%" PRIsizet,
centry->bitmap_size);
} else {
slen += snprintf(string + slen,
diff --git a/content/handlers/image/jpeg.c b/content/handlers/image/jpeg.c
index 549c2b674..93372f15a 100644
--- a/content/handlers/image/jpeg.c
+++ b/content/handlers/image/jpeg.c
@@ -37,6 +37,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/image_cache.h"
@@ -49,13 +50,8 @@
*/
#define MIN_JPEG_SIZE 20
-#ifdef riscos
-/* We prefer the library to be configured with these options to save
- * copying data during decoding. */
-#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
-#warning JPEG library not optimally configured. Decoding will be slower.
-#endif
-/* but we don't care if we're not on RISC OS */
+#ifndef LIBJPEG_TURBO_VERSION
+#warning Using libjpeg (libjpeg-turbo is recommended)
#endif
static char nsjpeg_error_buffer[JMSG_LENGTH_MAX];
@@ -165,6 +161,96 @@ static void nsjpeg_error_exit(j_common_ptr cinfo)
}
/**
+ * Convert scan lines from CMYK to core client bitmap layout.
+ */
+static inline void nsjpeg__decode_cmyk(
+ struct jpeg_decompress_struct *cinfo,
+ uint8_t * volatile pixels,
+ size_t rowstride)
+{
+ int width = cinfo->output_width * 4;
+
+ do {
+ JSAMPROW scanlines[1] = {
+ [0] = (JSAMPROW)
+ (pixels + rowstride * cinfo->output_scanline),
+ };
+ jpeg_read_scanlines(cinfo, scanlines, 1);
+
+ for (int i = width - 4; 0 <= i; i -= 4) {
+ /* Trivial inverse CMYK -> RGBA */
+ const int c = scanlines[0][i + 0];
+ const int m = scanlines[0][i + 1];
+ const int y = scanlines[0][i + 2];
+ const int k = scanlines[0][i + 3];
+
+ const int ck = c * k;
+ const int mk = m * k;
+ const int yk = y * k;
+
+#define DIV255(x) ((x) + 1 + ((x) >> 8)) >> 8
+ scanlines[0][i + bitmap_layout.r] = DIV255(ck);
+ scanlines[0][i + bitmap_layout.g] = DIV255(mk);
+ scanlines[0][i + bitmap_layout.b] = DIV255(yk);
+ scanlines[0][i + bitmap_layout.a] = 0xff;
+#undef DIV255
+ }
+ } while (cinfo->output_scanline != cinfo->output_height);
+}
+
+/**
+ * Convert scan lines from CMYK to core client bitmap layout.
+ */
+static inline void nsjpeg__decode_rgb(
+ struct jpeg_decompress_struct *cinfo,
+ uint8_t * volatile pixels,
+ size_t rowstride)
+{
+#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
+ int width = cinfo->output_width;
+#endif
+
+ do {
+ JSAMPROW scanlines[1] = {
+ [0] = (JSAMPROW)
+ (pixels + rowstride * cinfo->output_scanline),
+ };
+ jpeg_read_scanlines(cinfo, scanlines, 1);
+
+#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
+ /* Missmatch between configured libjpeg pixel format and
+ * NetSurf pixel format. Convert to RGBA */
+ for (int i = width - 1; 0 <= i; i--) {
+ int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED];
+ int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN];
+ int b = scanlines[0][i * RGB_PIXELSIZE + RGB_BLUE];
+ scanlines[0][i * 4 + bitmap_layout.r] = r;
+ scanlines[0][i * 4 + bitmap_layout.g] = g;
+ scanlines[0][i * 4 + bitmap_layout.b] = b;
+ scanlines[0][i * 4 + bitmap_layout.a] = 0xff;
+ }
+#endif
+ } while (cinfo->output_scanline != cinfo->output_height);
+}
+
+/**
+ * Convert scan lines from CMYK to core client bitmap layout.
+ */
+static inline void nsjpeg__decode_client_fmt(
+ struct jpeg_decompress_struct *cinfo,
+ uint8_t * volatile pixels,
+ size_t rowstride)
+{
+ do {
+ JSAMPROW scanlines[1] = {
+ [0] = (JSAMPROW)
+ (pixels + rowstride * cinfo->output_scanline),
+ };
+ jpeg_read_scanlines(cinfo, scanlines, 1);
+ } while (cinfo->output_scanline != cinfo->output_height);
+}
+
+/**
* create a bitmap from jpeg content.
*/
static struct bitmap *
@@ -175,8 +261,6 @@ jpeg_cache_convert(struct content *c)
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
jmp_buf setjmp_buffer;
- unsigned int height;
- unsigned int width;
struct bitmap * volatile bitmap = NULL;
uint8_t * volatile pixels = NULL;
size_t rowstride;
@@ -221,21 +305,42 @@ jpeg_cache_convert(struct content *c)
/* set output processing parameters */
if (cinfo.jpeg_color_space == JCS_CMYK ||
- cinfo.jpeg_color_space == JCS_YCCK) {
+ cinfo.jpeg_color_space == JCS_YCCK) {
cinfo.out_color_space = JCS_CMYK;
} else {
+#ifdef JCS_ALPHA_EXTENSIONS
+ switch (bitmap_fmt.layout) {
+ case BITMAP_LAYOUT_R8G8B8A8:
+ cinfo.out_color_space = JCS_EXT_RGBA;
+ break;
+ case BITMAP_LAYOUT_B8G8R8A8:
+ cinfo.out_color_space = JCS_EXT_BGRA;
+ break;
+ case BITMAP_LAYOUT_A8R8G8B8:
+ cinfo.out_color_space = JCS_EXT_ARGB;
+ break;
+ case BITMAP_LAYOUT_A8B8G8R8:
+ cinfo.out_color_space = JCS_EXT_ABGR;
+ break;
+ default:
+ NSLOG(netsurf, ERROR, "Unexpected bitmap format: %u",
+ bitmap_fmt.layout);
+ jpeg_destroy_decompress(&cinfo);
+ return NULL;
+ }
+#else
cinfo.out_color_space = JCS_RGB;
+#endif
}
cinfo.dct_method = JDCT_ISLOW;
/* commence the decompression, output parameters now valid */
jpeg_start_decompress(&cinfo);
- width = cinfo.output_width;
- height = cinfo.output_height;
-
/* create opaque bitmap (jpegs cannot be transparent) */
- bitmap = guit->bitmap->create(width, height, BITMAP_NEW | BITMAP_OPAQUE);
+ bitmap = guit->bitmap->create(
+ cinfo.output_width,
+ cinfo.output_height, BITMAP_OPAQUE);
if (bitmap == NULL) {
/* empty bitmap could not be created */
jpeg_destroy_decompress(&cinfo);
@@ -252,50 +357,21 @@ jpeg_cache_convert(struct content *c)
/* Convert scanlines from jpeg into bitmap */
rowstride = guit->bitmap->get_rowstride(bitmap);
- do {
- JSAMPROW scanlines[1];
- scanlines[0] = (JSAMPROW) (pixels +
- rowstride * cinfo.output_scanline);
- jpeg_read_scanlines(&cinfo, scanlines, 1);
+ switch (cinfo.out_color_space) {
+ case JCS_CMYK:
+ nsjpeg__decode_cmyk(&cinfo, pixels, rowstride);
+ break;
- if (cinfo.out_color_space == JCS_CMYK) {
- int i;
- for (i = width - 1; 0 <= i; i--) {
- /* Trivial inverse CMYK -> RGBA */
- const int c = scanlines[0][i * 4 + 0];
- const int m = scanlines[0][i * 4 + 1];
- const int y = scanlines[0][i * 4 + 2];
- const int k = scanlines[0][i * 4 + 3];
+ case JCS_RGB:
+ nsjpeg__decode_rgb(&cinfo, pixels, rowstride);
+ break;
- const int ck = c * k;
- const int mk = m * k;
- const int yk = y * k;
+ default:
+ nsjpeg__decode_client_fmt(&cinfo, pixels, rowstride);
+ break;
+ }
-#define DIV255(x) ((x) + 1 + ((x) >> 8)) >> 8
- scanlines[0][i * 4 + 0] = DIV255(ck);
- scanlines[0][i * 4 + 1] = DIV255(mk);
- scanlines[0][i * 4 + 2] = DIV255(yk);
- scanlines[0][i * 4 + 3] = 0xff;
-#undef DIV255
- }
- } else {
-#if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4
- /* Missmatch between configured libjpeg pixel format and
- * NetSurf pixel format. Convert to RGBA */
- int i;
- for (i = width - 1; 0 <= i; i--) {
- int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED];
- int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN];
- int b = scanlines[0][i * RGB_PIXELSIZE + RGB_BLUE];
- scanlines[0][i * 4 + 0] = r;
- scanlines[0][i * 4 + 1] = g;
- scanlines[0][i * 4 + 2] = b;
- scanlines[0][i * 4 + 3] = 0xff;
- }
-#endif
- }
- } while (cinfo.output_scanline != cinfo.output_height);
guit->bitmap->modified(bitmap);
jpeg_finish_decompress(&cinfo);
diff --git a/content/handlers/image/jpegxl.c b/content/handlers/image/jpegxl.c
new file mode 100644
index 000000000..01c704577
--- /dev/null
+++ b/content/handlers/image/jpegxl.c
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2023 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * implementation of content handling for image/jpegxl
+ *
+ * This implementation uses the JXL library.
+ */
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <setjmp.h>
+#include <string.h>
+
+#include <jxl/decode.h>
+
+#include "utils/utils.h"
+#include "utils/log.h"
+#include "utils/messages.h"
+#include "netsurf/bitmap.h"
+#include "content/llcache.h"
+#include "content/content.h"
+#include "content/content_protected.h"
+#include "content/content_factory.h"
+#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
+
+#include "image/image_cache.h"
+
+#include "image/jpegxl.h"
+
+
+/**
+ * output image format
+ */
+static const JxlPixelFormat jxl_output_format = {
+ .num_channels = 4,
+ .data_type = JXL_TYPE_UINT8,
+ .endianness = JXL_LITTLE_ENDIAN,
+ .align = 0,
+};
+
+/**
+ * Content create entry point.
+ */
+static nserror
+nsjpegxl_create(const content_handler *handler,
+ lwc_string *imime_type, const struct http_parameter *params,
+ llcache_handle *llcache, const char *fallback_charset,
+ bool quirks, struct content **c)
+{
+ struct content *jpeg;
+ nserror error;
+
+ jpeg = calloc(1, sizeof(struct content));
+ if (jpeg == NULL)
+ return NSERROR_NOMEM;
+
+ error = content__init(jpeg, handler, imime_type, params,
+ llcache, fallback_charset, quirks);
+ if (error != NSERROR_OK) {
+ free(jpeg);
+ return error;
+ }
+
+ *c = jpeg;
+
+ return NSERROR_OK;
+}
+
+/**
+ * create a bitmap from jpeg xl content.
+ */
+static struct bitmap *
+jpegxl_cache_convert(struct content *c)
+{
+ struct bitmap * bitmap = NULL;
+ JxlDecoder *jxldec;
+ JxlDecoderStatus decstatus;
+ JxlBasicInfo binfo;
+ const uint8_t *src_data;
+ size_t src_size;
+ uint8_t * output;
+ bitmap_fmt_t jxl_fmt = {
+ /** TODO: At the moment we have to set the layout to the only
+ * pixel layout that libjxl supports. It looks like they
+ * plan to add support for decoding to other layouts
+ * in the future, as shown by the TODO in the docs:
+ *
+ * https://libjxl.readthedocs.io/en/latest/api_common.html#_CPPv414JxlPixelFormat
+ */
+ .layout = BITMAP_LAYOUT_R8G8B8A8,
+ .pma = bitmap_fmt.pma,
+ };
+
+ jxldec = JxlDecoderCreate(NULL);
+ if (jxldec == NULL) {
+ NSLOG(netsurf, ERROR, "Unable to allocate decoder");
+ return NULL;
+ }
+
+ decstatus = JxlDecoderSetUnpremultiplyAlpha(jxldec, !bitmap_fmt.pma);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ NSLOG(netsurf, ERROR, "unable to set premultiplied alpha status: %d",
+ decstatus);
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+
+ decstatus= JxlDecoderSubscribeEvents(jxldec, JXL_DEC_FULL_IMAGE);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ NSLOG(netsurf, ERROR, "Unable to subscribe");
+ return NULL;
+ }
+ src_data = content__get_source_data(c, &src_size);
+
+ decstatus = JxlDecoderSetInput(jxldec, src_data, src_size);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ NSLOG(netsurf, ERROR, "unable to set input");
+ return NULL;
+ }
+
+ decstatus = JxlDecoderProcessInput(jxldec);
+ if (decstatus != JXL_DEC_NEED_IMAGE_OUT_BUFFER) {
+ NSLOG(netsurf, ERROR,
+ "expected status JXL_DEC_NEED_IMAGE_OUT_BUFFER(%d) got %d",
+ JXL_DEC_NEED_IMAGE_OUT_BUFFER,
+ decstatus);
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+
+ decstatus = JxlDecoderGetBasicInfo(jxldec, &binfo);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ NSLOG(netsurf, ERROR, "unable to get basic info status:%d",decstatus);
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+
+ /* create bitmap with appropriate opacity */
+ if (binfo.alpha_bits > 0) {
+ bitmap = guit->bitmap->create(c->width, c->height, BITMAP_OPAQUE);
+ } else {
+ bitmap = guit->bitmap->create(c->width, c->height, BITMAP_NONE);
+ }
+ if (bitmap == NULL) {
+ /* empty bitmap could not be created */
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+
+ /* ensure buffer was allocated */
+ output = guit->bitmap->get_buffer(bitmap);
+ if (output == NULL) {
+ /* bitmap with no buffer available */
+ guit->bitmap->destroy(bitmap);
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+ decstatus = JxlDecoderSetImageOutBuffer(jxldec, &jxl_output_format, output, c->size);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ NSLOG(netsurf, ERROR, "unable to set output buffer callback status:%d",decstatus);
+ guit->bitmap->destroy(bitmap);
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+
+ decstatus = JxlDecoderProcessInput(jxldec);
+ if (decstatus != JXL_DEC_FULL_IMAGE) {
+ NSLOG(netsurf, ERROR, "did not get decode event");
+ guit->bitmap->destroy(bitmap);
+ JxlDecoderDestroy(jxldec);
+ return NULL;
+ }
+
+ JxlDecoderDestroy(jxldec);
+
+ bitmap_format_to_client(bitmap, &jxl_fmt);
+ guit->bitmap->modified(bitmap);
+
+ return bitmap;
+}
+
+/**
+ * report failiure
+ */
+static bool jxl_report_fail(struct content *c, JxlDecoderStatus decstatus, const char *msg)
+{
+ union content_msg_data msg_data;
+ NSLOG(netsurf, ERROR, "%s decoder status:%d", msg, decstatus);
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = msg;
+ content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
+ return false;
+}
+
+/**
+ * Convert a CONTENT_JPEGXL for display.
+ */
+static bool nsjpegxl_convert(struct content *c)
+{
+ JxlDecoder *jxldec;
+ JxlSignature decsig;
+ JxlDecoderStatus decstatus = JXL_DEC_ERROR;
+ JxlBasicInfo binfo;
+ union content_msg_data msg_data;
+ const uint8_t *data;
+ size_t size;
+ char *title;
+ size_t image_size;
+
+ /* check image header is valid and get width/height */
+ data = content__get_source_data(c, &size);
+
+ decsig = JxlSignatureCheck(data,size);
+ if ((decsig != JXL_SIG_CODESTREAM) && (decsig != JXL_SIG_CONTAINER)) {
+ NSLOG(netsurf, ERROR, "signature failed");
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = "Signature failed";
+ content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
+ return false;
+ }
+
+ jxldec = JxlDecoderCreate(NULL);
+ if (jxldec == NULL) {
+ return jxl_report_fail(c, decstatus, "Unable to allocate decoder");
+ }
+ decstatus= JxlDecoderSubscribeEvents(jxldec, JXL_DEC_BASIC_INFO);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ return jxl_report_fail(c, decstatus, "Unable to subscribe");
+ }
+ decstatus = JxlDecoderSetInput(jxldec, data,size);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ return jxl_report_fail(c, decstatus, "unable to set input");
+ }
+ decstatus = JxlDecoderProcessInput(jxldec);
+ if (decstatus != JXL_DEC_BASIC_INFO) {
+ return jxl_report_fail(c, decstatus, "did not get basic info event");
+ }
+ decstatus = JxlDecoderGetBasicInfo(jxldec, &binfo);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ return jxl_report_fail(c, decstatus, "unable to get basic info");
+ }
+ decstatus = JxlDecoderImageOutBufferSize(jxldec, &jxl_output_format, &image_size);
+ if (decstatus != JXL_DEC_SUCCESS) {
+ return jxl_report_fail(c, decstatus, "unable get image size");
+ }
+
+ JxlDecoderDestroy(jxldec);
+
+ NSLOG(netsurf, INFO, "got basic info size:%ld x:%d y:%d", image_size, binfo.xsize, binfo.ysize);
+
+ c->width = binfo.xsize;
+ c->height = binfo.ysize;
+ c->size = image_size;
+
+ image_cache_add(c, NULL, jpegxl_cache_convert);
+
+ /* set title text */
+ title = messages_get_buff("JPEGXLTitle",
+ nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
+ c->width, c->height);
+ if (title != NULL) {
+ content__set_title(c, title);
+ free(title);
+ }
+
+ content_set_ready(c);
+ content_set_done(c);
+ content_set_status(c, ""); /* Done: update status bar */
+
+ return true;
+}
+
+
+/**
+ * Clone content.
+ */
+static nserror nsjpegxl_clone(const struct content *old, struct content **newc)
+{
+ struct content *jpegxl_c;
+ nserror error;
+
+ jpegxl_c = calloc(1, sizeof(struct content));
+ if (jpegxl_c == NULL)
+ return NSERROR_NOMEM;
+
+ error = content__clone(old, jpegxl_c);
+ if (error != NSERROR_OK) {
+ content_destroy(jpegxl_c);
+ return error;
+ }
+
+ /* re-convert if the content is ready */
+ if ((old->status == CONTENT_STATUS_READY) ||
+ (old->status == CONTENT_STATUS_DONE)) {
+ if (nsjpegxl_convert(jpegxl_c) == false) {
+ content_destroy(jpegxl_c);
+ return NSERROR_CLONE_FAILED;
+ }
+ }
+
+ *newc = jpegxl_c;
+
+ return NSERROR_OK;
+}
+
+static const content_handler nsjpegxl_content_handler = {
+ .create = nsjpegxl_create,
+ .data_complete = nsjpegxl_convert,
+ .destroy = image_cache_destroy,
+ .redraw = image_cache_redraw,
+ .clone = nsjpegxl_clone,
+ .get_internal = image_cache_get_internal,
+ .type = image_cache_content_type,
+ .is_opaque = image_cache_is_opaque,
+ .no_share = false,
+};
+
+static const char *nsjpegxl_types[] = {
+ "image/jxl",
+};
+
+CONTENT_FACTORY_REGISTER_TYPES(nsjpegxl, nsjpegxl_types, nsjpegxl_content_handler);
diff --git a/content/handlers/image/jpegxl.h b/content/handlers/image/jpegxl.h
new file mode 100644
index 000000000..e37d9344e
--- /dev/null
+++ b/content/handlers/image/jpegxl.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2023 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** \file
+ * Content for image/jpegxl (interface).
+ */
+
+#ifndef _NETSURF_IMAGE_JPEGXL_H_
+#define _NETSURF_IMAGE_JPEGXL_H_
+
+nserror nsjpegxl_init(void);
+
+#endif
diff --git a/content/handlers/image/nssprite.c b/content/handlers/image/nssprite.c
index a4ce6b574..c18f49063 100644
--- a/content/handlers/image/nssprite.c
+++ b/content/handlers/image/nssprite.c
@@ -23,6 +23,8 @@
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
+
#include <librosprite.h>
#include "utils/utils.h"
@@ -35,6 +37,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/nssprite.h"
@@ -116,31 +119,19 @@ static bool nssprite_convert(struct content *c)
struct rosprite* sprite = sprite_area->sprites[0];
- nssprite->bitmap = guit->bitmap->create(sprite->width, sprite->height, BITMAP_NEW);
+ nssprite->bitmap = guit->bitmap->create(sprite->width, sprite->height, BITMAP_NONE);
if (!nssprite->bitmap) {
content_broadcast_error(c, NSERROR_NOMEM, NULL);
return false;
}
- uint32_t* imagebuf = (uint32_t *)guit->bitmap->get_buffer(nssprite->bitmap);
+ uint32_t* imagebuf = (uint32_t *)(void *)guit->bitmap->get_buffer(nssprite->bitmap);
if (!imagebuf) {
content_broadcast_error(c, NSERROR_NOMEM, NULL);
return false;
}
unsigned char *spritebuf = (unsigned char *)sprite->image;
- /* reverse byte order of each word */
- for (uint32_t y = 0; y < sprite->height; y++) {
- for (uint32_t x = 0; x < sprite->width; x++) {
- int offset = 4 * (y * sprite->width + x);
-
- *imagebuf = (spritebuf[offset] << 24) |
- (spritebuf[offset + 1] << 16) |
- (spritebuf[offset + 2] << 8) |
- (spritebuf[offset + 3]);
-
- imagebuf++;
- }
- }
+ memcpy(imagebuf, spritebuf, sprite->width * sprite->height * 4);
c->width = sprite->width;
c->height = sprite->height;
@@ -154,6 +145,9 @@ static bool nssprite_convert(struct content *c)
free(title);
}
+ bitmap_format_to_client(nssprite->bitmap, &(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_A8B8G8R8,
+ });
guit->bitmap->modified(nssprite->bitmap);
content_set_ready(c);
diff --git a/content/handlers/image/png.c b/content/handlers/image/png.c
index 06a38ca0f..97a5795b3 100644
--- a/content/handlers/image/png.c
+++ b/content/handlers/image/png.c
@@ -32,6 +32,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/image_cache.h"
#include "image/png.h"
@@ -118,8 +119,37 @@ static void nspng_setup_transforms(png_structp png_ptr, png_infop info_ptr)
png_set_gray_to_rgb(png_ptr);
}
+ switch (bitmap_fmt.layout) {
+ case BITMAP_LAYOUT_B8G8R8A8: /* Fall through. */
+ case BITMAP_LAYOUT_A8B8G8R8:
+ png_set_bgr(png_ptr);
+ break;
+ default:
+ /* RGB is the default. */
+ break;
+ }
+
if (!(color_type & PNG_COLOR_MASK_ALPHA)) {
- png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
+ switch (bitmap_fmt.layout) {
+ case BITMAP_LAYOUT_A8R8G8B8: /* Fall through. */
+ case BITMAP_LAYOUT_A8B8G8R8:
+ png_set_filler(png_ptr, 0xff, PNG_FILLER_BEFORE);
+ break;
+
+ default:
+ png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
+ break;
+ }
+ } else {
+ switch (bitmap_fmt.layout) {
+ case BITMAP_LAYOUT_A8R8G8B8: /* Fall through. */
+ case BITMAP_LAYOUT_A8B8G8R8:
+ png_set_swap_alpha(png_ptr);
+ break;
+ default:
+ /* Alpha as final component is the default. */
+ break;
+ }
}
/* gamma correction - we use 2.2 as our screen gamma
@@ -163,14 +193,14 @@ static void info_callback(png_structp png_s, png_infop info)
}
/* Claim the required memory for the converted PNG */
- png_c->bitmap = guit->bitmap->create(width, height, BITMAP_NEW);
+ png_c->bitmap = guit->bitmap->create(width, height, BITMAP_NONE);
if (png_c->bitmap == NULL) {
/* Failed to create bitmap skip pre-conversion */
longjmp(png_jmpbuf(png_s), CBERR_NOPRE);
}
png_c->rowstride = guit->bitmap->get_rowstride(png_c->bitmap);
- png_c->bpp = guit->bitmap->get_bpp(png_c->bitmap);
+ png_c->bpp = sizeof(uint32_t);
nspng_setup_transforms(png_s, info);
@@ -483,7 +513,7 @@ png_cache_convert(struct content *c)
height = png_get_image_height(png_ptr, info_ptr);
/* Claim the required memory for the converted PNG */
- bitmap = guit->bitmap->create(width, height, BITMAP_NEW);
+ bitmap = guit->bitmap->create(width, height, BITMAP_NONE);
if (bitmap == NULL) {
/* cleanup and bail */
goto png_cache_convert_error;
@@ -508,7 +538,13 @@ png_cache_convert_error:
}
if (bitmap != NULL) {
- guit->bitmap->modified((struct bitmap *)bitmap);
+ bool opaque = bitmap_test_opaque((void *)bitmap);
+ guit->bitmap->set_opaque((void *)bitmap, opaque);
+ bitmap_format_to_client((void *)bitmap, &(bitmap_fmt_t) {
+ .layout = bitmap_fmt.layout,
+ .pma = opaque ? bitmap_fmt.pma : false,
+ });
+ guit->bitmap->modified((void *)bitmap);
}
return (struct bitmap *)bitmap;
@@ -535,7 +571,12 @@ static bool nspng_convert(struct content *c)
}
if (png_c->bitmap != NULL) {
- guit->bitmap->set_opaque(png_c->bitmap, guit->bitmap->test_opaque(png_c->bitmap));
+ bool opaque = bitmap_test_opaque(png_c->bitmap);
+ guit->bitmap->set_opaque(png_c->bitmap, opaque);
+ bitmap_format_to_client(png_c->bitmap, &(bitmap_fmt_t) {
+ .layout = bitmap_fmt.layout,
+ .pma = opaque ? bitmap_fmt.pma : false,
+ });
guit->bitmap->modified(png_c->bitmap);
}
diff --git a/content/handlers/image/rsvg.c b/content/handlers/image/rsvg.c
index 0051df38f..24fc1a4e0 100644
--- a/content/handlers/image/rsvg.c
+++ b/content/handlers/image/rsvg.c
@@ -51,6 +51,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/rsvg.h"
@@ -128,41 +129,6 @@ static bool rsvg_process_data(struct content *c, const char *data,
return true;
}
-/** Convert Cairo's ARGB output to NetSurf's favoured ABGR format. It converts
- * the data in-place.
- *
- * \param pixels Pixel data, in the form of ARGB. This will
- * be overwritten with new data in the form of ABGR.
- * \param width Width of the bitmap
- * \param height Height of the bitmap
- * \param rowstride Number of bytes to skip after each row (this
- * implementation requires this to be a multiple of 4.)
- */
-static inline void rsvg_argb_to_abgr(uint8_t *pixels,
- int width, int height, size_t rowstride)
-{
- uint8_t *p = pixels;
- int boff = 0, roff = 2;
-
- if (endian_host_is_le() == false) {
- boff = 1;
- roff = 3;
- }
-
- for (int y = 0; y < height; y++) {
- for (int x = 0; x < width; x++) {
- /* Swap R and B */
- const uint8_t r = p[4*x+roff];
-
- p[4*x+roff] = p[4*x+boff];
-
- p[4*x+boff] = r;
- }
-
- p += rowstride;
- }
-}
-
static bool rsvg_convert(struct content *c)
{
rsvg_content *d = (rsvg_content *) c;
@@ -187,7 +153,7 @@ static bool rsvg_convert(struct content *c)
c->height = rsvgsize.height;
if ((d->bitmap = guit->bitmap->create(c->width, c->height,
- BITMAP_NEW)) == NULL) {
+ BITMAP_NONE)) == NULL) {
NSLOG(netsurf, INFO,
"Failed to create bitmap for rsvg render.");
content_broadcast_error(c, NSERROR_NOMEM, NULL);
@@ -213,10 +179,10 @@ static bool rsvg_convert(struct content *c)
}
rsvg_handle_render_cairo(d->rsvgh, d->ct);
- rsvg_argb_to_abgr(guit->bitmap->get_buffer(d->bitmap),
- c->width, c->height,
- guit->bitmap->get_rowstride(d->bitmap));
+ bitmap_format_to_client(d->bitmap, &(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ });
guit->bitmap->modified(d->bitmap);
content_set_ready(c);
content_set_done(c);
diff --git a/content/handlers/image/rsvg246.c b/content/handlers/image/rsvg246.c
new file mode 100644
index 000000000..0e337132f
--- /dev/null
+++ b/content/handlers/image/rsvg246.c
@@ -0,0 +1,280 @@
+/*
+ * Copyright 2022 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * implementation of content handler for image/svg using librsvg 2.46 API.
+ *
+ * SVG files are rendered to a NetSurf bitmap by creating a Cairo rendering
+ * surface (content_rsvg_data.cs) over the bitmap's data, creating a Cairo
+ * drawing context using that surface, and then passing that drawing context
+ * to librsvg which then uses Cairo calls to plot the graphic to the bitmap.
+ * We store this in content->bitmap, and then use the usual bitmap plotter
+ * function to render it for redraw requests.
+ */
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include <assert.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include <librsvg/rsvg.h>
+
+#include <nsutils/endian.h>
+
+#include "utils/log.h"
+#include "utils/utils.h"
+#include "utils/messages.h"
+#include "netsurf/plotters.h"
+#include "netsurf/bitmap.h"
+#include "netsurf/content.h"
+#include "content/llcache.h"
+#include "content/content_protected.h"
+#include "content/content_factory.h"
+#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
+
+#include "image/image_cache.h"
+
+#include "image/rsvg.h"
+
+
+typedef struct rsvg_content {
+ struct content base;
+
+ RsvgHandle *rsvgh; /**< Context handle for RSVG renderer */
+} rsvg_content;
+
+
+static nserror
+rsvg_create(const content_handler *handler,
+ lwc_string *imime_type,
+ const struct http_parameter *params,
+ llcache_handle *llcache,
+ const char *fallback_charset,
+ bool quirks,
+ struct content **c)
+{
+ rsvg_content *svg;
+ nserror error;
+
+ svg = calloc(1, sizeof(rsvg_content));
+ if (svg == NULL)
+ return NSERROR_NOMEM;
+
+ error = content__init(&svg->base, handler, imime_type, params,
+ llcache, fallback_charset, quirks);
+ if (error != NSERROR_OK) {
+ free(svg);
+ return error;
+ }
+
+ *c = (struct content *)svg;
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * create a bitmap from jpeg content for the image cache.
+ */
+static struct bitmap *
+rsvg_cache_convert(struct content *c)
+{
+ rsvg_content *svgc = (rsvg_content *)c;
+ struct bitmap *bitmap;
+ cairo_surface_t *cs;
+ cairo_t *cr;
+ RsvgRectangle viewport;
+ gboolean renderres;
+
+ if ((bitmap = guit->bitmap->create(c->width, c->height, BITMAP_NONE)) == NULL) {
+ NSLOG(netsurf, INFO, "Failed to create bitmap for rsvg render.");
+ return NULL;
+ }
+
+ if ((cs = cairo_image_surface_create_for_data(
+ (unsigned char *)guit->bitmap->get_buffer(bitmap),
+ CAIRO_FORMAT_ARGB32,
+ c->width, c->height,
+ guit->bitmap->get_rowstride(bitmap))) == NULL) {
+ NSLOG(netsurf, INFO, "Failed to create Cairo image surface for rsvg render.");
+ guit->bitmap->destroy(bitmap);
+ return NULL;
+ }
+ if ((cr = cairo_create(cs)) == NULL) {
+ NSLOG(netsurf, INFO,
+ "Failed to create Cairo drawing context for rsvg render.");
+ cairo_surface_destroy(cs);
+ guit->bitmap->destroy(bitmap);
+ return NULL;
+ }
+
+ viewport.x = 0;
+ viewport.y = 0;
+ viewport.width = c->width;
+ viewport.height = c->height;
+ renderres = rsvg_handle_render_document(svgc->rsvgh, cr, &viewport, NULL);
+ NSLOG(netsurf, DEBUG, "rsvg render:%d, width:%d, height %d", renderres, c->width, c->height);
+
+ bitmap_format_to_client(bitmap, &(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ });
+ guit->bitmap->modified(bitmap);
+
+ cairo_destroy(cr);
+ cairo_surface_destroy(cs);
+
+ return bitmap;
+}
+
+static void rsvg__get_demensions(const rsvg_content *svgc,
+ int *width, int *height)
+{
+#if LIBRSVG_MAJOR_VERSION >= 2 && LIBRSVG_MINOR_VERSION >= 52
+ gdouble rwidth;
+ gdouble rheight;
+ gboolean gotsize;
+
+ gotsize = rsvg_handle_get_intrinsic_size_in_pixels(svgc->rsvgh,
+ &rwidth,
+ &rheight);
+ if (gotsize == TRUE) {
+ *width = rwidth;
+ *height = rheight;
+ } else {
+ RsvgRectangle ink_rect;
+ RsvgRectangle logical_rect;
+ rsvg_handle_get_geometry_for_element(svgc->rsvgh,
+ NULL,
+ &ink_rect,
+ &logical_rect,
+ NULL);
+ *width = ink_rect.width;
+ *height = ink_rect.height;
+ }
+#else
+ RsvgDimensionData rsvgsize;
+
+ rsvg_handle_get_dimensions(svgc->rsvgh, &rsvgsize);
+ *width = rsvgsize.width;
+ *height = rsvgsize.height;
+#endif
+ NSLOG(netsurf, DEBUG, "rsvg width:%d height:%d.", *width, *height);
+}
+
+static bool rsvg_convert(struct content *c)
+{
+ rsvg_content *svgc = (rsvg_content *)c;
+ const uint8_t *data; /* content data */
+ size_t size; /* content data size */
+ GInputStream * istream;
+ GError *gerror = NULL;
+
+ /* check image header is valid and get width/height */
+
+ data = content__get_source_data(c, &size);
+
+ istream = g_memory_input_stream_new_from_data(data, size, NULL);
+ svgc->rsvgh = rsvg_handle_new_from_stream_sync(istream,
+ NULL,
+ RSVG_HANDLE_FLAGS_NONE,
+ NULL,
+ &gerror);
+ g_object_unref(istream);
+ if (svgc->rsvgh == NULL) {
+ NSLOG(netsurf, INFO, "Failed to create rsvg handle for content.");
+ return false;
+ }
+
+ rsvg__get_demensions(svgc, &c->width, &c->height);
+
+ c->size = c->width * c->height * 4;
+
+ image_cache_add(c, NULL, rsvg_cache_convert);
+
+ content_set_ready(c);
+ content_set_done(c);
+ content_set_status(c, ""); /* Done: update status bar */
+
+ return true;
+}
+
+
+static nserror rsvg_clone(const struct content *old, struct content **newc)
+{
+ rsvg_content *svg;
+ nserror error;
+
+ svg = calloc(1, sizeof(rsvg_content));
+ if (svg == NULL)
+ return NSERROR_NOMEM;
+
+ error = content__clone(old, &svg->base);
+ if (error != NSERROR_OK) {
+ content_destroy(&svg->base);
+ return error;
+ }
+
+ /* re-convert if the content is ready */
+ if ((old->status == CONTENT_STATUS_READY) ||
+ (old->status == CONTENT_STATUS_DONE)) {
+ if (rsvg_convert(&svg->base) == false) {
+ content_destroy(&svg->base);
+ return NSERROR_CLONE_FAILED;
+ }
+ }
+
+ *newc = (struct content *)svg;
+
+ return NSERROR_OK;
+}
+
+
+static void rsvg_destroy(struct content *c)
+{
+ rsvg_content *d = (rsvg_content *) c;
+
+ if (d->rsvgh != NULL) {
+ g_object_unref(d->rsvgh);
+ d->rsvgh = NULL;
+ }
+
+ return image_cache_destroy(c);
+}
+
+static const content_handler rsvg_content_handler = {
+ .create = rsvg_create,
+ .data_complete = rsvg_convert,
+ .destroy = rsvg_destroy,
+ .redraw = image_cache_redraw,
+ .clone = rsvg_clone,
+ .get_internal = image_cache_get_internal,
+ .type = image_cache_content_type,
+ .is_opaque = image_cache_is_opaque,
+ .no_share = false,
+};
+
+static const char *rsvg_types[] = {
+ "image/svg",
+ "image/svg+xml"
+};
+
+CONTENT_FACTORY_REGISTER_TYPES(nsrsvg, rsvg_types, rsvg_content_handler);
+
diff --git a/content/handlers/image/webp.c b/content/handlers/image/webp.c
index 721e92438..c04c0efd2 100644
--- a/content/handlers/image/webp.c
+++ b/content/handlers/image/webp.c
@@ -38,6 +38,7 @@
#include "content/content_protected.h"
#include "content/content_factory.h"
#include "desktop/gui_internal.h"
+#include "desktop/bitmap.h"
#include "image/image_cache.h"
@@ -97,6 +98,9 @@ webp_cache_convert(struct content *c)
uint8_t *decoded;
size_t rowstride;
struct bitmap *bitmap = NULL;
+ bitmap_fmt_t webp_fmt = {
+ .layout = bitmap_fmt.layout,
+ };
source_data = content__get_source_data(c, &source_size);
@@ -107,9 +111,13 @@ webp_cache_convert(struct content *c)
}
if (webpfeatures.has_alpha == 0) {
- bmap_flags = BITMAP_NEW | BITMAP_OPAQUE;
+ bmap_flags = BITMAP_OPAQUE;
+ /* Image has no alpha. Premultiplied alpha makes no difference.
+ * Optimisation: Avoid unnecessary conversion by copying format.
+ */
+ webp_fmt.pma = bitmap_fmt.pma;
} else {
- bmap_flags = BITMAP_NEW;
+ bmap_flags = BITMAP_NONE;
}
/* create bitmap */
@@ -130,17 +138,33 @@ webp_cache_convert(struct content *c)
rowstride = guit->bitmap->get_rowstride(bitmap);
- decoded = WebPDecodeRGBAInto(source_data,
- source_size,
- pixels,
- webpfeatures.width * webpfeatures.height * 4,
- rowstride);
+ switch (webp_fmt.layout) {
+ default:
+ /* WebP has no ABGR function, fall back to default. */
+ webp_fmt.layout = BITMAP_LAYOUT_R8G8B8A8;
+ fallthrough;
+ case BITMAP_LAYOUT_R8G8B8A8:
+ decoded = WebPDecodeRGBAInto(source_data, source_size, pixels,
+ rowstride * webpfeatures.height, rowstride);
+ break;
+
+ case BITMAP_LAYOUT_B8G8R8A8:
+ decoded = WebPDecodeBGRAInto(source_data, source_size, pixels,
+ rowstride * webpfeatures.height, rowstride);
+ break;
+
+ case BITMAP_LAYOUT_A8R8G8B8:
+ decoded = WebPDecodeARGBInto(source_data, source_size, pixels,
+ rowstride * webpfeatures.height, rowstride);
+ break;
+ }
if (decoded == NULL) {
/* decode failed */
guit->bitmap->destroy(bitmap);
return NULL;
}
+ bitmap_format_to_client(bitmap, &webp_fmt);
guit->bitmap->modified(bitmap);
return bitmap;
diff --git a/content/handlers/javascript/duktape/CSSRule.bnd b/content/handlers/javascript/duktape/CSSRule.bnd
new file mode 100644
index 000000000..555023c85
--- /dev/null
+++ b/content/handlers/javascript/duktape/CSSRule.bnd
@@ -0,0 +1,22 @@
+/* CSS Rule binding for NetSurf using duktape and libcss/libdom
+ *
+ * Copyright 2022 Daniel Silverstone <dsilvers@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+/* Note, for now this exists purely to block warnings, eventually
+ * rules will have to come from stylesheets etc.
+ */
+
+class CSSRule {
+ private bool unused;
+};
+
+init CSSRule()
+%{
+ priv->unused = true;
+%}
diff --git a/content/handlers/javascript/duktape/CSSStyleSheet.bnd b/content/handlers/javascript/duktape/CSSStyleSheet.bnd
new file mode 100644
index 000000000..9167b8afa
--- /dev/null
+++ b/content/handlers/javascript/duktape/CSSStyleSheet.bnd
@@ -0,0 +1,22 @@
+/* CSS Stylesheet binding for NetSurf using duktape and libcss/libdom
+ *
+ * Copyright 2022 Daniel Silverstone <dsilvers@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+/* Note, for now this exists purely to block warnings, eventually
+ * stylesheets will have to come from documents etc.
+ */
+
+class CSSStyleSheet {
+ private bool unused;
+};
+
+init CSSStyleSheet()
+%{
+ priv->unused = true;
+%}
diff --git a/content/handlers/javascript/duktape/CanvasRenderingContext2D.bnd b/content/handlers/javascript/duktape/CanvasRenderingContext2D.bnd
index db3c4efa3..2fe73f4e1 100644
--- a/content/handlers/javascript/duktape/CanvasRenderingContext2D.bnd
+++ b/content/handlers/javascript/duktape/CanvasRenderingContext2D.bnd
@@ -90,7 +90,7 @@ canvas2d_user_data_handler(dom_node_operation operation,
height = guit->bitmap->get_height(bitmap);
stride = guit->bitmap->get_rowstride(bitmap);
newbitmap = guit->bitmap->create(width, height,
- BITMAP_NEW);
+ BITMAP_NONE);
if (newbitmap != NULL) {
if (guit->bitmap->get_rowstride(newbitmap) == stride) {
// Compatible bitmap, bung the data over
@@ -173,7 +173,7 @@ static nserror canvas2d_create_bitmap(dom_node *node, struct bitmap **bitmap_out
bitmap = guit->bitmap->create(
(int)width, (int)height,
- BITMAP_NEW);
+ BITMAP_NONE);
if (bitmap == NULL) {
return NSERROR_NOMEM;
@@ -242,7 +242,7 @@ canvas2d__handle_dom_event(dom_event *evt, void *pw)
/* Okay, we need to reallocate our bitmap and re-cache values */
- newbitmap = guit->bitmap->create(width, height, BITMAP_NEW);
+ newbitmap = guit->bitmap->create(width, height, BITMAP_NONE);
stride = guit->bitmap->get_rowstride(newbitmap);
if (newbitmap != NULL) {
diff --git a/content/handlers/javascript/duktape/Console.bnd b/content/handlers/javascript/duktape/Console.bnd
index 74601d6d4..89d13cfad 100644
--- a/content/handlers/javascript/duktape/Console.bnd
+++ b/content/handlers/javascript/duktape/Console.bnd
@@ -182,7 +182,7 @@ method Console::timeEnd()
duk_del_prop(ctx, 0);
duk_push_string(ctx, "Timer elapsed: ");
duk_insert(ctx, 0);
- duk_push_sprintf(ctx, "%lu ms", (duk_uint_t)(time_ms - old_time_ms));
+ duk_push_sprintf(ctx, "%u ms", (duk_uint_t)(time_ms - old_time_ms));
write_log_entry(ctx, priv->group, BW_CS_FLAG_LEVEL_INFO);
return 0;
%}
diff --git a/content/handlers/javascript/duktape/DOMSettableTokenList.bnd b/content/handlers/javascript/duktape/DOMSettableTokenList.bnd
new file mode 100644
index 000000000..ac5c7062a
--- /dev/null
+++ b/content/handlers/javascript/duktape/DOMSettableTokenList.bnd
@@ -0,0 +1,44 @@
+/* DOMTokenList binding for browser using duktape and libdom
+ *
+ * Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+class DOMSettableTokenList {
+};
+
+init DOMSettableTokenList(struct dom_tokenlist *tokens::tokens);
+
+getter DOMSettableTokenList::value()
+%{
+ dom_exception exc;
+ dom_string *value;
+
+ exc = dom_tokenlist_get_value(priv->parent.tokens, &value);
+ if (exc != DOM_NO_ERR) return 0; /* coerced to undefined */
+
+ duk_push_lstring(ctx, dom_string_data(value), dom_string_length(value));
+ dom_string_unref(value);
+
+ return 1;
+%}
+
+setter DOMSettableTokenList::value()
+%{
+ dom_exception exc;
+ dom_string *value;
+ duk_size_t slen;
+ const char *s = duk_require_lstring(ctx, 0, &slen);
+
+ exc = dom_string_create_interned((const uint8_t *)s, slen, &value);
+ if (exc != DOM_NO_ERR) return 0;
+
+ exc = dom_tokenlist_set_value(priv->parent.tokens, value);
+ dom_string_unref(value);
+
+ return 0;
+%} \ No newline at end of file
diff --git a/content/handlers/javascript/duktape/DOMTokenList.bnd b/content/handlers/javascript/duktape/DOMTokenList.bnd
new file mode 100644
index 000000000..928d9ef35
--- /dev/null
+++ b/content/handlers/javascript/duktape/DOMTokenList.bnd
@@ -0,0 +1,163 @@
+/* DOMTokenList binding for browser using duktape and libdom
+ *
+ * Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+class DOMTokenList {
+ private struct dom_tokenlist *tokens;
+};
+
+init DOMTokenList(struct dom_tokenlist *tokens)
+%{
+ priv->tokens = tokens;
+ dom_tokenlist_ref(tokens);
+%}
+
+fini DOMTokenList()
+%{
+ dom_tokenlist_unref(priv->tokens);
+%}
+
+getter DOMTokenList::length()
+%{
+ dom_exception err;
+ uint32_t len;
+
+ err = dom_tokenlist_get_length(priv->tokens, &len);
+
+ if (err != DOM_NO_ERR) return 0; /* coerced to undefined */
+
+ duk_push_uint(ctx, (duk_uint_t)len);
+
+ return 1;
+%}
+
+method DOMTokenList::item()
+%{
+ unsigned long i = duk_to_uint(ctx, 0);
+ dom_exception err;
+ dom_string *value;
+
+ err = dom_tokenlist_item(priv->tokens, i, &value);
+
+ if (err != DOM_NO_ERR) return 0; /* coerced to undefined */
+
+ if (value == NULL) {
+ duk_push_null(ctx);
+ return 1;
+ }
+
+ duk_push_lstring(ctx, dom_string_data(value), dom_string_length(value));
+ dom_string_unref(value);
+
+ return 1;
+%}
+
+method DOMTokenList::add()
+%{
+ dom_exception exc;
+ dom_string *value;
+ duk_size_t slen;
+ const char *s;
+ duk_idx_t spos;
+
+ for (spos = 0; spos < duk_get_top(ctx); ++spos) {
+ s = duk_safe_to_lstring(ctx, spos, &slen);
+
+ duk_safe_to_lstring(ctx, 0, &slen);
+
+ exc = dom_string_create_interned((const uint8_t *)s, slen, &value);
+ if (exc != DOM_NO_ERR) return 0;
+
+ exc = dom_tokenlist_add(priv->tokens, value);
+ dom_string_unref(value);
+ }
+
+ return 0;
+%}
+
+method DOMTokenList::remove()
+%{
+ dom_exception exc;
+ dom_string *value;
+ duk_size_t slen;
+ const char *s;
+ duk_idx_t spos;
+
+ for (spos = 0; spos < duk_get_top(ctx); ++spos) {
+ s = duk_safe_to_lstring(ctx, spos, &slen);
+
+ duk_safe_to_lstring(ctx, 0, &slen);
+
+ exc = dom_string_create_interned((const uint8_t *)s, slen, &value);
+ if (exc != DOM_NO_ERR) return 0;
+
+ exc = dom_tokenlist_remove(priv->tokens, value);
+ dom_string_unref(value);
+ }
+
+ return 0;
+%}
+
+method DOMTokenList::contains()
+%{
+ dom_exception exc;
+ dom_string *value;
+ duk_size_t slen;
+ const char *s = duk_safe_to_lstring(ctx, 0, &slen);
+ bool present = false;
+
+ exc = dom_string_create_interned((const uint8_t *)s, slen, &value);
+ if (exc != DOM_NO_ERR) return 0;
+
+ exc = dom_tokenlist_contains(priv->tokens, value, &present);
+ dom_string_unref(value);
+ if (exc != DOM_NO_ERR) return 0;
+
+ duk_push_boolean(ctx, present);
+
+ return 1;
+%}
+
+method DOMTokenList::toggle()
+%{
+ dom_exception exc;
+ dom_string *value;
+ duk_size_t slen;
+ const char *s = duk_require_lstring(ctx, 0, &slen);
+ bool toggle_set = duk_get_top(ctx) > 1;
+ bool toggle = duk_opt_boolean(ctx, 1, 0);
+ bool present;
+
+ exc = dom_string_create_interned((const uint8_t *)s, slen, &value);
+ if (exc != DOM_NO_ERR) return 0;
+
+ exc = dom_tokenlist_contains(priv->tokens, value, &present);
+ if (exc != DOM_NO_ERR) {
+ dom_string_unref(value);
+ return 0;
+ }
+
+ /* Decision matrix is based on present, toggle_set, and toggle */
+ if (toggle_set) {
+ if (toggle) {
+ exc = dom_tokenlist_add(priv->tokens, value);
+ } else {
+ exc = dom_tokenlist_remove(priv->tokens, value);
+ }
+ } else {
+ if (present) {
+ exc = dom_tokenlist_add(priv->tokens, value);
+ } else {
+ exc = dom_tokenlist_remove(priv->tokens, value);
+ }
+ }
+ dom_string_unref(value);
+
+ return 0;
+%} \ No newline at end of file
diff --git a/content/handlers/javascript/duktape/Element.bnd b/content/handlers/javascript/duktape/Element.bnd
index a965a6ceb..ff0686fd9 100644
--- a/content/handlers/javascript/duktape/Element.bnd
+++ b/content/handlers/javascript/duktape/Element.bnd
@@ -392,6 +392,37 @@ setter Element::className ()
return 0;
%}
+getter Element::classList ()
+%{
+ dom_exception exc;
+ dom_tokenlist *tokens;
+
+ duk_set_top(ctx, 0);
+ duk_push_this(ctx);
+ duk_get_prop_string(ctx, 0, MAGIC(classList));
+
+ if (duk_is_undefined(ctx, -1)) {
+ duk_pop(ctx);
+ exc = dom_tokenlist_create((dom_element *)priv->parent.node, corestring_dom_class, &tokens);
+ if (exc != DOM_NO_ERR) return 0; /* Coerced to undefined */
+
+ /* Create a settable tokenlist - While the IDL says this isn't settable, all browsers
+ * seem to make it settable, so we'll permit it too
+ */
+ duk_push_pointer(ctx, tokens);
+ if (dukky_create_object(ctx, PROTO_NAME(DOMSETTABLETOKENLIST), 1) != DUK_EXEC_SUCCESS) {
+ dom_tokenlist_unref(tokens);
+ NSLOG(dukky, DEBUG, "Unable to create DOMSettableTokenList object");
+ return 0; /* Coerced to undefined */
+ }
+ dom_tokenlist_unref(tokens);
+ duk_dup(ctx, -1);
+ duk_put_prop_string(ctx, 0, MAGIC(classList));
+ }
+
+ return 1;
+%}
+
getter Element::innerHTML()
%{
duk_push_lstring(ctx, "", 0);
diff --git a/content/handlers/javascript/duktape/ImageData.bnd b/content/handlers/javascript/duktape/ImageData.bnd
index 17673d92a..be28cbd77 100644
--- a/content/handlers/javascript/duktape/ImageData.bnd
+++ b/content/handlers/javascript/duktape/ImageData.bnd
@@ -39,6 +39,6 @@ getter ImageData::data()
%{
duk_push_this(ctx);
duk_get_prop_string(ctx, -1, MAGIC(DATA));
- duk_push_buffer_object(ctx, -1, 0, priv->width * priv->height * 4, DUK_BUFOBJ_UINT8CLAMPEDARRAY);
+ duk_push_buffer_object(ctx, -1, 0, priv->width * priv->height * 4llu, DUK_BUFOBJ_UINT8CLAMPEDARRAY);
return 1;
%}
diff --git a/content/handlers/javascript/duktape/duk_config.h b/content/handlers/javascript/duktape/duk_config.h
index 0caed88cf..cba3e0f00 100644
--- a/content/handlers/javascript/duktape/duk_config.h
+++ b/content/handlers/javascript/duktape/duk_config.h
@@ -40,6 +40,8 @@
* - PowerPC 64-bit
* - SPARC 32-bit
* - SPARC 64-bit
+ * - RISC-V 32-bit
+ * - RISC-V 64-bit
* - SuperH
* - Motorola 68k
* - Emscripten
@@ -285,6 +287,22 @@
#endif
#endif
+/* RISC-V, https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions */
+#if defined(__riscv)
+#define DUK_F_RISCV
+#if defined(__riscv_xlen)
+#if (__riscv_xlen == 32)
+#define DUK_F_RISCV32
+#elif (__riscv_xlen == 64)
+#define DUK_F_RISCV64
+#else
+#error __riscv_xlen has unsupported value (not 32 or 64)
+#endif
+#else
+#error __riscv defined without __riscv_xlen
+#endif
+#endif /* __riscv */
+
/* SuperH */
#if defined(__sh__) || \
defined(__sh1__) || defined(__SH1__) || \
@@ -751,7 +769,7 @@
#define DUK_USE_BYTEORDER 3
#endif
#else /* DUK_F_OLD_SOLARIS */
-#include <ast/endian.h>
+#include <sys/param.h>
#endif /* DUK_F_OLD_SOLARIS */
#include <sys/param.h>
@@ -946,9 +964,7 @@
#elif defined(DUK_F_PPC64)
/* --- PowerPC 64-bit --- */
#define DUK_USE_ARCH_STRING "ppc64"
-#if !defined(DUK_USE_BYTEORDER)
-#define DUK_USE_BYTEORDER 3
-#endif
+/* No forced byteorder (both little and big endian are possible). */
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_SPARC32)
@@ -963,6 +979,18 @@
/* SPARC byte order varies so rely on autodetection. */
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
+#elif defined(DUK_F_RISCV32)
+/* --- RISC-V 32-bit --- */
+#define DUK_USE_ARCH_STRING "riscv32"
+#define DUK_USE_BYTEORDER 1
+#define DUK_USE_PACKED_TVAL
+#define DUK_F_PACKED_TVAL_PROVIDED
+#elif defined(DUK_F_RISCV64)
+/* --- RISC-V 64-bit --- */
+#define DUK_USE_ARCH_STRING "riscv64"
+#define DUK_USE_BYTEORDER 1
+#undef DUK_USE_PACKED_TVAL
+#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_SUPERH)
/* --- SuperH --- */
#define DUK_USE_ARCH_STRING "sh"
@@ -1103,7 +1131,7 @@
#define DUK_USE_FLEX_ZEROSIZE
#endif
-#undef DUK_USE_GCC_PRAGMAS
+#define DUK_USE_CLANG_PRAGMAS
#define DUK_USE_PACK_CLANG_ATTR
#if defined(__clang__) && defined(__has_builtin)
@@ -1243,6 +1271,7 @@
#define DUK_USE_FLEX_ZEROSIZE
#endif
+/* Since 4.6 one can '#pragma GCC diagnostic push/pop'. */
#if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 40600)
#define DUK_USE_GCC_PRAGMAS
#else
@@ -2648,12 +2677,15 @@ typedef struct duk_hthread duk_context;
#define DUK_WO_NORETURN(stmt) do { stmt } while (0)
#endif
-#if !defined(DUK_UNREACHABLE)
+#if defined(DUK_UNREACHABLE)
+#define DUK_WO_UNREACHABLE(stmt) do { } while (0)
+#else
/* Don't know how to declare unreachable point, so don't do it; this
* may cause some spurious compilation warnings (e.g. "variable used
* uninitialized").
*/
#define DUK_UNREACHABLE() do { } while (0)
+#define DUK_WO_UNREACHABLE(stmt) do { stmt } while (0)
#endif
#if !defined(DUK_LOSE_CONST)
@@ -2882,6 +2914,10 @@ typedef struct duk_hthread duk_context;
#define DUK_USE_CACHE_ACTIVATION
#define DUK_USE_CACHE_CATCHER
#define DUK_USE_CALLSTACK_LIMIT 10000
+#define DUK_USE_CBOR_BUILTIN
+#define DUK_USE_CBOR_DEC_RECLIMIT 1000
+#define DUK_USE_CBOR_ENC_RECLIMIT 1000
+#define DUK_USE_CBOR_SUPPORT
#define DUK_USE_COMPILER_RECLIMIT 2500
#define DUK_USE_COROUTINE_SUPPORT
#undef DUK_USE_CPP_EXCEPTIONS
@@ -2945,7 +2981,7 @@ typedef struct duk_hthread duk_context;
#undef DUK_USE_GC_TORTURE
#undef DUK_USE_GET_MONOTONIC_TIME
#undef DUK_USE_GET_RANDOM_DOUBLE
-#undef DUK_USE_GLOBAL_BINDING
+#define DUK_USE_GLOBAL_BINDING
#define DUK_USE_GLOBAL_BUILTIN
#undef DUK_USE_HEAPPTR16
#undef DUK_USE_HEAPPTR_DEC16
@@ -2953,6 +2989,7 @@ typedef struct duk_hthread duk_context;
#define DUK_USE_HEX_FASTPATH
#define DUK_USE_HEX_SUPPORT
#define DUK_USE_HOBJECT_ARRAY_ABANDON_LIMIT 2
+#define DUK_USE_HOBJECT_ARRAY_ABANDON_MINSIZE 257
#define DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT 9
#define DUK_USE_HOBJECT_ARRAY_MINGROW_ADD 16
#define DUK_USE_HOBJECT_ARRAY_MINGROW_DIVISOR 8
diff --git a/content/handlers/javascript/duktape/dukky.c b/content/handlers/javascript/duktape/dukky.c
index 52a9c82cf..a780b0067 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -385,7 +385,7 @@ static void dukky_html_element_class_from_tag_type(dom_html_element_type type,
break;
case DOM_HTML_ELEMENT_TYPE__COUNT:
assert(type != DOM_HTML_ELEMENT_TYPE__COUNT);
- /* fallthrough */
+ fallthrough;
case DOM_HTML_ELEMENT_TYPE__UNKNOWN:
SET_HTML_CLASS(UNKNOWN)
break;
@@ -1156,7 +1156,7 @@ static void dukky_generic_event_handler(dom_event *evt, void *pw)
NSLOG(dukky, DEBUG, "Unable to find the event name");
return;
}
- NSLOG(dukky, DEBUG, "Event's name is %*s", dom_string_length(name),
+ NSLOG(dukky, DEBUG, "Event's name is %*s", (int)dom_string_length(name),
dom_string_data(name));
exc = dom_event_get_event_phase(evt, &phase);
if (exc != DOM_NO_ERR) {
@@ -1394,10 +1394,10 @@ void dukky_register_event_listener_for(duk_context *ctx,
if (exc != DOM_NO_ERR) {
NSLOG(dukky, DEBUG,
"Unable to register listener for %p.%*s", ele,
- dom_string_length(name), dom_string_data(name));
+ (int)dom_string_length(name), dom_string_data(name));
} else {
NSLOG(dukky, DEBUG, "have registered listener for %p.%*s",
- ele, dom_string_length(name), dom_string_data(name));
+ ele, (int)dom_string_length(name), dom_string_data(name));
}
dom_event_listener_unref(listen);
}
diff --git a/content/handlers/javascript/duktape/duktape.c b/content/handlers/javascript/duktape/duktape.c
index 47621f038..18b2e99f9 100644
--- a/content/handlers/javascript/duktape/duktape.c
+++ b/content/handlers/javascript/duktape/duktape.c
@@ -1,7 +1,7 @@
/* Omit from static analysis. */
#ifndef __clang_analyzer__
/*
- * Single source autogenerated distributable for Duktape 2.4.0.
+ * Single source autogenerated distributable for Duktape 2.7.0.
*
* Git commit external (external).
* Git branch external.
@@ -18,7 +18,7 @@
*
* (http://opensource.org/licenses/MIT)
*
-* Copyright (c) 2013-2019 by Duktape authors (see AUTHORS.rst)
+* Copyright (c) 2013-present by Duktape authors (see AUTHORS.rst)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -106,6 +106,13 @@
* * James Swift (https://github.com/phraemer)
* * Luis de Bethencourt (https://github.com/luisbg)
* * Ian Whyman (https://github.com/v00d00)
+* * Rick Sayre (https://github.com/whorfin)
+* * Craig Leres (https://github.com/leres)
+* * Maurici Abad (https://github.com/mauriciabad)
+* * Nancy Li (https://github.com/NancyLi1013)
+* * William Parks (https://github.com/WilliamParks)
+* * Sam Hellawell (https://github.com/samhellawell)
+* * Vladislavs Sokurenko (https://github.com/sokurenko)
*
* Other contributions
* ===================
@@ -227,13 +234,14 @@
*
* A B C D E F G H Big endian (e.g. 68k) DUK_USE_DOUBLE_BE
* H G F E D C B A Little endian (e.g. x86) DUK_USE_DOUBLE_LE
- * D C B A H G F E Mixed/cross endian (e.g. ARM) DUK_USE_DOUBLE_ME
+ * D C B A H G F E Mixed endian (e.g. ARM FPA) DUK_USE_DOUBLE_ME
*
- * ARM is a special case: ARM double values are in mixed/cross endian
- * format while ARM duk_uint64_t values are in standard little endian
+ * Legacy ARM (FPA) is a special case: ARM double values are in mixed
+ * endian format while ARM duk_uint64_t values are in standard little endian
* format (H G F E D C B A). When a double is read as a duk_uint64_t
* from memory, the register will contain the (logical) value
* E F G H A B C D. This requires some special handling below.
+ * See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0056d/Bcfhgcgd.html.
*
* Indexes of various types (8-bit, 16-bit, 32-bit) in memory relative to
* the logical (big endian) order:
@@ -266,7 +274,7 @@ union duk_double_union {
duk_uint16_t us[4];
duk_uint8_t uc[8];
#if defined(DUK_USE_PACKED_TVAL)
- void *vp[2]; /* used by packed duk_tval, assumes sizeof(void *) == 4 */
+ void *vp[2]; /* used by packed duk_tval, assumes sizeof(void *) == 4 */
#endif
};
@@ -278,64 +286,64 @@ typedef union duk_double_union duk_double_union;
#if defined(DUK_USE_DOUBLE_LE)
#if defined(DUK_USE_64BIT_OPS)
-#define DUK_DBL_IDX_ULL0 0
-#endif
-#define DUK_DBL_IDX_UI0 1
-#define DUK_DBL_IDX_UI1 0
-#define DUK_DBL_IDX_US0 3
-#define DUK_DBL_IDX_US1 2
-#define DUK_DBL_IDX_US2 1
-#define DUK_DBL_IDX_US3 0
-#define DUK_DBL_IDX_UC0 7
-#define DUK_DBL_IDX_UC1 6
-#define DUK_DBL_IDX_UC2 5
-#define DUK_DBL_IDX_UC3 4
-#define DUK_DBL_IDX_UC4 3
-#define DUK_DBL_IDX_UC5 2
-#define DUK_DBL_IDX_UC6 1
-#define DUK_DBL_IDX_UC7 0
-#define DUK_DBL_IDX_VP0 DUK_DBL_IDX_UI0 /* packed tval */
-#define DUK_DBL_IDX_VP1 DUK_DBL_IDX_UI1 /* packed tval */
+#define DUK_DBL_IDX_ULL0 0
+#endif
+#define DUK_DBL_IDX_UI0 1
+#define DUK_DBL_IDX_UI1 0
+#define DUK_DBL_IDX_US0 3
+#define DUK_DBL_IDX_US1 2
+#define DUK_DBL_IDX_US2 1
+#define DUK_DBL_IDX_US3 0
+#define DUK_DBL_IDX_UC0 7
+#define DUK_DBL_IDX_UC1 6
+#define DUK_DBL_IDX_UC2 5
+#define DUK_DBL_IDX_UC3 4
+#define DUK_DBL_IDX_UC4 3
+#define DUK_DBL_IDX_UC5 2
+#define DUK_DBL_IDX_UC6 1
+#define DUK_DBL_IDX_UC7 0
+#define DUK_DBL_IDX_VP0 DUK_DBL_IDX_UI0 /* packed tval */
+#define DUK_DBL_IDX_VP1 DUK_DBL_IDX_UI1 /* packed tval */
#elif defined(DUK_USE_DOUBLE_BE)
#if defined(DUK_USE_64BIT_OPS)
-#define DUK_DBL_IDX_ULL0 0
-#endif
-#define DUK_DBL_IDX_UI0 0
-#define DUK_DBL_IDX_UI1 1
-#define DUK_DBL_IDX_US0 0
-#define DUK_DBL_IDX_US1 1
-#define DUK_DBL_IDX_US2 2
-#define DUK_DBL_IDX_US3 3
-#define DUK_DBL_IDX_UC0 0
-#define DUK_DBL_IDX_UC1 1
-#define DUK_DBL_IDX_UC2 2
-#define DUK_DBL_IDX_UC3 3
-#define DUK_DBL_IDX_UC4 4
-#define DUK_DBL_IDX_UC5 5
-#define DUK_DBL_IDX_UC6 6
-#define DUK_DBL_IDX_UC7 7
-#define DUK_DBL_IDX_VP0 DUK_DBL_IDX_UI0 /* packed tval */
-#define DUK_DBL_IDX_VP1 DUK_DBL_IDX_UI1 /* packed tval */
+#define DUK_DBL_IDX_ULL0 0
+#endif
+#define DUK_DBL_IDX_UI0 0
+#define DUK_DBL_IDX_UI1 1
+#define DUK_DBL_IDX_US0 0
+#define DUK_DBL_IDX_US1 1
+#define DUK_DBL_IDX_US2 2
+#define DUK_DBL_IDX_US3 3
+#define DUK_DBL_IDX_UC0 0
+#define DUK_DBL_IDX_UC1 1
+#define DUK_DBL_IDX_UC2 2
+#define DUK_DBL_IDX_UC3 3
+#define DUK_DBL_IDX_UC4 4
+#define DUK_DBL_IDX_UC5 5
+#define DUK_DBL_IDX_UC6 6
+#define DUK_DBL_IDX_UC7 7
+#define DUK_DBL_IDX_VP0 DUK_DBL_IDX_UI0 /* packed tval */
+#define DUK_DBL_IDX_VP1 DUK_DBL_IDX_UI1 /* packed tval */
#elif defined(DUK_USE_DOUBLE_ME)
#if defined(DUK_USE_64BIT_OPS)
-#define DUK_DBL_IDX_ULL0 0 /* not directly applicable, byte order differs from a double */
-#endif
-#define DUK_DBL_IDX_UI0 0
-#define DUK_DBL_IDX_UI1 1
-#define DUK_DBL_IDX_US0 1
-#define DUK_DBL_IDX_US1 0
-#define DUK_DBL_IDX_US2 3
-#define DUK_DBL_IDX_US3 2
-#define DUK_DBL_IDX_UC0 3
-#define DUK_DBL_IDX_UC1 2
-#define DUK_DBL_IDX_UC2 1
-#define DUK_DBL_IDX_UC3 0
-#define DUK_DBL_IDX_UC4 7
-#define DUK_DBL_IDX_UC5 6
-#define DUK_DBL_IDX_UC6 5
-#define DUK_DBL_IDX_UC7 4
-#define DUK_DBL_IDX_VP0 DUK_DBL_IDX_UI0 /* packed tval */
-#define DUK_DBL_IDX_VP1 DUK_DBL_IDX_UI1 /* packed tval */
+#define DUK_DBL_IDX_ULL0 0 /* not directly applicable, byte order differs from a double */
+#endif
+#define DUK_DBL_IDX_UI0 0
+#define DUK_DBL_IDX_UI1 1
+#define DUK_DBL_IDX_US0 1
+#define DUK_DBL_IDX_US1 0
+#define DUK_DBL_IDX_US2 3
+#define DUK_DBL_IDX_US3 2
+#define DUK_DBL_IDX_UC0 3
+#define DUK_DBL_IDX_UC1 2
+#define DUK_DBL_IDX_UC2 1
+#define DUK_DBL_IDX_UC3 0
+#define DUK_DBL_IDX_UC4 7
+#define DUK_DBL_IDX_UC5 6
+#define DUK_DBL_IDX_UC6 5
+#define DUK_DBL_IDX_UC7 4
+#define DUK_DBL_IDX_VP0 DUK_DBL_IDX_UI0 /* packed tval */
+#define DUK_DBL_IDX_VP1 DUK_DBL_IDX_UI1 /* packed tval */
#else
#error internal error
#endif
@@ -345,57 +353,63 @@ typedef union duk_double_union duk_double_union;
* by duk_numconv.c and duk_tval.h.
*/
-#define DUK_DBLUNION_SET_DOUBLE(u,v) do { \
+#define DUK_DBLUNION_SET_DOUBLE(u, v) \
+ do { \
(u)->d = (v); \
} while (0)
-#define DUK_DBLUNION_SET_HIGH32(u,v) do { \
+#define DUK_DBLUNION_SET_HIGH32(u, v) \
+ do { \
(u)->ui[DUK_DBL_IDX_UI0] = (duk_uint32_t) (v); \
} while (0)
#if defined(DUK_USE_64BIT_OPS)
#if defined(DUK_USE_DOUBLE_ME)
-#define DUK_DBLUNION_SET_HIGH32_ZERO_LOW32(u,v) do { \
+#define DUK_DBLUNION_SET_HIGH32_ZERO_LOW32(u, v) \
+ do { \
(u)->ull[DUK_DBL_IDX_ULL0] = (duk_uint64_t) (v); \
} while (0)
#else
-#define DUK_DBLUNION_SET_HIGH32_ZERO_LOW32(u,v) do { \
+#define DUK_DBLUNION_SET_HIGH32_ZERO_LOW32(u, v) \
+ do { \
(u)->ull[DUK_DBL_IDX_ULL0] = ((duk_uint64_t) (v)) << 32; \
} while (0)
#endif
-#else /* DUK_USE_64BIT_OPS */
-#define DUK_DBLUNION_SET_HIGH32_ZERO_LOW32(u,v) do { \
+#else /* DUK_USE_64BIT_OPS */
+#define DUK_DBLUNION_SET_HIGH32_ZERO_LOW32(u, v) \
+ do { \
(u)->ui[DUK_DBL_IDX_UI0] = (duk_uint32_t) (v); \
(u)->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) 0; \
} while (0)
-#endif /* DUK_USE_64BIT_OPS */
+#endif /* DUK_USE_64BIT_OPS */
-#define DUK_DBLUNION_SET_LOW32(u,v) do { \
+#define DUK_DBLUNION_SET_LOW32(u, v) \
+ do { \
(u)->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) (v); \
} while (0)
-#define DUK_DBLUNION_GET_DOUBLE(u) ((u)->d)
-#define DUK_DBLUNION_GET_HIGH32(u) ((u)->ui[DUK_DBL_IDX_UI0])
-#define DUK_DBLUNION_GET_LOW32(u) ((u)->ui[DUK_DBL_IDX_UI1])
+#define DUK_DBLUNION_GET_DOUBLE(u) ((u)->d)
+#define DUK_DBLUNION_GET_HIGH32(u) ((u)->ui[DUK_DBL_IDX_UI0])
+#define DUK_DBLUNION_GET_LOW32(u) ((u)->ui[DUK_DBL_IDX_UI1])
#if defined(DUK_USE_64BIT_OPS)
#if defined(DUK_USE_DOUBLE_ME)
-#define DUK_DBLUNION_SET_UINT64(u,v) do { \
+#define DUK_DBLUNION_SET_UINT64(u, v) \
+ do { \
(u)->ui[DUK_DBL_IDX_UI0] = (duk_uint32_t) ((v) >> 32); \
(u)->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) (v); \
} while (0)
-#define DUK_DBLUNION_GET_UINT64(u) \
- ((((duk_uint64_t) (u)->ui[DUK_DBL_IDX_UI0]) << 32) | \
- ((duk_uint64_t) (u)->ui[DUK_DBL_IDX_UI1]))
+#define DUK_DBLUNION_GET_UINT64(u) ((((duk_uint64_t) (u)->ui[DUK_DBL_IDX_UI0]) << 32) | ((duk_uint64_t) (u)->ui[DUK_DBL_IDX_UI1]))
#else
-#define DUK_DBLUNION_SET_UINT64(u,v) do { \
+#define DUK_DBLUNION_SET_UINT64(u, v) \
+ do { \
(u)->ull[DUK_DBL_IDX_ULL0] = (duk_uint64_t) (v); \
} while (0)
-#define DUK_DBLUNION_GET_UINT64(u) ((u)->ull[DUK_DBL_IDX_ULL0])
+#define DUK_DBLUNION_GET_UINT64(u) ((u)->ull[DUK_DBL_IDX_ULL0])
#endif
-#define DUK_DBLUNION_SET_INT64(u,v) DUK_DBLUNION_SET_UINT64((u), (duk_uint64_t) (v))
-#define DUK_DBLUNION_GET_INT64(u) ((duk_int64_t) DUK_DBLUNION_GET_UINT64((u)))
-#endif /* DUK_USE_64BIT_OPS */
+#define DUK_DBLUNION_SET_INT64(u, v) DUK_DBLUNION_SET_UINT64((u), (duk_uint64_t) (v))
+#define DUK_DBLUNION_GET_INT64(u) ((duk_int64_t) DUK_DBLUNION_GET_UINT64((u)))
+#endif /* DUK_USE_64BIT_OPS */
/*
* Double NaN manipulation macros related to NaN normalization needed when
@@ -426,103 +440,87 @@ typedef union duk_double_union duk_double_union;
#if defined(DUK_USE_64BIT_OPS)
#if defined(DUK_USE_DOUBLE_ME)
/* Macros for 64-bit ops + mixed endian doubles. */
-#define DUK__DBLUNION_SET_NAN_FULL(u) do { \
+#define DUK__DBLUNION_SET_NAN_FULL(u) \
+ do { \
(u)->ull[DUK_DBL_IDX_ULL0] = DUK_U64_CONSTANT(0x000000007ff80000); \
} while (0)
#define DUK__DBLUNION_IS_NAN_FULL(u) \
((((u)->ull[DUK_DBL_IDX_ULL0] & DUK_U64_CONSTANT(0x000000007ff00000)) == DUK_U64_CONSTANT(0x000000007ff00000)) && \
((((u)->ull[DUK_DBL_IDX_ULL0]) & DUK_U64_CONSTANT(0xffffffff000fffff)) != 0))
-#define DUK__DBLUNION_IS_NORMALIZED_NAN_FULL(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x000000007ff80000))
+#define DUK__DBLUNION_IS_NORMALIZED_NAN_FULL(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x000000007ff80000))
#define DUK__DBLUNION_IS_ANYINF(u) \
(((u)->ull[DUK_DBL_IDX_ULL0] & DUK_U64_CONSTANT(0xffffffff7fffffff)) == DUK_U64_CONSTANT(0x000000007ff00000))
-#define DUK__DBLUNION_IS_POSINF(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x000000007ff00000))
-#define DUK__DBLUNION_IS_NEGINF(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x00000000fff00000))
+#define DUK__DBLUNION_IS_POSINF(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x000000007ff00000))
+#define DUK__DBLUNION_IS_NEGINF(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x00000000fff00000))
#define DUK__DBLUNION_IS_ANYZERO(u) \
(((u)->ull[DUK_DBL_IDX_ULL0] & DUK_U64_CONSTANT(0xffffffff7fffffff)) == DUK_U64_CONSTANT(0x0000000000000000))
-#define DUK__DBLUNION_IS_POSZERO(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x0000000000000000))
-#define DUK__DBLUNION_IS_NEGZERO(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x0000000080000000))
+#define DUK__DBLUNION_IS_POSZERO(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x0000000000000000))
+#define DUK__DBLUNION_IS_NEGZERO(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x0000000080000000))
#else
/* Macros for 64-bit ops + big/little endian doubles. */
-#define DUK__DBLUNION_SET_NAN_FULL(u) do { \
+#define DUK__DBLUNION_SET_NAN_FULL(u) \
+ do { \
(u)->ull[DUK_DBL_IDX_ULL0] = DUK_U64_CONSTANT(0x7ff8000000000000); \
} while (0)
#define DUK__DBLUNION_IS_NAN_FULL(u) \
((((u)->ull[DUK_DBL_IDX_ULL0] & DUK_U64_CONSTANT(0x7ff0000000000000)) == DUK_U64_CONSTANT(0x7ff0000000000000)) && \
((((u)->ull[DUK_DBL_IDX_ULL0]) & DUK_U64_CONSTANT(0x000fffffffffffff)) != 0))
-#define DUK__DBLUNION_IS_NORMALIZED_NAN_FULL(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x7ff8000000000000))
+#define DUK__DBLUNION_IS_NORMALIZED_NAN_FULL(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x7ff8000000000000))
#define DUK__DBLUNION_IS_ANYINF(u) \
(((u)->ull[DUK_DBL_IDX_ULL0] & DUK_U64_CONSTANT(0x7fffffffffffffff)) == DUK_U64_CONSTANT(0x7ff0000000000000))
-#define DUK__DBLUNION_IS_POSINF(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x7ff0000000000000))
-#define DUK__DBLUNION_IS_NEGINF(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0xfff0000000000000))
+#define DUK__DBLUNION_IS_POSINF(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x7ff0000000000000))
+#define DUK__DBLUNION_IS_NEGINF(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0xfff0000000000000))
#define DUK__DBLUNION_IS_ANYZERO(u) \
(((u)->ull[DUK_DBL_IDX_ULL0] & DUK_U64_CONSTANT(0x7fffffffffffffff)) == DUK_U64_CONSTANT(0x0000000000000000))
-#define DUK__DBLUNION_IS_POSZERO(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x0000000000000000))
-#define DUK__DBLUNION_IS_NEGZERO(u) \
- ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x8000000000000000))
+#define DUK__DBLUNION_IS_POSZERO(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x0000000000000000))
+#define DUK__DBLUNION_IS_NEGZERO(u) ((u)->ull[DUK_DBL_IDX_ULL0] == DUK_U64_CONSTANT(0x8000000000000000))
#endif
-#else /* DUK_USE_64BIT_OPS */
+#else /* DUK_USE_64BIT_OPS */
/* Macros for no 64-bit ops, any endianness. */
-#define DUK__DBLUNION_SET_NAN_FULL(u) do { \
+#define DUK__DBLUNION_SET_NAN_FULL(u) \
+ do { \
(u)->ui[DUK_DBL_IDX_UI0] = (duk_uint32_t) 0x7ff80000UL; \
(u)->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) 0x00000000UL; \
} while (0)
#define DUK__DBLUNION_IS_NAN_FULL(u) \
((((u)->ui[DUK_DBL_IDX_UI0] & 0x7ff00000UL) == 0x7ff00000UL) && \
- (((u)->ui[DUK_DBL_IDX_UI0] & 0x000fffffUL) != 0 || \
- (u)->ui[DUK_DBL_IDX_UI1] != 0))
+ (((u)->ui[DUK_DBL_IDX_UI0] & 0x000fffffUL) != 0 || (u)->ui[DUK_DBL_IDX_UI1] != 0))
#define DUK__DBLUNION_IS_NORMALIZED_NAN_FULL(u) \
- (((u)->ui[DUK_DBL_IDX_UI0] == 0x7ff80000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+ (((u)->ui[DUK_DBL_IDX_UI0] == 0x7ff80000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
#define DUK__DBLUNION_IS_ANYINF(u) \
- ((((u)->ui[DUK_DBL_IDX_UI0] & 0x7fffffffUL) == 0x7ff00000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
-#define DUK__DBLUNION_IS_POSINF(u) \
- (((u)->ui[DUK_DBL_IDX_UI0] == 0x7ff00000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
-#define DUK__DBLUNION_IS_NEGINF(u) \
- (((u)->ui[DUK_DBL_IDX_UI0] == 0xfff00000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+ ((((u)->ui[DUK_DBL_IDX_UI0] & 0x7fffffffUL) == 0x7ff00000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+#define DUK__DBLUNION_IS_POSINF(u) (((u)->ui[DUK_DBL_IDX_UI0] == 0x7ff00000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+#define DUK__DBLUNION_IS_NEGINF(u) (((u)->ui[DUK_DBL_IDX_UI0] == 0xfff00000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
#define DUK__DBLUNION_IS_ANYZERO(u) \
- ((((u)->ui[DUK_DBL_IDX_UI0] & 0x7fffffffUL) == 0x00000000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
-#define DUK__DBLUNION_IS_POSZERO(u) \
- (((u)->ui[DUK_DBL_IDX_UI0] == 0x00000000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
-#define DUK__DBLUNION_IS_NEGZERO(u) \
- (((u)->ui[DUK_DBL_IDX_UI0] == 0x80000000UL) && \
- ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
-#endif /* DUK_USE_64BIT_OPS */
-
-#define DUK__DBLUNION_SET_NAN_NOTFULL(u) do { \
+ ((((u)->ui[DUK_DBL_IDX_UI0] & 0x7fffffffUL) == 0x00000000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+#define DUK__DBLUNION_IS_POSZERO(u) (((u)->ui[DUK_DBL_IDX_UI0] == 0x00000000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+#define DUK__DBLUNION_IS_NEGZERO(u) (((u)->ui[DUK_DBL_IDX_UI0] == 0x80000000UL) && ((u)->ui[DUK_DBL_IDX_UI1] == 0x00000000UL))
+#endif /* DUK_USE_64BIT_OPS */
+
+#define DUK__DBLUNION_SET_NAN_NOTFULL(u) \
+ do { \
(u)->us[DUK_DBL_IDX_US0] = 0x7ff8UL; \
} while (0)
#define DUK__DBLUNION_IS_NAN_NOTFULL(u) \
/* E == 0x7ff, topmost four bits of F != 0 => assume NaN */ \
- ((((u)->us[DUK_DBL_IDX_US0] & 0x7ff0UL) == 0x7ff0UL) && \
- (((u)->us[DUK_DBL_IDX_US0] & 0x000fUL) != 0x0000UL))
+ ((((u)->us[DUK_DBL_IDX_US0] & 0x7ff0UL) == 0x7ff0UL) && (((u)->us[DUK_DBL_IDX_US0] & 0x000fUL) != 0x0000UL))
#define DUK__DBLUNION_IS_NORMALIZED_NAN_NOTFULL(u) \
/* E == 0x7ff, F == 8 => normalized NaN */ \
((u)->us[DUK_DBL_IDX_US0] == 0x7ff8UL)
-#define DUK__DBLUNION_NORMALIZE_NAN_CHECK_FULL(u) do { \
+#define DUK__DBLUNION_NORMALIZE_NAN_CHECK_FULL(u) \
+ do { \
if (DUK__DBLUNION_IS_NAN_FULL((u))) { \
DUK__DBLUNION_SET_NAN_FULL((u)); \
} \
} while (0)
-#define DUK__DBLUNION_NORMALIZE_NAN_CHECK_NOTFULL(u) do { \
- if (DUK__DBLUNION_IS_NAN_NOTFULL((u))) { \
+#define DUK__DBLUNION_NORMALIZE_NAN_CHECK_NOTFULL(u) \
+ do { \
+ /* Check must be full. */ \
+ if (DUK__DBLUNION_IS_NAN_FULL((u))) { \
DUK__DBLUNION_SET_NAN_NOTFULL((u)); \
} \
} while (0)
@@ -534,30 +532,30 @@ typedef union duk_double_union duk_double_union;
*/
#if defined(DUK_USE_PACKED_TVAL)
-#if defined(DUK_USE_FULL_TVAL)
-#define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) DUK__DBLUNION_NORMALIZE_NAN_CHECK_FULL((u))
-#define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u))
-#define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NORMALIZED_NAN_FULL((u))
-#define DUK_DBLUNION_SET_NAN(d) DUK__DBLUNION_SET_NAN_FULL((d))
-#else
-#define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) DUK__DBLUNION_NORMALIZE_NAN_CHECK_NOTFULL((u))
-#define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_NOTFULL((u))
-#define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NORMALIZED_NAN_NOTFULL((u))
-#define DUK_DBLUNION_SET_NAN(d) DUK__DBLUNION_SET_NAN_NOTFULL((d))
+#define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) DUK__DBLUNION_NORMALIZE_NAN_CHECK_FULL((u))
+#define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u))
+#define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NORMALIZED_NAN_FULL((u))
+#define DUK_DBLUNION_SET_NAN(d) DUK__DBLUNION_SET_NAN_FULL((d))
+#if 0
+#define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) DUK__DBLUNION_NORMALIZE_NAN_CHECK_NOTFULL((u))
+#define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_NOTFULL((u))
+#define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NORMALIZED_NAN_NOTFULL((u))
+#define DUK_DBLUNION_SET_NAN(d) DUK__DBLUNION_SET_NAN_NOTFULL((d))
#endif
#define DUK_DBLUNION_IS_NORMALIZED(u) \
- (!DUK_DBLUNION_IS_NAN((u)) || /* either not a NaN */ \
- DUK_DBLUNION_IS_NORMALIZED_NAN((u))) /* or is a normalized NaN */
-#else /* DUK_USE_PACKED_TVAL */
-#define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) /* nop: no need to normalize */
-#define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u)) /* (DUK_ISNAN((u)->d)) */
-#define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u)) /* (DUK_ISNAN((u)->d)) */
-#define DUK_DBLUNION_IS_NORMALIZED(u) 1 /* all doubles are considered normalized */
-#define DUK_DBLUNION_SET_NAN(u) do { \
+ (!DUK_DBLUNION_IS_NAN((u)) || /* either not a NaN */ \
+ DUK_DBLUNION_IS_NORMALIZED_NAN((u))) /* or is a normalized NaN */
+#else /* DUK_USE_PACKED_TVAL */
+#define DUK_DBLUNION_NORMALIZE_NAN_CHECK(u) /* nop: no need to normalize */
+#define DUK_DBLUNION_IS_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u)) /* (DUK_ISNAN((u)->d)) */
+#define DUK_DBLUNION_IS_NORMALIZED_NAN(u) DUK__DBLUNION_IS_NAN_FULL((u)) /* (DUK_ISNAN((u)->d)) */
+#define DUK_DBLUNION_IS_NORMALIZED(u) 1 /* all doubles are considered normalized */
+#define DUK_DBLUNION_SET_NAN(u) \
+ do { \
/* in non-packed representation we don't care about which NaN is used */ \
(u)->d = DUK_DOUBLE_NAN; \
} while (0)
-#endif /* DUK_USE_PACKED_TVAL */
+#endif /* DUK_USE_PACKED_TVAL */
#define DUK_DBLUNION_IS_ANYINF(u) DUK__DBLUNION_IS_ANYINF((u))
#define DUK_DBLUNION_IS_POSINF(u) DUK__DBLUNION_IS_POSINF((u))
@@ -570,7 +568,8 @@ typedef union duk_double_union duk_double_union;
/* XXX: native 64-bit byteswaps when available */
/* 64-bit byteswap, same operation independent of target endianness. */
-#define DUK_DBLUNION_BSWAP64(u) do { \
+#define DUK_DBLUNION_BSWAP64(u) \
+ do { \
duk_uint32_t duk__bswaptmp1, duk__bswaptmp2; \
duk__bswaptmp1 = (u)->ui[0]; \
duk__bswaptmp2 = (u)->ui[1]; \
@@ -584,7 +583,8 @@ typedef union duk_double_union duk_double_union;
* order. For a big endian target this is a no-op.
*/
#if defined(DUK_USE_DOUBLE_LE)
-#define DUK_DBLUNION_DOUBLE_HTON(u) do { \
+#define DUK_DBLUNION_DOUBLE_HTON(u) \
+ do { \
duk_uint32_t duk__bswaptmp1, duk__bswaptmp2; \
duk__bswaptmp1 = (u)->ui[0]; \
duk__bswaptmp2 = (u)->ui[1]; \
@@ -594,7 +594,8 @@ typedef union duk_double_union duk_double_union;
(u)->ui[1] = duk__bswaptmp1; \
} while (0)
#elif defined(DUK_USE_DOUBLE_ME)
-#define DUK_DBLUNION_DOUBLE_HTON(u) do { \
+#define DUK_DBLUNION_DOUBLE_HTON(u) \
+ do { \
duk_uint32_t duk__bswaptmp1, duk__bswaptmp2; \
duk__bswaptmp1 = (u)->ui[0]; \
duk__bswaptmp2 = (u)->ui[1]; \
@@ -604,7 +605,9 @@ typedef union duk_double_union duk_double_union;
(u)->ui[1] = duk__bswaptmp2; \
} while (0)
#elif defined(DUK_USE_DOUBLE_BE)
-#define DUK_DBLUNION_DOUBLE_HTON(u) do { } while (0)
+#define DUK_DBLUNION_DOUBLE_HTON(u) \
+ do { \
+ } while (0)
#else
#error internal error, double endianness insane
#endif
@@ -621,7 +624,47 @@ typedef union duk_double_union duk_double_union;
#define DUK_DBLUNION_GET_SIGNBIT(u) (((u)->ui[DUK_DBL_IDX_UI0] >> 31U))
#endif
-#endif /* DUK_DBLUNION_H_INCLUDED */
+#endif /* DUK_DBLUNION_H_INCLUDED */
+/* #include duk_fltunion.h */
+/*
+ * Union to access IEEE float memory representation.
+ */
+
+#if !defined(DUK_FLTUNION_H_INCLUDED)
+#define DUK_FLTUNION_H_INCLUDED
+
+/* #include duk_internal.h -> already included */
+
+union duk_float_union {
+ float f;
+ duk_uint32_t ui[1];
+ duk_uint16_t us[2];
+ duk_uint8_t uc[4];
+};
+
+typedef union duk_float_union duk_float_union;
+
+#if defined(DUK_USE_DOUBLE_LE) || defined(DUK_USE_DOUBLE_ME)
+#define DUK_FLT_IDX_UI0 0
+#define DUK_FLT_IDX_US0 1
+#define DUK_FLT_IDX_US1 0
+#define DUK_FLT_IDX_UC0 3
+#define DUK_FLT_IDX_UC1 2
+#define DUK_FLT_IDX_UC2 1
+#define DUK_FLT_IDX_UC3 0
+#elif defined(DUK_USE_DOUBLE_BE)
+#define DUK_FLT_IDX_UI0 0
+#define DUK_FLT_IDX_US0 0
+#define DUK_FLT_IDX_US1 1
+#define DUK_FLT_IDX_UC0 0
+#define DUK_FLT_IDX_UC1 1
+#define DUK_FLT_IDX_UC2 2
+#define DUK_FLT_IDX_UC3 3
+#else
+#error internal error
+#endif
+
+#endif /* DUK_FLTUNION_H_INCLUDED */
/* #include duk_replacements.h */
#if !defined(DUK_REPLACEMENTS_H_INCLUDED)
#define DUK_REPLACEMENTS_H_INCLUDED
@@ -633,7 +676,7 @@ DUK_INTERNAL_DECL double duk_computed_infinity;
#if defined(DUK_USE_COMPUTED_NAN)
DUK_INTERNAL_DECL double duk_computed_nan;
#endif
-#endif /* !DUK_SINGLE_FILE */
+#endif /* !DUK_SINGLE_FILE */
#if defined(DUK_USE_REPL_FPCLASSIFY)
DUK_INTERNAL_DECL int duk_repl_fpclassify(double x);
@@ -651,7 +694,7 @@ DUK_INTERNAL_DECL int duk_repl_isnan(double x);
DUK_INTERNAL_DECL int duk_repl_isinf(double x);
#endif
-#endif /* DUK_REPLACEMENTS_H_INCLUDED */
+#endif /* DUK_REPLACEMENTS_H_INCLUDED */
/* #include duk_jmpbuf.h */
/*
* Wrapper for jmp_buf.
@@ -668,7 +711,7 @@ DUK_INTERNAL_DECL int duk_repl_isinf(double x);
#if defined(DUK_USE_CPP_EXCEPTIONS)
struct duk_jmpbuf {
- duk_small_int_t dummy; /* unused */
+ duk_small_int_t dummy; /* unused */
};
#else
struct duk_jmpbuf {
@@ -676,7 +719,7 @@ struct duk_jmpbuf {
};
#endif
-#endif /* DUK_JMPBUF_H_INCLUDED */
+#endif /* DUK_JMPBUF_H_INCLUDED */
/* #include duk_exception.h */
/*
* Exceptions for Duktape internal throws when C++ exceptions are used
@@ -702,12 +745,13 @@ class duk_internal_exception {
* aware of the "unsafe to continue" semantics.
*/
class duk_fatal_exception : public virtual std::runtime_error {
- public:
- duk_fatal_exception(const char *message) : std::runtime_error(message) {}
+ public:
+ duk_fatal_exception(const char *message) : std::runtime_error(message) {
+ }
};
#endif
-#endif /* DUK_EXCEPTION_H_INCLUDED */
+#endif /* DUK_EXCEPTION_H_INCLUDED */
/* #include duk_forwdecl.h */
/*
* Forward declarations for all Duktape structures.
@@ -842,7 +886,7 @@ typedef struct duk_compiler_ctx duk_compiler_ctx;
typedef struct duk_re_matcher_ctx duk_re_matcher_ctx;
typedef struct duk_re_compiler_ctx duk_re_compiler_ctx;
-#endif /* DUK_FORWDECL_H_INCLUDED */
+#endif /* DUK_FORWDECL_H_INCLUDED */
/* #include duk_tval.h */
/*
* Tagged type definition (duk_tval) and accessor macros.
@@ -887,30 +931,29 @@ typedef struct {
} duk_tval_unused;
/* tags */
-#define DUK_TAG_NORMALIZED_NAN 0x7ff8UL /* the NaN variant we use */
+#define DUK_TAG_NORMALIZED_NAN 0x7ff8UL /* the NaN variant we use */
/* avoid tag 0xfff0, no risk of confusion with negative infinity */
-#define DUK_TAG_MIN 0xfff1UL
+#define DUK_TAG_MIN 0xfff1UL
#if defined(DUK_USE_FASTINT)
-#define DUK_TAG_FASTINT 0xfff1UL /* embed: integer value */
+#define DUK_TAG_FASTINT 0xfff1UL /* embed: integer value */
#endif
-#define DUK_TAG_UNUSED 0xfff2UL /* marker; not actual tagged value */
-#define DUK_TAG_UNDEFINED 0xfff3UL /* embed: nothing */
-#define DUK_TAG_NULL 0xfff4UL /* embed: nothing */
-#define DUK_TAG_BOOLEAN 0xfff5UL /* embed: 0 or 1 (false or true) */
+#define DUK_TAG_UNUSED 0xfff2UL /* marker; not actual tagged value */
+#define DUK_TAG_UNDEFINED 0xfff3UL /* embed: nothing */
+#define DUK_TAG_NULL 0xfff4UL /* embed: nothing */
+#define DUK_TAG_BOOLEAN 0xfff5UL /* embed: 0 or 1 (false or true) */
/* DUK_TAG_NUMBER would logically go here, but it has multiple 'tags' */
-#define DUK_TAG_POINTER 0xfff6UL /* embed: void ptr */
-#define DUK_TAG_LIGHTFUNC 0xfff7UL /* embed: func ptr */
-#define DUK_TAG_STRING 0xfff8UL /* embed: duk_hstring ptr */
-#define DUK_TAG_OBJECT 0xfff9UL /* embed: duk_hobject ptr */
-#define DUK_TAG_BUFFER 0xfffaUL /* embed: duk_hbuffer ptr */
-#define DUK_TAG_MAX 0xfffaUL
+#define DUK_TAG_POINTER 0xfff6UL /* embed: void ptr */
+#define DUK_TAG_LIGHTFUNC 0xfff7UL /* embed: func ptr */
+#define DUK_TAG_STRING 0xfff8UL /* embed: duk_hstring ptr */
+#define DUK_TAG_OBJECT 0xfff9UL /* embed: duk_hobject ptr */
+#define DUK_TAG_BUFFER 0xfffaUL /* embed: duk_hbuffer ptr */
+#define DUK_TAG_MAX 0xfffaUL
/* for convenience */
-#define DUK_XTAG_BOOLEAN_FALSE 0xfff50000UL
-#define DUK_XTAG_BOOLEAN_TRUE 0xfff50001UL
+#define DUK_XTAG_BOOLEAN_FALSE 0xfff50000UL
+#define DUK_XTAG_BOOLEAN_TRUE 0xfff50001UL
-#define DUK_TVAL_IS_VALID_TAG(tv) \
- (DUK_TVAL_GET_TAG((tv)) - DUK_TAG_MIN <= DUK_TAG_MAX - DUK_TAG_MIN)
+#define DUK_TVAL_IS_VALID_TAG(tv) (DUK_TVAL_GET_TAG((tv)) - DUK_TAG_MIN <= DUK_TAG_MAX - DUK_TAG_MIN)
/* DUK_TVAL_UNUSED initializer for duk_tval_unused, works for any endianness. */
#define DUK_TVAL_UNUSED_INITIALIZER() \
@@ -919,116 +962,136 @@ typedef struct {
/* two casts to avoid gcc warning: "warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]" */
#if defined(DUK_USE_64BIT_OPS)
#if defined(DUK_USE_DOUBLE_ME)
-#define DUK__TVAL_SET_TAGGEDPOINTER(tv,h,tag) do { \
+#define DUK__TVAL_SET_TAGGEDPOINTER(tv, h, tag) \
+ do { \
(tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) (tag)) << 16) | (((duk_uint64_t) (duk_uint32_t) (h)) << 32); \
} while (0)
#else
-#define DUK__TVAL_SET_TAGGEDPOINTER(tv,h,tag) do { \
+#define DUK__TVAL_SET_TAGGEDPOINTER(tv, h, tag) \
+ do { \
(tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) (tag)) << 48) | ((duk_uint64_t) (duk_uint32_t) (h)); \
} while (0)
#endif
-#else /* DUK_USE_64BIT_OPS */
-#define DUK__TVAL_SET_TAGGEDPOINTER(tv,h,tag) do { \
+#else /* DUK_USE_64BIT_OPS */
+#define DUK__TVAL_SET_TAGGEDPOINTER(tv, h, tag) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->ui[DUK_DBL_IDX_UI0] = ((duk_uint32_t) (tag)) << 16; \
duk__tv->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) (h); \
} while (0)
-#endif /* DUK_USE_64BIT_OPS */
+#endif /* DUK_USE_64BIT_OPS */
#if defined(DUK_USE_64BIT_OPS)
/* Double casting for pointer to avoid gcc warning (cast from pointer to integer of different size) */
#if defined(DUK_USE_DOUBLE_ME)
-#define DUK__TVAL_SET_LIGHTFUNC(tv,fp,flags) do { \
- (tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) DUK_TAG_LIGHTFUNC) << 16) | \
- ((duk_uint64_t) (flags)) | \
+#define DUK__TVAL_SET_LIGHTFUNC(tv, fp, flags) \
+ do { \
+ (tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) DUK_TAG_LIGHTFUNC) << 16) | ((duk_uint64_t) (flags)) | \
(((duk_uint64_t) (duk_uint32_t) (fp)) << 32); \
} while (0)
#else
-#define DUK__TVAL_SET_LIGHTFUNC(tv,fp,flags) do { \
- (tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) DUK_TAG_LIGHTFUNC) << 48) | \
- (((duk_uint64_t) (flags)) << 32) | \
+#define DUK__TVAL_SET_LIGHTFUNC(tv, fp, flags) \
+ do { \
+ (tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) DUK_TAG_LIGHTFUNC) << 48) | (((duk_uint64_t) (flags)) << 32) | \
((duk_uint64_t) (duk_uint32_t) (fp)); \
} while (0)
#endif
-#else /* DUK_USE_64BIT_OPS */
-#define DUK__TVAL_SET_LIGHTFUNC(tv,fp,flags) do { \
+#else /* DUK_USE_64BIT_OPS */
+#define DUK__TVAL_SET_LIGHTFUNC(tv, fp, flags) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->ui[DUK_DBL_IDX_UI0] = (((duk_uint32_t) DUK_TAG_LIGHTFUNC) << 16) | ((duk_uint32_t) (flags)); \
duk__tv->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) (fp); \
} while (0)
-#endif /* DUK_USE_64BIT_OPS */
+#endif /* DUK_USE_64BIT_OPS */
#if defined(DUK_USE_FASTINT)
/* Note: masking is done for 'i' to deal with negative numbers correctly */
#if defined(DUK_USE_DOUBLE_ME)
-#define DUK__TVAL_SET_I48(tv,i) do { \
+#define DUK__TVAL_SET_I48(tv, i) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
- duk__tv->ui[DUK_DBL_IDX_UI0] = ((duk_uint32_t) DUK_TAG_FASTINT) << 16 | (((duk_uint32_t) ((i) >> 32)) & 0x0000ffffUL); \
+ duk__tv->ui[DUK_DBL_IDX_UI0] = \
+ ((duk_uint32_t) DUK_TAG_FASTINT) << 16 | (((duk_uint32_t) ((i) >> 32)) & 0x0000ffffUL); \
duk__tv->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) (i); \
} while (0)
-#define DUK__TVAL_SET_U32(tv,i) do { \
+#define DUK__TVAL_SET_U32(tv, i) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->ui[DUK_DBL_IDX_UI0] = ((duk_uint32_t) DUK_TAG_FASTINT) << 16; \
duk__tv->ui[DUK_DBL_IDX_UI1] = (duk_uint32_t) (i); \
} while (0)
#else
-#define DUK__TVAL_SET_I48(tv,i) do { \
- (tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) DUK_TAG_FASTINT) << 48) | (((duk_uint64_t) (i)) & DUK_U64_CONSTANT(0x0000ffffffffffff)); \
+#define DUK__TVAL_SET_I48(tv, i) \
+ do { \
+ (tv)->ull[DUK_DBL_IDX_ULL0] = \
+ (((duk_uint64_t) DUK_TAG_FASTINT) << 48) | (((duk_uint64_t) (i)) & DUK_U64_CONSTANT(0x0000ffffffffffff)); \
} while (0)
-#define DUK__TVAL_SET_U32(tv,i) do { \
+#define DUK__TVAL_SET_U32(tv, i) \
+ do { \
(tv)->ull[DUK_DBL_IDX_ULL0] = (((duk_uint64_t) DUK_TAG_FASTINT) << 48) | (duk_uint64_t) (i); \
} while (0)
#endif
/* This needs to go through a cast because sign extension is needed. */
-#define DUK__TVAL_SET_I32(tv,i) do { \
+#define DUK__TVAL_SET_I32(tv, i) \
+ do { \
duk_int64_t duk__tmp = (duk_int64_t) (i); \
DUK_TVAL_SET_I48((tv), duk__tmp); \
} while (0)
/* XXX: Clumsy sign extend and masking of 16 topmost bits. */
#if defined(DUK_USE_DOUBLE_ME)
-#define DUK__TVAL_GET_FASTINT(tv) (((duk_int64_t) ((((duk_uint64_t) (tv)->ui[DUK_DBL_IDX_UI0]) << 32) | ((duk_uint64_t) (tv)->ui[DUK_DBL_IDX_UI1]))) << 16 >> 16)
+#define DUK__TVAL_GET_FASTINT(tv) \
+ (((duk_int64_t) ((((duk_uint64_t) (tv)->ui[DUK_DBL_IDX_UI0]) << 32) | ((duk_uint64_t) (tv)->ui[DUK_DBL_IDX_UI1]))) \
+ << 16 >> \
+ 16)
#else
-#define DUK__TVAL_GET_FASTINT(tv) ((((duk_int64_t) (tv)->ull[DUK_DBL_IDX_ULL0]) << 16) >> 16)
+#define DUK__TVAL_GET_FASTINT(tv) ((((duk_int64_t) (tv)->ull[DUK_DBL_IDX_ULL0]) << 16) >> 16)
#endif
-#define DUK__TVAL_GET_FASTINT_U32(tv) ((tv)->ui[DUK_DBL_IDX_UI1])
-#define DUK__TVAL_GET_FASTINT_I32(tv) ((duk_int32_t) (tv)->ui[DUK_DBL_IDX_UI1])
-#endif /* DUK_USE_FASTINT */
+#define DUK__TVAL_GET_FASTINT_U32(tv) ((tv)->ui[DUK_DBL_IDX_UI1])
+#define DUK__TVAL_GET_FASTINT_I32(tv) ((duk_int32_t) (tv)->ui[DUK_DBL_IDX_UI1])
+#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_UNDEFINED(tv) do { \
+#define DUK_TVAL_SET_UNDEFINED(tv) \
+ do { \
(tv)->us[DUK_DBL_IDX_US0] = (duk_uint16_t) DUK_TAG_UNDEFINED; \
} while (0)
-#define DUK_TVAL_SET_UNUSED(tv) do { \
+#define DUK_TVAL_SET_UNUSED(tv) \
+ do { \
(tv)->us[DUK_DBL_IDX_US0] = (duk_uint16_t) DUK_TAG_UNUSED; \
} while (0)
-#define DUK_TVAL_SET_NULL(tv) do { \
+#define DUK_TVAL_SET_NULL(tv) \
+ do { \
(tv)->us[DUK_DBL_IDX_US0] = (duk_uint16_t) DUK_TAG_NULL; \
} while (0)
-#define DUK_TVAL_SET_BOOLEAN(tv,val) DUK_DBLUNION_SET_HIGH32((tv), (((duk_uint32_t) DUK_TAG_BOOLEAN) << 16) | ((duk_uint32_t) (val)))
+#define DUK_TVAL_SET_BOOLEAN(tv, val) \
+ DUK_DBLUNION_SET_HIGH32((tv), (((duk_uint32_t) DUK_TAG_BOOLEAN) << 16) | ((duk_uint32_t) (val)))
-#define DUK_TVAL_SET_NAN(tv) DUK_DBLUNION_SET_NAN_FULL((tv))
+#define DUK_TVAL_SET_NAN(tv) DUK_DBLUNION_SET_NAN_FULL((tv))
/* Assumes that caller has normalized NaNs, otherwise trouble ahead. */
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_SET_DOUBLE(tv,d) do { \
+#define DUK_TVAL_SET_DOUBLE(tv, d) \
+ do { \
duk_double_t duk__dblval; \
duk__dblval = (d); \
DUK_ASSERT_DOUBLE_IS_NORMALIZED(duk__dblval); \
DUK_DBLUNION_SET_DOUBLE((tv), duk__dblval); \
} while (0)
-#define DUK_TVAL_SET_I48(tv,i) DUK__TVAL_SET_I48((tv), (i))
-#define DUK_TVAL_SET_I32(tv,i) DUK__TVAL_SET_I32((tv), (i))
-#define DUK_TVAL_SET_U32(tv,i) DUK__TVAL_SET_U32((tv), (i))
-#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv,d) duk_tval_set_number_chkfast_fast((tv), (d))
-#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv,d) duk_tval_set_number_chkfast_slow((tv), (d))
-#define DUK_TVAL_SET_NUMBER(tv,d) DUK_TVAL_SET_DOUBLE((tv), (d))
-#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) do { \
+#define DUK_TVAL_SET_I48(tv, i) DUK__TVAL_SET_I48((tv), (i))
+#define DUK_TVAL_SET_I32(tv, i) DUK__TVAL_SET_I32((tv), (i))
+#define DUK_TVAL_SET_U32(tv, i) DUK__TVAL_SET_U32((tv), (i))
+#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv, d) duk_tval_set_number_chkfast_fast((tv), (d))
+#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv, d) duk_tval_set_number_chkfast_slow((tv), (d))
+#define DUK_TVAL_SET_NUMBER(tv, d) DUK_TVAL_SET_DOUBLE((tv), (d))
+#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) \
+ do { \
duk_tval *duk__tv; \
duk_double_t duk__d; \
duk__tv = (tv); \
@@ -1037,7 +1100,8 @@ typedef struct {
DUK_TVAL_SET_NUMBER_CHKFAST_FAST(duk__tv, duk__d); \
} \
} while (0)
-#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) do { \
+#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) \
+ do { \
duk_tval *duk__tv; \
duk_double_t duk__d; \
duk__tv = (tv); \
@@ -1046,89 +1110,98 @@ typedef struct {
DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(duk__tv, duk__d); \
} \
} while (0)
-#else /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_DOUBLE(tv,d) do { \
+#else /* DUK_USE_FASTINT */
+#define DUK_TVAL_SET_DOUBLE(tv, d) \
+ do { \
duk_double_t duk__dblval; \
duk__dblval = (d); \
DUK_ASSERT_DOUBLE_IS_NORMALIZED(duk__dblval); \
DUK_DBLUNION_SET_DOUBLE((tv), duk__dblval); \
} while (0)
-#define DUK_TVAL_SET_I48(tv,i) DUK_TVAL_SET_DOUBLE((tv), (duk_double_t) (i)) /* XXX: fast int-to-double */
-#define DUK_TVAL_SET_I32(tv,i) DUK_TVAL_SET_DOUBLE((tv), (duk_double_t) (i))
-#define DUK_TVAL_SET_U32(tv,i) DUK_TVAL_SET_DOUBLE((tv), (duk_double_t) (i))
-#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv,d) DUK_TVAL_SET_DOUBLE((tv), (d))
-#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv,d) DUK_TVAL_SET_DOUBLE((tv), (d))
-#define DUK_TVAL_SET_NUMBER(tv,d) DUK_TVAL_SET_DOUBLE((tv), (d))
-#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) do { } while (0)
-#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) do { } while (0)
-#endif /* DUK_USE_FASTINT */
-
-#define DUK_TVAL_SET_FASTINT(tv,i) DUK_TVAL_SET_I48((tv), (i)) /* alias */
-
-#define DUK_TVAL_SET_LIGHTFUNC(tv,fp,flags) DUK__TVAL_SET_LIGHTFUNC((tv), (fp), (flags))
-#define DUK_TVAL_SET_STRING(tv,h) DUK__TVAL_SET_TAGGEDPOINTER((tv), (h), DUK_TAG_STRING)
-#define DUK_TVAL_SET_OBJECT(tv,h) DUK__TVAL_SET_TAGGEDPOINTER((tv), (h), DUK_TAG_OBJECT)
-#define DUK_TVAL_SET_BUFFER(tv,h) DUK__TVAL_SET_TAGGEDPOINTER((tv), (h), DUK_TAG_BUFFER)
-#define DUK_TVAL_SET_POINTER(tv,p) DUK__TVAL_SET_TAGGEDPOINTER((tv), (p), DUK_TAG_POINTER)
-
-#define DUK_TVAL_SET_TVAL(tv,x) do { *(tv) = *(x); } while (0)
+#define DUK_TVAL_SET_I48(tv, i) DUK_TVAL_SET_DOUBLE((tv), (duk_double_t) (i)) /* XXX: fast int-to-double */
+#define DUK_TVAL_SET_I32(tv, i) DUK_TVAL_SET_DOUBLE((tv), (duk_double_t) (i))
+#define DUK_TVAL_SET_U32(tv, i) DUK_TVAL_SET_DOUBLE((tv), (duk_double_t) (i))
+#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv, d) DUK_TVAL_SET_DOUBLE((tv), (d))
+#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv, d) DUK_TVAL_SET_DOUBLE((tv), (d))
+#define DUK_TVAL_SET_NUMBER(tv, d) DUK_TVAL_SET_DOUBLE((tv), (d))
+#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) \
+ do { \
+ } while (0)
+#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) \
+ do { \
+ } while (0)
+#endif /* DUK_USE_FASTINT */
+
+#define DUK_TVAL_SET_FASTINT(tv, i) DUK_TVAL_SET_I48((tv), (i)) /* alias */
+
+#define DUK_TVAL_SET_LIGHTFUNC(tv, fp, flags) DUK__TVAL_SET_LIGHTFUNC((tv), (fp), (flags))
+#define DUK_TVAL_SET_STRING(tv, h) DUK__TVAL_SET_TAGGEDPOINTER((tv), (h), DUK_TAG_STRING)
+#define DUK_TVAL_SET_OBJECT(tv, h) DUK__TVAL_SET_TAGGEDPOINTER((tv), (h), DUK_TAG_OBJECT)
+#define DUK_TVAL_SET_BUFFER(tv, h) DUK__TVAL_SET_TAGGEDPOINTER((tv), (h), DUK_TAG_BUFFER)
+#define DUK_TVAL_SET_POINTER(tv, p) DUK__TVAL_SET_TAGGEDPOINTER((tv), (p), DUK_TAG_POINTER)
+
+#define DUK_TVAL_SET_TVAL(tv, x) \
+ do { \
+ *(tv) = *(x); \
+ } while (0)
/* getters */
-#define DUK_TVAL_GET_BOOLEAN(tv) ((duk_small_uint_t) (tv)->us[DUK_DBL_IDX_US1])
+#define DUK_TVAL_GET_BOOLEAN(tv) ((duk_small_uint_t) (tv)->us[DUK_DBL_IDX_US1])
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->d)
-#define DUK_TVAL_GET_FASTINT(tv) DUK__TVAL_GET_FASTINT((tv))
-#define DUK_TVAL_GET_FASTINT_U32(tv) DUK__TVAL_GET_FASTINT_U32((tv))
-#define DUK_TVAL_GET_FASTINT_I32(tv) DUK__TVAL_GET_FASTINT_I32((tv))
-#define DUK_TVAL_GET_NUMBER(tv) duk_tval_get_number_packed((tv))
+#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->d)
+#define DUK_TVAL_GET_FASTINT(tv) DUK__TVAL_GET_FASTINT((tv))
+#define DUK_TVAL_GET_FASTINT_U32(tv) DUK__TVAL_GET_FASTINT_U32((tv))
+#define DUK_TVAL_GET_FASTINT_I32(tv) DUK__TVAL_GET_FASTINT_I32((tv))
+#define DUK_TVAL_GET_NUMBER(tv) duk_tval_get_number_packed((tv))
#else
-#define DUK_TVAL_GET_NUMBER(tv) ((tv)->d)
-#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->d)
+#define DUK_TVAL_GET_NUMBER(tv) ((tv)->d)
+#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->d)
#endif
-#define DUK_TVAL_GET_LIGHTFUNC(tv,out_fp,out_flags) do { \
+#define DUK_TVAL_GET_LIGHTFUNC(tv, out_fp, out_flags) \
+ do { \
(out_flags) = (tv)->ui[DUK_DBL_IDX_UI0] & 0xffffUL; \
(out_fp) = (duk_c_function) (tv)->ui[DUK_DBL_IDX_UI1]; \
} while (0)
-#define DUK_TVAL_GET_LIGHTFUNC_FUNCPTR(tv) ((duk_c_function) ((tv)->ui[DUK_DBL_IDX_UI1]))
-#define DUK_TVAL_GET_LIGHTFUNC_FLAGS(tv) (((duk_small_uint_t) (tv)->ui[DUK_DBL_IDX_UI0]) & 0xffffUL)
-#define DUK_TVAL_GET_STRING(tv) ((duk_hstring *) (tv)->vp[DUK_DBL_IDX_VP1])
-#define DUK_TVAL_GET_OBJECT(tv) ((duk_hobject *) (tv)->vp[DUK_DBL_IDX_VP1])
-#define DUK_TVAL_GET_BUFFER(tv) ((duk_hbuffer *) (tv)->vp[DUK_DBL_IDX_VP1])
-#define DUK_TVAL_GET_POINTER(tv) ((void *) (tv)->vp[DUK_DBL_IDX_VP1])
-#define DUK_TVAL_GET_HEAPHDR(tv) ((duk_heaphdr *) (tv)->vp[DUK_DBL_IDX_VP1])
+#define DUK_TVAL_GET_LIGHTFUNC_FUNCPTR(tv) ((duk_c_function) ((tv)->ui[DUK_DBL_IDX_UI1]))
+#define DUK_TVAL_GET_LIGHTFUNC_FLAGS(tv) (((duk_small_uint_t) (tv)->ui[DUK_DBL_IDX_UI0]) & 0xffffUL)
+#define DUK_TVAL_GET_STRING(tv) ((duk_hstring *) (tv)->vp[DUK_DBL_IDX_VP1])
+#define DUK_TVAL_GET_OBJECT(tv) ((duk_hobject *) (tv)->vp[DUK_DBL_IDX_VP1])
+#define DUK_TVAL_GET_BUFFER(tv) ((duk_hbuffer *) (tv)->vp[DUK_DBL_IDX_VP1])
+#define DUK_TVAL_GET_POINTER(tv) ((void *) (tv)->vp[DUK_DBL_IDX_VP1])
+#define DUK_TVAL_GET_HEAPHDR(tv) ((duk_heaphdr *) (tv)->vp[DUK_DBL_IDX_VP1])
/* decoding */
-#define DUK_TVAL_GET_TAG(tv) ((duk_small_uint_t) (tv)->us[DUK_DBL_IDX_US0])
-
-#define DUK_TVAL_IS_UNDEFINED(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_UNDEFINED)
-#define DUK_TVAL_IS_UNUSED(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_UNUSED)
-#define DUK_TVAL_IS_NULL(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_NULL)
-#define DUK_TVAL_IS_BOOLEAN(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_BOOLEAN)
-#define DUK_TVAL_IS_BOOLEAN_TRUE(tv) ((tv)->ui[DUK_DBL_IDX_UI0] == DUK_XTAG_BOOLEAN_TRUE)
-#define DUK_TVAL_IS_BOOLEAN_FALSE(tv) ((tv)->ui[DUK_DBL_IDX_UI0] == DUK_XTAG_BOOLEAN_FALSE)
-#define DUK_TVAL_IS_LIGHTFUNC(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_LIGHTFUNC)
-#define DUK_TVAL_IS_STRING(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_STRING)
-#define DUK_TVAL_IS_OBJECT(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_OBJECT)
-#define DUK_TVAL_IS_BUFFER(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_BUFFER)
-#define DUK_TVAL_IS_POINTER(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_POINTER)
+#define DUK_TVAL_GET_TAG(tv) ((duk_small_uint_t) (tv)->us[DUK_DBL_IDX_US0])
+
+#define DUK_TVAL_IS_UNDEFINED(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_UNDEFINED)
+#define DUK_TVAL_IS_UNUSED(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_UNUSED)
+#define DUK_TVAL_IS_NULL(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_NULL)
+#define DUK_TVAL_IS_BOOLEAN(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_BOOLEAN)
+#define DUK_TVAL_IS_BOOLEAN_TRUE(tv) ((tv)->ui[DUK_DBL_IDX_UI0] == DUK_XTAG_BOOLEAN_TRUE)
+#define DUK_TVAL_IS_BOOLEAN_FALSE(tv) ((tv)->ui[DUK_DBL_IDX_UI0] == DUK_XTAG_BOOLEAN_FALSE)
+#define DUK_TVAL_IS_LIGHTFUNC(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_LIGHTFUNC)
+#define DUK_TVAL_IS_STRING(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_STRING)
+#define DUK_TVAL_IS_OBJECT(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_OBJECT)
+#define DUK_TVAL_IS_BUFFER(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_BUFFER)
+#define DUK_TVAL_IS_POINTER(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_POINTER)
#if defined(DUK_USE_FASTINT)
/* 0xfff0 is -Infinity */
-#define DUK_TVAL_IS_DOUBLE(tv) (DUK_TVAL_GET_TAG((tv)) <= 0xfff0UL)
-#define DUK_TVAL_IS_FASTINT(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_FASTINT)
-#define DUK_TVAL_IS_NUMBER(tv) (DUK_TVAL_GET_TAG((tv)) <= 0xfff1UL)
+#define DUK_TVAL_IS_DOUBLE(tv) (DUK_TVAL_GET_TAG((tv)) <= 0xfff0UL)
+#define DUK_TVAL_IS_FASTINT(tv) (DUK_TVAL_GET_TAG((tv)) == DUK_TAG_FASTINT)
+#define DUK_TVAL_IS_NUMBER(tv) (DUK_TVAL_GET_TAG((tv)) <= 0xfff1UL)
#else
-#define DUK_TVAL_IS_NUMBER(tv) (DUK_TVAL_GET_TAG((tv)) <= 0xfff0UL)
-#define DUK_TVAL_IS_DOUBLE(tv) DUK_TVAL_IS_NUMBER((tv))
+#define DUK_TVAL_IS_NUMBER(tv) (DUK_TVAL_GET_TAG((tv)) <= 0xfff0UL)
+#define DUK_TVAL_IS_DOUBLE(tv) DUK_TVAL_IS_NUMBER((tv))
#endif
/* This is performance critical because it appears in every DECREF. */
-#define DUK_TVAL_IS_HEAP_ALLOCATED(tv) (DUK_TVAL_GET_TAG((tv)) >= DUK_TAG_STRING)
+#define DUK_TVAL_IS_HEAP_ALLOCATED(tv) (DUK_TVAL_GET_TAG((tv)) >= DUK_TAG_STRING)
#if defined(DUK_USE_FASTINT)
DUK_INTERNAL_DECL duk_double_t duk_tval_get_number_packed(duk_tval *tv);
#endif
-#else /* DUK_USE_PACKED_TVAL */
+#else /* DUK_USE_PACKED_TVAL */
/* ======================================================================== */
/*
@@ -1152,7 +1225,7 @@ struct duk_tval_struct {
duk_double_t d;
duk_small_int_t i;
#if defined(DUK_USE_FASTINT)
- duk_int64_t fi; /* if present, forces 16-byte duk_tval */
+ duk_int64_t fi; /* if present, forces 16-byte duk_tval */
#endif
void *voidptr;
duk_hstring *hstring;
@@ -1180,24 +1253,23 @@ typedef struct {
#define DUK_TVAL_UNUSED_INITIALIZER() \
{ DUK_TAG_UNUSED, 0, 0.0 }
-#define DUK_TAG_MIN 0
-#define DUK_TAG_NUMBER 0 /* DUK_TAG_NUMBER only defined for non-packed duk_tval */
+#define DUK_TAG_MIN 0
+#define DUK_TAG_NUMBER 0 /* DUK_TAG_NUMBER only defined for non-packed duk_tval */
#if defined(DUK_USE_FASTINT)
-#define DUK_TAG_FASTINT 1
-#endif
-#define DUK_TAG_UNDEFINED 2
-#define DUK_TAG_NULL 3
-#define DUK_TAG_BOOLEAN 4
-#define DUK_TAG_POINTER 5
-#define DUK_TAG_LIGHTFUNC 6
-#define DUK_TAG_UNUSED 7 /* marker; not actual tagged type */
-#define DUK_TAG_STRING 8 /* first heap allocated, match bit boundary */
-#define DUK_TAG_OBJECT 9
-#define DUK_TAG_BUFFER 10
-#define DUK_TAG_MAX 10
-
-#define DUK_TVAL_IS_VALID_TAG(tv) \
- (DUK_TVAL_GET_TAG((tv)) - DUK_TAG_MIN <= DUK_TAG_MAX - DUK_TAG_MIN)
+#define DUK_TAG_FASTINT 1
+#endif
+#define DUK_TAG_UNDEFINED 2
+#define DUK_TAG_NULL 3
+#define DUK_TAG_BOOLEAN 4
+#define DUK_TAG_POINTER 5
+#define DUK_TAG_LIGHTFUNC 6
+#define DUK_TAG_UNUSED 7 /* marker; not actual tagged type */
+#define DUK_TAG_STRING 8 /* first heap allocated, match bit boundary */
+#define DUK_TAG_OBJECT 9
+#define DUK_TAG_BUFFER 10
+#define DUK_TAG_MAX 10
+
+#define DUK_TVAL_IS_VALID_TAG(tv) (DUK_TVAL_GET_TAG((tv)) - DUK_TAG_MIN <= DUK_TAG_MAX - DUK_TAG_MIN)
/* DUK_TAG_NUMBER is intentionally first, as it is the default clause in code
* to support the 8-byte representation. Further, it is a non-heap-allocated
@@ -1206,25 +1278,29 @@ typedef struct {
*/
/* setters */
-#define DUK_TVAL_SET_UNDEFINED(tv) do { \
+#define DUK_TVAL_SET_UNDEFINED(tv) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_UNDEFINED; \
} while (0)
-#define DUK_TVAL_SET_UNUSED(tv) do { \
+#define DUK_TVAL_SET_UNUSED(tv) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_UNUSED; \
} while (0)
-#define DUK_TVAL_SET_NULL(tv) do { \
+#define DUK_TVAL_SET_NULL(tv) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_NULL; \
} while (0)
-#define DUK_TVAL_SET_BOOLEAN(tv,val) do { \
+#define DUK_TVAL_SET_BOOLEAN(tv, val) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_BOOLEAN; \
@@ -1232,7 +1308,8 @@ typedef struct {
} while (0)
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_SET_DOUBLE(tv,val) do { \
+#define DUK_TVAL_SET_DOUBLE(tv, val) \
+ do { \
duk_tval *duk__tv; \
duk_double_t duk__dblval; \
duk__dblval = (val); \
@@ -1241,31 +1318,32 @@ typedef struct {
duk__tv->t = DUK_TAG_NUMBER; \
duk__tv->v.d = duk__dblval; \
} while (0)
-#define DUK_TVAL_SET_I48(tv,val) do { \
+#define DUK_TVAL_SET_I48(tv, val) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_FASTINT; \
duk__tv->v.fi = (val); \
} while (0)
-#define DUK_TVAL_SET_U32(tv,val) do { \
+#define DUK_TVAL_SET_U32(tv, val) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_FASTINT; \
duk__tv->v.fi = (duk_int64_t) (val); \
} while (0)
-#define DUK_TVAL_SET_I32(tv,val) do { \
+#define DUK_TVAL_SET_I32(tv, val) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_FASTINT; \
duk__tv->v.fi = (duk_int64_t) (val); \
} while (0)
-#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv,d) \
- duk_tval_set_number_chkfast_fast((tv), (d))
-#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv,d) \
- duk_tval_set_number_chkfast_slow((tv), (d))
-#define DUK_TVAL_SET_NUMBER(tv,val) \
- DUK_TVAL_SET_DOUBLE((tv), (val))
-#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) do { \
+#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv, d) duk_tval_set_number_chkfast_fast((tv), (d))
+#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv, d) duk_tval_set_number_chkfast_slow((tv), (d))
+#define DUK_TVAL_SET_NUMBER(tv, val) DUK_TVAL_SET_DOUBLE((tv), (val))
+#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) \
+ do { \
duk_tval *duk__tv; \
duk_double_t duk__d; \
duk__tv = (tv); \
@@ -1274,7 +1352,8 @@ typedef struct {
DUK_TVAL_SET_NUMBER_CHKFAST_FAST(duk__tv, duk__d); \
} \
} while (0)
-#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) do { \
+#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) \
+ do { \
duk_tval *duk__tv; \
duk_double_t duk__d; \
duk__tv = (tv); \
@@ -1283,16 +1362,13 @@ typedef struct {
DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(duk__tv, duk__d); \
} \
} while (0)
-#else /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_DOUBLE(tv,d) \
- DUK_TVAL_SET_NUMBER((tv), (d))
-#define DUK_TVAL_SET_I48(tv,val) \
- DUK_TVAL_SET_NUMBER((tv), (duk_double_t) (val)) /* XXX: fast int-to-double */
-#define DUK_TVAL_SET_U32(tv,val) \
- DUK_TVAL_SET_NUMBER((tv), (duk_double_t) (val))
-#define DUK_TVAL_SET_I32(tv,val) \
- DUK_TVAL_SET_NUMBER((tv), (duk_double_t) (val))
-#define DUK_TVAL_SET_NUMBER(tv,val) do { \
+#else /* DUK_USE_FASTINT */
+#define DUK_TVAL_SET_DOUBLE(tv, d) DUK_TVAL_SET_NUMBER((tv), (d))
+#define DUK_TVAL_SET_I48(tv, val) DUK_TVAL_SET_NUMBER((tv), (duk_double_t) (val)) /* XXX: fast int-to-double */
+#define DUK_TVAL_SET_U32(tv, val) DUK_TVAL_SET_NUMBER((tv), (duk_double_t) (val))
+#define DUK_TVAL_SET_I32(tv, val) DUK_TVAL_SET_NUMBER((tv), (duk_double_t) (val))
+#define DUK_TVAL_SET_NUMBER(tv, val) \
+ do { \
duk_tval *duk__tv; \
duk_double_t duk__dblval; \
duk__dblval = (val); \
@@ -1301,25 +1377,28 @@ typedef struct {
duk__tv->t = DUK_TAG_NUMBER; \
duk__tv->v.d = duk__dblval; \
} while (0)
-#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv,d) \
- DUK_TVAL_SET_NUMBER((tv), (d))
-#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv,d) \
- DUK_TVAL_SET_NUMBER((tv), (d))
-#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) do { } while (0)
-#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) do { } while (0)
-#endif /* DUK_USE_FASTINT */
-
-#define DUK_TVAL_SET_FASTINT(tv,i) \
- DUK_TVAL_SET_I48((tv), (i)) /* alias */
-
-#define DUK_TVAL_SET_POINTER(tv,hptr) do { \
+#define DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv, d) DUK_TVAL_SET_NUMBER((tv), (d))
+#define DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv, d) DUK_TVAL_SET_NUMBER((tv), (d))
+#define DUK_TVAL_CHKFAST_INPLACE_FAST(tv) \
+ do { \
+ } while (0)
+#define DUK_TVAL_CHKFAST_INPLACE_SLOW(tv) \
+ do { \
+ } while (0)
+#endif /* DUK_USE_FASTINT */
+
+#define DUK_TVAL_SET_FASTINT(tv, i) DUK_TVAL_SET_I48((tv), (i)) /* alias */
+
+#define DUK_TVAL_SET_POINTER(tv, hptr) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_POINTER; \
duk__tv->v.voidptr = (hptr); \
} while (0)
-#define DUK_TVAL_SET_LIGHTFUNC(tv,fp,flags) do { \
+#define DUK_TVAL_SET_LIGHTFUNC(tv, fp, flags) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_LIGHTFUNC; \
@@ -1327,28 +1406,32 @@ typedef struct {
duk__tv->v.lightfunc = (duk_c_function) (fp); \
} while (0)
-#define DUK_TVAL_SET_STRING(tv,hptr) do { \
+#define DUK_TVAL_SET_STRING(tv, hptr) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_STRING; \
duk__tv->v.hstring = (hptr); \
} while (0)
-#define DUK_TVAL_SET_OBJECT(tv,hptr) do { \
+#define DUK_TVAL_SET_OBJECT(tv, hptr) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_OBJECT; \
duk__tv->v.hobject = (hptr); \
} while (0)
-#define DUK_TVAL_SET_BUFFER(tv,hptr) do { \
+#define DUK_TVAL_SET_BUFFER(tv, hptr) \
+ do { \
duk_tval *duk__tv; \
duk__tv = (tv); \
duk__tv->t = DUK_TAG_BUFFER; \
duk__tv->v.hbuffer = (hptr); \
} while (0)
-#define DUK_TVAL_SET_NAN(tv) do { \
+#define DUK_TVAL_SET_NAN(tv) \
+ do { \
/* in non-packed representation we don't care about which NaN is used */ \
duk_tval *duk__tv; \
duk__tv = (tv); \
@@ -1356,32 +1439,32 @@ typedef struct {
duk__tv->v.d = DUK_DOUBLE_NAN; \
} while (0)
-#define DUK_TVAL_SET_TVAL(tv,x) do { *(tv) = *(x); } while (0)
+#define DUK_TVAL_SET_TVAL(tv, x) \
+ do { \
+ *(tv) = *(x); \
+ } while (0)
/* getters */
-#define DUK_TVAL_GET_BOOLEAN(tv) ((duk_small_uint_t) (tv)->v.i)
+#define DUK_TVAL_GET_BOOLEAN(tv) ((duk_small_uint_t) (tv)->v.i)
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->v.d)
-#define DUK_TVAL_GET_FASTINT(tv) ((tv)->v.fi)
-#define DUK_TVAL_GET_FASTINT_U32(tv) ((duk_uint32_t) ((tv)->v.fi))
-#define DUK_TVAL_GET_FASTINT_I32(tv) ((duk_int32_t) ((tv)->v.fi))
+#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->v.d)
+#define DUK_TVAL_GET_FASTINT(tv) ((tv)->v.fi)
+#define DUK_TVAL_GET_FASTINT_U32(tv) ((duk_uint32_t) ((tv)->v.fi))
+#define DUK_TVAL_GET_FASTINT_I32(tv) ((duk_int32_t) ((tv)->v.fi))
#if 0
-#define DUK_TVAL_GET_NUMBER(tv) (DUK_TVAL_IS_FASTINT((tv)) ? \
- (duk_double_t) DUK_TVAL_GET_FASTINT((tv)) : \
- DUK_TVAL_GET_DOUBLE((tv)))
-#define DUK_TVAL_GET_NUMBER(tv) duk_tval_get_number_unpacked((tv))
+#define DUK_TVAL_GET_NUMBER(tv) (DUK_TVAL_IS_FASTINT((tv)) ? (duk_double_t) DUK_TVAL_GET_FASTINT((tv)) : DUK_TVAL_GET_DOUBLE((tv)))
+#define DUK_TVAL_GET_NUMBER(tv) duk_tval_get_number_unpacked((tv))
#else
/* This seems reasonable overall. */
-#define DUK_TVAL_GET_NUMBER(tv) (DUK_TVAL_IS_FASTINT((tv)) ? \
- duk_tval_get_number_unpacked_fastint((tv)) : \
- DUK_TVAL_GET_DOUBLE((tv)))
+#define DUK_TVAL_GET_NUMBER(tv) (DUK_TVAL_IS_FASTINT((tv)) ? duk_tval_get_number_unpacked_fastint((tv)) : DUK_TVAL_GET_DOUBLE((tv)))
#endif
#else
-#define DUK_TVAL_GET_NUMBER(tv) ((tv)->v.d)
-#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->v.d)
-#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_GET_POINTER(tv) ((tv)->v.voidptr)
-#define DUK_TVAL_GET_LIGHTFUNC(tv,out_fp,out_flags) do { \
+#define DUK_TVAL_GET_NUMBER(tv) ((tv)->v.d)
+#define DUK_TVAL_GET_DOUBLE(tv) ((tv)->v.d)
+#endif /* DUK_USE_FASTINT */
+#define DUK_TVAL_GET_POINTER(tv) ((tv)->v.voidptr)
+#define DUK_TVAL_GET_LIGHTFUNC(tv, out_fp, out_flags) \
+ do { \
(out_flags) = (duk_uint32_t) (tv)->v_extra; \
(out_fp) = (tv)->v.lightfunc; \
} while (0)
@@ -1401,19 +1484,18 @@ typedef struct {
#define DUK_TVAL_IS_BOOLEAN_TRUE(tv) (((tv)->t == DUK_TAG_BOOLEAN) && ((tv)->v.i != 0))
#define DUK_TVAL_IS_BOOLEAN_FALSE(tv) (((tv)->t == DUK_TAG_BOOLEAN) && ((tv)->v.i == 0))
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_IS_DOUBLE(tv) ((tv)->t == DUK_TAG_NUMBER)
-#define DUK_TVAL_IS_FASTINT(tv) ((tv)->t == DUK_TAG_FASTINT)
-#define DUK_TVAL_IS_NUMBER(tv) ((tv)->t == DUK_TAG_NUMBER || \
- (tv)->t == DUK_TAG_FASTINT)
+#define DUK_TVAL_IS_DOUBLE(tv) ((tv)->t == DUK_TAG_NUMBER)
+#define DUK_TVAL_IS_FASTINT(tv) ((tv)->t == DUK_TAG_FASTINT)
+#define DUK_TVAL_IS_NUMBER(tv) ((tv)->t == DUK_TAG_NUMBER || (tv)->t == DUK_TAG_FASTINT)
#else
-#define DUK_TVAL_IS_NUMBER(tv) ((tv)->t == DUK_TAG_NUMBER)
-#define DUK_TVAL_IS_DOUBLE(tv) DUK_TVAL_IS_NUMBER((tv))
-#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_IS_POINTER(tv) ((tv)->t == DUK_TAG_POINTER)
-#define DUK_TVAL_IS_LIGHTFUNC(tv) ((tv)->t == DUK_TAG_LIGHTFUNC)
-#define DUK_TVAL_IS_STRING(tv) ((tv)->t == DUK_TAG_STRING)
-#define DUK_TVAL_IS_OBJECT(tv) ((tv)->t == DUK_TAG_OBJECT)
-#define DUK_TVAL_IS_BUFFER(tv) ((tv)->t == DUK_TAG_BUFFER)
+#define DUK_TVAL_IS_NUMBER(tv) ((tv)->t == DUK_TAG_NUMBER)
+#define DUK_TVAL_IS_DOUBLE(tv) DUK_TVAL_IS_NUMBER((tv))
+#endif /* DUK_USE_FASTINT */
+#define DUK_TVAL_IS_POINTER(tv) ((tv)->t == DUK_TAG_POINTER)
+#define DUK_TVAL_IS_LIGHTFUNC(tv) ((tv)->t == DUK_TAG_LIGHTFUNC)
+#define DUK_TVAL_IS_STRING(tv) ((tv)->t == DUK_TAG_STRING)
+#define DUK_TVAL_IS_OBJECT(tv) ((tv)->t == DUK_TAG_OBJECT)
+#define DUK_TVAL_IS_BUFFER(tv) ((tv)->t == DUK_TAG_BUFFER)
/* This is performance critical because it's needed for every DECREF.
* Take advantage of the fact that the first heap allocated tag is 8,
@@ -1421,68 +1503,68 @@ typedef struct {
* non-heap-allocated tags).
*/
#if 0
-#define DUK_TVAL_IS_HEAP_ALLOCATED(tv) ((tv)->t >= DUK_TAG_STRING)
+#define DUK_TVAL_IS_HEAP_ALLOCATED(tv) ((tv)->t >= DUK_TAG_STRING)
#endif
-#define DUK_TVAL_IS_HEAP_ALLOCATED(tv) ((tv)->t & 0x08)
+#define DUK_TVAL_IS_HEAP_ALLOCATED(tv) ((tv)->t & 0x08)
#if defined(DUK_USE_FASTINT)
#if 0
DUK_INTERNAL_DECL duk_double_t duk_tval_get_number_unpacked(duk_tval *tv);
#endif
-DUK_INTERNAL_DECL DUK_INLINE duk_double_t duk_tval_get_number_unpacked_fastint(duk_tval *tv);
+DUK_INTERNAL_DECL duk_double_t duk_tval_get_number_unpacked_fastint(duk_tval *tv);
#endif
-#endif /* DUK_USE_PACKED_TVAL */
+#endif /* DUK_USE_PACKED_TVAL */
/*
* Convenience (independent of representation)
*/
-#define DUK_TVAL_SET_BOOLEAN_TRUE(tv) DUK_TVAL_SET_BOOLEAN((tv), 1)
-#define DUK_TVAL_SET_BOOLEAN_FALSE(tv) DUK_TVAL_SET_BOOLEAN((tv), 0)
+#define DUK_TVAL_SET_BOOLEAN_TRUE(tv) DUK_TVAL_SET_BOOLEAN((tv), 1)
+#define DUK_TVAL_SET_BOOLEAN_FALSE(tv) DUK_TVAL_SET_BOOLEAN((tv), 0)
-#define DUK_TVAL_STRING_IS_SYMBOL(tv) \
- DUK_HSTRING_HAS_SYMBOL(DUK_TVAL_GET_STRING((tv)))
+#define DUK_TVAL_STRING_IS_SYMBOL(tv) DUK_HSTRING_HAS_SYMBOL(DUK_TVAL_GET_STRING((tv)))
/* Lightfunc flags packing and unpacking. */
/* Sign extend: 0x0000##00 -> 0x##000000 -> sign extend to 0xssssss##.
* Avoid signed shifts due to portability limitations.
*/
-#define DUK_LFUNC_FLAGS_GET_MAGIC(lf_flags) \
- ((duk_int32_t) (duk_int8_t) (((duk_uint16_t) (lf_flags)) >> 8))
-#define DUK_LFUNC_FLAGS_GET_LENGTH(lf_flags) \
- (((lf_flags) >> 4) & 0x0fU)
-#define DUK_LFUNC_FLAGS_GET_NARGS(lf_flags) \
- ((lf_flags) & 0x0fU)
-#define DUK_LFUNC_FLAGS_PACK(magic,length,nargs) \
- ((((duk_small_uint_t) (magic)) & 0xffU) << 8) | ((length) << 4) | (nargs)
-
-#define DUK_LFUNC_NARGS_VARARGS 0x0f /* varargs marker */
-#define DUK_LFUNC_NARGS_MIN 0x00
-#define DUK_LFUNC_NARGS_MAX 0x0e /* max, excl. varargs marker */
-#define DUK_LFUNC_LENGTH_MIN 0x00
-#define DUK_LFUNC_LENGTH_MAX 0x0f
-#define DUK_LFUNC_MAGIC_MIN (-0x80)
-#define DUK_LFUNC_MAGIC_MAX 0x7f
+#define DUK_LFUNC_FLAGS_GET_MAGIC(lf_flags) ((duk_int32_t) (duk_int8_t) (((duk_uint16_t) (lf_flags)) >> 8))
+#define DUK_LFUNC_FLAGS_GET_LENGTH(lf_flags) (((lf_flags) >> 4) & 0x0fU)
+#define DUK_LFUNC_FLAGS_GET_NARGS(lf_flags) ((lf_flags) &0x0fU)
+#define DUK_LFUNC_FLAGS_PACK(magic, length, nargs) ((((duk_small_uint_t) (magic)) & 0xffU) << 8) | ((length) << 4) | (nargs)
+
+#define DUK_LFUNC_NARGS_VARARGS 0x0f /* varargs marker */
+#define DUK_LFUNC_NARGS_MIN 0x00
+#define DUK_LFUNC_NARGS_MAX 0x0e /* max, excl. varargs marker */
+#define DUK_LFUNC_LENGTH_MIN 0x00
+#define DUK_LFUNC_LENGTH_MAX 0x0f
+#define DUK_LFUNC_MAGIC_MIN (-0x80)
+#define DUK_LFUNC_MAGIC_MAX 0x7f
/* fastint constants etc */
#if defined(DUK_USE_FASTINT)
-#define DUK_FASTINT_MIN (DUK_I64_CONSTANT(-0x800000000000))
-#define DUK_FASTINT_MAX (DUK_I64_CONSTANT(0x7fffffffffff))
-#define DUK_FASTINT_BITS 48
+#define DUK_FASTINT_MIN (DUK_I64_CONSTANT(-0x800000000000))
+#define DUK_FASTINT_MAX (DUK_I64_CONSTANT(0x7fffffffffff))
+#define DUK_FASTINT_BITS 48
-DUK_INTERNAL_DECL DUK_INLINE void duk_tval_set_number_chkfast_fast(duk_tval *tv, duk_double_t x);
+DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_fast(duk_tval *tv, duk_double_t x);
DUK_INTERNAL_DECL void duk_tval_set_number_chkfast_slow(duk_tval *tv, duk_double_t x);
#endif
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_tval_assert_valid(duk_tval *tv);
-#define DUK_TVAL_ASSERT_VALID(tv) do { duk_tval_assert_valid((tv)); } while (0)
+#define DUK_TVAL_ASSERT_VALID(tv) \
+ do { \
+ duk_tval_assert_valid((tv)); \
+ } while (0)
#else
-#define DUK_TVAL_ASSERT_VALID(tv) do {} while (0)
+#define DUK_TVAL_ASSERT_VALID(tv) \
+ do { \
+ } while (0)
#endif
-#endif /* DUK_TVAL_H_INCLUDED */
+#endif /* DUK_TVAL_H_INCLUDED */
/* #include duk_builtins.h */
/*
* Automatically generated by genbuiltins.py, do not edit!
@@ -1512,9 +1594,9 @@ DUK_INTERNAL_DECL void duk_tval_assert_valid(duk_tval *tv);
#define DUK_STRIDX_UC_FUNCTION 5 /* 'Function' */
#define DUK_HEAP_STRING_UC_FUNCTION(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_FUNCTION)
#define DUK_HTHREAD_STRING_UC_FUNCTION(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_FUNCTION)
-#define DUK_STRIDX_ARRAY 6 /* 'Array' */
-#define DUK_HEAP_STRING_ARRAY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ARRAY)
-#define DUK_HTHREAD_STRING_ARRAY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ARRAY)
+#define DUK_STRIDX_UC_ARRAY 6 /* 'Array' */
+#define DUK_HEAP_STRING_UC_ARRAY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_ARRAY)
+#define DUK_HTHREAD_STRING_UC_ARRAY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_ARRAY)
#define DUK_STRIDX_UC_STRING 7 /* 'String' */
#define DUK_HEAP_STRING_UC_STRING(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_STRING)
#define DUK_HTHREAD_STRING_UC_STRING(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_STRING)
@@ -1524,9 +1606,9 @@ DUK_INTERNAL_DECL void duk_tval_assert_valid(duk_tval *tv);
#define DUK_STRIDX_UC_NUMBER 9 /* 'Number' */
#define DUK_HEAP_STRING_UC_NUMBER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_NUMBER)
#define DUK_HTHREAD_STRING_UC_NUMBER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_NUMBER)
-#define DUK_STRIDX_DATE 10 /* 'Date' */
-#define DUK_HEAP_STRING_DATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DATE)
-#define DUK_HTHREAD_STRING_DATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DATE)
+#define DUK_STRIDX_UC_DATE 10 /* 'Date' */
+#define DUK_HEAP_STRING_UC_DATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_UC_DATE)
+#define DUK_HTHREAD_STRING_UC_DATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_UC_DATE)
#define DUK_STRIDX_REG_EXP 11 /* 'RegExp' */
#define DUK_HEAP_STRING_REG_EXP(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_REG_EXP)
#define DUK_HTHREAD_STRING_REG_EXP(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_REG_EXP)
@@ -1752,260 +1834,263 @@ DUK_INTERNAL_DECL void duk_tval_assert_valid(duk_tval *tv);
#define DUK_STRIDX_DATA 85 /* 'data' */
#define DUK_HEAP_STRING_DATA(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DATA)
#define DUK_HTHREAD_STRING_DATA(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DATA)
-#define DUK_STRIDX_LENGTH 86 /* 'length' */
+#define DUK_STRIDX_LC_BUFFER 86 /* 'buffer' */
+#define DUK_HEAP_STRING_LC_BUFFER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_BUFFER)
+#define DUK_HTHREAD_STRING_LC_BUFFER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_BUFFER)
+#define DUK_STRIDX_LENGTH 87 /* 'length' */
#define DUK_HEAP_STRING_LENGTH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LENGTH)
#define DUK_HTHREAD_STRING_LENGTH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LENGTH)
-#define DUK_STRIDX_SET 87 /* 'set' */
+#define DUK_STRIDX_SET 88 /* 'set' */
#define DUK_HEAP_STRING_SET(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SET)
#define DUK_HTHREAD_STRING_SET(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SET)
-#define DUK_STRIDX_STACK 88 /* 'stack' */
+#define DUK_STRIDX_STACK 89 /* 'stack' */
#define DUK_HEAP_STRING_STACK(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_STACK)
#define DUK_HTHREAD_STRING_STACK(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_STACK)
-#define DUK_STRIDX_PC 89 /* 'pc' */
+#define DUK_STRIDX_PC 90 /* 'pc' */
#define DUK_HEAP_STRING_PC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PC)
#define DUK_HTHREAD_STRING_PC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PC)
-#define DUK_STRIDX_LINE_NUMBER 90 /* 'lineNumber' */
+#define DUK_STRIDX_LINE_NUMBER 91 /* 'lineNumber' */
#define DUK_HEAP_STRING_LINE_NUMBER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LINE_NUMBER)
#define DUK_HTHREAD_STRING_LINE_NUMBER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LINE_NUMBER)
-#define DUK_STRIDX_INT_TRACEDATA 91 /* '\x82Tracedata' */
+#define DUK_STRIDX_INT_TRACEDATA 92 /* '\x82Tracedata' */
#define DUK_HEAP_STRING_INT_TRACEDATA(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_TRACEDATA)
#define DUK_HTHREAD_STRING_INT_TRACEDATA(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_TRACEDATA)
-#define DUK_STRIDX_NAME 92 /* 'name' */
+#define DUK_STRIDX_NAME 93 /* 'name' */
#define DUK_HEAP_STRING_NAME(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_NAME)
#define DUK_HTHREAD_STRING_NAME(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_NAME)
-#define DUK_STRIDX_FILE_NAME 93 /* 'fileName' */
+#define DUK_STRIDX_FILE_NAME 94 /* 'fileName' */
#define DUK_HEAP_STRING_FILE_NAME(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FILE_NAME)
#define DUK_HTHREAD_STRING_FILE_NAME(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FILE_NAME)
-#define DUK_STRIDX_LC_POINTER 94 /* 'pointer' */
+#define DUK_STRIDX_LC_POINTER 95 /* 'pointer' */
#define DUK_HEAP_STRING_LC_POINTER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_POINTER)
#define DUK_HTHREAD_STRING_LC_POINTER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_POINTER)
-#define DUK_STRIDX_INT_TARGET 95 /* '\x82Target' */
+#define DUK_STRIDX_INT_TARGET 96 /* '\x82Target' */
#define DUK_HEAP_STRING_INT_TARGET(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_TARGET)
#define DUK_HTHREAD_STRING_INT_TARGET(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_TARGET)
-#define DUK_STRIDX_INT_NEXT 96 /* '\x82Next' */
+#define DUK_STRIDX_INT_NEXT 97 /* '\x82Next' */
#define DUK_HEAP_STRING_INT_NEXT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_NEXT)
#define DUK_HTHREAD_STRING_INT_NEXT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_NEXT)
-#define DUK_STRIDX_INT_BYTECODE 97 /* '\x82Bytecode' */
+#define DUK_STRIDX_INT_BYTECODE 98 /* '\x82Bytecode' */
#define DUK_HEAP_STRING_INT_BYTECODE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_BYTECODE)
#define DUK_HTHREAD_STRING_INT_BYTECODE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_BYTECODE)
-#define DUK_STRIDX_INT_FORMALS 98 /* '\x82Formals' */
+#define DUK_STRIDX_INT_FORMALS 99 /* '\x82Formals' */
#define DUK_HEAP_STRING_INT_FORMALS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_FORMALS)
#define DUK_HTHREAD_STRING_INT_FORMALS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_FORMALS)
-#define DUK_STRIDX_INT_VARMAP 99 /* '\x82Varmap' */
+#define DUK_STRIDX_INT_VARMAP 100 /* '\x82Varmap' */
#define DUK_HEAP_STRING_INT_VARMAP(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VARMAP)
#define DUK_HTHREAD_STRING_INT_VARMAP(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VARMAP)
-#define DUK_STRIDX_INT_SOURCE 100 /* '\x82Source' */
+#define DUK_STRIDX_INT_SOURCE 101 /* '\x82Source' */
#define DUK_HEAP_STRING_INT_SOURCE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_SOURCE)
#define DUK_HTHREAD_STRING_INT_SOURCE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_SOURCE)
-#define DUK_STRIDX_INT_PC2LINE 101 /* '\x82Pc2line' */
+#define DUK_STRIDX_INT_PC2LINE 102 /* '\x82Pc2line' */
#define DUK_HEAP_STRING_INT_PC2LINE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_PC2LINE)
#define DUK_HTHREAD_STRING_INT_PC2LINE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_PC2LINE)
-#define DUK_STRIDX_INT_MAP 102 /* '\x82Map' */
+#define DUK_STRIDX_INT_MAP 103 /* '\x82Map' */
#define DUK_HEAP_STRING_INT_MAP(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_MAP)
#define DUK_HTHREAD_STRING_INT_MAP(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_MAP)
-#define DUK_STRIDX_INT_VARENV 103 /* '\x82Varenv' */
+#define DUK_STRIDX_INT_VARENV 104 /* '\x82Varenv' */
#define DUK_HEAP_STRING_INT_VARENV(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VARENV)
#define DUK_HTHREAD_STRING_INT_VARENV(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VARENV)
-#define DUK_STRIDX_INT_FINALIZER 104 /* '\x82Finalizer' */
+#define DUK_STRIDX_INT_FINALIZER 105 /* '\x82Finalizer' */
#define DUK_HEAP_STRING_INT_FINALIZER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_FINALIZER)
#define DUK_HTHREAD_STRING_INT_FINALIZER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_FINALIZER)
-#define DUK_STRIDX_INT_VALUE 105 /* '\x82Value' */
+#define DUK_STRIDX_INT_VALUE 106 /* '\x82Value' */
#define DUK_HEAP_STRING_INT_VALUE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INT_VALUE)
#define DUK_HTHREAD_STRING_INT_VALUE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INT_VALUE)
-#define DUK_STRIDX_COMPILE 106 /* 'compile' */
+#define DUK_STRIDX_COMPILE 107 /* 'compile' */
#define DUK_HEAP_STRING_COMPILE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_COMPILE)
#define DUK_HTHREAD_STRING_COMPILE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_COMPILE)
-#define DUK_STRIDX_INPUT 107 /* 'input' */
+#define DUK_STRIDX_INPUT 108 /* 'input' */
#define DUK_HEAP_STRING_INPUT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INPUT)
#define DUK_HTHREAD_STRING_INPUT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INPUT)
-#define DUK_STRIDX_ERR_CREATE 108 /* 'errCreate' */
+#define DUK_STRIDX_ERR_CREATE 109 /* 'errCreate' */
#define DUK_HEAP_STRING_ERR_CREATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ERR_CREATE)
#define DUK_HTHREAD_STRING_ERR_CREATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ERR_CREATE)
-#define DUK_STRIDX_ERR_THROW 109 /* 'errThrow' */
+#define DUK_STRIDX_ERR_THROW 110 /* 'errThrow' */
#define DUK_HEAP_STRING_ERR_THROW(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ERR_THROW)
#define DUK_HTHREAD_STRING_ERR_THROW(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ERR_THROW)
-#define DUK_STRIDX_ENV 110 /* 'env' */
+#define DUK_STRIDX_ENV 111 /* 'env' */
#define DUK_HEAP_STRING_ENV(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ENV)
#define DUK_HTHREAD_STRING_ENV(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ENV)
-#define DUK_STRIDX_HEX 111 /* 'hex' */
+#define DUK_STRIDX_HEX 112 /* 'hex' */
#define DUK_HEAP_STRING_HEX(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_HEX)
#define DUK_HTHREAD_STRING_HEX(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_HEX)
-#define DUK_STRIDX_BASE64 112 /* 'base64' */
+#define DUK_STRIDX_BASE64 113 /* 'base64' */
#define DUK_HEAP_STRING_BASE64(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_BASE64)
#define DUK_HTHREAD_STRING_BASE64(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_BASE64)
-#define DUK_STRIDX_JX 113 /* 'jx' */
+#define DUK_STRIDX_JX 114 /* 'jx' */
#define DUK_HEAP_STRING_JX(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JX)
#define DUK_HTHREAD_STRING_JX(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JX)
-#define DUK_STRIDX_JC 114 /* 'jc' */
+#define DUK_STRIDX_JC 115 /* 'jc' */
#define DUK_HEAP_STRING_JC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JC)
#define DUK_HTHREAD_STRING_JC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JC)
-#define DUK_STRIDX_JSON_EXT_UNDEFINED 115 /* '{"_undef":true}' */
+#define DUK_STRIDX_JSON_EXT_UNDEFINED 116 /* '{"_undef":true}' */
#define DUK_HEAP_STRING_JSON_EXT_UNDEFINED(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_UNDEFINED)
#define DUK_HTHREAD_STRING_JSON_EXT_UNDEFINED(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_UNDEFINED)
-#define DUK_STRIDX_JSON_EXT_NAN 116 /* '{"_nan":true}' */
+#define DUK_STRIDX_JSON_EXT_NAN 117 /* '{"_nan":true}' */
#define DUK_HEAP_STRING_JSON_EXT_NAN(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_NAN)
#define DUK_HTHREAD_STRING_JSON_EXT_NAN(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_NAN)
-#define DUK_STRIDX_JSON_EXT_POSINF 117 /* '{"_inf":true}' */
+#define DUK_STRIDX_JSON_EXT_POSINF 118 /* '{"_inf":true}' */
#define DUK_HEAP_STRING_JSON_EXT_POSINF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_POSINF)
#define DUK_HTHREAD_STRING_JSON_EXT_POSINF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_POSINF)
-#define DUK_STRIDX_JSON_EXT_NEGINF 118 /* '{"_ninf":true}' */
+#define DUK_STRIDX_JSON_EXT_NEGINF 119 /* '{"_ninf":true}' */
#define DUK_HEAP_STRING_JSON_EXT_NEGINF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_NEGINF)
#define DUK_HTHREAD_STRING_JSON_EXT_NEGINF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_NEGINF)
-#define DUK_STRIDX_JSON_EXT_FUNCTION1 119 /* '{"_func":true}' */
+#define DUK_STRIDX_JSON_EXT_FUNCTION1 120 /* '{"_func":true}' */
#define DUK_HEAP_STRING_JSON_EXT_FUNCTION1(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_FUNCTION1)
#define DUK_HTHREAD_STRING_JSON_EXT_FUNCTION1(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_FUNCTION1)
-#define DUK_STRIDX_JSON_EXT_FUNCTION2 120 /* '{_func:true}' */
+#define DUK_STRIDX_JSON_EXT_FUNCTION2 121 /* '{_func:true}' */
#define DUK_HEAP_STRING_JSON_EXT_FUNCTION2(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_JSON_EXT_FUNCTION2)
#define DUK_HTHREAD_STRING_JSON_EXT_FUNCTION2(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_JSON_EXT_FUNCTION2)
-#define DUK_STRIDX_BREAK 121 /* 'break' */
+#define DUK_STRIDX_BREAK 122 /* 'break' */
#define DUK_HEAP_STRING_BREAK(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_BREAK)
#define DUK_HTHREAD_STRING_BREAK(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_BREAK)
-#define DUK_STRIDX_CASE 122 /* 'case' */
+#define DUK_STRIDX_CASE 123 /* 'case' */
#define DUK_HEAP_STRING_CASE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CASE)
#define DUK_HTHREAD_STRING_CASE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CASE)
-#define DUK_STRIDX_CATCH 123 /* 'catch' */
+#define DUK_STRIDX_CATCH 124 /* 'catch' */
#define DUK_HEAP_STRING_CATCH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CATCH)
#define DUK_HTHREAD_STRING_CATCH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CATCH)
-#define DUK_STRIDX_CONTINUE 124 /* 'continue' */
+#define DUK_STRIDX_CONTINUE 125 /* 'continue' */
#define DUK_HEAP_STRING_CONTINUE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CONTINUE)
#define DUK_HTHREAD_STRING_CONTINUE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CONTINUE)
-#define DUK_STRIDX_DEBUGGER 125 /* 'debugger' */
+#define DUK_STRIDX_DEBUGGER 126 /* 'debugger' */
#define DUK_HEAP_STRING_DEBUGGER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DEBUGGER)
#define DUK_HTHREAD_STRING_DEBUGGER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DEBUGGER)
-#define DUK_STRIDX_DEFAULT 126 /* 'default' */
+#define DUK_STRIDX_DEFAULT 127 /* 'default' */
#define DUK_HEAP_STRING_DEFAULT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DEFAULT)
#define DUK_HTHREAD_STRING_DEFAULT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DEFAULT)
-#define DUK_STRIDX_DELETE 127 /* 'delete' */
+#define DUK_STRIDX_DELETE 128 /* 'delete' */
#define DUK_HEAP_STRING_DELETE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DELETE)
#define DUK_HTHREAD_STRING_DELETE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DELETE)
-#define DUK_STRIDX_DO 128 /* 'do' */
+#define DUK_STRIDX_DO 129 /* 'do' */
#define DUK_HEAP_STRING_DO(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_DO)
#define DUK_HTHREAD_STRING_DO(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_DO)
-#define DUK_STRIDX_ELSE 129 /* 'else' */
+#define DUK_STRIDX_ELSE 130 /* 'else' */
#define DUK_HEAP_STRING_ELSE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ELSE)
#define DUK_HTHREAD_STRING_ELSE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ELSE)
-#define DUK_STRIDX_FINALLY 130 /* 'finally' */
+#define DUK_STRIDX_FINALLY 131 /* 'finally' */
#define DUK_HEAP_STRING_FINALLY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FINALLY)
#define DUK_HTHREAD_STRING_FINALLY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FINALLY)
-#define DUK_STRIDX_FOR 131 /* 'for' */
+#define DUK_STRIDX_FOR 132 /* 'for' */
#define DUK_HEAP_STRING_FOR(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FOR)
#define DUK_HTHREAD_STRING_FOR(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FOR)
-#define DUK_STRIDX_LC_FUNCTION 132 /* 'function' */
+#define DUK_STRIDX_LC_FUNCTION 133 /* 'function' */
#define DUK_HEAP_STRING_LC_FUNCTION(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_FUNCTION)
#define DUK_HTHREAD_STRING_LC_FUNCTION(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_FUNCTION)
-#define DUK_STRIDX_IF 133 /* 'if' */
+#define DUK_STRIDX_IF 134 /* 'if' */
#define DUK_HEAP_STRING_IF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IF)
#define DUK_HTHREAD_STRING_IF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IF)
-#define DUK_STRIDX_IN 134 /* 'in' */
+#define DUK_STRIDX_IN 135 /* 'in' */
#define DUK_HEAP_STRING_IN(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IN)
#define DUK_HTHREAD_STRING_IN(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IN)
-#define DUK_STRIDX_INSTANCEOF 135 /* 'instanceof' */
+#define DUK_STRIDX_INSTANCEOF 136 /* 'instanceof' */
#define DUK_HEAP_STRING_INSTANCEOF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INSTANCEOF)
#define DUK_HTHREAD_STRING_INSTANCEOF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INSTANCEOF)
-#define DUK_STRIDX_NEW 136 /* 'new' */
+#define DUK_STRIDX_NEW 137 /* 'new' */
#define DUK_HEAP_STRING_NEW(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_NEW)
#define DUK_HTHREAD_STRING_NEW(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_NEW)
-#define DUK_STRIDX_RETURN 137 /* 'return' */
+#define DUK_STRIDX_RETURN 138 /* 'return' */
#define DUK_HEAP_STRING_RETURN(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_RETURN)
#define DUK_HTHREAD_STRING_RETURN(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_RETURN)
-#define DUK_STRIDX_SWITCH 138 /* 'switch' */
+#define DUK_STRIDX_SWITCH 139 /* 'switch' */
#define DUK_HEAP_STRING_SWITCH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SWITCH)
#define DUK_HTHREAD_STRING_SWITCH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SWITCH)
-#define DUK_STRIDX_THIS 139 /* 'this' */
+#define DUK_STRIDX_THIS 140 /* 'this' */
#define DUK_HEAP_STRING_THIS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_THIS)
#define DUK_HTHREAD_STRING_THIS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_THIS)
-#define DUK_STRIDX_THROW 140 /* 'throw' */
+#define DUK_STRIDX_THROW 141 /* 'throw' */
#define DUK_HEAP_STRING_THROW(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_THROW)
#define DUK_HTHREAD_STRING_THROW(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_THROW)
-#define DUK_STRIDX_TRY 141 /* 'try' */
+#define DUK_STRIDX_TRY 142 /* 'try' */
#define DUK_HEAP_STRING_TRY(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TRY)
#define DUK_HTHREAD_STRING_TRY(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TRY)
-#define DUK_STRIDX_TYPEOF 142 /* 'typeof' */
+#define DUK_STRIDX_TYPEOF 143 /* 'typeof' */
#define DUK_HEAP_STRING_TYPEOF(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TYPEOF)
#define DUK_HTHREAD_STRING_TYPEOF(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TYPEOF)
-#define DUK_STRIDX_VAR 143 /* 'var' */
+#define DUK_STRIDX_VAR 144 /* 'var' */
#define DUK_HEAP_STRING_VAR(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_VAR)
#define DUK_HTHREAD_STRING_VAR(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_VAR)
-#define DUK_STRIDX_CONST 144 /* 'const' */
+#define DUK_STRIDX_CONST 145 /* 'const' */
#define DUK_HEAP_STRING_CONST(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CONST)
#define DUK_HTHREAD_STRING_CONST(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CONST)
-#define DUK_STRIDX_VOID 145 /* 'void' */
+#define DUK_STRIDX_VOID 146 /* 'void' */
#define DUK_HEAP_STRING_VOID(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_VOID)
#define DUK_HTHREAD_STRING_VOID(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_VOID)
-#define DUK_STRIDX_WHILE 146 /* 'while' */
+#define DUK_STRIDX_WHILE 147 /* 'while' */
#define DUK_HEAP_STRING_WHILE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WHILE)
#define DUK_HTHREAD_STRING_WHILE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WHILE)
-#define DUK_STRIDX_WITH 147 /* 'with' */
+#define DUK_STRIDX_WITH 148 /* 'with' */
#define DUK_HEAP_STRING_WITH(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_WITH)
#define DUK_HTHREAD_STRING_WITH(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_WITH)
-#define DUK_STRIDX_CLASS 148 /* 'class' */
+#define DUK_STRIDX_CLASS 149 /* 'class' */
#define DUK_HEAP_STRING_CLASS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_CLASS)
#define DUK_HTHREAD_STRING_CLASS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_CLASS)
-#define DUK_STRIDX_ENUM 149 /* 'enum' */
+#define DUK_STRIDX_ENUM 150 /* 'enum' */
#define DUK_HEAP_STRING_ENUM(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_ENUM)
#define DUK_HTHREAD_STRING_ENUM(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_ENUM)
-#define DUK_STRIDX_EXPORT 150 /* 'export' */
+#define DUK_STRIDX_EXPORT 151 /* 'export' */
#define DUK_HEAP_STRING_EXPORT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_EXPORT)
#define DUK_HTHREAD_STRING_EXPORT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_EXPORT)
-#define DUK_STRIDX_EXTENDS 151 /* 'extends' */
+#define DUK_STRIDX_EXTENDS 152 /* 'extends' */
#define DUK_HEAP_STRING_EXTENDS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_EXTENDS)
#define DUK_HTHREAD_STRING_EXTENDS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_EXTENDS)
-#define DUK_STRIDX_IMPORT 152 /* 'import' */
+#define DUK_STRIDX_IMPORT 153 /* 'import' */
#define DUK_HEAP_STRING_IMPORT(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IMPORT)
#define DUK_HTHREAD_STRING_IMPORT(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IMPORT)
-#define DUK_STRIDX_SUPER 153 /* 'super' */
+#define DUK_STRIDX_SUPER 154 /* 'super' */
#define DUK_HEAP_STRING_SUPER(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_SUPER)
#define DUK_HTHREAD_STRING_SUPER(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_SUPER)
-#define DUK_STRIDX_LC_NULL 154 /* 'null' */
+#define DUK_STRIDX_LC_NULL 155 /* 'null' */
#define DUK_HEAP_STRING_LC_NULL(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LC_NULL)
#define DUK_HTHREAD_STRING_LC_NULL(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LC_NULL)
-#define DUK_STRIDX_TRUE 155 /* 'true' */
+#define DUK_STRIDX_TRUE 156 /* 'true' */
#define DUK_HEAP_STRING_TRUE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_TRUE)
#define DUK_HTHREAD_STRING_TRUE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_TRUE)
-#define DUK_STRIDX_FALSE 156 /* 'false' */
+#define DUK_STRIDX_FALSE 157 /* 'false' */
#define DUK_HEAP_STRING_FALSE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_FALSE)
#define DUK_HTHREAD_STRING_FALSE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_FALSE)
-#define DUK_STRIDX_IMPLEMENTS 157 /* 'implements' */
+#define DUK_STRIDX_IMPLEMENTS 158 /* 'implements' */
#define DUK_HEAP_STRING_IMPLEMENTS(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_IMPLEMENTS)
#define DUK_HTHREAD_STRING_IMPLEMENTS(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_IMPLEMENTS)
-#define DUK_STRIDX_INTERFACE 158 /* 'interface' */
+#define DUK_STRIDX_INTERFACE 159 /* 'interface' */
#define DUK_HEAP_STRING_INTERFACE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_INTERFACE)
#define DUK_HTHREAD_STRING_INTERFACE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_INTERFACE)
-#define DUK_STRIDX_LET 159 /* 'let' */
+#define DUK_STRIDX_LET 160 /* 'let' */
#define DUK_HEAP_STRING_LET(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_LET)
#define DUK_HTHREAD_STRING_LET(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_LET)
-#define DUK_STRIDX_PACKAGE 160 /* 'package' */
+#define DUK_STRIDX_PACKAGE 161 /* 'package' */
#define DUK_HEAP_STRING_PACKAGE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PACKAGE)
#define DUK_HTHREAD_STRING_PACKAGE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PACKAGE)
-#define DUK_STRIDX_PRIVATE 161 /* 'private' */
+#define DUK_STRIDX_PRIVATE 162 /* 'private' */
#define DUK_HEAP_STRING_PRIVATE(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PRIVATE)
#define DUK_HTHREAD_STRING_PRIVATE(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PRIVATE)
-#define DUK_STRIDX_PROTECTED 162 /* 'protected' */
+#define DUK_STRIDX_PROTECTED 163 /* 'protected' */
#define DUK_HEAP_STRING_PROTECTED(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PROTECTED)
#define DUK_HTHREAD_STRING_PROTECTED(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PROTECTED)
-#define DUK_STRIDX_PUBLIC 163 /* 'public' */
+#define DUK_STRIDX_PUBLIC 164 /* 'public' */
#define DUK_HEAP_STRING_PUBLIC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_PUBLIC)
#define DUK_HTHREAD_STRING_PUBLIC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_PUBLIC)
-#define DUK_STRIDX_STATIC 164 /* 'static' */
+#define DUK_STRIDX_STATIC 165 /* 'static' */
#define DUK_HEAP_STRING_STATIC(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_STATIC)
#define DUK_HTHREAD_STRING_STATIC(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_STATIC)
-#define DUK_STRIDX_YIELD 165 /* 'yield' */
+#define DUK_STRIDX_YIELD 166 /* 'yield' */
#define DUK_HEAP_STRING_YIELD(heap) DUK_HEAP_GET_STRING((heap),DUK_STRIDX_YIELD)
#define DUK_HTHREAD_STRING_YIELD(thr) DUK_HTHREAD_GET_STRING((thr),DUK_STRIDX_YIELD)
-#define DUK_HEAP_NUM_STRINGS 166
-#define DUK_STRIDX_START_RESERVED 121
-#define DUK_STRIDX_START_STRICT_RESERVED 157
-#define DUK_STRIDX_END_RESERVED 166 /* exclusive endpoint */
+#define DUK_HEAP_NUM_STRINGS 167
+#define DUK_STRIDX_START_RESERVED 122
+#define DUK_STRIDX_START_STRICT_RESERVED 158
+#define DUK_STRIDX_END_RESERVED 167 /* exclusive endpoint */
/* To convert a heap stridx to a token number, subtract
* DUK_STRIDX_START_RESERVED and add DUK_TOK_START_RESERVED.
*/
#if !defined(DUK_SINGLE_FILE)
-DUK_INTERNAL_DECL const duk_uint8_t duk_strings_data[967];
+DUK_INTERNAL_DECL const duk_uint8_t duk_strings_data[972];
#endif /* !DUK_SINGLE_FILE */
#define DUK_STRDATA_MAX_STRLEN 27
-#define DUK_STRDATA_DATA_LENGTH 967
+#define DUK_STRDATA_DATA_LENGTH 972
#endif /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_ROM_OBJECTS)
@@ -2188,13 +2273,15 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_tojson(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_fill(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_copy(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_nodejs_buffer_write(duk_context *ctx);
+DUK_INTERNAL_DECL duk_ret_t duk_bi_cbor_encode(duk_context *ctx);
+DUK_INTERNAL_DECL duk_ret_t duk_bi_cbor_decode(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_textencoder_prototype_encoding_getter(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_textencoder_prototype_encode(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_prototype_shared_getter(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_textdecoder_prototype_decode(duk_context *ctx);
DUK_INTERNAL_DECL duk_ret_t duk_bi_performance_now(duk_context *ctx);
#if !defined(DUK_SINGLE_FILE)
-DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[183];
+DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[185];
#endif /* !DUK_SINGLE_FILE */
#define DUK_BIDX_GLOBAL 0
#define DUK_BIDX_GLOBAL_ENV 1
@@ -2249,22 +2336,22 @@ DUK_INTERNAL_DECL const duk_c_function duk_bi_native_functions[183];
#define DUK_BIDX_NODEJS_BUFFER_PROTOTYPE 50
#define DUK_NUM_BUILTINS 51
#define DUK_NUM_BIDX_BUILTINS 51
-#define DUK_NUM_ALL_BUILTINS 79
+#define DUK_NUM_ALL_BUILTINS 80
#if defined(DUK_USE_DOUBLE_LE)
#if !defined(DUK_SINGLE_FILE)
-DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4251];
+DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4281];
#endif /* !DUK_SINGLE_FILE */
-#define DUK_BUILTINS_DATA_LENGTH 4251
+#define DUK_BUILTINS_DATA_LENGTH 4281
#elif defined(DUK_USE_DOUBLE_BE)
#if !defined(DUK_SINGLE_FILE)
-DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4251];
+DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4281];
#endif /* !DUK_SINGLE_FILE */
-#define DUK_BUILTINS_DATA_LENGTH 4251
+#define DUK_BUILTINS_DATA_LENGTH 4281
#elif defined(DUK_USE_DOUBLE_ME)
#if !defined(DUK_SINGLE_FILE)
-DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4251];
+DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4281];
#endif /* !DUK_SINGLE_FILE */
-#define DUK_BUILTINS_DATA_LENGTH 4251
+#define DUK_BUILTINS_DATA_LENGTH 4281
#else
#error invalid endianness defines
#endif
@@ -2279,20 +2366,14 @@ DUK_INTERNAL_DECL const duk_uint8_t duk_builtins_data[4251];
#if !defined(DUK_UTIL_H_INCLUDED)
#define DUK_UTIL_H_INCLUDED
-#if defined(DUK_USE_GET_RANDOM_DOUBLE)
-#define DUK_UTIL_GET_RANDOM_DOUBLE(thr) DUK_USE_GET_RANDOM_DOUBLE((thr)->heap_udata)
-#else
-#define DUK_UTIL_GET_RANDOM_DOUBLE(thr) duk_util_tinyrandom_get_double(thr)
-#endif
-
/*
* Some useful constants
*/
-#define DUK_DOUBLE_2TO32 4294967296.0
-#define DUK_DOUBLE_2TO31 2147483648.0
-#define DUK_DOUBLE_LOG2E 1.4426950408889634
-#define DUK_DOUBLE_LOG10E 0.4342944819032518
+#define DUK_DOUBLE_2TO32 4294967296.0
+#define DUK_DOUBLE_2TO31 2147483648.0
+#define DUK_DOUBLE_LOG2E 1.4426950408889634
+#define DUK_DOUBLE_LOG10E 0.4342944819032518
/*
* Endian conversion
@@ -2341,40 +2422,51 @@ struct duk_bitencoder_ctx {
/*
* Raw write/read macros for big endian, unaligned basic values.
- * Caller ensures there's enough space. The macros update the pointer
- * argument automatically on resizes. The idiom seems a bit odd, but
- * leads to compact code.
+ * Caller ensures there's enough space. The INC macro variants
+ * update the pointer argument automatically.
*/
-#define DUK_RAW_WRITE_U8(ptr,val) do { \
- *(ptr)++ = (duk_uint8_t) (val); \
- } while (0)
-#define DUK_RAW_WRITE_U16_BE(ptr,val) duk_raw_write_u16_be(&(ptr), (duk_uint16_t) (val))
-#define DUK_RAW_WRITE_U32_BE(ptr,val) duk_raw_write_u32_be(&(ptr), (duk_uint32_t) (val))
-#define DUK_RAW_WRITE_DOUBLE_BE(ptr,val) duk_raw_write_double_be(&(ptr), (duk_double_t) (val))
-#define DUK_RAW_WRITE_XUTF8(ptr,val) do { \
- /* 'ptr' is evaluated both as LHS and RHS. */ \
- duk_uint8_t *duk__ptr; \
- duk_small_int_t duk__len; \
- duk__ptr = (duk_uint8_t *) (ptr); \
- duk__len = duk_unicode_encode_xutf8((duk_ucodepoint_t) (val), duk__ptr); \
- duk__ptr += duk__len; \
- (ptr) = duk__ptr; \
+#define DUK_RAW_WRITE_U8(ptr, val) \
+ do { \
+ *(ptr) = (duk_uint8_t) (val); \
} while (0)
-#define DUK_RAW_WRITE_CESU8(ptr,val) do { \
- /* 'ptr' is evaluated both as LHS and RHS. */ \
- duk_uint8_t *duk__ptr; \
- duk_small_int_t duk__len; \
- duk__ptr = (duk_uint8_t *) (ptr); \
- duk__len = duk_unicode_encode_cesu8((duk_ucodepoint_t) (val), duk__ptr); \
- duk__ptr += duk__len; \
- (ptr) = duk__ptr; \
+#define DUK_RAW_WRITE_U16_BE(ptr, val) duk_raw_write_u16_be((ptr), (duk_uint16_t) (val))
+#define DUK_RAW_WRITE_U32_BE(ptr, val) duk_raw_write_u32_be((ptr), (duk_uint32_t) (val))
+#define DUK_RAW_WRITE_FLOAT_BE(ptr, val) duk_raw_write_float_be((ptr), (duk_float_t) (val))
+#define DUK_RAW_WRITE_DOUBLE_BE(ptr, val) duk_raw_write_double_be((ptr), (duk_double_t) (val))
+#define DUK_RAW_WRITE_XUTF8(ptr, val) duk_raw_write_xutf8((ptr), (duk_ucodepoint_t) (val))
+
+#define DUK_RAW_WRITEINC_U8(ptr, val) \
+ do { \
+ *(ptr)++ = (duk_uint8_t) (val); \
} while (0)
+#define DUK_RAW_WRITEINC_U16_BE(ptr, val) duk_raw_writeinc_u16_be(&(ptr), (duk_uint16_t) (val))
+#define DUK_RAW_WRITEINC_U32_BE(ptr, val) duk_raw_writeinc_u32_be(&(ptr), (duk_uint32_t) (val))
+#define DUK_RAW_WRITEINC_FLOAT_BE(ptr, val) duk_raw_writeinc_float_be(&(ptr), (duk_float_t) (val))
+#define DUK_RAW_WRITEINC_DOUBLE_BE(ptr, val) duk_raw_writeinc_double_be(&(ptr), (duk_double_t) (val))
+#define DUK_RAW_WRITEINC_XUTF8(ptr, val) duk_raw_writeinc_xutf8(&(ptr), (duk_ucodepoint_t) (val))
+#define DUK_RAW_WRITEINC_CESU8(ptr, val) duk_raw_writeinc_cesu8(&(ptr), (duk_ucodepoint_t) (val))
+
+#define DUK_RAW_READ_U8(ptr) ((duk_uint8_t) (*(ptr)))
+#define DUK_RAW_READ_U16_BE(ptr) duk_raw_read_u16_be((ptr));
+#define DUK_RAW_READ_U32_BE(ptr) duk_raw_read_u32_be((ptr));
+#define DUK_RAW_READ_DOUBLE_BE(ptr) duk_raw_read_double_be((ptr));
-#define DUK_RAW_READ_U8(ptr) ((duk_uint8_t) (*(ptr)++))
-#define DUK_RAW_READ_U16_BE(ptr) duk_raw_read_u16_be(&(ptr));
-#define DUK_RAW_READ_U32_BE(ptr) duk_raw_read_u32_be(&(ptr));
-#define DUK_RAW_READ_DOUBLE_BE(ptr) duk_raw_read_double_be(&(ptr));
+#define DUK_RAW_READINC_U8(ptr) ((duk_uint8_t) (*(ptr)++))
+#define DUK_RAW_READINC_U16_BE(ptr) duk_raw_readinc_u16_be(&(ptr));
+#define DUK_RAW_READINC_U32_BE(ptr) duk_raw_readinc_u32_be(&(ptr));
+#define DUK_RAW_READINC_DOUBLE_BE(ptr) duk_raw_readinc_double_be(&(ptr));
+
+/*
+ * Double and float byte order operations.
+ */
+
+DUK_INTERNAL_DECL void duk_dblunion_host_to_little(duk_double_union *u);
+DUK_INTERNAL_DECL void duk_dblunion_little_to_host(duk_double_union *u);
+DUK_INTERNAL_DECL void duk_dblunion_host_to_big(duk_double_union *u);
+DUK_INTERNAL_DECL void duk_dblunion_big_to_host(duk_double_union *u);
+DUK_INTERNAL_DECL void duk_fltunion_host_to_big(duk_float_union *u);
+DUK_INTERNAL_DECL void duk_fltunion_big_to_host(duk_float_union *u);
/*
* Buffer writer (dynamic buffer only)
@@ -2409,29 +2501,31 @@ struct duk_bufwriter_ctx {
};
#if defined(DUK_USE_PREFER_SIZE)
-#define DUK_BW_SLACK_ADD 64
-#define DUK_BW_SLACK_SHIFT 4 /* 2^4 -> 1/16 = 6.25% slack */
+#define DUK_BW_SLACK_ADD 64
+#define DUK_BW_SLACK_SHIFT 4 /* 2^4 -> 1/16 = 6.25% slack */
#else
-#define DUK_BW_SLACK_ADD 64
-#define DUK_BW_SLACK_SHIFT 2 /* 2^2 -> 1/4 = 25% slack */
+#define DUK_BW_SLACK_ADD 64
+#define DUK_BW_SLACK_SHIFT 2 /* 2^2 -> 1/4 = 25% slack */
#endif
/* Initialization and finalization (compaction), converting to other types. */
-#define DUK_BW_INIT_PUSHBUF(thr,bw_ctx,sz) do { \
+#define DUK_BW_INIT_PUSHBUF(thr, bw_ctx, sz) \
+ do { \
duk_bw_init_pushbuf((thr), (bw_ctx), (sz)); \
} while (0)
-#define DUK_BW_INIT_WITHBUF(thr,bw_ctx,buf) do { \
+#define DUK_BW_INIT_WITHBUF(thr, bw_ctx, buf) \
+ do { \
duk_bw_init((thr), (bw_ctx), (buf)); \
} while (0)
-#define DUK_BW_COMPACT(thr,bw_ctx) do { \
+#define DUK_BW_COMPACT(thr, bw_ctx) \
+ do { \
/* Make underlying buffer compact to match DUK_BW_GET_SIZE(). */ \
duk_bw_compact((thr), (bw_ctx)); \
} while (0)
-#define DUK_BW_PUSH_AS_STRING(thr,bw_ctx) do { \
- duk_push_lstring((thr), \
- (const char *) (bw_ctx)->p_base, \
- (duk_size_t) ((bw_ctx)->p - (bw_ctx)->p_base)); \
+#define DUK_BW_PUSH_AS_STRING(thr, bw_ctx) \
+ do { \
+ duk_push_lstring((thr), (const char *) (bw_ctx)->p_base, (duk_size_t) ((bw_ctx)->p - (bw_ctx)->p_base)); \
} while (0)
/* Pointers may be NULL for a while when 'buf' size is zero and before any
@@ -2441,43 +2535,48 @@ struct duk_bufwriter_ctx {
*/
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *bw_ctx);
-#define DUK_BW_ASSERT_VALID_EXPR(thr,bw_ctx) (duk_bw_assert_valid((thr), (bw_ctx)))
-#define DUK_BW_ASSERT_VALID(thr,bw_ctx) do { duk_bw_assert_valid((thr), (bw_ctx)); } while (0)
+#define DUK_BW_ASSERT_VALID_EXPR(thr, bw_ctx) (duk_bw_assert_valid((thr), (bw_ctx)))
+#define DUK_BW_ASSERT_VALID(thr, bw_ctx) \
+ do { \
+ duk_bw_assert_valid((thr), (bw_ctx)); \
+ } while (0)
#else
-#define DUK_BW_ASSERT_VALID_EXPR(thr,bw_ctx) DUK_ASSERT_EXPR(1)
-#define DUK_BW_ASSERT_VALID(thr,bw_ctx) do {} while (0)
+#define DUK_BW_ASSERT_VALID_EXPR(thr, bw_ctx) DUK_ASSERT_EXPR(1)
+#define DUK_BW_ASSERT_VALID(thr, bw_ctx) \
+ do { \
+ } while (0)
#endif
/* Working with the pointer and current size. */
-#define DUK_BW_GET_PTR(thr,bw_ctx) \
- ((bw_ctx)->p)
-#define DUK_BW_SET_PTR(thr,bw_ctx,ptr) do { \
+#define DUK_BW_GET_PTR(thr, bw_ctx) ((bw_ctx)->p)
+#define DUK_BW_SET_PTR(thr, bw_ctx, ptr) \
+ do { \
(bw_ctx)->p = (ptr); \
} while (0)
-#define DUK_BW_ADD_PTR(thr,bw_ctx,delta) do { \
+#define DUK_BW_ADD_PTR(thr, bw_ctx, delta) \
+ do { \
(bw_ctx)->p += (delta); \
} while (0)
-#define DUK_BW_GET_BASEPTR(thr,bw_ctx) \
- ((bw_ctx)->p_base)
-#define DUK_BW_GET_LIMITPTR(thr,bw_ctx) \
- ((bw_ctx)->p_limit)
-#define DUK_BW_GET_SIZE(thr,bw_ctx) \
- ((duk_size_t) ((bw_ctx)->p - (bw_ctx)->p_base))
-#define DUK_BW_SET_SIZE(thr,bw_ctx,sz) do { \
+#define DUK_BW_GET_BASEPTR(thr, bw_ctx) ((bw_ctx)->p_base)
+#define DUK_BW_GET_LIMITPTR(thr, bw_ctx) ((bw_ctx)->p_limit)
+#define DUK_BW_GET_SIZE(thr, bw_ctx) ((duk_size_t) ((bw_ctx)->p - (bw_ctx)->p_base))
+#define DUK_BW_SET_SIZE(thr, bw_ctx, sz) \
+ do { \
DUK_ASSERT((duk_size_t) (sz) <= (duk_size_t) ((bw_ctx)->p - (bw_ctx)->p_base)); \
(bw_ctx)->p = (bw_ctx)->p_base + (sz); \
} while (0)
-#define DUK_BW_RESET_SIZE(thr,bw_ctx) do { \
+#define DUK_BW_RESET_SIZE(thr, bw_ctx) \
+ do { \
/* Reset to zero size, keep current limit. */ \
(bw_ctx)->p = (bw_ctx)->p_base; \
} while (0)
-#define DUK_BW_GET_BUFFER(thr,bw_ctx) \
- ((bw_ctx)->buf)
+#define DUK_BW_GET_BUFFER(thr, bw_ctx) ((bw_ctx)->buf)
/* Ensuring (reserving) space. */
-#define DUK_BW_ENSURE(thr,bw_ctx,sz) do { \
+#define DUK_BW_ENSURE(thr, bw_ctx, sz) \
+ do { \
duk_size_t duk__sz, duk__space; \
DUK_BW_ASSERT_VALID((thr), (bw_ctx)); \
duk__sz = (sz); \
@@ -2488,22 +2587,21 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
} while (0)
/* NOTE: Multiple evaluation of 'ptr' in this macro. */
/* XXX: Rework to use an always-inline function? */
-#define DUK_BW_ENSURE_RAW(thr,bw_ctx,sz,ptr) \
- (((duk_size_t) ((bw_ctx)->p_limit - (ptr)) >= (sz)) ? \
- (ptr) : \
- ((bw_ctx)->p = (ptr), duk_bw_resize((thr),(bw_ctx),(sz))))
-#define DUK_BW_ENSURE_GETPTR(thr,bw_ctx,sz) \
- DUK_BW_ENSURE_RAW((thr), (bw_ctx), (sz), (bw_ctx)->p)
-#define DUK_BW_ASSERT_SPACE_EXPR(thr,bw_ctx,sz) \
+#define DUK_BW_ENSURE_RAW(thr, bw_ctx, sz, ptr) \
+ (((duk_size_t) ((bw_ctx)->p_limit - (ptr)) >= (sz)) ? (ptr) : ((bw_ctx)->p = (ptr), duk_bw_resize((thr), (bw_ctx), (sz))))
+#define DUK_BW_ENSURE_GETPTR(thr, bw_ctx, sz) DUK_BW_ENSURE_RAW((thr), (bw_ctx), (sz), (bw_ctx)->p)
+#define DUK_BW_ASSERT_SPACE_EXPR(thr, bw_ctx, sz) \
(DUK_BW_ASSERT_VALID_EXPR((thr), (bw_ctx)), \
DUK_ASSERT_EXPR((duk_size_t) ((bw_ctx)->p_limit - (bw_ctx)->p) >= (duk_size_t) (sz)))
-#define DUK_BW_ASSERT_SPACE(thr,bw_ctx,sz) do { \
+#define DUK_BW_ASSERT_SPACE(thr, bw_ctx, sz) \
+ do { \
DUK_BW_ASSERT_SPACE_EXPR((thr), (bw_ctx), (sz)); \
} while (0)
/* Miscellaneous. */
-#define DUK_BW_SETPTR_AND_COMPACT(thr,bw_ctx,ptr) do { \
+#define DUK_BW_SETPTR_AND_COMPACT(thr, bw_ctx, ptr) \
+ do { \
(bw_ctx)->p = (ptr); \
duk_bw_compact((thr), (bw_ctx)); \
} while (0)
@@ -2514,11 +2612,13 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
* explicit pointer load/stores get generated (e.g. gcc -Os).
*/
-#define DUK_BW_WRITE_RAW_U8(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_RAW_U8(thr, bw_ctx, val) \
+ do { \
DUK_BW_ASSERT_SPACE((thr), (bw_ctx), 1); \
*(bw_ctx)->p++ = (duk_uint8_t) (val); \
} while (0)
-#define DUK_BW_WRITE_RAW_U8_2(thr,bw_ctx,val1,val2) do { \
+#define DUK_BW_WRITE_RAW_U8_2(thr, bw_ctx, val1, val2) \
+ do { \
duk_uint8_t *duk__p; \
DUK_BW_ASSERT_SPACE((thr), (bw_ctx), 2); \
duk__p = (bw_ctx)->p; \
@@ -2526,7 +2626,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
*duk__p++ = (duk_uint8_t) (val2); \
(bw_ctx)->p = duk__p; \
} while (0)
-#define DUK_BW_WRITE_RAW_U8_3(thr,bw_ctx,val1,val2,val3) do { \
+#define DUK_BW_WRITE_RAW_U8_3(thr, bw_ctx, val1, val2, val3) \
+ do { \
duk_uint8_t *duk__p; \
DUK_BW_ASSERT_SPACE((thr), (bw_ctx), 3); \
duk__p = (bw_ctx)->p; \
@@ -2535,7 +2636,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
*duk__p++ = (duk_uint8_t) (val3); \
(bw_ctx)->p = duk__p; \
} while (0)
-#define DUK_BW_WRITE_RAW_U8_4(thr,bw_ctx,val1,val2,val3,val4) do { \
+#define DUK_BW_WRITE_RAW_U8_4(thr, bw_ctx, val1, val2, val3, val4) \
+ do { \
duk_uint8_t *duk__p; \
DUK_BW_ASSERT_SPACE((thr), (bw_ctx), 4); \
duk__p = (bw_ctx)->p; \
@@ -2545,7 +2647,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
*duk__p++ = (duk_uint8_t) (val4); \
(bw_ctx)->p = duk__p; \
} while (0)
-#define DUK_BW_WRITE_RAW_U8_5(thr,bw_ctx,val1,val2,val3,val4,val5) do { \
+#define DUK_BW_WRITE_RAW_U8_5(thr, bw_ctx, val1, val2, val3, val4, val5) \
+ do { \
duk_uint8_t *duk__p; \
DUK_BW_ASSERT_SPACE((thr), (bw_ctx), 5); \
duk__p = (bw_ctx)->p; \
@@ -2556,7 +2659,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
*duk__p++ = (duk_uint8_t) (val5); \
(bw_ctx)->p = duk__p; \
} while (0)
-#define DUK_BW_WRITE_RAW_U8_6(thr,bw_ctx,val1,val2,val3,val4,val5,val6) do { \
+#define DUK_BW_WRITE_RAW_U8_6(thr, bw_ctx, val1, val2, val3, val4, val5, val6) \
+ do { \
duk_uint8_t *duk__p; \
DUK_BW_ASSERT_SPACE((thr), (bw_ctx), 6); \
duk__p = (bw_ctx)->p; \
@@ -2568,7 +2672,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
*duk__p++ = (duk_uint8_t) (val6); \
(bw_ctx)->p = duk__p; \
} while (0)
-#define DUK_BW_WRITE_RAW_XUTF8(thr,bw_ctx,cp) do { \
+#define DUK_BW_WRITE_RAW_XUTF8(thr, bw_ctx, cp) \
+ do { \
duk_ucodepoint_t duk__cp; \
duk_small_int_t duk__enc_len; \
duk__cp = (duk_ucodepoint_t) (cp); \
@@ -2576,7 +2681,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
duk__enc_len = duk_unicode_encode_xutf8(duk__cp, (bw_ctx)->p); \
(bw_ctx)->p += duk__enc_len; \
} while (0)
-#define DUK_BW_WRITE_RAW_CESU8(thr,bw_ctx,cp) do { \
+#define DUK_BW_WRITE_RAW_CESU8(thr, bw_ctx, cp) \
+ do { \
duk_ucodepoint_t duk__cp; \
duk_small_int_t duk__enc_len; \
duk__cp = (duk_ucodepoint_t) (cp); \
@@ -2586,7 +2692,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
} while (0)
/* XXX: add temporary duk__p pointer here too; sharing */
/* XXX: avoid unsafe variants */
-#define DUK_BW_WRITE_RAW_BYTES(thr,bw_ctx,valptr,valsz) do { \
+#define DUK_BW_WRITE_RAW_BYTES(thr, bw_ctx, valptr, valsz) \
+ do { \
const void *duk__valptr; \
duk_size_t duk__valsz; \
duk__valptr = (const void *) (valptr); \
@@ -2594,7 +2701,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
duk_memcpy_unsafe((void *) ((bw_ctx)->p), duk__valptr, duk__valsz); \
(bw_ctx)->p += duk__valsz; \
} while (0)
-#define DUK_BW_WRITE_RAW_CSTRING(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_RAW_CSTRING(thr, bw_ctx, val) \
+ do { \
const duk_uint8_t *duk__val; \
duk_size_t duk__val_len; \
duk__val = (const duk_uint8_t *) (val); \
@@ -2602,93 +2710,107 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) duk__val, duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_RAW_HSTRING(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_RAW_HSTRING(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HSTRING_GET_BYTELEN((val)); \
duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HSTRING_GET_DATA((val)), duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_RAW_HBUFFER(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_RAW_HBUFFER(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HBUFFER_GET_SIZE((val)); \
- duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
+ duk_memcpy_unsafe((void *) ((bw_ctx)->p), \
+ (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), \
+ duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_RAW_HBUFFER_FIXED(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_RAW_HBUFFER_FIXED(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HBUFFER_FIXED_GET_SIZE((val)); \
- duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
+ duk_memcpy_unsafe((void *) ((bw_ctx)->p), \
+ (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), \
+ duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_RAW_HBUFFER_DYNAMIC(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_RAW_HBUFFER_DYNAMIC(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HBUFFER_DYNAMIC_GET_SIZE((val)); \
- duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
+ duk_memcpy_unsafe((void *) ((bw_ctx)->p), \
+ (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), \
+ duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
/* Append bytes from a slice already in the buffer. */
-#define DUK_BW_WRITE_RAW_SLICE(thr,bw,dst_off,dst_len) \
- duk_bw_write_raw_slice((thr), (bw), (dst_off), (dst_len))
+#define DUK_BW_WRITE_RAW_SLICE(thr, bw, dst_off, dst_len) duk_bw_write_raw_slice((thr), (bw), (dst_off), (dst_len))
/* Insert bytes in the middle of the buffer from an external buffer. */
-#define DUK_BW_INSERT_RAW_BYTES(thr,bw,dst_off,buf,len) \
- duk_bw_insert_raw_bytes((thr), (bw), (dst_off), (buf), (len))
+#define DUK_BW_INSERT_RAW_BYTES(thr, bw, dst_off, buf, len) duk_bw_insert_raw_bytes((thr), (bw), (dst_off), (buf), (len))
/* Insert bytes in the middle of the buffer from a slice already
* in the buffer. Source offset is interpreted "before" the operation.
*/
-#define DUK_BW_INSERT_RAW_SLICE(thr,bw,dst_off,src_off,len) \
- duk_bw_insert_raw_slice((thr), (bw), (dst_off), (src_off), (len))
+#define DUK_BW_INSERT_RAW_SLICE(thr, bw, dst_off, src_off, len) duk_bw_insert_raw_slice((thr), (bw), (dst_off), (src_off), (len))
/* Insert a reserved area somewhere in the buffer; caller fills it.
* Evaluates to a (duk_uint_t *) pointing to the start of the reserved
* area for convenience.
*/
-#define DUK_BW_INSERT_RAW_AREA(thr,bw,off,len) \
- duk_bw_insert_raw_area((thr), (bw), (off), (len))
+#define DUK_BW_INSERT_RAW_AREA(thr, bw, off, len) duk_bw_insert_raw_area((thr), (bw), (off), (len))
/* Remove a slice from inside buffer. */
-#define DUK_BW_REMOVE_RAW_SLICE(thr,bw,off,len) \
- duk_bw_remove_raw_slice((thr), (bw), (off), (len))
+#define DUK_BW_REMOVE_RAW_SLICE(thr, bw, off, len) duk_bw_remove_raw_slice((thr), (bw), (off), (len))
/* Safe write calls which will ensure space first. */
-#define DUK_BW_WRITE_ENSURE_U8(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_ENSURE_U8(thr, bw_ctx, val) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), 1); \
DUK_BW_WRITE_RAW_U8((thr), (bw_ctx), (val)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_U8_2(thr,bw_ctx,val1,val2) do { \
+#define DUK_BW_WRITE_ENSURE_U8_2(thr, bw_ctx, val1, val2) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), 2); \
DUK_BW_WRITE_RAW_U8_2((thr), (bw_ctx), (val1), (val2)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_U8_3(thr,bw_ctx,val1,val2,val3) do { \
+#define DUK_BW_WRITE_ENSURE_U8_3(thr, bw_ctx, val1, val2, val3) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), 3); \
DUK_BW_WRITE_RAW_U8_3((thr), (bw_ctx), (val1), (val2), (val3)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_U8_4(thr,bw_ctx,val1,val2,val3,val4) do { \
+#define DUK_BW_WRITE_ENSURE_U8_4(thr, bw_ctx, val1, val2, val3, val4) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), 4); \
DUK_BW_WRITE_RAW_U8_4((thr), (bw_ctx), (val1), (val2), (val3), (val4)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_U8_5(thr,bw_ctx,val1,val2,val3,val4,val5) do { \
+#define DUK_BW_WRITE_ENSURE_U8_5(thr, bw_ctx, val1, val2, val3, val4, val5) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), 5); \
DUK_BW_WRITE_RAW_U8_5((thr), (bw_ctx), (val1), (val2), (val3), (val4), (val5)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_U8_6(thr,bw_ctx,val1,val2,val3,val4,val5,val6) do { \
+#define DUK_BW_WRITE_ENSURE_U8_6(thr, bw_ctx, val1, val2, val3, val4, val5, val6) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), 6); \
DUK_BW_WRITE_RAW_U8_6((thr), (bw_ctx), (val1), (val2), (val3), (val4), (val5), (val6)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_XUTF8(thr,bw_ctx,cp) do { \
+#define DUK_BW_WRITE_ENSURE_XUTF8(thr, bw_ctx, cp) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), DUK_UNICODE_MAX_XUTF8_LENGTH); \
DUK_BW_WRITE_RAW_XUTF8((thr), (bw_ctx), (cp)); \
} while (0)
-#define DUK_BW_WRITE_ENSURE_CESU8(thr,bw_ctx,cp) do { \
+#define DUK_BW_WRITE_ENSURE_CESU8(thr, bw_ctx, cp) \
+ do { \
DUK_BW_ENSURE((thr), (bw_ctx), DUK_UNICODE_MAX_CESU8_LENGTH); \
DUK_BW_WRITE_RAW_CESU8((thr), (bw_ctx), (cp)); \
} while (0)
/* XXX: add temporary duk__p pointer here too; sharing */
/* XXX: avoid unsafe */
-#define DUK_BW_WRITE_ENSURE_BYTES(thr,bw_ctx,valptr,valsz) do { \
+#define DUK_BW_WRITE_ENSURE_BYTES(thr, bw_ctx, valptr, valsz) \
+ do { \
const void *duk__valptr; \
duk_size_t duk__valsz; \
duk__valptr = (const void *) (valptr); \
@@ -2697,7 +2819,8 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
duk_memcpy_unsafe((void *) ((bw_ctx)->p), duk__valptr, duk__valsz); \
(bw_ctx)->p += duk__valsz; \
} while (0)
-#define DUK_BW_WRITE_ENSURE_CSTRING(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_ENSURE_CSTRING(thr, bw_ctx, val) \
+ do { \
const duk_uint8_t *duk__val; \
duk_size_t duk__val_len; \
duk__val = (const duk_uint8_t *) (val); \
@@ -2706,45 +2829,53 @@ DUK_INTERNAL_DECL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *
duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) duk__val, duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_ENSURE_HSTRING(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_ENSURE_HSTRING(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HSTRING_GET_BYTELEN((val)); \
DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HSTRING_GET_DATA((val)), duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_ENSURE_HBUFFER(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_ENSURE_HBUFFER(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HBUFFER_GET_SIZE((val)); \
DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
- duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
+ duk_memcpy_unsafe((void *) ((bw_ctx)->p), \
+ (const void *) DUK_HBUFFER_GET_DATA_PTR((thr)->heap, (val)), \
+ duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_ENSURE_HBUFFER_FIXED(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_ENSURE_HBUFFER_FIXED(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HBUFFER_FIXED_GET_SIZE((val)); \
DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
- duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
+ duk_memcpy_unsafe((void *) ((bw_ctx)->p), \
+ (const void *) DUK_HBUFFER_FIXED_GET_DATA_PTR((thr)->heap, (val)), \
+ duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_ENSURE_HBUFFER_DYNAMIC(thr,bw_ctx,val) do { \
+#define DUK_BW_WRITE_ENSURE_HBUFFER_DYNAMIC(thr, bw_ctx, val) \
+ do { \
duk_size_t duk__val_len; \
duk__val_len = DUK_HBUFFER_DYNAMIC_GET_SIZE((val)); \
DUK_BW_ENSURE((thr), (bw_ctx), duk__val_len); \
- duk_memcpy_unsafe((void *) ((bw_ctx)->p), (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), duk__val_len); \
+ duk_memcpy_unsafe((void *) ((bw_ctx)->p), \
+ (const void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((thr)->heap, (val)), \
+ duk__val_len); \
(bw_ctx)->p += duk__val_len; \
} while (0)
-#define DUK_BW_WRITE_ENSURE_SLICE(thr,bw,dst_off,dst_len) \
- duk_bw_write_ensure_slice((thr), (bw), (dst_off), (dst_len))
-#define DUK_BW_INSERT_ENSURE_BYTES(thr,bw,dst_off,buf,len) \
- duk_bw_insert_ensure_bytes((thr), (bw), (dst_off), (buf), (len))
-#define DUK_BW_INSERT_ENSURE_SLICE(thr,bw,dst_off,src_off,len) \
+#define DUK_BW_WRITE_ENSURE_SLICE(thr, bw, dst_off, dst_len) duk_bw_write_ensure_slice((thr), (bw), (dst_off), (dst_len))
+#define DUK_BW_INSERT_ENSURE_BYTES(thr, bw, dst_off, buf, len) duk_bw_insert_ensure_bytes((thr), (bw), (dst_off), (buf), (len))
+#define DUK_BW_INSERT_ENSURE_SLICE(thr, bw, dst_off, src_off, len) \
duk_bw_insert_ensure_slice((thr), (bw), (dst_off), (src_off), (len))
-#define DUK_BW_INSERT_ENSURE_AREA(thr,bw,off,len) \
+#define DUK_BW_INSERT_ENSURE_AREA(thr, bw, off, len) \
/* Evaluates to (duk_uint8_t *) pointing to start of area. */ \
duk_bw_insert_ensure_area((thr), (bw), (off), (len))
-#define DUK_BW_REMOVE_ENSURE_SLICE(thr,bw,off,len) \
+#define DUK_BW_REMOVE_ENSURE_SLICE(thr, bw, off, len) \
/* No difference between raw/ensure because the buffer shrinks. */ \
DUK_BW_REMOVE_RAW_SLICE((thr), (bw), (off), (len))
@@ -2760,13 +2891,13 @@ DUK_INTERNAL_DECL const duk_int8_t duk_hex_dectab[256];
DUK_INTERNAL_DECL const duk_int16_t duk_hex_dectab_shift4[256];
DUK_INTERNAL_DECL const duk_uint16_t duk_hex_enctab[256];
#endif
-#endif /* !DUK_SINGLE_FILE */
+#endif /* !DUK_SINGLE_FILE */
/* Note: assumes that duk_util_probe_steps size is 32 */
#if defined(DUK_USE_HOBJECT_HASH_PART)
#if !defined(DUK_SINGLE_FILE)
DUK_INTERNAL_DECL duk_uint8_t duk_util_probe_steps[32];
-#endif /* !DUK_SINGLE_FILE */
+#endif /* !DUK_SINGLE_FILE */
#endif
#if defined(DUK_USE_STRHASH_DENSE)
@@ -2794,26 +2925,58 @@ DUK_INTERNAL_DECL duk_uint8_t *duk_bw_resize(duk_hthread *thr, duk_bufwriter_ctx
DUK_INTERNAL_DECL void duk_bw_compact(duk_hthread *thr, duk_bufwriter_ctx *bw_ctx);
DUK_INTERNAL_DECL void duk_bw_write_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t src_off, duk_size_t len);
DUK_INTERNAL_DECL void duk_bw_write_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t src_off, duk_size_t len);
-DUK_INTERNAL_DECL void duk_bw_insert_raw_bytes(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, const duk_uint8_t *buf, duk_size_t len);
-DUK_INTERNAL_DECL void duk_bw_insert_ensure_bytes(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, const duk_uint8_t *buf, duk_size_t len);
-DUK_INTERNAL_DECL void duk_bw_insert_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, duk_size_t src_off, duk_size_t len);
-DUK_INTERNAL_DECL void duk_bw_insert_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, duk_size_t src_off, duk_size_t len);
+DUK_INTERNAL_DECL void duk_bw_insert_raw_bytes(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ const duk_uint8_t *buf,
+ duk_size_t len);
+DUK_INTERNAL_DECL void duk_bw_insert_ensure_bytes(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ const duk_uint8_t *buf,
+ duk_size_t len);
+DUK_INTERNAL_DECL void duk_bw_insert_raw_slice(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ duk_size_t src_off,
+ duk_size_t len);
+DUK_INTERNAL_DECL void duk_bw_insert_ensure_slice(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ duk_size_t src_off,
+ duk_size_t len);
DUK_INTERNAL_DECL duk_uint8_t *duk_bw_insert_raw_area(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t off, duk_size_t len);
DUK_INTERNAL_DECL duk_uint8_t *duk_bw_insert_ensure_area(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t off, duk_size_t len);
DUK_INTERNAL_DECL void duk_bw_remove_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t off, duk_size_t len);
/* No duk_bw_remove_ensure_slice(), functionality would be identical. */
-DUK_INTERNAL_DECL DUK_INLINE duk_uint16_t duk_raw_read_u16_be(duk_uint8_t **p);
-DUK_INTERNAL_DECL DUK_INLINE duk_uint32_t duk_raw_read_u32_be(duk_uint8_t **p);
-DUK_INTERNAL_DECL DUK_INLINE duk_double_t duk_raw_read_double_be(duk_uint8_t **p);
-DUK_INTERNAL_DECL DUK_INLINE void duk_raw_write_u16_be(duk_uint8_t **p, duk_uint16_t val);
-DUK_INTERNAL_DECL DUK_INLINE void duk_raw_write_u32_be(duk_uint8_t **p, duk_uint32_t val);
-DUK_INTERNAL_DECL DUK_INLINE void duk_raw_write_double_be(duk_uint8_t **p, duk_double_t val);
-
-#if defined(DUK_USE_DEBUGGER_SUPPORT) /* For now only needed by the debugger. */
+DUK_INTERNAL_DECL duk_uint16_t duk_raw_read_u16_be(const duk_uint8_t *p);
+DUK_INTERNAL_DECL duk_uint32_t duk_raw_read_u32_be(const duk_uint8_t *p);
+DUK_INTERNAL_DECL duk_float_t duk_raw_read_float_be(const duk_uint8_t *p);
+DUK_INTERNAL_DECL duk_double_t duk_raw_read_double_be(const duk_uint8_t *p);
+DUK_INTERNAL_DECL duk_uint16_t duk_raw_readinc_u16_be(const duk_uint8_t **p);
+DUK_INTERNAL_DECL duk_uint32_t duk_raw_readinc_u32_be(const duk_uint8_t **p);
+DUK_INTERNAL_DECL duk_float_t duk_raw_readinc_float_be(const duk_uint8_t **p);
+DUK_INTERNAL_DECL duk_double_t duk_raw_readinc_double_be(const duk_uint8_t **p);
+DUK_INTERNAL_DECL void duk_raw_write_u16_be(duk_uint8_t *p, duk_uint16_t val);
+DUK_INTERNAL_DECL void duk_raw_write_u32_be(duk_uint8_t *p, duk_uint32_t val);
+DUK_INTERNAL_DECL void duk_raw_write_float_be(duk_uint8_t *p, duk_float_t val);
+DUK_INTERNAL_DECL void duk_raw_write_double_be(duk_uint8_t *p, duk_double_t val);
+DUK_INTERNAL_DECL duk_small_int_t duk_raw_write_xutf8(duk_uint8_t *p, duk_ucodepoint_t val);
+DUK_INTERNAL_DECL duk_small_int_t duk_raw_write_cesu8(duk_uint8_t *p, duk_ucodepoint_t val);
+DUK_INTERNAL_DECL void duk_raw_writeinc_u16_be(duk_uint8_t **p, duk_uint16_t val);
+DUK_INTERNAL_DECL void duk_raw_writeinc_u32_be(duk_uint8_t **p, duk_uint32_t val);
+DUK_INTERNAL_DECL void duk_raw_writeinc_float_be(duk_uint8_t **p, duk_float_t val);
+DUK_INTERNAL_DECL void duk_raw_writeinc_double_be(duk_uint8_t **p, duk_double_t val);
+DUK_INTERNAL_DECL void duk_raw_writeinc_xutf8(duk_uint8_t **p, duk_ucodepoint_t val);
+DUK_INTERNAL_DECL void duk_raw_writeinc_cesu8(duk_uint8_t **p, duk_ucodepoint_t val);
+
+#if defined(DUK_USE_DEBUGGER_SUPPORT) /* For now only needed by the debugger. */
DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
#endif
+DUK_INTERNAL_DECL duk_double_t duk_util_get_random_double(duk_hthread *thr);
+
/* memcpy(), memmove() etc wrappers. The plain variants like duk_memcpy()
* assume C99+ and 'src' and 'dst' pointers must be non-NULL even when the
* operation size is zero. The unsafe variants like duk_memcpy_safe() deal
@@ -2824,7 +2987,8 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
* few extra bytes per call site adds up to ~1kB footprint.
*/
#if defined(DUK_USE_ALLOW_UNDEFINED_BEHAVIOR)
-#define duk_memcpy(dst,src,len) do { \
+#define duk_memcpy(dst, src, len) \
+ do { \
void *duk__dst = (dst); \
const void *duk__src = (src); \
duk_size_t duk__len = (len); \
@@ -2832,8 +2996,9 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
DUK_ASSERT(duk__src != NULL || duk__len == 0U); \
(void) DUK_MEMCPY(duk__dst, duk__src, (size_t) duk__len); \
} while (0)
-#define duk_memcpy_unsafe(dst,src,len) duk_memcpy((dst), (src), (len))
-#define duk_memmove(dst,src,len) do { \
+#define duk_memcpy_unsafe(dst, src, len) duk_memcpy((dst), (src), (len))
+#define duk_memmove(dst, src, len) \
+ do { \
void *duk__dst = (dst); \
const void *duk__src = (src); \
duk_size_t duk__len = (len); \
@@ -2841,24 +3006,27 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
DUK_ASSERT(duk__src != NULL || duk__len == 0U); \
(void) DUK_MEMMOVE(duk__dst, duk__src, (size_t) duk__len); \
} while (0)
-#define duk_memmove_unsafe(dst,src,len) duk_memmove((dst), (src), (len))
-#define duk_memset(dst,val,len) do { \
+#define duk_memmove_unsafe(dst, src, len) duk_memmove((dst), (src), (len))
+#define duk_memset(dst, val, len) \
+ do { \
void *duk__dst = (dst); \
duk_small_int_t duk__val = (val); \
duk_size_t duk__len = (len); \
DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
(void) DUK_MEMSET(duk__dst, duk__val, (size_t) duk__len); \
} while (0)
-#define duk_memset_unsafe(dst,val,len) duk_memset((dst), (val), (len))
-#define duk_memzero(dst,len) do { \
+#define duk_memset_unsafe(dst, val, len) duk_memset((dst), (val), (len))
+#define duk_memzero(dst, len) \
+ do { \
void *duk__dst = (dst); \
duk_size_t duk__len = (len); \
DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
(void) DUK_MEMZERO(duk__dst, (size_t) duk__len); \
} while (0)
-#define duk_memzero_unsafe(dst,len) duk_memzero((dst), (len))
-#else /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
-#define duk_memcpy(dst,src,len) do { \
+#define duk_memzero_unsafe(dst, len) duk_memzero((dst), (len))
+#else /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
+#define duk_memcpy(dst, src, len) \
+ do { \
void *duk__dst = (dst); \
const void *duk__src = (src); \
duk_size_t duk__len = (len); \
@@ -2866,7 +3034,8 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
DUK_ASSERT(duk__src != NULL); \
(void) DUK_MEMCPY(duk__dst, duk__src, (size_t) duk__len); \
} while (0)
-#define duk_memcpy_unsafe(dst,src,len) do { \
+#define duk_memcpy_unsafe(dst, src, len) \
+ do { \
void *duk__dst = (dst); \
const void *duk__src = (src); \
duk_size_t duk__len = (len); \
@@ -2878,7 +3047,8 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
(void) DUK_MEMCPY(duk__dst, duk__src, (size_t) duk__len); \
} \
} while (0)
-#define duk_memmove(dst,src,len) do { \
+#define duk_memmove(dst, src, len) \
+ do { \
void *duk__dst = (dst); \
const void *duk__src = (src); \
duk_size_t duk__len = (len); \
@@ -2886,7 +3056,8 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
DUK_ASSERT(duk__src != NULL); \
(void) DUK_MEMMOVE(duk__dst, duk__src, (size_t) duk__len); \
} while (0)
-#define duk_memmove_unsafe(dst,src,len) do { \
+#define duk_memmove_unsafe(dst, src, len) \
+ do { \
void *duk__dst = (dst); \
const void *duk__src = (src); \
duk_size_t duk__len = (len); \
@@ -2898,14 +3069,16 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
(void) DUK_MEMMOVE(duk__dst, duk__src, (size_t) duk__len); \
} \
} while (0)
-#define duk_memset(dst,val,len) do { \
+#define duk_memset(dst, val, len) \
+ do { \
void *duk__dst = (dst); \
duk_small_int_t duk__val = (val); \
duk_size_t duk__len = (len); \
DUK_ASSERT(duk__dst != NULL); \
(void) DUK_MEMSET(duk__dst, duk__val, (size_t) duk__len); \
} while (0)
-#define duk_memset_unsafe(dst,val,len) do { \
+#define duk_memset_unsafe(dst, val, len) \
+ do { \
void *duk__dst = (dst); \
duk_small_int_t duk__val = (val); \
duk_size_t duk__len = (len); \
@@ -2915,13 +3088,15 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
(void) DUK_MEMSET(duk__dst, duk__val, (size_t) duk__len); \
} \
} while (0)
-#define duk_memzero(dst,len) do { \
+#define duk_memzero(dst, len) \
+ do { \
void *duk__dst = (dst); \
duk_size_t duk__len = (len); \
DUK_ASSERT(duk__dst != NULL); \
(void) DUK_MEMZERO(duk__dst, (size_t) duk__len); \
} while (0)
-#define duk_memzero_unsafe(dst,len) do { \
+#define duk_memzero_unsafe(dst, len) \
+ do { \
void *duk__dst = (dst); \
duk_size_t duk__len = (len); \
DUK_ASSERT(duk__dst != NULL || duk__len == 0U); \
@@ -2930,10 +3105,10 @@ DUK_INTERNAL_DECL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len);
(void) DUK_MEMZERO(duk__dst, (size_t) duk__len); \
} \
} while (0)
-#endif /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
+#endif /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
-DUK_INTERNAL_DECL DUK_INLINE duk_small_int_t duk_memcmp(const void *s1, const void *s2, duk_size_t len);
-DUK_INTERNAL_DECL DUK_INLINE duk_small_int_t duk_memcmp_unsafe(const void *s1, const void *s2, duk_size_t len);
+DUK_INTERNAL_DECL duk_small_int_t duk_memcmp(const void *s1, const void *s2, duk_size_t len);
+DUK_INTERNAL_DECL duk_small_int_t duk_memcmp_unsafe(const void *s1, const void *s2, duk_size_t len);
DUK_INTERNAL_DECL duk_bool_t duk_is_whole_get_int32_nonegzero(duk_double_t x, duk_int32_t *ival);
DUK_INTERNAL_DECL duk_bool_t duk_is_whole_get_int32(duk_double_t x, duk_int32_t *ival);
@@ -2953,12 +3128,14 @@ DUK_INTERNAL_DECL duk_bool_t duk_double_is_finite(duk_double_t x);
DUK_INTERNAL_DECL duk_bool_t duk_double_is_integer(duk_double_t x);
DUK_INTERNAL_DECL duk_bool_t duk_double_is_safe_integer(duk_double_t x);
-DUK_INTERNAL_DECL DUK_INLINE duk_double_t duk_double_div(duk_double_t x, duk_double_t y);
+DUK_INTERNAL_DECL duk_double_t duk_double_div(duk_double_t x, duk_double_t y);
DUK_INTERNAL_DECL duk_int_t duk_double_to_int_t(duk_double_t x);
DUK_INTERNAL_DECL duk_uint_t duk_double_to_uint_t(duk_double_t x);
DUK_INTERNAL_DECL duk_int32_t duk_double_to_int32_t(duk_double_t x);
DUK_INTERNAL_DECL duk_uint32_t duk_double_to_uint32_t(duk_double_t x);
DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
+DUK_INTERNAL_DECL duk_bool_t duk_double_equals(duk_double_t x, duk_double_t y);
+DUK_INTERNAL_DECL duk_bool_t duk_float_equals(duk_float_t x, duk_float_t y);
/*
* Miscellaneous
@@ -2974,10 +3151,9 @@ DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
*
* However, incorrectly true for x == 0 so check for that explicitly.
*/
-#define DUK_IS_POWER_OF_TWO(x) \
- ((x) != 0U && ((x) & ((x) - 1U)) == 0U)
+#define DUK_IS_POWER_OF_TWO(x) ((x) != 0U && ((x) & ((x) -1U)) == 0U)
-#endif /* DUK_UTIL_H_INCLUDED */
+#endif /* DUK_UTIL_H_INCLUDED */
/* #include duk_strings.h */
/*
* Shared string macros.
@@ -3003,149 +3179,151 @@ DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
#define DUK_ERRMSG_H_INCLUDED
/* Mostly API and built-in method related */
-#define DUK_STR_INTERNAL_ERROR "internal error"
-#define DUK_STR_UNSUPPORTED "unsupported"
-#define DUK_STR_INVALID_COUNT "invalid count"
-#define DUK_STR_INVALID_ARGS "invalid args"
-#define DUK_STR_INVALID_STATE "invalid state"
-#define DUK_STR_INVALID_INPUT "invalid input"
-#define DUK_STR_INVALID_LENGTH "invalid length"
-#define DUK_STR_NOT_CONSTRUCTABLE "not constructable"
-#define DUK_STR_CONSTRUCT_ONLY "constructor requires 'new'"
-#define DUK_STR_NOT_CALLABLE "not callable"
-#define DUK_STR_NOT_EXTENSIBLE "not extensible"
-#define DUK_STR_NOT_WRITABLE "not writable"
-#define DUK_STR_NOT_CONFIGURABLE "not configurable"
-#define DUK_STR_INVALID_CONTEXT "invalid context"
-#define DUK_STR_INVALID_INDEX "invalid args"
-#define DUK_STR_PUSH_BEYOND_ALLOC_STACK "cannot push beyond allocated stack"
-#define DUK_STR_NOT_UNDEFINED "unexpected type"
-#define DUK_STR_NOT_NULL "unexpected type"
-#define DUK_STR_NOT_BOOLEAN "unexpected type"
-#define DUK_STR_NOT_NUMBER "unexpected type"
-#define DUK_STR_NOT_STRING "unexpected type"
-#define DUK_STR_NOT_OBJECT "unexpected type"
-#define DUK_STR_NOT_POINTER "unexpected type"
-#define DUK_STR_NOT_BUFFER "not buffer" /* still in use with verbose messages */
-#define DUK_STR_UNEXPECTED_TYPE "unexpected type"
-#define DUK_STR_NOT_THREAD "unexpected type"
-#define DUK_STR_NOT_COMPFUNC "unexpected type"
-#define DUK_STR_NOT_NATFUNC "unexpected type"
-#define DUK_STR_NOT_C_FUNCTION "unexpected type"
-#define DUK_STR_NOT_FUNCTION "unexpected type"
-#define DUK_STR_NOT_REGEXP "unexpected type"
-#define DUK_STR_TOPRIMITIVE_FAILED "coercion to primitive failed"
-#define DUK_STR_NUMBER_OUTSIDE_RANGE "number outside range"
-#define DUK_STR_NOT_OBJECT_COERCIBLE "not object coercible"
-#define DUK_STR_CANNOT_NUMBER_COERCE_SYMBOL "cannot number coerce Symbol"
-#define DUK_STR_CANNOT_STRING_COERCE_SYMBOL "cannot string coerce Symbol"
-#define DUK_STR_STRING_TOO_LONG "string too long"
-#define DUK_STR_BUFFER_TOO_LONG "buffer too long"
-#define DUK_STR_ALLOC_FAILED "alloc failed"
-#define DUK_STR_WRONG_BUFFER_TYPE "wrong buffer type"
-#define DUK_STR_BASE64_ENCODE_FAILED "base64 encode failed"
-#define DUK_STR_SOURCE_DECODE_FAILED "source decode failed"
-#define DUK_STR_UTF8_DECODE_FAILED "utf-8 decode failed"
-#define DUK_STR_BASE64_DECODE_FAILED "base64 decode failed"
-#define DUK_STR_HEX_DECODE_FAILED "hex decode failed"
-#define DUK_STR_INVALID_BYTECODE "invalid bytecode"
-#define DUK_STR_NO_SOURCECODE "no sourcecode"
-#define DUK_STR_RESULT_TOO_LONG "result too long"
-#define DUK_STR_INVALID_CFUNC_RC "invalid C function rc"
-#define DUK_STR_INVALID_INSTANCEOF_RVAL "invalid instanceof rval"
-#define DUK_STR_INVALID_INSTANCEOF_RVAL_NOPROTO "instanceof rval has no .prototype"
+#define DUK_STR_INTERNAL_ERROR "internal error"
+#define DUK_STR_UNSUPPORTED "unsupported"
+#define DUK_STR_INVALID_COUNT "invalid count"
+#define DUK_STR_INVALID_ARGS "invalid args"
+#define DUK_STR_INVALID_STATE "invalid state"
+#define DUK_STR_INVALID_INPUT "invalid input"
+#define DUK_STR_INVALID_LENGTH "invalid length"
+#define DUK_STR_NOT_CONSTRUCTABLE "not constructable"
+#define DUK_STR_CONSTRUCT_ONLY "constructor requires 'new'"
+#define DUK_STR_NOT_CALLABLE "not callable"
+#define DUK_STR_NOT_EXTENSIBLE "not extensible"
+#define DUK_STR_NOT_WRITABLE "not writable"
+#define DUK_STR_NOT_CONFIGURABLE "not configurable"
+#define DUK_STR_INVALID_CONTEXT "invalid context"
+#define DUK_STR_INVALID_INDEX "invalid args"
+#define DUK_STR_PUSH_BEYOND_ALLOC_STACK "cannot push beyond allocated stack"
+#define DUK_STR_NOT_UNDEFINED "unexpected type"
+#define DUK_STR_NOT_NULL "unexpected type"
+#define DUK_STR_NOT_BOOLEAN "unexpected type"
+#define DUK_STR_NOT_NUMBER "unexpected type"
+#define DUK_STR_NOT_STRING "unexpected type"
+#define DUK_STR_NOT_OBJECT "unexpected type"
+#define DUK_STR_NOT_POINTER "unexpected type"
+#define DUK_STR_NOT_BUFFER "not buffer" /* still in use with verbose messages */
+#define DUK_STR_UNEXPECTED_TYPE "unexpected type"
+#define DUK_STR_NOT_THREAD "unexpected type"
+#define DUK_STR_NOT_COMPFUNC "unexpected type"
+#define DUK_STR_NOT_NATFUNC "unexpected type"
+#define DUK_STR_NOT_C_FUNCTION "unexpected type"
+#define DUK_STR_NOT_FUNCTION "unexpected type"
+#define DUK_STR_NOT_REGEXP "unexpected type"
+#define DUK_STR_TOPRIMITIVE_FAILED "coercion to primitive failed"
+#define DUK_STR_NUMBER_OUTSIDE_RANGE "number outside range"
+#define DUK_STR_NOT_OBJECT_COERCIBLE "not object coercible"
+#define DUK_STR_CANNOT_NUMBER_COERCE_SYMBOL "cannot number coerce Symbol"
+#define DUK_STR_CANNOT_STRING_COERCE_SYMBOL "cannot string coerce Symbol"
+#define DUK_STR_STRING_TOO_LONG "string too long"
+#define DUK_STR_BUFFER_TOO_LONG "buffer too long"
+#define DUK_STR_ALLOC_FAILED "alloc failed"
+#define DUK_STR_WRONG_BUFFER_TYPE "wrong buffer type"
+#define DUK_STR_BASE64_ENCODE_FAILED "base64 encode failed"
+#define DUK_STR_SOURCE_DECODE_FAILED "source decode failed"
+#define DUK_STR_UTF8_DECODE_FAILED "utf-8 decode failed"
+#define DUK_STR_BASE64_DECODE_FAILED "base64 decode failed"
+#define DUK_STR_HEX_DECODE_FAILED "hex decode failed"
+#define DUK_STR_INVALID_BYTECODE "invalid bytecode"
+#define DUK_STR_NO_SOURCECODE "no sourcecode"
+#define DUK_STR_RESULT_TOO_LONG "result too long"
+#define DUK_STR_INVALID_CFUNC_RC "invalid C function rc"
+#define DUK_STR_INVALID_INSTANCEOF_RVAL "invalid instanceof rval"
+#define DUK_STR_INVALID_INSTANCEOF_RVAL_NOPROTO "instanceof rval has no .prototype"
/* JSON */
-#define DUK_STR_FMT_PTR "%p"
-#define DUK_STR_FMT_INVALID_JSON "invalid json (at offset %ld)"
-#define DUK_STR_JSONDEC_RECLIMIT "json decode recursion limit"
-#define DUK_STR_JSONENC_RECLIMIT "json encode recursion limit"
-#define DUK_STR_CYCLIC_INPUT "cyclic input"
+#define DUK_STR_FMT_PTR "%p"
+#define DUK_STR_FMT_INVALID_JSON "invalid json (at offset %ld)"
+#define DUK_STR_CYCLIC_INPUT "cyclic input"
+
+/* Generic codec */
+#define DUK_STR_DEC_RECLIMIT "decode recursion limit"
+#define DUK_STR_ENC_RECLIMIT "encode recursion limit"
/* Object property access */
-#define DUK_STR_INVALID_BASE "invalid base value"
-#define DUK_STR_STRICT_CALLER_READ "cannot read strict 'caller'"
-#define DUK_STR_PROXY_REJECTED "proxy rejected"
-#define DUK_STR_INVALID_ARRAY_LENGTH "invalid array length"
-#define DUK_STR_SETTER_UNDEFINED "setter undefined"
-#define DUK_STR_INVALID_DESCRIPTOR "invalid descriptor"
+#define DUK_STR_INVALID_BASE "invalid base value"
+#define DUK_STR_STRICT_CALLER_READ "cannot read strict 'caller'"
+#define DUK_STR_PROXY_REJECTED "proxy rejected"
+#define DUK_STR_INVALID_ARRAY_LENGTH "invalid array length"
+#define DUK_STR_SETTER_UNDEFINED "setter undefined"
+#define DUK_STR_INVALID_DESCRIPTOR "invalid descriptor"
/* Proxy */
-#define DUK_STR_PROXY_REVOKED "proxy revoked"
-#define DUK_STR_INVALID_TRAP_RESULT "invalid trap result"
+#define DUK_STR_PROXY_REVOKED "proxy revoked"
+#define DUK_STR_INVALID_TRAP_RESULT "invalid trap result"
/* Variables */
/* Lexer */
-#define DUK_STR_INVALID_ESCAPE "invalid escape"
-#define DUK_STR_UNTERMINATED_STRING "unterminated string"
-#define DUK_STR_UNTERMINATED_COMMENT "unterminated comment"
-#define DUK_STR_UNTERMINATED_REGEXP "unterminated regexp"
-#define DUK_STR_TOKEN_LIMIT "token limit"
-#define DUK_STR_REGEXP_SUPPORT_DISABLED "regexp support disabled"
-#define DUK_STR_INVALID_NUMBER_LITERAL "invalid number literal"
-#define DUK_STR_INVALID_TOKEN "invalid token"
+#define DUK_STR_INVALID_ESCAPE "invalid escape"
+#define DUK_STR_UNTERMINATED_STRING "unterminated string"
+#define DUK_STR_UNTERMINATED_COMMENT "unterminated comment"
+#define DUK_STR_UNTERMINATED_REGEXP "unterminated regexp"
+#define DUK_STR_TOKEN_LIMIT "token limit"
+#define DUK_STR_REGEXP_SUPPORT_DISABLED "regexp support disabled"
+#define DUK_STR_INVALID_NUMBER_LITERAL "invalid number literal"
+#define DUK_STR_INVALID_TOKEN "invalid token"
/* Compiler */
-#define DUK_STR_PARSE_ERROR "parse error"
-#define DUK_STR_DUPLICATE_LABEL "duplicate label"
-#define DUK_STR_INVALID_LABEL "invalid label"
-#define DUK_STR_INVALID_ARRAY_LITERAL "invalid array literal"
-#define DUK_STR_INVALID_OBJECT_LITERAL "invalid object literal"
-#define DUK_STR_INVALID_VAR_DECLARATION "invalid variable declaration"
-#define DUK_STR_CANNOT_DELETE_IDENTIFIER "cannot delete identifier"
-#define DUK_STR_INVALID_EXPRESSION "invalid expression"
-#define DUK_STR_INVALID_LVALUE "invalid lvalue"
-#define DUK_STR_INVALID_NEWTARGET "invalid new.target"
-#define DUK_STR_EXPECTED_IDENTIFIER "expected identifier"
-#define DUK_STR_EMPTY_EXPR_NOT_ALLOWED "empty expression not allowed"
-#define DUK_STR_INVALID_FOR "invalid for statement"
-#define DUK_STR_INVALID_SWITCH "invalid switch statement"
-#define DUK_STR_INVALID_BREAK_CONT_LABEL "invalid break/continue label"
-#define DUK_STR_INVALID_RETURN "invalid return"
-#define DUK_STR_INVALID_TRY "invalid try"
-#define DUK_STR_INVALID_THROW "invalid throw"
-#define DUK_STR_WITH_IN_STRICT_MODE "with in strict mode"
-#define DUK_STR_FUNC_STMT_NOT_ALLOWED "function statement not allowed"
-#define DUK_STR_UNTERMINATED_STMT "unterminated statement"
-#define DUK_STR_INVALID_ARG_NAME "invalid argument name"
-#define DUK_STR_INVALID_FUNC_NAME "invalid function name"
-#define DUK_STR_INVALID_GETSET_NAME "invalid getter/setter name"
-#define DUK_STR_FUNC_NAME_REQUIRED "function name required"
+#define DUK_STR_PARSE_ERROR "parse error"
+#define DUK_STR_DUPLICATE_LABEL "duplicate label"
+#define DUK_STR_INVALID_LABEL "invalid label"
+#define DUK_STR_INVALID_ARRAY_LITERAL "invalid array literal"
+#define DUK_STR_INVALID_OBJECT_LITERAL "invalid object literal"
+#define DUK_STR_INVALID_VAR_DECLARATION "invalid variable declaration"
+#define DUK_STR_CANNOT_DELETE_IDENTIFIER "cannot delete identifier"
+#define DUK_STR_INVALID_EXPRESSION "invalid expression"
+#define DUK_STR_INVALID_LVALUE "invalid lvalue"
+#define DUK_STR_INVALID_NEWTARGET "invalid new.target"
+#define DUK_STR_EXPECTED_IDENTIFIER "expected identifier"
+#define DUK_STR_EMPTY_EXPR_NOT_ALLOWED "empty expression not allowed"
+#define DUK_STR_INVALID_FOR "invalid for statement"
+#define DUK_STR_INVALID_SWITCH "invalid switch statement"
+#define DUK_STR_INVALID_BREAK_CONT_LABEL "invalid break/continue label"
+#define DUK_STR_INVALID_RETURN "invalid return"
+#define DUK_STR_INVALID_TRY "invalid try"
+#define DUK_STR_INVALID_THROW "invalid throw"
+#define DUK_STR_WITH_IN_STRICT_MODE "with in strict mode"
+#define DUK_STR_FUNC_STMT_NOT_ALLOWED "function statement not allowed"
+#define DUK_STR_UNTERMINATED_STMT "unterminated statement"
+#define DUK_STR_INVALID_ARG_NAME "invalid argument name"
+#define DUK_STR_INVALID_FUNC_NAME "invalid function name"
+#define DUK_STR_INVALID_GETSET_NAME "invalid getter/setter name"
+#define DUK_STR_FUNC_NAME_REQUIRED "function name required"
/* RegExp */
-#define DUK_STR_INVALID_QUANTIFIER "invalid regexp quantifier"
-#define DUK_STR_INVALID_QUANTIFIER_NO_ATOM "quantifier without preceding atom"
-#define DUK_STR_INVALID_QUANTIFIER_VALUES "quantifier values invalid (qmin > qmax)"
-#define DUK_STR_QUANTIFIER_TOO_MANY_COPIES "quantifier requires too many atom copies"
-#define DUK_STR_UNEXPECTED_CLOSING_PAREN "unexpected closing parenthesis"
-#define DUK_STR_UNEXPECTED_END_OF_PATTERN "unexpected end of pattern"
-#define DUK_STR_UNEXPECTED_REGEXP_TOKEN "unexpected token in regexp"
-#define DUK_STR_INVALID_REGEXP_FLAGS "invalid regexp flags"
-#define DUK_STR_INVALID_REGEXP_ESCAPE "invalid regexp escape"
-#define DUK_STR_INVALID_BACKREFS "invalid backreference(s)"
-#define DUK_STR_INVALID_REGEXP_CHARACTER "invalid regexp character"
-#define DUK_STR_INVALID_REGEXP_GROUP "invalid regexp group"
-#define DUK_STR_UNTERMINATED_CHARCLASS "unterminated character class"
-#define DUK_STR_INVALID_RANGE "invalid range"
+#define DUK_STR_INVALID_QUANTIFIER "invalid regexp quantifier"
+#define DUK_STR_INVALID_QUANTIFIER_NO_ATOM "quantifier without preceding atom"
+#define DUK_STR_INVALID_QUANTIFIER_VALUES "quantifier values invalid (qmin > qmax)"
+#define DUK_STR_QUANTIFIER_TOO_MANY_COPIES "quantifier requires too many atom copies"
+#define DUK_STR_UNEXPECTED_CLOSING_PAREN "unexpected closing parenthesis"
+#define DUK_STR_UNEXPECTED_END_OF_PATTERN "unexpected end of pattern"
+#define DUK_STR_UNEXPECTED_REGEXP_TOKEN "unexpected token in regexp"
+#define DUK_STR_INVALID_REGEXP_FLAGS "invalid regexp flags"
+#define DUK_STR_INVALID_REGEXP_ESCAPE "invalid regexp escape"
+#define DUK_STR_INVALID_BACKREFS "invalid backreference(s)"
+#define DUK_STR_INVALID_REGEXP_CHARACTER "invalid regexp character"
+#define DUK_STR_INVALID_REGEXP_GROUP "invalid regexp group"
+#define DUK_STR_UNTERMINATED_CHARCLASS "unterminated character class"
+#define DUK_STR_INVALID_RANGE "invalid range"
/* Limits */
-#define DUK_STR_VALSTACK_LIMIT "valstack limit"
-#define DUK_STR_CALLSTACK_LIMIT "callstack limit"
-#define DUK_STR_PROTOTYPE_CHAIN_LIMIT "prototype chain limit"
-#define DUK_STR_BOUND_CHAIN_LIMIT "function call bound chain limit"
-#define DUK_STR_NATIVE_STACK_LIMIT "C stack depth limit"
-#define DUK_STR_COMPILER_RECURSION_LIMIT "compiler recursion limit"
-#define DUK_STR_BYTECODE_LIMIT "bytecode limit"
-#define DUK_STR_REG_LIMIT "register limit"
-#define DUK_STR_TEMP_LIMIT "temp limit"
-#define DUK_STR_CONST_LIMIT "const limit"
-#define DUK_STR_FUNC_LIMIT "function limit"
-#define DUK_STR_REGEXP_COMPILER_RECURSION_LIMIT "regexp compiler recursion limit"
-#define DUK_STR_REGEXP_EXECUTOR_RECURSION_LIMIT "regexp executor recursion limit"
-#define DUK_STR_REGEXP_EXECUTOR_STEP_LIMIT "regexp step limit"
-
-#endif /* DUK_ERRMSG_H_INCLUDED */
+#define DUK_STR_VALSTACK_LIMIT "valstack limit"
+#define DUK_STR_CALLSTACK_LIMIT "callstack limit"
+#define DUK_STR_PROTOTYPE_CHAIN_LIMIT "prototype chain limit"
+#define DUK_STR_BOUND_CHAIN_LIMIT "function call bound chain limit"
+#define DUK_STR_NATIVE_STACK_LIMIT "C stack depth limit"
+#define DUK_STR_COMPILER_RECURSION_LIMIT "compiler recursion limit"
+#define DUK_STR_BYTECODE_LIMIT "bytecode limit"
+#define DUK_STR_REG_LIMIT "register limit"
+#define DUK_STR_TEMP_LIMIT "temp limit"
+#define DUK_STR_CONST_LIMIT "const limit"
+#define DUK_STR_FUNC_LIMIT "function limit"
+#define DUK_STR_REGEXP_COMPILER_RECURSION_LIMIT "regexp compiler recursion limit"
+#define DUK_STR_REGEXP_EXECUTOR_RECURSION_LIMIT "regexp executor recursion limit"
+#define DUK_STR_REGEXP_EXECUTOR_STEP_LIMIT "regexp step limit"
+
+#endif /* DUK_ERRMSG_H_INCLUDED */
/* #include duk_js_bytecode.h */
/*
* ECMAScript bytecode
@@ -3232,403 +3410,394 @@ DUK_INTERNAL_DECL duk_float_t duk_double_to_float_t(duk_double_t x);
typedef duk_uint32_t duk_instr_t;
-#define DUK_BC_SHIFT_OP 0
-#define DUK_BC_SHIFT_A 8
-#define DUK_BC_SHIFT_B 16
-#define DUK_BC_SHIFT_C 24
-#define DUK_BC_SHIFT_BC DUK_BC_SHIFT_B
-#define DUK_BC_SHIFT_ABC DUK_BC_SHIFT_A
-
-#define DUK_BC_UNSHIFTED_MASK_OP 0xffUL
-#define DUK_BC_UNSHIFTED_MASK_A 0xffUL
-#define DUK_BC_UNSHIFTED_MASK_B 0xffUL
-#define DUK_BC_UNSHIFTED_MASK_C 0xffUL
-#define DUK_BC_UNSHIFTED_MASK_BC 0xffffUL
-#define DUK_BC_UNSHIFTED_MASK_ABC 0xffffffUL
-
-#define DUK_BC_SHIFTED_MASK_OP (DUK_BC_UNSHIFTED_MASK_OP << DUK_BC_SHIFT_OP)
-#define DUK_BC_SHIFTED_MASK_A (DUK_BC_UNSHIFTED_MASK_A << DUK_BC_SHIFT_A)
-#define DUK_BC_SHIFTED_MASK_B (DUK_BC_UNSHIFTED_MASK_B << DUK_BC_SHIFT_B)
-#define DUK_BC_SHIFTED_MASK_C (DUK_BC_UNSHIFTED_MASK_C << DUK_BC_SHIFT_C)
-#define DUK_BC_SHIFTED_MASK_BC (DUK_BC_UNSHIFTED_MASK_BC << DUK_BC_SHIFT_BC)
-#define DUK_BC_SHIFTED_MASK_ABC (DUK_BC_UNSHIFTED_MASK_ABC << DUK_BC_SHIFT_ABC)
-
-#define DUK_DEC_OP(x) ((x) & 0xffUL)
-#define DUK_DEC_A(x) (((x) >> 8) & 0xffUL)
-#define DUK_DEC_B(x) (((x) >> 16) & 0xffUL)
-#define DUK_DEC_C(x) (((x) >> 24) & 0xffUL)
-#define DUK_DEC_BC(x) (((x) >> 16) & 0xffffUL)
-#define DUK_DEC_ABC(x) (((x) >> 8) & 0xffffffUL)
-
-#define DUK_ENC_OP(op) ((duk_instr_t) (op))
-#define DUK_ENC_OP_ABC(op,abc) ((duk_instr_t) ( \
- (((duk_instr_t) (abc)) << 8) | \
- ((duk_instr_t) (op)) \
- ))
-#define DUK_ENC_OP_A_BC(op,a,bc) ((duk_instr_t) ( \
- (((duk_instr_t) (bc)) << 16) | \
- (((duk_instr_t) (a)) << 8) | \
- ((duk_instr_t) (op)) \
- ))
-#define DUK_ENC_OP_A_B_C(op,a,b,c) ((duk_instr_t) ( \
- (((duk_instr_t) (c)) << 24) | \
- (((duk_instr_t) (b)) << 16) | \
- (((duk_instr_t) (a)) << 8) | \
- ((duk_instr_t) (op)) \
- ))
-#define DUK_ENC_OP_A_B(op,a,b) DUK_ENC_OP_A_B_C((op),(a),(b),0)
-#define DUK_ENC_OP_A(op,a) DUK_ENC_OP_A_B_C((op),(a),0,0)
-#define DUK_ENC_OP_BC(op,bc) DUK_ENC_OP_A_BC((op),0,(bc))
+#define DUK_BC_SHIFT_OP 0
+#define DUK_BC_SHIFT_A 8
+#define DUK_BC_SHIFT_B 16
+#define DUK_BC_SHIFT_C 24
+#define DUK_BC_SHIFT_BC DUK_BC_SHIFT_B
+#define DUK_BC_SHIFT_ABC DUK_BC_SHIFT_A
+
+#define DUK_BC_UNSHIFTED_MASK_OP 0xffUL
+#define DUK_BC_UNSHIFTED_MASK_A 0xffUL
+#define DUK_BC_UNSHIFTED_MASK_B 0xffUL
+#define DUK_BC_UNSHIFTED_MASK_C 0xffUL
+#define DUK_BC_UNSHIFTED_MASK_BC 0xffffUL
+#define DUK_BC_UNSHIFTED_MASK_ABC 0xffffffUL
+
+#define DUK_BC_SHIFTED_MASK_OP (DUK_BC_UNSHIFTED_MASK_OP << DUK_BC_SHIFT_OP)
+#define DUK_BC_SHIFTED_MASK_A (DUK_BC_UNSHIFTED_MASK_A << DUK_BC_SHIFT_A)
+#define DUK_BC_SHIFTED_MASK_B (DUK_BC_UNSHIFTED_MASK_B << DUK_BC_SHIFT_B)
+#define DUK_BC_SHIFTED_MASK_C (DUK_BC_UNSHIFTED_MASK_C << DUK_BC_SHIFT_C)
+#define DUK_BC_SHIFTED_MASK_BC (DUK_BC_UNSHIFTED_MASK_BC << DUK_BC_SHIFT_BC)
+#define DUK_BC_SHIFTED_MASK_ABC (DUK_BC_UNSHIFTED_MASK_ABC << DUK_BC_SHIFT_ABC)
+
+#define DUK_DEC_OP(x) ((x) &0xffUL)
+#define DUK_DEC_A(x) (((x) >> 8) & 0xffUL)
+#define DUK_DEC_B(x) (((x) >> 16) & 0xffUL)
+#define DUK_DEC_C(x) (((x) >> 24) & 0xffUL)
+#define DUK_DEC_BC(x) (((x) >> 16) & 0xffffUL)
+#define DUK_DEC_ABC(x) (((x) >> 8) & 0xffffffUL)
+
+#define DUK_ENC_OP(op) ((duk_instr_t) (op))
+#define DUK_ENC_OP_ABC(op, abc) ((duk_instr_t) ((((duk_instr_t) (abc)) << 8) | ((duk_instr_t) (op))))
+#define DUK_ENC_OP_A_BC(op, a, bc) \
+ ((duk_instr_t) ((((duk_instr_t) (bc)) << 16) | (((duk_instr_t) (a)) << 8) | ((duk_instr_t) (op))))
+#define DUK_ENC_OP_A_B_C(op, a, b, c) \
+ ((duk_instr_t) ((((duk_instr_t) (c)) << 24) | (((duk_instr_t) (b)) << 16) | (((duk_instr_t) (a)) << 8) | \
+ ((duk_instr_t) (op))))
+#define DUK_ENC_OP_A_B(op, a, b) DUK_ENC_OP_A_B_C((op), (a), (b), 0)
+#define DUK_ENC_OP_A(op, a) DUK_ENC_OP_A_B_C((op), (a), 0, 0)
+#define DUK_ENC_OP_BC(op, bc) DUK_ENC_OP_A_BC((op), 0, (bc))
/* Get opcode base value with B/C reg/const flags cleared. */
-#define DUK_BC_NOREGCONST_OP(op) ((op) & 0xfc)
+#define DUK_BC_NOREGCONST_OP(op) ((op) &0xfc)
/* Constants should be signed so that signed arithmetic involving them
* won't cause values to be coerced accidentally to unsigned.
*/
-#define DUK_BC_OP_MIN 0
-#define DUK_BC_OP_MAX 0xffL
-#define DUK_BC_A_MIN 0
-#define DUK_BC_A_MAX 0xffL
-#define DUK_BC_B_MIN 0
-#define DUK_BC_B_MAX 0xffL
-#define DUK_BC_C_MIN 0
-#define DUK_BC_C_MAX 0xffL
-#define DUK_BC_BC_MIN 0
-#define DUK_BC_BC_MAX 0xffffL
-#define DUK_BC_ABC_MIN 0
-#define DUK_BC_ABC_MAX 0xffffffL
+#define DUK_BC_OP_MIN 0
+#define DUK_BC_OP_MAX 0xffL
+#define DUK_BC_A_MIN 0
+#define DUK_BC_A_MAX 0xffL
+#define DUK_BC_B_MIN 0
+#define DUK_BC_B_MAX 0xffL
+#define DUK_BC_C_MIN 0
+#define DUK_BC_C_MAX 0xffL
+#define DUK_BC_BC_MIN 0
+#define DUK_BC_BC_MAX 0xffffL
+#define DUK_BC_ABC_MIN 0
+#define DUK_BC_ABC_MAX 0xffffffL
/* Masks for B/C reg/const indicator in opcode field. */
-#define DUK_BC_REGCONST_B (0x01UL)
-#define DUK_BC_REGCONST_C (0x02UL)
+#define DUK_BC_REGCONST_B (0x01UL)
+#define DUK_BC_REGCONST_C (0x02UL)
/* Misc. masks for opcode field. */
-#define DUK_BC_INCDECP_FLAG_DEC (0x04UL)
-#define DUK_BC_INCDECP_FLAG_POST (0x08UL)
+#define DUK_BC_INCDECP_FLAG_DEC (0x04UL)
+#define DUK_BC_INCDECP_FLAG_POST (0x08UL)
/* Opcodes. */
-#define DUK_OP_LDREG 0
-#define DUK_OP_STREG 1
-#define DUK_OP_JUMP 2
-#define DUK_OP_LDCONST 3
-#define DUK_OP_LDINT 4
-#define DUK_OP_LDINTX 5
-#define DUK_OP_LDTHIS 6
-#define DUK_OP_LDUNDEF 7
-#define DUK_OP_LDNULL 8
-#define DUK_OP_LDTRUE 9
-#define DUK_OP_LDFALSE 10
-#define DUK_OP_GETVAR 11
-#define DUK_OP_BNOT 12
-#define DUK_OP_LNOT 13
-#define DUK_OP_UNM 14
-#define DUK_OP_UNP 15
-#define DUK_OP_EQ 16
-#define DUK_OP_EQ_RR 16
-#define DUK_OP_EQ_CR 17
-#define DUK_OP_EQ_RC 18
-#define DUK_OP_EQ_CC 19
-#define DUK_OP_NEQ 20
-#define DUK_OP_NEQ_RR 20
-#define DUK_OP_NEQ_CR 21
-#define DUK_OP_NEQ_RC 22
-#define DUK_OP_NEQ_CC 23
-#define DUK_OP_SEQ 24
-#define DUK_OP_SEQ_RR 24
-#define DUK_OP_SEQ_CR 25
-#define DUK_OP_SEQ_RC 26
-#define DUK_OP_SEQ_CC 27
-#define DUK_OP_SNEQ 28
-#define DUK_OP_SNEQ_RR 28
-#define DUK_OP_SNEQ_CR 29
-#define DUK_OP_SNEQ_RC 30
-#define DUK_OP_SNEQ_CC 31
-#define DUK_OP_GT 32
-#define DUK_OP_GT_RR 32
-#define DUK_OP_GT_CR 33
-#define DUK_OP_GT_RC 34
-#define DUK_OP_GT_CC 35
-#define DUK_OP_GE 36
-#define DUK_OP_GE_RR 36
-#define DUK_OP_GE_CR 37
-#define DUK_OP_GE_RC 38
-#define DUK_OP_GE_CC 39
-#define DUK_OP_LT 40
-#define DUK_OP_LT_RR 40
-#define DUK_OP_LT_CR 41
-#define DUK_OP_LT_RC 42
-#define DUK_OP_LT_CC 43
-#define DUK_OP_LE 44
-#define DUK_OP_LE_RR 44
-#define DUK_OP_LE_CR 45
-#define DUK_OP_LE_RC 46
-#define DUK_OP_LE_CC 47
-#define DUK_OP_IFTRUE 48
-#define DUK_OP_IFTRUE_R 48
-#define DUK_OP_IFTRUE_C 49
-#define DUK_OP_IFFALSE 50
-#define DUK_OP_IFFALSE_R 50
-#define DUK_OP_IFFALSE_C 51
-#define DUK_OP_ADD 52
-#define DUK_OP_ADD_RR 52
-#define DUK_OP_ADD_CR 53
-#define DUK_OP_ADD_RC 54
-#define DUK_OP_ADD_CC 55
-#define DUK_OP_SUB 56
-#define DUK_OP_SUB_RR 56
-#define DUK_OP_SUB_CR 57
-#define DUK_OP_SUB_RC 58
-#define DUK_OP_SUB_CC 59
-#define DUK_OP_MUL 60
-#define DUK_OP_MUL_RR 60
-#define DUK_OP_MUL_CR 61
-#define DUK_OP_MUL_RC 62
-#define DUK_OP_MUL_CC 63
-#define DUK_OP_DIV 64
-#define DUK_OP_DIV_RR 64
-#define DUK_OP_DIV_CR 65
-#define DUK_OP_DIV_RC 66
-#define DUK_OP_DIV_CC 67
-#define DUK_OP_MOD 68
-#define DUK_OP_MOD_RR 68
-#define DUK_OP_MOD_CR 69
-#define DUK_OP_MOD_RC 70
-#define DUK_OP_MOD_CC 71
-#define DUK_OP_EXP 72
-#define DUK_OP_EXP_RR 72
-#define DUK_OP_EXP_CR 73
-#define DUK_OP_EXP_RC 74
-#define DUK_OP_EXP_CC 75
-#define DUK_OP_BAND 76
-#define DUK_OP_BAND_RR 76
-#define DUK_OP_BAND_CR 77
-#define DUK_OP_BAND_RC 78
-#define DUK_OP_BAND_CC 79
-#define DUK_OP_BOR 80
-#define DUK_OP_BOR_RR 80
-#define DUK_OP_BOR_CR 81
-#define DUK_OP_BOR_RC 82
-#define DUK_OP_BOR_CC 83
-#define DUK_OP_BXOR 84
-#define DUK_OP_BXOR_RR 84
-#define DUK_OP_BXOR_CR 85
-#define DUK_OP_BXOR_RC 86
-#define DUK_OP_BXOR_CC 87
-#define DUK_OP_BASL 88
-#define DUK_OP_BASL_RR 88
-#define DUK_OP_BASL_CR 89
-#define DUK_OP_BASL_RC 90
-#define DUK_OP_BASL_CC 91
-#define DUK_OP_BLSR 92
-#define DUK_OP_BLSR_RR 92
-#define DUK_OP_BLSR_CR 93
-#define DUK_OP_BLSR_RC 94
-#define DUK_OP_BLSR_CC 95
-#define DUK_OP_BASR 96
-#define DUK_OP_BASR_RR 96
-#define DUK_OP_BASR_CR 97
-#define DUK_OP_BASR_RC 98
-#define DUK_OP_BASR_CC 99
-#define DUK_OP_INSTOF 100
-#define DUK_OP_INSTOF_RR 100
-#define DUK_OP_INSTOF_CR 101
-#define DUK_OP_INSTOF_RC 102
-#define DUK_OP_INSTOF_CC 103
-#define DUK_OP_IN 104
-#define DUK_OP_IN_RR 104
-#define DUK_OP_IN_CR 105
-#define DUK_OP_IN_RC 106
-#define DUK_OP_IN_CC 107
-#define DUK_OP_GETPROP 108
-#define DUK_OP_GETPROP_RR 108
-#define DUK_OP_GETPROP_CR 109
-#define DUK_OP_GETPROP_RC 110
-#define DUK_OP_GETPROP_CC 111
-#define DUK_OP_PUTPROP 112
-#define DUK_OP_PUTPROP_RR 112
-#define DUK_OP_PUTPROP_CR 113
-#define DUK_OP_PUTPROP_RC 114
-#define DUK_OP_PUTPROP_CC 115
-#define DUK_OP_DELPROP 116
-#define DUK_OP_DELPROP_RR 116
-#define DUK_OP_DELPROP_CR_UNUSED 117 /* unused now */
-#define DUK_OP_DELPROP_RC 118
-#define DUK_OP_DELPROP_CC_UNUSED 119 /* unused now */
-#define DUK_OP_PREINCR 120 /* pre/post opcode values have constraints, */
-#define DUK_OP_PREDECR 121 /* see duk_js_executor.c and duk_js_compiler.c. */
-#define DUK_OP_POSTINCR 122
-#define DUK_OP_POSTDECR 123
-#define DUK_OP_PREINCV 124
-#define DUK_OP_PREDECV 125
-#define DUK_OP_POSTINCV 126
-#define DUK_OP_POSTDECV 127
-#define DUK_OP_PREINCP 128 /* pre/post inc/dec prop opcodes have constraints */
-#define DUK_OP_PREINCP_RR 128
-#define DUK_OP_PREINCP_CR 129
-#define DUK_OP_PREINCP_RC 130
-#define DUK_OP_PREINCP_CC 131
-#define DUK_OP_PREDECP 132
-#define DUK_OP_PREDECP_RR 132
-#define DUK_OP_PREDECP_CR 133
-#define DUK_OP_PREDECP_RC 134
-#define DUK_OP_PREDECP_CC 135
-#define DUK_OP_POSTINCP 136
-#define DUK_OP_POSTINCP_RR 136
-#define DUK_OP_POSTINCP_CR 137
-#define DUK_OP_POSTINCP_RC 138
-#define DUK_OP_POSTINCP_CC 139
-#define DUK_OP_POSTDECP 140
-#define DUK_OP_POSTDECP_RR 140
-#define DUK_OP_POSTDECP_CR 141
-#define DUK_OP_POSTDECP_RC 142
-#define DUK_OP_POSTDECP_CC 143
-#define DUK_OP_DECLVAR 144
-#define DUK_OP_DECLVAR_RR 144
-#define DUK_OP_DECLVAR_CR 145
-#define DUK_OP_DECLVAR_RC 146
-#define DUK_OP_DECLVAR_CC 147
-#define DUK_OP_REGEXP 148
-#define DUK_OP_REGEXP_RR 148
-#define DUK_OP_REGEXP_CR 149
-#define DUK_OP_REGEXP_RC 150
-#define DUK_OP_REGEXP_CC 151
-#define DUK_OP_CLOSURE 152
-#define DUK_OP_TYPEOF 153
-#define DUK_OP_TYPEOFID 154
-#define DUK_OP_PUTVAR 155
-#define DUK_OP_DELVAR 156
-#define DUK_OP_RETREG 157
-#define DUK_OP_RETUNDEF 158
-#define DUK_OP_RETCONST 159
-#define DUK_OP_RETCONSTN 160 /* return const without incref (e.g. number) */
-#define DUK_OP_LABEL 161
-#define DUK_OP_ENDLABEL 162
-#define DUK_OP_BREAK 163
-#define DUK_OP_CONTINUE 164
-#define DUK_OP_TRYCATCH 165
-#define DUK_OP_ENDTRY 166
-#define DUK_OP_ENDCATCH 167
-#define DUK_OP_ENDFIN 168
-#define DUK_OP_THROW 169
-#define DUK_OP_INVLHS 170
-#define DUK_OP_CSREG 171
-#define DUK_OP_CSVAR 172
-#define DUK_OP_CSVAR_RR 172
-#define DUK_OP_CSVAR_CR 173
-#define DUK_OP_CSVAR_RC 174
-#define DUK_OP_CSVAR_CC 175
-#define DUK_OP_CALL0 176 /* DUK_OP_CALL0 & 0x0F must be zero. */
-#define DUK_OP_CALL1 177
-#define DUK_OP_CALL2 178
-#define DUK_OP_CALL3 179
-#define DUK_OP_CALL4 180
-#define DUK_OP_CALL5 181
-#define DUK_OP_CALL6 182
-#define DUK_OP_CALL7 183
-#define DUK_OP_CALL8 184
-#define DUK_OP_CALL9 185
-#define DUK_OP_CALL10 186
-#define DUK_OP_CALL11 187
-#define DUK_OP_CALL12 188
-#define DUK_OP_CALL13 189
-#define DUK_OP_CALL14 190
-#define DUK_OP_CALL15 191
-#define DUK_OP_NEWOBJ 192
-#define DUK_OP_NEWARR 193
-#define DUK_OP_MPUTOBJ 194
-#define DUK_OP_MPUTOBJI 195
-#define DUK_OP_INITSET 196
-#define DUK_OP_INITGET 197
-#define DUK_OP_MPUTARR 198
-#define DUK_OP_MPUTARRI 199
-#define DUK_OP_SETALEN 200
-#define DUK_OP_INITENUM 201
-#define DUK_OP_NEXTENUM 202
-#define DUK_OP_NEWTARGET 203
-#define DUK_OP_DEBUGGER 204
-#define DUK_OP_NOP 205
-#define DUK_OP_INVALID 206
-#define DUK_OP_UNUSED207 207
-#define DUK_OP_GETPROPC 208
-#define DUK_OP_GETPROPC_RR 208
-#define DUK_OP_GETPROPC_CR 209
-#define DUK_OP_GETPROPC_RC 210
-#define DUK_OP_GETPROPC_CC 211
-#define DUK_OP_UNUSED212 212
-#define DUK_OP_UNUSED213 213
-#define DUK_OP_UNUSED214 214
-#define DUK_OP_UNUSED215 215
-#define DUK_OP_UNUSED216 216
-#define DUK_OP_UNUSED217 217
-#define DUK_OP_UNUSED218 218
-#define DUK_OP_UNUSED219 219
-#define DUK_OP_UNUSED220 220
-#define DUK_OP_UNUSED221 221
-#define DUK_OP_UNUSED222 222
-#define DUK_OP_UNUSED223 223
-#define DUK_OP_UNUSED224 224
-#define DUK_OP_UNUSED225 225
-#define DUK_OP_UNUSED226 226
-#define DUK_OP_UNUSED227 227
-#define DUK_OP_UNUSED228 228
-#define DUK_OP_UNUSED229 229
-#define DUK_OP_UNUSED230 230
-#define DUK_OP_UNUSED231 231
-#define DUK_OP_UNUSED232 232
-#define DUK_OP_UNUSED233 233
-#define DUK_OP_UNUSED234 234
-#define DUK_OP_UNUSED235 235
-#define DUK_OP_UNUSED236 236
-#define DUK_OP_UNUSED237 237
-#define DUK_OP_UNUSED238 238
-#define DUK_OP_UNUSED239 239
-#define DUK_OP_UNUSED240 240
-#define DUK_OP_UNUSED241 241
-#define DUK_OP_UNUSED242 242
-#define DUK_OP_UNUSED243 243
-#define DUK_OP_UNUSED244 244
-#define DUK_OP_UNUSED245 245
-#define DUK_OP_UNUSED246 246
-#define DUK_OP_UNUSED247 247
-#define DUK_OP_UNUSED248 248
-#define DUK_OP_UNUSED249 249
-#define DUK_OP_UNUSED250 250
-#define DUK_OP_UNUSED251 251
-#define DUK_OP_UNUSED252 252
-#define DUK_OP_UNUSED253 253
-#define DUK_OP_UNUSED254 254
-#define DUK_OP_UNUSED255 255
-#define DUK_OP_NONE 256 /* dummy value used as marker (doesn't fit in 8-bit field) */
+#define DUK_OP_LDREG 0
+#define DUK_OP_STREG 1
+#define DUK_OP_JUMP 2
+#define DUK_OP_LDCONST 3
+#define DUK_OP_LDINT 4
+#define DUK_OP_LDINTX 5
+#define DUK_OP_LDTHIS 6
+#define DUK_OP_LDUNDEF 7
+#define DUK_OP_LDNULL 8
+#define DUK_OP_LDTRUE 9
+#define DUK_OP_LDFALSE 10
+#define DUK_OP_GETVAR 11
+#define DUK_OP_BNOT 12
+#define DUK_OP_LNOT 13
+#define DUK_OP_UNM 14
+#define DUK_OP_UNP 15
+#define DUK_OP_EQ 16
+#define DUK_OP_EQ_RR 16
+#define DUK_OP_EQ_CR 17
+#define DUK_OP_EQ_RC 18
+#define DUK_OP_EQ_CC 19
+#define DUK_OP_NEQ 20
+#define DUK_OP_NEQ_RR 20
+#define DUK_OP_NEQ_CR 21
+#define DUK_OP_NEQ_RC 22
+#define DUK_OP_NEQ_CC 23
+#define DUK_OP_SEQ 24
+#define DUK_OP_SEQ_RR 24
+#define DUK_OP_SEQ_CR 25
+#define DUK_OP_SEQ_RC 26
+#define DUK_OP_SEQ_CC 27
+#define DUK_OP_SNEQ 28
+#define DUK_OP_SNEQ_RR 28
+#define DUK_OP_SNEQ_CR 29
+#define DUK_OP_SNEQ_RC 30
+#define DUK_OP_SNEQ_CC 31
+#define DUK_OP_GT 32
+#define DUK_OP_GT_RR 32
+#define DUK_OP_GT_CR 33
+#define DUK_OP_GT_RC 34
+#define DUK_OP_GT_CC 35
+#define DUK_OP_GE 36
+#define DUK_OP_GE_RR 36
+#define DUK_OP_GE_CR 37
+#define DUK_OP_GE_RC 38
+#define DUK_OP_GE_CC 39
+#define DUK_OP_LT 40
+#define DUK_OP_LT_RR 40
+#define DUK_OP_LT_CR 41
+#define DUK_OP_LT_RC 42
+#define DUK_OP_LT_CC 43
+#define DUK_OP_LE 44
+#define DUK_OP_LE_RR 44
+#define DUK_OP_LE_CR 45
+#define DUK_OP_LE_RC 46
+#define DUK_OP_LE_CC 47
+#define DUK_OP_IFTRUE 48
+#define DUK_OP_IFTRUE_R 48
+#define DUK_OP_IFTRUE_C 49
+#define DUK_OP_IFFALSE 50
+#define DUK_OP_IFFALSE_R 50
+#define DUK_OP_IFFALSE_C 51
+#define DUK_OP_ADD 52
+#define DUK_OP_ADD_RR 52
+#define DUK_OP_ADD_CR 53
+#define DUK_OP_ADD_RC 54
+#define DUK_OP_ADD_CC 55
+#define DUK_OP_SUB 56
+#define DUK_OP_SUB_RR 56
+#define DUK_OP_SUB_CR 57
+#define DUK_OP_SUB_RC 58
+#define DUK_OP_SUB_CC 59
+#define DUK_OP_MUL 60
+#define DUK_OP_MUL_RR 60
+#define DUK_OP_MUL_CR 61
+#define DUK_OP_MUL_RC 62
+#define DUK_OP_MUL_CC 63
+#define DUK_OP_DIV 64
+#define DUK_OP_DIV_RR 64
+#define DUK_OP_DIV_CR 65
+#define DUK_OP_DIV_RC 66
+#define DUK_OP_DIV_CC 67
+#define DUK_OP_MOD 68
+#define DUK_OP_MOD_RR 68
+#define DUK_OP_MOD_CR 69
+#define DUK_OP_MOD_RC 70
+#define DUK_OP_MOD_CC 71
+#define DUK_OP_EXP 72
+#define DUK_OP_EXP_RR 72
+#define DUK_OP_EXP_CR 73
+#define DUK_OP_EXP_RC 74
+#define DUK_OP_EXP_CC 75
+#define DUK_OP_BAND 76
+#define DUK_OP_BAND_RR 76
+#define DUK_OP_BAND_CR 77
+#define DUK_OP_BAND_RC 78
+#define DUK_OP_BAND_CC 79
+#define DUK_OP_BOR 80
+#define DUK_OP_BOR_RR 80
+#define DUK_OP_BOR_CR 81
+#define DUK_OP_BOR_RC 82
+#define DUK_OP_BOR_CC 83
+#define DUK_OP_BXOR 84
+#define DUK_OP_BXOR_RR 84
+#define DUK_OP_BXOR_CR 85
+#define DUK_OP_BXOR_RC 86
+#define DUK_OP_BXOR_CC 87
+#define DUK_OP_BASL 88
+#define DUK_OP_BASL_RR 88
+#define DUK_OP_BASL_CR 89
+#define DUK_OP_BASL_RC 90
+#define DUK_OP_BASL_CC 91
+#define DUK_OP_BLSR 92
+#define DUK_OP_BLSR_RR 92
+#define DUK_OP_BLSR_CR 93
+#define DUK_OP_BLSR_RC 94
+#define DUK_OP_BLSR_CC 95
+#define DUK_OP_BASR 96
+#define DUK_OP_BASR_RR 96
+#define DUK_OP_BASR_CR 97
+#define DUK_OP_BASR_RC 98
+#define DUK_OP_BASR_CC 99
+#define DUK_OP_INSTOF 100
+#define DUK_OP_INSTOF_RR 100
+#define DUK_OP_INSTOF_CR 101
+#define DUK_OP_INSTOF_RC 102
+#define DUK_OP_INSTOF_CC 103
+#define DUK_OP_IN 104
+#define DUK_OP_IN_RR 104
+#define DUK_OP_IN_CR 105
+#define DUK_OP_IN_RC 106
+#define DUK_OP_IN_CC 107
+#define DUK_OP_GETPROP 108
+#define DUK_OP_GETPROP_RR 108
+#define DUK_OP_GETPROP_CR 109
+#define DUK_OP_GETPROP_RC 110
+#define DUK_OP_GETPROP_CC 111
+#define DUK_OP_PUTPROP 112
+#define DUK_OP_PUTPROP_RR 112
+#define DUK_OP_PUTPROP_CR 113
+#define DUK_OP_PUTPROP_RC 114
+#define DUK_OP_PUTPROP_CC 115
+#define DUK_OP_DELPROP 116
+#define DUK_OP_DELPROP_RR 116
+#define DUK_OP_DELPROP_CR_UNUSED 117 /* unused now */
+#define DUK_OP_DELPROP_RC 118
+#define DUK_OP_DELPROP_CC_UNUSED 119 /* unused now */
+#define DUK_OP_PREINCR 120 /* pre/post opcode values have constraints, */
+#define DUK_OP_PREDECR 121 /* see duk_js_executor.c and duk_js_compiler.c. */
+#define DUK_OP_POSTINCR 122
+#define DUK_OP_POSTDECR 123
+#define DUK_OP_PREINCV 124
+#define DUK_OP_PREDECV 125
+#define DUK_OP_POSTINCV 126
+#define DUK_OP_POSTDECV 127
+#define DUK_OP_PREINCP 128 /* pre/post inc/dec prop opcodes have constraints */
+#define DUK_OP_PREINCP_RR 128
+#define DUK_OP_PREINCP_CR 129
+#define DUK_OP_PREINCP_RC 130
+#define DUK_OP_PREINCP_CC 131
+#define DUK_OP_PREDECP 132
+#define DUK_OP_PREDECP_RR 132
+#define DUK_OP_PREDECP_CR 133
+#define DUK_OP_PREDECP_RC 134
+#define DUK_OP_PREDECP_CC 135
+#define DUK_OP_POSTINCP 136
+#define DUK_OP_POSTINCP_RR 136
+#define DUK_OP_POSTINCP_CR 137
+#define DUK_OP_POSTINCP_RC 138
+#define DUK_OP_POSTINCP_CC 139
+#define DUK_OP_POSTDECP 140
+#define DUK_OP_POSTDECP_RR 140
+#define DUK_OP_POSTDECP_CR 141
+#define DUK_OP_POSTDECP_RC 142
+#define DUK_OP_POSTDECP_CC 143
+#define DUK_OP_DECLVAR 144
+#define DUK_OP_DECLVAR_RR 144
+#define DUK_OP_DECLVAR_CR 145
+#define DUK_OP_DECLVAR_RC 146
+#define DUK_OP_DECLVAR_CC 147
+#define DUK_OP_REGEXP 148
+#define DUK_OP_REGEXP_RR 148
+#define DUK_OP_REGEXP_CR 149
+#define DUK_OP_REGEXP_RC 150
+#define DUK_OP_REGEXP_CC 151
+#define DUK_OP_CLOSURE 152
+#define DUK_OP_TYPEOF 153
+#define DUK_OP_TYPEOFID 154
+#define DUK_OP_PUTVAR 155
+#define DUK_OP_DELVAR 156
+#define DUK_OP_RETREG 157
+#define DUK_OP_RETUNDEF 158
+#define DUK_OP_RETCONST 159
+#define DUK_OP_RETCONSTN 160 /* return const without incref (e.g. number) */
+#define DUK_OP_LABEL 161
+#define DUK_OP_ENDLABEL 162
+#define DUK_OP_BREAK 163
+#define DUK_OP_CONTINUE 164
+#define DUK_OP_TRYCATCH 165
+#define DUK_OP_ENDTRY 166
+#define DUK_OP_ENDCATCH 167
+#define DUK_OP_ENDFIN 168
+#define DUK_OP_THROW 169
+#define DUK_OP_INVLHS 170
+#define DUK_OP_CSREG 171
+#define DUK_OP_CSVAR 172
+#define DUK_OP_CSVAR_RR 172
+#define DUK_OP_CSVAR_CR 173
+#define DUK_OP_CSVAR_RC 174
+#define DUK_OP_CSVAR_CC 175
+#define DUK_OP_CALL0 176 /* DUK_OP_CALL0 & 0x0F must be zero. */
+#define DUK_OP_CALL1 177
+#define DUK_OP_CALL2 178
+#define DUK_OP_CALL3 179
+#define DUK_OP_CALL4 180
+#define DUK_OP_CALL5 181
+#define DUK_OP_CALL6 182
+#define DUK_OP_CALL7 183
+#define DUK_OP_CALL8 184
+#define DUK_OP_CALL9 185
+#define DUK_OP_CALL10 186
+#define DUK_OP_CALL11 187
+#define DUK_OP_CALL12 188
+#define DUK_OP_CALL13 189
+#define DUK_OP_CALL14 190
+#define DUK_OP_CALL15 191
+#define DUK_OP_NEWOBJ 192
+#define DUK_OP_NEWARR 193
+#define DUK_OP_MPUTOBJ 194
+#define DUK_OP_MPUTOBJI 195
+#define DUK_OP_INITSET 196
+#define DUK_OP_INITGET 197
+#define DUK_OP_MPUTARR 198
+#define DUK_OP_MPUTARRI 199
+#define DUK_OP_SETALEN 200
+#define DUK_OP_INITENUM 201
+#define DUK_OP_NEXTENUM 202
+#define DUK_OP_NEWTARGET 203
+#define DUK_OP_DEBUGGER 204
+#define DUK_OP_NOP 205
+#define DUK_OP_INVALID 206
+#define DUK_OP_UNUSED207 207
+#define DUK_OP_GETPROPC 208
+#define DUK_OP_GETPROPC_RR 208
+#define DUK_OP_GETPROPC_CR 209
+#define DUK_OP_GETPROPC_RC 210
+#define DUK_OP_GETPROPC_CC 211
+#define DUK_OP_UNUSED212 212
+#define DUK_OP_UNUSED213 213
+#define DUK_OP_UNUSED214 214
+#define DUK_OP_UNUSED215 215
+#define DUK_OP_UNUSED216 216
+#define DUK_OP_UNUSED217 217
+#define DUK_OP_UNUSED218 218
+#define DUK_OP_UNUSED219 219
+#define DUK_OP_UNUSED220 220
+#define DUK_OP_UNUSED221 221
+#define DUK_OP_UNUSED222 222
+#define DUK_OP_UNUSED223 223
+#define DUK_OP_UNUSED224 224
+#define DUK_OP_UNUSED225 225
+#define DUK_OP_UNUSED226 226
+#define DUK_OP_UNUSED227 227
+#define DUK_OP_UNUSED228 228
+#define DUK_OP_UNUSED229 229
+#define DUK_OP_UNUSED230 230
+#define DUK_OP_UNUSED231 231
+#define DUK_OP_UNUSED232 232
+#define DUK_OP_UNUSED233 233
+#define DUK_OP_UNUSED234 234
+#define DUK_OP_UNUSED235 235
+#define DUK_OP_UNUSED236 236
+#define DUK_OP_UNUSED237 237
+#define DUK_OP_UNUSED238 238
+#define DUK_OP_UNUSED239 239
+#define DUK_OP_UNUSED240 240
+#define DUK_OP_UNUSED241 241
+#define DUK_OP_UNUSED242 242
+#define DUK_OP_UNUSED243 243
+#define DUK_OP_UNUSED244 244
+#define DUK_OP_UNUSED245 245
+#define DUK_OP_UNUSED246 246
+#define DUK_OP_UNUSED247 247
+#define DUK_OP_UNUSED248 248
+#define DUK_OP_UNUSED249 249
+#define DUK_OP_UNUSED250 250
+#define DUK_OP_UNUSED251 251
+#define DUK_OP_UNUSED252 252
+#define DUK_OP_UNUSED253 253
+#define DUK_OP_UNUSED254 254
+#define DUK_OP_UNUSED255 255
+#define DUK_OP_NONE 256 /* dummy value used as marker (doesn't fit in 8-bit field) */
/* XXX: Allocate flags from opcode field? Would take 16 opcode slots
* but avoids shuffling in more cases. Maybe not worth it.
*/
/* DUK_OP_TRYCATCH flags in A. */
-#define DUK_BC_TRYCATCH_FLAG_HAVE_CATCH (1U << 0)
-#define DUK_BC_TRYCATCH_FLAG_HAVE_FINALLY (1U << 1)
-#define DUK_BC_TRYCATCH_FLAG_CATCH_BINDING (1U << 2)
-#define DUK_BC_TRYCATCH_FLAG_WITH_BINDING (1U << 3)
+#define DUK_BC_TRYCATCH_FLAG_HAVE_CATCH (1U << 0)
+#define DUK_BC_TRYCATCH_FLAG_HAVE_FINALLY (1U << 1)
+#define DUK_BC_TRYCATCH_FLAG_CATCH_BINDING (1U << 2)
+#define DUK_BC_TRYCATCH_FLAG_WITH_BINDING (1U << 3)
/* DUK_OP_DECLVAR flags in A; bottom bits are reserved for propdesc flags
* (DUK_PROPDESC_FLAG_XXX).
*/
-#define DUK_BC_DECLVAR_FLAG_FUNC_DECL (1U << 4) /* function declaration */
+#define DUK_BC_DECLVAR_FLAG_FUNC_DECL (1U << 4) /* function declaration */
/* DUK_OP_CALLn flags, part of opcode field. Three lowest bits must match
* DUK_CALL_FLAG_xxx directly.
*/
-#define DUK_BC_CALL_FLAG_TAILCALL (1U << 0)
-#define DUK_BC_CALL_FLAG_CONSTRUCT (1U << 1)
-#define DUK_BC_CALL_FLAG_CALLED_AS_EVAL (1U << 2)
-#define DUK_BC_CALL_FLAG_INDIRECT (1U << 3)
+#define DUK_BC_CALL_FLAG_TAILCALL (1U << 0)
+#define DUK_BC_CALL_FLAG_CONSTRUCT (1U << 1)
+#define DUK_BC_CALL_FLAG_CALLED_AS_EVAL (1U << 2)
+#define DUK_BC_CALL_FLAG_INDIRECT (1U << 3)
/* Misc constants and helper macros. */
-#define DUK_BC_LDINT_BIAS (1L << 15)
-#define DUK_BC_LDINTX_SHIFT 16
-#define DUK_BC_JUMP_BIAS (1L << 23)
+#define DUK_BC_LDINT_BIAS (1L << 15)
+#define DUK_BC_LDINTX_SHIFT 16
+#define DUK_BC_JUMP_BIAS (1L << 23)
-#endif /* DUK_JS_BYTECODE_H_INCLUDED */
+#endif /* DUK_JS_BYTECODE_H_INCLUDED */
/* #include duk_lexer.h */
/*
* Lexer defines.
@@ -3658,156 +3827,156 @@ typedef void (*duk_re_range_callback)(void *user, duk_codepoint_t r1, duk_codepo
* in a continuous range and in a particular order. See genstrings.py.
*/
-#define DUK_LEXER_INITCTX(ctx) duk_lexer_initctx((ctx))
+#define DUK_LEXER_INITCTX(ctx) duk_lexer_initctx((ctx))
-#define DUK_LEXER_SETPOINT(ctx,pt) duk_lexer_setpoint((ctx), (pt))
+#define DUK_LEXER_SETPOINT(ctx, pt) duk_lexer_setpoint((ctx), (pt))
-#define DUK_LEXER_GETPOINT(ctx,pt) duk_lexer_getpoint((ctx), (pt))
+#define DUK_LEXER_GETPOINT(ctx, pt) duk_lexer_getpoint((ctx), (pt))
/* Currently 6 characters of lookup are actually needed (duk_lexer.c). */
-#define DUK_LEXER_WINDOW_SIZE 6
+#define DUK_LEXER_WINDOW_SIZE 6
#if defined(DUK_USE_LEXER_SLIDING_WINDOW)
-#define DUK_LEXER_BUFFER_SIZE 64
+#define DUK_LEXER_BUFFER_SIZE 64
#endif
-#define DUK_TOK_MINVAL 0
+#define DUK_TOK_MINVAL 0
/* returned after EOF (infinite amount) */
-#define DUK_TOK_EOF 0
+#define DUK_TOK_EOF 0
/* identifier names (E5 Section 7.6) */
-#define DUK_TOK_IDENTIFIER 1
+#define DUK_TOK_IDENTIFIER 1
/* reserved words: keywords */
-#define DUK_TOK_START_RESERVED 2
-#define DUK_TOK_BREAK 2
-#define DUK_TOK_CASE 3
-#define DUK_TOK_CATCH 4
-#define DUK_TOK_CONTINUE 5
-#define DUK_TOK_DEBUGGER 6
-#define DUK_TOK_DEFAULT 7
-#define DUK_TOK_DELETE 8
-#define DUK_TOK_DO 9
-#define DUK_TOK_ELSE 10
-#define DUK_TOK_FINALLY 11
-#define DUK_TOK_FOR 12
-#define DUK_TOK_FUNCTION 13
-#define DUK_TOK_IF 14
-#define DUK_TOK_IN 15
-#define DUK_TOK_INSTANCEOF 16
-#define DUK_TOK_NEW 17
-#define DUK_TOK_RETURN 18
-#define DUK_TOK_SWITCH 19
-#define DUK_TOK_THIS 20
-#define DUK_TOK_THROW 21
-#define DUK_TOK_TRY 22
-#define DUK_TOK_TYPEOF 23
-#define DUK_TOK_VAR 24
-#define DUK_TOK_CONST 25
-#define DUK_TOK_VOID 26
-#define DUK_TOK_WHILE 27
-#define DUK_TOK_WITH 28
+#define DUK_TOK_START_RESERVED 2
+#define DUK_TOK_BREAK 2
+#define DUK_TOK_CASE 3
+#define DUK_TOK_CATCH 4
+#define DUK_TOK_CONTINUE 5
+#define DUK_TOK_DEBUGGER 6
+#define DUK_TOK_DEFAULT 7
+#define DUK_TOK_DELETE 8
+#define DUK_TOK_DO 9
+#define DUK_TOK_ELSE 10
+#define DUK_TOK_FINALLY 11
+#define DUK_TOK_FOR 12
+#define DUK_TOK_FUNCTION 13
+#define DUK_TOK_IF 14
+#define DUK_TOK_IN 15
+#define DUK_TOK_INSTANCEOF 16
+#define DUK_TOK_NEW 17
+#define DUK_TOK_RETURN 18
+#define DUK_TOK_SWITCH 19
+#define DUK_TOK_THIS 20
+#define DUK_TOK_THROW 21
+#define DUK_TOK_TRY 22
+#define DUK_TOK_TYPEOF 23
+#define DUK_TOK_VAR 24
+#define DUK_TOK_CONST 25
+#define DUK_TOK_VOID 26
+#define DUK_TOK_WHILE 27
+#define DUK_TOK_WITH 28
/* reserved words: future reserved words */
-#define DUK_TOK_CLASS 29
-#define DUK_TOK_ENUM 30
-#define DUK_TOK_EXPORT 31
-#define DUK_TOK_EXTENDS 32
-#define DUK_TOK_IMPORT 33
-#define DUK_TOK_SUPER 34
+#define DUK_TOK_CLASS 29
+#define DUK_TOK_ENUM 30
+#define DUK_TOK_EXPORT 31
+#define DUK_TOK_EXTENDS 32
+#define DUK_TOK_IMPORT 33
+#define DUK_TOK_SUPER 34
/* "null", "true", and "false" are always reserved words.
* Note that "get" and "set" are not!
*/
-#define DUK_TOK_NULL 35
-#define DUK_TOK_TRUE 36
-#define DUK_TOK_FALSE 37
+#define DUK_TOK_NULL 35
+#define DUK_TOK_TRUE 36
+#define DUK_TOK_FALSE 37
/* reserved words: additional future reserved words in strict mode */
-#define DUK_TOK_START_STRICT_RESERVED 38 /* inclusive */
-#define DUK_TOK_IMPLEMENTS 38
-#define DUK_TOK_INTERFACE 39
-#define DUK_TOK_LET 40
-#define DUK_TOK_PACKAGE 41
-#define DUK_TOK_PRIVATE 42
-#define DUK_TOK_PROTECTED 43
-#define DUK_TOK_PUBLIC 44
-#define DUK_TOK_STATIC 45
-#define DUK_TOK_YIELD 46
-
-#define DUK_TOK_END_RESERVED 47 /* exclusive */
+#define DUK_TOK_START_STRICT_RESERVED 38 /* inclusive */
+#define DUK_TOK_IMPLEMENTS 38
+#define DUK_TOK_INTERFACE 39
+#define DUK_TOK_LET 40
+#define DUK_TOK_PACKAGE 41
+#define DUK_TOK_PRIVATE 42
+#define DUK_TOK_PROTECTED 43
+#define DUK_TOK_PUBLIC 44
+#define DUK_TOK_STATIC 45
+#define DUK_TOK_YIELD 46
+
+#define DUK_TOK_END_RESERVED 47 /* exclusive */
/* "get" and "set" are tokens but NOT ReservedWords. They are currently
* parsed and identifiers and these defines are actually now unused.
*/
-#define DUK_TOK_GET 47
-#define DUK_TOK_SET 48
+#define DUK_TOK_GET 47
+#define DUK_TOK_SET 48
/* punctuators (unlike the spec, also includes "/" and "/=") */
-#define DUK_TOK_LCURLY 49
-#define DUK_TOK_RCURLY 50
-#define DUK_TOK_LBRACKET 51
-#define DUK_TOK_RBRACKET 52
-#define DUK_TOK_LPAREN 53
-#define DUK_TOK_RPAREN 54
-#define DUK_TOK_PERIOD 55
-#define DUK_TOK_SEMICOLON 56
-#define DUK_TOK_COMMA 57
-#define DUK_TOK_LT 58
-#define DUK_TOK_GT 59
-#define DUK_TOK_LE 60
-#define DUK_TOK_GE 61
-#define DUK_TOK_EQ 62
-#define DUK_TOK_NEQ 63
-#define DUK_TOK_SEQ 64
-#define DUK_TOK_SNEQ 65
-#define DUK_TOK_ADD 66
-#define DUK_TOK_SUB 67
-#define DUK_TOK_MUL 68
-#define DUK_TOK_DIV 69
-#define DUK_TOK_MOD 70
-#define DUK_TOK_EXP 71
-#define DUK_TOK_INCREMENT 72
-#define DUK_TOK_DECREMENT 73
-#define DUK_TOK_ALSHIFT 74 /* named "arithmetic" because result is signed */
-#define DUK_TOK_ARSHIFT 75
-#define DUK_TOK_RSHIFT 76
-#define DUK_TOK_BAND 77
-#define DUK_TOK_BOR 78
-#define DUK_TOK_BXOR 79
-#define DUK_TOK_LNOT 80
-#define DUK_TOK_BNOT 81
-#define DUK_TOK_LAND 82
-#define DUK_TOK_LOR 83
-#define DUK_TOK_QUESTION 84
-#define DUK_TOK_COLON 85
-#define DUK_TOK_EQUALSIGN 86
-#define DUK_TOK_ADD_EQ 87
-#define DUK_TOK_SUB_EQ 88
-#define DUK_TOK_MUL_EQ 89
-#define DUK_TOK_DIV_EQ 90
-#define DUK_TOK_MOD_EQ 91
-#define DUK_TOK_EXP_EQ 92
-#define DUK_TOK_ALSHIFT_EQ 93
-#define DUK_TOK_ARSHIFT_EQ 94
-#define DUK_TOK_RSHIFT_EQ 95
-#define DUK_TOK_BAND_EQ 96
-#define DUK_TOK_BOR_EQ 97
-#define DUK_TOK_BXOR_EQ 98
+#define DUK_TOK_LCURLY 49
+#define DUK_TOK_RCURLY 50
+#define DUK_TOK_LBRACKET 51
+#define DUK_TOK_RBRACKET 52
+#define DUK_TOK_LPAREN 53
+#define DUK_TOK_RPAREN 54
+#define DUK_TOK_PERIOD 55
+#define DUK_TOK_SEMICOLON 56
+#define DUK_TOK_COMMA 57
+#define DUK_TOK_LT 58
+#define DUK_TOK_GT 59
+#define DUK_TOK_LE 60
+#define DUK_TOK_GE 61
+#define DUK_TOK_EQ 62
+#define DUK_TOK_NEQ 63
+#define DUK_TOK_SEQ 64
+#define DUK_TOK_SNEQ 65
+#define DUK_TOK_ADD 66
+#define DUK_TOK_SUB 67
+#define DUK_TOK_MUL 68
+#define DUK_TOK_DIV 69
+#define DUK_TOK_MOD 70
+#define DUK_TOK_EXP 71
+#define DUK_TOK_INCREMENT 72
+#define DUK_TOK_DECREMENT 73
+#define DUK_TOK_ALSHIFT 74 /* named "arithmetic" because result is signed */
+#define DUK_TOK_ARSHIFT 75
+#define DUK_TOK_RSHIFT 76
+#define DUK_TOK_BAND 77
+#define DUK_TOK_BOR 78
+#define DUK_TOK_BXOR 79
+#define DUK_TOK_LNOT 80
+#define DUK_TOK_BNOT 81
+#define DUK_TOK_LAND 82
+#define DUK_TOK_LOR 83
+#define DUK_TOK_QUESTION 84
+#define DUK_TOK_COLON 85
+#define DUK_TOK_EQUALSIGN 86
+#define DUK_TOK_ADD_EQ 87
+#define DUK_TOK_SUB_EQ 88
+#define DUK_TOK_MUL_EQ 89
+#define DUK_TOK_DIV_EQ 90
+#define DUK_TOK_MOD_EQ 91
+#define DUK_TOK_EXP_EQ 92
+#define DUK_TOK_ALSHIFT_EQ 93
+#define DUK_TOK_ARSHIFT_EQ 94
+#define DUK_TOK_RSHIFT_EQ 95
+#define DUK_TOK_BAND_EQ 96
+#define DUK_TOK_BOR_EQ 97
+#define DUK_TOK_BXOR_EQ 98
/* literals (E5 Section 7.8), except null, true, false, which are treated
* like reserved words (above).
*/
-#define DUK_TOK_NUMBER 99
-#define DUK_TOK_STRING 100
-#define DUK_TOK_REGEXP 101
+#define DUK_TOK_NUMBER 99
+#define DUK_TOK_STRING 100
+#define DUK_TOK_REGEXP 101
-#define DUK_TOK_MAXVAL 101 /* inclusive */
+#define DUK_TOK_MAXVAL 101 /* inclusive */
-#define DUK_TOK_INVALID DUK_SMALL_UINT_MAX
+#define DUK_TOK_INVALID DUK_SMALL_UINT_MAX
/* Convert heap string index to a token (reserved words) */
-#define DUK_STRIDX_TO_TOK(x) ((x) - DUK_STRIDX_START_RESERVED + DUK_TOK_START_RESERVED)
+#define DUK_STRIDX_TO_TOK(x) ((x) -DUK_STRIDX_START_RESERVED + DUK_TOK_START_RESERVED)
/* Sanity check */
#if (DUK_TOK_MAXVAL > 255)
@@ -3952,57 +4121,57 @@ typedef void (*duk_re_range_callback)(void *user, duk_codepoint_t r1, duk_codepo
#endif
/* Regexp tokens */
-#define DUK_RETOK_EOF 0
-#define DUK_RETOK_DISJUNCTION 1
-#define DUK_RETOK_QUANTIFIER 2
-#define DUK_RETOK_ASSERT_START 3
-#define DUK_RETOK_ASSERT_END 4
-#define DUK_RETOK_ASSERT_WORD_BOUNDARY 5
-#define DUK_RETOK_ASSERT_NOT_WORD_BOUNDARY 6
-#define DUK_RETOK_ASSERT_START_POS_LOOKAHEAD 7
-#define DUK_RETOK_ASSERT_START_NEG_LOOKAHEAD 8
-#define DUK_RETOK_ATOM_PERIOD 9
-#define DUK_RETOK_ATOM_CHAR 10
-#define DUK_RETOK_ATOM_DIGIT 11 /* assumptions in regexp compiler */
-#define DUK_RETOK_ATOM_NOT_DIGIT 12 /* -""- */
-#define DUK_RETOK_ATOM_WHITE 13 /* -""- */
-#define DUK_RETOK_ATOM_NOT_WHITE 14 /* -""- */
-#define DUK_RETOK_ATOM_WORD_CHAR 15 /* -""- */
-#define DUK_RETOK_ATOM_NOT_WORD_CHAR 16 /* -""- */
-#define DUK_RETOK_ATOM_BACKREFERENCE 17
-#define DUK_RETOK_ATOM_START_CAPTURE_GROUP 18
-#define DUK_RETOK_ATOM_START_NONCAPTURE_GROUP 19
-#define DUK_RETOK_ATOM_START_CHARCLASS 20
-#define DUK_RETOK_ATOM_START_CHARCLASS_INVERTED 21
-#define DUK_RETOK_ATOM_END_GROUP 22
+#define DUK_RETOK_EOF 0
+#define DUK_RETOK_DISJUNCTION 1
+#define DUK_RETOK_QUANTIFIER 2
+#define DUK_RETOK_ASSERT_START 3
+#define DUK_RETOK_ASSERT_END 4
+#define DUK_RETOK_ASSERT_WORD_BOUNDARY 5
+#define DUK_RETOK_ASSERT_NOT_WORD_BOUNDARY 6
+#define DUK_RETOK_ASSERT_START_POS_LOOKAHEAD 7
+#define DUK_RETOK_ASSERT_START_NEG_LOOKAHEAD 8
+#define DUK_RETOK_ATOM_PERIOD 9
+#define DUK_RETOK_ATOM_CHAR 10
+#define DUK_RETOK_ATOM_DIGIT 11 /* assumptions in regexp compiler */
+#define DUK_RETOK_ATOM_NOT_DIGIT 12 /* -""- */
+#define DUK_RETOK_ATOM_WHITE 13 /* -""- */
+#define DUK_RETOK_ATOM_NOT_WHITE 14 /* -""- */
+#define DUK_RETOK_ATOM_WORD_CHAR 15 /* -""- */
+#define DUK_RETOK_ATOM_NOT_WORD_CHAR 16 /* -""- */
+#define DUK_RETOK_ATOM_BACKREFERENCE 17
+#define DUK_RETOK_ATOM_START_CAPTURE_GROUP 18
+#define DUK_RETOK_ATOM_START_NONCAPTURE_GROUP 19
+#define DUK_RETOK_ATOM_START_CHARCLASS 20
+#define DUK_RETOK_ATOM_START_CHARCLASS_INVERTED 21
+#define DUK_RETOK_ATOM_END_GROUP 22
/* Constants for duk_lexer_ctx.buf. */
-#define DUK_LEXER_TEMP_BUF_LIMIT 256
+#define DUK_LEXER_TEMP_BUF_LIMIT 256
/* A token value. Can be memcpy()'d, but note that slot1/slot2 values are on the valstack.
* Some fields (like num, str1, str2) are only valid for specific token types and may have
* stale values otherwise.
*/
struct duk_token {
- duk_small_uint_t t; /* token type (with reserved word identification) */
- duk_small_uint_t t_nores; /* token type (with reserved words as DUK_TOK_IDENTIFER) */
- duk_double_t num; /* numeric value of token */
- duk_hstring *str1; /* string 1 of token (borrowed, stored to ctx->slot1_idx) */
- duk_hstring *str2; /* string 2 of token (borrowed, stored to ctx->slot2_idx) */
- duk_size_t start_offset; /* start byte offset of token in lexer input */
- duk_int_t start_line; /* start line of token (first char) */
- duk_int_t num_escapes; /* number of escapes and line continuations (for directive prologue) */
- duk_bool_t lineterm; /* token was preceded by a lineterm */
- duk_bool_t allow_auto_semi; /* token allows automatic semicolon insertion (eof or preceded by newline) */
+ duk_small_uint_t t; /* token type (with reserved word identification) */
+ duk_small_uint_t t_nores; /* token type (with reserved words as DUK_TOK_IDENTIFER) */
+ duk_double_t num; /* numeric value of token */
+ duk_hstring *str1; /* string 1 of token (borrowed, stored to ctx->slot1_idx) */
+ duk_hstring *str2; /* string 2 of token (borrowed, stored to ctx->slot2_idx) */
+ duk_size_t start_offset; /* start byte offset of token in lexer input */
+ duk_int_t start_line; /* start line of token (first char) */
+ duk_int_t num_escapes; /* number of escapes and line continuations (for directive prologue) */
+ duk_bool_t lineterm; /* token was preceded by a lineterm */
+ duk_bool_t allow_auto_semi; /* token allows automatic semicolon insertion (eof or preceded by newline) */
};
-#define DUK_RE_QUANTIFIER_INFINITE ((duk_uint32_t) 0xffffffffUL)
+#define DUK_RE_QUANTIFIER_INFINITE ((duk_uint32_t) 0xffffffffUL)
/* A regexp token value. */
struct duk_re_token {
- duk_small_uint_t t; /* token type */
+ duk_small_uint_t t; /* token type */
duk_small_uint_t greedy;
- duk_uint32_t num; /* numeric value (character, count) */
+ duk_uint32_t num; /* numeric value (character, count) */
duk_uint32_t qmin;
duk_uint32_t qmax;
};
@@ -4029,23 +4198,23 @@ struct duk_lexer_ctx {
duk_lexer_codepoint window[DUK_LEXER_WINDOW_SIZE]; /* unicode code points, window[0] is always next */
#endif
- duk_hthread *thr; /* thread; minimizes argument passing */
+ duk_hthread *thr; /* thread; minimizes argument passing */
- const duk_uint8_t *input; /* input string (may be a user pointer) */
- duk_size_t input_length; /* input byte length */
- duk_size_t input_offset; /* input offset for window leading edge (not window[0]) */
- duk_int_t input_line; /* input linenumber at input_offset (not window[0]), init to 1 */
+ const duk_uint8_t *input; /* input string (may be a user pointer) */
+ duk_size_t input_length; /* input byte length */
+ duk_size_t input_offset; /* input offset for window leading edge (not window[0]) */
+ duk_int_t input_line; /* input linenumber at input_offset (not window[0]), init to 1 */
- duk_idx_t slot1_idx; /* valstack slot for 1st token value */
- duk_idx_t slot2_idx; /* valstack slot for 2nd token value */
- duk_idx_t buf_idx; /* valstack slot for temp buffer */
- duk_hbuffer_dynamic *buf; /* temp accumulation buffer */
- duk_bufwriter_ctx bw; /* bufwriter for temp accumulation */
+ duk_idx_t slot1_idx; /* valstack slot for 1st token value */
+ duk_idx_t slot2_idx; /* valstack slot for 2nd token value */
+ duk_idx_t buf_idx; /* valstack slot for temp buffer */
+ duk_hbuffer_dynamic *buf; /* temp accumulation buffer */
+ duk_bufwriter_ctx bw; /* bufwriter for temp accumulation */
- duk_int_t token_count; /* number of tokens parsed */
- duk_int_t token_limit; /* maximum token count before error (sanity backstop) */
+ duk_int_t token_count; /* number of tokens parsed */
+ duk_int_t token_limit; /* maximum token count before error (sanity backstop) */
- duk_small_uint_t flags; /* lexer flags, use compiler flag defines for now */
+ duk_small_uint_t flags; /* lexer flags, use compiler flag defines for now */
};
/*
@@ -4058,16 +4227,13 @@ DUK_INTERNAL_DECL void duk_lexer_getpoint(duk_lexer_ctx *lex_ctx, duk_lexer_poin
DUK_INTERNAL_DECL void duk_lexer_setpoint(duk_lexer_ctx *lex_ctx, duk_lexer_point *pt);
DUK_INTERNAL_DECL
-void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
- duk_token *out_token,
- duk_bool_t strict_mode,
- duk_bool_t regexp_mode);
+void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx, duk_token *out_token, duk_bool_t strict_mode, duk_bool_t regexp_mode);
#if defined(DUK_USE_REGEXP_SUPPORT)
DUK_INTERNAL_DECL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token *out_token);
DUK_INTERNAL_DECL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range_callback gen_range, void *userdata);
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
-#endif /* DUK_LEXER_H_INCLUDED */
+#endif /* DUK_LEXER_H_INCLUDED */
/* #include duk_js_compiler.h */
/*
* ECMAScript compiler.
@@ -4077,13 +4243,13 @@ DUK_INTERNAL_DECL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_
#define DUK_JS_COMPILER_H_INCLUDED
/* ECMAScript compiler limits */
-#define DUK_COMPILER_TOKEN_LIMIT 100000000L /* 1e8: protects against deeply nested inner functions */
+#define DUK_COMPILER_TOKEN_LIMIT 100000000L /* 1e8: protects against deeply nested inner functions */
/* maximum loopcount for peephole optimization */
-#define DUK_COMPILER_PEEPHOLE_MAXITER 3
+#define DUK_COMPILER_PEEPHOLE_MAXITER 3
/* maximum bytecode length in instructions */
-#define DUK_COMPILER_MAX_BYTECODE_LENGTH (256L * 1024L * 1024L) /* 1 GB */
+#define DUK_COMPILER_MAX_BYTECODE_LENGTH (256L * 1024L * 1024L) /* 1 GB */
/*
* Compiler intermediate values
@@ -4093,21 +4259,21 @@ DUK_INTERNAL_DECL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_
* either a left-hand-side or right-hand-side role (e.g. object property).
*/
-#define DUK_IVAL_NONE 0 /* no value */
-#define DUK_IVAL_PLAIN 1 /* register, constant, or value */
-#define DUK_IVAL_ARITH 2 /* binary arithmetic; DUK_OP_ADD, DUK_OP_EQ, other binary ops */
-#define DUK_IVAL_PROP 3 /* property access */
-#define DUK_IVAL_VAR 4 /* variable access */
+#define DUK_IVAL_NONE 0 /* no value */
+#define DUK_IVAL_PLAIN 1 /* register, constant, or value */
+#define DUK_IVAL_ARITH 2 /* binary arithmetic; DUK_OP_ADD, DUK_OP_EQ, other binary ops */
+#define DUK_IVAL_PROP 3 /* property access */
+#define DUK_IVAL_VAR 4 /* variable access */
-#define DUK_ISPEC_NONE 0 /* no value */
-#define DUK_ISPEC_VALUE 1 /* value resides in 'valstack_idx' */
-#define DUK_ISPEC_REGCONST 2 /* value resides in a register or constant */
+#define DUK_ISPEC_NONE 0 /* no value */
+#define DUK_ISPEC_VALUE 1 /* value resides in 'valstack_idx' */
+#define DUK_ISPEC_REGCONST 2 /* value resides in a register or constant */
/* Bit mask which indicates that a regconst is a constant instead of a register.
* Chosen so that when a regconst is cast to duk_int32_t, all consts are
* negative values.
*/
-#define DUK_REGCONST_CONST_MARKER DUK_INT32_MIN /* = -0x80000000 */
+#define DUK_REGCONST_CONST_MARKER DUK_INT32_MIN /* = -0x80000000 */
/* Type to represent a reg/const reference during compilation, with <0
* indicating a constant. Some call sites also use -1 to indicate 'none'.
@@ -4115,9 +4281,9 @@ DUK_INTERNAL_DECL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_
typedef duk_int32_t duk_regconst_t;
typedef struct {
- duk_small_uint_t t; /* DUK_ISPEC_XXX */
+ duk_small_uint_t t; /* DUK_ISPEC_XXX */
duk_regconst_t regconst;
- duk_idx_t valstack_idx; /* always set; points to a reserved valstack slot */
+ duk_idx_t valstack_idx; /* always set; points to a reserved valstack slot */
} duk_ispec;
typedef struct {
@@ -4129,8 +4295,8 @@ typedef struct {
*/
/* XXX: can be optimized for smaller footprint esp. on 32-bit environments */
- duk_small_uint_t t; /* DUK_IVAL_XXX */
- duk_small_uint_t op; /* bytecode opcode for binary ops */
+ duk_small_uint_t t; /* DUK_IVAL_XXX */
+ duk_small_uint_t op; /* bytecode opcode for binary ops */
duk_ispec x1;
duk_ispec x2;
} duk_ivalue;
@@ -4152,22 +4318,22 @@ struct duk_compiler_instr {
* Compiler state
*/
-#define DUK_LABEL_FLAG_ALLOW_BREAK (1U << 0)
-#define DUK_LABEL_FLAG_ALLOW_CONTINUE (1U << 1)
+#define DUK_LABEL_FLAG_ALLOW_BREAK (1U << 0)
+#define DUK_LABEL_FLAG_ALLOW_CONTINUE (1U << 1)
-#define DUK_DECL_TYPE_VAR 0
-#define DUK_DECL_TYPE_FUNC 1
+#define DUK_DECL_TYPE_VAR 0
+#define DUK_DECL_TYPE_FUNC 1
/* XXX: optimize to 16 bytes */
typedef struct {
duk_small_uint_t flags;
- duk_int_t label_id; /* numeric label_id (-1 reserved as marker) */
- duk_hstring *h_label; /* borrowed label name */
- duk_int_t catch_depth; /* catch depth at point of definition */
- duk_int_t pc_label; /* pc of label statement:
- * pc+1: break jump site
- * pc+2: continue jump site
- */
+ duk_int_t label_id; /* numeric label_id (-1 reserved as marker) */
+ duk_hstring *h_label; /* borrowed label name */
+ duk_int_t catch_depth; /* catch depth at point of definition */
+ duk_int_t pc_label; /* pc of label statement:
+ * pc+1: break jump site
+ * pc+2: continue jump site
+ */
/* Fast jumps (which avoid longjmp) jump directly to the jump sites
* which are always known even while the iteration/switch statement
@@ -4183,22 +4349,22 @@ struct duk_compiler_func {
* platforms (e.g. if int is 32 bits and pointers are 64 bits).
*/
- duk_bufwriter_ctx bw_code; /* bufwriter for code */
+ duk_bufwriter_ctx bw_code; /* bufwriter for code */
- duk_hstring *h_name; /* function name (borrowed reference), ends up in _name */
+ duk_hstring *h_name; /* function name (borrowed reference), ends up in _name */
/* h_code: held in bw_code */
- duk_hobject *h_consts; /* array */
- duk_hobject *h_funcs; /* array of function templates: [func1, offset1, line1, func2, offset2, line2]
- * offset/line points to closing brace to allow skipping on pass 2
- */
- duk_hobject *h_decls; /* array of declarations: [ name1, val1, name2, val2, ... ]
- * valN = (typeN) | (fnum << 8), where fnum is inner func number (0 for vars)
- * record function and variable declarations in pass 1
- */
- duk_hobject *h_labelnames; /* array of active label names */
- duk_hbuffer_dynamic *h_labelinfos; /* C array of duk_labelinfo */
- duk_hobject *h_argnames; /* array of formal argument names (-> _Formals) */
- duk_hobject *h_varmap; /* variable map for pass 2 (identifier -> register number or null (unmapped)) */
+ duk_hobject *h_consts; /* array */
+ duk_hobject *h_funcs; /* array of function templates: [func1, offset1, line1, func2, offset2, line2]
+ * offset/line points to closing brace to allow skipping on pass 2
+ */
+ duk_hobject *h_decls; /* array of declarations: [ name1, val1, name2, val2, ... ]
+ * valN = (typeN) | (fnum << 8), where fnum is inner func number (0 for vars)
+ * record function and variable declarations in pass 1
+ */
+ duk_hobject *h_labelnames; /* array of active label names */
+ duk_hbuffer_dynamic *h_labelinfos; /* C array of duk_labelinfo */
+ duk_hobject *h_argnames; /* array of formal argument names (-> _Formals) */
+ duk_hobject *h_varmap; /* variable map for pass 2 (identifier -> register number or null (unmapped)) */
/* Value stack indices for tracking objects. */
/* code_idx: not needed */
@@ -4211,9 +4377,9 @@ struct duk_compiler_func {
duk_idx_t varmap_idx;
/* Temp reg handling. */
- duk_regconst_t temp_first; /* first register that is a temporary (below: variables) */
- duk_regconst_t temp_next; /* next temporary register to allocate */
- duk_regconst_t temp_max; /* highest value of temp_reg (temp_max - 1 is highest used reg) */
+ duk_regconst_t temp_first; /* first register that is a temporary (below: variables) */
+ duk_regconst_t temp_next; /* next temporary register to allocate */
+ duk_regconst_t temp_max; /* highest value of temp_reg (temp_max - 1 is highest used reg) */
/* Shuffle registers if large number of regs/consts. */
duk_regconst_t shuffle1;
@@ -4223,49 +4389,51 @@ struct duk_compiler_func {
/* Stats for current expression being parsed. */
duk_int_t nud_count;
duk_int_t led_count;
- duk_int_t paren_level; /* parenthesis count, 0 = top level */
- duk_bool_t expr_lhs; /* expression is left-hand-side compatible */
- duk_bool_t allow_in; /* current paren level allows 'in' token */
+ duk_int_t paren_level; /* parenthesis count, 0 = top level */
+ duk_bool_t expr_lhs; /* expression is left-hand-side compatible */
+ duk_bool_t allow_in; /* current paren level allows 'in' token */
/* Misc. */
- duk_int_t stmt_next; /* statement id allocation (running counter) */
- duk_int_t label_next; /* label id allocation (running counter) */
- duk_int_t catch_depth; /* catch stack depth */
- duk_int_t with_depth; /* with stack depth (affects identifier lookups) */
- duk_int_t fnum_next; /* inner function numbering */
- duk_int_t num_formals; /* number of formal arguments */
- duk_regconst_t reg_stmt_value; /* register for writing value of 'non-empty' statements (global or eval code), -1 is marker */
+ duk_int_t stmt_next; /* statement id allocation (running counter) */
+ duk_int_t label_next; /* label id allocation (running counter) */
+ duk_int_t catch_depth; /* catch stack depth */
+ duk_int_t with_depth; /* with stack depth (affects identifier lookups) */
+ duk_int_t fnum_next; /* inner function numbering */
+ duk_int_t num_formals; /* number of formal arguments */
+ duk_regconst_t
+ reg_stmt_value; /* register for writing value of 'non-empty' statements (global or eval code), -1 is marker */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
- duk_int_t min_line; /* XXX: typing (duk_hcompfunc has duk_uint32_t) */
+ duk_int_t min_line; /* XXX: typing (duk_hcompfunc has duk_uint32_t) */
duk_int_t max_line;
#endif
/* Status booleans. */
- duk_uint8_t is_function; /* is an actual function (not global/eval code) */
- duk_uint8_t is_eval; /* is eval code */
- duk_uint8_t is_global; /* is global code */
- duk_uint8_t is_namebinding; /* needs a name binding */
- duk_uint8_t is_constructable; /* result is constructable */
- duk_uint8_t is_setget; /* is a setter/getter */
- duk_uint8_t is_strict; /* function is strict */
- duk_uint8_t is_notail; /* function must not be tail called */
- duk_uint8_t in_directive_prologue; /* parsing in "directive prologue", recognize directives */
- duk_uint8_t in_scanning; /* parsing in "scanning" phase (first pass) */
- duk_uint8_t may_direct_eval; /* function may call direct eval */
- duk_uint8_t id_access_arguments; /* function refers to 'arguments' identifier */
- duk_uint8_t id_access_slow; /* function makes one or more slow path accesses that won't match own static variables */
- duk_uint8_t id_access_slow_own; /* function makes one or more slow path accesses that may match own static variables */
- duk_uint8_t is_arguments_shadowed; /* argument/function declaration shadows 'arguments' */
- duk_uint8_t needs_shuffle; /* function needs shuffle registers */
- duk_uint8_t reject_regexp_in_adv; /* reject RegExp literal on next advance() call; needed for handling IdentifierName productions */
- duk_uint8_t allow_regexp_in_adv; /* allow RegExp literal on next advance() call */
+ duk_uint8_t is_function; /* is an actual function (not global/eval code) */
+ duk_uint8_t is_eval; /* is eval code */
+ duk_uint8_t is_global; /* is global code */
+ duk_uint8_t is_namebinding; /* needs a name binding */
+ duk_uint8_t is_constructable; /* result is constructable */
+ duk_uint8_t is_setget; /* is a setter/getter */
+ duk_uint8_t is_strict; /* function is strict */
+ duk_uint8_t is_notail; /* function must not be tail called */
+ duk_uint8_t in_directive_prologue; /* parsing in "directive prologue", recognize directives */
+ duk_uint8_t in_scanning; /* parsing in "scanning" phase (first pass) */
+ duk_uint8_t may_direct_eval; /* function may call direct eval */
+ duk_uint8_t id_access_arguments; /* function refers to 'arguments' identifier */
+ duk_uint8_t id_access_slow; /* function makes one or more slow path accesses that won't match own static variables */
+ duk_uint8_t id_access_slow_own; /* function makes one or more slow path accesses that may match own static variables */
+ duk_uint8_t is_arguments_shadowed; /* argument/function declaration shadows 'arguments' */
+ duk_uint8_t needs_shuffle; /* function needs shuffle registers */
+ duk_uint8_t
+ reject_regexp_in_adv; /* reject RegExp literal on next advance() call; needed for handling IdentifierName productions */
+ duk_uint8_t allow_regexp_in_adv; /* allow RegExp literal on next advance() call */
};
struct duk_compiler_ctx {
duk_hthread *thr;
/* filename being compiled (ends up in functions' '_filename' property) */
- duk_hstring *h_filename; /* borrowed reference */
+ duk_hstring *h_filename; /* borrowed reference */
/* lexing (tokenization) state (contains two valstack slot indices) */
duk_lexer_ctx lex;
@@ -4273,10 +4441,10 @@ struct duk_compiler_ctx {
/* current and previous token for parsing */
duk_token prev_token;
duk_token curr_token;
- duk_idx_t tok11_idx; /* curr_token slot1 (matches 'lex' slot1_idx) */
- duk_idx_t tok12_idx; /* curr_token slot2 (matches 'lex' slot2_idx) */
- duk_idx_t tok21_idx; /* prev_token slot1 */
- duk_idx_t tok22_idx; /* prev_token slot2 */
+ duk_idx_t tok11_idx; /* curr_token slot1 (matches 'lex' slot1_idx) */
+ duk_idx_t tok12_idx; /* curr_token slot2 (matches 'lex' slot2_idx) */
+ duk_idx_t tok21_idx; /* prev_token slot1 */
+ duk_idx_t tok22_idx; /* prev_token slot2 */
/* recursion limit */
duk_int_t recursion_depth;
@@ -4293,9 +4461,12 @@ struct duk_compiler_ctx {
* Prototypes
*/
-DUK_INTERNAL_DECL void duk_js_compile(duk_hthread *thr, const duk_uint8_t *src_buffer, duk_size_t src_length, duk_small_uint_t flags);
+DUK_INTERNAL_DECL void duk_js_compile(duk_hthread *thr,
+ const duk_uint8_t *src_buffer,
+ duk_size_t src_length,
+ duk_small_uint_t flags);
-#endif /* DUK_JS_COMPILER_H_INCLUDED */
+#endif /* DUK_JS_COMPILER_H_INCLUDED */
/* #include duk_regexp.h */
/*
* Regular expression structs, constants, and bytecode defines.
@@ -4305,39 +4476,39 @@ DUK_INTERNAL_DECL void duk_js_compile(duk_hthread *thr, const duk_uint8_t *src_b
#define DUK_REGEXP_H_INCLUDED
/* maximum bytecode copies for {n,m} quantifiers */
-#define DUK_RE_MAX_ATOM_COPIES 1000
+#define DUK_RE_MAX_ATOM_COPIES 1000
/* regexp compilation limits */
-#define DUK_RE_COMPILE_TOKEN_LIMIT 100000000L /* 1e8 */
+#define DUK_RE_COMPILE_TOKEN_LIMIT 100000000L /* 1e8 */
/* regexp execution limits */
-#define DUK_RE_EXECUTE_STEPS_LIMIT 1000000000L /* 1e9 */
+#define DUK_RE_EXECUTE_STEPS_LIMIT 1000000000L /* 1e9 */
/* regexp opcodes */
-#define DUK_REOP_MATCH 1
-#define DUK_REOP_CHAR 2
-#define DUK_REOP_PERIOD 3
-#define DUK_REOP_RANGES 4
-#define DUK_REOP_INVRANGES 5
-#define DUK_REOP_JUMP 6
-#define DUK_REOP_SPLIT1 7
-#define DUK_REOP_SPLIT2 8
-#define DUK_REOP_SQMINIMAL 9
-#define DUK_REOP_SQGREEDY 10
-#define DUK_REOP_SAVE 11
-#define DUK_REOP_WIPERANGE 12
-#define DUK_REOP_LOOKPOS 13
-#define DUK_REOP_LOOKNEG 14
-#define DUK_REOP_BACKREFERENCE 15
-#define DUK_REOP_ASSERT_START 16
-#define DUK_REOP_ASSERT_END 17
-#define DUK_REOP_ASSERT_WORD_BOUNDARY 18
-#define DUK_REOP_ASSERT_NOT_WORD_BOUNDARY 19
+#define DUK_REOP_MATCH 1
+#define DUK_REOP_CHAR 2
+#define DUK_REOP_PERIOD 3
+#define DUK_REOP_RANGES 4
+#define DUK_REOP_INVRANGES 5
+#define DUK_REOP_JUMP 6
+#define DUK_REOP_SPLIT1 7
+#define DUK_REOP_SPLIT2 8
+#define DUK_REOP_SQMINIMAL 9
+#define DUK_REOP_SQGREEDY 10
+#define DUK_REOP_SAVE 11
+#define DUK_REOP_WIPERANGE 12
+#define DUK_REOP_LOOKPOS 13
+#define DUK_REOP_LOOKNEG 14
+#define DUK_REOP_BACKREFERENCE 15
+#define DUK_REOP_ASSERT_START 16
+#define DUK_REOP_ASSERT_END 17
+#define DUK_REOP_ASSERT_WORD_BOUNDARY 18
+#define DUK_REOP_ASSERT_NOT_WORD_BOUNDARY 19
/* flags */
-#define DUK_RE_FLAG_GLOBAL (1U << 0)
-#define DUK_RE_FLAG_IGNORE_CASE (1U << 1)
-#define DUK_RE_FLAG_MULTILINE (1U << 2)
+#define DUK_RE_FLAG_GLOBAL (1U << 0)
+#define DUK_RE_FLAG_IGNORE_CASE (1U << 1)
+#define DUK_RE_FLAG_MULTILINE (1U << 2)
struct duk_re_matcher_ctx {
duk_hthread *thr;
@@ -4347,7 +4518,7 @@ struct duk_re_matcher_ctx {
const duk_uint8_t *input_end;
const duk_uint8_t *bytecode;
const duk_uint8_t *bytecode_end;
- const duk_uint8_t **saved; /* allocated from valstack (fixed buffer) */
+ const duk_uint8_t **saved; /* allocated from valstack (fixed buffer) */
duk_uint32_t nsaved;
duk_uint32_t recursion_depth;
duk_uint32_t recursion_limit;
@@ -4362,11 +4533,11 @@ struct duk_re_compiler_ctx {
duk_lexer_ctx lex;
duk_re_token curr_token;
duk_bufwriter_ctx bw;
- duk_uint32_t captures; /* highest capture number emitted so far (used as: ++captures) */
+ duk_uint32_t captures; /* highest capture number emitted so far (used as: ++captures) */
duk_uint32_t highest_backref;
duk_uint32_t recursion_depth;
duk_uint32_t recursion_limit;
- duk_uint32_t nranges; /* internal temporary value, used for char classes */
+ duk_uint32_t nranges; /* internal temporary value, used for char classes */
};
/*
@@ -4377,10 +4548,10 @@ struct duk_re_compiler_ctx {
DUK_INTERNAL_DECL void duk_regexp_compile(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_regexp_create_instance(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_regexp_match(duk_hthread *thr);
-DUK_INTERNAL_DECL void duk_regexp_match_force_global(duk_hthread *thr); /* hacky helper for String.prototype.split() */
+DUK_INTERNAL_DECL void duk_regexp_match_force_global(duk_hthread *thr); /* hacky helper for String.prototype.split() */
#endif
-#endif /* DUK_REGEXP_H_INCLUDED */
+#endif /* DUK_REGEXP_H_INCLUDED */
/* #include duk_heaphdr.h */
/*
* Heap header definition and assorted macros, including ref counting.
@@ -4433,7 +4604,7 @@ struct duk_heaphdr {
#else
duk_size_t h_refcount;
#endif
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
#if defined(DUK_USE_HEAPPTR16)
duk_uint16_t h_next16;
@@ -4481,7 +4652,7 @@ struct duk_heaphdr_string {
#endif
#if defined(DUK_USE_REFCOUNT16)
duk_uint16_t h_refcount;
- duk_uint16_t h_strextra16; /* round out to 8 bytes */
+ duk_uint16_t h_strextra16; /* round out to 8 bytes */
#elif defined(DUK_USE_REFCOUNT32)
duk_uint32_t h_refcount;
#else
@@ -4489,160 +4660,169 @@ struct duk_heaphdr_string {
#endif
#else
duk_uint16_t h_strextra16;
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
duk_hstring *h_next;
/* No 'h_prev' pointer for strings. */
};
-#define DUK_HEAPHDR_FLAGS_TYPE_MASK 0x00000003UL
-#define DUK_HEAPHDR_FLAGS_FLAG_MASK (~DUK_HEAPHDR_FLAGS_TYPE_MASK)
+#define DUK_HEAPHDR_FLAGS_TYPE_MASK 0x00000003UL
+#define DUK_HEAPHDR_FLAGS_FLAG_MASK (~DUK_HEAPHDR_FLAGS_TYPE_MASK)
- /* 2 bits for heap type */
-#define DUK_HEAPHDR_FLAGS_HEAP_START 2 /* 5 heap flags */
-#define DUK_HEAPHDR_FLAGS_USER_START 7 /* 25 user flags */
+/* 2 bits for heap type */
+#define DUK_HEAPHDR_FLAGS_HEAP_START 2 /* 5 heap flags */
+#define DUK_HEAPHDR_FLAGS_USER_START 7 /* 25 user flags */
-#define DUK_HEAPHDR_HEAP_FLAG_NUMBER(n) (DUK_HEAPHDR_FLAGS_HEAP_START + (n))
-#define DUK_HEAPHDR_USER_FLAG_NUMBER(n) (DUK_HEAPHDR_FLAGS_USER_START + (n))
-#define DUK_HEAPHDR_HEAP_FLAG(n) (1UL << (DUK_HEAPHDR_FLAGS_HEAP_START + (n)))
-#define DUK_HEAPHDR_USER_FLAG(n) (1UL << (DUK_HEAPHDR_FLAGS_USER_START + (n)))
+#define DUK_HEAPHDR_HEAP_FLAG_NUMBER(n) (DUK_HEAPHDR_FLAGS_HEAP_START + (n))
+#define DUK_HEAPHDR_USER_FLAG_NUMBER(n) (DUK_HEAPHDR_FLAGS_USER_START + (n))
+#define DUK_HEAPHDR_HEAP_FLAG(n) (1UL << (DUK_HEAPHDR_FLAGS_HEAP_START + (n)))
+#define DUK_HEAPHDR_USER_FLAG(n) (1UL << (DUK_HEAPHDR_FLAGS_USER_START + (n)))
-#define DUK_HEAPHDR_FLAG_REACHABLE DUK_HEAPHDR_HEAP_FLAG(0) /* mark-and-sweep: reachable */
-#define DUK_HEAPHDR_FLAG_TEMPROOT DUK_HEAPHDR_HEAP_FLAG(1) /* mark-and-sweep: children not processed */
-#define DUK_HEAPHDR_FLAG_FINALIZABLE DUK_HEAPHDR_HEAP_FLAG(2) /* mark-and-sweep: finalizable (on current pass) */
-#define DUK_HEAPHDR_FLAG_FINALIZED DUK_HEAPHDR_HEAP_FLAG(3) /* mark-and-sweep: finalized (on previous pass) */
-#define DUK_HEAPHDR_FLAG_READONLY DUK_HEAPHDR_HEAP_FLAG(4) /* read-only object, in code section */
+#define DUK_HEAPHDR_FLAG_REACHABLE DUK_HEAPHDR_HEAP_FLAG(0) /* mark-and-sweep: reachable */
+#define DUK_HEAPHDR_FLAG_TEMPROOT DUK_HEAPHDR_HEAP_FLAG(1) /* mark-and-sweep: children not processed */
+#define DUK_HEAPHDR_FLAG_FINALIZABLE DUK_HEAPHDR_HEAP_FLAG(2) /* mark-and-sweep: finalizable (on current pass) */
+#define DUK_HEAPHDR_FLAG_FINALIZED DUK_HEAPHDR_HEAP_FLAG(3) /* mark-and-sweep: finalized (on previous pass) */
+#define DUK_HEAPHDR_FLAG_READONLY DUK_HEAPHDR_HEAP_FLAG(4) /* read-only object, in code section */
-#define DUK_HTYPE_MIN 0
-#define DUK_HTYPE_STRING 0
-#define DUK_HTYPE_OBJECT 1
-#define DUK_HTYPE_BUFFER 2
-#define DUK_HTYPE_MAX 2
+#define DUK_HTYPE_MIN 0
+#define DUK_HTYPE_STRING 0
+#define DUK_HTYPE_OBJECT 1
+#define DUK_HTYPE_BUFFER 2
+#define DUK_HTYPE_MAX 2
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HEAPHDR_GET_NEXT(heap,h) \
- ((duk_heaphdr *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->h_next16))
-#define DUK_HEAPHDR_SET_NEXT(heap,h,val) do { \
+#define DUK_HEAPHDR_GET_NEXT(heap, h) ((duk_heaphdr *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->h_next16))
+#define DUK_HEAPHDR_SET_NEXT(heap, h, val) \
+ do { \
(h)->h_next16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) val); \
} while (0)
#else
-#define DUK_HEAPHDR_GET_NEXT(heap,h) ((h)->h_next)
-#define DUK_HEAPHDR_SET_NEXT(heap,h,val) do { \
+#define DUK_HEAPHDR_GET_NEXT(heap, h) ((h)->h_next)
+#define DUK_HEAPHDR_SET_NEXT(heap, h, val) \
+ do { \
(h)->h_next = (val); \
} while (0)
#endif
#if defined(DUK_USE_DOUBLE_LINKED_HEAP)
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HEAPHDR_GET_PREV(heap,h) \
- ((duk_heaphdr *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->h_prev16))
-#define DUK_HEAPHDR_SET_PREV(heap,h,val) do { \
+#define DUK_HEAPHDR_GET_PREV(heap, h) ((duk_heaphdr *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->h_prev16))
+#define DUK_HEAPHDR_SET_PREV(heap, h, val) \
+ do { \
(h)->h_prev16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (val)); \
} while (0)
#else
-#define DUK_HEAPHDR_GET_PREV(heap,h) ((h)->h_prev)
-#define DUK_HEAPHDR_SET_PREV(heap,h,val) do { \
+#define DUK_HEAPHDR_GET_PREV(heap, h) ((h)->h_prev)
+#define DUK_HEAPHDR_SET_PREV(heap, h, val) \
+ do { \
(h)->h_prev = (val); \
} while (0)
#endif
#endif
#if defined(DUK_USE_REFERENCE_COUNTING)
-#define DUK_HEAPHDR_GET_REFCOUNT(h) ((h)->h_refcount)
-#define DUK_HEAPHDR_SET_REFCOUNT(h,val) do { \
+#define DUK_HEAPHDR_GET_REFCOUNT(h) ((h)->h_refcount)
+#define DUK_HEAPHDR_SET_REFCOUNT(h, val) \
+ do { \
(h)->h_refcount = (val); \
- DUK_ASSERT((h)->h_refcount == (val)); /* No truncation. */ \
+ DUK_ASSERT((h)->h_refcount == (val)); /* No truncation. */ \
} while (0)
-#define DUK_HEAPHDR_PREINC_REFCOUNT(h) (++(h)->h_refcount) /* result: updated refcount */
-#define DUK_HEAPHDR_PREDEC_REFCOUNT(h) (--(h)->h_refcount) /* result: updated refcount */
+#define DUK_HEAPHDR_PREINC_REFCOUNT(h) (++(h)->h_refcount) /* result: updated refcount */
+#define DUK_HEAPHDR_PREDEC_REFCOUNT(h) (--(h)->h_refcount) /* result: updated refcount */
#else
/* refcount macros not defined without refcounting, caller must #if defined() now */
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
/*
* Note: type is treated as a field separate from flags, so some masking is
* involved in the macros below.
*/
-#define DUK_HEAPHDR_GET_FLAGS_RAW(h) ((h)->h_flags)
-#define DUK_HEAPHDR_SET_FLAGS_RAW(h,val) do { \
- (h)->h_flags = (val); } \
+#define DUK_HEAPHDR_GET_FLAGS_RAW(h) ((h)->h_flags)
+#define DUK_HEAPHDR_SET_FLAGS_RAW(h, val) \
+ do { \
+ (h)->h_flags = (val); \
+ } \
}
-#define DUK_HEAPHDR_GET_FLAGS(h) ((h)->h_flags & DUK_HEAPHDR_FLAGS_FLAG_MASK)
-#define DUK_HEAPHDR_SET_FLAGS(h,val) do { \
+#define DUK_HEAPHDR_GET_FLAGS(h) ((h)->h_flags & DUK_HEAPHDR_FLAGS_FLAG_MASK)
+#define DUK_HEAPHDR_SET_FLAGS(h, val) \
+ do { \
(h)->h_flags = ((h)->h_flags & ~(DUK_HEAPHDR_FLAGS_FLAG_MASK)) | (val); \
} while (0)
-#define DUK_HEAPHDR_GET_TYPE(h) ((h)->h_flags & DUK_HEAPHDR_FLAGS_TYPE_MASK)
-#define DUK_HEAPHDR_SET_TYPE(h,val) do { \
+#define DUK_HEAPHDR_GET_TYPE(h) ((h)->h_flags & DUK_HEAPHDR_FLAGS_TYPE_MASK)
+#define DUK_HEAPHDR_SET_TYPE(h, val) \
+ do { \
(h)->h_flags = ((h)->h_flags & ~(DUK_HEAPHDR_FLAGS_TYPE_MASK)) | (val); \
} while (0)
/* Comparison for type >= DUK_HTYPE_MIN skipped; because DUK_HTYPE_MIN is zero
* and the comparison is unsigned, it's always true and generates warnings.
*/
-#define DUK_HEAPHDR_HTYPE_VALID(h) ( \
- DUK_HEAPHDR_GET_TYPE((h)) <= DUK_HTYPE_MAX \
- )
+#define DUK_HEAPHDR_HTYPE_VALID(h) (DUK_HEAPHDR_GET_TYPE((h)) <= DUK_HTYPE_MAX)
-#define DUK_HEAPHDR_SET_TYPE_AND_FLAGS(h,tval,fval) do { \
- (h)->h_flags = ((tval) & DUK_HEAPHDR_FLAGS_TYPE_MASK) | \
- ((fval) & DUK_HEAPHDR_FLAGS_FLAG_MASK); \
+#define DUK_HEAPHDR_SET_TYPE_AND_FLAGS(h, tval, fval) \
+ do { \
+ (h)->h_flags = ((tval) &DUK_HEAPHDR_FLAGS_TYPE_MASK) | ((fval) &DUK_HEAPHDR_FLAGS_FLAG_MASK); \
} while (0)
-#define DUK_HEAPHDR_SET_FLAG_BITS(h,bits) do { \
+#define DUK_HEAPHDR_SET_FLAG_BITS(h, bits) \
+ do { \
DUK_ASSERT(((bits) & ~(DUK_HEAPHDR_FLAGS_FLAG_MASK)) == 0); \
(h)->h_flags |= (bits); \
} while (0)
-#define DUK_HEAPHDR_CLEAR_FLAG_BITS(h,bits) do { \
+#define DUK_HEAPHDR_CLEAR_FLAG_BITS(h, bits) \
+ do { \
DUK_ASSERT(((bits) & ~(DUK_HEAPHDR_FLAGS_FLAG_MASK)) == 0); \
(h)->h_flags &= ~((bits)); \
} while (0)
-#define DUK_HEAPHDR_CHECK_FLAG_BITS(h,bits) (((h)->h_flags & (bits)) != 0)
+#define DUK_HEAPHDR_CHECK_FLAG_BITS(h, bits) (((h)->h_flags & (bits)) != 0)
-#define DUK_HEAPHDR_SET_REACHABLE(h) DUK_HEAPHDR_SET_FLAG_BITS((h),DUK_HEAPHDR_FLAG_REACHABLE)
-#define DUK_HEAPHDR_CLEAR_REACHABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h),DUK_HEAPHDR_FLAG_REACHABLE)
-#define DUK_HEAPHDR_HAS_REACHABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h),DUK_HEAPHDR_FLAG_REACHABLE)
+#define DUK_HEAPHDR_SET_REACHABLE(h) DUK_HEAPHDR_SET_FLAG_BITS((h), DUK_HEAPHDR_FLAG_REACHABLE)
+#define DUK_HEAPHDR_CLEAR_REACHABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h), DUK_HEAPHDR_FLAG_REACHABLE)
+#define DUK_HEAPHDR_HAS_REACHABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h), DUK_HEAPHDR_FLAG_REACHABLE)
-#define DUK_HEAPHDR_SET_TEMPROOT(h) DUK_HEAPHDR_SET_FLAG_BITS((h),DUK_HEAPHDR_FLAG_TEMPROOT)
-#define DUK_HEAPHDR_CLEAR_TEMPROOT(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h),DUK_HEAPHDR_FLAG_TEMPROOT)
-#define DUK_HEAPHDR_HAS_TEMPROOT(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h),DUK_HEAPHDR_FLAG_TEMPROOT)
+#define DUK_HEAPHDR_SET_TEMPROOT(h) DUK_HEAPHDR_SET_FLAG_BITS((h), DUK_HEAPHDR_FLAG_TEMPROOT)
+#define DUK_HEAPHDR_CLEAR_TEMPROOT(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h), DUK_HEAPHDR_FLAG_TEMPROOT)
+#define DUK_HEAPHDR_HAS_TEMPROOT(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h), DUK_HEAPHDR_FLAG_TEMPROOT)
-#define DUK_HEAPHDR_SET_FINALIZABLE(h) DUK_HEAPHDR_SET_FLAG_BITS((h),DUK_HEAPHDR_FLAG_FINALIZABLE)
-#define DUK_HEAPHDR_CLEAR_FINALIZABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h),DUK_HEAPHDR_FLAG_FINALIZABLE)
-#define DUK_HEAPHDR_HAS_FINALIZABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h),DUK_HEAPHDR_FLAG_FINALIZABLE)
+#define DUK_HEAPHDR_SET_FINALIZABLE(h) DUK_HEAPHDR_SET_FLAG_BITS((h), DUK_HEAPHDR_FLAG_FINALIZABLE)
+#define DUK_HEAPHDR_CLEAR_FINALIZABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h), DUK_HEAPHDR_FLAG_FINALIZABLE)
+#define DUK_HEAPHDR_HAS_FINALIZABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h), DUK_HEAPHDR_FLAG_FINALIZABLE)
-#define DUK_HEAPHDR_SET_FINALIZED(h) DUK_HEAPHDR_SET_FLAG_BITS((h),DUK_HEAPHDR_FLAG_FINALIZED)
-#define DUK_HEAPHDR_CLEAR_FINALIZED(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h),DUK_HEAPHDR_FLAG_FINALIZED)
-#define DUK_HEAPHDR_HAS_FINALIZED(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h),DUK_HEAPHDR_FLAG_FINALIZED)
+#define DUK_HEAPHDR_SET_FINALIZED(h) DUK_HEAPHDR_SET_FLAG_BITS((h), DUK_HEAPHDR_FLAG_FINALIZED)
+#define DUK_HEAPHDR_CLEAR_FINALIZED(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h), DUK_HEAPHDR_FLAG_FINALIZED)
+#define DUK_HEAPHDR_HAS_FINALIZED(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h), DUK_HEAPHDR_FLAG_FINALIZED)
-#define DUK_HEAPHDR_SET_READONLY(h) DUK_HEAPHDR_SET_FLAG_BITS((h),DUK_HEAPHDR_FLAG_READONLY)
-#define DUK_HEAPHDR_CLEAR_READONLY(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h),DUK_HEAPHDR_FLAG_READONLY)
-#define DUK_HEAPHDR_HAS_READONLY(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h),DUK_HEAPHDR_FLAG_READONLY)
+#define DUK_HEAPHDR_SET_READONLY(h) DUK_HEAPHDR_SET_FLAG_BITS((h), DUK_HEAPHDR_FLAG_READONLY)
+#define DUK_HEAPHDR_CLEAR_READONLY(h) DUK_HEAPHDR_CLEAR_FLAG_BITS((h), DUK_HEAPHDR_FLAG_READONLY)
+#define DUK_HEAPHDR_HAS_READONLY(h) DUK_HEAPHDR_CHECK_FLAG_BITS((h), DUK_HEAPHDR_FLAG_READONLY)
/* get or set a range of flags; m=first bit number, n=number of bits */
-#define DUK_HEAPHDR_GET_FLAG_RANGE(h,m,n) (((h)->h_flags >> (m)) & ((1UL << (n)) - 1UL))
+#define DUK_HEAPHDR_GET_FLAG_RANGE(h, m, n) (((h)->h_flags >> (m)) & ((1UL << (n)) - 1UL))
-#define DUK_HEAPHDR_SET_FLAG_RANGE(h,m,n,v) do { \
- (h)->h_flags = \
- ((h)->h_flags & (~(((1UL << (n)) - 1UL) << (m)))) \
- | ((v) << (m)); \
+#define DUK_HEAPHDR_SET_FLAG_RANGE(h, m, n, v) \
+ do { \
+ (h)->h_flags = ((h)->h_flags & (~(((1UL << (n)) - 1UL) << (m)))) | ((v) << (m)); \
} while (0)
/* init pointer fields to null */
#if defined(DUK_USE_DOUBLE_LINKED_HEAP)
-#define DUK_HEAPHDR_INIT_NULLS(h) do { \
+#define DUK_HEAPHDR_INIT_NULLS(h) \
+ do { \
DUK_HEAPHDR_SET_NEXT((h), (void *) NULL); \
DUK_HEAPHDR_SET_PREV((h), (void *) NULL); \
} while (0)
#else
-#define DUK_HEAPHDR_INIT_NULLS(h) do { \
+#define DUK_HEAPHDR_INIT_NULLS(h) \
+ do { \
DUK_HEAPHDR_SET_NEXT((h), (void *) NULL); \
} while (0)
#endif
-#define DUK_HEAPHDR_STRING_INIT_NULLS(h) do { \
+#define DUK_HEAPHDR_STRING_INIT_NULLS(h) \
+ do { \
(h)->h_next = NULL; \
} while (0)
@@ -4671,14 +4851,24 @@ struct duk_heaphdr_string {
DUK_INTERNAL_DECL void duk_heaphdr_assert_valid_subclassed(duk_heaphdr *h);
DUK_INTERNAL_DECL void duk_heaphdr_assert_links(duk_heap *heap, duk_heaphdr *h);
DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
-#define DUK_HEAPHDR_ASSERT_LINKS(heap,h) do { duk_heaphdr_assert_links((heap), (h)); } while (0)
-#define DUK_HEAPHDR_ASSERT_VALID(h) do { duk_heaphdr_assert_valid((h)); } while (0)
+#define DUK_HEAPHDR_ASSERT_LINKS(heap, h) \
+ do { \
+ duk_heaphdr_assert_links((heap), (h)); \
+ } while (0)
+#define DUK_HEAPHDR_ASSERT_VALID(h) \
+ do { \
+ duk_heaphdr_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HEAPHDR_ASSERT_LINKS(heap,h) do {} while (0)
-#define DUK_HEAPHDR_ASSERT_VALID(h) do {} while (0)
+#define DUK_HEAPHDR_ASSERT_LINKS(heap, h) \
+ do { \
+ } while (0)
+#define DUK_HEAPHDR_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
-#endif /* DUK_HEAPHDR_H_INCLUDED */
+#endif /* DUK_HEAPHDR_H_INCLUDED */
/* #include duk_refcount.h */
/*
* Reference counting helper macros. The macros take a thread argument
@@ -4699,19 +4889,20 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
/* XXX: double evaluation for 'tv' argument. */
#define DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv) \
(DUK_TVAL_IS_HEAP_ALLOCATED((tv)) && !DUK_HEAPHDR_HAS_READONLY(DUK_TVAL_GET_HEAPHDR((tv))))
-#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) (!DUK_HEAPHDR_HAS_READONLY((h)))
-#else /* DUK_USE_ROM_OBJECTS */
+#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) (!DUK_HEAPHDR_HAS_READONLY((h)))
+#else /* DUK_USE_ROM_OBJECTS */
/* Without ROM objects "needs refcount update" == is heap allocated. */
-#define DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv) DUK_TVAL_IS_HEAP_ALLOCATED((tv))
-#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) 1
-#endif /* DUK_USE_ROM_OBJECTS */
+#define DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv) DUK_TVAL_IS_HEAP_ALLOCATED((tv))
+#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) 1
+#endif /* DUK_USE_ROM_OBJECTS */
/* Fast variants, inline refcount operations except for refzero handling.
* Can be used explicitly when speed is always more important than size.
* For a good compiler and a single file build, these are basically the
* same as a forced inline.
*/
-#define DUK_TVAL_INCREF_FAST(thr,tv) do { \
+#define DUK_TVAL_INCREF_FAST(thr, tv) \
+ do { \
duk_tval *duk__tv = (tv); \
DUK_ASSERT(duk__tv != NULL); \
if (DUK_TVAL_NEEDS_REFCOUNT_UPDATE(duk__tv)) { \
@@ -4719,10 +4910,11 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
DUK_ASSERT(duk__h != NULL); \
DUK_ASSERT(DUK_HEAPHDR_HTYPE_VALID(duk__h)); \
DUK_HEAPHDR_PREINC_REFCOUNT(duk__h); \
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(duk__h) != 0); /* No wrapping. */ \
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(duk__h) != 0); /* No wrapping. */ \
} \
} while (0)
-#define DUK_TVAL_DECREF_FAST(thr,tv) do { \
+#define DUK_TVAL_DECREF_FAST(thr, tv) \
+ do { \
duk_tval *duk__tv = (tv); \
DUK_ASSERT(duk__tv != NULL); \
if (DUK_TVAL_NEEDS_REFCOUNT_UPDATE(duk__tv)) { \
@@ -4735,7 +4927,8 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
} \
} \
} while (0)
-#define DUK_TVAL_DECREF_NORZ_FAST(thr,tv) do { \
+#define DUK_TVAL_DECREF_NORZ_FAST(thr, tv) \
+ do { \
duk_tval *duk__tv = (tv); \
DUK_ASSERT(duk__tv != NULL); \
if (DUK_TVAL_NEEDS_REFCOUNT_UPDATE(duk__tv)) { \
@@ -4748,16 +4941,18 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
} \
} \
} while (0)
-#define DUK_HEAPHDR_INCREF_FAST(thr,h) do { \
+#define DUK_HEAPHDR_INCREF_FAST(thr, h) \
+ do { \
duk_heaphdr *duk__h = (duk_heaphdr *) (h); \
DUK_ASSERT(duk__h != NULL); \
DUK_ASSERT(DUK_HEAPHDR_HTYPE_VALID(duk__h)); \
if (DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(duk__h)) { \
DUK_HEAPHDR_PREINC_REFCOUNT(duk__h); \
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(duk__h) != 0); /* No wrapping. */ \
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(duk__h) != 0); /* No wrapping. */ \
} \
} while (0)
-#define DUK_HEAPHDR_DECREF_FAST_RAW(thr,h,rzcall,rzcast) do { \
+#define DUK_HEAPHDR_DECREF_FAST_RAW(thr, h, rzcall, rzcast) \
+ do { \
duk_heaphdr *duk__h = (duk_heaphdr *) (h); \
DUK_ASSERT(duk__h != NULL); \
DUK_ASSERT(DUK_HEAPHDR_HTYPE_VALID(duk__h)); \
@@ -4768,29 +4963,72 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
} \
} \
} while (0)
-#define DUK_HEAPHDR_DECREF_FAST(thr,h) \
- DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_heaphdr_refzero,duk_heaphdr *)
-#define DUK_HEAPHDR_DECREF_NORZ_FAST(thr,h) \
- DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_heaphdr_refzero_norz,duk_heaphdr *)
+#define DUK_HEAPHDR_DECREF_FAST(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_heaphdr_refzero, duk_heaphdr *)
+#define DUK_HEAPHDR_DECREF_NORZ_FAST(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_heaphdr_refzero_norz, duk_heaphdr *)
/* Slow variants, call to a helper to reduce code size.
* Can be used explicitly when size is always more important than speed.
*/
-#define DUK_TVAL_INCREF_SLOW(thr,tv) do { duk_tval_incref((tv)); } while (0)
-#define DUK_TVAL_DECREF_SLOW(thr,tv) do { duk_tval_decref((thr), (tv)); } while (0)
-#define DUK_TVAL_DECREF_NORZ_SLOW(thr,tv) do { duk_tval_decref_norz((thr), (tv)); } while (0)
-#define DUK_HEAPHDR_INCREF_SLOW(thr,h) do { duk_heaphdr_incref((duk_heaphdr *) (h)); } while (0)
-#define DUK_HEAPHDR_DECREF_SLOW(thr,h) do { duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HEAPHDR_DECREF_NORZ_SLOW(thr,h) do { duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HSTRING_INCREF_SLOW(thr,h) do { duk_heaphdr_incref((duk_heaphdr *) (h)); } while (0)
-#define DUK_HSTRING_DECREF_SLOW(thr,h) do { duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HSTRING_DECREF_NORZ_SLOW(thr,h) do { duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HBUFFER_INCREF_SLOW(thr,h) do { duk_heaphdr_incref((duk_heaphdr *) (h)); } while (0)
-#define DUK_HBUFFER_DECREF_SLOW(thr,h) do { duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HBUFFER_DECREF_NORZ_SLOW(thr,h) do { duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HOBJECT_INCREF_SLOW(thr,h) do { duk_heaphdr_incref((duk_heaphdr *) (h)); } while (0)
-#define DUK_HOBJECT_DECREF_SLOW(thr,h) do { duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); } while (0)
-#define DUK_HOBJECT_DECREF_NORZ_SLOW(thr,h) do { duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); } while (0)
+#define DUK_TVAL_INCREF_SLOW(thr, tv) \
+ do { \
+ duk_tval_incref((tv)); \
+ } while (0)
+#define DUK_TVAL_DECREF_SLOW(thr, tv) \
+ do { \
+ duk_tval_decref((thr), (tv)); \
+ } while (0)
+#define DUK_TVAL_DECREF_NORZ_SLOW(thr, tv) \
+ do { \
+ duk_tval_decref_norz((thr), (tv)); \
+ } while (0)
+#define DUK_HEAPHDR_INCREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_incref((duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HEAPHDR_DECREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HEAPHDR_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HSTRING_INCREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_incref((duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HSTRING_DECREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HSTRING_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HBUFFER_INCREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_incref((duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HBUFFER_DECREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HBUFFER_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HOBJECT_INCREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_incref((duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HOBJECT_DECREF_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref((thr), (duk_heaphdr *) (h)); \
+ } while (0)
+#define DUK_HOBJECT_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ duk_heaphdr_decref_norz((thr), (duk_heaphdr *) (h)); \
+ } while (0)
/* Default variants. Selection depends on speed/size preference.
* Concretely: with gcc 4.8.1 -Os x64 the difference in final binary
@@ -4800,122 +5038,136 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
/* XXX: It would be nice to specialize for specific duk_hobject subtypes
* but current refzero queue handling prevents that.
*/
-#define DUK_TVAL_INCREF(thr,tv) DUK_TVAL_INCREF_FAST((thr),(tv))
-#define DUK_TVAL_DECREF(thr,tv) DUK_TVAL_DECREF_FAST((thr),(tv))
-#define DUK_TVAL_DECREF_NORZ(thr,tv) DUK_TVAL_DECREF_NORZ_FAST((thr),(tv))
-#define DUK_HEAPHDR_INCREF(thr,h) DUK_HEAPHDR_INCREF_FAST((thr),(h))
-#define DUK_HEAPHDR_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_heaphdr_refzero,duk_heaphdr *)
-#define DUK_HEAPHDR_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_heaphdr_refzero_norz,duk_heaphdr *)
-#define DUK_HSTRING_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) (h))
-#define DUK_HSTRING_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hstring_refzero,duk_hstring *)
-#define DUK_HSTRING_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hstring_refzero,duk_hstring *) /* no 'norz' variant */
-#define DUK_HOBJECT_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) (h))
-#define DUK_HOBJECT_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero,duk_hobject *)
-#define DUK_HOBJECT_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero_norz,duk_hobject *)
-#define DUK_HBUFFER_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) (h))
-#define DUK_HBUFFER_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hbuffer_refzero,duk_hbuffer *)
-#define DUK_HBUFFER_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hbuffer_refzero,duk_hbuffer *) /* no 'norz' variant */
-#define DUK_HCOMPFUNC_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HCOMPFUNC_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero,duk_hobject *)
-#define DUK_HCOMPFUNC_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero_norz,duk_hobject *)
-#define DUK_HNATFUNC_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HNATFUNC_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero,duk_hobject *)
-#define DUK_HNATFUNC_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero_norz,duk_hobject *)
-#define DUK_HBUFOBJ_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HBUFOBJ_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero,duk_hobject *)
-#define DUK_HBUFOBJ_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero_norz,duk_hobject *)
-#define DUK_HTHREAD_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HTHREAD_DECREF(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero,duk_hobject *)
-#define DUK_HTHREAD_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_FAST_RAW((thr),(h),duk_hobject_refzero_norz,duk_hobject *)
+#define DUK_TVAL_INCREF(thr, tv) DUK_TVAL_INCREF_FAST((thr), (tv))
+#define DUK_TVAL_DECREF(thr, tv) DUK_TVAL_DECREF_FAST((thr), (tv))
+#define DUK_TVAL_DECREF_NORZ(thr, tv) DUK_TVAL_DECREF_NORZ_FAST((thr), (tv))
+#define DUK_HEAPHDR_INCREF(thr, h) DUK_HEAPHDR_INCREF_FAST((thr), (h))
+#define DUK_HEAPHDR_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_heaphdr_refzero, duk_heaphdr *)
+#define DUK_HEAPHDR_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_heaphdr_refzero_norz, duk_heaphdr *)
+#define DUK_HSTRING_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h))
+#define DUK_HSTRING_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hstring_refzero, duk_hstring *)
+#define DUK_HSTRING_DECREF_NORZ(thr, h) \
+ DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hstring_refzero, duk_hstring *) /* no 'norz' variant */
+#define DUK_HOBJECT_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h))
+#define DUK_HOBJECT_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero, duk_hobject *)
+#define DUK_HOBJECT_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero_norz, duk_hobject *)
+#define DUK_HBUFFER_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h))
+#define DUK_HBUFFER_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hbuffer_refzero, duk_hbuffer *)
+#define DUK_HBUFFER_DECREF_NORZ(thr, h) \
+ DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hbuffer_refzero, duk_hbuffer *) /* no 'norz' variant */
+#define DUK_HCOMPFUNC_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HCOMPFUNC_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero, duk_hobject *)
+#define DUK_HCOMPFUNC_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero_norz, duk_hobject *)
+#define DUK_HNATFUNC_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HNATFUNC_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero, duk_hobject *)
+#define DUK_HNATFUNC_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero_norz, duk_hobject *)
+#define DUK_HBUFOBJ_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HBUFOBJ_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero, duk_hobject *)
+#define DUK_HBUFOBJ_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero_norz, duk_hobject *)
+#define DUK_HTHREAD_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HTHREAD_DECREF(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero, duk_hobject *)
+#define DUK_HTHREAD_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_FAST_RAW((thr), (h), duk_hobject_refzero_norz, duk_hobject *)
#else
-#define DUK_TVAL_INCREF(thr,tv) DUK_TVAL_INCREF_SLOW((thr),(tv))
-#define DUK_TVAL_DECREF(thr,tv) DUK_TVAL_DECREF_SLOW((thr),(tv))
-#define DUK_TVAL_DECREF_NORZ(thr,tv) DUK_TVAL_DECREF_NORZ_SLOW((thr),(tv))
-#define DUK_HEAPHDR_INCREF(thr,h) DUK_HEAPHDR_INCREF_SLOW((thr),(h))
-#define DUK_HEAPHDR_DECREF(thr,h) DUK_HEAPHDR_DECREF_SLOW((thr),(h))
-#define DUK_HEAPHDR_DECREF_NORZ(thr,h) DUK_HEAPHDR_DECREF_NORZ_SLOW((thr),(h))
-#define DUK_HSTRING_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) (h))
-#define DUK_HSTRING_DECREF(thr,h) DUK_HSTRING_DECREF_SLOW((thr),(h))
-#define DUK_HSTRING_DECREF_NORZ(thr,h) DUK_HSTRING_DECREF_NORZ_SLOW((thr),(h))
-#define DUK_HOBJECT_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) (h))
-#define DUK_HOBJECT_DECREF(thr,h) DUK_HOBJECT_DECREF_SLOW((thr),(h))
-#define DUK_HOBJECT_DECREF_NORZ(thr,h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr),(h))
-#define DUK_HBUFFER_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) (h))
-#define DUK_HBUFFER_DECREF(thr,h) DUK_HBUFFER_DECREF_SLOW((thr),(h))
-#define DUK_HBUFFER_DECREF_NORZ(thr,h) DUK_HBUFFER_DECREF_NORZ_SLOW((thr),(h))
-#define DUK_HCOMPFUNC_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HCOMPFUNC_DECREF(thr,h) DUK_HOBJECT_DECREF_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HCOMPFUNC_DECREF_NORZ(thr,h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HNATFUNC_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HNATFUNC_DECREF(thr,h) DUK_HOBJECT_DECREF_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HNATFUNC_DECREF_NORZ(thr,h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HBUFOBJ_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HBUFOBJ_DECREF(thr,h) DUK_HOBJECT_DECREF_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HBUFOB_DECREF_NORZ(thr,h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HTHREAD_INCREF(thr,h) DUK_HEAPHDR_INCREF((thr),(duk_heaphdr *) &(h)->obj)
-#define DUK_HTHREAD_DECREF(thr,h) DUK_HOBJECT_DECREF_SLOW((thr),(duk_hobject *) &(h)->obj)
-#define DUK_HTHREAD_DECREF_NORZ(thr,h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr),(duk_hobject *) &(h)->obj)
+#define DUK_TVAL_INCREF(thr, tv) DUK_TVAL_INCREF_SLOW((thr), (tv))
+#define DUK_TVAL_DECREF(thr, tv) DUK_TVAL_DECREF_SLOW((thr), (tv))
+#define DUK_TVAL_DECREF_NORZ(thr, tv) DUK_TVAL_DECREF_NORZ_SLOW((thr), (tv))
+#define DUK_HEAPHDR_INCREF(thr, h) DUK_HEAPHDR_INCREF_SLOW((thr), (h))
+#define DUK_HEAPHDR_DECREF(thr, h) DUK_HEAPHDR_DECREF_SLOW((thr), (h))
+#define DUK_HEAPHDR_DECREF_NORZ(thr, h) DUK_HEAPHDR_DECREF_NORZ_SLOW((thr), (h))
+#define DUK_HSTRING_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h))
+#define DUK_HSTRING_DECREF(thr, h) DUK_HSTRING_DECREF_SLOW((thr), (h))
+#define DUK_HSTRING_DECREF_NORZ(thr, h) DUK_HSTRING_DECREF_NORZ_SLOW((thr), (h))
+#define DUK_HOBJECT_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h))
+#define DUK_HOBJECT_DECREF(thr, h) DUK_HOBJECT_DECREF_SLOW((thr), (h))
+#define DUK_HOBJECT_DECREF_NORZ(thr, h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr), (h))
+#define DUK_HBUFFER_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h))
+#define DUK_HBUFFER_DECREF(thr, h) DUK_HBUFFER_DECREF_SLOW((thr), (h))
+#define DUK_HBUFFER_DECREF_NORZ(thr, h) DUK_HBUFFER_DECREF_NORZ_SLOW((thr), (h))
+#define DUK_HCOMPFUNC_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HCOMPFUNC_DECREF(thr, h) DUK_HOBJECT_DECREF_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HCOMPFUNC_DECREF_NORZ(thr, h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HNATFUNC_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HNATFUNC_DECREF(thr, h) DUK_HOBJECT_DECREF_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HNATFUNC_DECREF_NORZ(thr, h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HBUFOBJ_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HBUFOBJ_DECREF(thr, h) DUK_HOBJECT_DECREF_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HBUFOB_DECREF_NORZ(thr, h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HTHREAD_INCREF(thr, h) DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) &(h)->obj)
+#define DUK_HTHREAD_DECREF(thr, h) DUK_HOBJECT_DECREF_SLOW((thr), (duk_hobject *) &(h)->obj)
+#define DUK_HTHREAD_DECREF_NORZ(thr, h) DUK_HOBJECT_DECREF_NORZ_SLOW((thr), (duk_hobject *) &(h)->obj)
#endif
/* Convenience for some situations; the above macros don't allow NULLs
* for performance reasons. Macros cover only actually needed cases.
*/
-#define DUK_HEAPHDR_INCREF_ALLOWNULL(thr,h) do { \
+#define DUK_HEAPHDR_INCREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HEAPHDR_INCREF((thr), (duk_heaphdr *) (h)); \
} \
} while (0)
-#define DUK_HEAPHDR_DECREF_ALLOWNULL(thr,h) do { \
+#define DUK_HEAPHDR_DECREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HEAPHDR_DECREF((thr), (duk_heaphdr *) (h)); \
} \
} while (0)
-#define DUK_HEAPHDR_DECREF_NORZ_ALLOWNULL(thr,h) do { \
+#define DUK_HEAPHDR_DECREF_NORZ_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HEAPHDR_DECREF_NORZ((thr), (duk_heaphdr *) (h)); \
} \
} while (0)
-#define DUK_HOBJECT_INCREF_ALLOWNULL(thr,h) do { \
+#define DUK_HOBJECT_INCREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HOBJECT_INCREF((thr), (h)); \
} \
} while (0)
-#define DUK_HOBJECT_DECREF_ALLOWNULL(thr,h) do { \
+#define DUK_HOBJECT_DECREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HOBJECT_DECREF((thr), (h)); \
} \
} while (0)
-#define DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr,h) do { \
+#define DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HOBJECT_DECREF_NORZ((thr), (h)); \
} \
} while (0)
-#define DUK_HBUFFER_INCREF_ALLOWNULL(thr,h) do { \
+#define DUK_HBUFFER_INCREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HBUFFER_INCREF((thr), (h)); \
} \
} while (0)
-#define DUK_HBUFFER_DECREF_ALLOWNULL(thr,h) do { \
+#define DUK_HBUFFER_DECREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HBUFFER_DECREF((thr), (h)); \
} \
} while (0)
-#define DUK_HBUFFER_DECREF_NORZ_ALLOWNULL(thr,h) do { \
+#define DUK_HBUFFER_DECREF_NORZ_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HBUFFER_DECREF_NORZ((thr), (h)); \
} \
} while (0)
-#define DUK_HTHREAD_INCREF_ALLOWNULL(thr,h) do { \
+#define DUK_HTHREAD_INCREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HTHREAD_INCREF((thr), (h)); \
} \
} while (0)
-#define DUK_HTHREAD_DECREF_ALLOWNULL(thr,h) do { \
+#define DUK_HTHREAD_DECREF_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HTHREAD_DECREF((thr), (h)); \
} \
} while (0)
-#define DUK_HTHREAD_DECREF_NORZ_ALLOWNULL(thr,h) do { \
+#define DUK_HTHREAD_DECREF_NORZ_ALLOWNULL(thr, h) \
+ do { \
if ((h) != NULL) { \
DUK_HTHREAD_DECREF_NORZ((thr), (h)); \
} \
@@ -4927,16 +5179,22 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
* variant is performance critical.
*/
#if defined(DUK_USE_FINALIZER_SUPPORT)
-#define DUK_REFZERO_CHECK_FAST(thr) do { \
+#define DUK_REFZERO_CHECK_FAST(thr) \
+ do { \
duk_refzero_check_fast((thr)); \
} while (0)
-#define DUK_REFZERO_CHECK_SLOW(thr) do { \
+#define DUK_REFZERO_CHECK_SLOW(thr) \
+ do { \
duk_refzero_check_slow((thr)); \
} while (0)
-#else /* DUK_USE_FINALIZER_SUPPORT */
-#define DUK_REFZERO_CHECK_FAST(thr) do { } while (0)
-#define DUK_REFZERO_CHECK_SLOW(thr) do { } while (0)
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#else /* DUK_USE_FINALIZER_SUPPORT */
+#define DUK_REFZERO_CHECK_FAST(thr) \
+ do { \
+ } while (0)
+#define DUK_REFZERO_CHECK_SLOW(thr) \
+ do { \
+ } while (0)
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* Macros to set a duk_tval and update refcount of the target (decref the
@@ -4944,125 +5202,176 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
* and footprint critical; any changes made should be measured for size/speed.
*/
-#define DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_UNDEFINED(tv__dst); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_UNDEFINED(tv__dst); \
DUK_TVAL_DECREF_NORZ((thr), &tv__tmp); \
} while (0)
-#define DUK_TVAL_SET_UNUSED_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_UNUSED_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_UNUSED(tv__dst); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_NULL_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NULL_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_NULL(tv__dst); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_BOOLEAN(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_NUMBER_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NUMBER_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_NUMBER(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_DOUBLE_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_DOUBLE_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_DOUBLE(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_NAN_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NAN_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_NAN(tv__dst); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_SET_I48_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_I48_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_I48(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_I32_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_I32_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_I32(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_U32_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_U32_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_U32(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
#else
-#define DUK_TVAL_SET_DOUBLE_CAST_UPDREF(thr,tvptr_dst,newval) \
+#define DUK_TVAL_SET_DOUBLE_CAST_UPDREF(thr, tvptr_dst, newval) \
DUK_TVAL_SET_DOUBLE_UPDREF((thr), (tvptr_dst), (duk_double_t) (newval))
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0(thr,tvptr_dst,lf_v,lf_fp,lf_flags) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0(thr, tvptr_dst, lf_v, lf_fp, lf_flags) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_LIGHTFUNC(tv__dst, (lf_v), (lf_fp), (lf_flags)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_STRING_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_STRING_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_STRING(tv__dst, (newval)); \
DUK_HSTRING_INCREF((thr), (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_OBJECT_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_OBJECT_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_OBJECT(tv__dst, (newval)); \
DUK_HOBJECT_INCREF((thr), (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_BUFFER_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_BUFFER_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_BUFFER(tv__dst, (newval)); \
DUK_HBUFFER_INCREF((thr), (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
-#define DUK_TVAL_SET_POINTER_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; duk_tval tv__tmp; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_POINTER_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_POINTER(tv__dst, (newval)); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
/* DUK_TVAL_SET_TVAL_UPDREF() is used a lot in executor, property lookups,
@@ -5073,281 +5382,452 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
*/
/* Original idiom used, minimal code size. */
-#define DUK_TVAL_SET_TVAL_UPDREF_ALT0(thr,tvptr_dst,tvptr_src) do { \
- duk_tval *tv__dst, *tv__src; duk_tval tv__tmp; \
- tv__dst = (tvptr_dst); tv__src = (tvptr_src); \
+#define DUK_TVAL_SET_TVAL_UPDREF_ALT0(thr, tvptr_dst, tvptr_src) \
+ do { \
+ duk_tval *tv__dst, *tv__src; \
+ duk_tval tv__tmp; \
+ tv__dst = (tvptr_dst); \
+ tv__src = (tvptr_src); \
DUK_TVAL_SET_TVAL(&tv__tmp, tv__dst); \
DUK_TVAL_SET_TVAL(tv__dst, tv__src); \
DUK_TVAL_INCREF((thr), tv__src); \
- DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
+ DUK_TVAL_DECREF((thr), &tv__tmp); /* side effects */ \
} while (0)
/* Faster alternative: avoid making a temporary copy of tvptr_dst and use
* fast incref/decref macros.
*/
-#define DUK_TVAL_SET_TVAL_UPDREF_ALT1(thr,tvptr_dst,tvptr_src) do { \
- duk_tval *tv__dst, *tv__src; duk_heaphdr *h__obj; \
- tv__dst = (tvptr_dst); tv__src = (tvptr_src); \
+#define DUK_TVAL_SET_TVAL_UPDREF_ALT1(thr, tvptr_dst, tvptr_src) \
+ do { \
+ duk_tval *tv__dst, *tv__src; \
+ duk_heaphdr *h__obj; \
+ tv__dst = (tvptr_dst); \
+ tv__src = (tvptr_src); \
DUK_TVAL_INCREF_FAST((thr), tv__src); \
if (DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv__dst)) { \
h__obj = DUK_TVAL_GET_HEAPHDR(tv__dst); \
DUK_ASSERT(h__obj != NULL); \
DUK_TVAL_SET_TVAL(tv__dst, tv__src); \
- DUK_HEAPHDR_DECREF_FAST((thr), h__obj); /* side effects */ \
+ DUK_HEAPHDR_DECREF_FAST((thr), h__obj); /* side effects */ \
} else { \
DUK_TVAL_SET_TVAL(tv__dst, tv__src); \
} \
} while (0)
/* XXX: no optimized variants yet */
-#define DUK_TVAL_SET_UNDEFINED_UPDREF DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0
-#define DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ_ALT0
-#define DUK_TVAL_SET_UNUSED_UPDREF DUK_TVAL_SET_UNUSED_UPDREF_ALT0
-#define DUK_TVAL_SET_NULL_UPDREF DUK_TVAL_SET_NULL_UPDREF_ALT0
-#define DUK_TVAL_SET_BOOLEAN_UPDREF DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0
-#define DUK_TVAL_SET_NUMBER_UPDREF DUK_TVAL_SET_NUMBER_UPDREF_ALT0
-#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0
-#define DUK_TVAL_SET_DOUBLE_UPDREF DUK_TVAL_SET_DOUBLE_UPDREF_ALT0
-#define DUK_TVAL_SET_NAN_UPDREF DUK_TVAL_SET_NAN_UPDREF_ALT0
+#define DUK_TVAL_SET_UNDEFINED_UPDREF DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0
+#define DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ_ALT0
+#define DUK_TVAL_SET_UNUSED_UPDREF DUK_TVAL_SET_UNUSED_UPDREF_ALT0
+#define DUK_TVAL_SET_NULL_UPDREF DUK_TVAL_SET_NULL_UPDREF_ALT0
+#define DUK_TVAL_SET_BOOLEAN_UPDREF DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0
+#define DUK_TVAL_SET_NUMBER_UPDREF DUK_TVAL_SET_NUMBER_UPDREF_ALT0
+#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0
+#define DUK_TVAL_SET_DOUBLE_UPDREF DUK_TVAL_SET_DOUBLE_UPDREF_ALT0
+#define DUK_TVAL_SET_NAN_UPDREF DUK_TVAL_SET_NAN_UPDREF_ALT0
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_I48_UPDREF_ALT0
-#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_I32_UPDREF_ALT0
-#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_U32_UPDREF_ALT0
+#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_I48_UPDREF_ALT0
+#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_I32_UPDREF_ALT0
+#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_U32_UPDREF_ALT0
#else
-#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF /* XXX: fast int-to-double */
-#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
-#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
-#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_FASTINT_UPDREF DUK_TVAL_SET_I48_UPDREF /* convenience */
-#define DUK_TVAL_SET_LIGHTFUNC_UPDREF DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0
-#define DUK_TVAL_SET_STRING_UPDREF DUK_TVAL_SET_STRING_UPDREF_ALT0
-#define DUK_TVAL_SET_OBJECT_UPDREF DUK_TVAL_SET_OBJECT_UPDREF_ALT0
-#define DUK_TVAL_SET_BUFFER_UPDREF DUK_TVAL_SET_BUFFER_UPDREF_ALT0
-#define DUK_TVAL_SET_POINTER_UPDREF DUK_TVAL_SET_POINTER_UPDREF_ALT0
+#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF /* XXX: fast int-to-double */
+#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
+#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
+#endif /* DUK_USE_FASTINT */
+#define DUK_TVAL_SET_FASTINT_UPDREF DUK_TVAL_SET_I48_UPDREF /* convenience */
+#define DUK_TVAL_SET_LIGHTFUNC_UPDREF DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0
+#define DUK_TVAL_SET_STRING_UPDREF DUK_TVAL_SET_STRING_UPDREF_ALT0
+#define DUK_TVAL_SET_OBJECT_UPDREF DUK_TVAL_SET_OBJECT_UPDREF_ALT0
+#define DUK_TVAL_SET_BUFFER_UPDREF DUK_TVAL_SET_BUFFER_UPDREF_ALT0
+#define DUK_TVAL_SET_POINTER_UPDREF DUK_TVAL_SET_POINTER_UPDREF_ALT0
#if defined(DUK_USE_FAST_REFCOUNT_DEFAULT)
/* Optimized for speed. */
-#define DUK_TVAL_SET_TVAL_UPDREF DUK_TVAL_SET_TVAL_UPDREF_ALT1
-#define DUK_TVAL_SET_TVAL_UPDREF_FAST DUK_TVAL_SET_TVAL_UPDREF_ALT1
-#define DUK_TVAL_SET_TVAL_UPDREF_SLOW DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#define DUK_TVAL_SET_TVAL_UPDREF DUK_TVAL_SET_TVAL_UPDREF_ALT1
+#define DUK_TVAL_SET_TVAL_UPDREF_FAST DUK_TVAL_SET_TVAL_UPDREF_ALT1
+#define DUK_TVAL_SET_TVAL_UPDREF_SLOW DUK_TVAL_SET_TVAL_UPDREF_ALT0
#else
/* Optimized for size. */
-#define DUK_TVAL_SET_TVAL_UPDREF DUK_TVAL_SET_TVAL_UPDREF_ALT0
-#define DUK_TVAL_SET_TVAL_UPDREF_FAST DUK_TVAL_SET_TVAL_UPDREF_ALT0
-#define DUK_TVAL_SET_TVAL_UPDREF_SLOW DUK_TVAL_SET_TVAL_UPDREF_ALT0
-#endif
-
-#else /* DUK_USE_REFERENCE_COUNTING */
-
-#define DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv) 0
-#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) 0
-
-#define DUK_TVAL_INCREF_FAST(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_DECREF_FAST(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_DECREF_NORZ_FAST(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_INCREF_SLOW(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_DECREF_SLOW(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_DECREF_NORZ_SLOW(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_INCREF(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_DECREF(thr,v) do {} while (0) /* nop */
-#define DUK_TVAL_DECREF_NORZ(thr,v) do {} while (0) /* nop */
-#define DUK_HEAPHDR_INCREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_DECREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_DECREF_NORZ_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_INCREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_DECREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_DECREF_NORZ_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HEAPHDR_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_INCREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_DECREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_DECREF_NORZ_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_INCREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_DECREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_DECREF_NORZ_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HSTRING_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_INCREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_NORZ_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_INCREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_NORZ_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_INCREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_NORZ_FAST(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_INCREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_NORZ_SLOW(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-
-#define DUK_HCOMPFUNC_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HCOMPFUNC_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HCOMPFUNC_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HNATFUNC_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HNATFUNC_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HNATFUNC_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFOBJ_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFOBJ_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFOBJ_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HTHREAD_INCREF(thr,h) do {} while (0) /* nop */
-#define DUK_HTHREAD_DECREF(thr,h) do {} while (0) /* nop */
-#define DUK_HTHREAD_DECREF_NORZ(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_INCREF_ALLOWNULL(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_ALLOWNULL(thr,h) do {} while (0) /* nop */
-#define DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_INCREF_ALLOWNULL(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_ALLOWNULL(thr,h) do {} while (0) /* nop */
-#define DUK_HBUFFER_DECREF_NORZ_ALLOWNULL(thr,h) do {} while (0) /* nop */
-
-#define DUK_REFZERO_CHECK_FAST(thr) do {} while (0) /* nop */
-#define DUK_REFZERO_CHECK_SLOW(thr) do {} while (0) /* nop */
-
-#define DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_TVAL_UPDREF DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#define DUK_TVAL_SET_TVAL_UPDREF_FAST DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#define DUK_TVAL_SET_TVAL_UPDREF_SLOW DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#endif
+
+#else /* DUK_USE_REFERENCE_COUNTING */
+
+#define DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv) 0
+#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) 0
+
+#define DUK_TVAL_INCREF_FAST(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_DECREF_FAST(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_DECREF_NORZ_FAST(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_INCREF_SLOW(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_DECREF_SLOW(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_DECREF_NORZ_SLOW(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_INCREF(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_DECREF(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_TVAL_DECREF_NORZ(thr, v) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_INCREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_DECREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_DECREF_NORZ_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_INCREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_DECREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HEAPHDR_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_INCREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_DECREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_DECREF_NORZ_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_INCREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_DECREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HSTRING_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_INCREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_NORZ_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_INCREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_INCREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_NORZ_FAST(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_INCREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_NORZ_SLOW(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+
+#define DUK_HCOMPFUNC_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HCOMPFUNC_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HCOMPFUNC_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HNATFUNC_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HNATFUNC_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HNATFUNC_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFOBJ_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFOBJ_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFOBJ_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HTHREAD_INCREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HTHREAD_DECREF(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HTHREAD_DECREF_NORZ(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_INCREF_ALLOWNULL(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_ALLOWNULL(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_INCREF_ALLOWNULL(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_ALLOWNULL(thr, h) \
+ do { \
+ } while (0) /* nop */
+#define DUK_HBUFFER_DECREF_NORZ_ALLOWNULL(thr, h) \
+ do { \
+ } while (0) /* nop */
+
+#define DUK_REFZERO_CHECK_FAST(thr) \
+ do { \
+ } while (0) /* nop */
+#define DUK_REFZERO_CHECK_SLOW(thr) \
+ do { \
+ } while (0) /* nop */
+
+#define DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_UNDEFINED(tv__dst); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_UNUSED_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_UNUSED_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_UNUSED(tv__dst); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_NULL_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NULL_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_NULL(tv__dst); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_BOOLEAN(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_NUMBER_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NUMBER_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_NUMBER(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_NUMBER_CHKFAST_FAST(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_DOUBLE_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_DOUBLE_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_DOUBLE(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_NAN_UPDREF_ALT0(thr,tvptr_dst) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_NAN_UPDREF_ALT0(thr, tvptr_dst) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_NAN(tv__dst); \
DUK_UNREF((thr)); \
} while (0)
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_SET_I48_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_I48_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_I48(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_I32_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_I32_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_I32(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_U32_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_U32_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_U32(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
#else
-#define DUK_TVAL_SET_DOUBLE_CAST_UPDREF(thr,tvptr_dst,newval) \
+#define DUK_TVAL_SET_DOUBLE_CAST_UPDREF(thr, tvptr_dst, newval) \
DUK_TVAL_SET_DOUBLE_UPDREF((thr), (tvptr_dst), (duk_double_t) (newval))
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0(thr,tvptr_dst,lf_v,lf_fp,lf_flags) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0(thr, tvptr_dst, lf_v, lf_fp, lf_flags) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_LIGHTFUNC(tv__dst, (lf_v), (lf_fp), (lf_flags)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_STRING_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_STRING_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_STRING(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_OBJECT_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_OBJECT_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_OBJECT(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_BUFFER_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_BUFFER_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_BUFFER(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_POINTER_UPDREF_ALT0(thr,tvptr_dst,newval) do { \
- duk_tval *tv__dst; tv__dst = (tvptr_dst); \
+#define DUK_TVAL_SET_POINTER_UPDREF_ALT0(thr, tvptr_dst, newval) \
+ do { \
+ duk_tval *tv__dst; \
+ tv__dst = (tvptr_dst); \
DUK_TVAL_SET_POINTER(tv__dst, (newval)); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_TVAL_UPDREF_ALT0(thr,tvptr_dst,tvptr_src) do { \
+#define DUK_TVAL_SET_TVAL_UPDREF_ALT0(thr, tvptr_dst, tvptr_src) \
+ do { \
duk_tval *tv__dst, *tv__src; \
- tv__dst = (tvptr_dst); tv__src = (tvptr_src); \
+ tv__dst = (tvptr_dst); \
+ tv__src = (tvptr_src); \
DUK_TVAL_SET_TVAL(tv__dst, tv__src); \
DUK_UNREF((thr)); \
} while (0)
-#define DUK_TVAL_SET_UNDEFINED_UPDREF DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0
-#define DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0
-#define DUK_TVAL_SET_UNUSED_UPDREF DUK_TVAL_SET_UNUSED_UPDREF_ALT0
-#define DUK_TVAL_SET_NULL_UPDREF DUK_TVAL_SET_NULL_UPDREF_ALT0
-#define DUK_TVAL_SET_BOOLEAN_UPDREF DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0
-#define DUK_TVAL_SET_NUMBER_UPDREF DUK_TVAL_SET_NUMBER_UPDREF_ALT0
-#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0
-#define DUK_TVAL_SET_DOUBLE_UPDREF DUK_TVAL_SET_DOUBLE_UPDREF_ALT0
-#define DUK_TVAL_SET_NAN_UPDREF DUK_TVAL_SET_NAN_UPDREF_ALT0
+#define DUK_TVAL_SET_UNDEFINED_UPDREF DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0
+#define DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ DUK_TVAL_SET_UNDEFINED_UPDREF_ALT0
+#define DUK_TVAL_SET_UNUSED_UPDREF DUK_TVAL_SET_UNUSED_UPDREF_ALT0
+#define DUK_TVAL_SET_NULL_UPDREF DUK_TVAL_SET_NULL_UPDREF_ALT0
+#define DUK_TVAL_SET_BOOLEAN_UPDREF DUK_TVAL_SET_BOOLEAN_UPDREF_ALT0
+#define DUK_TVAL_SET_NUMBER_UPDREF DUK_TVAL_SET_NUMBER_UPDREF_ALT0
+#define DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF_ALT0
+#define DUK_TVAL_SET_DOUBLE_UPDREF DUK_TVAL_SET_DOUBLE_UPDREF_ALT0
+#define DUK_TVAL_SET_NAN_UPDREF DUK_TVAL_SET_NAN_UPDREF_ALT0
#if defined(DUK_USE_FASTINT)
-#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_I48_UPDREF_ALT0
-#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_I32_UPDREF_ALT0
-#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_U32_UPDREF_ALT0
+#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_I48_UPDREF_ALT0
+#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_I32_UPDREF_ALT0
+#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_U32_UPDREF_ALT0
#else
-#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF /* XXX: fast-int-to-double */
-#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
-#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
-#endif /* DUK_USE_FASTINT */
-#define DUK_TVAL_SET_FASTINT_UPDREF DUK_TVAL_SET_I48_UPDREF /* convenience */
-#define DUK_TVAL_SET_LIGHTFUNC_UPDREF DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0
-#define DUK_TVAL_SET_STRING_UPDREF DUK_TVAL_SET_STRING_UPDREF_ALT0
-#define DUK_TVAL_SET_OBJECT_UPDREF DUK_TVAL_SET_OBJECT_UPDREF_ALT0
-#define DUK_TVAL_SET_BUFFER_UPDREF DUK_TVAL_SET_BUFFER_UPDREF_ALT0
-#define DUK_TVAL_SET_POINTER_UPDREF DUK_TVAL_SET_POINTER_UPDREF_ALT0
+#define DUK_TVAL_SET_I48_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF /* XXX: fast-int-to-double */
+#define DUK_TVAL_SET_I32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
+#define DUK_TVAL_SET_U32_UPDREF DUK_TVAL_SET_DOUBLE_CAST_UPDREF
+#endif /* DUK_USE_FASTINT */
+#define DUK_TVAL_SET_FASTINT_UPDREF DUK_TVAL_SET_I48_UPDREF /* convenience */
+#define DUK_TVAL_SET_LIGHTFUNC_UPDREF DUK_TVAL_SET_LIGHTFUNC_UPDREF_ALT0
+#define DUK_TVAL_SET_STRING_UPDREF DUK_TVAL_SET_STRING_UPDREF_ALT0
+#define DUK_TVAL_SET_OBJECT_UPDREF DUK_TVAL_SET_OBJECT_UPDREF_ALT0
+#define DUK_TVAL_SET_BUFFER_UPDREF DUK_TVAL_SET_BUFFER_UPDREF_ALT0
+#define DUK_TVAL_SET_POINTER_UPDREF DUK_TVAL_SET_POINTER_UPDREF_ALT0
-#define DUK_TVAL_SET_TVAL_UPDREF DUK_TVAL_SET_TVAL_UPDREF_ALT0
-#define DUK_TVAL_SET_TVAL_UPDREF_FAST DUK_TVAL_SET_TVAL_UPDREF_ALT0
-#define DUK_TVAL_SET_TVAL_UPDREF_SLOW DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#define DUK_TVAL_SET_TVAL_UPDREF DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#define DUK_TVAL_SET_TVAL_UPDREF_FAST DUK_TVAL_SET_TVAL_UPDREF_ALT0
+#define DUK_TVAL_SET_TVAL_UPDREF_SLOW DUK_TVAL_SET_TVAL_UPDREF_ALT0
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
/*
* Some convenience macros that don't have optimized implementations now.
*/
-#define DUK_TVAL_SET_TVAL_UPDREF_NORZ(thr,tv_dst,tv_src) do { \
+#define DUK_TVAL_SET_TVAL_UPDREF_NORZ(thr, tv_dst, tv_src) \
+ do { \
duk_hthread *duk__thr = (thr); \
duk_tval *duk__dst = (tv_dst); \
duk_tval *duk__src = (tv_src); \
@@ -5357,7 +5837,8 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
DUK_TVAL_INCREF(thr, duk__dst); \
} while (0)
-#define DUK_TVAL_SET_U32_UPDREF_NORZ(thr,tv_dst,val) do { \
+#define DUK_TVAL_SET_U32_UPDREF_NORZ(thr, tv_dst, val) \
+ do { \
duk_hthread *duk__thr = (thr); \
duk_tval *duk__dst = (tv_dst); \
duk_uint32_t duk__val = (duk_uint32_t) (val); \
@@ -5373,11 +5854,11 @@ DUK_INTERNAL_DECL void duk_heaphdr_assert_valid(duk_heaphdr *h);
#if defined(DUK_USE_REFERENCE_COUNTING)
#if defined(DUK_USE_FINALIZER_SUPPORT)
DUK_INTERNAL_DECL void duk_refzero_check_slow(duk_hthread *thr);
-DUK_INTERNAL_DECL DUK_INLINE void duk_refzero_check_fast(duk_hthread *thr);
+DUK_INTERNAL_DECL void duk_refzero_check_fast(duk_hthread *thr);
#endif
DUK_INTERNAL_DECL void duk_heaphdr_refcount_finalize_norz(duk_heap *heap, duk_heaphdr *hdr);
DUK_INTERNAL_DECL void duk_hobject_refcount_finalize_norz(duk_heap *heap, duk_hobject *h);
-#if 0 /* Not needed: fast path handles inline; slow path uses duk_heaphdr_decref() which is needed anyway. */
+#if 0 /* Not needed: fast path handles inline; slow path uses duk_heaphdr_decref() which is needed anyway. */
DUK_INTERNAL_DECL void duk_hstring_decref(duk_hthread *thr, duk_hstring *h);
DUK_INTERNAL_DECL void duk_hstring_decref_norz(duk_hthread *thr, duk_hstring *h);
DUK_INTERNAL_DECL void duk_hbuffer_decref(duk_hthread *thr, duk_hbuffer *h);
@@ -5388,8 +5869,8 @@ DUK_INTERNAL_DECL void duk_hobject_decref_norz(duk_hthread *thr, duk_hobject *h)
DUK_INTERNAL_DECL void duk_heaphdr_refzero(duk_hthread *thr, duk_heaphdr *h);
DUK_INTERNAL_DECL void duk_heaphdr_refzero_norz(duk_hthread *thr, duk_heaphdr *h);
#if defined(DUK_USE_FAST_REFCOUNT_DEFAULT)
-DUK_INTERNAL_DECL void duk_hstring_refzero(duk_hthread *thr, duk_hstring *h); /* no 'norz' variant */
-DUK_INTERNAL_DECL void duk_hbuffer_refzero(duk_hthread *thr, duk_hbuffer *h); /* no 'norz' variant */
+DUK_INTERNAL_DECL void duk_hstring_refzero(duk_hthread *thr, duk_hstring *h); /* no 'norz' variant */
+DUK_INTERNAL_DECL void duk_hbuffer_refzero(duk_hthread *thr, duk_hbuffer *h); /* no 'norz' variant */
DUK_INTERNAL_DECL void duk_hobject_refzero(duk_hthread *thr, duk_hobject *h);
DUK_INTERNAL_DECL void duk_hobject_refzero_norz(duk_hthread *thr, duk_hobject *h);
#else
@@ -5400,11 +5881,11 @@ DUK_INTERNAL_DECL void duk_heaphdr_incref(duk_heaphdr *h);
DUK_INTERNAL_DECL void duk_heaphdr_decref(duk_hthread *thr, duk_heaphdr *h);
DUK_INTERNAL_DECL void duk_heaphdr_decref_norz(duk_hthread *thr, duk_heaphdr *h);
#endif
-#else /* DUK_USE_REFERENCE_COUNTING */
+#else /* DUK_USE_REFERENCE_COUNTING */
/* no refcounting */
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
-#endif /* DUK_REFCOUNT_H_INCLUDED */
+#endif /* DUK_REFCOUNT_H_INCLUDED */
/* #include duk_api_internal.h */
/*
* Internal API calls which have (stack and other) semantics similar
@@ -5414,20 +5895,42 @@ DUK_INTERNAL_DECL void duk_heaphdr_decref_norz(duk_hthread *thr, duk_heaphdr *h)
#if !defined(DUK_API_INTERNAL_H_INCLUDED)
#define DUK_API_INTERNAL_H_INCLUDED
+/* Inline macro helpers. */
+#if defined(DUK_USE_PREFER_SIZE)
+#define DUK_INLINE_PERF
+#define DUK_ALWAYS_INLINE_PERF
+#define DUK_NOINLINE_PERF
+#else
+#define DUK_INLINE_PERF DUK_INLINE
+#define DUK_ALWAYS_INLINE_PERF DUK_ALWAYS_INLINE
+#define DUK_NOINLINE_PERF DUK_NOINLINE
+#endif
+
+/* Inline macro helpers, for bytecode executor. */
+#if defined(DUK_USE_EXEC_PREFER_SIZE)
+#define DUK_EXEC_INLINE_PERF
+#define DUK_EXEC_ALWAYS_INLINE_PERF
+#define DUK_EXEC_NOINLINE_PERF
+#else
+#define DUK_EXEC_INLINE_PERF DUK_INLINE
+#define DUK_EXEC_ALWAYS_INLINE_PERF DUK_ALWAYS_INLINE
+#define DUK_EXEC_NOINLINE_PERF DUK_NOINLINE
+#endif
+
/* duk_push_sprintf constants */
-#define DUK_PUSH_SPRINTF_INITIAL_SIZE 256L
-#define DUK_PUSH_SPRINTF_SANITY_LIMIT (1L * 1024L * 1024L * 1024L)
+#define DUK_PUSH_SPRINTF_INITIAL_SIZE 256L
+#define DUK_PUSH_SPRINTF_SANITY_LIMIT (1L * 1024L * 1024L * 1024L)
/* Flag ORed to err_code to indicate __FILE__ / __LINE__ is not
* blamed as source of error for error fileName / lineNumber.
*/
-#define DUK_ERRCODE_FLAG_NOBLAME_FILELINE (1L << 24)
+#define DUK_ERRCODE_FLAG_NOBLAME_FILELINE (1L << 24)
/* Current convention is to use duk_size_t for value stack sizes and global indices,
* and duk_idx_t for local frame indices.
*/
-DUK_INTERNAL_DECL DUK_INLINE void duk_valstack_grow_check_throw(duk_hthread *thr, duk_size_t min_bytes);
-DUK_INTERNAL_DECL DUK_INLINE duk_bool_t duk_valstack_grow_check_nothrow(duk_hthread *thr, duk_size_t min_bytes);
+DUK_INTERNAL_DECL void duk_valstack_grow_check_throw(duk_hthread *thr, duk_size_t min_bytes);
+DUK_INTERNAL_DECL duk_bool_t duk_valstack_grow_check_nothrow(duk_hthread *thr, duk_size_t min_bytes);
DUK_INTERNAL_DECL void duk_valstack_shrink_check_nothrow(duk_hthread *thr, duk_bool_t snug);
DUK_INTERNAL_DECL void duk_copy_tvals_incref(duk_hthread *thr, duk_tval *tv_dst, duk_tval *tv_src, duk_size_t count);
@@ -5483,24 +5986,17 @@ DUK_INTERNAL_DECL duk_hstring *duk_push_uint_to_hstring(duk_hthread *thr, duk_ui
DUK_INTERNAL_DECL duk_tval *duk_get_borrowed_this_tval(duk_hthread *thr);
/* XXX: add fastint support? */
-#define duk_push_u64(thr,val) \
- duk_push_number((thr), (duk_double_t) (val))
-#define duk_push_i64(thr,val) \
- duk_push_number((thr), (duk_double_t) (val))
+#define duk_push_u64(thr, val) duk_push_number((thr), (duk_double_t) (val))
+#define duk_push_i64(thr, val) duk_push_number((thr), (duk_double_t) (val))
/* duk_push_(u)int() is guaranteed to support at least (un)signed 32-bit range */
-#define duk_push_u32(thr,val) \
- duk_push_uint((thr), (duk_uint_t) (val))
-#define duk_push_i32(thr,val) \
- duk_push_int((thr), (duk_int_t) (val))
+#define duk_push_u32(thr, val) duk_push_uint((thr), (duk_uint_t) (val))
+#define duk_push_i32(thr, val) duk_push_int((thr), (duk_int_t) (val))
/* sometimes stack and array indices need to go on the stack */
-#define duk_push_idx(thr,val) \
- duk_push_int((thr), (duk_int_t) (val))
-#define duk_push_uarridx(thr,val) \
- duk_push_uint((thr), (duk_uint_t) (val))
-#define duk_push_size_t(thr,val) \
- duk_push_uint((thr), (duk_uint_t) (val)) /* XXX: assumed to fit for now */
+#define duk_push_idx(thr, val) duk_push_int((thr), (duk_int_t) (val))
+#define duk_push_uarridx(thr, val) duk_push_uint((thr), (duk_uint_t) (val))
+#define duk_push_size_t(thr, val) duk_push_uint((thr), (duk_uint_t) (val)) /* XXX: assumed to fit for now */
DUK_INTERNAL_DECL duk_bool_t duk_is_string_notsymbol(duk_hthread *thr, duk_idx_t idx);
@@ -5517,19 +6013,23 @@ DUK_INTERNAL_DECL duk_hthread *duk_get_hthread(duk_hthread *thr, duk_idx_t idx);
DUK_INTERNAL_DECL duk_hcompfunc *duk_get_hcompfunc(duk_hthread *thr, duk_idx_t idx);
DUK_INTERNAL_DECL duk_hnatfunc *duk_get_hnatfunc(duk_hthread *thr, duk_idx_t idx);
-DUK_INTERNAL_DECL void *duk_get_buffer_data_raw(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_len, duk_bool_t throw_flag, duk_bool_t *out_isbuffer);
+DUK_INTERNAL_DECL void *duk_get_buffer_data_raw(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_size,
+ void *def_ptr,
+ duk_size_t def_len,
+ duk_bool_t throw_flag,
+ duk_bool_t *out_isbuffer);
DUK_INTERNAL_DECL duk_hobject *duk_get_hobject_with_class(duk_hthread *thr, duk_idx_t idx, duk_small_uint_t classnum);
DUK_INTERNAL_DECL duk_hobject *duk_get_hobject_promote_mask(duk_hthread *thr, duk_idx_t idx, duk_uint_t type_mask);
DUK_INTERNAL_DECL duk_hobject *duk_require_hobject_promote_mask(duk_hthread *thr, duk_idx_t idx, duk_uint_t type_mask);
DUK_INTERNAL_DECL duk_hobject *duk_require_hobject_accept_mask(duk_hthread *thr, duk_idx_t idx, duk_uint_t type_mask);
-#define duk_require_hobject_promote_lfunc(thr,idx) \
- duk_require_hobject_promote_mask((thr), (idx), DUK_TYPE_MASK_LIGHTFUNC)
-#define duk_get_hobject_promote_lfunc(thr,idx) \
- duk_get_hobject_promote_mask((thr), (idx), DUK_TYPE_MASK_LIGHTFUNC)
+#define duk_require_hobject_promote_lfunc(thr, idx) duk_require_hobject_promote_mask((thr), (idx), DUK_TYPE_MASK_LIGHTFUNC)
+#define duk_get_hobject_promote_lfunc(thr, idx) duk_get_hobject_promote_mask((thr), (idx), DUK_TYPE_MASK_LIGHTFUNC)
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL_DECL void *duk_get_voidptr(duk_hthread *thr, duk_idx_t idx);
#endif
@@ -5552,12 +6052,16 @@ DUK_INTERNAL_DECL duk_double_t duk_to_number_m2(duk_hthread *thr);
DUK_INTERNAL_DECL duk_bool_t duk_to_boolean_top_pop(duk_hthread *thr);
-#if defined(DUK_USE_DEBUGGER_SUPPORT) /* only needed by debugger for now */
+#if defined(DUK_USE_DEBUGGER_SUPPORT) /* only needed by debugger for now */
DUK_INTERNAL_DECL duk_hstring *duk_safe_to_hstring(duk_hthread *thr, duk_idx_t idx);
#endif
DUK_INTERNAL_DECL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk_bool_t avoid_side_effects);
-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 */
+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 */
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);
DUK_INTERNAL_DECL duk_int_t duk_to_int_check_range(duk_hthread *thr, duk_idx_t idx, duk_int_t minval, duk_int_t maxval);
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
@@ -5582,13 +6086,15 @@ DUK_INTERNAL_DECL void duk_push_hstring_stridx(duk_hthread *thr, duk_small_uint_
DUK_INTERNAL_DECL void duk_push_hstring_empty(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_push_hobject(duk_hthread *thr, duk_hobject *h);
DUK_INTERNAL_DECL void duk_push_hbuffer(duk_hthread *thr, duk_hbuffer *h);
-#define duk_push_hthread(thr,h) \
- duk_push_hobject((thr), (duk_hobject *) (h))
-#define duk_push_hnatfunc(thr,h) \
- duk_push_hobject((thr), (duk_hobject *) (h))
+#define duk_push_hthread(thr, h) duk_push_hobject((thr), (duk_hobject *) (h))
+#define duk_push_hnatfunc(thr, h) duk_push_hobject((thr), (duk_hobject *) (h))
DUK_INTERNAL_DECL void duk_push_hobject_bidx(duk_hthread *thr, duk_small_int_t builtin_idx);
-DUK_INTERNAL_DECL duk_hobject *duk_push_object_helper(duk_hthread *thr, duk_uint_t hobject_flags_and_class, duk_small_int_t prototype_bidx);
-DUK_INTERNAL_DECL duk_hobject *duk_push_object_helper_proto(duk_hthread *thr, duk_uint_t hobject_flags_and_class, duk_hobject *proto);
+DUK_INTERNAL_DECL duk_hobject *duk_push_object_helper(duk_hthread *thr,
+ duk_uint_t hobject_flags_and_class,
+ duk_small_int_t prototype_bidx);
+DUK_INTERNAL_DECL duk_hobject *duk_push_object_helper_proto(duk_hthread *thr,
+ duk_uint_t hobject_flags_and_class,
+ duk_hobject *proto);
DUK_INTERNAL_DECL duk_hcompfunc *duk_push_hcompfunc(duk_hthread *thr);
DUK_INTERNAL_DECL duk_hboundfunc *duk_push_hboundfunc(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_push_c_function_builtin(duk_hthread *thr, duk_c_function func, duk_int_t nargs);
@@ -5605,11 +6111,13 @@ DUK_INTERNAL_DECL void duk_push_string_funcptr(duk_hthread *thr, duk_uint8_t *pt
DUK_INTERNAL_DECL void duk_push_lightfunc_name_raw(duk_hthread *thr, duk_c_function func, duk_small_uint_t lf_flags);
DUK_INTERNAL_DECL void duk_push_lightfunc_name(duk_hthread *thr, duk_tval *tv);
DUK_INTERNAL_DECL void duk_push_lightfunc_tostring(duk_hthread *thr, duk_tval *tv);
-#if 0 /* not used yet */
+#if 0 /* not used yet */
DUK_INTERNAL_DECL void duk_push_hnatfunc_name(duk_hthread *thr, duk_hnatfunc *h);
#endif
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-DUK_INTERNAL_DECL duk_hbufobj *duk_push_bufobj_raw(duk_hthread *thr, duk_uint_t hobject_flags_and_class, duk_small_int_t prototype_bidx);
+DUK_INTERNAL_DECL duk_hbufobj *duk_push_bufobj_raw(duk_hthread *thr,
+ duk_uint_t hobject_flags_and_class,
+ duk_small_int_t prototype_bidx);
#endif
DUK_INTERNAL_DECL void *duk_push_fixed_buffer_nozero(duk_hthread *thr, duk_size_t len);
@@ -5626,80 +6134,86 @@ DUK_INTERNAL_DECL const char *duk_push_string_tval_readable_error(duk_hthread *t
* arguments and such call sites are also easiest to verify to be correct.
*/
-DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [val] */
+DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [val] */
DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
-#define duk_get_prop_stridx_short(thr,obj_idx,stridx) \
+#define duk_get_prop_stridx_short(thr, obj_idx, stridx) \
(DUK_ASSERT_EXPR((duk_int_t) (obj_idx) >= -0x8000L && (duk_int_t) (obj_idx) <= 0x7fffL), \
DUK_ASSERT_EXPR((duk_int_t) (stridx) >= 0 && (duk_int_t) (stridx) <= 0xffffL), \
duk_get_prop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
-DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx_boolean(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx, duk_bool_t *out_has_prop); /* [] -> [] */
+DUK_INTERNAL_DECL duk_bool_t duk_get_prop_stridx_boolean(duk_hthread *thr,
+ duk_idx_t obj_idx,
+ duk_small_uint_t stridx,
+ duk_bool_t *out_has_prop); /* [] -> [] */
DUK_INTERNAL_DECL duk_bool_t duk_xget_owndataprop(duk_hthread *thr, duk_idx_t obj_idx);
DUK_INTERNAL_DECL duk_bool_t duk_xget_owndataprop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx);
DUK_INTERNAL_DECL duk_bool_t duk_xget_owndataprop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
-#define duk_xget_owndataprop_stridx_short(thr,obj_idx,stridx) \
+#define duk_xget_owndataprop_stridx_short(thr, obj_idx, stridx) \
(DUK_ASSERT_EXPR((duk_int_t) (obj_idx) >= -0x8000L && (duk_int_t) (obj_idx) <= 0x7fffL), \
DUK_ASSERT_EXPR((duk_int_t) (stridx) >= 0 && (duk_int_t) (stridx) <= 0xffffL), \
duk_xget_owndataprop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
-DUK_INTERNAL_DECL duk_bool_t duk_put_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [val] -> [] */
+DUK_INTERNAL_DECL duk_bool_t duk_put_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [val] -> [] */
DUK_INTERNAL_DECL duk_bool_t duk_put_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
-#define duk_put_prop_stridx_short(thr,obj_idx,stridx) \
+#define duk_put_prop_stridx_short(thr, obj_idx, stridx) \
(DUK_ASSERT_EXPR((duk_int_t) (obj_idx) >= -0x8000L && (duk_int_t) (obj_idx) <= 0x7fffL), \
DUK_ASSERT_EXPR((duk_int_t) (stridx) >= 0 && (duk_int_t) (stridx) <= 0xffffL), \
duk_put_prop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
-DUK_INTERNAL_DECL duk_bool_t duk_del_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [] */
-#if 0 /* Too few call sites to be useful. */
+DUK_INTERNAL_DECL duk_bool_t duk_del_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [] */
+#if 0 /* Too few call sites to be useful. */
DUK_INTERNAL_DECL duk_bool_t duk_del_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
-#define duk_del_prop_stridx_short(thr,obj_idx,stridx) \
+#define duk_del_prop_stridx_short(thr, obj_idx, stridx) \
(DUK_ASSERT_EXPR((obj_idx) >= -0x8000L && (obj_idx) <= 0x7fffL), \
DUK_ASSERT_EXPR((stridx) >= 0 && (stridx) <= 0xffffL), \
duk_del_prop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
#endif
-#define duk_del_prop_stridx_short(thr,obj_idx,stridx) \
- duk_del_prop_stridx((thr), (obj_idx), (stridx))
+#define duk_del_prop_stridx_short(thr, obj_idx, stridx) duk_del_prop_stridx((thr), (obj_idx), (stridx))
-DUK_INTERNAL_DECL duk_bool_t duk_has_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [] */
-#if 0 /* Too few call sites to be useful. */
+DUK_INTERNAL_DECL duk_bool_t duk_has_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [] */
+#if 0 /* Too few call sites to be useful. */
DUK_INTERNAL_DECL duk_bool_t duk_has_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
-#define duk_has_prop_stridx_short(thr,obj_idx,stridx) \
+#define duk_has_prop_stridx_short(thr, obj_idx, stridx) \
(DUK_ASSERT_EXPR((obj_idx) >= -0x8000L && (obj_idx) <= 0x7fffL), \
DUK_ASSERT_EXPR((stridx) >= 0 && (stridx) <= 0xffffL), \
duk_has_prop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 16) + ((duk_uint_t) (stridx))))
#endif
-#define duk_has_prop_stridx_short(thr,obj_idx,stridx) \
- duk_has_prop_stridx((thr), (obj_idx), (stridx))
+#define duk_has_prop_stridx_short(thr, obj_idx, stridx) duk_has_prop_stridx((thr), (obj_idx), (stridx))
-DUK_INTERNAL_DECL void duk_xdef_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t desc_flags); /* [key val] -> [] */
+DUK_INTERNAL_DECL void duk_xdef_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t desc_flags); /* [key val] -> [] */
-DUK_INTERNAL_DECL void duk_xdef_prop_index(duk_hthread *thr, duk_idx_t obj_idx, duk_uarridx_t arr_idx, duk_small_uint_t desc_flags); /* [val] -> [] */
+DUK_INTERNAL_DECL void duk_xdef_prop_index(duk_hthread *thr,
+ duk_idx_t obj_idx,
+ duk_uarridx_t arr_idx,
+ duk_small_uint_t desc_flags); /* [val] -> [] */
/* XXX: Because stridx and desc_flags have a limited range, this call could
* always pack stridx and desc_flags into a single argument.
*/
-DUK_INTERNAL_DECL void duk_xdef_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx, duk_small_uint_t desc_flags); /* [val] -> [] */
+DUK_INTERNAL_DECL void duk_xdef_prop_stridx(duk_hthread *thr,
+ duk_idx_t obj_idx,
+ duk_small_uint_t stridx,
+ duk_small_uint_t desc_flags); /* [val] -> [] */
DUK_INTERNAL_DECL void duk_xdef_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args);
-#define duk_xdef_prop_stridx_short(thr,obj_idx,stridx,desc_flags) \
+#define duk_xdef_prop_stridx_short(thr, obj_idx, stridx, desc_flags) \
(DUK_ASSERT_EXPR((duk_int_t) (obj_idx) >= -0x80L && (duk_int_t) (obj_idx) <= 0x7fL), \
DUK_ASSERT_EXPR((duk_int_t) (stridx) >= 0 && (duk_int_t) (stridx) <= 0xffffL), \
DUK_ASSERT_EXPR((duk_int_t) (desc_flags) >= 0 && (duk_int_t) (desc_flags) <= 0xffL), \
- duk_xdef_prop_stridx_short_raw((thr), (((duk_uint_t) (obj_idx)) << 24) + (((duk_uint_t) (stridx)) << 8) + (duk_uint_t) (desc_flags)))
-
-#define duk_xdef_prop_wec(thr,obj_idx) \
- duk_xdef_prop((thr), (obj_idx), DUK_PROPDESC_FLAGS_WEC)
-#define duk_xdef_prop_index_wec(thr,obj_idx,arr_idx) \
- duk_xdef_prop_index((thr), (obj_idx), (arr_idx), DUK_PROPDESC_FLAGS_WEC)
-#define duk_xdef_prop_stridx_wec(thr,obj_idx,stridx) \
- duk_xdef_prop_stridx((thr), (obj_idx), (stridx), DUK_PROPDESC_FLAGS_WEC)
-#define duk_xdef_prop_stridx_short_wec(thr,obj_idx,stridx) \
+ duk_xdef_prop_stridx_short_raw((thr), \
+ (((duk_uint_t) (obj_idx)) << 24) + (((duk_uint_t) (stridx)) << 8) + \
+ (duk_uint_t) (desc_flags)))
+
+#define duk_xdef_prop_wec(thr, obj_idx) duk_xdef_prop((thr), (obj_idx), DUK_PROPDESC_FLAGS_WEC)
+#define duk_xdef_prop_index_wec(thr, obj_idx, arr_idx) duk_xdef_prop_index((thr), (obj_idx), (arr_idx), DUK_PROPDESC_FLAGS_WEC)
+#define duk_xdef_prop_stridx_wec(thr, obj_idx, stridx) duk_xdef_prop_stridx((thr), (obj_idx), (stridx), DUK_PROPDESC_FLAGS_WEC)
+#define duk_xdef_prop_stridx_short_wec(thr, obj_idx, stridx) \
duk_xdef_prop_stridx_short((thr), (obj_idx), (stridx), DUK_PROPDESC_FLAGS_WEC)
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL_DECL void duk_xdef_prop_stridx_builtin(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx, duk_small_int_t builtin_idx, duk_small_uint_t desc_flags); /* [] -> [] */
#endif
-DUK_INTERNAL_DECL void duk_xdef_prop_stridx_thrower(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [] */
+DUK_INTERNAL_DECL void duk_xdef_prop_stridx_thrower(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx); /* [] -> [] */
DUK_INTERNAL_DECL duk_bool_t duk_get_method_stridx(duk_hthread *thr, duk_idx_t idx, duk_small_uint_t stridx);
@@ -5748,28 +6262,24 @@ DUK_INTERNAL_DECL void duk_clear_prototype(duk_hthread *thr, duk_idx_t idx);
* using these macro results in faster and smaller code than duk_get_tval().
* Both 'ctx' and 'idx' are evaluted multiple times, but only for asserts.
*/
-#define DUK_ASSERT_VALID_NEGIDX(thr,idx) \
+#define DUK_ASSERT_VALID_NEGIDX(thr, idx) \
(DUK_ASSERT_EXPR((duk_int_t) (idx) < 0), DUK_ASSERT_EXPR(duk_is_valid_index((thr), (idx))))
-#define DUK_ASSERT_VALID_POSIDX(thr,idx) \
+#define DUK_ASSERT_VALID_POSIDX(thr, idx) \
(DUK_ASSERT_EXPR((duk_int_t) (idx) >= 0), DUK_ASSERT_EXPR(duk_is_valid_index((thr), (idx))))
-#define DUK_GET_TVAL_NEGIDX(thr,idx) \
- (DUK_ASSERT_VALID_NEGIDX((thr),(idx)), ((duk_hthread *) (thr))->valstack_top + (idx))
-#define DUK_GET_TVAL_POSIDX(thr,idx) \
- (DUK_ASSERT_VALID_POSIDX((thr),(idx)), ((duk_hthread *) (thr))->valstack_bottom + (idx))
-#define DUK_GET_HOBJECT_NEGIDX(thr,idx) \
- (DUK_ASSERT_VALID_NEGIDX((thr),(idx)), DUK_TVAL_GET_OBJECT(((duk_hthread *) (thr))->valstack_top + (idx)))
-#define DUK_GET_HOBJECT_POSIDX(thr,idx) \
- (DUK_ASSERT_VALID_POSIDX((thr),(idx)), DUK_TVAL_GET_OBJECT(((duk_hthread *) (thr))->valstack_bottom + (idx)))
-
-#define DUK_GET_THIS_TVAL_PTR(thr) \
- (DUK_ASSERT_EXPR((thr)->valstack_bottom > (thr)->valstack), \
- (thr)->valstack_bottom - 1)
+#define DUK_GET_TVAL_NEGIDX(thr, idx) (DUK_ASSERT_VALID_NEGIDX((thr), (idx)), ((duk_hthread *) (thr))->valstack_top + (idx))
+#define DUK_GET_TVAL_POSIDX(thr, idx) (DUK_ASSERT_VALID_POSIDX((thr), (idx)), ((duk_hthread *) (thr))->valstack_bottom + (idx))
+#define DUK_GET_HOBJECT_NEGIDX(thr, idx) \
+ (DUK_ASSERT_VALID_NEGIDX((thr), (idx)), DUK_TVAL_GET_OBJECT(((duk_hthread *) (thr))->valstack_top + (idx)))
+#define DUK_GET_HOBJECT_POSIDX(thr, idx) \
+ (DUK_ASSERT_VALID_POSIDX((thr), (idx)), DUK_TVAL_GET_OBJECT(((duk_hthread *) (thr))->valstack_bottom + (idx)))
+
+#define DUK_GET_THIS_TVAL_PTR(thr) (DUK_ASSERT_EXPR((thr)->valstack_bottom > (thr)->valstack), (thr)->valstack_bottom - 1)
DUK_INTERNAL_DECL duk_double_t duk_time_get_ecmascript_time(duk_hthread *thr);
DUK_INTERNAL_DECL duk_double_t duk_time_get_ecmascript_time_nofrac(duk_hthread *thr);
DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
-#endif /* DUK_API_INTERNAL_H_INCLUDED */
+#endif /* DUK_API_INTERNAL_H_INCLUDED */
/* #include duk_hstring.h */
/*
* Heap string representation.
@@ -5800,9 +6310,9 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
*/
#if defined(DUK_USE_STRLEN16)
-#define DUK_HSTRING_MAX_BYTELEN (0x0000ffffUL)
+#define DUK_HSTRING_MAX_BYTELEN (0x0000ffffUL)
#else
-#define DUK_HSTRING_MAX_BYTELEN (0x7fffffffUL)
+#define DUK_HSTRING_MAX_BYTELEN (0x7fffffffUL)
#endif
/* XXX: could add flags for "is valid CESU-8" (ECMAScript compatible strings),
@@ -5814,139 +6324,148 @@ DUK_INTERNAL_DECL duk_double_t duk_time_get_monotonic_time(duk_hthread *thr);
/* With lowmem builds the high 16 bits of duk_heaphdr are used for other
* purposes, so this leaves 7 duk_heaphdr flags and 9 duk_hstring flags.
*/
-#define DUK_HSTRING_FLAG_ASCII DUK_HEAPHDR_USER_FLAG(0) /* string is ASCII, clen == blen */
-#define DUK_HSTRING_FLAG_ARRIDX DUK_HEAPHDR_USER_FLAG(1) /* string is a valid array index */
-#define DUK_HSTRING_FLAG_SYMBOL DUK_HEAPHDR_USER_FLAG(2) /* string is a symbol (invalid utf-8) */
-#define DUK_HSTRING_FLAG_HIDDEN DUK_HEAPHDR_USER_FLAG(3) /* string is a hidden symbol (implies symbol, Duktape 1.x internal string) */
-#define DUK_HSTRING_FLAG_RESERVED_WORD DUK_HEAPHDR_USER_FLAG(4) /* string is a reserved word (non-strict) */
-#define DUK_HSTRING_FLAG_STRICT_RESERVED_WORD DUK_HEAPHDR_USER_FLAG(5) /* string is a reserved word (strict) */
-#define DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS DUK_HEAPHDR_USER_FLAG(6) /* string is 'eval' or 'arguments' */
-#define DUK_HSTRING_FLAG_EXTDATA DUK_HEAPHDR_USER_FLAG(7) /* string data is external (duk_hstring_external) */
-#define DUK_HSTRING_FLAG_PINNED_LITERAL DUK_HEAPHDR_USER_FLAG(8) /* string is a literal, and pinned */
-
-#define DUK_HSTRING_HAS_ASCII(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
-#define DUK_HSTRING_HAS_ARRIDX(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
-#define DUK_HSTRING_HAS_SYMBOL(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_SYMBOL)
-#define DUK_HSTRING_HAS_HIDDEN(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_HIDDEN)
-#define DUK_HSTRING_HAS_RESERVED_WORD(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_RESERVED_WORD)
-#define DUK_HSTRING_HAS_STRICT_RESERVED_WORD(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
-#define DUK_HSTRING_HAS_EVAL_OR_ARGUMENTS(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
-#define DUK_HSTRING_HAS_EXTDATA(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
-#define DUK_HSTRING_HAS_PINNED_LITERAL(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
-
-#define DUK_HSTRING_SET_ASCII(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
-#define DUK_HSTRING_SET_ARRIDX(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
-#define DUK_HSTRING_SET_SYMBOL(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_SYMBOL)
-#define DUK_HSTRING_SET_HIDDEN(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_HIDDEN)
-#define DUK_HSTRING_SET_RESERVED_WORD(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_RESERVED_WORD)
-#define DUK_HSTRING_SET_STRICT_RESERVED_WORD(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
-#define DUK_HSTRING_SET_EVAL_OR_ARGUMENTS(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
-#define DUK_HSTRING_SET_EXTDATA(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
-#define DUK_HSTRING_SET_PINNED_LITERAL(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
-
-#define DUK_HSTRING_CLEAR_ASCII(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
-#define DUK_HSTRING_CLEAR_ARRIDX(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
-#define DUK_HSTRING_CLEAR_SYMBOL(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_SYMBOL)
-#define DUK_HSTRING_CLEAR_HIDDEN(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_HIDDEN)
-#define DUK_HSTRING_CLEAR_RESERVED_WORD(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_RESERVED_WORD)
-#define DUK_HSTRING_CLEAR_STRICT_RESERVED_WORD(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
-#define DUK_HSTRING_CLEAR_EVAL_OR_ARGUMENTS(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
-#define DUK_HSTRING_CLEAR_EXTDATA(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
-#define DUK_HSTRING_CLEAR_PINNED_LITERAL(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
-
-#if 0 /* Slightly smaller code without explicit flag, but explicit flag
- * is very useful when 'clen' is dropped.
- */
-#define DUK_HSTRING_IS_ASCII(x) (DUK_HSTRING_GET_BYTELEN((x)) == DUK_HSTRING_GET_CHARLEN((x)))
-#endif
-#define DUK_HSTRING_IS_ASCII(x) DUK_HSTRING_HAS_ASCII((x)) /* lazily set! */
-#define DUK_HSTRING_IS_EMPTY(x) (DUK_HSTRING_GET_BYTELEN((x)) == 0)
+#define DUK_HSTRING_FLAG_ASCII DUK_HEAPHDR_USER_FLAG(0) /* string is ASCII, clen == blen */
+#define DUK_HSTRING_FLAG_ARRIDX DUK_HEAPHDR_USER_FLAG(1) /* string is a valid array index */
+#define DUK_HSTRING_FLAG_SYMBOL DUK_HEAPHDR_USER_FLAG(2) /* string is a symbol (invalid utf-8) */
+#define DUK_HSTRING_FLAG_HIDDEN \
+ DUK_HEAPHDR_USER_FLAG(3) /* string is a hidden symbol (implies symbol, Duktape 1.x internal string) */
+#define DUK_HSTRING_FLAG_RESERVED_WORD DUK_HEAPHDR_USER_FLAG(4) /* string is a reserved word (non-strict) */
+#define DUK_HSTRING_FLAG_STRICT_RESERVED_WORD DUK_HEAPHDR_USER_FLAG(5) /* string is a reserved word (strict) */
+#define DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS DUK_HEAPHDR_USER_FLAG(6) /* string is 'eval' or 'arguments' */
+#define DUK_HSTRING_FLAG_EXTDATA DUK_HEAPHDR_USER_FLAG(7) /* string data is external (duk_hstring_external) */
+#define DUK_HSTRING_FLAG_PINNED_LITERAL DUK_HEAPHDR_USER_FLAG(8) /* string is a literal, and pinned */
+
+#define DUK_HSTRING_HAS_ASCII(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
+#define DUK_HSTRING_HAS_ARRIDX(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
+#define DUK_HSTRING_HAS_SYMBOL(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_SYMBOL)
+#define DUK_HSTRING_HAS_HIDDEN(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_HIDDEN)
+#define DUK_HSTRING_HAS_RESERVED_WORD(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_RESERVED_WORD)
+#define DUK_HSTRING_HAS_STRICT_RESERVED_WORD(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
+#define DUK_HSTRING_HAS_EVAL_OR_ARGUMENTS(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
+#define DUK_HSTRING_HAS_EXTDATA(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
+#define DUK_HSTRING_HAS_PINNED_LITERAL(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
+
+#define DUK_HSTRING_SET_ASCII(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
+#define DUK_HSTRING_SET_ARRIDX(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
+#define DUK_HSTRING_SET_SYMBOL(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_SYMBOL)
+#define DUK_HSTRING_SET_HIDDEN(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_HIDDEN)
+#define DUK_HSTRING_SET_RESERVED_WORD(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_RESERVED_WORD)
+#define DUK_HSTRING_SET_STRICT_RESERVED_WORD(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
+#define DUK_HSTRING_SET_EVAL_OR_ARGUMENTS(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
+#define DUK_HSTRING_SET_EXTDATA(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
+#define DUK_HSTRING_SET_PINNED_LITERAL(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
+
+#define DUK_HSTRING_CLEAR_ASCII(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ASCII)
+#define DUK_HSTRING_CLEAR_ARRIDX(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_ARRIDX)
+#define DUK_HSTRING_CLEAR_SYMBOL(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_SYMBOL)
+#define DUK_HSTRING_CLEAR_HIDDEN(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_HIDDEN)
+#define DUK_HSTRING_CLEAR_RESERVED_WORD(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_RESERVED_WORD)
+#define DUK_HSTRING_CLEAR_STRICT_RESERVED_WORD(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_STRICT_RESERVED_WORD)
+#define DUK_HSTRING_CLEAR_EVAL_OR_ARGUMENTS(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS)
+#define DUK_HSTRING_CLEAR_EXTDATA(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_EXTDATA)
+#define DUK_HSTRING_CLEAR_PINNED_LITERAL(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HSTRING_FLAG_PINNED_LITERAL)
+
+#if 0 /* Slightly smaller code without explicit flag, but explicit flag \
+ * is very useful when 'clen' is dropped. \
+ */
+#define DUK_HSTRING_IS_ASCII(x) (DUK_HSTRING_GET_BYTELEN((x)) == DUK_HSTRING_GET_CHARLEN((x)))
+#endif
+#define DUK_HSTRING_IS_ASCII(x) DUK_HSTRING_HAS_ASCII((x)) /* lazily set! */
+#define DUK_HSTRING_IS_EMPTY(x) (DUK_HSTRING_GET_BYTELEN((x)) == 0)
#if defined(DUK_USE_STRHASH16)
-#define DUK_HSTRING_GET_HASH(x) ((x)->hdr.h_flags >> 16)
-#define DUK_HSTRING_SET_HASH(x,v) do { \
+#define DUK_HSTRING_GET_HASH(x) ((x)->hdr.h_flags >> 16)
+#define DUK_HSTRING_SET_HASH(x, v) \
+ do { \
(x)->hdr.h_flags = ((x)->hdr.h_flags & 0x0000ffffUL) | ((v) << 16); \
} while (0)
#else
-#define DUK_HSTRING_GET_HASH(x) ((x)->hash)
-#define DUK_HSTRING_SET_HASH(x,v) do { \
+#define DUK_HSTRING_GET_HASH(x) ((x)->hash)
+#define DUK_HSTRING_SET_HASH(x, v) \
+ do { \
(x)->hash = (v); \
} while (0)
#endif
#if defined(DUK_USE_STRLEN16)
-#define DUK_HSTRING_GET_BYTELEN(x) ((x)->hdr.h_strextra16)
-#define DUK_HSTRING_SET_BYTELEN(x,v) do { \
+#define DUK_HSTRING_GET_BYTELEN(x) ((x)->hdr.h_strextra16)
+#define DUK_HSTRING_SET_BYTELEN(x, v) \
+ do { \
(x)->hdr.h_strextra16 = (v); \
} while (0)
#if defined(DUK_USE_HSTRING_CLEN)
-#define DUK_HSTRING_GET_CHARLEN(x) duk_hstring_get_charlen((x))
-#define DUK_HSTRING_SET_CHARLEN(x,v) do { \
+#define DUK_HSTRING_GET_CHARLEN(x) duk_hstring_get_charlen((x))
+#define DUK_HSTRING_SET_CHARLEN(x, v) \
+ do { \
(x)->clen16 = (v); \
} while (0)
#else
-#define DUK_HSTRING_GET_CHARLEN(x) duk_hstring_get_charlen((x))
-#define DUK_HSTRING_SET_CHARLEN(x,v) do { \
- DUK_ASSERT(0); /* should never be called */ \
+#define DUK_HSTRING_GET_CHARLEN(x) duk_hstring_get_charlen((x))
+#define DUK_HSTRING_SET_CHARLEN(x, v) \
+ do { \
+ DUK_ASSERT(0); /* should never be called */ \
} while (0)
#endif
#else
-#define DUK_HSTRING_GET_BYTELEN(x) ((x)->blen)
-#define DUK_HSTRING_SET_BYTELEN(x,v) do { \
+#define DUK_HSTRING_GET_BYTELEN(x) ((x)->blen)
+#define DUK_HSTRING_SET_BYTELEN(x, v) \
+ do { \
(x)->blen = (v); \
} while (0)
-#define DUK_HSTRING_GET_CHARLEN(x) duk_hstring_get_charlen((x))
-#define DUK_HSTRING_SET_CHARLEN(x,v) do { \
+#define DUK_HSTRING_GET_CHARLEN(x) duk_hstring_get_charlen((x))
+#define DUK_HSTRING_SET_CHARLEN(x, v) \
+ do { \
(x)->clen = (v); \
} while (0)
#endif
#if defined(DUK_USE_HSTRING_EXTDATA)
-#define DUK_HSTRING_GET_EXTDATA(x) \
- ((x)->extdata)
+#define DUK_HSTRING_GET_EXTDATA(x) ((x)->extdata)
#define DUK_HSTRING_GET_DATA(x) \
- (DUK_HSTRING_HAS_EXTDATA((x)) ? \
- DUK_HSTRING_GET_EXTDATA((const duk_hstring_external *) (x)) : ((const duk_uint8_t *) ((x) + 1)))
+ (DUK_HSTRING_HAS_EXTDATA((x)) ? DUK_HSTRING_GET_EXTDATA((const duk_hstring_external *) (x)) : \
+ ((const duk_uint8_t *) ((x) + 1)))
#else
-#define DUK_HSTRING_GET_DATA(x) \
- ((const duk_uint8_t *) ((x) + 1))
+#define DUK_HSTRING_GET_DATA(x) ((const duk_uint8_t *) ((x) + 1))
#endif
-#define DUK_HSTRING_GET_DATA_END(x) \
- (DUK_HSTRING_GET_DATA((x)) + (x)->blen)
+#define DUK_HSTRING_GET_DATA_END(x) (DUK_HSTRING_GET_DATA((x)) + (x)->blen)
/* Marker value; in E5 2^32-1 is not a valid array index (2^32-2 is highest
* valid).
*/
-#define DUK_HSTRING_NO_ARRAY_INDEX (0xffffffffUL)
+#define DUK_HSTRING_NO_ARRAY_INDEX (0xffffffffUL)
#if defined(DUK_USE_HSTRING_ARRIDX)
-#define DUK_HSTRING_GET_ARRIDX_FAST(h) ((h)->arridx)
-#define DUK_HSTRING_GET_ARRIDX_SLOW(h) ((h)->arridx)
+#define DUK_HSTRING_GET_ARRIDX_FAST(h) ((h)->arridx)
+#define DUK_HSTRING_GET_ARRIDX_SLOW(h) ((h)->arridx)
#else
/* Get array index related to string (or return DUK_HSTRING_NO_ARRAY_INDEX);
* avoids helper call if string has no array index value.
*/
-#define DUK_HSTRING_GET_ARRIDX_FAST(h) \
+#define DUK_HSTRING_GET_ARRIDX_FAST(h) \
(DUK_HSTRING_HAS_ARRIDX((h)) ? duk_js_to_arrayindex_hstring_fast_known((h)) : DUK_HSTRING_NO_ARRAY_INDEX)
/* Slower but more compact variant. */
-#define DUK_HSTRING_GET_ARRIDX_SLOW(h) \
- (duk_js_to_arrayindex_hstring_fast((h)))
+#define DUK_HSTRING_GET_ARRIDX_SLOW(h) (duk_js_to_arrayindex_hstring_fast((h)))
#endif
/* XXX: these actually fit into duk_hstring */
-#define DUK_SYMBOL_TYPE_HIDDEN 0
-#define DUK_SYMBOL_TYPE_GLOBAL 1
-#define DUK_SYMBOL_TYPE_LOCAL 2
+#define DUK_SYMBOL_TYPE_HIDDEN 0
+#define DUK_SYMBOL_TYPE_GLOBAL 1
+#define DUK_SYMBOL_TYPE_LOCAL 2
#define DUK_SYMBOL_TYPE_WELLKNOWN 3
/* Assertion for duk_hstring validity. */
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hstring_assert_valid(duk_hstring *h);
-#define DUK_HSTRING_ASSERT_VALID(h) do { duk_hstring_assert_valid((h)); } while (0)
+#define DUK_HSTRING_ASSERT_VALID(h) \
+ do { \
+ duk_hstring_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HSTRING_ASSERT_VALID(h) do {} while (0)
+#define DUK_HSTRING_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
/*
@@ -6016,14 +6535,17 @@ struct duk_hstring_external {
* Prototypes
*/
-DUK_INTERNAL_DECL duk_ucodepoint_t duk_hstring_char_code_at_raw(duk_hthread *thr, duk_hstring *h, duk_uint_t pos, duk_bool_t surrogate_aware);
+DUK_INTERNAL_DECL duk_ucodepoint_t duk_hstring_char_code_at_raw(duk_hthread *thr,
+ duk_hstring *h,
+ duk_uint_t pos,
+ duk_bool_t surrogate_aware);
DUK_INTERNAL_DECL duk_bool_t duk_hstring_equals_ascii_cstring(duk_hstring *h, const char *cstr);
DUK_INTERNAL_DECL duk_size_t duk_hstring_get_charlen(duk_hstring *h);
#if !defined(DUK_USE_HSTRING_LAZY_CLEN)
DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
#endif
-#endif /* DUK_HSTRING_H_INCLUDED */
+#endif /* DUK_HSTRING_H_INCLUDED */
/* #include duk_hobject.h */
/*
* Heap object representation.
@@ -6066,36 +6588,40 @@ DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
/* XXX: some flags are object subtype specific (e.g. common to all function
* subtypes, duk_harray, etc) and could be reused for different subtypes.
*/
-#define DUK_HOBJECT_FLAG_EXTENSIBLE DUK_HEAPHDR_USER_FLAG(0) /* object is extensible */
-#define DUK_HOBJECT_FLAG_CONSTRUCTABLE DUK_HEAPHDR_USER_FLAG(1) /* object is constructable */
-#define DUK_HOBJECT_FLAG_CALLABLE DUK_HEAPHDR_USER_FLAG(2) /* object is callable */
-#define DUK_HOBJECT_FLAG_BOUNDFUNC DUK_HEAPHDR_USER_FLAG(3) /* object established using Function.prototype.bind() */
-#define DUK_HOBJECT_FLAG_COMPFUNC DUK_HEAPHDR_USER_FLAG(4) /* object is a compiled function (duk_hcompfunc) */
-#define DUK_HOBJECT_FLAG_NATFUNC DUK_HEAPHDR_USER_FLAG(5) /* object is a native function (duk_hnatfunc) */
-#define DUK_HOBJECT_FLAG_BUFOBJ DUK_HEAPHDR_USER_FLAG(6) /* object is a buffer object (duk_hbufobj) (always exotic) */
-#define DUK_HOBJECT_FLAG_FASTREFS DUK_HEAPHDR_USER_FLAG(7) /* object has no fields needing DECREF/marking beyond base duk_hobject header */
-#define DUK_HOBJECT_FLAG_ARRAY_PART DUK_HEAPHDR_USER_FLAG(8) /* object has an array part (a_size may still be 0) */
-#define DUK_HOBJECT_FLAG_STRICT DUK_HEAPHDR_USER_FLAG(9) /* function: function object is strict */
-#define DUK_HOBJECT_FLAG_NOTAIL DUK_HEAPHDR_USER_FLAG(10) /* function: function must not be tail called */
-#define DUK_HOBJECT_FLAG_NEWENV DUK_HEAPHDR_USER_FLAG(11) /* function: create new environment when called (see duk_hcompfunc) */
-#define DUK_HOBJECT_FLAG_NAMEBINDING DUK_HEAPHDR_USER_FLAG(12) /* function: create binding for func name (function templates only, used for named function expressions) */
-#define DUK_HOBJECT_FLAG_CREATEARGS DUK_HEAPHDR_USER_FLAG(13) /* function: create an arguments object on function call */
-#define DUK_HOBJECT_FLAG_HAVE_FINALIZER DUK_HEAPHDR_USER_FLAG(14) /* object has a callable (own) finalizer property */
-#define DUK_HOBJECT_FLAG_EXOTIC_ARRAY DUK_HEAPHDR_USER_FLAG(15) /* 'Array' object, array length and index exotic behavior */
-#define DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ DUK_HEAPHDR_USER_FLAG(16) /* 'String' object, array index exotic behavior */
-#define DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS DUK_HEAPHDR_USER_FLAG(17) /* 'Arguments' object and has arguments exotic behavior (non-strict callee) */
-#define DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ DUK_HEAPHDR_USER_FLAG(18) /* 'Proxy' object */
-#define DUK_HOBJECT_FLAG_SPECIAL_CALL DUK_HEAPHDR_USER_FLAG(19) /* special casing in call behavior, for .call(), .apply(), etc. */
-
-#define DUK_HOBJECT_FLAG_CLASS_BASE DUK_HEAPHDR_USER_FLAG_NUMBER(20)
-#define DUK_HOBJECT_FLAG_CLASS_BITS 5
-
-#define DUK_HOBJECT_GET_CLASS_NUMBER(h) \
+#define DUK_HOBJECT_FLAG_EXTENSIBLE DUK_HEAPHDR_USER_FLAG(0) /* object is extensible */
+#define DUK_HOBJECT_FLAG_CONSTRUCTABLE DUK_HEAPHDR_USER_FLAG(1) /* object is constructable */
+#define DUK_HOBJECT_FLAG_CALLABLE DUK_HEAPHDR_USER_FLAG(2) /* object is callable */
+#define DUK_HOBJECT_FLAG_BOUNDFUNC DUK_HEAPHDR_USER_FLAG(3) /* object established using Function.prototype.bind() */
+#define DUK_HOBJECT_FLAG_COMPFUNC DUK_HEAPHDR_USER_FLAG(4) /* object is a compiled function (duk_hcompfunc) */
+#define DUK_HOBJECT_FLAG_NATFUNC DUK_HEAPHDR_USER_FLAG(5) /* object is a native function (duk_hnatfunc) */
+#define DUK_HOBJECT_FLAG_BUFOBJ DUK_HEAPHDR_USER_FLAG(6) /* object is a buffer object (duk_hbufobj) (always exotic) */
+#define DUK_HOBJECT_FLAG_FASTREFS \
+ DUK_HEAPHDR_USER_FLAG(7) /* object has no fields needing DECREF/marking beyond base duk_hobject header */
+#define DUK_HOBJECT_FLAG_ARRAY_PART DUK_HEAPHDR_USER_FLAG(8) /* object has an array part (a_size may still be 0) */
+#define DUK_HOBJECT_FLAG_STRICT DUK_HEAPHDR_USER_FLAG(9) /* function: function object is strict */
+#define DUK_HOBJECT_FLAG_NOTAIL DUK_HEAPHDR_USER_FLAG(10) /* function: function must not be tail called */
+#define DUK_HOBJECT_FLAG_NEWENV DUK_HEAPHDR_USER_FLAG(11) /* function: create new environment when called (see duk_hcompfunc) */
+#define DUK_HOBJECT_FLAG_NAMEBINDING \
+ DUK_HEAPHDR_USER_FLAG( \
+ 12) /* function: create binding for func name (function templates only, used for named function expressions) */
+#define DUK_HOBJECT_FLAG_CREATEARGS DUK_HEAPHDR_USER_FLAG(13) /* function: create an arguments object on function call */
+#define DUK_HOBJECT_FLAG_HAVE_FINALIZER DUK_HEAPHDR_USER_FLAG(14) /* object has a callable (own) finalizer property */
+#define DUK_HOBJECT_FLAG_EXOTIC_ARRAY DUK_HEAPHDR_USER_FLAG(15) /* 'Array' object, array length and index exotic behavior */
+#define DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ DUK_HEAPHDR_USER_FLAG(16) /* 'String' object, array index exotic behavior */
+#define DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS \
+ DUK_HEAPHDR_USER_FLAG(17) /* 'Arguments' object and has arguments exotic behavior (non-strict callee) */
+#define DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ DUK_HEAPHDR_USER_FLAG(18) /* 'Proxy' object */
+#define DUK_HOBJECT_FLAG_SPECIAL_CALL DUK_HEAPHDR_USER_FLAG(19) /* special casing in call behavior, for .call(), .apply(), etc. */
+
+#define DUK_HOBJECT_FLAG_CLASS_BASE DUK_HEAPHDR_USER_FLAG_NUMBER(20)
+#define DUK_HOBJECT_FLAG_CLASS_BITS 5
+
+#define DUK_HOBJECT_GET_CLASS_NUMBER(h) \
DUK_HEAPHDR_GET_FLAG_RANGE(&(h)->hdr, DUK_HOBJECT_FLAG_CLASS_BASE, DUK_HOBJECT_FLAG_CLASS_BITS)
-#define DUK_HOBJECT_SET_CLASS_NUMBER(h,v) \
+#define DUK_HOBJECT_SET_CLASS_NUMBER(h, v) \
DUK_HEAPHDR_SET_FLAG_RANGE(&(h)->hdr, DUK_HOBJECT_FLAG_CLASS_BASE, DUK_HOBJECT_FLAG_CLASS_BITS, (v))
-#define DUK_HOBJECT_GET_CLASS_MASK(h) \
+#define DUK_HOBJECT_GET_CLASS_MASK(h) \
(1UL << DUK_HEAPHDR_GET_FLAG_RANGE(&(h)->hdr, DUK_HOBJECT_FLAG_CLASS_BASE, DUK_HOBJECT_FLAG_CLASS_BITS))
/* Macro for creating flag initializer from a class number.
@@ -6103,256 +6629,239 @@ DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
* a signed integer to an unsigned one; the largest class values
* have the highest bit (bit 31) set which causes this.
*/
-#define DUK_HOBJECT_CLASS_AS_FLAGS(v) (((duk_uint_t) (v)) << DUK_HOBJECT_FLAG_CLASS_BASE)
+#define DUK_HOBJECT_CLASS_AS_FLAGS(v) (((duk_uint_t) (v)) << DUK_HOBJECT_FLAG_CLASS_BASE)
/* E5 Section 8.6.2 + custom classes */
-#define DUK_HOBJECT_CLASS_NONE 0
-#define DUK_HOBJECT_CLASS_OBJECT 1
-#define DUK_HOBJECT_CLASS_ARRAY 2
-#define DUK_HOBJECT_CLASS_FUNCTION 3
-#define DUK_HOBJECT_CLASS_ARGUMENTS 4
-#define DUK_HOBJECT_CLASS_BOOLEAN 5
-#define DUK_HOBJECT_CLASS_DATE 6
-#define DUK_HOBJECT_CLASS_ERROR 7
-#define DUK_HOBJECT_CLASS_JSON 8
-#define DUK_HOBJECT_CLASS_MATH 9
-#define DUK_HOBJECT_CLASS_NUMBER 10
-#define DUK_HOBJECT_CLASS_REGEXP 11
-#define DUK_HOBJECT_CLASS_STRING 12
-#define DUK_HOBJECT_CLASS_GLOBAL 13
-#define DUK_HOBJECT_CLASS_SYMBOL 14
-#define DUK_HOBJECT_CLASS_OBJENV 15 /* custom */
-#define DUK_HOBJECT_CLASS_DECENV 16 /* custom */
-#define DUK_HOBJECT_CLASS_POINTER 17 /* custom */
-#define DUK_HOBJECT_CLASS_THREAD 18 /* custom; implies DUK_HOBJECT_IS_THREAD */
-#define DUK_HOBJECT_CLASS_BUFOBJ_MIN 19
-#define DUK_HOBJECT_CLASS_ARRAYBUFFER 19 /* implies DUK_HOBJECT_IS_BUFOBJ */
-#define DUK_HOBJECT_CLASS_DATAVIEW 20
-#define DUK_HOBJECT_CLASS_INT8ARRAY 21
-#define DUK_HOBJECT_CLASS_UINT8ARRAY 22
-#define DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY 23
-#define DUK_HOBJECT_CLASS_INT16ARRAY 24
-#define DUK_HOBJECT_CLASS_UINT16ARRAY 25
-#define DUK_HOBJECT_CLASS_INT32ARRAY 26
-#define DUK_HOBJECT_CLASS_UINT32ARRAY 27
-#define DUK_HOBJECT_CLASS_FLOAT32ARRAY 28
-#define DUK_HOBJECT_CLASS_FLOAT64ARRAY 29
-#define DUK_HOBJECT_CLASS_BUFOBJ_MAX 29
-#define DUK_HOBJECT_CLASS_MAX 29
+#define DUK_HOBJECT_CLASS_NONE 0
+#define DUK_HOBJECT_CLASS_OBJECT 1
+#define DUK_HOBJECT_CLASS_ARRAY 2
+#define DUK_HOBJECT_CLASS_FUNCTION 3
+#define DUK_HOBJECT_CLASS_ARGUMENTS 4
+#define DUK_HOBJECT_CLASS_BOOLEAN 5
+#define DUK_HOBJECT_CLASS_DATE 6
+#define DUK_HOBJECT_CLASS_ERROR 7
+#define DUK_HOBJECT_CLASS_JSON 8
+#define DUK_HOBJECT_CLASS_MATH 9
+#define DUK_HOBJECT_CLASS_NUMBER 10
+#define DUK_HOBJECT_CLASS_REGEXP 11
+#define DUK_HOBJECT_CLASS_STRING 12
+#define DUK_HOBJECT_CLASS_GLOBAL 13
+#define DUK_HOBJECT_CLASS_SYMBOL 14
+#define DUK_HOBJECT_CLASS_OBJENV 15 /* custom */
+#define DUK_HOBJECT_CLASS_DECENV 16 /* custom */
+#define DUK_HOBJECT_CLASS_POINTER 17 /* custom */
+#define DUK_HOBJECT_CLASS_THREAD 18 /* custom; implies DUK_HOBJECT_IS_THREAD */
+#define DUK_HOBJECT_CLASS_BUFOBJ_MIN 19
+#define DUK_HOBJECT_CLASS_ARRAYBUFFER 19 /* implies DUK_HOBJECT_IS_BUFOBJ */
+#define DUK_HOBJECT_CLASS_DATAVIEW 20
+#define DUK_HOBJECT_CLASS_INT8ARRAY 21
+#define DUK_HOBJECT_CLASS_UINT8ARRAY 22
+#define DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY 23
+#define DUK_HOBJECT_CLASS_INT16ARRAY 24
+#define DUK_HOBJECT_CLASS_UINT16ARRAY 25
+#define DUK_HOBJECT_CLASS_INT32ARRAY 26
+#define DUK_HOBJECT_CLASS_UINT32ARRAY 27
+#define DUK_HOBJECT_CLASS_FLOAT32ARRAY 28
+#define DUK_HOBJECT_CLASS_FLOAT64ARRAY 29
+#define DUK_HOBJECT_CLASS_BUFOBJ_MAX 29
+#define DUK_HOBJECT_CLASS_MAX 29
/* Class masks. */
-#define DUK_HOBJECT_CMASK_ALL ((1UL << (DUK_HOBJECT_CLASS_MAX + 1)) - 1UL)
-#define DUK_HOBJECT_CMASK_NONE (1UL << DUK_HOBJECT_CLASS_NONE)
-#define DUK_HOBJECT_CMASK_ARGUMENTS (1UL << DUK_HOBJECT_CLASS_ARGUMENTS)
-#define DUK_HOBJECT_CMASK_ARRAY (1UL << DUK_HOBJECT_CLASS_ARRAY)
-#define DUK_HOBJECT_CMASK_BOOLEAN (1UL << DUK_HOBJECT_CLASS_BOOLEAN)
-#define DUK_HOBJECT_CMASK_DATE (1UL << DUK_HOBJECT_CLASS_DATE)
-#define DUK_HOBJECT_CMASK_ERROR (1UL << DUK_HOBJECT_CLASS_ERROR)
-#define DUK_HOBJECT_CMASK_FUNCTION (1UL << DUK_HOBJECT_CLASS_FUNCTION)
-#define DUK_HOBJECT_CMASK_JSON (1UL << DUK_HOBJECT_CLASS_JSON)
-#define DUK_HOBJECT_CMASK_MATH (1UL << DUK_HOBJECT_CLASS_MATH)
-#define DUK_HOBJECT_CMASK_NUMBER (1UL << DUK_HOBJECT_CLASS_NUMBER)
-#define DUK_HOBJECT_CMASK_OBJECT (1UL << DUK_HOBJECT_CLASS_OBJECT)
-#define DUK_HOBJECT_CMASK_REGEXP (1UL << DUK_HOBJECT_CLASS_REGEXP)
-#define DUK_HOBJECT_CMASK_STRING (1UL << DUK_HOBJECT_CLASS_STRING)
-#define DUK_HOBJECT_CMASK_GLOBAL (1UL << DUK_HOBJECT_CLASS_GLOBAL)
-#define DUK_HOBJECT_CMASK_SYMBOL (1UL << DUK_HOBJECT_CLASS_SYMBOL)
-#define DUK_HOBJECT_CMASK_OBJENV (1UL << DUK_HOBJECT_CLASS_OBJENV)
-#define DUK_HOBJECT_CMASK_DECENV (1UL << DUK_HOBJECT_CLASS_DECENV)
-#define DUK_HOBJECT_CMASK_POINTER (1UL << DUK_HOBJECT_CLASS_POINTER)
-#define DUK_HOBJECT_CMASK_ARRAYBUFFER (1UL << DUK_HOBJECT_CLASS_ARRAYBUFFER)
-#define DUK_HOBJECT_CMASK_DATAVIEW (1UL << DUK_HOBJECT_CLASS_DATAVIEW)
-#define DUK_HOBJECT_CMASK_INT8ARRAY (1UL << DUK_HOBJECT_CLASS_INT8ARRAY)
-#define DUK_HOBJECT_CMASK_UINT8ARRAY (1UL << DUK_HOBJECT_CLASS_UINT8ARRAY)
-#define DUK_HOBJECT_CMASK_UINT8CLAMPEDARRAY (1UL << DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY)
-#define DUK_HOBJECT_CMASK_INT16ARRAY (1UL << DUK_HOBJECT_CLASS_INT16ARRAY)
-#define DUK_HOBJECT_CMASK_UINT16ARRAY (1UL << DUK_HOBJECT_CLASS_UINT16ARRAY)
-#define DUK_HOBJECT_CMASK_INT32ARRAY (1UL << DUK_HOBJECT_CLASS_INT32ARRAY)
-#define DUK_HOBJECT_CMASK_UINT32ARRAY (1UL << DUK_HOBJECT_CLASS_UINT32ARRAY)
-#define DUK_HOBJECT_CMASK_FLOAT32ARRAY (1UL << DUK_HOBJECT_CLASS_FLOAT32ARRAY)
-#define DUK_HOBJECT_CMASK_FLOAT64ARRAY (1UL << DUK_HOBJECT_CLASS_FLOAT64ARRAY)
+#define DUK_HOBJECT_CMASK_ALL ((1UL << (DUK_HOBJECT_CLASS_MAX + 1)) - 1UL)
+#define DUK_HOBJECT_CMASK_NONE (1UL << DUK_HOBJECT_CLASS_NONE)
+#define DUK_HOBJECT_CMASK_ARGUMENTS (1UL << DUK_HOBJECT_CLASS_ARGUMENTS)
+#define DUK_HOBJECT_CMASK_ARRAY (1UL << DUK_HOBJECT_CLASS_ARRAY)
+#define DUK_HOBJECT_CMASK_BOOLEAN (1UL << DUK_HOBJECT_CLASS_BOOLEAN)
+#define DUK_HOBJECT_CMASK_DATE (1UL << DUK_HOBJECT_CLASS_DATE)
+#define DUK_HOBJECT_CMASK_ERROR (1UL << DUK_HOBJECT_CLASS_ERROR)
+#define DUK_HOBJECT_CMASK_FUNCTION (1UL << DUK_HOBJECT_CLASS_FUNCTION)
+#define DUK_HOBJECT_CMASK_JSON (1UL << DUK_HOBJECT_CLASS_JSON)
+#define DUK_HOBJECT_CMASK_MATH (1UL << DUK_HOBJECT_CLASS_MATH)
+#define DUK_HOBJECT_CMASK_NUMBER (1UL << DUK_HOBJECT_CLASS_NUMBER)
+#define DUK_HOBJECT_CMASK_OBJECT (1UL << DUK_HOBJECT_CLASS_OBJECT)
+#define DUK_HOBJECT_CMASK_REGEXP (1UL << DUK_HOBJECT_CLASS_REGEXP)
+#define DUK_HOBJECT_CMASK_STRING (1UL << DUK_HOBJECT_CLASS_STRING)
+#define DUK_HOBJECT_CMASK_GLOBAL (1UL << DUK_HOBJECT_CLASS_GLOBAL)
+#define DUK_HOBJECT_CMASK_SYMBOL (1UL << DUK_HOBJECT_CLASS_SYMBOL)
+#define DUK_HOBJECT_CMASK_OBJENV (1UL << DUK_HOBJECT_CLASS_OBJENV)
+#define DUK_HOBJECT_CMASK_DECENV (1UL << DUK_HOBJECT_CLASS_DECENV)
+#define DUK_HOBJECT_CMASK_POINTER (1UL << DUK_HOBJECT_CLASS_POINTER)
+#define DUK_HOBJECT_CMASK_ARRAYBUFFER (1UL << DUK_HOBJECT_CLASS_ARRAYBUFFER)
+#define DUK_HOBJECT_CMASK_DATAVIEW (1UL << DUK_HOBJECT_CLASS_DATAVIEW)
+#define DUK_HOBJECT_CMASK_INT8ARRAY (1UL << DUK_HOBJECT_CLASS_INT8ARRAY)
+#define DUK_HOBJECT_CMASK_UINT8ARRAY (1UL << DUK_HOBJECT_CLASS_UINT8ARRAY)
+#define DUK_HOBJECT_CMASK_UINT8CLAMPEDARRAY (1UL << DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY)
+#define DUK_HOBJECT_CMASK_INT16ARRAY (1UL << DUK_HOBJECT_CLASS_INT16ARRAY)
+#define DUK_HOBJECT_CMASK_UINT16ARRAY (1UL << DUK_HOBJECT_CLASS_UINT16ARRAY)
+#define DUK_HOBJECT_CMASK_INT32ARRAY (1UL << DUK_HOBJECT_CLASS_INT32ARRAY)
+#define DUK_HOBJECT_CMASK_UINT32ARRAY (1UL << DUK_HOBJECT_CLASS_UINT32ARRAY)
+#define DUK_HOBJECT_CMASK_FLOAT32ARRAY (1UL << DUK_HOBJECT_CLASS_FLOAT32ARRAY)
+#define DUK_HOBJECT_CMASK_FLOAT64ARRAY (1UL << DUK_HOBJECT_CLASS_FLOAT64ARRAY)
#define DUK_HOBJECT_CMASK_ALL_BUFOBJS \
- (DUK_HOBJECT_CMASK_ARRAYBUFFER | \
- DUK_HOBJECT_CMASK_DATAVIEW | \
- DUK_HOBJECT_CMASK_INT8ARRAY | \
- DUK_HOBJECT_CMASK_UINT8ARRAY | \
- DUK_HOBJECT_CMASK_UINT8CLAMPEDARRAY | \
- DUK_HOBJECT_CMASK_INT16ARRAY | \
- DUK_HOBJECT_CMASK_UINT16ARRAY | \
- DUK_HOBJECT_CMASK_INT32ARRAY | \
- DUK_HOBJECT_CMASK_UINT32ARRAY | \
- DUK_HOBJECT_CMASK_FLOAT32ARRAY | \
+ (DUK_HOBJECT_CMASK_ARRAYBUFFER | DUK_HOBJECT_CMASK_DATAVIEW | DUK_HOBJECT_CMASK_INT8ARRAY | DUK_HOBJECT_CMASK_UINT8ARRAY | \
+ DUK_HOBJECT_CMASK_UINT8CLAMPEDARRAY | DUK_HOBJECT_CMASK_INT16ARRAY | DUK_HOBJECT_CMASK_UINT16ARRAY | \
+ DUK_HOBJECT_CMASK_INT32ARRAY | DUK_HOBJECT_CMASK_UINT32ARRAY | DUK_HOBJECT_CMASK_FLOAT32ARRAY | \
DUK_HOBJECT_CMASK_FLOAT64ARRAY)
-#define DUK_HOBJECT_IS_OBJENV(h) (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_OBJENV)
-#define DUK_HOBJECT_IS_DECENV(h) (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_DECENV)
-#define DUK_HOBJECT_IS_ENV(h) (DUK_HOBJECT_IS_OBJENV((h)) || DUK_HOBJECT_IS_DECENV((h)))
-#define DUK_HOBJECT_IS_ARRAY(h) DUK_HOBJECT_HAS_EXOTIC_ARRAY((h)) /* Rely on class Array <=> exotic Array */
-#define DUK_HOBJECT_IS_BOUNDFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
-#define DUK_HOBJECT_IS_COMPFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
-#define DUK_HOBJECT_IS_NATFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
+#define DUK_HOBJECT_IS_OBJENV(h) (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_OBJENV)
+#define DUK_HOBJECT_IS_DECENV(h) (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_DECENV)
+#define DUK_HOBJECT_IS_ENV(h) (DUK_HOBJECT_IS_OBJENV((h)) || DUK_HOBJECT_IS_DECENV((h)))
+#define DUK_HOBJECT_IS_ARRAY(h) DUK_HOBJECT_HAS_EXOTIC_ARRAY((h)) /* Rely on class Array <=> exotic Array */
+#define DUK_HOBJECT_IS_BOUNDFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
+#define DUK_HOBJECT_IS_COMPFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
+#define DUK_HOBJECT_IS_NATFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-#define DUK_HOBJECT_IS_BUFOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
+#define DUK_HOBJECT_IS_BUFOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
#else
-#define DUK_HOBJECT_IS_BUFOBJ(h) 0
+#define DUK_HOBJECT_IS_BUFOBJ(h) 0
#endif
-#define DUK_HOBJECT_IS_THREAD(h) (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_THREAD)
+#define DUK_HOBJECT_IS_THREAD(h) (DUK_HOBJECT_GET_CLASS_NUMBER((h)) == DUK_HOBJECT_CLASS_THREAD)
#if defined(DUK_USE_ES6_PROXY)
-#define DUK_HOBJECT_IS_PROXY(h) DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ((h))
+#define DUK_HOBJECT_IS_PROXY(h) DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ((h))
#else
-#define DUK_HOBJECT_IS_PROXY(h) 0
+#define DUK_HOBJECT_IS_PROXY(h) 0
#endif
-#define DUK_HOBJECT_IS_NONBOUND_FUNCTION(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, \
- DUK_HOBJECT_FLAG_COMPFUNC | \
- DUK_HOBJECT_FLAG_NATFUNC)
+#define DUK_HOBJECT_IS_NONBOUND_FUNCTION(h) \
+ DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC | DUK_HOBJECT_FLAG_NATFUNC)
-#define DUK_HOBJECT_IS_FUNCTION(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, \
- DUK_HOBJECT_FLAG_BOUNDFUNC | \
- DUK_HOBJECT_FLAG_COMPFUNC | \
- DUK_HOBJECT_FLAG_NATFUNC)
+#define DUK_HOBJECT_IS_FUNCTION(h) \
+ DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC | DUK_HOBJECT_FLAG_COMPFUNC | DUK_HOBJECT_FLAG_NATFUNC)
-#define DUK_HOBJECT_IS_CALLABLE(h) DUK_HOBJECT_HAS_CALLABLE((h))
+#define DUK_HOBJECT_IS_CALLABLE(h) DUK_HOBJECT_HAS_CALLABLE((h))
/* Object has any exotic behavior(s). */
-#define DUK_HOBJECT_EXOTIC_BEHAVIOR_FLAGS (DUK_HOBJECT_FLAG_EXOTIC_ARRAY | \
- DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS | \
- DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ | \
- DUK_HOBJECT_FLAG_BUFOBJ | \
- DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
-#define DUK_HOBJECT_HAS_EXOTIC_BEHAVIOR(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_EXOTIC_BEHAVIOR_FLAGS)
+#define DUK_HOBJECT_EXOTIC_BEHAVIOR_FLAGS \
+ (DUK_HOBJECT_FLAG_EXOTIC_ARRAY | DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS | DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ | \
+ DUK_HOBJECT_FLAG_BUFOBJ | DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
+#define DUK_HOBJECT_HAS_EXOTIC_BEHAVIOR(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_EXOTIC_BEHAVIOR_FLAGS)
/* Object has any virtual properties (not counting Proxy behavior). */
-#define DUK_HOBJECT_VIRTUAL_PROPERTY_FLAGS (DUK_HOBJECT_FLAG_EXOTIC_ARRAY | \
- DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ | \
- DUK_HOBJECT_FLAG_BUFOBJ)
-#define DUK_HOBJECT_HAS_VIRTUAL_PROPERTIES(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_VIRTUAL_PROPERTY_FLAGS)
-
-#define DUK_HOBJECT_HAS_EXTENSIBLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXTENSIBLE)
-#define DUK_HOBJECT_HAS_CONSTRUCTABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CONSTRUCTABLE)
-#define DUK_HOBJECT_HAS_CALLABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CALLABLE)
-#define DUK_HOBJECT_HAS_BOUNDFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
-#define DUK_HOBJECT_HAS_COMPFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
-#define DUK_HOBJECT_HAS_NATFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
+#define DUK_HOBJECT_VIRTUAL_PROPERTY_FLAGS \
+ (DUK_HOBJECT_FLAG_EXOTIC_ARRAY | DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ | DUK_HOBJECT_FLAG_BUFOBJ)
+#define DUK_HOBJECT_HAS_VIRTUAL_PROPERTIES(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_VIRTUAL_PROPERTY_FLAGS)
+
+#define DUK_HOBJECT_HAS_EXTENSIBLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXTENSIBLE)
+#define DUK_HOBJECT_HAS_CONSTRUCTABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CONSTRUCTABLE)
+#define DUK_HOBJECT_HAS_CALLABLE(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CALLABLE)
+#define DUK_HOBJECT_HAS_BOUNDFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
+#define DUK_HOBJECT_HAS_COMPFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
+#define DUK_HOBJECT_HAS_NATFUNC(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-#define DUK_HOBJECT_HAS_BUFOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
+#define DUK_HOBJECT_HAS_BUFOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
#else
-#define DUK_HOBJECT_HAS_BUFOBJ(h) 0
-#endif
-#define DUK_HOBJECT_HAS_FASTREFS(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_FASTREFS)
-#define DUK_HOBJECT_HAS_ARRAY_PART(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_ARRAY_PART)
-#define DUK_HOBJECT_HAS_STRICT(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_STRICT)
-#define DUK_HOBJECT_HAS_NOTAIL(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NOTAIL)
-#define DUK_HOBJECT_HAS_NEWENV(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NEWENV)
-#define DUK_HOBJECT_HAS_NAMEBINDING(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NAMEBINDING)
-#define DUK_HOBJECT_HAS_CREATEARGS(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CREATEARGS)
-#define DUK_HOBJECT_HAS_HAVE_FINALIZER(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_HAVE_FINALIZER)
-#define DUK_HOBJECT_HAS_EXOTIC_ARRAY(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARRAY)
-#define DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ)
-#define DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS)
+#define DUK_HOBJECT_HAS_BUFOBJ(h) 0
+#endif
+#define DUK_HOBJECT_HAS_FASTREFS(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_FASTREFS)
+#define DUK_HOBJECT_HAS_ARRAY_PART(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_ARRAY_PART)
+#define DUK_HOBJECT_HAS_STRICT(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_STRICT)
+#define DUK_HOBJECT_HAS_NOTAIL(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NOTAIL)
+#define DUK_HOBJECT_HAS_NEWENV(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NEWENV)
+#define DUK_HOBJECT_HAS_NAMEBINDING(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NAMEBINDING)
+#define DUK_HOBJECT_HAS_CREATEARGS(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CREATEARGS)
+#define DUK_HOBJECT_HAS_HAVE_FINALIZER(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_HAVE_FINALIZER)
+#define DUK_HOBJECT_HAS_EXOTIC_ARRAY(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARRAY)
+#define DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ)
+#define DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS)
#if defined(DUK_USE_ES6_PROXY)
-#define DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
+#define DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
#else
-#define DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ(h) 0
+#define DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ(h) 0
#endif
-#define DUK_HOBJECT_HAS_SPECIAL_CALL(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_SPECIAL_CALL)
+#define DUK_HOBJECT_HAS_SPECIAL_CALL(h) DUK_HEAPHDR_CHECK_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_SPECIAL_CALL)
-#define DUK_HOBJECT_SET_EXTENSIBLE(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXTENSIBLE)
-#define DUK_HOBJECT_SET_CONSTRUCTABLE(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CONSTRUCTABLE)
-#define DUK_HOBJECT_SET_CALLABLE(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CALLABLE)
-#define DUK_HOBJECT_SET_BOUNDFUNC(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
-#define DUK_HOBJECT_SET_COMPFUNC(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
-#define DUK_HOBJECT_SET_NATFUNC(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
+#define DUK_HOBJECT_SET_EXTENSIBLE(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXTENSIBLE)
+#define DUK_HOBJECT_SET_CONSTRUCTABLE(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CONSTRUCTABLE)
+#define DUK_HOBJECT_SET_CALLABLE(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CALLABLE)
+#define DUK_HOBJECT_SET_BOUNDFUNC(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
+#define DUK_HOBJECT_SET_COMPFUNC(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
+#define DUK_HOBJECT_SET_NATFUNC(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-#define DUK_HOBJECT_SET_BUFOBJ(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
-#endif
-#define DUK_HOBJECT_SET_FASTREFS(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_FASTREFS)
-#define DUK_HOBJECT_SET_ARRAY_PART(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_ARRAY_PART)
-#define DUK_HOBJECT_SET_STRICT(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_STRICT)
-#define DUK_HOBJECT_SET_NOTAIL(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NOTAIL)
-#define DUK_HOBJECT_SET_NEWENV(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NEWENV)
-#define DUK_HOBJECT_SET_NAMEBINDING(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NAMEBINDING)
-#define DUK_HOBJECT_SET_CREATEARGS(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CREATEARGS)
-#define DUK_HOBJECT_SET_HAVE_FINALIZER(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_HAVE_FINALIZER)
-#define DUK_HOBJECT_SET_EXOTIC_ARRAY(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARRAY)
-#define DUK_HOBJECT_SET_EXOTIC_STRINGOBJ(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ)
-#define DUK_HOBJECT_SET_EXOTIC_ARGUMENTS(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS)
+#define DUK_HOBJECT_SET_BUFOBJ(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
+#endif
+#define DUK_HOBJECT_SET_FASTREFS(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_FASTREFS)
+#define DUK_HOBJECT_SET_ARRAY_PART(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_ARRAY_PART)
+#define DUK_HOBJECT_SET_STRICT(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_STRICT)
+#define DUK_HOBJECT_SET_NOTAIL(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NOTAIL)
+#define DUK_HOBJECT_SET_NEWENV(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NEWENV)
+#define DUK_HOBJECT_SET_NAMEBINDING(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NAMEBINDING)
+#define DUK_HOBJECT_SET_CREATEARGS(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CREATEARGS)
+#define DUK_HOBJECT_SET_HAVE_FINALIZER(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_HAVE_FINALIZER)
+#define DUK_HOBJECT_SET_EXOTIC_ARRAY(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARRAY)
+#define DUK_HOBJECT_SET_EXOTIC_STRINGOBJ(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ)
+#define DUK_HOBJECT_SET_EXOTIC_ARGUMENTS(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS)
#if defined(DUK_USE_ES6_PROXY)
-#define DUK_HOBJECT_SET_EXOTIC_PROXYOBJ(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
+#define DUK_HOBJECT_SET_EXOTIC_PROXYOBJ(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
#endif
-#define DUK_HOBJECT_SET_SPECIAL_CALL(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_SPECIAL_CALL)
+#define DUK_HOBJECT_SET_SPECIAL_CALL(h) DUK_HEAPHDR_SET_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_SPECIAL_CALL)
-#define DUK_HOBJECT_CLEAR_EXTENSIBLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXTENSIBLE)
-#define DUK_HOBJECT_CLEAR_CONSTRUCTABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CONSTRUCTABLE)
-#define DUK_HOBJECT_CLEAR_CALLABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CALLABLE)
-#define DUK_HOBJECT_CLEAR_BOUNDFUNC(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
-#define DUK_HOBJECT_CLEAR_COMPFUNC(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
-#define DUK_HOBJECT_CLEAR_NATFUNC(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
+#define DUK_HOBJECT_CLEAR_EXTENSIBLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXTENSIBLE)
+#define DUK_HOBJECT_CLEAR_CONSTRUCTABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CONSTRUCTABLE)
+#define DUK_HOBJECT_CLEAR_CALLABLE(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CALLABLE)
+#define DUK_HOBJECT_CLEAR_BOUNDFUNC(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BOUNDFUNC)
+#define DUK_HOBJECT_CLEAR_COMPFUNC(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_COMPFUNC)
+#define DUK_HOBJECT_CLEAR_NATFUNC(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NATFUNC)
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-#define DUK_HOBJECT_CLEAR_BUFOBJ(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
-#endif
-#define DUK_HOBJECT_CLEAR_FASTREFS(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_FASTREFS)
-#define DUK_HOBJECT_CLEAR_ARRAY_PART(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_ARRAY_PART)
-#define DUK_HOBJECT_CLEAR_STRICT(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_STRICT)
-#define DUK_HOBJECT_CLEAR_NOTAIL(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NOTAIL)
-#define DUK_HOBJECT_CLEAR_NEWENV(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NEWENV)
-#define DUK_HOBJECT_CLEAR_NAMEBINDING(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NAMEBINDING)
-#define DUK_HOBJECT_CLEAR_CREATEARGS(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CREATEARGS)
-#define DUK_HOBJECT_CLEAR_HAVE_FINALIZER(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_HAVE_FINALIZER)
-#define DUK_HOBJECT_CLEAR_EXOTIC_ARRAY(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARRAY)
-#define DUK_HOBJECT_CLEAR_EXOTIC_STRINGOBJ(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ)
-#define DUK_HOBJECT_CLEAR_EXOTIC_ARGUMENTS(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS)
+#define DUK_HOBJECT_CLEAR_BUFOBJ(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_BUFOBJ)
+#endif
+#define DUK_HOBJECT_CLEAR_FASTREFS(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_FASTREFS)
+#define DUK_HOBJECT_CLEAR_ARRAY_PART(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_ARRAY_PART)
+#define DUK_HOBJECT_CLEAR_STRICT(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_STRICT)
+#define DUK_HOBJECT_CLEAR_NOTAIL(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NOTAIL)
+#define DUK_HOBJECT_CLEAR_NEWENV(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NEWENV)
+#define DUK_HOBJECT_CLEAR_NAMEBINDING(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_NAMEBINDING)
+#define DUK_HOBJECT_CLEAR_CREATEARGS(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_CREATEARGS)
+#define DUK_HOBJECT_CLEAR_HAVE_FINALIZER(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_HAVE_FINALIZER)
+#define DUK_HOBJECT_CLEAR_EXOTIC_ARRAY(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARRAY)
+#define DUK_HOBJECT_CLEAR_EXOTIC_STRINGOBJ(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ)
+#define DUK_HOBJECT_CLEAR_EXOTIC_ARGUMENTS(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS)
#if defined(DUK_USE_ES6_PROXY)
-#define DUK_HOBJECT_CLEAR_EXOTIC_PROXYOBJ(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
+#define DUK_HOBJECT_CLEAR_EXOTIC_PROXYOBJ(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ)
#endif
-#define DUK_HOBJECT_CLEAR_SPECIAL_CALL(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_SPECIAL_CALL)
+#define DUK_HOBJECT_CLEAR_SPECIAL_CALL(h) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(h)->hdr, DUK_HOBJECT_FLAG_SPECIAL_CALL)
/* Object can/cannot use FASTREFS, i.e. has no strong reference fields beyond
* duk_hobject base header. This is used just for asserts so doesn't need to
* be optimized.
*/
#define DUK_HOBJECT_PROHIBITS_FASTREFS(h) \
- (DUK_HOBJECT_IS_COMPFUNC((h)) || DUK_HOBJECT_IS_DECENV((h)) || DUK_HOBJECT_IS_OBJENV((h)) || \
- DUK_HOBJECT_IS_BUFOBJ((h)) || DUK_HOBJECT_IS_THREAD((h)) || DUK_HOBJECT_IS_PROXY((h)) || \
- DUK_HOBJECT_IS_BOUNDFUNC((h)))
+ (DUK_HOBJECT_IS_COMPFUNC((h)) || DUK_HOBJECT_IS_DECENV((h)) || DUK_HOBJECT_IS_OBJENV((h)) || DUK_HOBJECT_IS_BUFOBJ((h)) || \
+ DUK_HOBJECT_IS_THREAD((h)) || DUK_HOBJECT_IS_PROXY((h)) || DUK_HOBJECT_IS_BOUNDFUNC((h)))
#define DUK_HOBJECT_ALLOWS_FASTREFS(h) (!DUK_HOBJECT_PROHIBITS_FASTREFS((h)))
/* Flags used for property attributes in duk_propdesc and packed flags.
* Must fit into 8 bits.
*/
-#define DUK_PROPDESC_FLAG_WRITABLE (1U << 0) /* E5 Section 8.6.1 */
-#define DUK_PROPDESC_FLAG_ENUMERABLE (1U << 1) /* E5 Section 8.6.1 */
-#define DUK_PROPDESC_FLAG_CONFIGURABLE (1U << 2) /* E5 Section 8.6.1 */
-#define DUK_PROPDESC_FLAG_ACCESSOR (1U << 3) /* accessor */
-#define DUK_PROPDESC_FLAG_VIRTUAL (1U << 4) /* property is virtual: used in duk_propdesc, never stored
- * (used by e.g. buffer virtual properties)
- */
-#define DUK_PROPDESC_FLAGS_MASK (DUK_PROPDESC_FLAG_WRITABLE | \
- DUK_PROPDESC_FLAG_ENUMERABLE | \
- DUK_PROPDESC_FLAG_CONFIGURABLE | \
- DUK_PROPDESC_FLAG_ACCESSOR)
+#define DUK_PROPDESC_FLAG_WRITABLE (1U << 0) /* E5 Section 8.6.1 */
+#define DUK_PROPDESC_FLAG_ENUMERABLE (1U << 1) /* E5 Section 8.6.1 */
+#define DUK_PROPDESC_FLAG_CONFIGURABLE (1U << 2) /* E5 Section 8.6.1 */
+#define DUK_PROPDESC_FLAG_ACCESSOR (1U << 3) /* accessor */
+#define DUK_PROPDESC_FLAG_VIRTUAL \
+ (1U << 4) /* property is virtual: used in duk_propdesc, never stored \
+ * (used by e.g. buffer virtual properties) \
+ */
+#define DUK_PROPDESC_FLAGS_MASK \
+ (DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE | DUK_PROPDESC_FLAG_CONFIGURABLE | DUK_PROPDESC_FLAG_ACCESSOR)
/* Additional flags which are passed in the same flags argument as property
* flags but are not stored in object properties.
*/
-#define DUK_PROPDESC_FLAG_NO_OVERWRITE (1U << 4) /* internal define property: skip write silently if exists */
+#define DUK_PROPDESC_FLAG_NO_OVERWRITE (1U << 4) /* internal define property: skip write silently if exists */
/* Convenience defines for property attributes. */
-#define DUK_PROPDESC_FLAGS_NONE 0
-#define DUK_PROPDESC_FLAGS_W (DUK_PROPDESC_FLAG_WRITABLE)
-#define DUK_PROPDESC_FLAGS_E (DUK_PROPDESC_FLAG_ENUMERABLE)
-#define DUK_PROPDESC_FLAGS_C (DUK_PROPDESC_FLAG_CONFIGURABLE)
-#define DUK_PROPDESC_FLAGS_WE (DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE)
-#define DUK_PROPDESC_FLAGS_WC (DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_CONFIGURABLE)
-#define DUK_PROPDESC_FLAGS_EC (DUK_PROPDESC_FLAG_ENUMERABLE | DUK_PROPDESC_FLAG_CONFIGURABLE)
-#define DUK_PROPDESC_FLAGS_WEC (DUK_PROPDESC_FLAG_WRITABLE | \
- DUK_PROPDESC_FLAG_ENUMERABLE | \
- DUK_PROPDESC_FLAG_CONFIGURABLE)
+#define DUK_PROPDESC_FLAGS_NONE 0
+#define DUK_PROPDESC_FLAGS_W (DUK_PROPDESC_FLAG_WRITABLE)
+#define DUK_PROPDESC_FLAGS_E (DUK_PROPDESC_FLAG_ENUMERABLE)
+#define DUK_PROPDESC_FLAGS_C (DUK_PROPDESC_FLAG_CONFIGURABLE)
+#define DUK_PROPDESC_FLAGS_WE (DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE)
+#define DUK_PROPDESC_FLAGS_WC (DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_CONFIGURABLE)
+#define DUK_PROPDESC_FLAGS_EC (DUK_PROPDESC_FLAG_ENUMERABLE | DUK_PROPDESC_FLAG_CONFIGURABLE)
+#define DUK_PROPDESC_FLAGS_WEC (DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE | DUK_PROPDESC_FLAG_CONFIGURABLE)
/* Flags for duk_hobject_get_own_propdesc() and variants. */
-#define DUK_GETDESC_FLAG_PUSH_VALUE (1U << 0) /* push value to stack */
-#define DUK_GETDESC_FLAG_IGNORE_PROTOLOOP (1U << 1) /* don't throw for prototype loop */
+#define DUK_GETDESC_FLAG_PUSH_VALUE (1U << 0) /* push value to stack */
+#define DUK_GETDESC_FLAG_IGNORE_PROTOLOOP (1U << 1) /* don't throw for prototype loop */
/*
* Macro for object validity check
@@ -6362,9 +6871,14 @@ DUK_INTERNAL_DECL void duk_hstring_init_charlen(duk_hstring *h);
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
-#define DUK_HOBJECT_ASSERT_VALID(h) do { duk_hobject_assert_valid((h)); } while (0)
+#define DUK_HOBJECT_ASSERT_VALID(h) \
+ do { \
+ duk_hobject_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HOBJECT_ASSERT_VALID(h) do {} while (0)
+#define DUK_HOBJECT_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
/*
@@ -6372,52 +6886,41 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
*/
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HOBJECT_GET_PROPS(heap,h) \
- ((duk_uint8_t *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, ((duk_heaphdr *) (h))->h_extra16))
-#define DUK_HOBJECT_SET_PROPS(heap,h,x) do { \
+#define DUK_HOBJECT_GET_PROPS(heap, h) ((duk_uint8_t *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, ((duk_heaphdr *) (h))->h_extra16))
+#define DUK_HOBJECT_SET_PROPS(heap, h, x) \
+ do { \
((duk_heaphdr *) (h))->h_extra16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (x)); \
} while (0)
#else
-#define DUK_HOBJECT_GET_PROPS(heap,h) \
- ((h)->props)
-#define DUK_HOBJECT_SET_PROPS(heap,h,x) do { \
+#define DUK_HOBJECT_GET_PROPS(heap, h) ((h)->props)
+#define DUK_HOBJECT_SET_PROPS(heap, h, x) \
+ do { \
(h)->props = (duk_uint8_t *) (x); \
} while (0)
#endif
#if defined(DUK_USE_HOBJECT_LAYOUT_1)
/* LAYOUT 1 */
-#define DUK_HOBJECT_E_GET_KEY_BASE(heap,h) \
- ((duk_hstring **) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) \
- ))
-#define DUK_HOBJECT_E_GET_VALUE_BASE(heap,h) \
- ((duk_propvalue *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_hstring *) \
- ))
-#define DUK_HOBJECT_E_GET_FLAGS_BASE(heap,h) \
- ((duk_uint8_t *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue)) \
- ))
-#define DUK_HOBJECT_A_GET_BASE(heap,h) \
- ((duk_tval *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) \
- ))
-#define DUK_HOBJECT_H_GET_BASE(heap,h) \
- ((duk_uint32_t *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
- DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval) \
- ))
-#define DUK_HOBJECT_P_COMPUTE_SIZE(n_ent,n_arr,n_hash) \
- ( \
- (n_ent) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
- (n_arr) * sizeof(duk_tval) + \
- (n_hash) * sizeof(duk_uint32_t) \
- )
-#define DUK_HOBJECT_P_SET_REALLOC_PTRS(p_base,set_e_k,set_e_pv,set_e_f,set_a,set_h,n_ent,n_arr,n_hash) do { \
+#define DUK_HOBJECT_E_GET_KEY_BASE(heap, h) ((duk_hstring **) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h))))
+#define DUK_HOBJECT_E_GET_VALUE_BASE(heap, h) \
+ ((duk_propvalue *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_hstring *)))
+#define DUK_HOBJECT_E_GET_FLAGS_BASE(heap, h) \
+ ((duk_uint8_t *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue))))
+#define DUK_HOBJECT_A_GET_BASE(heap, h) \
+ ((duk_tval *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * \
+ (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t))))
+#define DUK_HOBJECT_H_GET_BASE(heap, h) \
+ ((duk_uint32_t *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * \
+ (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
+ DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval)))
+#define DUK_HOBJECT_P_COMPUTE_SIZE(n_ent, n_arr, n_hash) \
+ ((n_ent) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + (n_arr) * sizeof(duk_tval) + \
+ (n_hash) * sizeof(duk_uint32_t))
+#define DUK_HOBJECT_P_SET_REALLOC_PTRS(p_base, set_e_k, set_e_pv, set_e_f, set_a, set_h, n_ent, n_arr, n_hash) \
+ do { \
(set_e_k) = (duk_hstring **) (void *) (p_base); \
(set_e_pv) = (duk_propvalue *) (void *) ((set_e_k) + (n_ent)); \
(set_e_f) = (duk_uint8_t *) (void *) ((set_e_pv) + (n_ent)); \
@@ -6435,85 +6938,57 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
#else
#error invalid DUK_USE_ALIGN_BY
#endif
-#define DUK_HOBJECT_E_GET_KEY_BASE(heap,h) \
- ((duk_hstring **) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_propvalue) \
- ))
-#define DUK_HOBJECT_E_GET_VALUE_BASE(heap,h) \
- ((duk_propvalue *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) \
- ))
-#define DUK_HOBJECT_E_GET_FLAGS_BASE(heap,h) \
- ((duk_uint8_t *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue)) \
- ))
-#define DUK_HOBJECT_A_GET_BASE(heap,h) \
- ((duk_tval *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
- DUK_HOBJECT_E_FLAG_PADDING(DUK_HOBJECT_GET_ESIZE((h))) \
- ))
-#define DUK_HOBJECT_H_GET_BASE(heap,h) \
- ((duk_uint32_t *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
- DUK_HOBJECT_E_FLAG_PADDING(DUK_HOBJECT_GET_ESIZE((h))) + \
- DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval) \
- ))
-#define DUK_HOBJECT_P_COMPUTE_SIZE(n_ent,n_arr,n_hash) \
- ( \
- (n_ent) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
- DUK_HOBJECT_E_FLAG_PADDING((n_ent)) + \
- (n_arr) * sizeof(duk_tval) + \
- (n_hash) * sizeof(duk_uint32_t) \
- )
-#define DUK_HOBJECT_P_SET_REALLOC_PTRS(p_base,set_e_k,set_e_pv,set_e_f,set_a,set_h,n_ent,n_arr,n_hash) do { \
+#define DUK_HOBJECT_E_GET_KEY_BASE(heap, h) \
+ ((duk_hstring **) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_propvalue)))
+#define DUK_HOBJECT_E_GET_VALUE_BASE(heap, h) ((duk_propvalue *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h))))
+#define DUK_HOBJECT_E_GET_FLAGS_BASE(heap, h) \
+ ((duk_uint8_t *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_hstring *) + sizeof(duk_propvalue))))
+#define DUK_HOBJECT_A_GET_BASE(heap, h) \
+ ((duk_tval *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * \
+ (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
+ DUK_HOBJECT_E_FLAG_PADDING(DUK_HOBJECT_GET_ESIZE((h)))))
+#define DUK_HOBJECT_H_GET_BASE(heap, h) \
+ ((duk_uint32_t *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * \
+ (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + \
+ DUK_HOBJECT_E_FLAG_PADDING(DUK_HOBJECT_GET_ESIZE((h))) + \
+ DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval)))
+#define DUK_HOBJECT_P_COMPUTE_SIZE(n_ent, n_arr, n_hash) \
+ ((n_ent) * (sizeof(duk_hstring *) + sizeof(duk_propvalue) + sizeof(duk_uint8_t)) + DUK_HOBJECT_E_FLAG_PADDING((n_ent)) + \
+ (n_arr) * sizeof(duk_tval) + (n_hash) * sizeof(duk_uint32_t))
+#define DUK_HOBJECT_P_SET_REALLOC_PTRS(p_base, set_e_k, set_e_pv, set_e_f, set_a, set_h, n_ent, n_arr, n_hash) \
+ do { \
(set_e_pv) = (duk_propvalue *) (void *) (p_base); \
(set_e_k) = (duk_hstring **) (void *) ((set_e_pv) + (n_ent)); \
(set_e_f) = (duk_uint8_t *) (void *) ((set_e_k) + (n_ent)); \
- (set_a) = (duk_tval *) (void *) (((duk_uint8_t *) (set_e_f)) + \
- sizeof(duk_uint8_t) * (n_ent) + \
+ (set_a) = (duk_tval *) (void *) (((duk_uint8_t *) (set_e_f)) + sizeof(duk_uint8_t) * (n_ent) + \
DUK_HOBJECT_E_FLAG_PADDING((n_ent))); \
(set_h) = (duk_uint32_t *) (void *) ((set_a) + (n_arr)); \
} while (0)
#elif defined(DUK_USE_HOBJECT_LAYOUT_3)
/* LAYOUT 3 */
-#define DUK_HOBJECT_E_GET_KEY_BASE(heap,h) \
- ((duk_hstring **) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_propvalue) + \
- DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval) \
- ))
-#define DUK_HOBJECT_E_GET_VALUE_BASE(heap,h) \
- ((duk_propvalue *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) \
- ))
-#define DUK_HOBJECT_E_GET_FLAGS_BASE(heap,h) \
- ((duk_uint8_t *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_propvalue) + sizeof(duk_hstring *)) + \
- DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval) + \
- DUK_HOBJECT_GET_HSIZE((h)) * sizeof(duk_uint32_t) \
- ))
-#define DUK_HOBJECT_A_GET_BASE(heap,h) \
- ((duk_tval *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_propvalue) \
- ))
-#define DUK_HOBJECT_H_GET_BASE(heap,h) \
- ((duk_uint32_t *) (void *) ( \
- DUK_HOBJECT_GET_PROPS((heap), (h)) + \
- DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_propvalue) + sizeof(duk_hstring *)) + \
- DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval) \
- ))
-#define DUK_HOBJECT_P_COMPUTE_SIZE(n_ent,n_arr,n_hash) \
- ( \
- (n_ent) * (sizeof(duk_propvalue) + sizeof(duk_hstring *) + sizeof(duk_uint8_t)) + \
- (n_arr) * sizeof(duk_tval) + \
- (n_hash) * sizeof(duk_uint32_t) \
- )
-#define DUK_HOBJECT_P_SET_REALLOC_PTRS(p_base,set_e_k,set_e_pv,set_e_f,set_a,set_h,n_ent,n_arr,n_hash) do { \
+#define DUK_HOBJECT_E_GET_KEY_BASE(heap, h) \
+ ((duk_hstring **) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_propvalue) + \
+ DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval)))
+#define DUK_HOBJECT_E_GET_VALUE_BASE(heap, h) ((duk_propvalue *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h))))
+#define DUK_HOBJECT_E_GET_FLAGS_BASE(heap, h) \
+ ((duk_uint8_t *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_propvalue) + sizeof(duk_hstring *)) + \
+ DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval) + \
+ DUK_HOBJECT_GET_HSIZE((h)) * sizeof(duk_uint32_t)))
+#define DUK_HOBJECT_A_GET_BASE(heap, h) \
+ ((duk_tval *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + DUK_HOBJECT_GET_ESIZE((h)) * sizeof(duk_propvalue)))
+#define DUK_HOBJECT_H_GET_BASE(heap, h) \
+ ((duk_uint32_t *) (void *) (DUK_HOBJECT_GET_PROPS((heap), (h)) + \
+ DUK_HOBJECT_GET_ESIZE((h)) * (sizeof(duk_propvalue) + sizeof(duk_hstring *)) + \
+ DUK_HOBJECT_GET_ASIZE((h)) * sizeof(duk_tval)))
+#define DUK_HOBJECT_P_COMPUTE_SIZE(n_ent, n_arr, n_hash) \
+ ((n_ent) * (sizeof(duk_propvalue) + sizeof(duk_hstring *) + sizeof(duk_uint8_t)) + (n_arr) * sizeof(duk_tval) + \
+ (n_hash) * sizeof(duk_uint32_t))
+#define DUK_HOBJECT_P_SET_REALLOC_PTRS(p_base, set_e_k, set_e_pv, set_e_f, set_a, set_h, n_ent, n_arr, n_hash) \
+ do { \
(set_e_pv) = (duk_propvalue *) (void *) (p_base); \
(set_a) = (duk_tval *) (void *) ((set_e_pv) + (n_ent)); \
(set_e_k) = (duk_hstring **) (void *) ((set_a) + (n_arr)); \
@@ -6522,85 +6997,99 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
} while (0)
#else
#error invalid hobject layout defines
-#endif /* hobject property layout */
+#endif /* hobject property layout */
#define DUK_HOBJECT_P_ALLOC_SIZE(h) \
DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE((h)), DUK_HOBJECT_GET_ASIZE((h)), DUK_HOBJECT_GET_HSIZE((h)))
-#define DUK_HOBJECT_E_GET_KEY(heap,h,i) (DUK_HOBJECT_E_GET_KEY_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_E_GET_KEY_PTR(heap,h,i) (&DUK_HOBJECT_E_GET_KEY_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_E_GET_VALUE(heap,h,i) (DUK_HOBJECT_E_GET_VALUE_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_E_GET_VALUE_PTR(heap,h,i) (&DUK_HOBJECT_E_GET_VALUE_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_E_GET_VALUE_TVAL(heap,h,i) (DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).v)
-#define DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(heap,h,i) (&DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).v)
-#define DUK_HOBJECT_E_GET_VALUE_GETTER(heap,h,i) (DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.get)
-#define DUK_HOBJECT_E_GET_VALUE_GETTER_PTR(heap,h,i) (&DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.get)
-#define DUK_HOBJECT_E_GET_VALUE_SETTER(heap,h,i) (DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.set)
-#define DUK_HOBJECT_E_GET_VALUE_SETTER_PTR(heap,h,i) (&DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.set)
-#define DUK_HOBJECT_E_GET_FLAGS(heap,h,i) (DUK_HOBJECT_E_GET_FLAGS_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_E_GET_FLAGS_PTR(heap,h,i) (&DUK_HOBJECT_E_GET_FLAGS_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_A_GET_VALUE(heap,h,i) (DUK_HOBJECT_A_GET_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_A_GET_VALUE_PTR(heap,h,i) (&DUK_HOBJECT_A_GET_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_H_GET_INDEX(heap,h,i) (DUK_HOBJECT_H_GET_BASE((heap), (h))[(i)])
-#define DUK_HOBJECT_H_GET_INDEX_PTR(heap,h,i) (&DUK_HOBJECT_H_GET_BASE((heap), (h))[(i)])
-
-#define DUK_HOBJECT_E_SET_KEY(heap,h,i,k) do { \
+#define DUK_HOBJECT_E_GET_KEY(heap, h, i) (DUK_HOBJECT_E_GET_KEY_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_E_GET_KEY_PTR(heap, h, i) (&DUK_HOBJECT_E_GET_KEY_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_E_GET_VALUE(heap, h, i) (DUK_HOBJECT_E_GET_VALUE_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i) (&DUK_HOBJECT_E_GET_VALUE_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_E_GET_VALUE_TVAL(heap, h, i) (DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).v)
+#define DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(heap, h, i) (&DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).v)
+#define DUK_HOBJECT_E_GET_VALUE_GETTER(heap, h, i) (DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.get)
+#define DUK_HOBJECT_E_GET_VALUE_GETTER_PTR(heap, h, i) (&DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.get)
+#define DUK_HOBJECT_E_GET_VALUE_SETTER(heap, h, i) (DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.set)
+#define DUK_HOBJECT_E_GET_VALUE_SETTER_PTR(heap, h, i) (&DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.set)
+#define DUK_HOBJECT_E_GET_FLAGS(heap, h, i) (DUK_HOBJECT_E_GET_FLAGS_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_E_GET_FLAGS_PTR(heap, h, i) (&DUK_HOBJECT_E_GET_FLAGS_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_A_GET_VALUE(heap, h, i) (DUK_HOBJECT_A_GET_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_A_GET_VALUE_PTR(heap, h, i) (&DUK_HOBJECT_A_GET_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_H_GET_INDEX(heap, h, i) (DUK_HOBJECT_H_GET_BASE((heap), (h))[(i)])
+#define DUK_HOBJECT_H_GET_INDEX_PTR(heap, h, i) (&DUK_HOBJECT_H_GET_BASE((heap), (h))[(i)])
+
+#define DUK_HOBJECT_E_SET_KEY(heap, h, i, k) \
+ do { \
DUK_HOBJECT_E_GET_KEY((heap), (h), (i)) = (k); \
} while (0)
-#define DUK_HOBJECT_E_SET_VALUE(heap,h,i,v) do { \
+#define DUK_HOBJECT_E_SET_VALUE(heap, h, i, v) \
+ do { \
DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)) = (v); \
} while (0)
-#define DUK_HOBJECT_E_SET_VALUE_TVAL(heap,h,i,v) do { \
+#define DUK_HOBJECT_E_SET_VALUE_TVAL(heap, h, i, v) \
+ do { \
DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).v = (v); \
} while (0)
-#define DUK_HOBJECT_E_SET_VALUE_GETTER(heap,h,i,v) do { \
+#define DUK_HOBJECT_E_SET_VALUE_GETTER(heap, h, i, v) \
+ do { \
DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.get = (v); \
} while (0)
-#define DUK_HOBJECT_E_SET_VALUE_SETTER(heap,h,i,v) do { \
+#define DUK_HOBJECT_E_SET_VALUE_SETTER(heap, h, i, v) \
+ do { \
DUK_HOBJECT_E_GET_VALUE((heap), (h), (i)).a.set = (v); \
} while (0)
-#define DUK_HOBJECT_E_SET_FLAGS(heap,h,i,f) do { \
+#define DUK_HOBJECT_E_SET_FLAGS(heap, h, i, f) \
+ do { \
DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) = (duk_uint8_t) (f); \
} while (0)
-#define DUK_HOBJECT_A_SET_VALUE(heap,h,i,v) do { \
+#define DUK_HOBJECT_A_SET_VALUE(heap, h, i, v) \
+ do { \
DUK_HOBJECT_A_GET_VALUE((heap), (h), (i)) = (v); \
} while (0)
-#define DUK_HOBJECT_A_SET_VALUE_TVAL(heap,h,i,v) \
- DUK_HOBJECT_A_SET_VALUE((heap), (h), (i), (v)) /* alias for above */
-#define DUK_HOBJECT_H_SET_INDEX(heap,h,i,v) do { \
+#define DUK_HOBJECT_A_SET_VALUE_TVAL(heap, h, i, v) DUK_HOBJECT_A_SET_VALUE((heap), (h), (i), (v)) /* alias for above */
+#define DUK_HOBJECT_H_SET_INDEX(heap, h, i, v) \
+ do { \
DUK_HOBJECT_H_GET_INDEX((heap), (h), (i)) = (v); \
} while (0)
-#define DUK_HOBJECT_E_SET_FLAG_BITS(heap,h,i,mask) do { \
+#define DUK_HOBJECT_E_SET_FLAG_BITS(heap, h, i, mask) \
+ do { \
DUK_HOBJECT_E_GET_FLAGS_BASE((heap), (h))[(i)] |= (mask); \
} while (0)
-#define DUK_HOBJECT_E_CLEAR_FLAG_BITS(heap,h,i,mask) do { \
+#define DUK_HOBJECT_E_CLEAR_FLAG_BITS(heap, h, i, mask) \
+ do { \
DUK_HOBJECT_E_GET_FLAGS_BASE((heap), (h))[(i)] &= ~(mask); \
} while (0)
-#define DUK_HOBJECT_E_SLOT_IS_WRITABLE(heap,h,i) ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_WRITABLE) != 0)
-#define DUK_HOBJECT_E_SLOT_IS_ENUMERABLE(heap,h,i) ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_ENUMERABLE) != 0)
-#define DUK_HOBJECT_E_SLOT_IS_CONFIGURABLE(heap,h,i) ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_CONFIGURABLE) != 0)
-#define DUK_HOBJECT_E_SLOT_IS_ACCESSOR(heap,h,i) ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_ACCESSOR) != 0)
+#define DUK_HOBJECT_E_SLOT_IS_WRITABLE(heap, h, i) ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_WRITABLE) != 0)
+#define DUK_HOBJECT_E_SLOT_IS_ENUMERABLE(heap, h, i) \
+ ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_ENUMERABLE) != 0)
+#define DUK_HOBJECT_E_SLOT_IS_CONFIGURABLE(heap, h, i) \
+ ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_CONFIGURABLE) != 0)
+#define DUK_HOBJECT_E_SLOT_IS_ACCESSOR(heap, h, i) ((DUK_HOBJECT_E_GET_FLAGS((heap), (h), (i)) & DUK_PROPDESC_FLAG_ACCESSOR) != 0)
-#define DUK_HOBJECT_E_SLOT_SET_WRITABLE(heap,h,i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_WRITABLE)
-#define DUK_HOBJECT_E_SLOT_SET_ENUMERABLE(heap,h,i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_ENUMERABLE)
-#define DUK_HOBJECT_E_SLOT_SET_CONFIGURABLE(heap,h,i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_CONFIGURABLE)
-#define DUK_HOBJECT_E_SLOT_SET_ACCESSOR(heap,h,i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_ACCESSOR)
+#define DUK_HOBJECT_E_SLOT_SET_WRITABLE(heap, h, i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_WRITABLE)
+#define DUK_HOBJECT_E_SLOT_SET_ENUMERABLE(heap, h, i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_ENUMERABLE)
+#define DUK_HOBJECT_E_SLOT_SET_CONFIGURABLE(heap, h, i) \
+ DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_CONFIGURABLE)
+#define DUK_HOBJECT_E_SLOT_SET_ACCESSOR(heap, h, i) DUK_HOBJECT_E_SET_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_ACCESSOR)
-#define DUK_HOBJECT_E_SLOT_CLEAR_WRITABLE(heap,h,i) DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_WRITABLE)
-#define DUK_HOBJECT_E_SLOT_CLEAR_ENUMERABLE(heap,h,i) DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_ENUMERABLE)
-#define DUK_HOBJECT_E_SLOT_CLEAR_CONFIGURABLE(heap,h,i) DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_CONFIGURABLE)
-#define DUK_HOBJECT_E_SLOT_CLEAR_ACCESSOR(heap,h,i) DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i),DUK_PROPDESC_FLAG_ACCESSOR)
+#define DUK_HOBJECT_E_SLOT_CLEAR_WRITABLE(heap, h, i) DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_WRITABLE)
+#define DUK_HOBJECT_E_SLOT_CLEAR_ENUMERABLE(heap, h, i) \
+ DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_ENUMERABLE)
+#define DUK_HOBJECT_E_SLOT_CLEAR_CONFIGURABLE(heap, h, i) \
+ DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_CONFIGURABLE)
+#define DUK_HOBJECT_E_SLOT_CLEAR_ACCESSOR(heap, h, i) DUK_HOBJECT_E_CLEAR_FLAG_BITS((heap), (h), (i), DUK_PROPDESC_FLAG_ACCESSOR)
-#define DUK_PROPDESC_IS_WRITABLE(p) (((p)->flags & DUK_PROPDESC_FLAG_WRITABLE) != 0)
-#define DUK_PROPDESC_IS_ENUMERABLE(p) (((p)->flags & DUK_PROPDESC_FLAG_ENUMERABLE) != 0)
-#define DUK_PROPDESC_IS_CONFIGURABLE(p) (((p)->flags & DUK_PROPDESC_FLAG_CONFIGURABLE) != 0)
-#define DUK_PROPDESC_IS_ACCESSOR(p) (((p)->flags & DUK_PROPDESC_FLAG_ACCESSOR) != 0)
+#define DUK_PROPDESC_IS_WRITABLE(p) (((p)->flags & DUK_PROPDESC_FLAG_WRITABLE) != 0)
+#define DUK_PROPDESC_IS_ENUMERABLE(p) (((p)->flags & DUK_PROPDESC_FLAG_ENUMERABLE) != 0)
+#define DUK_PROPDESC_IS_CONFIGURABLE(p) (((p)->flags & DUK_PROPDESC_FLAG_CONFIGURABLE) != 0)
+#define DUK_PROPDESC_IS_ACCESSOR(p) (((p)->flags & DUK_PROPDESC_FLAG_ACCESSOR) != 0)
-#define DUK_HOBJECT_HASHIDX_UNUSED 0xffffffffUL
-#define DUK_HOBJECT_HASHIDX_DELETED 0xfffffffeUL
+#define DUK_HOBJECT_HASHIDX_UNUSED 0xffffffffUL
+#define DUK_HOBJECT_HASHIDX_DELETED 0xfffffffeUL
/*
* Macros for accessing size fields
@@ -6608,33 +7097,63 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
#if defined(DUK_USE_OBJSIZES16)
#define DUK_HOBJECT_GET_ESIZE(h) ((h)->e_size16)
-#define DUK_HOBJECT_SET_ESIZE(h,v) do { (h)->e_size16 = (v); } while (0)
+#define DUK_HOBJECT_SET_ESIZE(h, v) \
+ do { \
+ (h)->e_size16 = (v); \
+ } while (0)
#define DUK_HOBJECT_GET_ENEXT(h) ((h)->e_next16)
-#define DUK_HOBJECT_SET_ENEXT(h,v) do { (h)->e_next16 = (v); } while (0)
+#define DUK_HOBJECT_SET_ENEXT(h, v) \
+ do { \
+ (h)->e_next16 = (v); \
+ } while (0)
#define DUK_HOBJECT_POSTINC_ENEXT(h) ((h)->e_next16++)
-#define DUK_HOBJECT_GET_ASIZE(h) ((h)->a_size16)
-#define DUK_HOBJECT_SET_ASIZE(h,v) do { (h)->a_size16 = (v); } while (0)
+#define DUK_HOBJECT_GET_ASIZE(h) ((h)->a_size16)
+#define DUK_HOBJECT_SET_ASIZE(h, v) \
+ do { \
+ (h)->a_size16 = (v); \
+ } while (0)
#if defined(DUK_USE_HOBJECT_HASH_PART)
#define DUK_HOBJECT_GET_HSIZE(h) ((h)->h_size16)
-#define DUK_HOBJECT_SET_HSIZE(h,v) do { (h)->h_size16 = (v); } while (0)
+#define DUK_HOBJECT_SET_HSIZE(h, v) \
+ do { \
+ (h)->h_size16 = (v); \
+ } while (0)
#else
#define DUK_HOBJECT_GET_HSIZE(h) 0
-#define DUK_HOBJECT_SET_HSIZE(h,v) do { DUK_ASSERT((v) == 0); } while (0)
+#define DUK_HOBJECT_SET_HSIZE(h, v) \
+ do { \
+ DUK_ASSERT((v) == 0); \
+ } while (0)
#endif
#else
#define DUK_HOBJECT_GET_ESIZE(h) ((h)->e_size)
-#define DUK_HOBJECT_SET_ESIZE(h,v) do { (h)->e_size = (v); } while (0)
+#define DUK_HOBJECT_SET_ESIZE(h, v) \
+ do { \
+ (h)->e_size = (v); \
+ } while (0)
#define DUK_HOBJECT_GET_ENEXT(h) ((h)->e_next)
-#define DUK_HOBJECT_SET_ENEXT(h,v) do { (h)->e_next = (v); } while (0)
+#define DUK_HOBJECT_SET_ENEXT(h, v) \
+ do { \
+ (h)->e_next = (v); \
+ } while (0)
#define DUK_HOBJECT_POSTINC_ENEXT(h) ((h)->e_next++)
-#define DUK_HOBJECT_GET_ASIZE(h) ((h)->a_size)
-#define DUK_HOBJECT_SET_ASIZE(h,v) do { (h)->a_size = (v); } while (0)
+#define DUK_HOBJECT_GET_ASIZE(h) ((h)->a_size)
+#define DUK_HOBJECT_SET_ASIZE(h, v) \
+ do { \
+ (h)->a_size = (v); \
+ } while (0)
#if defined(DUK_USE_HOBJECT_HASH_PART)
#define DUK_HOBJECT_GET_HSIZE(h) ((h)->h_size)
-#define DUK_HOBJECT_SET_HSIZE(h,v) do { (h)->h_size = (v); } while (0)
+#define DUK_HOBJECT_SET_HSIZE(h, v) \
+ do { \
+ (h)->h_size = (v); \
+ } while (0)
#else
#define DUK_HOBJECT_GET_HSIZE(h) 0
-#define DUK_HOBJECT_SET_HSIZE(h,v) do { DUK_ASSERT((v) == 0); } while (0)
+#define DUK_HOBJECT_SET_HSIZE(h, v) \
+ do { \
+ DUK_ASSERT((v) == 0); \
+ } while (0)
#endif
#endif
@@ -6645,46 +7164,44 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
/* Maximum prototype traversal depth. Sanity limit which handles e.g.
* prototype loops (even complex ones like 1->2->3->4->2->3->4->2->3->4).
*/
-#define DUK_HOBJECT_PROTOTYPE_CHAIN_SANITY 10000L
+#define DUK_HOBJECT_PROTOTYPE_CHAIN_SANITY 10000L
/*
* ECMAScript [[Class]]
*/
/* range check not necessary because all 4-bit values are mapped */
-#define DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(n) duk_class_number_to_stridx[(n)]
+#define DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(n) duk_class_number_to_stridx[(n)]
-#define DUK_HOBJECT_GET_CLASS_STRING(heap,h) \
- DUK_HEAP_GET_STRING( \
- (heap), \
- DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(DUK_HOBJECT_GET_CLASS_NUMBER((h))) \
- )
+#define DUK_HOBJECT_GET_CLASS_STRING(heap, h) \
+ DUK_HEAP_GET_STRING((heap), DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(DUK_HOBJECT_GET_CLASS_NUMBER((h))))
/*
* Macros for property handling
*/
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HOBJECT_GET_PROTOTYPE(heap,h) \
- ((duk_hobject *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->prototype16))
-#define DUK_HOBJECT_SET_PROTOTYPE(heap,h,x) do { \
+#define DUK_HOBJECT_GET_PROTOTYPE(heap, h) ((duk_hobject *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->prototype16))
+#define DUK_HOBJECT_SET_PROTOTYPE(heap, h, x) \
+ do { \
(h)->prototype16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (x)); \
} while (0)
#else
-#define DUK_HOBJECT_GET_PROTOTYPE(heap,h) \
- ((h)->prototype)
-#define DUK_HOBJECT_SET_PROTOTYPE(heap,h,x) do { \
+#define DUK_HOBJECT_GET_PROTOTYPE(heap, h) ((h)->prototype)
+#define DUK_HOBJECT_SET_PROTOTYPE(heap, h, x) \
+ do { \
(h)->prototype = (x); \
} while (0)
#endif
/* Set prototype, DECREF earlier value, INCREF new value (tolerating NULLs). */
-#define DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr,h,p) duk_hobject_set_prototype_updref((thr), (h), (p))
+#define DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr, h, p) duk_hobject_set_prototype_updref((thr), (h), (p))
/* Set initial prototype, assume NULL previous prototype, INCREF new value,
* tolerate NULL.
*/
-#define DUK_HOBJECT_SET_PROTOTYPE_INIT_INCREF(thr,h,proto) do { \
+#define DUK_HOBJECT_SET_PROTOTYPE_INIT_INCREF(thr, h, proto) \
+ do { \
duk_hthread *duk__thr = (thr); \
duk_hobject *duk__obj = (h); \
duk_hobject *duk__proto = (proto); \
@@ -6699,9 +7216,9 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
*/
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HOBJECT_HAS_FINALIZER_FAST(heap,h) duk_hobject_has_finalizer_fast_raw((heap), (h))
+#define DUK_HOBJECT_HAS_FINALIZER_FAST(heap, h) duk_hobject_has_finalizer_fast_raw((heap), (h))
#else
-#define DUK_HOBJECT_HAS_FINALIZER_FAST(heap,h) duk_hobject_has_finalizer_fast_raw((h))
+#define DUK_HOBJECT_HAS_FINALIZER_FAST(heap, h) duk_hobject_has_finalizer_fast_raw((h))
#endif
/*
@@ -6715,18 +7232,18 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
* so anything above 0x80000000 will cause trouble now.
*/
#if defined(DUK_USE_OBJSIZES16)
-#define DUK_HOBJECT_MAX_PROPERTIES 0x0000ffffUL
+#define DUK_HOBJECT_MAX_PROPERTIES 0x0000ffffUL
#else
-#define DUK_HOBJECT_MAX_PROPERTIES 0x3fffffffUL /* 2**30-1 ~= 1G properties */
+#define DUK_HOBJECT_MAX_PROPERTIES 0x3fffffffUL /* 2**30-1 ~= 1G properties */
#endif
/* internal align target for props allocation, must be 2*n for some n */
#if (DUK_USE_ALIGN_BY == 4)
-#define DUK_HOBJECT_ALIGN_TARGET 4
+#define DUK_HOBJECT_ALIGN_TARGET 4
#elif (DUK_USE_ALIGN_BY == 8)
-#define DUK_HOBJECT_ALIGN_TARGET 8
+#define DUK_HOBJECT_ALIGN_TARGET 8
#elif (DUK_USE_ALIGN_BY == 1)
-#define DUK_HOBJECT_ALIGN_TARGET 1
+#define DUK_HOBJECT_ALIGN_TARGET 1
#else
#error invalid DUK_USE_ALIGN_BY
#endif
@@ -6735,10 +7252,10 @@ DUK_INTERNAL_DECL void duk_hobject_assert_valid(duk_hobject *h);
* PC-to-line constants
*/
-#define DUK_PC2LINE_SKIP 64
+#define DUK_PC2LINE_SKIP 64
/* maximum length for a SKIP-1 diffstream: 35 bits per entry, rounded up to bytes */
-#define DUK_PC2LINE_MAX_DIFF_LENGTH (((DUK_PC2LINE_SKIP - 1) * 35 + 7) / 8)
+#define DUK_PC2LINE_MAX_DIFF_LENGTH (((DUK_PC2LINE_SKIP - 1) * 35 + 7) / 8)
/*
* Struct defs
@@ -6765,9 +7282,9 @@ struct duk_propdesc {
duk_hobject *set;
/* for updating (all are set to < 0 for virtual properties) */
- duk_int_t e_idx; /* prop index in 'entry part', < 0 if not there */
- duk_int_t h_idx; /* prop index in 'hash part', < 0 if not there */
- duk_int_t a_idx; /* prop index in 'array part', < 0 if not there */
+ duk_int_t e_idx; /* prop index in 'entry part', < 0 if not there */
+ duk_int_t h_idx; /* prop index in 'hash part', < 0 if not there */
+ duk_int_t a_idx; /* prop index in 'array part', < 0 if not there */
};
struct duk_hobject {
@@ -6862,11 +7379,11 @@ struct duk_hobject {
duk_uint16_t h_size16;
#endif
#else
- duk_uint32_t e_size; /* entry part size */
- duk_uint32_t e_next; /* index for next new key ([0,e_next[ are gc reachable) */
- duk_uint32_t a_size; /* array part size (entirely gc reachable) */
+ duk_uint32_t e_size; /* entry part size */
+ duk_uint32_t e_next; /* index for next new key ([0,e_next[ are gc reachable) */
+ duk_uint32_t a_size; /* array part size (entirely gc reachable) */
#if defined(DUK_USE_HOBJECT_HASH_PART)
- duk_uint32_t h_size; /* hash part size or 0 if unused */
+ duk_uint32_t h_size; /* hash part size or 0 if unused */
#endif
#endif
};
@@ -6877,7 +7394,7 @@ struct duk_hobject {
#if !defined(DUK_SINGLE_FILE)
DUK_INTERNAL_DECL duk_uint8_t duk_class_number_to_stridx[32];
-#endif /* !DUK_SINGLE_FILE */
+#endif /* !DUK_SINGLE_FILE */
/*
* Prototypes
@@ -6906,36 +7423,46 @@ DUK_INTERNAL_DECL void duk_hobject_realloc_props(duk_hthread *thr,
duk_uint32_t new_a_size,
duk_uint32_t new_h_size,
duk_bool_t abandon_array);
-DUK_INTERNAL_DECL void duk_hobject_resize_entrypart(duk_hthread *thr,
- duk_hobject *obj,
- duk_uint32_t new_e_size);
-#if 0 /*unused*/
+DUK_INTERNAL_DECL void duk_hobject_resize_entrypart(duk_hthread *thr, duk_hobject *obj, duk_uint32_t new_e_size);
+#if 0 /*unused*/
DUK_INTERNAL_DECL void duk_hobject_resize_arraypart(duk_hthread *thr,
duk_hobject *obj,
duk_uint32_t new_a_size);
#endif
/* low-level property functions */
-DUK_INTERNAL_DECL duk_bool_t duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_int_t *e_idx, duk_int_t *h_idx);
+DUK_INTERNAL_DECL duk_bool_t
+duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_int_t *e_idx, duk_int_t *h_idx);
DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_hstring *key);
DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr_stridx(duk_heap *heap, duk_hobject *obj, duk_small_uint_t stridx);
-DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr_and_attrs(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_uint_t *out_attrs);
+DUK_INTERNAL_DECL duk_tval *duk_hobject_find_entry_tval_ptr_and_attrs(duk_heap *heap,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_uint_t *out_attrs);
DUK_INTERNAL_DECL duk_tval *duk_hobject_find_array_entry_tval_ptr(duk_heap *heap, duk_hobject *obj, duk_uarridx_t i);
-DUK_INTERNAL_DECL duk_bool_t duk_hobject_get_own_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags);
+DUK_INTERNAL_DECL duk_bool_t
+duk_hobject_get_own_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags);
/* core property functions */
DUK_INTERNAL_DECL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key);
-DUK_INTERNAL_DECL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key, duk_tval *tv_val, duk_bool_t throw_flag);
+DUK_INTERNAL_DECL duk_bool_t
+duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key, duk_tval *tv_val, duk_bool_t throw_flag);
DUK_INTERNAL_DECL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key, duk_bool_t throw_flag);
DUK_INTERNAL_DECL duk_bool_t duk_hobject_hasprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key);
/* internal property functions */
-#define DUK_DELPROP_FLAG_THROW (1U << 0)
-#define DUK_DELPROP_FLAG_FORCE (1U << 1)
+#define DUK_DELPROP_FLAG_THROW (1U << 0)
+#define DUK_DELPROP_FLAG_FORCE (1U << 1)
DUK_INTERNAL_DECL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_small_uint_t flags);
DUK_INTERNAL_DECL duk_bool_t duk_hobject_hasprop_raw(duk_hthread *thr, duk_hobject *obj, duk_hstring *key);
-DUK_INTERNAL_DECL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_small_uint_t flags);
-DUK_INTERNAL_DECL void duk_hobject_define_property_internal_arridx(duk_hthread *thr, duk_hobject *obj, duk_uarridx_t arr_idx, duk_small_uint_t flags);
+DUK_INTERNAL_DECL void duk_hobject_define_property_internal(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_small_uint_t flags);
+DUK_INTERNAL_DECL void duk_hobject_define_property_internal_arridx(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_uarridx_t arr_idx,
+ duk_small_uint_t flags);
DUK_INTERNAL_DECL duk_size_t duk_hobject_get_length(duk_hthread *thr, duk_hobject *obj);
#if defined(DUK_USE_HEAPPTR16)
DUK_INTERNAL_DECL duk_bool_t duk_hobject_has_finalizer_fast_raw(duk_heap *heap, duk_hobject *obj);
@@ -6995,7 +7522,10 @@ DUK_INTERNAL_DECL duk_uint_fast32_t duk_hobject_pc2line_query(duk_hthread *thr,
#endif
/* misc */
-DUK_INTERNAL_DECL duk_bool_t duk_hobject_prototype_chain_contains(duk_hthread *thr, duk_hobject *h, duk_hobject *p, duk_bool_t ignore_loop);
+DUK_INTERNAL_DECL duk_bool_t duk_hobject_prototype_chain_contains(duk_hthread *thr,
+ duk_hobject *h,
+ duk_hobject *p,
+ duk_bool_t ignore_loop);
#if !defined(DUK_USE_OBJECT_BUILTIN)
/* These declarations are needed when related built-in is disabled and
@@ -7005,7 +7535,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_object_prototype_to_string(duk_hthread *thr);
DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype(duk_hthread *thr);
#endif
-#endif /* DUK_HOBJECT_H_INCLUDED */
+#endif /* DUK_HOBJECT_H_INCLUDED */
/* #include duk_hcompfunc.h */
/*
* Heap compiled function (ECMAScript function) representation.
@@ -7024,50 +7554,55 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype(duk_hthread *thr);
/* XXX: casts could be improved, especially for GET/SET DATA */
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HCOMPFUNC_GET_DATA(heap,h) \
- ((duk_hbuffer_fixed *) (void *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->data16))
-#define DUK_HCOMPFUNC_SET_DATA(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_DATA(heap, h) ((duk_hbuffer_fixed *) (void *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->data16))
+#define DUK_HCOMPFUNC_SET_DATA(heap, h, v) \
+ do { \
(h)->data16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (v)); \
} while (0)
-#define DUK_HCOMPFUNC_GET_FUNCS(heap,h) \
- ((duk_hobject **) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->funcs16)))
-#define DUK_HCOMPFUNC_SET_FUNCS(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_FUNCS(heap, h) ((duk_hobject **) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->funcs16)))
+#define DUK_HCOMPFUNC_SET_FUNCS(heap, h, v) \
+ do { \
(h)->funcs16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (v)); \
} while (0)
-#define DUK_HCOMPFUNC_GET_BYTECODE(heap,h) \
- ((duk_instr_t *) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->bytecode16)))
-#define DUK_HCOMPFUNC_SET_BYTECODE(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_BYTECODE(heap, h) ((duk_instr_t *) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->bytecode16)))
+#define DUK_HCOMPFUNC_SET_BYTECODE(heap, h, v) \
+ do { \
(h)->bytecode16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (v)); \
} while (0)
-#define DUK_HCOMPFUNC_GET_LEXENV(heap,h) \
- ((duk_hobject *) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->lex_env16)))
-#define DUK_HCOMPFUNC_SET_LEXENV(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_LEXENV(heap, h) ((duk_hobject *) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->lex_env16)))
+#define DUK_HCOMPFUNC_SET_LEXENV(heap, h, v) \
+ do { \
(h)->lex_env16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (v)); \
} while (0)
-#define DUK_HCOMPFUNC_GET_VARENV(heap,h) \
- ((duk_hobject *) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->var_env16)))
-#define DUK_HCOMPFUNC_SET_VARENV(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_VARENV(heap, h) ((duk_hobject *) (void *) (DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (h)->var_env16)))
+#define DUK_HCOMPFUNC_SET_VARENV(heap, h, v) \
+ do { \
(h)->var_env16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (v)); \
} while (0)
#else
-#define DUK_HCOMPFUNC_GET_DATA(heap,h) ((duk_hbuffer_fixed *) (void *) (h)->data)
-#define DUK_HCOMPFUNC_SET_DATA(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_DATA(heap, h) ((duk_hbuffer_fixed *) (void *) (h)->data)
+#define DUK_HCOMPFUNC_SET_DATA(heap, h, v) \
+ do { \
(h)->data = (duk_hbuffer *) (v); \
} while (0)
-#define DUK_HCOMPFUNC_GET_FUNCS(heap,h) ((h)->funcs)
-#define DUK_HCOMPFUNC_SET_FUNCS(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_FUNCS(heap, h) ((h)->funcs)
+#define DUK_HCOMPFUNC_SET_FUNCS(heap, h, v) \
+ do { \
(h)->funcs = (v); \
} while (0)
-#define DUK_HCOMPFUNC_GET_BYTECODE(heap,h) ((h)->bytecode)
-#define DUK_HCOMPFUNC_SET_BYTECODE(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_BYTECODE(heap, h) ((h)->bytecode)
+#define DUK_HCOMPFUNC_SET_BYTECODE(heap, h, v) \
+ do { \
(h)->bytecode = (v); \
} while (0)
-#define DUK_HCOMPFUNC_GET_LEXENV(heap,h) ((h)->lex_env)
-#define DUK_HCOMPFUNC_SET_LEXENV(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_LEXENV(heap, h) ((h)->lex_env)
+#define DUK_HCOMPFUNC_SET_LEXENV(heap, h, v) \
+ do { \
(h)->lex_env = (v); \
} while (0)
-#define DUK_HCOMPFUNC_GET_VARENV(heap,h) ((h)->var_env)
-#define DUK_HCOMPFUNC_SET_VARENV(heap,h,v) do { \
+#define DUK_HCOMPFUNC_GET_VARENV(heap, h) ((h)->var_env)
+#define DUK_HCOMPFUNC_SET_VARENV(heap, h, v) \
+ do { \
(h)->var_env = (v); \
} while (0)
#endif
@@ -7077,64 +7612,40 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype(duk_hthread *thr);
*/
/* Note: assumes 'data' is always a fixed buffer */
-#define DUK_HCOMPFUNC_GET_BUFFER_BASE(heap,h) \
- DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), DUK_HCOMPFUNC_GET_DATA((heap), (h)))
+#define DUK_HCOMPFUNC_GET_BUFFER_BASE(heap, h) DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), DUK_HCOMPFUNC_GET_DATA((heap), (h)))
-#define DUK_HCOMPFUNC_GET_CONSTS_BASE(heap,h) \
- ((duk_tval *) (void *) DUK_HCOMPFUNC_GET_BUFFER_BASE((heap), (h)))
+#define DUK_HCOMPFUNC_GET_CONSTS_BASE(heap, h) ((duk_tval *) (void *) DUK_HCOMPFUNC_GET_BUFFER_BASE((heap), (h)))
-#define DUK_HCOMPFUNC_GET_FUNCS_BASE(heap,h) \
- DUK_HCOMPFUNC_GET_FUNCS((heap), (h))
+#define DUK_HCOMPFUNC_GET_FUNCS_BASE(heap, h) DUK_HCOMPFUNC_GET_FUNCS((heap), (h))
-#define DUK_HCOMPFUNC_GET_CODE_BASE(heap,h) \
- DUK_HCOMPFUNC_GET_BYTECODE((heap), (h))
+#define DUK_HCOMPFUNC_GET_CODE_BASE(heap, h) DUK_HCOMPFUNC_GET_BYTECODE((heap), (h))
-#define DUK_HCOMPFUNC_GET_CONSTS_END(heap,h) \
- ((duk_tval *) (void *) DUK_HCOMPFUNC_GET_FUNCS((heap), (h)))
+#define DUK_HCOMPFUNC_GET_CONSTS_END(heap, h) ((duk_tval *) (void *) DUK_HCOMPFUNC_GET_FUNCS((heap), (h)))
-#define DUK_HCOMPFUNC_GET_FUNCS_END(heap,h) \
- ((duk_hobject **) (void *) DUK_HCOMPFUNC_GET_BYTECODE((heap), (h)))
+#define DUK_HCOMPFUNC_GET_FUNCS_END(heap, h) ((duk_hobject **) (void *) DUK_HCOMPFUNC_GET_BYTECODE((heap), (h)))
/* XXX: double evaluation of DUK_HCOMPFUNC_GET_DATA() */
-#define DUK_HCOMPFUNC_GET_CODE_END(heap,h) \
+#define DUK_HCOMPFUNC_GET_CODE_END(heap, h) \
((duk_instr_t *) (void *) (DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), DUK_HCOMPFUNC_GET_DATA((heap), (h))) + \
- DUK_HBUFFER_GET_SIZE((duk_hbuffer *) DUK_HCOMPFUNC_GET_DATA((heap), h))))
-
-#define DUK_HCOMPFUNC_GET_CONSTS_SIZE(heap,h) \
- ( \
- (duk_size_t) \
- ( \
- ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CONSTS_END((heap), (h))) - \
- ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CONSTS_BASE((heap), (h))) \
- ) \
- )
-
-#define DUK_HCOMPFUNC_GET_FUNCS_SIZE(heap,h) \
- ( \
- (duk_size_t) \
- ( \
- ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_FUNCS_END((heap), (h))) - \
- ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_FUNCS_BASE((heap), (h))) \
- ) \
- )
-
-#define DUK_HCOMPFUNC_GET_CODE_SIZE(heap,h) \
- ( \
- (duk_size_t) \
- ( \
- ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CODE_END((heap),(h))) - \
- ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CODE_BASE((heap),(h))) \
- ) \
- )
-
-#define DUK_HCOMPFUNC_GET_CONSTS_COUNT(heap,h) \
- ((duk_size_t) (DUK_HCOMPFUNC_GET_CONSTS_SIZE((heap), (h)) / sizeof(duk_tval)))
-
-#define DUK_HCOMPFUNC_GET_FUNCS_COUNT(heap,h) \
- ((duk_size_t) (DUK_HCOMPFUNC_GET_FUNCS_SIZE((heap), (h)) / sizeof(duk_hobject *)))
-
-#define DUK_HCOMPFUNC_GET_CODE_COUNT(heap,h) \
- ((duk_size_t) (DUK_HCOMPFUNC_GET_CODE_SIZE((heap), (h)) / sizeof(duk_instr_t)))
+ DUK_HBUFFER_GET_SIZE((duk_hbuffer *) DUK_HCOMPFUNC_GET_DATA((heap), h))))
+
+#define DUK_HCOMPFUNC_GET_CONSTS_SIZE(heap, h) \
+ ((duk_size_t) (((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CONSTS_END((heap), (h))) - \
+ ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CONSTS_BASE((heap), (h)))))
+
+#define DUK_HCOMPFUNC_GET_FUNCS_SIZE(heap, h) \
+ ((duk_size_t) (((const duk_uint8_t *) DUK_HCOMPFUNC_GET_FUNCS_END((heap), (h))) - \
+ ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_FUNCS_BASE((heap), (h)))))
+
+#define DUK_HCOMPFUNC_GET_CODE_SIZE(heap, h) \
+ ((duk_size_t) (((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CODE_END((heap), (h))) - \
+ ((const duk_uint8_t *) DUK_HCOMPFUNC_GET_CODE_BASE((heap), (h)))))
+
+#define DUK_HCOMPFUNC_GET_CONSTS_COUNT(heap, h) ((duk_size_t) (DUK_HCOMPFUNC_GET_CONSTS_SIZE((heap), (h)) / sizeof(duk_tval)))
+
+#define DUK_HCOMPFUNC_GET_FUNCS_COUNT(heap, h) ((duk_size_t) (DUK_HCOMPFUNC_GET_FUNCS_SIZE((heap), (h)) / sizeof(duk_hobject *)))
+
+#define DUK_HCOMPFUNC_GET_CODE_COUNT(heap, h) ((duk_size_t) (DUK_HCOMPFUNC_GET_CODE_SIZE((heap), (h)) / sizeof(duk_instr_t)))
/*
* Validity assert
@@ -7142,9 +7653,14 @@ DUK_INTERNAL_DECL duk_ret_t duk_bi_function_prototype(duk_hthread *thr);
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hcompfunc_assert_valid(duk_hcompfunc *h);
-#define DUK_HCOMPFUNC_ASSERT_VALID(h) do { duk_hcompfunc_assert_valid((h)); } while (0)
+#define DUK_HCOMPFUNC_ASSERT_VALID(h) \
+ do { \
+ duk_hcompfunc_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HCOMPFUNC_ASSERT_VALID(h) do {} while (0)
+#define DUK_HCOMPFUNC_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
/*
@@ -7231,8 +7747,8 @@ struct duk_hcompfunc {
* at run time, except for debugging, so it is not maintained.
*/
- duk_uint16_t nregs; /* regs to allocate */
- duk_uint16_t nargs; /* number of arguments allocated to regs */
+ duk_uint16_t nregs; /* regs to allocate */
+ duk_uint16_t nargs; /* number of arguments allocated to regs */
/*
* Additional control information is placed into the object itself
@@ -7279,7 +7795,7 @@ struct duk_hcompfunc {
#endif
};
-#endif /* DUK_HCOMPFUNC_H_INCLUDED */
+#endif /* DUK_HCOMPFUNC_H_INCLUDED */
/* #include duk_hnatfunc.h */
/*
* Heap native function representation.
@@ -7290,13 +7806,18 @@ struct duk_hcompfunc {
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hnatfunc_assert_valid(duk_hnatfunc *h);
-#define DUK_HNATFUNC_ASSERT_VALID(h) do { duk_hnatfunc_assert_valid((h)); } while (0)
+#define DUK_HNATFUNC_ASSERT_VALID(h) \
+ do { \
+ duk_hnatfunc_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HNATFUNC_ASSERT_VALID(h) do {} while (0)
+#define DUK_HNATFUNC_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
-#define DUK_HNATFUNC_NARGS_VARARGS ((duk_int16_t) -1)
-#define DUK_HNATFUNC_NARGS_MAX ((duk_int16_t) 0x7fff)
+#define DUK_HNATFUNC_NARGS_VARARGS ((duk_int16_t) -1)
+#define DUK_HNATFUNC_NARGS_MAX ((duk_int16_t) 0x7fff)
struct duk_hnatfunc {
/* shared object part */
@@ -7319,7 +7840,7 @@ struct duk_hnatfunc {
*/
};
-#endif /* DUK_HNATFUNC_H_INCLUDED */
+#endif /* DUK_HNATFUNC_H_INCLUDED */
/* #include duk_hboundfunc.h */
/*
* Bound function representation.
@@ -7335,9 +7856,14 @@ struct duk_hnatfunc {
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hboundfunc_assert_valid(duk_hboundfunc *h);
-#define DUK_HBOUNDFUNC_ASSERT_VALID(h) do { duk_hboundfunc_assert_valid((h)); } while (0)
+#define DUK_HBOUNDFUNC_ASSERT_VALID(h) \
+ do { \
+ duk_hboundfunc_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HBOUNDFUNC_ASSERT_VALID(h) do {} while (0)
+#define DUK_HBOUNDFUNC_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
struct duk_hboundfunc {
@@ -7353,11 +7879,11 @@ struct duk_hboundfunc {
duk_tval this_binding;
/* Arguments to prepend. */
- duk_tval *args; /* Separate allocation. */
+ duk_tval *args; /* Separate allocation. */
duk_idx_t nargs;
};
-#endif /* DUK_HBOUNDFUNC_H_INCLUDED */
+#endif /* DUK_HBOUNDFUNC_H_INCLUDED */
/* #include duk_hbufobj.h */
/*
* Heap Buffer object representation. Used for all Buffer variants.
@@ -7369,31 +7895,37 @@ struct duk_hboundfunc {
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
/* All element accessors are host endian now (driven by TypedArray spec). */
-#define DUK_HBUFOBJ_ELEM_UINT8 0
-#define DUK_HBUFOBJ_ELEM_UINT8CLAMPED 1
-#define DUK_HBUFOBJ_ELEM_INT8 2
-#define DUK_HBUFOBJ_ELEM_UINT16 3
-#define DUK_HBUFOBJ_ELEM_INT16 4
-#define DUK_HBUFOBJ_ELEM_UINT32 5
-#define DUK_HBUFOBJ_ELEM_INT32 6
-#define DUK_HBUFOBJ_ELEM_FLOAT32 7
-#define DUK_HBUFOBJ_ELEM_FLOAT64 8
-#define DUK_HBUFOBJ_ELEM_MAX 8
+#define DUK_HBUFOBJ_ELEM_UINT8 0
+#define DUK_HBUFOBJ_ELEM_UINT8CLAMPED 1
+#define DUK_HBUFOBJ_ELEM_INT8 2
+#define DUK_HBUFOBJ_ELEM_UINT16 3
+#define DUK_HBUFOBJ_ELEM_INT16 4
+#define DUK_HBUFOBJ_ELEM_UINT32 5
+#define DUK_HBUFOBJ_ELEM_INT32 6
+#define DUK_HBUFOBJ_ELEM_FLOAT32 7
+#define DUK_HBUFOBJ_ELEM_FLOAT64 8
+#define DUK_HBUFOBJ_ELEM_MAX 8
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hbufobj_assert_valid(duk_hbufobj *h);
-#define DUK_HBUFOBJ_ASSERT_VALID(h) do { duk_hbufobj_assert_valid((h)); } while (0)
+#define DUK_HBUFOBJ_ASSERT_VALID(h) \
+ do { \
+ duk_hbufobj_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HBUFOBJ_ASSERT_VALID(h) do {} while (0)
+#define DUK_HBUFOBJ_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
/* Get the current data pointer (caller must ensure buf != NULL) as a
* duk_uint8_t ptr. Note that the result may be NULL if the underlying
* buffer has zero size and is not a fixed buffer.
*/
-#define DUK_HBUFOBJ_GET_SLICE_BASE(heap,h) \
- (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), \
- (((duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR((heap), (h)->buf)) + (h)->offset))
+#define DUK_HBUFOBJ_GET_SLICE_BASE(heap, h) \
+ (DUK_ASSERT_EXPR((h) != NULL), \
+ DUK_ASSERT_EXPR((h)->buf != NULL), \
+ (((duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR((heap), (h)->buf)) + (h)->offset))
/* True if slice is full, i.e. offset is zero and length covers the entire
* buffer. This status may change independently of the duk_hbufobj if
@@ -7401,15 +7933,17 @@ DUK_INTERNAL_DECL void duk_hbufobj_assert_valid(duk_hbufobj *h);
* being changed.
*/
#define DUK_HBUFOBJ_FULL_SLICE(h) \
- (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), \
- ((h)->offset == 0 && (h)->length == DUK_HBUFFER_GET_SIZE((h)->buf)))
+ (DUK_ASSERT_EXPR((h) != NULL), \
+ DUK_ASSERT_EXPR((h)->buf != NULL), \
+ ((h)->offset == 0 && (h)->length == DUK_HBUFFER_GET_SIZE((h)->buf)))
/* Validate that the whole slice [0,length[ is contained in the underlying
* buffer. Caller must ensure 'buf' != NULL.
*/
#define DUK_HBUFOBJ_VALID_SLICE(h) \
- (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), \
- ((h)->offset + (h)->length <= DUK_HBUFFER_GET_SIZE((h)->buf)))
+ (DUK_ASSERT_EXPR((h) != NULL), \
+ DUK_ASSERT_EXPR((h)->buf != NULL), \
+ ((h)->offset + (h)->length <= DUK_HBUFFER_GET_SIZE((h)->buf)))
/* Validate byte read/write for virtual 'offset', i.e. check that the
* offset, taking into account h->offset, is within the underlying
@@ -7418,13 +7952,11 @@ DUK_INTERNAL_DECL void duk_hbufobj_assert_valid(duk_hbufobj *h);
* behavior (e.g. if an underlying dynamic buffer changes after being
* setup). Caller must ensure 'buf' != NULL.
*/
-#define DUK_HBUFOBJ_VALID_BYTEOFFSET_INCL(h,off) \
- (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), \
- ((h)->offset + (off) < DUK_HBUFFER_GET_SIZE((h)->buf)))
+#define DUK_HBUFOBJ_VALID_BYTEOFFSET_INCL(h, off) \
+ (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), ((h)->offset + (off) < DUK_HBUFFER_GET_SIZE((h)->buf)))
-#define DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h,off) \
- (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), \
- ((h)->offset + (off) <= DUK_HBUFFER_GET_SIZE((h)->buf)))
+#define DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h, off) \
+ (DUK_ASSERT_EXPR((h) != NULL), DUK_ASSERT_EXPR((h)->buf != NULL), ((h)->offset + (off) <= DUK_HBUFFER_GET_SIZE((h)->buf)))
/* Clamp an input byte length (already assumed to be within the nominal
* duk_hbufobj 'length') to the current dynamic buffer limits to yield
@@ -7432,12 +7964,10 @@ DUK_INTERNAL_DECL void duk_hbufobj_assert_valid(duk_hbufobj *h);
* be invalidated by any side effect because it may trigger a user
* callback that resizes the underlying buffer.
*/
-#define DUK_HBUFOBJ_CLAMP_BYTELENGTH(h,len) \
- (DUK_ASSERT_EXPR((h) != NULL), \
- duk_hbufobj_clamp_bytelength((h), (len)))
+#define DUK_HBUFOBJ_CLAMP_BYTELENGTH(h, len) (DUK_ASSERT_EXPR((h) != NULL), duk_hbufobj_clamp_bytelength((h), (len)))
/* Typed arrays have virtual indices, ArrayBuffer and DataView do not. */
-#define DUK_HBUFOBJ_HAS_VIRTUAL_INDICES(h) ((h)->is_typedarray)
+#define DUK_HBUFOBJ_HAS_VIRTUAL_INDICES(h) ((h)->is_typedarray)
struct duk_hbufobj {
/* Shared object part. */
@@ -7462,30 +7992,36 @@ struct duk_hbufobj {
* be dynamic and its pointer unstable.
*/
- duk_uint_t offset; /* byte offset to buf */
- duk_uint_t length; /* byte index limit for element access, exclusive */
- duk_uint8_t shift; /* element size shift:
- * 0 = u8/i8
- * 1 = u16/i16
- * 2 = u32/i32/float
- * 3 = double
- */
- duk_uint8_t elem_type; /* element type */
+ duk_uint_t offset; /* byte offset to buf */
+ duk_uint_t length; /* byte index limit for element access, exclusive */
+ duk_uint8_t shift; /* element size shift:
+ * 0 = u8/i8
+ * 1 = u16/i16
+ * 2 = u32/i32/float
+ * 3 = double
+ */
+ duk_uint8_t elem_type; /* element type */
duk_uint8_t is_typedarray;
};
DUK_INTERNAL_DECL duk_uint_t duk_hbufobj_clamp_bytelength(duk_hbufobj *h_bufobj, duk_uint_t len);
DUK_INTERNAL_DECL void duk_hbufobj_push_uint8array_from_plain(duk_hthread *thr, duk_hbuffer *h_buf);
-DUK_INTERNAL_DECL void duk_hbufobj_push_validated_read(duk_hthread *thr, duk_hbufobj *h_bufobj, duk_uint8_t *p, duk_small_uint_t elem_size);
-DUK_INTERNAL_DECL void duk_hbufobj_validated_write(duk_hthread *thr, duk_hbufobj *h_bufobj, duk_uint8_t *p, duk_small_uint_t elem_size);
+DUK_INTERNAL_DECL void duk_hbufobj_push_validated_read(duk_hthread *thr,
+ duk_hbufobj *h_bufobj,
+ duk_uint8_t *p,
+ duk_small_uint_t elem_size);
+DUK_INTERNAL_DECL void duk_hbufobj_validated_write(duk_hthread *thr,
+ duk_hbufobj *h_bufobj,
+ duk_uint8_t *p,
+ duk_small_uint_t elem_size);
DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx);
-#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* nothing */
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
-#endif /* DUK_HBUFOBJ_H_INCLUDED */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_HBUFOBJ_H_INCLUDED */
/* #include duk_hthread.h */
/*
* Heap thread object representation.
@@ -7503,38 +8039,38 @@ DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx
*/
/* Initial valstack size, roughly 0.7kiB. */
-#define DUK_VALSTACK_INITIAL_SIZE 96U
+#define DUK_VALSTACK_INITIAL_SIZE 96U
/* Internal extra elements assumed on function entry, always added to
* user-defined 'extra' for e.g. the duk_check_stack() call.
*/
-#define DUK_VALSTACK_INTERNAL_EXTRA 32U
+#define DUK_VALSTACK_INTERNAL_EXTRA 32U
/* Number of elements guaranteed to be user accessible (in addition to call
* arguments) on Duktape/C function entry. This is the major public API
* commitment.
*/
-#define DUK_VALSTACK_API_ENTRY_MINIMUM DUK_API_ENTRY_STACK
+#define DUK_VALSTACK_API_ENTRY_MINIMUM DUK_API_ENTRY_STACK
/*
* Activation defines
*/
-#define DUK_ACT_FLAG_STRICT (1U << 0) /* function executes in strict mode */
-#define DUK_ACT_FLAG_TAILCALLED (1U << 1) /* activation has tail called one or more times */
-#define DUK_ACT_FLAG_CONSTRUCT (1U << 2) /* function executes as a constructor (called via "new") */
-#define DUK_ACT_FLAG_PREVENT_YIELD (1U << 3) /* activation prevents yield (native call or "new") */
-#define DUK_ACT_FLAG_DIRECT_EVAL (1U << 4) /* activation is a direct eval call */
-#define DUK_ACT_FLAG_CONSTRUCT_PROXY (1U << 5) /* activation is for Proxy 'construct' call, special return value handling */
-#define DUK_ACT_FLAG_BREAKPOINT_ACTIVE (1U << 6) /* activation has active breakpoint(s) */
+#define DUK_ACT_FLAG_STRICT (1U << 0) /* function executes in strict mode */
+#define DUK_ACT_FLAG_TAILCALLED (1U << 1) /* activation has tail called one or more times */
+#define DUK_ACT_FLAG_CONSTRUCT (1U << 2) /* function executes as a constructor (called via "new") */
+#define DUK_ACT_FLAG_PREVENT_YIELD (1U << 3) /* activation prevents yield (native call or "new") */
+#define DUK_ACT_FLAG_DIRECT_EVAL (1U << 4) /* activation is a direct eval call */
+#define DUK_ACT_FLAG_CONSTRUCT_PROXY (1U << 5) /* activation is for Proxy 'construct' call, special return value handling */
+#define DUK_ACT_FLAG_BREAKPOINT_ACTIVE (1U << 6) /* activation has active breakpoint(s) */
-#define DUK_ACT_GET_FUNC(act) ((act)->func)
+#define DUK_ACT_GET_FUNC(act) ((act)->func)
/*
* Flags for __FILE__ / __LINE__ registered into tracedata
*/
-#define DUK_TB_FLAG_NOBLAME_FILELINE (1U << 0) /* don't report __FILE__ / __LINE__ as fileName/lineNumber */
+#define DUK_TB_FLAG_NOBLAME_FILELINE (1U << 0) /* don't report __FILE__ / __LINE__ as fileName/lineNumber */
/*
* Catcher defines
@@ -7543,52 +8079,60 @@ DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx
/* XXX: remove catcher type entirely */
/* flags field: LLLLLLFT, L = label (24 bits), F = flags (4 bits), T = type (4 bits) */
-#define DUK_CAT_TYPE_MASK 0x0000000fUL
-#define DUK_CAT_TYPE_BITS 4
-#define DUK_CAT_LABEL_MASK 0xffffff00UL
-#define DUK_CAT_LABEL_BITS 24
-#define DUK_CAT_LABEL_SHIFT 8
-
-#define DUK_CAT_FLAG_CATCH_ENABLED (1U << 4) /* catch part will catch */
-#define DUK_CAT_FLAG_FINALLY_ENABLED (1U << 5) /* finally part will catch */
-#define DUK_CAT_FLAG_CATCH_BINDING_ENABLED (1U << 6) /* request to create catch binding */
-#define DUK_CAT_FLAG_LEXENV_ACTIVE (1U << 7) /* catch or with binding is currently active */
-
-#define DUK_CAT_TYPE_UNKNOWN 0
-#define DUK_CAT_TYPE_TCF 1
-#define DUK_CAT_TYPE_LABEL 2
-
-#define DUK_CAT_GET_TYPE(c) ((c)->flags & DUK_CAT_TYPE_MASK)
-#define DUK_CAT_GET_LABEL(c) (((c)->flags & DUK_CAT_LABEL_MASK) >> DUK_CAT_LABEL_SHIFT)
-
-#define DUK_CAT_HAS_CATCH_ENABLED(c) ((c)->flags & DUK_CAT_FLAG_CATCH_ENABLED)
-#define DUK_CAT_HAS_FINALLY_ENABLED(c) ((c)->flags & DUK_CAT_FLAG_FINALLY_ENABLED)
-#define DUK_CAT_HAS_CATCH_BINDING_ENABLED(c) ((c)->flags & DUK_CAT_FLAG_CATCH_BINDING_ENABLED)
-#define DUK_CAT_HAS_LEXENV_ACTIVE(c) ((c)->flags & DUK_CAT_FLAG_LEXENV_ACTIVE)
-
-#define DUK_CAT_SET_CATCH_ENABLED(c) do { \
+#define DUK_CAT_TYPE_MASK 0x0000000fUL
+#define DUK_CAT_TYPE_BITS 4
+#define DUK_CAT_LABEL_MASK 0xffffff00UL
+#define DUK_CAT_LABEL_BITS 24
+#define DUK_CAT_LABEL_SHIFT 8
+
+#define DUK_CAT_FLAG_CATCH_ENABLED (1U << 4) /* catch part will catch */
+#define DUK_CAT_FLAG_FINALLY_ENABLED (1U << 5) /* finally part will catch */
+#define DUK_CAT_FLAG_CATCH_BINDING_ENABLED (1U << 6) /* request to create catch binding */
+#define DUK_CAT_FLAG_LEXENV_ACTIVE (1U << 7) /* catch or with binding is currently active */
+
+#define DUK_CAT_TYPE_UNKNOWN 0
+#define DUK_CAT_TYPE_TCF 1
+#define DUK_CAT_TYPE_LABEL 2
+
+#define DUK_CAT_GET_TYPE(c) ((c)->flags & DUK_CAT_TYPE_MASK)
+#define DUK_CAT_GET_LABEL(c) (((c)->flags & DUK_CAT_LABEL_MASK) >> DUK_CAT_LABEL_SHIFT)
+
+#define DUK_CAT_HAS_CATCH_ENABLED(c) ((c)->flags & DUK_CAT_FLAG_CATCH_ENABLED)
+#define DUK_CAT_HAS_FINALLY_ENABLED(c) ((c)->flags & DUK_CAT_FLAG_FINALLY_ENABLED)
+#define DUK_CAT_HAS_CATCH_BINDING_ENABLED(c) ((c)->flags & DUK_CAT_FLAG_CATCH_BINDING_ENABLED)
+#define DUK_CAT_HAS_LEXENV_ACTIVE(c) ((c)->flags & DUK_CAT_FLAG_LEXENV_ACTIVE)
+
+#define DUK_CAT_SET_CATCH_ENABLED(c) \
+ do { \
(c)->flags |= DUK_CAT_FLAG_CATCH_ENABLED; \
} while (0)
-#define DUK_CAT_SET_FINALLY_ENABLED(c) do { \
+#define DUK_CAT_SET_FINALLY_ENABLED(c) \
+ do { \
(c)->flags |= DUK_CAT_FLAG_FINALLY_ENABLED; \
} while (0)
-#define DUK_CAT_SET_CATCH_BINDING_ENABLED(c) do { \
+#define DUK_CAT_SET_CATCH_BINDING_ENABLED(c) \
+ do { \
(c)->flags |= DUK_CAT_FLAG_CATCH_BINDING_ENABLED; \
} while (0)
-#define DUK_CAT_SET_LEXENV_ACTIVE(c) do { \
+#define DUK_CAT_SET_LEXENV_ACTIVE(c) \
+ do { \
(c)->flags |= DUK_CAT_FLAG_LEXENV_ACTIVE; \
} while (0)
-#define DUK_CAT_CLEAR_CATCH_ENABLED(c) do { \
+#define DUK_CAT_CLEAR_CATCH_ENABLED(c) \
+ do { \
(c)->flags &= ~DUK_CAT_FLAG_CATCH_ENABLED; \
} while (0)
-#define DUK_CAT_CLEAR_FINALLY_ENABLED(c) do { \
+#define DUK_CAT_CLEAR_FINALLY_ENABLED(c) \
+ do { \
(c)->flags &= ~DUK_CAT_FLAG_FINALLY_ENABLED; \
} while (0)
-#define DUK_CAT_CLEAR_CATCH_BINDING_ENABLED(c) do { \
+#define DUK_CAT_CLEAR_CATCH_BINDING_ENABLED(c) \
+ do { \
(c)->flags &= ~DUK_CAT_FLAG_CATCH_BINDING_ENABLED; \
} while (0)
-#define DUK_CAT_CLEAR_LEXENV_ACTIVE(c) do { \
+#define DUK_CAT_CLEAR_LEXENV_ACTIVE(c) \
+ do { \
(c)->flags &= ~DUK_CAT_FLAG_LEXENV_ACTIVE; \
} while (0)
@@ -7597,24 +8141,21 @@ DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx
*/
#if defined(DUK_USE_ROM_STRINGS)
-#define DUK_HTHREAD_GET_STRING(thr,idx) \
- ((duk_hstring *) DUK_LOSE_CONST(duk_rom_strings_stridx[(idx)]))
-#else /* DUK_USE_ROM_STRINGS */
+#define DUK_HTHREAD_GET_STRING(thr, idx) ((duk_hstring *) DUK_LOSE_CONST(duk_rom_strings_stridx[(idx)]))
+#else /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HTHREAD_GET_STRING(thr,idx) \
- ((duk_hstring *) DUK_USE_HEAPPTR_DEC16((thr)->heap->heap_udata, (thr)->strs16[(idx)]))
+#define DUK_HTHREAD_GET_STRING(thr, idx) ((duk_hstring *) DUK_USE_HEAPPTR_DEC16((thr)->heap->heap_udata, (thr)->strs16[(idx)]))
#else
-#define DUK_HTHREAD_GET_STRING(thr,idx) \
- ((thr)->strs[(idx)])
+#define DUK_HTHREAD_GET_STRING(thr, idx) ((thr)->strs[(idx)])
#endif
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
/* values for the state field */
-#define DUK_HTHREAD_STATE_INACTIVE 1 /* thread not currently running */
-#define DUK_HTHREAD_STATE_RUNNING 2 /* thread currently running (only one at a time) */
-#define DUK_HTHREAD_STATE_RESUMED 3 /* thread resumed another thread (active but not running) */
-#define DUK_HTHREAD_STATE_YIELDED 4 /* thread has yielded */
-#define DUK_HTHREAD_STATE_TERMINATED 5 /* thread has terminated */
+#define DUK_HTHREAD_STATE_INACTIVE 1 /* thread not currently running */
+#define DUK_HTHREAD_STATE_RUNNING 2 /* thread currently running (only one at a time) */
+#define DUK_HTHREAD_STATE_RESUMED 3 /* thread resumed another thread (active but not running) */
+#define DUK_HTHREAD_STATE_YIELDED 4 /* thread has yielded */
+#define DUK_HTHREAD_STATE_TERMINATED 5 /* thread has terminated */
/* Executor interrupt default interval when nothing else requires a
* smaller value. The default interval must be small enough to allow
@@ -7622,7 +8163,7 @@ DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx
* impact on execution performance low.
*/
#if defined(DUK_USE_INTERRUPT_COUNTER)
-#define DUK_HTHREAD_INTCTR_DEFAULT (256L * 1024L)
+#define DUK_HTHREAD_INTCTR_DEFAULT (256L * 1024L)
#endif
/*
@@ -7636,20 +8177,31 @@ DUK_INTERNAL_DECL void duk_hbufobj_promote_plain(duk_hthread *thr, duk_idx_t idx
#if defined(DUK_USE_ASSERTIONS)
/* Assertions for internals. */
DUK_INTERNAL_DECL void duk_hthread_assert_valid(duk_hthread *thr);
-#define DUK_HTHREAD_ASSERT_VALID(thr) do { duk_hthread_assert_valid((thr)); } while (0)
+#define DUK_HTHREAD_ASSERT_VALID(thr) \
+ do { \
+ duk_hthread_assert_valid((thr)); \
+ } while (0)
/* Assertions for public API calls; a bit stronger. */
DUK_INTERNAL_DECL void duk_ctx_assert_valid(duk_hthread *thr);
-#define DUK_CTX_ASSERT_VALID(thr) do { duk_ctx_assert_valid((thr)); } while (0)
+#define DUK_CTX_ASSERT_VALID(thr) \
+ do { \
+ duk_ctx_assert_valid((thr)); \
+ } while (0)
#else
-#define DUK_HTHREAD_ASSERT_VALID(thr) do {} while (0)
-#define DUK_CTX_ASSERT_VALID(thr) do {} while (0)
+#define DUK_HTHREAD_ASSERT_VALID(thr) \
+ do { \
+ } while (0)
+#define DUK_CTX_ASSERT_VALID(thr) \
+ do { \
+ } while (0)
#endif
/* Assertions for API call entry specifically. Checks 'ctx' but also may
* check internal state (e.g. not in a debugger transport callback).
*/
-#define DUK_ASSERT_API_ENTRY(thr) do { \
+#define DUK_ASSERT_API_ENTRY(thr) \
+ do { \
DUK_CTX_ASSERT_VALID((thr)); \
DUK_ASSERT((thr)->heap != NULL); \
DUK_ASSERT((thr)->heap->dbg_calling_transport == 0); \
@@ -7659,11 +8211,9 @@ DUK_INTERNAL_DECL void duk_ctx_assert_valid(duk_hthread *thr);
* Assertion helpers.
*/
-#define DUK_ASSERT_STRIDX_VALID(val) \
- DUK_ASSERT((duk_uint_t) (val) < DUK_HEAP_NUM_STRINGS)
+#define DUK_ASSERT_STRIDX_VALID(val) DUK_ASSERT((duk_uint_t) (val) < DUK_HEAP_NUM_STRINGS)
-#define DUK_ASSERT_BIDX_VALID(val) \
- DUK_ASSERT((duk_uint_t) (val) < DUK_NUM_BUILTINS)
+#define DUK_ASSERT_BIDX_VALID(val) DUK_ASSERT((duk_uint_t) (val) < DUK_NUM_BUILTINS)
/*
* Misc
@@ -7671,9 +8221,7 @@ DUK_INTERNAL_DECL void duk_ctx_assert_valid(duk_hthread *thr);
/* Fast access to 'this' binding. Assumes there's a call in progress. */
#define DUK_HTHREAD_THIS_PTR(thr) \
- (DUK_ASSERT_EXPR((thr) != NULL), \
- DUK_ASSERT_EXPR((thr)->valstack_bottom > (thr)->valstack), \
- (thr)->valstack_bottom - 1)
+ (DUK_ASSERT_EXPR((thr) != NULL), DUK_ASSERT_EXPR((thr)->valstack_bottom > (thr)->valstack), (thr)->valstack_bottom - 1)
/*
* Struct defines
@@ -7681,12 +8229,13 @@ DUK_INTERNAL_DECL void duk_ctx_assert_valid(duk_hthread *thr);
/* Fields are ordered for alignment/packing. */
struct duk_activation {
- duk_tval tv_func; /* borrowed: full duk_tval for function being executed; for lightfuncs */
- duk_hobject *func; /* borrowed: function being executed; for bound function calls, this is the final, real function, NULL for lightfuncs */
+ duk_tval tv_func; /* borrowed: full duk_tval for function being executed; for lightfuncs */
+ duk_hobject *func; /* borrowed: function being executed; for bound function calls, this is the final, real function, NULL
+ for lightfuncs */
duk_activation *parent; /* previous (parent) activation (or NULL if none) */
- duk_hobject *var_env; /* current variable environment (may be NULL if delayed) */
- duk_hobject *lex_env; /* current lexical environment (may be NULL if delayed) */
- duk_catcher *cat; /* current catcher (or NULL) */
+ duk_hobject *var_env; /* current variable environment (may be NULL if delayed) */
+ duk_hobject *lex_env; /* current lexical environment (may be NULL if delayed) */
+ duk_catcher *cat; /* current catcher (or NULL) */
#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
/* Previous value of 'func' caller, restored when unwound. Only in use
@@ -7695,7 +8244,7 @@ struct duk_activation {
duk_hobject *prev_caller;
#endif
- duk_instr_t *curr_pc; /* next instruction to execute (points to 'func' bytecode, stable pointer), NULL for native calls */
+ duk_instr_t *curr_pc; /* next instruction to execute (points to 'func' bytecode, stable pointer), NULL for native calls */
/* bottom_byteoff and retval_byteoff are only used for book-keeping
* of ECMAScript-initiated calls, to allow returning to an ECMAScript
@@ -7742,12 +8291,12 @@ struct duk_activation {
};
struct duk_catcher {
- duk_catcher *parent; /* previous (parent) catcher (or NULL if none) */
- duk_hstring *h_varname; /* borrowed reference to catch variable name (or NULL if none) */
- /* (reference is valid as long activation exists) */
- duk_instr_t *pc_base; /* resume execution from pc_base or pc_base+1 (points to 'func' bytecode, stable pointer) */
- duk_size_t idx_base; /* idx_base and idx_base+1 get completion value and type */
- duk_uint32_t flags; /* type and control flags, label number */
+ duk_catcher *parent; /* previous (parent) catcher (or NULL if none) */
+ duk_hstring *h_varname; /* borrowed reference to catch variable name (or NULL if none) */
+ /* (reference is valid as long activation exists) */
+ duk_instr_t *pc_base; /* resume execution from pc_base or pc_base+1 (points to 'func' bytecode, stable pointer) */
+ duk_size_t idx_base; /* idx_base and idx_base+1 get completion value and type */
+ duk_uint32_t flags; /* type and control flags, label number */
/* XXX: could pack 'flags' and 'idx_base' to same value in practice,
* on 32-bit targets this would make duk_catcher 16 bytes.
*/
@@ -7805,21 +8354,21 @@ struct duk_hthread {
* yyy = arbitrary values, inside current frame
* uuu = outside active value stack, initialized to 'undefined'
*/
- duk_tval *valstack; /* start of valstack allocation */
- duk_tval *valstack_end; /* end of valstack reservation/guarantee (exclusive) */
- duk_tval *valstack_alloc_end; /* end of valstack allocation */
- duk_tval *valstack_bottom; /* bottom of current frame */
- duk_tval *valstack_top; /* top of current frame (exclusive) */
+ duk_tval *valstack; /* start of valstack allocation */
+ duk_tval *valstack_end; /* end of valstack reservation/guarantee (exclusive) */
+ duk_tval *valstack_alloc_end; /* end of valstack allocation */
+ duk_tval *valstack_bottom; /* bottom of current frame */
+ duk_tval *valstack_top; /* top of current frame (exclusive) */
/* Call stack, represented as a linked list starting from the current
* activation (or NULL if nothing is active).
*/
- duk_activation *callstack_curr; /* current activation (or NULL if none) */
- duk_size_t callstack_top; /* number of activation records in callstack (0 if none) */
- duk_size_t callstack_preventcount; /* number of activation records in callstack preventing a yield */
+ duk_activation *callstack_curr; /* current activation (or NULL if none) */
+ duk_size_t callstack_top; /* number of activation records in callstack (0 if none) */
+ duk_size_t callstack_preventcount; /* number of activation records in callstack preventing a yield */
/* Yield/resume book-keeping. */
- duk_hthread *resumer; /* who resumed us (if any) */
+ duk_hthread *resumer; /* who resumed us (if any) */
/* Current compiler state (if any), used for augmenting SyntaxErrors. */
duk_compiler_ctx *compile_ctx;
@@ -7832,8 +8381,8 @@ struct duk_hthread {
* important for the counter to be conveniently accessible for the
* bytecode executor inner loop for performance reasons.
*/
- duk_int_t interrupt_counter; /* countdown state */
- duk_int_t interrupt_init; /* start value for current countdown */
+ duk_int_t interrupt_counter; /* countdown state */
+ duk_int_t interrupt_init; /* start value for current countdown */
#endif
/* Builtin-objects; may or may not be shared with other threads,
@@ -7870,13 +8419,13 @@ DUK_INTERNAL_DECL void duk_hthread_create_builtin_objects(duk_hthread *thr);
DUK_INTERNAL_DECL duk_bool_t duk_hthread_init_stacks(duk_heap *heap, duk_hthread *thr);
DUK_INTERNAL_DECL void duk_hthread_terminate(duk_hthread *thr);
-DUK_INTERNAL_DECL DUK_INLINE duk_activation *duk_hthread_activation_alloc(duk_hthread *thr);
+DUK_INTERNAL_DECL duk_activation *duk_hthread_activation_alloc(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_hthread_activation_free(duk_hthread *thr, duk_activation *act);
DUK_INTERNAL_DECL void duk_hthread_activation_unwind_norz(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_hthread_activation_unwind_reuse_norz(duk_hthread *thr);
DUK_INTERNAL_DECL duk_activation *duk_hthread_get_activation_for_level(duk_hthread *thr, duk_int_t level);
-DUK_INTERNAL_DECL DUK_INLINE duk_catcher *duk_hthread_catcher_alloc(duk_hthread *thr);
+DUK_INTERNAL_DECL duk_catcher *duk_hthread_catcher_alloc(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_hthread_catcher_free(duk_hthread *thr, duk_catcher *cat);
DUK_INTERNAL_DECL void duk_hthread_catcher_unwind_norz(duk_hthread *thr, duk_activation *act);
DUK_INTERNAL_DECL void duk_hthread_catcher_unwind_nolexenv_norz(duk_hthread *thr, duk_activation *act);
@@ -7885,7 +8434,7 @@ DUK_INTERNAL_DECL void duk_hthread_catcher_unwind_nolexenv_norz(duk_hthread *thr
DUK_INTERNAL_DECL void duk_hthread_valstack_torture_realloc(duk_hthread *thr);
#endif
-DUK_INTERNAL_DECL void *duk_hthread_get_valstack_ptr(duk_heap *heap, void *ud); /* indirect allocs */
+DUK_INTERNAL_DECL void *duk_hthread_get_valstack_ptr(duk_heap *heap, void *ud); /* indirect allocs */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
DUK_INTERNAL_DECL duk_uint_fast32_t duk_hthread_get_act_curr_pc(duk_hthread *thr, duk_activation *act);
@@ -7894,7 +8443,7 @@ DUK_INTERNAL_DECL duk_uint_fast32_t duk_hthread_get_act_prev_pc(duk_hthread *thr
DUK_INTERNAL_DECL void duk_hthread_sync_currpc(duk_hthread *thr);
DUK_INTERNAL_DECL void duk_hthread_sync_and_null_currpc(duk_hthread *thr);
-#endif /* DUK_HTHREAD_H_INCLUDED */
+#endif /* DUK_HTHREAD_H_INCLUDED */
/* #include duk_harray.h */
/*
* Array object representation, used for actual Array instances.
@@ -7909,15 +8458,26 @@ DUK_INTERNAL_DECL void duk_hthread_sync_and_null_currpc(duk_hthread *thr);
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_harray_assert_valid(duk_harray *h);
-#define DUK_HARRAY_ASSERT_VALID(h) do { duk_harray_assert_valid((h)); } while (0)
+#define DUK_HARRAY_ASSERT_VALID(h) \
+ do { \
+ duk_harray_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HARRAY_ASSERT_VALID(h) do {} while (0)
+#define DUK_HARRAY_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
-#define DUK_HARRAY_LENGTH_WRITABLE(h) (!(h)->length_nonwritable)
-#define DUK_HARRAY_LENGTH_NONWRITABLE(h) ((h)->length_nonwritable)
-#define DUK_HARRAY_SET_LENGTH_WRITABLE(h) do { (h)->length_nonwritable = 0; } while (0)
-#define DUK_HARRAY_SET_LENGTH_NONWRITABLE(h) do { (h)->length_nonwritable = 1; } while (0)
+#define DUK_HARRAY_LENGTH_WRITABLE(h) (!(h)->length_nonwritable)
+#define DUK_HARRAY_LENGTH_NONWRITABLE(h) ((h)->length_nonwritable)
+#define DUK_HARRAY_SET_LENGTH_WRITABLE(h) \
+ do { \
+ (h)->length_nonwritable = 0; \
+ } while (0)
+#define DUK_HARRAY_SET_LENGTH_NONWRITABLE(h) \
+ do { \
+ (h)->length_nonwritable = 1; \
+ } while (0)
struct duk_harray {
/* Shared object part. */
@@ -7943,7 +8503,7 @@ struct duk_harray {
duk_bool_t length_nonwritable;
};
-#endif /* DUK_HARRAY_H_INCLUDED */
+#endif /* DUK_HARRAY_H_INCLUDED */
/* #include duk_henv.h */
/*
* Environment object representation.
@@ -7955,11 +8515,21 @@ struct duk_harray {
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hdecenv_assert_valid(duk_hdecenv *h);
DUK_INTERNAL_DECL void duk_hobjenv_assert_valid(duk_hobjenv *h);
-#define DUK_HDECENV_ASSERT_VALID(h) do { duk_hdecenv_assert_valid((h)); } while (0)
-#define DUK_HOBJENV_ASSERT_VALID(h) do { duk_hobjenv_assert_valid((h)); } while (0)
+#define DUK_HDECENV_ASSERT_VALID(h) \
+ do { \
+ duk_hdecenv_assert_valid((h)); \
+ } while (0)
+#define DUK_HOBJENV_ASSERT_VALID(h) \
+ do { \
+ duk_hobjenv_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HDECENV_ASSERT_VALID(h) do {} while (0)
-#define DUK_HOBJENV_ASSERT_VALID(h) do {} while (0)
+#define DUK_HDECENV_ASSERT_VALID(h) \
+ do { \
+ } while (0)
+#define DUK_HOBJENV_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
struct duk_hdecenv {
@@ -7989,7 +8559,7 @@ struct duk_hobjenv {
duk_bool_t has_this;
};
-#endif /* DUK_HENV_H_INCLUDED */
+#endif /* DUK_HENV_H_INCLUDED */
/* #include duk_hbuffer.h */
/*
* Heap buffer representation.
@@ -8013,17 +8583,17 @@ struct duk_hobjenv {
* External buffer: DUK_HBUFFER_FLAG_DYNAMIC | DUK_HBUFFER_FLAG_EXTERNAL
*/
-#define DUK_HBUFFER_FLAG_DYNAMIC DUK_HEAPHDR_USER_FLAG(0) /* buffer is behind a pointer, dynamic or external */
-#define DUK_HBUFFER_FLAG_EXTERNAL DUK_HEAPHDR_USER_FLAG(1) /* buffer pointer is to an externally allocated buffer */
+#define DUK_HBUFFER_FLAG_DYNAMIC DUK_HEAPHDR_USER_FLAG(0) /* buffer is behind a pointer, dynamic or external */
+#define DUK_HBUFFER_FLAG_EXTERNAL DUK_HEAPHDR_USER_FLAG(1) /* buffer pointer is to an externally allocated buffer */
-#define DUK_HBUFFER_HAS_DYNAMIC(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_DYNAMIC)
-#define DUK_HBUFFER_HAS_EXTERNAL(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_EXTERNAL)
+#define DUK_HBUFFER_HAS_DYNAMIC(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_DYNAMIC)
+#define DUK_HBUFFER_HAS_EXTERNAL(x) DUK_HEAPHDR_CHECK_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_EXTERNAL)
-#define DUK_HBUFFER_SET_DYNAMIC(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_DYNAMIC)
-#define DUK_HBUFFER_SET_EXTERNAL(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_EXTERNAL)
+#define DUK_HBUFFER_SET_DYNAMIC(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_DYNAMIC)
+#define DUK_HBUFFER_SET_EXTERNAL(x) DUK_HEAPHDR_SET_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_EXTERNAL)
-#define DUK_HBUFFER_CLEAR_DYNAMIC(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_DYNAMIC)
-#define DUK_HBUFFER_CLEAR_EXTERNAL(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_EXTERNAL)
+#define DUK_HBUFFER_CLEAR_DYNAMIC(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_DYNAMIC)
+#define DUK_HBUFFER_CLEAR_EXTERNAL(x) DUK_HEAPHDR_CLEAR_FLAG_BITS(&(x)->hdr, DUK_HBUFFER_FLAG_EXTERNAL)
/*
* Misc defines
@@ -8036,12 +8606,12 @@ struct duk_hobjenv {
*/
#if defined(DUK_USE_BUFLEN16)
-#define DUK_HBUFFER_MAX_BYTELEN (0x0000ffffUL)
+#define DUK_HBUFFER_MAX_BYTELEN (0x0000ffffUL)
#else
/* Intentionally not 0x7fffffffUL; at least JSON code expects that
* 2*len + 2 fits in 32 bits.
*/
-#define DUK_HBUFFER_MAX_BYTELEN (0x7ffffffeUL)
+#define DUK_HBUFFER_MAX_BYTELEN (0x7ffffffeUL)
#endif
/*
@@ -8050,60 +8620,70 @@ struct duk_hobjenv {
#if defined(DUK_USE_BUFLEN16)
/* size stored in duk_heaphdr unused flag bits */
-#define DUK_HBUFFER_GET_SIZE(x) ((x)->hdr.h_flags >> 16)
-#define DUK_HBUFFER_SET_SIZE(x,v) do { \
+#define DUK_HBUFFER_GET_SIZE(x) ((x)->hdr.h_flags >> 16)
+#define DUK_HBUFFER_SET_SIZE(x, v) \
+ do { \
duk_size_t duk__v; \
duk__v = (v); \
DUK_ASSERT(duk__v <= 0xffffUL); \
(x)->hdr.h_flags = ((x)->hdr.h_flags & 0x0000ffffUL) | (((duk_uint32_t) duk__v) << 16); \
} while (0)
-#define DUK_HBUFFER_ADD_SIZE(x,dv) do { \
+#define DUK_HBUFFER_ADD_SIZE(x, dv) \
+ do { \
(x)->hdr.h_flags += ((dv) << 16); \
} while (0)
-#define DUK_HBUFFER_SUB_SIZE(x,dv) do { \
+#define DUK_HBUFFER_SUB_SIZE(x, dv) \
+ do { \
(x)->hdr.h_flags -= ((dv) << 16); \
} while (0)
#else
-#define DUK_HBUFFER_GET_SIZE(x) (((duk_hbuffer *) (x))->size)
-#define DUK_HBUFFER_SET_SIZE(x,v) do { \
+#define DUK_HBUFFER_GET_SIZE(x) (((duk_hbuffer *) (x))->size)
+#define DUK_HBUFFER_SET_SIZE(x, v) \
+ do { \
((duk_hbuffer *) (x))->size = (v); \
} while (0)
-#define DUK_HBUFFER_ADD_SIZE(x,dv) do { \
+#define DUK_HBUFFER_ADD_SIZE(x, dv) \
+ do { \
(x)->size += (dv); \
} while (0)
-#define DUK_HBUFFER_SUB_SIZE(x,dv) do { \
+#define DUK_HBUFFER_SUB_SIZE(x, dv) \
+ do { \
(x)->size -= (dv); \
} while (0)
#endif
-#define DUK_HBUFFER_FIXED_GET_SIZE(x) DUK_HBUFFER_GET_SIZE((duk_hbuffer *) (x))
-#define DUK_HBUFFER_FIXED_SET_SIZE(x,v) DUK_HBUFFER_SET_SIZE((duk_hbuffer *) (x))
+#define DUK_HBUFFER_FIXED_GET_SIZE(x) DUK_HBUFFER_GET_SIZE((duk_hbuffer *) (x))
+#define DUK_HBUFFER_FIXED_SET_SIZE(x, v) DUK_HBUFFER_SET_SIZE((duk_hbuffer *) (x))
#define DUK_HBUFFER_DYNAMIC_GET_SIZE(x) DUK_HBUFFER_GET_SIZE((duk_hbuffer *) (x))
-#define DUK_HBUFFER_DYNAMIC_SET_SIZE(x,v) DUK_HBUFFER_SET_SIZE((duk_hbuffer *) (x), (v))
-#define DUK_HBUFFER_DYNAMIC_ADD_SIZE(x,dv) DUK_HBUFFER_ADD_SIZE((duk_hbuffer *) (x), (dv))
-#define DUK_HBUFFER_DYNAMIC_SUB_SIZE(x,dv) DUK_HBUFFER_SUB_SIZE((duk_hbuffer *) (x), (dv))
+#define DUK_HBUFFER_DYNAMIC_SET_SIZE(x, v) DUK_HBUFFER_SET_SIZE((duk_hbuffer *) (x), (v))
+#define DUK_HBUFFER_DYNAMIC_ADD_SIZE(x, dv) DUK_HBUFFER_ADD_SIZE((duk_hbuffer *) (x), (dv))
+#define DUK_HBUFFER_DYNAMIC_SUB_SIZE(x, dv) DUK_HBUFFER_SUB_SIZE((duk_hbuffer *) (x), (dv))
#define DUK_HBUFFER_EXTERNAL_GET_SIZE(x) DUK_HBUFFER_GET_SIZE((duk_hbuffer *) (x))
-#define DUK_HBUFFER_EXTERNAL_SET_SIZE(x,v) DUK_HBUFFER_SET_SIZE((duk_hbuffer *) (x), (v))
+#define DUK_HBUFFER_EXTERNAL_SET_SIZE(x, v) DUK_HBUFFER_SET_SIZE((duk_hbuffer *) (x), (v))
-#define DUK_HBUFFER_FIXED_GET_DATA_PTR(heap,x) ((duk_uint8_t *) (((duk_hbuffer_fixed *) (void *) (x)) + 1))
+#define DUK_HBUFFER_FIXED_GET_DATA_PTR(heap, x) ((duk_uint8_t *) (((duk_hbuffer_fixed *) (void *) (x)) + 1))
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(heap,x) \
+#define DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(heap, x) \
((void *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, ((duk_heaphdr *) (x))->h_extra16))
-#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR(heap,x,v) do { \
+#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR(heap, x, v) \
+ do { \
((duk_heaphdr *) (x))->h_extra16 = DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (void *) (v)); \
} while (0)
-#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR_NULL(heap,x) do { \
- ((duk_heaphdr *) (x))->h_extra16 = 0; /* assume 0 <=> NULL */ \
+#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR_NULL(heap, x) \
+ do { \
+ ((duk_heaphdr *) (x))->h_extra16 = 0; /* assume 0 <=> NULL */ \
} while (0)
#else
-#define DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(heap,x) ((x)->curr_alloc)
-#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR(heap,x,v) do { \
+#define DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(heap, x) ((x)->curr_alloc)
+#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR(heap, x, v) \
+ do { \
(x)->curr_alloc = (void *) (v); \
} while (0)
-#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR_NULL(heap,x) do { \
+#define DUK_HBUFFER_DYNAMIC_SET_DATA_PTR_NULL(heap, x) \
+ do { \
(x)->curr_alloc = (void *) NULL; \
} while (0)
#endif
@@ -8112,21 +8692,23 @@ struct duk_hobjenv {
* Duktape heap.
*/
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HBUFFER_EXTERNAL_GET_DATA_PTR(heap,x) \
- ((void *) (x)->curr_alloc)
-#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR(heap,x,v) do { \
+#define DUK_HBUFFER_EXTERNAL_GET_DATA_PTR(heap, x) ((void *) (x)->curr_alloc)
+#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR(heap, x, v) \
+ do { \
(x)->curr_alloc = (void *) (v); \
} while (0)
-#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR_NULL(heap,x) do { \
+#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR_NULL(heap, x) \
+ do { \
(x)->curr_alloc = (void *) NULL; \
} while (0)
#else
-#define DUK_HBUFFER_EXTERNAL_GET_DATA_PTR(heap,x) \
- ((void *) (x)->curr_alloc)
-#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR(heap,x,v) do { \
+#define DUK_HBUFFER_EXTERNAL_GET_DATA_PTR(heap, x) ((void *) (x)->curr_alloc)
+#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR(heap, x, v) \
+ do { \
(x)->curr_alloc = (void *) (v); \
} while (0)
-#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR_NULL(heap,x) do { \
+#define DUK_HBUFFER_EXTERNAL_SET_DATA_PTR_NULL(heap, x) \
+ do { \
(x)->curr_alloc = (void *) NULL; \
} while (0)
#endif
@@ -8135,32 +8717,31 @@ struct duk_hobjenv {
* size). May be NULL for zero size dynamic/external buffer.
*/
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HBUFFER_GET_DATA_PTR(heap,x) ( \
- DUK_HBUFFER_HAS_DYNAMIC((x)) ? \
- ( \
- DUK_HBUFFER_HAS_EXTERNAL((x)) ? \
- DUK_HBUFFER_EXTERNAL_GET_DATA_PTR((heap), (duk_hbuffer_external *) (x)) : \
- DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((heap), (duk_hbuffer_dynamic *) (x)) \
- ) : \
- DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), (duk_hbuffer_fixed *) (void *) (x)) \
- )
+#define DUK_HBUFFER_GET_DATA_PTR(heap, x) \
+ (DUK_HBUFFER_HAS_DYNAMIC((x)) ? \
+ (DUK_HBUFFER_HAS_EXTERNAL((x)) ? DUK_HBUFFER_EXTERNAL_GET_DATA_PTR((heap), (duk_hbuffer_external *) (x)) : \
+ DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((heap), (duk_hbuffer_dynamic *) (x))) : \
+ DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), (duk_hbuffer_fixed *) (void *) (x)))
#else
/* Without heap pointer compression duk_hbuffer_dynamic and duk_hbuffer_external
* have the same layout so checking for fixed vs. dynamic (or external) is enough.
*/
-#define DUK_HBUFFER_GET_DATA_PTR(heap,x) ( \
- DUK_HBUFFER_HAS_DYNAMIC((x)) ? \
- DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((heap), (duk_hbuffer_dynamic *) (x)) : \
- DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), (duk_hbuffer_fixed *) (void *) (x)) \
- )
+#define DUK_HBUFFER_GET_DATA_PTR(heap, x) \
+ (DUK_HBUFFER_HAS_DYNAMIC((x)) ? DUK_HBUFFER_DYNAMIC_GET_DATA_PTR((heap), (duk_hbuffer_dynamic *) (x)) : \
+ DUK_HBUFFER_FIXED_GET_DATA_PTR((heap), (duk_hbuffer_fixed *) (void *) (x)))
#endif
/* Validity assert. */
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hbuffer_assert_valid(duk_hbuffer *h);
-#define DUK_HBUFFER_ASSERT_VALID(h) do { duk_hbuffer_assert_valid((h)); } while (0)
+#define DUK_HBUFFER_ASSERT_VALID(h) \
+ do { \
+ duk_hbuffer_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HBUFFER_ASSERT_VALID(h) do {} while (0)
+#define DUK_HBUFFER_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
/*
@@ -8258,9 +8839,9 @@ struct duk_hbuffer_fixed {
*/
}
#if (DUK_USE_ALIGN_BY == 8) && defined(DUK_USE_PACK_GCC_ATTR)
-__attribute__ ((aligned (8)))
+__attribute__((aligned(8)))
#elif (DUK_USE_ALIGN_BY == 8) && defined(DUK_USE_PACK_CLANG_ATTR)
-__attribute__ ((aligned (8)))
+__attribute__((aligned(8)))
#endif
;
#if (DUK_USE_ALIGN_BY == 8) && defined(DUK_USE_PACK_MSVC_PRAGMA)
@@ -8283,7 +8864,7 @@ struct duk_hbuffer_dynamic {
#if defined(DUK_USE_HEAPPTR16)
/* Stored in duk_heaphdr h_extra16. */
#else
- void *curr_alloc; /* may be NULL if alloc_size == 0 */
+ void *curr_alloc; /* may be NULL if alloc_size == 0 */
#endif
/*
@@ -8312,7 +8893,7 @@ struct duk_hbuffer_external {
/* Cannot be compressed as a heap pointer because may point to
* an arbitrary address.
*/
- void *curr_alloc; /* may be NULL if alloc_size == 0 */
+ void *curr_alloc; /* may be NULL if alloc_size == 0 */
};
/*
@@ -8320,13 +8901,13 @@ struct duk_hbuffer_external {
*/
DUK_INTERNAL_DECL duk_hbuffer *duk_hbuffer_alloc(duk_heap *heap, duk_size_t size, duk_small_uint_t flags, void **out_bufdata);
-DUK_INTERNAL_DECL void *duk_hbuffer_get_dynalloc_ptr(duk_heap *heap, void *ud); /* indirect allocs */
+DUK_INTERNAL_DECL void *duk_hbuffer_get_dynalloc_ptr(duk_heap *heap, void *ud); /* indirect allocs */
/* dynamic buffer ops */
DUK_INTERNAL_DECL void duk_hbuffer_resize(duk_hthread *thr, duk_hbuffer_dynamic *buf, duk_size_t new_size);
DUK_INTERNAL_DECL void duk_hbuffer_reset(duk_hthread *thr, duk_hbuffer_dynamic *buf);
-#endif /* DUK_HBUFFER_H_INCLUDED */
+#endif /* DUK_HBUFFER_H_INCLUDED */
/* #include duk_hproxy.h */
/*
* Proxy object representation.
@@ -8337,9 +8918,14 @@ DUK_INTERNAL_DECL void duk_hbuffer_reset(duk_hthread *thr, duk_hbuffer_dynamic *
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_hproxy_assert_valid(duk_hproxy *h);
-#define DUK_HPROXY_ASSERT_VALID(h) do { duk_hproxy_assert_valid((h)); } while (0)
+#define DUK_HPROXY_ASSERT_VALID(h) \
+ do { \
+ duk_hproxy_assert_valid((h)); \
+ } while (0)
#else
-#define DUK_HPROXY_ASSERT_VALID(h) do {} while (0)
+#define DUK_HPROXY_ASSERT_VALID(h) \
+ do { \
+ } while (0)
#endif
struct duk_hproxy {
@@ -8353,7 +8939,7 @@ struct duk_hproxy {
duk_hobject *handler;
};
-#endif /* DUK_HPROXY_H_INCLUDED */
+#endif /* DUK_HPROXY_H_INCLUDED */
/* #include duk_heap.h */
/*
* Heap structure.
@@ -8371,46 +8957,50 @@ struct duk_hproxy {
* Heap flags
*/
-#define DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED (1U << 0) /* mark-and-sweep marking reached a recursion limit and must use multi-pass marking */
-#define DUK_HEAP_FLAG_INTERRUPT_RUNNING (1U << 1) /* executor interrupt running (used to avoid nested interrupts) */
-#define DUK_HEAP_FLAG_FINALIZER_NORESCUE (1U << 2) /* heap destruction ongoing, finalizer rescue no longer possible */
-#define DUK_HEAP_FLAG_DEBUGGER_PAUSED (1U << 3) /* debugger is paused: talk with debug client until step/resume */
+#define DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED \
+ (1U << 0) /* mark-and-sweep marking reached a recursion limit and must use multi-pass marking */
+#define DUK_HEAP_FLAG_INTERRUPT_RUNNING (1U << 1) /* executor interrupt running (used to avoid nested interrupts) */
+#define DUK_HEAP_FLAG_FINALIZER_NORESCUE (1U << 2) /* heap destruction ongoing, finalizer rescue no longer possible */
+#define DUK_HEAP_FLAG_DEBUGGER_PAUSED (1U << 3) /* debugger is paused: talk with debug client until step/resume */
-#define DUK__HEAP_HAS_FLAGS(heap,bits) ((heap)->flags & (bits))
-#define DUK__HEAP_SET_FLAGS(heap,bits) do { \
+#define DUK__HEAP_HAS_FLAGS(heap, bits) ((heap)->flags & (bits))
+#define DUK__HEAP_SET_FLAGS(heap, bits) \
+ do { \
(heap)->flags |= (bits); \
} while (0)
-#define DUK__HEAP_CLEAR_FLAGS(heap,bits) do { \
+#define DUK__HEAP_CLEAR_FLAGS(heap, bits) \
+ do { \
(heap)->flags &= ~(bits); \
} while (0)
-#define DUK_HEAP_HAS_MARKANDSWEEP_RECLIMIT_REACHED(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED)
-#define DUK_HEAP_HAS_INTERRUPT_RUNNING(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_INTERRUPT_RUNNING)
-#define DUK_HEAP_HAS_FINALIZER_NORESCUE(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_FINALIZER_NORESCUE)
-#define DUK_HEAP_HAS_DEBUGGER_PAUSED(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_DEBUGGER_PAUSED)
+#define DUK_HEAP_HAS_MARKANDSWEEP_RECLIMIT_REACHED(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED)
+#define DUK_HEAP_HAS_INTERRUPT_RUNNING(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_INTERRUPT_RUNNING)
+#define DUK_HEAP_HAS_FINALIZER_NORESCUE(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_FINALIZER_NORESCUE)
+#define DUK_HEAP_HAS_DEBUGGER_PAUSED(heap) DUK__HEAP_HAS_FLAGS((heap), DUK_HEAP_FLAG_DEBUGGER_PAUSED)
-#define DUK_HEAP_SET_MARKANDSWEEP_RECLIMIT_REACHED(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED)
-#define DUK_HEAP_SET_INTERRUPT_RUNNING(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_INTERRUPT_RUNNING)
-#define DUK_HEAP_SET_FINALIZER_NORESCUE(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_FINALIZER_NORESCUE)
-#define DUK_HEAP_SET_DEBUGGER_PAUSED(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_DEBUGGER_PAUSED)
+#define DUK_HEAP_SET_MARKANDSWEEP_RECLIMIT_REACHED(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED)
+#define DUK_HEAP_SET_INTERRUPT_RUNNING(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_INTERRUPT_RUNNING)
+#define DUK_HEAP_SET_FINALIZER_NORESCUE(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_FINALIZER_NORESCUE)
+#define DUK_HEAP_SET_DEBUGGER_PAUSED(heap) DUK__HEAP_SET_FLAGS((heap), DUK_HEAP_FLAG_DEBUGGER_PAUSED)
-#define DUK_HEAP_CLEAR_MARKANDSWEEP_RECLIMIT_REACHED(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED)
-#define DUK_HEAP_CLEAR_INTERRUPT_RUNNING(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_INTERRUPT_RUNNING)
-#define DUK_HEAP_CLEAR_FINALIZER_NORESCUE(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_FINALIZER_NORESCUE)
-#define DUK_HEAP_CLEAR_DEBUGGER_PAUSED(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_DEBUGGER_PAUSED)
+#define DUK_HEAP_CLEAR_MARKANDSWEEP_RECLIMIT_REACHED(heap) \
+ DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_MARKANDSWEEP_RECLIMIT_REACHED)
+#define DUK_HEAP_CLEAR_INTERRUPT_RUNNING(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_INTERRUPT_RUNNING)
+#define DUK_HEAP_CLEAR_FINALIZER_NORESCUE(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_FINALIZER_NORESCUE)
+#define DUK_HEAP_CLEAR_DEBUGGER_PAUSED(heap) DUK__HEAP_CLEAR_FLAGS((heap), DUK_HEAP_FLAG_DEBUGGER_PAUSED)
/*
* Longjmp types, also double as identifying continuation type for a rethrow (in 'finally')
*/
-#define DUK_LJ_TYPE_UNKNOWN 0 /* unused */
-#define DUK_LJ_TYPE_THROW 1 /* value1 -> error object */
-#define DUK_LJ_TYPE_YIELD 2 /* value1 -> yield value, iserror -> error / normal */
-#define DUK_LJ_TYPE_RESUME 3 /* value1 -> resume value, value2 -> resumee thread, iserror -> error/normal */
-#define DUK_LJ_TYPE_BREAK 4 /* value1 -> label number, pseudo-type to indicate a break continuation (for ENDFIN) */
-#define DUK_LJ_TYPE_CONTINUE 5 /* value1 -> label number, pseudo-type to indicate a continue continuation (for ENDFIN) */
-#define DUK_LJ_TYPE_RETURN 6 /* value1 -> return value, pseudo-type to indicate a return continuation (for ENDFIN) */
-#define DUK_LJ_TYPE_NORMAL 7 /* no value, pseudo-type to indicate a normal continuation (for ENDFIN) */
+#define DUK_LJ_TYPE_UNKNOWN 0 /* unused */
+#define DUK_LJ_TYPE_THROW 1 /* value1 -> error object */
+#define DUK_LJ_TYPE_YIELD 2 /* value1 -> yield value, iserror -> error / normal */
+#define DUK_LJ_TYPE_RESUME 3 /* value1 -> resume value, value2 -> resumee thread, iserror -> error/normal */
+#define DUK_LJ_TYPE_BREAK 4 /* value1 -> label number, pseudo-type to indicate a break continuation (for ENDFIN) */
+#define DUK_LJ_TYPE_CONTINUE 5 /* value1 -> label number, pseudo-type to indicate a continue continuation (for ENDFIN) */
+#define DUK_LJ_TYPE_RETURN 6 /* value1 -> return value, pseudo-type to indicate a return continuation (for ENDFIN) */
+#define DUK_LJ_TYPE_NORMAL 7 /* no value, pseudo-type to indicate a normal continuation (for ENDFIN) */
/*
* Mark-and-sweep flags
@@ -8423,22 +9013,19 @@ struct duk_hproxy {
/* Emergency mark-and-sweep: try extra hard, even at the cost of
* performance.
*/
-#define DUK_MS_FLAG_EMERGENCY (1U << 0)
-
-/* Voluntary mark-and-sweep: triggered periodically. */
-#define DUK_MS_FLAG_VOLUNTARY (1U << 1)
+#define DUK_MS_FLAG_EMERGENCY (1U << 0)
/* Postpone rescue decisions for reachable objects with FINALIZED set.
* Used during finalize_list processing to avoid incorrect rescue
* decisions due to finalize_list being a reachability root.
*/
-#define DUK_MS_FLAG_POSTPONE_RESCUE (1U << 2)
+#define DUK_MS_FLAG_POSTPONE_RESCUE (1U << 1)
/* Don't compact objects; needed during object property table resize
* to prevent a recursive resize. It would suffice to protect only the
* current object being resized, but this is not yet implemented.
*/
-#define DUK_MS_FLAG_NO_OBJECT_COMPACTION (1U << 3)
+#define DUK_MS_FLAG_NO_OBJECT_COMPACTION (1U << 2)
/*
* Thread switching
@@ -8449,9 +9036,10 @@ struct duk_hproxy {
*/
#if defined(DUK_USE_INTERRUPT_COUNTER)
-#define DUK_HEAP_SWITCH_THREAD(heap,newthr) duk_heap_switch_thread((heap), (newthr))
+#define DUK_HEAP_SWITCH_THREAD(heap, newthr) duk_heap_switch_thread((heap), (newthr))
#else
-#define DUK_HEAP_SWITCH_THREAD(heap,newthr) do { \
+#define DUK_HEAP_SWITCH_THREAD(heap, newthr) \
+ do { \
(heap)->curr_thread = (newthr); \
} while (0)
#endif
@@ -8461,11 +9049,14 @@ struct duk_hproxy {
*/
#if defined(DUK_USE_DEBUG)
-#define DUK_STATS_INC(heap,fieldname) do { \
+#define DUK_STATS_INC(heap, fieldname) \
+ do { \
(heap)->fieldname += 1; \
} while (0)
#else
-#define DUK_STATS_INC(heap,fieldname) do {} while (0)
+#define DUK_STATS_INC(heap, fieldname) \
+ do { \
+ } while (0)
#endif
/*
@@ -8483,36 +9074,41 @@ struct duk_hproxy {
* only during init phases).
*/
#if defined(DUK_USE_REFERENCE_COUNTING)
-#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_MULT 12800L /* 50x heap size */
-#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_ADD 1024L
-#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_SKIP 256L
+#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_MULT 12800L /* 50x heap size */
+#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_ADD 1024L
+#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_SKIP 256L
#else
-#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_MULT 256L /* 1x heap size */
-#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_ADD 1024L
-#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_SKIP 256L
+#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_MULT 256L /* 1x heap size */
+#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_ADD 1024L
+#define DUK_HEAP_MARK_AND_SWEEP_TRIGGER_SKIP 256L
#endif
/* GC torture. */
#if defined(DUK_USE_GC_TORTURE)
-#define DUK_GC_TORTURE(heap) do { duk_heap_mark_and_sweep((heap), 0); } while (0)
+#define DUK_GC_TORTURE(heap) \
+ do { \
+ duk_heap_mark_and_sweep((heap), 0); \
+ } while (0)
#else
-#define DUK_GC_TORTURE(heap) do { } while (0)
+#define DUK_GC_TORTURE(heap) \
+ do { \
+ } while (0)
#endif
/* Stringcache is used for speeding up char-offset-to-byte-offset
* translations for non-ASCII strings.
*/
-#define DUK_HEAP_STRCACHE_SIZE 4
-#define DUK_HEAP_STRINGCACHE_NOCACHE_LIMIT 16 /* strings up to the this length are not cached */
+#define DUK_HEAP_STRCACHE_SIZE 4
+#define DUK_HEAP_STRINGCACHE_NOCACHE_LIMIT 16 /* strings up to the this length are not cached */
/* Some list management macros. */
-#define DUK_HEAP_INSERT_INTO_HEAP_ALLOCATED(heap,hdr) duk_heap_insert_into_heap_allocated((heap), (hdr))
+#define DUK_HEAP_INSERT_INTO_HEAP_ALLOCATED(heap, hdr) duk_heap_insert_into_heap_allocated((heap), (hdr))
#if defined(DUK_USE_REFERENCE_COUNTING)
-#define DUK_HEAP_REMOVE_FROM_HEAP_ALLOCATED(heap,hdr) duk_heap_remove_from_heap_allocated((heap), (hdr))
+#define DUK_HEAP_REMOVE_FROM_HEAP_ALLOCATED(heap, hdr) duk_heap_remove_from_heap_allocated((heap), (hdr))
#endif
#if defined(DUK_USE_FINALIZER_SUPPORT)
-#define DUK_HEAP_INSERT_INTO_FINALIZE_LIST(heap,hdr) duk_heap_insert_into_finalize_list((heap), (hdr))
-#define DUK_HEAP_REMOVE_FROM_FINALIZE_LIST(heap,hdr) duk_heap_remove_from_finalize_list((heap), (hdr))
+#define DUK_HEAP_INSERT_INTO_FINALIZE_LIST(heap, hdr) duk_heap_insert_into_finalize_list((heap), (hdr))
+#define DUK_HEAP_REMOVE_FROM_FINALIZE_LIST(heap, hdr) duk_heap_remove_from_finalize_list((heap), (hdr))
#endif
/*
@@ -8521,30 +9117,24 @@ struct duk_hproxy {
/* heap string indices are autogenerated in duk_strings.h */
#if defined(DUK_USE_ROM_STRINGS)
-#define DUK_HEAP_GET_STRING(heap,idx) \
- ((duk_hstring *) DUK_LOSE_CONST(duk_rom_strings_stridx[(idx)]))
-#else /* DUK_USE_ROM_STRINGS */
+#define DUK_HEAP_GET_STRING(heap, idx) ((duk_hstring *) DUK_LOSE_CONST(duk_rom_strings_stridx[(idx)]))
+#else /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_HEAPPTR16)
-#define DUK_HEAP_GET_STRING(heap,idx) \
- ((duk_hstring *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (heap)->strs16[(idx)]))
+#define DUK_HEAP_GET_STRING(heap, idx) ((duk_hstring *) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (heap)->strs16[(idx)]))
#else
-#define DUK_HEAP_GET_STRING(heap,idx) \
- ((heap)->strs[(idx)])
+#define DUK_HEAP_GET_STRING(heap, idx) ((heap)->strs[(idx)])
#endif
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
/*
* Raw memory calls: relative to heap, but no GC interaction
*/
-#define DUK_ALLOC_RAW(heap,size) \
- ((heap)->alloc_func((heap)->heap_udata, (size)))
+#define DUK_ALLOC_RAW(heap, size) ((heap)->alloc_func((heap)->heap_udata, (size)))
-#define DUK_REALLOC_RAW(heap,ptr,newsize) \
- ((heap)->realloc_func((heap)->heap_udata, (void *) (ptr), (newsize)))
+#define DUK_REALLOC_RAW(heap, ptr, newsize) ((heap)->realloc_func((heap)->heap_udata, (void *) (ptr), (newsize)))
-#define DUK_FREE_RAW(heap,ptr) \
- ((heap)->free_func((heap)->heap_udata, (void *) (ptr)))
+#define DUK_FREE_RAW(heap, ptr) ((heap)->free_func((heap)->heap_udata, (void *) (ptr)))
/*
* Memory calls: relative to heap, GC interaction, but no error throwing.
@@ -8577,11 +9167,11 @@ struct duk_hproxy {
/* callback for indirect reallocs, request for current pointer */
typedef void *(*duk_mem_getptr)(duk_heap *heap, void *ud);
-#define DUK_ALLOC(heap,size) duk_heap_mem_alloc((heap), (size))
-#define DUK_ALLOC_ZEROED(heap,size) duk_heap_mem_alloc_zeroed((heap), (size))
-#define DUK_REALLOC(heap,ptr,newsize) duk_heap_mem_realloc((heap), (ptr), (newsize))
-#define DUK_REALLOC_INDIRECT(heap,cb,ud,newsize) duk_heap_mem_realloc_indirect((heap), (cb), (ud), (newsize))
-#define DUK_FREE(heap,ptr) duk_heap_mem_free((heap), (ptr))
+#define DUK_ALLOC(heap, size) duk_heap_mem_alloc((heap), (size))
+#define DUK_ALLOC_ZEROED(heap, size) duk_heap_mem_alloc_zeroed((heap), (size))
+#define DUK_REALLOC(heap, ptr, newsize) duk_heap_mem_realloc((heap), (ptr), (newsize))
+#define DUK_REALLOC_INDIRECT(heap, cb, ud, newsize) duk_heap_mem_realloc_indirect((heap), (cb), (ud), (newsize))
+#define DUK_FREE(heap, ptr) duk_heap_mem_free((heap), (ptr))
/*
* Checked allocation, relative to a thread
@@ -8590,24 +9180,26 @@ typedef void *(*duk_mem_getptr)(duk_heap *heap, void *ud);
* for convenience.
*/
-#define DUK_ALLOC_CHECKED(thr,size) duk_heap_mem_alloc_checked((thr), (size))
-#define DUK_ALLOC_CHECKED_ZEROED(thr,size) duk_heap_mem_alloc_checked_zeroed((thr), (size))
-#define DUK_FREE_CHECKED(thr,ptr) duk_heap_mem_free((thr)->heap, (ptr))
+#define DUK_ALLOC_CHECKED(thr, size) duk_heap_mem_alloc_checked((thr), (size))
+#define DUK_ALLOC_CHECKED_ZEROED(thr, size) duk_heap_mem_alloc_checked_zeroed((thr), (size))
+#define DUK_FREE_CHECKED(thr, ptr) duk_heap_mem_free((thr)->heap, (ptr))
/*
* Memory constants
*/
-#define DUK_HEAP_ALLOC_FAIL_MARKANDSWEEP_LIMIT 10 /* Retry allocation after mark-and-sweep for this
- * many times. A single mark-and-sweep round is
- * not guaranteed to free all unreferenced memory
- * because of finalization (in fact, ANY number of
- * rounds is strictly not enough).
- */
+#define DUK_HEAP_ALLOC_FAIL_MARKANDSWEEP_LIMIT \
+ 10 /* Retry allocation after mark-and-sweep for this \
+ * many times. A single mark-and-sweep round is \
+ * not guaranteed to free all unreferenced memory \
+ * because of finalization (in fact, ANY number of \
+ * rounds is strictly not enough). \
+ */
-#define DUK_HEAP_ALLOC_FAIL_MARKANDSWEEP_EMERGENCY_LIMIT 3 /* Starting from this round, use emergency mode
- * for mark-and-sweep.
- */
+#define DUK_HEAP_ALLOC_FAIL_MARKANDSWEEP_EMERGENCY_LIMIT \
+ 3 /* Starting from this round, use emergency mode \
+ * for mark-and-sweep. \
+ */
/*
* Debugger support
@@ -8616,26 +9208,26 @@ typedef void *(*duk_mem_getptr)(duk_heap *heap, void *ud);
/* Maximum number of breakpoints. Only breakpoints that are set are
* consulted so increasing this has no performance impact.
*/
-#define DUK_HEAP_MAX_BREAKPOINTS 16
+#define DUK_HEAP_MAX_BREAKPOINTS 16
/* Opcode interval for a Date-based status/peek rate limit check. Only
* relevant when debugger is attached. Requesting a timestamp may be a
* slow operation on some platforms so this shouldn't be too low. On the
* other hand a high value makes Duktape react to a pause request slowly.
*/
-#define DUK_HEAP_DBG_RATELIMIT_OPCODES 4000
+#define DUK_HEAP_DBG_RATELIMIT_OPCODES 4000
/* Milliseconds between status notify and transport peeks. */
-#define DUK_HEAP_DBG_RATELIMIT_MILLISECS 200
+#define DUK_HEAP_DBG_RATELIMIT_MILLISECS 200
/* Debugger pause flags. */
-#define DUK_PAUSE_FLAG_ONE_OPCODE (1U << 0) /* pause when a single opcode has been executed */
-#define DUK_PAUSE_FLAG_ONE_OPCODE_ACTIVE (1U << 1) /* one opcode pause actually active; artifact of current implementation */
-#define DUK_PAUSE_FLAG_LINE_CHANGE (1U << 2) /* pause when current line number changes */
-#define DUK_PAUSE_FLAG_FUNC_ENTRY (1U << 3) /* pause when entering a function */
-#define DUK_PAUSE_FLAG_FUNC_EXIT (1U << 4) /* pause when exiting current function */
-#define DUK_PAUSE_FLAG_CAUGHT_ERROR (1U << 5) /* pause when about to throw an error that is caught */
-#define DUK_PAUSE_FLAG_UNCAUGHT_ERROR (1U << 6) /* pause when about to throw an error that won't be caught */
+#define DUK_PAUSE_FLAG_ONE_OPCODE (1U << 0) /* pause when a single opcode has been executed */
+#define DUK_PAUSE_FLAG_ONE_OPCODE_ACTIVE (1U << 1) /* one opcode pause actually active; artifact of current implementation */
+#define DUK_PAUSE_FLAG_LINE_CHANGE (1U << 2) /* pause when current line number changes */
+#define DUK_PAUSE_FLAG_FUNC_ENTRY (1U << 3) /* pause when entering a function */
+#define DUK_PAUSE_FLAG_FUNC_EXIT (1U << 4) /* pause when exiting current function */
+#define DUK_PAUSE_FLAG_CAUGHT_ERROR (1U << 5) /* pause when about to throw an error that is caught */
+#define DUK_PAUSE_FLAG_UNCAUGHT_ERROR (1U << 6) /* pause when about to throw an error that won't be caught */
struct duk_breakpoint {
duk_hstring *filename;
@@ -8663,21 +9255,23 @@ struct duk_strcache_entry {
*/
struct duk_ljstate {
- duk_jmpbuf *jmpbuf_ptr; /* current setjmp() catchpoint */
- duk_small_uint_t type; /* longjmp type */
- duk_bool_t iserror; /* isError flag for yield */
- duk_tval value1; /* 1st related value (type specific) */
- duk_tval value2; /* 2nd related value (type specific) */
+ duk_jmpbuf *jmpbuf_ptr; /* current setjmp() catchpoint */
+ duk_small_uint_t type; /* longjmp type */
+ duk_bool_t iserror; /* isError flag for yield */
+ duk_tval value1; /* 1st related value (type specific) */
+ duk_tval value2; /* 2nd related value (type specific) */
};
-#define DUK_ASSERT_LJSTATE_UNSET(heap) do { \
+#define DUK_ASSERT_LJSTATE_UNSET(heap) \
+ do { \
DUK_ASSERT(heap != NULL); \
DUK_ASSERT(heap->lj.type == DUK_LJ_TYPE_UNKNOWN); \
DUK_ASSERT(heap->lj.iserror == 0); \
DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(&heap->lj.value1)); \
DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(&heap->lj.value2)); \
} while (0)
-#define DUK_ASSERT_LJSTATE_SET(heap) do { \
+#define DUK_ASSERT_LJSTATE_SET(heap) \
+ do { \
DUK_ASSERT(heap != NULL); \
DUK_ASSERT(heap->lj.type != DUK_LJ_TYPE_UNKNOWN); \
} while (0)
@@ -8697,9 +9291,14 @@ struct duk_litcache_entry {
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL_DECL void duk_heap_assert_valid(duk_heap *heap);
-#define DUK_HEAP_ASSERT_VALID(heap) do { duk_heap_assert_valid((heap)); } while (0)
+#define DUK_HEAP_ASSERT_VALID(heap) \
+ do { \
+ duk_heap_assert_valid((heap)); \
+ } while (0)
#else
-#define DUK_HEAP_ASSERT_VALID(heap) do {} while (0)
+#define DUK_HEAP_ASSERT_VALID(heap) \
+ do { \
+ } while (0)
#endif
struct duk_heap {
@@ -8853,9 +9452,9 @@ struct duk_heap {
/* Random number state for duk_util_tinyrandom.c. */
#if !defined(DUK_USE_GET_RANDOM_DOUBLE)
#if defined(DUK_USE_PREFER_SIZE) || !defined(DUK_USE_64BIT_OPS)
- duk_uint32_t rnd_state; /* State for Shamir's three-op algorithm */
+ duk_uint32_t rnd_state; /* State for Shamir's three-op algorithm */
#else
- duk_uint64_t rnd_state[2]; /* State for xoroshiro128+ */
+ duk_uint64_t rnd_state[2]; /* State for xoroshiro128+ */
#endif
#endif
@@ -8878,8 +9477,8 @@ struct duk_heap {
/* Debugger state. */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
/* Callbacks and udata; dbg_read_cb != NULL is used to indicate attached state. */
- duk_debug_read_function dbg_read_cb; /* required, NULL implies detached */
- duk_debug_write_function dbg_write_cb; /* required */
+ duk_debug_read_function dbg_read_cb; /* required, NULL implies detached */
+ duk_debug_write_function dbg_write_cb; /* required */
duk_debug_peek_function dbg_peek_cb;
duk_debug_read_flush_function dbg_read_flush_cb;
duk_debug_write_flush_function dbg_write_flush_cb;
@@ -8888,29 +9487,32 @@ struct duk_heap {
void *dbg_udata;
/* The following are only relevant when debugger is attached. */
- duk_bool_t dbg_processing; /* currently processing messages or breakpoints: don't enter message processing recursively (e.g. no breakpoints when processing debugger eval) */
- duk_bool_t dbg_state_dirty; /* resend state next time executor is about to run */
- duk_bool_t dbg_force_restart; /* force executor restart to recheck breakpoints; used to handle function returns (see GH-303) */
- duk_bool_t dbg_detaching; /* debugger detaching; used to avoid calling detach handler recursively */
- duk_small_uint_t dbg_pause_flags; /* flags for automatic pause behavior */
- duk_activation *dbg_pause_act; /* activation related to pause behavior (pause on line change, function entry/exit) */
- duk_uint32_t dbg_pause_startline; /* starting line number for line change related pause behavior */
- duk_breakpoint dbg_breakpoints[DUK_HEAP_MAX_BREAKPOINTS]; /* breakpoints: [0,breakpoint_count[ gc reachable */
+ duk_bool_t dbg_processing; /* currently processing messages or breakpoints: don't enter message processing recursively (e.g.
+ no breakpoints when processing debugger eval) */
+ duk_bool_t dbg_state_dirty; /* resend state next time executor is about to run */
+ duk_bool_t
+ dbg_force_restart; /* force executor restart to recheck breakpoints; used to handle function returns (see GH-303) */
+ duk_bool_t dbg_detaching; /* debugger detaching; used to avoid calling detach handler recursively */
+ duk_small_uint_t dbg_pause_flags; /* flags for automatic pause behavior */
+ duk_activation *dbg_pause_act; /* activation related to pause behavior (pause on line change, function entry/exit) */
+ duk_uint32_t dbg_pause_startline; /* starting line number for line change related pause behavior */
+ duk_breakpoint dbg_breakpoints[DUK_HEAP_MAX_BREAKPOINTS]; /* breakpoints: [0,breakpoint_count[ gc reachable */
duk_small_uint_t dbg_breakpoint_count;
- duk_breakpoint *dbg_breakpoints_active[DUK_HEAP_MAX_BREAKPOINTS + 1]; /* currently active breakpoints: NULL term, borrowed pointers */
+ duk_breakpoint
+ *dbg_breakpoints_active[DUK_HEAP_MAX_BREAKPOINTS + 1]; /* currently active breakpoints: NULL term, borrowed pointers */
/* XXX: make active breakpoints actual copies instead of pointers? */
/* These are for rate limiting Status notifications and transport peeking. */
- duk_uint_t dbg_exec_counter; /* cumulative opcode execution count (overflows are OK) */
- duk_uint_t dbg_last_counter; /* value of dbg_exec_counter when we last did a Date-based check */
- duk_double_t dbg_last_time; /* time when status/peek was last done (Date-based rate limit) */
+ duk_uint_t dbg_exec_counter; /* cumulative opcode execution count (overflows are OK) */
+ duk_uint_t dbg_last_counter; /* value of dbg_exec_counter when we last did a Date-based check */
+ duk_double_t dbg_last_time; /* time when status/peek was last done (Date-based rate limit) */
/* Used to support single-byte stream lookahead. */
duk_bool_t dbg_have_next_byte;
duk_uint8_t dbg_next_byte;
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
#if defined(DUK_USE_ASSERTIONS)
- duk_bool_t dbg_calling_transport; /* transport call in progress, calling into Duktape forbidden */
+ duk_bool_t dbg_calling_transport; /* transport call in progress, calling into Duktape forbidden */
#endif
/* String intern table (weak refs). */
@@ -8919,12 +9521,12 @@ struct duk_heap {
#else
duk_hstring **strtable;
#endif
- duk_uint32_t st_mask; /* mask for lookup, st_size - 1 */
- duk_uint32_t st_size; /* stringtable size */
+ duk_uint32_t st_mask; /* mask for lookup, st_size - 1 */
+ duk_uint32_t st_size; /* stringtable size */
#if (DUK_USE_STRTAB_MINSIZE != DUK_USE_STRTAB_MAXSIZE)
- duk_uint32_t st_count; /* string count for resize load factor checks */
+ duk_uint32_t st_count; /* string count for resize load factor checks */
#endif
- duk_bool_t st_resizing; /* string table is being resized; avoid recursive resize */
+ duk_bool_t st_resizing; /* string table is being resized; avoid recursive resize */
/* String access cache (codepoint offset -> byte offset) for fast string
* character looping; 'weak' reference which needs special handling in GC.
@@ -9038,7 +9640,9 @@ DUK_INTERNAL_DECL void duk_heap_switch_thread(duk_heap *heap, duk_hthread *new_t
DUK_INTERNAL_DECL duk_hstring *duk_heap_strtable_intern(duk_heap *heap, const duk_uint8_t *str, duk_uint32_t blen);
DUK_INTERNAL_DECL duk_hstring *duk_heap_strtable_intern_checked(duk_hthread *thr, const duk_uint8_t *str, duk_uint32_t len);
#if defined(DUK_USE_LITCACHE_SIZE)
-DUK_INTERNAL_DECL duk_hstring *duk_heap_strtable_intern_literal_checked(duk_hthread *thr, const duk_uint8_t *str, duk_uint32_t blen);
+DUK_INTERNAL_DECL duk_hstring *duk_heap_strtable_intern_literal_checked(duk_hthread *thr,
+ const duk_uint8_t *str,
+ duk_uint32_t blen);
#endif
DUK_INTERNAL_DECL duk_hstring *duk_heap_strtable_intern_u32(duk_heap *heap, duk_uint32_t val);
DUK_INTERNAL_DECL duk_hstring *duk_heap_strtable_intern_u32_checked(duk_hthread *thr, duk_uint32_t val);
@@ -9053,7 +9657,9 @@ DUK_INTERNAL void duk_heap_strtable_dump(duk_heap *heap);
#endif
DUK_INTERNAL_DECL void duk_heap_strcache_string_remove(duk_heap *heap, duk_hstring *h);
-DUK_INTERNAL_DECL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *thr, duk_hstring *h, duk_uint_fast32_t char_offset);
+DUK_INTERNAL_DECL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *thr,
+ duk_hstring *h,
+ duk_uint_fast32_t char_offset);
#if defined(DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS)
DUK_INTERNAL_DECL void *duk_default_alloc_function(void *udata, duk_size_t size);
@@ -9074,13 +9680,13 @@ DUK_INTERNAL_DECL void duk_heap_free_freelists(duk_heap *heap);
#if defined(DUK_USE_FINALIZER_SUPPORT)
DUK_INTERNAL_DECL void duk_heap_run_finalizer(duk_heap *heap, duk_hobject *obj);
DUK_INTERNAL_DECL void duk_heap_process_finalize_list(duk_heap *heap);
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
DUK_INTERNAL_DECL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags);
DUK_INTERNAL_DECL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uint8_t *str, duk_size_t len);
-#endif /* DUK_HEAP_H_INCLUDED */
+#endif /* DUK_HEAP_H_INCLUDED */
/* #include duk_debugger.h */
#if !defined(DUK_DEBUGGER_H_INCLUDED)
#define DUK_DEBUGGER_H_INCLUDED
@@ -9088,77 +9694,77 @@ DUK_INTERNAL_DECL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uin
/* Debugger protocol version is defined in the public API header. */
/* Initial bytes for markers. */
-#define DUK_DBG_IB_EOM 0x00
-#define DUK_DBG_IB_REQUEST 0x01
-#define DUK_DBG_IB_REPLY 0x02
-#define DUK_DBG_IB_ERROR 0x03
-#define DUK_DBG_IB_NOTIFY 0x04
+#define DUK_DBG_IB_EOM 0x00
+#define DUK_DBG_IB_REQUEST 0x01
+#define DUK_DBG_IB_REPLY 0x02
+#define DUK_DBG_IB_ERROR 0x03
+#define DUK_DBG_IB_NOTIFY 0x04
/* Other initial bytes. */
-#define DUK_DBG_IB_INT4 0x10
-#define DUK_DBG_IB_STR4 0x11
-#define DUK_DBG_IB_STR2 0x12
-#define DUK_DBG_IB_BUF4 0x13
-#define DUK_DBG_IB_BUF2 0x14
-#define DUK_DBG_IB_UNUSED 0x15
-#define DUK_DBG_IB_UNDEFINED 0x16
-#define DUK_DBG_IB_NULL 0x17
-#define DUK_DBG_IB_TRUE 0x18
-#define DUK_DBG_IB_FALSE 0x19
-#define DUK_DBG_IB_NUMBER 0x1a
-#define DUK_DBG_IB_OBJECT 0x1b
-#define DUK_DBG_IB_POINTER 0x1c
-#define DUK_DBG_IB_LIGHTFUNC 0x1d
-#define DUK_DBG_IB_HEAPPTR 0x1e
+#define DUK_DBG_IB_INT4 0x10
+#define DUK_DBG_IB_STR4 0x11
+#define DUK_DBG_IB_STR2 0x12
+#define DUK_DBG_IB_BUF4 0x13
+#define DUK_DBG_IB_BUF2 0x14
+#define DUK_DBG_IB_UNUSED 0x15
+#define DUK_DBG_IB_UNDEFINED 0x16
+#define DUK_DBG_IB_NULL 0x17
+#define DUK_DBG_IB_TRUE 0x18
+#define DUK_DBG_IB_FALSE 0x19
+#define DUK_DBG_IB_NUMBER 0x1a
+#define DUK_DBG_IB_OBJECT 0x1b
+#define DUK_DBG_IB_POINTER 0x1c
+#define DUK_DBG_IB_LIGHTFUNC 0x1d
+#define DUK_DBG_IB_HEAPPTR 0x1e
/* The short string/integer initial bytes starting from 0x60 don't have
* defines now.
*/
/* Error codes. */
-#define DUK_DBG_ERR_UNKNOWN 0x00
-#define DUK_DBG_ERR_UNSUPPORTED 0x01
-#define DUK_DBG_ERR_TOOMANY 0x02
-#define DUK_DBG_ERR_NOTFOUND 0x03
-#define DUK_DBG_ERR_APPLICATION 0x04
+#define DUK_DBG_ERR_UNKNOWN 0x00
+#define DUK_DBG_ERR_UNSUPPORTED 0x01
+#define DUK_DBG_ERR_TOOMANY 0x02
+#define DUK_DBG_ERR_NOTFOUND 0x03
+#define DUK_DBG_ERR_APPLICATION 0x04
/* Commands and notifys initiated by Duktape. */
-#define DUK_DBG_CMD_STATUS 0x01
-#define DUK_DBG_CMD_UNUSED_2 0x02 /* Duktape 1.x: print notify */
-#define DUK_DBG_CMD_UNUSED_3 0x03 /* Duktape 1.x: alert notify */
-#define DUK_DBG_CMD_UNUSED_4 0x04 /* Duktape 1.x: log notify */
-#define DUK_DBG_CMD_THROW 0x05
-#define DUK_DBG_CMD_DETACHING 0x06
-#define DUK_DBG_CMD_APPNOTIFY 0x07
+#define DUK_DBG_CMD_STATUS 0x01
+#define DUK_DBG_CMD_UNUSED_2 0x02 /* Duktape 1.x: print notify */
+#define DUK_DBG_CMD_UNUSED_3 0x03 /* Duktape 1.x: alert notify */
+#define DUK_DBG_CMD_UNUSED_4 0x04 /* Duktape 1.x: log notify */
+#define DUK_DBG_CMD_THROW 0x05
+#define DUK_DBG_CMD_DETACHING 0x06
+#define DUK_DBG_CMD_APPNOTIFY 0x07
/* Commands initiated by debug client. */
-#define DUK_DBG_CMD_BASICINFO 0x10
-#define DUK_DBG_CMD_TRIGGERSTATUS 0x11
-#define DUK_DBG_CMD_PAUSE 0x12
-#define DUK_DBG_CMD_RESUME 0x13
-#define DUK_DBG_CMD_STEPINTO 0x14
-#define DUK_DBG_CMD_STEPOVER 0x15
-#define DUK_DBG_CMD_STEPOUT 0x16
-#define DUK_DBG_CMD_LISTBREAK 0x17
-#define DUK_DBG_CMD_ADDBREAK 0x18
-#define DUK_DBG_CMD_DELBREAK 0x19
-#define DUK_DBG_CMD_GETVAR 0x1a
-#define DUK_DBG_CMD_PUTVAR 0x1b
-#define DUK_DBG_CMD_GETCALLSTACK 0x1c
-#define DUK_DBG_CMD_GETLOCALS 0x1d
-#define DUK_DBG_CMD_EVAL 0x1e
-#define DUK_DBG_CMD_DETACH 0x1f
-#define DUK_DBG_CMD_DUMPHEAP 0x20
-#define DUK_DBG_CMD_GETBYTECODE 0x21
-#define DUK_DBG_CMD_APPREQUEST 0x22
-#define DUK_DBG_CMD_GETHEAPOBJINFO 0x23
-#define DUK_DBG_CMD_GETOBJPROPDESC 0x24
-#define DUK_DBG_CMD_GETOBJPROPDESCRANGE 0x25
+#define DUK_DBG_CMD_BASICINFO 0x10
+#define DUK_DBG_CMD_TRIGGERSTATUS 0x11
+#define DUK_DBG_CMD_PAUSE 0x12
+#define DUK_DBG_CMD_RESUME 0x13
+#define DUK_DBG_CMD_STEPINTO 0x14
+#define DUK_DBG_CMD_STEPOVER 0x15
+#define DUK_DBG_CMD_STEPOUT 0x16
+#define DUK_DBG_CMD_LISTBREAK 0x17
+#define DUK_DBG_CMD_ADDBREAK 0x18
+#define DUK_DBG_CMD_DELBREAK 0x19
+#define DUK_DBG_CMD_GETVAR 0x1a
+#define DUK_DBG_CMD_PUTVAR 0x1b
+#define DUK_DBG_CMD_GETCALLSTACK 0x1c
+#define DUK_DBG_CMD_GETLOCALS 0x1d
+#define DUK_DBG_CMD_EVAL 0x1e
+#define DUK_DBG_CMD_DETACH 0x1f
+#define DUK_DBG_CMD_DUMPHEAP 0x20
+#define DUK_DBG_CMD_GETBYTECODE 0x21
+#define DUK_DBG_CMD_APPREQUEST 0x22
+#define DUK_DBG_CMD_GETHEAPOBJINFO 0x23
+#define DUK_DBG_CMD_GETOBJPROPDESC 0x24
+#define DUK_DBG_CMD_GETOBJPROPDESCRANGE 0x25
/* The low 8 bits map directly to duk_hobject.h DUK_PROPDESC_FLAG_xxx.
* The remaining flags are specific to the debugger.
*/
-#define DUK_DBG_PROPFLAG_SYMBOL (1U << 8)
-#define DUK_DBG_PROPFLAG_HIDDEN (1U << 9)
+#define DUK_DBG_PROPFLAG_SYMBOL (1U << 8)
+#define DUK_DBG_PROPFLAG_HIDDEN (1U << 9)
#if defined(DUK_USE_DEBUGGER_SUPPORT)
DUK_INTERNAL_DECL void duk_debug_do_detach(duk_heap *heap);
@@ -9205,7 +9811,7 @@ DUK_INTERNAL_DECL void duk_debug_write_heapptr(duk_hthread *thr, duk_heaphdr *h)
#endif
DUK_INTERNAL_DECL void duk_debug_write_hobject(duk_hthread *thr, duk_hobject *obj);
DUK_INTERNAL_DECL void duk_debug_write_tval(duk_hthread *thr, duk_tval *tv);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_INTERNAL_DECL void duk_debug_write_request(duk_hthread *thr, duk_small_uint_t command);
#endif
DUK_INTERNAL_DECL void duk_debug_write_reply(duk_hthread *thr);
@@ -9230,9 +9836,9 @@ DUK_INTERNAL_DECL duk_bool_t duk_debug_is_paused(duk_heap *heap);
DUK_INTERNAL_DECL void duk_debug_set_paused(duk_heap *heap);
DUK_INTERNAL_DECL void duk_debug_clear_paused(duk_heap *heap);
DUK_INTERNAL_DECL void duk_debug_clear_pause_state(duk_heap *heap);
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
-#endif /* DUK_DEBUGGER_H_INCLUDED */
+#endif /* DUK_DEBUGGER_H_INCLUDED */
/* #include duk_debug.h */
/*
* Debugging macros, DUK_DPRINT() and its variants in particular.
@@ -9264,19 +9870,25 @@ DUK_INTERNAL_DECL void duk_debug_clear_pause_state(duk_heap *heap);
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 0)
#define DUK_D(x) x
#else
-#define DUK_D(x) do { } while (0) /* omit */
+#define DUK_D(x) \
+ do { \
+ } while (0) /* omit */
#endif
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 1)
#define DUK_DD(x) x
#else
-#define DUK_DD(x) do { } while (0) /* omit */
+#define DUK_DD(x) \
+ do { \
+ } while (0) /* omit */
#endif
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 2)
#define DUK_DDD(x) x
#else
-#define DUK_DDD(x) do { } while (0) /* omit */
+#define DUK_DDD(x) \
+ do { \
+ } while (0) /* omit */
#endif
/*
@@ -9288,35 +9900,35 @@ DUK_INTERNAL_DECL void duk_debug_clear_pause_state(duk_heap *heap);
/* Note: combining __FILE__, __LINE__, and __func__ into fmt would be
* possible compile time, but waste some space with shared function names.
*/
-#define DUK__DEBUG_LOG(lev,...) duk_debug_log((duk_int_t) (lev), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, DUK_FUNC_MACRO, __VA_ARGS__);
+#define DUK__DEBUG_LOG(lev, ...) \
+ duk_debug_log((duk_int_t) (lev), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, DUK_FUNC_MACRO, __VA_ARGS__);
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 0)
-#define DUK_DPRINT(...) DUK__DEBUG_LOG(DUK_LEVEL_DEBUG, __VA_ARGS__)
+#define DUK_DPRINT(...) DUK__DEBUG_LOG(DUK_LEVEL_DEBUG, __VA_ARGS__)
#else
#define DUK_DPRINT(...)
#endif
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 1)
-#define DUK_DDPRINT(...) DUK__DEBUG_LOG(DUK_LEVEL_DDEBUG, __VA_ARGS__)
+#define DUK_DDPRINT(...) DUK__DEBUG_LOG(DUK_LEVEL_DDEBUG, __VA_ARGS__)
#else
#define DUK_DDPRINT(...)
#endif
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 2)
-#define DUK_DDDPRINT(...) DUK__DEBUG_LOG(DUK_LEVEL_DDDEBUG, __VA_ARGS__)
+#define DUK_DDDPRINT(...) DUK__DEBUG_LOG(DUK_LEVEL_DDDEBUG, __VA_ARGS__)
#else
#define DUK_DDDPRINT(...)
#endif
-#else /* DUK_USE_VARIADIC_MACROS */
+#else /* DUK_USE_VARIADIC_MACROS */
-#define DUK__DEBUG_STASH(lev) \
+#define DUK__DEBUG_STASH(lev) \
(void) DUK_SNPRINTF(duk_debug_file_stash, DUK_DEBUG_STASH_SIZE, "%s", (const char *) DUK_FILE_MACRO), \
- (void) (duk_debug_file_stash[DUK_DEBUG_STASH_SIZE - 1] = (char) 0), \
- (void) (duk_debug_line_stash = (duk_int_t) DUK_LINE_MACRO), \
- (void) DUK_SNPRINTF(duk_debug_func_stash, DUK_DEBUG_STASH_SIZE, "%s", (const char *) DUK_FUNC_MACRO), \
- (void) (duk_debug_func_stash[DUK_DEBUG_STASH_SIZE - 1] = (char) 0), \
- (void) (duk_debug_level_stash = (lev))
+ (void) (duk_debug_file_stash[DUK_DEBUG_STASH_SIZE - 1] = (char) 0), \
+ (void) (duk_debug_line_stash = (duk_int_t) DUK_LINE_MACRO), \
+ (void) DUK_SNPRINTF(duk_debug_func_stash, DUK_DEBUG_STASH_SIZE, "%s", (const char *) DUK_FUNC_MACRO), \
+ (void) (duk_debug_func_stash[DUK_DEBUG_STASH_SIZE - 1] = (char) 0), (void) (duk_debug_level_stash = (lev))
/* Without variadic macros resort to comma expression trickery to handle debug
* prints. This generates a lot of harmless warnings. These hacks are not
@@ -9325,34 +9937,40 @@ DUK_INTERNAL_DECL void duk_debug_clear_pause_state(duk_heap *heap);
*/
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 0)
-#define DUK_DPRINT DUK__DEBUG_STASH(DUK_LEVEL_DEBUG), (void) duk_debug_log /* args go here in parens */
+#define DUK_DPRINT DUK__DEBUG_STASH(DUK_LEVEL_DEBUG), (void) duk_debug_log /* args go here in parens */
#else
-#define DUK_DPRINT 0 && /* args go here as a comma expression in parens */
+#define DUK_DPRINT 0 && /* args go here as a comma expression in parens */
#endif
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 1)
-#define DUK_DDPRINT DUK__DEBUG_STASH(DUK_LEVEL_DDEBUG), (void) duk_debug_log /* args go here in parens */
+#define DUK_DDPRINT DUK__DEBUG_STASH(DUK_LEVEL_DDEBUG), (void) duk_debug_log /* args go here in parens */
#else
-#define DUK_DDPRINT 0 && /* args */
+#define DUK_DDPRINT 0 && /* args */
#endif
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 2)
-#define DUK_DDDPRINT DUK__DEBUG_STASH(DUK_LEVEL_DDDEBUG), (void) duk_debug_log /* args go here in parens */
+#define DUK_DDDPRINT DUK__DEBUG_STASH(DUK_LEVEL_DDDEBUG), (void) duk_debug_log /* args go here in parens */
#else
-#define DUK_DDDPRINT 0 && /* args */
+#define DUK_DDDPRINT 0 && /* args */
#endif
-#endif /* DUK_USE_VARIADIC_MACROS */
+#endif /* DUK_USE_VARIADIC_MACROS */
-#else /* DUK_USE_DEBUG */
+#else /* DUK_USE_DEBUG */
/*
* Exposed debug macros: debugging disabled
*/
-#define DUK_D(x) do { } while (0) /* omit */
-#define DUK_DD(x) do { } while (0) /* omit */
-#define DUK_DDD(x) do { } while (0) /* omit */
+#define DUK_D(x) \
+ do { \
+ } while (0) /* omit */
+#define DUK_DD(x) \
+ do { \
+ } while (0) /* omit */
+#define DUK_DDD(x) \
+ do { \
+ } while (0) /* omit */
#if defined(DUK_USE_VARIADIC_MACROS)
@@ -9360,15 +9978,15 @@ DUK_INTERNAL_DECL void duk_debug_clear_pause_state(duk_heap *heap);
#define DUK_DDPRINT(...)
#define DUK_DDDPRINT(...)
-#else /* DUK_USE_VARIADIC_MACROS */
+#else /* DUK_USE_VARIADIC_MACROS */
-#define DUK_DPRINT 0 && /* args go here as a comma expression in parens */
-#define DUK_DDPRINT 0 && /* args */
-#define DUK_DDDPRINT 0 && /* args */
+#define DUK_DPRINT 0 && /* args go here as a comma expression in parens */
+#define DUK_DDPRINT 0 && /* args */
+#define DUK_DDDPRINT 0 && /* args */
-#endif /* DUK_USE_VARIADIC_MACROS */
+#endif /* DUK_USE_VARIADIC_MACROS */
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
/*
* Structs
@@ -9389,16 +10007,16 @@ struct duk_fixedbuffer {
#if defined(DUK_USE_DEBUG)
DUK_INTERNAL_DECL duk_int_t duk_debug_vsnprintf(char *str, duk_size_t size, const char *format, va_list ap);
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL_DECL duk_int_t duk_debug_snprintf(char *str, duk_size_t size, const char *format, ...);
#endif
DUK_INTERNAL_DECL void duk_debug_format_funcptr(char *buf, duk_size_t buf_size, duk_uint8_t *fptr, duk_size_t fptr_size);
#if defined(DUK_USE_VARIADIC_MACROS)
DUK_INTERNAL_DECL void duk_debug_log(duk_int_t level, const char *file, duk_int_t line, const char *func, const char *fmt, ...);
-#else /* DUK_USE_VARIADIC_MACROS */
+#else /* DUK_USE_VARIADIC_MACROS */
/* parameter passing, not thread safe */
-#define DUK_DEBUG_STASH_SIZE 128
+#define DUK_DEBUG_STASH_SIZE 128
#if !defined(DUK_SINGLE_FILE)
DUK_INTERNAL_DECL char duk_debug_file_stash[DUK_DEBUG_STASH_SIZE];
DUK_INTERNAL_DECL duk_int_t duk_debug_line_stash;
@@ -9406,7 +10024,7 @@ DUK_INTERNAL_DECL char duk_debug_func_stash[DUK_DEBUG_STASH_SIZE];
DUK_INTERNAL_DECL duk_int_t duk_debug_level_stash;
#endif
DUK_INTERNAL_DECL void duk_debug_log(const char *fmt, ...);
-#endif /* DUK_USE_VARIADIC_MACROS */
+#endif /* DUK_USE_VARIADIC_MACROS */
DUK_INTERNAL_DECL void duk_fb_put_bytes(duk_fixedbuffer *fb, const duk_uint8_t *buffer, duk_size_t length);
DUK_INTERNAL_DECL void duk_fb_put_byte(duk_fixedbuffer *fb, duk_uint8_t x);
@@ -9415,9 +10033,9 @@ DUK_INTERNAL_DECL void duk_fb_sprintf(duk_fixedbuffer *fb, const char *fmt, ...)
DUK_INTERNAL_DECL void duk_fb_put_funcptr(duk_fixedbuffer *fb, duk_uint8_t *fptr, duk_size_t fptr_size);
DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
-#endif /* DUK_DEBUG_H_INCLUDED */
+#endif /* DUK_DEBUG_H_INCLUDED */
/* #include duk_error.h */
/*
* Error handling macros, assertion macro, error codes.
@@ -9474,79 +10092,153 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
/* Because there are quite many call sites, pack error code (require at most
* 8-bit) into a single argument.
*/
-#define DUK_ERROR(thr,err,msg) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+#define DUK_ERROR(thr, err, msg) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
duk_err_handle_error((thr), DUK_FILE_MACRO, (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (msg)); \
} while (0)
-#define DUK_ERROR_RAW(thr,file,line,err,msg) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) (line); \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+#define DUK_ERROR_RAW(thr, file, line, err, msg) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) (line); \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
duk_err_handle_error((thr), (file), (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (msg)); \
} while (0)
-#define DUK_ERROR_FMT1(thr,err,fmt,arg1) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), DUK_FILE_MACRO, (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1)); \
+#define DUK_ERROR_FMT1(thr, err, fmt, arg1) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ DUK_FILE_MACRO, \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1)); \
} while (0)
-#define DUK_ERROR_RAW_FMT1(thr,file,line,err,fmt,arg1) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) (line); \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), (file), (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1)); \
+#define DUK_ERROR_RAW_FMT1(thr, file, line, err, fmt, arg1) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) (line); \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ (file), \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1)); \
} while (0)
-#define DUK_ERROR_FMT2(thr,err,fmt,arg1,arg2) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), DUK_FILE_MACRO, (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1), (arg2)); \
+#define DUK_ERROR_FMT2(thr, err, fmt, arg1, arg2) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ DUK_FILE_MACRO, \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1), \
+ (arg2)); \
} while (0)
-#define DUK_ERROR_RAW_FMT2(thr,file,line,err,fmt,arg1,arg2) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) (line); \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), (file), (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1), (arg2)); \
+#define DUK_ERROR_RAW_FMT2(thr, file, line, err, fmt, arg1, arg2) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) (line); \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ (file), \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1), \
+ (arg2)); \
} while (0)
-#define DUK_ERROR_FMT3(thr,err,fmt,arg1,arg2,arg3) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), DUK_FILE_MACRO, (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1), (arg2), (arg3)); \
+#define DUK_ERROR_FMT3(thr, err, fmt, arg1, arg2, arg3) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ DUK_FILE_MACRO, \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1), \
+ (arg2), \
+ (arg3)); \
} while (0)
-#define DUK_ERROR_RAW_FMT3(thr,file,line,err,fmt,arg1,arg2,arg3) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) (line); \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), (file), (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1), (arg2), (arg3)); \
+#define DUK_ERROR_RAW_FMT3(thr, file, line, err, fmt, arg1, arg2, arg3) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) (line); \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ (file), \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1), \
+ (arg2), \
+ (arg3)); \
} while (0)
-#define DUK_ERROR_FMT4(thr,err,fmt,arg1,arg2,arg3,arg4) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), DUK_FILE_MACRO, (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1), (arg2), (arg3), (arg4)); \
+#define DUK_ERROR_FMT4(thr, err, fmt, arg1, arg2, arg3, arg4) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) DUK_LINE_MACRO; \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ DUK_FILE_MACRO, \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1), \
+ (arg2), \
+ (arg3), \
+ (arg4)); \
} while (0)
-#define DUK_ERROR_RAW_FMT4(thr,file,line,err,fmt,arg1,arg2,arg3,arg4) do { \
- duk_errcode_t duk__err = (err); duk_int_t duk__line = (duk_int_t) (line); \
- DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
- duk_err_handle_error_fmt((thr), (file), (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), (fmt), (arg1), (arg2), (arg3), (arg4)); \
+#define DUK_ERROR_RAW_FMT4(thr, file, line, err, fmt, arg1, arg2, arg3, arg4) \
+ do { \
+ duk_errcode_t duk__err = (err); \
+ duk_int_t duk__line = (duk_int_t) (line); \
+ DUK_ASSERT(duk__err >= 0 && duk__err <= 0xff); \
+ DUK_ASSERT(duk__line >= 0 && duk__line <= 0x00ffffffL); \
+ duk_err_handle_error_fmt((thr), \
+ (file), \
+ (((duk_uint_t) duk__err) << 24) | ((duk_uint_t) duk__line), \
+ (fmt), \
+ (arg1), \
+ (arg2), \
+ (arg3), \
+ (arg4)); \
} while (0)
-#else /* DUK_USE_VERBOSE_ERRORS */
+#else /* DUK_USE_VERBOSE_ERRORS */
-#define DUK_ERROR(thr,err,msg) duk_err_handle_error((thr), (err))
-#define DUK_ERROR_RAW(thr,file,line,err,msg) duk_err_handle_error((thr), (err))
+#define DUK_ERROR(thr, err, msg) duk_err_handle_error((thr), (err))
+#define DUK_ERROR_RAW(thr, file, line, err, msg) duk_err_handle_error((thr), (err))
-#define DUK_ERROR_FMT1(thr,err,fmt,arg1) DUK_ERROR((thr),(err),(fmt))
-#define DUK_ERROR_RAW_FMT1(thr,file,line,err,fmt,arg1) DUK_ERROR_RAW((thr),(file),(line),(err),(fmt))
+#define DUK_ERROR_FMT1(thr, err, fmt, arg1) DUK_ERROR((thr), (err), (fmt))
+#define DUK_ERROR_RAW_FMT1(thr, file, line, err, fmt, arg1) DUK_ERROR_RAW((thr), (file), (line), (err), (fmt))
-#define DUK_ERROR_FMT2(thr,err,fmt,arg1,arg2) DUK_ERROR((thr),(err),(fmt))
-#define DUK_ERROR_RAW_FMT2(thr,file,line,err,fmt,arg1,arg2) DUK_ERROR_RAW((thr),(file),(line),(err),(fmt))
+#define DUK_ERROR_FMT2(thr, err, fmt, arg1, arg2) DUK_ERROR((thr), (err), (fmt))
+#define DUK_ERROR_RAW_FMT2(thr, file, line, err, fmt, arg1, arg2) DUK_ERROR_RAW((thr), (file), (line), (err), (fmt))
-#define DUK_ERROR_FMT3(thr,err,fmt,arg1,arg2,arg3) DUK_ERROR((thr),(err),(fmt))
-#define DUK_ERROR_RAW_FMT3(thr,file,line,err,fmt,arg1,arg2,arg3) DUK_ERROR_RAW((thr),(file),(line),(err),(fmt))
+#define DUK_ERROR_FMT3(thr, err, fmt, arg1, arg2, arg3) DUK_ERROR((thr), (err), (fmt))
+#define DUK_ERROR_RAW_FMT3(thr, file, line, err, fmt, arg1, arg2, arg3) DUK_ERROR_RAW((thr), (file), (line), (err), (fmt))
-#define DUK_ERROR_FMT4(thr,err,fmt,arg1,arg2,arg3,arg4) DUK_ERROR((thr),(err),(fmt))
-#define DUK_ERROR_RAW_FMT4(thr,file,line,err,fmt,arg1,arg2,arg3,arg4) DUK_ERROR_RAW((thr),(file),(line),(err),(fmt))
+#define DUK_ERROR_FMT4(thr, err, fmt, arg1, arg2, arg3, arg4) DUK_ERROR((thr), (err), (fmt))
+#define DUK_ERROR_RAW_FMT4(thr, file, line, err, fmt, arg1, arg2, arg3, arg4) DUK_ERROR_RAW((thr), (file), (line), (err), (fmt))
-#endif /* DUK_USE_VERBOSE_ERRORS */
+#endif /* DUK_USE_VERBOSE_ERRORS */
/*
* Fatal error without context
@@ -9554,8 +10246,7 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
* The macro is an expression to make it compatible with DUK_ASSERT_EXPR().
*/
-#define DUK_FATAL_WITHOUT_CONTEXT(msg) \
- duk_default_fatal_handler(NULL, (msg))
+#define DUK_FATAL_WITHOUT_CONTEXT(msg) duk_default_fatal_handler(NULL, (msg))
/*
* Error throwing helpers
@@ -9580,196 +10271,252 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
* vs. non-paranoid distinction affects only a few specific errors.
*/
#if defined(DUK_USE_PARANOID_ERRORS)
-#define DUK_ERROR_REQUIRE_TYPE_INDEX(thr,idx,expectname,lowmemstr) do { \
+#define DUK_ERROR_REQUIRE_TYPE_INDEX(thr, idx, expectname, lowmemstr) \
+ do { \
duk_err_require_type_index((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (idx), (expectname)); \
} while (0)
-#else /* DUK_USE_PARANOID_ERRORS */
-#define DUK_ERROR_REQUIRE_TYPE_INDEX(thr,idx,expectname,lowmemstr) do { \
+#else /* DUK_USE_PARANOID_ERRORS */
+#define DUK_ERROR_REQUIRE_TYPE_INDEX(thr, idx, expectname, lowmemstr) \
+ do { \
duk_err_require_type_index((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (idx), (expectname)); \
} while (0)
-#endif /* DUK_USE_PARANOID_ERRORS */
+#endif /* DUK_USE_PARANOID_ERRORS */
-#define DUK_ERROR_INTERNAL(thr) do { \
+#define DUK_ERROR_INTERNAL(thr) \
+ do { \
duk_err_error_internal((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO); \
} while (0)
-#define DUK_DCERROR_INTERNAL(thr) do { \
+#define DUK_DCERROR_INTERNAL(thr) \
+ do { \
DUK_ERROR_INTERNAL((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_ALLOC_FAILED(thr) do { \
+#define DUK_ERROR_ALLOC_FAILED(thr) \
+ do { \
duk_err_error_alloc_failed((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO); \
} while (0)
-#define DUK_ERROR_UNSUPPORTED(thr) do { \
+#define DUK_ERROR_UNSUPPORTED(thr) \
+ do { \
DUK_ERROR((thr), DUK_ERR_ERROR, DUK_STR_UNSUPPORTED); \
} while (0)
-#define DUK_DCERROR_UNSUPPORTED(thr) do { \
+#define DUK_DCERROR_UNSUPPORTED(thr) \
+ do { \
DUK_ERROR_UNSUPPORTED((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_ERROR(thr,msg) do { \
+#define DUK_ERROR_ERROR(thr, msg) \
+ do { \
duk_err_error((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (msg)); \
} while (0)
-#define DUK_ERROR_RANGE_INDEX(thr,idx) do { \
+#define DUK_ERROR_RANGE_INDEX(thr, idx) \
+ do { \
duk_err_range_index((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (idx)); \
} while (0)
-#define DUK_ERROR_RANGE_PUSH_BEYOND(thr) do { \
+#define DUK_ERROR_RANGE_PUSH_BEYOND(thr) \
+ do { \
duk_err_range_push_beyond((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO); \
} while (0)
-#define DUK_ERROR_RANGE_INVALID_ARGS(thr) do { \
+#define DUK_ERROR_RANGE_INVALID_ARGS(thr) \
+ do { \
DUK_ERROR_RANGE((thr), DUK_STR_INVALID_ARGS); \
} while (0)
-#define DUK_DCERROR_RANGE_INVALID_ARGS(thr) do { \
+#define DUK_DCERROR_RANGE_INVALID_ARGS(thr) \
+ do { \
DUK_ERROR_RANGE_INVALID_ARGS((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_RANGE_INVALID_COUNT(thr) do { \
+#define DUK_ERROR_RANGE_INVALID_COUNT(thr) \
+ do { \
DUK_ERROR_RANGE((thr), DUK_STR_INVALID_COUNT); \
} while (0)
-#define DUK_DCERROR_RANGE_INVALID_COUNT(thr) do { \
+#define DUK_DCERROR_RANGE_INVALID_COUNT(thr) \
+ do { \
DUK_ERROR_RANGE_INVALID_COUNT((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_RANGE_INVALID_LENGTH(thr) do { \
+#define DUK_ERROR_RANGE_INVALID_LENGTH(thr) \
+ do { \
DUK_ERROR_RANGE((thr), DUK_STR_INVALID_LENGTH); \
} while (0)
-#define DUK_DCERROR_RANGE_INVALID_LENGTH(thr) do { \
+#define DUK_DCERROR_RANGE_INVALID_LENGTH(thr) \
+ do { \
DUK_ERROR_RANGE_INVALID_LENGTH((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_RANGE(thr,msg) do { \
+#define DUK_ERROR_RANGE(thr, msg) \
+ do { \
duk_err_range((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (msg)); \
} while (0)
-#define DUK_ERROR_EVAL(thr,msg) do { \
+#define DUK_ERROR_EVAL(thr, msg) \
+ do { \
DUK_ERROR((thr), DUK_ERR_EVAL_ERROR, (msg)); \
} while (0)
-#define DUK_ERROR_REFERENCE(thr,msg) do { \
+#define DUK_ERROR_REFERENCE(thr, msg) \
+ do { \
DUK_ERROR((thr), DUK_ERR_REFERENCE_ERROR, (msg)); \
} while (0)
-#define DUK_ERROR_SYNTAX(thr,msg) do { \
+#define DUK_ERROR_SYNTAX(thr, msg) \
+ do { \
DUK_ERROR((thr), DUK_ERR_SYNTAX_ERROR, (msg)); \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_ARGS(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_ARGS(thr) \
+ do { \
duk_err_type_invalid_args((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO); \
} while (0)
-#define DUK_DCERROR_TYPE_INVALID_ARGS(thr) do { \
+#define DUK_DCERROR_TYPE_INVALID_ARGS(thr) \
+ do { \
DUK_ERROR_TYPE_INVALID_ARGS((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_STATE(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_STATE(thr) \
+ do { \
duk_err_type_invalid_state((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO); \
} while (0)
-#define DUK_DCERROR_TYPE_INVALID_STATE(thr) do { \
+#define DUK_DCERROR_TYPE_INVALID_STATE(thr) \
+ do { \
DUK_ERROR_TYPE_INVALID_STATE((thr)); \
return 0; \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_TRAP_RESULT(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_TRAP_RESULT(thr) \
+ do { \
duk_err_type_invalid_trap_result((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO); \
} while (0)
-#define DUK_DCERROR_TYPE_INVALID_TRAP_RESULT(thr) do { \
+#define DUK_DCERROR_TYPE_INVALID_TRAP_RESULT(thr) \
+ do { \
DUK_ERROR_TYPE((thr), DUK_STR_INVALID_TRAP_RESULT); \
} while (0)
-#define DUK_ERROR_TYPE(thr,msg) do { \
+#define DUK_ERROR_TYPE(thr, msg) \
+ do { \
DUK_ERROR((thr), DUK_ERR_TYPE_ERROR, (msg)); \
} while (0)
-#define DUK_ERROR_URI(thr,msg) do { \
+#define DUK_ERROR_URI(thr, msg) \
+ do { \
DUK_ERROR((thr), DUK_ERR_URI_ERROR, (msg)); \
} while (0)
-#else /* DUK_USE_VERBOSE_ERRORS */
+#else /* DUK_USE_VERBOSE_ERRORS */
/* Non-verbose errors for low memory targets: no file, line, or message. */
-#define DUK_ERROR_REQUIRE_TYPE_INDEX(thr,idx,expectname,lowmemstr) do { \
+#define DUK_ERROR_REQUIRE_TYPE_INDEX(thr, idx, expectname, lowmemstr) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_ERROR_INTERNAL(thr) do { \
+#define DUK_ERROR_INTERNAL(thr) \
+ do { \
duk_err_error((thr)); \
} while (0)
-#define DUK_DCERROR_INTERNAL(thr) do { \
+#define DUK_DCERROR_INTERNAL(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_ERROR; \
} while (0)
-#define DUK_ERROR_ALLOC_FAILED(thr) do { \
+#define DUK_ERROR_ALLOC_FAILED(thr) \
+ do { \
duk_err_error((thr)); \
} while (0)
-#define DUK_ERROR_UNSUPPORTED(thr) do { \
+#define DUK_ERROR_UNSUPPORTED(thr) \
+ do { \
duk_err_error((thr)); \
} while (0)
-#define DUK_DCERROR_UNSUPPORTED(thr) do { \
+#define DUK_DCERROR_UNSUPPORTED(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_ERROR; \
} while (0)
-#define DUK_ERROR_ERROR(thr,msg) do { \
+#define DUK_ERROR_ERROR(thr, msg) \
+ do { \
duk_err_error((thr)); \
} while (0)
-#define DUK_ERROR_RANGE_INDEX(thr,idx) do { \
+#define DUK_ERROR_RANGE_INDEX(thr, idx) \
+ do { \
duk_err_range((thr)); \
} while (0)
-#define DUK_ERROR_RANGE_PUSH_BEYOND(thr) do { \
+#define DUK_ERROR_RANGE_PUSH_BEYOND(thr) \
+ do { \
duk_err_range((thr)); \
} while (0)
-#define DUK_ERROR_RANGE_INVALID_ARGS(thr) do { \
+#define DUK_ERROR_RANGE_INVALID_ARGS(thr) \
+ do { \
duk_err_range((thr)); \
} while (0)
-#define DUK_DCERROR_RANGE_INVALID_ARGS(thr) do { \
+#define DUK_DCERROR_RANGE_INVALID_ARGS(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_RANGE_ERROR; \
} while (0)
-#define DUK_ERROR_RANGE_INVALID_COUNT(thr) do { \
+#define DUK_ERROR_RANGE_INVALID_COUNT(thr) \
+ do { \
duk_err_range((thr)); \
} while (0)
-#define DUK_DCERROR_RANGE_INVALID_COUNT(thr) do { \
+#define DUK_DCERROR_RANGE_INVALID_COUNT(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_RANGE_ERROR; \
} while (0)
-#define DUK_ERROR_RANGE_INVALID_LENGTH(thr) do { \
+#define DUK_ERROR_RANGE_INVALID_LENGTH(thr) \
+ do { \
duk_err_range((thr)); \
} while (0)
-#define DUK_DCERROR_RANGE_INVALID_LENGTH(thr) do { \
+#define DUK_DCERROR_RANGE_INVALID_LENGTH(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_RANGE_ERROR; \
} while (0)
-#define DUK_ERROR_RANGE(thr,msg) do { \
+#define DUK_ERROR_RANGE(thr, msg) \
+ do { \
duk_err_range((thr)); \
} while (0)
-#define DUK_ERROR_EVAL(thr,msg) do { \
+#define DUK_ERROR_EVAL(thr, msg) \
+ do { \
duk_err_eval((thr)); \
} while (0)
-#define DUK_ERROR_REFERENCE(thr,msg) do { \
+#define DUK_ERROR_REFERENCE(thr, msg) \
+ do { \
duk_err_reference((thr)); \
} while (0)
-#define DUK_ERROR_SYNTAX(thr,msg) do { \
+#define DUK_ERROR_SYNTAX(thr, msg) \
+ do { \
duk_err_syntax((thr)); \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_ARGS(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_ARGS(thr) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_DCERROR_TYPE_INVALID_ARGS(thr) do { \
+#define DUK_DCERROR_TYPE_INVALID_ARGS(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_TYPE_ERROR; \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_STATE(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_STATE(thr) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_DCERROR_TYPE_INVALID_STATE(thr) do { \
+#define DUK_DCERROR_TYPE_INVALID_STATE(thr) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_TRAP_RESULT(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_TRAP_RESULT(thr) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_DCERROR_TYPE_INVALID_TRAP_RESULT(thr) do { \
+#define DUK_DCERROR_TYPE_INVALID_TRAP_RESULT(thr) \
+ do { \
DUK_UNREF((thr)); \
return DUK_RET_TYPE_ERROR; \
} while (0)
-#define DUK_ERROR_TYPE_INVALID_TRAP_RESULT(thr) do { \
+#define DUK_ERROR_TYPE_INVALID_TRAP_RESULT(thr) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_ERROR_TYPE(thr,msg) do { \
+#define DUK_ERROR_TYPE(thr, msg) \
+ do { \
duk_err_type((thr)); \
} while (0)
-#define DUK_ERROR_URI(thr,msg) do { \
+#define DUK_ERROR_URI(thr, msg) \
+ do { \
duk_err_uri((thr)); \
} while (0)
-#endif /* DUK_USE_VERBOSE_ERRORS */
+#endif /* DUK_USE_VERBOSE_ERRORS */
/*
* Assert macro: failure causes a fatal error.
@@ -9787,63 +10534,72 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
* we don't care about assertion text size because they're not used in production
* builds.
*/
-#define DUK_ASSERT(x) do { \
- if (!(x)) { \
- DUK_FATAL_WITHOUT_CONTEXT("assertion failed: " #x \
- " (" DUK_FILE_MACRO ":" DUK_MACRO_STRINGIFY(DUK_LINE_MACRO) ")"); \
- } \
+#define DUK_ASSERT(x) \
+ do { \
+ if (!(x)) { \
+ DUK_FATAL_WITHOUT_CONTEXT("assertion failed: " #x " (" DUK_FILE_MACRO \
+ ":" DUK_MACRO_STRINGIFY(DUK_LINE_MACRO) ")"); \
+ } \
} while (0)
/* Assertion compatible inside a comma expression, evaluates to void. */
#define DUK_ASSERT_EXPR(x) \
- ((void) ((x) ? 0 : (DUK_FATAL_WITHOUT_CONTEXT("assertion failed: " #x \
- " (" DUK_FILE_MACRO ":" DUK_MACRO_STRINGIFY(DUK_LINE_MACRO) ")"), 0)))
+ ((void) ((x) ? 0 : \
+ (DUK_FATAL_WITHOUT_CONTEXT("assertion failed: " #x " (" DUK_FILE_MACRO \
+ ":" DUK_MACRO_STRINGIFY(DUK_LINE_MACRO) ")"), \
+ 0)))
-#else /* DUK_USE_ASSERTIONS */
+#else /* DUK_USE_ASSERTIONS */
-#define DUK_ASSERT(x) do { /* assertion omitted */ } while (0)
+#define DUK_ASSERT(x) \
+ do { /* assertion omitted */ \
+ } while (0)
-#define DUK_ASSERT_EXPR(x) ((void) 0)
+#define DUK_ASSERT_EXPR(x) ((void) 0)
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/* this variant is used when an assert would generate a compile warning by
* being always true (e.g. >= 0 comparison for an unsigned value
*/
-#define DUK_ASSERT_DISABLE(x) do { /* assertion disabled */ } while (0)
+#define DUK_ASSERT_DISABLE(x) \
+ do { /* assertion disabled */ \
+ } while (0)
/*
* Assertion helpers
*/
#if defined(DUK_USE_ASSERTIONS) && defined(DUK_USE_REFERENCE_COUNTING)
-#define DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(h) do { \
+#define DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(h) \
+ do { \
DUK_ASSERT((h) == NULL || DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) (h)) > 0); \
} while (0)
-#define DUK_ASSERT_REFCOUNT_NONZERO_TVAL(tv) do { \
+#define DUK_ASSERT_REFCOUNT_NONZERO_TVAL(tv) \
+ do { \
if ((tv) != NULL && DUK_TVAL_IS_HEAP_ALLOCATED((tv))) { \
DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(DUK_TVAL_GET_HEAPHDR((tv))) > 0); \
} \
} while (0)
#else
-#define DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(h) /* no refcount check */
-#define DUK_ASSERT_REFCOUNT_NONZERO_TVAL(tv) /* no refcount check */
+#define DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(h) /* no refcount check */
+#define DUK_ASSERT_REFCOUNT_NONZERO_TVAL(tv) /* no refcount check */
#endif
-#define DUK_ASSERT_TOP(ctx,n) DUK_ASSERT((duk_idx_t) duk_get_top((ctx)) == (duk_idx_t) (n))
+#define DUK_ASSERT_TOP(ctx, n) DUK_ASSERT((duk_idx_t) duk_get_top((ctx)) == (duk_idx_t) (n))
#if defined(DUK_USE_ASSERTIONS) && defined(DUK_USE_PACKED_TVAL)
-#define DUK_ASSERT_DOUBLE_IS_NORMALIZED(dval) do { \
+#define DUK_ASSERT_DOUBLE_IS_NORMALIZED(dval) \
+ do { \
duk_double_union duk__assert_tmp_du; \
duk__assert_tmp_du.d = (dval); \
DUK_ASSERT(DUK_DBLUNION_IS_NORMALIZED(&duk__assert_tmp_du)); \
} while (0)
#else
-#define DUK_ASSERT_DOUBLE_IS_NORMALIZED(dval) /* nop */
+#define DUK_ASSERT_DOUBLE_IS_NORMALIZED(dval) /* nop */
#endif
-#define DUK_ASSERT_VS_SPACE(thr) \
- DUK_ASSERT(thr->valstack_top < thr->valstack_end)
+#define DUK_ASSERT_VS_SPACE(thr) DUK_ASSERT(thr->valstack_top < thr->valstack_end)
/*
* Helper to initialize a memory area (e.g. struct) with garbage when
@@ -9851,11 +10607,14 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
*/
#if defined(DUK_USE_ASSERTIONS)
-#define DUK_ASSERT_SET_GARBAGE(ptr,size) do { \
+#define DUK_ASSERT_SET_GARBAGE(ptr, size) \
+ do { \
duk_memset_unsafe((void *) (ptr), 0x5a, size); \
} while (0)
#else
-#define DUK_ASSERT_SET_GARBAGE(ptr,size) do {} while (0)
+#define DUK_ASSERT_SET_GARBAGE(ptr, size) \
+ do { \
+ } while (0)
#endif
/*
@@ -9866,16 +10625,18 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
* or (b) Duktape calls which involve extending the valstack (e.g. getter call).
*/
-#define DUK_VALSTACK_ASSERT_EXTRA 5 /* this is added to checks to allow for Duktape
- * API calls in addition to function's own use
- */
+#define DUK_VALSTACK_ASSERT_EXTRA \
+ 5 /* this is added to checks to allow for Duktape \
+ * API calls in addition to function's own use \
+ */
#if defined(DUK_USE_ASSERTIONS)
-#define DUK_ASSERT_VALSTACK_SPACE(thr,n) do { \
+#define DUK_ASSERT_VALSTACK_SPACE(thr, n) \
+ do { \
DUK_ASSERT((thr) != NULL); \
DUK_ASSERT((thr)->valstack_end - (thr)->valstack_top >= (n) + DUK_VALSTACK_ASSERT_EXTRA); \
} while (0)
#else
-#define DUK_ASSERT_VALSTACK_SPACE(thr,n) /* no valstack space check */
+#define DUK_ASSERT_VALSTACK_SPACE(thr, n) /* no valstack space check */
#endif
/*
@@ -9883,25 +10644,35 @@ DUK_INTERNAL_DECL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb);
*/
#if defined(DUK_USE_VERBOSE_ERRORS)
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_handle_error(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *msg));
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_handle_error_fmt(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *fmt, ...));
-#else /* DUK_USE_VERBOSE_ERRORS */
+DUK_NORETURN(
+ DUK_INTERNAL_DECL void duk_err_handle_error(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *msg));
+DUK_NORETURN(DUK_INTERNAL_DECL void
+ duk_err_handle_error_fmt(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *fmt, ...));
+#else /* DUK_USE_VERBOSE_ERRORS */
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_handle_error(duk_hthread *thr, duk_errcode_t code));
-#endif /* DUK_USE_VERBOSE_ERRORS */
+#endif /* DUK_USE_VERBOSE_ERRORS */
#if defined(DUK_USE_VERBOSE_ERRORS)
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code, const char *msg, const char *filename, duk_int_t line));
+DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_create_and_throw(duk_hthread *thr,
+ duk_errcode_t code,
+ const char *msg,
+ const char *filename,
+ duk_int_t line));
#else
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code));
#endif
DUK_NORETURN(DUK_INTERNAL_DECL void duk_error_throw_from_negative_rc(duk_hthread *thr, duk_ret_t rc));
-#define DUK_AUGMENT_FLAG_NOBLAME_FILELINE (1U << 0) /* if set, don't blame C file/line for .fileName and .lineNumber */
-#define DUK_AUGMENT_FLAG_SKIP_ONE (1U << 1) /* if set, skip topmost activation in traceback construction */
+#define DUK_AUGMENT_FLAG_NOBLAME_FILELINE (1U << 0) /* if set, don't blame C file/line for .fileName and .lineNumber */
+#define DUK_AUGMENT_FLAG_SKIP_ONE (1U << 1) /* if set, skip topmost activation in traceback construction */
#if defined(DUK_USE_AUGMENT_ERROR_CREATE)
-DUK_INTERNAL_DECL void duk_err_augment_error_create(duk_hthread *thr, duk_hthread *thr_callstack, const char *filename, duk_int_t line, duk_small_uint_t flags);
+DUK_INTERNAL_DECL void duk_err_augment_error_create(duk_hthread *thr,
+ duk_hthread *thr_callstack,
+ const char *filename,
+ duk_int_t line,
+ duk_small_uint_t flags);
#endif
#if defined(DUK_USE_AUGMENT_ERROR_THROW)
DUK_INTERNAL_DECL void duk_err_augment_error_throw(duk_hthread *thr);
@@ -9909,20 +10680,31 @@ DUK_INTERNAL_DECL void duk_err_augment_error_throw(duk_hthread *thr);
#if defined(DUK_USE_VERBOSE_ERRORS)
#if defined(DUK_USE_PARANOID_ERRORS)
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_require_type_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t idx, const char *expect_name));
+DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_require_type_index(duk_hthread *thr,
+ const char *filename,
+ duk_int_t linenumber,
+ duk_idx_t idx,
+ const char *expect_name));
#else
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_require_type_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t idx, const char *expect_name));
+DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_require_type_index(duk_hthread *thr,
+ const char *filename,
+ duk_int_t linenumber,
+ duk_idx_t idx,
+ const char *expect_name));
#endif
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_error_internal(duk_hthread *thr, const char *filename, duk_int_t linenumber));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_error_alloc_failed(duk_hthread *thr, const char *filename, duk_int_t linenumber));
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_error(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message));
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_range_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t idx));
+DUK_NORETURN(
+ DUK_INTERNAL_DECL void duk_err_error(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message));
+DUK_NORETURN(
+ DUK_INTERNAL_DECL void duk_err_range_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t idx));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_range_push_beyond(duk_hthread *thr, const char *filename, duk_int_t linenumber));
-DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_range(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message));
+DUK_NORETURN(
+ DUK_INTERNAL_DECL void duk_err_range(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_type_invalid_args(duk_hthread *thr, const char *filename, duk_int_t linenumber));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_type_invalid_state(duk_hthread *thr, const char *filename, duk_int_t linenumber));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_type_invalid_trap_result(duk_hthread *thr, const char *filename, duk_int_t linenumber));
-#else /* DUK_VERBOSE_ERRORS */
+#else /* DUK_VERBOSE_ERRORS */
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_error(duk_hthread *thr));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_range(duk_hthread *thr));
DUK_NORETURN(DUK_INTERNAL_DECL void duk_err_eval(duk_hthread *thr));
@@ -9943,7 +10725,7 @@ DUK_INTERNAL_DECL void duk_err_check_debugger_integration(duk_hthread *thr);
DUK_INTERNAL_DECL duk_hobject *duk_error_prototype_from_code(duk_hthread *thr, duk_errcode_t err_code);
-#endif /* DUK_ERROR_H_INCLUDED */
+#endif /* DUK_ERROR_H_INCLUDED */
/* #include duk_unicode.h */
/*
* Unicode helpers
@@ -9956,10 +10738,10 @@ DUK_INTERNAL_DECL duk_hobject *duk_error_prototype_from_code(duk_hthread *thr, d
* UTF-8 / XUTF-8 / CESU-8 constants
*/
-#define DUK_UNICODE_MAX_XUTF8_LENGTH 7 /* up to 36 bit codepoints */
-#define DUK_UNICODE_MAX_XUTF8_BMP_LENGTH 3 /* all codepoints up to U+FFFF */
-#define DUK_UNICODE_MAX_CESU8_LENGTH 6 /* all codepoints up to U+10FFFF */
-#define DUK_UNICODE_MAX_CESU8_BMP_LENGTH 3 /* all codepoints up to U+FFFF */
+#define DUK_UNICODE_MAX_XUTF8_LENGTH 7 /* up to 36 bit codepoints */
+#define DUK_UNICODE_MAX_XUTF8_BMP_LENGTH 3 /* all codepoints up to U+FFFF */
+#define DUK_UNICODE_MAX_CESU8_LENGTH 6 /* all codepoints up to U+10FFFF */
+#define DUK_UNICODE_MAX_CESU8_BMP_LENGTH 3 /* all codepoints up to U+FFFF */
/*
* Useful Unicode codepoints
@@ -9968,9 +10750,11 @@ DUK_INTERNAL_DECL duk_hobject *duk_error_prototype_from_code(duk_hthread *thr, d
* in comparisons.
*/
-#define DUK_UNICODE_CP_ZWNJ 0x200cL /* zero-width non-joiner */
-#define DUK_UNICODE_CP_ZWJ 0x200dL /* zero-width joiner */
-#define DUK_UNICODE_CP_REPLACEMENT_CHARACTER 0xfffdL /* http://en.wikipedia.org/wiki/Replacement_character#Replacement_character */
+#define DUK_UNICODE_CP_ZWNJ 0x200cL /* zero-width non-joiner */
+#define DUK_UNICODE_CP_ZWJ 0x200dL /* zero-width joiner */
+#define DUK_UNICODE_CP_REPLACEMENT_CHARACTER \
+ 0xfffdL /* http://en.wikipedia.org/wiki/Replacement_character#Replacement_character \
+ */
/*
* ASCII character constants
@@ -9983,134 +10767,134 @@ DUK_INTERNAL_DECL duk_hobject *duk_error_prototype_from_code(duk_hthread *thr, d
* http://en.wikipedia.org/wiki/ASCII
*/
-#define DUK_ASC_NUL 0x00
-#define DUK_ASC_SOH 0x01
-#define DUK_ASC_STX 0x02
-#define DUK_ASC_ETX 0x03
-#define DUK_ASC_EOT 0x04
-#define DUK_ASC_ENQ 0x05
-#define DUK_ASC_ACK 0x06
-#define DUK_ASC_BEL 0x07
-#define DUK_ASC_BS 0x08
-#define DUK_ASC_HT 0x09
-#define DUK_ASC_LF 0x0a
-#define DUK_ASC_VT 0x0b
-#define DUK_ASC_FF 0x0c
-#define DUK_ASC_CR 0x0d
-#define DUK_ASC_SO 0x0e
-#define DUK_ASC_SI 0x0f
-#define DUK_ASC_DLE 0x10
-#define DUK_ASC_DC1 0x11
-#define DUK_ASC_DC2 0x12
-#define DUK_ASC_DC3 0x13
-#define DUK_ASC_DC4 0x14
-#define DUK_ASC_NAK 0x15
-#define DUK_ASC_SYN 0x16
-#define DUK_ASC_ETB 0x17
-#define DUK_ASC_CAN 0x18
-#define DUK_ASC_EM 0x19
-#define DUK_ASC_SUB 0x1a
-#define DUK_ASC_ESC 0x1b
-#define DUK_ASC_FS 0x1c
-#define DUK_ASC_GS 0x1d
-#define DUK_ASC_RS 0x1e
-#define DUK_ASC_US 0x1f
-#define DUK_ASC_SPACE 0x20
-#define DUK_ASC_EXCLAMATION 0x21
-#define DUK_ASC_DOUBLEQUOTE 0x22
-#define DUK_ASC_HASH 0x23
-#define DUK_ASC_DOLLAR 0x24
-#define DUK_ASC_PERCENT 0x25
-#define DUK_ASC_AMP 0x26
-#define DUK_ASC_SINGLEQUOTE 0x27
-#define DUK_ASC_LPAREN 0x28
-#define DUK_ASC_RPAREN 0x29
-#define DUK_ASC_STAR 0x2a
-#define DUK_ASC_PLUS 0x2b
-#define DUK_ASC_COMMA 0x2c
-#define DUK_ASC_MINUS 0x2d
-#define DUK_ASC_PERIOD 0x2e
-#define DUK_ASC_SLASH 0x2f
-#define DUK_ASC_0 0x30
-#define DUK_ASC_1 0x31
-#define DUK_ASC_2 0x32
-#define DUK_ASC_3 0x33
-#define DUK_ASC_4 0x34
-#define DUK_ASC_5 0x35
-#define DUK_ASC_6 0x36
-#define DUK_ASC_7 0x37
-#define DUK_ASC_8 0x38
-#define DUK_ASC_9 0x39
-#define DUK_ASC_COLON 0x3a
-#define DUK_ASC_SEMICOLON 0x3b
-#define DUK_ASC_LANGLE 0x3c
-#define DUK_ASC_EQUALS 0x3d
-#define DUK_ASC_RANGLE 0x3e
-#define DUK_ASC_QUESTION 0x3f
-#define DUK_ASC_ATSIGN 0x40
-#define DUK_ASC_UC_A 0x41
-#define DUK_ASC_UC_B 0x42
-#define DUK_ASC_UC_C 0x43
-#define DUK_ASC_UC_D 0x44
-#define DUK_ASC_UC_E 0x45
-#define DUK_ASC_UC_F 0x46
-#define DUK_ASC_UC_G 0x47
-#define DUK_ASC_UC_H 0x48
-#define DUK_ASC_UC_I 0x49
-#define DUK_ASC_UC_J 0x4a
-#define DUK_ASC_UC_K 0x4b
-#define DUK_ASC_UC_L 0x4c
-#define DUK_ASC_UC_M 0x4d
-#define DUK_ASC_UC_N 0x4e
-#define DUK_ASC_UC_O 0x4f
-#define DUK_ASC_UC_P 0x50
-#define DUK_ASC_UC_Q 0x51
-#define DUK_ASC_UC_R 0x52
-#define DUK_ASC_UC_S 0x53
-#define DUK_ASC_UC_T 0x54
-#define DUK_ASC_UC_U 0x55
-#define DUK_ASC_UC_V 0x56
-#define DUK_ASC_UC_W 0x57
-#define DUK_ASC_UC_X 0x58
-#define DUK_ASC_UC_Y 0x59
-#define DUK_ASC_UC_Z 0x5a
-#define DUK_ASC_LBRACKET 0x5b
-#define DUK_ASC_BACKSLASH 0x5c
-#define DUK_ASC_RBRACKET 0x5d
-#define DUK_ASC_CARET 0x5e
-#define DUK_ASC_UNDERSCORE 0x5f
-#define DUK_ASC_GRAVE 0x60
-#define DUK_ASC_LC_A 0x61
-#define DUK_ASC_LC_B 0x62
-#define DUK_ASC_LC_C 0x63
-#define DUK_ASC_LC_D 0x64
-#define DUK_ASC_LC_E 0x65
-#define DUK_ASC_LC_F 0x66
-#define DUK_ASC_LC_G 0x67
-#define DUK_ASC_LC_H 0x68
-#define DUK_ASC_LC_I 0x69
-#define DUK_ASC_LC_J 0x6a
-#define DUK_ASC_LC_K 0x6b
-#define DUK_ASC_LC_L 0x6c
-#define DUK_ASC_LC_M 0x6d
-#define DUK_ASC_LC_N 0x6e
-#define DUK_ASC_LC_O 0x6f
-#define DUK_ASC_LC_P 0x70
-#define DUK_ASC_LC_Q 0x71
-#define DUK_ASC_LC_R 0x72
-#define DUK_ASC_LC_S 0x73
-#define DUK_ASC_LC_T 0x74
-#define DUK_ASC_LC_U 0x75
-#define DUK_ASC_LC_V 0x76
-#define DUK_ASC_LC_W 0x77
-#define DUK_ASC_LC_X 0x78
-#define DUK_ASC_LC_Y 0x79
-#define DUK_ASC_LC_Z 0x7a
-#define DUK_ASC_LCURLY 0x7b
-#define DUK_ASC_PIPE 0x7c
-#define DUK_ASC_RCURLY 0x7d
-#define DUK_ASC_TILDE 0x7e
-#define DUK_ASC_DEL 0x7f
+#define DUK_ASC_NUL 0x00
+#define DUK_ASC_SOH 0x01
+#define DUK_ASC_STX 0x02
+#define DUK_ASC_ETX 0x03
+#define DUK_ASC_EOT 0x04
+#define DUK_ASC_ENQ 0x05
+#define DUK_ASC_ACK 0x06
+#define DUK_ASC_BEL 0x07
+#define DUK_ASC_BS 0x08
+#define DUK_ASC_HT 0x09
+#define DUK_ASC_LF 0x0a
+#define DUK_ASC_VT 0x0b
+#define DUK_ASC_FF 0x0c
+#define DUK_ASC_CR 0x0d
+#define DUK_ASC_SO 0x0e
+#define DUK_ASC_SI 0x0f
+#define DUK_ASC_DLE 0x10
+#define DUK_ASC_DC1 0x11
+#define DUK_ASC_DC2 0x12
+#define DUK_ASC_DC3 0x13
+#define DUK_ASC_DC4 0x14
+#define DUK_ASC_NAK 0x15
+#define DUK_ASC_SYN 0x16
+#define DUK_ASC_ETB 0x17
+#define DUK_ASC_CAN 0x18
+#define DUK_ASC_EM 0x19
+#define DUK_ASC_SUB 0x1a
+#define DUK_ASC_ESC 0x1b
+#define DUK_ASC_FS 0x1c
+#define DUK_ASC_GS 0x1d
+#define DUK_ASC_RS 0x1e
+#define DUK_ASC_US 0x1f
+#define DUK_ASC_SPACE 0x20
+#define DUK_ASC_EXCLAMATION 0x21
+#define DUK_ASC_DOUBLEQUOTE 0x22
+#define DUK_ASC_HASH 0x23
+#define DUK_ASC_DOLLAR 0x24
+#define DUK_ASC_PERCENT 0x25
+#define DUK_ASC_AMP 0x26
+#define DUK_ASC_SINGLEQUOTE 0x27
+#define DUK_ASC_LPAREN 0x28
+#define DUK_ASC_RPAREN 0x29
+#define DUK_ASC_STAR 0x2a
+#define DUK_ASC_PLUS 0x2b
+#define DUK_ASC_COMMA 0x2c
+#define DUK_ASC_MINUS 0x2d
+#define DUK_ASC_PERIOD 0x2e
+#define DUK_ASC_SLASH 0x2f
+#define DUK_ASC_0 0x30
+#define DUK_ASC_1 0x31
+#define DUK_ASC_2 0x32
+#define DUK_ASC_3 0x33
+#define DUK_ASC_4 0x34
+#define DUK_ASC_5 0x35
+#define DUK_ASC_6 0x36
+#define DUK_ASC_7 0x37
+#define DUK_ASC_8 0x38
+#define DUK_ASC_9 0x39
+#define DUK_ASC_COLON 0x3a
+#define DUK_ASC_SEMICOLON 0x3b
+#define DUK_ASC_LANGLE 0x3c
+#define DUK_ASC_EQUALS 0x3d
+#define DUK_ASC_RANGLE 0x3e
+#define DUK_ASC_QUESTION 0x3f
+#define DUK_ASC_ATSIGN 0x40
+#define DUK_ASC_UC_A 0x41
+#define DUK_ASC_UC_B 0x42
+#define DUK_ASC_UC_C 0x43
+#define DUK_ASC_UC_D 0x44
+#define DUK_ASC_UC_E 0x45
+#define DUK_ASC_UC_F 0x46
+#define DUK_ASC_UC_G 0x47
+#define DUK_ASC_UC_H 0x48
+#define DUK_ASC_UC_I 0x49
+#define DUK_ASC_UC_J 0x4a
+#define DUK_ASC_UC_K 0x4b
+#define DUK_ASC_UC_L 0x4c
+#define DUK_ASC_UC_M 0x4d
+#define DUK_ASC_UC_N 0x4e
+#define DUK_ASC_UC_O 0x4f
+#define DUK_ASC_UC_P 0x50
+#define DUK_ASC_UC_Q 0x51
+#define DUK_ASC_UC_R 0x52
+#define DUK_ASC_UC_S 0x53
+#define DUK_ASC_UC_T 0x54
+#define DUK_ASC_UC_U 0x55
+#define DUK_ASC_UC_V 0x56
+#define DUK_ASC_UC_W 0x57
+#define DUK_ASC_UC_X 0x58
+#define DUK_ASC_UC_Y 0x59
+#define DUK_ASC_UC_Z 0x5a
+#define DUK_ASC_LBRACKET 0x5b
+#define DUK_ASC_BACKSLASH 0x5c
+#define DUK_ASC_RBRACKET 0x5d
+#define DUK_ASC_CARET 0x5e
+#define DUK_ASC_UNDERSCORE 0x5f
+#define DUK_ASC_GRAVE 0x60
+#define DUK_ASC_LC_A 0x61
+#define DUK_ASC_LC_B 0x62
+#define DUK_ASC_LC_C 0x63
+#define DUK_ASC_LC_D 0x64
+#define DUK_ASC_LC_E 0x65
+#define DUK_ASC_LC_F 0x66
+#define DUK_ASC_LC_G 0x67
+#define DUK_ASC_LC_H 0x68
+#define DUK_ASC_LC_I 0x69
+#define DUK_ASC_LC_J 0x6a
+#define DUK_ASC_LC_K 0x6b
+#define DUK_ASC_LC_L 0x6c
+#define DUK_ASC_LC_M 0x6d
+#define DUK_ASC_LC_N 0x6e
+#define DUK_ASC_LC_O 0x6f
+#define DUK_ASC_LC_P 0x70
+#define DUK_ASC_LC_Q 0x71
+#define DUK_ASC_LC_R 0x72
+#define DUK_ASC_LC_S 0x73
+#define DUK_ASC_LC_T 0x74
+#define DUK_ASC_LC_U 0x75
+#define DUK_ASC_LC_V 0x76
+#define DUK_ASC_LC_W 0x77
+#define DUK_ASC_LC_X 0x78
+#define DUK_ASC_LC_Y 0x79
+#define DUK_ASC_LC_Z 0x7a
+#define DUK_ASC_LCURLY 0x7b
+#define DUK_ASC_PIPE 0x7c
+#define DUK_ASC_RCURLY 0x7d
+#define DUK_ASC_TILDE 0x7e
+#define DUK_ASC_DEL 0x7f
/*
* Miscellaneous
@@ -10119,7 +10903,7 @@ DUK_INTERNAL_DECL duk_hobject *duk_error_prototype_from_code(duk_hthread *thr, d
/* Uppercase A is 0x41, lowercase a is 0x61; OR 0x20 to convert uppercase
* to lowercase.
*/
-#define DUK_LOWERCASE_CHAR_ASCII(x) ((x) | 0x20)
+#define DUK_LOWERCASE_CHAR_ASCII(x) ((x) | 0x20)
/*
* Unicode tables
@@ -10207,7 +10991,7 @@ DUK_INTERNAL_DECL const duk_uint16_t duk_unicode_re_ranges_not_digit[4];
DUK_INTERNAL_DECL const duk_uint16_t duk_unicode_re_ranges_not_white[24];
DUK_INTERNAL_DECL const duk_uint16_t duk_unicode_re_ranges_not_wordchar[10];
DUK_INTERNAL_DECL const duk_int8_t duk_is_idchar_tab[128];
-#endif /* !DUK_SINGLE_FILE */
+#endif /* !DUK_SINGLE_FILE */
/*
* Prototypes
@@ -10219,9 +11003,17 @@ DUK_INTERNAL_DECL duk_small_int_t duk_unicode_get_cesu8_length(duk_ucodepoint_t
#endif
DUK_INTERNAL_DECL duk_small_int_t duk_unicode_encode_xutf8(duk_ucodepoint_t cp, duk_uint8_t *out);
DUK_INTERNAL_DECL duk_small_int_t duk_unicode_encode_cesu8(duk_ucodepoint_t cp, duk_uint8_t *out);
-DUK_INTERNAL_DECL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end, duk_ucodepoint_t *out_cp);
-DUK_INTERNAL_DECL duk_ucodepoint_t duk_unicode_decode_xutf8_checked(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end);
+DUK_INTERNAL_DECL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr,
+ const duk_uint8_t **ptr,
+ const duk_uint8_t *ptr_start,
+ const duk_uint8_t *ptr_end,
+ duk_ucodepoint_t *out_cp);
+DUK_INTERNAL_DECL duk_ucodepoint_t duk_unicode_decode_xutf8_checked(duk_hthread *thr,
+ const duk_uint8_t **ptr,
+ const duk_uint8_t *ptr_start,
+ const duk_uint8_t *ptr_end);
DUK_INTERNAL_DECL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *data, duk_size_t blen);
+DUK_INTERNAL_DECL duk_bool_t duk_unicode_is_utf8_compatible(const duk_uint8_t *buf, duk_size_t len);
DUK_INTERNAL_DECL duk_small_int_t duk_unicode_is_whitespace(duk_codepoint_t cp);
DUK_INTERNAL_DECL duk_small_int_t duk_unicode_is_line_terminator(duk_codepoint_t cp);
DUK_INTERNAL_DECL duk_small_int_t duk_unicode_is_identifier_start(duk_codepoint_t cp);
@@ -10233,7 +11025,7 @@ DUK_INTERNAL_DECL duk_codepoint_t duk_unicode_re_canonicalize_char(duk_hthread *
DUK_INTERNAL_DECL duk_small_int_t duk_unicode_re_is_wordchar(duk_codepoint_t cp);
#endif
-#endif /* DUK_UNICODE_H_INCLUDED */
+#endif /* DUK_UNICODE_H_INCLUDED */
/* #include duk_json.h */
/*
* Defines for JSON, especially duk_bi_json.c.
@@ -10243,28 +11035,28 @@ DUK_INTERNAL_DECL duk_small_int_t duk_unicode_re_is_wordchar(duk_codepoint_t cp)
#define DUK_JSON_H_INCLUDED
/* Encoding/decoding flags */
-#define DUK_JSON_FLAG_ASCII_ONLY (1U << 0) /* escape any non-ASCII characters */
-#define DUK_JSON_FLAG_AVOID_KEY_QUOTES (1U << 1) /* avoid key quotes when key is an ASCII Identifier */
-#define DUK_JSON_FLAG_EXT_CUSTOM (1U << 2) /* extended types: custom encoding */
-#define DUK_JSON_FLAG_EXT_COMPATIBLE (1U << 3) /* extended types: compatible encoding */
+#define DUK_JSON_FLAG_ASCII_ONLY (1U << 0) /* escape any non-ASCII characters */
+#define DUK_JSON_FLAG_AVOID_KEY_QUOTES (1U << 1) /* avoid key quotes when key is an ASCII Identifier */
+#define DUK_JSON_FLAG_EXT_CUSTOM (1U << 2) /* extended types: custom encoding */
+#define DUK_JSON_FLAG_EXT_COMPATIBLE (1U << 3) /* extended types: compatible encoding */
/* How much stack to require on entry to object/array encode */
-#define DUK_JSON_ENC_REQSTACK 32
+#define DUK_JSON_ENC_REQSTACK 32
/* How much stack to require on entry to object/array decode */
-#define DUK_JSON_DEC_REQSTACK 32
+#define DUK_JSON_DEC_REQSTACK 32
/* How large a loop detection stack to use */
-#define DUK_JSON_ENC_LOOPARRAY 64
+#define DUK_JSON_ENC_LOOPARRAY 64
/* Encoding state. Heap object references are all borrowed. */
typedef struct {
duk_hthread *thr;
- duk_bufwriter_ctx bw; /* output bufwriter */
- duk_hobject *h_replacer; /* replacer function */
- duk_hstring *h_gap; /* gap (if empty string, NULL) */
- duk_idx_t idx_proplist; /* explicit PropertyList */
- duk_idx_t idx_loop; /* valstack index of loop detection object */
+ duk_bufwriter_ctx bw; /* output bufwriter */
+ duk_hobject *h_replacer; /* replacer function */
+ duk_hstring *h_gap; /* gap (if empty string, NULL) */
+ duk_idx_t idx_proplist; /* explicit PropertyList */
+ duk_idx_t idx_loop; /* valstack index of loop detection object */
duk_small_uint_t flags;
duk_small_uint_t flag_ascii_only;
duk_small_uint_t flag_avoid_key_quotes;
@@ -10275,7 +11067,7 @@ typedef struct {
#endif
duk_uint_t recursion_depth;
duk_uint_t recursion_limit;
- duk_uint_t mask_for_undefined; /* type bit mask: types which certainly produce 'undefined' */
+ duk_uint_t mask_for_undefined; /* type bit mask: types which certainly produce 'undefined' */
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
duk_small_uint_t stridx_custom_undefined;
duk_small_uint_t stridx_custom_nan;
@@ -10283,7 +11075,7 @@ typedef struct {
duk_small_uint_t stridx_custom_posinf;
duk_small_uint_t stridx_custom_function;
#endif
- duk_hobject *visiting[DUK_JSON_ENC_LOOPARRAY]; /* indexed by recursion_depth */
+ duk_hobject *visiting[DUK_JSON_ENC_LOOPARRAY]; /* indexed by recursion_depth */
} duk_json_enc_ctx;
typedef struct {
@@ -10302,7 +11094,7 @@ typedef struct {
duk_int_t recursion_limit;
} duk_json_dec_ctx;
-#endif /* DUK_JSON_H_INCLUDED */
+#endif /* DUK_JSON_H_INCLUDED */
/* #include duk_js.h */
/*
* ECMAScript execution, support primitives.
@@ -10312,21 +11104,22 @@ typedef struct {
#define DUK_JS_H_INCLUDED
/* Flags for call handling. Lowest flags must match bytecode DUK_BC_CALL_FLAG_xxx 1:1. */
-#define DUK_CALL_FLAG_TAILCALL (1U << 0) /* setup for a tail call */
-#define DUK_CALL_FLAG_CONSTRUCT (1U << 1) /* constructor call (i.e. called as 'new Foo()') */
-#define DUK_CALL_FLAG_CALLED_AS_EVAL (1U << 2) /* call was made using the identifier 'eval' */
-#define DUK_CALL_FLAG_ALLOW_ECMATOECMA (1U << 3) /* ecma-to-ecma call with executor reuse is possible */
-#define DUK_CALL_FLAG_DIRECT_EVAL (1U << 4) /* call is a direct eval call */
-#define DUK_CALL_FLAG_CONSTRUCT_PROXY (1U << 5) /* handled via 'construct' proxy trap, check return value invariant(s) */
-#define DUK_CALL_FLAG_DEFAULT_INSTANCE_UPDATED (1U << 6) /* prototype of 'default instance' updated, temporary flag in call handling */
+#define DUK_CALL_FLAG_TAILCALL (1U << 0) /* setup for a tail call */
+#define DUK_CALL_FLAG_CONSTRUCT (1U << 1) /* constructor call (i.e. called as 'new Foo()') */
+#define DUK_CALL_FLAG_CALLED_AS_EVAL (1U << 2) /* call was made using the identifier 'eval' */
+#define DUK_CALL_FLAG_ALLOW_ECMATOECMA (1U << 3) /* ecma-to-ecma call with executor reuse is possible */
+#define DUK_CALL_FLAG_DIRECT_EVAL (1U << 4) /* call is a direct eval call */
+#define DUK_CALL_FLAG_CONSTRUCT_PROXY (1U << 5) /* handled via 'construct' proxy trap, check return value invariant(s) */
+#define DUK_CALL_FLAG_DEFAULT_INSTANCE_UPDATED \
+ (1U << 6) /* prototype of 'default instance' updated, temporary flag in call handling */
/* Flags for duk_js_equals_helper(). */
-#define DUK_EQUALS_FLAG_SAMEVALUE (1U << 0) /* use SameValue instead of non-strict equality */
-#define DUK_EQUALS_FLAG_STRICT (1U << 1) /* use strict equality instead of non-strict equality */
+#define DUK_EQUALS_FLAG_SAMEVALUE (1U << 0) /* use SameValue instead of non-strict equality */
+#define DUK_EQUALS_FLAG_STRICT (1U << 1) /* use strict equality instead of non-strict equality */
/* Flags for duk_js_compare_helper(). */
-#define DUK_COMPARE_FLAG_NEGATE (1U << 0) /* negate result */
-#define DUK_COMPARE_FLAG_EVAL_LEFT_FIRST (1U << 1) /* eval left argument first */
+#define DUK_COMPARE_FLAG_NEGATE (1U << 0) /* negate result */
+#define DUK_COMPARE_FLAG_EVAL_LEFT_FIRST (1U << 1) /* eval left argument first */
/* conversions, coercions, comparison, etc */
DUK_INTERNAL_DECL duk_bool_t duk_js_toboolean(duk_tval *tv);
@@ -10342,9 +11135,12 @@ DUK_INTERNAL_DECL duk_uarridx_t duk_js_to_arrayindex_hstring_fast_known(duk_hstr
DUK_INTERNAL_DECL duk_uarridx_t duk_js_to_arrayindex_hstring_fast(duk_hstring *h);
#endif
DUK_INTERNAL_DECL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_small_uint_t flags);
-DUK_INTERNAL_DECL duk_small_int_t duk_js_data_compare(const duk_uint8_t *buf1, const duk_uint8_t *buf2, duk_size_t len1, duk_size_t len2);
+DUK_INTERNAL_DECL duk_small_int_t duk_js_data_compare(const duk_uint8_t *buf1,
+ const duk_uint8_t *buf2,
+ duk_size_t len1,
+ duk_size_t len2);
DUK_INTERNAL_DECL duk_small_int_t duk_js_string_compare(duk_hstring *h1, duk_hstring *h2);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_INTERNAL_DECL duk_small_int_t duk_js_buffer_compare(duk_heap *heap, duk_hbuffer *h1, duk_hbuffer *h2);
#endif
DUK_INTERNAL_DECL duk_bool_t duk_js_compare_helper(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_small_uint_t flags);
@@ -10354,50 +11150,64 @@ DUK_INTERNAL_DECL duk_bool_t duk_js_instanceof_ordinary(duk_hthread *thr, duk_tv
#endif
DUK_INTERNAL_DECL duk_bool_t duk_js_in(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y);
DUK_INTERNAL_DECL duk_small_uint_t duk_js_typeof_stridx(duk_tval *tv_x);
+DUK_INTERNAL_DECL duk_bool_t duk_js_isarray_hobject(duk_hobject *h);
+DUK_INTERNAL_DECL duk_bool_t duk_js_isarray(duk_tval *tv);
/* arithmetic */
DUK_INTERNAL_DECL double duk_js_arith_pow(double x, double y);
DUK_INTERNAL_DECL double duk_js_arith_mod(double x, double y);
-#define duk_js_equals(thr,tv_x,tv_y) \
- duk_js_equals_helper((thr), (tv_x), (tv_y), 0)
-#define duk_js_strict_equals(tv_x,tv_y) \
- duk_js_equals_helper(NULL, (tv_x), (tv_y), DUK_EQUALS_FLAG_STRICT)
-#define duk_js_samevalue(tv_x,tv_y) \
- duk_js_equals_helper(NULL, (tv_x), (tv_y), DUK_EQUALS_FLAG_SAMEVALUE)
+#define duk_js_equals(thr, tv_x, tv_y) duk_js_equals_helper((thr), (tv_x), (tv_y), 0)
+#define duk_js_strict_equals(tv_x, tv_y) duk_js_equals_helper(NULL, (tv_x), (tv_y), DUK_EQUALS_FLAG_STRICT)
+#define duk_js_samevalue(tv_x, tv_y) duk_js_equals_helper(NULL, (tv_x), (tv_y), DUK_EQUALS_FLAG_SAMEVALUE)
/* E5 Sections 11.8.1, 11.8.5; x < y */
-#define duk_js_lessthan(thr,tv_x,tv_y) \
- duk_js_compare_helper((thr), (tv_x), (tv_Y), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST)
+#define duk_js_lessthan(thr, tv_x, tv_y) duk_js_compare_helper((thr), (tv_x), (tv_Y), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST)
/* E5 Sections 11.8.2, 11.8.5; x > y --> y < x */
-#define duk_js_greaterthan(thr,tv_x,tv_y) \
- duk_js_compare_helper((thr), (tv_y), (tv_x), 0)
+#define duk_js_greaterthan(thr, tv_x, tv_y) duk_js_compare_helper((thr), (tv_y), (tv_x), 0)
/* E5 Sections 11.8.3, 11.8.5; x <= y --> not (x > y) --> not (y < x) */
-#define duk_js_lessthanorequal(thr,tv_x,tv_y) \
- duk_js_compare_helper((thr), (tv_y), (tv_x), DUK_COMPARE_FLAG_NEGATE)
+#define duk_js_lessthanorequal(thr, tv_x, tv_y) duk_js_compare_helper((thr), (tv_y), (tv_x), DUK_COMPARE_FLAG_NEGATE)
/* E5 Sections 11.8.4, 11.8.5; x >= y --> not (x < y) */
-#define duk_js_greaterthanorequal(thr,tv_x,tv_y) \
+#define duk_js_greaterthanorequal(thr, tv_x, tv_y) \
duk_js_compare_helper((thr), (tv_x), (tv_y), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST | DUK_COMPARE_FLAG_NEGATE)
/* identifiers and environment handling */
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL duk_bool_t duk_js_hasvar_envrec(duk_hthread *thr, duk_hobject *env, duk_hstring *name);
#endif
DUK_INTERNAL_DECL duk_bool_t duk_js_getvar_envrec(duk_hthread *thr, duk_hobject *env, duk_hstring *name, duk_bool_t throw_flag);
-DUK_INTERNAL_DECL duk_bool_t duk_js_getvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name, duk_bool_t throw_flag);
-DUK_INTERNAL_DECL void duk_js_putvar_envrec(duk_hthread *thr, duk_hobject *env, duk_hstring *name, duk_tval *val, duk_bool_t strict);
-DUK_INTERNAL_DECL void duk_js_putvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name, duk_tval *val, duk_bool_t strict);
-#if 0 /*unused*/
+DUK_INTERNAL_DECL duk_bool_t duk_js_getvar_activation(duk_hthread *thr,
+ duk_activation *act,
+ duk_hstring *name,
+ duk_bool_t throw_flag);
+DUK_INTERNAL_DECL void duk_js_putvar_envrec(duk_hthread *thr,
+ duk_hobject *env,
+ duk_hstring *name,
+ duk_tval *val,
+ duk_bool_t strict);
+DUK_INTERNAL_DECL void duk_js_putvar_activation(duk_hthread *thr,
+ duk_activation *act,
+ duk_hstring *name,
+ duk_tval *val,
+ duk_bool_t strict);
+#if 0 /*unused*/
DUK_INTERNAL_DECL duk_bool_t duk_js_delvar_envrec(duk_hthread *thr, duk_hobject *env, duk_hstring *name);
#endif
DUK_INTERNAL_DECL duk_bool_t duk_js_delvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name);
-DUK_INTERNAL_DECL duk_bool_t duk_js_declvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name, duk_tval *val, duk_small_uint_t prop_flags, duk_bool_t is_func_decl);
+DUK_INTERNAL_DECL duk_bool_t duk_js_declvar_activation(duk_hthread *thr,
+ duk_activation *act,
+ duk_hstring *name,
+ duk_tval *val,
+ duk_small_uint_t prop_flags,
+ duk_bool_t is_func_decl);
DUK_INTERNAL_DECL void duk_js_init_activation_environment_records_delayed(duk_hthread *thr, duk_activation *act);
DUK_INTERNAL_DECL void duk_js_close_environment_record(duk_hthread *thr, duk_hobject *env);
-DUK_INTERNAL_DECL duk_hobject *duk_create_activation_environment_record(duk_hthread *thr, duk_hobject *func, duk_size_t bottom_byteoff);
+DUK_INTERNAL_DECL duk_hobject *duk_create_activation_environment_record(duk_hthread *thr,
+ duk_hobject *func,
+ duk_size_t bottom_byteoff);
DUK_INTERNAL_DECL void duk_js_push_closure(duk_hthread *thr,
duk_hcompfunc *fun_temp,
duk_hobject *outer_var_env,
@@ -10408,7 +11218,8 @@ DUK_INTERNAL_DECL void duk_js_push_closure(duk_hthread *thr,
DUK_INTERNAL_DECL void duk_native_stack_check(duk_hthread *thr);
DUK_INTERNAL_DECL duk_int_t duk_handle_call_unprotected(duk_hthread *thr, duk_idx_t idx_func, duk_small_uint_t call_flags);
DUK_INTERNAL_DECL duk_int_t duk_handle_call_unprotected_nargs(duk_hthread *thr, duk_idx_t nargs, duk_small_uint_t call_flags);
-DUK_INTERNAL_DECL duk_int_t duk_handle_safe_call(duk_hthread *thr, duk_safe_call_function func, void *udata, duk_idx_t num_stack_args, duk_idx_t num_stack_res);
+DUK_INTERNAL_DECL duk_int_t
+duk_handle_safe_call(duk_hthread *thr, duk_safe_call_function func, void *udata, duk_idx_t num_stack_args, duk_idx_t num_stack_res);
DUK_INTERNAL_DECL void duk_call_construct_postprocess(duk_hthread *thr, duk_small_uint_t proxy_invariant);
#if defined(DUK_USE_VERBOSE_ERRORS)
DUK_INTERNAL_DECL void duk_call_setup_propcall_error(duk_hthread *thr, duk_tval *tv_base, duk_tval *tv_key);
@@ -10417,7 +11228,7 @@ DUK_INTERNAL_DECL void duk_call_setup_propcall_error(duk_hthread *thr, duk_tval
/* bytecode execution */
DUK_INTERNAL_DECL void duk_js_execute_bytecode(duk_hthread *exec_thr);
-#endif /* DUK_JS_H_INCLUDED */
+#endif /* DUK_JS_H_INCLUDED */
/* #include duk_numconv.h */
/*
* Number-to-string conversion. The semantics of these is very tightly
@@ -10430,23 +11241,23 @@ DUK_INTERNAL_DECL void duk_js_execute_bytecode(duk_hthread *exec_thr);
/* Output a specified number of digits instead of using the shortest
* form. Used for toPrecision() and toFixed().
*/
-#define DUK_N2S_FLAG_FIXED_FORMAT (1U << 0)
+#define DUK_N2S_FLAG_FIXED_FORMAT (1U << 0)
/* Force exponential format. Used for toExponential(). */
-#define DUK_N2S_FLAG_FORCE_EXP (1U << 1)
+#define DUK_N2S_FLAG_FORCE_EXP (1U << 1)
/* If number would need zero padding (for whole number part), use
* exponential format instead. E.g. if input number is 12300, 3
* digits are generated ("123"), output "1.23e+4" instead of "12300".
* Used for toPrecision().
*/
-#define DUK_N2S_FLAG_NO_ZERO_PAD (1U << 2)
+#define DUK_N2S_FLAG_NO_ZERO_PAD (1U << 2)
/* Digit count indicates number of fractions (i.e. an absolute
* digit index instead of a relative one). Used together with
* DUK_N2S_FLAG_FIXED_FORMAT for toFixed().
*/
-#define DUK_N2S_FLAG_FRACTION_DIGITS (1U << 3)
+#define DUK_N2S_FLAG_FRACTION_DIGITS (1U << 3)
/*
* String-to-number conversion
@@ -10460,69 +11271,72 @@ DUK_INTERNAL_DECL void duk_js_execute_bytecode(duk_hthread *exec_thr);
* radix 10, but with maximum radix (36) a safe limit is:
* (10000000*36).toString(16) -> '15752a00'
*/
-#define DUK_S2N_MAX_EXPONENT 10000000L
+#define DUK_S2N_MAX_EXPONENT 10000000L
/* Trim white space (= allow leading and trailing whitespace) */
-#define DUK_S2N_FLAG_TRIM_WHITE (1U << 0)
+#define DUK_S2N_FLAG_TRIM_WHITE (1U << 0)
/* Allow exponent */
-#define DUK_S2N_FLAG_ALLOW_EXP (1U << 1)
+#define DUK_S2N_FLAG_ALLOW_EXP (1U << 1)
/* Allow trailing garbage (e.g. treat "123foo" as "123) */
-#define DUK_S2N_FLAG_ALLOW_GARBAGE (1U << 2)
+#define DUK_S2N_FLAG_ALLOW_GARBAGE (1U << 2)
/* Allow leading plus sign */
-#define DUK_S2N_FLAG_ALLOW_PLUS (1U << 3)
+#define DUK_S2N_FLAG_ALLOW_PLUS (1U << 3)
/* Allow leading minus sign */
-#define DUK_S2N_FLAG_ALLOW_MINUS (1U << 4)
+#define DUK_S2N_FLAG_ALLOW_MINUS (1U << 4)
/* Allow 'Infinity' */
-#define DUK_S2N_FLAG_ALLOW_INF (1U << 5)
+#define DUK_S2N_FLAG_ALLOW_INF (1U << 5)
/* Allow fraction part */
-#define DUK_S2N_FLAG_ALLOW_FRAC (1U << 6)
+#define DUK_S2N_FLAG_ALLOW_FRAC (1U << 6)
/* Allow naked fraction (e.g. ".123") */
-#define DUK_S2N_FLAG_ALLOW_NAKED_FRAC (1U << 7)
+#define DUK_S2N_FLAG_ALLOW_NAKED_FRAC (1U << 7)
/* Allow empty fraction (e.g. "123.") */
-#define DUK_S2N_FLAG_ALLOW_EMPTY_FRAC (1U << 8)
+#define DUK_S2N_FLAG_ALLOW_EMPTY_FRAC (1U << 8)
/* Allow empty string to be interpreted as 0 */
-#define DUK_S2N_FLAG_ALLOW_EMPTY_AS_ZERO (1U << 9)
+#define DUK_S2N_FLAG_ALLOW_EMPTY_AS_ZERO (1U << 9)
/* Allow leading zeroes (e.g. "0123" -> "123") */
-#define DUK_S2N_FLAG_ALLOW_LEADING_ZERO (1U << 10)
+#define DUK_S2N_FLAG_ALLOW_LEADING_ZERO (1U << 10)
/* Allow automatic detection of hex base ("0x" or "0X" prefix),
* overrides radix argument and forces integer mode.
*/
-#define DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT (1U << 11)
+#define DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT (1U << 11)
/* Allow automatic detection of legacy octal base ("0n"),
* overrides radix argument and forces integer mode.
*/
-#define DUK_S2N_FLAG_ALLOW_AUTO_LEGACY_OCT_INT (1U << 12)
+#define DUK_S2N_FLAG_ALLOW_AUTO_LEGACY_OCT_INT (1U << 12)
/* Allow automatic detection of ES2015 octal base ("0o123"),
* overrides radix argument and forces integer mode.
*/
-#define DUK_S2N_FLAG_ALLOW_AUTO_OCT_INT (1U << 13)
+#define DUK_S2N_FLAG_ALLOW_AUTO_OCT_INT (1U << 13)
/* Allow automatic detection of ES2015 binary base ("0b10001"),
* overrides radix argument and forces integer mode.
*/
-#define DUK_S2N_FLAG_ALLOW_AUTO_BIN_INT (1U << 14)
+#define DUK_S2N_FLAG_ALLOW_AUTO_BIN_INT (1U << 14)
/*
* Prototypes
*/
-DUK_INTERNAL_DECL void duk_numconv_stringify(duk_hthread *thr, duk_small_int_t radix, duk_small_int_t digits, duk_small_uint_t flags);
+DUK_INTERNAL_DECL void duk_numconv_stringify(duk_hthread *thr,
+ duk_small_int_t radix,
+ duk_small_int_t digits,
+ duk_small_uint_t flags);
DUK_INTERNAL_DECL void duk_numconv_parse(duk_hthread *thr, duk_small_int_t radix, duk_small_uint_t flags);
-#endif /* DUK_NUMCONV_H_INCLUDED */
+#endif /* DUK_NUMCONV_H_INCLUDED */
/* #include duk_bi_protos.h */
/*
* Prototypes for built-in functions not automatically covered by the
@@ -10538,7 +11352,7 @@ DUK_INTERNAL_DECL void duk_numconv_parse(duk_hthread *thr, duk_small_int_t radix
* 32
* Include additional space to be safe.
*/
-#define DUK_BI_DATE_ISO8601_BUFSIZE 40
+#define DUK_BI_DATE_ISO8601_BUFSIZE 40
/* Helpers exposed for internal use */
DUK_INTERNAL_DECL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts, duk_double_t *dparts, duk_small_uint_t flags);
@@ -10576,7 +11390,10 @@ DUK_INTERNAL_DECL duk_bool_t duk_bi_date_parse_string_strptime(duk_hthread *thr,
DUK_INTERNAL_DECL duk_bool_t duk_bi_date_parse_string_getdate(duk_hthread *thr, const char *str);
#endif
#if defined(DUK_USE_DATE_FMT_STRFTIME)
-DUK_INTERNAL_DECL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr, duk_int_t *parts, duk_int_t tzoffset, duk_small_uint_t flags);
+DUK_INTERNAL_DECL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr,
+ duk_int_t *parts,
+ duk_int_t tzoffset,
+ duk_small_uint_t flags);
#endif
#if defined(DUK_USE_GET_MONOTONIC_TIME_CLOCK_GETTIME)
@@ -10587,10 +11404,7 @@ DUK_INTERNAL_DECL duk_double_t duk_bi_date_get_monotonic_time_windows_qpc(void);
#endif
DUK_INTERNAL_DECL
-void duk_bi_json_parse_helper(duk_hthread *thr,
- duk_idx_t idx_value,
- duk_idx_t idx_reviver,
- duk_small_uint_t flags);
+void duk_bi_json_parse_helper(duk_hthread *thr, duk_idx_t idx_value, duk_idx_t idx_reviver, duk_small_uint_t flags);
DUK_INTERNAL_DECL
void duk_bi_json_stringify_helper(duk_hthread *thr,
duk_idx_t idx_value,
@@ -10604,7 +11418,7 @@ DUK_INTERNAL_DECL duk_ret_t duk_textdecoder_decode_utf8_nodejs(duk_hthread *thr)
DUK_INTERNAL_DECL void duk_proxy_ownkeys_postprocess(duk_hthread *thr, duk_hobject *h_proxy_target, duk_uint_t flags);
#endif
-#endif /* DUK_BUILTIN_PROTOS_H_INCLUDED */
+#endif /* DUK_BUILTIN_PROTOS_H_INCLUDED */
/* #include duk_selftest.h */
/*
* Selftest code
@@ -10620,9 +11434,9 @@ DUK_INTERNAL_DECL duk_uint_t duk_selftest_run_tests(duk_alloc_function alloc_fun
void *udata);
#endif
-#endif /* DUK_SELFTEST_H_INCLUDED */
+#endif /* DUK_SELFTEST_H_INCLUDED */
-#endif /* DUK_INTERNAL_H_INCLUDED */
+#endif /* DUK_INTERNAL_H_INCLUDED */
#if defined(DUK_USE_COMPUTED_NAN)
DUK_INTERNAL double duk_computed_nan;
@@ -10716,7 +11530,7 @@ DUK_INTERNAL int duk_repl_isinf(double x) {
#error debugging enabled (DUK_USE_DEBUG) but DUK_USE_DEBUG_WRITE not defined
#endif
-#define DUK__DEBUG_BUFSIZE DUK_USE_DEBUG_BUFSIZE
+#define DUK__DEBUG_BUFSIZE DUK_USE_DEBUG_BUFSIZE
#if defined(DUK_USE_VARIADIC_MACROS)
@@ -10744,7 +11558,7 @@ DUK_INTERNAL void duk_debug_log(duk_int_t level, const char *file, duk_int_t lin
va_end(ap);
}
-#else /* DUK_USE_VARIADIC_MACROS */
+#else /* DUK_USE_VARIADIC_MACROS */
DUK_INTERNAL char duk_debug_file_stash[DUK_DEBUG_STASH_SIZE];
DUK_INTERNAL duk_int_t duk_debug_line_stash;
@@ -10775,15 +11589,15 @@ DUK_INTERNAL void duk_debug_log(const char *fmt, ...) {
va_end(ap);
}
-#endif /* DUK_USE_VARIADIC_MACROS */
+#endif /* DUK_USE_VARIADIC_MACROS */
-#else /* DUK_USE_DEBUG */
+#else /* DUK_USE_DEBUG */
/*
* Debugging disabled
*/
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
/* automatic undefs */
#undef DUK__DEBUG_BUFSIZE
@@ -10802,7 +11616,7 @@ DUK_INTERNAL void duk_debug_log(const char *fmt, ...) {
#if defined(DUK_USE_ROM_STRINGS)
#error ROM support not enabled, rerun configure.py with --rom-support
#else /* DUK_USE_ROM_STRINGS */
-DUK_INTERNAL const duk_uint8_t duk_strings_data[967] = {
+DUK_INTERNAL const duk_uint8_t duk_strings_data[972] = {
79,40,209,144,168,105,6,78,54,139,89,185,44,48,46,90,120,8,154,140,35,103,
35,113,193,73,5,52,112,180,104,166,135,52,188,4,98,12,27,146,156,80,211,31,
129,115,150,64,52,220,109,24,18,68,156,24,38,67,114,36,55,9,119,151,132,
@@ -10830,34 +11644,34 @@ DUK_INTERNAL const duk_uint8_t duk_strings_data[967] = {
113,67,77,201,128,223,255,223,224,121,44,48,46,95,203,145,46,9,205,16,39,
201,62,36,0,192,21,147,255,238,145,39,199,197,211,116,240,242,113,197,78,
214,211,226,233,187,107,105,19,119,37,56,161,166,52,221,212,201,205,36,240,
-242,16,96,152,12,178,52,211,56,228,73,150,83,0,148,39,137,75,67,73,198,209,
-129,36,85,185,201,196,2,32,193,48,17,160,97,16,84,44,156,104,24,67,189,200,
-108,201,19,238,114,96,137,137,50,238,113,164,188,211,185,192,226,100,19,
-134,68,110,112,174,139,0,185,31,115,149,4,88,7,159,115,146,117,34,34,35,
-115,143,22,146,208,210,19,115,140,3,207,185,202,130,36,109,85,185,194,161,
-160,90,50,72,155,115,149,2,232,67,137,204,122,22,66,161,175,164,210,72,199,
-130,137,1,50,32,145,143,38,120,186,195,35,106,51,146,230,8,36,77,109,65,38,
-226,72,159,191,189,181,70,140,133,222,249,212,227,66,125,245,187,251,219,
-77,3,119,190,117,56,208,159,125,110,254,246,210,26,93,239,157,78,52,39,223,
-93,191,189,180,212,52,187,223,58,156,104,79,190,187,127,123,104,180,104,
-183,190,117,56,208,159,125,102,254,209,104,209,124,234,113,161,62,250,80,
-196,128,81,4,9,16,162,4,196,116,9,205,154,27,66,32,100,13,12,98,68,227,33,
-65,69,204,195,34,201,50,8,110,33,23,34,28,168,104,22,188,12,174,138,11,70,
-138,104,115,68,130,137,13,82,27,41,129,162,35,138,54,146,198,137,39,72,180,
-210,178,38,35,146,103,68,139,51,197,214,28,227,131,79,15,35,138,58,130,37,
-19,155,41,146,174,64,203,99,161,100,37,145,51,148,75,4,164,66,54,140,49,46,
-247,70,103,37,230,70,142,70,67,30,232,204,178,163,201,18,54,139,89,39,26,
-16,165,2,228,69,33,143,89,24,70,206,73,67,102,72,148,2,32,214,73,157,224,
-18,128,98,29,241,69,65,50,37,241,116,200,41,144,102,125,2,180,8,210,152,38,
-129,23,8,34,198,
+242,16,96,152,12,26,20,164,137,150,70,154,103,28,137,50,202,96,18,132,241,
+41,104,105,56,218,48,36,138,183,57,56,128,68,24,38,2,52,12,34,10,133,147,
+141,3,8,119,185,13,153,34,125,206,76,17,49,38,93,206,52,151,154,119,56,28,
+76,130,112,200,141,206,21,209,96,23,35,238,114,160,139,0,243,238,114,78,
+164,68,68,110,113,226,210,90,26,66,110,113,128,121,247,57,80,68,141,170,
+183,56,84,52,11,70,73,19,110,114,160,93,8,113,57,143,66,200,84,53,244,154,
+73,24,240,81,32,38,68,18,49,228,207,23,88,100,109,70,114,92,193,4,137,173,
+168,36,220,73,19,247,247,182,168,209,144,187,223,58,156,104,79,190,183,127,
+123,105,160,110,247,206,167,26,19,239,173,223,222,218,67,75,189,243,169,
+198,132,251,235,183,247,182,154,134,151,123,231,83,141,9,247,215,111,239,
+109,22,141,22,247,206,167,26,19,239,172,223,218,45,26,47,157,78,52,39,223,
+74,24,144,10,32,129,34,20,64,152,142,129,57,179,67,104,68,12,129,161,140,
+72,156,100,40,40,185,152,100,89,38,65,13,196,34,228,67,149,13,2,215,129,
+149,209,65,104,209,77,14,104,144,81,33,170,67,101,48,52,68,113,70,210,88,
+209,36,233,22,154,86,68,196,114,76,232,145,102,120,186,195,156,112,105,225,
+228,113,71,80,68,162,115,101,50,85,200,25,108,116,44,132,178,38,114,137,96,
+148,136,70,209,134,37,222,232,204,228,188,200,209,200,200,99,221,25,150,84,
+121,34,70,209,107,36,227,66,20,160,92,136,164,49,235,35,8,217,201,40,108,
+201,18,128,68,26,201,51,188,2,80,12,67,190,40,168,38,68,190,46,153,5,50,12,
+207,160,86,129,26,83,4,208,34,225,4,88,192,
};
#endif /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_ROM_OBJECTS)
#error ROM support not enabled, rerun configure.py with --rom-support
#else /* DUK_USE_ROM_OBJECTS */
-/* native functions: 183 */
-DUK_INTERNAL const duk_c_function duk_bi_native_functions[183] = {
+/* native functions: 185 */
+DUK_INTERNAL const duk_c_function duk_bi_native_functions[185] = {
NULL,
duk_bi_array_constructor,
duk_bi_array_constructor_is_array,
@@ -10883,6 +11697,8 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[183] = {
duk_bi_buffer_readfield,
duk_bi_buffer_slice_shared,
duk_bi_buffer_writefield,
+ duk_bi_cbor_decode,
+ duk_bi_cbor_encode,
duk_bi_dataview_constructor,
duk_bi_date_constructor,
duk_bi_date_constructor_now,
@@ -11043,598 +11859,604 @@ DUK_INTERNAL const duk_c_function duk_bi_native_functions[183] = {
duk_bi_uint8array_plainof,
};
#if defined(DUK_USE_DOUBLE_LE)
-DUK_INTERNAL const duk_uint8_t duk_builtins_data[4251] = {
-144,148,105,225,32,68,52,228,126,12,104,201,37,132,52,167,194,138,105,244,
-124,57,28,211,57,18,64,52,238,254,44,138,111,171,241,164,19,87,137,30,33,
-167,18,145,159,8,211,137,9,225,42,5,240,145,139,163,163,8,211,137,10,228,
-64,211,19,132,140,93,29,56,70,156,72,119,34,66,146,36,104,137,194,70,46,
-142,172,35,78,36,47,146,195,102,11,240,145,139,163,175,8,211,137,9,228,240,
-242,112,145,139,163,179,8,211,137,8,237,34,130,118,49,116,118,225,26,48,0,
-1,94,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
-33,8,66,26,180,41,97,167,64,150,34,33,154,112,0,1,87,247,35,79,103,237,198,
-174,216,47,31,23,95,17,13,31,217,96,211,49,50,53,212,77,141,24,0,0,179,10,
-228,240,242,15,128,140,65,128,134,188,0,0,89,167,97,181,224,0,2,205,62,53,
-224,0,2,205,66,237,120,0,0,179,81,204,107,192,0,5,154,150,67,94,0,0,44,212,
-245,90,240,0,1,102,169,162,215,128,0,11,53,93,150,188,0,0,89,171,111,53,
-108,150,163,70,0,0,42,2,249,50,94,124,35,68,225,146,49,13,24,0,0,165,161,
-124,153,47,62,12,130,112,201,24,132,56,97,115,16,0,0,0,0,0,0,62,31,243,48,
-0,0,0,0,0,0,60,31,242,241,32,26,193,55,132,112,161,156,72,135,26,41,200,
-140,114,163,156,201,7,56,79,9,80,47,132,140,93,19,160,43,145,3,76,78,18,49,
-116,78,144,238,68,133,36,72,209,19,132,140,93,19,168,47,146,195,102,11,240,
-145,139,162,117,132,242,120,121,56,72,197,209,59,2,59,72,160,157,140,93,19,
-181,36,242,50,143,36,31,131,162,166,7,144,238,133,227,226,235,224,242,161,
-249,18,21,100,20,207,44,199,151,180,122,89,135,152,154,121,153,199,156,158,
-121,218,7,158,162,121,250,71,160,166,122,26,135,162,170,122,58,199,164,16,
-240,70,68,226,27,51,199,138,120,35,34,112,171,112,38,121,1,124,153,47,62,
-17,162,112,201,19,211,11,228,201,121,240,100,19,134,72,158,160,91,201,18,
-186,44,3,68,79,122,168,151,115,165,40,21,18,227,65,198,231,200,8,68,184,84,
-53,19,38,120,128,145,144,78,25,59,72,163,48,64,144,200,39,12,157,164,80,46,
-185,143,115,72,217,230,72,9,35,68,225,147,180,138,51,68,9,17,162,112,201,
-218,69,2,235,152,247,52,141,158,108,128,98,72,64,121,51,132,4,81,164,144,
-128,242,104,136,0,16,92,38,14,49,39,199,197,211,116,240,242,113,197,231,18,
-53,189,116,65,131,18,124,117,155,199,197,207,36,103,142,12,146,20,80,249,
-186,60,116,4,204,73,241,214,111,31,23,60,145,158,56,208,48,146,229,146,3,2,
-82,65,155,195,94,3,10,36,4,201,196,64,56,100,42,26,78,62,46,121,35,60,113,
-152,16,25,10,134,147,143,139,158,72,205,4,151,21,0,73,16,11,230,144,12,88,
-144,153,39,52,144,69,241,37,72,217,240,151,153,27,36,57,178,230,16,16,137,
-114,68,2,200,62,81,1,8,151,11,23,100,141,229,18,6,34,92,37,230,70,201,1,89,
-57,36,2,40,152,151,44,129,83,18,124,117,155,199,197,207,36,103,142,75,12,
-11,151,46,89,40,18,37,200,64,12,154,236,252,238,185,23,95,213,1,132,234,0,
-194,245,128,14,56,37,199,89,188,124,92,242,70,120,232,16,26,137,113,241,
-116,221,60,60,156,113,122,36,10,62,46,121,35,60,113,18,225,27,70,18,32,10,
-201,211,32,67,107,104,100,42,26,78,24,147,153,35,181,181,207,64,67,107,104,
-100,42,26,78,72,147,153,35,181,181,207,68,16,218,218,91,156,170,63,134,36,
-230,72,237,109,116,136,16,218,218,91,156,170,63,146,36,230,72,237,109,116,
-137,16,96,128,228,2,6,191,46,3,71,147,68,4,16,22,188,169,240,16,40,104,242,
-135,198,171,44,68,65,5,217,231,215,6,231,62,188,8,49,1,3,162,92,4,98,12,41,
-7,33,148,53,242,128,97,32,130,3,9,205,16,38,199,198,14,9,0,111,115,225,0,8,
-250,72,240,207,128,241,37,73,25,18,40,0,178,58,11,56,192,2,201,104,17,35,
-160,9,39,70,114,8,6,147,214,129,18,74,240,30,141,145,208,89,203,62,3,161,
-163,37,248,226,185,244,11,88,37,62,33,163,37,248,226,185,252,0,127,255,130,
-146,164,142,32,26,1,36,230,18,1,164,7,43,163,194,0,71,128,105,64,216,7,192,
-52,192,197,66,230,72,192,52,224,209,32,232,34,68,62,129,113,32,232,34,114,
-40,49,231,16,254,0,63,255,208,99,2,140,44,92,206,8,224,143,4,225,147,210,
-124,13,44,92,206,9,195,39,30,228,54,126,163,225,200,169,198,133,42,166,191,
-246,3,11,251,0,24,71,4,120,9,251,8,10,17,193,30,9,195,39,1,63,105,1,98,112,
-201,199,185,13,159,1,63,105,32,48,156,209,2,126,227,224,58,26,50,95,142,47,
-192,208,22,176,74,124,67,70,75,241,197,248,26,64,213,184,64,89,56,39,49,
-224,137,62,36,2,176,19,17,254,68,3,196,143,88,4,79,162,0,210,32,34,35,253,
-72,5,146,208,34,125,144,5,147,214,137,253,208,9,149,3,41,197,13,55,233,0,
-185,187,139,117,137,30,8,18,39,172,1,25,187,139,112,128,178,113,110,177,35,
-193,2,68,245,128,23,55,114,143,121,35,193,2,68,245,130,8,205,220,91,132,5,
-147,148,123,201,30,8,18,39,172,16,18,113,67,63,128,3,68,143,32,39,243,32,
-42,83,4,103,46,89,19,63,224,208,16,70,142,92,178,38,127,193,164,8,67,68,
-186,12,146,247,154,1,165,64,202,113,252,160,131,32,7,35,167,26,50,235,231,
-130,48,179,192,65,148,69,19,214,2,251,85,2,232,72,31,255,255,255,255,255,
-253,239,226,122,196,55,106,160,93,9,0,4,0,0,0,0,0,0,3,49,0,0,0,0,0,0,3,225,
-252,143,94,233,34,104,169,54,144,210,161,168,158,32,0,0,0,0,0,0,120,63,145,
-235,72,96,77,21,38,210,26,84,53,19,196,0,0,0,0,0,0,15,15,240,253,35,228,
-133,185,176,0,0,0,0,0,0,44,15,8,117,128,190,212,128,82,109,33,179,33,137,
-24,31,255,255,255,255,255,231,232,100,58,196,55,106,64,41,54,144,217,144,
-196,140,15,255,255,255,255,255,243,252,49,15,4,100,78,33,179,60,120,167,
-130,50,39,10,183,2,103,144,113,8,151,10,134,162,100,221,16,18,137,113,13,
-153,12,72,238,137,1,81,46,52,28,110,232,148,53,18,228,128,82,113,13,153,12,
-72,238,137,142,73,78,52,0,0,0,0,0,0,0,0,8,58,254,1,12,38,248,134,23,130,0,
-60,221,194,162,228,30,244,128,217,187,132,187,220,210,54,104,2,247,132,5,
-205,220,124,72,36,73,14,110,252,132,25,128,193,94,8,200,149,200,3,237,38,
-43,31,192,54,186,213,128,57,45,56,210,0,0,0,0,0,0,62,31,241,90,251,224,6,
-77,220,24,38,78,74,113,67,77,124,16,50,110,228,208,194,114,83,138,26,107,
-224,172,37,240,97,41,187,139,112,128,178,112,96,153,57,41,197,13,53,240,
-113,41,187,139,112,128,178,114,104,97,57,41,197,13,53,240,128,195,95,8,44,
-61,240,132,216,93,33,133,192,128,14,98,79,147,67,9,129,0,44,196,159,11,69,
-175,152,32,35,100,33,135,24,147,237,38,34,246,139,95,48,64,70,200,68,8,49,
-39,198,57,179,61,144,138,22,98,79,180,152,153,215,54,103,178,17,129,204,73,
-240,96,153,44,132,112,163,18,125,164,196,62,130,100,178,18,1,140,73,240,96,
-197,144,146,18,98,79,180,152,135,208,98,200,74,8,49,39,195,186,145,149,144,
-150,22,98,79,180,152,143,215,82,50,178,19,2,140,73,241,136,109,38,73,89,9,
-161,166,36,251,73,137,157,67,105,50,74,200,78,10,49,39,201,16,78,104,229,
-100,39,134,152,147,237,38,41,116,130,115,71,43,33,64,60,196,159,24,133,173,
-18,32,156,209,202,200,81,18,49,39,218,76,76,234,22,180,72,130,115,71,43,33,
-72,68,196,159,38,134,19,46,105,56,226,150,68,157,160,1,228,73,242,104,97,
-46,16,31,34,79,140,66,214,137,16,78,104,229,108,169,137,72,147,237,38,38,
-117,11,90,36,65,57,163,149,178,168,21,34,79,146,32,156,209,202,218,250,161,
-178,36,251,73,138,93,32,156,209,202,218,250,193,82,36,248,196,54,147,36,
-173,191,174,27,34,79,180,152,153,212,54,147,36,173,191,176,17,34,79,135,
-117,35,43,115,236,133,200,147,237,38,35,245,212,140,173,207,180,15,34,79,
-131,4,201,108,173,133,72,147,237,38,33,244,19,37,178,184,17,34,79,140,115,
-102,123,107,238,133,200,147,237,38,38,117,205,153,237,175,188,23,34,79,133,
-162,215,204,16,17,182,254,248,116,137,62,210,98,47,104,181,243,4,4,109,191,
-192,131,152,147,230,8,8,217,12,16,60,137,62,96,128,141,178,193,181,55,136,
-200,51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,32,98,115,249,73,
-117,243,249,67,21,159,202,38,47,63,148,86,8,75,144,94,50,1,38,73,79,204,67,
-95,231,1,6,128,14,79,129,185,40,249,18,149,181,207,142,199,155,172,248,172,
-89,183,207,140,198,137,175,200,0,159,72,10,5,21,220,138,120,74,129,124,36,
-98,232,228,74,81,62,160,20,10,107,185,21,114,32,105,137,194,70,46,142,68,
-165,19,235,1,64,170,187,145,119,34,66,146,36,104,137,194,70,46,142,68,165,
-19,236,1,64,174,187,145,95,37,134,204,23,225,35,23,71,34,82,137,246,128,
-160,89,93,200,167,147,195,201,194,70,46,142,68,165,19,238,1,64,182,187,145,
-71,105,20,19,177,139,163,145,41,68,16,7,6,15,82,70,72,115,96,0,0,0,0,0,118,
-105,160,91,60,165,195,201,194,8,134,149,216,130,0,192,41,224,136,2,48,176,
-228,1,149,13,195,15,0,200,209,97,71,128,99,32,176,131,192,113,57,143,0,167,
-131,32,230,80,28,202,139,175,237,2,48,189,160,20,1,119,48,87,193,186,129,
-89,56,72,197,209,200,193,185,35,23,71,109,13,219,36,98,232,237,156,13,26,
-208,211,14,102,19,87,137,91,95,128,0,10,64,24,92,0,0,82,2,53,63,240,49,204,
-202,10,14,38,78,44,141,52,207,31,0,0,22,32,129,100,180,8,148,145,78,102,
-152,80,113,50,113,100,105,166,120,248,0,0,177,1,65,196,201,199,20,178,36,
-227,224,0,2,200,3,6,133,41,35,31,0,0,22,1,44,57,137,62,33,179,216,162,152,
-192,131,18,124,162,27,61,138,41,108,32,196,159,16,217,232,235,81,76,104,73,
-137,62,81,13,158,142,181,20,184,16,98,79,136,108,244,244,168,166,56,36,196,
-159,40,134,207,79,74,138,93,10,49,39,194,173,192,158,158,149,20,188,20,98,
-79,133,91,129,61,109,74,41,124,30,68,159,16,217,236,83,108,96,68,137,62,81,
-13,158,197,54,182,17,34,79,136,108,244,117,169,182,52,38,68,159,40,134,207,
-71,90,155,92,8,145,39,196,54,122,122,84,219,28,19,34,79,148,67,103,167,165,
-77,174,133,72,147,225,86,224,79,79,74,155,94,10,145,39,194,173,192,158,182,
-165,54,190,206,25,212,35,208,226,100,150,211,201,29,162,44,140,35,103,0,0,
-0,0,0,0,3,192,252,206,25,228,35,208,226,100,150,211,201,29,162,44,140,35,
-103,0,0,0,0,0,0,3,192,252,206,25,244,35,208,226,100,150,211,201,29,162,44,
-140,35,103,0,0,0,0,0,0,3,192,252,206,26,4,35,208,226,100,150,211,201,29,
-162,44,140,35,103,0,0,0,0,0,0,0,1,0,206,26,20,35,208,226,100,150,211,201,
-29,162,44,140,35,103,0,0,0,0,0,0,0,1,0,206,26,36,35,208,226,100,150,211,
-201,29,162,44,140,35,103,0,0,0,0,0,0,0,65,0,206,26,52,35,208,226,100,150,
-211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,65,0,206,26,68,35,208,226,100,
-150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,65,0,206,26,84,35,208,226,
-100,150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,129,0,195,154,99,16,38,
-36,0,251,68,117,179,216,162,128,68,72,1,241,13,158,197,20,150,25,18,0,125,
-162,58,217,232,235,117,100,162,136,25,18,0,125,162,58,217,232,235,116,36,
-162,145,2,226,64,15,136,108,244,117,186,178,81,73,129,113,32,7,196,54,122,
-58,221,9,40,165,64,200,144,3,237,17,214,207,79,75,171,37,20,80,200,144,3,
-237,17,214,207,79,75,161,37,20,138,23,18,0,124,67,103,167,165,213,146,138,
-77,11,137,0,62,33,179,211,210,232,73,69,42,133,196,128,31,10,183,2,125,89,
-40,163,5,196,128,31,10,183,2,125,9,40,164,96,200,144,3,224,221,64,172,157,
-89,40,163,134,68,128,31,6,234,5,100,232,73,69,35,133,68,128,31,104,142,182,
-125,89,40,180,0,168,144,3,237,17,214,207,161,37,22,144,19,18,0,124,67,103,
-213,146,139,80,9,137,0,62,33,179,232,73,69,172,5,90,40,153,59,68,117,179,
-216,166,192,77,162,137,147,136,108,246,41,180,176,219,69,19,39,104,142,182,
-122,58,221,89,41,178,6,218,40,153,59,68,117,179,209,214,232,73,77,162,6,90,
-40,153,56,134,207,71,91,171,37,54,152,25,104,162,100,226,27,61,29,110,132,
-148,218,160,109,162,137,147,180,71,91,61,61,46,172,148,217,67,109,20,76,
-157,162,58,217,233,233,116,36,166,209,67,45,20,76,156,67,103,167,165,213,
-146,155,77,12,180,81,50,113,13,158,158,151,66,74,109,84,50,209,68,201,194,
-173,192,159,86,74,108,193,150,138,38,78,21,110,4,250,18,83,104,193,182,138,
-38,78,13,212,10,201,213,146,155,56,109,162,137,147,131,117,2,178,116,36,
-166,209,194,237,20,76,157,162,58,217,245,100,167,16,2,237,20,76,157,162,58,
-217,244,36,167,18,2,173,20,76,156,67,103,213,146,156,80,10,180,81,50,113,
-13,159,66,74,113,97,175,220,48,216,109,192,4,42,22,189,163,0,196,133,0,185,
-80,32,28,78,99,193,18,80,36,4,19,159,141,156,0,178,90,4,74,73,0,22,209,68,
-201,185,129,4,2,8,3,132,64,60,36,6,149,113,72,176,171,240,84,0,157,91,116,
-116,32,11,42,218,221,216,181,129,32,3,234,219,165,3,188,231,235,249,8,187,
-152,252,47,86,227,105,18,7,244,17,91,42,56,175,185,248,110,173,198,209,208,
-36,0,238,82,97,87,188,189,179,240,93,122,32,12,22,162,42,125,144,132,160,7,
-236,161,25,232,237,105,64,205,59,127,102,158,160,230,63,11,217,66,51,210,
-129,154,118,254,205,61,65,236,127,171,197,34,168,48,6,90,162,1,0,39,75,84,
-72,8,9,33,186,162,80,64,76,13,213,19,2,130,96,110,150,181,0,65,6,51,213,20,
-128,65,17,11,213,19,130,137,121,211,210,210,144,6,39,75,84,80,0,201,119,
-234,138,8,41,86,231,71,84,80,129,79,135,186,122,101,224,34,25,69,233,208,3,
-91,141,170,40,96,139,113,180,181,69,36,21,110,54,142,134,168,165,1,176,23,
-212,47,0,216,134,234,87,128,111,117,181,168,128,209,3,70,230,106,192,5,139,
-168,209,234,138,32,36,144,102,235,8,3,146,27,170,40,160,146,132,103,170,40,
-192,115,3,117,69,28,22,113,163,69,170,41,103,1,66,188,17,145,52,104,4,202,
-113,67,76,130,227,72,194,13,240,108,0,0,83,96,0,2,185,0,104,146,84,97,48,0,
-1,90,192,56,169,24,145,179,192,0,5,96,8,56,16,32,128,56,18,52,125,198,86,
-147,186,140,28,50,21,13,39,31,23,60,145,158,56,204,141,47,121,6,155,190,
-188,24,49,39,199,89,188,124,92,242,70,120,224,201,33,69,15,155,163,199,68,
-14,49,39,199,197,211,116,240,242,113,197,231,18,180,254,4,3,17,46,18,243,
-35,100,128,172,156,146,70,163,150,76,34,248,146,164,108,248,75,204,141,146,
-28,217,115,9,27,79,11,241,173,235,162,160,224,200,2,206,9,113,13,148,192,
-209,18,22,164,146,37,193,57,162,4,249,39,196,128,24,2,178,66,213,136,68,
-201,16,77,209,131,31,192,242,88,96,92,191,151,34,100,136,38,232,255,252,92,
-221,199,197,12,68,209,82,66,212,11,155,185,41,197,13,55,38,3,66,213,47,131,
-250,72,12,162,99,133,116,127,196,32,225,1,3,34,92,170,9,105,164,32,225,64,
-131,156,1,193,133,7,19,39,22,70,154,103,143,128,0,11,16,20,28,76,156,113,
-75,34,78,62,0,0,44,128,48,104,82,146,49,240,0,1,96,11,180,192,0,5,162,1,18,
-160,65,24,131,20,145,25,188,48,132,122,28,76,146,218,121,35,180,69,145,132,
-108,224,0,0,0,0,0,0,120,31,153,188,56,132,122,28,76,146,218,121,35,180,69,
-145,132,108,224,0,0,0,0,0,0,120,31,168,160,45,110,23,30,176,33,184,0,0,181,
-32,29,235,2,27,199,23,0,0,22,196,51,120,129,8,244,56,153,37,180,242,71,104,
-139,35,8,217,192,0,0,0,0,0,0,240,63,51,120,145,8,244,56,153,37,180,242,71,
-104,139,35,8,217,192,0,0,0,0,0,0,0,64,51,120,161,8,244,56,153,37,180,242,
-71,104,139,35,8,217,192,0,0,0,0,0,0,0,64,51,120,177,8,244,56,153,37,180,
-242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,120,193,8,244,56,153,37,
-180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,120,209,8,244,56,153,
-37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,120,225,8,244,56,
-153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,32,64,32,227,194,0,97,
-57,162,4,246,40,5,34,92,35,68,225,161,166,219,16,16,137,112,52,41,73,29,
-169,1,65,196,201,197,145,166,153,246,8,3,137,204,120,34,74,8,200,58,128,28,
-211,160,130,52,78,26,26,110,248,0,0,170,4,12,70,137,195,38,0,0,42,68,159,7,
-84,3,154,150,16,70,137,195,67,77,223,0,0,20,224,20,160,152,23,223,0,0,20,
-226,9,65,154,232,147,161,115,59,224,0,2,156,84,12,50,9,195,38,0,0,41,133,
-30,224,32,54,186,221,128,60,
+DUK_INTERNAL const duk_uint8_t duk_builtins_data[4281] = {
+144,148,105,226,32,68,52,228,254,12,104,202,37,132,52,167,194,138,105,245,
+124,57,28,211,57,18,64,52,239,126,44,138,111,175,241,164,19,87,145,30,33,
+167,22,145,159,8,211,139,9,225,42,5,240,145,139,163,163,8,211,139,10,228,
+64,211,19,132,140,93,29,56,70,156,88,119,34,66,146,36,104,137,194,70,46,
+142,172,35,78,44,47,146,195,102,11,240,145,139,163,175,8,211,139,9,228,240,
+242,112,145,139,163,179,8,211,139,8,237,34,130,118,49,116,118,225,26,48,0,
+1,98,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
+33,8,66,26,180,105,97,167,68,150,34,33,154,112,0,1,91,247,35,79,111,237,
+198,174,232,47,31,23,95,17,13,31,249,96,211,49,50,53,214,77,141,24,0,0,181,
+10,228,240,242,15,128,140,65,128,134,188,0,0,90,167,97,181,224,0,2,213,62,
+53,224,0,2,213,66,237,120,0,0,181,81,204,107,192,0,5,170,150,67,94,0,0,45,
+84,245,90,240,0,1,106,169,162,215,128,0,11,85,93,150,188,0,0,90,171,111,53,
+109,22,162,26,48,0,1,84,23,201,146,243,225,26,39,12,145,136,104,192,0,5,61,
+11,228,201,121,240,100,19,134,72,196,33,195,14,40,203,112,64,190,76,232,
+145,153,136,0,0,0,0,0,0,31,15,249,152,0,0,0,0,0,0,30,15,249,120,144,13,96,
+155,194,56,80,206,36,67,141,20,228,70,57,81,206,100,131,156,39,132,168,23,
+194,70,46,137,208,21,200,129,166,39,9,24,186,39,72,119,34,66,146,36,104,
+137,194,70,46,137,212,23,201,97,179,5,248,72,197,209,58,194,121,60,60,156,
+36,98,232,157,129,29,164,80,78,198,46,137,218,146,121,25,71,146,9,209,5,
+209,61,48,126,14,138,152,30,67,186,23,143,139,175,131,202,135,228,72,85,
+144,83,60,179,30,94,209,233,102,30,98,105,230,103,30,114,121,231,104,30,
+122,137,231,233,30,130,153,232,106,30,138,169,232,235,30,144,67,193,25,19,
+136,108,207,30,41,224,140,137,194,173,192,153,228,5,242,100,188,248,70,137,
+195,36,79,78,47,147,37,231,193,144,78,25,34,122,145,111,36,74,232,176,13,
+17,61,234,226,93,207,148,160,84,75,141,7,27,161,32,33,18,225,80,212,76,154,
+2,2,70,65,56,100,237,34,140,209,2,67,32,156,50,118,145,64,186,230,61,205,
+35,103,155,32,36,141,19,134,78,210,40,206,16,36,70,137,195,39,105,20,11,
+174,99,220,210,54,121,210,1,137,33,1,228,207,16,17,70,146,66,3,201,164,32,
+0,65,112,152,56,196,159,31,23,77,211,195,201,199,23,160,72,214,246,81,6,12,
+73,241,214,111,31,23,60,145,158,56,50,72,81,67,230,232,242,80,19,49,39,199,
+89,188,124,92,242,70,120,227,64,194,75,154,72,12,9,73,6,111,21,120,12,40,
+144,19,39,25,0,225,144,168,105,56,248,185,228,140,241,200,96,64,100,42,26,
+78,62,46,121,35,52,18,92,116,1,36,64,47,158,64,49,98,66,100,156,242,65,23,
+196,149,35,103,194,94,100,108,144,230,203,156,64,66,37,201,16,11,32,249,
+132,4,34,92,44,93,146,55,152,72,24,137,112,151,153,27,36,5,100,229,144,8,
+162,98,92,210,5,76,73,241,214,111,31,23,60,145,158,57,44,48,46,92,185,164,
+160,72,151,41,0,50,107,179,244,59,36,93,127,92,6,19,172,3,11,216,0,56,224,
+151,29,102,241,241,115,201,25,227,164,64,106,37,199,197,211,116,240,242,
+113,197,233,144,40,248,185,228,140,241,196,75,132,109,24,72,128,43,39,84,
+129,13,173,161,144,168,105,56,98,78,100,142,214,215,69,1,13,173,161,144,
+168,105,57,34,78,100,142,214,215,69,16,67,107,105,110,114,168,254,24,147,
+153,35,181,181,212,32,67,107,105,110,114,168,254,72,147,153,35,181,181,212,
+36,65,130,3,144,8,26,252,200,13,30,85,16,16,64,90,242,231,192,64,161,163,
+203,31,26,172,193,17,4,23,105,159,96,27,172,251,16,32,196,4,14,137,112,17,
+136,48,164,28,134,80,215,202,1,132,130,8,12,39,52,64,155,31,24,56,36,1,189,
+207,132,0,35,233,35,195,62,3,196,149,36,100,72,160,2,200,232,44,227,0,11,
+37,160,68,142,128,36,157,25,200,32,26,79,90,4,73,43,192,122,54,71,65,103,
+44,248,14,134,140,151,227,138,231,208,45,96,148,248,134,140,151,227,138,
+231,240,1,255,254,10,74,146,56,128,104,4,147,152,72,6,144,28,174,143,8,1,
+30,1,165,3,96,31,0,211,3,21,11,153,35,0,211,131,68,131,160,137,16,250,5,
+196,131,160,137,200,160,199,156,67,248,0,255,255,65,140,10,48,177,115,56,
+35,130,60,19,134,79,89,240,52,177,115,56,39,12,156,123,144,217,251,15,135,
+34,167,30,20,170,154,255,232,12,47,244,0,97,28,17,224,39,238,32,40,71,4,
+120,39,12,156,4,253,228,5,137,195,39,30,228,54,124,4,253,228,128,194,115,
+68,9,252,15,128,232,104,201,126,56,191,35,64,90,193,41,241,13,25,47,199,23,
+228,105,3,86,225,1,100,224,156,199,130,36,249,144,10,192,76,71,250,16,15,
+18,61,96,17,62,200,3,72,128,136,143,247,32,22,75,64,137,248,64,22,79,90,39,
+249,64,38,84,12,167,20,52,223,196,2,230,238,45,214,36,120,32,72,158,208,4,
+102,238,45,194,2,201,197,186,196,143,4,9,19,218,0,92,221,202,61,228,143,4,
+9,19,218,8,35,55,113,110,16,22,78,81,239,36,120,32,72,158,208,64,73,197,12,
+255,0,13,18,60,128,159,212,128,169,76,17,156,185,100,76,255,163,64,65,26,
+57,114,200,153,255,70,144,33,13,18,232,50,75,226,104,6,149,3,41,199,246,
+130,12,128,28,142,156,120,203,175,158,8,194,207,1,6,81,20,79,88,11,237,84,
+11,161,32,127,255,255,255,255,255,247,191,137,235,16,221,170,129,116,36,0,
+16,0,0,0,0,0,0,12,196,0,0,0,0,0,0,15,135,242,61,123,164,137,162,164,218,67,
+74,134,162,120,128,0,0,0,0,0,1,224,254,71,173,33,129,52,84,155,72,105,80,
+212,79,16,0,0,0,0,0,0,60,63,195,244,143,146,22,230,192,0,0,0,0,0,0,176,60,
+33,214,2,251,82,1,73,180,134,204,134,36,96,127,255,255,255,255,255,159,161,
+144,235,16,221,169,0,164,218,67,102,67,18,48,63,255,255,255,255,255,207,
+240,196,60,17,145,56,134,204,241,226,158,8,200,156,42,220,9,158,65,196,34,
+92,42,26,137,147,120,64,74,37,196,54,100,49,35,188,36,5,68,184,208,113,187,
+194,80,212,75,146,1,73,196,54,100,49,35,188,38,57,37,56,240,0,0,0,0,0,0,0,
+0,32,235,248,68,48,156,2,24,94,24,0,243,119,10,139,144,123,242,3,102,238,
+18,239,115,72,217,160,11,223,16,23,55,113,241,32,145,36,57,188,18,16,102,3,
+5,120,35,34,89,32,15,180,152,173,127,0,218,235,88,0,228,180,227,200,0,0,0,
+0,0,0,248,127,197,107,240,64,6,77,220,24,38,78,74,113,67,77,130,4,12,155,
+185,52,48,156,148,226,134,155,4,10,194,96,129,132,166,238,45,194,2,201,193,
+130,100,228,167,20,52,216,32,113,41,187,139,112,128,178,114,104,97,57,41,
+197,13,54,8,32,48,216,32,130,195,224,130,19,97,124,134,23,6,0,57,137,62,77,
+12,38,12,0,179,18,124,45,22,190,96,128,141,176,134,28,98,79,180,152,139,
+218,45,124,193,1,27,97,16,32,196,159,24,230,204,246,194,40,89,137,62,210,
+98,103,92,217,158,216,70,7,49,39,193,130,100,182,17,194,140,73,246,147,16,
+250,9,146,216,72,6,49,39,193,131,22,194,72,73,137,62,210,98,31,65,139,97,
+40,32,196,159,14,234,70,86,194,88,89,137,62,210,98,63,93,72,202,216,76,10,
+49,39,198,33,180,153,37,108,38,134,152,147,237,38,38,117,13,164,201,43,97,
+56,40,196,159,36,65,57,163,149,176,158,26,98,79,180,152,165,210,9,205,28,
+173,133,0,243,18,124,98,22,180,72,130,115,71,43,97,68,72,196,159,105,49,51,
+168,90,209,34,9,205,28,173,133,33,19,18,124,154,24,76,185,164,227,138,89,
+18,119,0,7,145,39,201,161,132,188,64,124,137,62,49,11,90,36,65,57,163,149,
+210,166,37,34,79,180,152,153,212,45,104,145,4,230,142,87,74,160,84,137,62,
+72,130,115,71,43,171,234,134,200,147,237,38,41,116,130,115,71,43,171,235,5,
+72,147,227,16,218,76,146,186,254,184,108,137,62,210,98,103,80,218,76,146,
+186,254,192,68,137,62,29,212,140,174,207,178,23,34,79,180,152,143,215,82,
+50,187,62,208,60,137,62,12,19,37,210,182,21,34,79,180,152,135,208,76,151,
+74,224,68,137,62,49,205,153,238,175,186,23,34,79,180,152,153,215,54,103,
+186,190,240,92,137,62,22,139,95,48,64,70,235,251,225,210,36,251,73,136,189,
+162,215,204,16,17,186,255,2,14,98,79,152,32,35,108,48,64,242,36,249,130,2,
+55,75,6,212,224,72,200,51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,
+48,98,115,249,201,117,243,249,195,21,159,206,38,47,63,156,86,8,75,144,94,
+82,1,38,73,79,208,67,95,233,1,6,128,14,79,129,186,40,249,18,149,182,207,
+144,200,155,188,248,204,105,184,207,142,199,137,175,201,0,159,72,10,5,21,
+221,10,120,74,129,124,36,98,232,228,74,81,62,160,20,10,107,186,21,114,32,
+105,137,194,70,46,142,68,165,19,235,1,64,170,187,161,119,34,66,146,36,104,
+137,194,70,46,142,68,165,19,236,1,64,174,187,161,95,37,134,204,23,225,35,
+23,71,34,82,137,246,128,160,89,93,208,167,147,195,201,194,70,46,142,68,165,
+19,238,1,64,182,187,161,71,105,20,19,177,139,163,145,41,68,16,7,6,15,82,70,
+72,115,96,0,0,0,0,0,27,234,32,91,60,165,195,201,194,8,134,149,216,162,0,
+192,41,225,8,2,48,177,36,1,149,13,196,15,0,200,209,97,199,128,99,32,176,
+195,192,113,57,143,0,167,133,32,230,80,28,202,139,175,238,2,48,189,192,20,
+1,119,80,87,193,186,129,89,56,72,197,209,200,193,185,35,23,71,109,13,219,
+36,98,232,237,156,13,26,208,211,14,102,19,87,137,91,95,128,0,10,96,24,92,0,
+0,83,2,53,56,0,0,165,3,28,204,160,160,226,100,226,200,211,76,241,240,0,1,
+102,8,22,75,64,137,73,20,230,105,133,7,19,39,22,70,154,103,143,128,0,11,48,
+20,28,76,156,113,75,34,78,62,0,0,45,3,103,31,0,0,22,65,44,57,137,62,33,179,
+216,162,152,192,131,18,124,162,27,61,138,41,108,32,196,159,16,217,232,235,
+81,76,104,73,137,62,81,13,158,142,181,20,184,16,98,79,136,108,244,244,168,
+166,56,36,196,159,40,134,207,79,74,138,93,10,49,39,194,173,192,158,158,149,
+20,188,20,98,79,133,91,129,61,109,74,41,124,30,68,159,16,217,236,83,108,96,
+68,137,62,81,13,158,197,54,182,17,34,79,136,108,244,117,169,182,52,38,68,
+159,40,134,207,71,90,155,92,8,145,39,196,54,122,122,84,219,28,19,34,79,148,
+67,103,167,165,77,174,133,72,147,225,86,224,79,79,74,155,94,10,145,39,194,
+173,192,158,182,165,54,190,206,25,212,35,208,226,100,150,211,201,29,162,44,
+140,35,103,0,0,0,0,0,0,3,192,252,206,25,228,35,208,226,100,150,211,201,29,
+162,44,140,35,103,0,0,0,0,0,0,3,192,252,206,25,244,35,208,226,100,150,211,
+201,29,162,44,140,35,103,0,0,0,0,0,0,3,192,252,206,26,4,35,208,226,100,150,
+211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,1,0,206,26,20,35,208,226,100,
+150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,1,0,206,26,36,35,208,226,
+100,150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,65,0,206,26,52,35,208,
+226,100,150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,65,0,206,26,68,35,
+208,226,100,150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,65,0,206,26,84,
+35,208,226,100,150,211,201,29,162,44,140,35,103,0,0,0,0,0,0,0,129,0,195,
+154,99,16,38,36,0,251,68,117,179,216,162,128,68,72,1,241,13,158,197,20,150,
+25,18,0,125,162,58,217,232,235,117,100,162,136,25,18,0,125,162,58,217,232,
+235,116,36,162,145,2,226,64,15,136,108,244,117,186,178,81,73,129,113,32,7,
+196,54,122,58,221,9,40,165,64,200,144,3,237,17,214,207,79,75,171,37,20,80,
+200,144,3,237,17,214,207,79,75,161,37,20,138,23,18,0,124,67,103,167,165,
+213,146,138,77,11,137,0,62,33,179,211,210,232,73,69,42,133,196,128,31,10,
+183,2,125,89,40,163,5,196,128,31,10,183,2,125,9,40,164,96,200,144,3,224,
+221,64,172,157,89,40,163,134,68,128,31,6,234,5,100,232,73,69,35,133,68,128,
+31,104,142,182,125,89,40,180,0,168,144,3,237,17,214,207,161,37,22,144,19,
+18,0,124,67,103,213,146,139,80,9,137,0,62,33,179,232,73,69,172,5,90,40,153,
+59,68,117,179,216,166,192,77,162,137,147,136,108,246,41,180,176,219,69,19,
+39,104,142,182,122,58,221,89,41,178,6,218,40,153,59,68,117,179,209,214,232,
+73,77,162,6,90,40,153,56,134,207,71,91,171,37,54,152,25,104,162,100,226,27,
+61,29,110,132,148,218,160,109,162,137,147,180,71,91,61,61,46,172,148,217,
+67,109,20,76,157,162,58,217,233,233,116,36,166,209,67,45,20,76,156,67,103,
+167,165,213,146,155,77,12,180,81,50,113,13,158,158,151,66,74,109,84,50,209,
+68,201,194,173,192,159,86,74,108,193,150,138,38,78,21,110,4,250,18,83,104,
+193,182,138,38,78,13,212,10,201,213,146,155,56,109,162,137,147,131,117,2,
+178,116,36,166,209,194,237,20,76,157,162,58,217,245,100,167,16,2,237,20,76,
+157,162,58,217,244,36,167,18,2,173,20,76,156,67,103,213,146,156,80,10,180,
+81,50,113,13,159,66,74,113,97,175,221,48,216,110,64,4,42,22,189,179,0,196,
+133,0,185,80,32,28,78,99,193,18,80,36,4,19,159,141,172,0,178,90,4,74,73,0,
+22,209,68,201,187,129,4,2,8,3,132,64,60,36,6,149,113,72,176,171,240,84,0,
+157,91,116,116,32,11,42,218,221,216,181,129,32,3,234,219,165,3,188,231,235,
+249,8,187,152,252,47,86,227,105,18,7,244,17,91,42,56,175,185,248,110,173,
+198,209,208,36,0,238,82,97,87,188,189,179,240,93,122,32,12,22,162,42,125,
+144,132,160,7,236,161,25,232,237,105,64,205,59,127,102,158,160,230,63,11,
+217,66,51,210,129,154,118,254,205,61,65,236,127,171,197,34,168,48,6,90,194,
+1,0,39,75,88,72,8,9,33,186,194,80,64,76,13,214,19,2,130,96,110,150,189,0,
+65,6,51,214,20,128,65,17,11,214,19,130,137,121,211,210,211,144,6,39,75,88,
+80,0,201,119,235,10,8,41,86,231,71,88,80,129,79,135,186,122,133,224,34,25,
+69,234,80,3,91,141,172,40,96,139,113,180,181,133,36,21,110,54,142,134,176,
+165,1,176,23,213,47,0,216,134,234,215,128,111,117,181,232,128,209,3,70,230,
+107,64,5,139,168,209,235,10,32,36,144,102,235,136,3,146,27,172,40,160,146,
+132,103,172,40,192,115,3,117,133,28,22,113,163,69,172,41,103,1,66,188,17,
+145,52,168,4,202,113,67,76,130,227,76,194,13,240,108,0,0,83,224,0,2,193,0,
+104,146,84,97,48,0,1,94,192,56,169,24,145,179,192,0,5,112,8,56,16,32,128,
+56,18,52,125,230,86,147,190,140,28,50,21,13,39,31,23,60,145,158,57,12,141,
+47,129,6,155,194,188,24,49,39,199,89,188,124,92,242,70,120,224,201,33,69,
+15,155,163,201,68,14,49,39,199,197,211,116,240,242,113,197,232,18,180,254,
+36,3,17,46,18,243,35,100,128,172,156,178,70,163,154,76,34,248,146,164,108,
+248,75,204,141,146,28,217,115,137,27,95,27,241,173,236,162,160,224,200,2,
+206,9,113,13,148,192,209,18,22,164,146,37,193,57,162,4,249,39,196,128,24,2,
+178,66,213,136,68,201,16,77,209,131,31,192,242,88,96,92,191,151,34,100,136,
+38,232,255,252,92,221,199,197,12,68,209,82,66,212,11,155,185,41,197,13,55,
+38,3,66,213,47,135,254,72,12,162,99,133,116,112,0,1,72,66,14,16,16,50,37,
+202,160,150,154,66,14,20,8,57,192,28,24,80,113,50,113,100,105,166,120,248,
+0,0,179,1,65,196,201,199,20,178,36,227,224,0,2,208,54,113,240,0,1,100,11,
+181,192,0,5,178,1,18,160,65,24,131,20,145,25,188,48,132,122,28,76,146,218,
+121,35,180,69,145,132,108,224,0,0,0,0,0,0,120,31,153,188,56,132,122,28,76,
+146,218,121,35,180,69,145,132,108,224,0,0,0,0,0,0,120,31,168,160,45,110,23,
+30,176,33,184,0,0,183,32,29,235,2,27,199,23,0,0,23,4,51,120,129,8,244,56,
+153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,240,63,51,120,145,8,244,
+56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,0,64,51,120,161,8,
+244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,0,64,51,120,177,
+8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,120,
+193,8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,51,
+120,209,8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,16,64,
+51,120,225,8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,0,0,0,32,
+64,32,227,194,0,97,57,162,4,246,104,5,34,92,35,68,225,161,166,220,16,16,
+137,112,52,41,73,29,185,1,65,196,201,197,145,166,153,246,72,3,137,204,120,
+34,74,8,199,1,67,17,162,112,201,84,128,97,144,78,25,42,16,131,169,1,205,66,
+8,35,68,225,161,166,239,128,0,10,192,64,196,104,156,50,96,0,2,172,73,240,
+117,96,57,170,97,4,104,156,52,52,221,240,0,1,82,1,74,9,129,125,240,0,1,82,
+32,148,25,174,137,58,23,51,190,0,0,42,69,64,195,32,156,50,96,0,2,160,81,
+238,2,3,107,173,218,3,192,
};
#elif defined(DUK_USE_DOUBLE_BE)
-DUK_INTERNAL const duk_uint8_t duk_builtins_data[4251] = {
-144,148,105,225,32,68,52,228,126,12,104,201,37,132,52,167,194,138,105,244,
-124,57,28,211,57,18,64,52,238,254,44,138,111,171,241,164,19,87,137,30,33,
-167,18,145,159,8,211,137,9,225,42,5,240,145,139,163,163,8,211,137,10,228,
-64,211,19,132,140,93,29,56,70,156,72,119,34,66,146,36,104,137,194,70,46,
-142,172,35,78,36,47,146,195,102,11,240,145,139,163,175,8,211,137,9,228,240,
-242,112,145,139,163,179,8,211,137,8,237,34,130,118,49,116,118,225,26,48,0,
-1,94,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
-33,8,66,26,180,41,97,167,64,150,34,33,154,112,0,1,87,247,35,79,103,237,198,
-174,216,47,31,23,95,17,13,31,217,96,211,49,50,53,212,77,141,24,0,0,179,10,
-228,240,242,15,128,140,65,128,134,188,0,0,89,167,97,181,224,0,2,205,62,53,
-224,0,2,205,66,237,120,0,0,179,81,204,107,192,0,5,154,150,67,94,0,0,44,212,
-245,90,240,0,1,102,169,162,215,128,0,11,53,93,150,188,0,0,89,171,111,53,
-108,150,163,70,0,0,42,2,249,50,94,124,35,68,225,146,49,13,24,0,0,165,161,
-124,153,47,62,12,130,112,201,24,132,56,97,115,16,31,254,0,0,0,0,0,0,51,48,
-31,252,0,0,0,0,0,0,50,241,32,26,193,55,132,112,161,156,72,135,26,41,200,
-140,114,163,156,201,7,56,79,9,80,47,132,140,93,19,160,43,145,3,76,78,18,49,
-116,78,144,238,68,133,36,72,209,19,132,140,93,19,168,47,146,195,102,11,240,
-145,139,162,117,132,242,120,121,56,72,197,209,59,2,59,72,160,157,140,93,19,
-181,36,242,50,143,36,31,131,162,166,7,144,238,133,227,226,235,224,242,161,
-249,18,21,100,20,207,44,199,151,180,122,89,135,152,154,121,153,199,156,158,
-121,218,7,158,162,121,250,71,160,166,122,26,135,162,170,122,58,199,164,16,
-240,70,68,226,27,51,199,138,120,35,34,112,171,112,38,121,1,124,153,47,62,
-17,162,112,201,19,211,11,228,201,121,240,100,19,134,72,158,160,91,201,18,
-186,44,3,68,79,122,168,151,115,165,40,21,18,227,65,198,231,200,8,68,184,84,
-53,19,38,120,128,145,144,78,25,59,72,163,48,64,144,200,39,12,157,164,80,46,
-185,143,115,72,217,230,72,9,35,68,225,147,180,138,51,68,9,17,162,112,201,
-218,69,2,235,152,247,52,141,158,108,128,98,72,64,121,51,132,4,81,164,144,
-128,242,104,136,0,16,92,38,14,49,39,199,197,211,116,240,242,113,197,231,18,
-53,189,116,65,131,18,124,117,155,199,197,207,36,103,142,12,146,20,80,249,
-186,60,116,4,204,73,241,214,111,31,23,60,145,158,56,208,48,146,229,146,3,2,
-82,65,155,195,94,3,10,36,4,201,196,64,56,100,42,26,78,62,46,121,35,60,113,
-152,16,25,10,134,147,143,139,158,72,205,4,151,21,0,73,16,11,230,144,12,88,
-144,153,39,52,144,69,241,37,72,217,240,151,153,27,36,57,178,230,16,16,137,
-114,68,2,200,62,81,1,8,151,11,23,100,141,229,18,6,34,92,37,230,70,201,1,89,
-57,36,2,40,152,151,44,129,83,18,124,117,155,199,197,207,36,103,142,75,12,
-11,151,46,89,40,18,37,200,64,12,154,236,252,238,185,23,95,213,1,132,234,0,
-194,245,128,14,56,37,199,89,188,124,92,242,70,120,232,16,26,137,113,241,
-116,221,60,60,156,113,122,36,10,62,46,121,35,60,113,18,225,27,70,18,32,10,
-201,211,32,67,107,104,100,42,26,78,24,147,153,35,181,181,207,64,67,107,104,
-100,42,26,78,72,147,153,35,181,181,207,68,16,218,218,91,156,170,63,134,36,
-230,72,237,109,116,136,16,218,218,91,156,170,63,146,36,230,72,237,109,116,
-137,16,96,128,228,2,6,191,46,3,71,147,68,4,16,22,188,169,240,16,40,104,242,
-135,198,171,44,68,65,5,217,231,215,6,231,62,188,8,49,1,3,162,92,4,98,12,41,
-7,33,148,53,242,128,97,32,130,3,9,205,16,38,199,198,14,9,0,111,115,225,0,8,
-250,72,240,207,128,241,37,73,25,18,40,0,178,58,11,56,192,2,201,104,17,35,
-160,9,39,70,114,8,6,147,214,129,18,74,240,30,141,145,208,89,203,62,3,161,
-163,37,248,226,185,244,11,88,37,62,33,163,37,248,226,185,252,0,127,255,130,
-146,164,142,32,26,1,36,230,18,1,164,7,43,163,194,0,71,128,105,64,216,7,192,
-52,192,197,66,230,72,192,52,224,209,32,232,34,68,62,129,113,32,232,34,114,
-40,49,231,16,254,0,63,255,208,99,2,140,44,92,206,8,224,143,4,225,147,210,
-124,13,44,92,206,9,195,39,30,228,54,126,163,225,200,169,198,133,42,166,191,
-246,3,11,251,0,24,71,4,120,9,251,8,10,17,193,30,9,195,39,1,63,105,1,98,112,
-201,199,185,13,159,1,63,105,32,48,156,209,2,126,227,224,58,26,50,95,142,47,
-192,208,22,176,74,124,67,70,75,241,197,248,26,64,213,184,64,89,56,39,49,
-224,137,62,36,2,176,19,17,254,68,3,196,143,88,4,79,162,0,210,32,34,35,253,
-72,5,146,208,34,125,144,5,147,214,137,253,208,9,149,3,41,197,13,55,233,0,
-185,187,139,117,137,30,8,18,39,172,1,25,187,139,112,128,178,113,110,177,35,
-193,2,68,245,128,23,55,114,143,121,35,193,2,68,245,130,8,205,220,91,132,5,
-147,148,123,201,30,8,18,39,172,16,18,113,67,63,128,3,68,143,32,39,243,32,
-42,83,4,103,46,89,19,63,224,208,16,70,142,92,178,38,127,193,164,8,67,68,
-186,12,146,247,154,1,165,64,202,113,252,160,131,32,7,35,167,26,50,235,231,
-130,48,179,192,65,148,69,19,214,2,251,85,2,232,72,15,253,255,255,255,255,
-255,255,226,122,196,55,106,160,93,9,0,0,0,0,0,0,0,0,7,49,1,255,224,0,0,0,0,
-0,0,143,94,233,34,104,169,54,144,210,161,168,158,32,63,248,0,0,0,0,0,0,17,
-235,72,96,77,21,38,210,26,84,53,19,196,15,255,0,0,0,0,0,0,0,253,35,228,133,
-185,176,15,44,0,0,0,0,0,0,8,117,128,190,212,128,82,109,33,179,33,137,24,8,
-103,255,255,255,255,255,255,228,58,196,55,106,64,41,54,144,217,144,196,140,
-12,51,255,255,255,255,255,255,241,15,4,100,78,33,179,60,120,167,130,50,39,
-10,183,2,103,144,113,8,151,10,134,162,100,221,16,18,137,113,13,153,12,72,
-238,137,1,81,46,52,28,110,232,148,53,18,228,128,82,113,13,153,12,72,238,
-137,142,73,78,52,0,0,0,0,0,0,0,0,8,58,254,1,12,38,248,134,23,130,0,60,221,
-194,162,228,30,244,128,217,187,132,187,220,210,54,104,2,247,132,5,205,220,
-124,72,36,73,14,110,252,132,25,128,193,94,8,200,149,200,3,237,38,43,31,192,
-54,186,213,128,57,45,56,210,31,254,0,0,0,0,0,0,49,90,251,224,6,77,220,24,
-38,78,74,113,67,77,124,16,50,110,228,208,194,114,83,138,26,107,224,172,37,
-240,97,41,187,139,112,128,178,112,96,153,57,41,197,13,53,240,113,41,187,
-139,112,128,178,114,104,97,57,41,197,13,53,240,128,195,95,8,44,61,240,132,
-216,93,33,133,192,128,14,98,79,147,67,9,129,0,44,196,159,11,69,175,152,32,
-35,100,33,135,24,147,237,38,34,246,139,95,48,64,70,200,68,8,49,39,198,57,
-179,61,144,138,22,98,79,180,152,153,215,54,103,178,17,129,204,73,240,96,
-153,44,132,112,163,18,125,164,196,62,130,100,178,18,1,140,73,240,96,197,
-144,146,18,98,79,180,152,135,208,98,200,74,8,49,39,195,186,145,149,144,150,
-22,98,79,180,152,143,215,82,50,178,19,2,140,73,241,136,109,38,73,89,9,161,
-166,36,251,73,137,157,67,105,50,74,200,78,10,49,39,201,16,78,104,229,100,
-39,134,152,147,237,38,41,116,130,115,71,43,33,64,60,196,159,24,133,173,18,
-32,156,209,202,200,81,18,49,39,218,76,76,234,22,180,72,130,115,71,43,33,72,
-68,196,159,38,134,19,46,105,56,226,150,68,157,160,1,228,73,242,104,97,46,
-16,31,34,79,140,66,214,137,16,78,104,229,108,169,137,72,147,237,38,38,117,
-11,90,36,65,57,163,149,178,168,21,34,79,146,32,156,209,202,218,250,161,178,
-36,251,73,138,93,32,156,209,202,218,250,193,82,36,248,196,54,147,36,173,
-191,174,27,34,79,180,152,153,212,54,147,36,173,191,176,17,34,79,135,117,35,
-43,115,236,133,200,147,237,38,35,245,212,140,173,207,180,15,34,79,131,4,
-201,108,173,133,72,147,237,38,33,244,19,37,178,184,17,34,79,140,115,102,
-123,107,238,133,200,147,237,38,38,117,205,153,237,175,188,23,34,79,133,162,
-215,204,16,17,182,254,248,116,137,62,210,98,47,104,181,243,4,4,109,191,192,
-131,152,147,230,8,8,217,12,16,60,137,62,96,128,141,178,193,181,55,136,200,
-51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,32,98,115,249,73,117,
-243,249,67,21,159,202,38,47,63,148,86,8,75,144,94,50,1,38,73,79,204,67,95,
-231,1,6,128,14,79,129,185,40,249,18,149,181,207,142,199,155,172,248,172,89,
-183,207,140,198,137,175,200,0,159,72,10,5,21,220,138,120,74,129,124,36,98,
-232,228,74,81,62,160,20,10,107,185,21,114,32,105,137,194,70,46,142,68,165,
-19,235,1,64,170,187,145,119,34,66,146,36,104,137,194,70,46,142,68,165,19,
-236,1,64,174,187,145,95,37,134,204,23,225,35,23,71,34,82,137,246,128,160,
-89,93,200,167,147,195,201,194,70,46,142,68,165,19,238,1,64,182,187,145,71,
-105,20,19,177,139,163,145,41,68,16,7,6,15,82,70,72,115,96,32,105,246,0,0,0,
-0,0,91,60,165,195,201,194,8,134,149,216,130,0,192,41,224,136,2,48,176,228,
-1,149,13,195,15,0,200,209,97,71,128,99,32,176,131,192,113,57,143,0,167,131,
-32,230,80,28,202,139,175,237,2,48,189,160,20,1,119,48,87,193,186,129,89,56,
-72,197,209,200,193,185,35,23,71,109,13,219,36,98,232,237,156,13,26,208,211,
-14,102,19,87,137,91,95,128,0,10,64,24,92,0,0,82,2,53,63,240,49,204,202,10,
-14,38,78,44,141,52,207,31,0,0,22,32,129,100,180,8,148,145,78,102,152,80,
-113,50,113,100,105,166,120,248,0,0,177,1,65,196,201,199,20,178,36,227,224,
-0,2,200,3,6,133,41,35,31,0,0,22,1,44,57,137,62,33,179,216,162,152,192,131,
-18,124,162,27,61,138,41,108,32,196,159,16,217,232,235,81,76,104,73,137,62,
-81,13,158,142,181,20,184,16,98,79,136,108,244,244,168,166,56,36,196,159,40,
-134,207,79,74,138,93,10,49,39,194,173,192,158,158,149,20,188,20,98,79,133,
-91,129,61,109,74,41,124,30,68,159,16,217,236,83,108,96,68,137,62,81,13,158,
-197,54,182,17,34,79,136,108,244,117,169,182,52,38,68,159,40,134,207,71,90,
-155,92,8,145,39,196,54,122,122,84,219,28,19,34,79,148,67,103,167,165,77,
-174,133,72,147,225,86,224,79,79,74,155,94,10,145,39,194,173,192,158,182,
-165,54,190,206,25,212,35,208,226,100,150,211,201,29,162,44,140,35,103,0,
-255,192,0,0,0,0,0,0,206,25,228,35,208,226,100,150,211,201,29,162,44,140,35,
-103,0,255,192,0,0,0,0,0,0,206,25,244,35,208,226,100,150,211,201,29,162,44,
-140,35,103,0,255,192,0,0,0,0,0,0,206,26,4,35,208,226,100,150,211,201,29,
-162,44,140,35,103,1,0,0,0,0,0,0,0,0,206,26,20,35,208,226,100,150,211,201,
-29,162,44,140,35,103,1,0,0,0,0,0,0,0,0,206,26,36,35,208,226,100,150,211,
-201,29,162,44,140,35,103,1,0,64,0,0,0,0,0,0,206,26,52,35,208,226,100,150,
-211,201,29,162,44,140,35,103,1,0,64,0,0,0,0,0,0,206,26,68,35,208,226,100,
-150,211,201,29,162,44,140,35,103,1,0,64,0,0,0,0,0,0,206,26,84,35,208,226,
-100,150,211,201,29,162,44,140,35,103,1,0,128,0,0,0,0,0,0,195,154,99,16,38,
-36,0,251,68,117,179,216,162,128,68,72,1,241,13,158,197,20,150,25,18,0,125,
-162,58,217,232,235,117,100,162,136,25,18,0,125,162,58,217,232,235,116,36,
-162,145,2,226,64,15,136,108,244,117,186,178,81,73,129,113,32,7,196,54,122,
-58,221,9,40,165,64,200,144,3,237,17,214,207,79,75,171,37,20,80,200,144,3,
-237,17,214,207,79,75,161,37,20,138,23,18,0,124,67,103,167,165,213,146,138,
-77,11,137,0,62,33,179,211,210,232,73,69,42,133,196,128,31,10,183,2,125,89,
-40,163,5,196,128,31,10,183,2,125,9,40,164,96,200,144,3,224,221,64,172,157,
-89,40,163,134,68,128,31,6,234,5,100,232,73,69,35,133,68,128,31,104,142,182,
-125,89,40,180,0,168,144,3,237,17,214,207,161,37,22,144,19,18,0,124,67,103,
-213,146,139,80,9,137,0,62,33,179,232,73,69,172,5,90,40,153,59,68,117,179,
-216,166,192,77,162,137,147,136,108,246,41,180,176,219,69,19,39,104,142,182,
-122,58,221,89,41,178,6,218,40,153,59,68,117,179,209,214,232,73,77,162,6,90,
-40,153,56,134,207,71,91,171,37,54,152,25,104,162,100,226,27,61,29,110,132,
-148,218,160,109,162,137,147,180,71,91,61,61,46,172,148,217,67,109,20,76,
-157,162,58,217,233,233,116,36,166,209,67,45,20,76,156,67,103,167,165,213,
-146,155,77,12,180,81,50,113,13,158,158,151,66,74,109,84,50,209,68,201,194,
-173,192,159,86,74,108,193,150,138,38,78,21,110,4,250,18,83,104,193,182,138,
-38,78,13,212,10,201,213,146,155,56,109,162,137,147,131,117,2,178,116,36,
-166,209,194,237,20,76,157,162,58,217,245,100,167,16,2,237,20,76,157,162,58,
-217,244,36,167,18,2,173,20,76,156,67,103,213,146,156,80,10,180,81,50,113,
-13,159,66,74,113,97,175,220,48,216,109,192,4,42,22,189,163,0,196,133,0,185,
-80,32,28,78,99,193,18,80,36,4,19,159,141,156,0,178,90,4,74,73,0,22,209,68,
-201,185,129,4,2,8,3,132,64,60,36,4,0,91,240,168,177,69,118,144,157,91,116,
-116,32,32,1,53,216,221,218,170,139,3,234,219,165,0,255,152,185,11,251,232,
-231,188,47,86,227,105,18,1,255,184,170,59,41,92,23,240,110,173,198,209,208,
-36,3,253,188,183,177,82,110,80,224,93,122,32,32,4,144,253,170,34,22,140,7,
-236,161,25,232,237,105,64,63,230,160,158,102,127,59,205,11,217,66,51,210,
-128,127,237,65,60,204,254,119,155,171,197,34,168,48,6,90,162,1,0,39,75,84,
-72,8,9,33,186,162,80,64,76,13,213,19,2,130,96,110,150,181,0,65,6,51,213,20,
-128,65,17,11,213,19,130,137,121,211,210,210,144,6,39,75,84,80,0,201,119,
-234,138,8,41,86,231,71,84,80,129,79,135,186,122,101,224,34,25,69,233,208,3,
-91,141,170,40,96,139,113,180,181,69,36,21,110,54,142,134,168,165,1,176,23,
-212,47,0,216,134,234,87,128,111,117,181,168,128,209,3,70,230,106,192,5,139,
-168,209,234,138,32,36,144,102,235,8,3,146,27,170,40,160,146,132,103,170,40,
-192,115,3,117,69,28,22,113,163,69,170,41,103,1,66,188,17,145,52,104,4,202,
-113,67,76,130,227,72,194,13,240,108,0,0,83,96,0,2,185,0,104,146,84,97,48,0,
-1,90,192,56,169,24,145,179,192,0,5,96,8,56,16,32,128,56,18,52,125,198,86,
-147,186,140,28,50,21,13,39,31,23,60,145,158,56,204,141,47,121,6,155,190,
-188,24,49,39,199,89,188,124,92,242,70,120,224,201,33,69,15,155,163,199,68,
-14,49,39,199,197,211,116,240,242,113,197,231,18,180,254,4,3,17,46,18,243,
-35,100,128,172,156,146,70,163,150,76,34,248,146,164,108,248,75,204,141,146,
-28,217,115,9,27,79,11,241,173,235,162,160,224,200,2,206,9,113,13,148,192,
-209,18,22,164,146,37,193,57,162,4,249,39,196,128,24,2,178,66,213,136,68,
-201,16,77,209,131,31,192,242,88,96,92,191,151,34,100,136,38,232,255,252,92,
-221,199,197,12,68,209,82,66,212,11,155,185,41,197,13,55,38,3,66,213,47,131,
-250,72,12,162,99,133,116,127,196,32,225,1,3,34,92,170,9,105,164,32,225,64,
-131,156,1,193,133,7,19,39,22,70,154,103,143,128,0,11,16,20,28,76,156,113,
-75,34,78,62,0,0,44,128,48,104,82,146,49,240,0,1,96,11,180,192,0,5,162,1,18,
-160,65,24,131,20,145,25,188,48,132,122,28,76,146,218,121,35,180,69,145,132,
-108,224,31,248,0,0,0,0,0,0,25,188,56,132,122,28,76,146,218,121,35,180,69,
-145,132,108,224,31,248,0,0,0,0,0,0,40,160,45,110,23,30,176,33,184,0,0,181,
-32,29,235,2,27,199,23,0,0,22,196,51,120,129,8,244,56,153,37,180,242,71,104,
-139,35,8,217,192,63,240,0,0,0,0,0,0,51,120,145,8,244,56,153,37,180,242,71,
-104,139,35,8,217,192,64,0,0,0,0,0,0,0,51,120,161,8,244,56,153,37,180,242,
-71,104,139,35,8,217,192,64,0,0,0,0,0,0,0,51,120,177,8,244,56,153,37,180,
-242,71,104,139,35,8,217,192,64,16,0,0,0,0,0,0,51,120,193,8,244,56,153,37,
-180,242,71,104,139,35,8,217,192,64,16,0,0,0,0,0,0,51,120,209,8,244,56,153,
-37,180,242,71,104,139,35,8,217,192,64,16,0,0,0,0,0,0,51,120,225,8,244,56,
-153,37,180,242,71,104,139,35,8,217,192,64,32,0,0,0,0,0,0,32,227,194,0,97,
-57,162,4,246,40,5,34,92,35,68,225,161,166,219,16,16,137,112,52,41,73,29,
-169,1,65,196,201,197,145,166,153,246,8,3,137,204,120,34,74,8,200,58,128,28,
-211,160,130,52,78,26,26,110,248,0,0,170,4,12,70,137,195,38,0,0,42,68,159,7,
-84,3,154,150,16,70,137,195,67,77,223,0,0,20,224,20,160,152,23,223,0,0,20,
-226,9,65,154,232,147,161,115,59,224,0,2,156,84,12,50,9,195,38,0,0,41,133,
-30,224,32,54,186,221,128,60,
+DUK_INTERNAL const duk_uint8_t duk_builtins_data[4281] = {
+144,148,105,226,32,68,52,228,254,12,104,202,37,132,52,167,194,138,105,245,
+124,57,28,211,57,18,64,52,239,126,44,138,111,175,241,164,19,87,145,30,33,
+167,22,145,159,8,211,139,9,225,42,5,240,145,139,163,163,8,211,139,10,228,
+64,211,19,132,140,93,29,56,70,156,88,119,34,66,146,36,104,137,194,70,46,
+142,172,35,78,44,47,146,195,102,11,240,145,139,163,175,8,211,139,9,228,240,
+242,112,145,139,163,179,8,211,139,8,237,34,130,118,49,116,118,225,26,48,0,
+1,98,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
+33,8,66,26,180,105,97,167,68,150,34,33,154,112,0,1,91,247,35,79,111,237,
+198,174,232,47,31,23,95,17,13,31,249,96,211,49,50,53,214,77,141,24,0,0,181,
+10,228,240,242,15,128,140,65,128,134,188,0,0,90,167,97,181,224,0,2,213,62,
+53,224,0,2,213,66,237,120,0,0,181,81,204,107,192,0,5,170,150,67,94,0,0,45,
+84,245,90,240,0,1,106,169,162,215,128,0,11,85,93,150,188,0,0,90,171,111,53,
+109,22,162,26,48,0,1,84,23,201,146,243,225,26,39,12,145,136,104,192,0,5,61,
+11,228,201,121,240,100,19,134,72,196,33,195,14,40,203,112,64,190,76,232,
+145,153,136,15,255,0,0,0,0,0,0,25,152,15,254,0,0,0,0,0,0,25,120,144,13,96,
+155,194,56,80,206,36,67,141,20,228,70,57,81,206,100,131,156,39,132,168,23,
+194,70,46,137,208,21,200,129,166,39,9,24,186,39,72,119,34,66,146,36,104,
+137,194,70,46,137,212,23,201,97,179,5,248,72,197,209,58,194,121,60,60,156,
+36,98,232,157,129,29,164,80,78,198,46,137,218,146,121,25,71,146,9,209,5,
+209,61,48,126,14,138,152,30,67,186,23,143,139,175,131,202,135,228,72,85,
+144,83,60,179,30,94,209,233,102,30,98,105,230,103,30,114,121,231,104,30,
+122,137,231,233,30,130,153,232,106,30,138,169,232,235,30,144,67,193,25,19,
+136,108,207,30,41,224,140,137,194,173,192,153,228,5,242,100,188,248,70,137,
+195,36,79,78,47,147,37,231,193,144,78,25,34,122,145,111,36,74,232,176,13,
+17,61,234,226,93,207,148,160,84,75,141,7,27,161,32,33,18,225,80,212,76,154,
+2,2,70,65,56,100,237,34,140,209,2,67,32,156,50,118,145,64,186,230,61,205,
+35,103,155,32,36,141,19,134,78,210,40,206,16,36,70,137,195,39,105,20,11,
+174,99,220,210,54,121,210,1,137,33,1,228,207,16,17,70,146,66,3,201,164,32,
+0,65,112,152,56,196,159,31,23,77,211,195,201,199,23,160,72,214,246,81,6,12,
+73,241,214,111,31,23,60,145,158,56,50,72,81,67,230,232,242,80,19,49,39,199,
+89,188,124,92,242,70,120,227,64,194,75,154,72,12,9,73,6,111,21,120,12,40,
+144,19,39,25,0,225,144,168,105,56,248,185,228,140,241,200,96,64,100,42,26,
+78,62,46,121,35,52,18,92,116,1,36,64,47,158,64,49,98,66,100,156,242,65,23,
+196,149,35,103,194,94,100,108,144,230,203,156,64,66,37,201,16,11,32,249,
+132,4,34,92,44,93,146,55,152,72,24,137,112,151,153,27,36,5,100,229,144,8,
+162,98,92,210,5,76,73,241,214,111,31,23,60,145,158,57,44,48,46,92,185,164,
+160,72,151,41,0,50,107,179,244,59,36,93,127,92,6,19,172,3,11,216,0,56,224,
+151,29,102,241,241,115,201,25,227,164,64,106,37,199,197,211,116,240,242,
+113,197,233,144,40,248,185,228,140,241,196,75,132,109,24,72,128,43,39,84,
+129,13,173,161,144,168,105,56,98,78,100,142,214,215,69,1,13,173,161,144,
+168,105,57,34,78,100,142,214,215,69,16,67,107,105,110,114,168,254,24,147,
+153,35,181,181,212,32,67,107,105,110,114,168,254,72,147,153,35,181,181,212,
+36,65,130,3,144,8,26,252,200,13,30,85,16,16,64,90,242,231,192,64,161,163,
+203,31,26,172,193,17,4,23,105,159,96,27,172,251,16,32,196,4,14,137,112,17,
+136,48,164,28,134,80,215,202,1,132,130,8,12,39,52,64,155,31,24,56,36,1,189,
+207,132,0,35,233,35,195,62,3,196,149,36,100,72,160,2,200,232,44,227,0,11,
+37,160,68,142,128,36,157,25,200,32,26,79,90,4,73,43,192,122,54,71,65,103,
+44,248,14,134,140,151,227,138,231,208,45,96,148,248,134,140,151,227,138,
+231,240,1,255,254,10,74,146,56,128,104,4,147,152,72,6,144,28,174,143,8,1,
+30,1,165,3,96,31,0,211,3,21,11,153,35,0,211,131,68,131,160,137,16,250,5,
+196,131,160,137,200,160,199,156,67,248,0,255,255,65,140,10,48,177,115,56,
+35,130,60,19,134,79,89,240,52,177,115,56,39,12,156,123,144,217,251,15,135,
+34,167,30,20,170,154,255,232,12,47,244,0,97,28,17,224,39,238,32,40,71,4,
+120,39,12,156,4,253,228,5,137,195,39,30,228,54,124,4,253,228,128,194,115,
+68,9,252,15,128,232,104,201,126,56,191,35,64,90,193,41,241,13,25,47,199,23,
+228,105,3,86,225,1,100,224,156,199,130,36,249,144,10,192,76,71,250,16,15,
+18,61,96,17,62,200,3,72,128,136,143,247,32,22,75,64,137,248,64,22,79,90,39,
+249,64,38,84,12,167,20,52,223,196,2,230,238,45,214,36,120,32,72,158,208,4,
+102,238,45,194,2,201,197,186,196,143,4,9,19,218,0,92,221,202,61,228,143,4,
+9,19,218,8,35,55,113,110,16,22,78,81,239,36,120,32,72,158,208,64,73,197,12,
+255,0,13,18,60,128,159,212,128,169,76,17,156,185,100,76,255,163,64,65,26,
+57,114,200,153,255,70,144,33,13,18,232,50,75,226,104,6,149,3,41,199,246,
+130,12,128,28,142,156,120,203,175,158,8,194,207,1,6,81,20,79,88,11,237,84,
+11,161,32,63,247,255,255,255,255,255,255,137,235,16,221,170,129,116,36,0,0,
+0,0,0,0,0,0,28,196,7,255,128,0,0,0,0,0,2,61,123,164,137,162,164,218,67,74,
+134,162,120,128,255,224,0,0,0,0,0,0,71,173,33,129,52,84,155,72,105,80,212,
+79,16,63,252,0,0,0,0,0,0,3,244,143,146,22,230,192,60,176,0,0,0,0,0,0,33,
+214,2,251,82,1,73,180,134,204,134,36,96,33,159,255,255,255,255,255,255,144,
+235,16,221,169,0,164,218,67,102,67,18,48,48,207,255,255,255,255,255,255,
+196,60,17,145,56,134,204,241,226,158,8,200,156,42,220,9,158,65,196,34,92,
+42,26,137,147,120,64,74,37,196,54,100,49,35,188,36,5,68,184,208,113,187,
+194,80,212,75,146,1,73,196,54,100,49,35,188,38,57,37,56,240,0,0,0,0,0,0,0,
+0,32,235,248,68,48,156,2,24,94,24,0,243,119,10,139,144,123,242,3,102,238,
+18,239,115,72,217,160,11,223,16,23,55,113,241,32,145,36,57,188,18,16,102,3,
+5,120,35,34,89,32,15,180,152,173,127,0,218,235,88,0,228,180,227,200,127,
+248,0,0,0,0,0,0,197,107,240,64,6,77,220,24,38,78,74,113,67,77,130,4,12,155,
+185,52,48,156,148,226,134,155,4,10,194,96,129,132,166,238,45,194,2,201,193,
+130,100,228,167,20,52,216,32,113,41,187,139,112,128,178,114,104,97,57,41,
+197,13,54,8,32,48,216,32,130,195,224,130,19,97,124,134,23,6,0,57,137,62,77,
+12,38,12,0,179,18,124,45,22,190,96,128,141,176,134,28,98,79,180,152,139,
+218,45,124,193,1,27,97,16,32,196,159,24,230,204,246,194,40,89,137,62,210,
+98,103,92,217,158,216,70,7,49,39,193,130,100,182,17,194,140,73,246,147,16,
+250,9,146,216,72,6,49,39,193,131,22,194,72,73,137,62,210,98,31,65,139,97,
+40,32,196,159,14,234,70,86,194,88,89,137,62,210,98,63,93,72,202,216,76,10,
+49,39,198,33,180,153,37,108,38,134,152,147,237,38,38,117,13,164,201,43,97,
+56,40,196,159,36,65,57,163,149,176,158,26,98,79,180,152,165,210,9,205,28,
+173,133,0,243,18,124,98,22,180,72,130,115,71,43,97,68,72,196,159,105,49,51,
+168,90,209,34,9,205,28,173,133,33,19,18,124,154,24,76,185,164,227,138,89,
+18,119,0,7,145,39,201,161,132,188,64,124,137,62,49,11,90,36,65,57,163,149,
+210,166,37,34,79,180,152,153,212,45,104,145,4,230,142,87,74,160,84,137,62,
+72,130,115,71,43,171,234,134,200,147,237,38,41,116,130,115,71,43,171,235,5,
+72,147,227,16,218,76,146,186,254,184,108,137,62,210,98,103,80,218,76,146,
+186,254,192,68,137,62,29,212,140,174,207,178,23,34,79,180,152,143,215,82,
+50,187,62,208,60,137,62,12,19,37,210,182,21,34,79,180,152,135,208,76,151,
+74,224,68,137,62,49,205,153,238,175,186,23,34,79,180,152,153,215,54,103,
+186,190,240,92,137,62,22,139,95,48,64,70,235,251,225,210,36,251,73,136,189,
+162,215,204,16,17,186,255,2,14,98,79,152,32,35,108,48,64,242,36,249,130,2,
+55,75,6,212,224,72,200,51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,
+48,98,115,249,201,117,243,249,195,21,159,206,38,47,63,156,86,8,75,144,94,
+82,1,38,73,79,208,67,95,233,1,6,128,14,79,129,186,40,249,18,149,182,207,
+144,200,155,188,248,204,105,184,207,142,199,137,175,201,0,159,72,10,5,21,
+221,10,120,74,129,124,36,98,232,228,74,81,62,160,20,10,107,186,21,114,32,
+105,137,194,70,46,142,68,165,19,235,1,64,170,187,161,119,34,66,146,36,104,
+137,194,70,46,142,68,165,19,236,1,64,174,187,161,95,37,134,204,23,225,35,
+23,71,34,82,137,246,128,160,89,93,208,167,147,195,201,194,70,46,142,68,165,
+19,238,1,64,182,187,161,71,105,20,19,177,139,163,145,41,68,16,7,6,15,82,70,
+72,115,96,32,106,27,128,0,0,0,0,91,60,165,195,201,194,8,134,149,216,162,0,
+192,41,225,8,2,48,177,36,1,149,13,196,15,0,200,209,97,199,128,99,32,176,
+195,192,113,57,143,0,167,133,32,230,80,28,202,139,175,238,2,48,189,192,20,
+1,119,80,87,193,186,129,89,56,72,197,209,200,193,185,35,23,71,109,13,219,
+36,98,232,237,156,13,26,208,211,14,102,19,87,137,91,95,128,0,10,96,24,92,0,
+0,83,2,53,56,0,0,165,3,28,204,160,160,226,100,226,200,211,76,241,240,0,1,
+102,8,22,75,64,137,73,20,230,105,133,7,19,39,22,70,154,103,143,128,0,11,48,
+20,28,76,156,113,75,34,78,62,0,0,45,3,103,31,0,0,22,65,44,57,137,62,33,179,
+216,162,152,192,131,18,124,162,27,61,138,41,108,32,196,159,16,217,232,235,
+81,76,104,73,137,62,81,13,158,142,181,20,184,16,98,79,136,108,244,244,168,
+166,56,36,196,159,40,134,207,79,74,138,93,10,49,39,194,173,192,158,158,149,
+20,188,20,98,79,133,91,129,61,109,74,41,124,30,68,159,16,217,236,83,108,96,
+68,137,62,81,13,158,197,54,182,17,34,79,136,108,244,117,169,182,52,38,68,
+159,40,134,207,71,90,155,92,8,145,39,196,54,122,122,84,219,28,19,34,79,148,
+67,103,167,165,77,174,133,72,147,225,86,224,79,79,74,155,94,10,145,39,194,
+173,192,158,182,165,54,190,206,25,212,35,208,226,100,150,211,201,29,162,44,
+140,35,103,0,255,192,0,0,0,0,0,0,206,25,228,35,208,226,100,150,211,201,29,
+162,44,140,35,103,0,255,192,0,0,0,0,0,0,206,25,244,35,208,226,100,150,211,
+201,29,162,44,140,35,103,0,255,192,0,0,0,0,0,0,206,26,4,35,208,226,100,150,
+211,201,29,162,44,140,35,103,1,0,0,0,0,0,0,0,0,206,26,20,35,208,226,100,
+150,211,201,29,162,44,140,35,103,1,0,0,0,0,0,0,0,0,206,26,36,35,208,226,
+100,150,211,201,29,162,44,140,35,103,1,0,64,0,0,0,0,0,0,206,26,52,35,208,
+226,100,150,211,201,29,162,44,140,35,103,1,0,64,0,0,0,0,0,0,206,26,68,35,
+208,226,100,150,211,201,29,162,44,140,35,103,1,0,64,0,0,0,0,0,0,206,26,84,
+35,208,226,100,150,211,201,29,162,44,140,35,103,1,0,128,0,0,0,0,0,0,195,
+154,99,16,38,36,0,251,68,117,179,216,162,128,68,72,1,241,13,158,197,20,150,
+25,18,0,125,162,58,217,232,235,117,100,162,136,25,18,0,125,162,58,217,232,
+235,116,36,162,145,2,226,64,15,136,108,244,117,186,178,81,73,129,113,32,7,
+196,54,122,58,221,9,40,165,64,200,144,3,237,17,214,207,79,75,171,37,20,80,
+200,144,3,237,17,214,207,79,75,161,37,20,138,23,18,0,124,67,103,167,165,
+213,146,138,77,11,137,0,62,33,179,211,210,232,73,69,42,133,196,128,31,10,
+183,2,125,89,40,163,5,196,128,31,10,183,2,125,9,40,164,96,200,144,3,224,
+221,64,172,157,89,40,163,134,68,128,31,6,234,5,100,232,73,69,35,133,68,128,
+31,104,142,182,125,89,40,180,0,168,144,3,237,17,214,207,161,37,22,144,19,
+18,0,124,67,103,213,146,139,80,9,137,0,62,33,179,232,73,69,172,5,90,40,153,
+59,68,117,179,216,166,192,77,162,137,147,136,108,246,41,180,176,219,69,19,
+39,104,142,182,122,58,221,89,41,178,6,218,40,153,59,68,117,179,209,214,232,
+73,77,162,6,90,40,153,56,134,207,71,91,171,37,54,152,25,104,162,100,226,27,
+61,29,110,132,148,218,160,109,162,137,147,180,71,91,61,61,46,172,148,217,
+67,109,20,76,157,162,58,217,233,233,116,36,166,209,67,45,20,76,156,67,103,
+167,165,213,146,155,77,12,180,81,50,113,13,158,158,151,66,74,109,84,50,209,
+68,201,194,173,192,159,86,74,108,193,150,138,38,78,21,110,4,250,18,83,104,
+193,182,138,38,78,13,212,10,201,213,146,155,56,109,162,137,147,131,117,2,
+178,116,36,166,209,194,237,20,76,157,162,58,217,245,100,167,16,2,237,20,76,
+157,162,58,217,244,36,167,18,2,173,20,76,156,67,103,213,146,156,80,10,180,
+81,50,113,13,159,66,74,113,97,175,221,48,216,110,64,4,42,22,189,179,0,196,
+133,0,185,80,32,28,78,99,193,18,80,36,4,19,159,141,172,0,178,90,4,74,73,0,
+22,209,68,201,187,129,4,2,8,3,132,64,60,36,4,0,91,240,168,177,69,118,144,
+157,91,116,116,32,32,1,53,216,221,218,170,139,3,234,219,165,0,255,152,185,
+11,251,232,231,188,47,86,227,105,18,1,255,184,170,59,41,92,23,240,110,173,
+198,209,208,36,3,253,188,183,177,82,110,80,224,93,122,32,32,4,144,253,170,
+34,22,140,7,236,161,25,232,237,105,64,63,230,160,158,102,127,59,205,11,217,
+66,51,210,128,127,237,65,60,204,254,119,155,171,197,34,168,48,6,90,194,1,0,
+39,75,88,72,8,9,33,186,194,80,64,76,13,214,19,2,130,96,110,150,189,0,65,6,
+51,214,20,128,65,17,11,214,19,130,137,121,211,210,211,144,6,39,75,88,80,0,
+201,119,235,10,8,41,86,231,71,88,80,129,79,135,186,122,133,224,34,25,69,
+234,80,3,91,141,172,40,96,139,113,180,181,133,36,21,110,54,142,134,176,165,
+1,176,23,213,47,0,216,134,234,215,128,111,117,181,232,128,209,3,70,230,107,
+64,5,139,168,209,235,10,32,36,144,102,235,136,3,146,27,172,40,160,146,132,
+103,172,40,192,115,3,117,133,28,22,113,163,69,172,41,103,1,66,188,17,145,
+52,168,4,202,113,67,76,130,227,76,194,13,240,108,0,0,83,224,0,2,193,0,104,
+146,84,97,48,0,1,94,192,56,169,24,145,179,192,0,5,112,8,56,16,32,128,56,18,
+52,125,230,86,147,190,140,28,50,21,13,39,31,23,60,145,158,57,12,141,47,129,
+6,155,194,188,24,49,39,199,89,188,124,92,242,70,120,224,201,33,69,15,155,
+163,201,68,14,49,39,199,197,211,116,240,242,113,197,232,18,180,254,36,3,17,
+46,18,243,35,100,128,172,156,178,70,163,154,76,34,248,146,164,108,248,75,
+204,141,146,28,217,115,137,27,95,27,241,173,236,162,160,224,200,2,206,9,
+113,13,148,192,209,18,22,164,146,37,193,57,162,4,249,39,196,128,24,2,178,
+66,213,136,68,201,16,77,209,131,31,192,242,88,96,92,191,151,34,100,136,38,
+232,255,252,92,221,199,197,12,68,209,82,66,212,11,155,185,41,197,13,55,38,
+3,66,213,47,135,254,72,12,162,99,133,116,112,0,1,72,66,14,16,16,50,37,202,
+160,150,154,66,14,20,8,57,192,28,24,80,113,50,113,100,105,166,120,248,0,0,
+179,1,65,196,201,199,20,178,36,227,224,0,2,208,54,113,240,0,1,100,11,181,
+192,0,5,178,1,18,160,65,24,131,20,145,25,188,48,132,122,28,76,146,218,121,
+35,180,69,145,132,108,224,31,248,0,0,0,0,0,0,25,188,56,132,122,28,76,146,
+218,121,35,180,69,145,132,108,224,31,248,0,0,0,0,0,0,40,160,45,110,23,30,
+176,33,184,0,0,183,32,29,235,2,27,199,23,0,0,23,4,51,120,129,8,244,56,153,
+37,180,242,71,104,139,35,8,217,192,63,240,0,0,0,0,0,0,51,120,145,8,244,56,
+153,37,180,242,71,104,139,35,8,217,192,64,0,0,0,0,0,0,0,51,120,161,8,244,
+56,153,37,180,242,71,104,139,35,8,217,192,64,0,0,0,0,0,0,0,51,120,177,8,
+244,56,153,37,180,242,71,104,139,35,8,217,192,64,16,0,0,0,0,0,0,51,120,193,
+8,244,56,153,37,180,242,71,104,139,35,8,217,192,64,16,0,0,0,0,0,0,51,120,
+209,8,244,56,153,37,180,242,71,104,139,35,8,217,192,64,16,0,0,0,0,0,0,51,
+120,225,8,244,56,153,37,180,242,71,104,139,35,8,217,192,64,32,0,0,0,0,0,0,
+32,227,194,0,97,57,162,4,246,104,5,34,92,35,68,225,161,166,220,16,16,137,
+112,52,41,73,29,185,1,65,196,201,197,145,166,153,246,72,3,137,204,120,34,
+74,8,199,1,67,17,162,112,201,84,128,97,144,78,25,42,16,131,169,1,205,66,8,
+35,68,225,161,166,239,128,0,10,192,64,196,104,156,50,96,0,2,172,73,240,117,
+96,57,170,97,4,104,156,52,52,221,240,0,1,82,1,74,9,129,125,240,0,1,82,32,
+148,25,174,137,58,23,51,190,0,0,42,69,64,195,32,156,50,96,0,2,160,81,238,2,
+3,107,173,218,3,192,
};
#elif defined(DUK_USE_DOUBLE_ME)
-DUK_INTERNAL const duk_uint8_t duk_builtins_data[4251] = {
-144,148,105,225,32,68,52,228,126,12,104,201,37,132,52,167,194,138,105,244,
-124,57,28,211,57,18,64,52,238,254,44,138,111,171,241,164,19,87,137,30,33,
-167,18,145,159,8,211,137,9,225,42,5,240,145,139,163,163,8,211,137,10,228,
-64,211,19,132,140,93,29,56,70,156,72,119,34,66,146,36,104,137,194,70,46,
-142,172,35,78,36,47,146,195,102,11,240,145,139,163,175,8,211,137,9,228,240,
-242,112,145,139,163,179,8,211,137,8,237,34,130,118,49,116,118,225,26,48,0,
-1,94,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
-33,8,66,26,180,41,97,167,64,150,34,33,154,112,0,1,87,247,35,79,103,237,198,
-174,216,47,31,23,95,17,13,31,217,96,211,49,50,53,212,77,141,24,0,0,179,10,
-228,240,242,15,128,140,65,128,134,188,0,0,89,167,97,181,224,0,2,205,62,53,
-224,0,2,205,66,237,120,0,0,179,81,204,107,192,0,5,154,150,67,94,0,0,44,212,
-245,90,240,0,1,102,169,162,215,128,0,11,53,93,150,188,0,0,89,171,111,53,
-108,150,163,70,0,0,42,2,249,50,94,124,35,68,225,146,49,13,24,0,0,165,161,
-124,153,47,62,12,130,112,201,24,132,56,97,115,16,0,0,62,31,192,0,0,0,51,48,
-0,0,60,31,192,0,0,0,50,241,32,26,193,55,132,112,161,156,72,135,26,41,200,
-140,114,163,156,201,7,56,79,9,80,47,132,140,93,19,160,43,145,3,76,78,18,49,
-116,78,144,238,68,133,36,72,209,19,132,140,93,19,168,47,146,195,102,11,240,
-145,139,162,117,132,242,120,121,56,72,197,209,59,2,59,72,160,157,140,93,19,
-181,36,242,50,143,36,31,131,162,166,7,144,238,133,227,226,235,224,242,161,
-249,18,21,100,20,207,44,199,151,180,122,89,135,152,154,121,153,199,156,158,
-121,218,7,158,162,121,250,71,160,166,122,26,135,162,170,122,58,199,164,16,
-240,70,68,226,27,51,199,138,120,35,34,112,171,112,38,121,1,124,153,47,62,
-17,162,112,201,19,211,11,228,201,121,240,100,19,134,72,158,160,91,201,18,
-186,44,3,68,79,122,168,151,115,165,40,21,18,227,65,198,231,200,8,68,184,84,
-53,19,38,120,128,145,144,78,25,59,72,163,48,64,144,200,39,12,157,164,80,46,
-185,143,115,72,217,230,72,9,35,68,225,147,180,138,51,68,9,17,162,112,201,
-218,69,2,235,152,247,52,141,158,108,128,98,72,64,121,51,132,4,81,164,144,
-128,242,104,136,0,16,92,38,14,49,39,199,197,211,116,240,242,113,197,231,18,
-53,189,116,65,131,18,124,117,155,199,197,207,36,103,142,12,146,20,80,249,
-186,60,116,4,204,73,241,214,111,31,23,60,145,158,56,208,48,146,229,146,3,2,
-82,65,155,195,94,3,10,36,4,201,196,64,56,100,42,26,78,62,46,121,35,60,113,
-152,16,25,10,134,147,143,139,158,72,205,4,151,21,0,73,16,11,230,144,12,88,
-144,153,39,52,144,69,241,37,72,217,240,151,153,27,36,57,178,230,16,16,137,
-114,68,2,200,62,81,1,8,151,11,23,100,141,229,18,6,34,92,37,230,70,201,1,89,
-57,36,2,40,152,151,44,129,83,18,124,117,155,199,197,207,36,103,142,75,12,
-11,151,46,89,40,18,37,200,64,12,154,236,252,238,185,23,95,213,1,132,234,0,
-194,245,128,14,56,37,199,89,188,124,92,242,70,120,232,16,26,137,113,241,
-116,221,60,60,156,113,122,36,10,62,46,121,35,60,113,18,225,27,70,18,32,10,
-201,211,32,67,107,104,100,42,26,78,24,147,153,35,181,181,207,64,67,107,104,
-100,42,26,78,72,147,153,35,181,181,207,68,16,218,218,91,156,170,63,134,36,
-230,72,237,109,116,136,16,218,218,91,156,170,63,146,36,230,72,237,109,116,
-137,16,96,128,228,2,6,191,46,3,71,147,68,4,16,22,188,169,240,16,40,104,242,
-135,198,171,44,68,65,5,217,231,215,6,231,62,188,8,49,1,3,162,92,4,98,12,41,
-7,33,148,53,242,128,97,32,130,3,9,205,16,38,199,198,14,9,0,111,115,225,0,8,
-250,72,240,207,128,241,37,73,25,18,40,0,178,58,11,56,192,2,201,104,17,35,
-160,9,39,70,114,8,6,147,214,129,18,74,240,30,141,145,208,89,203,62,3,161,
-163,37,248,226,185,244,11,88,37,62,33,163,37,248,226,185,252,0,127,255,130,
-146,164,142,32,26,1,36,230,18,1,164,7,43,163,194,0,71,128,105,64,216,7,192,
-52,192,197,66,230,72,192,52,224,209,32,232,34,68,62,129,113,32,232,34,114,
-40,49,231,16,254,0,63,255,208,99,2,140,44,92,206,8,224,143,4,225,147,210,
-124,13,44,92,206,9,195,39,30,228,54,126,163,225,200,169,198,133,42,166,191,
-246,3,11,251,0,24,71,4,120,9,251,8,10,17,193,30,9,195,39,1,63,105,1,98,112,
-201,199,185,13,159,1,63,105,32,48,156,209,2,126,227,224,58,26,50,95,142,47,
-192,208,22,176,74,124,67,70,75,241,197,248,26,64,213,184,64,89,56,39,49,
-224,137,62,36,2,176,19,17,254,68,3,196,143,88,4,79,162,0,210,32,34,35,253,
-72,5,146,208,34,125,144,5,147,214,137,253,208,9,149,3,41,197,13,55,233,0,
-185,187,139,117,137,30,8,18,39,172,1,25,187,139,112,128,178,113,110,177,35,
-193,2,68,245,128,23,55,114,143,121,35,193,2,68,245,130,8,205,220,91,132,5,
-147,148,123,201,30,8,18,39,172,16,18,113,67,63,128,3,68,143,32,39,243,32,
-42,83,4,103,46,89,19,63,224,208,16,70,142,92,178,38,127,193,164,8,67,68,
-186,12,146,247,154,1,165,64,202,113,252,160,131,32,7,35,167,26,50,235,231,
-130,48,179,192,65,148,69,19,214,2,251,85,2,232,72,31,255,253,239,255,255,
-255,255,226,122,196,55,106,160,93,9,0,0,0,0,0,4,0,0,3,49,0,0,3,225,252,0,0,
-0,0,143,94,233,34,104,169,54,144,210,161,168,158,32,0,0,120,63,128,0,0,0,
-17,235,72,96,77,21,38,210,26,84,53,19,196,0,0,15,15,240,0,0,0,0,253,35,228,
-133,185,176,0,0,44,15,0,0,0,0,8,117,128,190,212,128,82,109,33,179,33,137,
-24,31,255,231,232,127,255,255,255,228,58,196,55,106,64,41,54,144,217,144,
-196,140,15,255,243,252,63,255,255,255,241,15,4,100,78,33,179,60,120,167,
-130,50,39,10,183,2,103,144,113,8,151,10,134,162,100,221,16,18,137,113,13,
-153,12,72,238,137,1,81,46,52,28,110,232,148,53,18,228,128,82,113,13,153,12,
-72,238,137,142,73,78,52,0,0,0,0,0,0,0,0,8,58,254,1,12,38,248,134,23,130,0,
-60,221,194,162,228,30,244,128,217,187,132,187,220,210,54,104,2,247,132,5,
-205,220,124,72,36,73,14,110,252,132,25,128,193,94,8,200,149,200,3,237,38,
-43,31,192,54,186,213,128,57,45,56,210,0,0,62,31,192,0,0,0,49,90,251,224,6,
-77,220,24,38,78,74,113,67,77,124,16,50,110,228,208,194,114,83,138,26,107,
-224,172,37,240,97,41,187,139,112,128,178,112,96,153,57,41,197,13,53,240,
-113,41,187,139,112,128,178,114,104,97,57,41,197,13,53,240,128,195,95,8,44,
-61,240,132,216,93,33,133,192,128,14,98,79,147,67,9,129,0,44,196,159,11,69,
-175,152,32,35,100,33,135,24,147,237,38,34,246,139,95,48,64,70,200,68,8,49,
-39,198,57,179,61,144,138,22,98,79,180,152,153,215,54,103,178,17,129,204,73,
-240,96,153,44,132,112,163,18,125,164,196,62,130,100,178,18,1,140,73,240,96,
-197,144,146,18,98,79,180,152,135,208,98,200,74,8,49,39,195,186,145,149,144,
-150,22,98,79,180,152,143,215,82,50,178,19,2,140,73,241,136,109,38,73,89,9,
-161,166,36,251,73,137,157,67,105,50,74,200,78,10,49,39,201,16,78,104,229,
-100,39,134,152,147,237,38,41,116,130,115,71,43,33,64,60,196,159,24,133,173,
-18,32,156,209,202,200,81,18,49,39,218,76,76,234,22,180,72,130,115,71,43,33,
-72,68,196,159,38,134,19,46,105,56,226,150,68,157,160,1,228,73,242,104,97,
-46,16,31,34,79,140,66,214,137,16,78,104,229,108,169,137,72,147,237,38,38,
-117,11,90,36,65,57,163,149,178,168,21,34,79,146,32,156,209,202,218,250,161,
-178,36,251,73,138,93,32,156,209,202,218,250,193,82,36,248,196,54,147,36,
-173,191,174,27,34,79,180,152,153,212,54,147,36,173,191,176,17,34,79,135,
-117,35,43,115,236,133,200,147,237,38,35,245,212,140,173,207,180,15,34,79,
-131,4,201,108,173,133,72,147,237,38,33,244,19,37,178,184,17,34,79,140,115,
-102,123,107,238,133,200,147,237,38,38,117,205,153,237,175,188,23,34,79,133,
-162,215,204,16,17,182,254,248,116,137,62,210,98,47,104,181,243,4,4,109,191,
-192,131,152,147,230,8,8,217,12,16,60,137,62,96,128,141,178,193,181,55,136,
-200,51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,32,98,115,249,73,
-117,243,249,67,21,159,202,38,47,63,148,86,8,75,144,94,50,1,38,73,79,204,67,
-95,231,1,6,128,14,79,129,185,40,249,18,149,181,207,142,199,155,172,248,172,
-89,183,207,140,198,137,175,200,0,159,72,10,5,21,220,138,120,74,129,124,36,
-98,232,228,74,81,62,160,20,10,107,185,21,114,32,105,137,194,70,46,142,68,
-165,19,235,1,64,170,187,145,119,34,66,146,36,104,137,194,70,46,142,68,165,
-19,236,1,64,174,187,145,95,37,134,204,23,225,35,23,71,34,82,137,246,128,
-160,89,93,200,167,147,195,201,194,70,46,142,68,165,19,238,1,64,182,187,145,
-71,105,20,19,177,139,163,145,41,68,16,7,6,15,82,70,72,115,96,0,118,105,160,
-0,0,0,0,91,60,165,195,201,194,8,134,149,216,130,0,192,41,224,136,2,48,176,
-228,1,149,13,195,15,0,200,209,97,71,128,99,32,176,131,192,113,57,143,0,167,
-131,32,230,80,28,202,139,175,237,2,48,189,160,20,1,119,48,87,193,186,129,
-89,56,72,197,209,200,193,185,35,23,71,109,13,219,36,98,232,237,156,13,26,
-208,211,14,102,19,87,137,91,95,128,0,10,64,24,92,0,0,82,2,53,63,240,49,204,
-202,10,14,38,78,44,141,52,207,31,0,0,22,32,129,100,180,8,148,145,78,102,
-152,80,113,50,113,100,105,166,120,248,0,0,177,1,65,196,201,199,20,178,36,
-227,224,0,2,200,3,6,133,41,35,31,0,0,22,1,44,57,137,62,33,179,216,162,152,
-192,131,18,124,162,27,61,138,41,108,32,196,159,16,217,232,235,81,76,104,73,
-137,62,81,13,158,142,181,20,184,16,98,79,136,108,244,244,168,166,56,36,196,
-159,40,134,207,79,74,138,93,10,49,39,194,173,192,158,158,149,20,188,20,98,
-79,133,91,129,61,109,74,41,124,30,68,159,16,217,236,83,108,96,68,137,62,81,
-13,158,197,54,182,17,34,79,136,108,244,117,169,182,52,38,68,159,40,134,207,
-71,90,155,92,8,145,39,196,54,122,122,84,219,28,19,34,79,148,67,103,167,165,
-77,174,133,72,147,225,86,224,79,79,74,155,94,10,145,39,194,173,192,158,182,
-165,54,190,206,25,212,35,208,226,100,150,211,201,29,162,44,140,35,103,0,0,
-3,192,252,0,0,0,0,206,25,228,35,208,226,100,150,211,201,29,162,44,140,35,
-103,0,0,3,192,252,0,0,0,0,206,25,244,35,208,226,100,150,211,201,29,162,44,
-140,35,103,0,0,3,192,252,0,0,0,0,206,26,4,35,208,226,100,150,211,201,29,
-162,44,140,35,103,0,0,0,1,0,0,0,0,0,206,26,20,35,208,226,100,150,211,201,
-29,162,44,140,35,103,0,0,0,1,0,0,0,0,0,206,26,36,35,208,226,100,150,211,
-201,29,162,44,140,35,103,0,0,0,65,0,0,0,0,0,206,26,52,35,208,226,100,150,
-211,201,29,162,44,140,35,103,0,0,0,65,0,0,0,0,0,206,26,68,35,208,226,100,
-150,211,201,29,162,44,140,35,103,0,0,0,65,0,0,0,0,0,206,26,84,35,208,226,
-100,150,211,201,29,162,44,140,35,103,0,0,0,129,0,0,0,0,0,195,154,99,16,38,
-36,0,251,68,117,179,216,162,128,68,72,1,241,13,158,197,20,150,25,18,0,125,
-162,58,217,232,235,117,100,162,136,25,18,0,125,162,58,217,232,235,116,36,
-162,145,2,226,64,15,136,108,244,117,186,178,81,73,129,113,32,7,196,54,122,
-58,221,9,40,165,64,200,144,3,237,17,214,207,79,75,171,37,20,80,200,144,3,
-237,17,214,207,79,75,161,37,20,138,23,18,0,124,67,103,167,165,213,146,138,
-77,11,137,0,62,33,179,211,210,232,73,69,42,133,196,128,31,10,183,2,125,89,
-40,163,5,196,128,31,10,183,2,125,9,40,164,96,200,144,3,224,221,64,172,157,
-89,40,163,134,68,128,31,6,234,5,100,232,73,69,35,133,68,128,31,104,142,182,
-125,89,40,180,0,168,144,3,237,17,214,207,161,37,22,144,19,18,0,124,67,103,
-213,146,139,80,9,137,0,62,33,179,232,73,69,172,5,90,40,153,59,68,117,179,
-216,166,192,77,162,137,147,136,108,246,41,180,176,219,69,19,39,104,142,182,
-122,58,221,89,41,178,6,218,40,153,59,68,117,179,209,214,232,73,77,162,6,90,
-40,153,56,134,207,71,91,171,37,54,152,25,104,162,100,226,27,61,29,110,132,
-148,218,160,109,162,137,147,180,71,91,61,61,46,172,148,217,67,109,20,76,
-157,162,58,217,233,233,116,36,166,209,67,45,20,76,156,67,103,167,165,213,
-146,155,77,12,180,81,50,113,13,158,158,151,66,74,109,84,50,209,68,201,194,
-173,192,159,86,74,108,193,150,138,38,78,21,110,4,250,18,83,104,193,182,138,
-38,78,13,212,10,201,213,146,155,56,109,162,137,147,131,117,2,178,116,36,
-166,209,194,237,20,76,157,162,58,217,245,100,167,16,2,237,20,76,157,162,58,
-217,244,36,167,18,2,173,20,76,156,67,103,213,146,156,80,10,180,81,50,113,
-13,159,66,74,113,97,175,220,48,216,109,192,4,42,22,189,163,0,196,133,0,185,
-80,32,28,78,99,193,18,80,36,4,19,159,141,156,0,178,90,4,74,73,0,22,209,68,
-201,185,129,4,2,8,3,132,64,60,36,0,171,240,84,6,149,113,72,176,157,91,116,
-116,32,88,181,129,32,11,42,218,221,131,234,219,165,1,8,187,152,255,188,231,
-235,248,47,86,227,105,18,2,56,175,185,255,244,17,91,40,110,173,198,209,208,
-36,7,188,189,179,240,238,82,97,80,93,122,32,125,144,132,160,12,22,162,42,7,
-236,161,25,232,237,105,64,158,160,230,63,205,59,127,102,11,217,66,51,210,
-129,61,65,236,127,154,118,254,205,171,197,34,168,48,6,90,162,1,0,39,75,84,
-72,8,9,33,186,162,80,64,76,13,213,19,2,130,96,110,150,181,0,65,6,51,213,20,
-128,65,17,11,213,19,130,137,121,211,210,210,144,6,39,75,84,80,0,201,119,
-234,138,8,41,86,231,71,84,80,129,79,135,186,122,101,224,34,25,69,233,208,3,
-91,141,170,40,96,139,113,180,181,69,36,21,110,54,142,134,168,165,1,176,23,
-212,47,0,216,134,234,87,128,111,117,181,168,128,209,3,70,230,106,192,5,139,
-168,209,234,138,32,36,144,102,235,8,3,146,27,170,40,160,146,132,103,170,40,
-192,115,3,117,69,28,22,113,163,69,170,41,103,1,66,188,17,145,52,104,4,202,
-113,67,76,130,227,72,194,13,240,108,0,0,83,96,0,2,185,0,104,146,84,97,48,0,
-1,90,192,56,169,24,145,179,192,0,5,96,8,56,16,32,128,56,18,52,125,198,86,
-147,186,140,28,50,21,13,39,31,23,60,145,158,56,204,141,47,121,6,155,190,
-188,24,49,39,199,89,188,124,92,242,70,120,224,201,33,69,15,155,163,199,68,
-14,49,39,199,197,211,116,240,242,113,197,231,18,180,254,4,3,17,46,18,243,
-35,100,128,172,156,146,70,163,150,76,34,248,146,164,108,248,75,204,141,146,
-28,217,115,9,27,79,11,241,173,235,162,160,224,200,2,206,9,113,13,148,192,
-209,18,22,164,146,37,193,57,162,4,249,39,196,128,24,2,178,66,213,136,68,
-201,16,77,209,131,31,192,242,88,96,92,191,151,34,100,136,38,232,255,252,92,
-221,199,197,12,68,209,82,66,212,11,155,185,41,197,13,55,38,3,66,213,47,131,
-250,72,12,162,99,133,116,127,196,32,225,1,3,34,92,170,9,105,164,32,225,64,
-131,156,1,193,133,7,19,39,22,70,154,103,143,128,0,11,16,20,28,76,156,113,
-75,34,78,62,0,0,44,128,48,104,82,146,49,240,0,1,96,11,180,192,0,5,162,1,18,
-160,65,24,131,20,145,25,188,48,132,122,28,76,146,218,121,35,180,69,145,132,
-108,224,0,0,120,31,128,0,0,0,25,188,56,132,122,28,76,146,218,121,35,180,69,
-145,132,108,224,0,0,120,31,128,0,0,0,40,160,45,110,23,30,176,33,184,0,0,
-181,32,29,235,2,27,199,23,0,0,22,196,51,120,129,8,244,56,153,37,180,242,71,
-104,139,35,8,217,192,0,0,240,63,0,0,0,0,51,120,145,8,244,56,153,37,180,242,
-71,104,139,35,8,217,192,0,0,0,64,0,0,0,0,51,120,161,8,244,56,153,37,180,
-242,71,104,139,35,8,217,192,0,0,0,64,0,0,0,0,51,120,177,8,244,56,153,37,
-180,242,71,104,139,35,8,217,192,0,0,16,64,0,0,0,0,51,120,193,8,244,56,153,
-37,180,242,71,104,139,35,8,217,192,0,0,16,64,0,0,0,0,51,120,209,8,244,56,
-153,37,180,242,71,104,139,35,8,217,192,0,0,16,64,0,0,0,0,51,120,225,8,244,
-56,153,37,180,242,71,104,139,35,8,217,192,0,0,32,64,0,0,0,0,32,227,194,0,
-97,57,162,4,246,40,5,34,92,35,68,225,161,166,219,16,16,137,112,52,41,73,29,
-169,1,65,196,201,197,145,166,153,246,8,3,137,204,120,34,74,8,200,58,128,28,
-211,160,130,52,78,26,26,110,248,0,0,170,4,12,70,137,195,38,0,0,42,68,159,7,
-84,3,154,150,16,70,137,195,67,77,223,0,0,20,224,20,160,152,23,223,0,0,20,
-226,9,65,154,232,147,161,115,59,224,0,2,156,84,12,50,9,195,38,0,0,41,133,
-30,224,32,54,186,221,128,60,
+DUK_INTERNAL const duk_uint8_t duk_builtins_data[4281] = {
+144,148,105,226,32,68,52,228,254,12,104,202,37,132,52,167,194,138,105,245,
+124,57,28,211,57,18,64,52,239,126,44,138,111,175,241,164,19,87,145,30,33,
+167,22,145,159,8,211,139,9,225,42,5,240,145,139,163,163,8,211,139,10,228,
+64,211,19,132,140,93,29,56,70,156,88,119,34,66,146,36,104,137,194,70,46,
+142,172,35,78,44,47,146,195,102,11,240,145,139,163,175,8,211,139,9,228,240,
+242,112,145,139,163,179,8,211,139,8,237,34,130,118,49,116,118,225,26,48,0,
+1,98,29,201,158,46,183,39,135,147,132,140,93,16,132,76,66,33,8,66,16,132,
+33,8,66,26,180,105,97,167,68,150,34,33,154,112,0,1,91,247,35,79,111,237,
+198,174,232,47,31,23,95,17,13,31,249,96,211,49,50,53,214,77,141,24,0,0,181,
+10,228,240,242,15,128,140,65,128,134,188,0,0,90,167,97,181,224,0,2,213,62,
+53,224,0,2,213,66,237,120,0,0,181,81,204,107,192,0,5,170,150,67,94,0,0,45,
+84,245,90,240,0,1,106,169,162,215,128,0,11,85,93,150,188,0,0,90,171,111,53,
+109,22,162,26,48,0,1,84,23,201,146,243,225,26,39,12,145,136,104,192,0,5,61,
+11,228,201,121,240,100,19,134,72,196,33,195,14,40,203,112,64,190,76,232,
+145,153,136,0,0,31,15,224,0,0,0,25,152,0,0,30,15,224,0,0,0,25,120,144,13,
+96,155,194,56,80,206,36,67,141,20,228,70,57,81,206,100,131,156,39,132,168,
+23,194,70,46,137,208,21,200,129,166,39,9,24,186,39,72,119,34,66,146,36,104,
+137,194,70,46,137,212,23,201,97,179,5,248,72,197,209,58,194,121,60,60,156,
+36,98,232,157,129,29,164,80,78,198,46,137,218,146,121,25,71,146,9,209,5,
+209,61,48,126,14,138,152,30,67,186,23,143,139,175,131,202,135,228,72,85,
+144,83,60,179,30,94,209,233,102,30,98,105,230,103,30,114,121,231,104,30,
+122,137,231,233,30,130,153,232,106,30,138,169,232,235,30,144,67,193,25,19,
+136,108,207,30,41,224,140,137,194,173,192,153,228,5,242,100,188,248,70,137,
+195,36,79,78,47,147,37,231,193,144,78,25,34,122,145,111,36,74,232,176,13,
+17,61,234,226,93,207,148,160,84,75,141,7,27,161,32,33,18,225,80,212,76,154,
+2,2,70,65,56,100,237,34,140,209,2,67,32,156,50,118,145,64,186,230,61,205,
+35,103,155,32,36,141,19,134,78,210,40,206,16,36,70,137,195,39,105,20,11,
+174,99,220,210,54,121,210,1,137,33,1,228,207,16,17,70,146,66,3,201,164,32,
+0,65,112,152,56,196,159,31,23,77,211,195,201,199,23,160,72,214,246,81,6,12,
+73,241,214,111,31,23,60,145,158,56,50,72,81,67,230,232,242,80,19,49,39,199,
+89,188,124,92,242,70,120,227,64,194,75,154,72,12,9,73,6,111,21,120,12,40,
+144,19,39,25,0,225,144,168,105,56,248,185,228,140,241,200,96,64,100,42,26,
+78,62,46,121,35,52,18,92,116,1,36,64,47,158,64,49,98,66,100,156,242,65,23,
+196,149,35,103,194,94,100,108,144,230,203,156,64,66,37,201,16,11,32,249,
+132,4,34,92,44,93,146,55,152,72,24,137,112,151,153,27,36,5,100,229,144,8,
+162,98,92,210,5,76,73,241,214,111,31,23,60,145,158,57,44,48,46,92,185,164,
+160,72,151,41,0,50,107,179,244,59,36,93,127,92,6,19,172,3,11,216,0,56,224,
+151,29,102,241,241,115,201,25,227,164,64,106,37,199,197,211,116,240,242,
+113,197,233,144,40,248,185,228,140,241,196,75,132,109,24,72,128,43,39,84,
+129,13,173,161,144,168,105,56,98,78,100,142,214,215,69,1,13,173,161,144,
+168,105,57,34,78,100,142,214,215,69,16,67,107,105,110,114,168,254,24,147,
+153,35,181,181,212,32,67,107,105,110,114,168,254,72,147,153,35,181,181,212,
+36,65,130,3,144,8,26,252,200,13,30,85,16,16,64,90,242,231,192,64,161,163,
+203,31,26,172,193,17,4,23,105,159,96,27,172,251,16,32,196,4,14,137,112,17,
+136,48,164,28,134,80,215,202,1,132,130,8,12,39,52,64,155,31,24,56,36,1,189,
+207,132,0,35,233,35,195,62,3,196,149,36,100,72,160,2,200,232,44,227,0,11,
+37,160,68,142,128,36,157,25,200,32,26,79,90,4,73,43,192,122,54,71,65,103,
+44,248,14,134,140,151,227,138,231,208,45,96,148,248,134,140,151,227,138,
+231,240,1,255,254,10,74,146,56,128,104,4,147,152,72,6,144,28,174,143,8,1,
+30,1,165,3,96,31,0,211,3,21,11,153,35,0,211,131,68,131,160,137,16,250,5,
+196,131,160,137,200,160,199,156,67,248,0,255,255,65,140,10,48,177,115,56,
+35,130,60,19,134,79,89,240,52,177,115,56,39,12,156,123,144,217,251,15,135,
+34,167,30,20,170,154,255,232,12,47,244,0,97,28,17,224,39,238,32,40,71,4,
+120,39,12,156,4,253,228,5,137,195,39,30,228,54,124,4,253,228,128,194,115,
+68,9,252,15,128,232,104,201,126,56,191,35,64,90,193,41,241,13,25,47,199,23,
+228,105,3,86,225,1,100,224,156,199,130,36,249,144,10,192,76,71,250,16,15,
+18,61,96,17,62,200,3,72,128,136,143,247,32,22,75,64,137,248,64,22,79,90,39,
+249,64,38,84,12,167,20,52,223,196,2,230,238,45,214,36,120,32,72,158,208,4,
+102,238,45,194,2,201,197,186,196,143,4,9,19,218,0,92,221,202,61,228,143,4,
+9,19,218,8,35,55,113,110,16,22,78,81,239,36,120,32,72,158,208,64,73,197,12,
+255,0,13,18,60,128,159,212,128,169,76,17,156,185,100,76,255,163,64,65,26,
+57,114,200,153,255,70,144,33,13,18,232,50,75,226,104,6,149,3,41,199,246,
+130,12,128,28,142,156,120,203,175,158,8,194,207,1,6,81,20,79,88,11,237,84,
+11,161,32,127,255,247,191,255,255,255,255,137,235,16,221,170,129,116,36,0,
+0,0,0,0,16,0,0,12,196,0,0,15,135,240,0,0,0,2,61,123,164,137,162,164,218,67,
+74,134,162,120,128,0,1,224,254,0,0,0,0,71,173,33,129,52,84,155,72,105,80,
+212,79,16,0,0,60,63,192,0,0,0,3,244,143,146,22,230,192,0,0,176,60,0,0,0,0,
+33,214,2,251,82,1,73,180,134,204,134,36,96,127,255,159,161,255,255,255,255,
+144,235,16,221,169,0,164,218,67,102,67,18,48,63,255,207,240,255,255,255,
+255,196,60,17,145,56,134,204,241,226,158,8,200,156,42,220,9,158,65,196,34,
+92,42,26,137,147,120,64,74,37,196,54,100,49,35,188,36,5,68,184,208,113,187,
+194,80,212,75,146,1,73,196,54,100,49,35,188,38,57,37,56,240,0,0,0,0,0,0,0,
+0,32,235,248,68,48,156,2,24,94,24,0,243,119,10,139,144,123,242,3,102,238,
+18,239,115,72,217,160,11,223,16,23,55,113,241,32,145,36,57,188,18,16,102,3,
+5,120,35,34,89,32,15,180,152,173,127,0,218,235,88,0,228,180,227,200,0,0,
+248,127,0,0,0,0,197,107,240,64,6,77,220,24,38,78,74,113,67,77,130,4,12,155,
+185,52,48,156,148,226,134,155,4,10,194,96,129,132,166,238,45,194,2,201,193,
+130,100,228,167,20,52,216,32,113,41,187,139,112,128,178,114,104,97,57,41,
+197,13,54,8,32,48,216,32,130,195,224,130,19,97,124,134,23,6,0,57,137,62,77,
+12,38,12,0,179,18,124,45,22,190,96,128,141,176,134,28,98,79,180,152,139,
+218,45,124,193,1,27,97,16,32,196,159,24,230,204,246,194,40,89,137,62,210,
+98,103,92,217,158,216,70,7,49,39,193,130,100,182,17,194,140,73,246,147,16,
+250,9,146,216,72,6,49,39,193,131,22,194,72,73,137,62,210,98,31,65,139,97,
+40,32,196,159,14,234,70,86,194,88,89,137,62,210,98,63,93,72,202,216,76,10,
+49,39,198,33,180,153,37,108,38,134,152,147,237,38,38,117,13,164,201,43,97,
+56,40,196,159,36,65,57,163,149,176,158,26,98,79,180,152,165,210,9,205,28,
+173,133,0,243,18,124,98,22,180,72,130,115,71,43,97,68,72,196,159,105,49,51,
+168,90,209,34,9,205,28,173,133,33,19,18,124,154,24,76,185,164,227,138,89,
+18,119,0,7,145,39,201,161,132,188,64,124,137,62,49,11,90,36,65,57,163,149,
+210,166,37,34,79,180,152,153,212,45,104,145,4,230,142,87,74,160,84,137,62,
+72,130,115,71,43,171,234,134,200,147,237,38,41,116,130,115,71,43,171,235,5,
+72,147,227,16,218,76,146,186,254,184,108,137,62,210,98,103,80,218,76,146,
+186,254,192,68,137,62,29,212,140,174,207,178,23,34,79,180,152,143,215,82,
+50,187,62,208,60,137,62,12,19,37,210,182,21,34,79,180,152,135,208,76,151,
+74,224,68,137,62,49,205,153,238,175,186,23,34,79,180,152,153,215,54,103,
+186,190,240,92,137,62,22,139,95,48,64,70,235,251,225,210,36,251,73,136,189,
+162,215,204,16,17,186,255,2,14,98,79,152,32,35,108,48,64,242,36,249,130,2,
+55,75,6,212,224,72,200,51,128,114,108,28,100,128,0,0,0,0,0,0,0,12,110,127,
+48,98,115,249,201,117,243,249,195,21,159,206,38,47,63,156,86,8,75,144,94,
+82,1,38,73,79,208,67,95,233,1,6,128,14,79,129,186,40,249,18,149,182,207,
+144,200,155,188,248,204,105,184,207,142,199,137,175,201,0,159,72,10,5,21,
+221,10,120,74,129,124,36,98,232,228,74,81,62,160,20,10,107,186,21,114,32,
+105,137,194,70,46,142,68,165,19,235,1,64,170,187,161,119,34,66,146,36,104,
+137,194,70,46,142,68,165,19,236,1,64,174,187,161,95,37,134,204,23,225,35,
+23,71,34,82,137,246,128,160,89,93,208,167,147,195,201,194,70,46,142,68,165,
+19,238,1,64,182,187,161,71,105,20,19,177,139,163,145,41,68,16,7,6,15,82,70,
+72,115,96,0,27,234,32,0,0,0,0,91,60,165,195,201,194,8,134,149,216,162,0,
+192,41,225,8,2,48,177,36,1,149,13,196,15,0,200,209,97,199,128,99,32,176,
+195,192,113,57,143,0,167,133,32,230,80,28,202,139,175,238,2,48,189,192,20,
+1,119,80,87,193,186,129,89,56,72,197,209,200,193,185,35,23,71,109,13,219,
+36,98,232,237,156,13,26,208,211,14,102,19,87,137,91,95,128,0,10,96,24,92,0,
+0,83,2,53,56,0,0,165,3,28,204,160,160,226,100,226,200,211,76,241,240,0,1,
+102,8,22,75,64,137,73,20,230,105,133,7,19,39,22,70,154,103,143,128,0,11,48,
+20,28,76,156,113,75,34,78,62,0,0,45,3,103,31,0,0,22,65,44,57,137,62,33,179,
+216,162,152,192,131,18,124,162,27,61,138,41,108,32,196,159,16,217,232,235,
+81,76,104,73,137,62,81,13,158,142,181,20,184,16,98,79,136,108,244,244,168,
+166,56,36,196,159,40,134,207,79,74,138,93,10,49,39,194,173,192,158,158,149,
+20,188,20,98,79,133,91,129,61,109,74,41,124,30,68,159,16,217,236,83,108,96,
+68,137,62,81,13,158,197,54,182,17,34,79,136,108,244,117,169,182,52,38,68,
+159,40,134,207,71,90,155,92,8,145,39,196,54,122,122,84,219,28,19,34,79,148,
+67,103,167,165,77,174,133,72,147,225,86,224,79,79,74,155,94,10,145,39,194,
+173,192,158,182,165,54,190,206,25,212,35,208,226,100,150,211,201,29,162,44,
+140,35,103,0,0,3,192,252,0,0,0,0,206,25,228,35,208,226,100,150,211,201,29,
+162,44,140,35,103,0,0,3,192,252,0,0,0,0,206,25,244,35,208,226,100,150,211,
+201,29,162,44,140,35,103,0,0,3,192,252,0,0,0,0,206,26,4,35,208,226,100,150,
+211,201,29,162,44,140,35,103,0,0,0,1,0,0,0,0,0,206,26,20,35,208,226,100,
+150,211,201,29,162,44,140,35,103,0,0,0,1,0,0,0,0,0,206,26,36,35,208,226,
+100,150,211,201,29,162,44,140,35,103,0,0,0,65,0,0,0,0,0,206,26,52,35,208,
+226,100,150,211,201,29,162,44,140,35,103,0,0,0,65,0,0,0,0,0,206,26,68,35,
+208,226,100,150,211,201,29,162,44,140,35,103,0,0,0,65,0,0,0,0,0,206,26,84,
+35,208,226,100,150,211,201,29,162,44,140,35,103,0,0,0,129,0,0,0,0,0,195,
+154,99,16,38,36,0,251,68,117,179,216,162,128,68,72,1,241,13,158,197,20,150,
+25,18,0,125,162,58,217,232,235,117,100,162,136,25,18,0,125,162,58,217,232,
+235,116,36,162,145,2,226,64,15,136,108,244,117,186,178,81,73,129,113,32,7,
+196,54,122,58,221,9,40,165,64,200,144,3,237,17,214,207,79,75,171,37,20,80,
+200,144,3,237,17,214,207,79,75,161,37,20,138,23,18,0,124,67,103,167,165,
+213,146,138,77,11,137,0,62,33,179,211,210,232,73,69,42,133,196,128,31,10,
+183,2,125,89,40,163,5,196,128,31,10,183,2,125,9,40,164,96,200,144,3,224,
+221,64,172,157,89,40,163,134,68,128,31,6,234,5,100,232,73,69,35,133,68,128,
+31,104,142,182,125,89,40,180,0,168,144,3,237,17,214,207,161,37,22,144,19,
+18,0,124,67,103,213,146,139,80,9,137,0,62,33,179,232,73,69,172,5,90,40,153,
+59,68,117,179,216,166,192,77,162,137,147,136,108,246,41,180,176,219,69,19,
+39,104,142,182,122,58,221,89,41,178,6,218,40,153,59,68,117,179,209,214,232,
+73,77,162,6,90,40,153,56,134,207,71,91,171,37,54,152,25,104,162,100,226,27,
+61,29,110,132,148,218,160,109,162,137,147,180,71,91,61,61,46,172,148,217,
+67,109,20,76,157,162,58,217,233,233,116,36,166,209,67,45,20,76,156,67,103,
+167,165,213,146,155,77,12,180,81,50,113,13,158,158,151,66,74,109,84,50,209,
+68,201,194,173,192,159,86,74,108,193,150,138,38,78,21,110,4,250,18,83,104,
+193,182,138,38,78,13,212,10,201,213,146,155,56,109,162,137,147,131,117,2,
+178,116,36,166,209,194,237,20,76,157,162,58,217,245,100,167,16,2,237,20,76,
+157,162,58,217,244,36,167,18,2,173,20,76,156,67,103,213,146,156,80,10,180,
+81,50,113,13,159,66,74,113,97,175,221,48,216,110,64,4,42,22,189,179,0,196,
+133,0,185,80,32,28,78,99,193,18,80,36,4,19,159,141,172,0,178,90,4,74,73,0,
+22,209,68,201,187,129,4,2,8,3,132,64,60,36,0,171,240,84,6,149,113,72,176,
+157,91,116,116,32,88,181,129,32,11,42,218,221,131,234,219,165,1,8,187,152,
+255,188,231,235,248,47,86,227,105,18,2,56,175,185,255,244,17,91,40,110,173,
+198,209,208,36,7,188,189,179,240,238,82,97,80,93,122,32,125,144,132,160,12,
+22,162,42,7,236,161,25,232,237,105,64,158,160,230,63,205,59,127,102,11,217,
+66,51,210,129,61,65,236,127,154,118,254,205,171,197,34,168,48,6,90,194,1,0,
+39,75,88,72,8,9,33,186,194,80,64,76,13,214,19,2,130,96,110,150,189,0,65,6,
+51,214,20,128,65,17,11,214,19,130,137,121,211,210,211,144,6,39,75,88,80,0,
+201,119,235,10,8,41,86,231,71,88,80,129,79,135,186,122,133,224,34,25,69,
+234,80,3,91,141,172,40,96,139,113,180,181,133,36,21,110,54,142,134,176,165,
+1,176,23,213,47,0,216,134,234,215,128,111,117,181,232,128,209,3,70,230,107,
+64,5,139,168,209,235,10,32,36,144,102,235,136,3,146,27,172,40,160,146,132,
+103,172,40,192,115,3,117,133,28,22,113,163,69,172,41,103,1,66,188,17,145,
+52,168,4,202,113,67,76,130,227,76,194,13,240,108,0,0,83,224,0,2,193,0,104,
+146,84,97,48,0,1,94,192,56,169,24,145,179,192,0,5,112,8,56,16,32,128,56,18,
+52,125,230,86,147,190,140,28,50,21,13,39,31,23,60,145,158,57,12,141,47,129,
+6,155,194,188,24,49,39,199,89,188,124,92,242,70,120,224,201,33,69,15,155,
+163,201,68,14,49,39,199,197,211,116,240,242,113,197,232,18,180,254,36,3,17,
+46,18,243,35,100,128,172,156,178,70,163,154,76,34,248,146,164,108,248,75,
+204,141,146,28,217,115,137,27,95,27,241,173,236,162,160,224,200,2,206,9,
+113,13,148,192,209,18,22,164,146,37,193,57,162,4,249,39,196,128,24,2,178,
+66,213,136,68,201,16,77,209,131,31,192,242,88,96,92,191,151,34,100,136,38,
+232,255,252,92,221,199,197,12,68,209,82,66,212,11,155,185,41,197,13,55,38,
+3,66,213,47,135,254,72,12,162,99,133,116,112,0,1,72,66,14,16,16,50,37,202,
+160,150,154,66,14,20,8,57,192,28,24,80,113,50,113,100,105,166,120,248,0,0,
+179,1,65,196,201,199,20,178,36,227,224,0,2,208,54,113,240,0,1,100,11,181,
+192,0,5,178,1,18,160,65,24,131,20,145,25,188,48,132,122,28,76,146,218,121,
+35,180,69,145,132,108,224,0,0,120,31,128,0,0,0,25,188,56,132,122,28,76,146,
+218,121,35,180,69,145,132,108,224,0,0,120,31,128,0,0,0,40,160,45,110,23,30,
+176,33,184,0,0,183,32,29,235,2,27,199,23,0,0,23,4,51,120,129,8,244,56,153,
+37,180,242,71,104,139,35,8,217,192,0,0,240,63,0,0,0,0,51,120,145,8,244,56,
+153,37,180,242,71,104,139,35,8,217,192,0,0,0,64,0,0,0,0,51,120,161,8,244,
+56,153,37,180,242,71,104,139,35,8,217,192,0,0,0,64,0,0,0,0,51,120,177,8,
+244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,16,64,0,0,0,0,51,120,193,
+8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,16,64,0,0,0,0,51,120,
+209,8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,16,64,0,0,0,0,51,
+120,225,8,244,56,153,37,180,242,71,104,139,35,8,217,192,0,0,32,64,0,0,0,0,
+32,227,194,0,97,57,162,4,246,104,5,34,92,35,68,225,161,166,220,16,16,137,
+112,52,41,73,29,185,1,65,196,201,197,145,166,153,246,72,3,137,204,120,34,
+74,8,199,1,67,17,162,112,201,84,128,97,144,78,25,42,16,131,169,1,205,66,8,
+35,68,225,161,166,239,128,0,10,192,64,196,104,156,50,96,0,2,172,73,240,117,
+96,57,170,97,4,104,156,52,52,221,240,0,1,82,1,74,9,129,125,240,0,1,82,32,
+148,25,174,137,58,23,51,190,0,0,42,69,64,195,32,156,50,96,0,2,160,81,238,2,
+3,107,173,218,3,192,
};
#else
#error invalid endianness defines
@@ -11649,31 +12471,43 @@ DUK_INTERNAL const duk_uint8_t duk_builtins_data[4251] = {
/* #include duk_internal.h -> already included */
-#define DUK__ERRFMT_BUFSIZE 256 /* size for formatting buffers */
+#define DUK__ERRFMT_BUFSIZE 256 /* size for formatting buffers */
#if defined(DUK_USE_VERBOSE_ERRORS)
-DUK_INTERNAL DUK_COLD void duk_err_handle_error_fmt(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *fmt, ...) {
+DUK_INTERNAL DUK_COLD void duk_err_handle_error_fmt(duk_hthread *thr,
+ const char *filename,
+ duk_uint_t line_and_code,
+ const char *fmt,
+ ...) {
va_list ap;
char msg[DUK__ERRFMT_BUFSIZE];
va_start(ap, fmt);
(void) DUK_VSNPRINTF(msg, sizeof(msg), fmt, ap);
msg[sizeof(msg) - 1] = (char) 0;
- duk_err_create_and_throw(thr, (duk_errcode_t) (line_and_code >> 24), msg, filename, (duk_int_t) (line_and_code & 0x00ffffffL));
- va_end(ap); /* dead code, but ensures portability (see Linux man page notes) */
+ duk_err_create_and_throw(thr,
+ (duk_errcode_t) (line_and_code >> 24),
+ msg,
+ filename,
+ (duk_int_t) (line_and_code & 0x00ffffffL));
+ va_end(ap); /* dead code, but ensures portability (see Linux man page notes) */
}
DUK_INTERNAL DUK_COLD void duk_err_handle_error(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *msg) {
- duk_err_create_and_throw(thr, (duk_errcode_t) (line_and_code >> 24), msg, filename, (duk_int_t) (line_and_code & 0x00ffffffL));
+ duk_err_create_and_throw(thr,
+ (duk_errcode_t) (line_and_code >> 24),
+ msg,
+ filename,
+ (duk_int_t) (line_and_code & 0x00ffffffL));
}
-#else /* DUK_USE_VERBOSE_ERRORS */
+#else /* DUK_USE_VERBOSE_ERRORS */
DUK_INTERNAL DUK_COLD void duk_err_handle_error(duk_hthread *thr, duk_errcode_t code) {
duk_err_create_and_throw(thr, code);
}
-#endif /* DUK_USE_VERBOSE_ERRORS */
+#endif /* DUK_USE_VERBOSE_ERRORS */
/*
* Error throwing helpers
@@ -11681,14 +12515,34 @@ DUK_INTERNAL DUK_COLD void duk_err_handle_error(duk_hthread *thr, duk_errcode_t
#if defined(DUK_USE_VERBOSE_ERRORS)
#if defined(DUK_USE_PARANOID_ERRORS)
-DUK_INTERNAL DUK_COLD void duk_err_require_type_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t idx, const char *expect_name) {
- DUK_ERROR_RAW_FMT3(thr, filename, linenumber, DUK_ERR_TYPE_ERROR, "%s required, found %s (stack index %ld)",
- expect_name, duk_get_type_name(thr, idx), (long) idx);
+DUK_INTERNAL DUK_COLD void duk_err_require_type_index(duk_hthread *thr,
+ const char *filename,
+ duk_int_t linenumber,
+ duk_idx_t idx,
+ const char *expect_name) {
+ DUK_ERROR_RAW_FMT3(thr,
+ filename,
+ linenumber,
+ DUK_ERR_TYPE_ERROR,
+ "%s required, found %s (stack index %ld)",
+ expect_name,
+ duk_get_type_name(thr, idx),
+ (long) idx);
}
#else
-DUK_INTERNAL DUK_COLD void duk_err_require_type_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t idx, const char *expect_name) {
- DUK_ERROR_RAW_FMT3(thr, filename, linenumber, DUK_ERR_TYPE_ERROR, "%s required, found %s (stack index %ld)",
- expect_name, duk_push_string_readable(thr, idx), (long) idx);
+DUK_INTERNAL DUK_COLD void duk_err_require_type_index(duk_hthread *thr,
+ const char *filename,
+ duk_int_t linenumber,
+ duk_idx_t idx,
+ const char *expect_name) {
+ DUK_ERROR_RAW_FMT3(thr,
+ filename,
+ linenumber,
+ DUK_ERR_TYPE_ERROR,
+ "%s required, found %s (stack index %ld)",
+ expect_name,
+ duk_push_string_readable(thr, idx),
+ (long) idx);
}
#endif
DUK_INTERNAL DUK_COLD void duk_err_error_internal(duk_hthread *thr, const char *filename, duk_int_t linenumber) {
@@ -11815,14 +12669,14 @@ DUK_INTERNAL const duk_int8_t duk_is_idchar_tab[128] = {
* 1: IdentifierStart and IdentifierPart
* -1: IdentifierPart only
*/
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00...0x0f */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10...0x1f */
- 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20...0x2f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, /* 0x30...0x3f */
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40...0x4f */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 0x50...0x5f */
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60...0x6f */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 /* 0x70...0x7f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00...0x0f */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10...0x1f */
+ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20...0x2f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, /* 0x30...0x3f */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40...0x4f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 0x50...0x5f */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60...0x6f */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 /* 0x70...0x7f */
};
#endif
@@ -11872,15 +12726,13 @@ DUK_INTERNAL duk_small_int_t duk_unicode_get_cesu8_length(duk_ucodepoint_t cp) {
/* Encoded as surrogate pair, each encoding to 3 bytes for
* 6 bytes total. Codepoints above U+10FFFF encode as 6 bytes
* too, see duk_unicode_encode_cesu8().
- */
+ */
return 3 + 3;
}
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
-DUK_INTERNAL const duk_uint8_t duk_unicode_xutf8_markers[7] = {
- 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe
-};
+DUK_INTERNAL const duk_uint8_t duk_unicode_xutf8_markers[7] = { 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
/* Encode to extended UTF-8; 'out' must have space for at least
* DUK_UNICODE_MAX_XUTF8_LENGTH bytes. Allows encoding of any
@@ -11895,7 +12747,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_encode_xutf8(duk_ucodepoint_t cp, duk_u
len = duk_unicode_get_xutf8_length(cp);
DUK_ASSERT(len > 0);
- marker = duk_unicode_xutf8_markers[len - 1]; /* 64-bit OK because always >= 0 */
+ marker = duk_unicode_xutf8_markers[len - 1]; /* 64-bit OK because always >= 0 */
i = len;
DUK_ASSERT(i > 0);
@@ -11980,7 +12832,11 @@ DUK_INTERNAL duk_small_int_t duk_unicode_encode_cesu8(duk_ucodepoint_t cp, duk_u
}
/* Decode helper. Return zero on error. */
-DUK_INTERNAL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end, duk_ucodepoint_t *out_cp) {
+DUK_INTERNAL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr,
+ const duk_uint8_t **ptr,
+ const duk_uint8_t *ptr_start,
+ const duk_uint8_t *ptr_end,
+ duk_ucodepoint_t *out_cp) {
const duk_uint8_t *p;
duk_uint32_t res;
duk_uint_fast8_t ch;
@@ -12042,7 +12898,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr, const du
goto fail;
}
- DUK_ASSERT(p >= ptr_start); /* verified at beginning */
+ DUK_ASSERT(p >= ptr_start); /* verified at beginning */
if (p + n > ptr_end) {
/* check pointer at end */
goto fail;
@@ -12068,12 +12924,15 @@ DUK_INTERNAL duk_small_int_t duk_unicode_decode_xutf8(duk_hthread *thr, const du
*out_cp = res;
return 1;
- fail:
+fail:
return 0;
}
/* used by e.g. duk_regexp_executor.c, string built-ins */
-DUK_INTERNAL duk_ucodepoint_t duk_unicode_decode_xutf8_checked(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end) {
+DUK_INTERNAL duk_ucodepoint_t duk_unicode_decode_xutf8_checked(duk_hthread *thr,
+ const duk_uint8_t **ptr,
+ const duk_uint8_t *ptr_start,
+ const duk_uint8_t *ptr_end) {
duk_ucodepoint_t cp;
if (duk_unicode_decode_xutf8(thr, ptr, ptr_start, ptr_end, &cp)) {
@@ -12120,7 +12979,7 @@ DUK_INTERNAL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *d
DUK_ASSERT(clen <= blen);
return clen;
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
/* This seems like a good overall approach. Fast path for ASCII in 4 byte
* blocks.
*/
@@ -12132,7 +12991,7 @@ DUK_INTERNAL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *d
duk_size_t ncont;
duk_size_t clen;
- ncont = 0; /* number of continuation (non-initial) bytes in [0x80,0xbf] */
+ ncont = 0; /* number of continuation (non-initial) bytes in [0x80,0xbf] */
p = data;
p_end = data + blen;
if (blen < 16) {
@@ -12157,7 +13016,7 @@ DUK_INTERNAL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *d
duk_uint32_t x;
x = *p32++;
if (DUK_LIKELY((x & 0x80808080UL) == 0)) {
- ; /* ASCII fast path */
+ ; /* ASCII fast path */
} else {
/* Flip highest bit of each byte which changes
* the bit pattern 10xxxxxx into 00xxxxxx which
@@ -12181,7 +13040,7 @@ DUK_INTERNAL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *d
p = (const duk_uint8_t *) p32;
/* Fall through to handle the rest. */
- skip_fastpath:
+skip_fastpath:
while (p != p_end) {
duk_uint8_t x;
x = *p++;
@@ -12195,7 +13054,91 @@ DUK_INTERNAL duk_size_t duk_unicode_unvalidated_utf8_length(const duk_uint8_t *d
DUK_ASSERT(clen <= blen);
return clen;
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
+
+/* Check whether a string is UTF-8 compatible or not. */
+DUK_INTERNAL duk_bool_t duk_unicode_is_utf8_compatible(const duk_uint8_t *buf, duk_size_t len) {
+ duk_size_t i = 0;
+#if !defined(DUK_USE_PREFER_SIZE)
+ duk_size_t len_safe;
+#endif
+
+ /* Many practical strings are ASCII only, so use a fast path check
+ * to check chunks of bytes at once with minimal branch cost.
+ */
+#if !defined(DUK_USE_PREFER_SIZE)
+ len_safe = len & ~0x03UL;
+ for (; i < len_safe; i += 4) {
+ duk_uint8_t t = buf[i] | buf[i + 1] | buf[i + 2] | buf[i + 3];
+ if (DUK_UNLIKELY((t & 0x80U) != 0U)) {
+ /* At least one byte was outside 0x00-0x7f, break
+ * out to slow path (and remain there).
+ *
+ * XXX: We could also deal with the problem character
+ * and resume fast path later.
+ */
+ break;
+ }
+ }
+#endif
+
+ for (; i < len;) {
+ duk_uint8_t t;
+ duk_size_t left;
+ duk_size_t ncont;
+ duk_uint32_t cp;
+ duk_uint32_t mincp;
+
+ t = buf[i++];
+ if (DUK_LIKELY((t & 0x80U) == 0U)) {
+ /* Fast path, ASCII. */
+ continue;
+ }
+
+ /* Non-ASCII start byte, slow path.
+ *
+ * 10xx xxxx -> continuation byte
+ * 110x xxxx + 1*CONT -> [0x80, 0x7ff]
+ * 1110 xxxx + 2*CONT -> [0x800, 0xffff], must reject [0xd800,0xdfff]
+ * 1111 0xxx + 3*CONT -> [0x10000, 0x10ffff]
+ */
+ left = len - i;
+ if (t <= 0xdfU) { /* 1101 1111 = 0xdf */
+ if (t <= 0xbfU) { /* 1011 1111 = 0xbf */
+ return 0;
+ }
+ ncont = 1;
+ mincp = 0x80UL;
+ cp = t & 0x1fU;
+ } else if (t <= 0xefU) { /* 1110 1111 = 0xef */
+ ncont = 2;
+ mincp = 0x800UL;
+ cp = t & 0x0fU;
+ } else if (t <= 0xf7U) { /* 1111 0111 = 0xf7 */
+ ncont = 3;
+ mincp = 0x10000UL;
+ cp = t & 0x07U;
+ } else {
+ return 0;
+ }
+ if (left < ncont) {
+ return 0;
+ }
+ while (ncont > 0U) {
+ t = buf[i++];
+ if ((t & 0xc0U) != 0x80U) { /* 10xx xxxx */
+ return 0;
+ }
+ cp = (cp << 6) + (t & 0x3fU);
+ ncont--;
+ }
+ if (cp < mincp || cp > 0x10ffffUL || (cp >= 0xd800UL && cp <= 0xdfffUL)) {
+ return 0;
+ }
+ }
+
+ return 1;
+}
/*
* Unicode range matcher
@@ -12249,7 +13192,9 @@ DUK_LOCAL duk_small_int_t duk__uni_range_match(const duk_uint8_t *unitab, duk_si
/* [r1,r2] is the range */
DUK_DDD(DUK_DDDPRINT("duk__uni_range_match: cp=%06lx range=[0x%06lx,0x%06lx]",
- (unsigned long) cp, (unsigned long) r1, (unsigned long) r2));
+ (unsigned long) cp,
+ (unsigned long) r1,
+ (unsigned long) r2));
if (cp >= r1 && cp <= r2) {
return 1;
}
@@ -12319,19 +13264,17 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_whitespace(duk_codepoint_t cp) {
/* cp == -1 (EOF) never matches and causes return value 0 */
lo = (duk_uint_fast8_t) (cp & 0xff);
- hi = (duk_uint_fast32_t) (cp >> 8); /* does not fit into an uchar */
+ hi = (duk_uint_fast32_t) (cp >> 8); /* does not fit into an uchar */
if (hi == 0x0000UL) {
- if (lo == 0x09U || lo == 0x0bU || lo == 0x0cU ||
- lo == 0x20U || lo == 0xa0U) {
+ if (lo == 0x09U || lo == 0x0bU || lo == 0x0cU || lo == 0x20U || lo == 0xa0U) {
return 1;
}
} else if (hi == 0x0020UL) {
if (lo <= 0x0aU || lo == 0x2fU || lo == 0x5fU) {
return 1;
}
- } else if (cp == 0x1680L || cp == 0x180eL || cp == 0x3000L ||
- cp == 0xfeffL) {
+ } else if (cp == 0x1680L || cp == 0x180eL || cp == 0x3000L || cp == 0xfeffL) {
return 1;
}
@@ -12350,8 +13293,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_line_terminator(duk_codepoint_t cp)
* into a single line terminator. This must be handled by the caller.
*/
- if (cp == 0x000aL || cp == 0x000dL || cp == 0x2028L ||
- cp == 0x2029L) {
+ if (cp == 0x000aL || cp == 0x000dL || cp == 0x2028L || cp == 0x2029L) {
return 1;
}
@@ -12402,9 +13344,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_identifier_start(duk_codepoint_t cp)
#if defined(DUK_USE_IDCHAR_FASTPATH)
return (cp >= 0) && (duk_is_idchar_tab[cp] > 0);
#else
- if ((cp >= 'a' && cp <= 'z') ||
- (cp >= 'A' && cp <= 'Z') ||
- cp == '_' || cp == '$') {
+ if ((cp >= 'a' && cp <= 'z') || (cp >= 'A' && cp <= 'Z') || cp == '_' || cp == '$') {
return 1;
}
return 0;
@@ -12414,17 +13354,13 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_identifier_start(duk_codepoint_t cp)
/* Non-ASCII slow path (range-by-range linear comparison), very slow */
#if defined(DUK_USE_SOURCE_NONBMP)
- if (duk__uni_range_match(duk_unicode_ids_noa,
- (duk_size_t) sizeof(duk_unicode_ids_noa),
- (duk_codepoint_t) cp)) {
+ if (duk__uni_range_match(duk_unicode_ids_noa, (duk_size_t) sizeof(duk_unicode_ids_noa), (duk_codepoint_t) cp)) {
return 1;
}
return 0;
#else
if (cp < 0x10000L) {
- if (duk__uni_range_match(duk_unicode_ids_noabmp,
- sizeof(duk_unicode_ids_noabmp),
- (duk_codepoint_t) cp)) {
+ if (duk__uni_range_match(duk_unicode_ids_noabmp, sizeof(duk_unicode_ids_noabmp), (duk_codepoint_t) cp)) {
return 1;
}
return 0;
@@ -12491,10 +13427,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_identifier_part(duk_codepoint_t cp)
#if defined(DUK_USE_IDCHAR_FASTPATH)
return (cp >= 0) && (duk_is_idchar_tab[cp] != 0);
#else
- if ((cp >= 'a' && cp <= 'z') ||
- (cp >= 'A' && cp <= 'Z') ||
- (cp >= '0' && cp <= '9') ||
- cp == '_' || cp == '$') {
+ if ((cp >= 'a' && cp <= 'z') || (cp >= 'A' && cp <= 'Z') || (cp >= '0' && cp <= '9') || cp == '_' || cp == '$') {
return 1;
}
return 0;
@@ -12504,20 +13437,14 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_identifier_part(duk_codepoint_t cp)
/* Non-ASCII slow path (range-by-range linear comparison), very slow */
#if defined(DUK_USE_SOURCE_NONBMP)
- if (duk__uni_range_match(duk_unicode_ids_noa,
- sizeof(duk_unicode_ids_noa),
- (duk_codepoint_t) cp) ||
- duk__uni_range_match(duk_unicode_idp_m_ids_noa,
- sizeof(duk_unicode_idp_m_ids_noa),
- (duk_codepoint_t) cp)) {
+ if (duk__uni_range_match(duk_unicode_ids_noa, sizeof(duk_unicode_ids_noa), (duk_codepoint_t) cp) ||
+ duk__uni_range_match(duk_unicode_idp_m_ids_noa, sizeof(duk_unicode_idp_m_ids_noa), (duk_codepoint_t) cp)) {
return 1;
}
return 0;
#else
if (cp < 0x10000L) {
- if (duk__uni_range_match(duk_unicode_ids_noabmp,
- sizeof(duk_unicode_ids_noabmp),
- (duk_codepoint_t) cp) ||
+ if (duk__uni_range_match(duk_unicode_ids_noabmp, sizeof(duk_unicode_ids_noabmp), (duk_codepoint_t) cp) ||
duk__uni_range_match(duk_unicode_idp_m_ids_noabmp,
sizeof(duk_unicode_idp_m_ids_noabmp),
(duk_codepoint_t) cp)) {
@@ -12553,8 +13480,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_letter(duk_codepoint_t cp) {
/* ASCII (and EOF) fast path -- quick accept and reject */
if (cp <= 0x7fL) {
- if ((cp >= 'a' && cp <= 'z') ||
- (cp >= 'A' && cp <= 'Z')) {
+ if ((cp >= 'a' && cp <= 'z') || (cp >= 'A' && cp <= 'Z')) {
return 1;
}
return 0;
@@ -12563,20 +13489,14 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_letter(duk_codepoint_t cp) {
/* Non-ASCII slow path (range-by-range linear comparison), very slow */
#if defined(DUK_USE_SOURCE_NONBMP)
- if (duk__uni_range_match(duk_unicode_ids_noa,
- sizeof(duk_unicode_ids_noa),
- (duk_codepoint_t) cp) &&
- !duk__uni_range_match(duk_unicode_ids_m_let_noa,
- sizeof(duk_unicode_ids_m_let_noa),
- (duk_codepoint_t) cp)) {
+ if (duk__uni_range_match(duk_unicode_ids_noa, sizeof(duk_unicode_ids_noa), (duk_codepoint_t) cp) &&
+ !duk__uni_range_match(duk_unicode_ids_m_let_noa, sizeof(duk_unicode_ids_m_let_noa), (duk_codepoint_t) cp)) {
return 1;
}
return 0;
#else
if (cp < 0x10000L) {
- if (duk__uni_range_match(duk_unicode_ids_noabmp,
- sizeof(duk_unicode_ids_noabmp),
- (duk_codepoint_t) cp) &&
+ if (duk__uni_range_match(duk_unicode_ids_noabmp, sizeof(duk_unicode_ids_noabmp), (duk_codepoint_t) cp) &&
!duk__uni_range_match(duk_unicode_ids_m_let_noabmp,
sizeof(duk_unicode_ids_m_let_noabmp),
(duk_codepoint_t) cp)) {
@@ -12613,10 +13533,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_is_letter(duk_codepoint_t cp) {
*/
DUK_LOCAL
-duk_codepoint_t duk__slow_case_conversion(duk_hthread *thr,
- duk_bufwriter_ctx *bw,
- duk_codepoint_t cp,
- duk_bitdecoder_ctx *bd_ctx) {
+duk_codepoint_t duk__slow_case_conversion(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_codepoint_t cp, duk_bitdecoder_ctx *bd_ctx) {
duk_small_int_t skip = 0;
duk_small_int_t n;
duk_small_int_t t;
@@ -12646,10 +13563,13 @@ duk_codepoint_t duk__slow_case_conversion(duk_hthread *thr,
start_o = (duk_codepoint_t) duk_bd_decode(bd_ctx, 16);
count = (duk_small_int_t) duk_bd_decode(bd_ctx, 7);
DUK_DDD(DUK_DDDPRINT("range: start_i=%ld, start_o=%ld, count=%ld, skip=%ld",
- (long) start_i, (long) start_o, (long) count, (long) skip));
+ (long) start_i,
+ (long) start_o,
+ (long) count,
+ (long) skip));
if (cp >= start_i) {
- tmp_cp = cp - start_i; /* always >= 0 */
+ tmp_cp = cp - start_i; /* always >= 0 */
if (tmp_cp < (duk_codepoint_t) count * (duk_codepoint_t) skip &&
(tmp_cp % (duk_codepoint_t) skip) == 0) {
DUK_DDD(DUK_DDDPRINT("range matches input codepoint"));
@@ -12701,7 +13621,7 @@ duk_codepoint_t duk__slow_case_conversion(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("no rule matches, output is same as input"));
/* fall through */
- single:
+single:
if (bw != NULL) {
DUK_BW_WRITE_RAW_XUTF8(thr, bw, (duk_ucodepoint_t) cp);
}
@@ -12763,9 +13683,9 @@ duk_codepoint_t duk__case_transform_helper(duk_hthread *thr,
* The rule is not locale/language specific so it is supported.
*/
- if (cp == 0x03a3L && /* U+03A3 = GREEK CAPITAL LETTER SIGMA */
- duk_unicode_is_letter(prev) && /* prev exists and is not a letter */
- !duk_unicode_is_letter(next)) { /* next does not exist or next is not a letter */
+ if (cp == 0x03a3L && /* U+03A3 = GREEK CAPITAL LETTER SIGMA */
+ duk_unicode_is_letter(prev) && /* prev exists and is not a letter */
+ !duk_unicode_is_letter(next)) { /* next does not exist or next is not a letter */
/* Capital sigma occurred at "end of word", lowercase to
* U+03C2 = GREEK SMALL LETTER FINAL SIGMA. Otherwise
* fall through and let the normal rules lowercase it to
@@ -12791,13 +13711,13 @@ duk_codepoint_t duk__case_transform_helper(duk_hthread *thr,
}
return duk__slow_case_conversion(thr, bw, cp, &bd_ctx);
- singlechar:
+singlechar:
if (bw != NULL) {
DUK_BW_WRITE_RAW_XUTF8(thr, bw, (duk_ucodepoint_t) cp);
}
return cp;
- /* unused now, not needed until Turkish/Azeri */
+ /* unused now, not needed until Turkish/Azeri */
#if 0
nochar:
return -1;
@@ -12815,7 +13735,7 @@ DUK_INTERNAL void duk_unicode_case_convert_string(duk_hthread *thr, duk_bool_t u
const duk_uint8_t *p, *p_start, *p_end;
duk_codepoint_t prev, curr, next;
- h_input = duk_require_hstring(thr, -1); /* Accept symbols. */
+ h_input = duk_require_hstring(thr, -1); /* Accept symbols. */
DUK_ASSERT(h_input != NULL);
bw = &bw_alloc;
@@ -12827,7 +13747,8 @@ DUK_INTERNAL void duk_unicode_case_convert_string(duk_hthread *thr, duk_bool_t u
p_end = p_start + DUK_HSTRING_GET_BYTELEN(h_input);
p = p_start;
- prev = -1; DUK_UNREF(prev);
+ prev = -1;
+ DUK_UNREF(prev);
curr = -1;
next = -1;
for (;;) {
@@ -12852,17 +13773,12 @@ DUK_INTERNAL void duk_unicode_case_convert_string(duk_hthread *thr, duk_bool_t u
/* Ensure space for maximum multi-character result; estimate is overkill. */
DUK_BW_ENSURE(thr, bw, 8 * DUK_UNICODE_MAX_XUTF8_LENGTH);
- duk__case_transform_helper(thr,
- bw,
- (duk_codepoint_t) curr,
- prev,
- next,
- uppercase);
+ duk__case_transform_helper(thr, bw, (duk_codepoint_t) curr, prev, next, uppercase);
}
}
DUK_BW_COMPACT(thr, bw);
- (void) duk_buffer_to_string(thr, -1); /* Safe, output is encoded. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe, output is encoded. */
/* invalidates h_buf pointer */
duk_remove_m2(thr);
}
@@ -12885,15 +13801,15 @@ DUK_INTERNAL duk_codepoint_t duk_unicode_re_canonicalize_char(duk_hthread *thr,
return (duk_codepoint_t) duk_unicode_re_canon_lookup[cp];
}
return cp;
-#else /* DUK_USE_REGEXP_CANON_WORKAROUND */
+#else /* DUK_USE_REGEXP_CANON_WORKAROUND */
duk_codepoint_t y;
y = duk__case_transform_helper(thr,
- NULL, /* NULL is allowed, no output */
- cp, /* curr char */
- -1, /* prev char */
- -1, /* next char */
- 1); /* uppercase */
+ NULL, /* NULL is allowed, no output */
+ cp, /* curr char */
+ -1, /* prev char */
+ -1, /* next char */
+ 1); /* uppercase */
if ((y < 0) || (cp >= 0x80 && y < 0x80)) {
/* multiple codepoint conversion or non-ASCII mapped to ASCII
@@ -12903,7 +13819,7 @@ DUK_INTERNAL duk_codepoint_t duk_unicode_re_canonicalize_char(duk_hthread *thr,
}
return y;
-#endif /* DUK_USE_REGEXP_CANON_WORKAROUND */
+#endif /* DUK_USE_REGEXP_CANON_WORKAROUND */
}
/*
@@ -12916,10 +13832,7 @@ DUK_INTERNAL duk_small_int_t duk_unicode_re_is_wordchar(duk_codepoint_t x) {
* Note: the description in E5 Section 15.10.2.6 has a typo, it
* contains 'A' twice and lacks 'a'; the intent is [0-9a-zA-Z_].
*/
- if ((x >= '0' && x <= '9') ||
- (x >= 'a' && x <= 'z') ||
- (x >= 'A' && x <= 'Z') ||
- (x == '_')) {
+ if ((x >= '0' && x <= '9') || (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || (x == '_')) {
return 1;
}
return 0;
@@ -12931,54 +13844,187 @@ DUK_INTERNAL duk_small_int_t duk_unicode_re_is_wordchar(duk_codepoint_t x) {
/* exposed because lexer needs these too */
DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_digit[2] = {
- (duk_uint16_t) 0x0030UL, (duk_uint16_t) 0x0039UL,
+ (duk_uint16_t) 0x0030UL,
+ (duk_uint16_t) 0x0039UL,
};
DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_white[22] = {
- (duk_uint16_t) 0x0009UL, (duk_uint16_t) 0x000DUL,
- (duk_uint16_t) 0x0020UL, (duk_uint16_t) 0x0020UL,
- (duk_uint16_t) 0x00A0UL, (duk_uint16_t) 0x00A0UL,
- (duk_uint16_t) 0x1680UL, (duk_uint16_t) 0x1680UL,
- (duk_uint16_t) 0x180EUL, (duk_uint16_t) 0x180EUL,
- (duk_uint16_t) 0x2000UL, (duk_uint16_t) 0x200AUL,
- (duk_uint16_t) 0x2028UL, (duk_uint16_t) 0x2029UL,
- (duk_uint16_t) 0x202FUL, (duk_uint16_t) 0x202FUL,
- (duk_uint16_t) 0x205FUL, (duk_uint16_t) 0x205FUL,
- (duk_uint16_t) 0x3000UL, (duk_uint16_t) 0x3000UL,
+ (duk_uint16_t) 0x0009UL, (duk_uint16_t) 0x000DUL, (duk_uint16_t) 0x0020UL, (duk_uint16_t) 0x0020UL, (duk_uint16_t) 0x00A0UL,
+ (duk_uint16_t) 0x00A0UL, (duk_uint16_t) 0x1680UL, (duk_uint16_t) 0x1680UL, (duk_uint16_t) 0x180EUL, (duk_uint16_t) 0x180EUL,
+ (duk_uint16_t) 0x2000UL, (duk_uint16_t) 0x200AUL, (duk_uint16_t) 0x2028UL, (duk_uint16_t) 0x2029UL, (duk_uint16_t) 0x202FUL,
+ (duk_uint16_t) 0x202FUL, (duk_uint16_t) 0x205FUL, (duk_uint16_t) 0x205FUL, (duk_uint16_t) 0x3000UL, (duk_uint16_t) 0x3000UL,
(duk_uint16_t) 0xFEFFUL, (duk_uint16_t) 0xFEFFUL,
};
DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_wordchar[8] = {
- (duk_uint16_t) 0x0030UL, (duk_uint16_t) 0x0039UL,
- (duk_uint16_t) 0x0041UL, (duk_uint16_t) 0x005AUL,
- (duk_uint16_t) 0x005FUL, (duk_uint16_t) 0x005FUL,
- (duk_uint16_t) 0x0061UL, (duk_uint16_t) 0x007AUL,
+ (duk_uint16_t) 0x0030UL, (duk_uint16_t) 0x0039UL, (duk_uint16_t) 0x0041UL, (duk_uint16_t) 0x005AUL,
+ (duk_uint16_t) 0x005FUL, (duk_uint16_t) 0x005FUL, (duk_uint16_t) 0x0061UL, (duk_uint16_t) 0x007AUL,
};
DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_not_digit[4] = {
- (duk_uint16_t) 0x0000UL, (duk_uint16_t) 0x002FUL,
- (duk_uint16_t) 0x003AUL, (duk_uint16_t) 0xFFFFUL,
+ (duk_uint16_t) 0x0000UL,
+ (duk_uint16_t) 0x002FUL,
+ (duk_uint16_t) 0x003AUL,
+ (duk_uint16_t) 0xFFFFUL,
};
DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_not_white[24] = {
- (duk_uint16_t) 0x0000UL, (duk_uint16_t) 0x0008UL,
- (duk_uint16_t) 0x000EUL, (duk_uint16_t) 0x001FUL,
- (duk_uint16_t) 0x0021UL, (duk_uint16_t) 0x009FUL,
- (duk_uint16_t) 0x00A1UL, (duk_uint16_t) 0x167FUL,
- (duk_uint16_t) 0x1681UL, (duk_uint16_t) 0x180DUL,
- (duk_uint16_t) 0x180FUL, (duk_uint16_t) 0x1FFFUL,
- (duk_uint16_t) 0x200BUL, (duk_uint16_t) 0x2027UL,
- (duk_uint16_t) 0x202AUL, (duk_uint16_t) 0x202EUL,
- (duk_uint16_t) 0x2030UL, (duk_uint16_t) 0x205EUL,
- (duk_uint16_t) 0x2060UL, (duk_uint16_t) 0x2FFFUL,
- (duk_uint16_t) 0x3001UL, (duk_uint16_t) 0xFEFEUL,
- (duk_uint16_t) 0xFF00UL, (duk_uint16_t) 0xFFFFUL,
+ (duk_uint16_t) 0x0000UL, (duk_uint16_t) 0x0008UL, (duk_uint16_t) 0x000EUL, (duk_uint16_t) 0x001FUL, (duk_uint16_t) 0x0021UL,
+ (duk_uint16_t) 0x009FUL, (duk_uint16_t) 0x00A1UL, (duk_uint16_t) 0x167FUL, (duk_uint16_t) 0x1681UL, (duk_uint16_t) 0x180DUL,
+ (duk_uint16_t) 0x180FUL, (duk_uint16_t) 0x1FFFUL, (duk_uint16_t) 0x200BUL, (duk_uint16_t) 0x2027UL, (duk_uint16_t) 0x202AUL,
+ (duk_uint16_t) 0x202EUL, (duk_uint16_t) 0x2030UL, (duk_uint16_t) 0x205EUL, (duk_uint16_t) 0x2060UL, (duk_uint16_t) 0x2FFFUL,
+ (duk_uint16_t) 0x3001UL, (duk_uint16_t) 0xFEFEUL, (duk_uint16_t) 0xFF00UL, (duk_uint16_t) 0xFFFFUL,
};
DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_not_wordchar[10] = {
- (duk_uint16_t) 0x0000UL, (duk_uint16_t) 0x002FUL,
- (duk_uint16_t) 0x003AUL, (duk_uint16_t) 0x0040UL,
- (duk_uint16_t) 0x005BUL, (duk_uint16_t) 0x005EUL,
- (duk_uint16_t) 0x0060UL, (duk_uint16_t) 0x0060UL,
- (duk_uint16_t) 0x007BUL, (duk_uint16_t) 0xFFFFUL,
+ (duk_uint16_t) 0x0000UL, (duk_uint16_t) 0x002FUL, (duk_uint16_t) 0x003AUL, (duk_uint16_t) 0x0040UL, (duk_uint16_t) 0x005BUL,
+ (duk_uint16_t) 0x005EUL, (duk_uint16_t) 0x0060UL, (duk_uint16_t) 0x0060UL, (duk_uint16_t) 0x007BUL, (duk_uint16_t) 0xFFFFUL,
};
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
+/*
+ * Macro support functions for reading/writing raw data.
+ *
+ * These are done using memcpy to ensure they're valid even for unaligned
+ * reads/writes on platforms where alignment counts. On x86 at least gcc
+ * is able to compile these into a bswap+mov. "Always inline" is used to
+ * ensure these macros compile to minimal code.
+ */
+
+/* #include duk_internal.h -> already included */
+
+union duk__u16_union {
+ duk_uint8_t b[2];
+ duk_uint16_t x;
+};
+typedef union duk__u16_union duk__u16_union;
+
+union duk__u32_union {
+ duk_uint8_t b[4];
+ duk_uint32_t x;
+};
+typedef union duk__u32_union duk__u32_union;
+
+#if defined(DUK_USE_64BIT_OPS)
+union duk__u64_union {
+ duk_uint8_t b[8];
+ duk_uint64_t x;
+};
+typedef union duk__u64_union duk__u64_union;
+#endif
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_uint16_t duk_raw_read_u16_be(const duk_uint8_t *p) {
+ duk__u16_union u;
+ duk_memcpy((void *) u.b, (const void *) p, (size_t) 2);
+ u.x = DUK_NTOH16(u.x);
+ return u.x;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_uint32_t duk_raw_read_u32_be(const duk_uint8_t *p) {
+ duk__u32_union u;
+ duk_memcpy((void *) u.b, (const void *) p, (size_t) 4);
+ u.x = DUK_NTOH32(u.x);
+ return u.x;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_float_t duk_raw_read_float_be(const duk_uint8_t *p) {
+ duk_float_union fu;
+ duk_memcpy((void *) fu.uc, (const void *) p, (size_t) 4);
+ duk_fltunion_big_to_host(&fu);
+ return fu.f;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_raw_read_double_be(const duk_uint8_t *p) {
+ duk_double_union du;
+ duk_memcpy((void *) du.uc, (const void *) p, (size_t) 8);
+ duk_dblunion_big_to_host(&du);
+ return du.d;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_uint16_t duk_raw_readinc_u16_be(const duk_uint8_t **p) {
+ duk_uint16_t res = duk_raw_read_u16_be(*p);
+ *p += 2;
+ return res;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_uint32_t duk_raw_readinc_u32_be(const duk_uint8_t **p) {
+ duk_uint32_t res = duk_raw_read_u32_be(*p);
+ *p += 4;
+ return res;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_float_t duk_raw_readinc_float_be(const duk_uint8_t **p) {
+ duk_float_t res = duk_raw_read_float_be(*p);
+ *p += 4;
+ return res;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_raw_readinc_double_be(const duk_uint8_t **p) {
+ duk_double_t res = duk_raw_read_double_be(*p);
+ *p += 8;
+ return res;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_u16_be(duk_uint8_t *p, duk_uint16_t val) {
+ duk__u16_union u;
+ u.x = DUK_HTON16(val);
+ duk_memcpy((void *) p, (const void *) u.b, (size_t) 2);
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_u32_be(duk_uint8_t *p, duk_uint32_t val) {
+ duk__u32_union u;
+ u.x = DUK_HTON32(val);
+ duk_memcpy((void *) p, (const void *) u.b, (size_t) 4);
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_float_be(duk_uint8_t *p, duk_float_t val) {
+ duk_float_union fu;
+ fu.f = val;
+ duk_fltunion_host_to_big(&fu);
+ duk_memcpy((void *) p, (const void *) fu.uc, (size_t) 4);
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_double_be(duk_uint8_t *p, duk_double_t val) {
+ duk_double_union du;
+ du.d = val;
+ duk_dblunion_host_to_big(&du);
+ duk_memcpy((void *) p, (const void *) du.uc, (size_t) 8);
+}
+
+DUK_INTERNAL duk_small_int_t duk_raw_write_xutf8(duk_uint8_t *p, duk_ucodepoint_t val) {
+ duk_small_int_t len = duk_unicode_encode_xutf8(val, p);
+ return len;
+}
+
+DUK_INTERNAL duk_small_int_t duk_raw_write_cesu8(duk_uint8_t *p, duk_ucodepoint_t val) {
+ duk_small_int_t len = duk_unicode_encode_cesu8(val, p);
+ return len;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_writeinc_u16_be(duk_uint8_t **p, duk_uint16_t val) {
+ duk_raw_write_u16_be(*p, val);
+ *p += 2;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_writeinc_u32_be(duk_uint8_t **p, duk_uint32_t val) {
+ duk_raw_write_u32_be(*p, val);
+ *p += 4;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_writeinc_float_be(duk_uint8_t **p, duk_float_t val) {
+ duk_raw_write_float_be(*p, val);
+ *p += 4;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_writeinc_double_be(duk_uint8_t **p, duk_double_t val) {
+ duk_raw_write_double_be(*p, val);
+ *p += 8;
+}
+
+DUK_INTERNAL void duk_raw_writeinc_xutf8(duk_uint8_t **p, duk_ucodepoint_t val) {
+ duk_small_int_t len = duk_unicode_encode_xutf8(val, *p);
+ *p += len;
+}
+
+DUK_INTERNAL void duk_raw_writeinc_cesu8(duk_uint8_t **p, duk_ucodepoint_t val) {
+ duk_small_int_t len = duk_unicode_encode_cesu8(val, *p);
+ *p += len;
+}
/*
* Misc util stuff.
*/
@@ -12991,23 +14037,17 @@ DUK_INTERNAL const duk_uint16_t duk_unicode_re_ranges_not_wordchar[10] = {
*/
DUK_INTERNAL const duk_uint8_t duk_lc_digits[36] = {
- DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3,
- DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7,
- DUK_ASC_8, DUK_ASC_9, DUK_ASC_LC_A, DUK_ASC_LC_B,
- DUK_ASC_LC_C, DUK_ASC_LC_D, DUK_ASC_LC_E, DUK_ASC_LC_F,
- DUK_ASC_LC_G, DUK_ASC_LC_H, DUK_ASC_LC_I, DUK_ASC_LC_J,
- DUK_ASC_LC_K, DUK_ASC_LC_L, DUK_ASC_LC_M, DUK_ASC_LC_N,
- DUK_ASC_LC_O, DUK_ASC_LC_P, DUK_ASC_LC_Q, DUK_ASC_LC_R,
- DUK_ASC_LC_S, DUK_ASC_LC_T, DUK_ASC_LC_U, DUK_ASC_LC_V,
+ DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3, DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7,
+ DUK_ASC_8, DUK_ASC_9, DUK_ASC_LC_A, DUK_ASC_LC_B, DUK_ASC_LC_C, DUK_ASC_LC_D, DUK_ASC_LC_E, DUK_ASC_LC_F,
+ DUK_ASC_LC_G, DUK_ASC_LC_H, DUK_ASC_LC_I, DUK_ASC_LC_J, DUK_ASC_LC_K, DUK_ASC_LC_L, DUK_ASC_LC_M, DUK_ASC_LC_N,
+ DUK_ASC_LC_O, DUK_ASC_LC_P, DUK_ASC_LC_Q, DUK_ASC_LC_R, DUK_ASC_LC_S, DUK_ASC_LC_T, DUK_ASC_LC_U, DUK_ASC_LC_V,
DUK_ASC_LC_W, DUK_ASC_LC_X, DUK_ASC_LC_Y, DUK_ASC_LC_Z
};
-DUK_INTERNAL const duk_uint8_t duk_uc_nybbles[16] = {
- DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3,
- DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7,
- DUK_ASC_8, DUK_ASC_9, DUK_ASC_UC_A, DUK_ASC_UC_B,
- DUK_ASC_UC_C, DUK_ASC_UC_D, DUK_ASC_UC_E, DUK_ASC_UC_F
-};
+DUK_INTERNAL const duk_uint8_t duk_uc_nybbles[16] = { DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3,
+ DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7,
+ DUK_ASC_8, DUK_ASC_9, DUK_ASC_UC_A, DUK_ASC_UC_B,
+ DUK_ASC_UC_C, DUK_ASC_UC_D, DUK_ASC_UC_E, DUK_ASC_UC_F };
/*
* Table for hex decoding ASCII hex digits
@@ -13015,43 +14055,43 @@ DUK_INTERNAL const duk_uint8_t duk_uc_nybbles[16] = {
DUK_INTERNAL const duk_int8_t duk_hex_dectab[256] = {
/* -1 if invalid */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00-0x0f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10-0x1f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20-0x2f */
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0x30-0x3f */
- -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40-0x4f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50-0x5f */
- -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60-0x6f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70-0x7f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80-0x8f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90-0x9f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xa0-0xaf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb0-0xbf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc0-0xcf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd0-0xdf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe0-0xef */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 0xf0-0xff */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00-0x0f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10-0x1f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20-0x2f */
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0x30-0x3f */
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40-0x4f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50-0x5f */
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60-0x6f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70-0x7f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80-0x8f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90-0x9f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xa0-0xaf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb0-0xbf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc0-0xcf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd0-0xdf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe0-0xef */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 0xf0-0xff */
};
#if defined(DUK_USE_HEX_FASTPATH)
/* Preshifted << 4. Must use 16-bit entry to allow negative value signaling. */
DUK_INTERNAL const duk_int16_t duk_hex_dectab_shift4[256] = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00-0x0f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10-0x1f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20-0x2f */
- 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, -1, -1, -1, -1, -1, -1, /* 0x30-0x3f */
- -1, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40-0x4f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50-0x5f */
- -1, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60-0x6f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70-0x7f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80-0x8f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90-0x9f */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xa0-0xaf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb0-0xbf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc0-0xcf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd0-0xdf */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe0-0xef */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 0xf0-0xff */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00-0x0f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10-0x1f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20-0x2f */
+ 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, -1, -1, -1, -1, -1, -1, /* 0x30-0x3f */
+ -1, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40-0x4f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50-0x5f */
+ -1, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60-0x6f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70-0x7f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80-0x8f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90-0x9f */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xa0-0xaf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb0-0xbf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc0-0xcf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd0-0xdf */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe0-0xef */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* 0xf0-0xff */
};
#endif
@@ -13070,77 +14110,53 @@ DUK_INTERNAL const duk_int16_t duk_hex_dectab_shift4[256] = {
* print('0x' + t.encode('hex') + 'U')
* print('big endian'); genhextab(False)
* print('little endian'); genhextab(True)
-*/
+ */
DUK_INTERNAL const duk_uint16_t duk_hex_enctab[256] = {
#if defined(DUK_USE_INTEGER_BE)
- 0x3030U, 0x3031U, 0x3032U, 0x3033U, 0x3034U, 0x3035U, 0x3036U, 0x3037U,
- 0x3038U, 0x3039U, 0x3061U, 0x3062U, 0x3063U, 0x3064U, 0x3065U, 0x3066U,
- 0x3130U, 0x3131U, 0x3132U, 0x3133U, 0x3134U, 0x3135U, 0x3136U, 0x3137U,
- 0x3138U, 0x3139U, 0x3161U, 0x3162U, 0x3163U, 0x3164U, 0x3165U, 0x3166U,
- 0x3230U, 0x3231U, 0x3232U, 0x3233U, 0x3234U, 0x3235U, 0x3236U, 0x3237U,
- 0x3238U, 0x3239U, 0x3261U, 0x3262U, 0x3263U, 0x3264U, 0x3265U, 0x3266U,
- 0x3330U, 0x3331U, 0x3332U, 0x3333U, 0x3334U, 0x3335U, 0x3336U, 0x3337U,
- 0x3338U, 0x3339U, 0x3361U, 0x3362U, 0x3363U, 0x3364U, 0x3365U, 0x3366U,
- 0x3430U, 0x3431U, 0x3432U, 0x3433U, 0x3434U, 0x3435U, 0x3436U, 0x3437U,
- 0x3438U, 0x3439U, 0x3461U, 0x3462U, 0x3463U, 0x3464U, 0x3465U, 0x3466U,
- 0x3530U, 0x3531U, 0x3532U, 0x3533U, 0x3534U, 0x3535U, 0x3536U, 0x3537U,
- 0x3538U, 0x3539U, 0x3561U, 0x3562U, 0x3563U, 0x3564U, 0x3565U, 0x3566U,
- 0x3630U, 0x3631U, 0x3632U, 0x3633U, 0x3634U, 0x3635U, 0x3636U, 0x3637U,
- 0x3638U, 0x3639U, 0x3661U, 0x3662U, 0x3663U, 0x3664U, 0x3665U, 0x3666U,
- 0x3730U, 0x3731U, 0x3732U, 0x3733U, 0x3734U, 0x3735U, 0x3736U, 0x3737U,
- 0x3738U, 0x3739U, 0x3761U, 0x3762U, 0x3763U, 0x3764U, 0x3765U, 0x3766U,
- 0x3830U, 0x3831U, 0x3832U, 0x3833U, 0x3834U, 0x3835U, 0x3836U, 0x3837U,
- 0x3838U, 0x3839U, 0x3861U, 0x3862U, 0x3863U, 0x3864U, 0x3865U, 0x3866U,
- 0x3930U, 0x3931U, 0x3932U, 0x3933U, 0x3934U, 0x3935U, 0x3936U, 0x3937U,
- 0x3938U, 0x3939U, 0x3961U, 0x3962U, 0x3963U, 0x3964U, 0x3965U, 0x3966U,
- 0x6130U, 0x6131U, 0x6132U, 0x6133U, 0x6134U, 0x6135U, 0x6136U, 0x6137U,
- 0x6138U, 0x6139U, 0x6161U, 0x6162U, 0x6163U, 0x6164U, 0x6165U, 0x6166U,
- 0x6230U, 0x6231U, 0x6232U, 0x6233U, 0x6234U, 0x6235U, 0x6236U, 0x6237U,
- 0x6238U, 0x6239U, 0x6261U, 0x6262U, 0x6263U, 0x6264U, 0x6265U, 0x6266U,
- 0x6330U, 0x6331U, 0x6332U, 0x6333U, 0x6334U, 0x6335U, 0x6336U, 0x6337U,
- 0x6338U, 0x6339U, 0x6361U, 0x6362U, 0x6363U, 0x6364U, 0x6365U, 0x6366U,
- 0x6430U, 0x6431U, 0x6432U, 0x6433U, 0x6434U, 0x6435U, 0x6436U, 0x6437U,
- 0x6438U, 0x6439U, 0x6461U, 0x6462U, 0x6463U, 0x6464U, 0x6465U, 0x6466U,
- 0x6530U, 0x6531U, 0x6532U, 0x6533U, 0x6534U, 0x6535U, 0x6536U, 0x6537U,
- 0x6538U, 0x6539U, 0x6561U, 0x6562U, 0x6563U, 0x6564U, 0x6565U, 0x6566U,
- 0x6630U, 0x6631U, 0x6632U, 0x6633U, 0x6634U, 0x6635U, 0x6636U, 0x6637U,
- 0x6638U, 0x6639U, 0x6661U, 0x6662U, 0x6663U, 0x6664U, 0x6665U, 0x6666U
-#else /* DUK_USE_INTEGER_BE */
- 0x3030U, 0x3130U, 0x3230U, 0x3330U, 0x3430U, 0x3530U, 0x3630U, 0x3730U,
- 0x3830U, 0x3930U, 0x6130U, 0x6230U, 0x6330U, 0x6430U, 0x6530U, 0x6630U,
- 0x3031U, 0x3131U, 0x3231U, 0x3331U, 0x3431U, 0x3531U, 0x3631U, 0x3731U,
- 0x3831U, 0x3931U, 0x6131U, 0x6231U, 0x6331U, 0x6431U, 0x6531U, 0x6631U,
- 0x3032U, 0x3132U, 0x3232U, 0x3332U, 0x3432U, 0x3532U, 0x3632U, 0x3732U,
- 0x3832U, 0x3932U, 0x6132U, 0x6232U, 0x6332U, 0x6432U, 0x6532U, 0x6632U,
- 0x3033U, 0x3133U, 0x3233U, 0x3333U, 0x3433U, 0x3533U, 0x3633U, 0x3733U,
- 0x3833U, 0x3933U, 0x6133U, 0x6233U, 0x6333U, 0x6433U, 0x6533U, 0x6633U,
- 0x3034U, 0x3134U, 0x3234U, 0x3334U, 0x3434U, 0x3534U, 0x3634U, 0x3734U,
- 0x3834U, 0x3934U, 0x6134U, 0x6234U, 0x6334U, 0x6434U, 0x6534U, 0x6634U,
- 0x3035U, 0x3135U, 0x3235U, 0x3335U, 0x3435U, 0x3535U, 0x3635U, 0x3735U,
- 0x3835U, 0x3935U, 0x6135U, 0x6235U, 0x6335U, 0x6435U, 0x6535U, 0x6635U,
- 0x3036U, 0x3136U, 0x3236U, 0x3336U, 0x3436U, 0x3536U, 0x3636U, 0x3736U,
- 0x3836U, 0x3936U, 0x6136U, 0x6236U, 0x6336U, 0x6436U, 0x6536U, 0x6636U,
- 0x3037U, 0x3137U, 0x3237U, 0x3337U, 0x3437U, 0x3537U, 0x3637U, 0x3737U,
- 0x3837U, 0x3937U, 0x6137U, 0x6237U, 0x6337U, 0x6437U, 0x6537U, 0x6637U,
- 0x3038U, 0x3138U, 0x3238U, 0x3338U, 0x3438U, 0x3538U, 0x3638U, 0x3738U,
- 0x3838U, 0x3938U, 0x6138U, 0x6238U, 0x6338U, 0x6438U, 0x6538U, 0x6638U,
- 0x3039U, 0x3139U, 0x3239U, 0x3339U, 0x3439U, 0x3539U, 0x3639U, 0x3739U,
- 0x3839U, 0x3939U, 0x6139U, 0x6239U, 0x6339U, 0x6439U, 0x6539U, 0x6639U,
- 0x3061U, 0x3161U, 0x3261U, 0x3361U, 0x3461U, 0x3561U, 0x3661U, 0x3761U,
- 0x3861U, 0x3961U, 0x6161U, 0x6261U, 0x6361U, 0x6461U, 0x6561U, 0x6661U,
- 0x3062U, 0x3162U, 0x3262U, 0x3362U, 0x3462U, 0x3562U, 0x3662U, 0x3762U,
- 0x3862U, 0x3962U, 0x6162U, 0x6262U, 0x6362U, 0x6462U, 0x6562U, 0x6662U,
- 0x3063U, 0x3163U, 0x3263U, 0x3363U, 0x3463U, 0x3563U, 0x3663U, 0x3763U,
- 0x3863U, 0x3963U, 0x6163U, 0x6263U, 0x6363U, 0x6463U, 0x6563U, 0x6663U,
- 0x3064U, 0x3164U, 0x3264U, 0x3364U, 0x3464U, 0x3564U, 0x3664U, 0x3764U,
- 0x3864U, 0x3964U, 0x6164U, 0x6264U, 0x6364U, 0x6464U, 0x6564U, 0x6664U,
- 0x3065U, 0x3165U, 0x3265U, 0x3365U, 0x3465U, 0x3565U, 0x3665U, 0x3765U,
- 0x3865U, 0x3965U, 0x6165U, 0x6265U, 0x6365U, 0x6465U, 0x6565U, 0x6665U,
- 0x3066U, 0x3166U, 0x3266U, 0x3366U, 0x3466U, 0x3566U, 0x3666U, 0x3766U,
- 0x3866U, 0x3966U, 0x6166U, 0x6266U, 0x6366U, 0x6466U, 0x6566U, 0x6666U
-#endif /* DUK_USE_INTEGER_BE */
+ 0x3030U, 0x3031U, 0x3032U, 0x3033U, 0x3034U, 0x3035U, 0x3036U, 0x3037U, 0x3038U, 0x3039U, 0x3061U, 0x3062U, 0x3063U,
+ 0x3064U, 0x3065U, 0x3066U, 0x3130U, 0x3131U, 0x3132U, 0x3133U, 0x3134U, 0x3135U, 0x3136U, 0x3137U, 0x3138U, 0x3139U,
+ 0x3161U, 0x3162U, 0x3163U, 0x3164U, 0x3165U, 0x3166U, 0x3230U, 0x3231U, 0x3232U, 0x3233U, 0x3234U, 0x3235U, 0x3236U,
+ 0x3237U, 0x3238U, 0x3239U, 0x3261U, 0x3262U, 0x3263U, 0x3264U, 0x3265U, 0x3266U, 0x3330U, 0x3331U, 0x3332U, 0x3333U,
+ 0x3334U, 0x3335U, 0x3336U, 0x3337U, 0x3338U, 0x3339U, 0x3361U, 0x3362U, 0x3363U, 0x3364U, 0x3365U, 0x3366U, 0x3430U,
+ 0x3431U, 0x3432U, 0x3433U, 0x3434U, 0x3435U, 0x3436U, 0x3437U, 0x3438U, 0x3439U, 0x3461U, 0x3462U, 0x3463U, 0x3464U,
+ 0x3465U, 0x3466U, 0x3530U, 0x3531U, 0x3532U, 0x3533U, 0x3534U, 0x3535U, 0x3536U, 0x3537U, 0x3538U, 0x3539U, 0x3561U,
+ 0x3562U, 0x3563U, 0x3564U, 0x3565U, 0x3566U, 0x3630U, 0x3631U, 0x3632U, 0x3633U, 0x3634U, 0x3635U, 0x3636U, 0x3637U,
+ 0x3638U, 0x3639U, 0x3661U, 0x3662U, 0x3663U, 0x3664U, 0x3665U, 0x3666U, 0x3730U, 0x3731U, 0x3732U, 0x3733U, 0x3734U,
+ 0x3735U, 0x3736U, 0x3737U, 0x3738U, 0x3739U, 0x3761U, 0x3762U, 0x3763U, 0x3764U, 0x3765U, 0x3766U, 0x3830U, 0x3831U,
+ 0x3832U, 0x3833U, 0x3834U, 0x3835U, 0x3836U, 0x3837U, 0x3838U, 0x3839U, 0x3861U, 0x3862U, 0x3863U, 0x3864U, 0x3865U,
+ 0x3866U, 0x3930U, 0x3931U, 0x3932U, 0x3933U, 0x3934U, 0x3935U, 0x3936U, 0x3937U, 0x3938U, 0x3939U, 0x3961U, 0x3962U,
+ 0x3963U, 0x3964U, 0x3965U, 0x3966U, 0x6130U, 0x6131U, 0x6132U, 0x6133U, 0x6134U, 0x6135U, 0x6136U, 0x6137U, 0x6138U,
+ 0x6139U, 0x6161U, 0x6162U, 0x6163U, 0x6164U, 0x6165U, 0x6166U, 0x6230U, 0x6231U, 0x6232U, 0x6233U, 0x6234U, 0x6235U,
+ 0x6236U, 0x6237U, 0x6238U, 0x6239U, 0x6261U, 0x6262U, 0x6263U, 0x6264U, 0x6265U, 0x6266U, 0x6330U, 0x6331U, 0x6332U,
+ 0x6333U, 0x6334U, 0x6335U, 0x6336U, 0x6337U, 0x6338U, 0x6339U, 0x6361U, 0x6362U, 0x6363U, 0x6364U, 0x6365U, 0x6366U,
+ 0x6430U, 0x6431U, 0x6432U, 0x6433U, 0x6434U, 0x6435U, 0x6436U, 0x6437U, 0x6438U, 0x6439U, 0x6461U, 0x6462U, 0x6463U,
+ 0x6464U, 0x6465U, 0x6466U, 0x6530U, 0x6531U, 0x6532U, 0x6533U, 0x6534U, 0x6535U, 0x6536U, 0x6537U, 0x6538U, 0x6539U,
+ 0x6561U, 0x6562U, 0x6563U, 0x6564U, 0x6565U, 0x6566U, 0x6630U, 0x6631U, 0x6632U, 0x6633U, 0x6634U, 0x6635U, 0x6636U,
+ 0x6637U, 0x6638U, 0x6639U, 0x6661U, 0x6662U, 0x6663U, 0x6664U, 0x6665U, 0x6666U
+#else /* DUK_USE_INTEGER_BE */
+ 0x3030U, 0x3130U, 0x3230U, 0x3330U, 0x3430U, 0x3530U, 0x3630U, 0x3730U, 0x3830U, 0x3930U, 0x6130U, 0x6230U, 0x6330U,
+ 0x6430U, 0x6530U, 0x6630U, 0x3031U, 0x3131U, 0x3231U, 0x3331U, 0x3431U, 0x3531U, 0x3631U, 0x3731U, 0x3831U, 0x3931U,
+ 0x6131U, 0x6231U, 0x6331U, 0x6431U, 0x6531U, 0x6631U, 0x3032U, 0x3132U, 0x3232U, 0x3332U, 0x3432U, 0x3532U, 0x3632U,
+ 0x3732U, 0x3832U, 0x3932U, 0x6132U, 0x6232U, 0x6332U, 0x6432U, 0x6532U, 0x6632U, 0x3033U, 0x3133U, 0x3233U, 0x3333U,
+ 0x3433U, 0x3533U, 0x3633U, 0x3733U, 0x3833U, 0x3933U, 0x6133U, 0x6233U, 0x6333U, 0x6433U, 0x6533U, 0x6633U, 0x3034U,
+ 0x3134U, 0x3234U, 0x3334U, 0x3434U, 0x3534U, 0x3634U, 0x3734U, 0x3834U, 0x3934U, 0x6134U, 0x6234U, 0x6334U, 0x6434U,
+ 0x6534U, 0x6634U, 0x3035U, 0x3135U, 0x3235U, 0x3335U, 0x3435U, 0x3535U, 0x3635U, 0x3735U, 0x3835U, 0x3935U, 0x6135U,
+ 0x6235U, 0x6335U, 0x6435U, 0x6535U, 0x6635U, 0x3036U, 0x3136U, 0x3236U, 0x3336U, 0x3436U, 0x3536U, 0x3636U, 0x3736U,
+ 0x3836U, 0x3936U, 0x6136U, 0x6236U, 0x6336U, 0x6436U, 0x6536U, 0x6636U, 0x3037U, 0x3137U, 0x3237U, 0x3337U, 0x3437U,
+ 0x3537U, 0x3637U, 0x3737U, 0x3837U, 0x3937U, 0x6137U, 0x6237U, 0x6337U, 0x6437U, 0x6537U, 0x6637U, 0x3038U, 0x3138U,
+ 0x3238U, 0x3338U, 0x3438U, 0x3538U, 0x3638U, 0x3738U, 0x3838U, 0x3938U, 0x6138U, 0x6238U, 0x6338U, 0x6438U, 0x6538U,
+ 0x6638U, 0x3039U, 0x3139U, 0x3239U, 0x3339U, 0x3439U, 0x3539U, 0x3639U, 0x3739U, 0x3839U, 0x3939U, 0x6139U, 0x6239U,
+ 0x6339U, 0x6439U, 0x6539U, 0x6639U, 0x3061U, 0x3161U, 0x3261U, 0x3361U, 0x3461U, 0x3561U, 0x3661U, 0x3761U, 0x3861U,
+ 0x3961U, 0x6161U, 0x6261U, 0x6361U, 0x6461U, 0x6561U, 0x6661U, 0x3062U, 0x3162U, 0x3262U, 0x3362U, 0x3462U, 0x3562U,
+ 0x3662U, 0x3762U, 0x3862U, 0x3962U, 0x6162U, 0x6262U, 0x6362U, 0x6462U, 0x6562U, 0x6662U, 0x3063U, 0x3163U, 0x3263U,
+ 0x3363U, 0x3463U, 0x3563U, 0x3663U, 0x3763U, 0x3863U, 0x3963U, 0x6163U, 0x6263U, 0x6363U, 0x6463U, 0x6563U, 0x6663U,
+ 0x3064U, 0x3164U, 0x3264U, 0x3364U, 0x3464U, 0x3564U, 0x3664U, 0x3764U, 0x3864U, 0x3964U, 0x6164U, 0x6264U, 0x6364U,
+ 0x6464U, 0x6564U, 0x6664U, 0x3065U, 0x3165U, 0x3265U, 0x3365U, 0x3465U, 0x3565U, 0x3665U, 0x3765U, 0x3865U, 0x3965U,
+ 0x6165U, 0x6265U, 0x6365U, 0x6465U, 0x6565U, 0x6665U, 0x3066U, 0x3166U, 0x3266U, 0x3366U, 0x3466U, 0x3566U, 0x3666U,
+ 0x3766U, 0x3866U, 0x3966U, 0x6166U, 0x6266U, 0x6366U, 0x6466U, 0x6566U, 0x6666U
+#endif /* DUK_USE_INTEGER_BE */
};
-#endif /* DUK_USE_HEX_FASTPATH */
+#endif /* DUK_USE_HEX_FASTPATH */
/*
* Arbitrary byteswap for potentially unaligned values
@@ -13148,7 +14164,7 @@ DUK_INTERNAL const duk_uint16_t duk_hex_enctab[256] = {
* Used to byteswap pointers e.g. in debugger code.
*/
-#if defined(DUK_USE_DEBUGGER_SUPPORT) /* For now only needed by the debugger. */
+#if defined(DUK_USE_DEBUGGER_SUPPORT) /* For now only needed by the debugger. */
DUK_INTERNAL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len) {
duk_uint8_t tmp;
duk_uint8_t *q = p + len - 1;
@@ -13162,6 +14178,18 @@ DUK_INTERNAL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len) {
}
}
#endif
+
+/*
+ * Random
+ */
+
+DUK_INTERNAL duk_double_t duk_util_get_random_double(duk_hthread *thr) {
+#if defined(DUK_USE_GET_RANDOM_DOUBLE)
+ return DUK_USE_GET_RANDOM_DOUBLE(thr->heap->heap_udata);
+#else
+ return duk_util_tinyrandom_get_double(thr);
+#endif
+}
/*
* Hobject ECMAScript [[Class]].
*/
@@ -13171,13 +14199,13 @@ DUK_INTERNAL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len) {
#if (DUK_STRIDX_UC_ARGUMENTS > 255)
#error constant too large
#endif
-#if (DUK_STRIDX_ARRAY > 255)
+#if (DUK_STRIDX_UC_ARRAY > 255)
#error constant too large
#endif
#if (DUK_STRIDX_UC_BOOLEAN > 255)
#error constant too large
#endif
-#if (DUK_STRIDX_DATE > 255)
+#if (DUK_STRIDX_UC_DATE > 255)
#error constant too large
#endif
#if (DUK_STRIDX_UC_ERROR > 255)
@@ -13258,13 +14286,13 @@ DUK_INTERNAL void duk_byteswap_bytes(duk_uint8_t *p, duk_small_uint_t len) {
/* Note: assumes that these string indexes are 8-bit, genstrings.py must ensure that */
DUK_INTERNAL duk_uint8_t duk_class_number_to_stridx[32] = {
- DUK_STRIDX_EMPTY_STRING, /* NONE, intentionally empty */
+ DUK_STRIDX_EMPTY_STRING, /* NONE, intentionally empty */
DUK_STRIDX_UC_OBJECT,
- DUK_STRIDX_ARRAY,
+ DUK_STRIDX_UC_ARRAY,
DUK_STRIDX_UC_FUNCTION,
DUK_STRIDX_UC_ARGUMENTS,
DUK_STRIDX_UC_BOOLEAN,
- DUK_STRIDX_DATE,
+ DUK_STRIDX_UC_DATE,
DUK_STRIDX_UC_ERROR,
DUK_STRIDX_JSON,
DUK_STRIDX_MATH,
@@ -13288,8 +14316,8 @@ DUK_INTERNAL duk_uint8_t duk_class_number_to_stridx[32] = {
DUK_STRIDX_UINT32_ARRAY,
DUK_STRIDX_FLOAT32_ARRAY,
DUK_STRIDX_FLOAT64_ARRAY,
- DUK_STRIDX_EMPTY_STRING, /* UNUSED, intentionally empty */
- DUK_STRIDX_EMPTY_STRING, /* UNUSED, intentionally empty */
+ DUK_STRIDX_EMPTY_STRING, /* UNUSED, intentionally empty */
+ DUK_STRIDX_EMPTY_STRING, /* UNUSED, intentionally empty */
};
/*
* Default allocation functions.
@@ -13305,8 +14333,7 @@ DUK_INTERNAL void *duk_default_alloc_function(void *udata, duk_size_t size) {
void *res;
DUK_UNREF(udata);
res = DUK_ANSI_MALLOC(size);
- DUK_DDD(DUK_DDDPRINT("default alloc function: %lu -> %p",
- (unsigned long) size, (void *) res));
+ DUK_DDD(DUK_DDDPRINT("default alloc function: %lu -> %p", (unsigned long) size, (void *) res));
return res;
}
@@ -13314,8 +14341,7 @@ DUK_INTERNAL void *duk_default_realloc_function(void *udata, void *ptr, duk_size
void *res;
DUK_UNREF(udata);
res = DUK_ANSI_REALLOC(ptr, newsize);
- DUK_DDD(DUK_DDDPRINT("default realloc function: %p %lu -> %p",
- (void *) ptr, (unsigned long) newsize, (void *) res));
+ DUK_DDD(DUK_DDDPRINT("default realloc function: %p %lu -> %p", (void *) ptr, (unsigned long) newsize, (void *) res));
return res;
}
@@ -13324,7 +14350,7 @@ DUK_INTERNAL void duk_default_free_function(void *udata, void *ptr) {
DUK_UNREF(udata);
DUK_ANSI_FREE(ptr);
}
-#endif /* DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS */
+#endif /* DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS */
/*
* Buffer
*/
@@ -13414,30 +14440,30 @@ DUK_EXTERNAL void duk_config_buffer(duk_hthread *thr, duk_idx_t idx, void *ptr,
#if defined(DUK_USE_BYTECODE_DUMP_SUPPORT)
-#define DUK__SER_MARKER 0xbf
-#define DUK__SER_STRING 0x00
-#define DUK__SER_NUMBER 0x01
+#define DUK__SER_MARKER 0xbf
+#define DUK__SER_STRING 0x00
+#define DUK__SER_NUMBER 0x01
#define DUK__BYTECODE_INITIAL_ALLOC 256
-#define DUK__NO_FORMALS 0xffffffffUL
+#define DUK__NO_FORMALS 0xffffffffUL
/*
* Dump/load helpers, xxx_raw() helpers do no buffer checks
*/
-DUK_LOCAL duk_uint8_t *duk__load_string_raw(duk_hthread *thr, duk_uint8_t *p) {
+DUK_LOCAL const duk_uint8_t *duk__load_string_raw(duk_hthread *thr, const duk_uint8_t *p) {
duk_uint32_t len;
- len = DUK_RAW_READ_U32_BE(p);
+ len = DUK_RAW_READINC_U32_BE(p);
duk_push_lstring(thr, (const char *) p, len);
p += len;
return p;
}
-DUK_LOCAL duk_uint8_t *duk__load_buffer_raw(duk_hthread *thr, duk_uint8_t *p) {
+DUK_LOCAL const duk_uint8_t *duk__load_buffer_raw(duk_hthread *thr, const duk_uint8_t *p) {
duk_uint32_t len;
duk_uint8_t *buf;
- len = DUK_RAW_READ_U32_BE(p);
+ len = DUK_RAW_READINC_U32_BE(p);
buf = (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, (duk_size_t) len);
DUK_ASSERT(buf != NULL);
duk_memcpy((void *) buf, (const void *) p, (size_t) len);
@@ -13452,12 +14478,10 @@ DUK_LOCAL duk_uint8_t *duk__dump_hstring_raw(duk_uint8_t *p, duk_hstring *h) {
DUK_ASSERT(h != NULL);
len = DUK_HSTRING_GET_BYTELEN(h);
- DUK_ASSERT(len <= 0xffffffffUL); /* string limits */
+ DUK_ASSERT(len <= 0xffffffffUL); /* string limits */
tmp32 = (duk_uint32_t) len;
- DUK_RAW_WRITE_U32_BE(p, tmp32);
- duk_memcpy((void *) p,
- (const void *) DUK_HSTRING_GET_DATA(h),
- len);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
+ duk_memcpy((void *) p, (const void *) DUK_HSTRING_GET_DATA(h), len);
p += len;
return p;
}
@@ -13471,18 +14495,20 @@ DUK_LOCAL duk_uint8_t *duk__dump_hbuffer_raw(duk_hthread *thr, duk_uint8_t *p, d
DUK_UNREF(thr);
len = DUK_HBUFFER_GET_SIZE(h);
- DUK_ASSERT(len <= 0xffffffffUL); /* buffer limits */
+ DUK_ASSERT(len <= 0xffffffffUL); /* buffer limits */
tmp32 = (duk_uint32_t) len;
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
/* When len == 0, buffer data pointer may be NULL. */
- duk_memcpy_unsafe((void *) p,
- (const void *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h),
- len);
+ duk_memcpy_unsafe((void *) p, (const void *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h), len);
p += len;
return p;
}
-DUK_LOCAL duk_uint8_t *duk__dump_string_prop(duk_hthread *thr, duk_uint8_t *p, duk_bufwriter_ctx *bw_ctx, duk_hobject *func, duk_small_uint_t stridx) {
+DUK_LOCAL duk_uint8_t *duk__dump_string_prop(duk_hthread *thr,
+ duk_uint8_t *p,
+ duk_bufwriter_ctx *bw_ctx,
+ duk_hobject *func,
+ duk_small_uint_t stridx) {
duk_hstring *h_str;
duk_tval *tv;
@@ -13494,13 +14520,17 @@ DUK_LOCAL duk_uint8_t *duk__dump_string_prop(duk_hthread *thr, duk_uint8_t *p, d
h_str = DUK_HTHREAD_STRING_EMPTY_STRING(thr);
DUK_ASSERT(h_str != NULL);
}
- DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
+ DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U + DUK_HSTRING_GET_BYTELEN(h_str), p);
p = duk__dump_hstring_raw(p, h_str);
return p;
}
-DUK_LOCAL duk_uint8_t *duk__dump_buffer_prop(duk_hthread *thr, duk_uint8_t *p, duk_bufwriter_ctx *bw_ctx, duk_hobject *func, duk_small_uint_t stridx) {
+DUK_LOCAL duk_uint8_t *duk__dump_buffer_prop(duk_hthread *thr,
+ duk_uint8_t *p,
+ duk_bufwriter_ctx *bw_ctx,
+ duk_hobject *func,
+ duk_small_uint_t stridx) {
duk_tval *tv;
tv = duk_hobject_find_entry_tval_ptr_stridx(thr->heap, (duk_hobject *) func, stridx);
@@ -13508,17 +14538,22 @@ DUK_LOCAL duk_uint8_t *duk__dump_buffer_prop(duk_hthread *thr, duk_uint8_t *p, d
duk_hbuffer *h_buf;
h_buf = DUK_TVAL_GET_BUFFER(tv);
DUK_ASSERT(h_buf != NULL);
- DUK_ASSERT(DUK_HBUFFER_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
+ DUK_ASSERT(DUK_HBUFFER_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U + DUK_HBUFFER_GET_SIZE(h_buf), p);
p = duk__dump_hbuffer_raw(thr, p, h_buf);
} else {
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U, p);
- DUK_RAW_WRITE_U32_BE(p, 0);
+ DUK_RAW_WRITEINC_U32_BE(p, 0);
}
return p;
}
-DUK_LOCAL duk_uint8_t *duk__dump_uint32_prop(duk_hthread *thr, duk_uint8_t *p, duk_bufwriter_ctx *bw_ctx, duk_hobject *func, duk_small_uint_t stridx, duk_uint32_t def_value) {
+DUK_LOCAL duk_uint8_t *duk__dump_uint32_prop(duk_hthread *thr,
+ duk_uint8_t *p,
+ duk_bufwriter_ctx *bw_ctx,
+ duk_hobject *func,
+ duk_small_uint_t stridx,
+ duk_uint32_t def_value) {
duk_tval *tv;
duk_uint32_t val;
@@ -13529,7 +14564,7 @@ DUK_LOCAL duk_uint8_t *duk__dump_uint32_prop(duk_hthread *thr, duk_uint8_t *p, d
val = def_value;
}
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U, p);
- DUK_RAW_WRITE_U32_BE(p, val);
+ DUK_RAW_WRITEINC_U32_BE(p, val);
return p;
}
@@ -13551,27 +14586,28 @@ DUK_LOCAL duk_uint8_t *duk__dump_varmap(duk_hthread *thr, duk_uint8_t *p, duk_bu
duk_uint32_t val;
key = DUK_HOBJECT_E_GET_KEY(thr->heap, h, i);
- DUK_ASSERT(key != NULL); /* _Varmap is dense */
+ DUK_ASSERT(key != NULL); /* _Varmap is dense */
DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, h, i));
tv_val = DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(thr->heap, h, i);
DUK_ASSERT(tv_val != NULL);
- DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_val)); /* known to be number; in fact an integer */
+ DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_val)); /* known to be number; in fact an integer */
#if defined(DUK_USE_FASTINT)
DUK_ASSERT(DUK_TVAL_IS_FASTINT(tv_val));
- DUK_ASSERT(DUK_TVAL_GET_FASTINT(tv_val) == (duk_int64_t) DUK_TVAL_GET_FASTINT_U32(tv_val)); /* known to be 32-bit */
+ DUK_ASSERT(DUK_TVAL_GET_FASTINT(tv_val) ==
+ (duk_int64_t) DUK_TVAL_GET_FASTINT_U32(tv_val)); /* known to be 32-bit */
val = DUK_TVAL_GET_FASTINT_U32(tv_val);
#else
val = (duk_uint32_t) DUK_TVAL_GET_NUMBER(tv_val);
#endif
- DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
+ DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U + DUK_HSTRING_GET_BYTELEN(key) + 4U, p);
p = duk__dump_hstring_raw(p, key);
- DUK_RAW_WRITE_U32_BE(p, val);
+ DUK_RAW_WRITEINC_U32_BE(p, val);
}
}
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U, p);
- DUK_RAW_WRITE_U32_BE(p, 0); /* end of _Varmap */
+ DUK_RAW_WRITEINC_U32_BE(p, 0); /* end of _Varmap */
return p;
}
@@ -13589,8 +14625,8 @@ DUK_LOCAL duk_uint8_t *duk__dump_formals(duk_hthread *thr, duk_uint8_t *p, duk_b
*/
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U, p);
- DUK_ASSERT(h->length != DUK__NO_FORMALS); /* limits */
- DUK_RAW_WRITE_U32_BE(p, h->length);
+ DUK_ASSERT(h->length != DUK__NO_FORMALS); /* limits */
+ DUK_RAW_WRITEINC_U32_BE(p, h->length);
for (i = 0; i < h->length; i++) {
duk_tval *tv_val;
@@ -13604,14 +14640,14 @@ DUK_LOCAL duk_uint8_t *duk__dump_formals(duk_hthread *thr, duk_uint8_t *p, duk_b
DUK_ASSERT(varname != NULL);
DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(varname) >= 1);
- DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
+ DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U + DUK_HSTRING_GET_BYTELEN(varname), p);
p = duk__dump_hstring_raw(p, varname);
}
} else {
DUK_DD(DUK_DDPRINT("dumping function without _Formals, emit marker to indicate missing _Formals"));
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 4U, p);
- DUK_RAW_WRITE_U32_BE(p, DUK__NO_FORMALS); /* marker: no formals */
+ DUK_RAW_WRITEINC_U32_BE(p, DUK__NO_FORMALS); /* marker: no formals */
}
return p;
}
@@ -13645,33 +14681,33 @@ static duk_uint8_t *duk__dump_func(duk_hthread *thr, duk_hcompfunc *func, duk_bu
(long) DUK_HCOMPFUNC_GET_CODE_SIZE(thr->heap, func),
(long) DUK_HCOMPFUNC_GET_CODE_COUNT(thr->heap, func)));
- DUK_ASSERT(DUK_USE_ESBC_MAX_BYTES <= 0x7fffffffUL); /* ensures no overflow */
+ DUK_ASSERT(DUK_USE_ESBC_MAX_BYTES <= 0x7fffffffUL); /* ensures no overflow */
count_instr = (duk_uint32_t) DUK_HCOMPFUNC_GET_CODE_COUNT(thr->heap, func);
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 3U * 4U + 2U * 2U + 3U * 4U + count_instr * 4U, p);
/* Fixed header info. */
tmp32 = count_instr;
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
tmp32 = (duk_uint32_t) DUK_HCOMPFUNC_GET_CONSTS_COUNT(thr->heap, func);
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
tmp32 = (duk_uint32_t) DUK_HCOMPFUNC_GET_FUNCS_COUNT(thr->heap, func);
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
tmp16 = func->nregs;
- DUK_RAW_WRITE_U16_BE(p, tmp16);
+ DUK_RAW_WRITEINC_U16_BE(p, tmp16);
tmp16 = func->nargs;
- DUK_RAW_WRITE_U16_BE(p, tmp16);
+ DUK_RAW_WRITEINC_U16_BE(p, tmp16);
#if defined(DUK_USE_DEBUGGER_SUPPORT)
tmp32 = func->start_line;
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
tmp32 = func->end_line;
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
#else
- DUK_RAW_WRITE_U32_BE(p, 0);
- DUK_RAW_WRITE_U32_BE(p, 0);
+ DUK_RAW_WRITEINC_U32_BE(p, 0);
+ DUK_RAW_WRITEINC_U32_BE(p, 0);
#endif
- tmp32 = DUK_HEAPHDR_GET_FLAGS((duk_heaphdr *) func); /* masks flags, only duk_hobject flags */
- tmp32 &= ~(DUK_HOBJECT_FLAG_HAVE_FINALIZER); /* finalizer flag is lost */
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ tmp32 = DUK_HEAPHDR_GET_FLAGS((duk_heaphdr *) func); /* masks flags, only duk_hobject flags */
+ tmp32 &= ~(DUK_HOBJECT_FLAG_HAVE_FINALIZER); /* finalizer flag is lost */
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
/* Bytecode instructions: endian conversion needed unless
* platform is big endian.
@@ -13680,12 +14716,13 @@ static duk_uint8_t *duk__dump_func(duk_hthread *thr, duk_hcompfunc *func, duk_bu
ins_end = DUK_HCOMPFUNC_GET_CODE_END(thr->heap, func);
DUK_ASSERT((duk_size_t) (ins_end - ins) == (duk_size_t) count_instr);
#if defined(DUK_USE_INTEGER_BE)
- duk_memcpy_unsafe((void *) p, (const void *) ins, (size_t) (ins_end - ins));
- p += (size_t) (ins_end - ins);
+ duk_memcpy_unsafe((void *) p, (const void *) ins, count_instr * sizeof(duk_instr_t));
+ p += count_instr * sizeof(duk_instr_t);
+ DUK_UNREF(ins_end);
#else
while (ins != ins_end) {
tmp32 = (duk_uint32_t) (*ins);
- DUK_RAW_WRITE_U32_BE(p, tmp32);
+ DUK_RAW_WRITEINC_U32_BE(p, tmp32);
ins++;
}
#endif
@@ -13695,13 +14732,12 @@ static duk_uint8_t *duk__dump_func(duk_hthread *thr, duk_hcompfunc *func, duk_bu
tv_end = DUK_HCOMPFUNC_GET_CONSTS_END(thr->heap, func);
while (tv != tv_end) {
/* constants are strings or numbers now */
- DUK_ASSERT(DUK_TVAL_IS_STRING(tv) ||
- DUK_TVAL_IS_NUMBER(tv));
+ DUK_ASSERT(DUK_TVAL_IS_STRING(tv) || DUK_TVAL_IS_NUMBER(tv));
if (DUK_TVAL_IS_STRING(tv)) {
h_str = DUK_TVAL_GET_STRING(tv);
DUK_ASSERT(h_str != NULL);
- DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
+ DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= 0x7fffffffUL); /* ensures no overflow */
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 1U + 4U + DUK_HSTRING_GET_BYTELEN(h_str), p);
*p++ = DUK__SER_STRING;
p = duk__dump_hstring_raw(p, h_str);
@@ -13710,7 +14746,7 @@ static duk_uint8_t *duk__dump_func(duk_hthread *thr, duk_hcompfunc *func, duk_bu
p = DUK_BW_ENSURE_RAW(thr, bw_ctx, 1U + 8U, p);
*p++ = DUK__SER_NUMBER;
d = DUK_TVAL_GET_NUMBER(tv);
- DUK_RAW_WRITE_DOUBLE_BE(p, d);
+ DUK_RAW_WRITEINC_DOUBLE_BE(p, d);
}
tv++;
}
@@ -13767,11 +14803,12 @@ static duk_uint8_t *duk__dump_func(duk_hthread *thr, duk_hcompfunc *func, duk_bu
* are validated (which is quite complex, especially for indirect opcodes).
*/
-#define DUK__ASSERT_LEFT(n) do { \
+#define DUK__ASSERT_LEFT(n) \
+ do { \
DUK_ASSERT((duk_size_t) (p_end - p) >= (duk_size_t) (n)); \
} while (0)
-static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t *p_end) {
+static const duk_uint8_t *duk__load_func(duk_hthread *thr, const duk_uint8_t *p, const duk_uint8_t *p_end) {
duk_hcompfunc *h_fun;
duk_hbuffer *h_data;
duk_size_t data_size;
@@ -13795,20 +14832,20 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
DUK_ASSERT(thr != NULL);
- DUK_DD(DUK_DDPRINT("loading function, p=%p, p_end=%p", (void *) p, (void *) p_end));
+ DUK_DD(DUK_DDPRINT("loading function, p=%p, p_end=%p", (const void *) p, (const void *) p_end));
DUK__ASSERT_LEFT(3 * 4);
- count_instr = DUK_RAW_READ_U32_BE(p);
- count_const = DUK_RAW_READ_U32_BE(p);
- count_funcs = DUK_RAW_READ_U32_BE(p);
+ count_instr = DUK_RAW_READINC_U32_BE(p);
+ count_const = DUK_RAW_READINC_U32_BE(p);
+ count_funcs = DUK_RAW_READINC_U32_BE(p);
- data_size = sizeof(duk_tval) * count_const +
- sizeof(duk_hobject *) * count_funcs +
- sizeof(duk_instr_t) * count_instr;
+ data_size = sizeof(duk_tval) * count_const + sizeof(duk_hobject *) * count_funcs + sizeof(duk_instr_t) * count_instr;
DUK_DD(DUK_DDPRINT("instr=%ld, const=%ld, funcs=%ld, data_size=%ld",
- (long) count_instr, (long) count_const,
- (long) count_const, (long) data_size));
+ (long) count_instr,
+ (long) count_const,
+ (long) count_const,
+ (long) data_size));
/* Value stack is used to ensure reachability of constants and
* inner functions being loaded. Require enough space to handle
@@ -13828,18 +14865,18 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
DUK_ASSERT(DUK_HCOMPFUNC_GET_BYTECODE(thr->heap, h_fun) == NULL);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) h_fun) == thr->builtins[DUK_BIDX_FUNCTION_PROTOTYPE]);
- h_fun->nregs = DUK_RAW_READ_U16_BE(p);
- h_fun->nargs = DUK_RAW_READ_U16_BE(p);
+ h_fun->nregs = DUK_RAW_READINC_U16_BE(p);
+ h_fun->nargs = DUK_RAW_READINC_U16_BE(p);
#if defined(DUK_USE_DEBUGGER_SUPPORT)
- h_fun->start_line = DUK_RAW_READ_U32_BE(p);
- h_fun->end_line = DUK_RAW_READ_U32_BE(p);
+ h_fun->start_line = DUK_RAW_READINC_U32_BE(p);
+ h_fun->end_line = DUK_RAW_READINC_U32_BE(p);
#else
- p += 8; /* skip line info */
+ p += 8; /* skip line info */
#endif
/* duk_hcompfunc flags; quite version specific */
- tmp32 = DUK_RAW_READ_U32_BE(p);
- DUK_HEAPHDR_SET_FLAGS((duk_heaphdr *) h_fun, tmp32); /* masks flags to only change duk_hobject flags */
+ tmp32 = DUK_RAW_READINC_U32_BE(p);
+ DUK_HEAPHDR_SET_FLAGS((duk_heaphdr *) h_fun, tmp32); /* masks flags to only change duk_hobject flags */
/* standard prototype (no need to set here, already set) */
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) h_fun) == thr->builtins[DUK_BIDX_FUNCTION_PROTOTYPE]);
@@ -13867,14 +14904,12 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
DUK__ASSERT_LEFT(count_instr * sizeof(duk_instr_t));
#if defined(DUK_USE_INTEGER_BE)
q = fun_data + sizeof(duk_tval) * count_const + sizeof(duk_hobject *) * count_funcs;
- duk_memcpy((void *) q,
- (const void *) p,
- sizeof(duk_instr_t) * count_instr);
+ duk_memcpy((void *) q, (const void *) p, sizeof(duk_instr_t) * count_instr);
p += sizeof(duk_instr_t) * count_instr;
#else
q = fun_data + sizeof(duk_tval) * count_const + sizeof(duk_hobject *) * count_funcs;
for (n = count_instr; n > 0; n--) {
- *((duk_instr_t *) (void *) q) = DUK_RAW_READ_U32_BE(p);
+ *((duk_instr_t *) (void *) q) = DUK_RAW_READINC_U32_BE(p);
q += sizeof(duk_instr_t);
}
#endif
@@ -13882,7 +14917,7 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
/* Load constants onto value stack but don't yet copy to buffer. */
for (n = count_const; n > 0; n--) {
DUK__ASSERT_LEFT(1);
- const_type = DUK_RAW_READ_U8(p);
+ const_type = DUK_RAW_READINC_U8(p);
switch (const_type) {
case DUK__SER_STRING: {
p = duk__load_string_raw(thr, p);
@@ -13895,7 +14930,7 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
duk_tval tv_tmp;
duk_double_t val;
DUK__ASSERT_LEFT(8);
- val = DUK_RAW_READ_DOUBLE_BE(p);
+ val = DUK_RAW_READINC_DOUBLE_BE(p);
DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(&tv_tmp, val);
duk_push_tval(thr, &tv_tmp);
break;
@@ -13928,13 +14963,13 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
DUK_HCOMPFUNC_SET_DATA(thr->heap, h_fun, h_data);
DUK_HBUFFER_INCREF(thr, h_data);
- tv1 = duk_get_tval(thr, idx_base + 2); /* may be NULL if no constants or inner funcs */
+ tv1 = duk_get_tval(thr, idx_base + 2); /* may be NULL if no constants or inner funcs */
DUK_ASSERT((count_const == 0 && count_funcs == 0) || tv1 != NULL);
q = fun_data;
duk_memcpy_unsafe((void *) q, (const void *) tv1, sizeof(duk_tval) * count_const);
for (n = count_const; n > 0; n--) {
- DUK_TVAL_INCREF_FAST(thr, (duk_tval *) (void *) q); /* no side effects */
+ DUK_TVAL_INCREF_FAST(thr, (duk_tval *) (void *) q); /* no side effects */
q += sizeof(duk_tval);
}
tv1 += count_const;
@@ -13962,12 +14997,12 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
duk_set_top(thr, idx_base + 1);
/* Setup function properties. */
- tmp32 = DUK_RAW_READ_U32_BE(p);
+ tmp32 = DUK_RAW_READINC_U32_BE(p);
duk_push_u32(thr, tmp32);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_LENGTH, DUK_PROPDESC_FLAGS_C);
#if defined(DUK_USE_FUNC_NAME_PROPERTY)
- p = duk__load_string_raw(thr, p); /* -> [ func funcname ] */
+ p = duk__load_string_raw(thr, p); /* -> [ func funcname ] */
func_env = thr->builtins[DUK_BIDX_GLOBAL_ENV];
DUK_ASSERT(func_env != NULL);
need_pop = 0;
@@ -13978,11 +15013,10 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
*/
duk_hdecenv *new_env;
- new_env = duk_hdecenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
+ new_env =
+ duk_hdecenv_alloc(thr, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
DUK_ASSERT(new_env != NULL);
- DUK_ASSERT(new_env->thread == NULL); /* Closed. */
+ DUK_ASSERT(new_env->thread == NULL); /* Closed. */
DUK_ASSERT(new_env->varmap == NULL);
DUK_ASSERT(new_env->regbase_byteoff == 0);
DUK_HDECENV_ASSERT_VALID(new_env);
@@ -13994,11 +15028,11 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
duk_push_hobject(thr, (duk_hobject *) new_env);
- duk_dup_m2(thr); /* -> [ func funcname env funcname ] */
- duk_dup(thr, idx_base); /* -> [ func funcname env funcname func ] */
- duk_xdef_prop(thr, -3, DUK_PROPDESC_FLAGS_NONE); /* -> [ func funcname env ] */
+ duk_dup_m2(thr); /* -> [ func funcname env funcname ] */
+ duk_dup(thr, idx_base); /* -> [ func funcname env funcname func ] */
+ duk_xdef_prop(thr, -3, DUK_PROPDESC_FLAGS_NONE); /* -> [ func funcname env ] */
- need_pop = 1; /* Need to pop env, but -after- updating h_fun and increfs. */
+ need_pop = 1; /* Need to pop env, but -after- updating h_fun and increfs. */
}
DUK_ASSERT(func_env != NULL);
DUK_HCOMPFUNC_SET_LEXENV(thr->heap, h_fun, func_env);
@@ -14009,12 +15043,12 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
duk_pop(thr);
}
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_NAME, DUK_PROPDESC_FLAGS_C);
-#endif /* DUK_USE_FUNC_NAME_PROPERTY */
+#endif /* DUK_USE_FUNC_NAME_PROPERTY */
#if defined(DUK_USE_FUNC_FILENAME_PROPERTY)
p = duk__load_string_raw(thr, p);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_FILE_NAME, DUK_PROPDESC_FLAGS_C);
-#endif /* DUK_USE_FUNC_FILENAME_PROPERTY */
+#endif /* DUK_USE_FUNC_FILENAME_PROPERTY */
if (DUK_HOBJECT_HAS_CONSTRUCTABLE((duk_hobject *) h_fun)) {
/* Restore empty external .prototype only for constructable
@@ -14024,7 +15058,10 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
duk_push_object(thr);
DUK_ASSERT(!duk_is_bare_object(thr, -1));
duk_dup_m2(thr);
- duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_CONSTRUCTOR, DUK_PROPDESC_FLAGS_WC); /* func.prototype.constructor = func */
+ duk_xdef_prop_stridx_short(thr,
+ -2,
+ DUK_STRIDX_CONSTRUCTOR,
+ DUK_PROPDESC_FLAGS_WC); /* func.prototype.constructor = func */
duk_compact_m1(thr);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_PROTOTYPE, DUK_PROPDESC_FLAGS_W);
}
@@ -14032,9 +15069,9 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
#if defined(DUK_USE_PC2LINE)
p = duk__load_buffer_raw(thr, p);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_PC2LINE, DUK_PROPDESC_FLAGS_WC);
-#endif /* DUK_USE_PC2LINE */
+#endif /* DUK_USE_PC2LINE */
- duk_push_bare_object(thr); /* _Varmap */
+ duk_push_bare_object(thr); /* _Varmap */
for (;;) {
/* XXX: awkward */
p = duk__load_string_raw(thr, p);
@@ -14042,7 +15079,7 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
duk_pop(thr);
break;
}
- tmp32 = DUK_RAW_READ_U32_BE(p);
+ tmp32 = DUK_RAW_READINC_U32_BE(p);
duk_push_u32(thr, tmp32);
duk_put_prop(thr, -3);
}
@@ -14052,9 +15089,9 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
/* _Formals may have been missing in the original function, which is
* handled using a marker length.
*/
- arr_limit = DUK_RAW_READ_U32_BE(p);
+ arr_limit = DUK_RAW_READINC_U32_BE(p);
if (arr_limit != DUK__NO_FORMALS) {
- duk_push_bare_array(thr); /* _Formals */
+ duk_push_bare_array(thr); /* _Formals */
for (arr_idx = 0; arr_idx < arr_limit; arr_idx++) {
p = duk__load_string_raw(thr, p);
duk_put_prop_index(thr, -2, arr_idx);
@@ -14070,7 +15107,7 @@ static duk_uint8_t *duk__load_func(duk_hthread *thr, duk_uint8_t *p, duk_uint8_t
DUK_ASSERT_TOP(thr, idx_base + 1);
return p;
- format_error:
+format_error:
return NULL;
}
@@ -14102,11 +15139,11 @@ DUK_EXTERNAL void duk_dump_function(duk_hthread *thr) {
DUK_DD(DUK_DDPRINT("serialized result: %!T", duk_get_tval(thr, -1)));
- duk_remove_m2(thr); /* [ ... func buf ] -> [ ... buf ] */
+ duk_remove_m2(thr); /* [ ... func buf ] -> [ ... buf ] */
}
DUK_EXTERNAL void duk_load_function(duk_hthread *thr) {
- duk_uint8_t *p_buf, *p, *p_end;
+ const duk_uint8_t *p_buf, *p, *p_end;
duk_size_t sz;
DUK_ASSERT_API_ENTRY(thr);
@@ -14135,15 +15172,15 @@ DUK_EXTERNAL void duk_load_function(duk_hthread *thr) {
goto format_error;
}
- duk_remove_m2(thr); /* [ ... buf func ] -> [ ... func ] */
+ duk_remove_m2(thr); /* [ ... buf func ] -> [ ... func ] */
return;
- format_error:
+format_error:
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_BYTECODE);
DUK_WO_NORETURN(return;);
}
-#else /* DUK_USE_BYTECODE_DUMP_SUPPORT */
+#else /* DUK_USE_BYTECODE_DUMP_SUPPORT */
DUK_EXTERNAL void duk_dump_function(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
@@ -14157,7 +15194,7 @@ DUK_EXTERNAL void duk_load_function(duk_hthread *thr) {
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_BYTECODE_DUMP_SUPPORT */
+#endif /* DUK_USE_BYTECODE_DUMP_SUPPORT */
/* automatic undefs */
#undef DUK__ASSERT_LEFT
@@ -14219,7 +15256,7 @@ DUK_LOCAL duk_idx_t duk__call_get_idx_func(duk_hthread *thr, duk_idx_t nargs, du
DUK_ASSERT(other >= 0);
idx_func = duk_get_top(thr) - nargs - other;
- if (DUK_UNLIKELY((idx_func | nargs) < 0)) { /* idx_func < 0 || nargs < 0; OR sign bits */
+ if (DUK_UNLIKELY((idx_func | nargs) < 0)) { /* idx_func < 0 || nargs < 0; OR sign bits */
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return 0;);
}
@@ -14253,12 +15290,14 @@ DUK_LOCAL void duk__call_prop_prep_stack(duk_hthread *thr, duk_idx_t normalized_
DUK_ASSERT(nargs >= 0);
DUK_DDD(DUK_DDDPRINT("duk__call_prop_prep_stack, normalized_obj_idx=%ld, nargs=%ld, stacktop=%ld",
- (long) normalized_obj_idx, (long) nargs, (long) duk_get_top(thr)));
+ (long) normalized_obj_idx,
+ (long) nargs,
+ (long) duk_get_top(thr)));
/* [... key arg1 ... argN] */
/* duplicate key */
- duk_dup(thr, -nargs - 1); /* Note: -nargs alone would fail for nargs == 0, this is OK */
+ duk_dup(thr, -nargs - 1); /* Note: -nargs alone would fail for nargs == 0, this is OK */
(void) duk_get_prop(thr, normalized_obj_idx);
DUK_DDD(DUK_DDDPRINT("func: %!T", (duk_tval *) duk_get_tval(thr, -1)));
@@ -14301,7 +15340,7 @@ DUK_EXTERNAL void duk_call(duk_hthread *thr, duk_idx_t nargs) {
duk_insert_undefined(thr, idx_func + 1);
- call_flags = 0; /* not protected, respect reclimit, not constructor */
+ call_flags = 0; /* not protected, respect reclimit, not constructor */
duk_handle_call_unprotected(thr, idx_func, call_flags);
}
@@ -14314,7 +15353,7 @@ DUK_EXTERNAL void duk_call_method(duk_hthread *thr, duk_idx_t nargs) {
idx_func = duk__call_get_idx_func(thr, nargs, 2);
DUK_ASSERT(duk_is_valid_index(thr, idx_func));
- call_flags = 0; /* not protected, respect reclimit, not constructor */
+ call_flags = 0; /* not protected, respect reclimit, not constructor */
duk_handle_call_unprotected(thr, idx_func, call_flags);
}
@@ -14328,7 +15367,7 @@ DUK_EXTERNAL void duk_call_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_idx_t n
DUK_ASSERT_API_ENTRY(thr);
- obj_idx = duk_require_normalize_index(thr, obj_idx); /* make absolute */
+ obj_idx = duk_require_normalize_index(thr, obj_idx); /* make absolute */
if (DUK_UNLIKELY(nargs < 0)) {
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return;);
@@ -14426,7 +15465,7 @@ DUK_LOCAL duk_ret_t duk__pcall_prop_raw(duk_hthread *thr, void *udata) {
args = (duk__pcall_prop_args *) udata;
- obj_idx = duk_require_normalize_index(thr, args->obj_idx); /* make absolute */
+ obj_idx = duk_require_normalize_index(thr, args->obj_idx); /* make absolute */
duk__call_prop_prep_stack(thr, obj_idx, args->nargs);
ret = duk_handle_call_unprotected_nargs(thr, args->nargs, args->call_flags);
@@ -14464,30 +15503,30 @@ DUK_EXTERNAL duk_int_t duk_safe_call(duk_hthread *thr, duk_safe_call_function fu
*/
/* XXX: check for any reserve? */
- if (DUK_UNLIKELY((nargs | nrets) < 0 || /* nargs < 0 || nrets < 0; OR sign bits */
- thr->valstack_top < thr->valstack_bottom + nargs || /* nargs too large compared to top */
- thr->valstack_end + nargs < thr->valstack_top + nrets)) { /* nrets too large compared to reserve */
+ if (DUK_UNLIKELY((nargs | nrets) < 0 || /* nargs < 0 || nrets < 0; OR sign bits */
+ thr->valstack_top < thr->valstack_bottom + nargs || /* nargs too large compared to top */
+ thr->valstack_end + nargs < thr->valstack_top + nrets)) { /* nrets too large compared to reserve */
DUK_D(DUK_DPRINT("not enough stack reserve for safe call or invalid arguments: "
"nargs=%ld < 0 (?), nrets=%ld < 0 (?), top=%ld < bottom=%ld + nargs=%ld (?), "
"end=%ld + nargs=%ld < top=%ld + nrets=%ld (?)",
- (long) nargs,
- (long) nrets,
- (long) (thr->valstack_top - thr->valstack),
- (long) (thr->valstack_bottom - thr->valstack),
- (long) nargs,
- (long) (thr->valstack_end - thr->valstack),
- (long) nargs,
- (long) (thr->valstack_top - thr->valstack),
- (long) nrets));
+ (long) nargs,
+ (long) nrets,
+ (long) (thr->valstack_top - thr->valstack),
+ (long) (thr->valstack_bottom - thr->valstack),
+ (long) nargs,
+ (long) (thr->valstack_end - thr->valstack),
+ (long) nargs,
+ (long) (thr->valstack_top - thr->valstack),
+ (long) nrets));
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return DUK_EXEC_ERROR;);
}
- rc = duk_handle_safe_call(thr, /* thread */
- func, /* func */
- udata, /* udata */
- nargs, /* num_stack_args */
- nrets); /* num_stack_res */
+ rc = duk_handle_safe_call(thr, /* thread */
+ func, /* func */
+ udata, /* udata */
+ nargs, /* num_stack_args */
+ nrets); /* num_stack_res */
return rc;
}
@@ -14500,7 +15539,7 @@ DUK_EXTERNAL void duk_new(duk_hthread *thr, duk_idx_t nargs) {
idx_func = duk__call_get_idx_func(thr, nargs, 1);
DUK_ASSERT(duk_is_valid_index(thr, idx_func));
- duk_push_object(thr); /* default instance; internal proto updated by call handling */
+ duk_push_object(thr); /* default instance; internal proto updated by call handling */
duk_insert(thr, idx_func + 1);
duk_handle_call_unprotected(thr, idx_func, DUK_CALL_FLAG_CONSTRUCT);
@@ -14628,7 +15667,7 @@ DUK_EXTERNAL duk_int_t duk_get_magic(duk_hthread *thr, duk_idx_t idx) {
}
/* fall through */
- type_error:
+type_error:
DUK_ERROR_TYPE(thr, DUK_STR_UNEXPECTED_TYPE);
DUK_WO_NORETURN(return 0;);
}
@@ -14702,15 +15741,16 @@ DUK_INTERNAL void duk_resolve_nonbound_function(duk_hthread *thr) {
* is guaranteed to be non-NULL, even for zero length input.
*/
DUK_LOCAL const duk_uint8_t *duk__prep_codec_arg(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_len) {
- const void *def_ptr = (const void *) out_len; /* Any non-NULL pointer will do. */
+ const void *def_ptr = (const void *) out_len; /* Any non-NULL pointer will do. */
const void *ptr;
duk_bool_t isbuffer;
DUK_ASSERT(out_len != NULL);
DUK_ASSERT(def_ptr != NULL);
- DUK_ASSERT(duk_is_valid_index(thr, idx)); /* checked by caller */
+ DUK_ASSERT(duk_is_valid_index(thr, idx)); /* checked by caller */
- ptr = (const void *) duk_get_buffer_data_raw(thr, idx, out_len, NULL /*def_ptr*/, 0 /*def_size*/, 0 /*throw_flag*/, &isbuffer);
+ ptr = (const void *)
+ duk_get_buffer_data_raw(thr, idx, out_len, NULL /*def_ptr*/, 0 /*def_size*/, 0 /*throw_flag*/, &isbuffer);
if (isbuffer) {
DUK_ASSERT(ptr != NULL || *out_len == 0U);
if (DUK_UNLIKELY(ptr == NULL)) {
@@ -14735,21 +15775,21 @@ DUK_LOCAL const duk_uint8_t *duk__prep_codec_arg(duk_hthread *thr, duk_idx_t idx
#if defined(DUK_USE_BASE64_SUPPORT)
/* Bytes emitted for number of padding characters in range [0,4]. */
DUK_LOCAL const duk_int8_t duk__base64_decode_nequal_step[5] = {
- 3, /* #### -> 24 bits, emit 3 bytes */
- 2, /* ###= -> 18 bits, emit 2 bytes */
- 1, /* ##== -> 12 bits, emit 1 byte */
- -1, /* #=== -> 6 bits, error */
- 0, /* ==== -> 0 bits, emit 0 bytes */
+ 3, /* #### -> 24 bits, emit 3 bytes */
+ 2, /* ###= -> 18 bits, emit 2 bytes */
+ 1, /* ##== -> 12 bits, emit 1 byte */
+ -1, /* #=== -> 6 bits, error */
+ 0, /* ==== -> 0 bits, emit 0 bytes */
};
#if defined(DUK_USE_BASE64_FASTPATH)
DUK_LOCAL const duk_uint8_t duk__base64_enctab_fast[64] = {
- 0x41U, 0x42U, 0x43U, 0x44U, 0x45U, 0x46U, 0x47U, 0x48U, 0x49U, 0x4aU, 0x4bU, 0x4cU, 0x4dU, 0x4eU, 0x4fU, 0x50U, /* A...P */
- 0x51U, 0x52U, 0x53U, 0x54U, 0x55U, 0x56U, 0x57U, 0x58U, 0x59U, 0x5aU, 0x61U, 0x62U, 0x63U, 0x64U, 0x65U, 0x66U, /* Q...f */
- 0x67U, 0x68U, 0x69U, 0x6aU, 0x6bU, 0x6cU, 0x6dU, 0x6eU, 0x6fU, 0x70U, 0x71U, 0x72U, 0x73U, 0x74U, 0x75U, 0x76U, /* g...v */
- 0x77U, 0x78U, 0x79U, 0x7aU, 0x30U, 0x31U, 0x32U, 0x33U, 0x34U, 0x35U, 0x36U, 0x37U, 0x38U, 0x39U, 0x2bU, 0x2fU /* w.../ */
+ 0x41U, 0x42U, 0x43U, 0x44U, 0x45U, 0x46U, 0x47U, 0x48U, 0x49U, 0x4aU, 0x4bU, 0x4cU, 0x4dU, 0x4eU, 0x4fU, 0x50U, /* A...P */
+ 0x51U, 0x52U, 0x53U, 0x54U, 0x55U, 0x56U, 0x57U, 0x58U, 0x59U, 0x5aU, 0x61U, 0x62U, 0x63U, 0x64U, 0x65U, 0x66U, /* Q...f */
+ 0x67U, 0x68U, 0x69U, 0x6aU, 0x6bU, 0x6cU, 0x6dU, 0x6eU, 0x6fU, 0x70U, 0x71U, 0x72U, 0x73U, 0x74U, 0x75U, 0x76U, /* g...v */
+ 0x77U, 0x78U, 0x79U, 0x7aU, 0x30U, 0x31U, 0x32U, 0x33U, 0x34U, 0x35U, 0x36U, 0x37U, 0x38U, 0x39U, 0x2bU, 0x2fU /* w.../ */
};
-#endif /* DUK_USE_BASE64_FASTPATH */
+#endif /* DUK_USE_BASE64_FASTPATH */
#if defined(DUK_USE_BASE64_FASTPATH)
/* Decode table for one byte of input:
@@ -14759,24 +15799,24 @@ DUK_LOCAL const duk_uint8_t duk__base64_enctab_fast[64] = {
* 0...63 decoded bytes
*/
DUK_LOCAL const duk_int8_t duk__base64_dectab_fast[256] = {
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -1, -1, -3, -3, -1, -3, -3, /* 0x00...0x0f */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0x10...0x1f */
- -1, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, 62, -3, -3, -3, 63, /* 0x20...0x2f */
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -3, -3, -3, -2, -3, -3, /* 0x30...0x3f */
- -3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40...0x4f */
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -3, -3, -3, -3, -3, /* 0x50...0x5f */
- -3, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60...0x6f */
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -3, -3, -3, -3, -3, /* 0x70...0x7f */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0x80...0x8f */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0x90...0x9f */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xa0...0xaf */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xb0...0xbf */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xc0...0xcf */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xd0...0xdf */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xe0...0xef */
- -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3 /* 0xf0...0xff */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -1, -1, -3, -3, -1, -3, -3, /* 0x00...0x0f */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0x10...0x1f */
+ -1, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, 62, -3, -3, -3, 63, /* 0x20...0x2f */
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -3, -3, -3, -2, -3, -3, /* 0x30...0x3f */
+ -3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40...0x4f */
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -3, -3, -3, -3, -3, /* 0x50...0x5f */
+ -3, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60...0x6f */
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -3, -3, -3, -3, -3, /* 0x70...0x7f */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0x80...0x8f */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0x90...0x9f */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xa0...0xaf */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xb0...0xbf */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xc0...0xcf */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xd0...0xdf */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, /* 0xe0...0xef */
+ -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3 /* 0xf0...0xff */
};
-#endif /* DUK_USE_BASE64_FASTPATH */
+#endif /* DUK_USE_BASE64_FASTPATH */
#if defined(DUK_USE_BASE64_FASTPATH)
DUK_LOCAL DUK_ALWAYS_INLINE void duk__base64_encode_fast_3(const duk_uint8_t *src, duk_uint8_t *dst) {
@@ -14808,9 +15848,9 @@ DUK_LOCAL DUK_ALWAYS_INLINE void duk__base64_encode_fast_2(const duk_uint8_t *sr
t = (duk_uint_t) src[0];
t = (t << 8) + (duk_uint_t) src[1];
- dst[0] = duk__base64_enctab_fast[t >> 10]; /* XXXXXX-- -------- */
- dst[1] = duk__base64_enctab_fast[(t >> 4) & 0x3fU]; /* ------XX XXXX---- */
- dst[2] = duk__base64_enctab_fast[(t << 2) & 0x3fU]; /* -------- ----XXXX */
+ dst[0] = duk__base64_enctab_fast[t >> 10]; /* XXXXXX-- -------- */
+ dst[1] = duk__base64_enctab_fast[(t >> 4) & 0x3fU]; /* ------XX XXXX---- */
+ dst[2] = duk__base64_enctab_fast[(t << 2) & 0x3fU]; /* -------- ----XXXX */
dst[3] = DUK_ASC_EQUALS;
}
@@ -14818,8 +15858,8 @@ DUK_LOCAL DUK_ALWAYS_INLINE void duk__base64_encode_fast_1(const duk_uint8_t *sr
duk_uint_t t;
t = (duk_uint_t) src[0];
- dst[0] = duk__base64_enctab_fast[t >> 2]; /* XXXXXX-- */
- dst[1] = duk__base64_enctab_fast[(t << 4) & 0x3fU]; /* ------XX */
+ dst[0] = duk__base64_enctab_fast[t >> 2]; /* XXXXXX-- */
+ dst[1] = duk__base64_enctab_fast[(t << 4) & 0x3fU]; /* ------XX */
dst[2] = DUK_ASC_EQUALS;
dst[3] = DUK_ASC_EQUALS;
}
@@ -14867,24 +15907,24 @@ DUK_LOCAL void duk__base64_encode_helper(const duk_uint8_t *src, duk_size_t srcl
DUK_ASSERT(n == 0U || n == 1U || n == 2U);
if (n == 1U) {
duk__base64_encode_fast_1(p, q);
-#if 0 /* Unnecessary. */
+#if 0 /* Unnecessary. */
p += 1;
q += 4;
n -= 1U;
#endif
} else if (n == 2U) {
duk__base64_encode_fast_2(p, q);
-#if 0 /* Unnecessary. */
+#if 0 /* Unnecessary. */
p += 2;
q += 4;
n -= 2U;
#endif
} else {
- DUK_ASSERT(n == 0U); /* nothing to do */
+ DUK_ASSERT(n == 0U); /* nothing to do */
;
}
}
-#else /* DUK_USE_BASE64_FASTPATH */
+#else /* DUK_USE_BASE64_FASTPATH */
DUK_LOCAL void duk__base64_encode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8_t *dst) {
duk_small_uint_t i, npad;
duk_uint_t t, x, y;
@@ -14956,10 +15996,13 @@ DUK_LOCAL void duk__base64_encode_helper(const duk_uint8_t *src, duk_size_t srcl
npad--;
}
}
-#endif /* DUK_USE_BASE64_FASTPATH */
+#endif /* DUK_USE_BASE64_FASTPATH */
#if defined(DUK_USE_BASE64_FASTPATH)
-DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8_t *dst, duk_uint8_t **out_dst_final) {
+DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src,
+ duk_size_t srclen,
+ duk_uint8_t *dst,
+ duk_uint8_t **out_dst_final) {
duk_int_t x;
duk_uint_t t;
duk_small_uint_t n_equal;
@@ -14969,11 +16012,11 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
const duk_uint8_t *p_end_safe;
duk_uint8_t *q;
- DUK_ASSERT(src != NULL); /* Required by pointer arithmetic below, which fails for NULL. */
+ DUK_ASSERT(src != NULL); /* Required by pointer arithmetic below, which fails for NULL. */
p = src;
p_end = src + srclen;
- p_end_safe = p_end - 8; /* If 'src <= src_end_safe', safe to read 8 bytes. */
+ p_end_safe = p_end - 8; /* If 'src <= src_end_safe', safe to read 8 bytes. */
q = dst;
/* Alternate between a fast path which processes clean groups with no
@@ -15003,7 +16046,9 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
* bytes to minimize aliasing.
*/
DUK_DDD(DUK_DDDPRINT("fast loop: p=%p, p_end_safe=%p, p_end=%p",
- (const void *) p, (const void *) p_end_safe, (const void *) p_end));
+ (const void *) p,
+ (const void *) p_end_safe,
+ (const void *) p_end));
t1 = (duk_int_t) duk__base64_dectab_fast[p[0]];
t1 = (duk_int_t) ((duk_uint_t) t1 << 6) | (duk_int_t) duk__base64_dectab_fast[p[1]];
@@ -15028,17 +16073,19 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
p += 8;
q += 6;
} else if (t1 >= 0) {
- DUK_DDD(DUK_DDDPRINT("fast loop first group was clean, second was not, process one slow path group"));
+ DUK_DDD(
+ DUK_DDDPRINT("fast loop first group was clean, second was not, process one slow path group"));
DUK_ASSERT(t2 < 0);
p += 4;
q += 3;
break;
} else {
- DUK_DDD(DUK_DDDPRINT("fast loop first group was not clean, second does not matter, process one slow path group"));
+ DUK_DDD(DUK_DDDPRINT(
+ "fast loop first group was not clean, second does not matter, process one slow path group"));
DUK_ASSERT(t1 < 0);
break;
}
- } /* fast path */
+ } /* fast path */
/* Slow path step 1: try to scan a 4-character encoded group,
* end-of-input, or start-of-padding. We exit with:
@@ -15053,7 +16100,9 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
t = 1UL;
for (;;) {
DUK_DDD(DUK_DDDPRINT("slow loop: p=%p, p_end=%p, t=%lu",
- (const void *) p, (const void *) p_end, (unsigned long) t));
+ (const void *) p,
+ (const void *) p_end,
+ (unsigned long) t));
if (DUK_LIKELY(p < p_end)) {
x = duk__base64_dectab_fast[*p++];
@@ -15064,18 +16113,18 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
break;
}
} else if (x == -1) {
- continue; /* allowed ascii whitespace */
+ continue; /* allowed ascii whitespace */
} else if (x == -2) {
p--;
- break; /* start of padding */
+ break; /* start of padding */
} else {
DUK_ASSERT(x == -3);
goto decode_error;
}
} else {
- break; /* end of input */
+ break; /* end of input */
}
- } /* slow path step 1 */
+ } /* slow path step 1 */
/* Complete the padding by simulating pad characters,
* regardless of actual input padding chars.
@@ -15134,28 +16183,30 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
}
x = duk__base64_dectab_fast[*p++];
if (x == -1 || x == -2) {
- ; /* padding or whitespace, keep eating */
+ ; /* padding or whitespace, keep eating */
} else {
p--;
- break; /* backtrack and go back to fast path, even for -1 */
+ break; /* backtrack and go back to fast path, even for -1 */
}
- } /* slow path step 3 */
- } /* outer fast+slow path loop */
+ } /* slow path step 3 */
+ } /* outer fast+slow path loop */
- done:
- DUK_DDD(DUK_DDDPRINT("done; p=%p, p_end=%p",
- (const void *) p, (const void *) p_end));
+done:
+ DUK_DDD(DUK_DDDPRINT("done; p=%p, p_end=%p", (const void *) p, (const void *) p_end));
DUK_ASSERT(p == p_end);
*out_dst_final = q;
return 1;
- decode_error:
+decode_error:
return 0;
}
-#else /* DUK_USE_BASE64_FASTPATH */
-DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_t srclen, duk_uint8_t *dst, duk_uint8_t **out_dst_final) {
+#else /* DUK_USE_BASE64_FASTPATH */
+DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src,
+ duk_size_t srclen,
+ duk_uint8_t *dst,
+ duk_uint8_t **out_dst_final) {
duk_uint_t t, x;
duk_int_t y;
duk_int8_t step;
@@ -15241,7 +16292,7 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
} else {
/* Valid: whitespace. */
duk_uint32_t m;
- DUK_ASSERT(x < 0x20U); /* 0x00 to 0x1f */
+ DUK_ASSERT(x < 0x20U); /* 0x00 to 0x1f */
m = (1U << x);
if (mask_white & m) {
/* Allow basic ASCII whitespace. */
@@ -15258,7 +16309,7 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
}
/* fall through; no padding will be added */
- simulate_padding:
+ simulate_padding:
n_equal = 0;
while (t < 0x1000000UL) {
t = (t << 6) + 0U;
@@ -15290,10 +16341,10 @@ DUK_LOCAL duk_bool_t duk__base64_decode_helper(const duk_uint8_t *src, duk_size_
*out_dst_final = q;
return 1;
- decode_error:
+decode_error:
return 0;
}
-#endif /* DUK_USE_BASE64_FASTPATH */
+#endif /* DUK_USE_BASE64_FASTPATH */
DUK_EXTERNAL const char *duk_base64_encode(duk_hthread *thr, duk_idx_t idx) {
const duk_uint8_t *src;
@@ -15322,11 +16373,11 @@ DUK_EXTERNAL const char *duk_base64_encode(duk_hthread *thr, duk_idx_t idx) {
duk__base64_encode_helper((const duk_uint8_t *) src, srclen, dst);
- ret = duk_buffer_to_string(thr, -1); /* Safe, result is ASCII. */
+ ret = duk_buffer_to_string(thr, -1); /* Safe, result is ASCII. */
duk_replace(thr, idx);
return ret;
- type_error:
+type_error:
DUK_ERROR_TYPE(thr, DUK_STR_BASE64_ENCODE_FAILED);
DUK_WO_NORETURN(return NULL;);
}
@@ -15351,7 +16402,7 @@ DUK_EXTERNAL void duk_base64_decode(duk_hthread *thr, duk_idx_t idx) {
* Similarly, 'xx' may ecause 1+3 = bytes to be emitted and then
* backtracked.
*/
- dstlen = (srclen / 4) * 3 + 6; /* upper limit, assuming no whitespace etc */
+ dstlen = (srclen / 4) * 3 + 6; /* upper limit, assuming no whitespace etc */
dst = (duk_uint8_t *) duk_push_dynamic_buffer(thr, dstlen);
/* Note: for dstlen=0, dst may be NULL */
@@ -15364,15 +16415,15 @@ DUK_EXTERNAL void duk_base64_decode(duk_hthread *thr, duk_idx_t idx) {
duk_replace(thr, idx);
return;
- type_error:
+type_error:
DUK_ERROR_TYPE(thr, DUK_STR_BASE64_DECODE_FAILED);
DUK_WO_NORETURN(return;);
}
-#else /* DUK_USE_BASE64_SUPPORT */
+#else /* DUK_USE_BASE64_SUPPORT */
DUK_EXTERNAL const char *duk_base64_encode(duk_hthread *thr, duk_idx_t idx) {
DUK_UNREF(idx);
DUK_ERROR_UNSUPPORTED(thr);
- DUK_WO_NORETURN(return;);
+ DUK_WO_NORETURN(return NULL;);
}
DUK_EXTERNAL void duk_base64_decode(duk_hthread *thr, duk_idx_t idx) {
@@ -15380,7 +16431,7 @@ DUK_EXTERNAL void duk_base64_decode(duk_hthread *thr, duk_idx_t idx) {
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_BASE64_SUPPORT */
+#endif /* DUK_USE_BASE64_SUPPORT */
/*
* Hex
@@ -15409,7 +16460,7 @@ DUK_EXTERNAL const char *duk_hex_encode(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(buf != NULL);
#if defined(DUK_USE_HEX_FASTPATH)
- DUK_ASSERT((((duk_size_t) buf) & 0x01U) == 0); /* pointer is aligned, guaranteed for fixed buffer */
+ DUK_ASSERT((((duk_size_t) buf) & 0x01U) == 0); /* pointer is aligned, guaranteed for fixed buffer */
p16 = (duk_uint16_t *) (void *) buf;
len_safe = len & ~0x03U;
for (i = 0; i < len_safe; i += 4) {
@@ -15422,14 +16473,14 @@ DUK_EXTERNAL const char *duk_hex_encode(duk_hthread *thr, duk_idx_t idx) {
for (; i < len; i++) {
*p16++ = duk_hex_enctab[inp[i]];
}
-#else /* DUK_USE_HEX_FASTPATH */
+#else /* DUK_USE_HEX_FASTPATH */
for (i = 0; i < len; i++) {
duk_small_uint_t t;
t = (duk_small_uint_t) inp[i];
- buf[i*2 + 0] = duk_lc_digits[t >> 4];
- buf[i*2 + 1] = duk_lc_digits[t & 0x0f];
+ buf[i * 2 + 0] = duk_lc_digits[t >> 4];
+ buf[i * 2 + 1] = duk_lc_digits[t & 0x0f];
}
-#endif /* DUK_USE_HEX_FASTPATH */
+#endif /* DUK_USE_HEX_FASTPATH */
/* XXX: Using a string return value forces a string intern which is
* not always necessary. As a rough performance measure, hex encode
@@ -15438,7 +16489,7 @@ DUK_EXTERNAL const char *duk_hex_encode(duk_hthread *thr, duk_idx_t idx) {
* caller coerce to string if necessary?
*/
- ret = duk_buffer_to_string(thr, -1); /* Safe, result is ASCII. */
+ ret = duk_buffer_to_string(thr, -1); /* Safe, result is ASCII. */
duk_replace(thr, idx);
return ret;
}
@@ -15473,20 +16524,16 @@ DUK_EXTERNAL void duk_hex_decode(duk_hthread *thr, duk_idx_t idx) {
p = buf;
len_safe = len & ~0x07U;
for (i = 0; i < len_safe; i += 8) {
- t = ((duk_int_t) duk_hex_dectab_shift4[inp[i]]) |
- ((duk_int_t) duk_hex_dectab[inp[i + 1]]);
+ t = ((duk_int_t) duk_hex_dectab_shift4[inp[i]]) | ((duk_int_t) duk_hex_dectab[inp[i + 1]]);
chk = t;
p[0] = (duk_uint8_t) t;
- t = ((duk_int_t) duk_hex_dectab_shift4[inp[i + 2]]) |
- ((duk_int_t) duk_hex_dectab[inp[i + 3]]);
+ t = ((duk_int_t) duk_hex_dectab_shift4[inp[i + 2]]) | ((duk_int_t) duk_hex_dectab[inp[i + 3]]);
chk |= t;
p[1] = (duk_uint8_t) t;
- t = ((duk_int_t) duk_hex_dectab_shift4[inp[i + 4]]) |
- ((duk_int_t) duk_hex_dectab[inp[i + 5]]);
+ t = ((duk_int_t) duk_hex_dectab_shift4[inp[i + 4]]) | ((duk_int_t) duk_hex_dectab[inp[i + 5]]);
chk |= t;
p[2] = (duk_uint8_t) t;
- t = ((duk_int_t) duk_hex_dectab_shift4[inp[i + 6]]) |
- ((duk_int_t) duk_hex_dectab[inp[i + 7]]);
+ t = ((duk_int_t) duk_hex_dectab_shift4[inp[i + 6]]) | ((duk_int_t) duk_hex_dectab[inp[i + 7]]);
chk |= t;
p[3] = (duk_uint8_t) t;
p += 4;
@@ -15508,7 +16555,7 @@ DUK_EXTERNAL void duk_hex_decode(duk_hthread *thr, duk_idx_t idx) {
}
*p++ = (duk_uint8_t) t;
}
-#else /* DUK_USE_HEX_FASTPATH */
+#else /* DUK_USE_HEX_FASTPATH */
for (i = 0; i < len; i += 2) {
/* For invalid characters the value -1 gets extended to
* at least 16 bits. If either nybble is invalid, the
@@ -15521,16 +16568,16 @@ DUK_EXTERNAL void duk_hex_decode(duk_hthread *thr, duk_idx_t idx) {
}
buf[i >> 1] = (duk_uint8_t) t;
}
-#endif /* DUK_USE_HEX_FASTPATH */
+#endif /* DUK_USE_HEX_FASTPATH */
duk_replace(thr, idx);
return;
- type_error:
+type_error:
DUK_ERROR_TYPE(thr, DUK_STR_HEX_DECODE_FAILED);
DUK_WO_NORETURN(return;);
}
-#else /* DUK_USE_HEX_SUPPORT */
+#else /* DUK_USE_HEX_SUPPORT */
DUK_EXTERNAL const char *duk_hex_encode(duk_hthread *thr, duk_idx_t idx) {
DUK_UNREF(idx);
DUK_ERROR_UNSUPPORTED(thr);
@@ -15541,7 +16588,7 @@ DUK_EXTERNAL void duk_hex_decode(duk_hthread *thr, duk_idx_t idx) {
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_HEX_SUPPORT */
+#endif /* DUK_USE_HEX_SUPPORT */
/*
* JSON
@@ -15585,15 +16632,12 @@ DUK_EXTERNAL void duk_json_decode(duk_hthread *thr, duk_idx_t idx) {
#endif
idx = duk_require_normalize_index(thr, idx);
- duk_bi_json_parse_helper(thr,
- idx /*idx_value*/,
- DUK_INVALID_INDEX /*idx_reviver*/,
- 0 /*flags*/);
+ duk_bi_json_parse_helper(thr, idx /*idx_value*/, DUK_INVALID_INDEX /*idx_reviver*/, 0 /*flags*/);
duk_replace(thr, idx);
DUK_ASSERT(duk_get_top(thr) == top_at_entry);
}
-#else /* DUK_USE_JSON_SUPPORT */
+#else /* DUK_USE_JSON_SUPPORT */
DUK_EXTERNAL const char *duk_json_encode(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
DUK_UNREF(idx);
@@ -15607,7 +16651,7 @@ DUK_EXTERNAL void duk_json_decode(duk_hthread *thr, duk_idx_t idx) {
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_JSON_SUPPORT */
+#endif /* DUK_USE_JSON_SUPPORT */
/*
* Compilation and evaluation
*/
@@ -15616,7 +16660,7 @@ DUK_EXTERNAL void duk_json_decode(duk_hthread *thr, duk_idx_t idx) {
typedef struct duk__compile_raw_args duk__compile_raw_args;
struct duk__compile_raw_args {
- duk_size_t src_length; /* should be first on 64-bit platforms */
+ duk_size_t src_length; /* should be first on 64-bit platforms */
const duk_uint8_t *src_buffer;
duk_uint_t flags;
};
@@ -15636,7 +16680,10 @@ DUK_EXTERNAL duk_int_t duk_eval_raw(duk_hthread *thr, const char *src_buffer, du
/* [ ... source? filename? ] (depends on flags) */
- rc = duk_compile_raw(thr, src_buffer, src_length, flags | DUK_COMPILE_EVAL); /* may be safe, or non-safe depending on flags */
+ rc = duk_compile_raw(thr,
+ src_buffer,
+ src_length,
+ flags | DUK_COMPILE_EVAL); /* may be safe, or non-safe depending on flags */
/* [ ... closure/error ] */
@@ -15645,7 +16692,7 @@ DUK_EXTERNAL duk_int_t duk_eval_raw(duk_hthread *thr, const char *src_buffer, du
goto got_rc;
}
- duk_push_global_object(thr); /* explicit 'this' binding, see GH-164 */
+ duk_push_global_object(thr); /* explicit 'this' binding, see GH-164 */
if (flags & DUK_COMPILE_SAFE) {
rc = duk_pcall_method(thr, 0);
@@ -15656,7 +16703,7 @@ DUK_EXTERNAL duk_int_t duk_eval_raw(duk_hthread *thr, const char *src_buffer, du
/* [ ... result/error ] */
- got_rc:
+got_rc:
if (flags & DUK_COMPILE_NORESULT) {
duk_pop(thr);
}
@@ -15696,8 +16743,8 @@ DUK_LOCAL duk_ret_t duk__do_compile(duk_hthread *thr, void *udata) {
duk_hstring *h_sourcecode;
h_sourcecode = duk_get_hstring(thr, -2);
- if ((flags & DUK_COMPILE_NOSOURCE) || /* args incorrect */
- (h_sourcecode == NULL)) { /* e.g. duk_push_string_file_raw() pushed undefined */
+ if ((flags & DUK_COMPILE_NOSOURCE) || /* args incorrect */
+ (h_sourcecode == NULL)) { /* e.g. duk_push_string_file_raw() pushed undefined */
DUK_ERROR_TYPE(thr, DUK_STR_NO_SOURCECODE);
DUK_WO_NORETURN(return 0;);
}
@@ -15727,11 +16774,11 @@ DUK_LOCAL duk_ret_t duk__do_compile(duk_hthread *thr, void *udata) {
h_templ = (duk_hcompfunc *) duk_known_hobject(thr, -1);
duk_js_push_closure(thr,
- h_templ,
- thr->builtins[DUK_BIDX_GLOBAL_ENV],
- thr->builtins[DUK_BIDX_GLOBAL_ENV],
- 1 /*add_auto_proto*/);
- duk_remove_m2(thr); /* -> [ ... closure ] */
+ h_templ,
+ thr->builtins[DUK_BIDX_GLOBAL_ENV],
+ thr->builtins[DUK_BIDX_GLOBAL_ENV],
+ 1 /*add_auto_proto*/);
+ duk_remove_m2(thr); /* -> [ ... closure ] */
/* [ ... closure ] */
@@ -15767,8 +16814,7 @@ DUK_EXTERNAL duk_int_t duk_compile_raw(duk_hthread *thr, const char *src_buffer,
* directly into flags.
*/
nargs = flags & 0x07;
- DUK_ASSERT(nargs == ((flags & DUK_COMPILE_NOSOURCE) ? 0 : 1) +
- ((flags & DUK_COMPILE_NOFILENAME) ? 0 : 1));
+ DUK_ASSERT(nargs == ((flags & DUK_COMPILE_NOSOURCE) ? 0 : 1) + ((flags & DUK_COMPILE_NOFILENAME) ? 0 : 1));
rc = duk_safe_call(thr, duk__do_compile, (void *) comp_args, nargs, nrets);
/* [ ... closure ] */
@@ -15808,25 +16854,24 @@ DUK_EXTERNAL void duk_push_context_dump(duk_hthread *thr) {
* Perhaps values need to be coerced individually?
*/
duk_bi_json_stringify_helper(thr,
- duk_get_top_index(thr), /*idx_value*/
- DUK_INVALID_INDEX, /*idx_replacer*/
- DUK_INVALID_INDEX, /*idx_space*/
- DUK_JSON_FLAG_EXT_CUSTOM |
- DUK_JSON_FLAG_ASCII_ONLY |
- DUK_JSON_FLAG_AVOID_KEY_QUOTES /*flags*/);
+ duk_get_top_index(thr), /*idx_value*/
+ DUK_INVALID_INDEX, /*idx_replacer*/
+ DUK_INVALID_INDEX, /*idx_space*/
+ DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_ASCII_ONLY |
+ DUK_JSON_FLAG_AVOID_KEY_QUOTES /*flags*/);
duk_push_sprintf(thr, "ctx: top=%ld, stack=%s", (long) top, (const char *) duk_safe_to_string(thr, -1));
- duk_replace(thr, -3); /* [ ... arr jsonx(arr) res ] -> [ ... res jsonx(arr) ] */
+ duk_replace(thr, -3); /* [ ... arr jsonx(arr) res ] -> [ ... res jsonx(arr) ] */
duk_pop(thr);
DUK_ASSERT(duk_is_string(thr, -1));
}
-#else /* DUK_USE_JSON_SUPPORT */
+#else /* DUK_USE_JSON_SUPPORT */
DUK_EXTERNAL void duk_push_context_dump(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_JSON_SUPPORT */
+#endif /* DUK_USE_JSON_SUPPORT */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
@@ -15875,12 +16920,13 @@ DUK_EXTERNAL void duk_debugger_attach(duk_hthread *thr,
heap->dbg_exec_counter = 0;
heap->dbg_last_counter = 0;
heap->dbg_last_time = 0.0;
- duk_debug_set_paused(heap); /* XXX: overlap with fields above */
+ duk_debug_set_paused(heap); /* XXX: overlap with fields above */
/* Send version identification and flush right afterwards. Note that
* we must write raw, unframed bytes here.
*/
- duk_push_sprintf(thr, "%ld %ld %s %s\n",
+ duk_push_sprintf(thr,
+ "%ld %ld %s %s\n",
(long) DUK_DEBUG_PROTOCOL_VERSION,
(long) DUK_VERSION,
(const char *) DUK_GIT_DESCRIBE,
@@ -15982,7 +17028,7 @@ DUK_EXTERNAL void duk_debugger_pause(duk_hthread *thr) {
}
}
-#else /* DUK_USE_DEBUGGER_SUPPORT */
+#else /* DUK_USE_DEBUGGER_SUPPORT */
DUK_EXTERNAL void duk_debugger_attach(duk_hthread *thr,
duk_debug_read_function read_cb,
@@ -16040,7 +17086,7 @@ DUK_EXTERNAL void duk_debugger_pause(duk_hthread *thr) {
DUK_UNREF(thr);
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
/*
* Heap creation and destruction
*/
@@ -16053,6 +17099,7 @@ struct duk_internal_thread_state {
duk_ljstate lj;
duk_bool_t creating_error;
duk_hthread *curr_thread;
+ duk_uint8_t thread_state;
duk_int_t call_recursion_depth;
};
@@ -16127,7 +17174,7 @@ DUK_EXTERNAL void duk_suspend(duk_hthread *thr, duk_thread_state *state) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ASSERT(thr->heap != NULL);
- DUK_ASSERT(state != NULL); /* unvalidated */
+ DUK_ASSERT(state != NULL); /* unvalidated */
/* Currently not supported when called from within a finalizer.
* If that is done, the finalizer will remain running indefinitely,
@@ -16151,6 +17198,7 @@ DUK_EXTERNAL void duk_suspend(duk_hthread *thr, duk_thread_state *state) {
duk_memcpy((void *) &snapshot->lj, (const void *) lj, sizeof(duk_ljstate));
snapshot->creating_error = heap->creating_error;
snapshot->curr_thread = heap->curr_thread;
+ snapshot->thread_state = thr->state;
snapshot->call_recursion_depth = heap->call_recursion_depth;
lj->jmpbuf_ptr = NULL;
@@ -16160,6 +17208,8 @@ DUK_EXTERNAL void duk_suspend(duk_hthread *thr, duk_thread_state *state) {
heap->creating_error = 0;
heap->curr_thread = NULL;
heap->call_recursion_depth = 0;
+
+ thr->state = DUK_HTHREAD_STATE_INACTIVE;
}
DUK_EXTERNAL void duk_resume(duk_hthread *thr, const duk_thread_state *state) {
@@ -16168,7 +17218,7 @@ DUK_EXTERNAL void duk_resume(duk_hthread *thr, const duk_thread_state *state) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ASSERT(thr->heap != NULL);
- DUK_ASSERT(state != NULL); /* unvalidated */
+ DUK_ASSERT(state != NULL); /* unvalidated */
/* Shouldn't be necessary if duk_suspend() is called before
* duk_resume(), but assert in case API sequence is incorrect.
@@ -16176,6 +17226,8 @@ DUK_EXTERNAL void duk_resume(duk_hthread *thr, const duk_thread_state *state) {
DUK_ASSERT(thr->heap->pf_prevent_count == 0);
DUK_ASSERT(thr->heap->creating_error == 0);
+ thr->state = snapshot->thread_state;
+
heap = thr->heap;
duk_memcpy((void *) &heap->lj, (const void *) &snapshot->lj, sizeof(duk_ljstate));
@@ -16208,7 +17260,7 @@ DUK_EXTERNAL void duk_set_global_object(duk_hthread *thr) {
DUK_UNREF(h_prev_glob);
thr->builtins[DUK_BIDX_GLOBAL] = h_glob;
DUK_HOBJECT_INCREF(thr, h_glob);
- DUK_HOBJECT_DECREF_ALLOWNULL(thr, h_prev_glob); /* side effects, in theory (referenced by global env) */
+ DUK_HOBJECT_DECREF_ALLOWNULL(thr, h_prev_glob); /* side effects, in theory (referenced by global env) */
/*
* Replace lexical environment for global scope
@@ -16219,9 +17271,7 @@ DUK_EXTERNAL void duk_set_global_object(duk_hthread *thr) {
* same (initial) built-ins.
*/
- h_env = duk_hobjenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
+ h_env = duk_hobjenv_alloc(thr, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
DUK_ASSERT(h_env != NULL);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) h_env) == NULL);
@@ -16236,8 +17286,8 @@ DUK_EXTERNAL void duk_set_global_object(duk_hthread *thr) {
h_prev_env = thr->builtins[DUK_BIDX_GLOBAL_ENV];
thr->builtins[DUK_BIDX_GLOBAL_ENV] = (duk_hobject *) h_env;
DUK_HOBJECT_INCREF(thr, (duk_hobject *) h_env);
- DUK_HOBJECT_DECREF_ALLOWNULL(thr, h_prev_env); /* side effects */
- DUK_UNREF(h_env); /* without refcounts */
+ DUK_HOBJECT_DECREF_ALLOWNULL(thr, h_prev_env); /* side effects */
+ DUK_UNREF(h_env); /* without refcounts */
DUK_UNREF(h_prev_env);
/* [ ... new_glob ] */
@@ -16287,20 +17337,20 @@ DUK_LOCAL void duk__inspect_multiple_uint(duk_hthread *thr, const char *fmt, duk
* be security implications.
*/
-#define DUK__IDX_TYPE 0
-#define DUK__IDX_ITAG 1
-#define DUK__IDX_REFC 2
-#define DUK__IDX_HBYTES 3
-#define DUK__IDX_CLASS 4
-#define DUK__IDX_PBYTES 5
-#define DUK__IDX_ESIZE 6
-#define DUK__IDX_ENEXT 7
-#define DUK__IDX_ASIZE 8
-#define DUK__IDX_HSIZE 9
-#define DUK__IDX_BCBYTES 10
-#define DUK__IDX_DBYTES 11
-#define DUK__IDX_TSTATE 12
-#define DUK__IDX_VARIANT 13
+#define DUK__IDX_TYPE 0
+#define DUK__IDX_ITAG 1
+#define DUK__IDX_REFC 2
+#define DUK__IDX_HBYTES 3
+#define DUK__IDX_CLASS 4
+#define DUK__IDX_PBYTES 5
+#define DUK__IDX_ESIZE 6
+#define DUK__IDX_ENEXT 7
+#define DUK__IDX_ASIZE 8
+#define DUK__IDX_HSIZE 9
+#define DUK__IDX_BCBYTES 10
+#define DUK__IDX_DBYTES 11
+#define DUK__IDX_TSTATE 12
+#define DUK__IDX_VARIANT 13
DUK_EXTERNAL void duk_inspect_value(duk_hthread *thr, duk_idx_t idx) {
duk_tval *tv;
@@ -16315,7 +17365,7 @@ DUK_EXTERNAL void duk_inspect_value(duk_hthread *thr, duk_idx_t idx) {
/* Assume two's complement and set everything to -1. */
duk_memset((void *) &vals, (int) 0xff, sizeof(vals));
- DUK_ASSERT(vals[DUK__IDX_TYPE] == -1); /* spot check one */
+ DUK_ASSERT(vals[DUK__IDX_TYPE] == -1); /* spot check one */
tv = duk_get_tval_or_unused(thr, idx);
h = (DUK_TVAL_IS_HEAP_ALLOCATED(tv) ? DUK_TVAL_GET_HEAPHDR(tv) : NULL);
@@ -16323,7 +17373,7 @@ DUK_EXTERNAL void duk_inspect_value(duk_hthread *thr, duk_idx_t idx) {
vals[DUK__IDX_TYPE] = duk_get_type_tval(tv);
vals[DUK__IDX_ITAG] = (duk_int_t) DUK_TVAL_GET_TAG(tv);
- duk_push_bare_object(thr); /* Invalidates 'tv'. */
+ duk_push_bare_object(thr); /* Invalidates 'tv'. */
tv = NULL;
if (h == NULL) {
@@ -16405,30 +17455,56 @@ DUK_EXTERNAL void duk_inspect_value(duk_hthread *thr, duk_idx_t idx) {
if (DUK_HBUFFER_HAS_DYNAMIC(h_buf)) {
if (DUK_HBUFFER_HAS_EXTERNAL(h_buf)) {
- vals[DUK__IDX_VARIANT] = 2; /* buffer variant 2: external */
+ vals[DUK__IDX_VARIANT] = 2; /* buffer variant 2: external */
vals[DUK__IDX_HBYTES] = (duk_uint_t) (sizeof(duk_hbuffer_external));
} else {
/* When alloc_size == 0 the second allocation may not
* actually exist.
*/
- vals[DUK__IDX_VARIANT] = 1; /* buffer variant 1: dynamic */
+ vals[DUK__IDX_VARIANT] = 1; /* buffer variant 1: dynamic */
vals[DUK__IDX_HBYTES] = (duk_uint_t) (sizeof(duk_hbuffer_dynamic));
}
vals[DUK__IDX_DBYTES] = (duk_int_t) (DUK_HBUFFER_GET_SIZE(h_buf));
} else {
- DUK_ASSERT(vals[DUK__IDX_VARIANT] == 0); /* buffer variant 0: fixed */
+ DUK_ASSERT(vals[DUK__IDX_VARIANT] == 0); /* buffer variant 0: fixed */
vals[DUK__IDX_HBYTES] = (duk_int_t) (sizeof(duk_hbuffer_fixed) + DUK_HBUFFER_GET_SIZE(h_buf));
}
break;
}
}
- finish:
+finish:
duk__inspect_multiple_uint(thr,
- "type" "\x00" "itag" "\x00" "refc" "\x00" "hbytes" "\x00" "class" "\x00"
- "pbytes" "\x00" "esize" "\x00" "enext" "\x00" "asize" "\x00" "hsize" "\x00"
- "bcbytes" "\x00" "dbytes" "\x00" "tstate" "\x00" "variant" "\x00" "\x00",
- (duk_int_t *) &vals);
+ "type"
+ "\x00"
+ "itag"
+ "\x00"
+ "refc"
+ "\x00"
+ "hbytes"
+ "\x00"
+ "class"
+ "\x00"
+ "pbytes"
+ "\x00"
+ "esize"
+ "\x00"
+ "enext"
+ "\x00"
+ "asize"
+ "\x00"
+ "hsize"
+ "\x00"
+ "bcbytes"
+ "\x00"
+ "dbytes"
+ "\x00"
+ "tstate"
+ "\x00"
+ "variant"
+ "\x00"
+ "\x00",
+ (duk_int_t *) &vals);
}
DUK_EXTERNAL void duk_inspect_callstack_entry(duk_hthread *thr, duk_int_t level) {
@@ -16567,7 +17643,7 @@ DUK_EXTERNAL void duk_gc(duk_hthread *thr, duk_uint_t flags) {
DUK_ASSERT(heap != NULL);
DUK_D(DUK_DPRINT("mark-and-sweep requested by application"));
- DUK_ASSERT(DUK_GC_COMPACT == DUK_MS_FLAG_EMERGENCY); /* Compact flag is 1:1 with emergency flag which forces compaction. */
+ DUK_ASSERT(DUK_GC_COMPACT == DUK_MS_FLAG_EMERGENCY); /* Compact flag is 1:1 with emergency flag which forces compaction. */
ms_flags = (duk_small_uint_t) flags;
duk_heap_mark_and_sweep(heap, ms_flags);
}
@@ -16603,9 +17679,9 @@ DUK_EXTERNAL duk_bool_t duk_get_prop(duk_hthread *thr, duk_idx_t obj_idx) {
DUK_ASSERT(rc == 0 || rc == 1);
/* a value is left on stack regardless of rc */
- duk_remove_m2(thr); /* remove key */
+ duk_remove_m2(thr); /* remove key */
DUK_ASSERT(duk_is_undefined(thr, -1) || rc == 1);
- return rc; /* 1 if property found, 0 otherwise */
+ return rc; /* 1 if property found, 0 otherwise */
}
DUK_EXTERNAL duk_bool_t duk_get_prop_string(duk_hthread *thr, duk_idx_t obj_idx, const char *key) {
@@ -16650,7 +17726,7 @@ DUK_EXTERNAL duk_bool_t duk_get_prop_heapptr(duk_hthread *thr, duk_idx_t obj_idx
DUK_ASSERT_API_ENTRY(thr);
obj_idx = duk_require_normalize_index(thr, obj_idx);
- (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
+ (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
return duk_get_prop(thr, obj_idx);
}
@@ -16664,11 +17740,13 @@ DUK_INTERNAL duk_bool_t duk_get_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx,
}
DUK_INTERNAL duk_bool_t duk_get_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args) {
- return duk_get_prop_stridx(thr, (duk_idx_t) (duk_int16_t) (packed_args >> 16),
- (duk_small_uint_t) (packed_args & 0xffffUL));
+ return duk_get_prop_stridx(thr, (duk_idx_t) (duk_int16_t) (packed_args >> 16), (duk_small_uint_t) (packed_args & 0xffffUL));
}
-DUK_INTERNAL duk_bool_t duk_get_prop_stridx_boolean(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx, duk_bool_t *out_has_prop) {
+DUK_INTERNAL duk_bool_t duk_get_prop_stridx_boolean(duk_hthread *thr,
+ duk_idx_t obj_idx,
+ duk_small_uint_t stridx,
+ duk_bool_t *out_has_prop) {
duk_bool_t rc;
DUK_ASSERT_API_ENTRY(thr);
@@ -16713,7 +17791,7 @@ DUK_INTERNAL duk_bool_t duk_xget_owndataprop(duk_hthread *thr, duk_idx_t obj_idx
}
duk_push_tval(thr, tv_val);
- duk_remove_m2(thr); /* remove key */
+ duk_remove_m2(thr); /* remove key */
return 1;
}
@@ -16728,7 +17806,8 @@ DUK_INTERNAL duk_bool_t duk_xget_owndataprop_stridx(duk_hthread *thr, duk_idx_t
}
DUK_INTERNAL duk_bool_t duk_xget_owndataprop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args) {
- return duk_xget_owndataprop_stridx(thr, (duk_idx_t) (duk_int16_t) (packed_args >> 16),
+ return duk_xget_owndataprop_stridx(thr,
+ (duk_idx_t) (duk_int16_t) (packed_args >> 16),
(duk_small_uint_t) (packed_args & 0xffffUL));
}
@@ -16747,8 +17826,7 @@ DUK_LOCAL duk_bool_t duk__put_prop_shared(duk_hthread *thr, duk_idx_t obj_idx, d
/* Key and value indices are either (-2, -1) or (-1, -2). Given idx_key,
* idx_val is always (idx_key ^ 0x01).
*/
- DUK_ASSERT((idx_key == -2 && (idx_key ^ 1) == -1) ||
- (idx_key == -1 && (idx_key ^ 1) == -2));
+ DUK_ASSERT((idx_key == -2 && (idx_key ^ 1) == -1) || (idx_key == -1 && (idx_key ^ 1) == -2));
/* XXX: Direct access; faster validation. */
tv_obj = duk_require_tval(thr, obj_idx);
tv_key = duk_require_tval(thr, idx_key);
@@ -16758,8 +17836,8 @@ DUK_LOCAL duk_bool_t duk__put_prop_shared(duk_hthread *thr, duk_idx_t obj_idx, d
rc = duk_hobject_putprop(thr, tv_obj, tv_key, tv_val, throw_flag);
DUK_ASSERT(rc == 0 || rc == 1);
- duk_pop_2(thr); /* remove key and value */
- return rc; /* 1 if property found, 0 otherwise */
+ duk_pop_2(thr); /* remove key and value */
+ return rc; /* 1 if property found, 0 otherwise */
}
DUK_EXTERNAL duk_bool_t duk_put_prop(duk_hthread *thr, duk_idx_t obj_idx) {
@@ -16813,11 +17891,10 @@ DUK_EXTERNAL duk_bool_t duk_put_prop_heapptr(duk_hthread *thr, duk_idx_t obj_idx
DUK_ASSERT_API_ENTRY(thr);
obj_idx = duk_require_normalize_index(thr, obj_idx);
- (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
+ (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
return duk__put_prop_shared(thr, obj_idx, -1);
}
-
DUK_INTERNAL duk_bool_t duk_put_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ASSERT_STRIDX_VALID(stridx);
@@ -16828,8 +17905,7 @@ DUK_INTERNAL duk_bool_t duk_put_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx,
}
DUK_INTERNAL duk_bool_t duk_put_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args) {
- return duk_put_prop_stridx(thr, (duk_idx_t) (duk_int16_t) (packed_args >> 16),
- (duk_small_uint_t) (packed_args & 0xffffUL));
+ return duk_put_prop_stridx(thr, (duk_idx_t) (duk_int16_t) (packed_args >> 16), (duk_small_uint_t) (packed_args & 0xffffUL));
}
DUK_EXTERNAL duk_bool_t duk_del_prop(duk_hthread *thr, duk_idx_t obj_idx) {
@@ -16851,7 +17927,7 @@ DUK_EXTERNAL duk_bool_t duk_del_prop(duk_hthread *thr, duk_idx_t obj_idx) {
rc = duk_hobject_delprop(thr, tv_obj, tv_key, throw_flag);
DUK_ASSERT(rc == 0 || rc == 1);
- duk_pop(thr); /* remove key */
+ duk_pop(thr); /* remove key */
return rc;
}
@@ -16897,7 +17973,7 @@ DUK_EXTERNAL duk_bool_t duk_del_prop_heapptr(duk_hthread *thr, duk_idx_t obj_idx
DUK_ASSERT_API_ENTRY(thr);
obj_idx = duk_require_normalize_index(thr, obj_idx);
- (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
+ (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
return duk_del_prop(thr, obj_idx);
}
@@ -16934,8 +18010,8 @@ DUK_EXTERNAL duk_bool_t duk_has_prop(duk_hthread *thr, duk_idx_t obj_idx) {
rc = duk_hobject_hasprop(thr, tv_obj, tv_key);
DUK_ASSERT(rc == 0 || rc == 1);
- duk_pop(thr); /* remove key */
- return rc; /* 1 if property found, 0 otherwise */
+ duk_pop(thr); /* remove key */
+ return rc; /* 1 if property found, 0 otherwise */
}
DUK_EXTERNAL duk_bool_t duk_has_prop_string(duk_hthread *thr, duk_idx_t obj_idx, const char *key) {
@@ -16980,7 +18056,7 @@ DUK_EXTERNAL duk_bool_t duk_has_prop_heapptr(duk_hthread *thr, duk_idx_t obj_idx
DUK_ASSERT_API_ENTRY(thr);
obj_idx = duk_require_normalize_index(thr, obj_idx);
- (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
+ (void) duk_push_heapptr(thr, ptr); /* NULL -> 'undefined' */
return duk_has_prop(thr, obj_idx);
}
@@ -17019,7 +18095,7 @@ DUK_INTERNAL void duk_xdef_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_small_u
duk_hobject_define_property_internal(thr, obj, key, desc_flags);
- duk_pop(thr); /* pop key */
+ duk_pop(thr); /* pop key */
}
DUK_INTERNAL void duk_xdef_prop_index(duk_hthread *thr, duk_idx_t obj_idx, duk_uarridx_t arr_idx, duk_small_uint_t desc_flags) {
@@ -17052,12 +18128,13 @@ DUK_INTERNAL void duk_xdef_prop_stridx(duk_hthread *thr, duk_idx_t obj_idx, duk_
}
DUK_INTERNAL void duk_xdef_prop_stridx_short_raw(duk_hthread *thr, duk_uint_t packed_args) {
- duk_xdef_prop_stridx(thr, (duk_idx_t) (duk_int8_t) (packed_args >> 24),
- (duk_small_uint_t) (packed_args >> 8) & 0xffffUL,
- (duk_small_uint_t) (packed_args & 0xffL));
+ duk_xdef_prop_stridx(thr,
+ (duk_idx_t) (duk_int8_t) (packed_args >> 24),
+ (duk_small_uint_t) (packed_args >> 8) & 0xffffUL,
+ (duk_small_uint_t) (packed_args & 0xffL));
}
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL void duk_xdef_prop_stridx_builtin(duk_hthread *thr, duk_idx_t obj_idx, duk_small_uint_t stridx, duk_small_int_t builtin_idx, duk_small_uint_t desc_flags) {
duk_hobject *obj;
duk_hstring *key;
@@ -17089,15 +18166,15 @@ DUK_INTERNAL void duk_xdef_prop_stridx_thrower(duk_hthread *thr, duk_idx_t obj_i
duk_push_hstring_stridx(thr, stridx);
duk_push_hobject_bidx(thr, DUK_BIDX_TYPE_ERROR_THROWER);
duk_dup_top(thr);
- duk_def_prop(thr, obj_idx, DUK_DEFPROP_HAVE_SETTER | DUK_DEFPROP_HAVE_GETTER | DUK_DEFPROP_FORCE); /* attributes always 0 */
+ duk_def_prop(thr, obj_idx, DUK_DEFPROP_HAVE_SETTER | DUK_DEFPROP_HAVE_GETTER | DUK_DEFPROP_FORCE); /* attributes always 0 */
}
/* Object.getOwnPropertyDescriptor() equivalent C binding. */
DUK_EXTERNAL void duk_get_prop_desc(duk_hthread *thr, duk_idx_t obj_idx, duk_uint_t flags) {
DUK_ASSERT_API_ENTRY(thr);
- DUK_UNREF(flags); /* no flags defined yet */
+ DUK_UNREF(flags); /* no flags defined yet */
- duk_hobject_object_get_own_property_descriptor(thr, obj_idx); /* [ ... key ] -> [ ... desc ] */
+ duk_hobject_object_get_own_property_descriptor(thr, obj_idx); /* [ ... key ] -> [ ... desc ] */
}
/* Object.defineProperty() equivalent C binding. */
@@ -17127,9 +18204,7 @@ DUK_EXTERNAL void duk_def_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_uint_t f
idx_base = duk_get_top_index(thr);
if (flags & DUK_DEFPROP_HAVE_SETTER) {
- duk_require_type_mask(thr, idx_base, DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_LIGHTFUNC);
+ duk_require_type_mask(thr, idx_base, DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_LIGHTFUNC);
set = duk_get_hobject_promote_lfunc(thr, idx_base);
if (set != NULL && !DUK_HOBJECT_IS_CALLABLE(set)) {
goto fail_not_callable;
@@ -17139,9 +18214,7 @@ DUK_EXTERNAL void duk_def_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_uint_t f
set = NULL;
}
if (flags & DUK_DEFPROP_HAVE_GETTER) {
- duk_require_type_mask(thr, idx_base, DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_LIGHTFUNC);
+ duk_require_type_mask(thr, idx_base, DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_LIGHTFUNC);
get = duk_get_hobject_promote_lfunc(thr, idx_base);
if (get != NULL && !DUK_HOBJECT_IS_CALLABLE(get)) {
goto fail_not_callable;
@@ -17161,14 +18234,7 @@ DUK_EXTERNAL void duk_def_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_uint_t f
duk_require_valid_index(thr, idx_base);
- duk_hobject_define_property_helper(thr,
- flags /*defprop_flags*/,
- obj,
- key,
- idx_value,
- get,
- set,
- 1 /*throw_flag*/);
+ duk_hobject_define_property_helper(thr, flags /*defprop_flags*/, obj, key, idx_value, get, set, 1 /*throw_flag*/);
/* Clean up stack */
@@ -17178,11 +18244,11 @@ DUK_EXTERNAL void duk_def_prop(duk_hthread *thr, duk_idx_t obj_idx, duk_uint_t f
return;
- fail_invalid_desc:
+fail_invalid_desc:
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_DESCRIPTOR);
DUK_WO_NORETURN(return;);
- fail_not_callable:
+fail_not_callable:
DUK_ERROR_TYPE(thr, DUK_STR_NOT_CALLABLE);
DUK_WO_NORETURN(return;);
}
@@ -17216,7 +18282,7 @@ DUK_EXTERNAL void duk_enum(duk_hthread *thr, duk_idx_t obj_idx, duk_uint_t enum_
duk_dup(thr, obj_idx);
duk_require_hobject_promote_mask(thr, -1, DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER);
- duk_hobject_enumerator_create(thr, enum_flags); /* [target] -> [enum] */
+ duk_hobject_enumerator_create(thr, enum_flags); /* [target] -> [enum] */
}
DUK_EXTERNAL duk_bool_t duk_next(duk_hthread *thr, duk_idx_t enum_index, duk_bool_t get_value) {
@@ -17277,8 +18343,8 @@ DUK_INTERNAL void duk_seal_freeze_raw(duk_hthread *thr, duk_idx_t obj_idx, duk_b
}
return;
- fail_cannot_freeze:
- DUK_ERROR_TYPE_INVALID_ARGS(thr); /* XXX: proper error message */
+fail_cannot_freeze:
+ DUK_ERROR_TYPE_INVALID_ARGS(thr); /* XXX: proper error message */
DUK_WO_NORETURN(return;);
}
@@ -17323,8 +18389,8 @@ DUK_EXTERNAL void duk_put_number_list(duk_hthread *thr, duk_idx_t obj_idx, const
if (ent != NULL) {
while (ent->key != NULL) {
tv = thr->valstack_top++;
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(tv)); /* value stack init policy */
- DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv, ent->value); /* no need for decref/incref */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(tv)); /* value stack init policy */
+ DUK_TVAL_SET_NUMBER_CHKFAST_SLOW(tv, ent->value); /* no need for decref/incref */
duk_put_prop_string(thr, obj_idx, ent->key);
ent++;
}
@@ -17394,7 +18460,6 @@ DUK_EXTERNAL duk_bool_t duk_get_global_heapptr(duk_hthread *thr, void *ptr) {
return ret;
}
-
DUK_EXTERNAL duk_bool_t duk_put_global_string(duk_hthread *thr, const char *key) {
duk_bool_t ret;
@@ -17405,7 +18470,7 @@ DUK_EXTERNAL duk_bool_t duk_put_global_string(duk_hthread *thr, const char *key)
duk_push_hobject(thr, thr->builtins[DUK_BIDX_GLOBAL]);
duk_insert(thr, -2);
- ret = duk_put_prop_string(thr, -2, key); /* [ ... global val ] -> [ ... global ] */
+ ret = duk_put_prop_string(thr, -2, key); /* [ ... global val ] -> [ ... global ] */
duk_pop(thr);
return ret;
}
@@ -17420,7 +18485,7 @@ DUK_EXTERNAL duk_bool_t duk_put_global_lstring(duk_hthread *thr, const char *key
duk_push_hobject(thr, thr->builtins[DUK_BIDX_GLOBAL]);
duk_insert(thr, -2);
- ret = duk_put_prop_lstring(thr, -2, key, key_len); /* [ ... global val ] -> [ ... global ] */
+ ret = duk_put_prop_lstring(thr, -2, key, key_len); /* [ ... global val ] -> [ ... global ] */
duk_pop(thr);
return ret;
}
@@ -17437,7 +18502,7 @@ DUK_EXTERNAL duk_bool_t duk_put_global_literal_raw(duk_hthread *thr, const char
duk_push_hobject(thr, thr->builtins[DUK_BIDX_GLOBAL]);
duk_insert(thr, -2);
- ret = duk_put_prop_literal_raw(thr, -2, key, key_len); /* [ ... global val ] -> [ ... global ] */
+ ret = duk_put_prop_literal_raw(thr, -2, key, key_len); /* [ ... global val ] -> [ ... global ] */
duk_pop(thr);
return ret;
}
@@ -17453,7 +18518,7 @@ DUK_EXTERNAL duk_bool_t duk_put_global_heapptr(duk_hthread *thr, void *ptr) {
duk_push_hobject(thr, thr->builtins[DUK_BIDX_GLOBAL]);
duk_insert(thr, -2);
- ret = duk_put_prop_heapptr(thr, -2, ptr); /* [ ... global val ] -> [ ... global ] */
+ ret = duk_put_prop_heapptr(thr, -2, ptr); /* [ ... global val ] -> [ ... global ] */
duk_pop(thr);
return ret;
}
@@ -17505,14 +18570,13 @@ DUK_EXTERNAL void duk_set_prototype(duk_hthread *thr, duk_idx_t idx) {
obj = duk_require_hobject(thr, idx);
DUK_ASSERT(obj != NULL);
- duk_require_type_mask(thr, -1, DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_OBJECT);
+ duk_require_type_mask(thr, -1, DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_OBJECT);
proto = duk_get_hobject(thr, -1);
/* proto can also be NULL here (allowed explicitly) */
#if defined(DUK_USE_ROM_OBJECTS)
if (DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj)) {
- DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE); /* XXX: "read only object"? */
+ DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE); /* XXX: "read only object"? */
DUK_WO_NORETURN(return;);
}
#endif
@@ -17532,7 +18596,7 @@ DUK_INTERNAL void duk_clear_prototype(duk_hthread *thr, duk_idx_t idx) {
#if defined(DUK_USE_ROM_OBJECTS)
if (DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj)) {
- DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE); /* XXX: "read only object"? */
+ DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE); /* XXX: "read only object"? */
DUK_WO_NORETURN(return;);
}
#endif
@@ -17579,7 +18643,7 @@ DUK_EXTERNAL void duk_set_finalizer(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- h = duk_require_hobject(thr, idx); /* Get before 'put' so that 'idx' is correct. */
+ h = duk_require_hobject(thr, idx); /* Get before 'put' so that 'idx' is correct. */
callable = duk_is_callable(thr, -1);
/* At present finalizer is stored as a hidden Symbol, with normal
@@ -17606,7 +18670,7 @@ DUK_EXTERNAL void duk_set_finalizer(duk_hthread *thr, duk_idx_t idx) {
DUK_HOBJECT_CLEAR_HAVE_FINALIZER(h);
}
}
-#else /* DUK_USE_FINALIZER_SUPPORT */
+#else /* DUK_USE_FINALIZER_SUPPORT */
DUK_EXTERNAL void duk_get_finalizer(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
DUK_UNREF(idx);
@@ -17620,7 +18684,7 @@ DUK_EXTERNAL void duk_set_finalizer(duk_hthread *thr, duk_idx_t idx) {
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* Random numbers
*/
@@ -17628,7 +18692,7 @@ DUK_EXTERNAL void duk_set_finalizer(duk_hthread *thr, duk_idx_t idx) {
/* #include duk_internal.h -> already included */
DUK_EXTERNAL duk_double_t duk_random(duk_hthread *thr) {
- return (duk_double_t) DUK_UTIL_GET_RANDOM_DOUBLE(thr);
+ return (duk_double_t) duk_util_get_random_double(thr);
}
/*
* API calls related to general value stack manipulation: resizing the value
@@ -17648,7 +18712,8 @@ DUK_EXTERNAL duk_double_t duk_random(duk_hthread *thr) {
* Forward declarations
*/
-DUK_LOCAL_DECL duk_idx_t duk__push_c_function_raw(duk_hthread *thr, duk_c_function func, duk_idx_t nargs, duk_uint_t flags, duk_small_uint_t proto_bidx);
+DUK_LOCAL_DECL duk_idx_t
+duk__push_c_function_raw(duk_hthread *thr, duk_c_function func, duk_idx_t nargs, duk_uint_t flags, duk_small_uint_t proto_bidx);
/*
* Global state for working around missing variadic macros
@@ -17663,41 +18728,24 @@ DUK_EXTERNAL duk_int_t duk_api_global_line = 0;
* Misc helpers
*/
-DUK_LOCAL const char * const duk__symbol_type_strings[4] = {
- "hidden", "global", "local", "wellknown"
-};
+DUK_LOCAL const char * const duk__symbol_type_strings[4] = { "hidden", "global", "local", "wellknown" };
#if !defined(DUK_USE_PACKED_TVAL)
DUK_LOCAL const duk_uint_t duk__type_from_tag[] = {
- DUK_TYPE_NUMBER,
- DUK_TYPE_NUMBER, /* fastint */
- DUK_TYPE_UNDEFINED,
- DUK_TYPE_NULL,
- DUK_TYPE_BOOLEAN,
- DUK_TYPE_POINTER,
- DUK_TYPE_LIGHTFUNC,
- DUK_TYPE_NONE,
- DUK_TYPE_STRING,
- DUK_TYPE_OBJECT,
- DUK_TYPE_BUFFER,
+ DUK_TYPE_NUMBER, DUK_TYPE_NUMBER, /* fastint */
+ DUK_TYPE_UNDEFINED, DUK_TYPE_NULL, DUK_TYPE_BOOLEAN, DUK_TYPE_POINTER, DUK_TYPE_LIGHTFUNC,
+ DUK_TYPE_NONE, DUK_TYPE_STRING, DUK_TYPE_OBJECT, DUK_TYPE_BUFFER,
};
DUK_LOCAL const duk_uint_t duk__type_mask_from_tag[] = {
- DUK_TYPE_MASK_NUMBER,
- DUK_TYPE_MASK_NUMBER, /* fastint */
- DUK_TYPE_MASK_UNDEFINED,
- DUK_TYPE_MASK_NULL,
- DUK_TYPE_MASK_BOOLEAN,
- DUK_TYPE_MASK_POINTER,
- DUK_TYPE_MASK_LIGHTFUNC,
- DUK_TYPE_MASK_NONE,
- DUK_TYPE_MASK_STRING,
- DUK_TYPE_MASK_OBJECT,
- DUK_TYPE_MASK_BUFFER,
+ DUK_TYPE_MASK_NUMBER, DUK_TYPE_MASK_NUMBER, /* fastint */
+ DUK_TYPE_MASK_UNDEFINED, DUK_TYPE_MASK_NULL, DUK_TYPE_MASK_BOOLEAN, DUK_TYPE_MASK_POINTER, DUK_TYPE_MASK_LIGHTFUNC,
+ DUK_TYPE_MASK_NONE, DUK_TYPE_MASK_STRING, DUK_TYPE_MASK_OBJECT, DUK_TYPE_MASK_BUFFER,
};
-#endif /* !DUK_USE_PACKED_TVAL */
+#endif /* !DUK_USE_PACKED_TVAL */
/* Assert that there's room for one value. */
-#define DUK__ASSERT_SPACE() do { \
+#define DUK__ASSERT_SPACE() \
+ do { \
DUK_ASSERT(!(thr->valstack_top >= thr->valstack_end)); \
} while (0)
@@ -17706,7 +18754,8 @@ DUK_LOCAL const duk_uint_t duk__type_mask_from_tag[] = {
/* Faster but value stack overruns are memory unsafe. */
#define DUK__CHECK_SPACE() DUK__ASSERT_SPACE()
#else
-#define DUK__CHECK_SPACE() do { \
+#define DUK__CHECK_SPACE() \
+ do { \
if (DUK_UNLIKELY(thr->valstack_top >= thr->valstack_end)) { \
DUK_ERROR_RANGE_PUSH_BEYOND(thr); \
} \
@@ -17719,7 +18768,7 @@ DUK_LOCAL duk_small_uint_t duk__get_symbol_type(duk_hstring *h) {
DUK_ASSERT(h != NULL);
DUK_ASSERT(DUK_HSTRING_HAS_SYMBOL(h));
- DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(h) >= 1); /* always true, symbol prefix */
+ DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(h) >= 1); /* always true, symbol prefix */
data = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h);
len = DUK_HSTRING_GET_BYTELEN(h);
@@ -17886,7 +18935,7 @@ DUK_EXTERNAL duk_idx_t duk_normalize_index(duk_hthread *thr, duk_idx_t idx) {
/* Assume value stack sizes (in elements) fits into duk_idx_t. */
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
vs_size = (duk_uidx_t) (thr->valstack_top - thr->valstack_bottom);
- DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
if (idx < 0) {
uidx = vs_size + (duk_uidx_t) idx;
@@ -17914,7 +18963,7 @@ DUK_EXTERNAL duk_idx_t duk_require_normalize_index(duk_hthread *thr, duk_idx_t i
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
vs_size = (duk_uidx_t) (thr->valstack_top - thr->valstack_bottom);
- DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
if (idx < 0) {
uidx = vs_size + (duk_uidx_t) idx;
@@ -17942,7 +18991,7 @@ DUK_INTERNAL duk_tval *duk_get_tval(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
vs_size = (duk_uidx_t) (thr->valstack_top - thr->valstack_bottom);
- DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
if (idx < 0) {
uidx = vs_size + (duk_uidx_t) idx;
@@ -17989,7 +19038,7 @@ DUK_INTERNAL duk_tval *duk_require_tval(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
vs_size = (duk_uidx_t) (thr->valstack_top - thr->valstack_bottom);
- DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(vs_size >= 0); /* unsigned */
/* Use unsigned arithmetic to optimize comparison. */
if (idx < 0) {
@@ -18128,7 +19177,7 @@ DUK_EXTERNAL void duk_set_top(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(count > 0);
tv = thr->valstack_top;
tv_end = tv - count;
- DUK_ASSERT(tv > tv_end); /* Because count > 0. */
+ DUK_ASSERT(tv > tv_end); /* Because count > 0. */
do {
tv--;
DUK_ASSERT(tv >= thr->valstack_bottom);
@@ -18136,7 +19185,7 @@ DUK_EXTERNAL void duk_set_top(duk_hthread *thr, duk_idx_t idx) {
} while (tv != tv_end);
thr->valstack_top = tv_end;
DUK_REFZERO_CHECK_FAST(thr);
-#else /* DUK_USE_REFERENCE_COUNTING */
+#else /* DUK_USE_REFERENCE_COUNTING */
duk_uidx_t count;
duk_tval *tv_end;
@@ -18149,7 +19198,7 @@ DUK_EXTERNAL void duk_set_top(duk_hthread *thr, duk_idx_t idx) {
DUK_TVAL_SET_UNDEFINED(tv);
} while (tv != tv_end);
thr->valstack_top = tv_end;
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
}
}
@@ -18160,7 +19209,7 @@ DUK_INTERNAL void duk_set_top_unsafe(duk_hthread *thr, duk_idx_t idx) {
duk_set_top(thr, idx);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
DUK_INTERNAL void duk_set_top_unsafe(duk_hthread *thr, duk_idx_t idx) {
duk_uidx_t uidx;
duk_uidx_t vs_size;
@@ -18199,7 +19248,7 @@ DUK_INTERNAL void duk_set_top_unsafe(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(count > 0);
tv = thr->valstack_top;
tv_end = tv - count;
- DUK_ASSERT(tv > tv_end); /* Because count > 0. */
+ DUK_ASSERT(tv > tv_end); /* Because count > 0. */
do {
tv--;
DUK_ASSERT(tv >= thr->valstack_bottom);
@@ -18207,7 +19256,7 @@ DUK_INTERNAL void duk_set_top_unsafe(duk_hthread *thr, duk_idx_t idx) {
} while (tv != tv_end);
thr->valstack_top = tv_end;
DUK_REFZERO_CHECK_FAST(thr);
-#else /* DUK_USE_REFERENCE_COUNTING */
+#else /* DUK_USE_REFERENCE_COUNTING */
duk_uidx_t count;
duk_tval *tv_end;
@@ -18220,10 +19269,10 @@ DUK_INTERNAL void duk_set_top_unsafe(duk_hthread *thr, duk_idx_t idx) {
DUK_TVAL_SET_UNDEFINED(tv);
} while (tv != tv_end);
thr->valstack_top = tv_end;
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
}
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
/* Internal helper: set top to 'top', and set [idx_wipe_start,top[ to
* 'undefined' (doing nothing if idx_wipe_start == top). Indices are
@@ -18323,9 +19372,9 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE duk_bool_t duk__resize_valstack(duk_hthread *thr
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
DUK_ASSERT(thr->valstack_end >= thr->valstack_top);
DUK_ASSERT(thr->valstack_alloc_end >= thr->valstack_end);
- DUK_ASSERT((duk_size_t) (thr->valstack_top - thr->valstack) <= new_size); /* can't resize below 'top' */
- DUK_ASSERT(new_size <= DUK_USE_VALSTACK_LIMIT); /* valstack limit caller has check, prevents wrapping */
- DUK_ASSERT(new_size <= DUK_SIZE_MAX / sizeof(duk_tval)); /* specific assert for wrapping */
+ DUK_ASSERT((duk_size_t) (thr->valstack_top - thr->valstack) <= new_size); /* can't resize below 'top' */
+ DUK_ASSERT(new_size <= DUK_USE_VALSTACK_LIMIT); /* valstack limit caller has check, prevents wrapping */
+ DUK_ASSERT(new_size <= DUK_SIZE_MAX / sizeof(duk_tval)); /* specific assert for wrapping */
/* Pre-realloc pointer copies for asserts and debug logs. */
pre_valstack = thr->valstack;
@@ -18360,7 +19409,8 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE duk_bool_t duk__resize_valstack(duk_hthread *thr
*/
DUK_ASSERT(new_size != 0);
DUK_D(DUK_DPRINT("failed to resize valstack to %lu entries (%lu bytes)",
- (unsigned long) new_size, (unsigned long) new_alloc_size));
+ (unsigned long) new_size,
+ (unsigned long) new_alloc_size));
return 0;
}
@@ -18371,23 +19421,28 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE duk_bool_t duk__resize_valstack(duk_hthread *thr
#if defined(DUK_USE_DEBUG)
if (thr->valstack != pre_valstack) {
DUK_D(DUK_DPRINT("valstack base pointer changed during valstack resize: %p -> %p",
- (void *) pre_valstack, (void *) thr->valstack));
+ (void *) pre_valstack,
+ (void *) thr->valstack));
}
if (thr->valstack_bottom != pre_bottom) {
DUK_D(DUK_DPRINT("valstack bottom pointer changed during valstack resize: %p -> %p",
- (void *) pre_bottom, (void *) thr->valstack_bottom));
+ (void *) pre_bottom,
+ (void *) thr->valstack_bottom));
}
if (thr->valstack_top != pre_top) {
DUK_D(DUK_DPRINT("valstack top pointer changed during valstack resize: %p -> %p",
- (void *) pre_top, (void *) thr->valstack_top));
+ (void *) pre_top,
+ (void *) thr->valstack_top));
}
if (thr->valstack_end != pre_end) {
DUK_D(DUK_DPRINT("valstack end pointer changed during valstack resize: %p -> %p",
- (void *) pre_end, (void *) thr->valstack_end));
+ (void *) pre_end,
+ (void *) thr->valstack_end));
}
if (thr->valstack_alloc_end != pre_alloc_end) {
DUK_D(DUK_DPRINT("valstack alloc_end pointer changed during valstack resize: %p -> %p",
- (void *) pre_alloc_end, (void *) thr->valstack_alloc_end));
+ (void *) pre_alloc_end,
+ (void *) thr->valstack_alloc_end));
}
#endif
@@ -18426,12 +19481,22 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE duk_bool_t duk__resize_valstack(duk_hthread *thr
(unsigned long) new_size,
(unsigned long) ((duk_uint8_t *) pre_alloc_end - (duk_uint8_t *) pre_valstack),
(unsigned long) new_alloc_size,
- (void *) pre_valstack, (void *) thr->valstack,
- (void *) pre_bottom, (void *) thr->valstack_bottom, (long) (thr->valstack_bottom - thr->valstack),
- (void *) pre_top, (void *) thr->valstack_top, (long) (thr->valstack_top - thr->valstack),
- (void *) pre_end, (void *) thr->valstack_end, (long) (thr->valstack_end - thr->valstack),
- (void *) pre_alloc_end, (void *) thr->valstack_alloc_end, (long) (thr->valstack_alloc_end - thr->valstack),
- (void *) tv_prev_alloc_end, (long) (thr->valstack_alloc_end - tv_prev_alloc_end)));
+ (void *) pre_valstack,
+ (void *) thr->valstack,
+ (void *) pre_bottom,
+ (void *) thr->valstack_bottom,
+ (long) (thr->valstack_bottom - thr->valstack),
+ (void *) pre_top,
+ (void *) thr->valstack_top,
+ (long) (thr->valstack_top - thr->valstack),
+ (void *) pre_end,
+ (void *) thr->valstack_end,
+ (long) (thr->valstack_end - thr->valstack),
+ (void *) pre_alloc_end,
+ (void *) thr->valstack_alloc_end,
+ (long) (thr->valstack_alloc_end - thr->valstack),
+ (void *) tv_prev_alloc_end,
+ (long) (thr->valstack_alloc_end - tv_prev_alloc_end)));
/* If allocation grew, init any new slots to 'undefined'. */
p = tv_prev_alloc_end;
@@ -18458,7 +19523,7 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE duk_bool_t duk__valstack_grow(duk_hthread *thr,
duk_size_t new_size;
DUK_ASSERT(min_bytes / sizeof(duk_tval) * sizeof(duk_tval) == min_bytes);
- min_size = min_bytes / sizeof(duk_tval); /* from bytes to slots */
+ min_size = min_bytes / sizeof(duk_tval); /* from bytes to slots */
#if defined(DUK_USE_VALSTACK_GROW_SHIFT)
/* New size is minimum size plus a proportional slack, e.g. shift of
@@ -18575,17 +19640,18 @@ DUK_INTERNAL void duk_valstack_shrink_check_nothrow(duk_hthread *thr, duk_bool_t
#else
slack = 0;
#endif
- shrink_bytes = reserve_bytes +
- slack / sizeof(duk_tval) * sizeof(duk_tval); /* multiple of duk_tval */
+ shrink_bytes = reserve_bytes + slack / sizeof(duk_tval) * sizeof(duk_tval); /* multiple of duk_tval */
}
-#else /* DUK_USE_VALSTACK_SHRINK_CHECK_SHIFT */
+#else /* DUK_USE_VALSTACK_SHRINK_CHECK_SHIFT */
/* Always snug, useful in some low memory environments. */
DUK_UNREF(snug);
shrink_bytes = reserve_bytes;
-#endif /* DUK_USE_VALSTACK_SHRINK_CHECK_SHIFT */
+#endif /* DUK_USE_VALSTACK_SHRINK_CHECK_SHIFT */
DUK_D(DUK_DPRINT("valstack shrink check: alloc_bytes=%ld, reserve_bytes=%ld, shrink_bytes=%ld (unvalidated)",
- (long) alloc_bytes, (long) reserve_bytes, (long) shrink_bytes));
+ (long) alloc_bytes,
+ (long) reserve_bytes,
+ (long) shrink_bytes));
DUK_ASSERT(shrink_bytes >= reserve_bytes);
if (shrink_bytes >= alloc_bytes) {
/* Skip if shrink target is same as current one (or higher,
@@ -18732,7 +19798,7 @@ DUK_EXTERNAL void duk_dup(duk_hthread *thr, duk_idx_t from_idx) {
DUK_ASSERT(tv_from != NULL);
DUK_ASSERT(tv_to != NULL);
DUK_TVAL_SET_TVAL(tv_to, tv_from);
- DUK_TVAL_INCREF(thr, tv_to); /* no side effects */
+ DUK_TVAL_INCREF(thr, tv_to); /* no side effects */
}
DUK_EXTERNAL void duk_dup_top(duk_hthread *thr) {
@@ -18754,7 +19820,7 @@ DUK_EXTERNAL void duk_dup_top(duk_hthread *thr) {
DUK_ASSERT(tv_from != NULL);
DUK_ASSERT(tv_to != NULL);
DUK_TVAL_SET_TVAL(tv_to, tv_from);
- DUK_TVAL_INCREF(thr, tv_to); /* no side effects */
+ DUK_TVAL_INCREF(thr, tv_to); /* no side effects */
#endif
}
@@ -18804,10 +19870,13 @@ DUK_EXTERNAL void duk_insert(duk_hthread *thr, duk_idx_t to_idx) {
* => [ ... | q | p | x | x ]
*/
- nbytes = (duk_size_t) (((duk_uint8_t *) q) - ((duk_uint8_t *) p)); /* Note: 'q' is top-1 */
+ nbytes = (duk_size_t) (((duk_uint8_t *) q) - ((duk_uint8_t *) p));
DUK_DDD(DUK_DDDPRINT("duk_insert: to_idx=%ld, p=%p, q=%p, nbytes=%lu",
- (long) to_idx, (void *) p, (void *) q, (unsigned long) nbytes));
+ (long) to_idx,
+ (void *) p,
+ (void *) q,
+ (unsigned long) nbytes));
/* No net refcount changes. No need to special case nbytes == 0
* (p == q).
@@ -18819,7 +19888,7 @@ DUK_EXTERNAL void duk_insert(duk_hthread *thr, duk_idx_t to_idx) {
DUK_INTERNAL void duk_insert_undefined(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(idx >= 0); /* Doesn't support negative indices. */
+ DUK_ASSERT(idx >= 0); /* Doesn't support negative indices. */
duk_push_undefined(thr);
duk_insert(thr, idx);
@@ -18829,7 +19898,7 @@ DUK_INTERNAL void duk_insert_undefined_n(duk_hthread *thr, duk_idx_t idx, duk_id
duk_tval *tv, *tv_end;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(idx >= 0); /* Doesn't support negative indices or count. */
+ DUK_ASSERT(idx >= 0); /* Doesn't support negative indices or count. */
DUK_ASSERT(count >= 0);
tv = duk_reserve_gap(thr, idx, count);
@@ -18840,6 +19909,43 @@ DUK_INTERNAL void duk_insert_undefined_n(duk_hthread *thr, duk_idx_t idx, duk_id
}
}
+DUK_EXTERNAL void duk_pull(duk_hthread *thr, duk_idx_t from_idx) {
+ duk_tval *p;
+ duk_tval *q;
+ duk_tval tv_tmp;
+ duk_size_t nbytes;
+
+ DUK_ASSERT_API_ENTRY(thr);
+
+ /* nbytes
+ * <--------->
+ * [ ... | x | x | p | y | y | q ]
+ * => [ ... | x | x | y | y | q | p ]
+ */
+
+ p = duk_require_tval(thr, from_idx);
+ DUK_ASSERT(p != NULL);
+ q = duk_require_tval(thr, -1);
+ DUK_ASSERT(q != NULL);
+
+ DUK_ASSERT(q >= p);
+
+ nbytes = (duk_size_t) (((duk_uint8_t *) q) - ((duk_uint8_t *) p));
+
+ DUK_DDD(DUK_DDDPRINT("duk_pull: from_idx=%ld, p=%p, q=%p, nbytes=%lu",
+ (long) from_idx,
+ (void *) p,
+ (void *) q,
+ (unsigned long) nbytes));
+
+ /* No net refcount changes. No need to special case nbytes == 0
+ * (p == q).
+ */
+ DUK_TVAL_SET_TVAL(&tv_tmp, p);
+ duk_memmove((void *) p, (const void *) (p + 1), (size_t) nbytes);
+ DUK_TVAL_SET_TVAL(q, &tv_tmp);
+}
+
DUK_EXTERNAL void duk_replace(duk_hthread *thr, duk_idx_t to_idx) {
duk_tval *tv1;
duk_tval *tv2;
@@ -18859,7 +19965,7 @@ DUK_EXTERNAL void duk_replace(duk_hthread *thr, duk_idx_t to_idx) {
DUK_TVAL_SET_TVAL(tv2, tv1);
DUK_TVAL_SET_UNDEFINED(tv1);
thr->valstack_top--;
- DUK_TVAL_DECREF(thr, &tv_tmp); /* side effects */
+ DUK_TVAL_DECREF(thr, &tv_tmp); /* side effects */
}
DUK_EXTERNAL void duk_copy(duk_hthread *thr, duk_idx_t from_idx, duk_idx_t to_idx) {
@@ -18874,7 +19980,7 @@ DUK_EXTERNAL void duk_copy(duk_hthread *thr, duk_idx_t from_idx, duk_idx_t to_id
DUK_ASSERT(tv2 != NULL);
/* For tv1 == tv2, this is a no-op (no explicit check needed). */
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv2, tv1); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv2, tv1); /* side effects */
}
DUK_EXTERNAL void duk_remove(duk_hthread *thr, duk_idx_t idx) {
@@ -18905,21 +20011,21 @@ DUK_EXTERNAL void duk_remove(duk_hthread *thr, duk_idx_t idx) {
DUK_TVAL_SET_TVAL(&tv_tmp, p);
#endif
- nbytes = (duk_size_t) (((duk_uint8_t *) q) - ((duk_uint8_t *) p)); /* Note: 'q' is top-1 */
+ nbytes = (duk_size_t) (((duk_uint8_t *) q) - ((duk_uint8_t *) p)); /* Note: 'q' is top-1 */
duk_memmove((void *) p, (const void *) (p + 1), (size_t) nbytes);
DUK_TVAL_SET_UNDEFINED(q);
thr->valstack_top--;
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_TVAL_DECREF(thr, &tv_tmp); /* side effects */
+ DUK_TVAL_DECREF(thr, &tv_tmp); /* side effects */
#endif
}
DUK_INTERNAL void duk_remove_unsafe(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- duk_remove(thr, idx); /* XXX: no optimization for now */
+ duk_remove(thr, idx); /* XXX: no optimization for now */
}
DUK_INTERNAL void duk_remove_m2(duk_hthread *thr) {
@@ -18938,7 +20044,7 @@ DUK_INTERNAL void duk_remove_n(duk_hthread *thr, duk_idx_t idx, duk_idx_t count)
while (count-- > 0) {
duk_remove(thr, idx);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
duk_tval *tv_src;
duk_tval *tv_dst;
duk_tval *tv_newtop;
@@ -18970,13 +20076,13 @@ DUK_INTERNAL void duk_remove_n(duk_hthread *thr, duk_idx_t idx, duk_idx_t count)
/* When not preferring size, only NORZ macros are used; caller
* is expected to DUK_REFZERO_CHECK().
*/
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
}
DUK_INTERNAL void duk_remove_n_unsafe(duk_hthread *thr, duk_idx_t idx, duk_idx_t count) {
DUK_ASSERT_API_ENTRY(thr);
- duk_remove_n(thr, idx, count); /* XXX: no optimization for now */
+ duk_remove_n(thr, idx, count); /* XXX: no optimization for now */
}
/*
@@ -19037,7 +20143,7 @@ DUK_EXTERNAL void duk_xcopymove_raw(duk_hthread *to_thr, duk_hthread *from_thr,
/* Incref copies, keep originals. */
q = to_thr->valstack_top;
while (p < q) {
- DUK_TVAL_INCREF(to_thr, p); /* no side effects */
+ DUK_TVAL_INCREF(to_thr, p); /* no side effects */
p++;
}
} else {
@@ -19137,7 +20243,7 @@ DUK_LOCAL DUK_ALWAYS_INLINE duk_bool_t duk__get_boolean_raw(duk_hthread *thr, du
DUK_EXTERNAL duk_bool_t duk_get_boolean(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- return duk__get_boolean_raw(thr, idx, 0); /* default: false */
+ return duk__get_boolean_raw(thr, idx, 0); /* default: false */
}
DUK_EXTERNAL duk_bool_t duk_get_boolean_default(duk_hthread *thr, duk_idx_t idx, duk_bool_t def_value) {
@@ -19183,11 +20289,10 @@ DUK_LOCAL DUK_ALWAYS_INLINE duk_double_t duk__get_number_raw(duk_hthread *thr, d
DUK_ASSERT(tv != NULL);
#if defined(DUK_USE_FASTINT)
if (DUK_TVAL_IS_FASTINT(tv)) {
- ret.d = (duk_double_t) DUK_TVAL_GET_FASTINT(tv); /* XXX: cast trick */
- }
- else
+ ret.d = (duk_double_t) DUK_TVAL_GET_FASTINT(tv); /* XXX: cast trick */
+ } else
#endif
- if (DUK_TVAL_IS_DOUBLE(tv)) {
+ if (DUK_TVAL_IS_DOUBLE(tv)) {
/* When using packed duk_tval, number must be in NaN-normalized form
* for it to be a duk_tval, so no need to normalize. NOP for unpacked
* duk_tval.
@@ -19204,7 +20309,7 @@ DUK_LOCAL DUK_ALWAYS_INLINE duk_double_t duk__get_number_raw(duk_hthread *thr, d
DUK_EXTERNAL duk_double_t duk_get_number(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- return duk__get_number_raw(thr, idx, DUK_DOUBLE_NAN); /* default: NaN */
+ return duk__get_number_raw(thr, idx, DUK_DOUBLE_NAN); /* default: NaN */
}
DUK_EXTERNAL duk_double_t duk_get_number_default(duk_hthread *thr, duk_idx_t idx, duk_double_t def_value) {
@@ -19360,7 +20465,11 @@ DUK_EXTERNAL const char *duk_get_string(duk_hthread *thr, duk_idx_t idx) {
}
}
-DUK_EXTERNAL const char *duk_opt_lstring(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_len, const char *def_ptr, duk_size_t def_len) {
+DUK_EXTERNAL const char *duk_opt_lstring(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_len,
+ const char *def_ptr,
+ duk_size_t def_len) {
DUK_ASSERT_API_ENTRY(thr);
if (duk_check_type_mask(thr, idx, DUK_TYPE_MASK_NONE | DUK_TYPE_MASK_UNDEFINED)) {
@@ -19381,7 +20490,11 @@ DUK_EXTERNAL const char *duk_opt_string(duk_hthread *thr, duk_idx_t idx, const c
return duk_require_string(thr, idx);
}
-DUK_EXTERNAL const char *duk_get_lstring_default(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_len, const char *def_ptr, duk_size_t def_len) {
+DUK_EXTERNAL const char *duk_get_lstring_default(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_len,
+ const char *def_ptr,
+ duk_size_t def_len) {
duk_hstring *h;
const char *ret;
duk_size_t len;
@@ -19470,7 +20583,7 @@ DUK_LOCAL void *duk__get_pointer_raw(duk_hthread *thr, duk_idx_t idx, void *def_
return def_value;
}
- p = DUK_TVAL_GET_POINTER(tv); /* may be NULL */
+ p = DUK_TVAL_GET_POINTER(tv); /* may be NULL */
return p;
}
@@ -19508,11 +20621,11 @@ DUK_EXTERNAL void *duk_require_pointer(duk_hthread *thr, duk_idx_t idx) {
DUK_ERROR_REQUIRE_TYPE_INDEX(thr, idx, "pointer", DUK_STR_NOT_POINTER);
DUK_WO_NORETURN(return NULL;);
}
- p = DUK_TVAL_GET_POINTER(tv); /* may be NULL */
+ p = DUK_TVAL_GET_POINTER(tv); /* may be NULL */
return p;
}
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL void *duk_get_voidptr(duk_hthread *thr, duk_idx_t idx) {
duk_tval *tv;
duk_heaphdr *h;
@@ -19531,7 +20644,12 @@ DUK_INTERNAL void *duk_get_voidptr(duk_hthread *thr, duk_idx_t idx) {
}
#endif
-DUK_LOCAL void *duk__get_buffer_helper(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_size, duk_bool_t throw_flag) {
+DUK_LOCAL void *duk__get_buffer_helper(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_size,
+ void *def_ptr,
+ duk_size_t def_size,
+ duk_bool_t throw_flag) {
duk_hbuffer *h;
void *ret;
duk_size_t len;
@@ -19584,7 +20702,11 @@ DUK_EXTERNAL void *duk_opt_buffer(duk_hthread *thr, duk_idx_t idx, duk_size_t *o
return duk_require_buffer(thr, idx, out_size);
}
-DUK_EXTERNAL void *duk_get_buffer_default(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_len) {
+DUK_EXTERNAL void *duk_get_buffer_default(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_size,
+ void *def_ptr,
+ duk_size_t def_len) {
DUK_ASSERT_API_ENTRY(thr);
return duk__get_buffer_helper(thr, idx, out_size, def_ptr, def_len, 0 /*throw_flag*/);
@@ -19601,7 +20723,13 @@ DUK_EXTERNAL void *duk_require_buffer(duk_hthread *thr, duk_idx_t idx, duk_size_
* have a NULL data pointer when its size is zero, the optional 'out_isbuffer'
* argument allows caller to detect this reliably.
*/
-DUK_INTERNAL void *duk_get_buffer_data_raw(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_size, duk_bool_t throw_flag, duk_bool_t *out_isbuffer) {
+DUK_INTERNAL void *duk_get_buffer_data_raw(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_size,
+ void *def_ptr,
+ duk_size_t def_size,
+ duk_bool_t throw_flag,
+ duk_bool_t *out_isbuffer) {
duk_tval *tv;
DUK_ASSERT_API_ENTRY(thr);
@@ -19625,7 +20753,7 @@ DUK_INTERNAL void *duk_get_buffer_data_raw(duk_hthread *thr, duk_idx_t idx, duk_
if (out_isbuffer != NULL) {
*out_isbuffer = 1;
}
- return (void *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h); /* may be NULL (but only if size is 0) */
+ return (void *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h); /* may be NULL (but only if size is 0) */
}
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
else if (DUK_TVAL_IS_OBJECT(tv)) {
@@ -19638,8 +20766,7 @@ DUK_INTERNAL void *duk_get_buffer_data_raw(duk_hthread *thr, duk_idx_t idx, duk_
duk_hbufobj *h_bufobj = (duk_hbufobj *) h;
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
- if (h_bufobj->buf != NULL &&
- DUK_HBUFOBJ_VALID_SLICE(h_bufobj)) {
+ if (h_bufobj->buf != NULL && DUK_HBUFOBJ_VALID_SLICE(h_bufobj)) {
duk_uint8_t *p;
p = (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufobj->buf);
@@ -19654,7 +20781,7 @@ DUK_INTERNAL void *duk_get_buffer_data_raw(duk_hthread *thr, duk_idx_t idx, duk_
/* if slice not fully valid, treat as error */
}
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
if (throw_flag) {
DUK_ERROR_REQUIRE_TYPE_INDEX(thr, idx, "buffer", DUK_STR_NOT_BUFFER);
@@ -19668,7 +20795,11 @@ DUK_EXTERNAL void *duk_get_buffer_data(duk_hthread *thr, duk_idx_t idx, duk_size
return duk_get_buffer_data_raw(thr, idx, out_size, NULL /*def_ptr*/, 0 /*def_size*/, 0 /*throw_flag*/, NULL);
}
-DUK_EXTERNAL void *duk_get_buffer_data_default(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_size, void *def_ptr, duk_size_t def_size) {
+DUK_EXTERNAL void *duk_get_buffer_data_default(duk_hthread *thr,
+ duk_idx_t idx,
+ duk_size_t *out_size,
+ void *def_ptr,
+ duk_size_t def_size) {
DUK_ASSERT_API_ENTRY(thr);
return duk_get_buffer_data_raw(thr, idx, out_size, def_ptr, def_size, 0 /*throw_flag*/, NULL);
}
@@ -19708,9 +20839,8 @@ DUK_LOCAL duk_heaphdr *duk__get_tagged_heaphdr_raw(duk_hthread *thr, duk_idx_t i
}
ret = DUK_TVAL_GET_HEAPHDR(tv);
- DUK_ASSERT(ret != NULL); /* tagged null pointers should never occur */
+ DUK_ASSERT(ret != NULL); /* tagged null pointers should never occur */
return ret;
-
}
DUK_INTERNAL duk_hstring *duk_get_hstring(duk_hthread *thr, duk_idx_t idx) {
@@ -20045,7 +21175,7 @@ DUK_LOCAL duk_hobject *duk__get_hobject_promote_mask_raw(duk_hthread *thr, duk_i
DUK_CTX_ASSERT_VALID(thr);
- res = duk_get_hobject(thr, idx); /* common case, not promoted */
+ res = duk_get_hobject(thr, idx); /* common case, not promoted */
if (DUK_LIKELY(res != NULL)) {
DUK_ASSERT(res != NULL);
return res;
@@ -20058,7 +21188,7 @@ DUK_LOCAL duk_hobject *duk__get_hobject_promote_mask_raw(duk_hthread *thr, duk_i
DUK_ASSERT(res != NULL);
return res;
} else {
- return NULL; /* accept without promoting */
+ return NULL; /* accept without promoting */
}
}
@@ -20101,7 +21231,7 @@ DUK_INTERNAL duk_hobject *duk_get_hobject_with_class(duk_hthread *thr, duk_idx_t
duk_hobject *h;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT_DISABLE(classnum >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(classnum >= 0); /* unsigned */
DUK_ASSERT(classnum <= DUK_HOBJECT_CLASS_MAX);
h = (duk_hobject *) duk__get_tagged_heaphdr_raw(thr, idx, DUK_TAG_OBJECT);
@@ -20115,7 +21245,7 @@ DUK_INTERNAL duk_hobject *duk_require_hobject_with_class(duk_hthread *thr, duk_i
duk_hobject *h;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT_DISABLE(classnum >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(classnum >= 0); /* unsigned */
DUK_ASSERT(classnum <= DUK_HOBJECT_CLASS_MAX);
h = (duk_hobject *) duk__get_tagged_heaphdr_raw(thr, idx, DUK_TAG_OBJECT);
@@ -20161,7 +21291,7 @@ DUK_EXTERNAL duk_size_t duk_get_length(duk_hthread *thr, duk_idx_t idx) {
duk_pop_unsafe(thr);
return ret;
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
case DUK_TAG_STRING: {
duk_hstring *h = DUK_TVAL_GET_STRING(tv);
DUK_ASSERT(h != NULL);
@@ -20187,7 +21317,7 @@ DUK_EXTERNAL duk_size_t duk_get_length(duk_hthread *thr, duk_idx_t idx) {
duk_pop_unsafe(thr);
return ret;
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
case DUK_TAG_OBJECT: {
duk_hobject *h = DUK_TVAL_GET_OBJECT(tv);
DUK_ASSERT(h != NULL);
@@ -20284,8 +21414,8 @@ DUK_LOCAL duk_bool_t duk__defaultvalue_coerce_attempt(duk_hthread *thr, duk_idx_
if (duk_get_prop_stridx(thr, idx, func_stridx)) {
/* [ ... func ] */
if (duk_is_callable(thr, -1)) {
- duk_dup(thr, idx); /* -> [ ... func this ] */
- duk_call_method(thr, 0); /* -> [ ... retval ] */
+ duk_dup(thr, idx); /* -> [ ... func this ] */
+ duk_call_method(thr, 0); /* -> [ ... retval ] */
if (duk_is_primitive(thr, -1)) {
duk_replace(thr, idx);
return 1;
@@ -20293,7 +21423,7 @@ DUK_LOCAL duk_bool_t duk__defaultvalue_coerce_attempt(duk_hthread *thr, duk_idx_
/* [ ... retval ]; popped below */
}
}
- duk_pop_unsafe(thr); /* [ ... func/retval ] -> [ ... ] */
+ duk_pop_unsafe(thr); /* [ ... func/retval ] -> [ ... ] */
return 0;
}
@@ -20304,7 +21434,7 @@ DUK_EXTERNAL void duk_to_undefined(duk_hthread *thr, duk_idx_t idx) {
tv = duk_require_tval(thr, idx);
DUK_ASSERT(tv != NULL);
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
}
DUK_EXTERNAL void duk_to_null(duk_hthread *thr, duk_idx_t idx) {
@@ -20314,13 +21444,11 @@ DUK_EXTERNAL void duk_to_null(duk_hthread *thr, duk_idx_t idx) {
tv = duk_require_tval(thr, idx);
DUK_ASSERT(tv != NULL);
- DUK_TVAL_SET_NULL_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_NULL_UPDREF(thr, tv); /* side effects */
}
/* E5 Section 9.1 */
-DUK_LOCAL const char * const duk__toprim_hint_strings[3] = {
- "default", "string", "number"
-};
+DUK_LOCAL const char * const duk__toprim_hint_strings[3] = { "default", "string", "number" };
DUK_LOCAL void duk__to_primitive_helper(duk_hthread *thr, duk_idx_t idx, duk_int_t hint, duk_bool_t check_symbol) {
/* Inline initializer for coercers[] is not allowed by old compilers like BCC. */
duk_small_uint_t coercers[2];
@@ -20331,10 +21459,8 @@ DUK_LOCAL void duk__to_primitive_helper(duk_hthread *thr, duk_idx_t idx, duk_int
idx = duk_require_normalize_index(thr, idx);
/* If already primitive, return as is. */
- if (!duk_check_type_mask(thr, idx, DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_LIGHTFUNC |
- DUK_TYPE_MASK_BUFFER)) {
- DUK_ASSERT(!duk_is_buffer(thr, idx)); /* duk_to_string() relies on this behavior */
+ if (!duk_check_type_mask(thr, idx, DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER)) {
+ DUK_ASSERT(!duk_is_buffer(thr, idx)); /* duk_to_string() relies on this behavior */
return;
}
@@ -20345,10 +21471,8 @@ DUK_LOCAL void duk__to_primitive_helper(duk_hthread *thr, duk_idx_t idx, duk_int
DUK_ASSERT(hint >= 0 && (duk_size_t) hint < sizeof(duk__toprim_hint_strings) / sizeof(const char *));
duk_dup(thr, idx);
duk_push_string(thr, duk__toprim_hint_strings[hint]);
- duk_call_method(thr, 1); /* [ ... method value hint ] -> [ ... res] */
- if (duk_check_type_mask(thr, -1, DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_LIGHTFUNC |
- DUK_TYPE_MASK_BUFFER)) {
+ duk_call_method(thr, 1); /* [ ... method value hint ] -> [ ... res] */
+ if (duk_check_type_mask(thr, -1, DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER)) {
goto fail;
}
duk_replace(thr, idx);
@@ -20370,7 +21494,7 @@ DUK_LOCAL void duk__to_primitive_helper(duk_hthread *thr, duk_idx_t idx, duk_int
if (hint == DUK_HINT_NONE) {
hint = DUK_HINT_NUMBER;
}
-#else /* DUK_USE_SYMBOL_BUILTIN */
+#else /* DUK_USE_SYMBOL_BUILTIN */
if (hint == DUK_HINT_NONE) {
duk_small_uint_t class_number;
@@ -20381,7 +21505,7 @@ DUK_LOCAL void duk__to_primitive_helper(duk_hthread *thr, duk_idx_t idx, duk_int
hint = DUK_HINT_NUMBER;
}
}
-#endif /* DUK_USE_SYMBOL_BUILTIN */
+#endif /* DUK_USE_SYMBOL_BUILTIN */
coercers[0] = DUK_STRIDX_VALUE_OF;
coercers[1] = DUK_STRIDX_TO_STRING;
@@ -20391,16 +21515,16 @@ DUK_LOCAL void duk__to_primitive_helper(duk_hthread *thr, duk_idx_t idx, duk_int
}
if (duk__defaultvalue_coerce_attempt(thr, idx, coercers[0])) {
- DUK_ASSERT(!duk_is_buffer(thr, idx)); /* duk_to_string() relies on this behavior */
+ DUK_ASSERT(!duk_is_buffer(thr, idx)); /* duk_to_string() relies on this behavior */
return;
}
if (duk__defaultvalue_coerce_attempt(thr, idx, coercers[1])) {
- DUK_ASSERT(!duk_is_buffer(thr, idx)); /* duk_to_string() relies on this behavior */
+ DUK_ASSERT(!duk_is_buffer(thr, idx)); /* duk_to_string() relies on this behavior */
return;
}
- fail:
+fail:
DUK_ERROR_TYPE(thr, DUK_STR_TOPRIMITIVE_FAILED);
DUK_WO_NORETURN(return;);
}
@@ -20431,7 +21555,7 @@ DUK_EXTERNAL duk_bool_t duk_to_boolean(duk_hthread *thr, duk_idx_t idx) {
/* Note: no need to re-lookup tv, conversion is side effect free. */
DUK_ASSERT(tv != NULL);
- DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv, val); /* side effects */
+ DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv, val); /* side effects */
return val;
}
@@ -20463,11 +21587,11 @@ DUK_EXTERNAL duk_double_t duk_to_number(duk_hthread *thr, duk_idx_t idx) {
idx = duk_require_normalize_index(thr, idx);
tv = DUK_GET_TVAL_POSIDX(thr, idx);
DUK_ASSERT(tv != NULL);
- d = duk_js_tonumber(thr, tv); /* XXX: fastint coercion? now result will always be a non-fastint */
+ d = duk_js_tonumber(thr, tv); /* XXX: fastint coercion? now result will always be a non-fastint */
/* ToNumber() may have side effects so must relookup 'tv'. */
tv = DUK_GET_TVAL_POSIDX(thr, idx);
- DUK_TVAL_SET_NUMBER_UPDREF(thr, tv, d); /* side effects */
+ DUK_TVAL_SET_NUMBER_UPDREF(thr, tv, d); /* side effects */
return d;
}
@@ -20499,13 +21623,13 @@ DUK_INTERNAL duk_double_t duk_to_number_tval(duk_hthread *thr, duk_tval *tv) {
tv_dst = thr->valstack_top++;
DUK_TVAL_SET_TVAL(tv_dst, tv);
- DUK_TVAL_INCREF(thr, tv_dst); /* decref not necessary */
- res = duk_to_number_m1(thr); /* invalidates tv_dst */
+ DUK_TVAL_INCREF(thr, tv_dst); /* decref not necessary */
+ res = duk_to_number_m1(thr); /* invalidates tv_dst */
tv_dst = --thr->valstack_top;
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_dst));
- DUK_ASSERT(!DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv_dst)); /* plain number */
- DUK_TVAL_SET_UNDEFINED(tv_dst); /* valstack init policy */
+ DUK_ASSERT(!DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv_dst)); /* plain number */
+ DUK_TVAL_SET_UNDEFINED(tv_dst); /* valstack init policy */
return res;
#endif
@@ -20541,7 +21665,7 @@ DUK_LOCAL duk_double_t duk__to_int_uint_helper(duk_hthread *thr, duk_idx_t idx,
/* Relookup in case coerce_func() has side effects, e.g. ends up coercing an object */
tv = duk_require_tval(thr, idx);
- DUK_TVAL_SET_NUMBER_UPDREF(thr, tv, d); /* side effects */
+ DUK_TVAL_SET_NUMBER_UPDREF(thr, tv, d); /* side effects */
return d;
}
@@ -20575,7 +21699,7 @@ DUK_EXTERNAL duk_int32_t duk_to_int32(duk_hthread *thr, duk_idx_t idx) {
/* Relookup in case coerce_func() has side effects, e.g. ends up coercing an object */
tv = duk_require_tval(thr, idx);
- DUK_TVAL_SET_I32_UPDREF(thr, tv, ret); /* side effects */
+ DUK_TVAL_SET_I32_UPDREF(thr, tv, ret); /* side effects */
return ret;
}
@@ -20591,7 +21715,7 @@ DUK_EXTERNAL duk_uint32_t duk_to_uint32(duk_hthread *thr, duk_idx_t idx) {
/* Relookup in case coerce_func() has side effects, e.g. ends up coercing an object */
tv = duk_require_tval(thr, idx);
- DUK_TVAL_SET_U32_UPDREF(thr, tv, ret); /* side effects */
+ DUK_TVAL_SET_U32_UPDREF(thr, tv, ret); /* side effects */
return ret;
}
@@ -20607,7 +21731,7 @@ DUK_EXTERNAL duk_uint16_t duk_to_uint16(duk_hthread *thr, duk_idx_t idx) {
/* Relookup in case coerce_func() has side effects, e.g. ends up coercing an object */
tv = duk_require_tval(thr, idx);
- DUK_TVAL_SET_U32_UPDREF(thr, tv, ret); /* side effects */
+ DUK_TVAL_SET_U32_UPDREF(thr, tv, ret); /* side effects */
return ret;
}
@@ -20636,19 +21760,19 @@ DUK_INTERNAL duk_uint8_t duk_to_uint8clamped(duk_hthread *thr, duk_idx_t idx) {
}
t = d - DUK_FLOOR(d);
- if (t == 0.5) {
+ if (duk_double_equals(t, 0.5)) {
/* Exact halfway, round to even. */
ret = (duk_uint8_t) d;
- ret = (ret + 1) & 0xfe; /* Example: d=3.5, t=0.5 -> ret = (3 + 1) & 0xfe = 4 & 0xfe = 4
- * Example: d=4.5, t=0.5 -> ret = (4 + 1) & 0xfe = 5 & 0xfe = 4
- */
+ ret = (ret + 1) & 0xfe; /* Example: d=3.5, t=0.5 -> ret = (3 + 1) & 0xfe = 4 & 0xfe = 4
+ * Example: d=4.5, t=0.5 -> ret = (4 + 1) & 0xfe = 5 & 0xfe = 4
+ */
} else {
/* Not halfway, round to nearest. */
ret = (duk_uint8_t) (d + 0.5);
}
return ret;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
DUK_EXTERNAL const char *duk_to_lstring(duk_hthread *thr, duk_idx_t idx, duk_size_t *out_len) {
DUK_ASSERT_API_ENTRY(thr);
@@ -20758,7 +21882,7 @@ DUK_INTERNAL duk_hstring *duk_to_property_key_hstring(duk_hthread *thr, duk_idx_
DUK_ASSERT_API_ENTRY(thr);
- duk_to_primitive(thr, idx, DUK_HINT_STRING); /* needed for e.g. Symbol objects */
+ duk_to_primitive(thr, idx, DUK_HINT_STRING); /* needed for e.g. Symbol objects */
h = duk_get_hstring(thr, idx);
if (h == NULL) {
/* The "is string?" check may seem unnecessary, but as things
@@ -20772,7 +21896,7 @@ DUK_INTERNAL duk_hstring *duk_to_property_key_hstring(duk_hthread *thr, duk_idx_
return h;
}
-#if defined(DUK_USE_DEBUGGER_SUPPORT) /* only needed by debugger for now */
+#if defined(DUK_USE_DEBUGGER_SUPPORT) /* only needed by debugger for now */
DUK_INTERNAL duk_hstring *duk_safe_to_hstring(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
@@ -20784,134 +21908,6 @@ DUK_INTERNAL duk_hstring *duk_safe_to_hstring(duk_hthread *thr, duk_idx_t idx) {
#endif
/* Push Object.prototype.toString() output for 'tv'. */
-#if 0 /* See XXX note why this variant doesn't work. */
-DUK_INTERNAL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk_bool_t avoid_side_effects) {
- duk_uint_t stridx_bidx = 0; /* (prototype_bidx << 16) + default_tag_stridx */
-
- DUK_ASSERT_API_ENTRY(thr);
-
- /* Conceptually for any non-undefined/null value we should do a
- * ToObject() coercion and look up @@toStringTag (from the object
- * prototype) to see if a custom tag should be used. Avoid the
- * actual conversion by doing a prototype lookup without the object
- * coercion. However, see problem below.
- */
-
- duk_push_literal(thr, "[object "); /* -> [ ... "[object" ] */
-
- switch (DUK_TVAL_GET_TAG(tv)) {
- case DUK_TAG_UNUSED: /* Treat like 'undefined', shouldn't happen. */
- case DUK_TAG_UNDEFINED: {
- stridx_bidx = DUK_STRIDX_UC_UNDEFINED;
- goto use_stridx;
- }
- case DUK_TAG_NULL: {
- stridx_bidx = DUK_STRIDX_UC_NULL;
- goto use_stridx;
- }
- case DUK_TAG_BOOLEAN: {
- stridx_bidx = (DUK_BIDX_BOOLEAN_PROTOTYPE << 16) + DUK_STRIDX_UC_BOOLEAN;
- goto use_proto_bidx;
- }
- case DUK_TAG_POINTER: {
- stridx_bidx = (DUK_BIDX_POINTER_PROTOTYPE << 16) + DUK_STRIDX_UC_POINTER;
- goto use_proto_bidx;
- }
- case DUK_TAG_LIGHTFUNC: {
- stridx_bidx = (DUK_BIDX_FUNCTION_PROTOTYPE << 16) + DUK_STRIDX_UC_FUNCTION;
- goto use_proto_bidx;
- }
- case DUK_TAG_STRING: {
- duk_hstring *h;
- h = DUK_TVAL_GET_STRING(tv);
- DUK_ASSERT(h != NULL);
- if (DUK_UNLIKELY(DUK_HSTRING_HAS_SYMBOL(h))) {
- /* Even without DUK_USE_SYMBOL_BUILTIN the Symbol
- * prototype exists so we can lookup @@toStringTag
- * and provide [object Symbol] for symbol values
- * created from C code.
- */
- stridx_bidx = (DUK_BIDX_SYMBOL_PROTOTYPE << 16) + DUK_STRIDX_UC_SYMBOL;
- } else {
- stridx_bidx = (DUK_BIDX_STRING_PROTOTYPE << 16) + DUK_STRIDX_UC_STRING;
- }
- goto use_proto_bidx;
- }
- case DUK_TAG_OBJECT: {
- duk_push_tval(thr, tv);
- stridx_bidx = 0xffffffffUL; /* Marker value. */
- goto use_pushed_object;
- }
- case DUK_TAG_BUFFER: {
- stridx_bidx = (DUK_BIDX_UINT8ARRAY_PROTOTYPE << 16) + DUK_STRIDX_UINT8_ARRAY;
- goto use_proto_bidx;
- }
-#if defined(DUK_USE_FASTINT)
- case DUK_TAG_FASTINT:
- /* Fall through to generic number case. */
-#endif
- default: {
- DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv)); /* number (maybe fastint) */
- stridx_bidx = (DUK_BIDX_NUMBER_PROTOTYPE << 16) + DUK_STRIDX_UC_NUMBER;
- goto use_proto_bidx;
- }
- }
- DUK_ASSERT(0); /* Never here. */
-
- use_proto_bidx:
- DUK_ASSERT_BIDX_VALID((stridx_bidx >> 16) & 0xffffUL);
- duk_push_hobject(thr, thr->builtins[(stridx_bidx >> 16) & 0xffffUL]);
- /* Fall through. */
-
- use_pushed_object:
- /* [ ... "[object" obj ] */
-
-#if defined(DUK_USE_SYMBOL_BUILTIN)
- /* XXX: better handling with avoid_side_effects == 1; lookup tval
- * without Proxy or getter side effects, and use it in sanitized
- * form if it's a string.
- */
- if (!avoid_side_effects) {
- /* XXX: The problem with using the prototype object as the
- * lookup base is that if @@toStringTag is a getter, its
- * 'this' binding must be the ToObject() coerced input value,
- * not the prototype object of the type.
- */
- (void) duk_get_prop_stridx(thr, -1, DUK_STRIDX_WELLKNOWN_SYMBOL_TO_STRING_TAG);
- if (duk_is_string_notsymbol(thr, -1)) {
- duk_remove_m2(thr);
- goto finish;
- }
- duk_pop_unsafe(thr);
- }
-#endif
-
- if (stridx_bidx == 0xffffffffUL) {
- duk_hobject *h_obj;
- duk_small_uint_t classnum;
-
- h_obj = duk_known_hobject(thr, -1);
- DUK_ASSERT(h_obj != NULL);
- classnum = DUK_HOBJECT_GET_CLASS_NUMBER(h_obj);
- stridx_bidx = DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(classnum);
- } else {
- /* stridx_bidx already has the desired fallback stridx. */
- ;
- }
- duk_pop_unsafe(thr);
- /* Fall through. */
-
- use_stridx:
- /* [ ... "[object" ] */
- duk_push_hstring_stridx(thr, stridx_bidx & 0xffffUL);
-
- finish:
- /* [ ... "[object" tag ] */
- duk_push_literal(thr, "]");
- duk_concat(thr, 3); /* [ ... "[object" tag "]" ] -> [ ... res ] */
-}
-#endif /* 0 */
-
DUK_INTERNAL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk_bool_t avoid_side_effects) {
duk_hobject *h_obj;
duk_small_uint_t classnum;
@@ -20927,11 +21923,13 @@ DUK_INTERNAL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk
/* Conceptually for any non-undefined/null value we should do a
* ToObject() coercion and look up @@toStringTag (from the object
- * prototype) to see if a custom result should be used. We'd like to
- * avoid the actual conversion, but even for primitive types the
- * prototype may have @@toStringTag. What's worse, the @@toStringTag
- * property may be a getter that must get the object coerced value
- * (not the prototype) as its 'this' binding.
+ * prototype) to see if a custom result should be used, with the
+ * exception of Arrays which are handled specially first.
+ *
+ * We'd like to avoid the actual conversion, but even for primitive
+ * types the prototype may have @@toStringTag. What's worse, the
+ * @@toStringTag property may be a getter that must get the object
+ * coerced value (not the prototype) as its 'this' binding.
*
* For now, do an actual object coercion. This could be avoided by
* doing a side effect free lookup to see if a getter would be invoked.
@@ -20940,10 +21938,10 @@ DUK_INTERNAL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk
* Object.prototype.toString() is usually not performance critical.
*/
- duk_push_literal(thr, "[object "); /* -> [ ... "[object" ] */
+ duk_push_literal(thr, "[object "); /* -> [ ... "[object" ] */
switch (DUK_TVAL_GET_TAG(tv)) {
- case DUK_TAG_UNUSED: /* Treat like 'undefined', shouldn't happen. */
+ case DUK_TAG_UNUSED: /* Treat like 'undefined', shouldn't happen. */
case DUK_TAG_UNDEFINED: {
duk_push_hstring_stridx(thr, DUK_STRIDX_UC_UNDEFINED);
goto finish;
@@ -20955,43 +21953,46 @@ DUK_INTERNAL void duk_push_class_string_tval(duk_hthread *thr, duk_tval *tv, duk
}
duk_push_tval(thr, tv);
- tv = NULL; /* Invalidated by ToObject(). */
- duk_to_object(thr, -1);
-
- /* [ ... "[object" obj ] */
+ tv = NULL; /* Invalidated by ToObject(). */
+ h_obj = duk_to_hobject(thr, -1);
+ DUK_ASSERT(h_obj != NULL);
+ if (duk_js_isarray_hobject(h_obj)) {
+ stridx = DUK_STRIDX_UC_ARRAY;
+ } else {
+ /* [ ... "[object" obj ] */
#if defined(DUK_USE_SYMBOL_BUILTIN)
- /* XXX: better handling with avoid_side_effects == 1; lookup tval
- * without Proxy or getter side effects, and use it in sanitized
- * form if it's a string.
- */
- if (!avoid_side_effects) {
- (void) duk_get_prop_stridx(thr, -1, DUK_STRIDX_WELLKNOWN_SYMBOL_TO_STRING_TAG);
- if (duk_is_string_notsymbol(thr, -1)) {
- duk_remove_m2(thr);
- goto finish;
+ /* XXX: better handling with avoid_side_effects == 1; lookup tval
+ * without Proxy or getter side effects, and use it in sanitized
+ * form if it's a string.
+ */
+ if (!avoid_side_effects) {
+ (void) duk_get_prop_stridx(thr, -1, DUK_STRIDX_WELLKNOWN_SYMBOL_TO_STRING_TAG);
+ if (duk_is_string_notsymbol(thr, -1)) {
+ duk_remove_m2(thr);
+ goto finish;
+ }
+ duk_pop_unsafe(thr);
}
- duk_pop_unsafe(thr);
- }
#else
- DUK_UNREF(avoid_side_effects);
+ DUK_UNREF(avoid_side_effects);
#endif
- h_obj = duk_known_hobject(thr, -1);
- DUK_ASSERT(h_obj != NULL);
- classnum = DUK_HOBJECT_GET_CLASS_NUMBER(h_obj);
- stridx = DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(classnum);
+ classnum = DUK_HOBJECT_GET_CLASS_NUMBER(h_obj);
+ stridx = DUK_HOBJECT_CLASS_NUMBER_TO_STRIDX(classnum);
+ }
duk_pop_unsafe(thr);
duk_push_hstring_stridx(thr, stridx);
- finish:
+finish:
/* [ ... "[object" tag ] */
duk_push_literal(thr, "]");
- duk_concat(thr, 3); /* [ ... "[object" tag "]" ] -> [ ... res ] */
+ duk_concat(thr, 3); /* [ ... "[object" tag "]" ] -> [ ... res ] */
}
/* XXX: other variants like uint, u32 etc */
-DUK_INTERNAL 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) {
+DUK_INTERNAL 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) {
duk_tval *tv;
duk_tval tv_tmp;
duk_double_t d, dmin, dmax;
@@ -21002,7 +22003,7 @@ DUK_INTERNAL duk_int_t duk_to_int_clamped_raw(duk_hthread *thr, duk_idx_t idx, d
tv = duk_require_tval(thr, idx);
DUK_ASSERT(tv != NULL);
- d = duk_js_tointeger(thr, tv); /* E5 Section 9.4, ToInteger() */
+ d = duk_js_tointeger(thr, tv); /* E5 Section 9.4, ToInteger() */
dmin = (duk_double_t) minval;
dmax = (duk_double_t) maxval;
@@ -21018,12 +22019,12 @@ DUK_INTERNAL duk_int_t duk_to_int_clamped_raw(duk_hthread *thr, duk_idx_t idx, d
} else {
res = (duk_int_t) d;
}
- DUK_UNREF(d); /* SCANBUILD: with suitable dmin/dmax limits 'd' is unused */
+ DUK_UNREF(d); /* SCANBUILD: with suitable dmin/dmax limits 'd' is unused */
/* 'd' and 'res' agree here */
/* Relookup in case duk_js_tointeger() ends up e.g. coercing an object. */
tv = duk_get_tval(thr, idx);
- DUK_ASSERT(tv != NULL); /* not popped by side effect */
+ DUK_ASSERT(tv != NULL); /* not popped by side effect */
DUK_TVAL_SET_TVAL(&tv_tmp, tv);
#if defined(DUK_USE_FASTINT)
#if (DUK_INT_MAX <= 0x7fffffffL)
@@ -21037,9 +22038,9 @@ DUK_INTERNAL duk_int_t duk_to_int_clamped_raw(duk_hthread *thr, duk_idx_t idx, d
}
#endif
#else
- DUK_TVAL_SET_NUMBER(tv, d); /* no need to incref */
+ DUK_TVAL_SET_NUMBER(tv, d); /* no need to incref */
#endif
- DUK_TVAL_DECREF(thr, &tv_tmp); /* side effects */
+ DUK_TVAL_DECREF(thr, &tv_tmp); /* side effects */
if (out_clamped) {
*out_clamped = clamped;
@@ -21064,7 +22065,7 @@ DUK_INTERNAL duk_int_t duk_to_int_clamped(duk_hthread *thr, duk_idx_t idx, duk_i
DUK_INTERNAL duk_int_t duk_to_int_check_range(duk_hthread *thr, duk_idx_t idx, duk_int_t minval, duk_int_t maxval) {
DUK_ASSERT_API_ENTRY(thr);
- return duk_to_int_clamped_raw(thr, idx, minval, maxval, NULL); /* out_clamped==NULL -> RangeError if outside range */
+ return duk_to_int_clamped_raw(thr, idx, minval, maxval, NULL); /* out_clamped==NULL -> RangeError if outside range */
}
DUK_EXTERNAL const char *duk_to_string(duk_hthread *thr, duk_idx_t idx) {
@@ -21123,9 +22124,9 @@ DUK_EXTERNAL const char *duk_to_string(duk_hthread *thr, duk_idx_t idx) {
* value, and duk_to_string() then causes a TypeError.
*/
duk_to_primitive(thr, idx, DUK_HINT_STRING);
- DUK_ASSERT(!duk_is_buffer(thr, idx)); /* ToPrimitive() must guarantee */
+ DUK_ASSERT(!duk_is_buffer(thr, idx)); /* ToPrimitive() must guarantee */
DUK_ASSERT(!duk_is_object(thr, idx));
- return duk_to_string(thr, idx); /* Note: recursive call */
+ return duk_to_string(thr, idx); /* Note: recursive call */
}
case DUK_TAG_POINTER: {
void *ptr = DUK_TVAL_GET_POINTER(tv);
@@ -21153,17 +22154,14 @@ DUK_EXTERNAL const char *duk_to_string(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(!DUK_TVAL_IS_UNUSED(tv));
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv));
duk_push_tval(thr, tv);
- duk_numconv_stringify(thr,
- 10 /*radix*/,
- 0 /*precision:shortest*/,
- 0 /*force_exponential*/);
+ duk_numconv_stringify(thr, 10 /*radix*/, 0 /*precision:shortest*/, 0 /*force_exponential*/);
break;
}
}
duk_replace(thr, idx);
- skip_replace:
+skip_replace:
DUK_ASSERT(duk_is_string(thr, idx));
return duk_require_string(thr, idx);
}
@@ -21245,8 +22243,7 @@ DUK_EXTERNAL void *duk_to_buffer_raw(duk_hthread *thr, duk_idx_t idx, duk_size_t
src_size = DUK_HBUFFER_GET_SIZE(h_buf);
tmp = (DUK_HBUFFER_HAS_DYNAMIC(h_buf) ? DUK_BUF_MODE_DYNAMIC : DUK_BUF_MODE_FIXED);
- if ((tmp == mode && !DUK_HBUFFER_HAS_EXTERNAL(h_buf)) ||
- mode == DUK_BUF_MODE_DONTCARE) {
+ if ((tmp == mode && !DUK_HBUFFER_HAS_EXTERNAL(h_buf)) || mode == DUK_BUF_MODE_DONTCARE) {
/* Note: src_data may be NULL if input is a zero-size
* dynamic buffer.
*/
@@ -21267,7 +22264,7 @@ DUK_EXTERNAL void *duk_to_buffer_raw(duk_hthread *thr, duk_idx_t idx, duk_size_t
duk_memcpy_unsafe((void *) dst_data, (const void *) src_data, (size_t) src_size);
duk_replace(thr, idx);
- skip_copy:
+skip_copy:
if (out_size) {
*out_size = src_size;
@@ -21327,7 +22324,7 @@ DUK_EXTERNAL void *duk_to_pointer(duk_hthread *thr, duk_idx_t idx) {
DUK_LOCAL void duk__push_func_from_lightfunc(duk_hthread *thr, duk_c_function func, duk_small_uint_t lf_flags) {
duk_idx_t nargs;
- duk_uint_t flags = 0; /* shared flags for a subset of types */
+ duk_uint_t flags = 0; /* shared flags for a subset of types */
duk_small_uint_t lf_len;
duk_hnatfunc *nf;
@@ -21336,15 +22333,9 @@ DUK_LOCAL void duk__push_func_from_lightfunc(duk_hthread *thr, duk_c_function fu
nargs = (duk_idx_t) DUK_VARARGS;
}
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_CONSTRUCTABLE |
- DUK_HOBJECT_FLAG_CALLABLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_NATFUNC |
- DUK_HOBJECT_FLAG_NEWENV |
- DUK_HOBJECT_FLAG_STRICT |
- DUK_HOBJECT_FLAG_NOTAIL |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_CONSTRUCTABLE | DUK_HOBJECT_FLAG_CALLABLE |
+ DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_NATFUNC | DUK_HOBJECT_FLAG_NEWENV | DUK_HOBJECT_FLAG_STRICT |
+ DUK_HOBJECT_FLAG_NOTAIL | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
(void) duk__push_c_function_raw(thr, func, nargs, flags, DUK_BIDX_NATIVE_FUNCTION_PROTOTYPE);
lf_len = DUK_LFUNC_FLAGS_GET_LENGTH(lf_flags);
@@ -21365,7 +22356,7 @@ DUK_LOCAL void duk__push_func_from_lightfunc(duk_hthread *thr, duk_c_function fu
DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
duk_tval *tv;
- duk_uint_t flags = 0; /* shared flags for a subset of types */
+ duk_uint_t flags = 0; /* shared flags for a subset of types */
duk_small_int_t proto = 0;
DUK_ASSERT_API_ENTRY(thr);
@@ -21376,7 +22367,7 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
switch (DUK_TVAL_GET_TAG(tv)) {
#if !defined(DUK_USE_BUFFEROBJECT_SUPPORT)
- case DUK_TAG_BUFFER: /* With no bufferobject support, don't object coerce. */
+ case DUK_TAG_BUFFER: /* With no bufferobject support, don't object coerce. */
#endif
case DUK_TAG_UNDEFINED:
case DUK_TAG_NULL: {
@@ -21385,9 +22376,8 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
break;
}
case DUK_TAG_BOOLEAN: {
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_BOOLEAN);
+ flags =
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_BOOLEAN);
proto = DUK_BIDX_BOOLEAN_PROTOTYPE;
goto create_object;
}
@@ -21396,14 +22386,11 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
h = DUK_TVAL_GET_STRING(tv);
DUK_ASSERT(h != NULL);
if (DUK_UNLIKELY(DUK_HSTRING_HAS_SYMBOL(h))) {
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_SYMBOL);
proto = DUK_BIDX_SYMBOL_PROTOTYPE;
} else {
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ |
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ |
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_STRING);
proto = DUK_BIDX_STRING_PROTOTYPE;
}
@@ -21429,11 +22416,10 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
duk_hbufobj_push_uint8array_from_plain(thr, h_buf);
goto replace_value;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
case DUK_TAG_POINTER: {
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_POINTER);
+ flags =
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_POINTER);
proto = DUK_BIDX_POINTER_PROTOTYPE;
goto create_object;
}
@@ -21460,9 +22446,8 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
default: {
DUK_ASSERT(!DUK_TVAL_IS_UNUSED(tv));
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv));
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_NUMBER);
+ flags =
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_NUMBER);
proto = DUK_BIDX_NUMBER_PROTOTYPE;
goto create_object;
}
@@ -21470,7 +22455,7 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(duk_is_object(thr, idx));
return;
- create_object:
+create_object:
(void) duk_push_object_helper(thr, flags, proto);
/* Note: Boolean prototype's internal value property is not writable,
@@ -21483,7 +22468,7 @@ DUK_EXTERNAL void duk_to_object(duk_hthread *thr, duk_idx_t idx) {
duk_dup(thr, idx);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_VALUE, DUK_PROPDESC_FLAGS_NONE);
- replace_value:
+replace_value:
duk_replace(thr, idx);
DUK_ASSERT(duk_is_object(thr, idx));
}
@@ -21554,11 +22539,11 @@ DUK_INTERNAL duk_int_t duk_get_type_tval(duk_tval *tv) {
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv));
return DUK_TYPE_NUMBER;
}
-#else /* DUK_USE_PACKED_TVAL */
+#else /* DUK_USE_PACKED_TVAL */
DUK_ASSERT(DUK_TVAL_IS_VALID_TAG(tv));
DUK_ASSERT(sizeof(duk__type_from_tag) / sizeof(duk_uint_t) == DUK_TAG_MAX - DUK_TAG_MIN + 1);
return (duk_int_t) duk__type_from_tag[DUK_TVAL_GET_TAG(tv) - DUK_TAG_MIN];
-#endif /* DUK_USE_PACKED_TVAL */
+#endif /* DUK_USE_PACKED_TVAL */
}
DUK_EXTERNAL duk_int_t duk_get_type(duk_hthread *thr, duk_idx_t idx) {
@@ -21573,18 +22558,8 @@ DUK_EXTERNAL duk_int_t duk_get_type(duk_hthread *thr, duk_idx_t idx) {
}
#if defined(DUK_USE_VERBOSE_ERRORS) && defined(DUK_USE_PARANOID_ERRORS)
-DUK_LOCAL const char * const duk__type_names[] = {
- "none",
- "undefined",
- "null",
- "boolean",
- "number",
- "string",
- "object",
- "buffer",
- "pointer",
- "lightfunc"
-};
+DUK_LOCAL const char * const duk__type_names[] = { "none", "undefined", "null", "boolean", "number",
+ "string", "object", "buffer", "pointer", "lightfunc" };
DUK_INTERNAL const char *duk_get_type_name(duk_hthread *thr, duk_idx_t idx) {
duk_int_t type_tag;
@@ -21597,7 +22572,7 @@ DUK_INTERNAL const char *duk_get_type_name(duk_hthread *thr, duk_idx_t idx) {
return duk__type_names[type_tag];
}
-#endif /* DUK_USE_VERBOSE_ERRORS && DUK_USE_PARANOID_ERRORS */
+#endif /* DUK_USE_VERBOSE_ERRORS && DUK_USE_PARANOID_ERRORS */
DUK_INTERNAL duk_small_uint_t duk_get_class_number(duk_hthread *thr, duk_idx_t idx) {
duk_tval *tv;
@@ -21663,11 +22638,11 @@ DUK_INTERNAL duk_uint_t duk_get_type_mask_tval(duk_tval *tv) {
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv));
return DUK_TYPE_MASK_NUMBER;
}
-#else /* DUK_USE_PACKED_TVAL */
+#else /* DUK_USE_PACKED_TVAL */
DUK_ASSERT(DUK_TVAL_IS_VALID_TAG(tv));
DUK_ASSERT(sizeof(duk__type_mask_from_tag) / sizeof(duk_uint_t) == DUK_TAG_MAX - DUK_TAG_MIN + 1);
return duk__type_mask_from_tag[DUK_TVAL_GET_TAG(tv) - DUK_TAG_MIN];
-#endif /* DUK_USE_PACKED_TVAL */
+#endif /* DUK_USE_PACKED_TVAL */
}
DUK_EXTERNAL duk_uint_t duk_get_type_mask(duk_hthread *thr, duk_idx_t idx) {
@@ -21786,14 +22761,14 @@ DUK_EXTERNAL duk_bool_t duk_is_buffer_data(duk_hthread *thr, duk_idx_t idx) {
}
return 0;
}
-#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
DUK_EXTERNAL duk_bool_t duk_is_buffer_data(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
return duk_is_buffer(thr, idx);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
DUK_EXTERNAL duk_bool_t duk_is_pointer(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
@@ -21819,14 +22794,15 @@ DUK_EXTERNAL duk_bool_t duk_is_symbol(duk_hthread *thr, duk_idx_t idx) {
return 0;
}
+/* IsArray(), returns true for Array instance or Proxy of Array instance. */
DUK_EXTERNAL duk_bool_t duk_is_array(duk_hthread *thr, duk_idx_t idx) {
- duk_hobject *obj;
+ duk_tval *tv;
DUK_ASSERT_API_ENTRY(thr);
- obj = duk_get_hobject(thr, idx);
- if (obj) {
- return (DUK_HOBJECT_GET_CLASS_NUMBER(obj) == DUK_HOBJECT_CLASS_ARRAY ? 1 : 0);
+ tv = duk_get_tval(thr, idx);
+ if (tv) {
+ return duk_js_isarray(tv);
}
return 0;
}
@@ -21886,23 +22862,17 @@ DUK_EXTERNAL duk_bool_t duk_is_constructable(duk_hthread *thr, duk_idx_t idx) {
DUK_EXTERNAL duk_bool_t duk_is_c_function(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- return duk__obj_flag_any_default_false(thr,
- idx,
- DUK_HOBJECT_FLAG_NATFUNC);
+ return duk__obj_flag_any_default_false(thr, idx, DUK_HOBJECT_FLAG_NATFUNC);
}
DUK_EXTERNAL duk_bool_t duk_is_ecmascript_function(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- return duk__obj_flag_any_default_false(thr,
- idx,
- DUK_HOBJECT_FLAG_COMPFUNC);
+ return duk__obj_flag_any_default_false(thr, idx, DUK_HOBJECT_FLAG_COMPFUNC);
}
DUK_EXTERNAL duk_bool_t duk_is_bound_function(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT_API_ENTRY(thr);
- return duk__obj_flag_any_default_false(thr,
- idx,
- DUK_HOBJECT_FLAG_BOUNDFUNC);
+ return duk__obj_flag_any_default_false(thr, idx, DUK_HOBJECT_FLAG_BOUNDFUNC);
}
DUK_EXTERNAL duk_bool_t duk_is_thread(duk_hthread *thr, duk_idx_t idx) {
@@ -22019,7 +22989,7 @@ DUK_INTERNAL void duk_push_tval(duk_hthread *thr, duk_tval *tv) {
DUK__CHECK_SPACE();
tv_slot = thr->valstack_top++;
DUK_TVAL_SET_TVAL(tv_slot, tv);
- DUK_TVAL_INCREF(thr, tv); /* no side effects */
+ DUK_TVAL_INCREF(thr, tv); /* no side effects */
}
DUK_EXTERNAL void duk_push_undefined(duk_hthread *thr) {
@@ -22049,7 +23019,7 @@ DUK_EXTERNAL void duk_push_boolean(duk_hthread *thr, duk_bool_t val) {
DUK_ASSERT_API_ENTRY(thr);
DUK__CHECK_SPACE();
- b = (val ? 1 : 0); /* ensure value is 1 or 0 (not other non-zero) */
+ b = (val ? 1 : 0); /* ensure value is 1 or 0 (not other non-zero) */
tv_slot = thr->valstack_top++;
DUK_TVAL_SET_BOOLEAN(tv_slot, b);
}
@@ -22102,7 +23072,7 @@ DUK_EXTERNAL void duk_push_int(duk_hthread *thr, duk_int_t val) {
DUK_TVAL_SET_NUMBER(tv_slot, d);
}
#endif
-#else /* DUK_USE_FASTINT */
+#else /* DUK_USE_FASTINT */
duk_tval *tv_slot;
duk_double_t d;
@@ -22111,7 +23081,7 @@ DUK_EXTERNAL void duk_push_int(duk_hthread *thr, duk_int_t val) {
d = (duk_double_t) val;
tv_slot = thr->valstack_top++;
DUK_TVAL_SET_NUMBER(tv_slot, d);
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
}
DUK_EXTERNAL void duk_push_uint(duk_hthread *thr, duk_uint_t val) {
@@ -22124,7 +23094,7 @@ DUK_EXTERNAL void duk_push_uint(duk_hthread *thr, duk_uint_t val) {
#if DUK_UINT_MAX <= 0xffffffffUL
DUK_TVAL_SET_U32(tv_slot, (duk_uint32_t) val);
#else
- if (val <= DUK_FASTINT_MAX) { /* val is unsigned so >= 0 */
+ if (val <= DUK_FASTINT_MAX) { /* val is unsigned so >= 0 */
/* XXX: take advantage of val being unsigned, no need to mask */
DUK_TVAL_SET_FASTINT(tv_slot, (duk_int64_t) val);
} else {
@@ -22132,7 +23102,7 @@ DUK_EXTERNAL void duk_push_uint(duk_hthread *thr, duk_uint_t val) {
DUK_TVAL_SET_NUMBER(tv_slot, d);
}
#endif
-#else /* DUK_USE_FASTINT */
+#else /* DUK_USE_FASTINT */
duk_tval *tv_slot;
duk_double_t d;
@@ -22141,7 +23111,7 @@ DUK_EXTERNAL void duk_push_uint(duk_hthread *thr, duk_uint_t val) {
d = (duk_double_t) val;
tv_slot = thr->valstack_top++;
DUK_TVAL_SET_NUMBER(tv_slot, d);
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
}
DUK_EXTERNAL void duk_push_nan(duk_hthread *thr) {
@@ -22185,7 +23155,7 @@ DUK_EXTERNAL const char *duk_push_lstring(duk_hthread *thr, const char *str, duk
tv_slot = thr->valstack_top++;
DUK_TVAL_SET_STRING(tv_slot, h);
- DUK_HSTRING_INCREF(thr, h); /* no side effects */
+ DUK_HSTRING_INCREF(thr, h); /* no side effects */
return (const char *) DUK_HSTRING_GET_DATA(h);
}
@@ -22222,11 +23192,11 @@ DUK_EXTERNAL const char *duk_push_literal_raw(duk_hthread *thr, const char *str,
tv_slot = thr->valstack_top++;
DUK_TVAL_SET_STRING(tv_slot, h);
- DUK_HSTRING_INCREF(thr, h); /* no side effects */
+ DUK_HSTRING_INCREF(thr, h); /* no side effects */
return (const char *) DUK_HSTRING_GET_DATA(h);
}
-#else /* DUK_USE_LITCACHE_SIZE */
+#else /* DUK_USE_LITCACHE_SIZE */
DUK_EXTERNAL const char *duk_push_literal_raw(duk_hthread *thr, const char *str, duk_size_t len) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ASSERT(str != NULL);
@@ -22234,8 +23204,8 @@ DUK_EXTERNAL const char *duk_push_literal_raw(duk_hthread *thr, const char *str,
return duk_push_lstring(thr, str, len);
}
-#endif /* DUK_USE_LITCACHE_SIZE */
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_LITCACHE_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
DUK_EXTERNAL void duk_push_pointer(duk_hthread *thr, void *val) {
duk_tval *tv_slot;
@@ -22263,7 +23233,7 @@ DUK_LOCAL void duk__push_this_helper(duk_hthread *thr, duk_small_uint_t check_ob
DUK__CHECK_SPACE();
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* because of valstack init policy */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* because of valstack init policy */
tv_slot = thr->valstack_top++;
if (DUK_UNLIKELY(thr->callstack_curr == NULL)) {
@@ -22277,8 +23247,7 @@ DUK_LOCAL void duk__push_this_helper(duk_hthread *thr, duk_small_uint_t check_ob
/* 'this' binding is just before current activation's bottom */
DUK_ASSERT(thr->valstack_bottom > thr->valstack);
tv = thr->valstack_bottom - 1;
- if (check_object_coercible &&
- (DUK_TVAL_IS_UNDEFINED(tv) || DUK_TVAL_IS_NULL(tv))) {
+ if (check_object_coercible && (DUK_TVAL_IS_UNDEFINED(tv) || DUK_TVAL_IS_NULL(tv))) {
/* XXX: better macro for DUK_TVAL_IS_UNDEFINED_OR_NULL(tv) */
goto type_error;
}
@@ -22288,7 +23257,7 @@ DUK_LOCAL void duk__push_this_helper(duk_hthread *thr, duk_small_uint_t check_ob
}
return;
- type_error:
+type_error:
DUK_ERROR_TYPE(thr, DUK_STR_NOT_OBJECT_COERCIBLE);
DUK_WO_NORETURN(return;);
}
@@ -22320,16 +23289,16 @@ DUK_INTERNAL duk_hstring *duk_push_this_coercible_to_string(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
duk__push_this_helper(thr, 1 /*check_object_coercible*/);
- return duk_to_hstring_m1(thr); /* This will reject all Symbol values; accepts Symbol objects. */
+ return duk_to_hstring_m1(thr); /* This will reject all Symbol values; accepts Symbol objects. */
}
DUK_INTERNAL duk_tval *duk_get_borrowed_this_tval(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(thr->callstack_top > 0); /* caller required to know */
- DUK_ASSERT(thr->callstack_curr != NULL); /* caller required to know */
- DUK_ASSERT(thr->valstack_bottom > thr->valstack); /* consequence of above */
- DUK_ASSERT(thr->valstack_bottom - 1 >= thr->valstack); /* 'this' binding exists */
+ DUK_ASSERT(thr->callstack_top > 0); /* caller required to know */
+ DUK_ASSERT(thr->callstack_curr != NULL); /* caller required to know */
+ DUK_ASSERT(thr->valstack_bottom > thr->valstack); /* consequence of above */
+ DUK_ASSERT(thr->valstack_bottom - 1 >= thr->valstack); /* 'this' binding exists */
return thr->valstack_bottom - 1;
}
@@ -22410,7 +23379,10 @@ DUK_LOCAL void duk__push_stash(duk_hthread *thr) {
duk_pop_unsafe(thr);
duk_push_bare_object(thr);
duk_dup_top(thr);
- duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_INT_VALUE, DUK_PROPDESC_FLAGS_C); /* [ ... parent stash stash ] -> [ ... parent stash ] */
+ duk_xdef_prop_stridx_short(thr,
+ -3,
+ DUK_STRIDX_INT_VALUE,
+ DUK_PROPDESC_FLAGS_C); /* [ ... parent stash stash ] -> [ ... parent stash ] */
}
duk_remove_m2(thr);
}
@@ -22463,7 +23435,7 @@ DUK_EXTERNAL const char *duk_push_vsprintf(duk_hthread *thr, const char *fmt, va
duk_size_t sz = DUK_PUSH_SPRINTF_INITIAL_SIZE;
duk_bool_t pushed_buf = 0;
void *buf;
- duk_int_t len; /* XXX: duk_ssize_t */
+ duk_int_t len; /* XXX: duk_ssize_t */
const char *res;
DUK_ASSERT_API_ENTRY(thr);
@@ -22477,7 +23449,7 @@ DUK_EXTERNAL const char *duk_push_vsprintf(duk_hthread *thr, const char *fmt, va
}
/* initial estimate based on format string */
- sz = DUK_STRLEN(fmt) + 16; /* format plus something to avoid just missing */
+ sz = DUK_STRLEN(fmt) + 16; /* format plus something to avoid just missing */
if (sz < DUK_PUSH_SPRINTF_INITIAL_SIZE) {
sz = DUK_PUSH_SPRINTF_INITIAL_SIZE;
}
@@ -22487,7 +23459,7 @@ DUK_EXTERNAL const char *duk_push_vsprintf(duk_hthread *thr, const char *fmt, va
* This works 99% of the time which is quite nice.
*/
for (;;) {
- va_list ap_copy; /* copied so that 'ap' can be reused */
+ va_list ap_copy; /* copied so that 'ap' can be reused */
if (sz <= sizeof(stack_buf)) {
buf = stack_buf;
@@ -22517,7 +23489,7 @@ DUK_EXTERNAL const char *duk_push_vsprintf(duk_hthread *thr, const char *fmt, va
/* Cannot use duk_buffer_to_string() on the buffer because it is
* usually larger than 'len'; 'buf' is also usually a stack buffer.
*/
- res = duk_push_lstring(thr, (const char *) buf, (duk_size_t) len); /* [ buf? res ] */
+ res = duk_push_lstring(thr, (const char *) buf, (duk_size_t) len); /* [ buf? res ] */
if (pushed_buf) {
duk_remove_m2(thr);
}
@@ -22538,13 +23510,14 @@ DUK_EXTERNAL const char *duk_push_sprintf(duk_hthread *thr, const char *fmt, ...
return ret;
}
-DUK_INTERNAL duk_hobject *duk_push_object_helper(duk_hthread *thr, duk_uint_t hobject_flags_and_class, duk_small_int_t prototype_bidx) {
+DUK_INTERNAL duk_hobject *duk_push_object_helper(duk_hthread *thr,
+ duk_uint_t hobject_flags_and_class,
+ duk_small_int_t prototype_bidx) {
duk_tval *tv_slot;
duk_hobject *h;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(prototype_bidx == -1 ||
- (prototype_bidx >= 0 && prototype_bidx < DUK_NUM_BUILTINS));
+ DUK_ASSERT(prototype_bidx == -1 || (prototype_bidx >= 0 && prototype_bidx < DUK_NUM_BUILTINS));
DUK__CHECK_SPACE();
@@ -22555,7 +23528,7 @@ DUK_INTERNAL duk_hobject *duk_push_object_helper(duk_hthread *thr, duk_uint_t ho
tv_slot = thr->valstack_top;
DUK_TVAL_SET_OBJECT(tv_slot, h);
- DUK_HOBJECT_INCREF(thr, h); /* no side effects */
+ DUK_HOBJECT_INCREF(thr, h); /* no side effects */
thr->valstack_top++;
/* object is now reachable */
@@ -22585,9 +23558,8 @@ DUK_EXTERNAL duk_idx_t duk_push_object(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
DUK_BIDX_OBJECT_PROTOTYPE);
return duk_get_top_index_unsafe(thr);
}
@@ -22600,11 +23572,8 @@ DUK_EXTERNAL duk_idx_t duk_push_array(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_ARRAY_PART |
- DUK_HOBJECT_FLAG_EXOTIC_ARRAY |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAY);
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_ARRAY_PART |
+ DUK_HOBJECT_FLAG_EXOTIC_ARRAY | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAY);
obj = duk_harray_alloc(thr, flags);
DUK_ASSERT(obj != NULL);
@@ -22613,11 +23582,11 @@ DUK_EXTERNAL duk_idx_t duk_push_array(duk_hthread *thr) {
tv_slot = thr->valstack_top;
DUK_TVAL_SET_OBJECT(tv_slot, (duk_hobject *) obj);
- DUK_HOBJECT_INCREF(thr, obj); /* XXX: could preallocate with refcount = 1 */
+ DUK_HOBJECT_INCREF(thr, obj); /* XXX: could preallocate with refcount = 1 */
ret = (duk_idx_t) (thr->valstack_top - thr->valstack_bottom);
thr->valstack_top++;
- DUK_ASSERT(obj->length == 0); /* Array .length starts at zero. */
+ DUK_ASSERT(obj->length == 0); /* Array .length starts at zero. */
return ret;
}
@@ -22629,22 +23598,19 @@ DUK_EXTERNAL duk_idx_t duk_push_bare_array(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_ARRAY_PART |
- DUK_HOBJECT_FLAG_EXOTIC_ARRAY |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAY);
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_ARRAY_PART |
+ DUK_HOBJECT_FLAG_EXOTIC_ARRAY | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAY);
obj = duk_harray_alloc(thr, flags);
DUK_ASSERT(obj != NULL);
tv_slot = thr->valstack_top;
DUK_TVAL_SET_OBJECT(tv_slot, (duk_hobject *) obj);
- DUK_HOBJECT_INCREF(thr, obj); /* XXX: could preallocate with refcount = 1 */
+ DUK_HOBJECT_INCREF(thr, obj); /* XXX: could preallocate with refcount = 1 */
ret = (duk_idx_t) (thr->valstack_top - thr->valstack_bottom);
thr->valstack_top++;
- DUK_ASSERT(obj->length == 0); /* Array .length starts at zero. */
+ DUK_ASSERT(obj->length == 0); /* Array .length starts at zero. */
return ret;
}
@@ -22671,12 +23637,7 @@ DUK_INTERNAL duk_harray *duk_push_harray_with_size(duk_hthread *thr, duk_uint32_
a = duk_push_harray(thr);
- duk_hobject_realloc_props(thr,
- (duk_hobject *) a,
- 0,
- size,
- 0,
- 0);
+ duk_hobject_realloc_props(thr, (duk_hobject *) a, 0, size, 0, 0);
a->length = size;
return a;
}
@@ -22700,9 +23661,7 @@ DUK_EXTERNAL duk_idx_t duk_push_thread_raw(duk_hthread *thr, duk_uint_t flags) {
DUK__CHECK_SPACE();
- obj = duk_hthread_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_THREAD));
+ obj = duk_hthread_alloc(thr, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_THREAD));
DUK_ASSERT(obj != NULL);
obj->state = DUK_HTHREAD_STATE_INACTIVE;
#if defined(DUK_USE_ROM_STRINGS)
@@ -22742,8 +23701,7 @@ DUK_EXTERNAL duk_idx_t duk_push_thread_raw(duk_hthread *thr, duk_uint_t flags) {
/* Initial stack size satisfies the stack slack constraints so there
* is no need to require stack here.
*/
- DUK_ASSERT(DUK_VALSTACK_INITIAL_SIZE >=
- DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
+ DUK_ASSERT(DUK_VALSTACK_INITIAL_SIZE >= DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
return ret;
}
@@ -22762,10 +23720,8 @@ DUK_INTERNAL duk_hcompfunc *duk_push_hcompfunc(duk_hthread *thr) {
*/
obj = duk_hcompfunc_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_CALLABLE |
- DUK_HOBJECT_FLAG_COMPFUNC |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION));
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_CALLABLE | DUK_HOBJECT_FLAG_COMPFUNC |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION));
if (DUK_UNLIKELY(obj == NULL)) {
DUK_ERROR_ALLOC_FAILED(thr);
DUK_WO_NORETURN(return NULL;);
@@ -22793,11 +23749,8 @@ DUK_INTERNAL duk_hboundfunc *duk_push_hboundfunc(duk_hthread *thr) {
DUK__CHECK_SPACE();
obj = duk_hboundfunc_alloc(thr->heap,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BOUNDFUNC |
- DUK_HOBJECT_FLAG_CONSTRUCTABLE |
- DUK_HOBJECT_FLAG_CALLABLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION));
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BOUNDFUNC | DUK_HOBJECT_FLAG_CONSTRUCTABLE |
+ DUK_HOBJECT_FLAG_CALLABLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION));
if (!obj) {
DUK_ERROR_ALLOC_FAILED(thr);
DUK_WO_NORETURN(return NULL;);
@@ -22815,7 +23768,8 @@ DUK_INTERNAL duk_hboundfunc *duk_push_hboundfunc(duk_hthread *thr) {
return obj;
}
-DUK_LOCAL duk_idx_t duk__push_c_function_raw(duk_hthread *thr, duk_c_function func, duk_idx_t nargs, duk_uint_t flags, duk_small_uint_t proto_bidx) {
+DUK_LOCAL duk_idx_t
+duk__push_c_function_raw(duk_hthread *thr, duk_c_function func, duk_idx_t nargs, duk_uint_t flags, duk_small_uint_t proto_bidx) {
duk_hnatfunc *obj;
duk_idx_t ret;
duk_tval *tv_slot;
@@ -22843,7 +23797,8 @@ DUK_LOCAL duk_idx_t duk__push_c_function_raw(duk_hthread *thr, duk_c_function fu
obj->nargs = func_nargs;
DUK_DDD(DUK_DDDPRINT("created native function object with flags: 0x%08lx, nargs=%ld",
- (unsigned long) obj->obj.hdr.h_flags, (long) obj->nargs));
+ (unsigned long) obj->obj.hdr.h_flags,
+ (long) obj->nargs));
tv_slot = thr->valstack_top;
DUK_TVAL_SET_OBJECT(tv_slot, (duk_hobject *) obj);
@@ -22855,7 +23810,7 @@ DUK_LOCAL duk_idx_t duk__push_c_function_raw(duk_hthread *thr, duk_c_function fu
DUK_HOBJECT_SET_PROTOTYPE_INIT_INCREF(thr, (duk_hobject *) obj, thr->builtins[proto_bidx]);
return ret;
- api_error:
+api_error:
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return 0;);
}
@@ -22865,15 +23820,9 @@ DUK_EXTERNAL duk_idx_t duk_push_c_function(duk_hthread *thr, duk_c_function func
DUK_ASSERT_API_ENTRY(thr);
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_CONSTRUCTABLE |
- DUK_HOBJECT_FLAG_CALLABLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_NATFUNC |
- DUK_HOBJECT_FLAG_NEWENV |
- DUK_HOBJECT_FLAG_STRICT |
- DUK_HOBJECT_FLAG_NOTAIL |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_CONSTRUCTABLE | DUK_HOBJECT_FLAG_CALLABLE |
+ DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_NATFUNC | DUK_HOBJECT_FLAG_NEWENV | DUK_HOBJECT_FLAG_STRICT |
+ DUK_HOBJECT_FLAG_NOTAIL | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
/* Default prototype is a Duktape specific %NativeFunctionPrototype%
* which provides .length and .name getters.
@@ -22886,15 +23835,9 @@ DUK_INTERNAL void duk_push_c_function_builtin(duk_hthread *thr, duk_c_function f
DUK_ASSERT_API_ENTRY(thr);
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_CONSTRUCTABLE |
- DUK_HOBJECT_FLAG_CALLABLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_NATFUNC |
- DUK_HOBJECT_FLAG_NEWENV |
- DUK_HOBJECT_FLAG_STRICT |
- DUK_HOBJECT_FLAG_NOTAIL |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_CONSTRUCTABLE | DUK_HOBJECT_FLAG_CALLABLE |
+ DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_NATFUNC | DUK_HOBJECT_FLAG_NEWENV | DUK_HOBJECT_FLAG_STRICT |
+ DUK_HOBJECT_FLAG_NOTAIL | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
/* Must use Function.prototype for standard built-in functions. */
(void) duk__push_c_function_raw(thr, func, nargs, flags, DUK_BIDX_FUNCTION_PROTOTYPE);
@@ -22905,20 +23848,16 @@ DUK_INTERNAL void duk_push_c_function_builtin_noconstruct(duk_hthread *thr, duk_
DUK_ASSERT_API_ENTRY(thr);
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_CALLABLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_NATFUNC |
- DUK_HOBJECT_FLAG_NEWENV |
- DUK_HOBJECT_FLAG_STRICT |
- DUK_HOBJECT_FLAG_NOTAIL |
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_CALLABLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_NATFUNC |
+ DUK_HOBJECT_FLAG_NEWENV | DUK_HOBJECT_FLAG_STRICT | DUK_HOBJECT_FLAG_NOTAIL |
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION);
/* Must use Function.prototype for standard built-in functions. */
(void) duk__push_c_function_raw(thr, func, nargs, flags, DUK_BIDX_FUNCTION_PROTOTYPE);
}
-DUK_EXTERNAL duk_idx_t duk_push_c_lightfunc(duk_hthread *thr, duk_c_function func, duk_idx_t nargs, duk_idx_t length, duk_int_t magic) {
+DUK_EXTERNAL duk_idx_t
+duk_push_c_lightfunc(duk_hthread *thr, duk_c_function func, duk_idx_t nargs, duk_idx_t length, duk_int_t magic) {
duk_small_uint_t lf_flags;
duk_tval *tv_slot;
@@ -22947,13 +23886,15 @@ DUK_EXTERNAL duk_idx_t duk_push_c_lightfunc(duk_hthread *thr, duk_c_function fun
DUK_ASSERT(tv_slot >= thr->valstack_bottom);
return (duk_idx_t) (tv_slot - thr->valstack_bottom);
- api_error:
+api_error:
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return 0;);
}
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-DUK_INTERNAL duk_hbufobj *duk_push_bufobj_raw(duk_hthread *thr, duk_uint_t hobject_flags_and_class, duk_small_int_t prototype_bidx) {
+DUK_INTERNAL duk_hbufobj *duk_push_bufobj_raw(duk_hthread *thr,
+ duk_uint_t hobject_flags_and_class,
+ duk_small_int_t prototype_bidx) {
duk_hbufobj *obj;
duk_tval *tv_slot;
@@ -22975,34 +23916,86 @@ DUK_INTERNAL duk_hbufobj *duk_push_bufobj_raw(duk_hthread *thr, duk_uint_t hobje
return obj;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* XXX: There's quite a bit of overlap with buffer creation handling in
* duk_bi_buffer.c. Look for overlap and refactor.
*/
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-#define DUK__PACK_ARGS(classnum,protobidx,elemtype,elemshift,istypedarray) \
+#define DUK__PACK_ARGS(classnum, protobidx, elemtype, elemshift, istypedarray) \
(((classnum) << 24) | ((protobidx) << 16) | ((elemtype) << 8) | ((elemshift) << 4) | (istypedarray))
static const duk_uint32_t duk__bufobj_flags_lookup[] = {
/* Node.js Buffers are Uint8Array instances which inherit from Buffer.prototype. */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_ARRAYBUFFER, DUK_BIDX_ARRAYBUFFER_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT8, 0, 0), /* DUK_BUFOBJ_ARRAYBUFFER */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT8ARRAY, DUK_BIDX_NODEJS_BUFFER_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT8, 0, 1), /* DUK_BUFOBJ_NODEJS_BUFFER */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_DATAVIEW, DUK_BIDX_DATAVIEW_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT8, 0, 0), /* DUK_BUFOBJ_DATAVIEW */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_INT8ARRAY, DUK_BIDX_INT8ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_INT8, 0, 1), /* DUK_BUFOBJ_INT8ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT8ARRAY, DUK_BIDX_UINT8ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT8, 0, 1), /* DUK_BUFOBJ_UINT8ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY, DUK_BIDX_UINT8CLAMPEDARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT8CLAMPED, 0, 1), /* DUK_BUFOBJ_UINT8CLAMPEDARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_INT16ARRAY, DUK_BIDX_INT16ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_INT16, 1, 1), /* DUK_BUFOBJ_INT16ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT16ARRAY, DUK_BIDX_UINT16ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT16, 1, 1), /* DUK_BUFOBJ_UINT16ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_INT32ARRAY, DUK_BIDX_INT32ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_INT32, 2, 1), /* DUK_BUFOBJ_INT32ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT32ARRAY, DUK_BIDX_UINT32ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_UINT32, 2, 1), /* DUK_BUFOBJ_UINT32ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_FLOAT32ARRAY, DUK_BIDX_FLOAT32ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_FLOAT32, 2, 1), /* DUK_BUFOBJ_FLOAT32ARRAY */
- DUK__PACK_ARGS(DUK_HOBJECT_CLASS_FLOAT64ARRAY, DUK_BIDX_FLOAT64ARRAY_PROTOTYPE, DUK_HBUFOBJ_ELEM_FLOAT64, 3, 1) /* DUK_BUFOBJ_FLOAT64ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_ARRAYBUFFER,
+ DUK_BIDX_ARRAYBUFFER_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT8,
+ 0,
+ 0), /* DUK_BUFOBJ_ARRAYBUFFER */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT8ARRAY,
+ DUK_BIDX_NODEJS_BUFFER_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT8,
+ 0,
+ 1), /* DUK_BUFOBJ_NODEJS_BUFFER */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_DATAVIEW,
+ DUK_BIDX_DATAVIEW_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT8,
+ 0,
+ 0), /* DUK_BUFOBJ_DATAVIEW */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_INT8ARRAY,
+ DUK_BIDX_INT8ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_INT8,
+ 0,
+ 1), /* DUK_BUFOBJ_INT8ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT8ARRAY,
+ DUK_BIDX_UINT8ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT8,
+ 0,
+ 1), /* DUK_BUFOBJ_UINT8ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY,
+ DUK_BIDX_UINT8CLAMPEDARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT8CLAMPED,
+ 0,
+ 1), /* DUK_BUFOBJ_UINT8CLAMPEDARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_INT16ARRAY,
+ DUK_BIDX_INT16ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_INT16,
+ 1,
+ 1), /* DUK_BUFOBJ_INT16ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT16ARRAY,
+ DUK_BIDX_UINT16ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT16,
+ 1,
+ 1), /* DUK_BUFOBJ_UINT16ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_INT32ARRAY,
+ DUK_BIDX_INT32ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_INT32,
+ 2,
+ 1), /* DUK_BUFOBJ_INT32ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_UINT32ARRAY,
+ DUK_BIDX_UINT32ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_UINT32,
+ 2,
+ 1), /* DUK_BUFOBJ_UINT32ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_FLOAT32ARRAY,
+ DUK_BIDX_FLOAT32ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_FLOAT32,
+ 2,
+ 1), /* DUK_BUFOBJ_FLOAT32ARRAY */
+ DUK__PACK_ARGS(DUK_HOBJECT_CLASS_FLOAT64ARRAY,
+ DUK_BIDX_FLOAT64ARRAY_PROTOTYPE,
+ DUK_HBUFOBJ_ELEM_FLOAT64,
+ 3,
+ 1) /* DUK_BUFOBJ_FLOAT64ARRAY */
};
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, duk_size_t byte_offset, duk_size_t byte_length, duk_uint_t flags) {
+DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr,
+ duk_idx_t idx_buffer,
+ duk_size_t byte_offset,
+ duk_size_t byte_length,
+ duk_uint_t flags) {
duk_hbufobj *h_bufobj;
duk_hbuffer *h_val;
duk_hobject *h_arraybuf;
@@ -23025,7 +24018,7 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer,
}
}
- DUK_ASSERT_DISABLE(flags >= 0); /* flags is unsigned */
+ DUK_ASSERT_DISABLE(flags >= 0); /* flags is unsigned */
lookupidx = flags;
if (DUK_UNLIKELY(lookupidx >= sizeof(duk__bufobj_flags_lookup) / sizeof(duk_uint32_t))) {
goto arg_error;
@@ -23035,9 +24028,9 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer,
protobidx = (tmp >> 16) & 0xff;
h_arraybuf = duk_get_hobject(thr, idx_buffer);
- if (h_arraybuf != NULL && /* argument is an object */
- flags != DUK_BUFOBJ_ARRAYBUFFER && /* creating a view */
- DUK_HOBJECT_GET_CLASS_NUMBER(h_arraybuf) == DUK_HOBJECT_CLASS_ARRAYBUFFER /* argument is ArrayBuffer */) {
+ if (h_arraybuf != NULL && /* argument is an object */
+ flags != DUK_BUFOBJ_ARRAYBUFFER && /* creating a view */
+ DUK_HOBJECT_GET_CLASS_NUMBER(h_arraybuf) == DUK_HOBJECT_CLASS_ARRAYBUFFER /* argument is ArrayBuffer */) {
duk_uint_t tmp_offset;
DUK_HBUFOBJ_ASSERT_VALID((duk_hbufobj *) h_arraybuf);
@@ -23074,9 +24067,7 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer,
DUK_ASSERT(h_val != NULL);
h_bufobj = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(classnum),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ | DUK_HOBJECT_CLASS_AS_FLAGS(classnum),
(duk_small_int_t) protobidx);
DUK_ASSERT(h_bufobj != NULL);
@@ -23099,16 +24090,20 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer,
*/
return;
- range_error:
+range_error:
DUK_ERROR_RANGE(thr, DUK_STR_INVALID_ARGS);
DUK_WO_NORETURN(return;);
- arg_error:
+arg_error:
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_ARGS);
DUK_WO_NORETURN(return;);
}
-#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
-DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, duk_size_t byte_offset, duk_size_t byte_length, duk_uint_t flags) {
+#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
+DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr,
+ duk_idx_t idx_buffer,
+ duk_size_t byte_offset,
+ duk_size_t byte_length,
+ duk_uint_t flags) {
DUK_ASSERT_API_ENTRY(thr);
DUK_UNREF(idx_buffer);
DUK_UNREF(byte_offset);
@@ -23117,9 +24112,14 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer,
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
-DUK_EXTERNAL duk_idx_t duk_push_error_object_va_raw(duk_hthread *thr, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap) {
+DUK_EXTERNAL duk_idx_t duk_push_error_object_va_raw(duk_hthread *thr,
+ duk_errcode_t err_code,
+ const char *filename,
+ duk_int_t line,
+ const char *fmt,
+ va_list ap) {
duk_hobject *proto;
#if defined(DUK_USE_AUGMENT_ERROR_CREATE)
duk_small_uint_t augment_flags;
@@ -23142,9 +24142,8 @@ DUK_EXTERNAL duk_idx_t duk_push_error_object_va_raw(duk_hthread *thr, duk_errcod
/* error gets its 'name' from the prototype */
proto = duk_error_prototype_from_code(thr, err_code);
(void) duk_push_object_helper_proto(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ERROR),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ERROR),
proto);
/* ... and its 'message' from an instance property */
@@ -23167,13 +24166,14 @@ DUK_EXTERNAL duk_idx_t duk_push_error_object_va_raw(duk_hthread *thr, duk_errcod
/* Creation time error augmentation */
#if defined(DUK_USE_AUGMENT_ERROR_CREATE)
/* filename may be NULL in which case file/line is not recorded */
- duk_err_augment_error_create(thr, thr, filename, line, augment_flags); /* may throw an error */
+ duk_err_augment_error_create(thr, thr, filename, line, augment_flags); /* may throw an error */
#endif
return duk_get_top_index_unsafe(thr);
}
-DUK_EXTERNAL duk_idx_t duk_push_error_object_raw(duk_hthread *thr, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, ...) {
+DUK_EXTERNAL duk_idx_t
+duk_push_error_object_raw(duk_hthread *thr, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, ...) {
va_list ap;
duk_idx_t ret;
@@ -23201,7 +24201,7 @@ DUK_EXTERNAL duk_idx_t duk_push_error_object_stash(duk_hthread *thr, duk_errcode
va_end(ap);
return ret;
}
-#endif /* DUK_USE_VARIADIC_MACROS */
+#endif /* DUK_USE_VARIADIC_MACROS */
DUK_EXTERNAL void *duk_push_buffer_raw(duk_hthread *thr, duk_size_t size, duk_small_uint_t flags) {
duk_tval *tv_slot;
@@ -23304,13 +24304,10 @@ DUK_EXTERNAL duk_idx_t duk_push_proxy(duk_hthread *thr, duk_uint_t proxy_flags)
/* CALLABLE and CONSTRUCTABLE flags are copied from the (initial)
* target, see ES2015 Sections 9.5.15 and 9.5.13.
*/
- flags = DUK_HEAPHDR_GET_FLAGS((duk_heaphdr *) h_target) &
- (DUK_HOBJECT_FLAG_CALLABLE | DUK_HOBJECT_FLAG_CONSTRUCTABLE);
- flags |= DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ;
+ flags = DUK_HEAPHDR_GET_FLAGS((duk_heaphdr *) h_target) & (DUK_HOBJECT_FLAG_CALLABLE | DUK_HOBJECT_FLAG_CONSTRUCTABLE);
+ flags |= DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ;
if (flags & DUK_HOBJECT_FLAG_CALLABLE) {
- flags |= DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION) |
- DUK_HOBJECT_FLAG_SPECIAL_CALL;
+ flags |= DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_FUNCTION) | DUK_HOBJECT_FLAG_SPECIAL_CALL;
} else {
flags |= DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT);
}
@@ -23336,25 +24333,25 @@ DUK_EXTERNAL duk_idx_t duk_push_proxy(duk_hthread *thr, duk_uint_t proxy_flags)
DUK_TVAL_SET_OBJECT(tv_slot, (duk_hobject *) h_proxy);
DUK_HOBJECT_INCREF(thr, (duk_hobject *) h_proxy);
tv_slot++;
- DUK_TVAL_SET_UNDEFINED(tv_slot); /* [ ... target handler ] -> [ ... proxy undefined ] */
- thr->valstack_top = tv_slot; /* -> [ ... proxy ] */
+ DUK_TVAL_SET_UNDEFINED(tv_slot); /* [ ... target handler ] -> [ ... proxy undefined ] */
+ thr->valstack_top = tv_slot; /* -> [ ... proxy ] */
DUK_DD(DUK_DDPRINT("created Proxy: %!iT", duk_get_tval(thr, -1)));
return (duk_idx_t) (thr->valstack_top - thr->valstack_bottom - 1);
- fail_args:
+fail_args:
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return 0;);
}
-#else /* DUK_USE_ES6_PROXY */
+#else /* DUK_USE_ES6_PROXY */
DUK_EXTERNAL duk_idx_t duk_push_proxy(duk_hthread *thr, duk_uint_t proxy_flags) {
DUK_ASSERT_API_ENTRY(thr);
DUK_UNREF(proxy_flags);
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return 0;);
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
#if defined(DUK_USE_ASSERTIONS)
DUK_LOCAL void duk__validate_push_heapptr(duk_hthread *thr, void *ptr) {
@@ -23381,9 +24378,7 @@ DUK_LOCAL void duk__validate_push_heapptr(duk_hthread *thr, void *ptr) {
* the finalizer starts executing).
*/
#if defined(DUK_USE_FINALIZER_SUPPORT)
- for (curr = thr->heap->finalize_list;
- curr != NULL;
- curr = DUK_HEAPHDR_GET_NEXT(thr->heap, curr)) {
+ for (curr = thr->heap->finalize_list; curr != NULL; curr = DUK_HEAPHDR_GET_NEXT(thr->heap, curr)) {
/* FINALIZABLE is set for all objects on finalize_list
* except for an object being finalized right now. So
* can't assert here.
@@ -23395,18 +24390,18 @@ DUK_LOCAL void duk__validate_push_heapptr(duk_hthread *thr, void *ptr) {
if (curr == h) {
if (DUK_HEAPHDR_HAS_FINALIZED((duk_heaphdr *) h)) {
/* Object is currently being finalized. */
- DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
+ DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
found = 1;
} else {
/* Not being finalized but on finalize_list,
* allowed since Duktape 2.1.
*/
- DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
+ DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
found = 1;
}
}
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
#if defined(DUK_USE_REFERENCE_COUNTING)
/* Because refzero_list is now processed to completion inline with
@@ -23432,7 +24427,7 @@ DUK_LOCAL void duk__validate_push_heapptr(duk_hthread *thr, void *ptr) {
#endif
while (str != NULL) {
if (str == (duk_hstring *) h) {
- DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
+ DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
found = 1;
break;
}
@@ -23441,18 +24436,16 @@ DUK_LOCAL void duk__validate_push_heapptr(duk_hthread *thr, void *ptr) {
}
DUK_ASSERT(found != 0);
} else {
- for (curr = thr->heap->heap_allocated;
- curr != NULL;
- curr = DUK_HEAPHDR_GET_NEXT(thr->heap, curr)) {
+ for (curr = thr->heap->heap_allocated; curr != NULL; curr = DUK_HEAPHDR_GET_NEXT(thr->heap, curr)) {
if (curr == h) {
- DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
+ DUK_ASSERT(found == 0); /* Would indicate corrupted lists. */
found = 1;
}
}
DUK_ASSERT(found != 0);
}
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
DUK_EXTERNAL duk_idx_t duk_push_heapptr(duk_hthread *thr, void *ptr) {
duk_idx_t ret;
@@ -23518,7 +24511,7 @@ DUK_EXTERNAL duk_idx_t duk_push_heapptr(duk_hthread *thr, void *ptr) {
* heap_allocated.
*/
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(curr) >= 1); /* Preincremented on finalize_list insert. */
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(curr) >= 1); /* Preincremented on finalize_list insert. */
DUK_HEAPHDR_PREDEC_REFCOUNT(curr);
#endif
DUK_HEAP_REMOVE_FROM_FINALIZE_LIST(thr->heap, curr);
@@ -23550,10 +24543,9 @@ DUK_EXTERNAL duk_idx_t duk_push_bare_object(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
- -1); /* no prototype */
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
+ -1); /* no prototype */
return duk_get_top_index_unsafe(thr);
}
@@ -23662,12 +24654,12 @@ DUK_INTERNAL void duk_pop_n_unsafe(duk_hthread *thr, duk_idx_t count) {
DUK_ASSERT_API_ENTRY(thr);
duk_pop_n(thr, count);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
DUK_INTERNAL void duk_pop_n_unsafe(duk_hthread *thr, duk_idx_t count) {
DUK_ASSERT_API_ENTRY(thr);
duk__pop_n_unsafe_raw(thr, count);
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
/* Pop N elements without DECREF (in effect "stealing" any actual refcounts). */
#if defined(DUK_USE_REFERENCE_COUNTING)
@@ -23690,12 +24682,12 @@ DUK_INTERNAL void duk_pop_n_nodecref_unsafe(duk_hthread *thr, duk_idx_t count) {
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
}
-#else /* DUK_USE_REFERENCE_COUNTING */
+#else /* DUK_USE_REFERENCE_COUNTING */
DUK_INTERNAL void duk_pop_n_nodecref_unsafe(duk_hthread *thr, duk_idx_t count) {
DUK_ASSERT_API_ENTRY(thr);
duk_pop_n_unsafe(thr, count);
}
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
/* Popping one element is called so often that when footprint is not an issue,
* compile a specialized function for it.
@@ -23713,7 +24705,7 @@ DUK_INTERNAL void duk_pop_nodecref_unsafe(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
duk_pop_n_nodecref_unsafe(thr, 1);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
DUK_LOCAL DUK_ALWAYS_INLINE void duk__pop_unsafe_raw(duk_hthread *thr) {
duk_tval *tv;
@@ -23725,7 +24717,7 @@ DUK_LOCAL DUK_ALWAYS_INLINE void duk__pop_unsafe_raw(duk_hthread *thr) {
tv = --thr->valstack_top;
DUK_ASSERT(tv >= thr->valstack_bottom);
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
#else
DUK_TVAL_SET_UNDEFINED(tv);
#endif
@@ -23761,14 +24753,14 @@ DUK_INTERNAL void duk_pop_nodecref_unsafe(duk_hthread *thr) {
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
}
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
#if defined(DUK_USE_PREFER_SIZE)
DUK_INTERNAL void duk_pop_undefined(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
duk_pop_nodecref_unsafe(thr);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
DUK_INTERNAL void duk_pop_undefined(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ASSERT(thr->valstack_top != thr->valstack_bottom);
@@ -23780,7 +24772,7 @@ DUK_INTERNAL void duk_pop_undefined(duk_hthread *thr) {
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
}
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
#if defined(DUK_USE_PREFER_SIZE)
DUK_EXTERNAL void duk_pop_2(duk_hthread *thr) {
@@ -23807,14 +24799,14 @@ DUK_LOCAL DUK_ALWAYS_INLINE void duk__pop_2_unsafe_raw(duk_hthread *thr) {
tv = --thr->valstack_top;
DUK_ASSERT(tv >= thr->valstack_bottom);
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
#else
DUK_TVAL_SET_UNDEFINED(tv);
#endif
tv = --thr->valstack_top;
DUK_ASSERT(tv >= thr->valstack_bottom);
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv); /* side effects */
#else
DUK_TVAL_SET_UNDEFINED(tv);
#endif
@@ -23848,7 +24840,7 @@ DUK_INTERNAL void duk_pop_2_nodecref_unsafe(duk_hthread *thr) {
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
}
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
DUK_EXTERNAL void duk_pop_3(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
@@ -23895,9 +24887,9 @@ DUK_INTERNAL void duk_pack(duk_hthread *thr, duk_idx_t count) {
* multiplying with sizeof(duk_tval) won't wrap.
*/
DUK_ASSERT(count >= 0 && count <= (duk_idx_t) DUK_USE_VALSTACK_LIMIT);
- DUK_ASSERT((duk_size_t) count <= DUK_SIZE_MAX / sizeof(duk_tval)); /* no wrapping */
+ DUK_ASSERT((duk_size_t) count <= DUK_SIZE_MAX / sizeof(duk_tval)); /* no wrapping */
- tv_dst = duk_push_harray_with_size_outptr(thr, (duk_uint32_t) count); /* XXX: uninitialized would be OK */
+ tv_dst = duk_push_harray_with_size_outptr(thr, (duk_uint32_t) count); /* XXX: uninitialized would be OK */
DUK_ASSERT(count == 0 || tv_dst != NULL);
DUK_ASSERT(!duk_is_bare_object(thr, -1));
@@ -23911,7 +24903,7 @@ DUK_INTERNAL void duk_pack(duk_hthread *thr, duk_idx_t count) {
* the rest; no refcount operations needed.
*/
- tv_dst = tv_src; /* when count == 0, same as tv_src (OK) */
+ tv_dst = tv_src; /* when count == 0, same as tv_src (OK) */
tv_src = thr->valstack_top - 1;
DUK_TVAL_SET_TVAL(tv_dst, tv_src);
@@ -23941,9 +24933,8 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(h != NULL);
DUK_UNREF(h);
-#if defined(DUK_USE_ARRAY_FASTPATH) /* close enough */
- if (DUK_LIKELY(DUK_HOBJECT_IS_ARRAY(h) &&
- ((duk_harray *) h)->length <= DUK_HOBJECT_GET_ASIZE(h))) {
+#if defined(DUK_USE_ARRAY_FASTPATH) /* close enough */
+ if (DUK_LIKELY(DUK_HOBJECT_IS_ARRAY(h) && ((duk_harray *) h)->length <= DUK_HOBJECT_GET_ASIZE(h))) {
duk_harray *h_arr;
duk_tval *tv_src;
duk_tval *tv_dst;
@@ -23964,8 +24955,7 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
* XXX: alternatively, could prevent finalizers for the
* duration.
*/
- if (DUK_UNLIKELY(len != h_arr->length ||
- h_arr->length > DUK_HOBJECT_GET_ASIZE((duk_hobject *) h_arr))) {
+ if (DUK_UNLIKELY(len != h_arr->length || h_arr->length > DUK_HOBJECT_GET_ASIZE((duk_hobject *) h_arr))) {
goto skip_fast;
}
@@ -23984,7 +24974,7 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
* without an ancestor lookup (technically
* not compliant).
*/
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(tv_dst)); /* valstack policy */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(tv_dst)); /* valstack policy */
} else {
DUK_TVAL_SET_TVAL(tv_dst, tv_src);
DUK_TVAL_INCREF(thr, tv_dst);
@@ -23996,8 +24986,8 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
thr->valstack_top = tv_dst;
return (duk_idx_t) h_arr->length;
}
- skip_fast:
-#endif /* DUK_USE_ARRAY_FASTPATH */
+ skip_fast:
+#endif /* DUK_USE_ARRAY_FASTPATH */
/* Slow path: actual lookups. The initial 'length' lookup
* decides the output length, regardless of side effects that
@@ -24006,7 +24996,7 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
*/
idx = duk_normalize_index(thr, idx);
duk_get_prop_stridx(thr, idx, DUK_STRIDX_LENGTH);
- len = duk_to_uint32(thr, -1); /* ToUint32() coercion required */
+ len = duk_to_uint32(thr, -1); /* ToUint32() coercion required */
if (DUK_UNLIKELY(len >= 0x80000000UL)) {
goto fail_over_2g;
}
@@ -24025,7 +25015,7 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
DUK_ERROR_TYPE_INVALID_ARGS(thr);
DUK_WO_NORETURN(return 0;);
- fail_over_2g:
+fail_over_2g:
DUK_ERROR_RANGE_INVALID_LENGTH(thr);
DUK_WO_NORETURN(return 0;);
}
@@ -24034,6 +25024,13 @@ DUK_INTERNAL duk_idx_t duk_unpack_array_like(duk_hthread *thr, duk_idx_t idx) {
* Error throwing
*/
+#if defined(DUK_USE_GCC_PRAGMAS)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
+#elif defined(DUK_USE_CLANG_PRAGMAS)
+#pragma clang diagnostic push
+#endif
+
DUK_EXTERNAL void duk_throw_raw(duk_hthread *thr) {
duk_tval *tv_val;
@@ -24103,7 +25100,12 @@ DUK_EXTERNAL void duk_fatal_raw(duk_hthread *thr, const char *err_msg) {
}
}
-DUK_EXTERNAL void duk_error_va_raw(duk_hthread *thr, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap) {
+DUK_EXTERNAL void duk_error_va_raw(duk_hthread *thr,
+ duk_errcode_t err_code,
+ const char *filename,
+ duk_int_t line,
+ const char *fmt,
+ va_list ap) {
DUK_ASSERT_API_ENTRY(thr);
duk_push_error_object_va_raw(thr, err_code, filename, line, fmt, ap);
@@ -24111,7 +25113,12 @@ DUK_EXTERNAL void duk_error_va_raw(duk_hthread *thr, duk_errcode_t err_code, con
DUK_WO_NORETURN(return;);
}
-DUK_EXTERNAL void duk_error_raw(duk_hthread *thr, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, ...) {
+DUK_EXTERNAL void duk_error_raw(duk_hthread *thr,
+ duk_errcode_t err_code,
+ const char *filename,
+ duk_int_t line,
+ const char *fmt,
+ ...) {
va_list ap;
DUK_ASSERT_API_ENTRY(thr);
@@ -24123,8 +25130,15 @@ DUK_EXTERNAL void duk_error_raw(duk_hthread *thr, duk_errcode_t err_code, const
DUK_WO_NORETURN(return;);
}
+#if defined(DUK_USE_GCC_PRAGMAS)
+#pragma GCC diagnostic pop
+#elif defined(DUK_USE_CLANG_PRAGMAS)
+#pragma clang diagnostic pop
+#endif
+
#if !defined(DUK_USE_VARIADIC_MACROS)
-DUK_NORETURN(DUK_LOCAL_DECL void duk__throw_error_from_stash(duk_hthread *thr, duk_errcode_t err_code, const char *fmt, va_list ap));
+DUK_NORETURN(
+ DUK_LOCAL_DECL void duk__throw_error_from_stash(duk_hthread *thr, duk_errcode_t err_code, const char *fmt, va_list ap));
DUK_LOCAL void duk__throw_error_from_stash(duk_hthread *thr, duk_errcode_t err_code, const char *fmt, va_list ap) {
const char *filename;
@@ -24142,7 +25156,8 @@ DUK_LOCAL void duk__throw_error_from_stash(duk_hthread *thr, duk_errcode_t err_c
DUK_WO_NORETURN(return;);
}
-#define DUK__ERROR_STASH_SHARED(code) do { \
+#define DUK__ERROR_STASH_SHARED(code) \
+ do { \
va_list ap; \
va_start(ap, fmt); \
duk__throw_error_from_stash(thr, (code), fmt, ap); \
@@ -24182,7 +25197,7 @@ DUK_EXTERNAL duk_ret_t duk_uri_error_stash(duk_hthread *thr, const char *fmt, ..
DUK_ASSERT_API_ENTRY(thr);
DUK__ERROR_STASH_SHARED(DUK_ERR_URI_ERROR);
}
-#endif /* DUK_USE_VARIADIC_MACROS */
+#endif /* DUK_USE_VARIADIC_MACROS */
/*
* Comparison
@@ -24301,7 +25316,7 @@ DUK_INTERNAL void duk_push_lightfunc_tostring(duk_hthread *thr, duk_tval *tv) {
DUK_ASSERT_API_ENTRY(thr);
DUK_ASSERT(DUK_TVAL_IS_LIGHTFUNC(tv));
- DUK_TVAL_GET_LIGHTFUNC(tv, func, lf_flags); /* read before 'tv' potentially invalidated */
+ DUK_TVAL_GET_LIGHTFUNC(tv, func, lf_flags); /* read before 'tv' potentially invalidated */
duk_push_literal(thr, "function ");
duk_push_lightfunc_name_raw(thr, func, lf_flags);
duk_push_literal(thr, "() { [lightfunc code] }");
@@ -24322,7 +25337,7 @@ DUK_INTERNAL void duk_push_string_funcptr(duk_hthread *thr, duk_uint8_t *ptr, du
duk_small_uint_t t;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(sz <= 32); /* sanity limit for function pointer size */
+ DUK_ASSERT(sz <= 32); /* sanity limit for function pointer size */
p = buf;
#if defined(DUK_USE_INTEGER_LE)
@@ -24351,9 +25366,9 @@ DUK_INTERNAL void duk_push_string_funcptr(duk_hthread *thr, duk_uint8_t *ptr, du
*/
/* String limits for summary strings. */
-#define DUK__READABLE_SUMMARY_MAXCHARS 96 /* maximum supported by helper */
-#define DUK__READABLE_STRING_MAXCHARS 32 /* for strings/symbols */
-#define DUK__READABLE_ERRMSG_MAXCHARS 96 /* for error messages */
+#define DUK__READABLE_SUMMARY_MAXCHARS 96 /* maximum supported by helper */
+#define DUK__READABLE_STRING_MAXCHARS 32 /* for strings/symbols */
+#define DUK__READABLE_ERRMSG_MAXCHARS 96 /* for error messages */
/* String sanitizer which escapes ASCII control characters and a few other
* ASCII characters, passes Unicode as is, and replaces invalid UTF-8 with
@@ -24362,8 +25377,7 @@ DUK_INTERNAL void duk_push_string_funcptr(duk_hthread *thr, duk_uint8_t *ptr, du
*/
DUK_LOCAL void duk__push_hstring_readable_unicode(duk_hthread *thr, duk_hstring *h_input, duk_small_uint_t maxchars) {
const duk_uint8_t *p, *p_start, *p_end;
- duk_uint8_t buf[DUK_UNICODE_MAX_XUTF8_LENGTH * DUK__READABLE_SUMMARY_MAXCHARS +
- 2 /*quotes*/ + 3 /*periods*/];
+ duk_uint8_t buf[DUK_UNICODE_MAX_XUTF8_LENGTH * DUK__READABLE_SUMMARY_MAXCHARS + 2 /*quotes*/ + 3 /*periods*/];
duk_uint8_t *q;
duk_ucodepoint_t cp;
duk_small_uint_t nchars;
@@ -24391,7 +25405,7 @@ DUK_LOCAL void duk__push_hstring_readable_unicode(duk_hthread *thr, duk_hstring
}
if (duk_unicode_decode_xutf8(thr, &p, p_start, p_end, &cp)) {
if (cp < 0x20 || cp == 0x7f || cp == DUK_ASC_SINGLEQUOTE || cp == DUK_ASC_BACKSLASH) {
- DUK_ASSERT(DUK_UNICODE_MAX_XUTF8_LENGTH >= 4); /* estimate is valid */
+ DUK_ASSERT(DUK_UNICODE_MAX_XUTF8_LENGTH >= 4); /* estimate is valid */
DUK_ASSERT((cp >> 4) <= 0x0f);
*q++ = (duk_uint8_t) DUK_ASC_BACKSLASH;
*q++ = (duk_uint8_t) DUK_ASC_LC_X;
@@ -24401,7 +25415,7 @@ DUK_LOCAL void duk__push_hstring_readable_unicode(duk_hthread *thr, duk_hstring
q += duk_unicode_encode_xutf8(cp, q);
}
} else {
- p++; /* advance manually */
+ p++; /* advance manually */
*q++ = (duk_uint8_t) DUK_ASC_QUESTION;
}
nchars++;
@@ -24440,8 +25454,10 @@ DUK_LOCAL const char *duk__push_string_tval_readable(duk_hthread *thr, duk_tval
duk_hobject *h = DUK_TVAL_GET_OBJECT(tv);
DUK_ASSERT(h != NULL);
- if (error_aware &&
- duk_hobject_prototype_chain_contains(thr, h, thr->builtins[DUK_BIDX_ERROR_PROTOTYPE], 1 /*ignore_loop*/)) {
+ if (error_aware && duk_hobject_prototype_chain_contains(thr,
+ h,
+ thr->builtins[DUK_BIDX_ERROR_PROTOTYPE],
+ 1 /*ignore_loop*/)) {
/* Get error message in a side effect free way if
* possible; if not, summarize as a generic object.
* Error message currently gets quoted.
@@ -24455,7 +25471,9 @@ DUK_LOCAL const char *duk__push_string_tval_readable(duk_hthread *thr, duk_tval
/* It's critical to avoid recursion so
* only summarize a string .message.
*/
- duk__push_hstring_readable_unicode(thr, DUK_TVAL_GET_STRING(tv_msg), DUK__READABLE_ERRMSG_MAXCHARS);
+ duk__push_hstring_readable_unicode(thr,
+ DUK_TVAL_GET_STRING(tv_msg),
+ DUK__READABLE_ERRMSG_MAXCHARS);
break;
}
}
@@ -24538,7 +25556,7 @@ DUK_INTERNAL void duk_push_symbol_descriptive_string(duk_hthread *thr, duk_hstri
* Functions
*/
-#if 0 /* not used yet */
+#if 0 /* not used yet */
DUK_INTERNAL void duk_push_hnatfunc_name(duk_hthread *thr, duk_hnatfunc *h) {
duk_c_function func;
@@ -24565,7 +25583,7 @@ DUK_INTERNAL void duk_copy_tvals_incref(duk_hthread *thr, duk_tval *tv_dst, duk_
DUK_ASSERT_API_ENTRY(thr);
DUK_UNREF(thr);
- DUK_ASSERT(count * sizeof(duk_tval) >= count); /* no wrap */
+ DUK_ASSERT(count * sizeof(duk_tval) >= count); /* no wrap */
duk_memcpy_unsafe((void *) tv_dst, (const void *) tv_src, count * sizeof(duk_tval));
@@ -24637,15 +25655,14 @@ DUK_LOCAL void duk__concat_and_join_helper(duk_hthread *thr, duk_idx_t count_in,
/* Impose a string maximum length, need to handle overflow
* correctly.
*/
- if (new_len < len || /* wrapped */
+ if (new_len < len || /* wrapped */
new_len > (duk_size_t) DUK_HSTRING_MAX_BYTELEN) {
goto error_overflow;
}
len = new_len;
}
- DUK_DDD(DUK_DDDPRINT("join/concat %lu strings, total length %lu bytes",
- (unsigned long) count, (unsigned long) len));
+ DUK_DDD(DUK_DDDPRINT("join/concat %lu strings, total length %lu bytes", (unsigned long) count, (unsigned long) len));
/* Use stack allocated buffer to ensure reachability in errors
* (e.g. intern error).
@@ -24658,11 +25675,11 @@ DUK_LOCAL void duk__concat_and_join_helper(duk_hthread *thr, duk_idx_t count_in,
idx = 0;
for (i = count; i >= 1; i--) {
if (is_join && i != count) {
- h = duk_require_hstring(thr, -((duk_idx_t) count) - 2); /* extra -1 for buffer */
+ h = duk_require_hstring(thr, -((duk_idx_t) count) - 2); /* extra -1 for buffer */
duk_memcpy(buf + idx, DUK_HSTRING_GET_DATA(h), DUK_HSTRING_GET_BYTELEN(h));
idx += DUK_HSTRING_GET_BYTELEN(h);
}
- h = duk_require_hstring(thr, -((duk_idx_t) i) - 1); /* extra -1 for buffer */
+ h = duk_require_hstring(thr, -((duk_idx_t) i) - 1); /* extra -1 for buffer */
duk_memcpy(buf + idx, DUK_HSTRING_GET_DATA(h), DUK_HSTRING_GET_BYTELEN(h));
idx += DUK_HSTRING_GET_BYTELEN(h);
}
@@ -24674,21 +25691,21 @@ DUK_LOCAL void duk__concat_and_join_helper(duk_hthread *thr, duk_idx_t count_in,
/* Get rid of the strings early to minimize memory use before intern. */
if (is_join) {
- duk_replace(thr, -((duk_idx_t) count) - 2); /* overwrite sep */
+ duk_replace(thr, -((duk_idx_t) count) - 2); /* overwrite sep */
duk_pop_n(thr, (duk_idx_t) count);
} else {
- duk_replace(thr, -((duk_idx_t) count) - 1); /* overwrite str1 */
+ duk_replace(thr, -((duk_idx_t) count) - 1); /* overwrite str1 */
duk_pop_n(thr, (duk_idx_t) (count - 1));
}
/* [ ... buf ] */
- (void) duk_buffer_to_string(thr, -1); /* Safe if inputs are safe. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe if inputs are safe. */
/* [ ... res ] */
return;
- error_overflow:
+error_overflow:
DUK_ERROR_RANGE(thr, DUK_STR_RESULT_TOO_LONG);
DUK_WO_NORETURN(return;);
}
@@ -24704,7 +25721,7 @@ DUK_INTERNAL void duk_concat_2(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
duk_concat(thr, 2);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
DUK_INTERNAL void duk_concat_2(duk_hthread *thr) {
duk_hstring *h1;
duk_hstring *h2;
@@ -24714,14 +25731,14 @@ DUK_INTERNAL void duk_concat_2(duk_hthread *thr) {
duk_size_t len;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(duk_get_top(thr) >= 2); /* Trusted caller. */
+ DUK_ASSERT(duk_get_top(thr) >= 2); /* Trusted caller. */
h1 = duk_to_hstring(thr, -2);
h2 = duk_to_hstring(thr, -1);
len1 = (duk_size_t) DUK_HSTRING_GET_BYTELEN(h1);
len2 = (duk_size_t) DUK_HSTRING_GET_BYTELEN(h2);
len = len1 + len2;
- if (DUK_UNLIKELY(len < len1 || /* wrapped */
+ if (DUK_UNLIKELY(len < len1 || /* wrapped */
len > (duk_size_t) DUK_HSTRING_MAX_BYTELEN)) {
goto error_overflow;
}
@@ -24730,7 +25747,7 @@ DUK_INTERNAL void duk_concat_2(duk_hthread *thr) {
duk_memcpy((void *) buf, (const void *) DUK_HSTRING_GET_DATA(h1), (size_t) len1);
duk_memcpy((void *) (buf + len1), (const void *) DUK_HSTRING_GET_DATA(h2), (size_t) len2);
- (void) duk_buffer_to_string(thr, -1); /* Safe if inputs are safe. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe if inputs are safe. */
/* [ ... str1 str2 buf ] */
@@ -24738,11 +25755,11 @@ DUK_INTERNAL void duk_concat_2(duk_hthread *thr) {
duk_pop_unsafe(thr);
return;
- error_overflow:
+error_overflow:
DUK_ERROR_RANGE(thr, DUK_STR_RESULT_TOO_LONG);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
DUK_EXTERNAL void duk_join(duk_hthread *thr, duk_idx_t count) {
DUK_ASSERT_API_ENTRY(thr);
@@ -24761,7 +25778,7 @@ DUK_EXTERNAL void duk_decode_string(duk_hthread *thr, duk_idx_t idx, duk_decode_
DUK_ASSERT_API_ENTRY(thr);
- h_input = duk_require_hstring(thr, idx); /* Accept symbols. */
+ h_input = duk_require_hstring(thr, idx); /* Accept symbols. */
DUK_ASSERT(h_input != NULL);
p_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_input);
@@ -24788,11 +25805,11 @@ DUK_EXTERNAL void duk_map_string(duk_hthread *thr, duk_idx_t idx, duk_map_char_f
idx = duk_normalize_index(thr, idx);
- h_input = duk_require_hstring(thr, idx); /* Accept symbols. */
+ h_input = duk_require_hstring(thr, idx); /* Accept symbols. */
DUK_ASSERT(h_input != NULL);
bw = &bw_alloc;
- DUK_BW_INIT_PUSHBUF(thr, bw, DUK_HSTRING_GET_BYTELEN(h_input)); /* Reasonable output estimate. */
+ DUK_BW_INIT_PUSHBUF(thr, bw, DUK_HSTRING_GET_BYTELEN(h_input)); /* Reasonable output estimate. */
p_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_input);
p_end = p_start + DUK_HSTRING_GET_BYTELEN(h_input);
@@ -24813,7 +25830,7 @@ DUK_EXTERNAL void duk_map_string(duk_hthread *thr, duk_idx_t idx, duk_map_char_f
}
DUK_BW_COMPACT(thr, bw);
- (void) duk_buffer_to_string(thr, -1); /* Safe, extended UTF-8 encoded. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe, extended UTF-8 encoded. */
duk_replace(thr, idx);
}
@@ -24826,7 +25843,7 @@ DUK_EXTERNAL void duk_substring(duk_hthread *thr, duk_idx_t idx, duk_size_t star
DUK_ASSERT_API_ENTRY(thr);
- idx = duk_require_normalize_index(thr, idx); /* Accept symbols. */
+ idx = duk_require_normalize_index(thr, idx); /* Accept symbols. */
h = duk_require_hstring(thr, idx);
DUK_ASSERT(h != NULL);
@@ -24851,7 +25868,7 @@ DUK_EXTERNAL void duk_substring(duk_hthread *thr, duk_idx_t idx, duk_size_t star
end_byte_offset = (duk_size_t) duk_heap_strcache_offset_char2byte(thr, h, (duk_uint_fast32_t) end_offset);
DUK_ASSERT(end_byte_offset >= start_byte_offset);
- DUK_ASSERT(end_byte_offset - start_byte_offset <= DUK_UINT32_MAX); /* Guaranteed by string limits. */
+ DUK_ASSERT(end_byte_offset - start_byte_offset <= DUK_UINT32_MAX); /* Guaranteed by string limits. */
/* No size check is necessary. */
res = duk_heap_strtable_intern_checked(thr,
@@ -24867,13 +25884,13 @@ DUK_EXTERNAL void duk_substring(duk_hthread *thr, duk_idx_t idx, duk_size_t star
*/
DUK_EXTERNAL void duk_trim(duk_hthread *thr, duk_idx_t idx) {
duk_hstring *h;
- const duk_uint8_t *p, *p_start, *p_end, *p_tmp1, *p_tmp2; /* pointers for scanning */
- const duk_uint8_t *q_start, *q_end; /* start (incl) and end (excl) of trimmed part */
+ const duk_uint8_t *p, *p_start, *p_end, *p_tmp1, *p_tmp2; /* pointers for scanning */
+ const duk_uint8_t *q_start, *q_end; /* start (incl) and end (excl) of trimmed part */
duk_codepoint_t cp;
DUK_ASSERT_API_ENTRY(thr);
- idx = duk_require_normalize_index(thr, idx); /* Accept symbols. */
+ idx = duk_require_normalize_index(thr, idx); /* Accept symbols. */
h = duk_require_hstring(thr, idx);
DUK_ASSERT(h != NULL);
@@ -24915,7 +25932,7 @@ DUK_EXTERNAL void duk_trim(duk_hthread *thr, duk_idx_t idx) {
}
q_end = p;
- scan_done:
+scan_done:
/* This may happen when forward and backward scanning disagree
* (possible for non-extended-UTF-8 strings).
*/
@@ -24928,8 +25945,10 @@ DUK_EXTERNAL void duk_trim(duk_hthread *thr, duk_idx_t idx) {
DUK_ASSERT(q_end >= q_start);
DUK_DDD(DUK_DDDPRINT("trim: p_start=%p, p_end=%p, q_start=%p, q_end=%p",
- (const void *) p_start, (const void *) p_end,
- (const void *) q_start, (const void *) q_end));
+ (const void *) p_start,
+ (const void *) p_end,
+ (const void *) q_start,
+ (const void *) q_end));
if (q_start == p_start && q_end == p_end) {
DUK_DDD(DUK_DDDPRINT("nothing was trimmed: avoid interning (hashing etc)"));
@@ -24950,15 +25969,15 @@ DUK_EXTERNAL duk_codepoint_t duk_char_code_at(duk_hthread *thr, duk_idx_t idx, d
* is handling of clamped offsets.
*/
- h = duk_require_hstring(thr, idx); /* Accept symbols. */
+ h = duk_require_hstring(thr, idx); /* Accept symbols. */
DUK_ASSERT(h != NULL);
- DUK_ASSERT_DISABLE(char_offset >= 0); /* Always true, arg is unsigned. */
+ DUK_ASSERT_DISABLE(char_offset >= 0); /* Always true, arg is unsigned. */
if (char_offset >= DUK_HSTRING_GET_CHARLEN(h)) {
return 0;
}
- DUK_ASSERT(char_offset <= DUK_UINT_MAX); /* Guaranteed by string limits. */
+ DUK_ASSERT(char_offset <= DUK_UINT_MAX); /* Guaranteed by string limits. */
cp = duk_hstring_char_code_at_raw(thr, h, (duk_uint_t) char_offset, 0 /*surrogate_aware*/);
return (duk_codepoint_t) cp;
}
@@ -25001,7 +26020,7 @@ DUK_EXTERNAL duk_double_t duk_get_now(duk_hthread *thr) {
return duk_time_get_ecmascript_time(thr);
}
-#if 0 /* XXX: worth exposing? */
+#if 0 /* XXX: worth exposing? */
DUK_EXTERNAL duk_double_t duk_get_monotonic_time(duk_hthread *thr) {
DUK_ASSERT_API_ENTRY(thr);
DUK_UNREF(thr);
@@ -25016,7 +26035,7 @@ DUK_EXTERNAL void duk_time_to_components(duk_hthread *thr, duk_double_t timeval,
duk_uint_t flags;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(comp != NULL); /* XXX: or check? */
+ DUK_ASSERT(comp != NULL); /* XXX: or check? */
DUK_UNREF(thr);
/* Convert as one-based, but change month to zero-based to match the
@@ -25045,7 +26064,7 @@ DUK_EXTERNAL duk_double_t duk_components_to_time(duk_hthread *thr, duk_time_comp
duk_uint_t flags;
DUK_ASSERT_API_ENTRY(thr);
- DUK_ASSERT(comp != NULL); /* XXX: or check? */
+ DUK_ASSERT(comp != NULL); /* XXX: or check? */
DUK_UNREF(thr);
/* Match Date constructor behavior (with UTC time). Month is given
@@ -25066,7 +26085,7 @@ DUK_EXTERNAL duk_double_t duk_components_to_time(duk_hthread *thr, duk_time_comp
dparts[DUK_DATE_IDX_MINUTE] = comp->minutes;
dparts[DUK_DATE_IDX_SECOND] = comp->seconds;
dparts[DUK_DATE_IDX_MILLISECOND] = comp->milliseconds;
- dparts[DUK_DATE_IDX_WEEKDAY] = 0; /* ignored */
+ dparts[DUK_DATE_IDX_WEEKDAY] = 0; /* ignored */
d = duk_bi_date_get_timeval_from_dparts(dparts, flags);
@@ -25117,7 +26136,7 @@ DUK_EXTERNAL duk_double_t duk_components_to_time(duk_hthread *thr, duk_time_comp
/* Perform an intermediate join when this many elements have been pushed
* on the value stack.
*/
-#define DUK__ARRAY_MID_JOIN_LIMIT 4096
+#define DUK__ARRAY_MID_JOIN_LIMIT 4096
#if defined(DUK_USE_ARRAY_BUILTIN)
@@ -25168,7 +26187,7 @@ DUK_LOCAL duk_harray *duk__arraypart_fastpath_this(duk_hthread *thr) {
duk_hobject *h;
duk_uint_t flags_mask, flags_bits, flags_value;
- DUK_ASSERT(thr->valstack_bottom > thr->valstack); /* because call in progress */
+ DUK_ASSERT(thr->valstack_bottom > thr->valstack); /* because call in progress */
tv = DUK_GET_THIS_TVAL_PTR(thr);
/* Fast path requires that 'this' is a duk_harray. Read only arrays
@@ -25180,11 +26199,8 @@ DUK_LOCAL duk_harray *duk__arraypart_fastpath_this(duk_hthread *thr) {
}
h = DUK_TVAL_GET_OBJECT(tv);
DUK_ASSERT(h != NULL);
- flags_mask = DUK_HOBJECT_FLAG_ARRAY_PART | \
- DUK_HOBJECT_FLAG_EXOTIC_ARRAY | \
- DUK_HEAPHDR_FLAG_READONLY;
- flags_bits = DUK_HOBJECT_FLAG_ARRAY_PART | \
- DUK_HOBJECT_FLAG_EXOTIC_ARRAY;
+ flags_mask = DUK_HOBJECT_FLAG_ARRAY_PART | DUK_HOBJECT_FLAG_EXOTIC_ARRAY | DUK_HEAPHDR_FLAG_READONLY;
+ flags_bits = DUK_HOBJECT_FLAG_ARRAY_PART | DUK_HOBJECT_FLAG_EXOTIC_ARRAY;
flags_value = DUK_HEAPHDR_GET_FLAGS_RAW((duk_heaphdr *) h);
if ((flags_value & flags_mask) != flags_bits) {
DUK_DD(DUK_DDPRINT("reject array fast path: object flag check failed"));
@@ -25210,7 +26226,7 @@ DUK_LOCAL duk_harray *duk__arraypart_fastpath_this(duk_hthread *thr) {
DUK_DD(DUK_DDPRINT("array fast path allowed for: %!O", (duk_heaphdr *) h));
return (duk_harray *) h;
}
-#endif /* DUK_USE_ARRAY_FASTPATH */
+#endif /* DUK_USE_ARRAY_FASTPATH */
/*
* Constructor
@@ -25229,7 +26245,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_constructor(duk_hthread *thr) {
/* XXX: expensive check (also shared elsewhere - so add a shared internal API call?) */
d = duk_get_number(thr, 0);
len = duk_to_uint32(thr, 0);
- if (((duk_double_t) len) != d) {
+ if (!duk_double_equals((duk_double_t) len, d)) {
DUK_DCERROR_RANGE_INVALID_LENGTH(thr);
}
@@ -25253,10 +26269,8 @@ DUK_INTERNAL duk_ret_t duk_bi_array_constructor(duk_hthread *thr) {
*/
DUK_INTERNAL duk_ret_t duk_bi_array_constructor_is_array(duk_hthread *thr) {
- duk_hobject *h;
-
- h = duk_get_hobject_with_class(thr, 0, DUK_HOBJECT_CLASS_ARRAY);
- duk_push_boolean(thr, (h != NULL));
+ DUK_ASSERT_TOP(thr, 1);
+ duk_push_boolean(thr, duk_js_isarray(DUK_GET_TVAL_POSIDX(thr, 0)));
return 1;
}
@@ -25282,7 +26296,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_to_string(duk_hthread *thr) {
*/
DUK_DDD(DUK_DDDPRINT("this.join is not callable, fall back to (original) Object.toString"));
duk_set_top(thr, 0);
- return duk_bi_object_prototype_to_string(thr); /* has access to 'this' binding */
+ return duk_bi_object_prototype_to_string(thr); /* has access to 'this' binding */
}
/* [ ... this func ] */
@@ -25291,9 +26305,8 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_to_string(duk_hthread *thr) {
/* [ ... func this ] */
- DUK_DDD(DUK_DDDPRINT("calling: func=%!iT, this=%!iT",
- (duk_tval *) duk_get_tval(thr, -2),
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(
+ DUK_DDDPRINT("calling: func=%!iT, this=%!iT", (duk_tval *) duk_get_tval(thr, -2), (duk_tval *) duk_get_tval(thr, -1)));
duk_call_method(thr, 0);
return 1;
@@ -25323,7 +26336,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_concat(duk_hthread *thr) {
(void) duk_push_this_coercible_to_object(thr);
duk_insert(thr, 0);
n = duk_get_top(thr);
- duk_push_array(thr); /* -> [ ToObject(this) item1 ... itemN arr ] */
+ duk_push_array(thr); /* -> [ ToObject(this) item1 ... itemN arr ] */
/* NOTE: The Array special behaviors are NOT invoked by duk_xdef_prop_index()
* (which differs from the official algorithm). If no error is thrown, this
@@ -25349,13 +26362,13 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_concat(duk_hthread *thr) {
#if defined(DUK_USE_SYMBOL_BUILTIN)
duk_get_prop_stridx(thr, i, DUK_STRIDX_WELLKNOWN_SYMBOL_IS_CONCAT_SPREADABLE);
if (duk_is_undefined(thr, -1)) {
- spreadable = (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY);
+ spreadable = duk_js_isarray_hobject(h);
} else {
spreadable = duk_to_boolean(thr, -1);
}
duk_pop_nodecref_unsafe(thr);
#else
- spreadable = (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY);
+ spreadable = duk_js_isarray_hobject(h);
#endif
}
@@ -25374,7 +26387,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_concat(duk_hthread *thr) {
}
DUK_ASSERT(duk_is_object(thr, i));
- need_has_check = (DUK_HOBJECT_IS_PROXY(h) != 0); /* Always 0 w/o Proxy support. */
+ need_has_check = (DUK_HOBJECT_IS_PROXY(h) != 0); /* Always 0 w/o Proxy support. */
/* [ ToObject(this) item1 ... itemN arr ] */
@@ -25406,7 +26419,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_concat(duk_hthread *thr) {
}
}
idx++;
- DUK_ASSERT(idx != 0U); /* Wrap check above. */
+ DUK_ASSERT(idx != 0U); /* Wrap check above. */
}
}
@@ -25421,7 +26434,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_concat(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, n + 1);
return 1;
- fail_wrap:
+fail_wrap:
DUK_ERROR_RANGE_INVALID_LENGTH(thr);
DUK_WO_NORETURN(return 0;);
}
@@ -25467,8 +26480,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_join_shared(duk_hthread *thr) {
(unsigned long) len));
/* The extra (+4) is tight. */
- valstack_required = (duk_idx_t) ((len >= DUK__ARRAY_MID_JOIN_LIMIT ?
- DUK__ARRAY_MID_JOIN_LIMIT : len) + 4);
+ valstack_required = (duk_idx_t) ((len >= DUK__ARRAY_MID_JOIN_LIMIT ? DUK__ARRAY_MID_JOIN_LIMIT : len) + 4);
duk_require_stack(thr, valstack_required);
duk_dup_0(thr);
@@ -25479,14 +26491,13 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_join_shared(duk_hthread *thr) {
idx = 0;
for (;;) {
DUK_DDD(DUK_DDDPRINT("join idx=%ld", (long) idx));
- if (count >= DUK__ARRAY_MID_JOIN_LIMIT || /* intermediate join to avoid valstack overflow */
+ if (count >= DUK__ARRAY_MID_JOIN_LIMIT || /* intermediate join to avoid valstack overflow */
idx >= len) { /* end of loop (careful with len==0) */
/* [ sep ToObject(this) len sep str0 ... str(count-1) ] */
- DUK_DDD(DUK_DDDPRINT("mid/final join, count=%ld, idx=%ld, len=%ld",
- (long) count, (long) idx, (long) len));
- duk_join(thr, (duk_idx_t) count); /* -> [ sep ToObject(this) len str ] */
- duk_dup_0(thr); /* -> [ sep ToObject(this) len str sep ] */
- duk_insert(thr, -2); /* -> [ sep ToObject(this) len sep str ] */
+ DUK_DDD(DUK_DDDPRINT("mid/final join, count=%ld, idx=%ld, len=%ld", (long) count, (long) idx, (long) len));
+ duk_join(thr, (duk_idx_t) count); /* -> [ sep ToObject(this) len str ] */
+ duk_dup_0(thr); /* -> [ sep ToObject(this) len str sep ] */
+ duk_insert(thr, -2); /* -> [ sep ToObject(this) len sep str ] */
count = 1;
}
if (idx >= len) {
@@ -25502,7 +26513,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_join_shared(duk_hthread *thr) {
if (to_locale_string) {
duk_to_object(thr, -1);
duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_TO_LOCALE_STRING);
- duk_insert(thr, -2); /* -> [ ... toLocaleString ToObject(val) ] */
+ duk_insert(thr, -2); /* -> [ ... toLocaleString ToObject(val) ] */
duk_call_method(thr, 0);
}
duk_to_string(thr, -1);
@@ -25560,7 +26571,7 @@ DUK_LOCAL duk_ret_t duk__array_pop_fastpath(duk_hthread *thr, duk_harray *h_arr)
return 1;
}
-#endif /* DUK_USE_ARRAY_FASTPATH */
+#endif /* DUK_USE_ARRAY_FASTPATH */
DUK_INTERNAL duk_ret_t duk_bi_array_prototype_pop(duk_hthread *thr) {
duk_uint32_t len;
@@ -25611,7 +26622,7 @@ DUK_LOCAL duk_ret_t duk__array_push_fastpath(duk_hthread *thr, duk_harray *h_arr
DUK_ASSERT((duk_uint32_t) n <= DUK_UINT32_MAX);
if (DUK_UNLIKELY(len + (duk_uint32_t) n < len)) {
DUK_D(DUK_DPRINT("Array.prototype.push() would go beyond 32-bit length, throw"));
- DUK_DCERROR_RANGE_INVALID_LENGTH(thr); /* != 0 return value returned as is by caller */
+ DUK_DCERROR_RANGE_INVALID_LENGTH(thr); /* != 0 return value returned as is by caller */
}
if (len + (duk_uint32_t) n > DUK_HOBJECT_GET_ASIZE((duk_hobject *) h_arr)) {
/* Array part would need to be extended. Rely on slow path
@@ -25641,7 +26652,7 @@ DUK_LOCAL duk_ret_t duk__array_push_fastpath(duk_hthread *thr, duk_harray *h_arr
duk_push_uint(thr, (duk_uint_t) len);
return 1;
}
-#endif /* DUK_USE_ARRAY_FASTPATH */
+#endif /* DUK_USE_ARRAY_FASTPATH */
DUK_INTERNAL duk_ret_t duk_bi_array_prototype_push(duk_hthread *thr) {
/* Note: 'this' is not necessarily an Array object. The push()
@@ -25716,7 +26727,7 @@ DUK_LOCAL duk_small_int_t duk__array_sort_compare(duk_hthread *thr, duk_int_t id
duk_bool_t have1, have2;
duk_bool_t undef1, undef2;
duk_small_int_t ret;
- duk_idx_t idx_obj = 1; /* fixed offsets in valstack */
+ duk_idx_t idx_obj = 1; /* fixed offsets in valstack */
duk_idx_t idx_fn = 0;
duk_hstring *h1, *h2;
@@ -25737,7 +26748,8 @@ DUK_LOCAL duk_small_int_t duk__array_sort_compare(duk_hthread *thr, duk_int_t id
if (idx1 == idx2) {
DUK_DDD(DUK_DDDPRINT("duk__array_sort_compare: idx1=%ld, idx2=%ld -> indices identical, quick exit",
- (long) idx1, (long) idx2));
+ (long) idx1,
+ (long) idx2));
return 0;
}
@@ -25745,8 +26757,12 @@ DUK_LOCAL duk_small_int_t duk__array_sort_compare(duk_hthread *thr, duk_int_t id
have2 = duk_get_prop_index(thr, idx_obj, (duk_uarridx_t) idx2);
DUK_DDD(DUK_DDDPRINT("duk__array_sort_compare: idx1=%ld, idx2=%ld, have1=%ld, have2=%ld, val1=%!T, val2=%!T",
- (long) idx1, (long) idx2, (long) have1, (long) have2,
- (duk_tval *) duk_get_tval(thr, -2), (duk_tval *) duk_get_tval(thr, -1)));
+ (long) idx1,
+ (long) idx2,
+ (long) have1,
+ (long) have2,
+ (duk_tval *) duk_get_tval(thr, -2),
+ (duk_tval *) duk_get_tval(thr, -1)));
if (have1) {
if (have2) {
@@ -25788,9 +26804,9 @@ DUK_LOCAL duk_small_int_t duk__array_sort_compare(duk_hthread *thr, duk_int_t id
duk_double_t d;
/* No need to check callable; duk_call() will do that. */
- duk_dup(thr, idx_fn); /* -> [ ... x y fn ] */
- duk_insert(thr, -3); /* -> [ ... fn x y ] */
- duk_call(thr, 2); /* -> [ ... res ] */
+ duk_dup(thr, idx_fn); /* -> [ ... x y fn ] */
+ duk_insert(thr, -3); /* -> [ ... fn x y ] */
+ duk_call(thr, 2); /* -> [ ... res ] */
/* ES5 is a bit vague about what to do if the return value is
* not a number. ES2015 provides a concrete description:
@@ -25822,10 +26838,10 @@ DUK_LOCAL duk_small_int_t duk__array_sort_compare(duk_hthread *thr, duk_int_t id
DUK_ASSERT(h1 != NULL);
DUK_ASSERT(h2 != NULL);
- ret = duk_js_string_compare(h1, h2); /* retval is directly usable */
+ ret = duk_js_string_compare(h1, h2); /* retval is directly usable */
goto pop_ret;
- pop_ret:
+pop_ret:
duk_pop_2_unsafe(thr);
DUK_DDD(DUK_DDDPRINT("-> result %ld", (long) ret));
return ret;
@@ -25833,7 +26849,7 @@ DUK_LOCAL duk_small_int_t duk__array_sort_compare(duk_hthread *thr, duk_int_t id
DUK_LOCAL void duk__array_sort_swap(duk_hthread *thr, duk_int_t l, duk_int_t r) {
duk_bool_t have_l, have_r;
- duk_idx_t idx_obj = 1; /* fixed offset in valstack */
+ duk_idx_t idx_obj = 1; /* fixed offset in valstack */
if (l == r) {
return;
@@ -25886,8 +26902,7 @@ DUK_LOCAL void duk__debuglog_qsort_state(duk_hthread *thr, duk_int_t lo, duk_int
*ptr++ = ']';
*ptr++ = '\0';
- DUK_DDD(DUK_DDDPRINT("%s (lo=%ld, hi=%ld, pivot=%ld)",
- (const char *) buf, (long) lo, (long) hi, (long) pivot));
+ DUK_DDD(DUK_DDDPRINT("%s (lo=%ld, hi=%ld, pivot=%ld)", (const char *) buf, (long) lo, (long) hi, (long) pivot));
}
#endif
@@ -25896,8 +26911,7 @@ DUK_LOCAL void duk__array_qsort(duk_hthread *thr, duk_int_t lo, duk_int_t hi) {
/* The lo/hi indices may be crossed and hi < 0 is possible at entry. */
- DUK_DDD(DUK_DDDPRINT("duk__array_qsort: lo=%ld, hi=%ld, obj=%!T",
- (long) lo, (long) hi, (duk_tval *) duk_get_tval(thr, 1)));
+ DUK_DDD(DUK_DDDPRINT("duk__array_qsort: lo=%ld, hi=%ld, obj=%!T", (long) lo, (long) hi, (duk_tval *) duk_get_tval(thr, 1)));
DUK_ASSERT_TOP(thr, 3);
@@ -25915,7 +26929,7 @@ DUK_LOCAL void duk__array_qsort(duk_hthread *thr, duk_int_t lo, duk_int_t hi) {
DUK_ASSERT(hi - lo + 1 >= 2);
/* randomized pivot selection */
- p = lo + (duk_int_t) (DUK_UTIL_GET_RANDOM_DOUBLE(thr) * (duk_double_t) (hi - lo + 1));
+ p = lo + (duk_int_t) (duk_util_get_random_double(thr) * (duk_double_t) (hi - lo + 1));
DUK_ASSERT(p >= lo && p <= hi);
DUK_DDD(DUK_DDDPRINT("lo=%ld, hi=%ld, chose pivot p=%ld", (long) lo, (long) hi, (long) p));
@@ -25929,23 +26943,21 @@ DUK_LOCAL void duk__array_qsort(duk_hthread *thr, duk_int_t lo, duk_int_t hi) {
for (;;) {
/* find elements to swap */
for (;;) {
- DUK_DDD(DUK_DDDPRINT("left scan: l=%ld, r=%ld, p=%ld",
- (long) l, (long) r, (long) p));
+ DUK_DDD(DUK_DDDPRINT("left scan: l=%ld, r=%ld, p=%ld", (long) l, (long) r, (long) p));
if (l >= hi) {
break;
}
- if (duk__array_sort_compare(thr, l, p) >= 0) { /* !(l < p) */
+ if (duk__array_sort_compare(thr, l, p) >= 0) { /* !(l < p) */
break;
}
l++;
}
for (;;) {
- DUK_DDD(DUK_DDDPRINT("right scan: l=%ld, r=%ld, p=%ld",
- (long) l, (long) r, (long) p));
+ DUK_DDD(DUK_DDDPRINT("right scan: l=%ld, r=%ld, p=%ld", (long) l, (long) r, (long) p));
if (r <= lo) {
break;
}
- if (duk__array_sort_compare(thr, p, r) >= 0) { /* !(p < r) */
+ if (duk__array_sort_compare(thr, p, r) >= 0) { /* !(p < r) */
break;
}
r--;
@@ -25963,7 +26975,7 @@ DUK_LOCAL void duk__array_qsort(duk_hthread *thr, duk_int_t lo, duk_int_t hi) {
l++;
r--;
}
- done:
+done:
/* Note that 'l' and 'r' may cross, i.e. r < l */
DUK_ASSERT(l >= lo && l <= hi);
DUK_ASSERT(r >= lo && r <= hi);
@@ -26007,7 +27019,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_sort(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 3);
duk_pop_nodecref_unsafe(thr);
- return 1; /* return ToObject(this) */
+ return 1; /* return ToObject(this) */
}
/*
@@ -26100,7 +27112,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_splice(duk_hthread *thr) {
for (i = 0; i < del_count; i++) {
if (duk_get_prop_index(thr, -3, (duk_uarridx_t) (act_start + i))) {
- duk_xdef_prop_index_wec(thr, -2, (duk_uarridx_t) i); /* throw flag irrelevant (false in std alg) */
+ duk_xdef_prop_index_wec(thr, -2, (duk_uarridx_t) i); /* throw flag irrelevant (false in std alg) */
} else {
duk_pop_undefined(thr);
}
@@ -26170,7 +27182,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_splice(duk_hthread *thr) {
/* Step 15: insert itemCount elements into the hole made above */
for (i = 0; i < item_count; i++) {
- duk_dup(thr, i + 2); /* args start at index 2 */
+ duk_dup(thr, i + 2); /* args start at index 2 */
duk_put_prop_index(thr, -4, (duk_uarridx_t) (act_start + i));
}
@@ -26233,7 +27245,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_reverse(duk_hthread *thr) {
}
DUK_ASSERT_TOP(thr, 2);
- duk_pop_unsafe(thr); /* -> [ ToObject(this) ] */
+ duk_pop_unsafe(thr); /* -> [ ToObject(this) ] */
return 1;
}
@@ -26383,26 +27395,32 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_unshift(duk_hthread *thr) {
if (duk_get_prop_index(thr, -2, (duk_uarridx_t) i)) {
/* fromPresent = true */
/* [ ... ToObject(this) ToUint32(length) val ] */
- duk_put_prop_index(thr, -3, (duk_uarridx_t) (i + (duk_uint32_t) nargs)); /* -> [ ... ToObject(this) ToUint32(length) ] */
+ duk_put_prop_index(
+ thr,
+ -3,
+ (duk_uarridx_t) (i + (duk_uint32_t) nargs)); /* -> [ ... ToObject(this) ToUint32(length) ] */
} else {
/* fromPresent = false */
/* [ ... ToObject(this) ToUint32(length) val ] */
duk_pop_undefined(thr);
- duk_del_prop_index(thr, -2, (duk_uarridx_t) (i + (duk_uint32_t) nargs)); /* -> [ ... ToObject(this) ToUint32(length) ] */
+ duk_del_prop_index(
+ thr,
+ -2,
+ (duk_uarridx_t) (i + (duk_uint32_t) nargs)); /* -> [ ... ToObject(this) ToUint32(length) ] */
}
DUK_ASSERT_TOP(thr, nargs + 2);
}
for (i = 0; i < (duk_uint32_t) nargs; i++) {
DUK_ASSERT_TOP(thr, nargs + 2);
- duk_dup(thr, (duk_idx_t) i); /* -> [ ... ToObject(this) ToUint32(length) arg[i] ] */
+ duk_dup(thr, (duk_idx_t) i); /* -> [ ... ToObject(this) ToUint32(length) arg[i] ] */
duk_put_prop_index(thr, -3, (duk_uarridx_t) i);
DUK_ASSERT_TOP(thr, nargs + 2);
}
DUK_ASSERT_TOP(thr, nargs + 2);
duk_push_u32(thr, len + (duk_uint32_t) nargs);
- duk_dup_top(thr); /* -> [ ... ToObject(this) ToUint32(length) final_len final_len ] */
+ duk_dup_top(thr); /* -> [ ... ToObject(this) ToUint32(length) final_len final_len ] */
duk_put_prop_stridx_short(thr, -4, DUK_STRIDX_LENGTH);
return 1;
}
@@ -26415,7 +27433,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_indexof_shared(duk_hthread *thr) {
duk_idx_t nargs;
duk_int_t i, len;
duk_int_t from_idx;
- duk_small_int_t idx_step = duk_get_current_magic(thr); /* idx_step is +1 for indexOf, -1 for lastIndexOf */
+ duk_small_int_t idx_step = duk_get_current_magic(thr); /* idx_step is +1 for indexOf, -1 for lastIndexOf */
/* lastIndexOf() needs to be a vararg function because we must distinguish
* between an undefined fromIndex and a "not given" fromIndex; indexOf() is
@@ -26453,10 +27471,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_indexof_shared(duk_hthread *thr) {
* lastIndexOf: clamp fromIndex to [-len - 1, len - 1]
* (if clamped to -len-1 -> fromIndex becomes -1, terminates for-loop directly)
*/
- from_idx = duk_to_int_clamped(thr,
- 1,
- (idx_step > 0 ? -len : -len - 1),
- (idx_step > 0 ? len : len - 1));
+ from_idx = duk_to_int_clamped(thr, 1, (idx_step > 0 ? -len : -len - 1), (idx_step > 0 ? len : len - 1));
if (from_idx < 0) {
/* for lastIndexOf, result may be -1 (mark immediate termination) */
from_idx = len + from_idx;
@@ -26492,7 +27507,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_indexof_shared(duk_hthread *thr) {
duk_pop_unsafe(thr);
}
- not_found:
+not_found:
duk_push_int(thr, -1);
return 1;
}
@@ -26501,11 +27516,11 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_indexof_shared(duk_hthread *thr) {
* every(), some(), forEach(), map(), filter()
*/
-#define DUK__ITER_EVERY 0
-#define DUK__ITER_SOME 1
-#define DUK__ITER_FOREACH 2
-#define DUK__ITER_MAP 3
-#define DUK__ITER_FILTER 4
+#define DUK__ITER_EVERY 0
+#define DUK__ITER_SOME 1
+#define DUK__ITER_FOREACH 2
+#define DUK__ITER_MAP 3
+#define DUK__ITER_FILTER 4
/* XXX: This helper is a bit awkward because the handling for the different iteration
* callers is quite different. This now compiles to a bit less than 500 bytes, so with
@@ -26540,7 +27555,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_iter_shared(duk_hthread *thr) {
* stack[4] = result array (or undefined)
*/
- k = 0; /* result index for filter() */
+ k = 0; /* result index for filter() */
for (i = 0; i < len; i++) {
DUK_ASSERT_TOP(thr, 5);
@@ -26564,7 +27579,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_iter_shared(duk_hthread *thr) {
duk_dup_1(thr);
duk_dup_m3(thr);
duk_push_u32(thr, i);
- duk_dup_2(thr); /* [ ... val callback thisArg val i obj ] */
+ duk_dup_2(thr); /* [ ... val callback thisArg val i obj ] */
duk_call_method(thr, 3); /* -> [ ... val retval ] */
switch (iter_type) {
@@ -26587,13 +27602,13 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_iter_shared(duk_hthread *thr) {
break;
case DUK__ITER_MAP:
duk_dup_top(thr);
- duk_xdef_prop_index_wec(thr, 4, (duk_uarridx_t) i); /* retval to result[i] */
+ duk_xdef_prop_index_wec(thr, 4, (duk_uarridx_t) i); /* retval to result[i] */
res_length = i + 1;
break;
case DUK__ITER_FILTER:
bval = duk_to_boolean(thr, -1);
if (bval) {
- duk_dup_m2(thr); /* orig value */
+ duk_dup_m2(thr); /* orig value */
duk_xdef_prop_index_wec(thr, 4, (duk_uarridx_t) k);
k++;
res_length = k;
@@ -26621,7 +27636,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_iter_shared(duk_hthread *thr) {
case DUK__ITER_MAP:
case DUK__ITER_FILTER:
DUK_ASSERT_TOP(thr, 5);
- DUK_ASSERT(duk_is_array(thr, -1)); /* topmost element is the result array already */
+ DUK_ASSERT(duk_is_array(thr, -1)); /* topmost element is the result array already */
duk_push_u32(thr, res_length);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_LENGTH, DUK_PROPDESC_FLAGS_W);
break;
@@ -26641,7 +27656,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_reduce_shared(duk_hthread *thr) {
duk_idx_t nargs;
duk_bool_t have_acc;
duk_uint32_t i, len;
- duk_small_int_t idx_step = duk_get_current_magic(thr); /* idx_step is +1 for reduce, -1 for reduceRight */
+ duk_small_int_t idx_step = duk_get_current_magic(thr); /* idx_step is +1 for reduce, -1 for reduceRight */
/* We're a varargs function because we need to detect whether
* initialValue was given or not.
@@ -26665,8 +27680,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_reduce_shared(duk_hthread *thr) {
duk_dup_1(thr);
have_acc = 1;
}
- DUK_DDD(DUK_DDDPRINT("have_acc=%ld, acc=%!T",
- (long) have_acc, (duk_tval *) duk_get_tval(thr, 3)));
+ DUK_DDD(DUK_DDDPRINT("have_acc=%ld, acc=%!T", (long) have_acc, (duk_tval *) duk_get_tval(thr, 3)));
/* For len == 0, i is initialized to len - 1 which underflows.
* The condition (i < len) will then exit the for-loop on the
@@ -26674,16 +27688,16 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_reduce_shared(duk_hthread *thr) {
* happens by i underflowing.
*/
- for (i = (idx_step >= 0 ? 0 : len - 1);
- i < len; /* i >= 0 would always be true */
+ for (i = (idx_step >= 0 ? 0 : len - 1); i < len; /* i >= 0 would always be true */
i += (duk_uint32_t) idx_step) {
DUK_DDD(DUK_DDDPRINT("i=%ld, len=%ld, have_acc=%ld, top=%ld, acc=%!T",
- (long) i, (long) len, (long) have_acc,
+ (long) i,
+ (long) len,
+ (long) have_acc,
(long) duk_get_top(thr),
(duk_tval *) duk_get_tval(thr, 4)));
- DUK_ASSERT((have_acc && duk_get_top(thr) == 5) ||
- (!have_acc && duk_get_top(thr) == 4));
+ DUK_ASSERT((have_acc && duk_get_top(thr) == 5) || (!have_acc && duk_get_top(thr) == 4));
if (!duk_has_prop_index(thr, 2, (duk_uarridx_t) i)) {
continue;
@@ -26702,8 +27716,10 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_reduce_shared(duk_hthread *thr) {
duk_push_u32(thr, i);
duk_dup_2(thr);
DUK_DDD(DUK_DDDPRINT("calling reduce function: func=%!T, prev=%!T, curr=%!T, idx=%!T, obj=%!T",
- (duk_tval *) duk_get_tval(thr, -5), (duk_tval *) duk_get_tval(thr, -4),
- (duk_tval *) duk_get_tval(thr, -3), (duk_tval *) duk_get_tval(thr, -2),
+ (duk_tval *) duk_get_tval(thr, -5),
+ (duk_tval *) duk_get_tval(thr, -4),
+ (duk_tval *) duk_get_tval(thr, -3),
+ (duk_tval *) duk_get_tval(thr, -2),
(duk_tval *) duk_get_tval(thr, -1)));
duk_call(thr, 4);
DUK_DDD(DUK_DDDPRINT("-> result: %!T", (duk_tval *) duk_get_tval(thr, -1)));
@@ -26720,7 +27736,7 @@ DUK_INTERNAL duk_ret_t duk_bi_array_prototype_reduce_shared(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_ARRAY_BUILTIN */
+#endif /* DUK_USE_ARRAY_BUILTIN */
/* automatic undefs */
#undef DUK__ARRAY_MID_JOIN_LIMIT
@@ -26770,7 +27786,7 @@ DUK_INTERNAL duk_ret_t duk_bi_boolean_prototype_tostring_shared(duk_hthread *thr
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
/* never here */
- type_ok:
+type_ok:
if (coerce_tostring) {
duk_to_string(thr, -1);
}
@@ -26790,14 +27806,14 @@ DUK_INTERNAL duk_ret_t duk_bi_boolean_constructor(duk_hthread *thr) {
DUK_HOBJECT_SET_CLASS_NUMBER(h_this, DUK_HOBJECT_CLASS_BOOLEAN);
- duk_dup_0(thr); /* -> [ val obj val ] */
- duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_VALUE, DUK_PROPDESC_FLAGS_NONE); /* XXX: proper flags? */
- } /* unbalanced stack */
+ duk_dup_0(thr); /* -> [ val obj val ] */
+ duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_VALUE, DUK_PROPDESC_FLAGS_NONE); /* XXX: proper flags? */
+ } /* unbalanced stack */
return 1;
}
-#endif /* DUK_USE_BOOLEAN_BUILTIN */
+#endif /* DUK_USE_BOOLEAN_BUILTIN */
/*
* ES2015 TypedArray and Node.js Buffer built-ins
*/
@@ -26813,57 +27829,38 @@ DUK_INTERNAL duk_ret_t duk_bi_boolean_constructor(duk_hthread *thr) {
* default internal prototype.
*/
static const duk_uint8_t duk__buffer_proto_from_classnum[] = {
- DUK_BIDX_ARRAYBUFFER_PROTOTYPE,
- DUK_BIDX_DATAVIEW_PROTOTYPE,
- DUK_BIDX_INT8ARRAY_PROTOTYPE,
- DUK_BIDX_UINT8ARRAY_PROTOTYPE,
- DUK_BIDX_UINT8CLAMPEDARRAY_PROTOTYPE,
- DUK_BIDX_INT16ARRAY_PROTOTYPE,
- DUK_BIDX_UINT16ARRAY_PROTOTYPE,
- DUK_BIDX_INT32ARRAY_PROTOTYPE,
- DUK_BIDX_UINT32ARRAY_PROTOTYPE,
- DUK_BIDX_FLOAT32ARRAY_PROTOTYPE,
- DUK_BIDX_FLOAT64ARRAY_PROTOTYPE
+ DUK_BIDX_ARRAYBUFFER_PROTOTYPE, DUK_BIDX_DATAVIEW_PROTOTYPE, DUK_BIDX_INT8ARRAY_PROTOTYPE,
+ DUK_BIDX_UINT8ARRAY_PROTOTYPE, DUK_BIDX_UINT8CLAMPEDARRAY_PROTOTYPE, DUK_BIDX_INT16ARRAY_PROTOTYPE,
+ DUK_BIDX_UINT16ARRAY_PROTOTYPE, DUK_BIDX_INT32ARRAY_PROTOTYPE, DUK_BIDX_UINT32ARRAY_PROTOTYPE,
+ DUK_BIDX_FLOAT32ARRAY_PROTOTYPE, DUK_BIDX_FLOAT64ARRAY_PROTOTYPE
};
/* Map DUK_HBUFOBJ_ELEM_xxx to duk_hobject class number.
* Sync with duk_hbufobj.h and duk_hobject.h.
*/
-static const duk_uint8_t duk__buffer_class_from_elemtype[9] = {
- DUK_HOBJECT_CLASS_UINT8ARRAY,
- DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY,
- DUK_HOBJECT_CLASS_INT8ARRAY,
- DUK_HOBJECT_CLASS_UINT16ARRAY,
- DUK_HOBJECT_CLASS_INT16ARRAY,
- DUK_HOBJECT_CLASS_UINT32ARRAY,
- DUK_HOBJECT_CLASS_INT32ARRAY,
- DUK_HOBJECT_CLASS_FLOAT32ARRAY,
- DUK_HOBJECT_CLASS_FLOAT64ARRAY
-};
+static const duk_uint8_t duk__buffer_class_from_elemtype[9] = { DUK_HOBJECT_CLASS_UINT8ARRAY, DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY,
+ DUK_HOBJECT_CLASS_INT8ARRAY, DUK_HOBJECT_CLASS_UINT16ARRAY,
+ DUK_HOBJECT_CLASS_INT16ARRAY, DUK_HOBJECT_CLASS_UINT32ARRAY,
+ DUK_HOBJECT_CLASS_INT32ARRAY, DUK_HOBJECT_CLASS_FLOAT32ARRAY,
+ DUK_HOBJECT_CLASS_FLOAT64ARRAY };
/* Map DUK_HBUFOBJ_ELEM_xxx to prototype object built-in index.
* Sync with duk_hbufobj.h.
*/
static const duk_uint8_t duk__buffer_proto_from_elemtype[9] = {
- DUK_BIDX_UINT8ARRAY_PROTOTYPE,
- DUK_BIDX_UINT8CLAMPEDARRAY_PROTOTYPE,
- DUK_BIDX_INT8ARRAY_PROTOTYPE,
- DUK_BIDX_UINT16ARRAY_PROTOTYPE,
- DUK_BIDX_INT16ARRAY_PROTOTYPE,
- DUK_BIDX_UINT32ARRAY_PROTOTYPE,
- DUK_BIDX_INT32ARRAY_PROTOTYPE,
- DUK_BIDX_FLOAT32ARRAY_PROTOTYPE,
- DUK_BIDX_FLOAT64ARRAY_PROTOTYPE
+ DUK_BIDX_UINT8ARRAY_PROTOTYPE, DUK_BIDX_UINT8CLAMPEDARRAY_PROTOTYPE, DUK_BIDX_INT8ARRAY_PROTOTYPE,
+ DUK_BIDX_UINT16ARRAY_PROTOTYPE, DUK_BIDX_INT16ARRAY_PROTOTYPE, DUK_BIDX_UINT32ARRAY_PROTOTYPE,
+ DUK_BIDX_INT32ARRAY_PROTOTYPE, DUK_BIDX_FLOAT32ARRAY_PROTOTYPE, DUK_BIDX_FLOAT64ARRAY_PROTOTYPE
};
/* Map DUK__FLD_xxx to byte size. */
static const duk_uint8_t duk__buffer_nbytes_from_fldtype[6] = {
- 1, /* DUK__FLD_8BIT */
- 2, /* DUK__FLD_16BIT */
- 4, /* DUK__FLD_32BIT */
- 4, /* DUK__FLD_FLOAT */
- 8, /* DUK__FLD_DOUBLE */
- 0 /* DUK__FLD_VARINT; not relevant here */
+ 1, /* DUK__FLD_8BIT */
+ 2, /* DUK__FLD_16BIT */
+ 4, /* DUK__FLD_32BIT */
+ 4, /* DUK__FLD_FLOAT */
+ 8, /* DUK__FLD_DOUBLE */
+ 0 /* DUK__FLD_VARINT; not relevant here */
};
/* Bitfield for each DUK_HBUFOBJ_ELEM_xxx indicating which element types
@@ -26875,36 +27872,27 @@ static const duk_uint8_t duk__buffer_nbytes_from_fldtype[6] = {
#if !defined(DUK_USE_PREFER_SIZE)
static duk_uint16_t duk__buffer_elemtype_copy_compatible[9] = {
/* xxx -> DUK_HBUFOBJ_ELEM_UINT8 */
- (1U << DUK_HBUFOBJ_ELEM_UINT8) |
- (1U << DUK_HBUFOBJ_ELEM_UINT8CLAMPED) |
- (1U << DUK_HBUFOBJ_ELEM_INT8),
+ (1U << DUK_HBUFOBJ_ELEM_UINT8) | (1U << DUK_HBUFOBJ_ELEM_UINT8CLAMPED) | (1U << DUK_HBUFOBJ_ELEM_INT8),
/* xxx -> DUK_HBUFOBJ_ELEM_UINT8CLAMPED
* Note: INT8 is -not- copy compatible, e.g. -1 would coerce to 0x00.
*/
- (1U << DUK_HBUFOBJ_ELEM_UINT8) |
- (1U << DUK_HBUFOBJ_ELEM_UINT8CLAMPED),
+ (1U << DUK_HBUFOBJ_ELEM_UINT8) | (1U << DUK_HBUFOBJ_ELEM_UINT8CLAMPED),
/* xxx -> DUK_HBUFOBJ_ELEM_INT8 */
- (1U << DUK_HBUFOBJ_ELEM_UINT8) |
- (1U << DUK_HBUFOBJ_ELEM_UINT8CLAMPED) |
- (1U << DUK_HBUFOBJ_ELEM_INT8),
+ (1U << DUK_HBUFOBJ_ELEM_UINT8) | (1U << DUK_HBUFOBJ_ELEM_UINT8CLAMPED) | (1U << DUK_HBUFOBJ_ELEM_INT8),
/* xxx -> DUK_HBUFOBJ_ELEM_UINT16 */
- (1U << DUK_HBUFOBJ_ELEM_UINT16) |
- (1U << DUK_HBUFOBJ_ELEM_INT16),
+ (1U << DUK_HBUFOBJ_ELEM_UINT16) | (1U << DUK_HBUFOBJ_ELEM_INT16),
/* xxx -> DUK_HBUFOBJ_ELEM_INT16 */
- (1U << DUK_HBUFOBJ_ELEM_UINT16) |
- (1U << DUK_HBUFOBJ_ELEM_INT16),
+ (1U << DUK_HBUFOBJ_ELEM_UINT16) | (1U << DUK_HBUFOBJ_ELEM_INT16),
/* xxx -> DUK_HBUFOBJ_ELEM_UINT32 */
- (1U << DUK_HBUFOBJ_ELEM_UINT32) |
- (1U << DUK_HBUFOBJ_ELEM_INT32),
+ (1U << DUK_HBUFOBJ_ELEM_UINT32) | (1U << DUK_HBUFOBJ_ELEM_INT32),
/* xxx -> DUK_HBUFOBJ_ELEM_INT32 */
- (1U << DUK_HBUFOBJ_ELEM_UINT32) |
- (1U << DUK_HBUFOBJ_ELEM_INT32),
+ (1U << DUK_HBUFOBJ_ELEM_UINT32) | (1U << DUK_HBUFOBJ_ELEM_INT32),
/* xxx -> DUK_HBUFOBJ_ELEM_FLOAT32 */
(1U << DUK_HBUFOBJ_ELEM_FLOAT32),
@@ -26912,7 +27900,7 @@ static duk_uint16_t duk__buffer_elemtype_copy_compatible[9] = {
/* xxx -> DUK_HBUFOBJ_ELEM_FLOAT64 */
(1U << DUK_HBUFOBJ_ELEM_FLOAT64)
};
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
DUK_LOCAL duk_hbufobj *duk__hbufobj_promote_this(duk_hthread *thr) {
duk_tval *tv_dst;
@@ -26931,8 +27919,8 @@ DUK_LOCAL duk_hbufobj *duk__hbufobj_promote_this(duk_hthread *thr) {
return res;
}
-#define DUK__BUFOBJ_FLAG_THROW (1 << 0)
-#define DUK__BUFOBJ_FLAG_PROMOTE (1 << 1)
+#define DUK__BUFOBJ_FLAG_THROW (1 << 0)
+#define DUK__BUFOBJ_FLAG_PROMOTE (1 << 1)
/* Shared helper. When DUK__BUFOBJ_FLAG_PROMOTE is given, the return value is
* always a duk_hbufobj *. Without the flag the return value can also be a
@@ -27023,7 +28011,7 @@ DUK_LOCAL duk_hbufobj *duk__require_bufobj_value(duk_hthread *thr, duk_idx_t idx
DUK_LOCAL void duk__set_bufobj_buffer(duk_hthread *thr, duk_hbufobj *h_bufobj, duk_hbuffer *h_val) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(h_bufobj != NULL);
- DUK_ASSERT(h_bufobj->buf == NULL); /* no need to decref */
+ DUK_ASSERT(h_bufobj->buf == NULL); /* no need to decref */
DUK_ASSERT(h_val != NULL);
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
DUK_UNREF(thr);
@@ -27059,12 +28047,12 @@ DUK_LOCAL void duk__resolve_offset_opt_length(duk_hthread *thr,
if (offset > h_bufarg->length) {
goto fail_range;
}
- DUK_ASSERT_DISABLE(offset >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(offset >= 0); /* unsigned */
DUK_ASSERT(offset <= h_bufarg->length);
if (duk_is_undefined(thr, idx_length)) {
DUK_ASSERT(h_bufarg->length >= offset);
- length = h_bufarg->length - offset; /* >= 0 */
+ length = h_bufarg->length - offset; /* >= 0 */
} else {
length_signed = duk_to_int(thr, idx_length);
if (length_signed < 0) {
@@ -27083,14 +28071,14 @@ DUK_LOCAL void duk__resolve_offset_opt_length(duk_hthread *thr,
}
}
}
- DUK_ASSERT_DISABLE(length >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(length >= 0); /* unsigned */
DUK_ASSERT(offset + length <= h_bufarg->length);
*out_offset = offset;
*out_length = length;
return;
- fail_range:
+fail_range:
DUK_ERROR_RANGE(thr, DUK_STR_INVALID_ARGS);
DUK_WO_NORETURN(return;);
}
@@ -27148,7 +28136,7 @@ DUK_LOCAL void duk__clamp_startend_negidx_shifted(duk_hthread *thr,
DUK_ASSERT(out_start_offset != NULL);
DUK_ASSERT(out_end_offset != NULL);
- buffer_length >>= buffer_shift; /* as (full) elements */
+ buffer_length >>= buffer_shift; /* as (full) elements */
/* Resolve start/end offset as element indices first; arguments
* at idx_start/idx_end are element offsets. Working with element
@@ -27240,7 +28228,10 @@ DUK_INTERNAL void duk_hbufobj_push_uint8array_from_plain(duk_hthread *thr, duk_h
}
/* Indexed read helper for buffer objects, also called from outside this file. */
-DUK_INTERNAL void duk_hbufobj_push_validated_read(duk_hthread *thr, duk_hbufobj *h_bufobj, duk_uint8_t *p, duk_small_uint_t elem_size) {
+DUK_INTERNAL void duk_hbufobj_push_validated_read(duk_hthread *thr,
+ duk_hbufobj *h_bufobj,
+ duk_uint8_t *p,
+ duk_small_uint_t elem_size) {
duk_double_union du;
DUK_ASSERT(elem_size > 0);
@@ -27388,17 +28379,17 @@ DUK_LOCAL duk_hbuffer *duk__hbufobj_fixed_from_argvalue(duk_hthread *thr) {
DUK_WO_NORETURN(return NULL;);
}
- done:
+done:
DUK_ASSERT(duk_is_buffer(thr, -1));
return duk_known_hbuffer(thr, -1);
- slow_copy:
+slow_copy:
/* XXX: fast path for typed arrays and other buffer objects? */
(void) duk_get_prop_stridx_short(thr, 0, DUK_STRIDX_LENGTH);
len = duk_to_int_clamped(thr, -1, 0, DUK_INT_MAX);
duk_pop(thr);
- buf = (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, (duk_size_t) len); /* no zeroing, all indices get initialized */
+ buf = (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, (duk_size_t) len); /* no zeroing, all indices get initialized */
for (i = 0; i < len; i++) {
/* XXX: fast path for array or buffer arguments? */
duk_get_prop_index(thr, 0, (duk_uarridx_t) i);
@@ -27407,7 +28398,7 @@ DUK_LOCAL duk_hbuffer *duk__hbufobj_fixed_from_argvalue(duk_hthread *thr) {
}
goto done;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer constructor
@@ -27424,11 +28415,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_constructor(duk_hthread *thr) {
h_buf = duk__hbufobj_fixed_from_argvalue(thr);
DUK_ASSERT(h_buf != NULL);
- duk_push_buffer_object(thr,
- -1,
- 0,
- DUK_HBUFFER_FIXED_GET_SIZE((duk_hbuffer_fixed *) (void *) h_buf),
- DUK_BUFOBJ_UINT8ARRAY);
+ duk_push_buffer_object(thr, -1, 0, DUK_HBUFFER_FIXED_GET_SIZE((duk_hbuffer_fixed *) (void *) h_buf), DUK_BUFOBJ_UINT8ARRAY);
duk_push_hobject_bidx(thr, DUK_BIDX_NODEJS_BUFFER_PROTOTYPE);
duk_set_prototype(thr, -2);
@@ -27436,7 +28423,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_constructor(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* ArrayBuffer, DataView, and TypedArray constructors
@@ -27460,9 +28447,8 @@ DUK_INTERNAL duk_ret_t duk_bi_arraybuffer_constructor(duk_hthread *thr) {
h_val = (duk_hbuffer *) duk_known_hbuffer(thr, -1);
h_bufobj = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAYBUFFER),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAYBUFFER),
DUK_BIDX_ARRAYBUFFER_PROTOTYPE);
DUK_ASSERT(h_bufobj != NULL);
@@ -27471,11 +28457,10 @@ DUK_INTERNAL duk_ret_t duk_bi_arraybuffer_constructor(duk_hthread *thr) {
return 1;
- fail_length:
+fail_length:
DUK_DCERROR_RANGE_INVALID_LENGTH(thr);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
-
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* Format of magic, bits:
* 0...1: elem size shift (0-3)
@@ -27515,8 +28500,8 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
* element type.
*/
magic = (duk_small_uint_t) duk_get_current_magic(thr);
- shift = magic & 0x03U; /* bits 0...1: shift */
- elem_type = (magic >> 2) & 0x0fU; /* bits 2...5: type */
+ shift = magic & 0x03U; /* bits 0...1: shift */
+ elem_type = (magic >> 2) & 0x0fU; /* bits 2...5: type */
elem_size = 1U << shift;
align_mask = elem_size - 1;
DUK_ASSERT(elem_type < sizeof(duk__buffer_proto_from_elemtype) / sizeof(duk_uint8_t));
@@ -27527,8 +28512,12 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
DUK_DD(DUK_DDPRINT("typedarray constructor, magic=%d, shift=%d, elem_type=%d, "
"elem_size=%d, proto_bidx=%d, class_num=%d",
- (int) magic, (int) shift, (int) elem_type, (int) elem_size,
- (int) proto_bidx, (int) class_num));
+ (int) magic,
+ (int) shift,
+ (int) elem_type,
+ (int) elem_size,
+ (int) proto_bidx,
+ (int) class_num));
/* Argument variants. When the argument is an ArrayBuffer a view to
* the same buffer is created; otherwise a new ArrayBuffer is always
@@ -27542,7 +28531,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
duk_hbufobj_promote_plain(thr, 0);
tv = duk_get_tval(thr, 0);
- DUK_ASSERT(tv != NULL); /* arg count */
+ DUK_ASSERT(tv != NULL); /* arg count */
if (DUK_TVAL_IS_OBJECT(tv)) {
h_obj = DUK_TVAL_GET_OBJECT(tv);
DUK_ASSERT(h_obj != NULL);
@@ -27562,8 +28551,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
goto fail_arguments;
}
byte_offset = (duk_uint_t) byte_offset_signed;
- if (byte_offset > h_bufarg->length ||
- (byte_offset & align_mask) != 0) {
+ if (byte_offset > h_bufarg->length || (byte_offset & align_mask) != 0) {
/* Must be >= 0 and multiple of element size. */
goto fail_arguments;
}
@@ -27603,9 +28591,8 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
DUK_ASSERT((elem_length << shift) == byte_length);
h_bufobj = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(class_num),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ |
+ DUK_HOBJECT_CLASS_AS_FLAGS(class_num),
(duk_small_int_t) proto_bidx);
h_val = h_bufarg->buf;
if (h_val == NULL) {
@@ -27648,11 +28635,13 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
"src byte_length=%ld, src shift=%d, "
"src/dst elem_length=%ld; "
"dst shift=%d -> dst byte_length=%ld",
- (long) h_bufarg->length, (int) h_bufarg->shift,
- (long) elem_length_signed, (int) shift,
+ (long) h_bufarg->length,
+ (int) h_bufarg->shift,
+ (long) elem_length_signed,
+ (int) shift,
(long) (elem_length_signed << shift)));
- copy_mode = 2; /* default is explicit index read/write copy */
+ copy_mode = 2; /* default is explicit index read/write copy */
#if !defined(DUK_USE_PREFER_SIZE)
/* With a size optimized build copy_mode 2 is enough.
* Modes 0 and 1 are faster but conceptually the same.
@@ -27661,14 +28650,14 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
if (DUK_HBUFOBJ_VALID_SLICE(h_bufarg)) {
if ((duk__buffer_elemtype_copy_compatible[elem_type] & (1 << h_bufarg->elem_type)) != 0) {
DUK_DDD(DUK_DDDPRINT("source/target are copy compatible, memcpy"));
- DUK_ASSERT(shift == h_bufarg->shift); /* byte sizes will match */
+ DUK_ASSERT(shift == h_bufarg->shift); /* byte sizes will match */
copy_mode = 0;
} else {
DUK_DDD(DUK_DDDPRINT("source/target not copy compatible but valid, fast copy"));
copy_mode = 1;
}
}
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
} else {
/* Array or Array-like */
elem_length_signed = (duk_int_t) duk_get_length(thr, 0);
@@ -27693,8 +28682,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
goto fail_arguments;
}
- DUK_DDD(DUK_DDDPRINT("elem_length=%ld, byte_length=%ld",
- (long) elem_length, (long) byte_length));
+ DUK_DDD(DUK_DDDPRINT("elem_length=%ld, byte_length=%ld", (long) elem_length, (long) byte_length));
/* ArrayBuffer argument is handled specially above; the rest of the
* argument variants are handled by shared code below.
@@ -27709,11 +28697,10 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
h_val = duk_known_hbuffer(thr, -1);
DUK_ASSERT(h_val != NULL);
- h_bufobj = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(class_num),
- (duk_small_int_t) proto_bidx);
+ h_bufobj =
+ duk_push_bufobj_raw(thr,
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ | DUK_HOBJECT_CLASS_AS_FLAGS(class_num),
+ (duk_small_int_t) proto_bidx);
h_bufobj->buf = h_val;
DUK_HBUFFER_INCREF(thr, h_val);
@@ -27753,7 +28740,9 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
p_src = DUK_HBUFOBJ_GET_SLICE_BASE(thr->heap, h_bufarg);
DUK_DDD(DUK_DDDPRINT("using memcpy: p_src=%p, p_dst=%p, byte_length=%ld",
- (void *) p_src, (void *) p_dst, (long) byte_length));
+ (void *) p_src,
+ (void *) p_dst,
+ (long) byte_length));
duk_memcpy_unsafe((void *) p_dst, (const void *) p_src, (size_t) byte_length);
break;
@@ -27783,13 +28772,18 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("using fast copy: p_src=%p, p_src_end=%p, p_dst=%p, "
"src_elem_size=%d, dst_elem_size=%d",
- (void *) p_src, (void *) p_src_end, (void *) p_dst,
- (int) src_elem_size, (int) dst_elem_size));
+ (void *) p_src,
+ (void *) p_src_end,
+ (void *) p_dst,
+ (int) src_elem_size,
+ (int) dst_elem_size));
while (p_src != p_src_end) {
DUK_DDD(DUK_DDDPRINT("fast path per element copy loop: "
"p_src=%p, p_src_end=%p, p_dst=%p",
- (void *) p_src, (void *) p_src_end, (void *) p_dst));
+ (void *) p_src,
+ (void *) p_src_end,
+ (void *) p_dst));
/* A validated read() is always a number, so it's write coercion
* is always side effect free an won't invalidate pointers etc.
*/
@@ -27801,7 +28795,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
}
break;
}
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
case 2: {
/* Copy values by index reads and writes. Let virtual
* property handling take care of coercion.
@@ -27830,10 +28824,10 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
return 1;
- fail_arguments:
+fail_arguments:
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* When bufferobject support is disabled, new Uint8Array() could still be
* supported to create a plain fixed buffer. Disabled for now.
*/
@@ -27860,8 +28854,8 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_constructor(duk_hthread *thr) {
fail_arguments:
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#endif /* 0 */
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* 0 */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
DUK_INTERNAL duk_ret_t duk_bi_dataview_constructor(duk_hthread *thr) {
@@ -27884,9 +28878,8 @@ DUK_INTERNAL duk_ret_t duk_bi_dataview_constructor(duk_hthread *thr) {
DUK_ASSERT(offset + length <= h_bufarg->length);
h_bufobj = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DATAVIEW),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DATAVIEW),
DUK_BIDX_DATAVIEW_PROTOTYPE);
h_val = h_bufarg->buf;
@@ -27909,7 +28902,7 @@ DUK_INTERNAL duk_ret_t duk_bi_dataview_constructor(duk_hthread *thr) {
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* ArrayBuffer.isView()
@@ -27935,7 +28928,7 @@ DUK_INTERNAL duk_ret_t duk_bi_arraybuffer_isview(duk_hthread *thr) {
duk_push_boolean(thr, ret);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Uint8Array.allocPlain()
@@ -27946,7 +28939,7 @@ DUK_INTERNAL duk_ret_t duk_bi_uint8array_allocplain(duk_hthread *thr) {
duk__hbufobj_fixed_from_argvalue(thr);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Uint8Array.plainOf()
@@ -27975,7 +28968,7 @@ DUK_INTERNAL duk_ret_t duk_bi_uint8array_plainof(duk_hthread *thr) {
}
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer: toString([encoding], [start], [end])
@@ -28006,12 +28999,11 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_tostring(duk_hthread *thr) {
&end_offset);
slice_length = (duk_size_t) (end_offset - start_offset);
- buf_slice = (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, slice_length); /* all bytes initialized below */
+ buf_slice = (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, slice_length); /* all bytes initialized below */
DUK_ASSERT(buf_slice != NULL);
/* Neutered or uncovered, TypeError. */
- if (h_this->buf == NULL ||
- !DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_this, (duk_size_t) start_offset + slice_length)) {
+ if (h_this->buf == NULL || !DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_this, (duk_size_t) start_offset + slice_length)) {
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
}
@@ -28034,7 +29026,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_tostring(duk_hthread *thr) {
duk_set_top(thr, 1);
return duk_textdecoder_decode_utf8_nodejs(thr);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.prototype: toJSON()
@@ -28064,19 +29056,19 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_tojson(duk_hthread *thr) {
/* XXX: uninitialized would be OK */
DUK_ASSERT_DISABLE((duk_size_t) h_this->length <= (duk_size_t) DUK_UINT32_MAX);
- tv = duk_push_harray_with_size_outptr(thr, (duk_uint32_t) h_this->length); /* XXX: needs revision with >4G buffers */
+ tv = duk_push_harray_with_size_outptr(thr, (duk_uint32_t) h_this->length); /* XXX: needs revision with >4G buffers */
DUK_ASSERT(!duk_is_bare_object(thr, -1));
DUK_ASSERT(h_this->buf != NULL);
buf = DUK_HBUFOBJ_GET_SLICE_BASE(thr->heap, h_this);
for (i = 0, n = h_this->length; i < n; i++) {
- DUK_TVAL_SET_U32(tv + i, (duk_uint32_t) buf[i]); /* no need for decref or incref */
+ DUK_TVAL_SET_U32(tv + i, (duk_uint32_t) buf[i]); /* no need for decref or incref */
}
duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_DATA);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.prototype.equals()
@@ -28111,14 +29103,14 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_compare_shared(duk_hthread *thr) {
* matters is to be memory safe.
*/
- if (DUK_HBUFOBJ_VALID_SLICE(h_bufarg1) &&
- DUK_HBUFOBJ_VALID_SLICE(h_bufarg2)) {
- comp_res = duk_js_data_compare((const duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufarg1->buf) + h_bufarg1->offset,
- (const duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufarg2->buf) + h_bufarg2->offset,
- (duk_size_t) h_bufarg1->length,
- (duk_size_t) h_bufarg2->length);
+ if (DUK_HBUFOBJ_VALID_SLICE(h_bufarg1) && DUK_HBUFOBJ_VALID_SLICE(h_bufarg2)) {
+ comp_res = duk_js_data_compare(
+ (const duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufarg1->buf) + h_bufarg1->offset,
+ (const duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufarg2->buf) + h_bufarg2->offset,
+ (duk_size_t) h_bufarg1->length,
+ (duk_size_t) h_bufarg2->length);
} else {
- comp_res = -1; /* either nonzero value is ok */
+ comp_res = -1; /* either nonzero value is ok */
}
if (magic & 0x01U) {
@@ -28131,7 +29123,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_compare_shared(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.prototype.fill()
@@ -28176,7 +29168,10 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_fill(duk_hthread *thr) {
&fill_end);
DUK_DDD(DUK_DDDPRINT("fill: fill_value=%02x, fill_offset=%ld, fill_end=%ld, view length=%ld",
- (unsigned int) fill_value, (long) fill_offset, (long) fill_end, (long) h_this->length));
+ (unsigned int) fill_value,
+ (long) fill_offset,
+ (long) fill_end,
+ (long) h_this->length));
DUK_ASSERT(fill_end - fill_offset >= 0);
DUK_ASSERT(h_this->buf != NULL);
@@ -28205,7 +29200,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_fill(duk_hthread *thr) {
duk_push_this(thr);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.prototype.write(string, [offset], [length], [encoding])
@@ -28248,7 +29243,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_write(duk_hthread *thr) {
duk_push_uint(thr, length);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.prototype.copy()
@@ -28283,8 +29278,11 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_copy(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("checking copy args: target_start=%ld, target_length=%ld, "
"source_start=%ld, source_end=%ld, source_length=%ld",
- (long) target_start, (long) h_bufarg->length,
- (long) source_start, (long) source_end, (long) source_length));
+ (long) target_start,
+ (long) h_bufarg->length,
+ (long) source_start,
+ (long) source_end,
+ (long) source_length));
/* This behavior mostly mimics Node.js now. */
@@ -28295,9 +29293,9 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_copy(duk_hthread *thr) {
source_ustart = (duk_uint_t) source_start;
source_uend = (duk_uint_t) source_end;
target_ustart = (duk_uint_t) target_start;
- if (source_ustart >= source_uend || /* crossed offsets or zero size */
- source_ustart >= (duk_uint_t) source_length || /* source out-of-bounds (but positive) */
- target_ustart >= (duk_uint_t) target_length) { /* target out-of-bounds (but positive) */
+ if (source_ustart >= source_uend || /* crossed offsets or zero size */
+ source_ustart >= (duk_uint_t) source_length || /* source out-of-bounds (but positive) */
+ target_ustart >= (duk_uint_t) target_length) { /* target out-of-bounds (but positive) */
goto silent_ignore;
}
if (source_uend >= (duk_uint_t) source_length) {
@@ -28313,13 +29311,14 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_copy(duk_hthread *thr) {
* values in duk_int_t range. Adding them as duk_uint_t
* values is then guaranteed not to overflow.
*/
- DUK_ASSERT(target_ustart + copy_size >= target_ustart); /* no overflow */
- DUK_ASSERT(target_ustart + copy_size >= copy_size); /* no overflow */
+ DUK_ASSERT(target_ustart + copy_size >= target_ustart); /* no overflow */
+ DUK_ASSERT(target_ustart + copy_size >= copy_size); /* no overflow */
copy_size = (duk_uint_t) target_length - target_ustart;
}
DUK_DDD(DUK_DDDPRINT("making copy: target_ustart=%lu source_ustart=%lu copy_size=%lu",
- (unsigned long) target_ustart, (unsigned long) source_ustart,
+ (unsigned long) target_ustart,
+ (unsigned long) source_ustart,
(unsigned long) copy_size));
DUK_ASSERT(copy_size >= 1);
@@ -28329,8 +29328,8 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_copy(duk_hthread *thr) {
DUK_ASSERT(target_ustart + copy_size <= (duk_uint_t) target_length);
/* Ensure copy is covered by underlying buffers. */
- DUK_ASSERT(h_bufarg->buf != NULL); /* length check */
- DUK_ASSERT(h_this->buf != NULL); /* length check */
+ DUK_ASSERT(h_bufarg->buf != NULL); /* length check */
+ DUK_ASSERT(h_this->buf != NULL); /* length check */
if (DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_bufarg, target_ustart + copy_size) &&
DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_this, source_ustart + copy_size)) {
/* Must use memmove() because copy area may overlap (source and target
@@ -28343,18 +29342,18 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_copy(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("buffer copy not covered by underlying buffer(s), ignoring"));
}
- silent_ignore:
+silent_ignore:
/* Return value is like write(), number of bytes written.
* The return value matters because of code like:
* "off += buf.copy(...)".
- */
+ */
duk_push_uint(thr, copy_size);
return 1;
- fail_bounds:
+fail_bounds:
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* TypedArray.prototype.set()
@@ -28466,16 +29465,15 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
}
/* Nominal size check. */
- src_length = h_bufarg->length; /* bytes in source */
- dst_length_elems = (src_length >> h_bufarg->shift); /* elems in source and dest */
- dst_length = dst_length_elems << h_this->shift; /* bytes in dest */
+ src_length = h_bufarg->length; /* bytes in source */
+ dst_length_elems = (src_length >> h_bufarg->shift); /* elems in source and dest */
+ dst_length = dst_length_elems << h_this->shift; /* bytes in dest */
if ((dst_length >> h_this->shift) != dst_length_elems) {
/* Byte length would overflow. */
/* XXX: easier check with less code? */
goto fail_args;
}
- DUK_DDD(DUK_DDDPRINT("nominal size check: src_length=%ld, dst_length=%ld",
- (long) src_length, (long) dst_length));
+ DUK_DDD(DUK_DDDPRINT("nominal size check: src_length=%ld, dst_length=%ld", (long) src_length, (long) dst_length));
DUK_ASSERT(offset_bytes <= h_this->length);
if (dst_length > h_this->length - offset_bytes) {
/* Overflow not an issue because subtraction is used on the right
@@ -28496,8 +29494,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
* cover the copy. No side effects are allowed after the check
* so that the validity status doesn't change.
*/
- if (!DUK_HBUFOBJ_VALID_SLICE(h_this) ||
- !DUK_HBUFOBJ_VALID_SLICE(h_bufarg)) {
+ if (!DUK_HBUFOBJ_VALID_SLICE(h_this) || !DUK_HBUFOBJ_VALID_SLICE(h_bufarg)) {
/* The condition could be more narrow and check for the
* copy area only, but there's no need for fine grained
* behavior when the underlying buffer is misconfigured.
@@ -28528,7 +29525,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
return 0;
}
DUK_DDD(DUK_DDDPRINT("fast path: views are not compatible with a byte copy, copy by item"));
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
/* We want to avoid making a copy to process set() but that's
* not always possible: the source and the target may overlap
@@ -28548,11 +29545,13 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("overlap check: p_src_base=%p, src_length=%ld, "
"p_dst_base=%p, dst_length=%ld",
- (void *) p_src_base, (long) src_length,
- (void *) p_dst_base, (long) dst_length));
+ (void *) p_src_base,
+ (long) src_length,
+ (void *) p_dst_base,
+ (long) dst_length));
- if (p_src_base >= p_dst_base + dst_length || /* source starts after dest ends */
- p_src_base + src_length <= p_dst_base) { /* source ends before dest starts */
+ if (p_src_base >= p_dst_base + dst_length || /* source starts after dest ends */
+ p_src_base + src_length <= p_dst_base) { /* source ends before dest starts */
no_overlap = 1;
}
@@ -28569,14 +29568,16 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
DUK_ASSERT(p_src_copy != NULL);
duk_memcpy_unsafe((void *) p_src_copy, (const void *) p_src_base, (size_t) src_length);
- p_src_base = p_src_copy; /* use p_src_base from now on */
+ p_src_base = p_src_copy; /* use p_src_base from now on */
}
/* Value stack intentionally mixed size here. */
DUK_DDD(DUK_DDDPRINT("after overlap check: p_src_base=%p, src_length=%ld, "
"p_dst_base=%p, dst_length=%ld, valstack top=%ld",
- (void *) p_src_base, (long) src_length,
- (void *) p_dst_base, (long) dst_length,
+ (void *) p_src_base,
+ (long) src_length,
+ (void *) p_dst_base,
+ (long) dst_length,
(long) duk_get_top(thr)));
/* Ready to make the copy. We must proceed element by element
@@ -28596,7 +29597,9 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
while (p_src != p_src_end) {
DUK_DDD(DUK_DDDPRINT("fast path per element copy loop: "
"p_src=%p, p_src_end=%p, p_dst=%p",
- (void *) p_src, (void *) p_src_end, (void *) p_dst));
+ (void *) p_src,
+ (void *) p_src_end,
+ (void *) p_dst));
/* A validated read() is always a number, so it's write coercion
* is always side effect free an won't invalidate pointers etc.
*/
@@ -28646,10 +29649,10 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_set(duk_hthread *thr) {
return 0;
- fail_args:
+fail_args:
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.prototype.slice([start], [end])
@@ -28744,7 +29747,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_slice_shared(duk_hthread *thr) {
/* fall through */
}
}
- tv = NULL; /* No longer valid nor needed. */
+ tv = NULL; /* No longer valid nor needed. */
h_this = duk__require_bufobj_this(thr);
@@ -28782,22 +29785,21 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_slice_shared(duk_hthread *thr) {
* be an Uint8Array but inherit from Buffer.prototype.
*/
res_class_num = DUK_HOBJECT_GET_CLASS_NUMBER((duk_hobject *) h_this);
- DUK_ASSERT(res_class_num >= DUK_HOBJECT_CLASS_BUFOBJ_MIN); /* type check guarantees */
+ DUK_ASSERT(res_class_num >= DUK_HOBJECT_CLASS_BUFOBJ_MIN); /* type check guarantees */
DUK_ASSERT(res_class_num <= DUK_HOBJECT_CLASS_BUFOBJ_MAX);
res_proto_bidx = duk__buffer_proto_from_classnum[res_class_num - DUK_HOBJECT_CLASS_BUFOBJ_MIN];
if (magic & 0x04) {
res_proto_bidx = DUK_BIDX_NODEJS_BUFFER_PROTOTYPE;
}
- h_bufobj = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(res_class_num),
- res_proto_bidx);
+ h_bufobj =
+ duk_push_bufobj_raw(thr,
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ | DUK_HOBJECT_CLASS_AS_FLAGS(res_class_num),
+ res_proto_bidx);
DUK_ASSERT(h_bufobj != NULL);
DUK_ASSERT(h_bufobj->length == 0);
- h_bufobj->shift = h_this->shift; /* inherit */
- h_bufobj->elem_type = h_this->elem_type; /* inherit */
+ h_bufobj->shift = h_this->shift; /* inherit */
+ h_bufobj->elem_type = h_this->elem_type; /* inherit */
h_bufobj->is_typedarray = magic & 0x01;
DUK_ASSERT(h_bufobj->is_typedarray == 0 || h_bufobj->is_typedarray == 1);
@@ -28811,7 +29813,9 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_slice_shared(duk_hthread *thr) {
duk_uint8_t *p_copy;
duk_size_t copy_length;
- p_copy = (duk_uint8_t *) duk_push_fixed_buffer_zero(thr, (duk_size_t) slice_length); /* must be zeroed, not all bytes always copied */
+ p_copy = (duk_uint8_t *) duk_push_fixed_buffer_zero(
+ thr,
+ (duk_size_t) slice_length); /* must be zeroed, not all bytes always copied */
DUK_ASSERT(p_copy != NULL);
/* Copy slice, respecting underlying buffer limits; remainder
@@ -28829,7 +29833,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_slice_shared(duk_hthread *thr) {
h_bufobj->length = slice_length;
DUK_ASSERT(h_bufobj->offset == 0);
- duk_pop(thr); /* reachable so pop OK */
+ duk_pop(thr); /* reachable so pop OK */
} else {
h_bufobj->buf = h_val;
DUK_HBUFFER_INCREF(thr, h_val);
@@ -28842,7 +29846,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_slice_shared(duk_hthread *thr) {
*/
DUK_ASSERT(h_bufobj->buf_prop == NULL);
- h_bufobj->buf_prop = h_this->buf_prop; /* may be NULL */
+ h_bufobj->buf_prop = h_this->buf_prop; /* may be NULL */
DUK_HOBJECT_INCREF_ALLOWNULL(thr, (duk_hobject *) h_bufobj->buf_prop);
}
/* unbalanced stack on purpose */
@@ -28850,7 +29854,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_slice_shared(duk_hthread *thr) {
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.isEncoding()
@@ -28863,11 +29867,11 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_is_encoding(duk_hthread *thr) {
/* only accept lowercase 'utf8' now. */
encoding = duk_to_string(thr, 0);
- DUK_ASSERT(duk_is_string(thr, 0)); /* guaranteed by duk_to_string() */
+ DUK_ASSERT(duk_is_string(thr, 0)); /* guaranteed by duk_to_string() */
duk_push_boolean(thr, DUK_STRCMP(encoding, "utf8") == 0);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.isBuffer()
@@ -28879,7 +29883,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_is_buffer(duk_hthread *thr) {
duk_hobject *h_proto;
duk_bool_t ret = 0;
- DUK_ASSERT(duk_get_top(thr) >= 1); /* nargs */
+ DUK_ASSERT(duk_get_top(thr) >= 1); /* nargs */
h = duk_get_hobject(thr, 0);
if (h != NULL) {
h_proto = thr->builtins[DUK_BIDX_NODEJS_BUFFER_PROTOTYPE];
@@ -28894,7 +29898,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_is_buffer(duk_hthread *thr) {
duk_push_boolean(thr, ret);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.byteLength()
@@ -28925,7 +29929,7 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_byte_length(duk_hthread *thr) {
duk_push_size_t(thr, len);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Node.js Buffer.concat()
@@ -28956,13 +29960,13 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_concat(duk_hthread *thr) {
/* Neutered checks not necessary here: neutered buffers have
* zero 'length' so we'll effectively skip them.
*/
- DUK_ASSERT_TOP(thr, 2); /* [ array totalLength ] */
- duk_get_prop_index(thr, 0, (duk_uarridx_t) i); /* -> [ array totalLength buf ] */
+ DUK_ASSERT_TOP(thr, 2); /* [ array totalLength ] */
+ duk_get_prop_index(thr, 0, (duk_uarridx_t) i); /* -> [ array totalLength buf ] */
h_bufobj = duk__require_bufobj_value(thr, 2);
DUK_ASSERT(h_bufobj != NULL);
total_length += h_bufobj->length;
if (DUK_UNLIKELY(total_length < h_bufobj->length)) {
- DUK_DCERROR_RANGE_INVALID_ARGS(thr); /* Wrapped. */
+ DUK_DCERROR_RANGE_INVALID_ARGS(thr); /* Wrapped. */
}
duk_pop(thr);
}
@@ -28988,18 +29992,18 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_concat(duk_hthread *thr) {
}
h_bufres = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_UINT8ARRAY),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_UINT8ARRAY),
DUK_BIDX_NODEJS_BUFFER_PROTOTYPE);
DUK_ASSERT(h_bufres != NULL);
- p = (duk_uint8_t *) duk_push_fixed_buffer_zero(thr, total_length); /* must be zeroed, all bytes not necessarily written over */
+ p = (duk_uint8_t *) duk_push_fixed_buffer_zero(thr,
+ total_length); /* must be zeroed, all bytes not necessarily written over */
DUK_ASSERT(p != NULL);
space_left = (duk_size_t) total_length;
for (i = 0; i < n; i++) {
- DUK_ASSERT_TOP(thr, 4); /* [ array totalLength bufres buf ] */
+ DUK_ASSERT_TOP(thr, 4); /* [ array totalLength bufres buf ] */
duk_get_prop_index(thr, 0, (duk_uarridx_t) i);
h_bufobj = duk__require_bufobj_value(thr, 4);
@@ -29010,11 +30014,8 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_concat(duk_hthread *thr) {
copy_size = space_left;
}
- if (h_bufobj->buf != NULL &&
- DUK_HBUFOBJ_VALID_SLICE(h_bufobj)) {
- duk_memcpy_unsafe((void *) p,
- (const void *) DUK_HBUFOBJ_GET_SLICE_BASE(thr->heap, h_bufobj),
- copy_size);
+ if (h_bufobj->buf != NULL && DUK_HBUFOBJ_VALID_SLICE(h_bufobj)) {
+ duk_memcpy_unsafe((void *) p, (const void *) DUK_HBUFOBJ_GET_SLICE_BASE(thr->heap, h_bufobj), copy_size);
} else {
/* Just skip, leaving zeroes in the result. */
;
@@ -29031,11 +30032,11 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_concat(duk_hthread *thr) {
h_bufres->is_typedarray = 1;
DUK_HBUFOBJ_ASSERT_VALID(h_bufres);
- duk_pop(thr); /* pop plain buffer, now reachable through h_bufres */
+ duk_pop(thr); /* pop plain buffer, now reachable through h_bufres */
- return 1; /* return h_bufres */
+ return 1; /* return h_bufres */
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Shared readfield and writefield methods
@@ -29051,24 +30052,24 @@ DUK_INTERNAL duk_ret_t duk_bi_nodejs_buffer_concat(duk_hthread *thr) {
* 4: signed: 1=yes, 0=no
* 5: typedarray: 1=yes, 0=no
*/
-#define DUK__FLD_8BIT 0
-#define DUK__FLD_16BIT 1
-#define DUK__FLD_32BIT 2
-#define DUK__FLD_FLOAT 3
-#define DUK__FLD_DOUBLE 4
-#define DUK__FLD_VARINT 5
-#define DUK__FLD_BIGENDIAN (1 << 3)
-#define DUK__FLD_SIGNED (1 << 4)
-#define DUK__FLD_TYPEDARRAY (1 << 5)
+#define DUK__FLD_8BIT 0
+#define DUK__FLD_16BIT 1
+#define DUK__FLD_32BIT 2
+#define DUK__FLD_FLOAT 3
+#define DUK__FLD_DOUBLE 4
+#define DUK__FLD_VARINT 5
+#define DUK__FLD_BIGENDIAN (1 << 3)
+#define DUK__FLD_SIGNED (1 << 4)
+#define DUK__FLD_TYPEDARRAY (1 << 5)
/* XXX: split into separate functions for each field type? */
DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
- duk_small_int_t magic = (duk_small_int_t) duk_get_current_magic(thr);
- duk_small_int_t magic_ftype;
- duk_small_int_t magic_bigendian;
- duk_small_int_t magic_signed;
- duk_small_int_t magic_typedarray;
- duk_small_int_t endswap;
+ duk_small_uint_t magic = (duk_small_uint_t) duk_get_current_magic(thr);
+ duk_small_uint_t magic_ftype;
+ duk_small_uint_t magic_bigendian;
+ duk_small_uint_t magic_signed;
+ duk_small_uint_t magic_typedarray;
+ duk_small_uint_t endswap;
duk_hbufobj *h_this;
duk_bool_t no_assert;
duk_int_t offset_signed;
@@ -29078,12 +30079,12 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
duk_uint8_t *buf;
duk_double_union du;
- magic_ftype = magic & 0x0007;
- magic_bigendian = magic & 0x0008;
- magic_signed = magic & 0x0010;
- magic_typedarray = magic & 0x0020;
+ magic_ftype = magic & 0x0007U;
+ magic_bigendian = magic & 0x0008U;
+ magic_signed = magic & 0x0010U;
+ magic_typedarray = magic & 0x0020U;
- h_this = duk__require_bufobj_this(thr); /* XXX: very inefficient for plain buffers */
+ h_this = duk__require_bufobj_this(thr); /* XXX: very inefficient for plain buffers */
DUK_ASSERT(h_this != NULL);
buffer_length = h_this->length;
@@ -29095,9 +30096,9 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
if (magic_typedarray) {
no_assert = 0;
#if defined(DUK_USE_INTEGER_LE)
- endswap = !duk_to_boolean(thr, 1); /* 1=little endian */
+ endswap = !duk_to_boolean(thr, 1); /* 1=little endian */
#else
- endswap = duk_to_boolean(thr, 1); /* 1=little endian */
+ endswap = duk_to_boolean(thr, 1); /* 1=little endian */
#endif
} else {
no_assert = duk_to_boolean(thr, (magic_ftype == DUK__FLD_VARINT) ? 2 : 1);
@@ -29120,18 +30121,22 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("readfield, buffer_length=%ld, offset=%ld, no_assert=%d, "
"magic=%04x, magic_fieldtype=%d, magic_bigendian=%d, magic_signed=%d, "
- "endswap=%d",
- (long) buffer_length, (long) offset, (int) no_assert,
- (unsigned int) magic, (int) magic_ftype, (int) (magic_bigendian >> 3),
- (int) (magic_signed >> 4), (int) endswap));
+ "endswap=%u",
+ (long) buffer_length,
+ (long) offset,
+ (int) no_assert,
+ (unsigned int) magic,
+ (int) magic_ftype,
+ (int) (magic_bigendian >> 3),
+ (int) (magic_signed >> 4),
+ (int) endswap));
/* Update 'buffer_length' to be the effective, safe limit which
* takes into account the underlying buffer. This value will be
* potentially invalidated by any side effect.
*/
check_length = DUK_HBUFOBJ_CLAMP_BYTELENGTH(h_this, buffer_length);
- DUK_DDD(DUK_DDDPRINT("buffer_length=%ld, check_length=%ld",
- (long) buffer_length, (long) check_length));
+ DUK_DDD(DUK_DDDPRINT("buffer_length=%ld, check_length=%ld", (long) buffer_length, (long) check_length));
if (h_this->buf) {
buf = DUK_HBUFOBJ_GET_SLICE_BASE(thr->heap, h_this);
@@ -29233,7 +30238,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
#endif
const duk_uint8_t *p;
- field_bytelen = duk_get_int(thr, 1); /* avoid side effects! */
+ field_bytelen = duk_get_int(thr, 1); /* avoid side effects! */
if (field_bytelen < 1 || field_bytelen > 6) {
goto fail_field_length;
}
@@ -29251,12 +30256,12 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
/* Gather in big endian */
i = 0;
i_step = 1;
- i_end = field_bytelen; /* one i_step over */
+ i_end = field_bytelen; /* one i_step over */
} else {
/* Gather in little endian */
i = field_bytelen - 1;
i_step = -1;
- i_end = -1; /* one i_step over */
+ i_end = -1; /* one i_step over */
}
#if defined(DUK_USE_64BIT_OPS)
@@ -29298,16 +30303,16 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
#endif
break;
}
- default: { /* should never happen but default here */
+ default: { /* should never happen but default here */
goto fail_bounds;
}
}
return 1;
- fail_neutered:
- fail_field_length:
- fail_bounds:
+fail_neutered:
+fail_field_length:
+fail_bounds:
if (no_assert) {
/* Node.js return value for noAssert out-of-bounds reads is
* usually (but not always) NaN. Return NaN consistently.
@@ -29317,17 +30322,17 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_readfield(duk_hthread *thr) {
}
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
/* XXX: split into separate functions for each field type? */
DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
- duk_small_int_t magic = (duk_small_int_t) duk_get_current_magic(thr);
- duk_small_int_t magic_ftype;
- duk_small_int_t magic_bigendian;
- duk_small_int_t magic_signed;
- duk_small_int_t magic_typedarray;
- duk_small_int_t endswap;
+ duk_small_uint_t magic = (duk_small_uint_t) duk_get_current_magic(thr);
+ duk_small_uint_t magic_ftype;
+ duk_small_uint_t magic_bigendian;
+ duk_small_uint_t magic_signed;
+ duk_small_uint_t magic_typedarray;
+ duk_small_uint_t endswap;
duk_hbufobj *h_this;
duk_bool_t no_assert;
duk_int_t offset_signed;
@@ -29338,13 +30343,13 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
duk_double_union du;
duk_int_t nbytes = 0;
- magic_ftype = magic & 0x0007;
- magic_bigendian = magic & 0x0008;
- magic_signed = magic & 0x0010;
- magic_typedarray = magic & 0x0020;
+ magic_ftype = magic & 0x0007U;
+ magic_bigendian = magic & 0x0008U;
+ magic_signed = magic & 0x0010U;
+ magic_typedarray = magic & 0x0020U;
DUK_UNREF(magic_signed);
- h_this = duk__require_bufobj_this(thr); /* XXX: very inefficient for plain buffers */
+ h_this = duk__require_bufobj_this(thr); /* XXX: very inefficient for plain buffers */
DUK_ASSERT(h_this != NULL);
buffer_length = h_this->length;
@@ -29356,11 +30361,11 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
if (magic_typedarray) {
no_assert = 0;
#if defined(DUK_USE_INTEGER_LE)
- endswap = !duk_to_boolean(thr, 2); /* 1=little endian */
+ endswap = !duk_to_boolean(thr, 2); /* 1=little endian */
#else
- endswap = duk_to_boolean(thr, 2); /* 1=little endian */
+ endswap = duk_to_boolean(thr, 2); /* 1=little endian */
#endif
- duk_swap(thr, 0, 1); /* offset/value order different from Node.js */
+ duk_swap(thr, 0, 1); /* offset/value order different from Node.js */
} else {
no_assert = duk_to_boolean(thr, (magic_ftype == DUK__FLD_VARINT) ? 3 : 2);
#if defined(DUK_USE_INTEGER_LE)
@@ -29381,7 +30386,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
* (offset + nbytes) even when write fails due to invalid offset.
*/
if (magic_ftype != DUK__FLD_VARINT) {
- DUK_ASSERT(magic_ftype >= 0 && magic_ftype < (duk_small_int_t) (sizeof(duk__buffer_nbytes_from_fldtype) / sizeof(duk_uint8_t)));
+ DUK_ASSERT(magic_ftype < (duk_small_uint_t) (sizeof(duk__buffer_nbytes_from_fldtype) / sizeof(duk_uint8_t)));
nbytes = duk__buffer_nbytes_from_fldtype[magic_ftype];
} else {
nbytes = duk_get_int(thr, 2);
@@ -29398,10 +30403,16 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("writefield, value=%!T, buffer_length=%ld, offset=%ld, no_assert=%d, "
"magic=%04x, magic_fieldtype=%d, magic_bigendian=%d, magic_signed=%d, "
- "endswap=%d",
- duk_get_tval(thr, 0), (long) buffer_length, (long) offset, (int) no_assert,
- (unsigned int) magic, (int) magic_ftype, (int) (magic_bigendian >> 3),
- (int) (magic_signed >> 4), (int) endswap));
+ "endswap=%u",
+ duk_get_tval(thr, 0),
+ (long) buffer_length,
+ (long) offset,
+ (int) no_assert,
+ (unsigned int) magic,
+ (int) magic_ftype,
+ (int) (magic_bigendian >> 3),
+ (int) (magic_signed >> 4),
+ (int) endswap));
/* Coerce value to a number before computing check_length, so that
* the field type specific coercion below can't have side effects
@@ -29414,8 +30425,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
* potentially invalidated by any side effect.
*/
check_length = DUK_HBUFOBJ_CLAMP_BYTELENGTH(h_this, buffer_length);
- DUK_DDD(DUK_DDDPRINT("buffer_length=%ld, check_length=%ld",
- (long) buffer_length, (long) check_length));
+ DUK_DDD(DUK_DDDPRINT("buffer_length=%ld, check_length=%ld", (long) buffer_length, (long) check_length));
if (h_this->buf) {
buf = DUK_HBUFOBJ_GET_SLICE_BASE(thr->heap, h_this);
@@ -29518,12 +30528,12 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
if (magic_bigendian) {
/* Write in big endian */
- i = field_bytelen; /* one i_step added at top of loop */
+ i = field_bytelen; /* one i_step added at top of loop */
i_step = -1;
i_end = 0;
} else {
/* Write in little endian */
- i = -1; /* one i_step added at top of loop */
+ i = -1; /* one i_step added at top of loop */
i_step = 1;
i_end = field_bytelen - 1;
}
@@ -29541,7 +30551,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
i += i_step;
DUK_ASSERT(i >= 0 && i < field_bytelen);
p[i] = (duk_uint8_t) (tmp & 0xff);
- tmp = tmp >> 8; /* unnecessary shift for last byte */
+ tmp = tmp >> 8; /* unnecessary shift for last byte */
} while (i != i_end);
#else
tmp = duk_to_number(thr, 0);
@@ -29551,12 +30561,12 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
tmp = DUK_FLOOR(tmp);
DUK_ASSERT(i >= 0 && i < field_bytelen);
p[i] = (duk_uint8_t) (DUK_FMOD(tmp, 256.0));
- tmp = tmp / 256.0; /* unnecessary div for last byte */
+ tmp = tmp / 256.0; /* unnecessary div for last byte */
} while (i != i_end);
#endif
break;
}
- default: { /* should never happen but default here */
+ default: { /* should never happen but default here */
goto fail_bounds;
}
}
@@ -29573,9 +30583,9 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
duk_push_uint(thr, offset + (duk_uint_t) nbytes);
return 1;
- fail_neutered:
- fail_field_length:
- fail_bounds:
+fail_neutered:
+fail_field_length:
+fail_bounds:
if (no_assert) {
/* Node.js return value for failed writes is offset + #bytes
* that would have been written.
@@ -29591,7 +30601,7 @@ DUK_INTERNAL duk_ret_t duk_bi_buffer_writefield(duk_hthread *thr) {
}
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* Accessors for .buffer, .byteLength, .byteOffset
@@ -29602,9 +30612,8 @@ DUK_LOCAL duk_hbufobj *duk__autospawn_arraybuffer(duk_hthread *thr, duk_hbuffer
duk_hbufobj *h_res;
h_res = duk_push_bufobj_raw(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_BUFOBJ |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAYBUFFER),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_BUFOBJ |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARRAYBUFFER),
DUK_BIDX_ARRAYBUFFER_PROTOTYPE);
DUK_ASSERT(h_res != NULL);
DUK_UNREF(h_res);
@@ -29644,13 +30653,13 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_buffer_getter(duk_hthread *thr) {
* matches view[0].
*/
h_arrbuf->offset = 0;
- DUK_ASSERT(h_bufobj->offset + h_bufobj->length >= h_bufobj->offset); /* Wrap check on creation. */
+ DUK_ASSERT(h_bufobj->offset + h_bufobj->length >= h_bufobj->offset); /* Wrap check on creation. */
h_arrbuf->length = h_bufobj->offset + h_bufobj->length;
DUK_ASSERT(h_arrbuf->buf_prop == NULL);
DUK_ASSERT(h_bufobj->buf_prop == NULL);
h_bufobj->buf_prop = (duk_hobject *) h_arrbuf;
- DUK_HBUFOBJ_INCREF(thr, h_arrbuf); /* Now reachable and accounted for. */
+ DUK_HBUFOBJ_INCREF(thr, h_arrbuf); /* Now reachable and accounted for. */
}
/* Left on stack; pushed for the second time below (OK). */
@@ -29688,7 +30697,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_bytelength_getter(duk_hthread *thr) {
duk_hbuffer *h_buf;
h_buf = (duk_hbuffer *) h_bufobj;
- DUK_ASSERT(DUK_HBUFFER_GET_SIZE(h_buf) <= DUK_UINT_MAX); /* Buffer limits. */
+ DUK_ASSERT(DUK_HBUFFER_GET_SIZE(h_buf) <= DUK_UINT_MAX); /* Buffer limits. */
duk_push_uint(thr, (duk_uint_t) DUK_HBUFFER_GET_SIZE(h_buf));
} else {
/* If neutered must return 0; length is zeroed during
@@ -29698,7 +30707,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_bytelength_getter(duk_hthread *thr) {
}
return 1;
}
-#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#else /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* No .buffer getter without ArrayBuffer support. */
#if 0
DUK_INTERNAL duk_ret_t duk_bi_typedarray_buffer_getter(duk_hthread *thr) {
@@ -29720,7 +30729,7 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_bytelength_getter(duk_hthread *thr) {
duk_push_uint(thr, DUK_HBUFFER_GET_SIZE(h_buf));
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* automatic undefs */
#undef DUK__BUFOBJ_FLAG_PROMOTE
@@ -29735,6 +30744,1929 @@ DUK_INTERNAL duk_ret_t duk_bi_typedarray_bytelength_getter(duk_hthread *thr) {
#undef DUK__FLD_TYPEDARRAY
#undef DUK__FLD_VARINT
/*
+ * CBOR bindings.
+ *
+ * http://cbor.io/
+ * https://tools.ietf.org/html/rfc7049
+ */
+
+/* #include duk_internal.h -> already included */
+
+#if defined(DUK_USE_CBOR_SUPPORT)
+
+/* #define DUK_CBOR_STRESS */
+
+/* Default behavior for encoding strings: use CBOR text string if string
+ * is UTF-8 compatible, otherwise use CBOR byte string. These defines
+ * can be used to force either type for all strings. Using text strings
+ * for non-UTF-8 data is technically invalid CBOR.
+ */
+/* #define DUK_CBOR_TEXT_STRINGS */
+/* #define DUK_CBOR_BYTE_STRINGS */
+
+/* Misc. defines. */
+/* #define DUK_CBOR_PREFER_SIZE */
+/* #define DUK_CBOR_DOUBLE_AS_IS */
+/* #define DUK_CBOR_DECODE_FASTPATH */
+
+typedef struct {
+ duk_hthread *thr;
+ duk_uint8_t *ptr;
+ duk_uint8_t *buf;
+ duk_uint8_t *buf_end;
+ duk_size_t len;
+ duk_idx_t idx_buf;
+ duk_uint_t recursion_depth;
+ duk_uint_t recursion_limit;
+} duk_cbor_encode_context;
+
+typedef struct {
+ duk_hthread *thr;
+ const duk_uint8_t *buf;
+ duk_size_t off;
+ duk_size_t len;
+ duk_uint_t recursion_depth;
+ duk_uint_t recursion_limit;
+} duk_cbor_decode_context;
+
+DUK_LOCAL void duk__cbor_encode_value(duk_cbor_encode_context *enc_ctx);
+DUK_LOCAL void duk__cbor_decode_value(duk_cbor_decode_context *dec_ctx);
+
+/*
+ * Misc
+ */
+
+DUK_LOCAL duk_uint32_t duk__cbor_double_to_uint32(double d) {
+ /* Out of range casts are undefined behavior, so caller must avoid. */
+ DUK_ASSERT(d >= 0.0 && d <= 4294967295.0);
+ return (duk_uint32_t) d;
+}
+
+/*
+ * Encoding
+ */
+
+DUK_LOCAL void duk__cbor_encode_error(duk_cbor_encode_context *enc_ctx) {
+ (void) duk_type_error(enc_ctx->thr, "cbor encode error");
+}
+
+DUK_LOCAL void duk__cbor_encode_req_stack(duk_cbor_encode_context *enc_ctx) {
+ duk_require_stack(enc_ctx->thr, 4);
+}
+
+DUK_LOCAL void duk__cbor_encode_objarr_entry(duk_cbor_encode_context *enc_ctx) {
+ duk_hthread *thr = enc_ctx->thr;
+
+ /* Native stack check in object/array recursion. */
+ duk_native_stack_check(thr);
+
+ /* When working with deeply recursive structures, this is important
+ * to ensure there's no effective depth limit.
+ */
+ duk__cbor_encode_req_stack(enc_ctx);
+
+ DUK_ASSERT(enc_ctx->recursion_depth <= enc_ctx->recursion_limit);
+ if (enc_ctx->recursion_depth >= enc_ctx->recursion_limit) {
+ DUK_ERROR_RANGE(thr, DUK_STR_ENC_RECLIMIT);
+ DUK_WO_NORETURN(return;);
+ }
+ enc_ctx->recursion_depth++;
+}
+
+DUK_LOCAL void duk__cbor_encode_objarr_exit(duk_cbor_encode_context *enc_ctx) {
+ DUK_ASSERT(enc_ctx->recursion_depth > 0);
+ enc_ctx->recursion_depth--;
+}
+
+/* Check that a size_t is in uint32 range to avoid out-of-range casts. */
+DUK_LOCAL void duk__cbor_encode_sizet_uint32_check(duk_cbor_encode_context *enc_ctx, duk_size_t len) {
+ if (DUK_UNLIKELY(sizeof(duk_size_t) > sizeof(duk_uint32_t) && len > (duk_size_t) DUK_UINT32_MAX)) {
+ duk__cbor_encode_error(enc_ctx);
+ }
+}
+
+DUK_LOCAL DUK_NOINLINE void duk__cbor_encode_ensure_slowpath(duk_cbor_encode_context *enc_ctx, duk_size_t len) {
+ duk_size_t oldlen;
+ duk_size_t minlen;
+ duk_size_t newlen;
+ duk_uint8_t *p_new;
+ duk_size_t old_data_len;
+
+ DUK_ASSERT(enc_ctx->ptr >= enc_ctx->buf);
+ DUK_ASSERT(enc_ctx->buf_end >= enc_ctx->ptr);
+ DUK_ASSERT(enc_ctx->buf_end >= enc_ctx->buf);
+
+ /* Overflow check.
+ *
+ * Limit example: 0xffffffffUL / 2U = 0x7fffffffUL, we reject >= 0x80000000UL.
+ */
+ oldlen = enc_ctx->len;
+ minlen = oldlen + len;
+ if (DUK_UNLIKELY(oldlen > DUK_SIZE_MAX / 2U || minlen < oldlen)) {
+ duk__cbor_encode_error(enc_ctx);
+ }
+
+#if defined(DUK_CBOR_STRESS)
+ newlen = oldlen + 1U;
+#else
+ newlen = oldlen * 2U;
+#endif
+ DUK_ASSERT(newlen >= oldlen);
+
+ if (minlen > newlen) {
+ newlen = minlen;
+ }
+ DUK_ASSERT(newlen >= oldlen);
+ DUK_ASSERT(newlen >= minlen);
+ DUK_ASSERT(newlen > 0U);
+
+ DUK_DD(DUK_DDPRINT("cbor encode buffer resized to %ld", (long) newlen));
+
+ p_new = (duk_uint8_t *) duk_resize_buffer(enc_ctx->thr, enc_ctx->idx_buf, newlen);
+ DUK_ASSERT(p_new != NULL);
+ old_data_len = (duk_size_t) (enc_ctx->ptr - enc_ctx->buf);
+ enc_ctx->buf = p_new;
+ enc_ctx->buf_end = p_new + newlen;
+ enc_ctx->ptr = p_new + old_data_len;
+ enc_ctx->len = newlen;
+}
+
+DUK_LOCAL DUK_INLINE void duk__cbor_encode_ensure(duk_cbor_encode_context *enc_ctx, duk_size_t len) {
+ if (DUK_LIKELY((duk_size_t) (enc_ctx->buf_end - enc_ctx->ptr) >= len)) {
+ return;
+ }
+ duk__cbor_encode_ensure_slowpath(enc_ctx, len);
+}
+
+DUK_LOCAL duk_size_t duk__cbor_get_reserve(duk_cbor_encode_context *enc_ctx) {
+ DUK_ASSERT(enc_ctx->ptr >= enc_ctx->buf);
+ DUK_ASSERT(enc_ctx->ptr <= enc_ctx->buf_end);
+ return (duk_size_t) (enc_ctx->buf_end - enc_ctx->ptr);
+}
+
+DUK_LOCAL void duk__cbor_encode_uint32(duk_cbor_encode_context *enc_ctx, duk_uint32_t u, duk_uint8_t base) {
+ duk_uint8_t *p;
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 4);
+
+ p = enc_ctx->ptr;
+ if (DUK_LIKELY(u <= 23U)) {
+ *p++ = (duk_uint8_t) (base + (duk_uint8_t) u);
+ } else if (u <= 0xffUL) {
+ *p++ = base + 0x18U;
+ *p++ = (duk_uint8_t) u;
+ } else if (u <= 0xffffUL) {
+ *p++ = base + 0x19U;
+ DUK_RAW_WRITEINC_U16_BE(p, (duk_uint16_t) u);
+ } else {
+ *p++ = base + 0x1aU;
+ DUK_RAW_WRITEINC_U32_BE(p, u);
+ }
+ enc_ctx->ptr = p;
+}
+
+#if defined(DUK_CBOR_DOUBLE_AS_IS)
+DUK_LOCAL void duk__cbor_encode_double(duk_cbor_encode_context *enc_ctx, double d) {
+ duk_uint8_t *p;
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ p = enc_ctx->ptr;
+ *p++ = 0xfbU;
+ DUK_RAW_WRITEINC_DOUBLE_BE(p, d);
+ p += 8;
+ enc_ctx->ptr = p;
+}
+#else /* DUK_CBOR_DOUBLE_AS_IS */
+DUK_LOCAL void duk__cbor_encode_double_fp(duk_cbor_encode_context *enc_ctx, double d) {
+ duk_double_union u;
+ duk_uint16_t u16;
+ duk_int16_t expt;
+ duk_uint8_t *p;
+
+ DUK_ASSERT(DUK_FPCLASSIFY(d) != DUK_FP_ZERO);
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ /* Organize into little endian (no-op if platform is little endian). */
+ u.d = d;
+ duk_dblunion_host_to_little(&u);
+
+ /* Check if 'd' can represented as a normal half-float.
+ * Denormal half-floats could also be used, but that check
+ * isn't done now (denormal half-floats are decoded of course).
+ * So just check exponent range and that at most 10 significant
+ * bits (excluding implicit leading 1) are used in 'd'.
+ */
+ u16 = (((duk_uint16_t) u.uc[7]) << 8) | ((duk_uint16_t) u.uc[6]);
+ expt = (duk_int16_t) ((u16 & 0x7ff0U) >> 4) - 1023;
+
+ if (expt >= -14 && expt <= 15) {
+ /* Half-float normal exponents (excl. denormals).
+ *
+ * 7 6 5 4 3 2 1 0 (LE index)
+ * double: seeeeeee eeeemmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+ * half: seeeee mmmm mmmmmm00 00000000 00000000 00000000 00000000 00000000
+ */
+ duk_bool_t use_half_float;
+
+ use_half_float =
+ (u.uc[0] == 0 && u.uc[1] == 0 && u.uc[2] == 0 && u.uc[3] == 0 && u.uc[4] == 0 && (u.uc[5] & 0x03U) == 0);
+
+ if (use_half_float) {
+ duk_uint32_t t;
+
+ expt += 15;
+ t = (duk_uint32_t) (u.uc[7] & 0x80U) << 8;
+ t += (duk_uint32_t) expt << 10;
+ t += ((duk_uint32_t) u.uc[6] & 0x0fU) << 6;
+ t += ((duk_uint32_t) u.uc[5]) >> 2;
+
+ /* seeeeemm mmmmmmmm */
+ p = enc_ctx->ptr;
+ *p++ = 0xf9U;
+ DUK_RAW_WRITEINC_U16_BE(p, (duk_uint16_t) t);
+ enc_ctx->ptr = p;
+ return;
+ }
+ }
+
+ /* Same check for plain float. Also no denormal support here. */
+ if (expt >= -126 && expt <= 127) {
+ /* Float normal exponents (excl. denormals).
+ *
+ * double: seeeeeee eeeemmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+ * float: seeee eeeemmmm mmmmmmmm mmmmmmmm mmm00000 00000000 00000000 00000000
+ */
+ duk_bool_t use_float;
+ duk_float_t d_float;
+
+ /* We could do this explicit mantissa check, but doing
+ * a double-float-double cast is fine because we've
+ * already verified that the exponent is in range so
+ * that the narrower cast is not undefined behavior.
+ */
+#if 0
+ use_float =
+ (u.uc[0] == 0 && u.uc[1] == 0 && u.uc[2] == 0 && (u.uc[3] & 0xe0U) == 0);
+#endif
+ d_float = (duk_float_t) d;
+ use_float = duk_double_equals((duk_double_t) d_float, d);
+ if (use_float) {
+ p = enc_ctx->ptr;
+ *p++ = 0xfaU;
+ DUK_RAW_WRITEINC_FLOAT_BE(p, d_float);
+ enc_ctx->ptr = p;
+ return;
+ }
+ }
+
+ /* Special handling for NaN and Inf which we want to encode as
+ * half-floats. They share the same (maximum) exponent.
+ */
+ if (expt == 1024) {
+ DUK_ASSERT(DUK_ISNAN(d) || DUK_ISINF(d));
+ p = enc_ctx->ptr;
+ *p++ = 0xf9U;
+ if (DUK_ISNAN(d)) {
+ /* Shortest NaN encoding is using a half-float. Lose the
+ * exact NaN bits in the process. IEEE double would be
+ * 7ff8 0000 0000 0000, i.e. a quiet NaN in most architectures
+ * (https://en.wikipedia.org/wiki/NaN#Encoding). The
+ * equivalent half float is 7e00.
+ */
+ *p++ = 0x7eU;
+ } else {
+ /* Shortest +/- Infinity encoding is using a half-float. */
+ if (DUK_SIGNBIT(d)) {
+ *p++ = 0xfcU;
+ } else {
+ *p++ = 0x7cU;
+ }
+ }
+ *p++ = 0x00U;
+ enc_ctx->ptr = p;
+ return;
+ }
+
+ /* Cannot use half-float or float, encode as full IEEE double. */
+ p = enc_ctx->ptr;
+ *p++ = 0xfbU;
+ DUK_RAW_WRITEINC_DOUBLE_BE(p, d);
+ enc_ctx->ptr = p;
+}
+
+DUK_LOCAL void duk__cbor_encode_double(duk_cbor_encode_context *enc_ctx, double d) {
+ duk_uint8_t *p;
+ double d_floor;
+
+ /* Integers and floating point values of all types are conceptually
+ * equivalent in CBOR. Try to always choose the shortest encoding
+ * which is not always immediately obvious. For example, NaN and Inf
+ * can be most compactly represented as a half-float (assuming NaN
+ * bits are not preserved), and 0x1'0000'0000 as a single precision
+ * float. Shortest forms in preference order (prefer integer over
+ * float when equal length):
+ *
+ * uint 1 byte [0,23] (not -0)
+ * sint 1 byte [-24,-1]
+ * uint+1 2 bytes [24,255]
+ * sint+1 2 bytes [-256,-25]
+ * uint+2 3 bytes [256,65535]
+ * sint+2 3 bytes [-65536,-257]
+ * half-float 3 bytes -0, NaN, +/- Infinity, range [-65504,65504]
+ * uint+4 5 bytes [65536,4294967295]
+ * sint+4 5 bytes [-4294967296,-258]
+ * float 5 bytes range [-(1 - 2^(-24)) * 2^128, (1 - 2^(-24)) * 2^128]
+ * uint+8 9 bytes [4294967296,18446744073709551615]
+ * sint+8 9 bytes [-18446744073709551616,-4294967297]
+ * double 9 bytes
+ *
+ * For whole numbers (compatible with integers):
+ * - 1-byte or 2-byte uint/sint representation is preferred for
+ * [-256,255].
+ * - 3-byte uint/sint is preferred for [-65536,65535]. Half floats
+ * are never preferred because they have the same length.
+ * - 5-byte uint/sint is preferred for [-4294967296,4294967295].
+ * Single precision floats are never preferred, and half-floats
+ * don't reach above the 3-byte uint/sint range so they're never
+ * preferred.
+ * - So, for all integers up to signed/unsigned 32-bit range the
+ * preferred encoding is always an integer uint/sint.
+ * - For integers above 32 bits the situation is more complicated.
+ * Half-floats are never useful for them because of their limited
+ * range, but IEEE single precision floats (5 bytes encoded) can
+ * represent some integers between the 32-bit and 64-bit ranges
+ * which require 9 bytes as a uint/sint.
+ *
+ * For floating point values not compatible with integers, the
+ * preferred encoding is quite clear:
+ * - For +Inf/-Inf use half-float.
+ * - For NaN use a half-float, assuming NaN bits ("payload") is
+ * not worth preserving. Duktape doesn't in general guarantee
+ * preservation of the NaN payload so using a half-float seems
+ * consistent with that.
+ * - For remaining values, prefer the shortest form which doesn't
+ * lose any precision. For normal half-floats and single precision
+ * floats this is simple: just check exponent and mantissa bits
+ * using a fixed mask. For denormal half-floats and single
+ * precision floats the check is a bit more complicated: a normal
+ * IEEE double can sometimes be represented as a denormal
+ * half-float or single precision float.
+ *
+ * https://en.wikipedia.org/wiki/Half-precision_floating-point_format#IEEE_754_half-precision_binary_floating-point_format:_binary16
+ */
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ /* Most important path is integers. The floor() test will be true
+ * for Inf too (but not NaN).
+ */
+ d_floor = DUK_FLOOR(d); /* identity if d is +/- 0.0, NaN, or +/- Infinity */
+ if (DUK_LIKELY(duk_double_equals(d_floor, d) != 0)) {
+ DUK_ASSERT(!DUK_ISNAN(d)); /* NaN == NaN compares false. */
+ if (DUK_SIGNBIT(d)) {
+ if (d >= -4294967296.0) {
+ d = -1.0 - d;
+ if (d >= 0.0) {
+ DUK_ASSERT(d >= 0.0);
+ duk__cbor_encode_uint32(enc_ctx, duk__cbor_double_to_uint32(d), 0x20U);
+ return;
+ }
+
+ /* Input was negative zero, d == -1.0 < 0.0.
+ * Shortest -0 is using half-float.
+ */
+ p = enc_ctx->ptr;
+ *p++ = 0xf9U;
+ *p++ = 0x80U;
+ *p++ = 0x00U;
+ enc_ctx->ptr = p;
+ return;
+ }
+ } else {
+ if (d <= 4294967295.0) {
+ /* Positive zero needs no special handling. */
+ DUK_ASSERT(d >= 0.0);
+ duk__cbor_encode_uint32(enc_ctx, duk__cbor_double_to_uint32(d), 0x00U);
+ return;
+ }
+ }
+ }
+
+ /* 64-bit integers are not supported at present. So
+ * we also don't need to deal with choosing between a
+ * 64-bit uint/sint representation vs. IEEE double or
+ * float.
+ */
+
+ DUK_ASSERT(DUK_FPCLASSIFY(d) != DUK_FP_ZERO);
+ duk__cbor_encode_double_fp(enc_ctx, d);
+}
+#endif /* DUK_CBOR_DOUBLE_AS_IS */
+
+DUK_LOCAL void duk__cbor_encode_string_top(duk_cbor_encode_context *enc_ctx) {
+ const duk_uint8_t *str;
+ duk_size_t len;
+ duk_uint8_t *p;
+
+ /* CBOR differentiates between UTF-8 text strings and byte strings.
+ * Text strings MUST be valid UTF-8, so not all Duktape strings can
+ * be encoded as valid CBOR text strings. Possible behaviors:
+ *
+ * 1. Use text string when input is valid UTF-8, otherwise use
+ * byte string (maybe tagged to indicate it was an extended
+ * UTF-8 string).
+ * 2. Always use text strings, but sanitize input string so that
+ * invalid UTF-8 is replaced with U+FFFD for example. Combine
+ * surrogates whenever possible.
+ * 3. Always use byte strings. This is simple and produces valid
+ * CBOR, but isn't ideal for interoperability.
+ * 4. Always use text strings, even for invalid UTF-8 such as
+ * codepoints in the surrogate pair range. This is simple but
+ * produces technically invalid CBOR for non-UTF-8 strings which
+ * may affect interoperability.
+ *
+ * Current default is 1; can be changed with defines.
+ */
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ str = (const duk_uint8_t *) duk_require_lstring(enc_ctx->thr, -1, &len);
+ if (duk_is_symbol(enc_ctx->thr, -1)) {
+ /* Symbols, encode as an empty table for now. This matches
+ * the behavior of cbor-js.
+ *
+ * XXX: Maybe encode String() coercion with a tag?
+ * XXX: Option to keep enough information to recover
+ * Symbols when decoding (this is not always desirable).
+ */
+ p = enc_ctx->ptr;
+ *p++ = 0xa0U;
+ enc_ctx->ptr = p;
+ return;
+ }
+
+ duk__cbor_encode_sizet_uint32_check(enc_ctx, len);
+#if defined(DUK_CBOR_TEXT_STRINGS)
+ duk__cbor_encode_uint32(enc_ctx, (duk_uint32_t) len, 0x60U);
+#elif defined(DUK_CBOR_BYTE_STRINGS)
+ duk__cbor_encode_uint32(enc_ctx, (duk_uint32_t) len, 0x40U);
+#else
+ duk__cbor_encode_uint32(enc_ctx,
+ (duk_uint32_t) len,
+ (DUK_LIKELY(duk_unicode_is_utf8_compatible(str, len) != 0) ? 0x60U : 0x40U));
+#endif
+ duk__cbor_encode_ensure(enc_ctx, len);
+ p = enc_ctx->ptr;
+ duk_memcpy((void *) p, (const void *) str, len);
+ p += len;
+ enc_ctx->ptr = p;
+}
+
+DUK_LOCAL void duk__cbor_encode_object(duk_cbor_encode_context *enc_ctx) {
+ duk_uint8_t *buf;
+ duk_size_t len;
+ duk_uint8_t *p;
+ duk_size_t i;
+ duk_size_t off_ib;
+ duk_uint32_t count;
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ duk__cbor_encode_objarr_entry(enc_ctx);
+
+ /* XXX: Support for specific built-ins like Date and RegExp. */
+ if (duk_is_array(enc_ctx->thr, -1)) {
+ /* Shortest encoding for arrays >= 256 in length is actually
+ * the indefinite length one (3 or more bytes vs. 2 bytes).
+ * We still use the definite length version because it is
+ * more decoding friendly.
+ */
+ len = duk_get_length(enc_ctx->thr, -1);
+ duk__cbor_encode_sizet_uint32_check(enc_ctx, len);
+ duk__cbor_encode_uint32(enc_ctx, (duk_uint32_t) len, 0x80U);
+ for (i = 0; i < len; i++) {
+ duk_get_prop_index(enc_ctx->thr, -1, (duk_uarridx_t) i);
+ duk__cbor_encode_value(enc_ctx);
+ }
+ } else if (duk_is_buffer_data(enc_ctx->thr, -1)) {
+ /* XXX: Tag buffer data?
+ * XXX: Encode typed arrays as integer arrays rather
+ * than buffer data as is?
+ */
+ buf = (duk_uint8_t *) duk_require_buffer_data(enc_ctx->thr, -1, &len);
+ duk__cbor_encode_sizet_uint32_check(enc_ctx, len);
+ duk__cbor_encode_uint32(enc_ctx, (duk_uint32_t) len, 0x40U);
+ duk__cbor_encode_ensure(enc_ctx, len);
+ p = enc_ctx->ptr;
+ duk_memcpy_unsafe((void *) p, (const void *) buf, len);
+ p += len;
+ enc_ctx->ptr = p;
+ } else {
+ /* We don't know the number of properties in advance
+ * but would still like to encode at least small
+ * objects without indefinite length. Emit an
+ * indefinite length byte initially, and if the final
+ * property count is small enough to also fit in one
+ * byte, backpatch it later. Otherwise keep the
+ * indefinite length. This works well up to 23
+ * properties which is practical and good enough.
+ */
+ off_ib = (duk_size_t) (enc_ctx->ptr - enc_ctx->buf); /* XXX: get_offset? */
+ count = 0U;
+ p = enc_ctx->ptr;
+ *p++ = 0xa0U + 0x1fU; /* indefinite length */
+ enc_ctx->ptr = p;
+ duk_enum(enc_ctx->thr, -1, DUK_ENUM_OWN_PROPERTIES_ONLY);
+ while (duk_next(enc_ctx->thr, -1, 1 /*get_value*/)) {
+ duk_insert(enc_ctx->thr, -2); /* [ ... key value ] -> [ ... value key ] */
+ duk__cbor_encode_value(enc_ctx);
+ duk__cbor_encode_value(enc_ctx);
+ count++;
+ if (count == 0U) {
+ duk__cbor_encode_error(enc_ctx);
+ }
+ }
+ duk_pop(enc_ctx->thr);
+ if (count <= 0x17U) {
+ DUK_ASSERT(off_ib < enc_ctx->len);
+ enc_ctx->buf[off_ib] = 0xa0U + (duk_uint8_t) count;
+ } else {
+ duk__cbor_encode_ensure(enc_ctx, 1);
+ p = enc_ctx->ptr;
+ *p++ = 0xffU; /* break */
+ enc_ctx->ptr = p;
+ }
+ }
+
+ duk__cbor_encode_objarr_exit(enc_ctx);
+}
+
+DUK_LOCAL void duk__cbor_encode_buffer(duk_cbor_encode_context *enc_ctx) {
+ duk_uint8_t *buf;
+ duk_size_t len;
+ duk_uint8_t *p;
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ /* Tag buffer data? */
+ buf = (duk_uint8_t *) duk_require_buffer(enc_ctx->thr, -1, &len);
+ duk__cbor_encode_sizet_uint32_check(enc_ctx, len);
+ duk__cbor_encode_uint32(enc_ctx, (duk_uint32_t) len, 0x40U);
+ duk__cbor_encode_ensure(enc_ctx, len);
+ p = enc_ctx->ptr;
+ duk_memcpy_unsafe((void *) p, (const void *) buf, len);
+ p += len;
+ enc_ctx->ptr = p;
+}
+
+DUK_LOCAL void duk__cbor_encode_pointer(duk_cbor_encode_context *enc_ctx) {
+ /* Pointers (void *) are challenging to encode. They can't
+ * be relied to be even 64-bit integer compatible (there are
+ * pointer models larger than that), nor can floats encode
+ * them. They could be encoded as strings (%p format) but
+ * that's not portable. They could be encoded as direct memory
+ * representations. Recovering pointers is non-portable in any
+ * case but it would be nice to be able to detect and recover
+ * compatible pointers.
+ *
+ * For now, encode as "(%p)" string, matching JX. There doesn't
+ * seem to be an appropriate tag, so pointers don't currently
+ * survive a CBOR encode/decode roundtrip intact.
+ */
+ const char *ptr;
+
+ ptr = duk_to_string(enc_ctx->thr, -1);
+ DUK_ASSERT(ptr != NULL);
+ duk_push_sprintf(enc_ctx->thr, "(%s)", ptr);
+ duk_remove(enc_ctx->thr, -2);
+ duk__cbor_encode_string_top(enc_ctx);
+}
+
+DUK_LOCAL void duk__cbor_encode_lightfunc(duk_cbor_encode_context *enc_ctx) {
+ duk_uint8_t *p;
+
+ /* Caller must ensure space. */
+ DUK_ASSERT(duk__cbor_get_reserve(enc_ctx) >= 1 + 8);
+
+ /* For now encode as an empty object. */
+ p = enc_ctx->ptr;
+ *p++ = 0xa0U;
+ enc_ctx->ptr = p;
+}
+
+DUK_LOCAL void duk__cbor_encode_value(duk_cbor_encode_context *enc_ctx) {
+ duk_uint8_t *p;
+
+ /* Encode/decode cycle currently loses some type information.
+ * This can be improved by registering custom tags with IANA.
+ */
+
+ /* Reserve space for up to 64-bit types (1 initial byte + 8
+ * followup bytes). This allows encoding of integers, floats,
+ * string/buffer length fields, etc without separate checks
+ * in each code path.
+ */
+ duk__cbor_encode_ensure(enc_ctx, 1 + 8);
+
+ switch (duk_get_type(enc_ctx->thr, -1)) {
+ case DUK_TYPE_UNDEFINED: {
+ p = enc_ctx->ptr;
+ *p++ = 0xf7;
+ enc_ctx->ptr = p;
+ break;
+ }
+ case DUK_TYPE_NULL: {
+ p = enc_ctx->ptr;
+ *p++ = 0xf6;
+ enc_ctx->ptr = p;
+ break;
+ }
+ case DUK_TYPE_BOOLEAN: {
+ duk_uint8_t u8 = duk_get_boolean(enc_ctx->thr, -1) ? 0xf5U : 0xf4U;
+ p = enc_ctx->ptr;
+ *p++ = u8;
+ enc_ctx->ptr = p;
+ break;
+ }
+ case DUK_TYPE_NUMBER: {
+ duk__cbor_encode_double(enc_ctx, duk_get_number(enc_ctx->thr, -1));
+ break;
+ }
+ case DUK_TYPE_STRING: {
+ duk__cbor_encode_string_top(enc_ctx);
+ break;
+ }
+ case DUK_TYPE_OBJECT: {
+ duk__cbor_encode_object(enc_ctx);
+ break;
+ }
+ case DUK_TYPE_BUFFER: {
+ duk__cbor_encode_buffer(enc_ctx);
+ break;
+ }
+ case DUK_TYPE_POINTER: {
+ duk__cbor_encode_pointer(enc_ctx);
+ break;
+ }
+ case DUK_TYPE_LIGHTFUNC: {
+ duk__cbor_encode_lightfunc(enc_ctx);
+ break;
+ }
+ case DUK_TYPE_NONE:
+ default:
+ goto fail;
+ }
+
+ duk_pop(enc_ctx->thr);
+ return;
+
+fail:
+ duk__cbor_encode_error(enc_ctx);
+}
+
+/*
+ * Decoding
+ */
+
+DUK_LOCAL void duk__cbor_decode_error(duk_cbor_decode_context *dec_ctx) {
+ (void) duk_type_error(dec_ctx->thr, "cbor decode error");
+}
+
+DUK_LOCAL void duk__cbor_decode_req_stack(duk_cbor_decode_context *dec_ctx) {
+ duk_require_stack(dec_ctx->thr, 4);
+}
+
+DUK_LOCAL void duk__cbor_decode_objarr_entry(duk_cbor_decode_context *dec_ctx) {
+ duk_hthread *thr = dec_ctx->thr;
+
+ /* Native stack check in object/array recursion. */
+ duk_native_stack_check(thr);
+
+ duk__cbor_decode_req_stack(dec_ctx);
+
+ DUK_ASSERT(dec_ctx->recursion_depth <= dec_ctx->recursion_limit);
+ if (dec_ctx->recursion_depth >= dec_ctx->recursion_limit) {
+ DUK_ERROR_RANGE(thr, DUK_STR_DEC_RECLIMIT);
+ DUK_WO_NORETURN(return;);
+ }
+ dec_ctx->recursion_depth++;
+}
+
+DUK_LOCAL void duk__cbor_decode_objarr_exit(duk_cbor_decode_context *dec_ctx) {
+ DUK_ASSERT(dec_ctx->recursion_depth > 0);
+ dec_ctx->recursion_depth--;
+}
+
+DUK_LOCAL duk_uint8_t duk__cbor_decode_readbyte(duk_cbor_decode_context *dec_ctx) {
+ DUK_ASSERT(dec_ctx->off <= dec_ctx->len);
+ if (DUK_UNLIKELY(dec_ctx->len - dec_ctx->off < 1U)) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+ return dec_ctx->buf[dec_ctx->off++];
+}
+
+DUK_LOCAL duk_uint16_t duk__cbor_decode_read_u16(duk_cbor_decode_context *dec_ctx) {
+ duk_uint16_t res;
+
+ DUK_ASSERT(dec_ctx->off <= dec_ctx->len);
+ if (DUK_UNLIKELY(dec_ctx->len - dec_ctx->off < 2U)) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+ res = DUK_RAW_READ_U16_BE(dec_ctx->buf + dec_ctx->off);
+ dec_ctx->off += 2;
+ return res;
+}
+
+DUK_LOCAL duk_uint32_t duk__cbor_decode_read_u32(duk_cbor_decode_context *dec_ctx) {
+ duk_uint32_t res;
+
+ DUK_ASSERT(dec_ctx->off <= dec_ctx->len);
+ if (DUK_UNLIKELY(dec_ctx->len - dec_ctx->off < 4U)) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+ res = DUK_RAW_READ_U32_BE(dec_ctx->buf + dec_ctx->off);
+ dec_ctx->off += 4;
+ return res;
+}
+
+DUK_LOCAL duk_uint8_t duk__cbor_decode_peekbyte(duk_cbor_decode_context *dec_ctx) {
+ if (DUK_UNLIKELY(dec_ctx->off >= dec_ctx->len)) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+ return dec_ctx->buf[dec_ctx->off];
+}
+
+DUK_LOCAL void duk__cbor_decode_rewind(duk_cbor_decode_context *dec_ctx, duk_size_t len) {
+ DUK_ASSERT(len <= dec_ctx->off); /* Caller must ensure. */
+ dec_ctx->off -= len;
+}
+
+#if 0
+DUK_LOCAL void duk__cbor_decode_ensure(duk_cbor_decode_context *dec_ctx, duk_size_t len) {
+ if (dec_ctx->off + len > dec_ctx->len) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+}
+#endif
+
+DUK_LOCAL const duk_uint8_t *duk__cbor_decode_consume(duk_cbor_decode_context *dec_ctx, duk_size_t len) {
+ DUK_ASSERT(dec_ctx->off <= dec_ctx->len);
+ if (DUK_LIKELY(dec_ctx->len - dec_ctx->off >= len)) {
+ const duk_uint8_t *res = dec_ctx->buf + dec_ctx->off;
+ dec_ctx->off += len;
+ return res;
+ }
+
+ duk__cbor_decode_error(dec_ctx); /* Not enough input. */
+ return NULL;
+}
+
+DUK_LOCAL int duk__cbor_decode_checkbreak(duk_cbor_decode_context *dec_ctx) {
+ if (duk__cbor_decode_peekbyte(dec_ctx) == 0xffU) {
+ DUK_ASSERT(dec_ctx->off < dec_ctx->len);
+ dec_ctx->off++;
+#if 0
+ (void) duk__cbor_decode_readbyte(dec_ctx);
+#endif
+ return 1;
+ }
+ return 0;
+}
+
+DUK_LOCAL void duk__cbor_decode_push_aival_int(duk_cbor_decode_context *dec_ctx, duk_uint8_t ib, duk_bool_t negative) {
+ duk_uint8_t ai;
+ duk_uint32_t t, t1, t2;
+#if 0
+ duk_uint64_t t3;
+#endif
+ duk_double_t d1, d2;
+ duk_double_t d;
+
+ ai = ib & 0x1fU;
+ if (ai <= 0x17U) {
+ t = ai;
+ goto shared_exit;
+ }
+
+ switch (ai) {
+ case 0x18U: /* 1 byte */
+ t = (duk_uint32_t) duk__cbor_decode_readbyte(dec_ctx);
+ goto shared_exit;
+ case 0x19U: /* 2 byte */
+ t = (duk_uint32_t) duk__cbor_decode_read_u16(dec_ctx);
+ goto shared_exit;
+ case 0x1aU: /* 4 byte */
+ t = (duk_uint32_t) duk__cbor_decode_read_u32(dec_ctx);
+ goto shared_exit;
+ case 0x1bU: /* 8 byte */
+ /* For uint64 it's important to handle the -1.0 part before
+ * casting to double: otherwise the adjustment might be lost
+ * in the cast. Uses: -1.0 - d <=> -(d + 1.0).
+ */
+ t = (duk_uint32_t) duk__cbor_decode_read_u32(dec_ctx);
+ t2 = t;
+ t = (duk_uint32_t) duk__cbor_decode_read_u32(dec_ctx);
+ t1 = t;
+#if 0
+ t3 = (duk_uint64_t) t2 * DUK_U64_CONSTANT(0x100000000) + (duk_uint64_t) t1;
+ if (negative) {
+ if (t3 == DUK_UINT64_MAX) {
+ /* -(0xffff'ffff'ffff'ffffULL + 1) =
+ * -0x1'0000'0000'0000'0000
+ *
+ * >>> -0x10000000000000000
+ * -18446744073709551616L
+ */
+ return -18446744073709551616.0;
+ } else {
+ return -((duk_double_t) (t3 + DUK_U64_CONSTANT(1)));
+ }
+ } else {
+ return (duk_double_t) t3; /* XXX: cast helper */
+ }
+#endif
+#if 0
+ t3 = (duk_uint64_t) t2 * DUK_U64_CONSTANT(0x100000000) + (duk_uint64_t) t1;
+ if (negative) {
+ /* Simpler version: take advantage of the fact that
+ * 0xffff'ffff'ffff'ffff and 0x1'0000'0000'0000'0000
+ * both round to 0x1'0000'0000'0000'0000:
+ * > (0xffffffffffffffff).toString(16)
+ * '10000000000000000'
+ * > (0x10000000000000000).toString(16)
+ * '10000000000000000'
+ *
+ * For the DUK_UINT64_MAX case we just skip the +1
+ * increment to avoid wrapping; the result still
+ * comes out right for an IEEE double cast.
+ */
+ if (t3 != DUK_UINT64_MAX) {
+ t3++;
+ }
+ return -((duk_double_t) t3);
+ } else {
+ return (duk_double_t) t3; /* XXX: cast helper */
+ }
+#endif
+#if 1
+ /* Use two double parts, avoids dependency on 64-bit type.
+ * Avoid precision loss carefully, especially when dealing
+ * with the required +1 for negative values.
+ *
+ * No fastint check for this path at present.
+ */
+ d1 = (duk_double_t) t1; /* XXX: cast helpers */
+ d2 = (duk_double_t) t2 * 4294967296.0;
+ if (negative) {
+ d1 += 1.0;
+ }
+ d = d2 + d1;
+ if (negative) {
+ d = -d;
+ }
+#endif
+ /* XXX: a push and check for fastint API would be nice */
+ duk_push_number(dec_ctx->thr, d);
+ return;
+ }
+
+ duk__cbor_decode_error(dec_ctx);
+ return;
+
+shared_exit:
+ if (negative) {
+ /* XXX: a push and check for fastint API would be nice */
+ if ((duk_uint_t) t <= (duk_uint_t) - (DUK_INT_MIN + 1)) {
+ duk_push_int(dec_ctx->thr, -1 - ((duk_int_t) t));
+ } else {
+ duk_push_number(dec_ctx->thr, -1.0 - (duk_double_t) t);
+ }
+ } else {
+ duk_push_uint(dec_ctx->thr, (duk_uint_t) t);
+ }
+}
+
+DUK_LOCAL void duk__cbor_decode_skip_aival_int(duk_cbor_decode_context *dec_ctx, duk_uint8_t ib) {
+ const duk_int8_t skips[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 8, -1, -1, -1, -1 };
+ duk_uint8_t ai;
+ duk_int8_t skip;
+
+ ai = ib & 0x1fU;
+ skip = skips[ai];
+ if (DUK_UNLIKELY(skip < 0)) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+ duk__cbor_decode_consume(dec_ctx, (duk_size_t) skip);
+ return;
+}
+
+DUK_LOCAL duk_uint32_t duk__cbor_decode_aival_uint32(duk_cbor_decode_context *dec_ctx, duk_uint8_t ib) {
+ duk_uint8_t ai;
+ duk_uint32_t t;
+
+ ai = ib & 0x1fU;
+ if (ai <= 0x17U) {
+ return (duk_uint32_t) ai;
+ }
+
+ switch (ai) {
+ case 0x18U: /* 1 byte */
+ t = (duk_uint32_t) duk__cbor_decode_readbyte(dec_ctx);
+ return t;
+ case 0x19U: /* 2 byte */
+ t = (duk_uint32_t) duk__cbor_decode_read_u16(dec_ctx);
+ return t;
+ case 0x1aU: /* 4 byte */
+ t = (duk_uint32_t) duk__cbor_decode_read_u32(dec_ctx);
+ return t;
+ case 0x1bU: /* 8 byte */
+ t = (duk_uint32_t) duk__cbor_decode_read_u32(dec_ctx);
+ if (t != 0U) {
+ break;
+ }
+ t = (duk_uint32_t) duk__cbor_decode_read_u32(dec_ctx);
+ return t;
+ }
+
+ duk__cbor_decode_error(dec_ctx);
+ return 0U;
+}
+
+DUK_LOCAL void duk__cbor_decode_buffer(duk_cbor_decode_context *dec_ctx, duk_uint8_t expected_base) {
+ duk_uint32_t len;
+ duk_uint8_t *buf;
+ const duk_uint8_t *inp;
+ duk_uint8_t ib;
+
+ ib = duk__cbor_decode_readbyte(dec_ctx);
+ if ((ib & 0xe0U) != expected_base) {
+ duk__cbor_decode_error(dec_ctx);
+ }
+ /* Indefinite format is rejected by the following on purpose. */
+ len = duk__cbor_decode_aival_uint32(dec_ctx, ib);
+ inp = duk__cbor_decode_consume(dec_ctx, len);
+ /* XXX: duk_push_fixed_buffer_with_data() would be a nice API addition. */
+ buf = (duk_uint8_t *) duk_push_fixed_buffer(dec_ctx->thr, (duk_size_t) len);
+ duk_memcpy((void *) buf, (const void *) inp, (size_t) len);
+}
+
+DUK_LOCAL void duk__cbor_decode_join_buffers(duk_cbor_decode_context *dec_ctx, duk_idx_t count) {
+ duk_size_t total_size = 0;
+ duk_idx_t top = duk_get_top(dec_ctx->thr);
+ duk_idx_t base = top - count; /* count is >= 1 */
+ duk_idx_t idx;
+ duk_uint8_t *p = NULL;
+
+ DUK_ASSERT(count >= 1);
+ DUK_ASSERT(top >= count);
+
+ for (;;) {
+ /* First round: compute total size.
+ * Second round: copy into place.
+ */
+ for (idx = base; idx < top; idx++) {
+ duk_uint8_t *buf_data;
+ duk_size_t buf_size;
+
+ buf_data = (duk_uint8_t *) duk_require_buffer(dec_ctx->thr, idx, &buf_size);
+ if (p != NULL) {
+ duk_memcpy_unsafe((void *) p, (const void *) buf_data, buf_size);
+ p += buf_size;
+ } else {
+ total_size += buf_size;
+ if (DUK_UNLIKELY(total_size < buf_size)) { /* Wrap check. */
+ duk__cbor_decode_error(dec_ctx);
+ }
+ }
+ }
+
+ if (p != NULL) {
+ break;
+ } else {
+ p = (duk_uint8_t *) duk_push_fixed_buffer(dec_ctx->thr, total_size);
+ DUK_ASSERT(p != NULL);
+ }
+ }
+
+ duk_replace(dec_ctx->thr, base);
+ duk_pop_n(dec_ctx->thr, count - 1);
+}
+
+DUK_LOCAL void duk__cbor_decode_and_join_strbuf(duk_cbor_decode_context *dec_ctx, duk_uint8_t expected_base) {
+ duk_idx_t count = 0;
+ for (;;) {
+ if (duk__cbor_decode_checkbreak(dec_ctx)) {
+ break;
+ }
+ duk_require_stack(dec_ctx->thr, 1);
+ duk__cbor_decode_buffer(dec_ctx, expected_base);
+ count++;
+ if (DUK_UNLIKELY(count <= 0)) { /* Wrap check. */
+ duk__cbor_decode_error(dec_ctx);
+ }
+ }
+ if (count == 0) {
+ (void) duk_push_fixed_buffer(dec_ctx->thr, 0);
+ } else if (count > 1) {
+ duk__cbor_decode_join_buffers(dec_ctx, count);
+ }
+}
+
+DUK_LOCAL duk_double_t duk__cbor_decode_half_float(duk_cbor_decode_context *dec_ctx) {
+ duk_double_union u;
+ const duk_uint8_t *inp;
+ duk_int_t expt;
+ duk_uint_t u16;
+ duk_uint_t tmp;
+ duk_double_t res;
+
+ inp = duk__cbor_decode_consume(dec_ctx, 2);
+ u16 = ((duk_uint_t) inp[0] << 8) + (duk_uint_t) inp[1];
+ expt = (duk_int_t) ((u16 >> 10) & 0x1fU) - 15;
+
+ /* Reconstruct IEEE double into little endian order first, then convert
+ * to host order.
+ */
+
+ duk_memzero((void *) &u, sizeof(u));
+
+ if (expt == -15) {
+ /* Zero or denormal; but note that half float
+ * denormals become double normals.
+ */
+ if ((u16 & 0x03ffU) == 0) {
+ u.uc[7] = inp[0] & 0x80U;
+ } else {
+ /* Create denormal by first creating a double that
+ * contains the denormal bits and a leading implicit
+ * 1-bit. Then subtract away the implicit 1-bit.
+ *
+ * 0.mmmmmmmmmm * 2^-14
+ * 1.mmmmmmmmmm 0.... * 2^-14
+ * -1.0000000000 0.... * 2^-14
+ *
+ * Double exponent: -14 + 1023 = 0x3f1
+ */
+ u.uc[7] = 0x3fU;
+ u.uc[6] = 0x10U + (duk_uint8_t) ((u16 >> 6) & 0x0fU);
+ u.uc[5] = (duk_uint8_t) ((u16 << 2) & 0xffU); /* Mask is really 0xfcU */
+
+ duk_dblunion_little_to_host(&u);
+ res = u.d - 0.00006103515625; /* 2^(-14) */
+ if (u16 & 0x8000U) {
+ res = -res;
+ }
+ return res;
+ }
+ } else if (expt == 16) {
+ /* +/- Inf or NaN. */
+ if ((u16 & 0x03ffU) == 0) {
+ u.uc[7] = (inp[0] & 0x80U) + 0x7fU;
+ u.uc[6] = 0xf0U;
+ } else {
+ /* Create a 'quiet NaN' with highest
+ * bit set (there are some platforms
+ * where the NaN payload convention is
+ * the opposite). Keep sign.
+ */
+ u.uc[7] = (inp[0] & 0x80U) + 0x7fU;
+ u.uc[6] = 0xf8U;
+ }
+ } else {
+ /* Normal. */
+ tmp = (inp[0] & 0x80U) ? 0x80000000UL : 0UL;
+ tmp += (duk_uint_t) (expt + 1023) << 20;
+ tmp += (duk_uint_t) (inp[0] & 0x03U) << 18;
+ tmp += (duk_uint_t) (inp[1] & 0xffU) << 10;
+ u.uc[7] = (tmp >> 24) & 0xffU;
+ u.uc[6] = (tmp >> 16) & 0xffU;
+ u.uc[5] = (tmp >> 8) & 0xffU;
+ u.uc[4] = (tmp >> 0) & 0xffU;
+ }
+
+ duk_dblunion_little_to_host(&u);
+ return u.d;
+}
+
+DUK_LOCAL void duk__cbor_decode_string(duk_cbor_decode_context *dec_ctx, duk_uint8_t ib, duk_uint8_t ai) {
+ /* If the CBOR string data is not valid UTF-8 it is technically
+ * invalid CBOR. Possible behaviors at least:
+ *
+ * 1. Reject the input, i.e. throw TypeError.
+ *
+ * 2. Accept the input, but sanitize non-UTF-8 data into UTF-8
+ * using U+FFFD replacements. Also it might make sense to
+ * decode non-BMP codepoints into surrogates for better
+ * ECMAScript compatibility.
+ *
+ * 3. Accept the input as a Duktape string (which are not always
+ * valid UTF-8), but reject any input that would create a
+ * Symbol representation.
+ *
+ * Current behavior is 3.
+ */
+
+ if (ai == 0x1fU) {
+ duk_uint8_t *buf_data;
+ duk_size_t buf_size;
+
+ duk__cbor_decode_and_join_strbuf(dec_ctx, 0x60U);
+ buf_data = (duk_uint8_t *) duk_require_buffer(dec_ctx->thr, -1, &buf_size);
+ (void) duk_push_lstring(dec_ctx->thr, (const char *) buf_data, buf_size);
+ duk_remove(dec_ctx->thr, -2);
+ } else {
+ duk_uint32_t len;
+ const duk_uint8_t *inp;
+
+ len = duk__cbor_decode_aival_uint32(dec_ctx, ib);
+ inp = duk__cbor_decode_consume(dec_ctx, len);
+ (void) duk_push_lstring(dec_ctx->thr, (const char *) inp, (duk_size_t) len);
+ }
+ if (duk_is_symbol(dec_ctx->thr, -1)) {
+ /* Refuse to create Symbols when decoding. */
+ duk__cbor_decode_error(dec_ctx);
+ }
+
+ /* XXX: Here a Duktape API call to convert input -> utf-8 with
+ * replacements would be nice.
+ */
+}
+
+DUK_LOCAL duk_bool_t duk__cbor_decode_array(duk_cbor_decode_context *dec_ctx, duk_uint8_t ib, duk_uint8_t ai) {
+ duk_uint32_t idx, len;
+
+ duk__cbor_decode_objarr_entry(dec_ctx);
+
+ /* Support arrays up to 0xfffffffeU in length. 0xffffffff is
+ * used as an indefinite length marker.
+ */
+ if (ai == 0x1fU) {
+ len = 0xffffffffUL;
+ } else {
+ len = duk__cbor_decode_aival_uint32(dec_ctx, ib);
+ if (len == 0xffffffffUL) {
+ goto failure;
+ }
+ }
+
+ /* XXX: use bare array? */
+ duk_push_array(dec_ctx->thr);
+ for (idx = 0U;;) {
+ if (len == 0xffffffffUL && duk__cbor_decode_checkbreak(dec_ctx)) {
+ break;
+ }
+ if (idx == len) {
+ if (ai == 0x1fU) {
+ goto failure;
+ }
+ break;
+ }
+ duk__cbor_decode_value(dec_ctx);
+ duk_put_prop_index(dec_ctx->thr, -2, (duk_uarridx_t) idx);
+ idx++;
+ if (idx == 0U) {
+ goto failure; /* wrapped */
+ }
+ }
+
+#if 0
+ success:
+#endif
+ duk__cbor_decode_objarr_exit(dec_ctx);
+ return 1;
+
+failure:
+ /* No need to unwind recursion checks, caller will throw. */
+ return 0;
+}
+
+DUK_LOCAL duk_bool_t duk__cbor_decode_map(duk_cbor_decode_context *dec_ctx, duk_uint8_t ib, duk_uint8_t ai) {
+ duk_uint32_t count;
+
+ duk__cbor_decode_objarr_entry(dec_ctx);
+
+ if (ai == 0x1fU) {
+ count = 0xffffffffUL;
+ } else {
+ count = duk__cbor_decode_aival_uint32(dec_ctx, ib);
+ if (count == 0xffffffffUL) {
+ goto failure;
+ }
+ }
+
+ /* XXX: use bare object? */
+ duk_push_object(dec_ctx->thr);
+ for (;;) {
+ if (count == 0xffffffffUL) {
+ if (duk__cbor_decode_checkbreak(dec_ctx)) {
+ break;
+ }
+ } else {
+ if (count == 0UL) {
+ break;
+ }
+ count--;
+ }
+
+ /* Non-string keys are coerced to strings,
+ * possibly leading to overwriting previous
+ * keys. Last key of a certain coerced name
+ * wins. If key is an object, it will coerce
+ * to '[object Object]' which is consistent
+ * but potentially misleading. One alternative
+ * would be to skip non-string keys.
+ */
+ duk__cbor_decode_value(dec_ctx);
+ duk__cbor_decode_value(dec_ctx);
+ duk_put_prop(dec_ctx->thr, -3);
+ }
+
+#if 0
+ success:
+#endif
+ duk__cbor_decode_objarr_exit(dec_ctx);
+ return 1;
+
+failure:
+ /* No need to unwind recursion checks, caller will throw. */
+ return 0;
+}
+
+DUK_LOCAL duk_double_t duk__cbor_decode_float(duk_cbor_decode_context *dec_ctx) {
+ duk_float_union u;
+ const duk_uint8_t *inp;
+ inp = duk__cbor_decode_consume(dec_ctx, 4);
+ duk_memcpy((void *) u.uc, (const void *) inp, 4);
+ duk_fltunion_big_to_host(&u);
+ return (duk_double_t) u.f;
+}
+
+DUK_LOCAL duk_double_t duk__cbor_decode_double(duk_cbor_decode_context *dec_ctx) {
+ duk_double_union u;
+ const duk_uint8_t *inp;
+ inp = duk__cbor_decode_consume(dec_ctx, 8);
+ duk_memcpy((void *) u.uc, (const void *) inp, 8);
+ duk_dblunion_big_to_host(&u);
+ return u.d;
+}
+
+#if defined(DUK_CBOR_DECODE_FASTPATH)
+#define DUK__CBOR_AI (ib & 0x1fU)
+
+DUK_LOCAL void duk__cbor_decode_value(duk_cbor_decode_context *dec_ctx) {
+ duk_uint8_t ib;
+
+ /* Any paths potentially recursing back to duk__cbor_decode_value()
+ * must perform a Duktape value stack growth check. Avoid the check
+ * here for simple paths like primitive values.
+ */
+
+reread_initial_byte:
+ DUK_DDD(DUK_DDDPRINT("cbor decode off=%ld len=%ld", (long) dec_ctx->off, (long) dec_ctx->len));
+
+ ib = duk__cbor_decode_readbyte(dec_ctx);
+
+ /* Full initial byte switch, footprint cost over baseline is ~+1kB. */
+ /* XXX: Force full switch with no range check. */
+
+ switch (ib) {
+ case 0x00U:
+ case 0x01U:
+ case 0x02U:
+ case 0x03U:
+ case 0x04U:
+ case 0x05U:
+ case 0x06U:
+ case 0x07U:
+ case 0x08U:
+ case 0x09U:
+ case 0x0aU:
+ case 0x0bU:
+ case 0x0cU:
+ case 0x0dU:
+ case 0x0eU:
+ case 0x0fU:
+ case 0x10U:
+ case 0x11U:
+ case 0x12U:
+ case 0x13U:
+ case 0x14U:
+ case 0x15U:
+ case 0x16U:
+ case 0x17U:
+ duk_push_uint(dec_ctx->thr, ib);
+ break;
+ case 0x18U:
+ case 0x19U:
+ case 0x1aU:
+ case 0x1bU:
+ duk__cbor_decode_push_aival_int(dec_ctx, ib, 0 /*negative*/);
+ break;
+ case 0x1cU:
+ case 0x1dU:
+ case 0x1eU:
+ case 0x1fU:
+ goto format_error;
+ case 0x20U:
+ case 0x21U:
+ case 0x22U:
+ case 0x23U:
+ case 0x24U:
+ case 0x25U:
+ case 0x26U:
+ case 0x27U:
+ case 0x28U:
+ case 0x29U:
+ case 0x2aU:
+ case 0x2bU:
+ case 0x2cU:
+ case 0x2dU:
+ case 0x2eU:
+ case 0x2fU:
+ case 0x30U:
+ case 0x31U:
+ case 0x32U:
+ case 0x33U:
+ case 0x34U:
+ case 0x35U:
+ case 0x36U:
+ case 0x37U:
+ duk_push_int(dec_ctx->thr, -((duk_int_t) ((ib - 0x20U) + 1U)));
+ break;
+ case 0x38U:
+ case 0x39U:
+ case 0x3aU:
+ case 0x3bU:
+ duk__cbor_decode_push_aival_int(dec_ctx, ib, 1 /*negative*/);
+ break;
+ case 0x3cU:
+ case 0x3dU:
+ case 0x3eU:
+ case 0x3fU:
+ goto format_error;
+ case 0x40U:
+ case 0x41U:
+ case 0x42U:
+ case 0x43U:
+ case 0x44U:
+ case 0x45U:
+ case 0x46U:
+ case 0x47U:
+ case 0x48U:
+ case 0x49U:
+ case 0x4aU:
+ case 0x4bU:
+ case 0x4cU:
+ case 0x4dU:
+ case 0x4eU:
+ case 0x4fU:
+ case 0x50U:
+ case 0x51U:
+ case 0x52U:
+ case 0x53U:
+ case 0x54U:
+ case 0x55U:
+ case 0x56U:
+ case 0x57U:
+ /* XXX: Avoid rewind, we know the length already. */
+ DUK_ASSERT(dec_ctx->off > 0U);
+ dec_ctx->off--;
+ duk__cbor_decode_buffer(dec_ctx, 0x40U);
+ break;
+ case 0x58U:
+ case 0x59U:
+ case 0x5aU:
+ case 0x5bU:
+ /* XXX: Avoid rewind, decode length inline. */
+ DUK_ASSERT(dec_ctx->off > 0U);
+ dec_ctx->off--;
+ duk__cbor_decode_buffer(dec_ctx, 0x40U);
+ break;
+ case 0x5cU:
+ case 0x5dU:
+ case 0x5eU:
+ goto format_error;
+ case 0x5fU:
+ duk__cbor_decode_and_join_strbuf(dec_ctx, 0x40U);
+ break;
+ case 0x60U:
+ case 0x61U:
+ case 0x62U:
+ case 0x63U:
+ case 0x64U:
+ case 0x65U:
+ case 0x66U:
+ case 0x67U:
+ case 0x68U:
+ case 0x69U:
+ case 0x6aU:
+ case 0x6bU:
+ case 0x6cU:
+ case 0x6dU:
+ case 0x6eU:
+ case 0x6fU:
+ case 0x70U:
+ case 0x71U:
+ case 0x72U:
+ case 0x73U:
+ case 0x74U:
+ case 0x75U:
+ case 0x76U:
+ case 0x77U:
+ /* XXX: Avoid double decode of length. */
+ duk__cbor_decode_string(dec_ctx, ib, DUK__CBOR_AI);
+ break;
+ case 0x78U:
+ case 0x79U:
+ case 0x7aU:
+ case 0x7bU:
+ /* XXX: Avoid double decode of length. */
+ duk__cbor_decode_string(dec_ctx, ib, DUK__CBOR_AI);
+ break;
+ case 0x7cU:
+ case 0x7dU:
+ case 0x7eU:
+ goto format_error;
+ case 0x7fU:
+ duk__cbor_decode_string(dec_ctx, ib, DUK__CBOR_AI);
+ break;
+ case 0x80U:
+ case 0x81U:
+ case 0x82U:
+ case 0x83U:
+ case 0x84U:
+ case 0x85U:
+ case 0x86U:
+ case 0x87U:
+ case 0x88U:
+ case 0x89U:
+ case 0x8aU:
+ case 0x8bU:
+ case 0x8cU:
+ case 0x8dU:
+ case 0x8eU:
+ case 0x8fU:
+ case 0x90U:
+ case 0x91U:
+ case 0x92U:
+ case 0x93U:
+ case 0x94U:
+ case 0x95U:
+ case 0x96U:
+ case 0x97U:
+ if (DUK_UNLIKELY(duk__cbor_decode_array(dec_ctx, ib, DUK__CBOR_AI) == 0)) {
+ goto format_error;
+ }
+ break;
+ case 0x98U:
+ case 0x99U:
+ case 0x9aU:
+ case 0x9bU:
+ if (DUK_UNLIKELY(duk__cbor_decode_array(dec_ctx, ib, DUK__CBOR_AI) == 0)) {
+ goto format_error;
+ }
+ break;
+ case 0x9cU:
+ case 0x9dU:
+ case 0x9eU:
+ goto format_error;
+ case 0x9fU:
+ if (DUK_UNLIKELY(duk__cbor_decode_array(dec_ctx, ib, DUK__CBOR_AI) == 0)) {
+ goto format_error;
+ }
+ break;
+ case 0xa0U:
+ case 0xa1U:
+ case 0xa2U:
+ case 0xa3U:
+ case 0xa4U:
+ case 0xa5U:
+ case 0xa6U:
+ case 0xa7U:
+ case 0xa8U:
+ case 0xa9U:
+ case 0xaaU:
+ case 0xabU:
+ case 0xacU:
+ case 0xadU:
+ case 0xaeU:
+ case 0xafU:
+ case 0xb0U:
+ case 0xb1U:
+ case 0xb2U:
+ case 0xb3U:
+ case 0xb4U:
+ case 0xb5U:
+ case 0xb6U:
+ case 0xb7U:
+ if (DUK_UNLIKELY(duk__cbor_decode_map(dec_ctx, ib, DUK__CBOR_AI) == 0)) {
+ goto format_error;
+ }
+ break;
+ case 0xb8U:
+ case 0xb9U:
+ case 0xbaU:
+ case 0xbbU:
+ if (DUK_UNLIKELY(duk__cbor_decode_map(dec_ctx, ib, DUK__CBOR_AI) == 0)) {
+ goto format_error;
+ }
+ break;
+ case 0xbcU:
+ case 0xbdU:
+ case 0xbeU:
+ goto format_error;
+ case 0xbfU:
+ if (DUK_UNLIKELY(duk__cbor_decode_map(dec_ctx, ib, DUK__CBOR_AI) == 0)) {
+ goto format_error;
+ }
+ break;
+ case 0xc0U:
+ case 0xc1U:
+ case 0xc2U:
+ case 0xc3U:
+ case 0xc4U:
+ case 0xc5U:
+ case 0xc6U:
+ case 0xc7U:
+ case 0xc8U:
+ case 0xc9U:
+ case 0xcaU:
+ case 0xcbU:
+ case 0xccU:
+ case 0xcdU:
+ case 0xceU:
+ case 0xcfU:
+ case 0xd0U:
+ case 0xd1U:
+ case 0xd2U:
+ case 0xd3U:
+ case 0xd4U:
+ case 0xd5U:
+ case 0xd6U:
+ case 0xd7U:
+ /* Tag 0-23: drop. */
+ goto reread_initial_byte;
+ case 0xd8U:
+ case 0xd9U:
+ case 0xdaU:
+ case 0xdbU:
+ duk__cbor_decode_skip_aival_int(dec_ctx, ib);
+ goto reread_initial_byte;
+ case 0xdcU:
+ case 0xddU:
+ case 0xdeU:
+ case 0xdfU:
+ goto format_error;
+ case 0xe0U:
+ goto format_error;
+ case 0xe1U:
+ goto format_error;
+ case 0xe2U:
+ goto format_error;
+ case 0xe3U:
+ goto format_error;
+ case 0xe4U:
+ goto format_error;
+ case 0xe5U:
+ goto format_error;
+ case 0xe6U:
+ goto format_error;
+ case 0xe7U:
+ goto format_error;
+ case 0xe8U:
+ goto format_error;
+ case 0xe9U:
+ goto format_error;
+ case 0xeaU:
+ goto format_error;
+ case 0xebU:
+ goto format_error;
+ case 0xecU:
+ goto format_error;
+ case 0xedU:
+ goto format_error;
+ case 0xeeU:
+ goto format_error;
+ case 0xefU:
+ goto format_error;
+ case 0xf0U:
+ goto format_error;
+ case 0xf1U:
+ goto format_error;
+ case 0xf2U:
+ goto format_error;
+ case 0xf3U:
+ goto format_error;
+ case 0xf4U:
+ duk_push_false(dec_ctx->thr);
+ break;
+ case 0xf5U:
+ duk_push_true(dec_ctx->thr);
+ break;
+ case 0xf6U:
+ duk_push_null(dec_ctx->thr);
+ break;
+ case 0xf7U:
+ duk_push_undefined(dec_ctx->thr);
+ break;
+ case 0xf8U:
+ /* Simple value 32-255, nothing defined yet, so reject. */
+ goto format_error;
+ case 0xf9U: {
+ duk_double_t d;
+ d = duk__cbor_decode_half_float(dec_ctx);
+ duk_push_number(dec_ctx->thr, d);
+ break;
+ }
+ case 0xfaU: {
+ duk_double_t d;
+ d = duk__cbor_decode_float(dec_ctx);
+ duk_push_number(dec_ctx->thr, d);
+ break;
+ }
+ case 0xfbU: {
+ duk_double_t d;
+ d = duk__cbor_decode_double(dec_ctx);
+ duk_push_number(dec_ctx->thr, d);
+ break;
+ }
+ case 0xfcU:
+ case 0xfdU:
+ case 0xfeU:
+ case 0xffU:
+ goto format_error;
+ } /* end switch */
+
+ return;
+
+format_error:
+ duk__cbor_decode_error(dec_ctx);
+}
+#else /* DUK_CBOR_DECODE_FASTPATH */
+DUK_LOCAL void duk__cbor_decode_value(duk_cbor_decode_context *dec_ctx) {
+ duk_uint8_t ib, mt, ai;
+
+ /* Any paths potentially recursing back to duk__cbor_decode_value()
+ * must perform a Duktape value stack growth check. Avoid the check
+ * here for simple paths like primitive values.
+ */
+
+reread_initial_byte:
+ DUK_DDD(DUK_DDDPRINT("cbor decode off=%ld len=%ld", (long) dec_ctx->off, (long) dec_ctx->len));
+
+ ib = duk__cbor_decode_readbyte(dec_ctx);
+ mt = ib >> 5U;
+ ai = ib & 0x1fU;
+
+ /* Additional information in [24,27] = [0x18,0x1b] has relatively
+ * uniform handling for all major types: read 1/2/4/8 additional
+ * bytes. For major type 7 the 1-byte value is a 'simple type', and
+ * 2/4/8-byte values are floats. For other major types the 1/2/4/8
+ * byte values are integers. The lengths are uniform, but the typing
+ * is not.
+ */
+
+ switch (mt) {
+ case 0U: { /* unsigned integer */
+ duk__cbor_decode_push_aival_int(dec_ctx, ib, 0 /*negative*/);
+ break;
+ }
+ case 1U: { /* negative integer */
+ duk__cbor_decode_push_aival_int(dec_ctx, ib, 1 /*negative*/);
+ break;
+ }
+ case 2U: { /* byte string */
+ if (ai == 0x1fU) {
+ duk__cbor_decode_and_join_strbuf(dec_ctx, 0x40U);
+ } else {
+ duk__cbor_decode_rewind(dec_ctx, 1U);
+ duk__cbor_decode_buffer(dec_ctx, 0x40U);
+ }
+ break;
+ }
+ case 3U: { /* text string */
+ duk__cbor_decode_string(dec_ctx, ib, ai);
+ break;
+ }
+ case 4U: { /* array of data items */
+ if (DUK_UNLIKELY(duk__cbor_decode_array(dec_ctx, ib, ai) == 0)) {
+ goto format_error;
+ }
+ break;
+ }
+ case 5U: { /* map of pairs of data items */
+ if (DUK_UNLIKELY(duk__cbor_decode_map(dec_ctx, ib, ai) == 0)) {
+ goto format_error;
+ }
+ break;
+ }
+ case 6U: { /* semantic tagging */
+ /* Tags are ignored now, re-read initial byte. A tagged
+ * value may itself be tagged (an unlimited number of times)
+ * so keep on peeling away tags.
+ */
+ duk__cbor_decode_skip_aival_int(dec_ctx, ib);
+ goto reread_initial_byte;
+ }
+ case 7U: { /* floating point numbers, simple data types, break; other */
+ switch (ai) {
+ case 0x14U: {
+ duk_push_false(dec_ctx->thr);
+ break;
+ }
+ case 0x15U: {
+ duk_push_true(dec_ctx->thr);
+ break;
+ }
+ case 0x16U: {
+ duk_push_null(dec_ctx->thr);
+ break;
+ }
+ case 0x17U: {
+ duk_push_undefined(dec_ctx->thr);
+ break;
+ }
+ case 0x18U: { /* more simple values (1 byte) */
+ /* Simple value encoded in additional byte (none
+ * are defined so far). RFC 7049 states that the
+ * follow-up byte must be 32-255 to minimize
+ * confusion. So, a non-shortest encoding like
+ * f815 (= true, shortest encoding f5) must be
+ * rejected. cbor.me tester rejects f815, but
+ * e.g. Python CBOR binding decodes it as true.
+ */
+ goto format_error;
+ }
+ case 0x19U: { /* half-float (2 bytes) */
+ duk_double_t d;
+ d = duk__cbor_decode_half_float(dec_ctx);
+ duk_push_number(dec_ctx->thr, d);
+ break;
+ }
+ case 0x1aU: { /* float (4 bytes) */
+ duk_double_t d;
+ d = duk__cbor_decode_float(dec_ctx);
+ duk_push_number(dec_ctx->thr, d);
+ break;
+ }
+ case 0x1bU: { /* double (8 bytes) */
+ duk_double_t d;
+ d = duk__cbor_decode_double(dec_ctx);
+ duk_push_number(dec_ctx->thr, d);
+ break;
+ }
+ case 0xffU: /* unexpected break */
+ default: {
+ goto format_error;
+ }
+ } /* end switch */
+ break;
+ }
+ default: {
+ goto format_error; /* will never actually occur */
+ }
+ } /* end switch */
+
+ return;
+
+format_error:
+ duk__cbor_decode_error(dec_ctx);
+}
+#endif /* DUK_CBOR_DECODE_FASTPATH */
+
+DUK_LOCAL void duk__cbor_encode(duk_hthread *thr, duk_idx_t idx, duk_uint_t encode_flags) {
+ duk_cbor_encode_context enc_ctx;
+ duk_uint8_t *buf;
+
+ DUK_UNREF(encode_flags);
+
+ idx = duk_require_normalize_index(thr, idx);
+
+ enc_ctx.thr = thr;
+ enc_ctx.idx_buf = duk_get_top(thr);
+
+ enc_ctx.len = 64;
+ buf = (duk_uint8_t *) duk_push_dynamic_buffer(thr, enc_ctx.len);
+ enc_ctx.ptr = buf;
+ enc_ctx.buf = buf;
+ enc_ctx.buf_end = buf + enc_ctx.len;
+
+ enc_ctx.recursion_depth = 0;
+ enc_ctx.recursion_limit = DUK_USE_CBOR_ENC_RECLIMIT;
+
+ duk_dup(thr, idx);
+ duk__cbor_encode_req_stack(&enc_ctx);
+ duk__cbor_encode_value(&enc_ctx);
+ DUK_ASSERT(enc_ctx.recursion_depth == 0);
+ duk_resize_buffer(enc_ctx.thr, enc_ctx.idx_buf, (duk_size_t) (enc_ctx.ptr - enc_ctx.buf));
+ duk_replace(thr, idx);
+}
+
+DUK_LOCAL void duk__cbor_decode(duk_hthread *thr, duk_idx_t idx, duk_uint_t decode_flags) {
+ duk_cbor_decode_context dec_ctx;
+
+ DUK_UNREF(decode_flags);
+
+ /* Suppress compile warnings for functions only needed with e.g.
+ * asserts enabled.
+ */
+ DUK_UNREF(duk__cbor_get_reserve);
+
+ idx = duk_require_normalize_index(thr, idx);
+
+ dec_ctx.thr = thr;
+ dec_ctx.buf = (const duk_uint8_t *) duk_require_buffer_data(thr, idx, &dec_ctx.len);
+ dec_ctx.off = 0;
+ /* dec_ctx.len: set above */
+
+ dec_ctx.recursion_depth = 0;
+ dec_ctx.recursion_limit = DUK_USE_CBOR_DEC_RECLIMIT;
+
+ duk__cbor_decode_req_stack(&dec_ctx);
+ duk__cbor_decode_value(&dec_ctx);
+ DUK_ASSERT(dec_ctx.recursion_depth == 0);
+ if (dec_ctx.off != dec_ctx.len) {
+ (void) duk_type_error(thr, "trailing garbage");
+ }
+
+ duk_replace(thr, idx);
+}
+
+#else /* DUK_USE_CBOR_SUPPORT */
+
+DUK_LOCAL void duk__cbor_encode(duk_hthread *thr, duk_idx_t idx, duk_uint_t encode_flags) {
+ DUK_UNREF(idx);
+ DUK_UNREF(encode_flags);
+ DUK_ERROR_UNSUPPORTED(thr);
+}
+
+DUK_LOCAL void duk__cbor_decode(duk_hthread *thr, duk_idx_t idx, duk_uint_t decode_flags) {
+ DUK_UNREF(idx);
+ DUK_UNREF(decode_flags);
+ DUK_ERROR_UNSUPPORTED(thr);
+}
+
+#endif /* DUK_USE_CBOR_SUPPORT */
+
+/*
+ * Public APIs
+ */
+
+DUK_EXTERNAL void duk_cbor_encode(duk_hthread *thr, duk_idx_t idx, duk_uint_t encode_flags) {
+ DUK_ASSERT_API_ENTRY(thr);
+ duk__cbor_encode(thr, idx, encode_flags);
+}
+DUK_EXTERNAL void duk_cbor_decode(duk_hthread *thr, duk_idx_t idx, duk_uint_t decode_flags) {
+ DUK_ASSERT_API_ENTRY(thr);
+ duk__cbor_decode(thr, idx, decode_flags);
+}
+
+#if defined(DUK_USE_CBOR_BUILTIN)
+#if defined(DUK_USE_CBOR_SUPPORT)
+DUK_INTERNAL duk_ret_t duk_bi_cbor_encode(duk_hthread *thr) {
+ DUK_ASSERT_TOP(thr, 1);
+
+ duk__cbor_encode(thr, -1, 0 /*flags*/);
+
+ /* Produce an ArrayBuffer by first decoding into a plain buffer which
+ * mimics a Uint8Array and gettings its .buffer property.
+ */
+ /* XXX: shortcut */
+ (void) duk_get_prop_stridx(thr, -1, DUK_STRIDX_LC_BUFFER);
+ return 1;
+}
+
+DUK_INTERNAL duk_ret_t duk_bi_cbor_decode(duk_hthread *thr) {
+ DUK_ASSERT_TOP(thr, 1);
+
+ duk__cbor_decode(thr, -1, 0 /*flags*/);
+ return 1;
+}
+#else /* DUK_USE_CBOR_SUPPORT */
+DUK_INTERNAL duk_ret_t duk_bi_cbor_encode(duk_hthread *thr) {
+ DUK_ERROR_UNSUPPORTED(thr);
+ DUK_WO_NORETURN(return 0;);
+}
+DUK_INTERNAL duk_ret_t duk_bi_cbor_decode(duk_hthread *thr) {
+ DUK_ERROR_UNSUPPORTED(thr);
+ DUK_WO_NORETURN(return 0;);
+}
+#endif /* DUK_USE_CBOR_SUPPORT */
+#endif /* DUK_USE_CBOR_BUILTIN */
+
+/* automatic undefs */
+#undef DUK__CBOR_AI
+/*
* Date built-ins
*
* Unlike most built-ins, Date has some platform dependencies for getting
@@ -29765,30 +32697,49 @@ DUK_LOCAL_DECL duk_ret_t duk__set_this_timeval_from_dparts(duk_hthread *thr, duk
*/
/* Debug macro to print all parts and dparts (used manually because of debug level). */
-#define DUK__DPRINT_PARTS_AND_DPARTS(parts,dparts) do { \
+#define DUK__DPRINT_PARTS_AND_DPARTS(parts, dparts) \
+ do { \
DUK_D(DUK_DPRINT("parts: %ld %ld %ld %ld %ld %ld %ld %ld, dparts: %lf %lf %lf %lf %lf %lf %lf %lf", \
- (long) (parts)[0], (long) (parts)[1], \
- (long) (parts)[2], (long) (parts)[3], \
- (long) (parts)[4], (long) (parts)[5], \
- (long) (parts)[6], (long) (parts)[7], \
- (double) (dparts)[0], (double) (dparts)[1], \
- (double) (dparts)[2], (double) (dparts)[3], \
- (double) (dparts)[4], (double) (dparts)[5], \
- (double) (dparts)[6], (double) (dparts)[7])); \
+ (long) (parts)[0], \
+ (long) (parts)[1], \
+ (long) (parts)[2], \
+ (long) (parts)[3], \
+ (long) (parts)[4], \
+ (long) (parts)[5], \
+ (long) (parts)[6], \
+ (long) (parts)[7], \
+ (double) (dparts)[0], \
+ (double) (dparts)[1], \
+ (double) (dparts)[2], \
+ (double) (dparts)[3], \
+ (double) (dparts)[4], \
+ (double) (dparts)[5], \
+ (double) (dparts)[6], \
+ (double) (dparts)[7])); \
} while (0)
-#define DUK__DPRINT_PARTS(parts) do { \
+#define DUK__DPRINT_PARTS(parts) \
+ do { \
DUK_D(DUK_DPRINT("parts: %ld %ld %ld %ld %ld %ld %ld %ld", \
- (long) (parts)[0], (long) (parts)[1], \
- (long) (parts)[2], (long) (parts)[3], \
- (long) (parts)[4], (long) (parts)[5], \
- (long) (parts)[6], (long) (parts)[7])); \
+ (long) (parts)[0], \
+ (long) (parts)[1], \
+ (long) (parts)[2], \
+ (long) (parts)[3], \
+ (long) (parts)[4], \
+ (long) (parts)[5], \
+ (long) (parts)[6], \
+ (long) (parts)[7])); \
} while (0)
-#define DUK__DPRINT_DPARTS(dparts) do { \
+#define DUK__DPRINT_DPARTS(dparts) \
+ do { \
DUK_D(DUK_DPRINT("dparts: %lf %lf %lf %lf %lf %lf %lf %lf", \
- (double) (dparts)[0], (double) (dparts)[1], \
- (double) (dparts)[2], (double) (dparts)[3], \
- (double) (dparts)[4], (double) (dparts)[5], \
- (double) (dparts)[6], (double) (dparts)[7])); \
+ (double) (dparts)[0], \
+ (double) (dparts)[1], \
+ (double) (dparts)[2], \
+ (double) (dparts)[3], \
+ (double) (dparts)[4], \
+ (double) (dparts)[5], \
+ (double) (dparts)[6], \
+ (double) (dparts)[7])); \
} while (0)
/* Equivalent year for DST calculations outside [1970,2038[ range, see
@@ -29796,7 +32747,7 @@ DUK_LOCAL_DECL duk_ret_t duk__set_this_timeval_from_dparts(duk_hthread *thr, duk
* starts with the same weekday on Jan 1.
* https://bugzilla.mozilla.org/show_bug.cgi?id=351066
*/
-#define DUK__YEAR(x) ((duk_uint8_t) ((x) - 1970))
+#define DUK__YEAR(x) ((duk_uint8_t) ((x) -1970))
DUK_LOCAL duk_uint8_t duk__date_equivyear[14] = {
#if 1
/* This is based on V8 EquivalentYear() algorithm (see util/genequivyear.py):
@@ -29804,12 +32755,22 @@ DUK_LOCAL duk_uint8_t duk__date_equivyear[14] = {
*/
/* non-leap year: sunday, monday, ... */
- DUK__YEAR(2023), DUK__YEAR(2035), DUK__YEAR(2019), DUK__YEAR(2031),
- DUK__YEAR(2015), DUK__YEAR(2027), DUK__YEAR(2011),
+ DUK__YEAR(2023),
+ DUK__YEAR(2035),
+ DUK__YEAR(2019),
+ DUK__YEAR(2031),
+ DUK__YEAR(2015),
+ DUK__YEAR(2027),
+ DUK__YEAR(2011),
/* leap year: sunday, monday, ... */
- DUK__YEAR(2012), DUK__YEAR(2024), DUK__YEAR(2008), DUK__YEAR(2020),
- DUK__YEAR(2032), DUK__YEAR(2016), DUK__YEAR(2028)
+ DUK__YEAR(2012),
+ DUK__YEAR(2024),
+ DUK__YEAR(2008),
+ DUK__YEAR(2020),
+ DUK__YEAR(2032),
+ DUK__YEAR(2016),
+ DUK__YEAR(2028)
#endif
#if 0
@@ -29832,71 +32793,70 @@ DUK_LOCAL duk_uint8_t duk__date_equivyear[14] = {
*/
/* Parser part count. */
-#define DUK__NUM_ISO8601_PARSER_PARTS 9
+#define DUK__NUM_ISO8601_PARSER_PARTS 9
/* Parser part indices. */
-#define DUK__PI_YEAR 0
-#define DUK__PI_MONTH 1
-#define DUK__PI_DAY 2
-#define DUK__PI_HOUR 3
-#define DUK__PI_MINUTE 4
-#define DUK__PI_SECOND 5
-#define DUK__PI_MILLISECOND 6
-#define DUK__PI_TZHOUR 7
-#define DUK__PI_TZMINUTE 8
+#define DUK__PI_YEAR 0
+#define DUK__PI_MONTH 1
+#define DUK__PI_DAY 2
+#define DUK__PI_HOUR 3
+#define DUK__PI_MINUTE 4
+#define DUK__PI_SECOND 5
+#define DUK__PI_MILLISECOND 6
+#define DUK__PI_TZHOUR 7
+#define DUK__PI_TZMINUTE 8
/* Parser part masks. */
-#define DUK__PM_YEAR (1 << DUK__PI_YEAR)
-#define DUK__PM_MONTH (1 << DUK__PI_MONTH)
-#define DUK__PM_DAY (1 << DUK__PI_DAY)
-#define DUK__PM_HOUR (1 << DUK__PI_HOUR)
-#define DUK__PM_MINUTE (1 << DUK__PI_MINUTE)
-#define DUK__PM_SECOND (1 << DUK__PI_SECOND)
-#define DUK__PM_MILLISECOND (1 << DUK__PI_MILLISECOND)
-#define DUK__PM_TZHOUR (1 << DUK__PI_TZHOUR)
-#define DUK__PM_TZMINUTE (1 << DUK__PI_TZMINUTE)
+#define DUK__PM_YEAR (1 << DUK__PI_YEAR)
+#define DUK__PM_MONTH (1 << DUK__PI_MONTH)
+#define DUK__PM_DAY (1 << DUK__PI_DAY)
+#define DUK__PM_HOUR (1 << DUK__PI_HOUR)
+#define DUK__PM_MINUTE (1 << DUK__PI_MINUTE)
+#define DUK__PM_SECOND (1 << DUK__PI_SECOND)
+#define DUK__PM_MILLISECOND (1 << DUK__PI_MILLISECOND)
+#define DUK__PM_TZHOUR (1 << DUK__PI_TZHOUR)
+#define DUK__PM_TZMINUTE (1 << DUK__PI_TZMINUTE)
/* Parser separator indices. */
-#define DUK__SI_PLUS 0
-#define DUK__SI_MINUS 1
-#define DUK__SI_T 2
-#define DUK__SI_SPACE 3
-#define DUK__SI_COLON 4
-#define DUK__SI_PERIOD 5
-#define DUK__SI_Z 6
-#define DUK__SI_NUL 7
+#define DUK__SI_PLUS 0
+#define DUK__SI_MINUS 1
+#define DUK__SI_T 2
+#define DUK__SI_SPACE 3
+#define DUK__SI_COLON 4
+#define DUK__SI_PERIOD 5
+#define DUK__SI_Z 6
+#define DUK__SI_NUL 7
/* Parser separator masks. */
-#define DUK__SM_PLUS (1 << DUK__SI_PLUS)
-#define DUK__SM_MINUS (1 << DUK__SI_MINUS)
-#define DUK__SM_T (1 << DUK__SI_T)
-#define DUK__SM_SPACE (1 << DUK__SI_SPACE)
-#define DUK__SM_COLON (1 << DUK__SI_COLON)
-#define DUK__SM_PERIOD (1 << DUK__SI_PERIOD)
-#define DUK__SM_Z (1 << DUK__SI_Z)
-#define DUK__SM_NUL (1 << DUK__SI_NUL)
+#define DUK__SM_PLUS (1 << DUK__SI_PLUS)
+#define DUK__SM_MINUS (1 << DUK__SI_MINUS)
+#define DUK__SM_T (1 << DUK__SI_T)
+#define DUK__SM_SPACE (1 << DUK__SI_SPACE)
+#define DUK__SM_COLON (1 << DUK__SI_COLON)
+#define DUK__SM_PERIOD (1 << DUK__SI_PERIOD)
+#define DUK__SM_Z (1 << DUK__SI_Z)
+#define DUK__SM_NUL (1 << DUK__SI_NUL)
/* Rule control flags. */
-#define DUK__CF_NEG (1 << 0) /* continue matching, set neg_tzoffset flag */
-#define DUK__CF_ACCEPT (1 << 1) /* accept string */
-#define DUK__CF_ACCEPT_NUL (1 << 2) /* accept string if next char is NUL (otherwise reject) */
-
-#define DUK__PACK_RULE(partmask,sepmask,nextpart,flags) \
- ((duk_uint32_t) (partmask) + \
- (((duk_uint32_t) (sepmask)) << 9) + \
- (((duk_uint32_t) (nextpart)) << 17) + \
+#define DUK__CF_NEG (1 << 0) /* continue matching, set neg_tzoffset flag */
+#define DUK__CF_ACCEPT (1 << 1) /* accept string */
+#define DUK__CF_ACCEPT_NUL (1 << 2) /* accept string if next char is NUL (otherwise reject) */
+
+#define DUK__PACK_RULE(partmask, sepmask, nextpart, flags) \
+ ((duk_uint32_t) (partmask) + (((duk_uint32_t) (sepmask)) << 9) + (((duk_uint32_t) (nextpart)) << 17) + \
(((duk_uint32_t) (flags)) << 21))
-#define DUK__UNPACK_RULE(rule,var_nextidx,var_flags) do { \
+#define DUK__UNPACK_RULE(rule, var_nextidx, var_flags) \
+ do { \
(var_nextidx) = (duk_small_uint_t) (((rule) >> 17) & 0x0f); \
(var_flags) = (duk_small_uint_t) ((rule) >> 21); \
} while (0)
-#define DUK__RULE_MASK_PART_SEP 0x1ffffUL
+#define DUK__RULE_MASK_PART_SEP 0x1ffffUL
/* Matching separator index is used in the control table */
DUK_LOCAL const duk_uint8_t duk__parse_iso8601_seps[] = {
- DUK_ASC_PLUS /*0*/, DUK_ASC_MINUS /*1*/, DUK_ASC_UC_T /*2*/, DUK_ASC_SPACE /*3*/,
+ DUK_ASC_PLUS /*0*/, DUK_ASC_MINUS /*1*/, DUK_ASC_UC_T /*2*/, DUK_ASC_SPACE /*3*/,
DUK_ASC_COLON /*4*/, DUK_ASC_PERIOD /*5*/, DUK_ASC_UC_Z /*6*/, DUK_ASC_NUL /*7*/
};
@@ -29909,10 +32869,26 @@ DUK_LOCAL const duk_uint32_t duk__parse_iso8601_control[] = {
DUK__PACK_RULE(DUK__PM_MINUTE, DUK__SM_COLON, DUK__PI_SECOND, 0),
DUK__PACK_RULE(DUK__PM_SECOND, DUK__SM_PERIOD, DUK__PI_MILLISECOND, 0),
DUK__PACK_RULE(DUK__PM_TZHOUR, DUK__SM_COLON, DUK__PI_TZMINUTE, 0),
- DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND | DUK__PM_MILLISECOND, DUK__SM_PLUS, DUK__PI_TZHOUR, 0),
- DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND | DUK__PM_MILLISECOND, DUK__SM_MINUS, DUK__PI_TZHOUR, DUK__CF_NEG),
- DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND | DUK__PM_MILLISECOND, DUK__SM_Z, 0, DUK__CF_ACCEPT_NUL),
- DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND | DUK__PM_MILLISECOND | DUK__PM_TZHOUR /*Note2*/ | DUK__PM_TZMINUTE, DUK__SM_NUL, 0, DUK__CF_ACCEPT)
+ DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND |
+ DUK__PM_MILLISECOND,
+ DUK__SM_PLUS,
+ DUK__PI_TZHOUR,
+ 0),
+ DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND |
+ DUK__PM_MILLISECOND,
+ DUK__SM_MINUS,
+ DUK__PI_TZHOUR,
+ DUK__CF_NEG),
+ DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND |
+ DUK__PM_MILLISECOND,
+ DUK__SM_Z,
+ 0,
+ DUK__CF_ACCEPT_NUL),
+ DUK__PACK_RULE(DUK__PM_YEAR | DUK__PM_MONTH | DUK__PM_DAY | DUK__PM_HOUR /*Note1*/ | DUK__PM_MINUTE | DUK__PM_SECOND |
+ DUK__PM_MILLISECOND | DUK__PM_TZHOUR /*Note2*/ | DUK__PM_TZMINUTE,
+ DUK__SM_NUL,
+ 0,
+ DUK__CF_ACCEPT)
/* Note1: the specification doesn't require matching a time form with
* just hours ("HH"), but we accept it here, e.g. "2012-01-02T12Z".
@@ -29937,7 +32913,7 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
/* During parsing, month and day are one-based; set defaults here. */
duk_memzero(parts, sizeof(parts));
- DUK_ASSERT(parts[DUK_DATE_IDX_YEAR] == 0); /* don't care value, year is mandatory */
+ DUK_ASSERT(parts[DUK_DATE_IDX_YEAR] == 0); /* don't care value, year is mandatory */
parts[DUK_DATE_IDX_MONTH] = 1;
parts[DUK_DATE_IDX_DAY] = 1;
@@ -29954,7 +32930,8 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
for (;;) {
ch = *p++;
DUK_DDD(DUK_DDDPRINT("parsing, part_idx=%ld, char=%ld ('%c')",
- (long) part_idx, (long) ch,
+ (long) part_idx,
+ (long) ch,
(int) ((ch >= 0x20 && ch <= 0x7e) ? ch : DUK_ASC_QUESTION)));
if (ch >= DUK_ASC_0 && ch <= DUK_ASC_9) {
@@ -29999,7 +32976,7 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
}
sep_idx = i;
- match_val = (1UL << part_idx) + (1UL << (sep_idx + 9)); /* match against rule part/sep bits */
+ match_val = (1UL << part_idx) + (1UL << (sep_idx + 9)); /* match against rule part/sep bits */
for (i = 0; i < (duk_small_uint_t) (sizeof(duk__parse_iso8601_control) / sizeof(duk_uint32_t)); i++) {
duk_uint_fast32_t rule = duk__parse_iso8601_control[i];
@@ -30007,8 +32984,10 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
duk_small_uint_t cflags;
DUK_DDD(DUK_DDDPRINT("part_idx=%ld, sep_idx=%ld, match_val=0x%08lx, considering rule=0x%08lx",
- (long) part_idx, (long) sep_idx,
- (unsigned long) match_val, (unsigned long) rule));
+ (long) part_idx,
+ (long) sep_idx,
+ (unsigned long) match_val,
+ (unsigned long) rule));
if ((rule & match_val) != match_val) {
continue;
@@ -30018,9 +32997,12 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
DUK_DDD(DUK_DDDPRINT("rule match -> part_idx=%ld, sep_idx=%ld, match_val=0x%08lx, "
"rule=0x%08lx -> nextpart=%ld, cflags=0x%02lx",
- (long) part_idx, (long) sep_idx,
- (unsigned long) match_val, (unsigned long) rule,
- (long) nextpart, (unsigned long) cflags));
+ (long) part_idx,
+ (long) sep_idx,
+ (unsigned long) match_val,
+ (unsigned long) rule,
+ (long) nextpart,
+ (unsigned long) cflags));
if (cflags & DUK__CF_NEG) {
neg_tzoffset = 1;
@@ -30040,7 +33022,7 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
part_idx = nextpart;
break;
- } /* rule match */
+ } /* rule match */
if (i == (duk_small_uint_t) (sizeof(duk__parse_iso8601_control) / sizeof(duk_uint32_t))) {
DUK_DDD(DUK_DDDPRINT("no rule matches -> reject"));
@@ -30054,17 +33036,17 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
DUK_DDD(DUK_DDDPRINT("NUL after rule matching (should not happen) -> reject"));
goto reject;
}
- } /* if-digit-else-ctrl */
- } /* char loop */
+ } /* if-digit-else-ctrl */
+ } /* char loop */
/* We should never exit the loop above. */
DUK_UNREACHABLE();
- reject:
+reject:
DUK_DDD(DUK_DDDPRINT("reject"));
return 0;
- accept:
+accept:
DUK_DDD(DUK_DDDPRINT("accept"));
/* Apply timezone offset to get the main parts in UTC */
@@ -30078,8 +33060,8 @@ DUK_LOCAL duk_bool_t duk__parse_string_iso8601_subset(duk_hthread *thr, const ch
parts[DUK__PI_HOUR] -= parts[DUK__PI_TZHOUR];
parts[DUK__PI_MINUTE] -= parts[DUK__PI_TZMINUTE];
}
- parts[DUK__PI_MONTH] -= 1; /* zero-based month */
- parts[DUK__PI_DAY] -= 1; /* zero-based day */
+ parts[DUK__PI_MONTH] -= 1; /* zero-based month */
+ parts[DUK__PI_DAY] -= 1; /* zero-based day */
/* Use double parts, they tolerate unnormalized time.
*
@@ -30156,16 +33138,14 @@ DUK_LOCAL duk_ret_t duk__parse_string(duk_hthread *thr, const char *str) {
* out for non-finite numbers etc.
*/
-DUK_LOCAL duk_uint8_t duk__days_in_month[12] = {
- (duk_uint8_t) 31, (duk_uint8_t) 28, (duk_uint8_t) 31, (duk_uint8_t) 30,
- (duk_uint8_t) 31, (duk_uint8_t) 30, (duk_uint8_t) 31, (duk_uint8_t) 31,
- (duk_uint8_t) 30, (duk_uint8_t) 31, (duk_uint8_t) 30, (duk_uint8_t) 31
-};
+DUK_LOCAL duk_uint8_t duk__days_in_month[12] = { (duk_uint8_t) 31, (duk_uint8_t) 28, (duk_uint8_t) 31, (duk_uint8_t) 30,
+ (duk_uint8_t) 31, (duk_uint8_t) 30, (duk_uint8_t) 31, (duk_uint8_t) 31,
+ (duk_uint8_t) 30, (duk_uint8_t) 31, (duk_uint8_t) 30, (duk_uint8_t) 31 };
/* Maximum iteration count for computing UTC-to-local time offset when
* creating an ECMAScript time value from local parts.
*/
-#define DUK__LOCAL_TZOFFSET_MAXITER 4
+#define DUK__LOCAL_TZOFFSET_MAXITER 4
/* Because 'day since epoch' can be negative and is used to compute weekday
* using a modulo operation, add this multiple of 7 to avoid negative values
@@ -30173,7 +33153,7 @@ DUK_LOCAL duk_uint8_t duk__days_in_month[12] = {
* +/- 100 million days from epoch, so this adder fits nicely into 32 bits.
* Round to a multiple of 7 (= floor(100000000 / 7) * 7) and add margin.
*/
-#define DUK__WEEKDAY_MOD_ADDER (20000000 * 7) /* 0x08583b00 */
+#define DUK__WEEKDAY_MOD_ADDER (20000000 * 7) /* 0x08583b00 */
DUK_INTERNAL duk_bool_t duk_bi_date_is_leap_year(duk_int_t year) {
if ((year % 4) != 0) {
@@ -30234,10 +33214,8 @@ DUK_LOCAL duk_int_t duk__day_from_year(duk_int_t year) {
/* Note: in integer arithmetic, (x / 4) is same as floor(x / 4) for non-negative
* values, but is incorrect for negative ones.
*/
- return 365 * (year - 1970)
- + duk__div_floor(year - 1969, 4)
- - duk__div_floor(year - 1901, 100)
- + duk__div_floor(year - 1601, 400);
+ return 365 * (year - 1970) + duk__div_floor(year - 1969, 4) - duk__div_floor(year - 1901, 100) +
+ duk__div_floor(year - 1601, 400);
}
/* Given a day number, determine year and day-within-year. */
@@ -30259,10 +33237,9 @@ DUK_LOCAL duk_int_t duk__year_from_day(duk_int_t day, duk_small_int_t *out_day_w
diff_days = duk__day_from_year(year) - day;
DUK_DDD(DUK_DDDPRINT("year=%ld day=%ld, diff_days=%ld", (long) year, (long) day, (long) diff_days));
if (diff_days <= 0) {
- DUK_ASSERT(-diff_days < 366); /* fits into duk_small_int_t */
+ DUK_ASSERT(-diff_days < 366); /* fits into duk_small_int_t */
*out_day_within_year = -diff_days;
- DUK_DDD(DUK_DDDPRINT("--> year=%ld, day-within-year=%ld",
- (long) year, (long) *out_day_within_year));
+ DUK_DDD(DUK_DDDPRINT("--> year=%ld, day-within-year=%ld", (long) year, (long) *out_day_within_year));
DUK_ASSERT(*out_day_within_year >= 0);
DUK_ASSERT(*out_day_within_year < (duk_bi_date_is_leap_year(year) ? 366 : 365));
return year;
@@ -30271,7 +33248,7 @@ DUK_LOCAL duk_int_t duk__year_from_day(duk_int_t day, duk_small_int_t *out_day_w
/* Note: this is very tricky; we must never 'overshoot' the
* correction downwards.
*/
- year -= 1 + (diff_days - 1) / 366; /* conservative */
+ year -= 1 + (diff_days - 1) / 366; /* conservative */
}
}
@@ -30344,7 +33321,7 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
duk_double_t d1, d2;
duk_int_t t1, t2;
duk_int_t day_since_epoch;
- duk_int_t year; /* does not fit into 16 bits */
+ duk_int_t year; /* does not fit into 16 bits */
duk_small_int_t day_in_year;
duk_small_int_t month;
duk_small_int_t day;
@@ -30356,9 +33333,9 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
duk_bool_t is_leap;
duk_small_int_t arridx;
- DUK_ASSERT(DUK_ISFINITE(d)); /* caller checks */
- d = DUK_FLOOR(d); /* remove fractions if present */
- DUK_ASSERT(DUK_FLOOR(d) == d);
+ DUK_ASSERT(DUK_ISFINITE(d)); /* caller checks */
+ d = DUK_FLOOR(d); /* remove fractions if present */
+ DUK_ASSERT(duk_double_equals(DUK_FLOOR(d), d));
/* The timevalue must be in valid ECMAScript range, but since a local
* time offset can be applied, we need to allow a +/- 24h leeway to
@@ -30377,21 +33354,24 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
d1 += (duk_double_t) DUK_DATE_MSEC_DAY;
}
d2 = DUK_FLOOR((double) (d / (duk_double_t) DUK_DATE_MSEC_DAY));
- DUK_ASSERT(d2 * ((duk_double_t) DUK_DATE_MSEC_DAY) + d1 == d);
+ DUK_ASSERT(duk_double_equals(d2 * ((duk_double_t) DUK_DATE_MSEC_DAY) + d1, d));
/* now expected to fit into a 32-bit integer */
t1 = (duk_int_t) d1;
t2 = (duk_int_t) d2;
day_since_epoch = t2;
- DUK_ASSERT((duk_double_t) t1 == d1);
- DUK_ASSERT((duk_double_t) t2 == d2);
+ DUK_ASSERT(duk_double_equals((duk_double_t) t1, d1));
+ DUK_ASSERT(duk_double_equals((duk_double_t) t2, d2));
/* t1 = milliseconds within day (fits 32 bit)
* t2 = day number from epoch (fits 32 bit, may be negative)
*/
- parts[DUK_DATE_IDX_MILLISECOND] = t1 % 1000; t1 /= 1000;
- parts[DUK_DATE_IDX_SECOND] = t1 % 60; t1 /= 60;
- parts[DUK_DATE_IDX_MINUTE] = t1 % 60; t1 /= 60;
+ parts[DUK_DATE_IDX_MILLISECOND] = t1 % 1000;
+ t1 /= 1000;
+ parts[DUK_DATE_IDX_SECOND] = t1 % 60;
+ t1 /= 60;
+ parts[DUK_DATE_IDX_MINUTE] = t1 % 60;
+ t1 /= 60;
parts[DUK_DATE_IDX_HOUR] = t1;
DUK_ASSERT(parts[DUK_DATE_IDX_MILLISECOND] >= 0 && parts[DUK_DATE_IDX_MILLISECOND] <= 999);
DUK_ASSERT(parts[DUK_DATE_IDX_SECOND] >= 0 && parts[DUK_DATE_IDX_SECOND] <= 59);
@@ -30399,7 +33379,11 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
DUK_ASSERT(parts[DUK_DATE_IDX_HOUR] >= 0 && parts[DUK_DATE_IDX_HOUR] <= 23);
DUK_DDD(DUK_DDDPRINT("d=%lf, d1=%lf, d2=%lf, t1=%ld, t2=%ld, parts: hour=%ld min=%ld sec=%ld msec=%ld",
- (double) d, (double) d1, (double) d2, (long) t1, (long) t2,
+ (double) d,
+ (double) d1,
+ (double) d2,
+ (long) t1,
+ (long) t2,
(long) parts[DUK_DATE_IDX_HOUR],
(long) parts[DUK_DATE_IDX_MINUTE],
(long) parts[DUK_DATE_IDX_SECOND],
@@ -30409,7 +33393,7 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
* the ECMAScript range.
*/
DUK_ASSERT(t2 + DUK__WEEKDAY_MOD_ADDER >= 0);
- parts[DUK_DATE_IDX_WEEKDAY] = (t2 + 4 + DUK__WEEKDAY_MOD_ADDER) % 7; /* E5.1 Section 15.9.1.6 */
+ parts[DUK_DATE_IDX_WEEKDAY] = (t2 + 4 + DUK__WEEKDAY_MOD_ADDER) % 7; /* E5.1 Section 15.9.1.6 */
DUK_ASSERT(parts[DUK_DATE_IDX_WEEKDAY] >= 0 && parts[DUK_DATE_IDX_WEEKDAY] <= 6);
year = duk__year_from_day(t2, &day_in_year);
@@ -30420,8 +33404,7 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
if (month == 1 && is_leap) {
dim++;
}
- DUK_DDD(DUK_DDDPRINT("month=%ld, dim=%ld, day=%ld",
- (long) month, (long) dim, (long) day));
+ DUK_DDD(DUK_DDDPRINT("month=%ld, dim=%ld, day=%ld", (long) month, (long) dim, (long) day));
if (day < dim) {
break;
}
@@ -30446,9 +33429,9 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
if ((flags & DUK_DATE_FLAG_EQUIVYEAR) && (year < 1971 || year > 2037)) {
DUK_ASSERT(is_leap == 0 || is_leap == 1);
- jan1_since_epoch = day_since_epoch - day_in_year; /* day number for Jan 1 since epoch */
+ jan1_since_epoch = day_since_epoch - day_in_year; /* day number for Jan 1 since epoch */
DUK_ASSERT(jan1_since_epoch + DUK__WEEKDAY_MOD_ADDER >= 0);
- jan1_weekday = (jan1_since_epoch + 4 + DUK__WEEKDAY_MOD_ADDER) % 7; /* E5.1 Section 15.9.1.6 */
+ jan1_weekday = (jan1_since_epoch + 4 + DUK__WEEKDAY_MOD_ADDER) % 7; /* E5.1 Section 15.9.1.6 */
DUK_ASSERT(jan1_weekday >= 0 && jan1_weekday <= 6);
arridx = jan1_weekday;
if (is_leap) {
@@ -30460,8 +33443,12 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
year = equiv_year;
DUK_DDD(DUK_DDDPRINT("equiv year mapping, year=%ld, day_in_year=%ld, day_since_epoch=%ld, "
"jan1_since_epoch=%ld, jan1_weekday=%ld -> equiv year %ld",
- (long) year, (long) day_in_year, (long) day_since_epoch,
- (long) jan1_since_epoch, (long) jan1_weekday, (long) equiv_year));
+ (long) year,
+ (long) day_in_year,
+ (long) day_since_epoch,
+ (long) jan1_since_epoch,
+ (long) jan1_weekday,
+ (long) equiv_year));
}
parts[DUK_DATE_IDX_YEAR] = year;
@@ -30469,8 +33456,8 @@ DUK_INTERNAL void duk_bi_date_timeval_to_parts(duk_double_t d, duk_int_t *parts,
parts[DUK_DATE_IDX_DAY] = day;
if (flags & DUK_DATE_FLAG_ONEBASED) {
- parts[DUK_DATE_IDX_MONTH]++; /* zero-based -> one-based */
- parts[DUK_DATE_IDX_DAY]++; /* -""- */
+ parts[DUK_DATE_IDX_MONTH]++; /* zero-based -> one-based */
+ parts[DUK_DATE_IDX_DAY]++; /* -""- */
}
if (dparts != NULL) {
@@ -30550,8 +33537,7 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_timeval_from_dparts(duk_double_t *dpar
/* MakeDate */
d = tmp_day * ((duk_double_t) DUK_DATE_MSEC_DAY) + tmp_time;
- DUK_DDD(DUK_DDDPRINT("time=%lf day=%lf --> timeval=%lf",
- (double) tmp_time, (double) tmp_day, (double) d));
+ DUK_DDD(DUK_DDDPRINT("time=%lf day=%lf --> timeval=%lf", (double) tmp_time, (double) tmp_day, (double) d));
/* Optional UTC conversion. */
if (flags & DUK_DATE_FLAG_LOCALTIME) {
@@ -30581,16 +33567,22 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_timeval_from_dparts(duk_double_t *dpar
/* Iteration solution */
tzoff = 0;
- tzoffprev1 = 999999999L; /* invalid value which never matches */
+ tzoffprev1 = 999999999L; /* invalid value which never matches */
for (i = 0; i < DUK__LOCAL_TZOFFSET_MAXITER; i++) {
tzoffprev2 = tzoffprev1;
tzoffprev1 = tzoff;
tzoff = DUK_USE_DATE_GET_LOCAL_TZOFFSET(d - tzoff * 1000L);
DUK_DDD(DUK_DDDPRINT("tzoffset iteration, i=%d, tzoff=%ld, tzoffprev1=%ld tzoffprev2=%ld",
- (int) i, (long) tzoff, (long) tzoffprev1, (long) tzoffprev2));
+ (int) i,
+ (long) tzoff,
+ (long) tzoffprev1,
+ (long) tzoffprev2));
if (tzoff == tzoffprev1) {
DUK_DDD(DUK_DDDPRINT("tzoffset iteration finished, i=%d, tzoff=%ld, tzoffprev1=%ld, tzoffprev2=%ld",
- (int) i, (long) tzoff, (long) tzoffprev1, (long) tzoffprev2));
+ (int) i,
+ (long) tzoff,
+ (long) tzoffprev1,
+ (long) tzoffprev2));
break;
} else if (tzoff == tzoffprev2) {
/* Two value cycle, see e.g. test-bi-date-tzoffset-basic-fi.js.
@@ -30598,8 +33590,12 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_timeval_from_dparts(duk_double_t *dpar
* result which is independent of iteration count. Not sure if
* this is a generically correct solution.
*/
- DUK_DDD(DUK_DDDPRINT("tzoffset iteration two-value cycle, i=%d, tzoff=%ld, tzoffprev1=%ld, tzoffprev2=%ld",
- (int) i, (long) tzoff, (long) tzoffprev1, (long) tzoffprev2));
+ DUK_DDD(DUK_DDDPRINT(
+ "tzoffset iteration two-value cycle, i=%d, tzoff=%ld, tzoffprev1=%ld, tzoffprev2=%ld",
+ (int) i,
+ (long) tzoff,
+ (long) tzoffprev1,
+ (long) tzoffprev2));
if (tzoffprev1 > tzoff) {
tzoff = tzoffprev1;
}
@@ -30630,7 +33626,7 @@ DUK_LOCAL duk_double_t duk__push_this_get_timeval_tzoffset(duk_hthread *thr, duk
duk_int_t tzoffset = 0;
duk_push_this(thr);
- h = duk_get_hobject(thr, -1); /* XXX: getter with class check, useful in built-ins */
+ h = duk_get_hobject(thr, -1); /* XXX: getter with class check, useful in built-ins */
if (h == NULL || DUK_HOBJECT_GET_CLASS_NUMBER(h) != DUK_HOBJECT_CLASS_DATE) {
DUK_ERROR_TYPE(thr, "expected Date");
DUK_WO_NORETURN(return 0.0;);
@@ -30656,7 +33652,7 @@ DUK_LOCAL duk_double_t duk__push_this_get_timeval_tzoffset(duk_hthread *thr, duk
/* Note: DST adjustment is determined using UTC time.
* If 'd' is NaN, tzoffset will be 0.
*/
- tzoffset = DUK_USE_DATE_GET_LOCAL_TZOFFSET(d); /* seconds */
+ tzoffset = DUK_USE_DATE_GET_LOCAL_TZOFFSET(d); /* seconds */
d += tzoffset * 1000L;
}
if (out_tzoffset) {
@@ -30681,8 +33677,8 @@ DUK_LOCAL duk_ret_t duk__set_this_timeval_from_dparts(duk_hthread *thr, duk_doub
/* [ ... this ] */
d = duk_bi_date_get_timeval_from_dparts(dparts, flags);
- duk_push_number(thr, d); /* -> [ ... this timeval_new ] */
- duk_dup_top(thr); /* -> [ ... this timeval_new timeval_new ] */
+ duk_push_number(thr, d); /* -> [ ... this timeval_new ] */
+ duk_dup_top(thr); /* -> [ ... this timeval_new timeval_new ] */
/* Must force write because e.g. .setYear() must work even when
* the Date instance is frozen.
@@ -30695,8 +33691,8 @@ DUK_LOCAL duk_ret_t duk__set_this_timeval_from_dparts(duk_hthread *thr, duk_doub
/* 'out_buf' must be at least DUK_BI_DATE_ISO8601_BUFSIZE long. */
DUK_LOCAL void duk__format_parts_iso8601(duk_int_t *parts, duk_int_t tzoffset, duk_small_uint_t flags, duk_uint8_t *out_buf) {
- char yearstr[8]; /* "-123456\0" */
- char tzstr[8]; /* "+11:22\0" */
+ char yearstr[8]; /* "-123456\0" */
+ char tzstr[8]; /* "+11:22\0" */
char sep = (flags & DUK_DATE_FLAG_SEP_T) ? DUK_ASC_UC_T : DUK_ASC_SPACE;
DUK_ASSERT(parts[DUK_DATE_IDX_MONTH] >= 1 && parts[DUK_DATE_IDX_MONTH] <= 12);
@@ -30708,8 +33704,9 @@ DUK_LOCAL void duk__format_parts_iso8601(duk_int_t *parts, duk_int_t tzoffset, d
*/
DUK_SNPRINTF(yearstr,
sizeof(yearstr),
- (parts[DUK_DATE_IDX_YEAR] >= 0 && parts[DUK_DATE_IDX_YEAR] <= 9999) ? "%04ld" :
- ((parts[DUK_DATE_IDX_YEAR] >= 0) ? "+%06ld" : "%07ld"),
+ (parts[DUK_DATE_IDX_YEAR] >= 0 && parts[DUK_DATE_IDX_YEAR] <= 9999) ?
+ "%04ld" :
+ ((parts[DUK_DATE_IDX_YEAR] >= 0) ? "+%06ld" : "%07ld"),
(long) parts[DUK_DATE_IDX_YEAR]);
yearstr[sizeof(yearstr) - 1] = (char) 0;
@@ -30730,8 +33727,9 @@ DUK_LOCAL void duk__format_parts_iso8601(duk_int_t *parts, duk_int_t tzoffset, d
tmp = tmp / 60;
arg_hours = tmp / 60;
arg_minutes = tmp % 60;
- DUK_ASSERT(arg_hours <= 24); /* Even less is actually guaranteed for a valid tzoffset. */
- arg_hours = arg_hours & 0x3f; /* For [0,24] this is a no-op, but fixes GCC 7 warning, see https://github.com/svaarala/duktape/issues/1602. */
+ DUK_ASSERT(arg_hours <= 24); /* Even less is actually guaranteed for a valid tzoffset. */
+ arg_hours = arg_hours & 0x3f; /* For [0,24] this is a no-op, but fixes GCC 7 warning, see
+ https://github.com/svaarala/duktape/issues/1602. */
DUK_SNPRINTF(tzstr, sizeof(tzstr), fmt, (int) arg_hours, (int) arg_minutes);
tzstr[sizeof(tzstr) - 1] = (char) 0;
@@ -30744,18 +33742,31 @@ DUK_LOCAL void duk__format_parts_iso8601(duk_int_t *parts, duk_int_t tzoffset, d
* is portable.
*/
if ((flags & DUK_DATE_FLAG_TOSTRING_DATE) && (flags & DUK_DATE_FLAG_TOSTRING_TIME)) {
- DUK_SPRINTF((char *) out_buf, "%s-%02d-%02d%c%02d:%02d:%02d.%03d%s",
- (const char *) yearstr, (int) parts[DUK_DATE_IDX_MONTH], (int) parts[DUK_DATE_IDX_DAY], (int) sep,
- (int) parts[DUK_DATE_IDX_HOUR], (int) parts[DUK_DATE_IDX_MINUTE],
- (int) parts[DUK_DATE_IDX_SECOND], (int) parts[DUK_DATE_IDX_MILLISECOND], (const char *) tzstr);
+ DUK_SPRINTF((char *) out_buf,
+ "%s-%02d-%02d%c%02d:%02d:%02d.%03d%s",
+ (const char *) yearstr,
+ (int) parts[DUK_DATE_IDX_MONTH],
+ (int) parts[DUK_DATE_IDX_DAY],
+ (int) sep,
+ (int) parts[DUK_DATE_IDX_HOUR],
+ (int) parts[DUK_DATE_IDX_MINUTE],
+ (int) parts[DUK_DATE_IDX_SECOND],
+ (int) parts[DUK_DATE_IDX_MILLISECOND],
+ (const char *) tzstr);
} else if (flags & DUK_DATE_FLAG_TOSTRING_DATE) {
- DUK_SPRINTF((char *) out_buf, "%s-%02d-%02d",
- (const char *) yearstr, (int) parts[DUK_DATE_IDX_MONTH], (int) parts[DUK_DATE_IDX_DAY]);
+ DUK_SPRINTF((char *) out_buf,
+ "%s-%02d-%02d",
+ (const char *) yearstr,
+ (int) parts[DUK_DATE_IDX_MONTH],
+ (int) parts[DUK_DATE_IDX_DAY]);
} else {
DUK_ASSERT(flags & DUK_DATE_FLAG_TOSTRING_TIME);
- DUK_SPRINTF((char *) out_buf, "%02d:%02d:%02d.%03d%s",
- (int) parts[DUK_DATE_IDX_HOUR], (int) parts[DUK_DATE_IDX_MINUTE],
- (int) parts[DUK_DATE_IDX_SECOND], (int) parts[DUK_DATE_IDX_MILLISECOND],
+ DUK_SPRINTF((char *) out_buf,
+ "%02d:%02d:%02d.%03d%s",
+ (int) parts[DUK_DATE_IDX_HOUR],
+ (int) parts[DUK_DATE_IDX_MINUTE],
+ (int) parts[DUK_DATE_IDX_SECOND],
+ (int) parts[DUK_DATE_IDX_MILLISECOND],
(const char *) tzstr);
}
}
@@ -30767,11 +33778,11 @@ DUK_LOCAL void duk__format_parts_iso8601(duk_int_t *parts, duk_int_t tzoffset, d
DUK_LOCAL duk_ret_t duk__to_string_helper(duk_hthread *thr, duk_small_uint_t flags) {
duk_double_t d;
duk_int_t parts[DUK_DATE_IDX_NUM_PARTS];
- duk_int_t tzoffset; /* seconds, doesn't fit into 16 bits */
+ duk_int_t tzoffset; /* seconds, doesn't fit into 16 bits */
duk_bool_t rc;
duk_uint8_t buf[DUK_BI_DATE_ISO8601_BUFSIZE];
- DUK_UNREF(rc); /* unreferenced with some options */
+ DUK_UNREF(rc); /* unreferenced with some options */
d = duk__push_this_get_timeval_tzoffset(thr, flags, &tzoffset);
if (DUK_ISNAN(d)) {
@@ -30823,9 +33834,9 @@ DUK_LOCAL duk_ret_t duk__to_string_helper(duk_hthread *thr, duk_small_uint_t fla
DUK_LOCAL duk_ret_t duk__get_part_helper(duk_hthread *thr, duk_small_uint_t flags_and_idx) {
duk_double_t d;
duk_int_t parts[DUK_DATE_IDX_NUM_PARTS];
- duk_small_uint_t idx_part = (duk_small_uint_t) (flags_and_idx >> DUK_DATE_FLAG_VALUE_SHIFT); /* unpack args */
+ duk_small_uint_t idx_part = (duk_small_uint_t) (flags_and_idx >> DUK_DATE_FLAG_VALUE_SHIFT); /* unpack args */
- DUK_ASSERT_DISABLE(idx_part >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(idx_part >= 0); /* unsigned */
DUK_ASSERT(idx_part < DUK_DATE_IDX_NUM_PARTS);
d = duk__push_this_get_timeval(thr, flags_and_idx);
@@ -30835,7 +33846,7 @@ DUK_LOCAL duk_ret_t duk__get_part_helper(duk_hthread *thr, duk_small_uint_t flag
}
DUK_ASSERT(DUK_ISFINITE(d));
- duk_bi_date_timeval_to_parts(d, parts, NULL, flags_and_idx); /* no need to mask idx portion */
+ duk_bi_date_timeval_to_parts(d, parts, NULL, flags_and_idx); /* no need to mask idx portion */
/* Setter APIs detect special year numbers (0...99) and apply a +1900
* only in certain cases. The legacy getYear() getter applies -1900
@@ -30857,7 +33868,7 @@ DUK_LOCAL duk_ret_t duk__set_part_helper(duk_hthread *thr, duk_small_uint_t flag
duk_int_t parts[DUK_DATE_IDX_NUM_PARTS];
duk_double_t dparts[DUK_DATE_IDX_NUM_PARTS];
duk_idx_t nargs;
- duk_small_uint_t maxnargs = (duk_small_uint_t) (flags_and_maxnargs >> DUK_DATE_FLAG_VALUE_SHIFT); /* unpack args */
+ duk_small_uint_t maxnargs = (duk_small_uint_t) (flags_and_maxnargs >> DUK_DATE_FLAG_VALUE_SHIFT); /* unpack args */
duk_small_uint_t idx_first, idx;
duk_small_uint_t i;
@@ -30904,7 +33915,7 @@ DUK_LOCAL duk_ret_t duk__set_part_helper(duk_hthread *thr, duk_small_uint_t flag
DUK_ASSERT(maxnargs >= 1 && maxnargs <= 3);
idx_first = DUK_DATE_IDX_DAY - (maxnargs - 1);
}
- DUK_ASSERT_DISABLE(idx_first >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(idx_first >= 0); /* unsigned */
DUK_ASSERT(idx_first < DUK_DATE_IDX_NUM_PARTS);
for (i = 0; i < maxnargs; i++) {
@@ -30913,7 +33924,7 @@ DUK_LOCAL duk_ret_t duk__set_part_helper(duk_hthread *thr, duk_small_uint_t flag
break;
}
idx = idx_first + i;
- DUK_ASSERT_DISABLE(idx >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(idx >= 0); /* unsigned */
DUK_ASSERT(idx < DUK_DATE_IDX_NUM_PARTS);
if (idx == DUK_DATE_IDX_YEAR && (flags_and_maxnargs & DUK_DATE_FLAG_YEAR_FIXUP)) {
@@ -30965,7 +33976,7 @@ DUK_LOCAL void duk__twodigit_year_fixup(duk_hthread *thr, duk_idx_t idx_val) {
}
duk_dup(thr, idx_val);
duk_to_int(thr, -1);
- d = duk_get_number(thr, -1); /* get as double to handle huge numbers correctly */
+ d = duk_get_number(thr, -1); /* get as double to handle huge numbers correctly */
if (d >= 0.0 && d <= 99.0) {
d += 1900.0;
duk_push_number(thr, d);
@@ -31013,10 +34024,14 @@ DUK_LOCAL void duk__set_parts_from_args(duk_hthread *thr, duk_double_t *dparts,
}
DUK_DDD(DUK_DDDPRINT("parts from args -> %lf %lf %lf %lf %lf %lf %lf %lf",
- (double) dparts[0], (double) dparts[1],
- (double) dparts[2], (double) dparts[3],
- (double) dparts[4], (double) dparts[5],
- (double) dparts[6], (double) dparts[7]));
+ (double) dparts[0],
+ (double) dparts[1],
+ (double) dparts[2],
+ (double) dparts[3],
+ (double) dparts[4],
+ (double) dparts[5],
+ (double) dparts[6],
+ (double) dparts[7]));
}
/*
@@ -31172,9 +34187,8 @@ DUK_INTERNAL duk_ret_t duk_bi_date_constructor(duk_hthread *thr) {
DUK_DDD(DUK_DDDPRINT("Date constructor, nargs=%ld, is_cons=%ld", (long) nargs, (long) is_cons));
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DATE),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DATE),
DUK_BIDX_DATE_PROTOTYPE);
/* Unlike most built-ins, the internal [[PrimitiveValue]] of a Date
@@ -31196,9 +34210,9 @@ DUK_INTERNAL duk_ret_t duk_bi_date_constructor(duk_hthread *thr) {
str = duk_get_string_notsymbol(thr, 0);
if (str) {
duk__parse_string(thr, str);
- duk_replace(thr, 0); /* may be NaN */
+ duk_replace(thr, 0); /* may be NaN */
}
- d = duk__timeclip(duk_to_number(thr, 0)); /* symbols fail here */
+ d = duk__timeclip(duk_to_number(thr, 0)); /* symbols fail here */
duk_push_number(thr, d);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_VALUE, DUK_PROPDESC_FLAGS_W);
return 1;
@@ -31208,8 +34222,8 @@ DUK_INTERNAL duk_ret_t duk_bi_date_constructor(duk_hthread *thr) {
/* Parts are in local time, convert when setting. */
- (void) duk__set_this_timeval_from_dparts(thr, dparts, DUK_DATE_FLAG_LOCALTIME /*flags*/); /* -> [ ... this timeval ] */
- duk_pop(thr); /* -> [ ... this ] */
+ (void) duk__set_this_timeval_from_dparts(thr, dparts, DUK_DATE_FLAG_LOCALTIME /*flags*/); /* -> [ ... this timeval ] */
+ duk_pop(thr); /* -> [ ... this ] */
return 1;
}
@@ -31240,7 +34254,7 @@ DUK_INTERNAL duk_ret_t duk_bi_date_constructor_now(duk_hthread *thr) {
duk_double_t d;
d = duk_time_get_ecmascript_time_nofrac(thr);
- DUK_ASSERT(duk__timeclip(d) == d); /* TimeClip() should never be necessary */
+ DUK_ASSERT(duk_double_equals(duk__timeclip(d), d)); /* TimeClip() should never be necessary */
duk_push_number(thr, d);
return 1;
}
@@ -31289,7 +34303,7 @@ DUK_INTERNAL duk_ret_t duk_bi_date_prototype_value_of(duk_hthread *thr) {
* as their behavior is identical.
*/
- duk_double_t d = duk__push_this_get_timeval(thr, 0 /*flags*/); /* -> [ this ] */
+ duk_double_t d = duk__push_this_get_timeval(thr, 0 /*flags*/); /* -> [ this ] */
DUK_ASSERT(DUK_ISFINITE(d) || DUK_ISNAN(d));
duk_push_number(thr, d);
return 1;
@@ -31315,7 +34329,7 @@ DUK_INTERNAL duk_ret_t duk_bi_date_prototype_to_json(duk_hthread *thr) {
duk_pop(thr);
duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_TO_ISO_STRING);
- duk_dup_m2(thr); /* -> [ O toIsoString O ] */
+ duk_dup_m2(thr); /* -> [ O toIsoString O ] */
duk_call_method(thr, 0);
return 1;
}
@@ -31488,8 +34502,7 @@ DUK_INTERNAL duk_ret_t duk_bi_date_prototype_toprimitive(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 2);
hintstr = duk_require_lstring(thr, 0, &hintlen);
- if ((hintlen == 6 && DUK_STRCMP(hintstr, "string") == 0) ||
- (hintlen == 7 && DUK_STRCMP(hintstr, "default") == 0)) {
+ if ((hintlen == 6 && DUK_STRCMP(hintstr, "string") == 0) || (hintlen == 7 && DUK_STRCMP(hintstr, "default") == 0)) {
hint = DUK_HINT_STRING;
} else if (hintlen == 6 && DUK_STRCMP(hintstr, "number") == 0) {
hint = DUK_HINT_NUMBER;
@@ -31500,9 +34513,9 @@ DUK_INTERNAL duk_ret_t duk_bi_date_prototype_toprimitive(duk_hthread *thr) {
duk_to_primitive_ordinary(thr, -1, hint);
return 1;
}
-#endif /* DUK_USE_SYMBOL_BUILTIN */
+#endif /* DUK_USE_SYMBOL_BUILTIN */
-#endif /* DUK_USE_DATE_BUILTIN */
+#endif /* DUK_USE_DATE_BUILTIN */
/* automatic undefs */
#undef DUK__CF_ACCEPT
@@ -31565,8 +34578,8 @@ DUK_INTERNAL duk_ret_t duk_bi_date_prototype_toprimitive(duk_hthread *thr) {
/* Buffer sizes for some UNIX calls. Larger than strictly necessary
* to avoid Valgrind errors.
*/
-#define DUK__STRPTIME_BUF_SIZE 64
-#define DUK__STRFTIME_BUF_SIZE 64
+#define DUK__STRPTIME_BUF_SIZE 64
+#define DUK__STRFTIME_BUF_SIZE 64
#if defined(DUK_USE_DATE_NOW_GETTIMEOFDAY)
/* Get current ECMAScript time (= UNIX/Posix time, but in milliseconds). */
@@ -31580,12 +34593,11 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_now_gettimeofday(void) {
}
/* As of Duktape 2.2.0 allow fractions. */
- d = ((duk_double_t) tv.tv_sec) * 1000.0 +
- ((duk_double_t) tv.tv_usec) / 1000.0;
+ d = ((duk_double_t) tv.tv_sec) * 1000.0 + ((duk_double_t) tv.tv_usec) / 1000.0;
return d;
}
-#endif /* DUK_USE_DATE_NOW_GETTIMEOFDAY */
+#endif /* DUK_USE_DATE_NOW_GETTIMEOFDAY */
#if defined(DUK_USE_DATE_NOW_TIME)
/* Not a very good provider: only full seconds are available. */
@@ -31599,7 +34611,7 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_now_time(void) {
}
return ((duk_double_t) t) * 1000.0;
}
-#endif /* DUK_USE_DATE_NOW_TIME */
+#endif /* DUK_USE_DATE_NOW_TIME */
#if defined(DUK_USE_DATE_TZO_GMTIME) || defined(DUK_USE_DATE_TZO_GMTIME_R) || defined(DUK_USE_DATE_TZO_GMTIME_S)
/* Get local time offset (in seconds) for a certain (UTC) instant 'd'. */
@@ -31682,7 +34694,7 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_gmtime(duk_double_t d) {
DUK_ASSERT(parts[DUK_DATE_IDX_YEAR] >= 1970 && parts[DUK_DATE_IDX_YEAR] <= 2038);
d = duk_bi_date_get_timeval_from_dparts(dparts, 0 /*flags*/);
- DUK_ASSERT(d >= 0 && d < 2147483648.0 * 1000.0); /* unsigned 31-bit range */
+ DUK_ASSERT(d >= 0 && d < 2147483648.0 * 1000.0); /* unsigned 31-bit range */
t = (time_t) (d / 1000.0);
DUK_DDD(DUK_DDDPRINT("timeval: %lf -> time_t %ld", (double) d, (long) t));
@@ -31704,14 +34716,26 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_gmtime(duk_double_t d) {
#endif
DUK_DDD(DUK_DDDPRINT("gmtime result: tm={sec:%ld,min:%ld,hour:%ld,mday:%ld,mon:%ld,year:%ld,"
"wday:%ld,yday:%ld,isdst:%ld}",
- (long) tms[0].tm_sec, (long) tms[0].tm_min, (long) tms[0].tm_hour,
- (long) tms[0].tm_mday, (long) tms[0].tm_mon, (long) tms[0].tm_year,
- (long) tms[0].tm_wday, (long) tms[0].tm_yday, (long) tms[0].tm_isdst));
+ (long) tms[0].tm_sec,
+ (long) tms[0].tm_min,
+ (long) tms[0].tm_hour,
+ (long) tms[0].tm_mday,
+ (long) tms[0].tm_mon,
+ (long) tms[0].tm_year,
+ (long) tms[0].tm_wday,
+ (long) tms[0].tm_yday,
+ (long) tms[0].tm_isdst));
DUK_DDD(DUK_DDDPRINT("localtime result: tm={sec:%ld,min:%ld,hour:%ld,mday:%ld,mon:%ld,year:%ld,"
"wday:%ld,yday:%ld,isdst:%ld}",
- (long) tms[1].tm_sec, (long) tms[1].tm_min, (long) tms[1].tm_hour,
- (long) tms[1].tm_mday, (long) tms[1].tm_mon, (long) tms[1].tm_year,
- (long) tms[1].tm_wday, (long) tms[1].tm_yday, (long) tms[1].tm_isdst));
+ (long) tms[1].tm_sec,
+ (long) tms[1].tm_min,
+ (long) tms[1].tm_hour,
+ (long) tms[1].tm_mday,
+ (long) tms[1].tm_mon,
+ (long) tms[1].tm_year,
+ (long) tms[1].tm_wday,
+ (long) tms[1].tm_yday,
+ (long) tms[1].tm_isdst));
/* tm_isdst is both an input and an output to mktime(), use 0 to
* avoid DST handling in mktime():
@@ -31720,8 +34744,8 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_gmtime(duk_double_t d) {
*/
tms[0].tm_isdst = 0;
tms[1].tm_isdst = 0;
- t1 = mktime(&tms[0]); /* UTC */
- t2 = mktime(&tms[1]); /* local */
+ t1 = mktime(&tms[0]); /* UTC */
+ t2 = mktime(&tms[1]); /* local */
if (t1 == (time_t) -1 || t2 == (time_t) -1) {
/* This check used to be for (t < 0) but on some platforms
* time_t is unsigned and apparently the proper way to detect
@@ -31744,12 +34768,12 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_gmtime(duk_double_t d) {
#endif
return (duk_int_t) difftime(t2, t1);
- mktime_error:
+mktime_error:
/* XXX: return something more useful, so that caller can throw? */
DUK_D(DUK_DPRINT("mktime() failed, d=%lf", (double) d));
return 0;
}
-#endif /* DUK_USE_DATE_TZO_GMTIME */
+#endif /* DUK_USE_DATE_TZO_GMTIME */
#if defined(DUK_USE_DATE_PRS_STRPTIME)
DUK_INTERNAL duk_bool_t duk_bi_date_parse_string_strptime(duk_hthread *thr, const char *str) {
@@ -31759,7 +34783,7 @@ DUK_INTERNAL duk_bool_t duk_bi_date_parse_string_strptime(duk_hthread *thr, cons
/* Copy to buffer with slack to avoid Valgrind gripes from strptime. */
DUK_ASSERT(str != NULL);
- duk_memzero(buf, sizeof(buf)); /* valgrind whine without this */
+ duk_memzero(buf, sizeof(buf)); /* valgrind whine without this */
DUK_SNPRINTF(buf, sizeof(buf), "%s", (const char *) str);
buf[sizeof(buf) - 1] = (char) 0;
@@ -31769,10 +34793,16 @@ DUK_INTERNAL duk_bool_t duk_bi_date_parse_string_strptime(duk_hthread *thr, cons
if (strptime((const char *) buf, "%c", &tm) != NULL) {
DUK_DDD(DUK_DDDPRINT("before mktime: tm={sec:%ld,min:%ld,hour:%ld,mday:%ld,mon:%ld,year:%ld,"
"wday:%ld,yday:%ld,isdst:%ld}",
- (long) tm.tm_sec, (long) tm.tm_min, (long) tm.tm_hour,
- (long) tm.tm_mday, (long) tm.tm_mon, (long) tm.tm_year,
- (long) tm.tm_wday, (long) tm.tm_yday, (long) tm.tm_isdst));
- tm.tm_isdst = -1; /* negative: dst info not available */
+ (long) tm.tm_sec,
+ (long) tm.tm_min,
+ (long) tm.tm_hour,
+ (long) tm.tm_mday,
+ (long) tm.tm_mon,
+ (long) tm.tm_year,
+ (long) tm.tm_wday,
+ (long) tm.tm_yday,
+ (long) tm.tm_isdst));
+ tm.tm_isdst = -1; /* negative: dst info not available */
t = mktime(&tm);
DUK_DDD(DUK_DDDPRINT("mktime() -> %ld", (long) t));
@@ -31784,7 +34814,7 @@ DUK_INTERNAL duk_bool_t duk_bi_date_parse_string_strptime(duk_hthread *thr, cons
return 0;
}
-#endif /* DUK_USE_DATE_PRS_STRPTIME */
+#endif /* DUK_USE_DATE_PRS_STRPTIME */
#if defined(DUK_USE_DATE_PRS_GETDATE)
DUK_INTERNAL duk_bool_t duk_bi_date_parse_string_getdate(duk_hthread *thr, const char *str) {
@@ -31811,10 +34841,13 @@ DUK_INTERNAL duk_bool_t duk_bi_date_parse_string_getdate(duk_hthread *thr, const
return 0;
}
-#endif /* DUK_USE_DATE_PRS_GETDATE */
+#endif /* DUK_USE_DATE_PRS_GETDATE */
#if defined(DUK_USE_DATE_FMT_STRFTIME)
-DUK_INTERNAL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr, duk_int_t *parts, duk_int_t tzoffset, duk_small_uint_t flags) {
+DUK_INTERNAL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr,
+ duk_int_t *parts,
+ duk_int_t tzoffset,
+ duk_small_uint_t flags) {
char buf[DUK__STRFTIME_BUF_SIZE];
struct tm tm;
const char *fmt;
@@ -31832,8 +34865,7 @@ DUK_INTERNAL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr, duk_
* probably not an accurate guarantee of strftime() supporting or not
* supporting a large time range (the full ECMAScript range).
*/
- if (sizeof(time_t) < 8 &&
- (parts[DUK_DATE_IDX_YEAR] < 1970 || parts[DUK_DATE_IDX_YEAR] > 2037)) {
+ if (sizeof(time_t) < 8 && (parts[DUK_DATE_IDX_YEAR] < 1970 || parts[DUK_DATE_IDX_YEAR] > 2037)) {
/* be paranoid for 32-bit time values (even avoiding negative ones) */
return 0;
}
@@ -31842,8 +34874,8 @@ DUK_INTERNAL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr, duk_
tm.tm_sec = parts[DUK_DATE_IDX_SECOND];
tm.tm_min = parts[DUK_DATE_IDX_MINUTE];
tm.tm_hour = parts[DUK_DATE_IDX_HOUR];
- tm.tm_mday = parts[DUK_DATE_IDX_DAY]; /* already one-based */
- tm.tm_mon = parts[DUK_DATE_IDX_MONTH] - 1; /* one-based -> zero-based */
+ tm.tm_mday = parts[DUK_DATE_IDX_DAY]; /* already one-based */
+ tm.tm_mon = parts[DUK_DATE_IDX_MONTH] - 1; /* one-based -> zero-based */
tm.tm_year = parts[DUK_DATE_IDX_YEAR] - 1900;
tm.tm_wday = parts[DUK_DATE_IDX_WEEKDAY];
tm.tm_isdst = 0;
@@ -31863,7 +34895,7 @@ DUK_INTERNAL duk_bool_t duk_bi_date_format_parts_strftime(duk_hthread *thr, duk_
duk_push_string(thr, buf);
return 1;
}
-#endif /* DUK_USE_DATE_FMT_STRFTIME */
+#endif /* DUK_USE_DATE_FMT_STRFTIME */
#if defined(DUK_USE_GET_MONOTONIC_TIME_CLOCK_GETTIME)
DUK_INTERNAL duk_double_t duk_bi_date_get_monotonic_time_clock_gettime(void) {
@@ -31911,20 +34943,20 @@ DUK_LOCAL void duk__convert_filetime_to_ularge(const FILETIME *ft, ULARGE_INTEGE
res->LowPart = ft->dwLowDateTime;
res->HighPart = ft->dwHighDateTime;
}
-#endif /* DUK_USE_DATE_NOW_WINDOWS_SUBMS */
+#endif /* DUK_USE_DATE_NOW_WINDOWS_SUBMS */
DUK_LOCAL void duk__set_systime_jan1970(SYSTEMTIME *st) {
duk_memzero((void *) st, sizeof(*st));
st->wYear = 1970;
st->wMonth = 1;
- st->wDayOfWeek = 4; /* not sure whether or not needed; Thursday */
+ st->wDayOfWeek = 4; /* not sure whether or not needed; Thursday */
st->wDay = 1;
DUK_ASSERT(st->wHour == 0);
DUK_ASSERT(st->wMinute == 0);
DUK_ASSERT(st->wSecond == 0);
DUK_ASSERT(st->wMilliseconds == 0);
}
-#endif /* defined(DUK_USE_DATE_NOW_WINDOWS) || defined(DUK_USE_DATE_TZO_WINDOWS) */
+#endif /* defined(DUK_USE_DATE_NOW_WINDOWS) || defined(DUK_USE_DATE_TZO_WINDOWS) */
#if defined(DUK_USE_DATE_NOW_WINDOWS)
DUK_INTERNAL duk_double_t duk_bi_date_get_now_windows(void) {
@@ -31946,7 +34978,7 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_now_windows(void) {
*/
return (duk_double_t) ((LONGLONG) tmp1.QuadPart - (LONGLONG) tmp2.QuadPart) / 10000.0;
}
-#endif /* DUK_USE_DATE_NOW_WINDOWS */
+#endif /* DUK_USE_DATE_NOW_WINDOWS */
#if defined(DUK_USE_DATE_NOW_WINDOWS_SUBMS)
DUK_INTERNAL duk_double_t duk_bi_date_get_now_windows_subms(void) {
@@ -31968,7 +35000,7 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_now_windows_subms(void) {
*/
return (duk_double_t) ((LONGLONG) tmp1.QuadPart - (LONGLONG) tmp2.QuadPart) / 10000.0;
}
-#endif /* DUK_USE_DATE_NOW_WINDOWS */
+#endif /* DUK_USE_DATE_NOW_WINDOWS */
#if defined(DUK_USE_DATE_TZO_WINDOWS)
DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_windows(duk_double_t d) {
@@ -31993,8 +35025,8 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_windows(duk_double_t d) {
duk__set_systime_jan1970(&st1);
duk__convert_systime_to_ularge((const SYSTEMTIME *) &st1, &tmp1);
- tmp2.QuadPart = (ULONGLONG) (d * 10000.0); /* millisec -> 100ns units since jan 1, 1970 */
- tmp2.QuadPart += tmp1.QuadPart; /* input 'd' in Windows UTC, 100ns units */
+ tmp2.QuadPart = (ULONGLONG) (d * 10000.0); /* millisec -> 100ns units since jan 1, 1970 */
+ tmp2.QuadPart += tmp1.QuadPart; /* input 'd' in Windows UTC, 100ns units */
ft1.dwLowDateTime = tmp2.LowPart;
ft1.dwHighDateTime = tmp2.HighPart;
@@ -32009,9 +35041,9 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_windows(duk_double_t d) {
duk__convert_systime_to_ularge((const SYSTEMTIME *) &st3, &tmp3);
/* Positive if local time ahead of UTC. */
- return (duk_int_t) (((LONGLONG) tmp3.QuadPart - (LONGLONG) tmp2.QuadPart) / DUK_I64_CONSTANT(10000000)); /* seconds */
+ return (duk_int_t) (((LONGLONG) tmp3.QuadPart - (LONGLONG) tmp2.QuadPart) / DUK_I64_CONSTANT(10000000)); /* seconds */
}
-#endif /* DUK_USE_DATE_TZO_WINDOWS */
+#endif /* DUK_USE_DATE_TZO_WINDOWS */
#if defined(DUK_USE_DATE_TZO_WINDOWS_NO_DST)
DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_windows_no_dst(duk_double_t d) {
@@ -32046,17 +35078,19 @@ DUK_INTERNAL duk_int_t duk_bi_date_get_local_tzoffset_windows_no_dst(duk_double_
}
duk__convert_systime_to_ularge((const SYSTEMTIME *) &st2, &tmp2);
- return (duk_int_t) (((LONGLONG) tmp2.QuadPart - (LONGLONG) tmp1.QuadPart) / DUK_I64_CONSTANT(10000000)); /* seconds */
+ return (duk_int_t) (((LONGLONG) tmp2.QuadPart - (LONGLONG) tmp1.QuadPart) / DUK_I64_CONSTANT(10000000)); /* seconds */
}
-#endif /* DUK_USE_DATE_TZO_WINDOWS_NO_DST */
+#endif /* DUK_USE_DATE_TZO_WINDOWS_NO_DST */
#if defined(DUK_USE_GET_MONOTONIC_TIME_WINDOWS_QPC)
DUK_INTERNAL duk_double_t duk_bi_date_get_monotonic_time_windows_qpc(void) {
LARGE_INTEGER count, freq;
/* There are legacy issues with QueryPerformanceCounter():
- * - Potential jumps: https://support.microsoft.com/en-us/help/274323/performance-counter-value-may-unexpectedly-leap-forward
- * - Differences between cores (XP): https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx#qpc_support_in_windows_versions
+ * - Potential jumps:
+ * https://support.microsoft.com/en-us/help/274323/performance-counter-value-may-unexpectedly-leap-forward
+ * - Differences between cores (XP):
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx#qpc_support_in_windows_versions
*
* We avoid these by enabling QPC by default only for Vista or later.
*/
@@ -32073,7 +35107,7 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_monotonic_time_windows_qpc(void) {
return 0.0;
}
}
-#endif /* DUK_USE_GET_MONOTONIC_TIME_WINDOWS_QPC */
+#endif /* DUK_USE_GET_MONOTONIC_TIME_WINDOWS_QPC */
/*
* Duktape built-ins
*
@@ -32136,7 +35170,7 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_fin(duk_hthread *thr) {
return 1;
}
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
DUK_INTERNAL duk_ret_t duk_bi_duktape_object_enc(duk_hthread *thr) {
duk_hstring *h_str;
@@ -32146,7 +35180,7 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_enc(duk_hthread *thr) {
* non-existent optional parameters.
*/
- h_str = duk_require_hstring(thr, 0); /* Could reject symbols, but no point: won't match comparisons. */
+ h_str = duk_require_hstring(thr, 0); /* Could reject symbols, but no point: won't match comparisons. */
duk_require_valid_index(thr, 1);
if (h_str == DUK_HTHREAD_STRING_HEX(thr)) {
@@ -32163,9 +35197,8 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_enc(duk_hthread *thr) {
1 /*idx_value*/,
2 /*idx_replacer*/,
3 /*idx_space*/,
- DUK_JSON_FLAG_EXT_CUSTOM |
- DUK_JSON_FLAG_ASCII_ONLY |
- DUK_JSON_FLAG_AVOID_KEY_QUOTES /*flags*/);
+ DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_ASCII_ONLY |
+ DUK_JSON_FLAG_AVOID_KEY_QUOTES /*flags*/);
#endif
#if defined(DUK_USE_JSON_SUPPORT) && defined(DUK_USE_JC)
} else if (h_str == DUK_HTHREAD_STRING_JC(thr)) {
@@ -32173,8 +35206,7 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_enc(duk_hthread *thr) {
1 /*idx_value*/,
2 /*idx_replacer*/,
3 /*idx_space*/,
- DUK_JSON_FLAG_EXT_COMPATIBLE |
- DUK_JSON_FLAG_ASCII_ONLY /*flags*/);
+ DUK_JSON_FLAG_EXT_COMPATIBLE | DUK_JSON_FLAG_ASCII_ONLY /*flags*/);
#endif
} else {
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
@@ -32190,7 +35222,7 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_dec(duk_hthread *thr) {
* non-existent optional parameters.
*/
- h_str = duk_require_hstring(thr, 0); /* Could reject symbols, but no point: won't match comparisons */
+ h_str = duk_require_hstring(thr, 0); /* Could reject symbols, but no point: won't match comparisons */
duk_require_valid_index(thr, 1);
if (h_str == DUK_HTHREAD_STRING_HEX(thr)) {
@@ -32203,17 +35235,11 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_dec(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 2);
#if defined(DUK_USE_JSON_SUPPORT) && defined(DUK_USE_JX)
} else if (h_str == DUK_HTHREAD_STRING_JX(thr)) {
- duk_bi_json_parse_helper(thr,
- 1 /*idx_value*/,
- 2 /*idx_replacer*/,
- DUK_JSON_FLAG_EXT_CUSTOM /*flags*/);
+ duk_bi_json_parse_helper(thr, 1 /*idx_value*/, 2 /*idx_replacer*/, DUK_JSON_FLAG_EXT_CUSTOM /*flags*/);
#endif
#if defined(DUK_USE_JSON_SUPPORT) && defined(DUK_USE_JC)
} else if (h_str == DUK_HTHREAD_STRING_JC(thr)) {
- duk_bi_json_parse_helper(thr,
- 1 /*idx_value*/,
- 2 /*idx_replacer*/,
- DUK_JSON_FLAG_EXT_COMPATIBLE /*flags*/);
+ duk_bi_json_parse_helper(thr, 1 /*idx_value*/, 2 /*idx_replacer*/, DUK_JSON_FLAG_EXT_COMPATIBLE /*flags*/);
#endif
} else {
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
@@ -32228,10 +35254,10 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_dec(duk_hthread *thr) {
DUK_INTERNAL duk_ret_t duk_bi_duktape_object_compact(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 1);
duk_compact(thr, 0);
- return 1; /* return the argument object */
+ return 1; /* return the argument object */
}
-#endif /* DUK_USE_DUKTAPE_BUILTIN */
+#endif /* DUK_USE_DUKTAPE_BUILTIN */
/*
* WHATWG Encoding API built-ins
*
@@ -32246,17 +35272,17 @@ DUK_INTERNAL duk_ret_t duk_bi_duktape_object_compact(duk_hthread *thr) {
*/
typedef struct {
- duk_uint8_t *out; /* where to write next byte(s) */
- duk_codepoint_t lead; /* lead surrogate */
+ duk_uint8_t *out; /* where to write next byte(s) */
+ duk_codepoint_t lead; /* lead surrogate */
} duk__encode_context;
typedef struct {
/* UTF-8 decoding state */
- duk_codepoint_t codepoint; /* built up incrementally */
- duk_uint8_t upper; /* max value of next byte (decode error otherwise) */
- duk_uint8_t lower; /* min value of next byte (ditto) */
- duk_uint8_t needed; /* how many more bytes we need */
- duk_uint8_t bom_handled; /* BOM seen or no longer expected */
+ duk_codepoint_t codepoint; /* built up incrementally */
+ duk_uint8_t upper; /* max value of next byte (decode error otherwise) */
+ duk_uint8_t lower; /* min value of next byte (ditto) */
+ duk_uint8_t needed; /* how many more bytes we need */
+ duk_uint8_t bom_handled; /* BOM seen or no longer expected */
/* Decoder configuration */
duk_uint8_t fatal;
@@ -32266,9 +35292,9 @@ typedef struct {
/* The signed duk_codepoint_t type is used to signal a decoded codepoint
* (>= 0) or various other states using negative values.
*/
-#define DUK__CP_CONTINUE (-1) /* continue to next byte, no completed codepoint */
-#define DUK__CP_ERROR (-2) /* decoding error */
-#define DUK__CP_RETRY (-3) /* decoding error; retry last byte */
+#define DUK__CP_CONTINUE (-1) /* continue to next byte, no completed codepoint */
+#define DUK__CP_ERROR (-2) /* decoding error */
+#define DUK__CP_RETRY (-3) /* decoding error; retry last byte */
/*
* Raw helpers for encoding/decoding
@@ -32355,7 +35381,7 @@ DUK_LOCAL duk_codepoint_t duk__utf8_decode_next(duk__decode_context *dec_ctx, du
} else {
/* got a codepoint */
duk_codepoint_t ret;
- DUK_ASSERT(dec_ctx->codepoint <= 0x10ffffL); /* Decoding rules guarantee. */
+ DUK_ASSERT(dec_ctx->codepoint <= 0x10ffffL); /* Decoding rules guarantee. */
ret = dec_ctx->codepoint;
dec_ctx->codepoint = 0x0000L;
dec_ctx->needed = 0;
@@ -32411,7 +35437,8 @@ DUK_LOCAL void duk__utf8_encode_char(void *udata, duk_codepoint_t codepoint) {
} else {
/* low surrogate */
if (enc_ctx->lead != 0x0000L) {
- codepoint = (duk_codepoint_t) (0x010000L + ((enc_ctx->lead - 0xd800L) << 10) + (codepoint - 0xdc00L));
+ codepoint =
+ (duk_codepoint_t) (0x010000L + ((enc_ctx->lead - 0xd800L) << 10) + (codepoint - 0xdc00L));
enc_ctx->lead = 0x0000L;
} else {
/* unpaired low surrogate */
@@ -32432,7 +35459,7 @@ DUK_LOCAL void duk__utf8_encode_char(void *udata, duk_codepoint_t codepoint) {
*/
enc_ctx->out += duk_unicode_encode_xutf8((duk_ucodepoint_t) codepoint, enc_ctx->out);
}
-#endif /* DUK_USE_ENCODING_BUILTINS */
+#endif /* DUK_USE_ENCODING_BUILTINS */
/* Shared helper for buffer-to-string using a TextDecoder() compatible UTF-8
* decoder.
@@ -32461,18 +35488,15 @@ DUK_LOCAL duk_ret_t duk__decode_helper(duk_hthread *thr, duk__decode_context *de
duk_push_fixed_buffer_nozero(thr, 0);
duk_replace(thr, 0);
}
- (void) duk_require_buffer_data(thr, 0, &len); /* Need 'len', avoid pointer. */
+ (void) duk_require_buffer_data(thr, 0, &len); /* Need 'len', avoid pointer. */
- if (duk_check_type_mask(thr, 1, DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_NULL |
- DUK_TYPE_MASK_NONE)) {
+ if (duk_check_type_mask(thr, 1, DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_NONE)) {
/* Use defaults, treat missing value like undefined. */
} else {
- duk_require_type_mask(thr, 1, DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_NULL |
- DUK_TYPE_MASK_LIGHTFUNC |
- DUK_TYPE_MASK_BUFFER |
- DUK_TYPE_MASK_OBJECT);
+ duk_require_type_mask(thr,
+ 1,
+ DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_LIGHTFUNC |
+ DUK_TYPE_MASK_BUFFER | DUK_TYPE_MASK_OBJECT);
if (duk_get_prop_literal(thr, 1, "stream")) {
stream = duk_to_boolean(thr, -1);
}
@@ -32490,7 +35514,8 @@ DUK_LOCAL duk_ret_t duk__decode_helper(duk_hthread *thr, duk__decode_context *de
DUK_ERROR_TYPE(thr, DUK_STR_RESULT_TOO_LONG);
DUK_WO_NORETURN(return 0;);
}
- output = (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, 3 + (3 * len)); /* used parts will be always manually written over */
+ output =
+ (duk_uint8_t *) duk_push_fixed_buffer_nozero(thr, 3 + (3 * len)); /* used parts will be always manually written over */
input = (const duk_uint8_t *) duk_get_buffer_data(thr, 0, &len_tmp);
DUK_ASSERT(input != NULL || len == 0);
@@ -32522,7 +35547,7 @@ DUK_LOCAL duk_ret_t duk__decode_helper(duk_hthread *thr, duk__decode_context *de
/* Decoding error with or without retry. */
DUK_ASSERT(codepoint == DUK__CP_ERROR || codepoint == DUK__CP_RETRY);
if (codepoint == DUK__CP_RETRY) {
- --in; /* retry last byte */
+ --in; /* retry last byte */
}
/* replacement mode: replace with U+FFFD */
codepoint = DUK_UNICODE_CP_REPLACEMENT_CHARACTER;
@@ -32555,7 +35580,7 @@ DUK_LOCAL duk_ret_t duk__decode_helper(duk_hthread *thr, duk__decode_context *de
DUK_ASSERT(out <= output + (3 + (3 * len)));
}
}
- duk__utf8_decode_init(dec_ctx); /* Initialize decoding state for potential reuse. */
+ duk__utf8_decode_init(dec_ctx); /* Initialize decoding state for potential reuse. */
}
/* Output buffer is fixed and thus stable even if there had been
@@ -32564,7 +35589,7 @@ DUK_LOCAL duk_ret_t duk__decode_helper(duk_hthread *thr, duk__decode_context *de
duk_push_lstring(thr, (const char *) output, (duk_size_t) (out - output));
return 1;
- fail_type:
+fail_type:
DUK_ERROR_TYPE(thr, DUK_STR_UTF8_DECODE_FAILED);
DUK_WO_NORETURN(return 0;);
}
@@ -32623,7 +35648,7 @@ DUK_INTERNAL duk_ret_t duk_bi_textencoder_prototype_encode(duk_hthread *thr) {
output = (duk_uint8_t *) duk_push_dynamic_buffer(thr, 3 * len);
if (len > 0) {
- DUK_ASSERT(duk_is_string(thr, 0)); /* True if len > 0. */
+ DUK_ASSERT(duk_is_string(thr, 0)); /* True if len > 0. */
/* XXX: duk_decode_string() is used to process the input
* string. For standard ECMAScript strings, represented
@@ -32699,7 +35724,7 @@ DUK_INTERNAL duk_ret_t duk_bi_textdecoder_constructor(duk_hthread *thr) {
dec_ctx = (duk__decode_context *) duk_push_fixed_buffer(thr, sizeof(duk__decode_context));
dec_ctx->fatal = (duk_uint8_t) fatal;
dec_ctx->ignore_bom = (duk_uint8_t) ignore_bom;
- duk__utf8_decode_init(dec_ctx); /* Initializes remaining fields. */
+ duk__utf8_decode_init(dec_ctx); /* Initializes remaining fields. */
duk_put_prop_literal(thr, -2, DUK_INTERNAL_SYMBOL("Context"));
return 0;
@@ -32745,7 +35770,7 @@ DUK_INTERNAL duk_ret_t duk_bi_textdecoder_prototype_decode(duk_hthread *thr) {
dec_ctx = duk__get_textdecoder_context(thr);
return duk__decode_helper(thr, dec_ctx);
}
-#endif /* DUK_USE_ENCODING_BUILTINS */
+#endif /* DUK_USE_ENCODING_BUILTINS */
/*
* Internal helper for Node.js Buffer
@@ -32759,8 +35784,8 @@ DUK_INTERNAL duk_ret_t duk_bi_textdecoder_prototype_decode(duk_hthread *thr) {
DUK_INTERNAL duk_ret_t duk_textdecoder_decode_utf8_nodejs(duk_hthread *thr) {
duk__decode_context dec_ctx;
- dec_ctx.fatal = 0; /* use replacement chars */
- dec_ctx.ignore_bom = 1; /* ignore BOMs (matches Node.js Buffer .toString()) */
+ dec_ctx.fatal = 0; /* use replacement chars */
+ dec_ctx.ignore_bom = 1; /* ignore BOMs (matches Node.js Buffer .toString()) */
duk__utf8_decode_init(&dec_ctx);
return duk__decode_helper(thr, &dec_ctx);
@@ -32787,9 +35812,8 @@ DUK_INTERNAL duk_ret_t duk_bi_error_constructor_shared(duk_hthread *thr) {
duk_small_int_t bidx_prototype = duk_get_current_magic(thr);
/* same for both error and each subclass like TypeError */
- duk_uint_t flags_and_class = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ERROR);
+ duk_uint_t flags_and_class =
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ERROR);
(void) duk_push_object_helper(thr, flags_and_class, bidx_prototype);
@@ -32798,7 +35822,7 @@ DUK_INTERNAL duk_ret_t duk_bi_error_constructor_shared(duk_hthread *thr) {
*/
if (!duk_is_undefined(thr, 0)) {
duk_to_string(thr, 0);
- duk_dup_0(thr); /* [ message error message ] */
+ duk_dup_0(thr); /* [ message error message ] */
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_MESSAGE, DUK_PROPDESC_FLAGS_WC);
}
@@ -32857,7 +35881,7 @@ DUK_INTERNAL duk_ret_t duk_bi_error_prototype_to_string(duk_hthread *thr) {
return 1;
}
duk_push_literal(thr, ": ");
- duk_insert(thr, -2); /* ... name ': ' message */
+ duk_insert(thr, -2); /* ... name ': ' message */
duk_concat(thr, 3);
return 1;
@@ -32880,15 +35904,15 @@ DUK_INTERNAL duk_ret_t duk_bi_error_prototype_to_string(duk_hthread *thr) {
*/
/* constants arbitrary, chosen for small loads */
-#define DUK__OUTPUT_TYPE_TRACEBACK (-1)
-#define DUK__OUTPUT_TYPE_FILENAME 0
-#define DUK__OUTPUT_TYPE_LINENUMBER 1
+#define DUK__OUTPUT_TYPE_TRACEBACK (-1)
+#define DUK__OUTPUT_TYPE_FILENAME 0
+#define DUK__OUTPUT_TYPE_LINENUMBER 1
DUK_LOCAL duk_ret_t duk__error_getter_helper(duk_hthread *thr, duk_small_int_t output_type) {
duk_idx_t idx_td;
- duk_small_int_t i; /* traceback depth fits into 16 bits */
- duk_small_int_t t; /* stack type fits into 16 bits */
- duk_small_int_t count_func = 0; /* traceback depth ensures fits into 16 bits */
+ duk_small_int_t i; /* traceback depth fits into 16 bits */
+ duk_small_int_t t; /* stack type fits into 16 bits */
+ duk_small_int_t count_func = 0; /* traceback depth ensures fits into 16 bits */
const char *str_tailcall = " tailcall";
const char *str_strict = " strict";
const char *str_construct = " construct";
@@ -32896,7 +35920,7 @@ DUK_LOCAL duk_ret_t duk__error_getter_helper(duk_hthread *thr, duk_small_int_t o
const char *str_directeval = " directeval";
const char *str_empty = "";
- DUK_ASSERT_TOP(thr, 0); /* fixed arg count */
+ DUK_ASSERT_TOP(thr, 0); /* fixed arg count */
duk_push_this(thr);
duk_xget_owndataprop_stridx_short(thr, -1, DUK_STRIDX_INT_TRACEDATA);
@@ -32911,7 +35935,7 @@ DUK_LOCAL duk_ret_t duk__error_getter_helper(duk_hthread *thr, duk_small_int_t o
if (duk_check_type(thr, idx_td, DUK_TYPE_OBJECT)) {
/* Current tracedata contains 2 entries per callstack entry. */
- for (i = 0; ; i += 2) {
+ for (i = 0;; i += 2) {
duk_int_t pc;
duk_uint_t line;
duk_uint_t flags;
@@ -32967,46 +35991,53 @@ DUK_LOCAL duk_ret_t duk__error_getter_helper(duk_hthread *thr, duk_small_int_t o
/* XXX: Change 'anon' handling here too, to use empty string for anonymous functions? */
/* XXX: Could be improved by coercing to a readable duk_tval (especially string escaping) */
- h_name = duk_get_hstring_notsymbol(thr, -2); /* may be NULL */
+ h_name = duk_get_hstring_notsymbol(thr, -2); /* may be NULL */
funcname = (h_name == NULL || h_name == DUK_HTHREAD_STRING_EMPTY_STRING(thr)) ?
- "[anon]" : (const char *) DUK_HSTRING_GET_DATA(h_name);
+ "[anon]" :
+ (const char *) DUK_HSTRING_GET_DATA(h_name);
filename = duk_get_string_notsymbol(thr, -1);
filename = filename ? filename : "";
DUK_ASSERT(funcname != NULL);
DUK_ASSERT(filename != NULL);
- h_func = duk_get_hobject(thr, -4); /* NULL for lightfunc */
+ h_func = duk_get_hobject(thr, -4); /* NULL for lightfunc */
if (h_func == NULL) {
- duk_push_sprintf(thr, "at %s light%s%s%s%s%s",
- (const char *) funcname,
- (const char *) ((flags & DUK_ACT_FLAG_STRICT) ? str_strict : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_TAILCALLED) ? str_tailcall : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_CONSTRUCT) ? str_construct : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_DIRECT_EVAL) ? str_directeval : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_PREVENT_YIELD) ? str_prevyield : str_empty));
+ duk_push_sprintf(
+ thr,
+ "at %s light%s%s%s%s%s",
+ (const char *) funcname,
+ (const char *) ((flags & DUK_ACT_FLAG_STRICT) ? str_strict : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_TAILCALLED) ? str_tailcall : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_CONSTRUCT) ? str_construct : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_DIRECT_EVAL) ? str_directeval : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_PREVENT_YIELD) ? str_prevyield : str_empty));
} else if (DUK_HOBJECT_HAS_NATFUNC(h_func)) {
- duk_push_sprintf(thr, "at %s (%s) native%s%s%s%s%s",
- (const char *) funcname,
- (const char *) filename,
- (const char *) ((flags & DUK_ACT_FLAG_STRICT) ? str_strict : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_TAILCALLED) ? str_tailcall : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_CONSTRUCT) ? str_construct : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_DIRECT_EVAL) ? str_directeval : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_PREVENT_YIELD) ? str_prevyield : str_empty));
+ duk_push_sprintf(
+ thr,
+ "at %s (%s) native%s%s%s%s%s",
+ (const char *) funcname,
+ (const char *) filename,
+ (const char *) ((flags & DUK_ACT_FLAG_STRICT) ? str_strict : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_TAILCALLED) ? str_tailcall : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_CONSTRUCT) ? str_construct : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_DIRECT_EVAL) ? str_directeval : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_PREVENT_YIELD) ? str_prevyield : str_empty));
} else {
- duk_push_sprintf(thr, "at %s (%s:%lu)%s%s%s%s%s",
- (const char *) funcname,
- (const char *) filename,
- (unsigned long) line,
- (const char *) ((flags & DUK_ACT_FLAG_STRICT) ? str_strict : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_TAILCALLED) ? str_tailcall : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_CONSTRUCT) ? str_construct : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_DIRECT_EVAL) ? str_directeval : str_empty),
- (const char *) ((flags & DUK_ACT_FLAG_PREVENT_YIELD) ? str_prevyield : str_empty));
+ duk_push_sprintf(
+ thr,
+ "at %s (%s:%lu)%s%s%s%s%s",
+ (const char *) funcname,
+ (const char *) filename,
+ (unsigned long) line,
+ (const char *) ((flags & DUK_ACT_FLAG_STRICT) ? str_strict : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_TAILCALLED) ? str_tailcall : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_CONSTRUCT) ? str_construct : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_DIRECT_EVAL) ? str_directeval : str_empty),
+ (const char *) ((flags & DUK_ACT_FLAG_PREVENT_YIELD) ? str_prevyield : str_empty));
}
- duk_replace(thr, -5); /* [ ... v1 v2 name filename str ] -> [ ... str v2 name filename ] */
- duk_pop_3(thr); /* -> [ ... str ] */
+ duk_replace(thr, -5); /* [ ... v1 v2 name filename str ] -> [ ... str v2 name filename ] */
+ duk_pop_3(thr); /* -> [ ... str ] */
} else if (t == DUK_TYPE_STRING) {
const char *str_file;
@@ -33037,10 +36068,12 @@ DUK_LOCAL duk_ret_t duk__error_getter_helper(duk_hthread *thr, duk_small_int_t o
* safety issues.
*/
str_file = (const char *) duk_get_string(thr, -2);
- duk_push_sprintf(thr, "at [anon] (%s:%ld) internal",
- (const char *) (str_file ? str_file : "null"), (long) pc);
- duk_replace(thr, -3); /* [ ... v1 v2 str ] -> [ ... str v2 ] */
- duk_pop(thr); /* -> [ ... str ] */
+ duk_push_sprintf(thr,
+ "at [anon] (%s:%ld) internal",
+ (const char *) (str_file ? str_file : "null"),
+ (long) pc);
+ duk_replace(thr, -3); /* [ ... v1 v2 str ] -> [ ... str v2 ] */
+ duk_pop(thr); /* -> [ ... str ] */
} else {
/* unknown, ignore */
duk_pop_2(thr);
@@ -33087,7 +36120,7 @@ DUK_INTERNAL duk_ret_t duk_bi_error_prototype_linenumber_getter(duk_hthread *thr
return duk__error_getter_helper(thr, DUK__OUTPUT_TYPE_LINENUMBER);
}
-#else /* DUK_USE_TRACEBACKS */
+#else /* DUK_USE_TRACEBACKS */
/*
* Traceback handling when tracebacks disabled.
@@ -33118,7 +36151,7 @@ DUK_INTERNAL duk_ret_t duk_bi_error_prototype_linenumber_getter(duk_hthread *thr
return 0;
}
-#endif /* DUK_USE_TRACEBACKS */
+#endif /* DUK_USE_TRACEBACKS */
DUK_LOCAL duk_ret_t duk__error_setter_helper(duk_hthread *thr, duk_small_uint_t stridx_key) {
/* Attempt to write 'stack', 'fileName', 'lineNumber' works as if
@@ -33128,7 +36161,7 @@ DUK_LOCAL duk_ret_t duk__error_setter_helper(duk_hthread *thr, duk_small_uint_t
* See https://github.com/svaarala/duktape/issues/387.
*/
- DUK_ASSERT_TOP(thr, 1); /* fixed arg count: value */
+ DUK_ASSERT_TOP(thr, 1); /* fixed arg count: value */
duk_push_this(thr);
duk_push_hstring_stridx(thr, stridx_key);
@@ -33136,13 +36169,13 @@ DUK_LOCAL duk_ret_t duk__error_setter_helper(duk_hthread *thr, duk_small_uint_t
/* [ ... obj key value ] */
- DUK_DD(DUK_DDPRINT("error setter: %!T %!T %!T",
- duk_get_tval(thr, -3), duk_get_tval(thr, -2), duk_get_tval(thr, -1)));
+ DUK_DD(DUK_DDPRINT("error setter: %!T %!T %!T", duk_get_tval(thr, -3), duk_get_tval(thr, -2), duk_get_tval(thr, -1)));
- duk_def_prop(thr, -3, DUK_DEFPROP_HAVE_VALUE |
- DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_WRITABLE |
- DUK_DEFPROP_HAVE_ENUMERABLE | /*not enumerable*/
- DUK_DEFPROP_HAVE_CONFIGURABLE | DUK_DEFPROP_CONFIGURABLE);
+ duk_def_prop(thr,
+ -3,
+ DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_WRITABLE |
+ DUK_DEFPROP_HAVE_ENUMERABLE | /*not enumerable*/
+ DUK_DEFPROP_HAVE_CONFIGURABLE | DUK_DEFPROP_CONFIGURABLE);
return 0;
}
@@ -33189,7 +36222,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_constructor(duk_hthread *thr) {
nargs = duk_get_top(thr);
for (i = 0; i < nargs; i++) {
- duk_to_string(thr, i); /* Rejects Symbols during coercion. */
+ duk_to_string(thr, i); /* Rejects Symbols during coercion. */
}
if (nargs == 0) {
@@ -33199,7 +36232,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_constructor(duk_hthread *thr) {
/* XXX: cover this with the generic >1 case? */
duk_push_hstring_empty(thr);
} else {
- duk_insert(thr, 0); /* [ arg1 ... argN-1 body] -> [body arg1 ... argN-1] */
+ duk_insert(thr, 0); /* [ arg1 ... argN-1 body] -> [body arg1 ... argN-1] */
duk_push_literal(thr, ",");
duk_insert(thr, 1);
duk_join(thr, nargs - 1);
@@ -33216,7 +36249,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_constructor(duk_hthread *thr) {
duk_dup_1(thr);
duk_push_literal(thr, "){");
duk_dup_0(thr);
- duk_push_literal(thr, "\n}"); /* Newline is important to handle trailing // comment. */
+ duk_push_literal(thr, "\n}"); /* Newline is important to handle trailing // comment. */
duk_concat(thr, 5);
/* [ body formals source ] */
@@ -33226,8 +36259,8 @@ DUK_INTERNAL duk_ret_t duk_bi_function_constructor(duk_hthread *thr) {
/* strictness is not inherited, intentional */
comp_flags = DUK_COMPILE_FUNCEXPR;
- duk_push_hstring_stridx(thr, DUK_STRIDX_COMPILE); /* XXX: copy from caller? */ /* XXX: ignored now */
- h_sourcecode = duk_require_hstring(thr, -2); /* no symbol check needed; -2 is concat'd code */
+ duk_push_hstring_stridx(thr, DUK_STRIDX_COMPILE); /* XXX: copy from caller? */ /* XXX: ignored now */
+ h_sourcecode = duk_require_hstring(thr, -2); /* no symbol check needed; -2 is concat'd code */
duk_js_compile(thr,
(const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_sourcecode),
(duk_size_t) DUK_HSTRING_GET_BYTELEN(h_sourcecode),
@@ -33256,7 +36289,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_constructor(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_FUNCTION_BUILTIN */
+#endif /* DUK_USE_FUNCTION_BUILTIN */
#if defined(DUK_USE_FUNCTION_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_function_prototype_to_string(duk_hthread *thr) {
@@ -33322,7 +36355,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_to_string(duk_hthread *thr) {
return 1;
- type_error:
+type_error:
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
}
#endif
@@ -33364,7 +36397,7 @@ DUK_INTERNAL duk_ret_t duk_bi_reflect_construct(duk_hthread *thr) {
*/
DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
duk_hboundfunc *h_bound;
- duk_idx_t nargs; /* bound args, not counting 'this' binding */
+ duk_idx_t nargs; /* bound args, not counting 'this' binding */
duk_idx_t bound_nargs;
duk_int_t bound_len;
duk_tval *tv_prevbound;
@@ -33377,7 +36410,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
/* Vararg function, careful arg handling, e.g. thisArg may not
* be present.
*/
- nargs = duk_get_top(thr) - 1; /* actual args, not counting 'this' binding */
+ nargs = duk_get_top(thr) - 1; /* actual args, not counting 'this' binding */
if (nargs < 0) {
nargs++;
duk_push_undefined(thr);
@@ -33472,7 +36505,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
DUK_HOBJECT_SET_PROTOTYPE_INIT_INCREF(thr, (duk_hobject *) h_bound, bound_proto);
}
- DUK_TVAL_INCREF(thr, &h_bound->target); /* old values undefined, no decref needed */
+ DUK_TVAL_INCREF(thr, &h_bound->target); /* old values undefined, no decref needed */
DUK_TVAL_INCREF(thr, &h_bound->this_binding);
bound_nargs = n_prevbound + nargs;
@@ -33497,7 +36530,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
* For lightfuncs, simply read the virtual property.
*/
duk_get_prop_stridx_short(thr, -2, DUK_STRIDX_LENGTH);
- bound_len = duk_get_int(thr, -1); /* ES2015: no coercion */
+ bound_len = duk_get_int(thr, -1); /* ES2015: no coercion */
if (bound_len < nargs) {
bound_len = 0;
} else {
@@ -33511,8 +36544,8 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
tv_tmp = thr->valstack_top++;
DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(tv_tmp));
DUK_ASSERT(!DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv_tmp));
- DUK_TVAL_SET_U32(tv_tmp, (duk_uint32_t) bound_len); /* in-place update, fastint */
- duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_LENGTH, DUK_PROPDESC_FLAGS_C); /* attrs in E6 Section 9.2.4 */
+ DUK_TVAL_SET_U32(tv_tmp, (duk_uint32_t) bound_len); /* in-place update, fastint */
+ duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_LENGTH, DUK_PROPDESC_FLAGS_C); /* attrs in E6 Section 9.2.4 */
/* XXX: could these be virtual? */
/* Caller and arguments must use the same thrower, [[ThrowTypeError]]. */
@@ -33520,7 +36553,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
duk_xdef_prop_stridx_thrower(thr, -1, DUK_STRIDX_LC_ARGUMENTS);
/* Function name and fileName (non-standard). */
- duk_push_literal(thr, "bound "); /* ES2015 19.2.3.2. */
+ duk_push_literal(thr, "bound "); /* ES2015 19.2.3.2. */
duk_get_prop_stridx(thr, -3, DUK_STRIDX_NAME);
if (!duk_is_string_notsymbol(thr, -1)) {
/* ES2015 has requirement to check that .name of target is a string
@@ -33541,7 +36574,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_bind(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_FUNCTION_BUILTIN */
+#endif /* DUK_USE_FUNCTION_BUILTIN */
/* %NativeFunctionPrototype% .length getter. */
DUK_INTERNAL duk_ret_t duk_bi_native_function_length(duk_hthread *thr) {
@@ -33572,7 +36605,7 @@ DUK_INTERNAL duk_ret_t duk_bi_native_function_length(duk_hthread *thr) {
}
return 1;
- fail_type:
+fail_type:
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
}
@@ -33601,7 +36634,7 @@ DUK_INTERNAL duk_ret_t duk_bi_native_function_name(duk_hthread *thr) {
}
return 1;
- fail_type:
+fail_type:
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
}
@@ -33614,7 +36647,7 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_hasinstance(duk_hthread *thr) {
duk_push_boolean(thr, ret);
return 1;
}
-#endif /* DUK_USE_SYMBOL_BUILTIN */
+#endif /* DUK_USE_SYMBOL_BUILTIN */
/*
* Global object built-ins
*/
@@ -33633,73 +36666,71 @@ DUK_INTERNAL duk_ret_t duk_bi_function_prototype_hasinstance(duk_hthread *thr) {
/* Macros for creating and checking bitmasks for character encoding.
* Bit number is a bit counterintuitive, but minimizes code size.
*/
-#define DUK__MKBITS(a,b,c,d,e,f,g,h) ((duk_uint8_t) ( \
- ((a) << 0) | ((b) << 1) | ((c) << 2) | ((d) << 3) | \
- ((e) << 4) | ((f) << 5) | ((g) << 6) | ((h) << 7) \
- ))
-#define DUK__CHECK_BITMASK(table,cp) ((table)[(cp) >> 3] & (1 << ((cp) & 0x07)))
+#define DUK__MKBITS(a, b, c, d, e, f, g, h) \
+ ((duk_uint8_t) (((a) << 0) | ((b) << 1) | ((c) << 2) | ((d) << 3) | ((e) << 4) | ((f) << 5) | ((g) << 6) | ((h) << 7)))
+#define DUK__CHECK_BITMASK(table, cp) ((table)[(cp) >> 3] & (1 << ((cp) &0x07)))
/* E5.1 Section 15.1.3.3: uriReserved + uriUnescaped + '#' */
DUK_LOCAL const duk_uint8_t duk__encode_uriunescaped_table[16] = {
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
- DUK__MKBITS(0, 1, 0, 1, 1, 0, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x20-0x2f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
- DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
+ DUK__MKBITS(0, 1, 0, 1, 1, 0, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x20-0x2f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
+ DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
};
/* E5.1 Section 15.1.3.4: uriUnescaped */
DUK_LOCAL const duk_uint8_t duk__encode_uricomponent_unescaped_table[16] = {
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
- DUK__MKBITS(0, 1, 0, 0, 0, 0, 0, 1), DUK__MKBITS(1, 1, 1, 0, 0, 1, 1, 0), /* 0x20-0x2f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
- DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
- DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
+ DUK__MKBITS(0, 1, 0, 0, 0, 0, 0, 1), DUK__MKBITS(1, 1, 1, 0, 0, 1, 1, 0), /* 0x20-0x2f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
+ DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
+ DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 1, 0), /* 0x70-0x7f */
};
/* E5.1 Section 15.1.3.1: uriReserved + '#' */
DUK_LOCAL const duk_uint8_t duk__decode_uri_reserved_table[16] = {
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
- DUK__MKBITS(0, 0, 0, 1, 1, 0, 1, 0), DUK__MKBITS(0, 0, 0, 1, 1, 0, 0, 1), /* 0x20-0x2f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
- DUK__MKBITS(1, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
+ DUK__MKBITS(0, 0, 0, 1, 1, 0, 1, 0), DUK__MKBITS(0, 0, 0, 1, 1, 0, 0, 1), /* 0x20-0x2f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 1, 1, 0, 1, 0, 1), /* 0x30-0x3f */
+ DUK__MKBITS(1, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
};
/* E5.1 Section 15.1.3.2: empty */
DUK_LOCAL const duk_uint8_t duk__decode_uri_component_reserved_table[16] = {
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x20-0x2f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x20-0x2f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x40-0x4f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x50-0x5f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x60-0x6f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x70-0x7f */
};
#if defined(DUK_USE_SECTION_B)
/* E5.1 Section B.2.2, step 7. */
DUK_LOCAL const duk_uint8_t duk__escape_unescaped_table[16] = {
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
- DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 1, 1, 0, 1, 1, 1), /* 0x20-0x2f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
- DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
- DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 0) /* 0x70-0x7f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x00-0x0f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), /* 0x10-0x1f */
+ DUK__MKBITS(0, 0, 0, 0, 0, 0, 0, 0), DUK__MKBITS(0, 0, 1, 1, 0, 1, 1, 1), /* 0x20-0x2f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 0, 0, 0, 0, 0, 0), /* 0x30-0x3f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x40-0x4f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 1), /* 0x50-0x5f */
+ DUK__MKBITS(0, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), /* 0x60-0x6f */
+ DUK__MKBITS(1, 1, 1, 1, 1, 1, 1, 1), DUK__MKBITS(1, 1, 1, 0, 0, 0, 0, 0) /* 0x70-0x7f */
};
-#endif /* DUK_USE_SECTION_B */
+#endif /* DUK_USE_SECTION_B */
typedef struct {
duk_hthread *thr;
@@ -33740,7 +36771,7 @@ DUK_LOCAL int duk__transform_helper(duk_hthread *thr, duk__transform_callback ca
tfm_ctx->h_str = duk_to_hstring(thr, 0);
DUK_ASSERT(tfm_ctx->h_str != NULL);
- DUK_BW_INIT_PUSHBUF(thr, &tfm_ctx->bw, DUK_HSTRING_GET_BYTELEN(tfm_ctx->h_str)); /* initial size guess */
+ DUK_BW_INIT_PUSHBUF(thr, &tfm_ctx->bw, DUK_HSTRING_GET_BYTELEN(tfm_ctx->h_str)); /* initial size guess */
tfm_ctx->p_start = DUK_HSTRING_GET_DATA(tfm_ctx->h_str);
tfm_ctx->p_end = tfm_ctx->p_start + DUK_HSTRING_GET_BYTELEN(tfm_ctx->h_str);
@@ -33753,7 +36784,7 @@ DUK_LOCAL int duk__transform_helper(duk_hthread *thr, duk__transform_callback ca
DUK_BW_COMPACT(thr, &tfm_ctx->bw);
- (void) duk_buffer_to_string(thr, -1); /* Safe if transform is safe. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe if transform is safe. */
return 1;
}
@@ -33779,7 +36810,11 @@ DUK_LOCAL void duk__transform_callback_encode_uri(duk__transform_context *tfm_ct
goto uri_error;
} else if (cp >= 0xd800L && cp <= 0xdbffL) {
/* Needs lookahead */
- if (duk_unicode_decode_xutf8(tfm_ctx->thr, &tfm_ctx->p, tfm_ctx->p_start, tfm_ctx->p_end, (duk_ucodepoint_t *) &cp2) == 0) {
+ if (duk_unicode_decode_xutf8(tfm_ctx->thr,
+ &tfm_ctx->p,
+ tfm_ctx->p_start,
+ tfm_ctx->p_end,
+ (duk_ucodepoint_t *) &cp2) == 0) {
goto uri_error;
}
if (!(cp2 >= 0xdc00L && cp2 <= 0xdfffL)) {
@@ -33810,12 +36845,12 @@ DUK_LOCAL void duk__transform_callback_encode_uri(duk__transform_context *tfm_ct
&tfm_ctx->bw,
DUK_ASC_PERCENT,
(duk_uint8_t) duk_uc_nybbles[t >> 4],
- (duk_uint8_t) duk_uc_nybbles[t & 0x0f]);
+ (duk_uint8_t) duk_uc_nybbles[t & 0x0f]);
}
return;
- uri_error:
+uri_error:
DUK_ERROR_URI(tfm_ctx->thr, DUK_STR_INVALID_INPUT);
DUK_WO_NORETURN(return;);
}
@@ -33824,7 +36859,7 @@ DUK_LOCAL void duk__transform_callback_decode_uri(duk__transform_context *tfm_ct
const duk_uint8_t *reserved_table = (const duk_uint8_t *) udata;
duk_small_uint_t utf8_blen;
duk_codepoint_t min_cp;
- duk_small_int_t t; /* must be signed */
+ duk_small_int_t t; /* must be signed */
duk_small_uint_t i;
/* Maximum write size: XUTF8 path writes max DUK_UNICODE_MAX_XUTF8_LENGTH,
@@ -33832,12 +36867,12 @@ DUK_LOCAL void duk__transform_callback_decode_uri(duk__transform_context *tfm_ct
*/
DUK_BW_ENSURE(tfm_ctx->thr,
&tfm_ctx->bw,
- (DUK_UNICODE_MAX_XUTF8_LENGTH >= 2 * DUK_UNICODE_MAX_CESU8_BMP_LENGTH ?
- DUK_UNICODE_MAX_XUTF8_LENGTH : DUK_UNICODE_MAX_CESU8_BMP_LENGTH));
+ (DUK_UNICODE_MAX_XUTF8_LENGTH >= 2 * DUK_UNICODE_MAX_CESU8_BMP_LENGTH ? DUK_UNICODE_MAX_XUTF8_LENGTH :
+ DUK_UNICODE_MAX_CESU8_BMP_LENGTH));
if (cp == (duk_codepoint_t) '%') {
const duk_uint8_t *p = tfm_ctx->p;
- duk_size_t left = (duk_size_t) (tfm_ctx->p_end - p); /* bytes left */
+ duk_size_t left = (duk_size_t) (tfm_ctx->p_end - p); /* bytes left */
DUK_DDD(DUK_DDDPRINT("percent encoding, left=%ld", (long) left));
@@ -33855,11 +36890,7 @@ DUK_LOCAL void duk__transform_callback_decode_uri(duk__transform_context *tfm_ct
if (DUK__CHECK_BITMASK(reserved_table, t)) {
/* decode '%xx' to '%xx' if decoded char in reserved set */
DUK_ASSERT(tfm_ctx->p - 1 >= tfm_ctx->p_start);
- DUK_BW_WRITE_RAW_U8_3(tfm_ctx->thr,
- &tfm_ctx->bw,
- DUK_ASC_PERCENT,
- p[0],
- p[1]);
+ DUK_BW_WRITE_RAW_U8_3(tfm_ctx->thr, &tfm_ctx->bw, DUK_ASC_PERCENT, p[0], p[1]);
} else {
DUK_BW_WRITE_RAW_U8(tfm_ctx->thr, &tfm_ctx->bw, (duk_uint8_t) t);
}
@@ -33910,7 +36941,10 @@ DUK_LOCAL void duk__transform_callback_decode_uri(duk__transform_context *tfm_ct
/* p points to digit part ('%xy', p points to 'x') */
t = duk__decode_hex_escape(p, 2);
DUK_DDD(DUK_DDDPRINT("i=%ld utf8_blen=%ld cp=%ld t=0x%02lx",
- (long) i, (long) utf8_blen, (long) cp, (unsigned long) t));
+ (long) i,
+ (long) utf8_blen,
+ (long) cp,
+ (unsigned long) t));
if (t < 0) {
goto uri_error;
}
@@ -33920,7 +36954,7 @@ DUK_LOCAL void duk__transform_callback_decode_uri(duk__transform_context *tfm_ct
cp = (cp << 6) + (t & 0x3f);
p += 3;
}
- p--; /* p overshoots */
+ p--; /* p overshoots */
tfm_ctx->p = p;
DUK_DDD(DUK_DDDPRINT("final cp=%ld, min_cp=%ld", (long) cp, (long) min_cp));
@@ -33954,7 +36988,7 @@ DUK_LOCAL void duk__transform_callback_decode_uri(duk__transform_context *tfm_ct
}
return;
- uri_error:
+uri_error:
DUK_ERROR_URI(tfm_ctx->thr, DUK_STR_INVALID_INPUT);
DUK_WO_NORETURN(return;);
}
@@ -33995,7 +37029,7 @@ DUK_LOCAL void duk__transform_callback_escape(duk__transform_context *tfm_ctx, c
return;
- esc_error:
+esc_error:
DUK_ERROR_TYPE(tfm_ctx->thr, DUK_STR_INVALID_INPUT);
DUK_WO_NORETURN(return;);
}
@@ -34007,14 +37041,12 @@ DUK_LOCAL void duk__transform_callback_unescape(duk__transform_context *tfm_ctx,
if (cp == (duk_codepoint_t) '%') {
const duk_uint8_t *p = tfm_ctx->p;
- duk_size_t left = (duk_size_t) (tfm_ctx->p_end - p); /* bytes left */
+ duk_size_t left = (duk_size_t) (tfm_ctx->p_end - p); /* bytes left */
- if (left >= 5 && p[0] == 'u' &&
- ((t = duk__decode_hex_escape(p + 1, 4)) >= 0)) {
+ if (left >= 5 && p[0] == 'u' && ((t = duk__decode_hex_escape(p + 1, 4)) >= 0)) {
cp = (duk_codepoint_t) t;
tfm_ctx->p += 5;
- } else if (left >= 2 &&
- ((t = duk__decode_hex_escape(p, 2)) >= 0)) {
+ } else if (left >= 2 && ((t = duk__decode_hex_escape(p, 2)) >= 0)) {
cp = (duk_codepoint_t) t;
tfm_ctx->p += 2;
}
@@ -34022,7 +37054,7 @@ DUK_LOCAL void duk__transform_callback_unescape(duk__transform_context *tfm_ctx,
DUK_BW_WRITE_ENSURE_XUTF8(tfm_ctx->thr, &tfm_ctx->bw, cp);
}
-#endif /* DUK_USE_SECTION_B */
+#endif /* DUK_USE_SECTION_B */
/*
* Eval
@@ -34047,11 +37079,11 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_hthread *thr) {
duk_int_t level = -2;
duk_small_uint_t call_flags;
- DUK_ASSERT(duk_get_top(thr) == 1 || duk_get_top(thr) == 2); /* 2 when called by debugger */
- DUK_ASSERT(thr->callstack_top >= 1); /* at least this function exists */
+ DUK_ASSERT(duk_get_top(thr) == 1 || duk_get_top(thr) == 2); /* 2 when called by debugger */
+ DUK_ASSERT(thr->callstack_top >= 1); /* at least this function exists */
DUK_ASSERT(thr->callstack_curr != NULL);
DUK_ASSERT((thr->callstack_curr->flags & DUK_ACT_FLAG_DIRECT_EVAL) == 0 || /* indirect eval */
- (thr->callstack_top >= 2)); /* if direct eval, calling activation must exist */
+ (thr->callstack_top >= 2)); /* if direct eval, calling activation must exist */
/*
* callstack_top - 1 --> this function
@@ -34064,32 +37096,31 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_hthread *thr) {
h = duk_get_hstring_notsymbol(thr, 0);
if (!h) {
/* Symbol must be returned as is, like any non-string values. */
- return 1; /* return arg as-is */
+ return 1; /* return arg as-is */
}
#if defined(DUK_USE_DEBUGGER_SUPPORT)
/* NOTE: level is used only by the debugger and should never be present
* for an ECMAScript eval().
*/
- DUK_ASSERT(level == -2); /* by default, use caller's environment */
+ DUK_ASSERT(level == -2); /* by default, use caller's environment */
if (duk_get_top(thr) >= 2 && duk_is_number(thr, 1)) {
level = duk_get_int(thr, 1);
}
- DUK_ASSERT(level <= -2); /* This is guaranteed by debugger code. */
+ DUK_ASSERT(level <= -2); /* This is guaranteed by debugger code. */
#endif
/* [ source ] */
comp_flags = DUK_COMPILE_EVAL;
- act_eval = thr->callstack_curr; /* this function */
+ act_eval = thr->callstack_curr; /* this function */
DUK_ASSERT(act_eval != NULL);
act_caller = duk_hthread_get_activation_for_level(thr, level);
if (act_caller != NULL) {
/* Have a calling activation, check for direct eval (otherwise
* assume indirect eval.
*/
- if ((act_caller->flags & DUK_ACT_FLAG_STRICT) &&
- (act_eval->flags & DUK_ACT_FLAG_DIRECT_EVAL)) {
+ if ((act_caller->flags & DUK_ACT_FLAG_STRICT) && (act_eval->flags & DUK_ACT_FLAG_DIRECT_EVAL)) {
/* Only direct eval inherits strictness from calling code
* (E5.1 Section 10.1.1).
*/
@@ -34099,11 +37130,8 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_hthread *thr) {
DUK_ASSERT((act_eval->flags & DUK_ACT_FLAG_DIRECT_EVAL) == 0);
}
- duk_push_hstring_stridx(thr, DUK_STRIDX_INPUT); /* XXX: copy from caller? */
- duk_js_compile(thr,
- (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h),
- (duk_size_t) DUK_HSTRING_GET_BYTELEN(h),
- comp_flags);
+ duk_push_hstring_stridx(thr, DUK_STRIDX_INPUT); /* XXX: copy from caller? */
+ duk_js_compile(thr, (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h), (duk_size_t) DUK_HSTRING_GET_BYTELEN(h), comp_flags);
func = (duk_hcompfunc *) duk_known_hobject(thr, -1);
DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC((duk_hobject *) func));
@@ -34136,9 +37164,9 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_hthread *thr) {
act_lex_env = act_caller->lex_env;
- new_env = duk_hdecenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
+ new_env =
+ duk_hdecenv_alloc(thr,
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
DUK_ASSERT(new_env != NULL);
duk_push_hobject(thr, (duk_hobject *) new_env);
@@ -34150,7 +37178,7 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_hthread *thr) {
outer_lex_env = (duk_hobject *) new_env;
outer_var_env = (duk_hobject *) new_env;
- duk_insert(thr, 0); /* stash to bottom of value stack to keep new_env reachable for duration of eval */
+ duk_insert(thr, 0); /* stash to bottom of value stack to keep new_env reachable for duration of eval */
/* compiler's responsibility */
DUK_ASSERT(DUK_HOBJECT_HAS_NEWENV((duk_hobject *) func));
@@ -34186,7 +37214,8 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_eval(duk_hthread *thr) {
duk_tval *tv;
DUK_ASSERT(thr->callstack_top >= 2);
DUK_ASSERT(act_caller != NULL);
- tv = (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + act_caller->bottom_byteoff - sizeof(duk_tval)); /* this is just beneath bottom */
+ tv = (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + act_caller->bottom_byteoff -
+ sizeof(duk_tval)); /* this is just beneath bottom */
DUK_ASSERT(tv >= thr->valstack);
duk_push_tval(thr, tv);
}
@@ -34225,19 +37254,15 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_parse_int(duk_hthread *thr) {
duk_small_uint_t s2n_flags;
DUK_ASSERT_TOP(thr, 2);
- duk_to_string(thr, 0); /* Reject symbols. */
+ duk_to_string(thr, 0); /* Reject symbols. */
radix = duk_to_int32(thr, 1);
/* While parseInt() recognizes 0xdeadbeef, it doesn't recognize
* ES2015 0o123 or 0b10001.
*/
- s2n_flags = DUK_S2N_FLAG_TRIM_WHITE |
- DUK_S2N_FLAG_ALLOW_GARBAGE |
- DUK_S2N_FLAG_ALLOW_PLUS |
- DUK_S2N_FLAG_ALLOW_MINUS |
- DUK_S2N_FLAG_ALLOW_LEADING_ZERO |
- DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT;
+ s2n_flags = DUK_S2N_FLAG_TRIM_WHITE | DUK_S2N_FLAG_ALLOW_GARBAGE | DUK_S2N_FLAG_ALLOW_PLUS | DUK_S2N_FLAG_ALLOW_MINUS |
+ DUK_S2N_FLAG_ALLOW_LEADING_ZERO | DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT;
/* Specification stripPrefix maps to DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT.
*
@@ -34261,35 +37286,28 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_parse_int(duk_hthread *thr) {
duk_numconv_parse(thr, (duk_small_int_t) radix, s2n_flags);
return 1;
- ret_nan:
+ret_nan:
duk_push_nan(thr);
return 1;
}
-#endif /* DUK_USE_GLOBAL_BUILTIN */
+#endif /* DUK_USE_GLOBAL_BUILTIN */
#if defined(DUK_USE_GLOBAL_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_global_object_parse_float(duk_hthread *thr) {
duk_small_uint_t s2n_flags;
DUK_ASSERT_TOP(thr, 1);
- duk_to_string(thr, 0); /* Reject symbols. */
+ duk_to_string(thr, 0); /* Reject symbols. */
/* XXX: check flags */
- s2n_flags = DUK_S2N_FLAG_TRIM_WHITE |
- DUK_S2N_FLAG_ALLOW_EXP |
- DUK_S2N_FLAG_ALLOW_GARBAGE |
- DUK_S2N_FLAG_ALLOW_PLUS |
- DUK_S2N_FLAG_ALLOW_MINUS |
- DUK_S2N_FLAG_ALLOW_INF |
- DUK_S2N_FLAG_ALLOW_FRAC |
- DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
- DUK_S2N_FLAG_ALLOW_EMPTY_FRAC |
- DUK_S2N_FLAG_ALLOW_LEADING_ZERO;
+ s2n_flags = DUK_S2N_FLAG_TRIM_WHITE | DUK_S2N_FLAG_ALLOW_EXP | DUK_S2N_FLAG_ALLOW_GARBAGE | DUK_S2N_FLAG_ALLOW_PLUS |
+ DUK_S2N_FLAG_ALLOW_MINUS | DUK_S2N_FLAG_ALLOW_INF | DUK_S2N_FLAG_ALLOW_FRAC | DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
+ DUK_S2N_FLAG_ALLOW_EMPTY_FRAC | DUK_S2N_FLAG_ALLOW_LEADING_ZERO;
duk_numconv_parse(thr, 10 /*radix*/, s2n_flags);
return 1;
}
-#endif /* DUK_USE_GLOBAL_BUILTIN */
+#endif /* DUK_USE_GLOBAL_BUILTIN */
/*
* Number checkers
@@ -34301,7 +37319,7 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_is_nan(duk_hthread *thr) {
duk_push_boolean(thr, (duk_bool_t) DUK_ISNAN(d));
return 1;
}
-#endif /* DUK_USE_GLOBAL_BUILTIN */
+#endif /* DUK_USE_GLOBAL_BUILTIN */
#if defined(DUK_USE_GLOBAL_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_global_object_is_finite(duk_hthread *thr) {
@@ -34309,7 +37327,7 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_is_finite(duk_hthread *thr) {
duk_push_boolean(thr, (duk_bool_t) DUK_ISFINITE(d));
return 1;
}
-#endif /* DUK_USE_GLOBAL_BUILTIN */
+#endif /* DUK_USE_GLOBAL_BUILTIN */
/*
* URI handling
@@ -34321,7 +37339,9 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_decode_uri(duk_hthread *thr) {
}
DUK_INTERNAL duk_ret_t duk_bi_global_object_decode_uri_component(duk_hthread *thr) {
- return duk__transform_helper(thr, duk__transform_callback_decode_uri, (const void *) duk__decode_uri_component_reserved_table);
+ return duk__transform_helper(thr,
+ duk__transform_callback_decode_uri,
+ (const void *) duk__decode_uri_component_reserved_table);
}
DUK_INTERNAL duk_ret_t duk_bi_global_object_encode_uri(duk_hthread *thr) {
@@ -34329,7 +37349,9 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_encode_uri(duk_hthread *thr) {
}
DUK_INTERNAL duk_ret_t duk_bi_global_object_encode_uri_component(duk_hthread *thr) {
- return duk__transform_helper(thr, duk__transform_callback_encode_uri, (const void *) duk__encode_uricomponent_unescaped_table);
+ return duk__transform_helper(thr,
+ duk__transform_callback_encode_uri,
+ (const void *) duk__encode_uricomponent_unescaped_table);
}
#if defined(DUK_USE_SECTION_B)
@@ -34340,8 +37362,8 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_escape(duk_hthread *thr) {
DUK_INTERNAL duk_ret_t duk_bi_global_object_unescape(duk_hthread *thr) {
return duk__transform_helper(thr, duk__transform_callback_unescape, (const void *) NULL);
}
-#endif /* DUK_USE_SECTION_B */
-#endif /* DUK_USE_GLOBAL_BUILTIN */
+#endif /* DUK_USE_SECTION_B */
+#endif /* DUK_USE_GLOBAL_BUILTIN */
/* automatic undefs */
#undef DUK__CHECK_BITMASK
@@ -34370,34 +37392,34 @@ DUK_INTERNAL duk_ret_t duk_bi_global_object_unescape(duk_hthread *thr) {
* Local defines and forward declarations.
*/
-#define DUK__JSON_DECSTR_BUFSIZE 128
-#define DUK__JSON_DECSTR_CHUNKSIZE 64
-#define DUK__JSON_ENCSTR_CHUNKSIZE 64
+#define DUK__JSON_DECSTR_BUFSIZE 128
+#define DUK__JSON_DECSTR_CHUNKSIZE 64
+#define DUK__JSON_ENCSTR_CHUNKSIZE 64
#define DUK__JSON_STRINGIFY_BUFSIZE 128
-#define DUK__JSON_MAX_ESC_LEN 10 /* '\Udeadbeef' */
+#define DUK__JSON_MAX_ESC_LEN 10 /* '\Udeadbeef' */
-DUK_LOCAL_DECL void duk__dec_syntax_error(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_eat_white(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_syntax_error(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_eat_white(duk_json_dec_ctx *js_ctx);
#if defined(DUK_USE_JX)
-DUK_LOCAL_DECL duk_uint8_t duk__dec_peek(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL duk_uint8_t duk__json_dec_peek(duk_json_dec_ctx *js_ctx);
#endif
-DUK_LOCAL_DECL duk_uint8_t duk__dec_get(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL duk_uint8_t duk__dec_get_nonwhite(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL duk_uint_fast32_t duk__dec_decode_hex_escape(duk_json_dec_ctx *js_ctx, duk_small_uint_t n);
-DUK_LOCAL_DECL void duk__dec_req_stridx(duk_json_dec_ctx *js_ctx, duk_small_uint_t stridx);
-DUK_LOCAL_DECL void duk__dec_string(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL duk_uint8_t duk__json_dec_get(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL duk_uint8_t duk__json_dec_get_nonwhite(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL duk_uint_fast32_t duk__json_dec_decode_hex_escape(duk_json_dec_ctx *js_ctx, duk_small_uint_t n);
+DUK_LOCAL_DECL void duk__json_dec_req_stridx(duk_json_dec_ctx *js_ctx, duk_small_uint_t stridx);
+DUK_LOCAL_DECL void duk__json_dec_string(duk_json_dec_ctx *js_ctx);
#if defined(DUK_USE_JX)
-DUK_LOCAL_DECL void duk__dec_plain_string(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_pointer(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_buffer(duk_json_dec_ctx *js_ctx);
-#endif
-DUK_LOCAL_DECL void duk__dec_number(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_objarr_entry(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_objarr_exit(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_object(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_array(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_value(duk_json_dec_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__dec_reviver_walk(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_plain_string(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_pointer(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_buffer(duk_json_dec_ctx *js_ctx);
+#endif
+DUK_LOCAL_DECL void duk__json_dec_number(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_objarr_entry(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_objarr_exit(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_object(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_array(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_value(duk_json_dec_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_dec_reviver_walk(duk_json_dec_ctx *js_ctx);
DUK_LOCAL_DECL void duk__emit_1(duk_json_enc_ctx *js_ctx, duk_uint_fast8_t ch);
DUK_LOCAL_DECL void duk__emit_2(duk_json_enc_ctx *js_ctx, duk_uint_fast8_t ch1, duk_uint_fast8_t ch2);
@@ -34408,29 +37430,29 @@ DUK_LOCAL_DECL void duk__emit_cstring(duk_json_enc_ctx *js_ctx, const char *p);
#endif
DUK_LOCAL_DECL void duk__emit_stridx(duk_json_enc_ctx *js_ctx, duk_small_uint_t stridx);
DUK_LOCAL_DECL duk_uint8_t *duk__emit_esc_auto_fast(duk_json_enc_ctx *js_ctx, duk_uint_fast32_t cp, duk_uint8_t *q);
-DUK_LOCAL_DECL void duk__enc_key_autoquote(duk_json_enc_ctx *js_ctx, duk_hstring *k);
-DUK_LOCAL_DECL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_str);
-DUK_LOCAL_DECL void duk__enc_objarr_entry(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top);
-DUK_LOCAL_DECL void duk__enc_objarr_exit(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top);
-DUK_LOCAL_DECL void duk__enc_object(duk_json_enc_ctx *js_ctx);
-DUK_LOCAL_DECL void duk__enc_array(duk_json_enc_ctx *js_ctx);
-DUK_LOCAL_DECL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_holder);
-DUK_LOCAL_DECL duk_bool_t duk__enc_allow_into_proplist(duk_tval *tv);
-DUK_LOCAL_DECL void duk__enc_double(duk_json_enc_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_enc_key_autoquote(duk_json_enc_ctx *js_ctx, duk_hstring *k);
+DUK_LOCAL_DECL void duk__json_enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_str);
+DUK_LOCAL_DECL void duk__json_enc_objarr_entry(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top);
+DUK_LOCAL_DECL void duk__json_enc_objarr_exit(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top);
+DUK_LOCAL_DECL void duk__json_enc_object(duk_json_enc_ctx *js_ctx);
+DUK_LOCAL_DECL void duk__json_enc_array(duk_json_enc_ctx *js_ctx);
+DUK_LOCAL_DECL duk_bool_t duk__json_enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_holder);
+DUK_LOCAL_DECL duk_bool_t duk__json_enc_allow_into_proplist(duk_tval *tv);
+DUK_LOCAL_DECL void duk__json_enc_double(duk_json_enc_ctx *js_ctx);
#if defined(DUK_USE_FASTINT)
-DUK_LOCAL_DECL void duk__enc_fastint_tval(duk_json_enc_ctx *js_ctx, duk_tval *tv);
+DUK_LOCAL_DECL void duk__json_enc_fastint_tval(duk_json_enc_ctx *js_ctx, duk_tval *tv);
#endif
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
-DUK_LOCAL_DECL void duk__enc_buffer_jx_jc(duk_json_enc_ctx *js_ctx, duk_hbuffer *h);
-DUK_LOCAL_DECL void duk__enc_pointer(duk_json_enc_ctx *js_ctx, void *ptr);
+DUK_LOCAL_DECL void duk__json_enc_buffer_jx_jc(duk_json_enc_ctx *js_ctx, duk_hbuffer *h);
+DUK_LOCAL_DECL void duk__json_enc_pointer(duk_json_enc_ctx *js_ctx, void *ptr);
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
-DUK_LOCAL_DECL void duk__enc_bufobj(duk_json_enc_ctx *js_ctx, duk_hbufobj *h_bufobj);
+DUK_LOCAL_DECL void duk__json_enc_bufobj(duk_json_enc_ctx *js_ctx, duk_hbufobj *h_bufobj);
#endif
#endif
#if defined(DUK_USE_JSON_STRINGIFY_FASTPATH)
-DUK_LOCAL_DECL void duk__enc_buffer_json_fastpath(duk_json_enc_ctx *js_ctx, duk_hbuffer *h);
+DUK_LOCAL_DECL void duk__json_enc_buffer_json_fastpath(duk_json_enc_ctx *js_ctx, duk_hbuffer *h);
#endif
-DUK_LOCAL_DECL void duk__enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t depth);
+DUK_LOCAL_DECL void duk__json_enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t depth);
/*
* Helper tables
@@ -34444,103 +37466,88 @@ DUK_LOCAL const duk_uint8_t duk__json_quotestr_lookup[256] = {
* 0xa0 ... 0xff: backslash + one char
*/
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xe2, 0xf4, 0xee, 0x80, 0xe6, 0xf2, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x20, 0x21, 0xa2, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0xdc, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
- 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xe2, 0xf4, 0xee, 0x80, 0xe6, 0xf2, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x20, 0x21, 0xa2, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
+ 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0xdc, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63,
+ 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
+ 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81
};
-#else /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
-DUK_LOCAL const duk_uint8_t duk__json_quotestr_esc[14] = {
- DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL,
- DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL,
- DUK_ASC_LC_B, DUK_ASC_LC_T, DUK_ASC_LC_N, DUK_ASC_NUL,
- DUK_ASC_LC_F, DUK_ASC_LC_R
-};
-#endif /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
+#else /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
+DUK_LOCAL const duk_uint8_t duk__json_quotestr_esc[14] = { DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL,
+ DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_NUL, DUK_ASC_LC_B, DUK_ASC_LC_T,
+ DUK_ASC_LC_N, DUK_ASC_NUL, DUK_ASC_LC_F, DUK_ASC_LC_R };
+#endif /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
#if defined(DUK_USE_JSON_DECSTRING_FASTPATH)
DUK_LOCAL const duk_uint8_t duk__json_decstr_lookup[256] = {
/* 0x00: slow path
* other: as is
*/
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x21, 0x00, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x00, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
- 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x00, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
+ 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x00, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63,
+ 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b,
+ 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3,
+ 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
+ 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb,
+ 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
};
-#endif /* DUK_USE_JSON_DECSTRING_FASTPATH */
+#endif /* DUK_USE_JSON_DECSTRING_FASTPATH */
#if defined(DUK_USE_JSON_EATWHITE_FASTPATH)
DUK_LOCAL const duk_uint8_t duk__json_eatwhite_lookup[256] = {
/* 0x00: finish (non-white)
* 0x01: continue
*/
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-#endif /* DUK_USE_JSON_EATWHITE_FASTPATH */
+#endif /* DUK_USE_JSON_EATWHITE_FASTPATH */
#if defined(DUK_USE_JSON_DECNUMBER_FASTPATH)
DUK_LOCAL const duk_uint8_t duk__json_decnumber_lookup[256] = {
/* 0x00: finish (not part of number)
* 0x01: continue
*/
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-#endif /* DUK_USE_JSON_DECNUMBER_FASTPATH */
+#endif /* DUK_USE_JSON_DECNUMBER_FASTPATH */
/*
* Parsing implementation.
@@ -34555,17 +37562,16 @@ DUK_LOCAL const duk_uint8_t duk__json_decnumber_lookup[256] = {
* CESU-8 encodings.
*/
-DUK_LOCAL void duk__dec_syntax_error(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_syntax_error(duk_json_dec_ctx *js_ctx) {
/* Shared handler to minimize parser size. Cause will be
* hidden, unfortunately, but we'll have an offset which
* is often quite enough.
*/
- DUK_ERROR_FMT1(js_ctx->thr, DUK_ERR_SYNTAX_ERROR, DUK_STR_FMT_INVALID_JSON,
- (long) (js_ctx->p - js_ctx->p_start));
+ DUK_ERROR_FMT1(js_ctx->thr, DUK_ERR_SYNTAX_ERROR, DUK_STR_FMT_INVALID_JSON, (long) (js_ctx->p - js_ctx->p_start));
DUK_WO_NORETURN(return;);
}
-DUK_LOCAL void duk__dec_eat_white(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_eat_white(duk_json_dec_ctx *js_ctx) {
const duk_uint8_t *p;
duk_uint8_t t;
@@ -34578,42 +37584,42 @@ DUK_LOCAL void duk__dec_eat_white(duk_json_dec_ctx *js_ctx) {
/* This fast path is pretty marginal in practice.
* XXX: candidate for removal.
*/
- DUK_ASSERT(duk__json_eatwhite_lookup[0x00] == 0x00); /* end-of-input breaks */
+ DUK_ASSERT(duk__json_eatwhite_lookup[0x00] == 0x00); /* end-of-input breaks */
if (duk__json_eatwhite_lookup[t] == 0) {
break;
}
-#else /* DUK_USE_JSON_EATWHITE_FASTPATH */
+#else /* DUK_USE_JSON_EATWHITE_FASTPATH */
if (!(t == 0x20 || t == 0x0a || t == 0x0d || t == 0x09)) {
/* NUL also comes here. Comparison order matters, 0x20
* is most common whitespace.
*/
break;
}
-#endif /* DUK_USE_JSON_EATWHITE_FASTPATH */
+#endif /* DUK_USE_JSON_EATWHITE_FASTPATH */
p++;
}
js_ctx->p = p;
}
#if defined(DUK_USE_JX)
-DUK_LOCAL duk_uint8_t duk__dec_peek(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL duk_uint8_t duk__json_dec_peek(duk_json_dec_ctx *js_ctx) {
DUK_ASSERT(js_ctx->p <= js_ctx->p_end);
return *js_ctx->p;
}
#endif
-DUK_LOCAL duk_uint8_t duk__dec_get(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL duk_uint8_t duk__json_dec_get(duk_json_dec_ctx *js_ctx) {
DUK_ASSERT(js_ctx->p <= js_ctx->p_end);
return *js_ctx->p++;
}
-DUK_LOCAL duk_uint8_t duk__dec_get_nonwhite(duk_json_dec_ctx *js_ctx) {
- duk__dec_eat_white(js_ctx);
- return duk__dec_get(js_ctx);
+DUK_LOCAL duk_uint8_t duk__json_dec_get_nonwhite(duk_json_dec_ctx *js_ctx) {
+ duk__json_dec_eat_white(js_ctx);
+ return duk__json_dec_get(js_ctx);
}
/* For JX, expressing the whole unsigned 32-bit range matters. */
-DUK_LOCAL duk_uint_fast32_t duk__dec_decode_hex_escape(duk_json_dec_ctx *js_ctx, duk_small_uint_t n) {
+DUK_LOCAL duk_uint_fast32_t duk__json_dec_decode_hex_escape(duk_json_dec_ctx *js_ctx, duk_small_uint_t n) {
duk_small_uint_t i;
duk_uint_fast32_t res = 0;
duk_uint8_t x;
@@ -34622,9 +37628,8 @@ DUK_LOCAL duk_uint_fast32_t duk__dec_decode_hex_escape(duk_json_dec_ctx *js_ctx,
for (i = 0; i < n; i++) {
/* XXX: share helper from lexer; duk_lexer.c / hexval(). */
- x = duk__dec_get(js_ctx);
- DUK_DDD(DUK_DDDPRINT("decode_hex_escape: i=%ld, n=%ld, res=%ld, x=%ld",
- (long) i, (long) n, (long) res, (long) x));
+ x = duk__json_dec_get(js_ctx);
+ DUK_DDD(DUK_DDDPRINT("decode_hex_escape: i=%ld, n=%ld, res=%ld, x=%ld", (long) i, (long) n, (long) res, (long) x));
/* x == 0x00 (EOF) causes syntax_error */
DUK_ASSERT(duk_hex_dectab[0] == -1);
@@ -34640,13 +37645,13 @@ DUK_LOCAL duk_uint_fast32_t duk__dec_decode_hex_escape(duk_json_dec_ctx *js_ctx,
DUK_DDD(DUK_DDDPRINT("final hex decoded value: %ld", (long) res));
return res;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
return 0;
}
-DUK_LOCAL void duk__dec_req_stridx(duk_json_dec_ctx *js_ctx, duk_small_uint_t stridx) {
+DUK_LOCAL void duk__json_dec_req_stridx(duk_json_dec_ctx *js_ctx, duk_small_uint_t stridx) {
duk_hstring *h;
const duk_uint8_t *p;
duk_uint8_t x, y;
@@ -34661,14 +37666,14 @@ DUK_LOCAL void duk__dec_req_stridx(duk_json_dec_ctx *js_ctx, duk_small_uint_t st
DUK_ASSERT(h != NULL);
p = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h) + 1;
- DUK_ASSERT(*(js_ctx->p - 1) == *(p - 1)); /* first character has been matched */
+ DUK_ASSERT(*(js_ctx->p - 1) == *(p - 1)); /* first character has been matched */
for (;;) {
x = *p;
if (x == 0) {
break;
}
- y = duk__dec_get(js_ctx);
+ y = duk__json_dec_get(js_ctx);
if (x != y) {
/* Catches EOF of JSON input. */
goto syntax_error;
@@ -34678,61 +37683,74 @@ DUK_LOCAL void duk__dec_req_stridx(duk_json_dec_ctx *js_ctx, duk_small_uint_t st
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
-DUK_LOCAL duk_small_int_t duk__dec_string_escape(duk_json_dec_ctx *js_ctx, duk_uint8_t **ext_p) {
+DUK_LOCAL duk_small_int_t duk__json_dec_string_escape(duk_json_dec_ctx *js_ctx, duk_uint8_t **ext_p) {
duk_uint_fast32_t cp;
/* EOF (-1) will be cast to an unsigned value first
* and then re-cast for the switch. In any case, it
* will match the default case (syntax error).
*/
- cp = (duk_uint_fast32_t) duk__dec_get(js_ctx);
+ cp = (duk_uint_fast32_t) duk__json_dec_get(js_ctx);
switch (cp) {
- case DUK_ASC_BACKSLASH: break;
- case DUK_ASC_DOUBLEQUOTE: break;
- case DUK_ASC_SLASH: break;
- case DUK_ASC_LC_T: cp = 0x09; break;
- case DUK_ASC_LC_N: cp = 0x0a; break;
- case DUK_ASC_LC_R: cp = 0x0d; break;
- case DUK_ASC_LC_F: cp = 0x0c; break;
- case DUK_ASC_LC_B: cp = 0x08; break;
+ case DUK_ASC_BACKSLASH:
+ break;
+ case DUK_ASC_DOUBLEQUOTE:
+ break;
+ case DUK_ASC_SLASH:
+ break;
+ case DUK_ASC_LC_T:
+ cp = 0x09;
+ break;
+ case DUK_ASC_LC_N:
+ cp = 0x0a;
+ break;
+ case DUK_ASC_LC_R:
+ cp = 0x0d;
+ break;
+ case DUK_ASC_LC_F:
+ cp = 0x0c;
+ break;
+ case DUK_ASC_LC_B:
+ cp = 0x08;
+ break;
case DUK_ASC_LC_U: {
- cp = duk__dec_decode_hex_escape(js_ctx, 4);
+ cp = duk__json_dec_decode_hex_escape(js_ctx, 4);
break;
}
#if defined(DUK_USE_JX)
case DUK_ASC_UC_U: {
if (js_ctx->flag_ext_custom) {
- cp = duk__dec_decode_hex_escape(js_ctx, 8);
+ cp = duk__json_dec_decode_hex_escape(js_ctx, 8);
} else {
- return 1; /* syntax error */
+ return 1; /* syntax error */
}
break;
}
case DUK_ASC_LC_X: {
if (js_ctx->flag_ext_custom) {
- cp = duk__dec_decode_hex_escape(js_ctx, 2);
+ cp = duk__json_dec_decode_hex_escape(js_ctx, 2);
} else {
- return 1; /* syntax error */
+ return 1; /* syntax error */
}
break;
}
-#endif /* DUK_USE_JX */
+#endif /* DUK_USE_JX */
default:
/* catches EOF (0x00) */
- return 1; /* syntax error */
+ return 1; /* syntax error */
}
- DUK_RAW_WRITE_XUTF8(*ext_p, cp);
+ DUK_RAW_WRITEINC_XUTF8(*ext_p, cp);
return 0;
}
-DUK_LOCAL void duk__dec_string(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_string(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_bufwriter_ctx bw_alloc;
duk_bufwriter_ctx *bw;
@@ -34766,7 +37784,7 @@ DUK_LOCAL void duk__dec_string(duk_json_dec_ctx *js_ctx) {
/* Ensure space for 1:1 output plus one escape. */
q = DUK_BW_ENSURE_RAW(js_ctx->thr, bw, safe + DUK_UNICODE_MAX_XUTF8_LENGTH, q);
- p = js_ctx->p; /* temp copy, write back for next loop */
+ p = js_ctx->p; /* temp copy, write back for next loop */
for (;;) {
if (safe == 0) {
js_ctx->p = p;
@@ -34791,7 +37809,7 @@ DUK_LOCAL void duk__dec_string(duk_json_dec_ctx *js_ctx) {
* quite slow but it's uncommon).
*/
js_ctx->p = p;
- if (duk__dec_string_escape(js_ctx, &q) != 0) {
+ if (duk__json_dec_string_escape(js_ctx, &q) != 0) {
goto syntax_error;
}
break;
@@ -34801,19 +37819,19 @@ DUK_LOCAL void duk__dec_string(duk_json_dec_ctx *js_ctx) {
}
}
}
- found_quote:
-#else /* DUK_USE_JSON_DECSTRING_FASTPATH */
+found_quote:
+#else /* DUK_USE_JSON_DECSTRING_FASTPATH */
for (;;) {
duk_uint8_t x;
q = DUK_BW_ENSURE_RAW(js_ctx->thr, bw, DUK_UNICODE_MAX_XUTF8_LENGTH, q);
- x = duk__dec_get(js_ctx);
+ x = duk__json_dec_get(js_ctx);
if (x == DUK_ASC_DOUBLEQUOTE) {
break;
} else if (x == DUK_ASC_BACKSLASH) {
- if (duk__dec_string_escape(js_ctx, &q) != 0) {
+ if (duk__json_dec_string_escape(js_ctx, &q) != 0) {
goto syntax_error;
}
} else if (x < 0x20) {
@@ -34823,17 +37841,17 @@ DUK_LOCAL void duk__dec_string(duk_json_dec_ctx *js_ctx) {
*q++ = (duk_uint8_t) x;
}
}
-#endif /* DUK_USE_JSON_DECSTRING_FASTPATH */
+#endif /* DUK_USE_JSON_DECSTRING_FASTPATH */
DUK_BW_SETPTR_AND_COMPACT(js_ctx->thr, bw, q);
- (void) duk_buffer_to_string(thr, -1); /* Safe if input string is safe. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe if input string is safe. */
/* [ ... str ] */
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
@@ -34841,14 +37859,14 @@ DUK_LOCAL void duk__dec_string(duk_json_dec_ctx *js_ctx) {
/* Decode a plain string consisting entirely of identifier characters.
* Used to parse plain keys (e.g. "foo: 123").
*/
-DUK_LOCAL void duk__dec_plain_string(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_plain_string(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
const duk_uint8_t *p;
duk_small_int_t x;
/* Caller has already eaten the first char so backtrack one byte. */
- js_ctx->p--; /* safe */
+ js_ctx->p--; /* safe */
p = js_ctx->p;
/* Here again we parse bytes, and non-ASCII UTF-8 will cause end of
@@ -34880,10 +37898,10 @@ DUK_LOCAL void duk__dec_plain_string(duk_json_dec_ctx *js_ctx) {
/* [ ... str ] */
}
-#endif /* DUK_USE_JX */
+#endif /* DUK_USE_JX */
#if defined(DUK_USE_JX)
-DUK_LOCAL void duk__dec_pointer(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_pointer(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
const duk_uint8_t *p;
duk_small_int_t x;
@@ -34923,20 +37941,20 @@ DUK_LOCAL void duk__dec_pointer(duk_json_dec_ctx *js_ctx) {
voidptr = NULL;
(void) DUK_SSCANF((const char *) js_ctx->p, DUK_STR_FMT_PTR, &voidptr);
duk_push_pointer(thr, voidptr);
- js_ctx->p = p + 1; /* skip ')' */
+ js_ctx->p = p + 1; /* skip ')' */
/* [ ... ptr ] */
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
-#endif /* DUK_USE_JX */
+#endif /* DUK_USE_JX */
#if defined(DUK_USE_JX)
-DUK_LOCAL void duk__dec_buffer(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_buffer(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
const duk_uint8_t *p;
duk_uint8_t *buf;
@@ -34981,20 +37999,20 @@ DUK_LOCAL void duk__dec_buffer(duk_json_dec_ctx *js_ctx) {
duk_memcpy((void *) buf, (const void *) js_ctx->p, src_len);
duk_hex_decode(thr, -1);
- js_ctx->p = p + 1; /* skip '|' */
+ js_ctx->p = p + 1; /* skip '|' */
/* [ ... buf ] */
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
-#endif /* DUK_USE_JX */
+#endif /* DUK_USE_JX */
/* Parse a number, other than NaN or +/- Infinity */
-DUK_LOCAL void duk__dec_number(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_number(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
const duk_uint8_t *p_start;
const duk_uint8_t *p;
@@ -35014,67 +38032,67 @@ DUK_LOCAL void duk__dec_number(duk_json_dec_ctx *js_ctx) {
x = *p;
DUK_DDD(DUK_DDDPRINT("parse_number: p_start=%p, p=%p, p_end=%p, x=%ld",
- (const void *) p_start, (const void *) p,
- (const void *) js_ctx->p_end, (long) x));
+ (const void *) p_start,
+ (const void *) p,
+ (const void *) js_ctx->p_end,
+ (long) x));
#if defined(DUK_USE_JSON_DECNUMBER_FASTPATH)
/* This fast path is pretty marginal in practice.
* XXX: candidate for removal.
*/
- DUK_ASSERT(duk__json_decnumber_lookup[0x00] == 0x00); /* end-of-input breaks */
+ DUK_ASSERT(duk__json_decnumber_lookup[0x00] == 0x00); /* end-of-input breaks */
if (duk__json_decnumber_lookup[x] == 0) {
break;
}
-#else /* DUK_USE_JSON_DECNUMBER_FASTPATH */
+#else /* DUK_USE_JSON_DECNUMBER_FASTPATH */
if (!((x >= DUK_ASC_0 && x <= DUK_ASC_9) ||
- (x == DUK_ASC_PERIOD || x == DUK_ASC_LC_E ||
- x == DUK_ASC_UC_E || x == DUK_ASC_MINUS || x == DUK_ASC_PLUS))) {
+ (x == DUK_ASC_PERIOD || x == DUK_ASC_LC_E || x == DUK_ASC_UC_E || x == DUK_ASC_MINUS || x == DUK_ASC_PLUS))) {
/* Plus sign must be accepted for positive exponents
* (e.g. '1.5e+2'). This clause catches NULs.
*/
break;
}
-#endif /* DUK_USE_JSON_DECNUMBER_FASTPATH */
- p++; /* safe, because matched (NUL causes a break) */
+#endif /* DUK_USE_JSON_DECNUMBER_FASTPATH */
+ p++; /* safe, because matched (NUL causes a break) */
}
js_ctx->p = p;
DUK_ASSERT(js_ctx->p > p_start);
duk_push_lstring(thr, (const char *) p_start, (duk_size_t) (p - p_start));
- s2n_flags = DUK_S2N_FLAG_ALLOW_EXP |
- DUK_S2N_FLAG_ALLOW_MINUS | /* but don't allow leading plus */
+ s2n_flags = DUK_S2N_FLAG_ALLOW_EXP | DUK_S2N_FLAG_ALLOW_MINUS | /* but don't allow leading plus */
DUK_S2N_FLAG_ALLOW_FRAC;
- DUK_DDD(DUK_DDDPRINT("parse_number: string before parsing: %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("parse_number: string before parsing: %!T", (duk_tval *) duk_get_tval(thr, -1)));
duk_numconv_parse(thr, 10 /*radix*/, s2n_flags);
if (duk_is_nan(thr, -1)) {
- duk__dec_syntax_error(js_ctx);
+ duk__json_dec_syntax_error(js_ctx);
}
DUK_ASSERT(duk_is_number(thr, -1));
- DUK_DDD(DUK_DDDPRINT("parse_number: final number: %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("parse_number: final number: %!T", (duk_tval *) duk_get_tval(thr, -1)));
/* [ ... num ] */
}
-DUK_LOCAL void duk__dec_objarr_entry(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_objarr_entry(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_require_stack(thr, DUK_JSON_DEC_REQSTACK);
/* c recursion check */
- DUK_ASSERT_DISABLE(js_ctx->recursion_depth >= 0); /* unsigned */
+ duk_native_stack_check(thr);
+
+ DUK_ASSERT_DISABLE(js_ctx->recursion_depth >= 0); /* unsigned */
DUK_ASSERT(js_ctx->recursion_depth <= js_ctx->recursion_limit);
if (js_ctx->recursion_depth >= js_ctx->recursion_limit) {
- DUK_ERROR_RANGE(thr, DUK_STR_JSONDEC_RECLIMIT);
+ DUK_ERROR_RANGE(thr, DUK_STR_DEC_RECLIMIT);
DUK_WO_NORETURN(return;);
}
js_ctx->recursion_depth++;
}
-DUK_LOCAL void duk__dec_objarr_exit(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_objarr_exit(duk_json_dec_ctx *js_ctx) {
/* c recursion check */
DUK_ASSERT(js_ctx->recursion_depth > 0);
@@ -35082,14 +38100,14 @@ DUK_LOCAL void duk__dec_objarr_exit(duk_json_dec_ctx *js_ctx) {
js_ctx->recursion_depth--;
}
-DUK_LOCAL void duk__dec_object(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_object(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
- duk_int_t key_count; /* XXX: a "first" flag would suffice */
+ duk_int_t key_count; /* XXX: a "first" flag would suffice */
duk_uint8_t x;
DUK_DDD(DUK_DDDPRINT("parse_object"));
- duk__dec_objarr_entry(js_ctx);
+ duk__json_dec_objarr_entry(js_ctx);
duk_push_object(thr);
@@ -35097,17 +38115,18 @@ DUK_LOCAL void duk__dec_object(duk_json_dec_ctx *js_ctx) {
key_count = 0;
for (;;) {
- x = duk__dec_get_nonwhite(js_ctx);
+ x = duk__json_dec_get_nonwhite(js_ctx);
DUK_DDD(DUK_DDDPRINT("parse_object: obj=%!T, x=%ld, key_count=%ld",
(duk_tval *) duk_get_tval(thr, -1),
- (long) x, (long) key_count));
+ (long) x,
+ (long) key_count));
/* handle comma and closing brace */
if (x == DUK_ASC_COMMA && key_count > 0) {
/* accept comma, expect new value */
- x = duk__dec_get_nonwhite(js_ctx);
+ x = duk__json_dec_get_nonwhite(js_ctx);
} else if (x == DUK_ASC_RCURLY) {
/* eat closing brace */
break;
@@ -35124,11 +38143,10 @@ DUK_LOCAL void duk__dec_object(duk_json_dec_ctx *js_ctx) {
/* parse key and value */
if (x == DUK_ASC_DOUBLEQUOTE) {
- duk__dec_string(js_ctx);
+ duk__json_dec_string(js_ctx);
#if defined(DUK_USE_JX)
- } else if (js_ctx->flag_ext_custom &&
- duk_unicode_is_identifier_start((duk_codepoint_t) x)) {
- duk__dec_plain_string(js_ctx);
+ } else if (js_ctx->flag_ext_custom && duk_unicode_is_identifier_start((duk_codepoint_t) x)) {
+ duk__json_dec_plain_string(js_ctx);
#endif
} else {
goto syntax_error;
@@ -35136,12 +38154,12 @@ DUK_LOCAL void duk__dec_object(duk_json_dec_ctx *js_ctx) {
/* [ ... obj key ] */
- x = duk__dec_get_nonwhite(js_ctx);
+ x = duk__json_dec_get_nonwhite(js_ctx);
if (x != DUK_ASC_COLON) {
goto syntax_error;
}
- duk__dec_value(js_ctx);
+ duk__json_dec_value(js_ctx);
/* [ ... obj key val ] */
@@ -35154,25 +38172,24 @@ DUK_LOCAL void duk__dec_object(duk_json_dec_ctx *js_ctx) {
/* [ ... obj ] */
- DUK_DDD(DUK_DDDPRINT("parse_object: final object is %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("parse_object: final object is %!T", (duk_tval *) duk_get_tval(thr, -1)));
- duk__dec_objarr_exit(js_ctx);
+ duk__json_dec_objarr_exit(js_ctx);
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
-DUK_LOCAL void duk__dec_array(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_array(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_uarridx_t arr_idx;
duk_uint8_t x;
DUK_DDD(DUK_DDDPRINT("parse_array"));
- duk__dec_objarr_entry(js_ctx);
+ duk__json_dec_objarr_entry(js_ctx);
duk_push_array(thr);
@@ -35180,11 +38197,12 @@ DUK_LOCAL void duk__dec_array(duk_json_dec_ctx *js_ctx) {
arr_idx = 0;
for (;;) {
- x = duk__dec_get_nonwhite(js_ctx);
+ x = duk__json_dec_get_nonwhite(js_ctx);
DUK_DDD(DUK_DDDPRINT("parse_array: arr=%!T, x=%ld, arr_idx=%ld",
(duk_tval *) duk_get_tval(thr, -1),
- (long) x, (long) arr_idx));
+ (long) x,
+ (long) arr_idx));
/* handle comma and closing bracket */
@@ -35196,9 +38214,9 @@ DUK_LOCAL void duk__dec_array(duk_json_dec_ctx *js_ctx) {
break;
} else if (arr_idx == 0) {
/* accept anything, expect first value (EOF will be
- * caught by duk__dec_value() below.
+ * caught by duk__json_dec_value() below.
*/
- js_ctx->p--; /* backtrack (safe) */
+ js_ctx->p--; /* backtrack (safe) */
} else {
/* catches EOF (NUL) and initial comma */
goto syntax_error;
@@ -35206,7 +38224,7 @@ DUK_LOCAL void duk__dec_array(duk_json_dec_ctx *js_ctx) {
/* parse value */
- duk__dec_value(js_ctx);
+ duk__json_dec_value(js_ctx);
/* [ ... arr val ] */
@@ -35222,117 +38240,123 @@ DUK_LOCAL void duk__dec_array(duk_json_dec_ctx *js_ctx) {
/* [ ... arr ] */
- DUK_DDD(DUK_DDDPRINT("parse_array: final array is %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("parse_array: final array is %!T", (duk_tval *) duk_get_tval(thr, -1)));
- duk__dec_objarr_exit(js_ctx);
+ duk__json_dec_objarr_exit(js_ctx);
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
-DUK_LOCAL void duk__dec_value(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_value(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_uint8_t x;
- x = duk__dec_get_nonwhite(js_ctx);
+ x = duk__json_dec_get_nonwhite(js_ctx);
DUK_DDD(DUK_DDDPRINT("parse_value: initial x=%ld", (long) x));
- /* Note: duk__dec_req_stridx() backtracks one char */
+ /* Note: duk__json_dec_req_stridx() backtracks one char */
if (x == DUK_ASC_DOUBLEQUOTE) {
- duk__dec_string(js_ctx);
+ duk__json_dec_string(js_ctx);
} else if ((x >= DUK_ASC_0 && x <= DUK_ASC_9) || (x == DUK_ASC_MINUS)) {
#if defined(DUK_USE_JX)
- if (js_ctx->flag_ext_custom && x == DUK_ASC_MINUS && duk__dec_peek(js_ctx) == DUK_ASC_UC_I) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_MINUS_INFINITY); /* "-Infinity", '-' has been eaten */
+ if (js_ctx->flag_ext_custom && x == DUK_ASC_MINUS && duk__json_dec_peek(js_ctx) == DUK_ASC_UC_I) {
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_MINUS_INFINITY); /* "-Infinity", '-' has been eaten */
duk_push_number(thr, -DUK_DOUBLE_INFINITY);
} else {
#else
- { /* unconditional block */
+ { /* unconditional block */
#endif
/* We already ate 'x', so backup one byte. */
- js_ctx->p--; /* safe */
- duk__dec_number(js_ctx);
+ js_ctx->p--; /* safe */
+ duk__json_dec_number(js_ctx);
}
} else if (x == DUK_ASC_LC_T) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_TRUE);
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_TRUE);
duk_push_true(thr);
} else if (x == DUK_ASC_LC_F) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_FALSE);
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_FALSE);
duk_push_false(thr);
} else if (x == DUK_ASC_LC_N) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_LC_NULL);
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_LC_NULL);
duk_push_null(thr);
#if defined(DUK_USE_JX)
} else if (js_ctx->flag_ext_custom && x == DUK_ASC_LC_U) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_LC_UNDEFINED);
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_LC_UNDEFINED);
duk_push_undefined(thr);
} else if (js_ctx->flag_ext_custom && x == DUK_ASC_UC_N) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_NAN);
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_NAN);
duk_push_nan(thr);
} else if (js_ctx->flag_ext_custom && x == DUK_ASC_UC_I) {
- duk__dec_req_stridx(js_ctx, DUK_STRIDX_INFINITY);
+ duk__json_dec_req_stridx(js_ctx, DUK_STRIDX_INFINITY);
duk_push_number(thr, DUK_DOUBLE_INFINITY);
} else if (js_ctx->flag_ext_custom && x == DUK_ASC_LPAREN) {
- duk__dec_pointer(js_ctx);
+ duk__json_dec_pointer(js_ctx);
} else if (js_ctx->flag_ext_custom && x == DUK_ASC_PIPE) {
- duk__dec_buffer(js_ctx);
+ duk__json_dec_buffer(js_ctx);
#endif
} else if (x == DUK_ASC_LCURLY) {
- duk__dec_object(js_ctx);
+ duk__json_dec_object(js_ctx);
} else if (x == DUK_ASC_LBRACKET) {
- duk__dec_array(js_ctx);
+ duk__json_dec_array(js_ctx);
} else {
/* catches EOF (NUL) */
goto syntax_error;
}
- duk__dec_eat_white(js_ctx);
+ duk__json_dec_eat_white(js_ctx);
/* [ ... val ] */
return;
- syntax_error:
- duk__dec_syntax_error(js_ctx);
+syntax_error:
+ duk__json_dec_syntax_error(js_ctx);
DUK_UNREACHABLE();
}
-/* Recursive value reviver, implements the Walk() algorithm. No C recursion
- * check is done here because the initial parsing step will already ensure
- * there is a reasonable limit on C recursion depth and hence object depth.
+/* Recursive value reviver, implements the Walk() algorithm. The parsing
+ * step ensures there is a reasonable depth limit to the input. However,
+ * the reviver may create more depth by editing object or array entries, so
+ * we have both C recursion limit and native stack checks here.
*/
-DUK_LOCAL void duk__dec_reviver_walk(duk_json_dec_ctx *js_ctx) {
+DUK_LOCAL void duk__json_dec_reviver_walk(duk_json_dec_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_hobject *h;
duk_uarridx_t i, arr_len;
+ duk__json_dec_objarr_entry(js_ctx);
+
DUK_DDD(DUK_DDDPRINT("walk: top=%ld, holder=%!T, name=%!T",
(long) duk_get_top(thr),
(duk_tval *) duk_get_tval(thr, -2),
(duk_tval *) duk_get_tval(thr, -1)));
duk_dup_top(thr);
- duk_get_prop(thr, -3); /* -> [ ... holder name val ] */
+ duk_get_prop(thr, -3); /* -> [ ... holder name val ] */
h = duk_get_hobject(thr, -1);
if (h != NULL) {
- if (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY) {
+ if (duk_js_isarray_hobject(h)) {
arr_len = (duk_uarridx_t) duk_get_length(thr, -1);
for (i = 0; i < arr_len; i++) {
/* [ ... holder name val ] */
DUK_DDD(DUK_DDDPRINT("walk: array, top=%ld, i=%ld, arr_len=%ld, holder=%!T, name=%!T, val=%!T",
- (long) duk_get_top(thr), (long) i, (long) arr_len,
- (duk_tval *) duk_get_tval(thr, -3), (duk_tval *) duk_get_tval(thr, -2),
+ (long) duk_get_top(thr),
+ (long) i,
+ (long) arr_len,
+ (duk_tval *) duk_get_tval(thr, -3),
+ (duk_tval *) duk_get_tval(thr, -2),
(duk_tval *) duk_get_tval(thr, -1)));
duk_dup_top(thr);
- (void) duk_push_uint_to_hstring(thr, (duk_uint_t) i); /* -> [ ... holder name val val ToString(i) ] */
- duk__dec_reviver_walk(js_ctx); /* -> [ ... holder name val new_elem ] */
+ (void) duk_push_uint_to_hstring(thr,
+ (duk_uint_t) i); /* -> [ ... holder name val val ToString(i) ] */
+ duk__json_dec_reviver_walk(js_ctx); /* -> [ ... holder name val new_elem ] */
if (duk_is_undefined(thr, -1)) {
duk_pop(thr);
@@ -35350,16 +38374,19 @@ DUK_LOCAL void duk__dec_reviver_walk(duk_json_dec_ctx *js_ctx) {
duk_enum(thr, -1, DUK_ENUM_OWN_PROPERTIES_ONLY /*flags*/);
while (duk_next(thr, -1 /*enum_index*/, 0 /*get_value*/)) {
DUK_DDD(DUK_DDDPRINT("walk: object, top=%ld, holder=%!T, name=%!T, val=%!T, enum=%!iT, obj_key=%!T",
- (long) duk_get_top(thr), (duk_tval *) duk_get_tval(thr, -5),
- (duk_tval *) duk_get_tval(thr, -4), (duk_tval *) duk_get_tval(thr, -3),
- (duk_tval *) duk_get_tval(thr, -2), (duk_tval *) duk_get_tval(thr, -1)));
+ (long) duk_get_top(thr),
+ (duk_tval *) duk_get_tval(thr, -5),
+ (duk_tval *) duk_get_tval(thr, -4),
+ (duk_tval *) duk_get_tval(thr, -3),
+ (duk_tval *) duk_get_tval(thr, -2),
+ (duk_tval *) duk_get_tval(thr, -1)));
/* [ ... holder name val enum obj_key ] */
duk_dup_m3(thr);
duk_dup_m2(thr);
/* [ ... holder name val enum obj_key val obj_key ] */
- duk__dec_reviver_walk(js_ctx);
+ duk__json_dec_reviver_walk(js_ctx);
/* [ ... holder name val enum obj_key new_elem ] */
if (duk_is_undefined(thr, -1)) {
@@ -35378,32 +38405,33 @@ DUK_LOCAL void duk__dec_reviver_walk(duk_json_dec_ctx *js_ctx) {
duk_put_prop(thr, -4);
}
}
- duk_pop(thr); /* pop enum */
+ duk_pop(thr); /* pop enum */
}
}
/* [ ... holder name val ] */
duk_dup(thr, js_ctx->idx_reviver);
- duk_insert(thr, -4); /* -> [ ... reviver holder name val ] */
- duk_call_method(thr, 2); /* -> [ ... res ] */
+ duk_insert(thr, -4); /* -> [ ... reviver holder name val ] */
+ duk_call_method(thr, 2); /* -> [ ... res ] */
- DUK_DDD(DUK_DDDPRINT("walk: top=%ld, result=%!T",
- (long) duk_get_top(thr), (duk_tval *) duk_get_tval(thr, -1)));
+ duk__json_dec_objarr_exit(js_ctx);
+
+ DUK_DDD(DUK_DDDPRINT("walk: top=%ld, result=%!T", (long) duk_get_top(thr), (duk_tval *) duk_get_tval(thr, -1)));
}
/*
* Stringify implementation.
*/
-#define DUK__EMIT_1(js_ctx,ch) duk__emit_1((js_ctx), (duk_uint_fast8_t) (ch))
-#define DUK__EMIT_2(js_ctx,ch1,ch2) duk__emit_2((js_ctx), (duk_uint_fast8_t) (ch1), (duk_uint_fast8_t) (ch2))
-#define DUK__EMIT_HSTR(js_ctx,h) duk__emit_hstring((js_ctx), (h))
+#define DUK__EMIT_1(js_ctx, ch) duk__emit_1((js_ctx), (duk_uint_fast8_t) (ch))
+#define DUK__EMIT_2(js_ctx, ch1, ch2) duk__emit_2((js_ctx), (duk_uint_fast8_t) (ch1), (duk_uint_fast8_t) (ch2))
+#define DUK__EMIT_HSTR(js_ctx, h) duk__emit_hstring((js_ctx), (h))
#if defined(DUK_USE_FASTINT) || defined(DUK_USE_JX) || defined(DUK_USE_JC)
-#define DUK__EMIT_CSTR(js_ctx,p) duk__emit_cstring((js_ctx), (p))
+#define DUK__EMIT_CSTR(js_ctx, p) duk__emit_cstring((js_ctx), (p))
#endif
-#define DUK__EMIT_STRIDX(js_ctx,i) duk__emit_stridx((js_ctx), (i))
-#define DUK__UNEMIT_1(js_ctx) duk__unemit_1((js_ctx))
+#define DUK__EMIT_STRIDX(js_ctx, i) duk__emit_stridx((js_ctx), (i))
+#define DUK__UNEMIT_1(js_ctx) duk__unemit_1((js_ctx))
DUK_LOCAL void duk__emit_1(duk_json_enc_ctx *js_ctx, duk_uint_fast8_t ch) {
DUK_BW_WRITE_ENSURE_U8(js_ctx->thr, &js_ctx->bw, ch);
@@ -35438,10 +38466,8 @@ DUK_LOCAL void duk__unemit_1(duk_json_enc_ctx *js_ctx) {
DUK_BW_ADD_PTR(js_ctx->thr, &js_ctx->bw, -1);
}
-#define DUK__MKESC(nybbles,esc1,esc2) \
- (((duk_uint_fast32_t) (nybbles)) << 16) | \
- (((duk_uint_fast32_t) (esc1)) << 8) | \
- ((duk_uint_fast32_t) (esc2))
+#define DUK__MKESC(nybbles, esc1, esc2) \
+ (((duk_uint_fast32_t) (nybbles)) << 16) | (((duk_uint_fast32_t) (esc1)) << 8) | ((duk_uint_fast32_t) (esc2))
DUK_LOCAL duk_uint8_t *duk__emit_esc_auto_fast(duk_json_enc_ctx *js_ctx, duk_uint_fast32_t cp, duk_uint8_t *q) {
duk_uint_fast32_t tmp;
@@ -35466,7 +38492,7 @@ DUK_LOCAL duk_uint8_t *duk__emit_esc_auto_fast(duk_json_enc_ctx *js_ctx, duk_uin
}
} else
#endif
- if (DUK_LIKELY(cp < 0x10000UL)) {
+ if (DUK_LIKELY(cp < 0x10000UL)) {
tmp = DUK__MKESC(4, DUK_ASC_BACKSLASH, DUK_ASC_LC_U);
} else {
#if defined(DUK_USE_JX)
@@ -35497,8 +38523,8 @@ DUK_LOCAL duk_uint8_t *duk__emit_esc_auto_fast(duk_json_enc_ctx *js_ctx, duk_uin
return q;
}
-DUK_LOCAL void duk__enc_key_autoquote(duk_json_enc_ctx *js_ctx, duk_hstring *k) {
- const duk_int8_t *p, *p_start, *p_end; /* Note: intentionally signed. */
+DUK_LOCAL void duk__json_enc_key_autoquote(duk_json_enc_ctx *js_ctx, duk_hstring *k) {
+ const duk_int8_t *p, *p_start, *p_end; /* Note: intentionally signed. */
duk_size_t k_len;
duk_codepoint_t cp;
@@ -35539,8 +38565,8 @@ DUK_LOCAL void duk__enc_key_autoquote(duk_json_enc_ctx *js_ctx, duk_hstring *k)
return;
}
- quote_normally:
- duk__enc_quote_string(js_ctx, k);
+quote_normally:
+ duk__json_enc_quote_string(js_ctx, k);
}
/* The Quote(value) operation: quote a string.
@@ -35548,13 +38574,13 @@ DUK_LOCAL void duk__enc_key_autoquote(duk_json_enc_ctx *js_ctx, duk_hstring *k)
* Stack policy: [ ] -> [ ].
*/
-DUK_LOCAL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_str) {
+DUK_LOCAL void duk__json_enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_str) {
duk_hthread *thr = js_ctx->thr;
const duk_uint8_t *p, *p_start, *p_end, *p_now, *p_tmp;
duk_uint8_t *q;
- duk_ucodepoint_t cp; /* typed for duk_unicode_decode_xutf8() */
+ duk_ucodepoint_t cp; /* typed for duk_unicode_decode_xutf8() */
- DUK_DDD(DUK_DDDPRINT("duk__enc_quote_string: h_str=%!O", (duk_heaphdr *) h_str));
+ DUK_DDD(DUK_DDDPRINT("duk__json_enc_quote_string: h_str=%!O", (duk_heaphdr *) h_str));
DUK_ASSERT(h_str != NULL);
p_start = DUK_HSTRING_GET_DATA(h_str);
@@ -35571,8 +38597,7 @@ DUK_LOCAL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_st
duk_size_t left, now, space;
left = (duk_size_t) (p_end - p);
- now = (left > DUK__JSON_ENCSTR_CHUNKSIZE ?
- DUK__JSON_ENCSTR_CHUNKSIZE : left);
+ now = (left > DUK__JSON_ENCSTR_CHUNKSIZE ? DUK__JSON_ENCSTR_CHUNKSIZE : left);
/* Maximum expansion per input byte is 6:
* - invalid UTF-8 byte causes "\uXXXX" to be emitted (6/1 = 6).
@@ -35608,7 +38633,7 @@ DUK_LOCAL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_st
p--;
/* slow path is shared */
-#else /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
+#else /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
cp = *p;
if (DUK_LIKELY(cp <= 0x7f)) {
@@ -35639,7 +38664,7 @@ DUK_LOCAL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_st
}
} else {
/* slow path is shared */
-#endif /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
+#endif /* DUK_USE_JSON_QUOTESTRING_FASTPATH */
/* slow path decode */
@@ -35671,7 +38696,7 @@ DUK_LOCAL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_st
q = duk__emit_esc_auto_fast(js_ctx, cp, q);
} else {
/* as is */
- DUK_RAW_WRITE_XUTF8(q, cp);
+ DUK_RAW_WRITEINC_XUTF8(q, cp);
}
}
}
@@ -35685,7 +38710,7 @@ DUK_LOCAL void duk__enc_quote_string(duk_json_enc_ctx *js_ctx, duk_hstring *h_st
/* Encode a double (checked by caller) from stack top. Stack top may be
* replaced by serialized string but is not popped (caller does that).
*/
-DUK_LOCAL void duk__enc_double(duk_json_enc_ctx *js_ctx) {
+DUK_LOCAL void duk__json_enc_double(duk_json_enc_ctx *js_ctx) {
duk_hthread *thr;
duk_tval *tv;
duk_double_t d;
@@ -35715,11 +38740,10 @@ DUK_LOCAL void duk__enc_double(duk_json_enc_ctx *js_ctx) {
/* Negative zero needs special handling in JX/JC because
* it would otherwise serialize to '0', not '-0'.
*/
- if (DUK_UNLIKELY(c == DUK_FP_ZERO && s != 0 &&
- (js_ctx->flag_ext_custom_or_compatible))) {
- duk_push_hstring_stridx(thr, DUK_STRIDX_MINUS_ZERO); /* '-0' */
+ if (DUK_UNLIKELY(c == DUK_FP_ZERO && s != 0 && (js_ctx->flag_ext_custom_or_compatible))) {
+ duk_push_hstring_stridx(thr, DUK_STRIDX_MINUS_ZERO); /* '-0' */
} else
-#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_JX || DUK_USE_JC */
{
n2s_flags = 0;
/* [ ... number ] -> [ ... string ] */
@@ -35731,8 +38755,7 @@ DUK_LOCAL void duk__enc_double(duk_json_enc_ctx *js_ctx) {
}
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
- if (!(js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM |
- DUK_JSON_FLAG_EXT_COMPATIBLE))) {
+ if (!(js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE))) {
stridx = DUK_STRIDX_LC_NULL;
} else if (c == DUK_FP_NAN) {
stridx = js_ctx->stridx_custom_nan;
@@ -35749,7 +38772,7 @@ DUK_LOCAL void duk__enc_double(duk_json_enc_ctx *js_ctx) {
#if defined(DUK_USE_FASTINT)
/* Encode a fastint from duk_tval ptr, no value stack effects. */
-DUK_LOCAL void duk__enc_fastint_tval(duk_json_enc_ctx *js_ctx, duk_tval *tv) {
+DUK_LOCAL void duk__json_enc_fastint_tval(duk_json_enc_ctx *js_ctx, duk_tval *tv) {
duk_int64_t v;
/* Fastint range is signed 48-bit so longest value is -2^47 = -140737488355328
@@ -35767,15 +38790,14 @@ DUK_LOCAL void duk__enc_fastint_tval(duk_json_enc_ctx *js_ctx, duk_tval *tv) {
* "long long" type exists. Could also rely on C99 directly but that
* won't work for older MSVC.
*/
- /*DUK_SPRINTF((char *) buf, "%lld", (long long) v);*/
- DUK_SPRINTF((char *) buf, "%"PRIsizet, (size_t) v);
+ DUK_SPRINTF((char *) buf, "%lld", (long long) v);
DUK__EMIT_CSTR(js_ctx, (const char *) buf);
}
#endif
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
#if defined(DUK_USE_HEX_FASTPATH)
-DUK_LOCAL duk_uint8_t *duk__enc_buffer_data_hex(const duk_uint8_t *src, duk_size_t src_len, duk_uint8_t *dst) {
+DUK_LOCAL duk_uint8_t *duk__json_enc_buffer_data_hex(const duk_uint8_t *src, duk_size_t src_len, duk_uint8_t *dst) {
duk_uint8_t *q;
duk_uint16_t *q16;
duk_small_uint_t x;
@@ -35832,8 +38854,8 @@ DUK_LOCAL duk_uint8_t *duk__enc_buffer_data_hex(const duk_uint8_t *src, duk_size
return q;
}
-#else /* DUK_USE_HEX_FASTPATH */
-DUK_LOCAL duk_uint8_t *duk__enc_buffer_data_hex(const duk_uint8_t *src, duk_size_t src_len, duk_uint8_t *dst) {
+#else /* DUK_USE_HEX_FASTPATH */
+DUK_LOCAL duk_uint8_t *duk__json_enc_buffer_data_hex(const duk_uint8_t *src, duk_size_t src_len, duk_uint8_t *dst) {
const duk_uint8_t *p;
const duk_uint8_t *p_end;
duk_uint8_t *q;
@@ -35850,16 +38872,16 @@ DUK_LOCAL duk_uint8_t *duk__enc_buffer_data_hex(const duk_uint8_t *src, duk_size
return q;
}
-#endif /* DUK_USE_HEX_FASTPATH */
+#endif /* DUK_USE_HEX_FASTPATH */
-DUK_LOCAL void duk__enc_buffer_data(duk_json_enc_ctx *js_ctx, duk_uint8_t *buf_data, duk_size_t buf_len) {
+DUK_LOCAL void duk__json_enc_buffer_data(duk_json_enc_ctx *js_ctx, duk_uint8_t *buf_data, duk_size_t buf_len) {
duk_hthread *thr;
duk_uint8_t *q;
duk_size_t space;
thr = js_ctx->thr;
- DUK_ASSERT(js_ctx->flag_ext_custom || js_ctx->flag_ext_compatible); /* caller checks */
+ DUK_ASSERT(js_ctx->flag_ext_custom || js_ctx->flag_ext_compatible); /* caller checks */
DUK_ASSERT(js_ctx->flag_ext_custom_or_compatible);
/* Buffer values are encoded in (lowercase) hex to make the
@@ -35875,7 +38897,7 @@ DUK_LOCAL void duk__enc_buffer_data(duk_json_enc_ctx *js_ctx, duk_uint8_t *buf_d
/* Note: space must cater for both JX and JC. */
space = 9 + buf_len * 2 + 2;
DUK_ASSERT(DUK_HBUFFER_MAX_BYTELEN <= 0x7ffffffeUL);
- DUK_ASSERT((space - 2) / 2 >= buf_len); /* overflow not possible, buffer limits */
+ DUK_ASSERT((space - 2) / 2 >= buf_len); /* overflow not possible, buffer limits */
q = DUK_BW_ENSURE_GETPTR(thr, &js_ctx->bw, space);
#if defined(DUK_USE_JX) && defined(DUK_USE_JC)
@@ -35884,7 +38906,7 @@ DUK_LOCAL void duk__enc_buffer_data(duk_json_enc_ctx *js_ctx, duk_uint8_t *buf_d
#if defined(DUK_USE_JX)
{
*q++ = DUK_ASC_PIPE;
- q = duk__enc_buffer_data_hex(buf_data, buf_len, q);
+ q = duk__json_enc_buffer_data_hex(buf_data, buf_len, q);
*q++ = DUK_ASC_PIPE;
}
@@ -35895,9 +38917,9 @@ DUK_LOCAL void duk__enc_buffer_data(duk_json_enc_ctx *js_ctx, duk_uint8_t *buf_d
#if defined(DUK_USE_JC)
{
DUK_ASSERT(js_ctx->flag_ext_compatible);
- duk_memcpy((void *) q, (const void *) "{\"_buf\":\"", 9); /* len: 9 */
+ duk_memcpy((void *) q, (const void *) "{\"_buf\":\"", 9); /* len: 9 */
q += 9;
- q = duk__enc_buffer_data_hex(buf_data, buf_len, q);
+ q = duk__json_enc_buffer_data_hex(buf_data, buf_len, q);
*q++ = DUK_ASC_DOUBLEQUOTE;
*q++ = DUK_ASC_RCURLY;
}
@@ -35906,15 +38928,15 @@ DUK_LOCAL void duk__enc_buffer_data(duk_json_enc_ctx *js_ctx, duk_uint8_t *buf_d
DUK_BW_SET_PTR(thr, &js_ctx->bw, q);
}
-DUK_LOCAL void duk__enc_buffer_jx_jc(duk_json_enc_ctx *js_ctx, duk_hbuffer *h) {
- duk__enc_buffer_data(js_ctx,
- (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(js_ctx->thr->heap, h),
- (duk_size_t) DUK_HBUFFER_GET_SIZE(h));
+DUK_LOCAL void duk__json_enc_buffer_jx_jc(duk_json_enc_ctx *js_ctx, duk_hbuffer *h) {
+ duk__json_enc_buffer_data(js_ctx,
+ (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(js_ctx->thr->heap, h),
+ (duk_size_t) DUK_HBUFFER_GET_SIZE(h));
}
-#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_JX || DUK_USE_JC */
#if defined(DUK_USE_JSON_STRINGIFY_FASTPATH)
-DUK_LOCAL void duk__enc_buffer_json_fastpath(duk_json_enc_ctx *js_ctx, duk_hbuffer *h) {
+DUK_LOCAL void duk__json_enc_buffer_json_fastpath(duk_json_enc_ctx *js_ctx, duk_hbuffer *h) {
duk_size_t i, n;
const duk_uint8_t *buf;
duk_uint8_t *q;
@@ -35938,7 +38960,7 @@ DUK_LOCAL void duk__enc_buffer_json_fastpath(duk_json_enc_ctx *js_ctx, duk_hbuff
buf = (const duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(js_ctx->thr->heap, h);
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
for (i = 0; i < n; i++) {
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth + 1);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth + 1);
q = DUK_BW_ENSURE_GETPTR(js_ctx->thr, &js_ctx->bw, 32);
q += DUK_SPRINTF((char *) q, "\"%lu\": %u,", (unsigned long) i, (unsigned int) buf[i]);
DUK_BW_SET_PTR(js_ctx->thr, &js_ctx->bw, q);
@@ -35951,21 +38973,21 @@ DUK_LOCAL void duk__enc_buffer_json_fastpath(duk_json_enc_ctx *js_ctx, duk_hbuff
}
DUK_BW_SET_PTR(js_ctx->thr, &js_ctx->bw, q);
}
- DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
+ DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth);
}
DUK__EMIT_1(js_ctx, DUK_ASC_RCURLY);
}
-#endif /* DUK_USE_JSON_STRINGIFY_FASTPATH */
+#endif /* DUK_USE_JSON_STRINGIFY_FASTPATH */
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
-DUK_LOCAL void duk__enc_pointer(duk_json_enc_ctx *js_ctx, void *ptr) {
- char buf[64]; /* XXX: how to figure correct size? */
+DUK_LOCAL void duk__json_enc_pointer(duk_json_enc_ctx *js_ctx, void *ptr) {
+ char buf[64]; /* XXX: how to figure correct size? */
const char *fmt;
- DUK_ASSERT(js_ctx->flag_ext_custom || js_ctx->flag_ext_compatible); /* caller checks */
+ DUK_ASSERT(js_ctx->flag_ext_custom || js_ctx->flag_ext_compatible); /* caller checks */
DUK_ASSERT(js_ctx->flag_ext_custom_or_compatible);
duk_memzero(buf, sizeof(buf));
@@ -35992,52 +39014,52 @@ DUK_LOCAL void duk__enc_pointer(duk_json_enc_ctx *js_ctx, void *ptr) {
#endif
/* When ptr == NULL, the format argument is unused. */
- DUK_SNPRINTF(buf, sizeof(buf) - 1, fmt, ptr); /* must not truncate */
+ DUK_SNPRINTF(buf, sizeof(buf) - 1, fmt, ptr); /* must not truncate */
DUK__EMIT_CSTR(js_ctx, buf);
}
-#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_JX || DUK_USE_JC */
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
-DUK_LOCAL void duk__enc_bufobj(duk_json_enc_ctx *js_ctx, duk_hbufobj *h_bufobj) {
+DUK_LOCAL void duk__json_enc_bufobj(duk_json_enc_ctx *js_ctx, duk_hbufobj *h_bufobj) {
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
if (h_bufobj->buf == NULL || !DUK_HBUFOBJ_VALID_SLICE(h_bufobj)) {
DUK__EMIT_STRIDX(js_ctx, DUK_STRIDX_LC_NULL);
} else {
/* Handle both full and partial slice (as long as covered). */
- duk__enc_buffer_data(js_ctx,
- (duk_uint8_t *) DUK_HBUFOBJ_GET_SLICE_BASE(js_ctx->thr->heap, h_bufobj),
- (duk_size_t) h_bufobj->length);
+ duk__json_enc_buffer_data(js_ctx,
+ (duk_uint8_t *) DUK_HBUFOBJ_GET_SLICE_BASE(js_ctx->thr->heap, h_bufobj),
+ (duk_size_t) h_bufobj->length);
}
}
-#endif /* DUK_USE_JX || DUK_USE_JC */
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* Indent helper. Calling code relies on js_ctx->recursion_depth also being
* directly related to indent depth.
*/
#if defined(DUK_USE_PREFER_SIZE)
-DUK_LOCAL void duk__enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t depth) {
+DUK_LOCAL void duk__json_enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t depth) {
DUK_ASSERT(js_ctx->h_gap != NULL);
- DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(js_ctx->h_gap) > 0); /* caller guarantees */
+ DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(js_ctx->h_gap) > 0); /* caller guarantees */
DUK__EMIT_1(js_ctx, 0x0a);
while (depth-- > 0) {
DUK__EMIT_HSTR(js_ctx, js_ctx->h_gap);
}
}
-#else /* DUK_USE_PREFER_SIZE */
-DUK_LOCAL void duk__enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t depth) {
+#else /* DUK_USE_PREFER_SIZE */
+DUK_LOCAL void duk__json_enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t depth) {
const duk_uint8_t *gap_data;
duk_size_t gap_len;
- duk_size_t avail_bytes; /* bytes of indent available for copying */
- duk_size_t need_bytes; /* bytes of indent still needed */
+ duk_size_t avail_bytes; /* bytes of indent available for copying */
+ duk_size_t need_bytes; /* bytes of indent still needed */
duk_uint8_t *p_start;
duk_uint8_t *p;
DUK_ASSERT(js_ctx->h_gap != NULL);
- DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(js_ctx->h_gap) > 0); /* caller guarantees */
+ DUK_ASSERT(DUK_HSTRING_GET_BYTELEN(js_ctx->h_gap) > 0); /* caller guarantees */
DUK__EMIT_1(js_ctx, 0x0a);
if (DUK_UNLIKELY(depth == 0)) {
@@ -36071,30 +39093,31 @@ DUK_LOCAL void duk__enc_newline_indent(duk_json_enc_ctx *js_ctx, duk_uint_t dept
avail_bytes <<= 1;
}
- DUK_ASSERT(need_bytes < avail_bytes); /* need_bytes may be zero */
+ DUK_ASSERT(need_bytes < avail_bytes); /* need_bytes may be zero */
duk_memcpy((void *) p, (const void *) p_start, (size_t) need_bytes);
p += need_bytes;
/*avail_bytes += need_bytes*/
DUK_BW_SET_PTR(js_ctx->thr, &js_ctx->bw, p);
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
/* Shared entry handling for object/array serialization. */
-DUK_LOCAL void duk__enc_objarr_entry(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top) {
+DUK_LOCAL void duk__json_enc_objarr_entry(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top) {
duk_hthread *thr = js_ctx->thr;
duk_hobject *h_target;
duk_uint_fast32_t i, n;
*entry_top = duk_get_top(thr);
+ duk_native_stack_check(thr);
duk_require_stack(thr, DUK_JSON_ENC_REQSTACK);
/* Loop check using a hybrid approach: a fixed-size visited[] array
* with overflow in a loop check object.
*/
- h_target = duk_known_hobject(thr, -1); /* object or array */
+ h_target = duk_known_hobject(thr, -1); /* object or array */
n = js_ctx->recursion_depth;
if (DUK_UNLIKELY(n > DUK_JSON_ENC_LOOPARRAY)) {
@@ -36111,31 +39134,32 @@ DUK_LOCAL void duk__enc_objarr_entry(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_
js_ctx->visiting[js_ctx->recursion_depth] = h_target;
} else {
duk_push_sprintf(thr, DUK_STR_FMT_PTR, (void *) h_target);
- duk_dup_top(thr); /* -> [ ... voidp voidp ] */
+ duk_dup_top(thr); /* -> [ ... voidp voidp ] */
if (duk_has_prop(thr, js_ctx->idx_loop)) {
DUK_ERROR_TYPE(thr, DUK_STR_CYCLIC_INPUT);
DUK_WO_NORETURN(return;);
}
- duk_push_true(thr); /* -> [ ... voidp true ] */
- duk_put_prop(thr, js_ctx->idx_loop); /* -> [ ... ] */
+ duk_push_true(thr); /* -> [ ... voidp true ] */
+ duk_put_prop(thr, js_ctx->idx_loop); /* -> [ ... ] */
}
/* C recursion check. */
- DUK_ASSERT_DISABLE(js_ctx->recursion_depth >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(js_ctx->recursion_depth >= 0); /* unsigned */
DUK_ASSERT(js_ctx->recursion_depth <= js_ctx->recursion_limit);
if (js_ctx->recursion_depth >= js_ctx->recursion_limit) {
- DUK_ERROR_RANGE(thr, DUK_STR_JSONENC_RECLIMIT);
+ DUK_ERROR_RANGE(thr, DUK_STR_ENC_RECLIMIT);
DUK_WO_NORETURN(return;);
}
js_ctx->recursion_depth++;
DUK_DDD(DUK_DDDPRINT("shared entry finished: top=%ld, loop=%!T",
- (long) duk_get_top(thr), (duk_tval *) duk_get_tval(thr, js_ctx->idx_loop)));
+ (long) duk_get_top(thr),
+ (duk_tval *) duk_get_tval(thr, js_ctx->idx_loop)));
}
/* Shared exit handling for object/array serialization. */
-DUK_LOCAL void duk__enc_objarr_exit(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top) {
+DUK_LOCAL void duk__json_enc_objarr_exit(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_top) {
duk_hthread *thr = js_ctx->thr;
duk_hobject *h_target;
@@ -36147,27 +39171,28 @@ DUK_LOCAL void duk__enc_objarr_exit(duk_json_enc_ctx *js_ctx, duk_idx_t *entry_t
/* Loop check. */
- h_target = duk_known_hobject(thr, *entry_top - 1); /* original target at entry_top - 1 */
+ h_target = duk_known_hobject(thr, *entry_top - 1); /* original target at entry_top - 1 */
if (js_ctx->recursion_depth < DUK_JSON_ENC_LOOPARRAY) {
/* Previous entry was inside visited[], nothing to do. */
} else {
duk_push_sprintf(thr, DUK_STR_FMT_PTR, (void *) h_target);
- duk_del_prop(thr, js_ctx->idx_loop); /* -> [ ... ] */
+ duk_del_prop(thr, js_ctx->idx_loop); /* -> [ ... ] */
}
/* Restore stack top after unbalanced code paths. */
duk_set_top(thr, *entry_top);
DUK_DDD(DUK_DDDPRINT("shared entry finished: top=%ld, loop=%!T",
- (long) duk_get_top(thr), (duk_tval *) duk_get_tval(thr, js_ctx->idx_loop)));
+ (long) duk_get_top(thr),
+ (duk_tval *) duk_get_tval(thr, js_ctx->idx_loop)));
}
/* The JO(value) operation: encode object.
*
* Stack policy: [ object ] -> [ object ].
*/
-DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
+DUK_LOCAL void duk__json_enc_object(duk_json_enc_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_hstring *h_key;
duk_idx_t entry_top;
@@ -36177,9 +39202,9 @@ DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
duk_uarridx_t arr_len, i;
duk_size_t prev_size;
- DUK_DDD(DUK_DDDPRINT("duk__enc_object: obj=%!T", (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("duk__json_enc_object: obj=%!T", (duk_tval *) duk_get_tval(thr, -1)));
- duk__enc_objarr_entry(js_ctx, &entry_top);
+ duk__json_enc_objarr_entry(js_ctx, &entry_top);
idx_obj = entry_top - 1;
@@ -36188,13 +39213,14 @@ DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
} else {
/* XXX: would be nice to enumerate an object at specified index */
duk_dup(thr, idx_obj);
- (void) duk_hobject_get_enumerated_keys(thr, DUK_ENUM_OWN_PROPERTIES_ONLY /*flags*/); /* [ ... target ] -> [ ... target keys ] */
+ (void) duk_hobject_get_enumerated_keys(
+ thr,
+ DUK_ENUM_OWN_PROPERTIES_ONLY /*flags*/); /* [ ... target ] -> [ ... target keys ] */
idx_keys = duk_require_normalize_index(thr, -1);
/* leave stack unbalanced on purpose */
}
- DUK_DDD(DUK_DDDPRINT("idx_keys=%ld, h_keys=%!T",
- (long) idx_keys, (duk_tval *) duk_get_tval(thr, idx_keys)));
+ DUK_DDD(DUK_DDDPRINT("idx_keys=%ld, h_keys=%!T", (long) idx_keys, (duk_tval *) duk_get_tval(thr, idx_keys)));
/* Steps 8-10 have been merged to avoid a "partial" variable. */
@@ -36209,7 +39235,7 @@ DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
arr_len = (duk_uarridx_t) duk_get_length(thr, idx_keys);
emitted = 0;
for (i = 0; i < arr_len; i++) {
- duk_get_prop_index(thr, idx_keys, i); /* -> [ ... key ] */
+ duk_get_prop_index(thr, idx_keys, i); /* -> [ ... key ] */
DUK_DDD(DUK_DDDPRINT("object property loop: holder=%!T, key=%!T",
(duk_tval *) duk_get_tval(thr, idx_obj),
@@ -36217,21 +39243,21 @@ DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
h_key = duk_known_hstring(thr, -1);
DUK_ASSERT(h_key != NULL);
- DUK_ASSERT(!DUK_HSTRING_HAS_SYMBOL(h_key)); /* proplist filtering; enum options */
+ DUK_ASSERT(!DUK_HSTRING_HAS_SYMBOL(h_key)); /* proplist filtering; enum options */
prev_size = DUK_BW_GET_SIZE(js_ctx->thr, &js_ctx->bw);
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth);
- duk__enc_key_autoquote(js_ctx, h_key);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth);
+ duk__json_enc_key_autoquote(js_ctx, h_key);
DUK__EMIT_2(js_ctx, DUK_ASC_COLON, DUK_ASC_SPACE);
} else {
- duk__enc_key_autoquote(js_ctx, h_key);
+ duk__json_enc_key_autoquote(js_ctx, h_key);
DUK__EMIT_1(js_ctx, DUK_ASC_COLON);
}
/* [ ... key ] */
- if (DUK_UNLIKELY(duk__enc_value(js_ctx, idx_obj) == 0)) {
+ if (DUK_UNLIKELY(duk__json_enc_value(js_ctx, idx_obj) == 0)) {
/* Value would yield 'undefined', so skip key altogether.
* Side effects have already happened.
*/
@@ -36246,15 +39272,15 @@ DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
if (emitted) {
DUK_ASSERT(*((duk_uint8_t *) DUK_BW_GET_PTR(js_ctx->thr, &js_ctx->bw) - 1) == DUK_ASC_COMMA);
- DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
+ DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
DUK_ASSERT(js_ctx->recursion_depth >= 1);
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
}
}
DUK__EMIT_1(js_ctx, DUK_ASC_RCURLY);
- duk__enc_objarr_exit(js_ctx, &entry_top);
+ duk__json_enc_objarr_exit(js_ctx, &entry_top);
DUK_ASSERT_TOP(thr, entry_top);
}
@@ -36263,17 +39289,16 @@ DUK_LOCAL void duk__enc_object(duk_json_enc_ctx *js_ctx) {
*
* Stack policy: [ array ] -> [ array ].
*/
-DUK_LOCAL void duk__enc_array(duk_json_enc_ctx *js_ctx) {
+DUK_LOCAL void duk__json_enc_array(duk_json_enc_ctx *js_ctx) {
duk_hthread *thr = js_ctx->thr;
duk_idx_t entry_top;
duk_idx_t idx_arr;
duk_bool_t emitted;
duk_uarridx_t i, arr_len;
- DUK_DDD(DUK_DDDPRINT("duk__enc_array: array=%!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("duk__json_enc_array: array=%!T", (duk_tval *) duk_get_tval(thr, -1)));
- duk__enc_objarr_entry(js_ctx, &entry_top);
+ duk__json_enc_objarr_entry(js_ctx, &entry_top);
idx_arr = entry_top - 1;
@@ -36286,18 +39311,19 @@ DUK_LOCAL void duk__enc_array(duk_json_enc_ctx *js_ctx) {
for (i = 0; i < arr_len; i++) {
DUK_DDD(DUK_DDDPRINT("array entry loop: array=%!T, index=%ld, arr_len=%ld",
(duk_tval *) duk_get_tval(thr, idx_arr),
- (long) i, (long) arr_len));
+ (long) i,
+ (long) arr_len));
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
DUK_ASSERT(js_ctx->recursion_depth >= 1);
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth);
}
- (void) duk_push_uint_to_hstring(thr, (duk_uint_t) i); /* -> [ ... key ] */
+ (void) duk_push_uint_to_hstring(thr, (duk_uint_t) i); /* -> [ ... key ] */
/* [ ... key ] */
- if (DUK_UNLIKELY(duk__enc_value(js_ctx, idx_arr) == 0)) {
+ if (DUK_UNLIKELY(duk__json_enc_value(js_ctx, idx_arr) == 0)) {
/* Value would normally be omitted, replace with 'null'. */
DUK__EMIT_STRIDX(js_ctx, DUK_STRIDX_LC_NULL);
} else {
@@ -36312,15 +39338,15 @@ DUK_LOCAL void duk__enc_array(duk_json_enc_ctx *js_ctx) {
if (emitted) {
DUK_ASSERT(*((duk_uint8_t *) DUK_BW_GET_PTR(js_ctx->thr, &js_ctx->bw) - 1) == DUK_ASC_COMMA);
- DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
+ DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
DUK_ASSERT(js_ctx->recursion_depth >= 1);
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
}
}
DUK__EMIT_1(js_ctx, DUK_ASC_RBRACKET);
- duk__enc_objarr_exit(js_ctx, &entry_top);
+ duk__json_enc_objarr_exit(js_ctx, &entry_top);
DUK_ASSERT_TOP(thr, entry_top);
}
@@ -36329,22 +39355,23 @@ DUK_LOCAL void duk__enc_array(duk_json_enc_ctx *js_ctx) {
*
* Stack policy: [ ... key ] -> [ ... ]
*/
-DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_holder) {
+DUK_LOCAL duk_bool_t duk__json_enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_holder) {
duk_hthread *thr = js_ctx->thr;
duk_tval *tv;
duk_tval *tv_holder;
duk_tval *tv_key;
duk_small_int_t c;
- DUK_DDD(DUK_DDDPRINT("duk__enc_value: idx_holder=%ld, holder=%!T, key=%!T",
- (long) idx_holder, (duk_tval *) duk_get_tval(thr, idx_holder),
+ DUK_DDD(DUK_DDDPRINT("duk__json_enc_value: idx_holder=%ld, holder=%!T, key=%!T",
+ (long) idx_holder,
+ (duk_tval *) duk_get_tval(thr, idx_holder),
(duk_tval *) duk_get_tval(thr, -1)));
tv_holder = DUK_GET_TVAL_POSIDX(thr, idx_holder);
DUK_ASSERT(DUK_TVAL_IS_OBJECT(tv_holder));
tv_key = DUK_GET_TVAL_NEGIDX(thr, -1);
DUK_ASSERT(DUK_TVAL_IS_STRING(tv_key));
- DUK_ASSERT(!DUK_HSTRING_HAS_SYMBOL(DUK_TVAL_GET_STRING(tv_key))); /* Caller responsible. */
+ DUK_ASSERT(!DUK_HSTRING_HAS_SYMBOL(DUK_TVAL_GET_STRING(tv_key))); /* Caller responsible. */
(void) duk_hobject_getprop(thr, tv_holder, tv_key);
/* -> [ ... key val ] */
@@ -36356,19 +39383,17 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
* number won't invoke the .toJSON() method. However, lightfuncs and
* plain buffers mimic objects so we check for their .toJSON() method.
*/
- if (duk_check_type_mask(thr, -1, DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_LIGHTFUNC |
- DUK_TYPE_MASK_BUFFER)) {
+ if (duk_check_type_mask(thr, -1, DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER)) {
duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_TO_JSON);
- if (duk_is_callable(thr, -1)) { /* toJSON() can also be a lightfunc */
+ if (duk_is_callable(thr, -1)) { /* toJSON() can also be a lightfunc */
DUK_DDD(DUK_DDDPRINT("value is object, has callable toJSON() -> call it"));
/* XXX: duk_dup_unvalidated(thr, -2) etc. */
- duk_dup_m2(thr); /* -> [ ... key val toJSON val ] */
- duk_dup_m4(thr); /* -> [ ... key val toJSON val key ] */
- duk_call_method(thr, 1); /* -> [ ... key val val' ] */
- duk_remove_m2(thr); /* -> [ ... key val' ] */
+ duk_dup_m2(thr); /* -> [ ... key val toJSON val ] */
+ duk_dup_m4(thr); /* -> [ ... key val toJSON val key ] */
+ duk_call_method(thr, 1); /* -> [ ... key val val' ] */
+ duk_remove_m2(thr); /* -> [ ... key val' ] */
} else {
- duk_pop(thr); /* -> [ ... key val ] */
+ duk_pop(thr); /* -> [ ... key val ] */
}
}
@@ -36379,12 +39404,12 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
if (js_ctx->h_replacer) {
/* XXX: Here a "slice copy" would be useful. */
DUK_DDD(DUK_DDDPRINT("replacer is set, call replacer"));
- duk_push_hobject(thr, js_ctx->h_replacer); /* -> [ ... key val replacer ] */
- duk_dup(thr, idx_holder); /* -> [ ... key val replacer holder ] */
- duk_dup_m4(thr); /* -> [ ... key val replacer holder key ] */
- duk_dup_m4(thr); /* -> [ ... key val replacer holder key val ] */
- duk_call_method(thr, 2); /* -> [ ... key val val' ] */
- duk_remove_m2(thr); /* -> [ ... key val' ] */
+ duk_push_hobject(thr, js_ctx->h_replacer); /* -> [ ... key val replacer ] */
+ duk_dup(thr, idx_holder); /* -> [ ... key val replacer holder ] */
+ duk_dup_m4(thr); /* -> [ ... key val replacer holder key ] */
+ duk_dup_m4(thr); /* -> [ ... key val replacer holder key val ] */
+ duk_call_method(thr, 2); /* -> [ ... key val val' ] */
+ duk_remove_m2(thr); /* -> [ ... key val' ] */
}
/* [ ... key val ] */
@@ -36400,18 +39425,17 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
- if (DUK_HOBJECT_IS_BUFOBJ(h) &&
- js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE)) {
+ if (DUK_HOBJECT_IS_BUFOBJ(h) && js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE)) {
/* With JX/JC a bufferobject gets serialized specially. */
duk_hbufobj *h_bufobj;
h_bufobj = (duk_hbufobj *) h;
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
- duk__enc_bufobj(js_ctx, h_bufobj);
+ duk__json_enc_bufobj(js_ctx, h_bufobj);
goto pop2_emitted;
}
/* Otherwise bufferobjects get serialized as normal objects. */
-#endif /* JX || JC */
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* JX || JC */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
c = (duk_small_int_t) DUK_HOBJECT_GET_CLASS_NUMBER(h);
switch (c) {
case DUK_HOBJECT_CLASS_NUMBER: {
@@ -36451,8 +39475,7 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
DUK_ASSERT(h != NULL);
if (DUK_HOBJECT_IS_CALLABLE(h)) {
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
- if (js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM |
- DUK_JSON_FLAG_EXT_COMPATIBLE)) {
+ if (js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE)) {
/* We only get here when doing non-standard JSON encoding */
DUK_DDD(DUK_DDDPRINT("-> function allowed, serialize to custom format"));
DUK_ASSERT(js_ctx->flag_ext_custom || js_ctx->flag_ext_compatible);
@@ -36462,13 +39485,13 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
DUK_DDD(DUK_DDDPRINT("-> will result in undefined (function)"));
goto pop2_undef;
}
-#else /* DUK_USE_JX || DUK_USE_JC */
+#else /* DUK_USE_JX || DUK_USE_JC */
DUK_DDD(DUK_DDDPRINT("-> will result in undefined (function)"));
goto pop2_undef;
-#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_JX || DUK_USE_JC */
}
}
- } /* end switch */
+ } /* end switch */
}
/* [ ... key val ] */
@@ -36495,24 +39518,23 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
break;
}
case DUK_TAG_BOOLEAN: {
- DUK__EMIT_STRIDX(js_ctx, DUK_TVAL_GET_BOOLEAN(tv) ?
- DUK_STRIDX_TRUE : DUK_STRIDX_FALSE);
+ DUK__EMIT_STRIDX(js_ctx, DUK_TVAL_GET_BOOLEAN(tv) ? DUK_STRIDX_TRUE : DUK_STRIDX_FALSE);
break;
}
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
/* When JX/JC not in use, the type mask above will avoid this case if needed. */
case DUK_TAG_POINTER: {
- duk__enc_pointer(js_ctx, DUK_TVAL_GET_POINTER(tv));
+ duk__json_enc_pointer(js_ctx, DUK_TVAL_GET_POINTER(tv));
break;
}
-#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_JX || DUK_USE_JC */
case DUK_TAG_STRING: {
duk_hstring *h = DUK_TVAL_GET_STRING(tv);
DUK_ASSERT(h != NULL);
if (DUK_UNLIKELY(DUK_HSTRING_HAS_SYMBOL(h))) {
goto pop2_undef;
}
- duk__enc_quote_string(js_ctx, h);
+ duk__json_enc_quote_string(js_ctx, h);
break;
}
case DUK_TAG_OBJECT: {
@@ -36524,10 +39546,10 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
*/
DUK_ASSERT(!DUK_HOBJECT_IS_CALLABLE(h));
- if (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY) {
- duk__enc_array(js_ctx);
+ if (duk_js_isarray_hobject(h)) {
+ duk__json_enc_array(js_ctx);
} else {
- duk__enc_object(js_ctx);
+ duk__json_enc_object(js_ctx);
}
break;
}
@@ -36540,7 +39562,7 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
case DUK_TAG_BUFFER: {
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
if (js_ctx->flag_ext_custom_or_compatible) {
- duk__enc_buffer_jx_jc(js_ctx, DUK_TVAL_GET_BUFFER(tv));
+ duk__json_enc_buffer_jx_jc(js_ctx, DUK_TVAL_GET_BUFFER(tv));
break;
}
#endif
@@ -36549,7 +39571,7 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
* to handle realloc side effects correctly.
*/
duk_to_object(thr, -1);
- duk__enc_object(js_ctx);
+ duk__json_enc_object(js_ctx);
break;
}
case DUK_TAG_LIGHTFUNC: {
@@ -36568,7 +39590,7 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
/* Number serialization has a significant impact relative to
* other fast path code, so careful fast path for fastints.
*/
- duk__enc_fastint_tval(js_ctx, tv);
+ duk__json_enc_fastint_tval(js_ctx, tv);
break;
#endif
default: {
@@ -36578,24 +39600,24 @@ DUK_LOCAL duk_bool_t duk__enc_value(duk_json_enc_ctx *js_ctx, duk_idx_t idx_hold
/* XXX: A fast path for usual integers would be useful when
* fastint support is not enabled.
*/
- duk__enc_double(js_ctx);
+ duk__json_enc_double(js_ctx);
break;
}
}
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
- pop2_emitted:
+pop2_emitted:
#endif
duk_pop_2(thr); /* [ ... key val ] -> [ ... ] */
- return 1; /* emitted */
+ return 1; /* emitted */
- pop2_undef:
- duk_pop_2(thr); /* [ ... key val ] -> [ ... ] */
- return 0; /* not emitted */
+pop2_undef:
+ duk_pop_2(thr); /* [ ... key val ] -> [ ... ] */
+ return 0; /* not emitted */
}
/* E5 Section 15.12.3, main algorithm, step 4.b.ii steps 1-4. */
-DUK_LOCAL duk_bool_t duk__enc_allow_into_proplist(duk_tval *tv) {
+DUK_LOCAL duk_bool_t duk__json_enc_allow_into_proplist(duk_tval *tv) {
duk_small_int_t c;
/* XXX: some kind of external internal type checker?
@@ -36667,8 +39689,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
break;
}
case DUK_TAG_BOOLEAN: {
- DUK__EMIT_STRIDX(js_ctx, DUK_TVAL_GET_BOOLEAN(tv) ?
- DUK_STRIDX_TRUE : DUK_STRIDX_FALSE);
+ DUK__EMIT_STRIDX(js_ctx, DUK_TVAL_GET_BOOLEAN(tv) ? DUK_STRIDX_TRUE : DUK_STRIDX_FALSE);
break;
}
case DUK_TAG_STRING: {
@@ -36678,15 +39699,14 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
if (DUK_UNLIKELY(DUK_HSTRING_HAS_SYMBOL(h))) {
goto emit_undefined;
}
- duk__enc_quote_string(js_ctx, h);
+ duk__json_enc_quote_string(js_ctx, h);
break;
}
case DUK_TAG_OBJECT: {
duk_hobject *obj;
duk_tval *tv_val;
duk_bool_t emitted = 0;
- duk_uint32_t c_bit, c_all, c_array, c_unbox, c_undef,
- c_func, c_bufobj, c_object, c_abort;
+ duk_uint32_t c_bit, c_all, c_array, c_unbox, c_undef, c_func, c_bufobj, c_object, c_abort;
/* For objects JSON.stringify() only looks for own, enumerable
* properties which is nice for the fast path here.
@@ -36719,11 +39739,11 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
* it (though it's OK to abort the fast path).
*/
- DUK_ASSERT_DISABLE(js_ctx->recursion_depth >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(js_ctx->recursion_depth >= 0); /* unsigned */
DUK_ASSERT(js_ctx->recursion_depth <= js_ctx->recursion_limit);
if (js_ctx->recursion_depth >= js_ctx->recursion_limit) {
DUK_DD(DUK_DDPRINT("fast path recursion limit"));
- DUK_ERROR_RANGE(js_ctx->thr, DUK_STR_JSONDEC_RECLIMIT);
+ DUK_ERROR_RANGE(js_ctx->thr, DUK_STR_DEC_RECLIMIT);
DUK_WO_NORETURN(return 0;);
}
@@ -36771,28 +39791,23 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
if (js_ctx->flag_ext_custom_or_compatible) {
c_all = DUK_HOBJECT_CMASK_ALL;
c_array = DUK_HOBJECT_CMASK_ARRAY;
- c_unbox = DUK_HOBJECT_CMASK_NUMBER |
- DUK_HOBJECT_CMASK_STRING |
- DUK_HOBJECT_CMASK_BOOLEAN |
- DUK_HOBJECT_CMASK_POINTER; /* Symbols are not unboxed. */
+ c_unbox = DUK_HOBJECT_CMASK_NUMBER | DUK_HOBJECT_CMASK_STRING | DUK_HOBJECT_CMASK_BOOLEAN |
+ DUK_HOBJECT_CMASK_POINTER; /* Symbols are not unboxed. */
c_func = DUK_HOBJECT_CMASK_FUNCTION;
c_bufobj = DUK_HOBJECT_CMASK_ALL_BUFOBJS;
c_undef = 0;
c_abort = 0;
c_object = c_all & ~(c_array | c_unbox | c_func | c_bufobj | c_undef | c_abort);
- }
- else
+ } else
#endif
{
c_all = DUK_HOBJECT_CMASK_ALL;
c_array = DUK_HOBJECT_CMASK_ARRAY;
- c_unbox = DUK_HOBJECT_CMASK_NUMBER |
- DUK_HOBJECT_CMASK_STRING |
- DUK_HOBJECT_CMASK_BOOLEAN; /* Symbols are not unboxed. */
+ c_unbox = DUK_HOBJECT_CMASK_NUMBER | DUK_HOBJECT_CMASK_STRING |
+ DUK_HOBJECT_CMASK_BOOLEAN; /* Symbols are not unboxed. */
c_func = 0;
c_bufobj = 0;
- c_undef = DUK_HOBJECT_CMASK_FUNCTION |
- DUK_HOBJECT_CMASK_POINTER;
+ c_undef = DUK_HOBJECT_CMASK_FUNCTION | DUK_HOBJECT_CMASK_POINTER;
/* As the fast path doesn't currently properly support
* duk_hbufobj virtual properties, abort fast path if
* we encounter them in plain JSON mode.
@@ -36850,11 +39865,11 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
prev_size = DUK_BW_GET_SIZE(js_ctx->thr, &js_ctx->bw);
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth);
- duk__enc_key_autoquote(js_ctx, k);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth);
+ duk__json_enc_key_autoquote(js_ctx, k);
DUK__EMIT_2(js_ctx, DUK_ASC_COLON, DUK_ASC_SPACE);
} else {
- duk__enc_key_autoquote(js_ctx, k);
+ duk__json_enc_key_autoquote(js_ctx, k);
DUK__EMIT_1(js_ctx, DUK_ASC_COLON);
}
@@ -36874,10 +39889,10 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
if (emitted) {
DUK_ASSERT(*((duk_uint8_t *) DUK_BW_GET_PTR(js_ctx->thr, &js_ctx->bw) - 1) == DUK_ASC_COMMA);
- DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
+ DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
DUK_ASSERT(js_ctx->recursion_depth >= 1);
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
}
}
DUK__EMIT_1(js_ctx, DUK_ASC_RCURLY);
@@ -36905,7 +39920,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
duk_bool_t has_inherited;
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth);
}
if (DUK_LIKELY(i < asize)) {
@@ -36944,17 +39959,17 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
#endif
/* fall through */
- elem_done:
+ elem_done:
DUK__EMIT_1(js_ctx, DUK_ASC_COMMA);
emitted = 1;
}
if (emitted) {
DUK_ASSERT(*((duk_uint8_t *) DUK_BW_GET_PTR(js_ctx->thr, &js_ctx->bw) - 1) == DUK_ASC_COMMA);
- DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
+ DUK__UNEMIT_1(js_ctx); /* eat trailing comma */
if (DUK_UNLIKELY(js_ctx->h_gap != NULL)) {
DUK_ASSERT(js_ctx->recursion_depth >= 1);
- duk__enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
+ duk__json_enc_newline_indent(js_ctx, js_ctx->recursion_depth - 1U);
}
}
DUK__EMIT_1(js_ctx, DUK_ASC_RBRACKET);
@@ -36963,7 +39978,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
* automatic unboxing. Rely on internal value being
* sane (to avoid infinite recursion).
*/
- DUK_ASSERT((c_bit & DUK_HOBJECT_CMASK_SYMBOL) == 0); /* Symbols are not unboxed. */
+ DUK_ASSERT((c_bit & DUK_HOBJECT_CMASK_SYMBOL) == 0); /* Symbols are not unboxed. */
#if 1
/* The code below is incorrect if .toString() or .valueOf() have
@@ -36973,7 +39988,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
* Unimplemented for now, abort fast path for boxed values.
*/
goto abort_fastpath;
-#else /* disabled */
+#else /* disabled */
/* Disabled until fixed, see above. */
duk_tval *tv_internal;
@@ -36981,22 +39996,20 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
tv_internal = duk_hobject_get_internal_value_tval_ptr(js_ctx->thr->heap, obj);
DUK_ASSERT(tv_internal != NULL);
- DUK_ASSERT(DUK_TVAL_IS_STRING(tv_internal) ||
- DUK_TVAL_IS_NUMBER(tv_internal) ||
- DUK_TVAL_IS_BOOLEAN(tv_internal) ||
- DUK_TVAL_IS_POINTER(tv_internal));
+ DUK_ASSERT(DUK_TVAL_IS_STRING(tv_internal) || DUK_TVAL_IS_NUMBER(tv_internal) ||
+ DUK_TVAL_IS_BOOLEAN(tv_internal) || DUK_TVAL_IS_POINTER(tv_internal));
tv = tv_internal;
DUK_ASSERT(js_ctx->recursion_depth > 0);
- js_ctx->recursion_depth--; /* required to keep recursion depth correct */
+ js_ctx->recursion_depth--; /* required to keep recursion depth correct */
goto restart_match;
-#endif /* disabled */
+#endif /* disabled */
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
} else if (c_bit & c_func) {
DUK__EMIT_STRIDX(js_ctx, js_ctx->stridx_custom_function);
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
} else if (c_bit & c_bufobj) {
- duk__enc_bufobj(js_ctx, (duk_hbufobj *) obj);
+ duk__json_enc_bufobj(js_ctx, (duk_hbufobj *) obj);
#endif
#endif
} else if (c_bit & c_abort) {
@@ -37036,7 +40049,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
if (js_ctx->flag_ext_custom_or_compatible) {
- duk__enc_buffer_jx_jc(js_ctx, DUK_TVAL_GET_BUFFER(tv));
+ duk__json_enc_buffer_jx_jc(js_ctx, DUK_TVAL_GET_BUFFER(tv));
break;
}
#endif
@@ -37044,13 +40057,13 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
/* Plain buffers mimic Uint8Arrays, and have enumerable index
* properties.
*/
- duk__enc_buffer_json_fastpath(js_ctx, DUK_TVAL_GET_BUFFER(tv));
+ duk__json_enc_buffer_json_fastpath(js_ctx, DUK_TVAL_GET_BUFFER(tv));
break;
}
case DUK_TAG_POINTER: {
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
if (js_ctx->flag_ext_custom_or_compatible) {
- duk__enc_pointer(js_ctx, DUK_TVAL_GET_POINTER(tv));
+ duk__json_enc_pointer(js_ctx, DUK_TVAL_GET_POINTER(tv));
break;
} else {
goto emit_undefined;
@@ -37072,7 +40085,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
/* Number serialization has a significant impact relative to
* other fast path code, so careful fast path for fastints.
*/
- duk__enc_fastint_tval(js_ctx, tv);
+ duk__json_enc_fastint_tval(js_ctx, tv);
break;
}
#endif
@@ -37085,7 +40098,7 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
/* XXX: Stack discipline is annoying, could be changed in numconv. */
duk_push_tval(js_ctx->thr, tv);
- duk__enc_double(js_ctx);
+ duk__json_enc_double(js_ctx);
duk_pop(js_ctx->thr);
#if 0
@@ -37103,12 +40116,12 @@ DUK_LOCAL duk_bool_t duk__json_stringify_fast_value(duk_json_enc_ctx *js_ctx, du
#endif
}
}
- return 1; /* not undefined */
+ return 1; /* not undefined */
- emit_undefined:
- return 0; /* value was undefined/unsupported */
+emit_undefined:
+ return 0; /* value was undefined/unsupported */
- abort_fastpath:
+abort_fastpath:
/* Error message doesn't matter: the error is ignored anyway. */
DUK_DD(DUK_DDPRINT("aborting fast path"));
DUK_ERROR_INTERNAL(js_ctx->thr);
@@ -37128,22 +40141,19 @@ DUK_LOCAL duk_ret_t duk__json_stringify_fast(duk_hthread *thr, void *udata) {
tv = DUK_GET_TVAL_NEGIDX(thr, -1);
if (duk__json_stringify_fast_value(js_ctx, tv) == 0) {
DUK_DD(DUK_DDPRINT("top level value not supported, fail fast path"));
- DUK_DCERROR_TYPE_INVALID_ARGS(thr); /* Error message is ignored, so doesn't matter. */
+ DUK_DCERROR_TYPE_INVALID_ARGS(thr); /* Error message is ignored, so doesn't matter. */
}
return 0;
}
-#endif /* DUK_USE_JSON_STRINGIFY_FASTPATH */
+#endif /* DUK_USE_JSON_STRINGIFY_FASTPATH */
/*
* Top level wrappers
*/
DUK_INTERNAL
-void duk_bi_json_parse_helper(duk_hthread *thr,
- duk_idx_t idx_value,
- duk_idx_t idx_reviver,
- duk_small_uint_t flags) {
+void duk_bi_json_parse_helper(duk_hthread *thr, duk_idx_t idx_value, duk_idx_t idx_reviver, duk_small_uint_t flags) {
duk_json_dec_ctx js_ctx_alloc;
duk_json_dec_ctx *js_ctx = &js_ctx_alloc;
duk_hstring *h_text;
@@ -37184,7 +40194,7 @@ void duk_bi_json_parse_helper(duk_hthread *thr,
js_ctx->flag_ext_custom_or_compatible = flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE);
#endif
- h_text = duk_to_hstring(thr, idx_value); /* coerce in-place; rejects Symbols */
+ h_text = duk_to_hstring(thr, idx_value); /* coerce in-place; rejects Symbols */
DUK_ASSERT(h_text != NULL);
/* JSON parsing code is allowed to read [p_start,p_end]: p_end is
@@ -37193,40 +40203,41 @@ void duk_bi_json_parse_helper(duk_hthread *thr,
*/
js_ctx->p_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_text);
js_ctx->p = js_ctx->p_start;
- js_ctx->p_end = ((const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_text)) +
- DUK_HSTRING_GET_BYTELEN(h_text);
+ js_ctx->p_end = ((const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_text)) + DUK_HSTRING_GET_BYTELEN(h_text);
DUK_ASSERT(*(js_ctx->p_end) == 0x00);
- duk__dec_value(js_ctx); /* -> [ ... value ] */
+ duk__json_dec_value(js_ctx); /* -> [ ... value ] */
+ DUK_ASSERT(js_ctx->recursion_depth == 0);
- /* Trailing whitespace has been eaten by duk__dec_value(), so if
+ /* Trailing whitespace has been eaten by duk__json_dec_value(), so if
* we're not at end of input here, it's a SyntaxError.
*/
if (js_ctx->p != js_ctx->p_end) {
- duk__dec_syntax_error(js_ctx);
+ duk__json_dec_syntax_error(js_ctx);
}
if (duk_is_callable(thr, idx_reviver)) {
- DUK_DDD(DUK_DDDPRINT("applying reviver: %!T",
- (duk_tval *) duk_get_tval(thr, idx_reviver)));
+ DUK_DDD(DUK_DDDPRINT("applying reviver: %!T", (duk_tval *) duk_get_tval(thr, idx_reviver)));
js_ctx->idx_reviver = idx_reviver;
duk_push_object(thr);
- duk_dup_m2(thr); /* -> [ ... val root val ] */
- duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_EMPTY_STRING); /* default attrs ok */
- duk_push_hstring_stridx(thr, DUK_STRIDX_EMPTY_STRING); /* -> [ ... val root "" ] */
+ duk_dup_m2(thr); /* -> [ ... val root val ] */
+ duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_EMPTY_STRING); /* default attrs ok */
+ duk_push_hstring_stridx(thr, DUK_STRIDX_EMPTY_STRING); /* -> [ ... val root "" ] */
DUK_DDD(DUK_DDDPRINT("start reviver walk, root=%!T, name=%!T",
(duk_tval *) duk_get_tval(thr, -2),
(duk_tval *) duk_get_tval(thr, -1)));
- duk__dec_reviver_walk(js_ctx); /* [ ... val root "" ] -> [ ... val val' ] */
- duk_remove_m2(thr); /* -> [ ... val' ] */
+ DUK_ASSERT(js_ctx->recursion_depth == 0);
+ duk__json_dec_reviver_walk(js_ctx); /* [ ... val root "" ] -> [ ... val val' ] */
+ DUK_ASSERT(js_ctx->recursion_depth == 0);
+ duk_remove_m2(thr); /* -> [ ... val' ] */
} else {
- DUK_DDD(DUK_DDDPRINT("reviver does not exist or is not callable: %!T",
- (duk_tval *) duk_get_tval(thr, idx_reviver)));
+ DUK_DDD(
+ DUK_DDDPRINT("reviver does not exist or is not callable: %!T", (duk_tval *) duk_get_tval(thr, idx_reviver)));
}
/* Final result is at stack top. */
@@ -37300,7 +40311,7 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
* combinations properly.
*/
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
- js_ctx->stridx_custom_undefined = DUK_STRIDX_LC_NULL; /* standard JSON; array gaps */
+ js_ctx->stridx_custom_undefined = DUK_STRIDX_LC_NULL; /* standard JSON; array gaps */
#if defined(DUK_USE_JX)
if (flags & DUK_JSON_FLAG_EXT_CUSTOM) {
js_ctx->stridx_custom_undefined = DUK_STRIDX_LC_UNDEFINED;
@@ -37308,41 +40319,35 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
js_ctx->stridx_custom_neginf = DUK_STRIDX_MINUS_INFINITY;
js_ctx->stridx_custom_posinf = DUK_STRIDX_INFINITY;
js_ctx->stridx_custom_function =
- (flags & DUK_JSON_FLAG_AVOID_KEY_QUOTES) ?
- DUK_STRIDX_JSON_EXT_FUNCTION2 :
- DUK_STRIDX_JSON_EXT_FUNCTION1;
+ (flags & DUK_JSON_FLAG_AVOID_KEY_QUOTES) ? DUK_STRIDX_JSON_EXT_FUNCTION2 : DUK_STRIDX_JSON_EXT_FUNCTION1;
}
-#endif /* DUK_USE_JX */
+#endif /* DUK_USE_JX */
#if defined(DUK_USE_JX) && defined(DUK_USE_JC)
else
-#endif /* DUK_USE_JX && DUK_USE_JC */
+#endif /* DUK_USE_JX && DUK_USE_JC */
#if defined(DUK_USE_JC)
- if (js_ctx->flags & DUK_JSON_FLAG_EXT_COMPATIBLE) {
+ if (js_ctx->flags & DUK_JSON_FLAG_EXT_COMPATIBLE) {
js_ctx->stridx_custom_undefined = DUK_STRIDX_JSON_EXT_UNDEFINED;
js_ctx->stridx_custom_nan = DUK_STRIDX_JSON_EXT_NAN;
js_ctx->stridx_custom_neginf = DUK_STRIDX_JSON_EXT_NEGINF;
js_ctx->stridx_custom_posinf = DUK_STRIDX_JSON_EXT_POSINF;
js_ctx->stridx_custom_function = DUK_STRIDX_JSON_EXT_FUNCTION1;
}
-#endif /* DUK_USE_JC */
-#endif /* DUK_USE_JX || DUK_USE_JC */
+#endif /* DUK_USE_JC */
+#endif /* DUK_USE_JX || DUK_USE_JC */
#if defined(DUK_USE_JX) || defined(DUK_USE_JC)
- if (js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM |
- DUK_JSON_FLAG_EXT_COMPATIBLE)) {
- DUK_ASSERT(js_ctx->mask_for_undefined == 0); /* already zero */
- }
- else
-#endif /* DUK_USE_JX || DUK_USE_JC */
+ if (js_ctx->flags & (DUK_JSON_FLAG_EXT_CUSTOM | DUK_JSON_FLAG_EXT_COMPATIBLE)) {
+ DUK_ASSERT(js_ctx->mask_for_undefined == 0); /* already zero */
+ } else
+#endif /* DUK_USE_JX || DUK_USE_JC */
{
/* Plain buffer is treated like ArrayBuffer and serialized.
* Lightfuncs are treated like objects, but JSON explicitly
* skips serializing Function objects so we can just reject
* lightfuncs here.
*/
- js_ctx->mask_for_undefined = DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_POINTER |
- DUK_TYPE_MASK_LIGHTFUNC;
+ js_ctx->mask_for_undefined = DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_POINTER | DUK_TYPE_MASK_LIGHTFUNC;
}
DUK_BW_INIT_PUSHBUF(thr, &js_ctx->bw, DUK__JSON_STRINGIFY_BUFSIZE);
@@ -37360,7 +40365,7 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
if (h != NULL) {
if (DUK_HOBJECT_IS_CALLABLE(h)) {
js_ctx->h_replacer = h;
- } else if (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY) {
+ } else if (duk_js_isarray_hobject(h)) {
/* Here the specification requires correct array index enumeration
* which is a bit tricky for sparse arrays (it is handled by the
* enum setup code). We now enumerate ancestors too, although the
@@ -37370,20 +40375,19 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
duk_uarridx_t plist_idx = 0;
duk_small_uint_t enum_flags;
- js_ctx->idx_proplist = duk_push_array(thr); /* XXX: array internal? */
+ js_ctx->idx_proplist = duk_push_bare_array(thr);
- enum_flags = DUK_ENUM_ARRAY_INDICES_ONLY |
- DUK_ENUM_SORT_ARRAY_INDICES; /* expensive flag */
+ enum_flags = DUK_ENUM_ARRAY_INDICES_ONLY | DUK_ENUM_SORT_ARRAY_INDICES; /* expensive flag */
duk_enum(thr, idx_replacer, enum_flags);
while (duk_next(thr, -1 /*enum_index*/, 1 /*get_value*/)) {
/* [ ... proplist enum_obj key val ] */
- if (duk__enc_allow_into_proplist(duk_get_tval(thr, -1))) {
+ if (duk__json_enc_allow_into_proplist(duk_get_tval(thr, -1))) {
/* XXX: duplicates should be eliminated here */
DUK_DDD(DUK_DDDPRINT("proplist enum: key=%!T, val=%!T --> accept",
(duk_tval *) duk_get_tval(thr, -2),
(duk_tval *) duk_get_tval(thr, -1)));
- duk_to_string(thr, -1); /* extra coercion of strings is OK */
- duk_put_prop_index(thr, -4, plist_idx); /* -> [ ... proplist enum_obj key ] */
+ duk_to_string(thr, -1); /* extra coercion of strings is OK */
+ duk_put_prop_index(thr, -4, plist_idx); /* -> [ ... proplist enum_obj key ] */
plist_idx++;
duk_pop(thr);
} else {
@@ -37392,8 +40396,8 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
(duk_tval *) duk_get_tval(thr, -1)));
duk_pop_2(thr);
}
- }
- duk_pop(thr); /* pop enum */
+ }
+ duk_pop(thr); /* pop enum */
/* [ ... proplist ] */
}
@@ -37419,10 +40423,9 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
duk_small_int_t nspace;
/* spaces[] must be static to allow initializer with old compilers like BCC */
static const char spaces[10] = {
- DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE,
- DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE,
- DUK_ASC_SPACE, DUK_ASC_SPACE
- }; /* XXX: helper */
+ DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE,
+ DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE, DUK_ASC_SPACE
+ }; /* XXX: helper */
/* ToInteger() coercion; NaN -> 0, infinities are clamped to 0 and 10 */
nspace = (duk_small_int_t) duk_to_int_clamped(thr, idx_space, 0 /*minval*/, 10 /*maxval*/);
@@ -37433,7 +40436,7 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
DUK_ASSERT(js_ctx->h_gap != NULL);
} else if (duk_is_string_notsymbol(thr, idx_space)) {
duk_dup(thr, idx_space);
- duk_substring(thr, -1, 0, 10); /* clamp to 10 chars */
+ duk_substring(thr, -1, 0, 10); /* clamp to 10 chars */
js_ctx->h_gap = duk_known_hstring(thr, -1);
} else {
/* nop */
@@ -37457,8 +40460,8 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
*/
#if defined(DUK_USE_JSON_STRINGIFY_FASTPATH)
- if (js_ctx->h_replacer == NULL && /* replacer is a mutation risk */
- js_ctx->idx_proplist == -1) { /* proplist is very rare */
+ if (js_ctx->h_replacer == NULL && /* replacer is a mutation risk */
+ js_ctx->idx_proplist == -1) { /* proplist is very rare */
duk_int_t pcall_rc;
duk_small_uint_t prev_ms_base_flags;
@@ -37483,10 +40486,9 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
/* Must prevent finalizers which may have arbitrary side effects. */
prev_ms_base_flags = thr->heap->ms_base_flags;
- thr->heap->ms_base_flags |=
- DUK_MS_FLAG_NO_OBJECT_COMPACTION; /* Avoid attempt to compact any objects. */
- thr->heap->pf_prevent_count++; /* Prevent finalizers. */
- DUK_ASSERT(thr->heap->pf_prevent_count != 0); /* Wrap. */
+ thr->heap->ms_base_flags |= DUK_MS_FLAG_NO_OBJECT_COMPACTION; /* Avoid attempt to compact any objects. */
+ thr->heap->pf_prevent_count++; /* Prevent finalizers. */
+ DUK_ASSERT(thr->heap->pf_prevent_count != 0); /* Wrap. */
pcall_rc = duk_safe_call(thr, duk__json_stringify_fast, (void *) js_ctx /*udata*/, 1 /*nargs*/, 0 /*nret*/);
@@ -37537,7 +40539,7 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
js_ctx->recursion_limit = DUK_USE_JSON_ENC_RECLIMIT;
DUK_ASSERT(js_ctx->recursion_depth == 0);
- if (DUK_UNLIKELY(duk__enc_value(js_ctx, idx_holder) == 0)) { /* [ ... holder key ] -> [ ... holder ] */
+ if (DUK_UNLIKELY(duk__json_enc_value(js_ctx, idx_holder) == 0)) { /* [ ... holder key ] -> [ ... holder ] */
/* Result is undefined. */
duk_push_undefined(thr);
} else {
@@ -37559,7 +40561,7 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
*/
#if defined(DUK_USE_JSON_STRINGIFY_FASTPATH)
- replace_finished:
+replace_finished:
#endif
duk_replace(thr, entry_top);
duk_set_top(thr, entry_top + 1);
@@ -37583,25 +40585,18 @@ void duk_bi_json_stringify_helper(duk_hthread *thr,
*/
DUK_INTERNAL duk_ret_t duk_bi_json_object_parse(duk_hthread *thr) {
- duk_bi_json_parse_helper(thr,
- 0 /*idx_value*/,
- 1 /*idx_replacer*/,
- 0 /*flags*/);
+ duk_bi_json_parse_helper(thr, 0 /*idx_value*/, 1 /*idx_replacer*/, 0 /*flags*/);
return 1;
}
DUK_INTERNAL duk_ret_t duk_bi_json_object_stringify(duk_hthread *thr) {
- duk_bi_json_stringify_helper(thr,
- 0 /*idx_value*/,
- 1 /*idx_replacer*/,
- 2 /*idx_space*/,
- 0 /*flags*/);
+ duk_bi_json_stringify_helper(thr, 0 /*idx_value*/, 1 /*idx_replacer*/, 2 /*idx_space*/, 0 /*flags*/);
return 1;
}
-#endif /* DUK_USE_JSON_BUILTIN */
+#endif /* DUK_USE_JSON_BUILTIN */
-#endif /* DUK_USE_JSON_SUPPORT */
+#endif /* DUK_USE_JSON_SUPPORT */
/* automatic undefs */
#undef DUK__EMIT_1
@@ -37671,7 +40666,7 @@ DUK_LOCAL double duk__fmin_fixed(double x, double y) {
/* fmin() with args -0 and +0 is not guaranteed to return
* -0 as ECMAScript requires.
*/
- if (x == 0 && y == 0) {
+ if (duk_double_equals(x, 0.0) && duk_double_equals(y, 0.0)) {
duk_double_union du1, du2;
du1.d = x;
du2.d = y;
@@ -37698,7 +40693,7 @@ DUK_LOCAL double duk__fmax_fixed(double x, double y) {
/* fmax() with args -0 and +0 is not guaranteed to return
* +0 as ECMAScript requires.
*/
- if (x == 0 && y == 0) {
+ if (duk_double_equals(x, 0.0) && duk_double_equals(y, 0.0)) {
if (DUK_SIGNBIT(x) == 0 || DUK_SIGNBIT(y) == 0) {
return +0.0;
} else {
@@ -37759,7 +40754,7 @@ DUK_LOCAL double duk__trunc(double x) {
return x >= 0.0 ? DUK_FLOOR(x) : DUK_CEIL(x);
#endif
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
DUK_LOCAL double duk__round_fixed(double x) {
/* Numbers half-way between integers must be rounded towards +Infinity,
@@ -37865,59 +40860,32 @@ DUK_LOCAL double duk__atan2_fixed(double x, double y) {
}
#else
/* Some ISO C assumptions. */
- DUK_ASSERT(DUK_ATAN2(DUK_DOUBLE_INFINITY, DUK_DOUBLE_INFINITY) == 0.7853981633974483);
- DUK_ASSERT(DUK_ATAN2(-DUK_DOUBLE_INFINITY, DUK_DOUBLE_INFINITY) == -0.7853981633974483);
- DUK_ASSERT(DUK_ATAN2(DUK_DOUBLE_INFINITY, -DUK_DOUBLE_INFINITY) == 2.356194490192345);
- DUK_ASSERT(DUK_ATAN2(-DUK_DOUBLE_INFINITY, -DUK_DOUBLE_INFINITY) == -2.356194490192345);
+
+ DUK_ASSERT(duk_double_equals(DUK_ATAN2(DUK_DOUBLE_INFINITY, DUK_DOUBLE_INFINITY), 0.7853981633974483));
+ DUK_ASSERT(duk_double_equals(DUK_ATAN2(-DUK_DOUBLE_INFINITY, DUK_DOUBLE_INFINITY), -0.7853981633974483));
+ DUK_ASSERT(duk_double_equals(DUK_ATAN2(DUK_DOUBLE_INFINITY, -DUK_DOUBLE_INFINITY), 2.356194490192345));
+ DUK_ASSERT(duk_double_equals(DUK_ATAN2(-DUK_DOUBLE_INFINITY, -DUK_DOUBLE_INFINITY), -2.356194490192345));
#endif
return DUK_ATAN2(x, y);
}
-#endif /* DUK_USE_AVOID_PLATFORM_FUNCPTRS */
+#endif /* DUK_USE_AVOID_PLATFORM_FUNCPTRS */
/* order must match constants in genbuiltins.py */
DUK_LOCAL const duk__one_arg_func duk__one_arg_funcs[] = {
#if defined(DUK_USE_AVOID_PLATFORM_FUNCPTRS)
- duk__fabs,
- duk__acos,
- duk__asin,
- duk__atan,
- duk__ceil,
- duk__cos,
- duk__exp,
- duk__floor,
- duk__log,
- duk__round_fixed,
- duk__sin,
- duk__sqrt,
- duk__tan,
+ duk__fabs, duk__acos, duk__asin, duk__atan, duk__ceil, duk__cos, duk__exp,
+ duk__floor, duk__log, duk__round_fixed, duk__sin, duk__sqrt, duk__tan,
#if defined(DUK_USE_ES6)
- duk__cbrt,
- duk__log2,
- duk__log10,
- duk__trunc
-#endif
-#else /* DUK_USE_AVOID_PLATFORM_FUNCPTRS */
- DUK_FABS,
- DUK_ACOS,
- DUK_ASIN,
- DUK_ATAN,
- DUK_CEIL,
- DUK_COS,
- DUK_EXP,
- DUK_FLOOR,
- DUK_LOG,
- duk__round_fixed,
- DUK_SIN,
- DUK_SQRT,
- DUK_TAN,
+ duk__cbrt, duk__log2, duk__log10, duk__trunc
+#endif
+#else /* DUK_USE_AVOID_PLATFORM_FUNCPTRS */
+ DUK_FABS, DUK_ACOS, DUK_ASIN, DUK_ATAN, DUK_CEIL, DUK_COS, DUK_EXP,
+ DUK_FLOOR, DUK_LOG, duk__round_fixed, DUK_SIN, DUK_SQRT, DUK_TAN,
#if defined(DUK_USE_ES6)
- duk__cbrt,
- duk__log2,
- duk__log10,
- duk__trunc
+ duk__cbrt, duk__log2, duk__log10, duk__trunc
#endif
-#endif /* DUK_USE_AVOID_PLATFORM_FUNCPTRS */
+#endif /* DUK_USE_AVOID_PLATFORM_FUNCPTRS */
};
/* order must match constants in genbuiltins.py */
@@ -37952,7 +40920,7 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_twoarg_shared(duk_hthread *thr) {
DUK_ASSERT(fun_idx >= 0);
DUK_ASSERT(fun_idx < (duk_small_int_t) (sizeof(duk__two_arg_funcs) / sizeof(duk__two_arg_func)));
- arg1 = duk_to_number(thr, 0); /* explicit ordered evaluation to match coercion semantics */
+ arg1 = duk_to_number(thr, 0); /* explicit ordered evaluation to match coercion semantics */
arg2 = duk_to_number(thr, 1);
fun = duk__two_arg_funcs[fun_idx];
duk_push_number(thr, (duk_double_t) fun((double) arg1, (double) arg2));
@@ -37968,7 +40936,7 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_min(duk_hthread *thr) {
}
DUK_INTERNAL duk_ret_t duk_bi_math_object_random(duk_hthread *thr) {
- duk_push_number(thr, (duk_double_t) DUK_UTIL_GET_RANDOM_DOUBLE(thr));
+ duk_push_number(thr, (duk_double_t) duk_util_get_random_double(thr));
return 1;
}
@@ -38008,13 +40976,13 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_hypot(duk_hthread *thr) {
}
/* Early return cases. */
- if (max == DUK_DOUBLE_INFINITY) {
+ if (duk_double_equals(max, DUK_DOUBLE_INFINITY)) {
duk_push_number(thr, DUK_DOUBLE_INFINITY);
return 1;
} else if (found_nan) {
duk_push_number(thr, DUK_DOUBLE_NAN);
return 1;
- } else if (max == 0.0) {
+ } else if (duk_double_equals(max, 0.0)) {
duk_push_number(thr, 0.0);
/* Otherwise we'd divide by zero. */
return 1;
@@ -38038,7 +41006,7 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_hypot(duk_hthread *thr) {
duk_push_number(thr, (duk_double_t) DUK_SQRT(sum) * max);
return 1;
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
#if defined(DUK_USE_ES6)
DUK_INTERNAL duk_ret_t duk_bi_math_object_sign(duk_hthread *thr) {
@@ -38047,16 +41015,16 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_sign(duk_hthread *thr) {
d = duk_to_number(thr, 0);
if (duk_double_is_nan(d)) {
DUK_ASSERT(duk_is_nan(thr, -1));
- return 1; /* NaN input -> return NaN */
+ return 1; /* NaN input -> return NaN */
}
- if (d == 0.0) {
+ if (duk_double_equals(d, 0.0)) {
/* Zero sign kept, i.e. -0 -> -0, +0 -> +0. */
return 1;
}
duk_push_int(thr, (d > 0.0 ? 1 : -1));
return 1;
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
#if defined(DUK_USE_ES6)
DUK_INTERNAL duk_ret_t duk_bi_math_object_clz32(duk_hthread *thr) {
@@ -38076,7 +41044,7 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_clz32(duk_hthread *thr) {
DUK_ASSERT(i <= 32);
duk_push_uint(thr, i);
return 1;
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
i = 0;
x = duk_to_uint32(thr, 0);
if (x & 0xffff0000UL) {
@@ -38112,9 +41080,9 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_clz32(duk_hthread *thr) {
DUK_ASSERT(i <= 32);
duk_push_uint(thr, i);
return 1;
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
#if defined(DUK_USE_ES6)
DUK_INTERNAL duk_ret_t duk_bi_math_object_imul(duk_hthread *thr) {
@@ -38131,9 +41099,9 @@ DUK_INTERNAL duk_ret_t duk_bi_math_object_imul(duk_hthread *thr) {
duk_push_i32(thr, (duk_int32_t) z);
return 1;
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
-#endif /* DUK_USE_MATH_BUILTIN */
+#endif /* DUK_USE_MATH_BUILTIN */
/*
* Number built-ins
*/
@@ -38155,8 +41123,7 @@ DUK_LOCAL duk_double_t duk__push_this_number_plain(duk_hthread *thr) {
goto done;
}
h = duk_get_hobject(thr, -1);
- if (!h ||
- (DUK_HOBJECT_GET_CLASS_NUMBER(h) != DUK_HOBJECT_CLASS_NUMBER)) {
+ if (!h || (DUK_HOBJECT_GET_CLASS_NUMBER(h) != DUK_HOBJECT_CLASS_NUMBER)) {
DUK_DDD(DUK_DDDPRINT("unacceptable this value: %!T", (duk_tval *) duk_get_tval(thr, -1)));
DUK_ERROR_TYPE(thr, "number expected");
DUK_WO_NORETURN(return 0.0;);
@@ -38164,10 +41131,11 @@ DUK_LOCAL duk_double_t duk__push_this_number_plain(duk_hthread *thr) {
duk_xget_owndataprop_stridx_short(thr, -1, DUK_STRIDX_INT_VALUE);
DUK_ASSERT(duk_is_number(thr, -1));
DUK_DDD(DUK_DDDPRINT("number object: %!T, internal value: %!T",
- (duk_tval *) duk_get_tval(thr, -2), (duk_tval *) duk_get_tval(thr, -1)));
+ (duk_tval *) duk_get_tval(thr, -2),
+ (duk_tval *) duk_get_tval(thr, -1)));
duk_remove_m2(thr);
- done:
+done:
return duk_get_number(thr, -1);
}
@@ -38216,9 +41184,9 @@ DUK_INTERNAL duk_ret_t duk_bi_number_constructor(duk_hthread *thr) {
DUK_ASSERT(DUK_HOBJECT_GET_CLASS_NUMBER(h_this) == DUK_HOBJECT_CLASS_NUMBER);
DUK_ASSERT(DUK_HOBJECT_HAS_EXTENSIBLE(h_this));
- duk_dup_0(thr); /* -> [ val obj val ] */
+ duk_dup_0(thr); /* -> [ val obj val ] */
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_VALUE, DUK_PROPDESC_FLAGS_NONE);
- return 0; /* no return value -> don't replace created value */
+ return 0; /* no return value -> don't replace created value */
}
DUK_INTERNAL duk_ret_t duk_bi_number_prototype_value_of(duk_hthread *thr) {
@@ -38240,10 +41208,7 @@ DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_string(duk_hthread *thr) {
n2s_flags = 0;
- duk_numconv_stringify(thr,
- radix /*radix*/,
- 0 /*digits*/,
- n2s_flags /*flags*/);
+ duk_numconv_stringify(thr, radix /*radix*/, 0 /*digits*/, n2s_flags /*flags*/);
return 1;
}
@@ -38281,16 +41246,12 @@ DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_fixed(duk_hthread *thr) {
goto use_to_string;
}
- n2s_flags = DUK_N2S_FLAG_FIXED_FORMAT |
- DUK_N2S_FLAG_FRACTION_DIGITS;
+ n2s_flags = DUK_N2S_FLAG_FIXED_FORMAT | DUK_N2S_FLAG_FRACTION_DIGITS;
- duk_numconv_stringify(thr,
- 10 /*radix*/,
- frac_digits /*digits*/,
- n2s_flags /*flags*/);
+ duk_numconv_stringify(thr, 10 /*radix*/, frac_digits /*digits*/, n2s_flags /*flags*/);
return 1;
- use_to_string:
+use_to_string:
DUK_ASSERT_TOP(thr, 2);
duk_to_string(thr, -1);
return 1;
@@ -38306,7 +41267,7 @@ DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_exponential(duk_hthread *thr)
d = duk__push_this_number_plain(thr);
frac_undefined = duk_is_undefined(thr, 0);
- duk_to_int(thr, 0); /* for side effects */
+ duk_to_int(thr, 0); /* for side effects */
c = (duk_small_int_t) DUK_FPCLASSIFY(d);
if (c == DUK_FP_NAN || c == DUK_FP_INFINITE) {
@@ -38315,16 +41276,12 @@ DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_exponential(duk_hthread *thr)
frac_digits = (duk_small_int_t) duk_to_int_check_range(thr, 0, 0, 20);
- n2s_flags = DUK_N2S_FLAG_FORCE_EXP |
- (frac_undefined ? 0 : DUK_N2S_FLAG_FIXED_FORMAT);
+ n2s_flags = DUK_N2S_FLAG_FORCE_EXP | (frac_undefined ? 0 : DUK_N2S_FLAG_FIXED_FORMAT);
- duk_numconv_stringify(thr,
- 10 /*radix*/,
- frac_digits + 1 /*leading digit + fractions*/,
- n2s_flags /*flags*/);
+ duk_numconv_stringify(thr, 10 /*radix*/, frac_digits + 1 /*leading digit + fractions*/, n2s_flags /*flags*/);
return 1;
- use_to_string:
+use_to_string:
DUK_ASSERT_TOP(thr, 2);
duk_to_string(thr, -1);
return 1;
@@ -38349,7 +41306,7 @@ DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_precision(duk_hthread *thr) {
}
DUK_ASSERT_TOP(thr, 2);
- duk_to_int(thr, 0); /* for side effects */
+ duk_to_int(thr, 0); /* for side effects */
c = (duk_small_int_t) DUK_FPCLASSIFY(d);
if (c == DUK_FP_NAN || c == DUK_FP_INFINITE) {
@@ -38358,16 +41315,12 @@ DUK_INTERNAL duk_ret_t duk_bi_number_prototype_to_precision(duk_hthread *thr) {
prec = (duk_small_int_t) duk_to_int_check_range(thr, 0, 1, 21);
- n2s_flags = DUK_N2S_FLAG_FIXED_FORMAT |
- DUK_N2S_FLAG_NO_ZERO_PAD;
+ n2s_flags = DUK_N2S_FLAG_FIXED_FORMAT | DUK_N2S_FLAG_NO_ZERO_PAD;
- duk_numconv_stringify(thr,
- 10 /*radix*/,
- prec /*digits*/,
- n2s_flags /*flags*/);
+ duk_numconv_stringify(thr, 10 /*radix*/, prec /*digits*/, n2s_flags /*flags*/);
return 1;
- use_to_string:
+use_to_string:
/* Used when precision is undefined; also used for NaN (-> "NaN"),
* and +/- infinity (-> "Infinity", "-Infinity").
*/
@@ -38393,16 +41346,16 @@ DUK_INTERNAL duk_ret_t duk_bi_number_check_shared(duk_hthread *thr) {
d = duk_get_number(thr, 0);
switch (magic) {
- case 0: /* isFinite() */
+ case 0: /* isFinite() */
ret = duk_double_is_finite(d);
break;
- case 1: /* isInteger() */
+ case 1: /* isInteger() */
ret = duk_double_is_integer(d);
break;
- case 2: /* isNaN() */
+ case 2: /* isNaN() */
ret = duk_double_is_nan(d);
break;
- default: /* isSafeInteger() */
+ default: /* isSafeInteger() */
DUK_ASSERT(magic == 3);
ret = duk_double_is_safe_integer(d);
}
@@ -38411,9 +41364,9 @@ DUK_INTERNAL duk_ret_t duk_bi_number_check_shared(duk_hthread *thr) {
duk_push_boolean(thr, ret);
return 1;
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
-#endif /* DUK_USE_NUMBER_BUILTIN */
+#endif /* DUK_USE_NUMBER_BUILTIN */
/*
* Object built-ins
*/
@@ -38435,8 +41388,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor(duk_hthread *thr) {
arg_mask = duk_get_type_mask(thr, 0);
- if (!duk_is_constructor_call(thr) && /* not a constructor call */
- ((arg_mask & (DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_UNDEFINED)) == 0)) { /* and argument not null or undefined */
+ if (!duk_is_constructor_call(thr) && /* not a constructor call */
+ ((arg_mask & (DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_UNDEFINED)) == 0)) { /* and argument not null or undefined */
duk_to_object(thr, 0);
return 1;
}
@@ -38446,13 +41399,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor(duk_hthread *thr) {
* promote to an object value. Lightfuncs and plain buffers are
* coerced with ToObject() even they could also be returned as is.
*/
- if (arg_mask & (DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_STRING |
- DUK_TYPE_MASK_BOOLEAN |
- DUK_TYPE_MASK_NUMBER |
- DUK_TYPE_MASK_POINTER |
- DUK_TYPE_MASK_BUFFER |
- DUK_TYPE_MASK_LIGHTFUNC)) {
+ if (arg_mask & (DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_STRING | DUK_TYPE_MASK_BOOLEAN | DUK_TYPE_MASK_NUMBER |
+ DUK_TYPE_MASK_POINTER | DUK_TYPE_MASK_BUFFER | DUK_TYPE_MASK_LIGHTFUNC)) {
/* For DUK_TYPE_OBJECT the coercion is a no-op and could
* be checked for explicitly, but Object(obj) calls are
* not very common so opt for minimal footprint.
@@ -38462,13 +41410,12 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor(duk_hthread *thr) {
}
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
DUK_BIDX_OBJECT_PROTOTYPE);
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) && defined(DUK_USE_ES6)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_assign(duk_hthread *thr) {
@@ -38525,9 +41472,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_create(duk_hthread *thr) {
DUK_ASSERT(proto != NULL || duk_is_null(thr, 0));
(void) duk_push_object_helper_proto(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
proto);
if (!duk_is_undefined(thr, 1)) {
@@ -38548,7 +41494,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_create(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_properties(duk_hthread *thr) {
@@ -38563,11 +41509,9 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_properties(duk_hthread *
obj = duk_require_hobject_promote_mask(thr, 0, DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER);
DUK_ASSERT(obj != NULL);
- duk_to_object(thr, 1); /* properties object */
+ duk_to_object(thr, 1); /* properties object */
- DUK_DDD(DUK_DDDPRINT("target=%!iT, properties=%!iT",
- (duk_tval *) duk_get_tval(thr, 0),
- (duk_tval *) duk_get_tval(thr, 1)));
+ DUK_DDD(DUK_DDDPRINT("target=%!iT, properties=%!iT", (duk_tval *) duk_get_tval(thr, 0), (duk_tval *) duk_get_tval(thr, 1)));
/*
* Two pass approach to processing the property descriptors.
@@ -38580,7 +41524,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_properties(duk_hthread *
*/
for (pass = 0; pass < 2; pass++) {
- duk_set_top(thr, 2); /* -> [ hobject props ] */
+ duk_set_top(thr, 2); /* -> [ hobject props ] */
duk_enum(thr, 1, DUK_ENUM_OWN_PROPERTIES_ONLY | DUK_ENUM_INCLUDE_SYMBOLS /*enum_flags*/);
for (;;) {
@@ -38600,12 +41544,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_properties(duk_hthread *
/* [ hobject props enum(props) key desc ] */
- duk_hobject_prepare_property_descriptor(thr,
- 4 /*idx_desc*/,
- &defprop_flags,
- &idx_value,
- &get,
- &set);
+ duk_hobject_prepare_property_descriptor(thr, 4 /*idx_desc*/, &defprop_flags, &idx_value, &get, &set);
/* [ hobject props enum(props) key desc [multiple values] ] */
@@ -38617,14 +41556,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_properties(duk_hthread *
key = duk_known_hstring(thr, 3);
DUK_ASSERT(key != NULL);
- duk_hobject_define_property_helper(thr,
- defprop_flags,
- obj,
- key,
- idx_value,
- get,
- set,
- 1 /*throw_flag*/);
+ duk_hobject_define_property_helper(thr, defprop_flags, obj, key, idx_value, get, set, 1 /*throw_flag*/);
}
}
@@ -38635,7 +41567,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_properties(duk_hthread *
duk_dup_0(thr);
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_seal_freeze_shared(duk_hthread *thr) {
@@ -38644,7 +41576,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_seal_freeze_shared(duk_hthread
duk_seal_freeze_raw(thr, 0, (duk_bool_t) duk_get_current_magic(thr) /*is_freeze*/);
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_is_sealed_frozen_shared(duk_hthread *thr) {
@@ -38656,34 +41588,33 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_is_sealed_frozen_shared(duk_hth
mask = duk_get_type_mask(thr, 0);
if (mask & (DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER)) {
DUK_ASSERT(is_frozen == 0 || is_frozen == 1);
- duk_push_boolean(thr, (mask & DUK_TYPE_MASK_LIGHTFUNC) ?
- 1 : /* lightfunc always frozen and sealed */
- (is_frozen ^ 1)); /* buffer sealed but not frozen (index props writable) */
+ duk_push_boolean(thr,
+ (mask & DUK_TYPE_MASK_LIGHTFUNC) ? 1 : /* lightfunc always frozen and sealed */
+ (is_frozen ^ 1)); /* buffer sealed but not frozen (index props writable) */
} else {
/* ES2015 Sections 19.1.2.12, 19.1.2.13: anything other than an object
* is considered to be already sealed and frozen.
*/
h = duk_get_hobject(thr, 0);
- duk_push_boolean(thr, (h == NULL) ||
- duk_hobject_object_is_sealed_frozen_helper(thr, h, is_frozen /*is_frozen*/));
+ duk_push_boolean(thr, (h == NULL) || duk_hobject_object_is_sealed_frozen_helper(thr, h, is_frozen /*is_frozen*/));
}
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_prototype_to_locale_string(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 0);
(void) duk_push_this_coercible_to_object(thr);
duk_get_prop_stridx_short(thr, 0, DUK_STRIDX_TO_STRING);
-#if 0 /* This is mentioned explicitly in the E5.1 spec, but duk_call_method() checks for it in practice. */
+#if 0 /* This is mentioned explicitly in the E5.1 spec, but duk_call_method() checks for it in practice. */
duk_require_callable(thr, 1);
#endif
- duk_dup_0(thr); /* -> [ O toString O ] */
- duk_call_method(thr, 0); /* XXX: call method tail call? */
+ duk_dup_0(thr); /* -> [ O toString O ] */
+ duk_call_method(thr, 0); /* XXX: call method tail call? */
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_prototype_value_of(duk_hthread *thr) {
@@ -38691,7 +41622,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_prototype_value_of(duk_hthread *thr) {
(void) duk_push_this_coercible_to_object(thr);
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_prototype_is_prototype_of(duk_hthread *thr) {
@@ -38702,7 +41633,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_prototype_is_prototype_of(duk_hthread *thr)
h_v = duk_get_hobject(thr, 0);
if (!h_v) {
- duk_push_false(thr); /* XXX: tail call: return duk_push_false(thr) */
+ duk_push_false(thr); /* XXX: tail call: return duk_push_false(thr) */
return 1;
}
@@ -38712,22 +41643,24 @@ DUK_INTERNAL duk_ret_t duk_bi_object_prototype_is_prototype_of(duk_hthread *thr)
/* E5.1 Section 15.2.4.6, step 3.a, lookup proto once before compare.
* Prototype loops should cause an error to be thrown.
*/
- duk_push_boolean(thr, duk_hobject_prototype_chain_contains(thr, DUK_HOBJECT_GET_PROTOTYPE(thr->heap, h_v), h_obj, 0 /*ignore_loop*/));
+ duk_push_boolean(
+ thr,
+ duk_hobject_prototype_chain_contains(thr, DUK_HOBJECT_GET_PROTOTYPE(thr->heap, h_v), h_obj, 0 /*ignore_loop*/));
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_prototype_has_own_property(duk_hthread *thr) {
return (duk_ret_t) duk_hobject_object_ownprop_helper(thr, 0 /*required_desc_flags*/);
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_prototype_property_is_enumerable(duk_hthread *thr) {
return (duk_ret_t) duk_hobject_object_ownprop_helper(thr, DUK_PROPDESC_FLAG_ENUMERABLE /*required_desc_flags*/);
}
-#endif /* DUK_USE_OBJECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
/* Shared helper to implement Object.getPrototypeOf,
@@ -38784,7 +41717,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_getprototype_shared(duk_hthread *thr) {
}
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
/* Shared helper to implement ES2015 Object.setPrototypeOf,
@@ -38803,7 +41736,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_setprototype_shared(duk_hthread *thr) {
duk_hobject *h_obj;
duk_hobject *h_new_proto;
duk_hobject *h_curr;
- duk_ret_t ret_success = 1; /* retval for success path */
+ duk_ret_t ret_success = 1; /* retval for success path */
duk_uint_t mask;
duk_int_t magic;
@@ -38824,9 +41757,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_setprototype_shared(duk_hthread *thr) {
if (magic == 1) {
duk_require_object_coercible(thr, 0);
} else {
- duk_require_hobject_accept_mask(thr, 0,
- DUK_TYPE_MASK_LIGHTFUNC |
- DUK_TYPE_MASK_BUFFER);
+ duk_require_hobject_accept_mask(thr, 0, DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER);
}
duk_require_type_mask(thr, 1, DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_OBJECT);
}
@@ -38837,9 +41768,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_setprototype_shared(duk_hthread *thr) {
mask = duk_get_type_mask(thr, 0);
if (mask & (DUK_TYPE_MASK_LIGHTFUNC | DUK_TYPE_MASK_BUFFER)) {
duk_hobject *curr_proto;
- curr_proto = thr->builtins[(mask & DUK_TYPE_MASK_LIGHTFUNC) ?
- DUK_BIDX_FUNCTION_PROTOTYPE :
- DUK_BIDX_UINT8ARRAY_PROTOTYPE];
+ curr_proto =
+ thr->builtins[(mask & DUK_TYPE_MASK_LIGHTFUNC) ? DUK_BIDX_FUNCTION_PROTOTYPE : DUK_BIDX_UINT8ARRAY_PROTOTYPE];
if (h_new_proto == curr_proto) {
goto skip;
}
@@ -38869,15 +41799,15 @@ DUK_INTERNAL duk_ret_t duk_bi_object_setprototype_shared(duk_hthread *thr) {
DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr, h_obj, h_new_proto);
/* fall thru */
- skip:
+skip:
duk_set_top(thr, 1);
if (magic == 2) {
duk_push_true(thr);
}
return ret_success;
- fail_nonextensible:
- fail_loop:
+fail_nonextensible:
+fail_loop:
if (magic != 2) {
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
} else {
@@ -38885,7 +41815,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_setprototype_shared(duk_hthread *thr) {
return 1;
}
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_property(duk_hthread *thr) {
@@ -38937,12 +41867,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_property(duk_hthread *th
* Lightfunc set/get values are coerced to full Functions.
*/
- duk_hobject_prepare_property_descriptor(thr,
- 2 /*idx_desc*/,
- &defprop_flags,
- &idx_value,
- &get,
- &set);
+ duk_hobject_prepare_property_descriptor(thr, 2 /*idx_desc*/, &defprop_flags, &idx_value, &get, &set);
/*
* Use Object.defineProperty() helper for the actual operation.
@@ -38950,14 +41875,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_property(duk_hthread *th
DUK_ASSERT(magic == 0U || magic == 1U);
throw_flag = magic ^ 1U;
- ret = duk_hobject_define_property_helper(thr,
- defprop_flags,
- obj,
- key,
- idx_value,
- get,
- set,
- throw_flag);
+ ret = duk_hobject_define_property_helper(thr, defprop_flags, obj, key, idx_value, get, set, throw_flag);
/* Ignore the normalize/validate helper outputs on the value stack,
* they're popped automatically.
@@ -38972,7 +41890,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_define_property(duk_hthread *th
}
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_get_own_property_descriptor(duk_hthread *thr) {
@@ -38988,7 +41906,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_get_own_property_descriptor(duk
duk_hobject_object_get_own_property_descriptor(thr, -2);
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_is_extensible(duk_hthread *thr) {
@@ -39011,7 +41929,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_is_extensible(duk_hthread *thr)
duk_push_boolean(thr, (h != NULL) && DUK_HOBJECT_HAS_EXTENSIBLE(h));
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
/* Shared helper for various key/symbol listings, magic:
@@ -39022,26 +41940,17 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_is_extensible(duk_hthread *thr)
*/
DUK_LOCAL const duk_small_uint_t duk__object_keys_enum_flags[4] = {
/* Object.keys() */
- DUK_ENUM_OWN_PROPERTIES_ONLY |
- DUK_ENUM_NO_PROXY_BEHAVIOR,
+ DUK_ENUM_OWN_PROPERTIES_ONLY | DUK_ENUM_NO_PROXY_BEHAVIOR,
/* Object.getOwnPropertyNames() */
- DUK_ENUM_INCLUDE_NONENUMERABLE |
- DUK_ENUM_OWN_PROPERTIES_ONLY |
- DUK_ENUM_NO_PROXY_BEHAVIOR,
+ DUK_ENUM_INCLUDE_NONENUMERABLE | DUK_ENUM_OWN_PROPERTIES_ONLY | DUK_ENUM_NO_PROXY_BEHAVIOR,
/* Object.getOwnPropertySymbols() */
- DUK_ENUM_INCLUDE_SYMBOLS |
- DUK_ENUM_OWN_PROPERTIES_ONLY |
- DUK_ENUM_EXCLUDE_STRINGS |
- DUK_ENUM_INCLUDE_NONENUMERABLE |
+ DUK_ENUM_INCLUDE_SYMBOLS | DUK_ENUM_OWN_PROPERTIES_ONLY | DUK_ENUM_EXCLUDE_STRINGS | DUK_ENUM_INCLUDE_NONENUMERABLE |
DUK_ENUM_NO_PROXY_BEHAVIOR,
/* Reflect.ownKeys() */
- DUK_ENUM_INCLUDE_SYMBOLS |
- DUK_ENUM_OWN_PROPERTIES_ONLY |
- DUK_ENUM_INCLUDE_NONENUMERABLE |
- DUK_ENUM_NO_PROXY_BEHAVIOR
+ DUK_ENUM_INCLUDE_SYMBOLS | DUK_ENUM_OWN_PROPERTIES_ONLY | DUK_ENUM_INCLUDE_NONENUMERABLE | DUK_ENUM_NO_PROXY_BEHAVIOR
};
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_keys_shared(duk_hthread *thr) {
@@ -39073,9 +41982,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_keys_shared(duk_hthread *thr) {
#if defined(DUK_USE_ES6_PROXY)
/* XXX: better sharing of code between proxy target call sites */
- if (DUK_LIKELY(!duk_hobject_proxy_check(obj,
- &h_proxy_target,
- &h_proxy_handler))) {
+ if (DUK_LIKELY(!duk_hobject_proxy_check(obj, &h_proxy_target, &h_proxy_handler))) {
goto skip_proxy;
}
@@ -39094,8 +42001,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_keys_shared(duk_hthread *thr) {
/* [ obj handler trap ] */
duk_insert(thr, -2);
- duk_push_hobject(thr, h_proxy_target); /* -> [ obj trap handler target ] */
- duk_call_method(thr, 1 /*nargs*/); /* -> [ obj trap_result ] */
+ duk_push_hobject(thr, h_proxy_target); /* -> [ obj trap handler target ] */
+ duk_call_method(thr, 1 /*nargs*/); /* -> [ obj trap_result ] */
h_trap_result = duk_require_hobject(thr, -1);
DUK_UNREF(h_trap_result);
@@ -39106,8 +42013,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_keys_shared(duk_hthread *thr) {
duk_proxy_ownkeys_postprocess(thr, h_proxy_target, enum_flags);
return 1;
- skip_proxy:
-#endif /* DUK_USE_ES6_PROXY */
+skip_proxy:
+#endif /* DUK_USE_ES6_PROXY */
DUK_ASSERT_TOP(thr, 1);
magic = duk_get_current_magic(thr);
@@ -39115,7 +42022,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_keys_shared(duk_hthread *thr) {
enum_flags = duk__object_keys_enum_flags[magic];
return duk_hobject_get_enumerated_keys(thr, enum_flags);
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
#if defined(DUK_USE_OBJECT_BUILTIN) || defined(DUK_USE_REFLECT_BUILTIN)
DUK_INTERNAL duk_ret_t duk_bi_object_constructor_prevent_extensions(duk_hthread *thr) {
@@ -39135,12 +42042,8 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_prevent_extensions(duk_hthread
/* Object.preventExtensions() silent success for non-object. */
if (magic == 0) {
- mask |= DUK_TYPE_MASK_UNDEFINED |
- DUK_TYPE_MASK_NULL |
- DUK_TYPE_MASK_BOOLEAN |
- DUK_TYPE_MASK_NUMBER |
- DUK_TYPE_MASK_STRING |
- DUK_TYPE_MASK_POINTER;
+ mask |= DUK_TYPE_MASK_UNDEFINED | DUK_TYPE_MASK_NULL | DUK_TYPE_MASK_BOOLEAN | DUK_TYPE_MASK_NUMBER |
+ DUK_TYPE_MASK_STRING | DUK_TYPE_MASK_POINTER;
}
if (duk_check_type_mask(thr, 0, mask)) {
@@ -39157,13 +42060,13 @@ DUK_INTERNAL duk_ret_t duk_bi_object_constructor_prevent_extensions(duk_hthread
*/
duk_hobject_compact_props(thr, h);
- done:
+done:
if (magic == 1) {
duk_push_true(thr);
}
return 1;
}
-#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_OBJECT_BUILTIN || DUK_USE_REFLECT_BUILTIN */
/*
* __defineGetter__, __defineSetter__, __lookupGetter__, __lookupSetter__
@@ -39179,9 +42082,10 @@ DUK_INTERNAL duk_ret_t duk_bi_object_prototype_defineaccessor(duk_hthread *thr)
/* [ ToObject(this) key getter/setter ] */
/* ToPropertyKey() coercion is not needed, duk_def_prop() does it. */
- duk_def_prop(thr, 0, DUK_DEFPROP_SET_ENUMERABLE |
- DUK_DEFPROP_SET_CONFIGURABLE |
- (duk_get_current_magic(thr) ? DUK_DEFPROP_HAVE_SETTER : DUK_DEFPROP_HAVE_GETTER));
+ duk_def_prop(thr,
+ 0,
+ DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE |
+ (duk_get_current_magic(thr) ? DUK_DEFPROP_HAVE_SETTER : DUK_DEFPROP_HAVE_GETTER));
return 0;
}
DUK_INTERNAL duk_ret_t duk_bi_object_prototype_lookupaccessor(duk_hthread *thr) {
@@ -39216,7 +42120,7 @@ DUK_INTERNAL duk_ret_t duk_bi_object_prototype_lookupaccessor(duk_hthread *thr)
}
return 1;
}
-#endif /* DUK_USE_ES8 */
+#endif /* DUK_USE_ES8 */
/*
* High resolution time API (performance.now() et al)
*
@@ -39237,7 +42141,7 @@ DUK_INTERNAL duk_ret_t duk_bi_performance_now(duk_hthread *thr) {
return 1;
}
-#if 0 /* Missing until semantics decided. */
+#if 0 /* Missing until semantics decided. */
DUK_INTERNAL duk_ret_t duk_bi_performance_timeorigin_getter(duk_hthread *thr) {
/* No decision yet how to handle timeOrigins, e.g. should one be
* initialized per heap, or per global object set. See
@@ -39246,8 +42150,8 @@ DUK_INTERNAL duk_ret_t duk_bi_performance_timeorigin_getter(duk_hthread *thr) {
duk_push_uint(thr, 0);
return 1;
}
-#endif /* 0 */
-#endif /* DUK_USE_PERFORMANCE_BUILTIN */
+#endif /* 0 */
+#endif /* DUK_USE_PERFORMANCE_BUILTIN */
/*
* Pointer built-ins
*/
@@ -39273,9 +42177,8 @@ DUK_INTERNAL duk_ret_t duk_bi_pointer_constructor(duk_hthread *thr) {
if (duk_is_constructor_call(thr)) {
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_POINTER),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_POINTER),
DUK_BIDX_POINTER_PROTOTYPE);
/* Pointer object internal value is immutable. */
@@ -39320,7 +42223,7 @@ DUK_INTERNAL duk_ret_t duk_bi_pointer_prototype_tostring_shared(duk_hthread *thr
}
return 1;
- type_error:
+type_error:
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
}
/*
@@ -39366,7 +42269,7 @@ DUK_INTERNAL duk_ret_t duk_bi_promise_then(duk_hthread *thr) {
DUK_WO_NORETURN(return 0;);
}
-#endif /* DUK_USE_PROMISE_BUILTIN */
+#endif /* DUK_USE_PROMISE_BUILTIN */
/*
* Proxy built-in (ES2015)
*/
@@ -39432,10 +42335,12 @@ DUK_INTERNAL void duk_proxy_ownkeys_postprocess(duk_hthread *thr, duk_hobject *h
}
/* [ obj trap_result res_arr propname ] */
- duk_put_prop_index(thr, -2, idx++);
+ duk_push_uarridx(thr, idx++);
+ duk_insert(thr, -2);
+ duk_def_prop(thr, -3, DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_SET_WEC);
continue;
- skip_key:
+ skip_key:
duk_pop(thr);
continue;
}
@@ -39452,17 +42357,17 @@ DUK_INTERNAL void duk_proxy_ownkeys_postprocess(duk_hthread *thr, duk_hobject *h
* handled above.
*/
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
#if defined(DUK_USE_ES6_PROXY)
DUK_INTERNAL duk_ret_t duk_bi_proxy_constructor(duk_hthread *thr) {
- DUK_ASSERT_TOP(thr, 2); /* [ target handler ] */
+ DUK_ASSERT_TOP(thr, 2); /* [ target handler ] */
duk_require_constructor_call(thr);
- duk_push_proxy(thr, 0 /*flags*/); /* [ target handler ] -> [ proxy ] */
- return 1; /* replacement */
+ duk_push_proxy(thr, 0 /*flags*/); /* [ target handler ] -> [ proxy ] */
+ return 1; /* replacement */
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
/*
* 'Reflect' built-in (ES2016 Section 26.1)
* http://www.ecma-international.org/ecma-262/7.0/#sec-reflect-object
@@ -39512,7 +42417,7 @@ DUK_INTERNAL duk_ret_t duk_bi_reflect_object_get(duk_hthread *thr) {
tv_obj = DUK_GET_TVAL_POSIDX(thr, 0);
tv_key = DUK_GET_TVAL_POSIDX(thr, 1);
- (void) duk_hobject_getprop(thr, tv_obj, tv_key); /* This could also be a duk_get_prop(). */
+ (void) duk_hobject_getprop(thr, tv_obj, tv_key); /* This could also be a duk_get_prop(). */
return 1;
}
@@ -39561,7 +42466,7 @@ DUK_INTERNAL duk_ret_t duk_bi_reflect_object_set(duk_hthread *thr) {
duk_push_boolean(thr, ret);
return 1;
}
-#endif /* DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_REFLECT_BUILTIN */
/*
* RegExp built-ins
*/
@@ -39577,7 +42482,7 @@ DUK_LOCAL void duk__get_this_regexp(duk_hthread *thr) {
h = duk_require_hobject_with_class(thr, -1, DUK_HOBJECT_CLASS_REGEXP);
DUK_ASSERT(h != NULL);
DUK_UNREF(h);
- duk_insert(thr, 0); /* prepend regexp to valstack 0 index */
+ duk_insert(thr, 0); /* prepend regexp to valstack 0 index */
}
/* XXX: much to improve (code size) */
@@ -39587,10 +42492,8 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_constructor(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 2);
h_pattern = duk_get_hobject(thr, 0);
- if (!duk_is_constructor_call(thr) &&
- h_pattern != NULL &&
- DUK_HOBJECT_GET_CLASS_NUMBER(h_pattern) == DUK_HOBJECT_CLASS_REGEXP &&
- duk_is_undefined(thr, 1)) {
+ if (!duk_is_constructor_call(thr) && h_pattern != NULL &&
+ DUK_HOBJECT_GET_CLASS_NUMBER(h_pattern) == DUK_HOBJECT_CLASS_REGEXP && duk_is_undefined(thr, 1)) {
/* Called as a function, pattern has [[Class]] "RegExp" and
* flags is undefined -> return object as is.
*/
@@ -39605,8 +42508,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_constructor(duk_hthread *thr) {
* call.
*/
- if (h_pattern != NULL &&
- DUK_HOBJECT_GET_CLASS_NUMBER(h_pattern) == DUK_HOBJECT_CLASS_REGEXP) {
+ if (h_pattern != NULL && DUK_HOBJECT_GET_CLASS_NUMBER(h_pattern) == DUK_HOBJECT_CLASS_REGEXP) {
duk_get_prop_stridx_short(thr, 0, DUK_STRIDX_SOURCE);
if (duk_is_undefined(thr, 1)) {
/* In ES5 one would need to read the flags individually;
@@ -39622,20 +42524,21 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_constructor(duk_hthread *thr) {
duk_push_hstring_empty(thr);
} else {
duk_dup_0(thr);
- duk_to_string(thr, -1); /* Rejects Symbols. */
+ duk_to_string(thr, -1); /* Rejects Symbols. */
}
if (duk_is_undefined(thr, 1)) {
duk_push_hstring_empty(thr);
} else {
duk_dup_1(thr);
- duk_to_string(thr, -1); /* Rejects Symbols. */
+ duk_to_string(thr, -1); /* Rejects Symbols. */
}
/* [ ... pattern flags ] */
}
DUK_DDD(DUK_DDDPRINT("RegExp constructor/function call, pattern=%!T, flags=%!T",
- (duk_tval *) duk_get_tval(thr, -2), (duk_tval *) duk_get_tval(thr, -1)));
+ (duk_tval *) duk_get_tval(thr, -2),
+ (duk_tval *) duk_get_tval(thr, -1)));
/* [ ... pattern flags ] (both uncoerced) */
@@ -39685,7 +42588,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_tostring(duk_hthread *thr) {
duk_push_this(thr);
duk_push_literal(thr, "/");
duk_get_prop_stridx(thr, 0, DUK_STRIDX_SOURCE);
- duk_dup_m2(thr); /* another "/" */
+ duk_dup_m2(thr); /* another "/" */
duk_get_prop_stridx(thr, 0, DUK_STRIDX_FLAGS);
duk_concat(thr, 4);
return 1;
@@ -39695,7 +42598,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_flags(duk_hthread *thr) {
/* .flags is ES2015 but present even when ES2015 bindings are
* disabled because the constructor relies on it.
*/
- duk_uint8_t buf[8]; /* enough for all flags + NUL */
+ duk_uint8_t buf[8]; /* enough for all flags + NUL */
duk_uint8_t *p = buf;
/* .flags is generic and works on any object. */
@@ -39736,7 +42639,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_shared_getter(duk_hthread *thr) {
duk_xget_owndataprop_stridx_short(thr, 0, DUK_STRIDX_INT_SOURCE);
duk_xget_owndataprop_stridx_short(thr, 0, DUK_STRIDX_INT_BYTECODE);
h_bc = duk_require_hstring(thr, -1);
- re_flags = (duk_small_uint_t) DUK_HSTRING_GET_DATA(h_bc)[0]; /* Safe even if h_bc length is 0 (= NUL) */
+ re_flags = (duk_small_uint_t) DUK_HSTRING_GET_DATA(h_bc)[0]; /* Safe even if h_bc length is 0 (= NUL) */
duk_pop(thr);
} else if (h == thr->builtins[DUK_BIDX_REGEXP_PROTOTYPE]) {
/* In ES2015 and ES2016 a TypeError would be thrown here.
@@ -39747,7 +42650,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_shared_getter(duk_hthread *thr) {
if (magic != 16 /* .source */) {
return 0;
}
- duk_push_literal(thr, "(?:)"); /* .source handled by switch-case */
+ duk_push_literal(thr, "(?:)"); /* .source handled by switch-case */
re_flags = 0;
} else {
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
@@ -39756,15 +42659,15 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_shared_getter(duk_hthread *thr) {
/* [ regexp source ] */
switch (magic) {
- case 0: { /* global */
+ case 0: { /* global */
duk_push_boolean(thr, (re_flags & DUK_RE_FLAG_GLOBAL));
break;
}
- case 1: { /* ignoreCase */
+ case 1: { /* ignoreCase */
duk_push_boolean(thr, (re_flags & DUK_RE_FLAG_IGNORE_CASE));
break;
}
- case 2: { /* multiline */
+ case 2: { /* multiline */
duk_push_boolean(thr, (re_flags & DUK_RE_FLAG_MULTILINE));
break;
}
@@ -39778,7 +42681,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_shared_getter(duk_hthread *thr) {
break;
}
#endif
- default: { /* source */
+ default: { /* source */
/* leave 'source' on top */
break;
}
@@ -39787,7 +42690,7 @@ DUK_INTERNAL duk_ret_t duk_bi_regexp_prototype_shared_getter(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/*
* String built-ins
*
@@ -39826,7 +42729,8 @@ DUK_LOCAL duk_hstring *duk__str_tostring_notregexp(duk_hthread *thr, duk_idx_t i
return h;
}
-DUK_LOCAL duk_int_t duk__str_search_shared(duk_hthread *thr, duk_hstring *h_this, duk_hstring *h_search, duk_int_t start_cpos, duk_bool_t backwards) {
+DUK_LOCAL duk_int_t
+duk__str_search_shared(duk_hthread *thr, duk_hstring *h_this, duk_hstring *h_search, duk_int_t start_cpos, duk_bool_t backwards) {
duk_int_t cpos;
duk_int_t bpos;
const duk_uint8_t *p_start, *p_end, *p;
@@ -39861,7 +42765,7 @@ DUK_LOCAL duk_int_t duk__str_search_shared(duk_hthread *thr, duk_hstring *h_this
* must be updated if 'p' is wound back (backward scanning).
*/
- firstbyte = q_start[0]; /* leading byte of match string */
+ firstbyte = q_start[0]; /* leading byte of match string */
while (p <= p_end && p >= p_start) {
t = *p;
@@ -39927,15 +42831,13 @@ DUK_INTERNAL duk_ret_t duk_bi_string_constructor(duk_hthread *thr) {
duk_replace(thr, 0);
}
}
- duk_to_string(thr, 0); /* catches symbol argument for constructor call */
+ duk_to_string(thr, 0); /* catches symbol argument for constructor call */
DUK_ASSERT(duk_is_string(thr, 0));
- duk_set_top(thr, 1); /* Top may be 1 or larger. */
+ duk_set_top(thr, 1); /* Top may be 1 or larger. */
if (duk_is_constructor_call(thr)) {
/* String object internal value is immutable */
- flags = DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ |
+ flags = DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ |
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_STRING);
duk_push_object_helper(thr, flags, DUK_BIDX_STRING_PROTOTYPE);
duk_dup_0(thr);
@@ -39961,7 +42863,7 @@ DUK_LOCAL duk_ret_t duk__construct_from_codepoints(duk_hthread *thr, duk_bool_t
n = duk_get_top(thr);
bw = &bw_alloc;
- DUK_BW_INIT_PUSHBUF(thr, bw, (duk_size_t) n); /* initial estimate for ASCII only codepoints */
+ DUK_BW_INIT_PUSHBUF(thr, bw, (duk_size_t) n); /* initial estimate for ASCII only codepoints */
for (i = 0; i < n; i++) {
/* XXX: could improve bufwriter handling to write multiple codepoints
@@ -39975,8 +42877,7 @@ DUK_LOCAL duk_ret_t duk__construct_from_codepoints(duk_hthread *thr, duk_bool_t
* the same.
*/
duk_int32_t i32 = 0;
- if (!duk_is_whole_get_int32(duk_to_number(thr, i), &i32) ||
- i32 < 0 || i32 > 0x10ffffL) {
+ if (!duk_is_whole_get_int32(duk_to_number(thr, i), &i32) || i32 < 0 || i32 > 0x10ffffL) {
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
DUK_ASSERT(i32 >= 0 && i32 <= 0x10ffffL);
@@ -40000,7 +42901,7 @@ DUK_LOCAL duk_ret_t duk__construct_from_codepoints(duk_hthread *thr, duk_bool_t
}
DUK_BW_COMPACT(thr, bw);
- (void) duk_buffer_to_string(thr, -1); /* Safe, extended UTF-8 or CESU-8 encoded. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe, extended UTF-8 or CESU-8 encoded. */
return 1;
}
@@ -40042,10 +42943,10 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_to_string(duk_hthread *thr) {
goto type_error;
}
- (void) duk_require_hstring_notsymbol(thr, -1); /* Reject symbols (and wrapped symbols). */
+ (void) duk_require_hstring_notsymbol(thr, -1); /* Reject symbols (and wrapped symbols). */
return 1;
- type_error:
+type_error:
DUK_DCERROR_TYPE_INVALID_ARGS(thr);
}
@@ -40181,7 +43082,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_substr(duk_hthread *thr) {
* ("undefined" and "null").
*/
duk_push_this(thr);
- h = duk_to_hstring_m1(thr); /* Reject Symbols. */
+ h = duk_to_hstring_m1(thr); /* Reject Symbols. */
DUK_ASSERT(h != NULL);
len = (duk_int_t) DUK_HSTRING_GET_CHARLEN(h);
@@ -40213,7 +43114,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_substr(duk_hthread *thr) {
duk_substring(thr, -1, (duk_size_t) start_pos, (duk_size_t) end_pos);
return 1;
}
-#endif /* DUK_USE_SECTION_B */
+#endif /* DUK_USE_SECTION_B */
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_slice(duk_hthread *thr) {
duk_hstring *h;
@@ -40272,7 +43173,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_indexof_shared(duk_hthread *thr)
duk_hstring *h_search;
duk_int_t clen_this;
duk_int_t cpos;
- duk_small_uint_t is_lastindexof = (duk_small_uint_t) duk_get_current_magic(thr); /* 0=indexOf, 1=lastIndexOf */
+ duk_small_uint_t is_lastindexof = (duk_small_uint_t) duk_get_current_magic(thr); /* 0=indexOf, 1=lastIndexOf */
h_this = duk_push_this_coercible_to_string(thr);
DUK_ASSERT(h_this != NULL);
@@ -40329,7 +43230,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
duk_int_t match_caps;
#endif
duk_uint32_t prev_match_end_boff;
- const duk_uint8_t *r_start, *r_end, *r; /* repl string scan */
+ const duk_uint8_t *r_start, *r_end, *r; /* repl string scan */
duk_size_t tmp_sz;
DUK_ASSERT_TOP(thr, 2);
@@ -40337,7 +43238,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
DUK_ASSERT(h_input != NULL);
bw = &bw_alloc;
- DUK_BW_INIT_PUSHBUF(thr, bw, DUK_HSTRING_GET_BYTELEN(h_input)); /* input size is good output starting point */
+ DUK_BW_INIT_PUSHBUF(thr, bw, DUK_HSTRING_GET_BYTELEN(h_input)); /* input size is good output starting point */
DUK_ASSERT_TOP(thr, 4);
@@ -40358,11 +43259,11 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
duk_push_int(thr, 0);
duk_put_prop_stridx_short(thr, 0, DUK_STRIDX_LAST_INDEX);
}
-#else /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
DUK_DCERROR_UNSUPPORTED(thr);
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
} else {
- duk_to_string(thr, 0); /* rejects symbols */
+ duk_to_string(thr, 0); /* rejects symbols */
#if defined(DUK_USE_REGEXP_SUPPORT)
is_regexp = 0;
is_global = 0;
@@ -40377,7 +43278,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
duk_hstring *h_repl;
is_repl_func = 0;
- h_repl = duk_to_hstring(thr, 1); /* reject symbols */
+ h_repl = duk_to_hstring(thr, 1); /* reject symbols */
DUK_ASSERT(h_repl != NULL);
r_start = DUK_HSTRING_GET_DATA(h_repl);
r_end = r_start + DUK_HSTRING_GET_BYTELEN(h_repl);
@@ -40415,7 +43316,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
if (is_regexp) {
duk_dup_0(thr);
duk_dup_2(thr);
- duk_regexp_match(thr); /* [ ... regexp input ] -> [ res_obj ] */
+ duk_regexp_match(thr); /* [ ... regexp input ] -> [ res_obj ] */
if (!duk_is_object(thr, -1)) {
duk_pop(thr);
break;
@@ -40429,7 +43330,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
duk_get_prop_index(thr, -1, 0);
DUK_ASSERT(duk_is_string(thr, -1));
h_match = duk_known_hstring(thr, -1);
- duk_pop(thr); /* h_match is borrowed, remains reachable through match_obj */
+ duk_pop(thr); /* h_match is borrowed, remains reachable through match_obj */
if (DUK_HSTRING_GET_BYTELEN(h_match) == 0) {
/* This should be equivalent to match() algorithm step 8.f.iii.2:
@@ -40440,35 +43341,43 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
duk_get_prop_stridx_short(thr, 0, DUK_STRIDX_LAST_INDEX);
last_index = (duk_uint32_t) duk_get_uint(thr, -1);
DUK_DDD(DUK_DDDPRINT("empty match, bump lastIndex: %ld -> %ld",
- (long) last_index, (long) (last_index + 1)));
+ (long) last_index,
+ (long) (last_index + 1)));
duk_pop(thr);
duk_push_uint(thr, (duk_uint_t) (last_index + 1));
duk_put_prop_stridx_short(thr, 0, DUK_STRIDX_LAST_INDEX);
}
- DUK_ASSERT(duk_get_length(thr, -1) <= DUK_INT_MAX); /* string limits */
+ DUK_ASSERT(duk_get_length(thr, -1) <= DUK_INT_MAX); /* string limits */
match_caps = (duk_int_t) duk_get_length(thr, -1);
} else {
-#else /* DUK_USE_REGEXP_SUPPORT */
- { /* unconditionally */
-#endif /* DUK_USE_REGEXP_SUPPORT */
- const duk_uint8_t *p_start, *p_end, *p; /* input string scan */
- const duk_uint8_t *q_start; /* match string */
+#else /* DUK_USE_REGEXP_SUPPORT */
+ { /* unconditionally */
+#endif /* DUK_USE_REGEXP_SUPPORT */
+ const duk_uint8_t *p_start, *p_end, *p; /* input string scan */
+ const duk_uint8_t *q_start; /* match string */
+ duk_size_t p_blen;
duk_size_t q_blen;
#if defined(DUK_USE_REGEXP_SUPPORT)
- DUK_ASSERT(!is_global); /* single match always */
+ DUK_ASSERT(!is_global); /* single match always */
#endif
p_start = DUK_HSTRING_GET_DATA(h_input);
p_end = p_start + DUK_HSTRING_GET_BYTELEN(h_input);
+ p_blen = (duk_size_t) DUK_HSTRING_GET_BYTELEN(h_input);
p = p_start;
h_search = duk_known_hstring(thr, 0);
q_start = DUK_HSTRING_GET_DATA(h_search);
q_blen = (duk_size_t) DUK_HSTRING_GET_BYTELEN(h_search);
- p_end -= q_blen; /* ensure full memcmp() fits in while */
+ if (q_blen > p_blen) {
+ break; /* no match */
+ }
+
+ p_end -= q_blen; /* ensure full memcmp() fits in while */
+ DUK_ASSERT(p_end >= p);
match_start_coff = 0;
@@ -40493,7 +43402,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
/* not found */
break;
}
- found:
+ found:
/* stack[0] = search value
* stack[1] = replace value
@@ -40527,9 +43436,9 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
duk_get_prop_index(thr, 4, (duk_uarridx_t) idx);
}
} else {
-#else /* DUK_USE_REGEXP_SUPPORT */
- { /* unconditionally */
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
+ { /* unconditionally */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/* match == search string, by definition */
duk_dup_0(thr);
}
@@ -40539,12 +43448,12 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
/* [ ... replacer match [captures] match_char_offset input ] */
duk_call(thr, duk_get_top(thr) - idx_args);
- h_repl = duk_to_hstring_m1(thr); /* -> [ ... repl_value ] */
+ h_repl = duk_to_hstring_m1(thr); /* -> [ ... repl_value ] */
DUK_ASSERT(h_repl != NULL);
DUK_BW_WRITE_ENSURE_HSTRING(thr, bw, h_repl);
- duk_pop(thr); /* repl_value */
+ duk_pop(thr); /* repl_value */
} else {
r = r_start;
@@ -40591,9 +43500,10 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
* match codepoint encodings would have different lengths.
*/
/* XXX: charlen computed here, and also in char2byte helper. */
- match_end_boff = (duk_uint32_t) duk_heap_strcache_offset_char2byte(thr,
- h_input,
- match_start_coff + (duk_uint_fast32_t) DUK_HSTRING_GET_CHARLEN(h_match));
+ match_end_boff = (duk_uint32_t) duk_heap_strcache_offset_char2byte(
+ thr,
+ h_input,
+ match_start_coff + (duk_uint_fast32_t) DUK_HSTRING_GET_CHARLEN(h_match));
tmp_sz = (duk_size_t) (DUK_HSTRING_GET_BYTELEN(h_input) - match_end_boff);
DUK_BW_WRITE_ENSURE_BYTES(thr, bw, DUK_HSTRING_GET_DATA(h_input) + match_end_boff, tmp_sz);
@@ -40629,7 +43539,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
}
if (capnum > 0 && capnum < match_caps) {
- DUK_ASSERT(is_regexp != 0); /* match_caps == 0 without regexps */
+ DUK_ASSERT(is_regexp != 0); /* match_caps == 0 without regexps */
/* regexp res_obj is at offset 4 */
duk_get_prop_index(thr, 4, (duk_uarridx_t) capnum);
@@ -40648,26 +43558,26 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
} else {
goto repl_write;
}
-#else /* DUK_USE_REGEXP_SUPPORT */
- goto repl_write; /* unconditionally */
-#endif /* DUK_USE_REGEXP_SUPPORT */
- } /* default case */
- } /* switch (ch2) */
+#else /* DUK_USE_REGEXP_SUPPORT */
+ goto repl_write; /* unconditionally */
+#endif /* DUK_USE_REGEXP_SUPPORT */
+ } /* default case */
+ } /* switch (ch2) */
- repl_write:
+ repl_write:
/* ch1 = (r_increment << 8) + byte */
DUK_BW_WRITE_ENSURE_U8(thr, bw, (duk_uint8_t) (ch1 & 0xff));
r += ch1 >> 8;
- } /* while repl */
- } /* if (is_repl_func) */
+ } /* while repl */
+ } /* if (is_repl_func) */
- duk_pop(thr); /* pop regexp res_obj or match string */
+ duk_pop(thr); /* pop regexp res_obj or match string */
#if defined(DUK_USE_REGEXP_SUPPORT)
if (!is_global) {
#else
- { /* unconditionally; is_global==0 */
+ { /* unconditionally; is_global==0 */
#endif
break;
}
@@ -40679,7 +43589,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_replace(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 4);
DUK_BW_COMPACT(thr, bw);
- (void) duk_buffer_to_string(thr, -1); /* Safe if inputs are safe. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe if inputs are safe. */
return 1;
}
@@ -40699,7 +43609,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
#if defined(DUK_USE_REGEXP_SUPPORT)
duk_bool_t is_regexp;
#endif
- duk_bool_t matched; /* set to 1 if any match exists (needed for empty input special case) */
+ duk_bool_t matched; /* set to 1 if any match exists (needed for empty input special case) */
duk_uint32_t prev_match_end_coff, prev_match_end_boff;
duk_uint32_t match_start_boff, match_start_coff;
duk_uint32_t match_end_boff, match_end_coff;
@@ -40737,7 +43647,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
#if defined(DUK_USE_REGEXP_SUPPORT)
duk_push_hobject_bidx(thr, DUK_BIDX_REGEXP_CONSTRUCTOR);
duk_dup_0(thr);
- duk_new(thr, 1); /* [ ... RegExp val ] -> [ ... res ] */
+ duk_new(thr, 1); /* [ ... RegExp val ] -> [ ... res ] */
duk_replace(thr, 0);
/* lastIndex is initialized to zero by new RegExp() */
is_regexp = 1;
@@ -40776,7 +43686,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
if (is_regexp) {
duk_dup_0(thr);
duk_dup_2(thr);
- duk_regexp_match_force_global(thr); /* [ ... regexp input ] -> [ res_obj ] */
+ duk_regexp_match_force_global(thr); /* [ ... regexp input ] -> [ res_obj ] */
if (!duk_is_object(thr, -1)) {
duk_pop(thr);
break;
@@ -40809,23 +43719,23 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
continue;
}
} else {
-#else /* DUK_USE_REGEXP_SUPPORT */
- { /* unconditionally */
-#endif /* DUK_USE_REGEXP_SUPPORT */
- const duk_uint8_t *p_start, *p_end, *p; /* input string scan */
- const duk_uint8_t *q_start; /* match string */
+#else /* DUK_USE_REGEXP_SUPPORT */
+ { /* unconditionally */
+#endif /* DUK_USE_REGEXP_SUPPORT */
+ const duk_uint8_t *p_start, *p_end, *p; /* input string scan */
+ const duk_uint8_t *q_start; /* match string */
duk_size_t q_blen, q_clen;
p_start = DUK_HSTRING_GET_DATA(h_input);
p_end = p_start + DUK_HSTRING_GET_BYTELEN(h_input);
p = p_start + prev_match_end_boff;
- h_sep = duk_known_hstring(thr, 0); /* symbol already rejected above */
+ h_sep = duk_known_hstring(thr, 0); /* symbol already rejected above */
q_start = DUK_HSTRING_GET_DATA(h_sep);
q_blen = (duk_size_t) DUK_HSTRING_GET_BYTELEN(h_sep);
q_clen = (duk_size_t) DUK_HSTRING_GET_CHARLEN(h_sep);
- p_end -= q_blen; /* ensure full memcmp() fits in while */
+ p_end -= q_blen; /* ensure full memcmp() fits in while */
match_start_coff = prev_match_end_coff;
@@ -40838,7 +43748,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
* Don't allow an empty string to match at the end of the input.
*/
- matched = 1; /* empty separator can always match */
+ matched = 1; /* empty separator can always match */
match_start_coff++;
p++;
@@ -40854,7 +43764,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
DUK_ASSERT(q_blen > 0 && q_clen > 0);
while (p <= p_end) {
DUK_ASSERT(p + q_blen <= DUK_HSTRING_GET_DATA(h_input) + DUK_HSTRING_GET_BYTELEN(h_input));
- DUK_ASSERT(q_blen > 0); /* no issues with empty memcmp() */
+ DUK_ASSERT(q_blen > 0); /* no issues with empty memcmp() */
if (duk_memcmp((const void *) p, (const void *) q_start, (size_t) q_blen) == 0) {
/* never an empty match, so step 13.c.iii can't be triggered */
goto found;
@@ -40867,15 +43777,15 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
p++;
}
- not_found:
+ not_found:
/* not found */
break;
- found:
+ found:
matched = 1;
match_start_boff = (duk_uint32_t) (p - p_start);
- match_end_coff = (duk_uint32_t) (match_start_coff + q_clen); /* constrained by string length */
- match_end_boff = (duk_uint32_t) (match_start_boff + q_blen); /* ditto */
+ match_end_coff = (duk_uint32_t) (match_start_coff + q_clen); /* constrained by string length */
+ match_end_boff = (duk_uint32_t) (match_start_boff + q_blen); /* ditto */
/* empty match (may happen with empty separator) -> bump and continue */
if (prev_match_end_boff == match_end_boff) {
@@ -40883,7 +43793,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
prev_match_end_coff++;
continue;
}
- } /* if (is_regexp) */
+ } /* if (is_regexp) */
/* stack[0] = separator (string or regexp)
* stack[1] = limit
@@ -40893,9 +43803,12 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
*/
DUK_DDD(DUK_DDDPRINT("split; match_start b=%ld,c=%ld, match_end b=%ld,c=%ld, prev_end b=%ld,c=%ld",
- (long) match_start_boff, (long) match_start_coff,
- (long) match_end_boff, (long) match_end_coff,
- (long) prev_match_end_boff, (long) prev_match_end_coff));
+ (long) match_start_boff,
+ (long) match_start_coff,
+ (long) match_end_boff,
+ (long) match_end_coff,
+ (long) prev_match_end_boff,
+ (long) prev_match_end_coff));
duk_push_lstring(thr,
(const char *) (DUK_HSTRING_GET_DATA(h_input) + prev_match_end_boff),
@@ -40912,7 +43825,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
len = duk_get_length(thr, 4);
for (i = 1; i < len; i++) {
- DUK_ASSERT(i <= DUK_UARRIDX_MAX); /* cannot have >4G captures */
+ DUK_ASSERT(i <= DUK_UARRIDX_MAX); /* cannot have >4G captures */
duk_get_prop_index(thr, 4, (duk_uarridx_t) i);
duk_put_prop_index(thr, 3, arr_idx);
arr_idx++;
@@ -40924,21 +43837,21 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
duk_pop(thr);
/* lastIndex already set up for next match */
} else {
-#else /* DUK_USE_REGEXP_SUPPORT */
- { /* unconditionally */
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
+ {
+ /* unconditionally */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/* no action */
}
prev_match_end_boff = match_end_boff;
prev_match_end_coff = match_end_coff;
continue;
- } /* for */
+ } /* for */
/* Combined step 11 (empty string special case) and 14-15. */
- DUK_DDD(DUK_DDDPRINT("split trailer; prev_end b=%ld,c=%ld",
- (long) prev_match_end_boff, (long) prev_match_end_coff));
+ DUK_DDD(DUK_DDDPRINT("split trailer; prev_end b=%ld,c=%ld", (long) prev_match_end_boff, (long) prev_match_end_coff));
if (DUK_HSTRING_GET_BYTELEN(h_input) > 0 || !matched) {
/* Add trailer if:
@@ -40955,7 +43868,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_split(duk_hthread *thr) {
return 1;
- hit_limit:
+hit_limit:
#if defined(DUK_USE_REGEXP_SUPPORT)
if (is_regexp) {
duk_pop(thr);
@@ -40987,13 +43900,13 @@ DUK_LOCAL void duk__to_regexp_helper(duk_hthread *thr, duk_idx_t idx, duk_bool_t
}
return;
- do_new:
+do_new:
duk_push_hobject_bidx(thr, DUK_BIDX_REGEXP_CONSTRUCTOR);
duk_dup(thr, idx);
- duk_new(thr, 1); /* [ ... RegExp val ] -> [ ... res ] */
+ duk_new(thr, 1); /* [ ... RegExp val ] -> [ ... res ] */
duk_replace(thr, idx);
}
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
#if defined(DUK_USE_REGEXP_SUPPORT)
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_search(duk_hthread *thr) {
@@ -41008,7 +43921,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_search(duk_hthread *thr) {
*/
DUK_ASSERT_TOP(thr, 1);
- (void) duk_push_this_coercible_to_string(thr); /* at index 1 */
+ (void) duk_push_this_coercible_to_string(thr); /* at index 1 */
duk__to_regexp_helper(thr, 0 /*index*/, 1 /*force_new*/);
/* stack[0] = regexp
@@ -41020,8 +43933,8 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_search(duk_hthread *thr) {
*/
duk_dup_0(thr);
- duk_dup_1(thr); /* [ ... re_obj input ] */
- duk_regexp_match(thr); /* -> [ ... res_obj ] */
+ duk_dup_1(thr); /* [ ... re_obj input ] */
+ duk_regexp_match(thr); /* -> [ ... res_obj ] */
if (!duk_is_object(thr, -1)) {
duk_push_int(thr, -1);
@@ -41032,7 +43945,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_search(duk_hthread *thr) {
DUK_ASSERT(duk_is_number(thr, -1));
return 1;
}
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
#if defined(DUK_USE_REGEXP_SUPPORT)
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_match(duk_hthread *thr) {
@@ -41052,8 +43965,8 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_match(duk_hthread *thr) {
*/
if (!global) {
- duk_regexp_match(thr); /* -> [ res_obj ] */
- return 1; /* return 'res_obj' */
+ duk_regexp_match(thr); /* -> [ res_obj ] */
+ return 1; /* return 'res_obj' */
}
/* Global case is more complex. */
@@ -41074,7 +43987,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_match(duk_hthread *thr) {
duk_dup_0(thr);
duk_dup_1(thr);
- duk_regexp_match(thr); /* -> [ ... regexp string ] -> [ ... res_obj ] */
+ duk_regexp_match(thr); /* -> [ ... regexp string ] -> [ ... res_obj ] */
if (!duk_is_object(thr, -1)) {
duk_pop(thr);
@@ -41093,24 +44006,24 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_match(duk_hthread *thr) {
}
prev_last_index = this_index;
- duk_get_prop_index(thr, -1, 0); /* match string */
+ duk_get_prop_index(thr, -1, 0); /* match string */
duk_put_prop_index(thr, 2, (duk_uarridx_t) arr_idx);
arr_idx++;
- duk_pop(thr); /* res_obj */
+ duk_pop(thr); /* res_obj */
}
if (arr_idx == 0) {
duk_push_null(thr);
}
- return 1; /* return 'res_arr' or 'null' */
+ return 1; /* return 'res_arr' or 'null' */
}
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_concat(duk_hthread *thr) {
/* duk_concat() coerces arguments with ToString() in correct order */
(void) duk_push_this_coercible_to_string(thr);
- duk_insert(thr, 0); /* this is relatively expensive */
+ duk_insert(thr, 0); /* this is relatively expensive */
duk_concat(thr, duk_get_top(thr));
return 1;
}
@@ -41175,10 +44088,10 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_repeat(duk_hthread *thr) {
#if defined(DUK_USE_PREFER_SIZE)
p = buf;
while (count-- > 0) {
- duk_memcpy((void *) p, (const void *) src, input_blen); /* copy size may be zero, but pointers are valid */
+ duk_memcpy((void *) p, (const void *) src, input_blen); /* copy size may be zero, but pointers are valid */
p += input_blen;
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
/* Take advantage of already copied pieces to speed up the process
* especially for small repeated strings.
*/
@@ -41188,7 +44101,9 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_repeat(duk_hthread *thr) {
for (;;) {
duk_size_t remain = (duk_size_t) (p_end - p);
DUK_DDD(DUK_DDDPRINT("remain=%ld, copy_size=%ld, input_blen=%ld, result_len=%ld",
- (long) remain, (long) copy_size, (long) input_blen,
+ (long) remain,
+ (long) copy_size,
+ (long) input_blen,
(long) result_len));
if (remain <= copy_size) {
/* If result_len is zero, this case is taken and does
@@ -41201,10 +44116,10 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_repeat(duk_hthread *thr) {
p += copy_size;
}
- src = (const duk_uint8_t *) buf; /* Use buf as source for larger copies. */
+ src = (const duk_uint8_t *) buf; /* Use buf as source for larger copies. */
copy_size = (duk_size_t) (p - buf);
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
/* XXX: It would be useful to be able to create a duk_hstring with
* a certain byte size whose data area wasn't initialized and which
@@ -41215,13 +44130,13 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_repeat(duk_hthread *thr) {
* intern table (they are not in heap_allocated).
*/
- duk_buffer_to_string(thr, -1); /* Safe if input is safe. */
+ duk_buffer_to_string(thr, -1); /* Safe if input is safe. */
return 1;
- fail_range:
+fail_range:
DUK_DCERROR_RANGE_INVALID_ARGS(thr);
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_locale_compare(duk_hthread *thr) {
duk_hstring *h1;
@@ -41275,7 +44190,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_locale_compare(duk_hthread *thr)
ret = -1;
goto done;
- done:
+done:
duk_push_int(thr, (duk_int_t) ret);
return 1;
}
@@ -41283,44 +44198,65 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_locale_compare(duk_hthread *thr)
#if defined(DUK_USE_ES6)
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_startswith_endswith(duk_hthread *thr) {
duk_int_t magic;
- duk_hstring *h;
+ duk_hstring *h_target;
+ duk_size_t blen_target;
duk_hstring *h_search;
duk_size_t blen_search;
- const duk_uint8_t *p_cmp_start;
- duk_bool_t result;
+ duk_int_t off;
+ duk_bool_t result = 0;
+ duk_size_t blen_left;
- h = duk_push_this_coercible_to_string(thr);
- DUK_ASSERT(h != NULL);
+ /* Because string byte lengths are in [0,DUK_INT_MAX] it's safe to
+ * subtract two string lengths without overflow.
+ */
+ DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= DUK_INT_MAX);
+
+ h_target = duk_push_this_coercible_to_string(thr);
+ DUK_ASSERT(h_target != NULL);
h_search = duk__str_tostring_notregexp(thr, 0);
DUK_ASSERT(h_search != NULL);
magic = duk_get_current_magic(thr);
- p_cmp_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h);
+ /* Careful to avoid pointer overflows in the matching logic. */
+
+ blen_target = DUK_HSTRING_GET_BYTELEN(h_target);
blen_search = DUK_HSTRING_GET_BYTELEN(h_search);
+#if 0
+ /* If search string is longer than the target string, we can
+ * never match. Could check explicitly, but should be handled
+ * correctly below.
+ */
+ if (blen_search > blen_target) {
+ goto finish;
+ }
+#endif
+
+ off = 0;
if (duk_is_undefined(thr, 1)) {
if (magic) {
- p_cmp_start = p_cmp_start + DUK_HSTRING_GET_BYTELEN(h) - blen_search;
+ off = (duk_int_t) blen_target - (duk_int_t) blen_search;
} else {
- /* p_cmp_start already OK */
+ DUK_ASSERT(off == 0);
}
} else {
duk_int_t len;
duk_int_t pos;
DUK_ASSERT(DUK_HSTRING_MAX_BYTELEN <= DUK_INT_MAX);
- len = (duk_int_t) DUK_HSTRING_GET_CHARLEN(h);
+ len = (duk_int_t) DUK_HSTRING_GET_CHARLEN(h_target);
pos = duk_to_int_clamped(thr, 1, 0, len);
DUK_ASSERT(pos >= 0 && pos <= len);
+ off = (duk_int_t) duk_heap_strcache_offset_char2byte(thr, h_target, (duk_uint_fast32_t) pos);
if (magic) {
- p_cmp_start -= blen_search; /* Conceptually subtracted last, but do already here. */
+ off -= (duk_int_t) blen_search;
}
- DUK_ASSERT(pos >= 0 && pos <= len);
-
- p_cmp_start += duk_heap_strcache_offset_char2byte(thr, h, (duk_uint_fast32_t) pos);
+ }
+ if (off < 0 || off > (duk_int_t) blen_target) {
+ goto finish;
}
/* The main comparison can be done using a memcmp() rather than
@@ -41330,20 +44266,22 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_startswith_endswith(duk_hthread *
* comparison range.
*/
- result = 0;
- if (p_cmp_start >= DUK_HSTRING_GET_DATA(h) &&
- (duk_size_t) (p_cmp_start - (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h)) + blen_search <= DUK_HSTRING_GET_BYTELEN(h)) {
- if (duk_memcmp((const void *) p_cmp_start,
- (const void *) DUK_HSTRING_GET_DATA(h_search),
- (size_t) blen_search) == 0) {
+ DUK_ASSERT(off >= 0);
+ DUK_ASSERT((duk_size_t) off <= blen_target);
+ blen_left = blen_target - (duk_size_t) off;
+ if (blen_left >= blen_search) {
+ const duk_uint8_t *p_cmp_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_target) + off;
+ const duk_uint8_t *p_search = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_search);
+ if (duk_memcmp_unsafe((const void *) p_cmp_start, (const void *) p_search, (size_t) blen_search) == 0) {
result = 1;
}
}
+finish:
duk_push_boolean(thr, result);
return 1;
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
#if defined(DUK_USE_ES6)
DUK_INTERNAL duk_ret_t duk_bi_string_prototype_includes(duk_hthread *thr) {
@@ -41366,8 +44304,8 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_includes(duk_hthread *thr) {
duk_push_boolean(thr, pos >= 0);
return 1;
}
-#endif /* DUK_USE_ES6 */
-#endif /* DUK_USE_STRING_BUILTIN */
+#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_STRING_BUILTIN */
/*
* Symbol built-in
*/
@@ -41409,7 +44347,7 @@ DUK_INTERNAL duk_ret_t duk_bi_symbol_constructor_shared(duk_hthread *thr) {
buf = (duk_uint8_t *) duk_push_fixed_buffer(thr, 1 + len + 1 + 17 + 1);
DUK_ASSERT(buf != NULL);
p = buf + 1;
- DUK_ASSERT(desc != NULL || len == 0); /* may be NULL if len is 0 */
+ DUK_ASSERT(desc != NULL || len == 0); /* may be NULL if len is 0 */
duk_memcpy_unsafe((void *) p, (const void *) desc, len);
p += len;
if (magic == 0) {
@@ -41420,7 +44358,9 @@ DUK_INTERNAL duk_ret_t duk_bi_symbol_constructor_shared(duk_hthread *thr) {
if (++thr->heap->sym_counter[0] == 0) {
thr->heap->sym_counter[1]++;
}
- p += DUK_SPRINTF((char *) p, "\xFF" "%lx-%lx",
+ p += DUK_SPRINTF((char *) p,
+ "\xFF"
+ "%lx-%lx",
(unsigned long) thr->heap->sym_counter[1],
(unsigned long) thr->heap->sym_counter[0]);
if (desc == NULL) {
@@ -41537,7 +44477,7 @@ DUK_INTERNAL duk_ret_t duk_bi_symbol_toprimitive(duk_hthread *thr) {
return 1;
}
-#endif /* DUK_USE_SYMBOL_BUILTIN */
+#endif /* DUK_USE_SYMBOL_BUILTIN */
/*
* Thread builtins
*/
@@ -41571,7 +44511,7 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_constructor(duk_hthread *thr) {
*/
duk_push_hobject(new_thr, func);
- return 1; /* return thread */
+ return 1; /* return thread */
}
#endif
@@ -41617,14 +44557,15 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_resume(duk_hthread *ctx) {
*/
if (thr->callstack_top < 2) {
- DUK_DD(DUK_DDPRINT("resume state invalid: callstack should contain at least 2 entries (caller and Duktape.Thread.resume)"));
+ DUK_DD(DUK_DDPRINT(
+ "resume state invalid: callstack should contain at least 2 entries (caller and Duktape.Thread.resume)"));
goto state_error;
}
DUK_ASSERT(thr->callstack_curr != NULL);
DUK_ASSERT(thr->callstack_curr->parent != NULL);
- DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr) != NULL); /* us */
+ DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr) != NULL); /* us */
DUK_ASSERT(DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr)));
- DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr->parent) != NULL); /* caller */
+ DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr->parent) != NULL); /* caller */
caller_func = DUK_ACT_GET_FUNC(thr->callstack_curr->parent);
if (!DUK_HOBJECT_IS_COMPFUNC(caller_func)) {
@@ -41636,14 +44577,12 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_resume(duk_hthread *ctx) {
* like for yield.
*/
- if (thr_resume->state != DUK_HTHREAD_STATE_INACTIVE &&
- thr_resume->state != DUK_HTHREAD_STATE_YIELDED) {
+ if (thr_resume->state != DUK_HTHREAD_STATE_INACTIVE && thr_resume->state != DUK_HTHREAD_STATE_YIELDED) {
DUK_DD(DUK_DDPRINT("resume state invalid: target thread must be INACTIVE or YIELDED"));
goto state_error;
}
- DUK_ASSERT(thr_resume->state == DUK_HTHREAD_STATE_INACTIVE ||
- thr_resume->state == DUK_HTHREAD_STATE_YIELDED);
+ DUK_ASSERT(thr_resume->state == DUK_HTHREAD_STATE_INACTIVE || thr_resume->state == DUK_HTHREAD_STATE_YIELDED);
/* Further state-dependent pre-checks */
@@ -41661,14 +44600,13 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_resume(duk_hthread *ctx) {
* because an error in the RESUME handler call processing will
* not be handled very cleanly.
*/
- if ((thr_resume->callstack_top != 0) ||
- (thr_resume->valstack_top - thr_resume->valstack != 1)) {
+ if ((thr_resume->callstack_top != 0) || (thr_resume->valstack_top - thr_resume->valstack != 1)) {
goto state_error;
}
duk_push_tval(thr, DUK_GET_TVAL_NEGIDX(thr_resume, -1));
duk_resolve_nonbound_function(thr);
- h_fun = duk_require_hobject(thr, -1); /* reject lightfuncs on purpose */
+ h_fun = duk_require_hobject(thr, -1); /* reject lightfuncs on purpose */
if (!DUK_HOBJECT_IS_CALLABLE(h_fun) || !DUK_HOBJECT_IS_COMPFUNC(h_fun)) {
goto state_error;
}
@@ -41697,8 +44635,8 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_resume(duk_hthread *ctx) {
#if defined(DUK_USE_AUGMENT_ERROR_THROW)
if (is_error) {
- DUK_ASSERT_TOP(thr, 2); /* value (error) is at stack top */
- duk_err_augment_error_throw(thr); /* in resumer's context */
+ DUK_ASSERT_TOP(thr, 2); /* value (error) is at stack top */
+ duk_err_augment_error_throw(thr); /* in resumer's context */
}
#endif
@@ -41722,21 +44660,21 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_resume(duk_hthread *ctx) {
/* lj value2: thread */
DUK_ASSERT(thr->valstack_bottom < thr->valstack_top);
- DUK_TVAL_SET_TVAL_UPDREF(thr, &thr->heap->lj.value2, &thr->valstack_bottom[0]); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, &thr->heap->lj.value2, &thr->valstack_bottom[0]); /* side effects */
/* lj value1: value */
DUK_ASSERT(thr->valstack_bottom + 1 < thr->valstack_top);
- DUK_TVAL_SET_TVAL_UPDREF(thr, &thr->heap->lj.value1, &thr->valstack_bottom[1]); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, &thr->heap->lj.value1, &thr->valstack_bottom[1]); /* side effects */
DUK_TVAL_CHKFAST_INPLACE_SLOW(&thr->heap->lj.value1);
thr->heap->lj.iserror = is_error;
- DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* call is from executor, so we know we have a jmpbuf */
- duk_err_longjmp(thr); /* execution resumes in bytecode executor */
+ DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* call is from executor, so we know we have a jmpbuf */
+ duk_err_longjmp(thr); /* execution resumes in bytecode executor */
DUK_UNREACHABLE();
/* Never here, fall through to error (from compiler point of view). */
- state_error:
+state_error:
DUK_DCERROR_TYPE_INVALID_STATE(thr);
}
#endif
@@ -41785,14 +44723,15 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_yield(duk_hthread *thr) {
DUK_ASSERT(thr->resumer->state == DUK_HTHREAD_STATE_RESUMED);
if (thr->callstack_top < 2) {
- DUK_DD(DUK_DDPRINT("yield state invalid: callstack should contain at least 2 entries (caller and Duktape.Thread.yield)"));
+ DUK_DD(DUK_DDPRINT(
+ "yield state invalid: callstack should contain at least 2 entries (caller and Duktape.Thread.yield)"));
goto state_error;
}
DUK_ASSERT(thr->callstack_curr != NULL);
DUK_ASSERT(thr->callstack_curr->parent != NULL);
- DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr) != NULL); /* us */
+ DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr) != NULL); /* us */
DUK_ASSERT(DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr)));
- DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr->parent) != NULL); /* caller */
+ DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr->parent) != NULL); /* caller */
caller_func = DUK_ACT_GET_FUNC(thr->callstack_curr->parent);
if (!DUK_HOBJECT_IS_COMPFUNC(caller_func)) {
@@ -41800,10 +44739,11 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_yield(duk_hthread *thr) {
goto state_error;
}
- DUK_ASSERT(thr->callstack_preventcount >= 1); /* should never be zero, because we (Duktape.Thread.yield) are on the stack */
+ DUK_ASSERT(thr->callstack_preventcount >= 1); /* should never be zero, because we (Duktape.Thread.yield) are on the stack */
if (thr->callstack_preventcount != 1) {
/* Note: the only yield-preventing call is Duktape.Thread.yield(), hence check for 1, not 0 */
- DUK_DD(DUK_DDPRINT("yield state invalid: there must be no yield-preventing calls in current thread callstack (preventcount is %ld)",
+ DUK_DD(DUK_DDPRINT("yield state invalid: there must be no yield-preventing calls in current thread callstack "
+ "(preventcount is %ld)",
(long) thr->callstack_preventcount));
goto state_error;
}
@@ -41817,18 +44757,16 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_yield(duk_hthread *thr) {
#if defined(DUK_USE_AUGMENT_ERROR_THROW)
if (is_error) {
- DUK_ASSERT_TOP(thr, 1); /* value (error) is at stack top */
- duk_err_augment_error_throw(thr); /* in yielder's context */
+ DUK_ASSERT_TOP(thr, 1); /* value (error) is at stack top */
+ duk_err_augment_error_throw(thr); /* in yielder's context */
}
#endif
#if defined(DUK_USE_DEBUG)
if (is_error) {
- DUK_DDD(DUK_DDDPRINT("YIELD ERROR: value=%!T",
- (duk_tval *) duk_get_tval(thr, 0)));
+ DUK_DDD(DUK_DDDPRINT("YIELD ERROR: value=%!T", (duk_tval *) duk_get_tval(thr, 0)));
} else {
- DUK_DDD(DUK_DDDPRINT("YIELD NORMAL: value=%!T",
- (duk_tval *) duk_get_tval(thr, 0)));
+ DUK_DDD(DUK_DDDPRINT("YIELD NORMAL: value=%!T", (duk_tval *) duk_get_tval(thr, 0)));
}
#endif
@@ -41843,17 +44781,17 @@ DUK_INTERNAL duk_ret_t duk_bi_thread_yield(duk_hthread *thr) {
/* lj value1: value */
DUK_ASSERT(thr->valstack_bottom < thr->valstack_top);
- DUK_TVAL_SET_TVAL_UPDREF(thr, &thr->heap->lj.value1, &thr->valstack_bottom[0]); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, &thr->heap->lj.value1, &thr->valstack_bottom[0]); /* side effects */
DUK_TVAL_CHKFAST_INPLACE_SLOW(&thr->heap->lj.value1);
thr->heap->lj.iserror = is_error;
- DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* call is from executor, so we know we have a jmpbuf */
- duk_err_longjmp(thr); /* execution resumes in bytecode executor */
+ DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* call is from executor, so we know we have a jmpbuf */
+ duk_err_longjmp(thr); /* execution resumes in bytecode executor */
DUK_UNREACHABLE();
/* Never here, fall through to error (from compiler point of view). */
- state_error:
+state_error:
DUK_DCERROR_TYPE_INVALID_STATE(thr);
}
#endif
@@ -41931,7 +44869,7 @@ DUK_INTERNAL void duk_fb_sprintf(duk_fixedbuffer *fb, const char *fmt, ...) {
}
DUK_INTERNAL void duk_fb_put_funcptr(duk_fixedbuffer *fb, duk_uint8_t *fptr, duk_size_t fptr_size) {
- char buf[64+1];
+ char buf[64 + 1];
duk_debug_format_funcptr(buf, sizeof(buf), fptr, fptr_size);
buf[sizeof(buf) - 1] = (char) 0;
duk_fb_put_cstring(fb, buf);
@@ -41941,7 +44879,7 @@ DUK_INTERNAL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb) {
return (fb->offset >= fb->length);
}
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
/*
* Custom formatter for debug printing, allowing Duktape specific data
* structures (such as tagged values and heap objects) to be printed with
@@ -42007,58 +44945,58 @@ DUK_INTERNAL duk_bool_t duk_fb_is_full(duk_fixedbuffer *fb) {
/* list of conversion specifiers that terminate a format tag;
* this is unfortunately guesswork.
*/
-#define DUK__ALLOWED_STANDARD_SPECIFIERS "diouxXeEfFgGaAcsCSpnm"
+#define DUK__ALLOWED_STANDARD_SPECIFIERS "diouxXeEfFgGaAcsCSpnm"
/* maximum length of standard format tag that we support */
-#define DUK__MAX_FORMAT_TAG_LENGTH 32
+#define DUK__MAX_FORMAT_TAG_LENGTH 32
/* heapobj recursion depth when deep printing is selected */
-#define DUK__DEEP_DEPTH_LIMIT 8
+#define DUK__DEEP_DEPTH_LIMIT 8
/* maximum recursion depth for loop detection stacks */
-#define DUK__LOOP_STACK_DEPTH 256
+#define DUK__LOOP_STACK_DEPTH 256
/* must match bytecode defines now; build autogenerate? */
DUK_LOCAL const char * const duk__bc_optab[256] = {
- "LDREG", "STREG", "JUMP", "LDCONST", "LDINT", "LDINTX", "LDTHIS", "LDUNDEF",
- "LDNULL", "LDTRUE", "LDFALSE", "GETVAR", "BNOT", "LNOT", "UNM", "UNP",
- "EQ_RR", "EQ_CR", "EQ_RC", "EQ_CC", "NEQ_RR", "NEQ_CR", "NEQ_RC", "NEQ_CC",
- "SEQ_RR", "SEQ_CR", "SEQ_RC", "SEQ_CC", "SNEQ_RR", "SNEQ_CR", "SNEQ_RC", "SNEQ_CC",
-
- "GT_RR", "GT_CR", "GT_RC", "GT_CC", "GE_RR", "GE_CR", "GE_RC", "GE_CC",
- "LT_RR", "LT_CR", "LT_RC", "LT_CC", "LE_RR", "LE_CR", "LE_RC", "LE_CC",
- "IFTRUE_R", "IFTRUE_C", "IFFALSE_R", "IFFALSE_C", "ADD_RR", "ADD_CR", "ADD_RC", "ADD_CC",
- "SUB_RR", "SUB_CR", "SUB_RC", "SUB_CC", "MUL_RR", "MUL_CR", "MUL_RC", "MUL_CC",
-
- "DIV_RR", "DIV_CR", "DIV_RC", "DIV_CC", "MOD_RR", "MOD_CR", "MOD_RC", "MOD_CC",
- "EXP_RR", "EXP_CR", "EXP_RC", "EXP_CC", "BAND_RR", "BAND_CR", "BAND_RC", "BAND_CC",
- "BOR_RR", "BOR_CR", "BOR_RC", "BOR_CC", "BXOR_RR", "BXOR_CR", "BXOR_RC", "BXOR_CC",
- "BASL_RR", "BASL_CR", "BASL_RC", "BASL_CC", "BLSR_RR", "BLSR_CR", "BLSR_RC", "BLSR_CC",
-
- "BASR_RR", "BASR_CR", "BASR_RC", "BASR_CC", "INSTOF_RR", "INSTOF_CR", "INSTOF_RC", "INSTOF_CC",
- "IN_RR", "IN_CR", "IN_RC", "IN_CC", "GETPROP_RR", "GETPROP_CR", "GETPROP_RC", "GETPROP_CC",
- "PUTPROP_RR", "PUTPROP_CR", "PUTPROP_RC", "PUTPROP_CC", "DELPROP_RR", "DELPROP_CR", "DELPROP_RC", "DELPROP_CC",
- "PREINCR", "PREDECR", "POSTINCR", "POSTDECR", "PREINCV", "PREDECV", "POSTINCV", "POSTDECV",
-
- "PREINCP_RR", "PREINCP_CR", "PREINCP_RC", "PREINCP_CC", "PREDECP_RR", "PREDECP_CR", "PREDECP_RC", "PREDECP_CC",
+ "LDREG", "STREG", "JUMP", "LDCONST", "LDINT", "LDINTX", "LDTHIS", "LDUNDEF",
+ "LDNULL", "LDTRUE", "LDFALSE", "GETVAR", "BNOT", "LNOT", "UNM", "UNP",
+ "EQ_RR", "EQ_CR", "EQ_RC", "EQ_CC", "NEQ_RR", "NEQ_CR", "NEQ_RC", "NEQ_CC",
+ "SEQ_RR", "SEQ_CR", "SEQ_RC", "SEQ_CC", "SNEQ_RR", "SNEQ_CR", "SNEQ_RC", "SNEQ_CC",
+
+ "GT_RR", "GT_CR", "GT_RC", "GT_CC", "GE_RR", "GE_CR", "GE_RC", "GE_CC",
+ "LT_RR", "LT_CR", "LT_RC", "LT_CC", "LE_RR", "LE_CR", "LE_RC", "LE_CC",
+ "IFTRUE_R", "IFTRUE_C", "IFFALSE_R", "IFFALSE_C", "ADD_RR", "ADD_CR", "ADD_RC", "ADD_CC",
+ "SUB_RR", "SUB_CR", "SUB_RC", "SUB_CC", "MUL_RR", "MUL_CR", "MUL_RC", "MUL_CC",
+
+ "DIV_RR", "DIV_CR", "DIV_RC", "DIV_CC", "MOD_RR", "MOD_CR", "MOD_RC", "MOD_CC",
+ "EXP_RR", "EXP_CR", "EXP_RC", "EXP_CC", "BAND_RR", "BAND_CR", "BAND_RC", "BAND_CC",
+ "BOR_RR", "BOR_CR", "BOR_RC", "BOR_CC", "BXOR_RR", "BXOR_CR", "BXOR_RC", "BXOR_CC",
+ "BASL_RR", "BASL_CR", "BASL_RC", "BASL_CC", "BLSR_RR", "BLSR_CR", "BLSR_RC", "BLSR_CC",
+
+ "BASR_RR", "BASR_CR", "BASR_RC", "BASR_CC", "INSTOF_RR", "INSTOF_CR", "INSTOF_RC", "INSTOF_CC",
+ "IN_RR", "IN_CR", "IN_RC", "IN_CC", "GETPROP_RR", "GETPROP_CR", "GETPROP_RC", "GETPROP_CC",
+ "PUTPROP_RR", "PUTPROP_CR", "PUTPROP_RC", "PUTPROP_CC", "DELPROP_RR", "DELPROP_CR", "DELPROP_RC", "DELPROP_CC",
+ "PREINCR", "PREDECR", "POSTINCR", "POSTDECR", "PREINCV", "PREDECV", "POSTINCV", "POSTDECV",
+
+ "PREINCP_RR", "PREINCP_CR", "PREINCP_RC", "PREINCP_CC", "PREDECP_RR", "PREDECP_CR", "PREDECP_RC", "PREDECP_CC",
"POSTINCP_RR", "POSTINCP_CR", "POSTINCP_RC", "POSTINCP_CC", "POSTDECP_RR", "POSTDECP_CR", "POSTDECP_RC", "POSTDECP_CC",
- "DECLVAR_RR", "DECLVAR_CR", "DECLVAR_RC", "DECLVAR_CC", "REGEXP_RR", "REGEXP_RC", "REGEXP_CR", "REGEXP_CC",
- "CLOSURE", "TYPEOF", "TYPEOFID", "PUTVAR", "DELVAR", "RETREG", "RETUNDEF", "RETCONST",
-
- "RETCONSTN", "LABEL", "ENDLABEL", "BREAK", "CONTINUE", "TRYCATCH", "ENDTRY", "ENDCATCH",
- "ENDFIN", "THROW", "INVLHS", "CSREG", "CSVAR_RR", "CSVAR_CR", "CSVAR_RC", "CSVAR_CC",
- "CALL0", "CALL1", "CALL2", "CALL3", "CALL4", "CALL5", "CALL6", "CALL7",
- "CALL8", "CALL9", "CALL10", "CALL11", "CALL12", "CALL13", "CALL14", "CALL15",
-
- "NEWOBJ", "NEWARR", "MPUTOBJ", "MPUTOBJI", "INITSET", "INITGET", "MPUTARR", "MPUTARRI",
- "SETALEN", "INITENUM", "NEXTENUM", "NEWTARGET", "DEBUGGER", "NOP", "INVALID", "UNUSED207",
- "GETPROPC_RR", "GETPROPC_CR", "GETPROPC_RC", "GETPROPC_CC", "UNUSED212", "UNUSED213", "UNUSED214", "UNUSED215",
- "UNUSED216", "UNUSED217", "UNUSED218", "UNUSED219", "UNUSED220", "UNUSED221", "UNUSED222", "UNUSED223",
-
- "UNUSED224", "UNUSED225", "UNUSED226", "UNUSED227", "UNUSED228", "UNUSED229", "UNUSED230", "UNUSED231",
- "UNUSED232", "UNUSED233", "UNUSED234", "UNUSED235", "UNUSED236", "UNUSED237", "UNUSED238", "UNUSED239",
- "UNUSED240", "UNUSED241", "UNUSED242", "UNUSED243", "UNUSED244", "UNUSED245", "UNUSED246", "UNUSED247",
- "UNUSED248", "UNUSED249", "UNUSED250", "UNUSED251", "UNUSED252", "UNUSED253", "UNUSED254", "UNUSED255"
+ "DECLVAR_RR", "DECLVAR_CR", "DECLVAR_RC", "DECLVAR_CC", "REGEXP_RR", "REGEXP_RC", "REGEXP_CR", "REGEXP_CC",
+ "CLOSURE", "TYPEOF", "TYPEOFID", "PUTVAR", "DELVAR", "RETREG", "RETUNDEF", "RETCONST",
+
+ "RETCONSTN", "LABEL", "ENDLABEL", "BREAK", "CONTINUE", "TRYCATCH", "ENDTRY", "ENDCATCH",
+ "ENDFIN", "THROW", "INVLHS", "CSREG", "CSVAR_RR", "CSVAR_CR", "CSVAR_RC", "CSVAR_CC",
+ "CALL0", "CALL1", "CALL2", "CALL3", "CALL4", "CALL5", "CALL6", "CALL7",
+ "CALL8", "CALL9", "CALL10", "CALL11", "CALL12", "CALL13", "CALL14", "CALL15",
+
+ "NEWOBJ", "NEWARR", "MPUTOBJ", "MPUTOBJI", "INITSET", "INITGET", "MPUTARR", "MPUTARRI",
+ "SETALEN", "INITENUM", "NEXTENUM", "NEWTARGET", "DEBUGGER", "NOP", "INVALID", "UNUSED207",
+ "GETPROPC_RR", "GETPROPC_CR", "GETPROPC_RC", "GETPROPC_CC", "UNUSED212", "UNUSED213", "UNUSED214", "UNUSED215",
+ "UNUSED216", "UNUSED217", "UNUSED218", "UNUSED219", "UNUSED220", "UNUSED221", "UNUSED222", "UNUSED223",
+
+ "UNUSED224", "UNUSED225", "UNUSED226", "UNUSED227", "UNUSED228", "UNUSED229", "UNUSED230", "UNUSED231",
+ "UNUSED232", "UNUSED233", "UNUSED234", "UNUSED235", "UNUSED236", "UNUSED237", "UNUSED238", "UNUSED239",
+ "UNUSED240", "UNUSED241", "UNUSED242", "UNUSED243", "UNUSED244", "UNUSED245", "UNUSED246", "UNUSED247",
+ "UNUSED248", "UNUSED249", "UNUSED250", "UNUSED251", "UNUSED252", "UNUSED253", "UNUSED254", "UNUSED255"
};
typedef struct duk__dprint_state duk__dprint_state;
@@ -42108,14 +45046,15 @@ DUK_LOCAL void duk__print_shared_heaphdr(duk__dprint_state *st, duk_heaphdr *h)
duk_size_t i;
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_LBRACKET);
for (i = 0; i < (duk_size_t) sizeof(*h); i++) {
- duk_fb_sprintf(fb, "%02lx", (unsigned long) ((duk_uint8_t *)h)[i]);
+ duk_fb_sprintf(fb, "%02lx", (unsigned long) ((duk_uint8_t *) h)[i]);
}
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_RBRACKET);
}
-#if defined(DUK_USE_REFERENCE_COUNTING) /* currently implicitly also DUK_USE_DOUBLE_LINKED_HEAP */
+#if defined(DUK_USE_REFERENCE_COUNTING) /* currently implicitly also DUK_USE_DOUBLE_LINKED_HEAP */
if (st->heavy) {
- duk_fb_sprintf(fb, "[h_next=%p,h_prev=%p,h_refcount=%lu,h_flags=%08lx,type=%ld,"
+ duk_fb_sprintf(fb,
+ "[h_next=%p,h_prev=%p,h_refcount=%lu,h_flags=%08lx,type=%ld,"
"reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
(void *) DUK_HEAPHDR_GET_NEXT(NULL, h),
(void *) DUK_HEAPHDR_GET_PREV(NULL, h),
@@ -42129,7 +45068,8 @@ DUK_LOCAL void duk__print_shared_heaphdr(duk__dprint_state *st, duk_heaphdr *h)
}
#else
if (st->heavy) {
- duk_fb_sprintf(fb, "[h_next=%p,h_flags=%08lx,type=%ld,reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
+ duk_fb_sprintf(fb,
+ "[h_next=%p,h_flags=%08lx,type=%ld,reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
(void *) DUK_HEAPHDR_GET_NEXT(NULL, h),
(unsigned long) DUK_HEAPHDR_GET_FLAGS(h),
(long) DUK_HEAPHDR_GET_TYPE(h),
@@ -42156,14 +45096,15 @@ DUK_LOCAL void duk__print_shared_heaphdr_string(duk__dprint_state *st, duk_heaph
duk_size_t i;
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_LBRACKET);
for (i = 0; i < (duk_size_t) sizeof(*h); i++) {
- duk_fb_sprintf(fb, "%02lx", (unsigned long) ((duk_uint8_t *)h)[i]);
+ duk_fb_sprintf(fb, "%02lx", (unsigned long) ((duk_uint8_t *) h)[i]);
}
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_RBRACKET);
}
#if defined(DUK_USE_REFERENCE_COUNTING)
if (st->heavy) {
- duk_fb_sprintf(fb, "[h_refcount=%lu,h_flags=%08lx,type=%ld,reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
+ duk_fb_sprintf(fb,
+ "[h_refcount=%lu,h_flags=%08lx,type=%ld,reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
(unsigned long) DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h),
(unsigned long) DUK_HEAPHDR_GET_FLAGS((duk_heaphdr *) h),
(long) DUK_HEAPHDR_GET_TYPE((duk_heaphdr *) h),
@@ -42174,7 +45115,8 @@ DUK_LOCAL void duk__print_shared_heaphdr_string(duk__dprint_state *st, duk_heaph
}
#else
if (st->heavy) {
- duk_fb_sprintf(fb, "[h_flags=%08lx,type=%ld,reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
+ duk_fb_sprintf(fb,
+ "[h_flags=%08lx,type=%ld,reachable=%ld,temproot=%ld,finalizable=%ld,finalized=%ld]",
(unsigned long) DUK_HEAPHDR_GET_FLAGS((duk_heaphdr *) h),
(long) DUK_HEAPHDR_GET_TYPE((duk_heaphdr *) h),
(long) (DUK_HEAPHDR_HAS_REACHABLE((duk_heaphdr *) h) ? 1 : 0),
@@ -42245,7 +45187,8 @@ DUK_LOCAL void duk__print_hstring(duk__dprint_state *st, duk_hstring *h, duk_boo
#endif
}
-#define DUK__COMMA() do { \
+#define DUK__COMMA() \
+ do { \
if (first) { \
first = 0; \
} else { \
@@ -42358,7 +45301,8 @@ DUK_LOCAL void duk__print_hobject(duk__dprint_state *st, duk_hobject *h) {
duk__print_hstring(st, key, 0);
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_COLON);
if (DUK_HOBJECT_E_SLOT_IS_ACCESSOR(NULL, h, i)) {
- duk_fb_sprintf(fb, "[get:%p,set:%p]",
+ duk_fb_sprintf(fb,
+ "[get:%p,set:%p]",
(void *) DUK_HOBJECT_E_GET_VALUE(NULL, h, i).a.get,
(void *) DUK_HOBJECT_E_GET_VALUE(NULL, h, i).a.set);
} else {
@@ -42372,158 +45316,238 @@ DUK_LOCAL void duk__print_hobject(duk__dprint_state *st, duk_hobject *h) {
}
if (st->internal) {
if (DUK_HOBJECT_IS_ARRAY(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__array:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__array:true");
}
if (DUK_HOBJECT_HAS_EXTENSIBLE(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__extensible:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__extensible:true");
}
if (DUK_HOBJECT_HAS_CONSTRUCTABLE(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__constructable:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__constructable:true");
}
if (DUK_HOBJECT_HAS_BOUNDFUNC(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__boundfunc:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__boundfunc:true");
}
if (DUK_HOBJECT_HAS_COMPFUNC(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__compfunc:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__compfunc:true");
}
if (DUK_HOBJECT_HAS_NATFUNC(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__natfunc:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__natfunc:true");
}
if (DUK_HOBJECT_HAS_BUFOBJ(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__bufobj:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__bufobj:true");
}
if (DUK_HOBJECT_IS_THREAD(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__thread:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__thread:true");
}
if (DUK_HOBJECT_HAS_ARRAY_PART(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__array_part:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__array_part:true");
}
if (DUK_HOBJECT_HAS_STRICT(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__strict:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__strict:true");
}
if (DUK_HOBJECT_HAS_NOTAIL(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__notail:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__notail:true");
}
if (DUK_HOBJECT_HAS_NEWENV(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__newenv:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__newenv:true");
}
if (DUK_HOBJECT_HAS_NAMEBINDING(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__namebinding:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__namebinding:true");
}
if (DUK_HOBJECT_HAS_CREATEARGS(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__createargs:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__createargs:true");
}
if (DUK_HOBJECT_HAS_EXOTIC_ARRAY(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__exotic_array:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__exotic_array:true");
}
if (DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__exotic_stringobj:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__exotic_stringobj:true");
}
if (DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__exotic_arguments:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__exotic_arguments:true");
}
if (DUK_HOBJECT_IS_BUFOBJ(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__exotic_bufobj:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__exotic_bufobj:true");
}
if (DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ(h)) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__exotic_proxyobj:true");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__exotic_proxyobj:true");
}
}
if (st->internal && DUK_HOBJECT_IS_ARRAY(h)) {
duk_harray *a = (duk_harray *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__length:%ld", (long) a->length);
- DUK__COMMA(); duk_fb_sprintf(fb, "__length_nonwritable:%ld", (long) a->length_nonwritable);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__length:%ld", (long) a->length);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__length_nonwritable:%ld", (long) a->length_nonwritable);
} else if (st->internal && DUK_HOBJECT_IS_COMPFUNC(h)) {
duk_hcompfunc *f = (duk_hcompfunc *) h;
- DUK__COMMA(); duk_fb_put_cstring(fb, "__data:");
+ DUK__COMMA();
+ duk_fb_put_cstring(fb, "__data:");
duk__print_hbuffer(st, (duk_hbuffer *) DUK_HCOMPFUNC_GET_DATA(NULL, f));
- DUK__COMMA(); duk_fb_put_cstring(fb, "__lexenv:"); duk__print_hobject(st, DUK_HCOMPFUNC_GET_LEXENV(NULL, f));
- DUK__COMMA(); duk_fb_put_cstring(fb, "__varenv:"); duk__print_hobject(st, DUK_HCOMPFUNC_GET_VARENV(NULL, f));
- DUK__COMMA(); duk_fb_sprintf(fb, "__nregs:%ld", (long) f->nregs);
- DUK__COMMA(); duk_fb_sprintf(fb, "__nargs:%ld", (long) f->nargs);
+ DUK__COMMA();
+ duk_fb_put_cstring(fb, "__lexenv:");
+ duk__print_hobject(st, DUK_HCOMPFUNC_GET_LEXENV(NULL, f));
+ DUK__COMMA();
+ duk_fb_put_cstring(fb, "__varenv:");
+ duk__print_hobject(st, DUK_HCOMPFUNC_GET_VARENV(NULL, f));
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__nregs:%ld", (long) f->nregs);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__nargs:%ld", (long) f->nargs);
#if defined(DUK_USE_DEBUGGER_SUPPORT)
- DUK__COMMA(); duk_fb_sprintf(fb, "__start_line:%ld", (long) f->start_line);
- DUK__COMMA(); duk_fb_sprintf(fb, "__end_line:%ld", (long) f->end_line);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__start_line:%ld", (long) f->start_line);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__end_line:%ld", (long) f->end_line);
#endif
- DUK__COMMA(); duk_fb_put_cstring(fb, "__data:");
+ DUK__COMMA();
+ duk_fb_put_cstring(fb, "__data:");
duk__print_hbuffer(st, (duk_hbuffer *) DUK_HCOMPFUNC_GET_DATA(NULL, f));
} else if (st->internal && DUK_HOBJECT_IS_NATFUNC(h)) {
duk_hnatfunc *f = (duk_hnatfunc *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__func:");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__func:");
duk_fb_put_funcptr(fb, (duk_uint8_t *) &f->func, sizeof(f->func));
- DUK__COMMA(); duk_fb_sprintf(fb, "__nargs:%ld", (long) f->nargs);
- DUK__COMMA(); duk_fb_sprintf(fb, "__magic:%ld", (long) f->magic);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__nargs:%ld", (long) f->nargs);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__magic:%ld", (long) f->magic);
} else if (st->internal && DUK_HOBJECT_IS_DECENV(h)) {
duk_hdecenv *e = (duk_hdecenv *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__thread:"); duk__print_hobject(st, (duk_hobject *) e->thread);
- DUK__COMMA(); duk_fb_sprintf(fb, "__varmap:"); duk__print_hobject(st, (duk_hobject *) e->varmap);
- DUK__COMMA(); duk_fb_sprintf(fb, "__regbase_byteoff:%ld", (long) e->regbase_byteoff);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__thread:");
+ duk__print_hobject(st, (duk_hobject *) e->thread);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__varmap:");
+ duk__print_hobject(st, (duk_hobject *) e->varmap);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__regbase_byteoff:%ld", (long) e->regbase_byteoff);
} else if (st->internal && DUK_HOBJECT_IS_OBJENV(h)) {
duk_hobjenv *e = (duk_hobjenv *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__target:"); duk__print_hobject(st, (duk_hobject *) e->target);
- DUK__COMMA(); duk_fb_sprintf(fb, "__has_this:%ld", (long) e->has_this);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__target:");
+ duk__print_hobject(st, (duk_hobject *) e->target);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__has_this:%ld", (long) e->has_this);
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
} else if (st->internal && DUK_HOBJECT_IS_BUFOBJ(h)) {
duk_hbufobj *b = (duk_hbufobj *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__buf:");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__buf:");
duk__print_hbuffer(st, (duk_hbuffer *) b->buf);
- DUK__COMMA(); duk_fb_sprintf(fb, "__buf_prop:");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__buf_prop:");
duk__print_hobject(st, (duk_hobject *) b->buf_prop);
- DUK__COMMA(); duk_fb_sprintf(fb, "__offset:%ld", (long) b->offset);
- DUK__COMMA(); duk_fb_sprintf(fb, "__length:%ld", (long) b->length);
- DUK__COMMA(); duk_fb_sprintf(fb, "__shift:%ld", (long) b->shift);
- DUK__COMMA(); duk_fb_sprintf(fb, "__elemtype:%ld", (long) b->elem_type);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__offset:%ld", (long) b->offset);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__length:%ld", (long) b->length);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__shift:%ld", (long) b->shift);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__elemtype:%ld", (long) b->elem_type);
#endif
} else if (st->internal && DUK_HOBJECT_IS_PROXY(h)) {
duk_hproxy *p = (duk_hproxy *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__target:");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__target:");
duk__print_hobject(st, p->target);
- DUK__COMMA(); duk_fb_sprintf(fb, "__handler:");
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__handler:");
duk__print_hobject(st, p->handler);
} else if (st->internal && DUK_HOBJECT_IS_THREAD(h)) {
duk_hthread *t = (duk_hthread *) h;
- DUK__COMMA(); duk_fb_sprintf(fb, "__ptr_curr_pc:%p", (void *) t->ptr_curr_pc);
- DUK__COMMA(); duk_fb_sprintf(fb, "__heap:%p", (void *) t->heap);
- DUK__COMMA(); duk_fb_sprintf(fb, "__strict:%ld", (long) t->strict);
- DUK__COMMA(); duk_fb_sprintf(fb, "__state:%ld", (long) t->state);
- DUK__COMMA(); duk_fb_sprintf(fb, "__unused1:%ld", (long) t->unused1);
- DUK__COMMA(); duk_fb_sprintf(fb, "__unused2:%ld", (long) t->unused2);
- DUK__COMMA(); duk_fb_sprintf(fb, "__valstack:%p", (void *) t->valstack);
- DUK__COMMA(); duk_fb_sprintf(fb, "__valstack_end:%p/%ld", (void *) t->valstack_end, (long) (t->valstack_end - t->valstack));
- DUK__COMMA(); duk_fb_sprintf(fb, "__valstack_alloc_end:%p/%ld", (void *) t->valstack_alloc_end, (long) (t->valstack_alloc_end - t->valstack));
- DUK__COMMA(); duk_fb_sprintf(fb, "__valstack_bottom:%p/%ld", (void *) t->valstack_bottom, (long) (t->valstack_bottom - t->valstack));
- DUK__COMMA(); duk_fb_sprintf(fb, "__valstack_top:%p/%ld", (void *) t->valstack_top, (long) (t->valstack_top - t->valstack));
- DUK__COMMA(); duk_fb_sprintf(fb, "__callstack_curr:%p", (void *) t->callstack_curr);
- DUK__COMMA(); duk_fb_sprintf(fb, "__callstack_top:%ld", (long) t->callstack_top);
- DUK__COMMA(); duk_fb_sprintf(fb, "__callstack_preventcount:%ld", (long) t->callstack_preventcount);
- DUK__COMMA(); duk_fb_sprintf(fb, "__resumer:"); duk__print_hobject(st, (duk_hobject *) t->resumer);
- DUK__COMMA(); duk_fb_sprintf(fb, "__compile_ctx:%p", (void *) t->compile_ctx);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__ptr_curr_pc:%p", (void *) t->ptr_curr_pc);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__heap:%p", (void *) t->heap);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__strict:%ld", (long) t->strict);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__state:%ld", (long) t->state);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__unused1:%ld", (long) t->unused1);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__unused2:%ld", (long) t->unused2);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__valstack:%p", (void *) t->valstack);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__valstack_end:%p/%ld", (void *) t->valstack_end, (long) (t->valstack_end - t->valstack));
+ DUK__COMMA();
+ duk_fb_sprintf(fb,
+ "__valstack_alloc_end:%p/%ld",
+ (void *) t->valstack_alloc_end,
+ (long) (t->valstack_alloc_end - t->valstack));
+ DUK__COMMA();
+ duk_fb_sprintf(fb,
+ "__valstack_bottom:%p/%ld",
+ (void *) t->valstack_bottom,
+ (long) (t->valstack_bottom - t->valstack));
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__valstack_top:%p/%ld", (void *) t->valstack_top, (long) (t->valstack_top - t->valstack));
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__callstack_curr:%p", (void *) t->callstack_curr);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__callstack_top:%ld", (long) t->callstack_top);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__callstack_preventcount:%ld", (long) t->callstack_preventcount);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__resumer:");
+ duk__print_hobject(st, (duk_hobject *) t->resumer);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__compile_ctx:%p", (void *) t->compile_ctx);
#if defined(DUK_USE_INTERRUPT_COUNTER)
- DUK__COMMA(); duk_fb_sprintf(fb, "__interrupt_counter:%ld", (long) t->interrupt_counter);
- DUK__COMMA(); duk_fb_sprintf(fb, "__interrupt_init:%ld", (long) t->interrupt_init);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__interrupt_counter:%ld", (long) t->interrupt_counter);
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__interrupt_init:%ld", (long) t->interrupt_init);
#endif
/* XXX: print built-ins array? */
-
}
#if defined(DUK_USE_REFERENCE_COUNTING)
if (st->internal) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__refcount:%lu", (unsigned long) DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h));
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__refcount:%lu", (unsigned long) DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h));
}
#endif
if (st->internal) {
- DUK__COMMA(); duk_fb_sprintf(fb, "__class:%ld", (long) DUK_HOBJECT_GET_CLASS_NUMBER(h));
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__class:%ld", (long) DUK_HOBJECT_GET_CLASS_NUMBER(h));
}
- DUK__COMMA(); duk_fb_sprintf(fb, "__heapptr:%p", (void *) h); /* own pointer */
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__heapptr:%p", (void *) h); /* own pointer */
/* prototype should be last, for readability */
if (DUK_HOBJECT_GET_PROTOTYPE(NULL, h)) {
if (st->follow_proto) {
- DUK__COMMA(); duk_fb_put_cstring(fb, "__prototype:"); duk__print_hobject(st, DUK_HOBJECT_GET_PROTOTYPE(NULL, h));
+ DUK__COMMA();
+ duk_fb_put_cstring(fb, "__prototype:");
+ duk__print_hobject(st, DUK_HOBJECT_GET_PROTOTYPE(NULL, h));
} else {
- DUK__COMMA(); duk_fb_sprintf(fb, "__prototype:%p", (void *) DUK_HOBJECT_GET_PROTOTYPE(NULL, h));
+ DUK__COMMA();
+ duk_fb_sprintf(fb, "__prototype:%p", (void *) DUK_HOBJECT_GET_PROTOTYPE(NULL, h));
}
}
@@ -42549,7 +45573,7 @@ DUK_LOCAL void duk__print_hobject(duk__dprint_state *st, duk_hobject *h) {
}
#endif
- finished:
+finished:
st->depth--;
if (pushed_loopstack) {
st->loop_stack_index--;
@@ -42576,12 +45600,14 @@ DUK_LOCAL void duk__print_hbuffer(duk__dprint_state *st, duk_hbuffer *h) {
if (DUK_HBUFFER_HAS_DYNAMIC(h)) {
if (DUK_HBUFFER_HAS_EXTERNAL(h)) {
duk_hbuffer_external *g = (duk_hbuffer_external *) h;
- duk_fb_sprintf(fb, "buffer:external:%p:%ld",
+ duk_fb_sprintf(fb,
+ "buffer:external:%p:%ld",
(void *) DUK_HBUFFER_EXTERNAL_GET_DATA_PTR(NULL, g),
(long) DUK_HBUFFER_EXTERNAL_GET_SIZE(g));
} else {
duk_hbuffer_dynamic *g = (duk_hbuffer_dynamic *) h;
- duk_fb_sprintf(fb, "buffer:dynamic:%p:%ld",
+ duk_fb_sprintf(fb,
+ "buffer:dynamic:%p:%ld",
(void *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(NULL, g),
(long) DUK_HBUFFER_DYNAMIC_GET_SIZE(g));
}
@@ -42654,7 +45680,7 @@ DUK_LOCAL void duk__print_tval(duk__dprint_state *st, duk_tval *tv) {
duk_size_t i;
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_LBRACKET);
for (i = 0; i < (duk_size_t) sizeof(*tv); i++) {
- duk_fb_sprintf(fb, "%02lx", (unsigned long) ((duk_uint8_t *)tv)[i]);
+ duk_fb_sprintf(fb, "%02lx", (unsigned long) ((duk_uint8_t *) tv)[i]);
}
duk_fb_put_byte(fb, (duk_uint8_t) DUK_ASC_RBRACKET);
}
@@ -42737,17 +45763,22 @@ DUK_LOCAL void duk__print_instr(duk__dprint_state *st, duk_instr_t ins) {
/* XXX: option to fix opcode length so it lines up nicely */
if (op == DUK_OP_JUMP) {
- duk_int_t diff1 = (duk_int_t) (DUK_DEC_ABC(ins) - DUK_BC_JUMP_BIAS); /* from next pc */
- duk_int_t diff2 = diff1 + 1; /* from curr pc */
-
- duk_fb_sprintf(fb, "%s %ld (to pc%c%ld)",
- (const char *) op_name, (long) diff1,
- (int) (diff2 >= 0 ? '+' : '-'), /* char format: use int */
+ duk_int_t diff1 = (duk_int_t) (DUK_DEC_ABC(ins) - DUK_BC_JUMP_BIAS); /* from next pc */
+ duk_int_t diff2 = diff1 + 1; /* from curr pc */
+
+ duk_fb_sprintf(fb,
+ "%s %ld (to pc%c%ld)",
+ (const char *) op_name,
+ (long) diff1,
+ (int) (diff2 >= 0 ? '+' : '-'), /* char format: use int */
(long) (diff2 >= 0 ? diff2 : -diff2));
} else {
- duk_fb_sprintf(fb, "%s %ld, %ld, %ld",
- (const char *) op_name, (long) DUK_DEC_A(ins),
- (long) DUK_DEC_B(ins), (long) DUK_DEC_C(ins));
+ duk_fb_sprintf(fb,
+ "%s %ld, %ld, %ld",
+ (const char *) op_name,
+ (long) DUK_DEC_A(ins),
+ (long) DUK_DEC_B(ins),
+ (long) DUK_DEC_C(ins));
}
}
@@ -42773,13 +45804,16 @@ DUK_LOCAL void duk__print_catcher(duk__dprint_state *st, duk_catcher *cat) {
return;
}
- duk_fb_sprintf(fb, "[catcher ptr=%p parent=%p varname=%p pc_base=%p, idx_base=%ld, flags=0x%08lx]",
+ duk_fb_sprintf(fb,
+ "[catcher ptr=%p parent=%p varname=%p pc_base=%p, idx_base=%ld, flags=0x%08lx]",
(void *) cat,
- (void *) cat->parent, (void *) cat->h_varname, (void *) cat->pc_base,
- (long) cat->idx_base, (unsigned long) cat->flags);
+ (void *) cat->parent,
+ (void *) cat->h_varname,
+ (void *) cat->pc_base,
+ (long) cat->idx_base,
+ (unsigned long) cat->flags);
}
-
DUK_LOCAL void duk__print_activation(duk__dprint_state *st, duk_activation *act) {
duk_fixedbuffer *fb = st->fb;
@@ -42794,12 +45828,20 @@ DUK_LOCAL void duk__print_activation(duk__dprint_state *st, duk_activation *act)
/* prev_caller: conditional, omitted on purpose, it's rarely used. */
/* prev_line: conditional, omitted on purpose (but would be nice). */
- duk_fb_sprintf(fb, "[activation ptr=%p tv_func=<omit> func=%p parent=%p var_env=%p lex_env=%p cat=%p curr_pc=%p bottom_byteoff=%ld retval_byteoff=%ld reserve_byteoff=%ld flags=%ld]",
+ duk_fb_sprintf(fb,
+ "[activation ptr=%p tv_func=<omit> func=%p parent=%p var_env=%p lex_env=%p cat=%p curr_pc=%p "
+ "bottom_byteoff=%ld retval_byteoff=%ld reserve_byteoff=%ld flags=%ld]",
(void *) act,
- (void *) act->func, (void *) act->parent, (void *) act->var_env,
- (void *) act->lex_env, (void *) act->cat, (void *) act->curr_pc,
- (long) act->bottom_byteoff, (long) act->retval_byteoff, (long) act->reserve_byteoff,
- (long) act->flags);
+ (void *) act->func,
+ (void *) act->parent,
+ (void *) act->var_env,
+ (void *) act->lex_env,
+ (void *) act->cat,
+ (void *) act->curr_pc,
+ (long) act->bottom_byteoff,
+ (long) act->retval_byteoff,
+ (long) act->reserve_byteoff,
+ (long) act->flags);
}
DUK_INTERNAL duk_int_t duk_debug_vsnprintf(char *str, duk_size_t size, const char *format, va_list ap) {
@@ -42818,7 +45860,7 @@ DUK_INTERNAL duk_int_t duk_debug_vsnprintf(char *str, duk_size_t size, const cha
char ch = *p++;
const char *p_begfmt = NULL;
duk_bool_t got_exclamation = 0;
- duk_bool_t got_long = 0; /* %lf, %ld etc */
+ duk_bool_t got_long = 0; /* %lf, %ld etc */
duk__dprint_state st;
if (ch != DUK_ASC_PERCENT) {
@@ -42981,11 +46023,11 @@ DUK_INTERNAL duk_int_t duk_debug_vsnprintf(char *str, duk_size_t size, const cha
}
goto done;
- format_error:
+format_error:
duk_fb_put_cstring(&fb, "FMTERR");
/* fall through */
- done:
+done:
retval = (duk_int_t) fb.offset;
duk_fb_put_byte(&fb, (duk_uint8_t) 0);
@@ -42993,7 +46035,7 @@ DUK_INTERNAL duk_int_t duk_debug_vsnprintf(char *str, duk_size_t size, const cha
return retval;
}
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL duk_int_t duk_debug_snprintf(char *str, duk_size_t size, const char *format, ...) {
duk_int_t retval;
va_list ap;
@@ -43034,7 +46076,7 @@ DUK_INTERNAL void duk_debug_format_funcptr(char *buf, duk_size_t buf_size, duk_u
}
}
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
/* automatic undefs */
#undef DUK__ALLOWED_STANDARD_SPECIFIERS
@@ -43055,17 +46097,23 @@ DUK_INTERNAL void duk_debug_format_funcptr(char *buf, duk_size_t buf_size, duk_u
*/
#if defined(DUK_USE_ASSERTIONS)
-#define DUK__DBG_TPORT_ENTER() do { \
+#define DUK__DBG_TPORT_ENTER() \
+ do { \
DUK_ASSERT(heap->dbg_calling_transport == 0); \
heap->dbg_calling_transport = 1; \
} while (0)
-#define DUK__DBG_TPORT_EXIT() do { \
+#define DUK__DBG_TPORT_EXIT() \
+ do { \
DUK_ASSERT(heap->dbg_calling_transport == 1); \
heap->dbg_calling_transport = 0; \
} while (0)
#else
-#define DUK__DBG_TPORT_ENTER() do {} while (0)
-#define DUK__DBG_TPORT_EXIT() do {} while (0)
+#define DUK__DBG_TPORT_ENTER() \
+ do { \
+ } while (0)
+#define DUK__DBG_TPORT_EXIT() \
+ do { \
+ } while (0)
#endif
/*
@@ -43085,7 +46133,8 @@ typedef union {
* Detach handling
*/
-#define DUK__SET_CONN_BROKEN(thr,reason) do { \
+#define DUK__SET_CONN_BROKEN(thr, reason) \
+ do { \
/* For now shared handler is fine. */ \
duk__debug_do_detach1((thr)->heap, (reason)); \
} while (0)
@@ -43106,7 +46155,7 @@ DUK_LOCAL void duk__debug_do_detach1(duk_heap *heap, duk_int_t reason) {
DUK_D(DUK_DPRINT("debugger transport detaching, marking transport broken"));
- heap->dbg_detaching = 1; /* prevent multiple in-progress detaches */
+ heap->dbg_detaching = 1; /* prevent multiple in-progress detaches */
if (heap->dbg_write_cb != NULL) {
duk_hthread *thr;
@@ -43134,8 +46183,8 @@ DUK_LOCAL void duk__debug_do_detach1(duk_heap *heap, duk_int_t reason) {
heap->dbg_pause_act = NULL;
heap->dbg_pause_startline = 0;
heap->dbg_have_next_byte = 0;
- duk_debug_clear_paused(heap); /* XXX: some overlap with field inits above */
- heap->dbg_state_dirty = 0; /* XXX: clear_paused sets dirty; rework? */
+ duk_debug_clear_paused(heap); /* XXX: some overlap with field inits above */
+ heap->dbg_state_dirty = 0; /* XXX: clear_paused sets dirty; rework? */
/* Ensure there are no stale active breakpoint pointers.
* Breakpoint list is currently kept - we could empty it
@@ -43195,7 +46244,7 @@ DUK_LOCAL void duk__debug_null_most_callbacks(duk_hthread *thr) {
heap = thr->heap;
DUK_D(DUK_DPRINT("transport read/write error, NULL all callbacks expected detached"));
heap->dbg_read_cb = NULL;
- heap->dbg_write_cb = NULL; /* this is especially critical to avoid another write call in detach1() */
+ heap->dbg_write_cb = NULL; /* this is especially critical to avoid another write call in detach1() */
heap->dbg_peek_cb = NULL;
heap->dbg_read_flush_cb = NULL;
heap->dbg_write_flush_cb = NULL;
@@ -43217,7 +46266,8 @@ DUK_LOCAL void duk__debug_set_pause_state(duk_hthread *thr, duk_heap *heap, duk_
updated_flags = pause_flags & ~(DUK_PAUSE_FLAG_LINE_CHANGE);
DUK_D(DUK_DPRINT("no line info for current activation, disable line-based pause flags: 0x%08lx -> 0x%08lx",
- (long) pause_flags, (long) updated_flags));
+ (long) pause_flags,
+ (long) updated_flags));
pause_flags = updated_flags;
}
@@ -43227,7 +46277,8 @@ DUK_LOCAL void duk__debug_set_pause_state(duk_hthread *thr, duk_heap *heap, duk_
heap->dbg_state_dirty = 1;
DUK_D(DUK_DPRINT("set state for automatic pause triggers, flags=0x%08lx, act=%p, startline=%ld",
- (long) heap->dbg_pause_flags, (void *) heap->dbg_pause_act,
+ (long) heap->dbg_pause_flags,
+ (void *) heap->dbg_pause_act,
(long) heap->dbg_pause_startline));
}
@@ -43382,7 +46433,7 @@ DUK_INTERNAL void duk_debug_read_bytes(duk_hthread *thr, duk_uint8_t *data, duk_
if (got == 0 || got > left) {
DUK_D(DUK_DPRINT("connection error during read, return zero data"));
- duk__debug_null_most_callbacks(thr); /* avoid calling write callback in detach1() */
+ duk__debug_null_most_callbacks(thr); /* avoid calling write callback in detach1() */
DUK__SET_CONN_BROKEN(thr, 1);
goto fail;
}
@@ -43390,14 +46441,14 @@ DUK_INTERNAL void duk_debug_read_bytes(duk_hthread *thr, duk_uint8_t *data, duk_
}
return;
- fail:
+fail:
duk_memzero((void *) data, (size_t) length);
}
DUK_INTERNAL duk_uint8_t duk_debug_read_byte(duk_hthread *thr) {
duk_uint8_t x;
- x = 0; /* just in case callback is broken and won't write 'x' */
+ x = 0; /* just in case callback is broken and won't write 'x' */
duk_debug_read_bytes(thr, &x, 1);
return x;
}
@@ -43408,10 +46459,7 @@ DUK_LOCAL duk_uint32_t duk__debug_read_uint32_raw(duk_hthread *thr) {
DUK_ASSERT(thr != NULL);
duk_debug_read_bytes(thr, buf, 4);
- return ((duk_uint32_t) buf[0] << 24) |
- ((duk_uint32_t) buf[1] << 16) |
- ((duk_uint32_t) buf[2] << 8) |
- (duk_uint32_t) buf[3];
+ return ((duk_uint32_t) buf[0] << 24) | ((duk_uint32_t) buf[1] << 16) | ((duk_uint32_t) buf[2] << 8) | (duk_uint32_t) buf[3];
}
DUK_LOCAL duk_int32_t duk__debug_read_int32_raw(duk_hthread *thr) {
@@ -43424,8 +46472,7 @@ DUK_LOCAL duk_uint16_t duk__debug_read_uint16_raw(duk_hthread *thr) {
DUK_ASSERT(thr != NULL);
duk_debug_read_bytes(thr, buf, 2);
- return ((duk_uint16_t) buf[0] << 8) |
- (duk_uint16_t) buf[1];
+ return ((duk_uint16_t) buf[0] << 8) | (duk_uint16_t) buf[1];
}
DUK_INTERNAL duk_int32_t duk_debug_read_int(duk_hthread *thr) {
@@ -43457,10 +46504,10 @@ DUK_LOCAL duk_hstring *duk__debug_read_hstring_raw(duk_hthread *thr, duk_uint32_
duk_debug_read_bytes(thr, buf, (duk_size_t) len);
duk_push_lstring(thr, (const char *) buf, (duk_size_t) len);
} else {
- p = (duk_uint8_t *) duk_push_fixed_buffer(thr, (duk_size_t) len); /* zero for paranoia */
+ p = (duk_uint8_t *) duk_push_fixed_buffer(thr, (duk_size_t) len); /* zero for paranoia */
DUK_ASSERT(p != NULL);
duk_debug_read_bytes(thr, p, (duk_size_t) len);
- (void) duk_buffer_to_string(thr, -1); /* Safety relies on debug client, which is OK. */
+ (void) duk_buffer_to_string(thr, -1); /* Safety relies on debug client, which is OK. */
}
return duk_require_hstring(thr, -1);
@@ -43486,17 +46533,17 @@ DUK_INTERNAL duk_hstring *duk_debug_read_hstring(duk_hthread *thr) {
return duk__debug_read_hstring_raw(thr, len);
- fail:
+fail:
DUK_D(DUK_DPRINT("debug connection error: failed to decode int"));
DUK__SET_CONN_BROKEN(thr, 1);
- duk_push_hstring_empty(thr); /* always push some string */
+ duk_push_hstring_empty(thr); /* always push some string */
return duk_require_hstring(thr, -1);
}
DUK_LOCAL duk_hbuffer *duk__debug_read_hbuffer_raw(duk_hthread *thr, duk_uint32_t len) {
duk_uint8_t *p;
- p = (duk_uint8_t *) duk_push_fixed_buffer(thr, (duk_size_t) len); /* zero for paranoia */
+ p = (duk_uint8_t *) duk_push_fixed_buffer(thr, (duk_size_t) len); /* zero for paranoia */
DUK_ASSERT(p != NULL);
duk_debug_read_bytes(thr, p, (duk_size_t) len);
@@ -43519,7 +46566,7 @@ DUK_LOCAL void *duk__debug_read_pointer_raw(duk_hthread *thr) {
#endif
return (void *) pu.p;
- fail:
+fail:
DUK_D(DUK_DPRINT("debug connection error: failed to decode pointer"));
DUK__SET_CONN_BROKEN(thr, 1);
return (void *) NULL;
@@ -43577,7 +46624,7 @@ DUK_INTERNAL duk_heaphdr *duk_debug_read_any_ptr(duk_hthread *thr) {
return (duk_heaphdr *) duk__debug_read_pointer_raw(thr);
- fail:
+fail:
DUK_D(DUK_DPRINT("debug connection error: failed to decode any pointer (object, pointer, heapptr)"));
DUK__SET_CONN_BROKEN(thr, 1);
return NULL;
@@ -43683,15 +46730,15 @@ DUK_INTERNAL duk_tval *duk_debug_read_tval(duk_hthread *thr) {
duk_push_heapptr(thr, (void *) h);
break;
}
- case DUK_DBG_IB_UNUSED: /* unused: not accepted in inbound messages */
+ case DUK_DBG_IB_UNUSED: /* unused: not accepted in inbound messages */
default:
goto fail;
}
- return_ptr:
+return_ptr:
return DUK_GET_TVAL_NEGIDX(thr, -1);
- fail:
+fail:
DUK_D(DUK_DPRINT("debug connection error: failed to decode tval"));
DUK__SET_CONN_BROKEN(thr, 1);
return NULL;
@@ -43741,7 +46788,7 @@ DUK_INTERNAL void duk_debug_write_bytes(duk_hthread *thr, const duk_uint8_t *dat
DUK__DBG_TPORT_EXIT();
if (got == 0 || got > left) {
- duk__debug_null_most_callbacks(thr); /* avoid calling write callback in detach1() */
+ duk__debug_null_most_callbacks(thr); /* avoid calling write callback in detach1() */
DUK_D(DUK_DPRINT("connection error during write"));
DUK__SET_CONN_BROKEN(thr, 1);
return;
@@ -43808,8 +46855,7 @@ DUK_INTERNAL void duk_debug_write_uint(duk_hthread *thr, duk_uint32_t x) {
* unsigned 32-bit dvalue.
*/
if (x >= 0x80000000UL) {
- DUK_D(DUK_DPRINT("writing unsigned integer 0x%08lx as signed integer",
- (long) x));
+ DUK_D(DUK_DPRINT("writing unsigned integer 0x%08lx as signed integer", (long) x));
}
duk_debug_write_int(thr, (duk_int32_t) x);
}
@@ -43850,9 +46896,7 @@ DUK_INTERNAL void duk_debug_write_string(duk_hthread *thr, const char *data, duk
DUK_INTERNAL void duk_debug_write_cstring(duk_hthread *thr, const char *data) {
DUK_ASSERT(thr != NULL);
- duk_debug_write_string(thr,
- data,
- data ? DUK_STRLEN(data) : 0);
+ duk_debug_write_string(thr, data, data ? DUK_STRLEN(data) : 0);
}
DUK_INTERNAL void duk_debug_write_hstring(duk_hthread *thr, duk_hstring *h) {
@@ -43906,7 +46950,7 @@ DUK_INTERNAL void duk_debug_write_pointer(duk_hthread *thr, void *ptr) {
DUK_INTERNAL void duk_debug_write_heapptr(duk_hthread *thr, duk_heaphdr *h) {
duk__debug_write_pointer_raw(thr, (void *) h, DUK_DBG_IB_HEAPPTR);
}
-#endif /* DUK_USE_DEBUGGER_DUMPHEAP || DUK_USE_DEBUGGER_INSPECT */
+#endif /* DUK_USE_DEBUGGER_DUMPHEAP || DUK_USE_DEBUGGER_INSPECT */
DUK_INTERNAL void duk_debug_write_hobject(duk_hthread *thr, duk_hobject *obj) {
duk_uint8_t buf[3];
@@ -43949,8 +46993,7 @@ DUK_INTERNAL void duk_debug_write_tval(duk_hthread *thr, duk_tval *tv) {
duk_debug_write_byte(thr, DUK_DBG_IB_NULL);
break;
case DUK_TAG_BOOLEAN:
- DUK_ASSERT(DUK_TVAL_GET_BOOLEAN(tv) == 0 ||
- DUK_TVAL_GET_BOOLEAN(tv) == 1);
+ DUK_ASSERT(DUK_TVAL_GET_BOOLEAN(tv) == 0 || DUK_TVAL_GET_BOOLEAN(tv) == 1);
duk_debug_write_boolean(thr, DUK_TVAL_GET_BOOLEAN(tv));
break;
case DUK_TAG_POINTER:
@@ -43995,14 +47038,22 @@ DUK_INTERNAL void duk_debug_write_tval(duk_hthread *thr, duk_tval *tv) {
DUK_DD(DUK_DDPRINT("i32=%ld du1=%02x%02x%02x%02x%02x%02x%02x%02x "
"du2=%02x%02x%02x%02x%02x%02x%02x%02x",
(long) i32,
- (unsigned int) du1.uc[0], (unsigned int) du1.uc[1],
- (unsigned int) du1.uc[2], (unsigned int) du1.uc[3],
- (unsigned int) du1.uc[4], (unsigned int) du1.uc[5],
- (unsigned int) du1.uc[6], (unsigned int) du1.uc[7],
- (unsigned int) du2.uc[0], (unsigned int) du2.uc[1],
- (unsigned int) du2.uc[2], (unsigned int) du2.uc[3],
- (unsigned int) du2.uc[4], (unsigned int) du2.uc[5],
- (unsigned int) du2.uc[6], (unsigned int) du2.uc[7]));
+ (unsigned int) du1.uc[0],
+ (unsigned int) du1.uc[1],
+ (unsigned int) du1.uc[2],
+ (unsigned int) du1.uc[3],
+ (unsigned int) du1.uc[4],
+ (unsigned int) du1.uc[5],
+ (unsigned int) du1.uc[6],
+ (unsigned int) du1.uc[7],
+ (unsigned int) du2.uc[0],
+ (unsigned int) du2.uc[1],
+ (unsigned int) du2.uc[2],
+ (unsigned int) du2.uc[3],
+ (unsigned int) du2.uc[4],
+ (unsigned int) du2.uc[5],
+ (unsigned int) du2.uc[6],
+ (unsigned int) du2.uc[7]));
if (duk_memcmp((const void *) du1.uc, (const void *) du2.uc, sizeof(du1.uc)) == 0) {
duk_debug_write_int(thr, i32);
@@ -44026,13 +47077,13 @@ DUK_LOCAL void duk__debug_write_tval_heapptr(duk_hthread *thr, duk_tval *tv) {
duk_debug_write_tval(thr, tv);
}
}
-#endif /* DUK_USE_DEBUGGER_DUMPHEAP */
+#endif /* DUK_USE_DEBUGGER_DUMPHEAP */
/*
* Debug connection message write helpers
*/
-#if 0 /* unused */
+#if 0 /* unused */
DUK_INTERNAL void duk_debug_write_request(duk_hthread *thr, duk_small_uint_t command) {
duk_debug_write_byte(thr, DUK_DBG_IB_REQUEST);
duk_debug_write_int(thr, command);
@@ -44135,7 +47186,7 @@ DUK_INTERNAL void duk_debug_send_throw(duk_hthread *thr, duk_bool_t fatal) {
duk_activation *act;
duk_uint32_t pc;
- DUK_ASSERT(thr->valstack_top > thr->valstack); /* At least: ... [err] */
+ DUK_ASSERT(thr->valstack_top > thr->valstack); /* At least: ... [err] */
duk_debug_write_notify(thr, DUK_DBG_CMD_THROW);
duk_debug_write_int(thr, (duk_int32_t) fatal);
@@ -44176,7 +47227,7 @@ DUK_INTERNAL void duk_debug_send_throw(duk_hthread *thr, duk_bool_t fatal) {
duk_debug_write_eom(thr);
}
-#endif /* DUK_USE_DEBUGGER_THROW_NOTIFY */
+#endif /* DUK_USE_DEBUGGER_THROW_NOTIFY */
/*
* Debug message processing
@@ -44200,9 +47251,9 @@ DUK_LOCAL duk_bool_t duk__debug_skip_dvalue(duk_hthread *thr) {
duk_debug_skip_bytes(thr, (duk_size_t) (x - 0x60));
return 0;
}
- switch(x) {
+ switch (x) {
case DUK_DBG_IB_EOM:
- return 1; /* Return 1: got EOM */
+ return 1; /* Return 1: got EOM */
case DUK_DBG_IB_REQUEST:
case DUK_DBG_IB_REPLY:
case DUK_DBG_IB_ERROR:
@@ -44251,9 +47302,9 @@ DUK_LOCAL duk_bool_t duk__debug_skip_dvalue(duk_hthread *thr) {
return 0;
- fail:
+fail:
DUK__SET_CONN_BROKEN(thr, 1);
- return 1; /* Pretend like we got EOM */
+ return 1; /* Pretend like we got EOM */
}
/* Skip dvalues to EOM. */
@@ -44273,7 +47324,7 @@ DUK_LOCAL duk_int32_t duk__debug_read_validate_csindex(duk_hthread *thr) {
level = duk_debug_read_int(thr);
if (level >= 0 || -level > (duk_int32_t) thr->callstack_top) {
duk_debug_write_error_eom(thr, DUK_DBG_ERR_NOTFOUND, "invalid callstack index");
- return 0; /* zero indicates failure */
+ return 0; /* zero indicates failure */
}
return level;
}
@@ -44342,7 +47393,7 @@ DUK_LOCAL void duk__debug_handle_resume(duk_hthread *thr, duk_heap *heap) {
duk_debug_clear_paused(heap);
pause_flags = 0;
-#if 0 /* manual testing */
+#if 0 /* manual testing */
pause_flags |= DUK_PAUSE_FLAG_ONE_OPCODE;
pause_flags |= DUK_PAUSE_FLAG_CAUGHT_ERROR;
pause_flags |= DUK_PAUSE_FLAG_UNCAUGHT_ERROR;
@@ -44363,12 +47414,9 @@ DUK_LOCAL void duk__debug_handle_step(duk_hthread *thr, duk_heap *heap, duk_int3
DUK_D(DUK_DPRINT("debug command StepInto/StepOver/StepOut: %d", (int) cmd));
if (cmd == DUK_DBG_CMD_STEPINTO) {
- pause_flags = DUK_PAUSE_FLAG_LINE_CHANGE |
- DUK_PAUSE_FLAG_FUNC_ENTRY |
- DUK_PAUSE_FLAG_FUNC_EXIT;
+ pause_flags = DUK_PAUSE_FLAG_LINE_CHANGE | DUK_PAUSE_FLAG_FUNC_ENTRY | DUK_PAUSE_FLAG_FUNC_EXIT;
} else if (cmd == DUK_DBG_CMD_STEPOVER) {
- pause_flags = DUK_PAUSE_FLAG_LINE_CHANGE |
- DUK_PAUSE_FLAG_FUNC_EXIT;
+ pause_flags = DUK_PAUSE_FLAG_LINE_CHANGE | DUK_PAUSE_FLAG_FUNC_EXIT;
} else {
DUK_ASSERT(cmd == DUK_DBG_CMD_STEPOUT);
pause_flags = DUK_PAUSE_FLAG_FUNC_EXIT;
@@ -44447,7 +47495,7 @@ DUK_LOCAL void duk__debug_handle_get_var(duk_hthread *thr, duk_heap *heap) {
if (act == NULL) {
return;
}
- str = duk_debug_read_hstring(thr); /* push to stack */
+ str = duk_debug_read_hstring(thr); /* push to stack */
DUK_ASSERT(str != NULL);
rc = duk_js_getvar_activation(thr, act, str, 0);
@@ -44476,7 +47524,7 @@ DUK_LOCAL void duk__debug_handle_put_var(duk_hthread *thr, duk_heap *heap) {
if (act == NULL) {
return;
}
- str = duk_debug_read_hstring(thr); /* push to stack */
+ str = duk_debug_read_hstring(thr); /* push to stack */
DUK_ASSERT(str != NULL);
tv = duk_debug_read_tval(thr);
if (tv == NULL) {
@@ -44574,7 +47622,7 @@ DUK_LOCAL void duk__debug_handle_get_locals(duk_hthread *thr, duk_heap *heap) {
/* [ ... func varmap enum key value this ] */
duk_debug_write_hstring(thr, duk_get_hstring(thr, -3));
duk_debug_write_tval(thr, duk_get_tval(thr, -2));
- duk_pop_3(thr); /* -> [ ... func varmap enum ] */
+ duk_pop_3(thr); /* -> [ ... func varmap enum ] */
}
} else {
DUK_D(DUK_DPRINT("varmap missing in GetLocals, ignore"));
@@ -44609,12 +47657,12 @@ DUK_LOCAL void duk__debug_handle_eval(duk_hthread *thr, duk_heap *heap) {
/* nargs == 2 so we can pass a callstack index to eval(). */
idx_func = duk_get_top(thr);
duk_push_c_function(thr, duk_bi_global_object_eval, 2 /*nargs*/);
- duk_push_undefined(thr); /* 'this' binding shouldn't matter here */
+ duk_push_undefined(thr); /* 'this' binding shouldn't matter here */
/* Read callstack index, if non-null. */
if (duk_debug_peek_byte(thr) == DUK_DBG_IB_NULL) {
direct_eval = 0;
- level = -1; /* Not needed, but silences warning. */
+ level = -1; /* Not needed, but silences warning. */
(void) duk_debug_read_byte(thr);
} else {
direct_eval = 1;
@@ -44624,12 +47672,11 @@ DUK_LOCAL void duk__debug_handle_eval(duk_hthread *thr, duk_heap *heap) {
}
}
- DUK_ASSERT(!direct_eval ||
- (level < 0 && -level <= (duk_int32_t) thr->callstack_top));
+ DUK_ASSERT(!direct_eval || (level < 0 && -level <= (duk_int32_t) thr->callstack_top));
(void) duk_debug_read_hstring(thr);
if (direct_eval) {
- duk_push_int(thr, level - 1); /* compensate for eval() call */
+ duk_push_int(thr, level - 1); /* compensate for eval() call */
}
/* [ ... eval "eval" eval_input level? ] */
@@ -44684,7 +47731,7 @@ DUK_LOCAL void duk__debug_handle_detach(duk_hthread *thr, duk_heap *heap) {
duk_debug_write_eom(thr);
DUK_D(DUK_DPRINT("debug connection detached, mark broken"));
- DUK__SET_CONN_BROKEN(thr, 0); /* not an error */
+ DUK__SET_CONN_BROKEN(thr, 0); /* not an error */
}
DUK_LOCAL void duk__debug_handle_apprequest(duk_hthread *thr, duk_heap *heap) {
@@ -44692,7 +47739,7 @@ DUK_LOCAL void duk__debug_handle_apprequest(duk_hthread *thr, duk_heap *heap) {
DUK_D(DUK_DPRINT("debug command AppRequest"));
- old_top = duk_get_top(thr); /* save stack top */
+ old_top = duk_get_top(thr); /* save stack top */
if (heap->dbg_request_cb != NULL) {
duk_idx_t nrets;
@@ -44708,7 +47755,7 @@ DUK_LOCAL void duk__debug_handle_apprequest(duk_hthread *thr, duk_heap *heap) {
DUK_D(DUK_DPRINT("failed to allocate space for request dvalue(s)"));
goto fail;
}
- tv = duk_debug_read_tval(thr); /* push to stack */
+ tv = duk_debug_read_tval(thr); /* push to stack */
if (tv == NULL) {
/* detached */
return;
@@ -44719,17 +47766,24 @@ DUK_LOCAL void duk__debug_handle_apprequest(duk_hthread *thr, duk_heap *heap) {
/* Request callback should push values for reply to client onto valstack */
DUK_D(DUK_DPRINT("calling into AppRequest request_cb with nvalues=%ld, old_top=%ld, top=%ld",
- (long) nvalues, (long) old_top, (long) duk_get_top(thr)));
+ (long) nvalues,
+ (long) old_top,
+ (long) duk_get_top(thr)));
nrets = heap->dbg_request_cb(thr, heap->dbg_udata, nvalues);
DUK_D(DUK_DPRINT("returned from AppRequest request_cb; nvalues=%ld -> nrets=%ld, old_top=%ld, top=%ld",
- (long) nvalues, (long) nrets, (long) old_top, (long) duk_get_top(thr)));
+ (long) nvalues,
+ (long) nrets,
+ (long) old_top,
+ (long) duk_get_top(thr)));
if (nrets >= 0) {
DUK_ASSERT(duk_get_top(thr) >= old_top + nrets);
if (duk_get_top(thr) < old_top + nrets) {
DUK_D(DUK_DPRINT("AppRequest callback doesn't match value stack configuration, "
"top=%ld < old_top=%ld + nrets=%ld; "
"this might mean it's unsafe to continue!",
- (long) duk_get_top(thr), (long) old_top, (long) nrets));
+ (long) duk_get_top(thr),
+ (long) old_top,
+ (long) nrets));
goto fail;
}
@@ -44749,7 +47803,7 @@ DUK_LOCAL void duk__debug_handle_apprequest(duk_hthread *thr, duk_heap *heap) {
duk_debug_write_error_eom(thr, DUK_DBG_ERR_APPLICATION, duk_get_string(thr, -1));
}
- duk_set_top(thr, old_top); /* restore stack top */
+ duk_set_top(thr, old_top); /* restore stack top */
} else {
DUK_D(DUK_DPRINT("no request callback, treat AppRequest as unsupported"));
duk_debug_write_error_eom(thr, DUK_DBG_ERR_UNSUPPORTED, "AppRequest unsupported by target");
@@ -44757,8 +47811,8 @@ DUK_LOCAL void duk__debug_handle_apprequest(duk_hthread *thr, duk_heap *heap) {
return;
- fail:
- duk_set_top(thr, old_top); /* restore stack top */
+fail:
+ duk_set_top(thr, old_top); /* restore stack top */
DUK__SET_CONN_BROKEN(thr, 1);
}
@@ -44809,16 +47863,16 @@ DUK_LOCAL void duk__debug_dump_heaphdr(duk_hthread *thr, duk_heap *heap, duk_hea
k = DUK_HOBJECT_E_GET_KEY(heap, h, i);
duk_debug_write_heapptr(thr, (duk_heaphdr *) k);
if (k == NULL) {
- duk_debug_write_int(thr, 0); /* isAccessor */
+ duk_debug_write_int(thr, 0); /* isAccessor */
duk_debug_write_unused(thr);
continue;
}
if (DUK_HOBJECT_E_SLOT_IS_ACCESSOR(heap, h, i)) {
- duk_debug_write_int(thr, 1); /* isAccessor */
+ duk_debug_write_int(thr, 1); /* isAccessor */
duk_debug_write_heapptr(thr, (duk_heaphdr *) DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i)->a.get);
duk_debug_write_heapptr(thr, (duk_heaphdr *) DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i)->a.set);
} else {
- duk_debug_write_int(thr, 0); /* isAccessor */
+ duk_debug_write_int(thr, 0); /* isAccessor */
duk__debug_write_tval_heapptr(thr, &DUK_HOBJECT_E_GET_VALUE_PTR(heap, h, i)->v);
}
@@ -44880,7 +47934,7 @@ DUK_LOCAL void duk__debug_handle_dump_heap(duk_hthread *thr, duk_heap *heap) {
duk__debug_dump_strtab(thr, heap);
duk_debug_write_eom(thr);
}
-#endif /* DUK_USE_DEBUGGER_DUMPHEAP */
+#endif /* DUK_USE_DEBUGGER_DUMPHEAP */
DUK_LOCAL void duk__debug_handle_get_bytecode(duk_hthread *thr, duk_heap *heap) {
duk_activation *act;
@@ -44949,11 +48003,11 @@ DUK_LOCAL void duk__debug_handle_get_bytecode(duk_hthread *thr, duk_heap *heap)
duk_debug_write_eom(thr);
return;
- fail_args:
+fail_args:
duk_debug_write_error_eom(thr, DUK_DBG_ERR_UNKNOWN, "invalid argument");
return;
- fail_index:
+fail_index:
duk_debug_write_error_eom(thr, DUK_DBG_ERR_NOTFOUND, "invalid callstack index");
return;
}
@@ -45005,53 +48059,22 @@ DUK_LOCAL duk_uint_t duk__debug_getinfo_hstring_masks[] = {
DUK_HSTRING_FLAG_EVAL_OR_ARGUMENTS,
#endif
DUK_HSTRING_FLAG_EXTDATA,
- 0 /* terminator */
+ 0 /* terminator */
};
DUK_LOCAL const char * const duk__debug_getinfo_hobject_keys[] = {
- "extensible",
- "constructable",
- "callable",
- "boundfunc",
- "compfunc",
- "natfunc",
- "bufobj",
- "fastrefs",
- "array_part",
- "strict",
- "notail",
- "newenv",
- "namebinding",
- "createargs",
- "have_finalizer",
- "exotic_array",
- "exotic_stringobj",
- "exotic_arguments",
- "exotic_proxyobj",
- "special_call"
+ "extensible", "constructable", "callable", "boundfunc", "compfunc", "natfunc", "bufobj",
+ "fastrefs", "array_part", "strict", "notail", "newenv", "namebinding", "createargs",
+ "have_finalizer", "exotic_array", "exotic_stringobj", "exotic_arguments", "exotic_proxyobj", "special_call"
/* NULL not needed here */
};
DUK_LOCAL duk_uint_t duk__debug_getinfo_hobject_masks[] = {
- DUK_HOBJECT_FLAG_EXTENSIBLE,
- DUK_HOBJECT_FLAG_CONSTRUCTABLE,
- DUK_HOBJECT_FLAG_CALLABLE,
- DUK_HOBJECT_FLAG_BOUNDFUNC,
- DUK_HOBJECT_FLAG_COMPFUNC,
- DUK_HOBJECT_FLAG_NATFUNC,
- DUK_HOBJECT_FLAG_BUFOBJ,
- DUK_HOBJECT_FLAG_FASTREFS,
- DUK_HOBJECT_FLAG_ARRAY_PART,
- DUK_HOBJECT_FLAG_STRICT,
- DUK_HOBJECT_FLAG_NOTAIL,
- DUK_HOBJECT_FLAG_NEWENV,
- DUK_HOBJECT_FLAG_NAMEBINDING,
- DUK_HOBJECT_FLAG_CREATEARGS,
- DUK_HOBJECT_FLAG_HAVE_FINALIZER,
- DUK_HOBJECT_FLAG_EXOTIC_ARRAY,
- DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ,
- DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS,
- DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ,
- DUK_HOBJECT_FLAG_SPECIAL_CALL,
- 0 /* terminator */
+ DUK_HOBJECT_FLAG_EXTENSIBLE, DUK_HOBJECT_FLAG_CONSTRUCTABLE, DUK_HOBJECT_FLAG_CALLABLE,
+ DUK_HOBJECT_FLAG_BOUNDFUNC, DUK_HOBJECT_FLAG_COMPFUNC, DUK_HOBJECT_FLAG_NATFUNC,
+ DUK_HOBJECT_FLAG_BUFOBJ, DUK_HOBJECT_FLAG_FASTREFS, DUK_HOBJECT_FLAG_ARRAY_PART,
+ DUK_HOBJECT_FLAG_STRICT, DUK_HOBJECT_FLAG_NOTAIL, DUK_HOBJECT_FLAG_NEWENV,
+ DUK_HOBJECT_FLAG_NAMEBINDING, DUK_HOBJECT_FLAG_CREATEARGS, DUK_HOBJECT_FLAG_HAVE_FINALIZER,
+ DUK_HOBJECT_FLAG_EXOTIC_ARRAY, DUK_HOBJECT_FLAG_EXOTIC_STRINGOBJ, DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS,
+ DUK_HOBJECT_FLAG_EXOTIC_PROXYOBJ, DUK_HOBJECT_FLAG_SPECIAL_CALL, 0 /* terminator */
};
DUK_LOCAL const char * const duk__debug_getinfo_hbuffer_keys[] = {
"dynamic",
@@ -45061,7 +48084,7 @@ DUK_LOCAL const char * const duk__debug_getinfo_hbuffer_keys[] = {
DUK_LOCAL duk_uint_t duk__debug_getinfo_hbuffer_masks[] = {
DUK_HBUFFER_FLAG_DYNAMIC,
DUK_HBUFFER_FLAG_EXTERNAL,
- 0 /* terminator */
+ 0 /* terminator */
};
DUK_LOCAL void duk__debug_getinfo_flags_key(duk_hthread *thr, const char *key) {
@@ -45087,7 +48110,7 @@ DUK_LOCAL void duk__debug_getinfo_prop_bool(duk_hthread *thr, const char *key, d
duk_debug_write_boolean(thr, val);
}
-DUK_LOCAL void duk__debug_getinfo_bitmask(duk_hthread *thr, const char * const * keys, duk_uint_t *masks, duk_uint_t flags) {
+DUK_LOCAL void duk__debug_getinfo_bitmask(duk_hthread *thr, const char * const *keys, duk_uint_t *masks, duk_uint_t flags) {
const char *key;
duk_uint_t mask;
@@ -45099,7 +48122,10 @@ DUK_LOCAL void duk__debug_getinfo_bitmask(duk_hthread *thr, const char * const *
key = *keys++;
DUK_ASSERT(key != NULL);
- DUK_DD(DUK_DDPRINT("inspect bitmask: key=%s, mask=0x%08lx, flags=0x%08lx", key, (unsigned long) mask, (unsigned long) flags));
+ DUK_DD(DUK_DDPRINT("inspect bitmask: key=%s, mask=0x%08lx, flags=0x%08lx",
+ key,
+ (unsigned long) mask,
+ (unsigned long) flags));
duk__debug_getinfo_prop_bool(thr, key, flags & mask);
}
}
@@ -45175,9 +48201,12 @@ DUK_LOCAL void duk__debug_handle_get_heap_obj_info(duk_hthread *thr, duk_heap *h
DUK_D(DUK_DPRINT("debug command GetHeapObjInfo"));
DUK_UNREF(heap);
- DUK_ASSERT(sizeof(duk__debug_getinfo_hstring_keys) / sizeof(const char *) == sizeof(duk__debug_getinfo_hstring_masks) / sizeof(duk_uint_t) - 1);
- DUK_ASSERT(sizeof(duk__debug_getinfo_hobject_keys) / sizeof(const char *) == sizeof(duk__debug_getinfo_hobject_masks) / sizeof(duk_uint_t) - 1);
- DUK_ASSERT(sizeof(duk__debug_getinfo_hbuffer_keys) / sizeof(const char *) == sizeof(duk__debug_getinfo_hbuffer_masks) / sizeof(duk_uint_t) - 1);
+ DUK_ASSERT(sizeof(duk__debug_getinfo_hstring_keys) / sizeof(const char *) ==
+ sizeof(duk__debug_getinfo_hstring_masks) / sizeof(duk_uint_t) - 1);
+ DUK_ASSERT(sizeof(duk__debug_getinfo_hobject_keys) / sizeof(const char *) ==
+ sizeof(duk__debug_getinfo_hobject_masks) / sizeof(duk_uint_t) - 1);
+ DUK_ASSERT(sizeof(duk__debug_getinfo_hbuffer_keys) / sizeof(const char *) ==
+ sizeof(duk__debug_getinfo_hbuffer_masks) / sizeof(duk_uint_t) - 1);
h = duk_debug_read_any_ptr(thr);
if (!h) {
@@ -45365,7 +48394,7 @@ DUK_LOCAL void duk__debug_handle_get_heap_obj_info(duk_hthread *thr, duk_heap *h
duk_debug_write_heapptr(thr, (duk_heaphdr *) h_bufobj->buf);
}
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
break;
}
case DUK_HTYPE_BUFFER: {
@@ -45380,7 +48409,7 @@ DUK_LOCAL void duk__debug_handle_get_heap_obj_info(duk_hthread *thr, duk_heap *h
duk__debug_getinfo_flags_key(thr, "dataptr");
duk_debug_write_pointer(thr, (void *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_buf));
duk__debug_getinfo_flags_key(thr, "data");
- duk_debug_write_hbuffer(thr, h_buf); /* tolerates NULL h_buf */
+ duk_debug_write_hbuffer(thr, h_buf); /* tolerates NULL h_buf */
break;
}
default: {
@@ -45418,8 +48447,7 @@ DUK_LOCAL void duk__debug_handle_get_obj_prop_desc(duk_hthread *thr, duk_heap *h
/* To use the shared helper need the virtual index. */
DUK_ASSERT(desc.e_idx >= 0 || desc.a_idx >= 0);
- virtual_idx = (desc.a_idx >= 0 ? desc.a_idx :
- (duk_int_t) DUK_HOBJECT_GET_ASIZE(h_obj) + desc.e_idx);
+ virtual_idx = (desc.a_idx >= 0 ? desc.a_idx : (duk_int_t) DUK_HOBJECT_GET_ASIZE(h_obj) + desc.e_idx);
duk_debug_write_reply(thr);
rc = duk__debug_getprop_index(thr, heap, h_obj, (duk_uint_t) virtual_idx);
@@ -45431,7 +48459,7 @@ DUK_LOCAL void duk__debug_handle_get_obj_prop_desc(duk_hthread *thr, duk_heap *h
}
return;
- fail_args:
+fail_args:
duk_debug_write_error_eom(thr, DUK_DBG_ERR_UNKNOWN, "invalid args");
}
@@ -45467,11 +48495,11 @@ DUK_LOCAL void duk__debug_handle_get_obj_prop_desc_range(duk_hthread *thr, duk_h
duk_debug_write_eom(thr);
return;
- fail_args:
+fail_args:
duk_debug_write_error_eom(thr, DUK_DBG_ERR_UNKNOWN, "invalid args");
}
-#endif /* DUK_USE_DEBUGGER_INSPECT */
+#endif /* DUK_USE_DEBUGGER_INSPECT */
/*
* Process incoming debug requests
@@ -45569,7 +48597,7 @@ DUK_LOCAL void duk__debug_process_message(duk_hthread *thr) {
duk__debug_handle_dump_heap(thr, heap);
break;
}
-#endif /* DUK_USE_DEBUGGER_DUMPHEAP */
+#endif /* DUK_USE_DEBUGGER_DUMPHEAP */
case DUK_DBG_CMD_GETBYTECODE: {
duk__debug_handle_get_bytecode(thr, heap);
break;
@@ -45591,12 +48619,12 @@ DUK_LOCAL void duk__debug_process_message(duk_hthread *thr) {
duk__debug_handle_get_obj_prop_desc_range(thr, heap);
break;
}
-#endif /* DUK_USE_DEBUGGER_INSPECT */
+#endif /* DUK_USE_DEBUGGER_INSPECT */
default: {
DUK_D(DUK_DPRINT("debug command unsupported: %d", (int) cmd));
duk_debug_write_error_eom(thr, DUK_DBG_ERR_UNSUPPORTED, "unsupported command");
}
- } /* switch cmd */
+ } /* switch cmd */
break;
}
case DUK_DBG_IB_REPLY: {
@@ -45615,14 +48643,14 @@ DUK_LOCAL void duk__debug_process_message(duk_hthread *thr) {
DUK_D(DUK_DPRINT("invalid initial byte, drop connection: %d", (int) x));
goto fail;
}
- } /* switch initial byte */
+ } /* switch initial byte */
DUK_ASSERT(duk_get_top(thr) >= entry_top);
duk_set_top(thr, entry_top);
duk__debug_skip_to_eom(thr);
return;
- fail:
+fail:
DUK_ASSERT(duk_get_top(thr) >= entry_top);
duk_set_top(thr, entry_top);
DUK__SET_CONN_BROKEN(thr, 1);
@@ -45649,8 +48677,10 @@ DUK_INTERNAL duk_bool_t duk_debug_process_messages(duk_hthread *thr, duk_bool_t
#endif
DUK_D(DUK_DPRINT("process debug messages: read_cb=%s, no_block=%ld, detaching=%ld, processing=%ld",
- thr->heap->dbg_read_cb ? "not NULL" : "NULL", (long) no_block,
- (long) thr->heap->dbg_detaching, (long) thr->heap->dbg_processing));
+ thr->heap->dbg_read_cb ? "not NULL" : "NULL",
+ (long) no_block,
+ (long) thr->heap->dbg_detaching,
+ (long) thr->heap->dbg_processing));
DUK_DD(DUK_DDPRINT("top at entry: %ld", (long) duk_get_top(thr)));
/* thr->heap->dbg_detaching may be != 0 if a debugger write outside
@@ -45697,13 +48727,14 @@ DUK_INTERNAL duk_bool_t duk_debug_process_messages(duk_hthread *thr, duk_bool_t
DUK_D(DUK_DPRINT("detach pending (dbg_read_cb == NULL, dbg_detaching != 0), call detach2"));
duk__debug_do_detach2(thr->heap);
- thr->heap->dbg_processing = 1; /* may be set to 0 by duk_debugger_attach() inside callback */
+ thr->heap->dbg_processing = 1; /* may be set to 0 by duk_debugger_attach() inside callback */
DUK_D(DUK_DPRINT("after detach2 (and possible reattach): dbg_read_cb=%s, dbg_detaching=%ld",
- thr->heap->dbg_read_cb ? "not NULL" : "NULL", (long) thr->heap->dbg_detaching));
+ thr->heap->dbg_read_cb ? "not NULL" : "NULL",
+ (long) thr->heap->dbg_detaching));
}
- DUK_ASSERT(thr->heap->dbg_detaching == 0); /* true even with reattach */
- DUK_ASSERT(thr->heap->dbg_processing == 1); /* even after a detach and possible reattach */
+ DUK_ASSERT(thr->heap->dbg_detaching == 0); /* true even with reattach */
+ DUK_ASSERT(thr->heap->dbg_processing == 1); /* even after a detach and possible reattach */
if (thr->heap->dbg_read_cb == NULL) {
DUK_D(DUK_DPRINT("debug connection broken (and not detaching), stop processing messages"));
@@ -45728,7 +48759,7 @@ DUK_INTERNAL duk_bool_t duk_debug_process_messages(duk_hthread *thr, duk_bool_t
duk__debug_process_message(thr);
duk__check_resend_status(thr);
- retval = 1; /* processed one or more messages */
+ retval = 1; /* processed one or more messages */
}
DUK_ASSERT(thr->heap->dbg_detaching == 0);
@@ -45738,7 +48769,7 @@ DUK_INTERNAL duk_bool_t duk_debug_process_messages(duk_hthread *thr, duk_bool_t
/* As an initial implementation, read flush after exiting the message
* loop. If transport is broken, this is a no-op (with debug logs).
*/
- duk_debug_read_flush(thr); /* this cannot initiate a detach */
+ duk_debug_read_flush(thr); /* this cannot initiate a detach */
DUK_ASSERT(thr->heap->dbg_detaching == 0);
DUK_DD(DUK_DDPRINT("top at exit: %ld", (long) duk_get_top(thr)));
@@ -45789,11 +48820,8 @@ DUK_INTERNAL void duk_debug_halt_execution(duk_hthread *thr, duk_bool_t use_prev
/* Short circuit if is safe: if act->curr_pc != NULL, 'fun' is
* guaranteed to be a non-NULL ECMAScript function.
*/
- DUK_ASSERT(act->curr_pc == NULL ||
- (fun != NULL && DUK_HOBJECT_IS_COMPFUNC((duk_hobject *) fun)));
- if (use_prev_pc &&
- act->curr_pc != NULL &&
- act->curr_pc > DUK_HCOMPFUNC_GET_CODE_BASE(thr->heap, fun)) {
+ DUK_ASSERT(act->curr_pc == NULL || (fun != NULL && DUK_HOBJECT_IS_COMPFUNC((duk_hobject *) fun)));
+ if (use_prev_pc && act->curr_pc != NULL && act->curr_pc > DUK_HCOMPFUNC_GET_CODE_BASE(thr->heap, fun)) {
act->curr_pc--;
}
}
@@ -45820,7 +48848,7 @@ DUK_INTERNAL void duk_debug_halt_execution(duk_hthread *thr, duk_bool_t use_prev
* with PC values.
*/
if (act != NULL) {
- act->curr_pc = old_pc; /* restore PC */
+ act->curr_pc = old_pc; /* restore PC */
}
}
@@ -45844,7 +48872,8 @@ DUK_INTERNAL duk_small_int_t duk_debug_add_breakpoint(duk_hthread *thr, duk_hstr
if (heap->dbg_breakpoint_count >= DUK_HEAP_MAX_BREAKPOINTS) {
DUK_D(DUK_DPRINT("failed to add breakpoint for %O:%ld, all breakpoint slots used",
- (duk_heaphdr *) filename, (long) line));
+ (duk_heaphdr *) filename,
+ (long) line));
return -1;
}
heap->dbg_breakpoints_active[0] = (duk_breakpoint *) NULL;
@@ -45853,7 +48882,7 @@ DUK_INTERNAL duk_small_int_t duk_debug_add_breakpoint(duk_hthread *thr, duk_hstr
b->line = line;
DUK_HSTRING_INCREF(thr, filename);
- return (duk_small_int_t) (heap->dbg_breakpoint_count - 1); /* index */
+ return (duk_small_int_t) (heap->dbg_breakpoint_count - 1); /* index */
}
DUK_INTERNAL duk_bool_t duk_debug_remove_breakpoint(duk_hthread *thr, duk_small_uint_t breakpoint_index) {
@@ -45871,7 +48900,7 @@ DUK_INTERNAL duk_bool_t duk_debug_remove_breakpoint(duk_hthread *thr, duk_small_
heap = thr->heap;
DUK_ASSERT(heap != NULL);
DUK_ASSERT(duk_debug_is_attached(thr->heap));
- DUK_ASSERT_DISABLE(breakpoint_index >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(breakpoint_index >= 0); /* unsigned */
if (breakpoint_index >= heap->dbg_breakpoint_count) {
DUK_D(DUK_DPRINT("invalid breakpoint index: %ld", (long) breakpoint_index));
@@ -45883,15 +48912,13 @@ DUK_INTERNAL duk_bool_t duk_debug_remove_breakpoint(duk_hthread *thr, duk_small_
DUK_ASSERT(h != NULL);
move_size = sizeof(duk_breakpoint) * (heap->dbg_breakpoint_count - breakpoint_index - 1);
- duk_memmove((void *) b,
- (const void *) (b + 1),
- (size_t) move_size);
+ duk_memmove((void *) b, (const void *) (b + 1), (size_t) move_size);
heap->dbg_breakpoint_count--;
heap->dbg_breakpoints_active[0] = (duk_breakpoint *) NULL;
- DUK_HSTRING_DECREF(thr, h); /* side effects */
- DUK_UNREF(h); /* w/o refcounting */
+ DUK_HSTRING_DECREF(thr, h); /* side effects */
+ DUK_UNREF(h); /* w/o refcounting */
/* Breakpoint entries above the used area are left as garbage. */
@@ -45917,10 +48944,10 @@ DUK_INTERNAL void duk_debug_set_paused(duk_heap *heap) {
DUK_HEAP_SET_DEBUGGER_PAUSED(heap);
heap->dbg_state_dirty = 1;
duk_debug_clear_pause_state(heap);
- DUK_ASSERT(heap->ms_running == 0); /* debugger can't be triggered within mark-and-sweep */
- heap->ms_running = 2; /* prevent mark-and-sweep, prevent refzero queueing */
+ DUK_ASSERT(heap->ms_running == 0); /* debugger can't be triggered within mark-and-sweep */
+ heap->ms_running = 2; /* prevent mark-and-sweep, prevent refzero queueing */
heap->ms_prevent_count++;
- DUK_ASSERT(heap->ms_prevent_count != 0); /* Wrap. */
+ DUK_ASSERT(heap->ms_prevent_count != 0); /* Wrap. */
DUK_ASSERT(heap->heap_thread != NULL);
}
}
@@ -45946,11 +48973,11 @@ DUK_INTERNAL void duk_debug_clear_pause_state(duk_heap *heap) {
heap->dbg_pause_startline = 0;
}
-#else /* DUK_USE_DEBUGGER_SUPPORT */
+#else /* DUK_USE_DEBUGGER_SUPPORT */
/* No debugger support. */
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
/* automatic undefs */
#undef DUK__DBG_TPORT_ENTER
@@ -46040,7 +49067,7 @@ DUK_LOCAL void duk__err_augment_user(duk_hthread *thr, duk_small_uint_t stridx_c
* when it is called and that error replaces the original one.
*/
- DUK_ASSERT_VALSTACK_SPACE(thr, 4); /* 3 entries actually needed below */
+ DUK_ASSERT_VALSTACK_SPACE(thr, 4); /* 3 entries actually needed below */
/* [ ... errval ] */
@@ -46051,23 +49078,19 @@ DUK_LOCAL void duk__err_augment_user(duk_hthread *thr, duk_small_uint_t stridx_c
DUK_DD(DUK_DDPRINT("error occurred when DUK_BIDX_DUKTAPE is NULL, ignoring"));
return;
}
- tv_hnd = duk_hobject_find_entry_tval_ptr_stridx(thr->heap,
- thr->builtins[DUK_BIDX_DUKTAPE],
- stridx_cb);
+ tv_hnd = duk_hobject_find_entry_tval_ptr_stridx(thr->heap, thr->builtins[DUK_BIDX_DUKTAPE], stridx_cb);
if (tv_hnd == NULL) {
- DUK_DD(DUK_DDPRINT("error handler does not exist or is not a plain value: %!T",
- (duk_tval *) tv_hnd));
+ DUK_DD(DUK_DDPRINT("error handler does not exist or is not a plain value: %!T", (duk_tval *) tv_hnd));
return;
}
- DUK_DDD(DUK_DDDPRINT("error handler dump (callability not checked): %!T",
- (duk_tval *) tv_hnd));
+ DUK_DDD(DUK_DDDPRINT("error handler dump (callability not checked): %!T", (duk_tval *) tv_hnd));
duk_push_tval(thr, tv_hnd);
/* [ ... errval errhandler ] */
- duk_insert(thr, -2); /* -> [ ... errhandler errval ] */
+ duk_insert(thr, -2); /* -> [ ... errhandler errval ] */
duk_push_undefined(thr);
- duk_insert(thr, -2); /* -> [ ... errhandler undefined(= this) errval ] */
+ duk_insert(thr, -2); /* -> [ ... errhandler undefined(= this) errval ] */
/* [ ... errhandler undefined errval ] */
@@ -46084,21 +49107,25 @@ DUK_LOCAL void duk__err_augment_user(duk_hthread *thr, duk_small_uint_t stridx_c
thr->heap->augmenting_error = 1;
rc = duk_pcall_method(thr, 1);
- DUK_UNREF(rc); /* no need to check now: both success and error are OK */
+ DUK_UNREF(rc); /* no need to check now: both success and error are OK */
DUK_ASSERT(thr->heap->augmenting_error == 1);
thr->heap->augmenting_error = 0;
/* [ ... errval ] */
}
-#endif /* DUK_USE_ERRTHROW || DUK_USE_ERRCREATE */
+#endif /* DUK_USE_ERRTHROW || DUK_USE_ERRCREATE */
/*
* Add ._Tracedata to an error on the stack top.
*/
#if defined(DUK_USE_TRACEBACKS)
-DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack, const char *c_filename, duk_int_t c_line, duk_small_uint_t flags) {
+DUK_LOCAL void duk__add_traceback(duk_hthread *thr,
+ duk_hthread *thr_callstack,
+ const char *c_filename,
+ duk_int_t c_line,
+ duk_small_uint_t flags) {
duk_activation *act;
duk_int_t depth;
duk_int_t arr_size;
@@ -46120,15 +49147,14 @@ DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack,
* See doc/error-objects.rst.
*/
- DUK_DDD(DUK_DDDPRINT("adding traceback to object: %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("adding traceback to object: %!T", (duk_tval *) duk_get_tval(thr, -1)));
/* Preallocate array to correct size, so that we can just write out
* the _Tracedata values into the array part.
*/
act = thr->callstack_curr;
depth = DUK_USE_TRACEBACK_DEPTH;
- DUK_ASSERT(thr_callstack->callstack_top <= DUK_INT_MAX); /* callstack limits */
+ DUK_ASSERT(thr_callstack->callstack_top <= DUK_INT_MAX); /* callstack limits */
if (depth > (duk_int_t) thr_callstack->callstack_top) {
depth = (duk_int_t) thr_callstack->callstack_top;
}
@@ -46170,7 +49196,7 @@ DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack,
DUK_HSTRING_INCREF(thr, s);
tv++;
- u32 = (duk_uint32_t) thr->compile_ctx->curr_token.start_line; /* (flags<<32) + (line), flags = 0 */
+ u32 = (duk_uint32_t) thr->compile_ctx->curr_token.start_line; /* (flags<<32) + (line), flags = 0 */
DUK_TVAL_SET_U32(tv, u32);
tv++;
}
@@ -46184,13 +49210,15 @@ DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack,
if (c_filename) {
DUK_ASSERT(DUK_TVAL_IS_STRING(thr->valstack_top - 2));
- s = DUK_TVAL_GET_STRING(thr->valstack_top - 2); /* interned c_filename */
+ s = DUK_TVAL_GET_STRING(thr->valstack_top - 2); /* interned c_filename */
DUK_ASSERT(s != NULL);
DUK_TVAL_SET_STRING(tv, s);
DUK_HSTRING_INCREF(thr, s);
tv++;
- d = ((flags & DUK_AUGMENT_FLAG_NOBLAME_FILELINE) ? ((duk_double_t) DUK_TB_FLAG_NOBLAME_FILELINE) * DUK_DOUBLE_2TO32 : 0.0) +
+ d = ((flags & DUK_AUGMENT_FLAG_NOBLAME_FILELINE) ?
+ ((duk_double_t) DUK_TB_FLAG_NOBLAME_FILELINE) * DUK_DOUBLE_2TO32 :
+ 0.0) +
(duk_double_t) c_line;
DUK_TVAL_SET_DOUBLE(tv, d);
tv++;
@@ -46205,11 +49233,11 @@ DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack,
/* [... arr] */
- DUK_ASSERT(act != NULL); /* depth check above, assumes book-keeping is correct */
- DUK_ASSERT_DISABLE(act->pc >= 0); /* unsigned */
+ DUK_ASSERT(act != NULL); /* depth check above, assumes book-keeping is correct */
+ DUK_ASSERT_DISABLE(act->pc >= 0); /* unsigned */
/* Add function object. */
- tv_src = &act->tv_func; /* object (function) or lightfunc */
+ tv_src = &act->tv_func; /* object (function) or lightfunc */
DUK_ASSERT(DUK_TVAL_IS_OBJECT(tv_src) || DUK_TVAL_IS_LIGHTFUNC(tv_src));
DUK_TVAL_SET_TVAL(tv, tv_src);
DUK_TVAL_INCREF(thr, tv);
@@ -46221,8 +49249,8 @@ DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack,
* PC == 0 for native code.
*/
pc = (duk_uint32_t) duk_hthread_get_act_prev_pc(thr_callstack, act);
- DUK_ASSERT_DISABLE(pc >= 0); /* unsigned */
- DUK_ASSERT((duk_double_t) pc < DUK_DOUBLE_2TO32); /* assume PC is at most 32 bits and non-negative */
+ DUK_ASSERT_DISABLE(pc >= 0); /* unsigned */
+ DUK_ASSERT((duk_double_t) pc < DUK_DOUBLE_2TO32); /* assume PC is at most 32 bits and non-negative */
d = ((duk_double_t) act->flags) * DUK_DOUBLE_2TO32 + (duk_double_t) pc;
DUK_TVAL_SET_DOUBLE(tv, d);
tv++;
@@ -46247,16 +49275,20 @@ DUK_LOCAL void duk__add_traceback(duk_hthread *thr, duk_hthread *thr_callstack,
/* [ ... error arr ] */
- duk_xdef_prop_stridx_short_wec(thr, -2, DUK_STRIDX_INT_TRACEDATA); /* -> [ ... error ] */
+ duk_xdef_prop_stridx_short_wec(thr, -2, DUK_STRIDX_INT_TRACEDATA); /* -> [ ... error ] */
}
-#endif /* DUK_USE_TRACEBACKS */
+#endif /* DUK_USE_TRACEBACKS */
/*
* Add .fileName and .lineNumber to an error on the stack top.
*/
#if defined(DUK_USE_AUGMENT_ERROR_CREATE) && !defined(DUK_USE_TRACEBACKS)
-DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, const char *c_filename, duk_int_t c_line, duk_small_uint_t flags) {
+DUK_LOCAL void duk__add_fileline(duk_hthread *thr,
+ duk_hthread *thr_callstack,
+ const char *c_filename,
+ duk_int_t c_line,
+ duk_small_uint_t flags) {
#if defined(DUK_USE_ASSERTIONS)
duk_int_t entry_top;
#endif
@@ -46294,7 +49326,7 @@ DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, c
duk_uint32_t ecma_line;
duk_activation *act;
- DUK_ASSERT(thr_callstack->callstack_top <= DUK_INT_MAX); /* callstack limits */
+ DUK_ASSERT(thr_callstack->callstack_top <= DUK_INT_MAX); /* callstack limits */
depth = DUK_USE_TRACEBACK_DEPTH;
if (depth > thr_callstack->callstack_top) {
depth = thr_callstack->callstack_top;
@@ -46313,10 +49345,12 @@ DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, c
/* PC points to next instruction, find offending PC,
* PC == 0 for native code.
*/
- pc = duk_hthread_get_act_prev_pc(thr, act); /* thr argument only used for thr->heap, so specific thread doesn't matter */
+ pc = duk_hthread_get_act_prev_pc(
+ thr,
+ act); /* thr argument only used for thr->heap, so specific thread doesn't matter */
DUK_UNREF(pc);
- DUK_ASSERT_DISABLE(pc >= 0); /* unsigned */
- DUK_ASSERT((duk_double_t) pc < DUK_DOUBLE_2TO32); /* assume PC is at most 32 bits and non-negative */
+ DUK_ASSERT_DISABLE(pc >= 0); /* unsigned */
+ DUK_ASSERT((duk_double_t) pc < DUK_DOUBLE_2TO32); /* assume PC is at most 32 bits and non-negative */
duk_push_hobject(thr, func);
@@ -46337,7 +49371,7 @@ DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, c
} else {
/* Native function, no relevant lineNumber. */
}
-#endif /* DUK_USE_PC2LINE */
+#endif /* DUK_USE_PC2LINE */
duk_push_u32(thr, ecma_line);
/* [ ... error func fileName lineNumber ] */
@@ -46356,7 +49390,7 @@ DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, c
duk_push_undefined(thr);
}
- define_props:
+define_props:
/* [ ... error lineNumber fileName ] */
#if defined(DUK_USE_ASSERTIONS)
DUK_ASSERT(duk_get_top(thr) == entry_top + 2);
@@ -46364,7 +49398,7 @@ DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, c
duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_FILE_NAME, DUK_PROPDESC_FLAGS_C | DUK_PROPDESC_FLAG_NO_OVERWRITE);
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_LINE_NUMBER, DUK_PROPDESC_FLAGS_C | DUK_PROPDESC_FLAG_NO_OVERWRITE);
}
-#endif /* DUK_USE_AUGMENT_ERROR_CREATE && !DUK_USE_TRACEBACKS */
+#endif /* DUK_USE_AUGMENT_ERROR_CREATE && !DUK_USE_TRACEBACKS */
/*
* Add line number to a compiler error.
@@ -46372,7 +49406,6 @@ DUK_LOCAL void duk__add_fileline(duk_hthread *thr, duk_hthread *thr_callstack, c
#if defined(DUK_USE_AUGMENT_ERROR_CREATE)
DUK_LOCAL void duk__add_compiler_error_line(duk_hthread *thr) {
-
/* Append a "(line NNN)" to the "message" property of any error
* thrown during compilation. Usually compilation errors are
* SyntaxErrors but they can also be out-of-memory errors and
@@ -46387,21 +49420,41 @@ DUK_LOCAL void duk__add_compiler_error_line(duk_hthread *thr) {
return;
}
- DUK_DDD(DUK_DDDPRINT("compile error, before adding line info: %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("compile error, before adding line info: %!T", (duk_tval *) duk_get_tval(thr, -1)));
if (duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_MESSAGE)) {
- duk_push_sprintf(thr, " (line %ld)", (long) thr->compile_ctx->curr_token.start_line);
+ duk_bool_t at_end;
+
+ /* Best guesstimate that error occurred at end of input, token
+ * truncated by end of input, etc.
+ */
+#if 0
+ at_end = (thr->compile_ctx->curr_token.start_offset + 1 >= thr->compile_ctx->lex.input_length);
+ at_end = (thr->compile_ctx->lex.window[0].codepoint < 0 || thr->compile_ctx->lex.window[1].codepoint < 0);
+#endif
+ at_end = (thr->compile_ctx->lex.window[0].codepoint < 0);
+
+ DUK_D(DUK_DPRINT("syntax error, determined at_end=%ld; curr_token.start_offset=%ld, "
+ "lex.input_length=%ld, window[0].codepoint=%ld, window[1].codepoint=%ld",
+ (long) at_end,
+ (long) thr->compile_ctx->curr_token.start_offset,
+ (long) thr->compile_ctx->lex.input_length,
+ (long) thr->compile_ctx->lex.window[0].codepoint,
+ (long) thr->compile_ctx->lex.window[1].codepoint));
+
+ duk_push_sprintf(thr,
+ " (line %ld%s)",
+ (long) thr->compile_ctx->curr_token.start_line,
+ at_end ? ", end of input" : "");
duk_concat(thr, 2);
duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_MESSAGE);
} else {
duk_pop(thr);
}
- DUK_DDD(DUK_DDDPRINT("compile error, after adding line info: %!T",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("compile error, after adding line info: %!T", (duk_tval *) duk_get_tval(thr, -1)));
}
-#endif /* DUK_USE_AUGMENT_ERROR_CREATE */
+#endif /* DUK_USE_AUGMENT_ERROR_CREATE */
/*
* Augment an error being created using Duktape specific properties
@@ -46409,7 +49462,12 @@ DUK_LOCAL void duk__add_compiler_error_line(duk_hthread *thr) {
*/
#if defined(DUK_USE_AUGMENT_ERROR_CREATE)
-DUK_LOCAL void duk__err_augment_builtin_create(duk_hthread *thr, duk_hthread *thr_callstack, const char *c_filename, duk_int_t c_line, duk_hobject *obj, duk_small_uint_t flags) {
+DUK_LOCAL void duk__err_augment_builtin_create(duk_hthread *thr,
+ duk_hthread *thr_callstack,
+ const char *c_filename,
+ duk_int_t c_line,
+ duk_hobject *obj,
+ duk_small_uint_t flags) {
#if defined(DUK_USE_ASSERTIONS)
duk_int_t entry_top;
#endif
@@ -46419,7 +49477,7 @@ DUK_LOCAL void duk__err_augment_builtin_create(duk_hthread *thr, duk_hthread *th
#endif
DUK_ASSERT(obj != NULL);
- DUK_UNREF(obj); /* unreferenced w/o tracebacks */
+ DUK_UNREF(obj); /* unreferenced w/o tracebacks */
duk__add_compiler_error_line(thr);
@@ -46444,7 +49502,7 @@ DUK_LOCAL void duk__err_augment_builtin_create(duk_hthread *thr, duk_hthread *th
DUK_ASSERT(duk_get_top(thr) == entry_top);
#endif
}
-#endif /* DUK_USE_AUGMENT_ERROR_CREATE */
+#endif /* DUK_USE_AUGMENT_ERROR_CREATE */
/*
* Augment an error at creation time with _Tracedata/fileName/lineNumber
@@ -46462,7 +49520,11 @@ DUK_LOCAL void duk__err_augment_builtin_create(duk_hthread *thr, duk_hthread *th
*/
#if defined(DUK_USE_AUGMENT_ERROR_CREATE)
-DUK_INTERNAL void duk_err_augment_error_create(duk_hthread *thr, duk_hthread *thr_callstack, const char *c_filename, duk_int_t c_line, duk_small_uint_t flags) {
+DUK_INTERNAL void duk_err_augment_error_create(duk_hthread *thr,
+ duk_hthread *thr_callstack,
+ const char *c_filename,
+ duk_int_t c_line,
+ duk_small_uint_t flags) {
duk_hobject *obj;
DUK_ASSERT(thr != NULL);
@@ -46508,7 +49570,7 @@ DUK_INTERNAL void duk_err_augment_error_create(duk_hthread *thr, duk_hthread *th
duk__err_augment_user(thr, DUK_STRIDX_ERR_CREATE);
#endif
}
-#endif /* DUK_USE_AUGMENT_ERROR_CREATE */
+#endif /* DUK_USE_AUGMENT_ERROR_CREATE */
/*
* Augment an error at throw time; allow a user error handler (if defined)
@@ -46520,9 +49582,9 @@ DUK_INTERNAL void duk_err_augment_error_create(duk_hthread *thr, duk_hthread *th
DUK_INTERNAL void duk_err_augment_error_throw(duk_hthread *thr) {
#if defined(DUK_USE_ERRTHROW)
duk__err_augment_user(thr, DUK_STRIDX_ERR_THROW);
-#endif /* DUK_USE_ERRTHROW */
+#endif /* DUK_USE_ERRTHROW */
}
-#endif /* DUK_USE_AUGMENT_ERROR_THROW */
+#endif /* DUK_USE_AUGMENT_ERROR_THROW */
/*
* Do a longjmp call, calling the fatal error handler if no
* catchpoint exists.
@@ -46572,8 +49634,10 @@ DUK_INTERNAL void duk_err_longjmp(duk_hthread *thr) {
DUK_ASSERT(thr->heap != NULL);
DUK_DD(DUK_DDPRINT("longjmp error: type=%d iserror=%d value1=%!T value2=%!T",
- (int) thr->heap->lj.type, (int) thr->heap->lj.iserror,
- &thr->heap->lj.value1, &thr->heap->lj.value2));
+ (int) thr->heap->lj.type,
+ (int) thr->heap->lj.iserror,
+ &thr->heap->lj.value1,
+ &thr->heap->lj.value2));
/* Prevent finalizer execution during error handling. All error
* handling sites will process pending finalizers once error handling
@@ -46591,11 +49655,11 @@ DUK_INTERNAL void duk_err_longjmp(duk_hthread *thr) {
DUK_ASSERT_LJSTATE_SET(thr->heap);
thr->heap->pf_prevent_count++;
- DUK_ASSERT(thr->heap->pf_prevent_count != 0); /* Wrap. */
+ DUK_ASSERT(thr->heap->pf_prevent_count != 0); /* Wrap. */
#if defined(DUK_USE_ASSERTIONS)
/* XXX: set this immediately when longjmp state is set */
- DUK_ASSERT(thr->heap->error_not_allowed == 0); /* Detect error within critical section. */
+ DUK_ASSERT(thr->heap->error_not_allowed == 0); /* Detect error within critical section. */
thr->heap->error_not_allowed = 1;
#endif
@@ -46607,8 +49671,10 @@ DUK_INTERNAL void duk_err_longjmp(duk_hthread *thr) {
*/
if (!thr->heap->lj.jmpbuf_ptr) {
DUK_D(DUK_DPRINT("uncaught error: type=%d iserror=%d value1=%!T value2=%!T",
- (int) thr->heap->lj.type, (int) thr->heap->lj.iserror,
- &thr->heap->lj.value1, &thr->heap->lj.value2));
+ (int) thr->heap->lj.type,
+ (int) thr->heap->lj.iserror,
+ &thr->heap->lj.value1,
+ &thr->heap->lj.value2));
#if defined(DUK_USE_PREFER_SIZE)
duk__uncaught_minimal(thr);
@@ -46619,7 +49685,7 @@ DUK_INTERNAL void duk_err_longjmp(duk_hthread *thr) {
}
#if defined(DUK_USE_CPP_EXCEPTIONS)
- throw duk_internal_exception(); /* dummy */
+ throw duk_internal_exception(); /* dummy */
#else
DUK_LONGJMP(thr->heap->lj.jmpbuf_ptr->jb);
#endif
@@ -46654,14 +49720,14 @@ DUK_LOCAL duk_bool_t duk__have_active_catcher(duk_hthread *thr) {
for (act = thr->callstack_curr; act != NULL; act = act->parent) {
for (cat = act->cat; cat != NULL; cat = cat->parent) {
if (DUK_CAT_HAS_CATCH_ENABLED(cat)) {
- return 1; /* all we need to know */
+ return 1; /* all we need to know */
}
}
}
}
return 0;
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
/*
* Get prototype object for an integer error code.
@@ -46711,11 +49777,10 @@ DUK_INTERNAL void duk_err_check_debugger_integration(duk_hthread *thr) {
* config options.
*/
- if (!duk_debug_is_attached(thr->heap) ||
- thr->heap->dbg_processing ||
- thr->heap->lj.type != DUK_LJ_TYPE_THROW ||
+ if (!duk_debug_is_attached(thr->heap) || thr->heap->dbg_processing || thr->heap->lj.type != DUK_LJ_TYPE_THROW ||
thr->heap->creating_error) {
- DUK_D(DUK_DPRINT("skip debugger error integration; not attached, debugger processing, not THROW, or error thrown while creating error"));
+ DUK_D(DUK_DPRINT("skip debugger error integration; not attached, debugger processing, not THROW, or error thrown "
+ "while creating error"));
return;
}
@@ -46743,7 +49808,7 @@ DUK_INTERNAL void duk_err_check_debugger_integration(duk_hthread *thr) {
/* Store and reset longjmp state. */
DUK_ASSERT_LJSTATE_SET(thr->heap);
DUK_TVAL_DECREF_NORZ(thr, tv_obj);
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(&thr->heap->lj.value2)); /* Always for THROW type. */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(&thr->heap->lj.value2)); /* Always for THROW type. */
DUK_TVAL_SET_UNDEFINED(tv_obj);
thr->heap->lj.type = DUK_LJ_TYPE_UNKNOWN;
DUK_ASSERT_LJSTATE_UNSET(thr->heap);
@@ -46778,7 +49843,7 @@ DUK_INTERNAL void duk_err_check_debugger_integration(duk_hthread *thr) {
duk_pop(thr);
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
/*
* Helpers for setting up heap longjmp state.
@@ -46823,14 +49888,20 @@ DUK_INTERNAL void duk_err_setup_ljstate1(duk_hthread *thr, duk_small_uint_t lj_t
*/
#if defined(DUK_USE_VERBOSE_ERRORS)
-DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code, const char *msg, const char *filename, duk_int_t line) {
+DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr,
+ duk_errcode_t code,
+ const char *msg,
+ const char *filename,
+ duk_int_t line) {
#else
DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code) {
#endif
#if defined(DUK_USE_VERBOSE_ERRORS)
DUK_DD(DUK_DDPRINT("duk_err_create_and_throw(): code=%ld, msg=%s, filename=%s, line=%ld",
- (long) code, (const char *) msg,
- (const char *) filename, (long) line));
+ (long) code,
+ (const char *) msg,
+ (const char *) filename,
+ (long) line));
#else
DUK_DD(DUK_DDPRINT("duk_err_create_and_throw(): code=%ld", (long) code));
#endif
@@ -46890,18 +49961,9 @@ DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code)
* use 'msg' as a format string directly.
*/
#if defined(DUK_USE_VERBOSE_ERRORS)
- duk_push_error_object_raw(thr,
- code | DUK_ERRCODE_FLAG_NOBLAME_FILELINE,
- filename,
- line,
- "%s",
- (const char *) msg);
+ duk_push_error_object_raw(thr, code | DUK_ERRCODE_FLAG_NOBLAME_FILELINE, filename, line, "%s", (const char *) msg);
#else
- duk_push_error_object_raw(thr,
- code | DUK_ERRCODE_FLAG_NOBLAME_FILELINE,
- NULL,
- 0,
- NULL);
+ duk_push_error_object_raw(thr, code | DUK_ERRCODE_FLAG_NOBLAME_FILELINE, NULL, 0, NULL);
#endif
/* Note that an alloc error may happen during error augmentation.
@@ -46911,8 +49973,7 @@ DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code)
* avoiding it for alloc errors (this differs from Duktape 1.x).
*/
#if defined(DUK_USE_AUGMENT_ERROR_THROW)
- DUK_DDD(DUK_DDDPRINT("THROW ERROR (INTERNAL): %!iT (before throw augment)",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("THROW ERROR (INTERNAL): %!iT (before throw augment)", (duk_tval *) duk_get_tval(thr, -1)));
duk_err_augment_error_throw(thr);
#endif
@@ -46935,7 +49996,8 @@ DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code)
*/
DUK_DDD(DUK_DDDPRINT("THROW ERROR (INTERNAL): %!iT, %!iT (after throw augment)",
- (duk_tval *) &thr->heap->lj.value1, (duk_tval *) &thr->heap->lj.value2));
+ (duk_tval *) &thr->heap->lj.value1,
+ (duk_tval *) &thr->heap->lj.value2));
duk_err_longjmp(thr);
DUK_UNREACHABLE();
@@ -46989,7 +50051,7 @@ DUK_INTERNAL duk_hbuffer *duk_hbuffer_alloc(duk_heap *heap, duk_size_t size, duk
*/
if (size > DUK_HBUFFER_MAX_BYTELEN) {
DUK_D(DUK_DPRINT("hbuffer alloc failed: size too large: %ld", (long) size));
- return NULL; /* no need to write 'out_bufdata' */
+ return NULL; /* no need to write 'out_bufdata' */
}
if (flags & DUK_BUF_FLAG_EXTERNAL) {
@@ -47001,7 +50063,7 @@ DUK_INTERNAL duk_hbuffer *duk_hbuffer_alloc(duk_heap *heap, duk_size_t size, duk
} else {
header_size = sizeof(duk_hbuffer_fixed);
alloc_size = sizeof(duk_hbuffer_fixed) + size;
- DUK_ASSERT(alloc_size >= sizeof(duk_hbuffer_fixed)); /* no wrapping */
+ DUK_ASSERT(alloc_size >= sizeof(duk_hbuffer_fixed)); /* no wrapping */
}
res = (duk_hbuffer *) DUK_ALLOC(heap, alloc_size);
@@ -47011,8 +50073,7 @@ DUK_INTERNAL duk_hbuffer *duk_hbuffer_alloc(duk_heap *heap, duk_size_t size, duk
/* zero everything unless requested not to do so */
#if defined(DUK_USE_ZERO_BUFFER_DATA)
- duk_memzero((void *) res,
- (flags & DUK_BUF_FLAG_NOZERO) ? header_size : alloc_size);
+ duk_memzero((void *) res, (flags & DUK_BUF_FLAG_NOZERO) ? header_size : alloc_size);
#else
duk_memzero((void *) res, header_size);
#endif
@@ -47035,7 +50096,7 @@ DUK_INTERNAL duk_hbuffer *duk_hbuffer_alloc(duk_heap *heap, duk_size_t size, duk
void *ptr;
if (size > 0) {
- DUK_ASSERT(!(flags & DUK_BUF_FLAG_EXTERNAL)); /* alloc external with size zero */
+ DUK_ASSERT(!(flags & DUK_BUF_FLAG_EXTERNAL)); /* alloc external with size zero */
DUK_DDD(DUK_DDDPRINT("dynamic buffer with nonzero size, alloc actual buffer"));
#if defined(DUK_USE_ZERO_BUFFER_DATA)
ptr = DUK_ALLOC_ZEROED(heap, size);
@@ -47075,16 +50136,16 @@ DUK_INTERNAL duk_hbuffer *duk_hbuffer_alloc(duk_heap *heap, duk_size_t size, duk
} else {
DUK_ASSERT(!(flags & DUK_BUF_FLAG_EXTERNAL));
}
- DUK_HEAP_INSERT_INTO_HEAP_ALLOCATED(heap, &res->hdr);
+ DUK_HEAP_INSERT_INTO_HEAP_ALLOCATED(heap, &res->hdr);
DUK_DDD(DUK_DDDPRINT("allocated hbuffer: %p", (void *) res));
return res;
- alloc_error:
+alloc_error:
DUK_DD(DUK_DDPRINT("hbuffer allocation failed"));
DUK_FREE(heap, res);
- return NULL; /* no need to write 'out_bufdata' */
+ return NULL; /* no need to write 'out_bufdata' */
}
/* For indirect allocs. */
@@ -47106,7 +50167,7 @@ DUK_INTERNAL void duk_hbuffer_assert_valid(duk_hbuffer *h) {
DUK_ASSERT(h != NULL);
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/*
* duk_hbuffer operations such as resizing and inserting/appending data to
* a dynamic buffer.
@@ -47162,8 +50223,7 @@ DUK_INTERNAL void duk_hbuffer_resize(duk_hthread *thr, duk_hbuffer_dynamic *buf,
if (new_size > prev_size) {
DUK_ASSERT(new_size - prev_size > 0);
#if defined(DUK_USE_ZERO_BUFFER_DATA)
- duk_memzero((void *) ((char *) res + prev_size),
- (duk_size_t) (new_size - prev_size));
+ duk_memzero((void *) ((char *) res + prev_size), (duk_size_t) (new_size - prev_size));
#endif
}
@@ -47204,7 +50264,7 @@ DUK_INTERNAL duk_uint_t duk_hbufobj_clamp_bytelength(duk_hbufobj *h_bufobj, duk_
return buf_avail >= len ? len : buf_avail;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* duk_heap allocation and freeing.
*/
@@ -47213,7 +50273,7 @@ DUK_INTERNAL duk_uint_t duk_hbufobj_clamp_bytelength(duk_hbufobj *h_bufobj, duk_
#if defined(DUK_USE_ROM_STRINGS)
/* Fixed seed value used with ROM strings. */
-#define DUK__FIXED_HASH_SEED 0xabcd1234
+#define DUK__FIXED_HASH_SEED 0xabcd1234
#endif
/*
@@ -47302,8 +50362,8 @@ DUK_INTERNAL void duk_free_hstring(duk_heap *heap, duk_hstring *h) {
#if defined(DUK_USE_HSTRING_EXTDATA) && defined(DUK_USE_EXTSTR_FREE)
if (DUK_HSTRING_HAS_EXTDATA(h)) {
- DUK_DDD(DUK_DDDPRINT("free extstr: hstring %!O, extdata: %p",
- h, DUK_HSTRING_GET_EXTDATA((duk_hstring_external *) h)));
+ DUK_DDD(
+ DUK_DDDPRINT("free extstr: hstring %!O, extdata: %p", h, DUK_HSTRING_GET_EXTDATA((duk_hstring_external *) h)));
DUK_USE_EXTSTR_FREE(heap->heap_udata, (const void *) DUK_HSTRING_GET_EXTDATA((duk_hstring_external *) h));
}
#endif
@@ -47327,7 +50387,6 @@ DUK_INTERNAL void duk_heap_free_heaphdr_raw(duk_heap *heap, duk_heaphdr *hdr) {
DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(hdr) == DUK_HTYPE_BUFFER);
duk_free_hbuffer(heap, (duk_hbuffer *) hdr);
}
-
}
/*
@@ -47357,10 +50416,10 @@ DUK_LOCAL duk_size_t duk__heap_free_activation_freelist(duk_heap *heap) {
count_act++;
#endif
}
- heap->activation_free = NULL; /* needed when called from mark-and-sweep */
+ heap->activation_free = NULL; /* needed when called from mark-and-sweep */
return count_act;
}
-#endif /* DUK_USE_CACHE_ACTIVATION */
+#endif /* DUK_USE_CACHE_ACTIVATION */
#if defined(DUK_USE_CACHE_CATCHER)
DUK_LOCAL duk_size_t duk__heap_free_catcher_freelist(duk_heap *heap) {
@@ -47376,11 +50435,11 @@ DUK_LOCAL duk_size_t duk__heap_free_catcher_freelist(duk_heap *heap) {
count_cat++;
#endif
}
- heap->catcher_free = NULL; /* needed when called from mark-and-sweep */
+ heap->catcher_free = NULL; /* needed when called from mark-and-sweep */
return count_cat;
}
-#endif /* DUK_USE_CACHE_CATCHER */
+#endif /* DUK_USE_CACHE_CATCHER */
DUK_INTERNAL void duk_heap_free_freelists(duk_heap *heap) {
duk_size_t count_act = 0;
@@ -47396,8 +50455,8 @@ DUK_INTERNAL void duk_heap_free_freelists(duk_heap *heap) {
DUK_UNREF(count_act);
DUK_UNREF(count_cat);
- DUK_D(DUK_DPRINT("freed %ld activation freelist entries, %ld catcher freelist entries",
- (long) count_act, (long) count_cat));
+ DUK_D(
+ DUK_DPRINT("freed %ld activation freelist entries, %ld catcher freelist entries", (long) count_act, (long) count_cat));
}
DUK_LOCAL void duk__free_allocated(duk_heap *heap) {
@@ -47410,8 +50469,7 @@ DUK_LOCAL void duk__free_allocated(duk_heap *heap) {
* because they may happen with finalizer processing.
*/
- DUK_DDD(DUK_DDDPRINT("FINALFREE (allocated): %!iO",
- (duk_heaphdr *) curr));
+ DUK_DDD(DUK_DDDPRINT("FINALFREE (allocated): %!iO", (duk_heaphdr *) curr));
next = DUK_HEAPHDR_GET_NEXT(heap, curr);
duk_heap_free_heaphdr_raw(heap, curr);
curr = next;
@@ -47425,14 +50483,13 @@ DUK_LOCAL void duk__free_finalize_list(duk_heap *heap) {
curr = heap->finalize_list;
while (curr) {
- DUK_DDD(DUK_DDDPRINT("FINALFREE (finalize_list): %!iO",
- (duk_heaphdr *) curr));
+ DUK_DDD(DUK_DDDPRINT("FINALFREE (finalize_list): %!iO", (duk_heaphdr *) curr));
next = DUK_HEAPHDR_GET_NEXT(heap, curr);
duk_heap_free_heaphdr_raw(heap, curr);
curr = next;
}
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
DUK_LOCAL void duk__free_stringtable(duk_heap *heap) {
/* strings are only tracked by stringtable */
@@ -47450,9 +50507,9 @@ DUK_LOCAL void duk__free_run_finalizers(duk_heap *heap) {
DUK_ASSERT(heap != NULL);
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* refzero not running -> must be empty */
+ DUK_ASSERT(heap->refzero_list == NULL); /* refzero not running -> must be empty */
#endif
- DUK_ASSERT(heap->finalize_list == NULL); /* mark-and-sweep last pass */
+ DUK_ASSERT(heap->finalize_list == NULL); /* mark-and-sweep last pass */
if (heap->heap_thread == NULL) {
/* May happen when heap allocation fails right off. There
@@ -47475,11 +50532,11 @@ DUK_LOCAL void duk__free_run_finalizers(duk_heap *heap) {
DUK_ASSERT(heap->ms_running == 0);
DUK_ASSERT(heap->ms_prevent_count == 0);
heap->pf_prevent_count = 1;
- heap->ms_running = 2; /* Use distinguishable value. */
- heap->ms_prevent_count = 1; /* Bump, because mark-and-sweep assumes it's bumped when ms_running is set. */
+ heap->ms_running = 2; /* Use distinguishable value. */
+ heap->ms_prevent_count = 1; /* Bump, because mark-and-sweep assumes it's bumped when ms_running is set. */
- curr_limit = 0; /* suppress warning, not used */
- for (round_no = 0; ; round_no++) {
+ curr_limit = 0; /* suppress warning, not used */
+ for (round_no = 0;; round_no++) {
curr = heap->heap_allocated;
count_all = 0;
count_finalized = 0;
@@ -47494,7 +50551,8 @@ DUK_LOCAL void duk__free_run_finalizers(duk_heap *heap) {
if (DUK_HOBJECT_HAS_FINALIZER_FAST(heap, (duk_hobject *) curr)) {
if (!DUK_HEAPHDR_HAS_FINALIZED((duk_heaphdr *) curr)) {
- DUK_ASSERT(DUK_HEAP_HAS_FINALIZER_NORESCUE(heap)); /* maps to finalizer 2nd argument */
+ DUK_ASSERT(
+ DUK_HEAP_HAS_FINALIZER_NORESCUE(heap)); /* maps to finalizer 2nd argument */
duk_heap_run_finalizer(heap, (duk_hobject *) curr);
count_finalized++;
}
@@ -47521,10 +50579,13 @@ DUK_LOCAL void duk__free_run_finalizers(duk_heap *heap) {
*/
curr_limit = count_all * 2;
} else {
- curr_limit = (curr_limit * 3) / 4; /* Decrease by 25% every round */
+ curr_limit = (curr_limit * 3) / 4; /* Decrease by 25% every round */
}
DUK_D(DUK_DPRINT("finalizer round %ld complete, %ld objects, tried to execute %ld finalizers, current limit is %ld",
- (long) round_no, (long) count_all, (long) count_finalized, (long) curr_limit));
+ (long) round_no,
+ (long) count_all,
+ (long) count_finalized,
+ (long) curr_limit));
if (count_finalized == 0) {
DUK_D(DUK_DPRINT("no more finalizable objects, forced finalization finished"));
@@ -47541,7 +50602,7 @@ DUK_LOCAL void duk__free_run_finalizers(duk_heap *heap) {
heap->ms_running = 0;
heap->pf_prevent_count = 0;
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
DUK_INTERNAL void duk_heap_free(duk_heap *heap) {
DUK_D(DUK_DPRINT("free heap: %p", (void *) heap));
@@ -47584,7 +50645,7 @@ DUK_INTERNAL void duk_heap_free(duk_heap *heap) {
duk_heap_mark_and_sweep(heap, 0);
DUK_D(DUK_DPRINT("forced gc #3 in heap destruction (don't run finalizers)"));
heap->pf_skip_finalizers = 1;
- duk_heap_mark_and_sweep(heap, 0); /* Skip finalizers; queue finalizable objects to heap_allocated. */
+ duk_heap_mark_and_sweep(heap, 0); /* Skip finalizers; queue finalizable objects to heap_allocated. */
/* There are never objects in refzero_list at this point, or at any
* point beyond a DECREF (even a DECREF_NORZ). Since Duktape 2.1
@@ -47593,17 +50654,17 @@ DUK_INTERNAL void duk_heap_free(duk_heap *heap) {
* refcount.
*/
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* Always processed to completion inline. */
+ DUK_ASSERT(heap->refzero_list == NULL); /* Always processed to completion inline. */
#endif
#if defined(DUK_USE_FINALIZER_SUPPORT)
- DUK_ASSERT(heap->finalize_list == NULL); /* Last mark-and-sweep with skip_finalizers. */
+ DUK_ASSERT(heap->finalize_list == NULL); /* Last mark-and-sweep with skip_finalizers. */
#endif
#if defined(DUK_USE_FINALIZER_SUPPORT)
DUK_D(DUK_DPRINT("run finalizers for remaining finalizable objects"));
- DUK_HEAP_SET_FINALIZER_NORESCUE(heap); /* Rescue no longer supported. */
+ DUK_HEAP_SET_FINALIZER_NORESCUE(heap); /* Rescue no longer supported. */
duk__free_run_finalizers(heap);
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/* Note: heap->heap_thread, heap->curr_thread, and heap->heap_object
* are on the heap allocated list.
@@ -47616,7 +50677,7 @@ DUK_INTERNAL void duk_heap_free(duk_heap *heap) {
duk__free_allocated(heap);
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* Always processed to completion inline. */
+ DUK_ASSERT(heap->refzero_list == NULL); /* Always processed to completion inline. */
#endif
#if defined(DUK_USE_FINALIZER_SUPPORT)
@@ -47659,7 +50720,9 @@ DUK_LOCAL duk_bool_t duk__init_heap_strings(duk_heap *heap) {
while (h != NULL) {
hash = duk_heap_hashstring(heap, (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h), DUK_HSTRING_GET_BYTELEN(h));
DUK_DD(DUK_DDPRINT("duk_rom_strings_lookup[%d] -> hash 0x%08lx, computed 0x%08lx",
- (int) i, (unsigned long) DUK_HSTRING_GET_HASH(h), (unsigned long) hash));
+ (int) i,
+ (unsigned long) DUK_HSTRING_GET_HASH(h),
+ (unsigned long) hash));
DUK_ASSERT(hash == (duk_uint32_t) DUK_HSTRING_GET_HASH(h));
h = (const duk_hstring *) h->hdr.h_next;
@@ -47668,11 +50731,11 @@ DUK_LOCAL duk_bool_t duk__init_heap_strings(duk_heap *heap) {
#endif
return 1;
}
-#else /* DUK_USE_ROM_STRINGS */
+#else /* DUK_USE_ROM_STRINGS */
DUK_LOCAL duk_bool_t duk__init_heap_strings(duk_heap *heap) {
duk_bitdecoder_ctx bd_ctx;
- duk_bitdecoder_ctx *bd = &bd_ctx; /* convenience */
+ duk_bitdecoder_ctx *bd = &bd_ctx; /* convenience */
duk_small_uint_t i;
duk_memzero(&bd_ctx, sizeof(bd_ctx));
@@ -47728,18 +50791,16 @@ DUK_LOCAL duk_bool_t duk__init_heap_strings(duk_heap *heap) {
return 1;
- failed:
+failed:
return 0;
}
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
DUK_LOCAL duk_bool_t duk__init_heap_thread(duk_heap *heap) {
duk_hthread *thr;
DUK_D(DUK_DPRINT("heap init: alloc heap thread"));
- thr = duk_hthread_alloc_unchecked(heap,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_THREAD));
+ thr = duk_hthread_alloc_unchecked(heap, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_THREAD));
if (thr == NULL) {
DUK_D(DUK_DPRINT("failed to alloc heap_thread"));
return 0;
@@ -47747,16 +50808,16 @@ DUK_LOCAL duk_bool_t duk__init_heap_thread(duk_heap *heap) {
thr->state = DUK_HTHREAD_STATE_INACTIVE;
#if defined(DUK_USE_ROM_STRINGS)
/* No strs[] pointer. */
-#else /* DUK_USE_ROM_STRINGS */
+#else /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_HEAPPTR16)
thr->strs16 = heap->strs16;
#else
thr->strs = heap->strs;
#endif
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
heap->heap_thread = thr;
- DUK_HTHREAD_INCREF(thr, thr); /* Note: first argument not really used */
+ DUK_HTHREAD_INCREF(thr, thr); /* Note: first argument not really used */
/* 'thr' is now reachable */
@@ -47775,7 +50836,8 @@ DUK_LOCAL duk_bool_t duk__init_heap_thread(duk_heap *heap) {
}
#if defined(DUK_USE_DEBUG)
-#define DUK__DUMPSZ(t) do { \
+#define DUK__DUMPSZ(t) \
+ do { \
DUK_D(DUK_DPRINT("" #t "=%ld", (long) sizeof(t))); \
} while (0)
@@ -47784,20 +50846,20 @@ DUK_LOCAL duk_bool_t duk__init_heap_thread(duk_heap *heap) {
* enough; the limits will then not be printed accurately but the magnitude
* will be correct.
*/
-#define DUK__DUMPLM_SIGNED_RAW(t,a,b) do { \
- DUK_D(DUK_DPRINT(t "=[%ld,%ld]=[%lf,%lf]", \
- (long) (a), (long) (b), \
- (double) (a), (double) (b))); \
+#define DUK__DUMPLM_SIGNED_RAW(t, a, b) \
+ do { \
+ DUK_D(DUK_DPRINT(t "=[%ld,%ld]=[%lf,%lf]", (long) (a), (long) (b), (double) (a), (double) (b))); \
} while (0)
-#define DUK__DUMPLM_UNSIGNED_RAW(t,a,b) do { \
- DUK_D(DUK_DPRINT(t "=[%lu,%lu]=[%lf,%lf]", \
- (unsigned long) (a), (unsigned long) (b), \
- (double) (a), (double) (b))); \
+#define DUK__DUMPLM_UNSIGNED_RAW(t, a, b) \
+ do { \
+ DUK_D(DUK_DPRINT(t "=[%lu,%lu]=[%lf,%lf]", (unsigned long) (a), (unsigned long) (b), (double) (a), (double) (b))); \
} while (0)
-#define DUK__DUMPLM_SIGNED(t) do { \
+#define DUK__DUMPLM_SIGNED(t) \
+ do { \
DUK__DUMPLM_SIGNED_RAW("DUK_" #t "_{MIN,MAX}", DUK_##t##_MIN, DUK_##t##_MAX); \
} while (0)
-#define DUK__DUMPLM_UNSIGNED(t) do { \
+#define DUK__DUMPLM_UNSIGNED(t) \
+ do { \
DUK__DUMPLM_UNSIGNED_RAW("DUK_" #t "_{MIN,MAX}", DUK_##t##_MIN, DUK_##t##_MAX); \
} while (0)
@@ -47870,7 +50932,7 @@ DUK_LOCAL void duk__dump_type_sizes(void) {
DUK__DUMPSZ(duk_tval);
/* structs from duk_forwdecl.h */
- DUK__DUMPSZ(duk_jmpbuf); /* just one 'int' for C++ exceptions */
+ DUK__DUMPSZ(duk_jmpbuf); /* just one 'int' for C++ exceptions */
DUK__DUMPSZ(duk_heaphdr);
DUK__DUMPSZ(duk_heaphdr_string);
DUK__DUMPSZ(duk_hstring);
@@ -47994,7 +51056,7 @@ DUK_LOCAL void duk__dump_misc_options(void) {
DUK_D(DUK_DPRINT("IEEE double endianness: ???"));
#endif
}
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
DUK_INTERNAL
duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
@@ -48015,7 +51077,7 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
DUK_ASSERT((DUK_HTYPE_STRING & 0x01U) == 0);
DUK_ASSERT((DUK_HTYPE_BUFFER & 0x01U) == 0);
- DUK_ASSERT((DUK_HTYPE_OBJECT & 0x01U) == 1); /* DUK_HEAPHDR_IS_OBJECT() relies ont his. */
+ DUK_ASSERT((DUK_HTYPE_OBJECT & 0x01U) == 1); /* DUK_HEAPHDR_IS_OBJECT() relies ont his. */
/*
* Debug dump type sizes
@@ -48056,7 +51118,7 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
#endif
fatal_func(heap_udata, "sizeof(duk_tval) not 8 or 16, cannot use DUK_USE_EXEC_REGCONST_OPTIMIZE option");
}
-#endif /* DUK_USE_EXEC_REGCONST_OPTIMIZE */
+#endif /* DUK_USE_EXEC_REGCONST_OPTIMIZE */
/*
* Computed values (e.g. INFINITY)
@@ -48140,18 +51202,18 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
#endif
#if defined(DUK_USE_ROM_STRINGS)
/* no res->strs[] */
-#else /* DUK_USE_ROM_STRINGS */
+#else /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_HEAPPTR16)
/* res->strs16[] is zeroed and zero decodes to NULL, so no NULL inits. */
#else
{
duk_small_uint_t i;
- for (i = 0; i < DUK_HEAP_NUM_STRINGS; i++) {
+ for (i = 0; i < DUK_HEAP_NUM_STRINGS; i++) {
res->strs[i] = NULL;
- }
+ }
}
#endif
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
res->dbg_read_cb = NULL;
res->dbg_write_cb = NULL;
@@ -48162,7 +51224,7 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
res->dbg_udata = NULL;
res->dbg_pause_act = NULL;
#endif
-#endif /* DUK_USE_EXPLICIT_NULL_INIT */
+#endif /* DUK_USE_EXPLICIT_NULL_INIT */
res->alloc_func = alloc_func;
res->realloc_func = realloc_func;
@@ -48201,17 +51263,17 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
/* XXX: make a common DUK_USE_ option, and allow custom fixed seed? */
DUK_D(DUK_DPRINT("using rom strings, force heap hash_seed to fixed value 0x%08lx", (long) DUK__FIXED_HASH_SEED));
res->hash_seed = (duk_uint32_t) DUK__FIXED_HASH_SEED;
-#else /* DUK_USE_ROM_STRINGS */
+#else /* DUK_USE_ROM_STRINGS */
res->hash_seed = (duk_uint32_t) (duk_uintptr_t) res;
#if !defined(DUK_USE_STRHASH_DENSE)
- res->hash_seed ^= 5381; /* Bernstein hash init value is normally 5381; XOR it in in case pointer low bits are 0 */
+ res->hash_seed ^= 5381; /* Bernstein hash init value is normally 5381; XOR it in in case pointer low bits are 0 */
#endif
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
#if defined(DUK_USE_EXPLICIT_NULL_INIT)
res->lj.jmpbuf_ptr = NULL;
#endif
- DUK_ASSERT(res->lj.type == DUK_LJ_TYPE_UNKNOWN); /* zero */
+ DUK_ASSERT(res->lj.type == DUK_LJ_TYPE_UNKNOWN); /* zero */
DUK_ASSERT(res->lj.iserror == 0);
DUK_TVAL_SET_UNDEFINED(&res->lj.value1);
DUK_TVAL_SET_UNDEFINED(&res->lj.value2);
@@ -48247,14 +51309,14 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
#if defined(DUK_USE_EXPLICIT_NULL_INIT)
{
duk_uint32_t i;
- for (i = 0; i < st_initsize; i++) {
+ for (i = 0; i < st_initsize; i++) {
res->strtable[i] = NULL;
- }
+ }
}
#else
duk_memzero(res->strtable, sizeof(duk_hstring *) * st_initsize);
-#endif /* DUK_USE_EXPLICIT_NULL_INIT */
-#endif /* DUK_USE_STRTAB_PTRCOMP */
+#endif /* DUK_USE_EXPLICIT_NULL_INIT */
+#endif /* DUK_USE_STRTAB_PTRCOMP */
/*
* Init stringcache
@@ -48284,7 +51346,7 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
}
}
#endif
-#endif /* DUK_USE_LITCACHE_SIZE */
+#endif /* DUK_USE_LITCACHE_SIZE */
/* XXX: error handling is incomplete. It would be cleanest if
* there was a setjmp catchpoint, so that all init code could
@@ -48325,9 +51387,9 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
#endif
DUK_D(DUK_DPRINT("heap init: initialize heap object"));
DUK_ASSERT(res->heap_thread != NULL);
- res->heap_object = duk_hobject_alloc_unchecked(res, DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT));
+ res->heap_object = duk_hobject_alloc_unchecked(res,
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT));
if (res->heap_object == NULL) {
goto failed;
}
@@ -48343,8 +51405,8 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
duk_util_tinyrandom_prepare_seed(res->heap_thread);
#else
res->rnd_state[0] = (duk_uint64_t) duk_time_get_ecmascript_time(res->heap_thread);
- DUK_ASSERT(res->rnd_state[1] == 0); /* Not filled here, filled in by seed preparation. */
-#if 0 /* Manual test values matching misc/xoroshiro128plus_test.c. */
+ DUK_ASSERT(res->rnd_state[1] == 0); /* Not filled here, filled in by seed preparation. */
+#if 0 /* Manual test values matching misc/xoroshiro128plus_test.c. */
res->rnd_state[0] = DUK_U64_CONSTANT(0xdeadbeef12345678);
res->rnd_state[1] = DUK_U64_CONSTANT(0xcafed00d12345678);
#endif
@@ -48396,7 +51458,7 @@ duk_heap *duk_heap_alloc(duk_alloc_function alloc_func,
DUK_D(DUK_DPRINT("allocated heap: %p", (void *) res));
return res;
- failed:
+failed:
DUK_D(DUK_DPRINT("heap allocation failed"));
if (res != NULL) {
@@ -48456,14 +51518,14 @@ DUK_LOCAL duk_ret_t duk__fake_global_finalizer(duk_hthread *thr) {
/* Inner function call, error throw. */
duk_eval_string_noresult(thr,
- "(function dummy() {\n"
- " dummy.prototype = null; /* break reference loop */\n"
- " try {\n"
- " throw 'fake-finalizer-dummy-error';\n"
- " } catch (e) {\n"
- " void e;\n"
- " }\n"
- "})()");
+ "(function dummy() {\n"
+ " dummy.prototype = null; /* break reference loop */\n"
+ " try {\n"
+ " throw 'fake-finalizer-dummy-error';\n"
+ " } catch (e) {\n"
+ " void e;\n"
+ " }\n"
+ "})()");
/* The above creates garbage (e.g. a function instance). Because
* the function/prototype reference loop is broken, it gets collected
@@ -48495,7 +51557,7 @@ DUK_LOCAL void duk__run_global_torture_finalizer(duk_hthread *thr) {
(void) duk_pcall(thr, 0 /*nargs*/);
duk_pop(thr);
}
-#endif /* DUK_USE_FINALIZER_TORTURE */
+#endif /* DUK_USE_FINALIZER_TORTURE */
/*
* Process the finalize_list to completion.
@@ -48607,12 +51669,13 @@ DUK_INTERNAL void duk_heap_process_finalize_list(duk_heap *heap) {
DUK_DD(DUK_DDPRINT("processing finalize_list entry: %p -> %!iO", (void *) curr, curr));
- DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT); /* Only objects have finalizers. */
+ DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT); /* Only objects have finalizers. */
DUK_ASSERT(!DUK_HEAPHDR_HAS_REACHABLE(curr));
DUK_ASSERT(!DUK_HEAPHDR_HAS_TEMPROOT(curr));
- DUK_ASSERT(DUK_HEAPHDR_HAS_FINALIZABLE(curr)); /* All objects on finalize_list will have this flag (except object being finalized right now). */
- DUK_ASSERT(!DUK_HEAPHDR_HAS_FINALIZED(curr)); /* Queueing code ensures. */
- DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY(curr)); /* ROM objects never get freed (or finalized). */
+ DUK_ASSERT(DUK_HEAPHDR_HAS_FINALIZABLE(
+ curr)); /* All objects on finalize_list will have this flag (except object being finalized right now). */
+ DUK_ASSERT(!DUK_HEAPHDR_HAS_FINALIZED(curr)); /* Queueing code ensures. */
+ DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY(curr)); /* ROM objects never get freed (or finalized). */
#if defined(DUK_USE_ASSERTIONS)
DUK_ASSERT(heap->currently_finalizing == NULL);
@@ -48640,11 +51703,11 @@ DUK_INTERNAL void duk_heap_process_finalize_list(duk_heap *heap) {
*/
#if defined(DUK_USE_REFERENCE_COUNTING)
DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(curr) >= 1);
- had_zero_refcount = (DUK_HEAPHDR_GET_REFCOUNT(curr) == 1); /* Preincremented on finalize_list insert. */
+ had_zero_refcount = (DUK_HEAPHDR_GET_REFCOUNT(curr) == 1); /* Preincremented on finalize_list insert. */
#endif
DUK_ASSERT(!DUK_HEAPHDR_HAS_FINALIZED(curr));
- duk_heap_run_finalizer(heap, (duk_hobject *) curr); /* must never longjmp */
+ duk_heap_run_finalizer(heap, (duk_hobject *) curr); /* must never longjmp */
DUK_ASSERT(DUK_HEAPHDR_HAS_FINALIZED(curr));
/* XXX: assert that object is still in finalize_list
* when duk_push_heapptr() allows automatic rescue.
@@ -48652,12 +51715,14 @@ DUK_INTERNAL void duk_heap_process_finalize_list(duk_heap *heap) {
#if defined(DUK_USE_REFERENCE_COUNTING)
DUK_DD(DUK_DDPRINT("refcount after finalizer (includes bump): %ld", (long) DUK_HEAPHDR_GET_REFCOUNT(curr)));
- if (DUK_HEAPHDR_GET_REFCOUNT(curr) == 1) { /* Only artificial bump in refcount? */
+ if (DUK_HEAPHDR_GET_REFCOUNT(curr) == 1) { /* Only artificial bump in refcount? */
#if defined(DUK_USE_DEBUG)
if (had_zero_refcount) {
- DUK_DD(DUK_DDPRINT("finalized object's refcount is zero -> free immediately (refcount queued)"));
+ DUK_DD(DUK_DDPRINT(
+ "finalized object's refcount is zero -> free immediately (refcount queued)"));
} else {
- DUK_DD(DUK_DDPRINT("finalized object's refcount is zero -> free immediately (mark-and-sweep queued)"));
+ DUK_DD(DUK_DDPRINT(
+ "finalized object's refcount is zero -> free immediately (mark-and-sweep queued)"));
}
#endif
queue_back = 0;
@@ -48707,21 +51772,21 @@ DUK_INTERNAL void duk_heap_process_finalize_list(duk_heap *heap) {
* decision.
*/
DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(curr) >= 1);
- DUK_HEAPHDR_PREDEC_REFCOUNT(curr); /* Remove artificial refcount bump. */
+ DUK_HEAPHDR_PREDEC_REFCOUNT(curr); /* Remove artificial refcount bump. */
DUK_HEAPHDR_CLEAR_FINALIZABLE(curr);
DUK_HEAP_INSERT_INTO_HEAP_ALLOCATED(heap, curr);
} else {
/* No need to remove the refcount bump here. */
- DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT); /* currently, always the case */
+ DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT); /* currently, always the case */
DUK_DD(DUK_DDPRINT("refcount finalize after finalizer call: %!O", curr));
duk_hobject_refcount_finalize_norz(heap, (duk_hobject *) curr);
duk_free_hobject(heap, (duk_hobject *) curr);
DUK_DD(DUK_DDPRINT("freed hobject after finalization: %p", (void *) curr));
}
-#else /* DUK_USE_REFERENCE_COUNTING */
+#else /* DUK_USE_REFERENCE_COUNTING */
DUK_HEAPHDR_CLEAR_FINALIZABLE(curr);
DUK_HEAP_INSERT_INTO_HEAP_ALLOCATED(heap, curr);
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
#if defined(DUK_USE_DEBUG)
count++;
@@ -48787,11 +51852,11 @@ DUK_LOCAL duk_ret_t duk__finalize_helper(duk_hthread *thr, void *udata) {
* caller must ensure that this function is not called if the target is
* a Proxy.
*/
- duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_INT_FINALIZER); /* -> [... obj finalizer] */
+ duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_INT_FINALIZER); /* -> [... obj finalizer] */
duk_dup_m2(thr);
duk_push_boolean(thr, DUK_HEAP_HAS_FINALIZER_NORESCUE(thr->heap));
DUK_DDD(DUK_DDDPRINT("calling finalizer"));
- duk_call(thr, 2); /* [ ... obj finalizer obj heapDestruct ] -> [ ... obj retval ] */
+ duk_call(thr, 2); /* [ ... obj finalizer obj heapDestruct ] -> [ ... obj retval ] */
DUK_DDD(DUK_DDDPRINT("finalizer returned successfully"));
return 0;
@@ -48840,7 +51905,7 @@ DUK_INTERNAL void duk_heap_run_finalizer(duk_heap *heap, duk_hobject *obj) {
return;
}
#endif
- DUK_HEAPHDR_SET_FINALIZED((duk_heaphdr *) obj); /* ensure never re-entered until rescue cycle complete */
+ DUK_HEAPHDR_SET_FINALIZED((duk_heaphdr *) obj); /* ensure never re-entered until rescue cycle complete */
#if defined(DUK_USE_ES6_PROXY)
if (DUK_HOBJECT_IS_PROXY(obj)) {
@@ -48852,29 +51917,30 @@ DUK_INTERNAL void duk_heap_run_finalizer(duk_heap *heap, duk_hobject *obj) {
DUK_D(DUK_DPRINT("object is a Proxy, skip finalizer call"));
return;
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
- duk_push_hobject(thr, obj); /* this also increases refcount by one */
- rc = duk_safe_call(thr, duk__finalize_helper, NULL /*udata*/, 0 /*nargs*/, 1 /*nrets*/); /* -> [... obj retval/error] */
- DUK_ASSERT_TOP(thr, entry_top + 2); /* duk_safe_call discipline */
+ duk_push_hobject(thr, obj); /* this also increases refcount by one */
+ rc = duk_safe_call(thr, duk__finalize_helper, NULL /*udata*/, 0 /*nargs*/, 1 /*nrets*/); /* -> [... obj retval/error] */
+ DUK_ASSERT_TOP(thr, entry_top + 2); /* duk_safe_call discipline */
if (rc != DUK_EXEC_SUCCESS) {
/* Note: we ask for one return value from duk_safe_call to get this
* error debugging here.
*/
DUK_D(DUK_DPRINT("wrapped finalizer call failed for object %p (ignored); error: %!T",
- (void *) obj, (duk_tval *) duk_get_tval(thr, -1)));
+ (void *) obj,
+ (duk_tval *) duk_get_tval(thr, -1)));
}
- duk_pop_2(thr); /* -> [...] */
+ duk_pop_2(thr); /* -> [...] */
DUK_ASSERT_TOP(thr, entry_top);
}
-#else /* DUK_USE_FINALIZER_SUPPORT */
+#else /* DUK_USE_FINALIZER_SUPPORT */
/* nothing */
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* String hash computation (interning).
*
@@ -48898,9 +51964,9 @@ DUK_INTERNAL void duk_heap_run_finalizer(duk_heap *heap, duk_hobject *obj) {
#if defined(DUK_USE_STRHASH_DENSE)
/* Constants for duk_hashstring(). */
-#define DUK__STRHASH_SHORTSTRING 4096L
-#define DUK__STRHASH_MEDIUMSTRING (256L * 1024L)
-#define DUK__STRHASH_BLOCKSIZE 256L
+#define DUK__STRHASH_SHORTSTRING 4096L
+#define DUK__STRHASH_MEDIUMSTRING (256L * 1024L)
+#define DUK__STRHASH_BLOCKSIZE 256L
DUK_INTERNAL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uint8_t *str, duk_size_t len) {
duk_uint32_t hash;
@@ -48957,7 +52023,7 @@ DUK_INTERNAL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uint8_t
#endif
return hash;
}
-#else /* DUK_USE_STRHASH_DENSE */
+#else /* DUK_USE_STRHASH_DENSE */
DUK_INTERNAL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uint8_t *str, duk_size_t len) {
duk_uint32_t hash;
duk_size_t step;
@@ -48975,10 +52041,10 @@ DUK_INTERNAL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uint8_t
* more often in the suffix than in the prefix.
*/
- hash = heap->hash_seed ^ ((duk_uint32_t) len); /* Bernstein hash init value is normally 5381 */
+ hash = heap->hash_seed ^ ((duk_uint32_t) len); /* Bernstein hash init value is normally 5381 */
step = (len >> DUK_USE_STRHASH_SKIP_SHIFT) + 1;
for (off = len; off >= step; off -= step) {
- DUK_ASSERT(off >= 1); /* off >= step, and step >= 1 */
+ DUK_ASSERT(off >= 1); /* off >= step, and step >= 1 */
hash = (hash * 33) + str[off - 1];
}
@@ -48990,7 +52056,7 @@ DUK_INTERNAL duk_uint32_t duk_heap_hashstring(duk_heap *heap, const duk_uint8_t
#endif
return hash;
}
-#endif /* DUK_USE_STRHASH_DENSE */
+#endif /* DUK_USE_STRHASH_DENSE */
/* automatic undefs */
#undef DUK__STRHASH_BLOCKSIZE
@@ -49112,7 +52178,7 @@ DUK_LOCAL void duk__mark_hobject(duk_heap *heap, duk_hobject *h) {
DUK_HBUFOBJ_ASSERT_VALID(b);
duk__mark_heaphdr(heap, (duk_heaphdr *) b->buf);
duk__mark_heaphdr(heap, (duk_heaphdr *) b->buf_prop);
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
} else if (DUK_HOBJECT_IS_BOUNDFUNC(h)) {
duk_hboundfunc *f = (duk_hboundfunc *) (void *) h;
DUK_HBOUNDFUNC_ASSERT_VALID(f);
@@ -49125,7 +52191,7 @@ DUK_LOCAL void duk__mark_hobject(duk_heap *heap, duk_hobject *h) {
DUK_HPROXY_ASSERT_VALID(p);
duk__mark_heaphdr_nonnull(heap, (duk_heaphdr *) p->target);
duk__mark_heaphdr_nonnull(heap, (duk_heaphdr *) p->handler);
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
} else if (DUK_HOBJECT_IS_THREAD(h)) {
duk_hthread *t = (duk_hthread *) h;
duk_activation *act;
@@ -49146,7 +52212,7 @@ DUK_LOCAL void duk__mark_hobject(duk_heap *heap, duk_hobject *h) {
#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
duk__mark_heaphdr(heap, (duk_heaphdr *) act->prev_caller);
#endif
-#if 0 /* nothing now */
+#if 0 /* nothing now */
for (cat = act->cat; cat != NULL; cat = cat->parent) {
}
#endif
@@ -49169,9 +52235,8 @@ DUK_LOCAL void duk__mark_hobject(duk_heap *heap, duk_hobject *h) {
/* Mark any duk_heaphdr type. Recursion tracking happens only here. */
DUK_LOCAL void duk__mark_heaphdr(duk_heap *heap, duk_heaphdr *h) {
- DUK_DDD(DUK_DDDPRINT("duk__mark_heaphdr %p, type %ld",
- (void *) h,
- (h != NULL ? (long) DUK_HEAPHDR_GET_TYPE(h) : (long) -1)));
+ DUK_DDD(
+ DUK_DDDPRINT("duk__mark_heaphdr %p, type %ld", (void *) h, (h != NULL ? (long) DUK_HEAPHDR_GET_TYPE(h) : (long) -1)));
/* XXX: add non-null variant? */
if (h == NULL) {
@@ -49183,7 +52248,7 @@ DUK_LOCAL void duk__mark_heaphdr(duk_heap *heap, duk_heaphdr *h) {
#if defined(DUK_USE_ASSERTIONS) && defined(DUK_USE_REFERENCE_COUNTING)
if (!DUK_HEAPHDR_HAS_READONLY(h)) {
- h->h_assert_refcount++; /* Comparison refcount: bump even if already reachable. */
+ h->h_assert_refcount++; /* Comparison refcount: bump even if already reachable. */
}
#endif
if (DUK_HEAPHDR_HAS_REACHABLE(h)) {
@@ -49207,7 +52272,7 @@ DUK_LOCAL void duk__mark_heaphdr(duk_heap *heap, duk_heaphdr *h) {
}
heap->ms_recursion_depth++;
- DUK_ASSERT(heap->ms_recursion_depth != 0); /* Wrap. */
+ DUK_ASSERT(heap->ms_recursion_depth != 0); /* Wrap. */
switch (DUK_HEAPHDR_GET_TYPE(h)) {
case DUK_HTYPE_STRING:
@@ -49322,9 +52387,7 @@ DUK_LOCAL void duk__mark_finalizable(duk_heap *heap) {
* of a _Finalizer hidden symbol.
*/
- if (!DUK_HEAPHDR_HAS_REACHABLE(hdr) &&
- DUK_HEAPHDR_IS_OBJECT(hdr) &&
- !DUK_HEAPHDR_HAS_FINALIZED(hdr) &&
+ if (!DUK_HEAPHDR_HAS_REACHABLE(hdr) && DUK_HEAPHDR_IS_OBJECT(hdr) && !DUK_HEAPHDR_HAS_FINALIZED(hdr) &&
DUK_HOBJECT_HAS_FINALIZER_FAST(heap, (duk_hobject *) hdr)) {
/* heaphdr:
* - is not reachable
@@ -49349,8 +52412,7 @@ DUK_LOCAL void duk__mark_finalizable(duk_heap *heap) {
return;
}
- DUK_DD(DUK_DDPRINT("marked %ld heap objects as finalizable, now mark them reachable",
- (long) count_finalizable));
+ DUK_DD(DUK_DDPRINT("marked %ld heap objects as finalizable, now mark them reachable", (long) count_finalizable));
hdr = heap->heap_allocated;
while (hdr != NULL) {
@@ -49363,7 +52425,7 @@ DUK_LOCAL void duk__mark_finalizable(duk_heap *heap) {
/* Caller will finish the marking process if we hit a recursion limit. */
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* Mark objects on finalize_list.
@@ -49394,7 +52456,7 @@ DUK_LOCAL void duk__mark_finalize_list(duk_heap *heap) {
}
#endif
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* Fallback marking handler if recursion limit is reached.
@@ -49427,9 +52489,9 @@ DUK_LOCAL void duk__handle_temproot(duk_heap *heap, duk_heaphdr *hdr) {
DUK_DDD(DUK_DDDPRINT("found a temp root: %p", (void *) hdr));
DUK_HEAPHDR_CLEAR_TEMPROOT(hdr);
- DUK_HEAPHDR_CLEAR_REACHABLE(hdr); /* Done so that duk__mark_heaphdr() works correctly. */
+ DUK_HEAPHDR_CLEAR_REACHABLE(hdr); /* Done so that duk__mark_heaphdr() works correctly. */
#if defined(DUK_USE_ASSERTIONS) && defined(DUK_USE_REFERENCE_COUNTING)
- hdr->h_assert_refcount--; /* Same node visited twice. */
+ hdr->h_assert_refcount--; /* Same node visited twice. */
#endif
duk__mark_heaphdr_nonnull(heap, hdr);
@@ -49524,7 +52586,7 @@ DUK_LOCAL void duk__finalize_refcounts(duk_heap *heap) {
hdr = DUK_HEAPHDR_GET_NEXT(heap, hdr);
}
}
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
/*
* Clear (reachable) flags of finalize_list.
@@ -49547,15 +52609,14 @@ DUK_LOCAL void duk__clear_finalize_list_flags(duk_heap *heap) {
while (hdr) {
DUK_HEAPHDR_CLEAR_REACHABLE(hdr);
#if defined(DUK_USE_ASSERTIONS)
- DUK_ASSERT(DUK_HEAPHDR_HAS_FINALIZABLE(hdr) || \
- (heap->currently_finalizing == hdr));
+ DUK_ASSERT(DUK_HEAPHDR_HAS_FINALIZABLE(hdr) || (heap->currently_finalizing == hdr));
#endif
/* DUK_HEAPHDR_FLAG_FINALIZED may be set. */
DUK_ASSERT(!DUK_HEAPHDR_HAS_TEMPROOT(hdr));
hdr = DUK_HEAPHDR_GET_NEXT(heap, hdr);
}
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* Sweep stringtable.
@@ -49591,8 +52652,7 @@ DUK_LOCAL void duk__sweep_stringtable(duk_heap *heap, duk_size_t *out_count_keep
duk_hstring *next;
next = h->hdr.h_next;
- if (DUK_HEAPHDR_HAS_REACHABLE((duk_heaphdr *) h))
- {
+ if (DUK_HEAPHDR_HAS_REACHABLE((duk_heaphdr *) h)) {
DUK_HEAPHDR_CLEAR_REACHABLE((duk_heaphdr *) h);
count_keep++;
prev = h;
@@ -49619,8 +52679,8 @@ DUK_LOCAL void duk__sweep_stringtable(duk_heap *heap, duk_size_t *out_count_keep
* should have decreased unreachable string refcounts to zero
* (even for cycles). However, pinned strings have a +1 bump.
*/
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) ==
- DUK_HSTRING_HAS_PINNED_LITERAL(h) ? 1U : 0U);
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) == DUK_HSTRING_HAS_PINNED_LITERAL(h) ? 1U :
+ 0U);
#endif
/* Deal with weak references first. */
@@ -49641,10 +52701,9 @@ DUK_LOCAL void duk__sweep_stringtable(duk_heap *heap, duk_size_t *out_count_keep
}
}
- done:
+done:
#if defined(DUK_USE_DEBUG)
- DUK_D(DUK_DPRINT("mark-and-sweep sweep stringtable: %ld freed, %ld kept",
- (long) count_free, (long) count_keep));
+ DUK_D(DUK_DPRINT("mark-and-sweep sweep stringtable: %ld freed, %ld kept", (long) count_free, (long) count_keep));
#endif
*out_count_keep = count_keep;
}
@@ -49654,7 +52713,7 @@ DUK_LOCAL void duk__sweep_stringtable(duk_heap *heap, duk_size_t *out_count_keep
*/
DUK_LOCAL void duk__sweep_heap(duk_heap *heap, duk_small_uint_t flags, duk_size_t *out_count_keep) {
- duk_heaphdr *prev; /* last element that was left in the heap */
+ duk_heaphdr *prev; /* last element that was left in the heap */
duk_heaphdr *curr;
duk_heaphdr *next;
#if defined(DUK_USE_DEBUG)
@@ -49697,25 +52756,28 @@ DUK_LOCAL void duk__sweep_heap(duk_heap *heap, duk_small_uint_t flags, duk_size_
DUK_DD(DUK_DDPRINT("sweep; reachable, finalizable --> move to finalize_list: %p", (void *) curr));
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_HEAPHDR_PREINC_REFCOUNT(curr); /* Bump refcount so that refzero never occurs when pending a finalizer call. */
+ DUK_HEAPHDR_PREINC_REFCOUNT(
+ curr); /* Bump refcount so that refzero never occurs when pending a finalizer call. */
#endif
DUK_HEAP_INSERT_INTO_FINALIZE_LIST(heap, curr);
#if defined(DUK_USE_DEBUG)
count_finalize++;
#endif
- }
- else
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+ } else
+#endif /* DUK_USE_FINALIZER_SUPPORT */
{
if (DUK_UNLIKELY(DUK_HEAPHDR_HAS_FINALIZED(curr))) {
DUK_ASSERT(!DUK_HEAPHDR_HAS_FINALIZABLE(curr));
DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT);
if (flags & DUK_MS_FLAG_POSTPONE_RESCUE) {
- DUK_DD(DUK_DDPRINT("sweep; reachable, finalized, but postponing rescue decisions --> keep object (with FINALIZED set): %!iO", curr));
+ DUK_DD(DUK_DDPRINT("sweep; reachable, finalized, but postponing rescue decisions "
+ "--> keep object (with FINALIZED set): %!iO",
+ curr));
count_keep++;
} else {
- DUK_DD(DUK_DDPRINT("sweep; reachable, finalized --> rescued after finalization: %p", (void *) curr));
+ DUK_DD(DUK_DDPRINT("sweep; reachable, finalized --> rescued after finalization: %p",
+ (void *) curr));
#if defined(DUK_USE_FINALIZER_SUPPORT)
DUK_HEAPHDR_CLEAR_FINALIZED(curr);
#endif
@@ -49784,7 +52846,8 @@ DUK_LOCAL void duk__sweep_heap(duk_heap *heap, duk_small_uint_t flags, duk_size_
#if defined(DUK_USE_DEBUG)
if (DUK_HEAPHDR_HAS_FINALIZED(curr)) {
- DUK_DD(DUK_DDPRINT("sweep; unreachable, finalized --> finalized object not rescued: %p", (void *) curr));
+ DUK_DD(DUK_DDPRINT("sweep; unreachable, finalized --> finalized object not rescued: %p",
+ (void *) curr));
} else {
DUK_DD(DUK_DDPRINT("sweep; not reachable --> free: %p", (void *) curr));
}
@@ -49818,7 +52881,10 @@ DUK_LOCAL void duk__sweep_heap(duk_heap *heap, duk_small_uint_t flags, duk_size_
#if defined(DUK_USE_DEBUG)
DUK_D(DUK_DPRINT("mark-and-sweep sweep objects (non-string): %ld freed, %ld kept, %ld rescued, %ld queued for finalization",
- (long) count_free, (long) count_keep, (long) count_rescue, (long) count_finalize));
+ (long) count_free,
+ (long) count_keep,
+ (long) count_rescue,
+ (long) count_finalize));
#endif
*out_count_keep = count_keep;
}
@@ -49841,7 +52907,7 @@ DUK_LOCAL void duk__wipe_litcache(duk_heap *heap) {
e++;
}
}
-#endif /* DUK_USE_LITCACHE_SIZE */
+#endif /* DUK_USE_LITCACHE_SIZE */
/*
* Object compaction.
@@ -49860,7 +52926,12 @@ DUK_LOCAL int duk__protected_compact_object(duk_hthread *thr, void *udata) {
}
#if defined(DUK_USE_DEBUG)
-DUK_LOCAL void duk__compact_object_list(duk_heap *heap, duk_hthread *thr, duk_heaphdr *start, duk_size_t *p_count_check, duk_size_t *p_count_compact, duk_size_t *p_count_bytes_saved) {
+DUK_LOCAL void duk__compact_object_list(duk_heap *heap,
+ duk_hthread *thr,
+ duk_heaphdr *start,
+ duk_size_t *p_count_check,
+ duk_size_t *p_count_compact,
+ duk_size_t *p_count_bytes_saved) {
#else
DUK_LOCAL void duk__compact_object_list(duk_heap *heap, duk_hthread *thr, duk_heaphdr *start) {
#endif
@@ -49882,9 +52953,8 @@ DUK_LOCAL void duk__compact_object_list(duk_heap *heap, duk_hthread *thr, duk_he
obj = (duk_hobject *) curr;
#if defined(DUK_USE_DEBUG)
- old_size = DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj),
- DUK_HOBJECT_GET_ASIZE(obj),
- DUK_HOBJECT_GET_HSIZE(obj));
+ old_size =
+ DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj), DUK_HOBJECT_GET_ASIZE(obj), DUK_HOBJECT_GET_HSIZE(obj));
#endif
DUK_DD(DUK_DDPRINT("compact object: %p", (void *) obj));
@@ -49893,9 +52963,8 @@ DUK_LOCAL void duk__compact_object_list(duk_heap *heap, duk_hthread *thr, duk_he
duk_safe_call(thr, duk__protected_compact_object, NULL, 1, 0);
#if defined(DUK_USE_DEBUG)
- new_size = DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj),
- DUK_HOBJECT_GET_ASIZE(obj),
- DUK_HOBJECT_GET_HSIZE(obj));
+ new_size =
+ DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj), DUK_HOBJECT_GET_ASIZE(obj), DUK_HOBJECT_GET_HSIZE(obj));
#endif
#if defined(DUK_USE_DEBUG)
@@ -49903,7 +52972,7 @@ DUK_LOCAL void duk__compact_object_list(duk_heap *heap, duk_hthread *thr, duk_he
(*p_count_bytes_saved) += (duk_size_t) (old_size - new_size);
#endif
- next:
+ next:
curr = DUK_HEAPHDR_GET_NEXT(heap, curr);
#if defined(DUK_USE_DEBUG)
(*p_count_check)++;
@@ -49935,12 +53004,14 @@ DUK_LOCAL void duk__compact_objects(duk_heap *heap) {
#endif
#endif
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
+ DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
#endif
#if defined(DUK_USE_DEBUG)
DUK_D(DUK_DPRINT("mark-and-sweep compact objects: %ld checked, %ld compaction attempts, %ld bytes saved by compaction",
- (long) count_check, (long) count_compact, (long) count_bytes_saved));
+ (long) count_check,
+ (long) count_compact,
+ (long) count_bytes_saved));
#endif
}
@@ -49987,7 +53058,7 @@ DUK_LOCAL void duk__assert_heaphdr_flags_cb(duk_heap *heap, duk_heaphdr *h) {
DUK_LOCAL void duk__assert_heaphdr_flags(duk_heap *heap) {
duk__assert_walk_list(heap, heap->heap_allocated, duk__assert_heaphdr_flags_cb);
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
+ DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
#endif
/* XXX: Assertions for finalize_list? */
}
@@ -50018,8 +53089,7 @@ DUK_LOCAL void duk__assert_valid_refcounts_cb(duk_heap *heap, duk_heaphdr *h) {
/* Cannot really assert much w.r.t. refcounts now. */
DUK_UNREF(heap);
- if (DUK_HEAPHDR_GET_REFCOUNT(h) == 0 &&
- DUK_HEAPHDR_HAS_FINALIZED(h)) {
+ if (DUK_HEAPHDR_GET_REFCOUNT(h) == 0 && DUK_HEAPHDR_HAS_FINALIZED(h)) {
/* An object may be in heap_allocated list with a zero
* refcount if it has just been finalized and is waiting
* to be collected by the next cycle.
@@ -50033,7 +53103,7 @@ DUK_LOCAL void duk__assert_valid_refcounts_cb(duk_heap *heap, duk_heaphdr *h) {
* (presumably not reachable because refcount is 0).
*/
}
- DUK_ASSERT_DISABLE(DUK_HEAPHDR_GET_REFCOUNT(h) >= 0); /* Unsigned. */
+ DUK_ASSERT_DISABLE(DUK_HEAPHDR_GET_REFCOUNT(h) >= 0); /* Unsigned. */
}
DUK_LOCAL void duk__assert_valid_refcounts(duk_heap *heap) {
duk__assert_walk_list(heap, heap->heap_allocated, duk__assert_valid_refcounts_cb);
@@ -50084,8 +53154,10 @@ DUK_LOCAL void duk__check_refcount_heaphdr(duk_heaphdr *hdr) {
count_ok = ((duk_size_t) DUK_HEAPHDR_GET_REFCOUNT(hdr) == expect_refc);
if (!count_ok) {
DUK_D(DUK_DPRINT("refcount mismatch for: %p: header=%ld counted=%ld --> %!iO",
- (void *) hdr, (long) DUK_HEAPHDR_GET_REFCOUNT(hdr),
- (long) hdr->h_assert_refcount, hdr));
+ (void *) hdr,
+ (long) DUK_HEAPHDR_GET_REFCOUNT(hdr),
+ (long) hdr->h_assert_refcount,
+ hdr));
DUK_ASSERT(0);
}
}
@@ -50106,7 +53178,7 @@ DUK_LOCAL void duk__check_assert_refcounts(duk_heap *heap) {
/* XXX: Assert anything for refzero_list? */
duk__assert_walk_strtable(heap, duk__check_assert_refcounts_cb2);
}
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
#if defined(DUK_USE_LITCACHE_SIZE)
DUK_LOCAL void duk__assert_litcache_nulls(duk_heap *heap) {
@@ -50122,8 +53194,8 @@ DUK_LOCAL void duk__assert_litcache_nulls(duk_heap *heap) {
DUK_ASSERT(e->addr == NULL);
}
}
-#endif /* DUK_USE_LITCACHE_SIZE */
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_LITCACHE_SIZE */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Stats dump.
@@ -50132,49 +53204,64 @@ DUK_LOCAL void duk__assert_litcache_nulls(duk_heap *heap) {
#if defined(DUK_USE_DEBUG)
DUK_LOCAL void duk__dump_stats(duk_heap *heap) {
DUK_D(DUK_DPRINT("stats executor: opcodes=%ld, interrupt=%ld, throw=%ld",
- (long) heap->stats_exec_opcodes, (long) heap->stats_exec_interrupt,
+ (long) heap->stats_exec_opcodes,
+ (long) heap->stats_exec_interrupt,
(long) heap->stats_exec_throw));
DUK_D(DUK_DPRINT("stats call: all=%ld, tailcall=%ld, ecmatoecma=%ld",
- (long) heap->stats_call_all, (long) heap->stats_call_tailcall,
+ (long) heap->stats_call_all,
+ (long) heap->stats_call_tailcall,
(long) heap->stats_call_ecmatoecma));
DUK_D(DUK_DPRINT("stats safecall: all=%ld, nothrow=%ld, throw=%ld",
- (long) heap->stats_safecall_all, (long) heap->stats_safecall_nothrow,
+ (long) heap->stats_safecall_all,
+ (long) heap->stats_safecall_nothrow,
(long) heap->stats_safecall_throw));
DUK_D(DUK_DPRINT("stats mark-and-sweep: try_count=%ld, skip_count=%ld, emergency_count=%ld",
- (long) heap->stats_ms_try_count, (long) heap->stats_ms_skip_count,
+ (long) heap->stats_ms_try_count,
+ (long) heap->stats_ms_skip_count,
(long) heap->stats_ms_emergency_count));
DUK_D(DUK_DPRINT("stats stringtable: intern_hit=%ld, intern_miss=%ld, "
"resize_check=%ld, resize_grow=%ld, resize_shrink=%ld, "
"litcache_hit=%ld, litcache_miss=%ld, litcache_pin=%ld",
- (long) heap->stats_strtab_intern_hit, (long) heap->stats_strtab_intern_miss,
- (long) heap->stats_strtab_resize_check, (long) heap->stats_strtab_resize_grow,
- (long) heap->stats_strtab_resize_shrink, (long) heap->stats_strtab_litcache_hit,
- (long) heap->stats_strtab_litcache_miss, (long) heap->stats_strtab_litcache_pin));
+ (long) heap->stats_strtab_intern_hit,
+ (long) heap->stats_strtab_intern_miss,
+ (long) heap->stats_strtab_resize_check,
+ (long) heap->stats_strtab_resize_grow,
+ (long) heap->stats_strtab_resize_shrink,
+ (long) heap->stats_strtab_litcache_hit,
+ (long) heap->stats_strtab_litcache_miss,
+ (long) heap->stats_strtab_litcache_pin));
DUK_D(DUK_DPRINT("stats object: realloc_props=%ld, abandon_array=%ld",
- (long) heap->stats_object_realloc_props, (long) heap->stats_object_abandon_array));
+ (long) heap->stats_object_realloc_props,
+ (long) heap->stats_object_abandon_array));
DUK_D(DUK_DPRINT("stats getownpropdesc: count=%ld, hit=%ld, miss=%ld",
- (long) heap->stats_getownpropdesc_count, (long) heap->stats_getownpropdesc_hit,
+ (long) heap->stats_getownpropdesc_count,
+ (long) heap->stats_getownpropdesc_hit,
(long) heap->stats_getownpropdesc_miss));
DUK_D(DUK_DPRINT("stats getpropdesc: count=%ld, hit=%ld, miss=%ld",
- (long) heap->stats_getpropdesc_count, (long) heap->stats_getpropdesc_hit,
+ (long) heap->stats_getpropdesc_count,
+ (long) heap->stats_getpropdesc_hit,
(long) heap->stats_getpropdesc_miss));
DUK_D(DUK_DPRINT("stats getprop: all=%ld, arrayidx=%ld, bufobjidx=%ld, "
"bufferidx=%ld, bufferlen=%ld, stringidx=%ld, stringlen=%ld, "
"proxy=%ld, arguments=%ld",
- (long) heap->stats_getprop_all, (long) heap->stats_getprop_arrayidx,
- (long) heap->stats_getprop_bufobjidx, (long) heap->stats_getprop_bufferidx,
- (long) heap->stats_getprop_bufferlen, (long) heap->stats_getprop_stringidx,
- (long) heap->stats_getprop_stringlen, (long) heap->stats_getprop_proxy,
+ (long) heap->stats_getprop_all,
+ (long) heap->stats_getprop_arrayidx,
+ (long) heap->stats_getprop_bufobjidx,
+ (long) heap->stats_getprop_bufferidx,
+ (long) heap->stats_getprop_bufferlen,
+ (long) heap->stats_getprop_stringidx,
+ (long) heap->stats_getprop_stringlen,
+ (long) heap->stats_getprop_proxy,
(long) heap->stats_getprop_arguments));
DUK_D(DUK_DPRINT("stats putprop: all=%ld, arrayidx=%ld, bufobjidx=%ld, "
"bufferidx=%ld, proxy=%ld",
- (long) heap->stats_putprop_all, (long) heap->stats_putprop_arrayidx,
- (long) heap->stats_putprop_bufobjidx, (long) heap->stats_putprop_bufferidx,
+ (long) heap->stats_putprop_all,
+ (long) heap->stats_putprop_arrayidx,
+ (long) heap->stats_putprop_bufobjidx,
+ (long) heap->stats_putprop_bufferidx,
(long) heap->stats_putprop_proxy));
- DUK_D(DUK_DPRINT("stats getvar: all=%ld",
- (long) heap->stats_getvar_all));
- DUK_D(DUK_DPRINT("stats putvar: all=%ld",
- (long) heap->stats_putvar_all));
+ DUK_D(DUK_DPRINT("stats getvar: all=%ld", (long) heap->stats_getvar_all));
+ DUK_D(DUK_DPRINT("stats putvar: all=%ld", (long) heap->stats_putvar_all));
DUK_D(DUK_DPRINT("stats envrec: delayedcreate=%ld, create=%ld, newenv=%ld, oldenv=%ld, pushclosure=%ld",
(long) heap->stats_envrec_delayedcreate,
(long) heap->stats_envrec_create,
@@ -50182,7 +53269,7 @@ DUK_LOCAL void duk__dump_stats(duk_heap *heap) {
(long) heap->stats_envrec_oldenv,
(long) heap->stats_envrec_pushclosure));
}
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
/*
* Main mark-and-sweep function.
@@ -50198,6 +53285,7 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
#if defined(DUK_USE_VOLUNTARY_GC)
duk_size_t tmp;
#endif
+ duk_bool_t entry_creating_error;
DUK_STATS_INC(heap, stats_ms_try_count);
#if defined(DUK_USE_DEBUG)
@@ -50220,7 +53308,7 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
DUK_STATS_INC(heap, stats_ms_skip_count);
return;
}
- DUK_ASSERT(heap->ms_running == 0); /* ms_prevent_count is bumped when ms_running is set */
+ DUK_ASSERT(heap->ms_running == 0); /* ms_prevent_count is bumped when ms_running is set */
/* Heap_thread is used during mark-and-sweep for refcount finalization
* (it's also used for finalizer execution once mark-and-sweep is
@@ -50231,7 +53319,8 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
DUK_ASSERT(heap->heap_thread->valstack != NULL);
DUK_D(DUK_DPRINT("garbage collect (mark-and-sweep) starting, requested flags: 0x%08lx, effective flags: 0x%08lx",
- (unsigned long) flags, (unsigned long) (flags | heap->ms_base_flags)));
+ (unsigned long) flags,
+ (unsigned long) (flags | heap->ms_base_flags)));
flags |= heap->ms_base_flags;
#if defined(DUK_USE_FINALIZER_SUPPORT)
@@ -50257,8 +53346,8 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
* finalizer may trigger a mark-and-sweep.
*/
duk__assert_valid_refcounts(heap);
-#endif /* DUK_USE_REFERENCE_COUNTING */
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Begin
@@ -50268,6 +53357,8 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
DUK_ASSERT(heap->ms_running == 0);
heap->ms_prevent_count = 1;
heap->ms_running = 1;
+ entry_creating_error = heap->creating_error;
+ heap->creating_error = 0;
/*
* Free activation/catcher freelists on every mark-and-sweep for now.
@@ -50300,17 +53391,17 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
#if defined(DUK_USE_LITCACHE_SIZE)
duk__wipe_litcache(heap);
#endif
- duk__mark_roots_heap(heap); /* Mark main reachability roots. */
+ duk__mark_roots_heap(heap); /* Mark main reachability roots. */
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
+ DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
#endif
- duk__mark_temproots_by_heap_scan(heap); /* Temproots. */
+ duk__mark_temproots_by_heap_scan(heap); /* Temproots. */
#if defined(DUK_USE_FINALIZER_SUPPORT)
- duk__mark_finalizable(heap); /* Mark finalizable as reachability roots. */
- duk__mark_finalize_list(heap); /* Mark finalizer work list as reachability roots. */
+ duk__mark_finalizable(heap); /* Mark finalizable as reachability roots. */
+ duk__mark_finalize_list(heap); /* Mark finalizer work list as reachability roots. */
#endif
- duk__mark_temproots_by_heap_scan(heap); /* Temproots. */
+ duk__mark_temproots_by_heap_scan(heap); /* Temproots. */
/*
* Sweep garbage and remove marking flags, and move objects with
@@ -50337,7 +53428,7 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
duk__check_assert_refcounts(heap);
#endif
#if defined(DUK_USE_REFERENCE_COUNTING)
- DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
+ DUK_ASSERT(heap->refzero_list == NULL); /* Always handled to completion inline in DECREF. */
#endif
#if defined(DUK_USE_FINALIZER_SUPPORT)
duk__clear_finalize_list_flags(heap);
@@ -50364,8 +53455,7 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
* interfering with error state.
*/
- if ((flags & DUK_MS_FLAG_EMERGENCY) &&
- !(flags & DUK_MS_FLAG_NO_OBJECT_COMPACTION)) {
+ if ((flags & DUK_MS_FLAG_EMERGENCY) && !(flags & DUK_MS_FLAG_NO_OBJECT_COMPACTION)) {
if (heap->lj.type != DUK_LJ_TYPE_UNKNOWN) {
DUK_D(DUK_DPRINT("lj.type (%ld) not DUK_LJ_TYPE_UNKNOWN, skip object compaction", (long) heap->lj.type));
} else {
@@ -50398,6 +53488,7 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
DUK_ASSERT(heap->ms_running == 1);
heap->ms_prevent_count = 0;
heap->ms_running = 0;
+ heap->creating_error = entry_creating_error; /* for nested error handling, see GH-2278 */
/*
* Assertions after
@@ -50414,11 +53505,11 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
* finalizer may trigger a mark-and-sweep.
*/
duk__assert_valid_refcounts(heap);
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
#if defined(DUK_USE_LITCACHE_SIZE)
duk__assert_litcache_nulls(heap);
-#endif /* DUK_USE_LITCACHE_SIZE */
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_LITCACHE_SIZE */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Reset trigger counter
@@ -50426,14 +53517,15 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
#if defined(DUK_USE_VOLUNTARY_GC)
tmp = (count_keep_obj + count_keep_str) / 256;
- heap->ms_trigger_counter = (duk_int_t) (
- (tmp * DUK_HEAP_MARK_AND_SWEEP_TRIGGER_MULT) +
- DUK_HEAP_MARK_AND_SWEEP_TRIGGER_ADD);
+ heap->ms_trigger_counter = (duk_int_t) ((tmp * DUK_HEAP_MARK_AND_SWEEP_TRIGGER_MULT) + DUK_HEAP_MARK_AND_SWEEP_TRIGGER_ADD);
DUK_D(DUK_DPRINT("garbage collect (mark-and-sweep) finished: %ld objects kept, %ld strings kept, trigger reset to %ld",
- (long) count_keep_obj, (long) count_keep_str, (long) heap->ms_trigger_counter));
+ (long) count_keep_obj,
+ (long) count_keep_str,
+ (long) heap->ms_trigger_counter));
#else
DUK_D(DUK_DPRINT("garbage collect (mark-and-sweep) finished: %ld objects kept, %ld strings kept, no voluntary trigger",
- (long) count_keep_obj, (long) count_keep_str));
+ (long) count_keep_obj,
+ (long) count_keep_str));
#endif
/*
@@ -50476,7 +53568,7 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
* is inside the target.
*/
duk_heap_process_finalize_list(heap);
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
}
/*
* Memory allocation handling.
@@ -50485,84 +53577,31 @@ DUK_INTERNAL void duk_heap_mark_and_sweep(duk_heap *heap, duk_small_uint_t flags
/* #include duk_internal.h -> already included */
/*
- * Voluntary GC check
+ * Allocate memory with garbage collection.
*/
-#if defined(DUK_USE_VOLUNTARY_GC)
-DUK_LOCAL DUK_INLINE void duk__check_voluntary_gc(duk_heap *heap) {
- if (DUK_UNLIKELY(--(heap)->ms_trigger_counter < 0)) {
-#if defined(DUK_USE_DEBUG)
- if (heap->ms_prevent_count == 0) {
- DUK_D(DUK_DPRINT("triggering voluntary mark-and-sweep"));
- } else {
- DUK_DD(DUK_DDPRINT("gc blocked -> skip voluntary mark-and-sweep now"));
- }
-#endif
-
- /* Prevention checks in the call target handle cases where
- * voluntary GC is not allowed. The voluntary GC trigger
- * counter is only rewritten if mark-and-sweep actually runs.
- */
- duk_heap_mark_and_sweep(heap, DUK_MS_FLAG_VOLUNTARY /*flags*/);
- }
-}
-#define DUK__VOLUNTARY_PERIODIC_GC(heap) do { duk__check_voluntary_gc((heap)); } while (0)
-#else
-#define DUK__VOLUNTARY_PERIODIC_GC(heap) /* no voluntary gc */
-#endif /* DUK_USE_VOLUNTARY_GC */
-
-/*
- * Allocate memory with garbage collection
- */
-
-DUK_INTERNAL void *duk_heap_mem_alloc(duk_heap *heap, duk_size_t size) {
+/* Slow path: voluntary GC triggered, first alloc attempt failed, or zero size. */
+DUK_LOCAL DUK_NOINLINE_PERF DUK_COLD void *duk__heap_mem_alloc_slowpath(duk_heap *heap, duk_size_t size) {
void *res;
duk_small_int_t i;
DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->alloc_func != NULL);
DUK_ASSERT_DISABLE(size >= 0);
- /*
- * Voluntary periodic GC (if enabled)
- */
-
- DUK__VOLUNTARY_PERIODIC_GC(heap);
-
- /*
- * First attempt
- */
-
-#if defined(DUK_USE_GC_TORTURE)
- /* Simulate alloc failure on every alloc, except when mark-and-sweep
- * is running.
- */
- if (heap->ms_prevent_count == 0) {
- DUK_DDD(DUK_DDDPRINT("gc torture enabled, pretend that first alloc attempt fails"));
- res = NULL;
- DUK_UNREF(res);
- goto skip_attempt;
- }
-#endif
- res = heap->alloc_func(heap->heap_udata, size);
- if (DUK_LIKELY(res || size == 0)) {
- /* For zero size allocations NULL is allowed. */
- return res;
+ if (size == 0) {
+ DUK_D(DUK_DPRINT("zero size alloc in slow path, return NULL"));
+ return NULL;
}
-#if defined(DUK_USE_GC_TORTURE)
- skip_attempt:
-#endif
- DUK_D(DUK_DPRINT("first alloc attempt failed, attempt to gc and retry"));
+ DUK_D(DUK_DPRINT("first alloc attempt failed or voluntary GC limit reached, attempt to gc and retry"));
#if 0
/*
- * Avoid a GC if GC is already running. This can happen at a late
- * stage in a GC when we try to e.g. resize the stringtable
- * or compact objects.
- *
- * NOTE: explicit handling isn't actually be needed: if the GC is
- * not allowed, duk_heap_mark_and_sweep() will reject it for every
- * attempt in the loop below, resulting in a NULL same as here.
+ * If GC is already running there is no point in attempting a GC
+ * because it will be skipped. This could be checked for explicitly,
+ * but it isn't actually needed: the loop below will eventually
+ * fail resulting in a NULL.
*/
if (heap->ms_prevent_count != 0) {
@@ -50587,10 +53626,12 @@ DUK_INTERNAL void *duk_heap_mem_alloc(duk_heap *heap, duk_size_t size) {
duk_heap_mark_and_sweep(heap, flags);
+ DUK_ASSERT(size > 0);
res = heap->alloc_func(heap->heap_udata, size);
- if (res) {
+ if (res != NULL) {
DUK_D(DUK_DPRINT("duk_heap_mem_alloc() succeeded after gc (pass %ld), alloc size %ld",
- (long) (i + 1), (long) size));
+ (long) (i + 1),
+ (long) size));
return res;
}
}
@@ -50599,10 +53640,56 @@ DUK_INTERNAL void *duk_heap_mem_alloc(duk_heap *heap, duk_size_t size) {
return NULL;
}
-DUK_INTERNAL void *duk_heap_mem_alloc_zeroed(duk_heap *heap, duk_size_t size) {
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void *duk_heap_mem_alloc(duk_heap *heap, duk_size_t size) {
void *res;
DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->alloc_func != NULL);
+ DUK_ASSERT_DISABLE(size >= 0);
+
+#if defined(DUK_USE_VOLUNTARY_GC)
+ /* Voluntary periodic GC (if enabled). */
+ if (DUK_UNLIKELY(--(heap)->ms_trigger_counter < 0)) {
+ goto slowpath;
+ }
+#endif
+
+#if defined(DUK_USE_GC_TORTURE)
+ /* Simulate alloc failure on every alloc, except when mark-and-sweep
+ * is running.
+ */
+ if (heap->ms_prevent_count == 0) {
+ DUK_DDD(DUK_DDDPRINT("gc torture enabled, pretend that first alloc attempt fails"));
+ res = NULL;
+ DUK_UNREF(res);
+ goto slowpath;
+ }
+#endif
+
+ /* Zero-size allocation should happen very rarely (if at all), so
+ * don't check zero size on NULL; handle it in the slow path
+ * instead. This reduces size of inlined code.
+ */
+ res = heap->alloc_func(heap->heap_udata, size);
+ if (DUK_LIKELY(res != NULL)) {
+ return res;
+ }
+
+slowpath:
+
+ if (size == 0) {
+ DUK_D(DUK_DPRINT("first alloc attempt returned NULL for zero size alloc, use slow path to deal with it"));
+ } else {
+ DUK_D(DUK_DPRINT("first alloc attempt failed, attempt to gc and retry"));
+ }
+ return duk__heap_mem_alloc_slowpath(heap, size);
+}
+
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void *duk_heap_mem_alloc_zeroed(duk_heap *heap, duk_size_t size) {
+ void *res;
+
+ DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->alloc_func != NULL);
DUK_ASSERT_DISABLE(size >= 0);
res = DUK_ALLOC(heap, size);
@@ -50612,24 +53699,37 @@ DUK_INTERNAL void *duk_heap_mem_alloc_zeroed(duk_heap *heap, duk_size_t size) {
return res;
}
-DUK_INTERNAL void *duk_heap_mem_alloc_checked(duk_hthread *thr, duk_size_t size) {
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void *duk_heap_mem_alloc_checked(duk_hthread *thr, duk_size_t size) {
void *res;
DUK_ASSERT(thr != NULL);
+ DUK_ASSERT(thr->heap != NULL);
+ DUK_ASSERT(thr->heap->alloc_func != NULL);
+
res = duk_heap_mem_alloc(thr->heap, size);
- if (DUK_LIKELY(res != NULL || size == 0)) {
+ if (DUK_LIKELY(res != NULL)) {
+ return res;
+ } else if (size == 0) {
+ DUK_ASSERT(res == NULL);
return res;
}
DUK_ERROR_ALLOC_FAILED(thr);
DUK_WO_NORETURN(return NULL;);
}
-DUK_INTERNAL void *duk_heap_mem_alloc_checked_zeroed(duk_hthread *thr, duk_size_t size) {
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void *duk_heap_mem_alloc_checked_zeroed(duk_hthread *thr, duk_size_t size) {
void *res;
DUK_ASSERT(thr != NULL);
- res = duk_heap_mem_alloc_zeroed(thr->heap, size);
- if (DUK_LIKELY(res != NULL || size == 0)) {
+ DUK_ASSERT(thr->heap != NULL);
+ DUK_ASSERT(thr->heap->alloc_func != NULL);
+
+ res = duk_heap_mem_alloc(thr->heap, size);
+ if (DUK_LIKELY(res != NULL)) {
+ duk_memzero(res, size);
+ return res;
+ } else if (size == 0) {
+ DUK_ASSERT(res == NULL);
return res;
}
DUK_ERROR_ALLOC_FAILED(thr);
@@ -50637,46 +53737,20 @@ DUK_INTERNAL void *duk_heap_mem_alloc_checked_zeroed(duk_hthread *thr, duk_size_
}
/*
- * Reallocate memory with garbage collection
+ * Reallocate memory with garbage collection.
*/
-DUK_INTERNAL void *duk_heap_mem_realloc(duk_heap *heap, void *ptr, duk_size_t newsize) {
+/* Slow path: voluntary GC triggered, first realloc attempt failed, or zero size. */
+DUK_LOCAL DUK_NOINLINE_PERF DUK_COLD void *duk__heap_mem_realloc_slowpath(duk_heap *heap, void *ptr, duk_size_t newsize) {
void *res;
duk_small_int_t i;
DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->realloc_func != NULL);
/* ptr may be NULL */
DUK_ASSERT_DISABLE(newsize >= 0);
- /*
- * Voluntary periodic GC (if enabled)
- */
-
- DUK__VOLUNTARY_PERIODIC_GC(heap);
-
- /*
- * First attempt
- */
-
-#if defined(DUK_USE_GC_TORTURE)
- /* Simulate alloc failure on every realloc, except when mark-and-sweep
- * is running.
- */
- if (heap->ms_prevent_count == 0) {
- DUK_DDD(DUK_DDDPRINT("gc torture enabled, pretend that first realloc attempt fails"));
- res = NULL;
- DUK_UNREF(res);
- goto skip_attempt;
- }
-#endif
- res = heap->realloc_func(heap->heap_udata, ptr, newsize);
- if (DUK_LIKELY(res || newsize == 0)) {
- /* For zero size allocations NULL is allowed. */
- return res;
- }
-#if defined(DUK_USE_GC_TORTURE)
- skip_attempt:
-#endif
+ /* Unlike for malloc(), zero size NULL result check happens at the call site. */
DUK_D(DUK_DPRINT("first realloc attempt failed, attempt to gc and retry"));
@@ -50708,9 +53782,10 @@ DUK_INTERNAL void *duk_heap_mem_realloc(duk_heap *heap, void *ptr, duk_size_t ne
duk_heap_mark_and_sweep(heap, flags);
res = heap->realloc_func(heap->heap_udata, ptr, newsize);
- if (res || newsize == 0) {
+ if (res != NULL || newsize == 0) {
DUK_D(DUK_DPRINT("duk_heap_mem_realloc() succeeded after gc (pass %ld), alloc size %ld",
- (long) (i + 1), (long) newsize));
+ (long) (i + 1),
+ (long) newsize));
return res;
}
}
@@ -50719,48 +53794,67 @@ DUK_INTERNAL void *duk_heap_mem_realloc(duk_heap *heap, void *ptr, duk_size_t ne
return NULL;
}
-/*
- * Reallocate memory with garbage collection, using a callback to provide
- * the current allocated pointer. This variant is used when a mark-and-sweep
- * (e.g. finalizers) might change the original pointer.
- */
-
-DUK_INTERNAL void *duk_heap_mem_realloc_indirect(duk_heap *heap, duk_mem_getptr cb, void *ud, duk_size_t newsize) {
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void *duk_heap_mem_realloc(duk_heap *heap, void *ptr, duk_size_t newsize) {
void *res;
- duk_small_int_t i;
DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->realloc_func != NULL);
+ /* ptr may be NULL */
DUK_ASSERT_DISABLE(newsize >= 0);
- /*
- * Voluntary periodic GC (if enabled)
- */
-
- DUK__VOLUNTARY_PERIODIC_GC(heap);
-
- /*
- * First attempt
- */
+#if defined(DUK_USE_VOLUNTARY_GC)
+ /* Voluntary periodic GC (if enabled). */
+ if (DUK_UNLIKELY(--(heap)->ms_trigger_counter < 0)) {
+ goto gc_retry;
+ }
+#endif
#if defined(DUK_USE_GC_TORTURE)
/* Simulate alloc failure on every realloc, except when mark-and-sweep
* is running.
*/
if (heap->ms_prevent_count == 0) {
- DUK_DDD(DUK_DDDPRINT("gc torture enabled, pretend that first indirect realloc attempt fails"));
+ DUK_DDD(DUK_DDDPRINT("gc torture enabled, pretend that first realloc attempt fails"));
res = NULL;
DUK_UNREF(res);
- goto skip_attempt;
+ goto gc_retry;
}
#endif
- res = heap->realloc_func(heap->heap_udata, cb(heap, ud), newsize);
- if (DUK_LIKELY(res || newsize == 0)) {
- /* For zero size allocations NULL is allowed. */
+
+ res = heap->realloc_func(heap->heap_udata, ptr, newsize);
+ if (DUK_LIKELY(res != NULL) || newsize == 0) {
+ if (res != NULL && newsize == 0) {
+ DUK_DD(DUK_DDPRINT("first realloc attempt returned NULL for zero size realloc, accept and return NULL"));
+ }
return res;
+ } else {
+ goto gc_retry;
}
-#if defined(DUK_USE_GC_TORTURE)
- skip_attempt:
-#endif
+ /* Never here. */
+
+gc_retry:
+ return duk__heap_mem_realloc_slowpath(heap, ptr, newsize);
+}
+
+/*
+ * Reallocate memory with garbage collection, using a callback to provide
+ * the current allocated pointer. This variant is used when a mark-and-sweep
+ * (e.g. finalizers) might change the original pointer.
+ */
+
+/* Slow path: voluntary GC triggered, first realloc attempt failed, or zero size. */
+DUK_LOCAL DUK_NOINLINE_PERF DUK_COLD void *duk__heap_mem_realloc_indirect_slowpath(duk_heap *heap,
+ duk_mem_getptr cb,
+ void *ud,
+ duk_size_t newsize) {
+ void *res;
+ duk_small_int_t i;
+
+ DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->realloc_func != NULL);
+ DUK_ASSERT_DISABLE(newsize >= 0);
+
+ /* Unlike for malloc(), zero size NULL result check happens at the call site. */
DUK_D(DUK_DPRINT("first indirect realloc attempt failed, attempt to gc and retry"));
@@ -50802,7 +53896,8 @@ DUK_INTERNAL void *duk_heap_mem_realloc_indirect(duk_heap *heap, duk_mem_getptr
ptr_post = cb(heap, ud);
if (ptr_pre != ptr_post) {
DUK_DD(DUK_DDPRINT("realloc base pointer changed by mark-and-sweep: %p -> %p",
- (void *) ptr_pre, (void *) ptr_post));
+ (void *) ptr_pre,
+ (void *) ptr_post));
}
#endif
@@ -50811,9 +53906,10 @@ DUK_INTERNAL void *duk_heap_mem_realloc_indirect(duk_heap *heap, duk_mem_getptr
*/
res = heap->realloc_func(heap->heap_udata, cb(heap, ud), newsize);
- if (res || newsize == 0) {
+ if (res != NULL || newsize == 0) {
DUK_D(DUK_DPRINT("duk_heap_mem_realloc_indirect() succeeded after gc (pass %ld), alloc size %ld",
- (long) (i + 1), (long) newsize));
+ (long) (i + 1),
+ (long) newsize));
return res;
}
}
@@ -50822,12 +53918,58 @@ DUK_INTERNAL void *duk_heap_mem_realloc_indirect(duk_heap *heap, duk_mem_getptr
return NULL;
}
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void *duk_heap_mem_realloc_indirect(duk_heap *heap,
+ duk_mem_getptr cb,
+ void *ud,
+ duk_size_t newsize) {
+ void *res;
+
+ DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->realloc_func != NULL);
+ DUK_ASSERT_DISABLE(newsize >= 0);
+
+#if defined(DUK_USE_VOLUNTARY_GC)
+ /* Voluntary periodic GC (if enabled). */
+ if (DUK_UNLIKELY(--(heap)->ms_trigger_counter < 0)) {
+ goto gc_retry;
+ }
+#endif
+
+#if defined(DUK_USE_GC_TORTURE)
+ /* Simulate alloc failure on every realloc, except when mark-and-sweep
+ * is running.
+ */
+ if (heap->ms_prevent_count == 0) {
+ DUK_DDD(DUK_DDDPRINT("gc torture enabled, pretend that first indirect realloc attempt fails"));
+ res = NULL;
+ DUK_UNREF(res);
+ goto gc_retry;
+ }
+#endif
+
+ res = heap->realloc_func(heap->heap_udata, cb(heap, ud), newsize);
+ if (DUK_LIKELY(res != NULL) || newsize == 0) {
+ if (res != NULL && newsize == 0) {
+ DUK_DD(DUK_DDPRINT(
+ "first indirect realloc attempt returned NULL for zero size realloc, accept and return NULL"));
+ }
+ return res;
+ } else {
+ goto gc_retry;
+ }
+ /* Never here. */
+
+gc_retry:
+ return duk__heap_mem_realloc_indirect_slowpath(heap, cb, ud, newsize);
+}
+
/*
* Free memory
*/
-DUK_INTERNAL void duk_heap_mem_free(duk_heap *heap, void *ptr) {
+DUK_INTERNAL DUK_INLINE_PERF DUK_HOT void duk_heap_mem_free(duk_heap *heap, void *ptr) {
DUK_ASSERT(heap != NULL);
+ DUK_ASSERT(heap->free_func != NULL);
/* ptr may be NULL */
/* Must behave like a no-op with NULL and any pointer returned from
@@ -50840,9 +53982,6 @@ DUK_INTERNAL void duk_heap_mem_free(duk_heap *heap, void *ptr) {
* No need to update voluntary GC counter either.
*/
}
-
-/* automatic undefs */
-#undef DUK__VOLUNTARY_PERIODIC_GC
/*
* Support functions for duk_heap.
*/
@@ -50909,7 +54048,7 @@ DUK_INTERNAL void duk_heap_remove_from_heap_allocated(duk_heap *heap, duk_heaphd
;
}
}
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
#if defined(DUK_USE_FINALIZER_SUPPORT)
DUK_INTERNAL void duk_heap_insert_into_finalize_list(duk_heap *heap, duk_heaphdr *hdr) {
@@ -50928,7 +54067,7 @@ DUK_INTERNAL void duk_heap_insert_into_finalize_list(duk_heap *heap, duk_heaphdr
DUK_HEAPHDR_ASSERT_LINKS(heap, root);
heap->finalize_list = hdr;
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
#if defined(DUK_USE_FINALIZER_SUPPORT)
DUK_INTERNAL void duk_heap_remove_from_finalize_list(duk_heap *heap, duk_heaphdr *hdr) {
@@ -50962,7 +54101,7 @@ DUK_INTERNAL void duk_heap_remove_from_finalize_list(duk_heap *heap, duk_heaphdr
} else {
DUK_ASSERT(hdr != heap->finalize_list);
for (;;) {
- DUK_ASSERT(curr != NULL); /* Caller responsibility. */
+ DUK_ASSERT(curr != NULL); /* Caller responsibility. */
next = DUK_HEAPHDR_GET_NEXT(heap, curr);
if (next == hdr) {
@@ -50974,7 +54113,7 @@ DUK_INTERNAL void duk_heap_remove_from_finalize_list(duk_heap *heap, duk_heaphdr
}
#endif
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL duk_bool_t duk_heap_in_heap_allocated(duk_heap *heap, duk_heaphdr *ptr) {
@@ -50988,7 +54127,7 @@ DUK_INTERNAL duk_bool_t duk_heap_in_heap_allocated(duk_heap *heap, duk_heaphdr *
}
return 0;
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
#if defined(DUK_USE_INTERRUPT_COUNTER)
DUK_INTERNAL void duk_heap_switch_thread(duk_heap *heap, duk_hthread *new_thr) {
@@ -51021,9 +54160,9 @@ DUK_INTERNAL void duk_heap_switch_thread(duk_heap *heap, duk_hthread *new_thr) {
DUK_DD(DUK_DDPRINT("switch thread, new thread is NULL, no interrupt counter changes"));
}
- heap->curr_thread = new_thr; /* may be NULL */
+ heap->curr_thread = new_thr; /* may be NULL */
}
-#endif /* DUK_USE_INTERRUPT_COUNTER */
+#endif /* DUK_USE_INTERRUPT_COUNTER */
#if defined(DUK_USE_ASSERTIONS)
DUK_INTERNAL void duk_heap_assert_valid(duk_heap *heap) {
@@ -51192,7 +54331,7 @@ DUK_INTERNAL void duk_hobject_refcount_finalize_norz(duk_heap *heap, duk_hobject
} else if (DUK_HOBJECT_IS_OBJENV(h)) {
duk_hobjenv *e = (duk_hobjenv *) h;
DUK_HOBJENV_ASSERT_VALID(e);
- DUK_ASSERT(e->target != NULL); /* Required for object environments. */
+ DUK_ASSERT(e->target != NULL); /* Required for object environments. */
DUK_HOBJECT_DECREF_NORZ(thr, e->target);
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
} else if (DUK_HOBJECT_IS_BUFOBJ(h)) {
@@ -51200,7 +54339,7 @@ DUK_INTERNAL void duk_hobject_refcount_finalize_norz(duk_heap *heap, duk_hobject
DUK_HBUFOBJ_ASSERT_VALID(b);
DUK_HBUFFER_DECREF_NORZ_ALLOWNULL(thr, (duk_hbuffer *) b->buf);
DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, (duk_hobject *) b->buf_prop);
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
} else if (DUK_HOBJECT_IS_BOUNDFUNC(h)) {
duk_hboundfunc *f = (duk_hboundfunc *) (void *) h;
DUK_HBOUNDFUNC_ASSERT_VALID(f);
@@ -51213,7 +54352,7 @@ DUK_INTERNAL void duk_hobject_refcount_finalize_norz(duk_heap *heap, duk_hobject
DUK_HPROXY_ASSERT_VALID(p);
DUK_HOBJECT_DECREF_NORZ(thr, p->target);
DUK_HOBJECT_DECREF_NORZ(thr, p->handler);
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
} else if (DUK_HOBJECT_IS_THREAD(h)) {
duk_hthread *t = (duk_hthread *) h;
duk_activation *act;
@@ -51234,13 +54373,12 @@ DUK_INTERNAL void duk_hobject_refcount_finalize_norz(duk_heap *heap, duk_hobject
#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, (duk_hobject *) act->prev_caller);
#endif
-#if 0 /* nothing now */
+#if 0 /* nothing now */
for (cat = act->cat; cat != NULL; cat = cat->parent) {
}
#endif
}
-
for (i = 0; i < DUK_NUM_BUILTINS; i++) {
DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, (duk_hobject *) t->builtins[i]);
}
@@ -51325,7 +54463,7 @@ DUK_LOCAL void duk__refcount_free_pending(duk_heap *heap) {
curr = heap->refzero_list;
DUK_ASSERT(curr != NULL);
- DUK_ASSERT(DUK_HEAPHDR_GET_PREV(heap, curr) == NULL); /* We're called on initial insert only. */
+ DUK_ASSERT(DUK_HEAPHDR_GET_PREV(heap, curr) == NULL); /* We're called on initial insert only. */
/* curr->next is GARBAGE. */
do {
@@ -51338,7 +54476,7 @@ DUK_LOCAL void duk__refcount_free_pending(duk_heap *heap) {
#endif
DUK_ASSERT(curr != NULL);
- DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT); /* currently, always the case */
+ DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(curr) == DUK_HTYPE_OBJECT); /* currently, always the case */
/* FINALIZED may be set; don't care about flags here. */
/* Refcount finalize 'curr'. Refzero_list must be non-NULL
@@ -51348,11 +54486,10 @@ DUK_LOCAL void duk__refcount_free_pending(duk_heap *heap) {
duk_hobject_refcount_finalize_norz(heap, (duk_hobject *) curr);
prev = DUK_HEAPHDR_GET_PREV(heap, curr);
- DUK_ASSERT((prev == NULL && heap->refzero_list == curr) || \
- (prev != NULL && heap->refzero_list != curr));
+ DUK_ASSERT((prev == NULL && heap->refzero_list == curr) || (prev != NULL && heap->refzero_list != curr));
/* prev->next is intentionally not updated and is garbage. */
- duk_free_hobject(heap, (duk_hobject *) curr); /* Invalidates 'curr'. */
+ duk_free_hobject(heap, (duk_hobject *) curr); /* Invalidates 'curr'. */
curr = prev;
} while (curr != NULL);
@@ -51428,7 +54565,7 @@ DUK_LOCAL DUK_INLINE void duk__refcount_refzero_hobject(duk_heap *heap, duk_hobj
return;
}
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/* No need to finalize, free object via refzero_list. */
@@ -51472,7 +54609,7 @@ DUK_LOCAL DUK_INLINE void duk__refcount_refzero_hobject(duk_heap *heap, duk_hobj
DUK_INTERNAL DUK_ALWAYS_INLINE void duk_refzero_check_fast(duk_hthread *thr) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
- DUK_ASSERT(thr->heap->refzero_list == NULL); /* Processed to completion inline. */
+ DUK_ASSERT(thr->heap->refzero_list == NULL); /* Processed to completion inline. */
if (DUK_UNLIKELY(thr->heap->finalize_list != NULL)) {
duk_heap_process_finalize_list(thr->heap);
@@ -51482,13 +54619,13 @@ DUK_INTERNAL DUK_ALWAYS_INLINE void duk_refzero_check_fast(duk_hthread *thr) {
DUK_INTERNAL void duk_refzero_check_slow(duk_hthread *thr) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
- DUK_ASSERT(thr->heap->refzero_list == NULL); /* Processed to completion inline. */
+ DUK_ASSERT(thr->heap->refzero_list == NULL); /* Processed to completion inline. */
if (DUK_UNLIKELY(thr->heap->finalize_list != NULL)) {
duk_heap_process_finalize_list(thr->heap);
}
}
-#endif /* DUK_USE_FINALIZER_SUPPORT */
+#endif /* DUK_USE_FINALIZER_SUPPORT */
/*
* Refzero processing for duk_hstring.
@@ -51548,7 +54685,8 @@ DUK_LOCAL DUK_INLINE void duk__refcount_refzero_hbuffer(duk_heap *heap, duk_hbuf
* The suppress condition is important to performance.
*/
-#define DUK__RZ_SUPPRESS_ASSERT1() do { \
+#define DUK__RZ_SUPPRESS_ASSERT1() \
+ do { \
DUK_ASSERT(thr != NULL); \
DUK_ASSERT(thr->heap != NULL); \
/* When mark-and-sweep runs, heap_thread must exist. */ \
@@ -51570,32 +54708,41 @@ DUK_LOCAL DUK_INLINE void duk__refcount_refzero_hbuffer(duk_heap *heap, duk_hbuf
} while (0)
#if defined(DUK_USE_DEBUGGER_SUPPORT)
-#define DUK__RZ_SUPPRESS_ASSERT2() do { \
+#define DUK__RZ_SUPPRESS_ASSERT2() \
+ do { \
/* When debugger is paused, ms_running is set. */ \
DUK_ASSERT(!DUK_HEAP_HAS_DEBUGGER_PAUSED(thr->heap) || thr->heap->ms_running != 0); \
} while (0)
-#define DUK__RZ_SUPPRESS_COND() (heap->ms_running != 0)
+#define DUK__RZ_SUPPRESS_COND() (heap->ms_running != 0)
#else
-#define DUK__RZ_SUPPRESS_ASSERT2() do { } while (0)
-#define DUK__RZ_SUPPRESS_COND() (heap->ms_running != 0)
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#define DUK__RZ_SUPPRESS_ASSERT2() \
+ do { \
+ } while (0)
+#define DUK__RZ_SUPPRESS_COND() (heap->ms_running != 0)
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
-#define DUK__RZ_SUPPRESS_CHECK() do { \
+#define DUK__RZ_SUPPRESS_CHECK() \
+ do { \
DUK__RZ_SUPPRESS_ASSERT1(); \
DUK__RZ_SUPPRESS_ASSERT2(); \
if (DUK_UNLIKELY(DUK__RZ_SUPPRESS_COND())) { \
- DUK_DDD(DUK_DDDPRINT("refzero handling suppressed (not even queued) when mark-and-sweep running, object: %p", (void *) h)); \
+ DUK_DDD( \
+ DUK_DDDPRINT("refzero handling suppressed (not even queued) when mark-and-sweep running, object: %p", \
+ (void *) h)); \
return; \
} \
} while (0)
-#define DUK__RZ_STRING() do { \
+#define DUK__RZ_STRING() \
+ do { \
duk__refcount_refzero_hstring(heap, (duk_hstring *) h); \
} while (0)
-#define DUK__RZ_BUFFER() do { \
+#define DUK__RZ_BUFFER() \
+ do { \
duk__refcount_refzero_hbuffer(heap, (duk_hbuffer *) h); \
} while (0)
-#define DUK__RZ_OBJECT() do { \
+#define DUK__RZ_OBJECT() \
+ do { \
duk__refcount_refzero_hobject(heap, (duk_hobject *) h, skip_free_pending); \
} while (0)
@@ -51716,7 +54863,7 @@ DUK_INTERNAL void duk_tval_incref(duk_tval *tv) {
DUK_ASSERT(DUK_HEAPHDR_HTYPE_VALID(h));
DUK_ASSERT_DISABLE(h->h_refcount >= 0);
DUK_HEAPHDR_PREINC_REFCOUNT(h);
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(h) != 0); /* No wrapping. */
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT(h) != 0); /* No wrapping. */
}
}
@@ -51759,9 +54906,10 @@ DUK_INTERNAL void duk_tval_decref_norz(duk_hthread *thr, duk_tval *tv) {
#endif
}
}
-#endif /* !DUK_USE_FAST_REFCOUNT_DEFAULT */
+#endif /* !DUK_USE_FAST_REFCOUNT_DEFAULT */
-#define DUK__DECREF_ASSERTS() do { \
+#define DUK__DECREF_ASSERTS() \
+ do { \
DUK_ASSERT(thr != NULL); \
DUK_ASSERT(thr->heap != NULL); \
DUK_ASSERT(h != NULL); \
@@ -51769,14 +54917,16 @@ DUK_INTERNAL void duk_tval_decref_norz(duk_hthread *thr, duk_tval *tv) {
DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) >= 1); \
} while (0)
#if defined(DUK_USE_ROM_OBJECTS)
-#define DUK__INCREF_SHARED() do { \
+#define DUK__INCREF_SHARED() \
+ do { \
if (DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) h)) { \
return; \
} \
DUK_HEAPHDR_PREINC_REFCOUNT((duk_heaphdr *) h); \
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) != 0); /* No wrapping. */ \
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) != 0); /* No wrapping. */ \
} while (0)
-#define DUK__DECREF_SHARED() do { \
+#define DUK__DECREF_SHARED() \
+ do { \
if (DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) h)) { \
return; \
} \
@@ -51785,11 +54935,13 @@ DUK_INTERNAL void duk_tval_decref_norz(duk_hthread *thr, duk_tval *tv) {
} \
} while (0)
#else
-#define DUK__INCREF_SHARED() do { \
+#define DUK__INCREF_SHARED() \
+ do { \
DUK_HEAPHDR_PREINC_REFCOUNT((duk_heaphdr *) h); \
- DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) != 0); /* No wrapping. */ \
+ DUK_ASSERT(DUK_HEAPHDR_GET_REFCOUNT((duk_heaphdr *) h) != 0); /* No wrapping. */ \
} while (0)
-#define DUK__DECREF_SHARED() do { \
+#define DUK__DECREF_SHARED() \
+ do { \
if (DUK_HEAPHDR_PREDEC_REFCOUNT((duk_heaphdr *) h) != 0) { \
return; \
} \
@@ -51823,9 +54975,9 @@ DUK_INTERNAL void duk_heaphdr_decref_norz(duk_hthread *thr, duk_heaphdr *h) {
DUK__DECREF_SHARED();
duk_heaphdr_refzero_norz(thr, h);
}
-#endif /* !DUK_USE_FAST_REFCOUNT_DEFAULT */
+#endif /* !DUK_USE_FAST_REFCOUNT_DEFAULT */
-#if 0 /* Not needed. */
+#if 0 /* Not needed. */
DUK_INTERNAL void duk_hstring_decref(duk_hthread *thr, duk_hstring *h) {
DUK__DECREF_ASSERTS();
DUK__DECREF_SHARED();
@@ -51858,11 +55010,11 @@ DUK_INTERNAL void duk_hobject_decref_norz(duk_hthread *thr, duk_hobject *h) {
}
#endif
-#else /* DUK_USE_REFERENCE_COUNTING */
+#else /* DUK_USE_REFERENCE_COUNTING */
/* no refcounting */
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
/* automatic undefs */
#undef DUK__DECREF_ASSERTS
@@ -51900,8 +55052,8 @@ DUK_INTERNAL void duk_heap_strcache_string_remove(duk_heap *heap, duk_hstring *h
for (i = 0; i < DUK_HEAP_STRCACHE_SIZE; i++) {
duk_strcache_entry *c = heap->strcache + i;
if (c->h == h) {
- DUK_DD(DUK_DDPRINT("deleting weak strcache reference to hstring %p from heap %p",
- (void *) h, (void *) heap));
+ DUK_DD(
+ DUK_DDPRINT("deleting weak strcache reference to hstring %p from heap %p", (void *) h, (void *) heap));
c->h = NULL;
/* XXX: the string shouldn't appear twice, but we now loop to the
@@ -52011,7 +55163,8 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
*/
DUK_DDD(DUK_DDDPRINT("non-ascii string %p, char_offset=%ld, clen=%ld, blen=%ld",
- (void *) h, (long) char_offset,
+ (void *) h,
+ (long) char_offset,
(long) DUK_HSTRING_GET_CHARLEN(h),
(long) DUK_HSTRING_GET_BYTELEN(h)));
@@ -52025,7 +55178,10 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
for (i = 0; i < DUK_HEAP_STRCACHE_SIZE; i++) {
duk_strcache_entry *c = heap->strcache + i;
DUK_DDD(DUK_DDDPRINT(" [%ld] -> h=%p, cidx=%ld, bidx=%ld",
- (long) i, (void *) c->h, (long) c->cidx, (long) c->bidx));
+ (long) i,
+ (void *) c->h,
+ (long) c->cidx,
+ (long) c->bidx));
}
#endif
@@ -52049,7 +55205,8 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
DUK_ASSERT(DUK_HSTRING_GET_CHARLEN(h) >= char_offset);
dist_start = char_offset;
dist_end = char_length - char_offset;
- dist_sce = 0; DUK_UNREF(dist_sce); /* initialize for debug prints, needed if sce==NULL */
+ dist_sce = 0;
+ DUK_UNREF(dist_sce); /* initialize for debug prints, needed if sce==NULL */
p_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h);
p_end = (const duk_uint8_t *) (p_start + DUK_HSTRING_GET_BYTELEN(h));
@@ -52062,14 +55219,15 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
DUK_DDD(DUK_DDDPRINT("non-ascii string, use_cache=%ld, sce=%p:%ld:%ld, "
"dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
"scan forwards from sce",
- (long) use_cache, (void *) (sce ? sce->h : NULL),
+ (long) use_cache,
+ (void *) (sce ? sce->h : NULL),
(sce ? (long) sce->cidx : (long) -1),
(sce ? (long) sce->bidx : (long) -1),
- (long) dist_start, (long) dist_end, (long) dist_sce));
+ (long) dist_start,
+ (long) dist_end,
+ (long) dist_sce));
- p_found = duk__scan_forwards(p_start + sce->bidx,
- p_end,
- dist_sce);
+ p_found = duk__scan_forwards(p_start + sce->bidx, p_end, dist_sce);
goto scan_done;
}
} else {
@@ -52078,14 +55236,15 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
DUK_DDD(DUK_DDDPRINT("non-ascii string, use_cache=%ld, sce=%p:%ld:%ld, "
"dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
"scan backwards from sce",
- (long) use_cache, (void *) (sce ? sce->h : NULL),
+ (long) use_cache,
+ (void *) (sce ? sce->h : NULL),
(sce ? (long) sce->cidx : (long) -1),
(sce ? (long) sce->bidx : (long) -1),
- (long) dist_start, (long) dist_end, (long) dist_sce));
+ (long) dist_start,
+ (long) dist_end,
+ (long) dist_sce));
- p_found = duk__scan_backwards(p_start + sce->bidx,
- p_start,
- dist_sce);
+ p_found = duk__scan_backwards(p_start + sce->bidx, p_start, dist_sce);
goto scan_done;
}
}
@@ -52097,29 +55256,31 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
DUK_DDD(DUK_DDDPRINT("non-ascii string, use_cache=%ld, sce=%p:%ld:%ld, "
"dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
"scan forwards from string start",
- (long) use_cache, (void *) (sce ? sce->h : NULL),
+ (long) use_cache,
+ (void *) (sce ? sce->h : NULL),
(sce ? (long) sce->cidx : (long) -1),
(sce ? (long) sce->bidx : (long) -1),
- (long) dist_start, (long) dist_end, (long) dist_sce));
+ (long) dist_start,
+ (long) dist_end,
+ (long) dist_sce));
- p_found = duk__scan_forwards(p_start,
- p_end,
- dist_start);
+ p_found = duk__scan_forwards(p_start, p_end, dist_start);
} else {
DUK_DDD(DUK_DDDPRINT("non-ascii string, use_cache=%ld, sce=%p:%ld:%ld, "
"dist_start=%ld, dist_end=%ld, dist_sce=%ld => "
"scan backwards from string end",
- (long) use_cache, (void *) (sce ? sce->h : NULL),
+ (long) use_cache,
+ (void *) (sce ? sce->h : NULL),
(sce ? (long) sce->cidx : (long) -1),
(sce ? (long) sce->bidx : (long) -1),
- (long) dist_start, (long) dist_end, (long) dist_sce));
+ (long) dist_start,
+ (long) dist_end,
+ (long) dist_sce));
- p_found = duk__scan_backwards(p_end,
- p_start,
- dist_end);
+ p_found = duk__scan_backwards(p_end, p_start, dist_end);
}
- scan_done:
+scan_done:
if (DUK_UNLIKELY(p_found == NULL)) {
/* Scan error: this shouldn't normally happen; it could happen if
@@ -52130,11 +55291,10 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
}
DUK_ASSERT(p_found >= p_start);
- DUK_ASSERT(p_found <= p_end); /* may be equal */
+ DUK_ASSERT(p_found <= p_end); /* may be equal */
byte_offset = (duk_uint32_t) (p_found - p_start);
- DUK_DDD(DUK_DDDPRINT("-> string %p, cidx %ld -> bidx %ld",
- (void *) h, (long) char_offset, (long) byte_offset));
+ DUK_DDD(DUK_DDDPRINT("-> string %p, cidx %ld -> bidx %ld", (void *) h, (long) char_offset, (long) byte_offset));
/*
* Update cache entry (allocating if necessary), and move the
@@ -52144,7 +55304,7 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
if (use_cache) {
/* update entry, allocating if necessary */
if (!sce) {
- sce = heap->strcache + DUK_HEAP_STRCACHE_SIZE - 1; /* take last entry */
+ sce = heap->strcache + DUK_HEAP_STRCACHE_SIZE - 1; /* take last entry */
sce->h = h;
}
DUK_ASSERT(sce != NULL);
@@ -52174,14 +55334,17 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
for (i = 0; i < DUK_HEAP_STRCACHE_SIZE; i++) {
duk_strcache_entry *c = heap->strcache + i;
DUK_DDD(DUK_DDDPRINT(" [%ld] -> h=%p, cidx=%ld, bidx=%ld",
- (long) i, (void *) c->h, (long) c->cidx, (long) c->bidx));
+ (long) i,
+ (void *) c->h,
+ (long) c->cidx,
+ (long) c->bidx));
}
#endif
}
return byte_offset;
- scan_error:
+scan_error:
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return 0;);
}
@@ -52200,16 +55363,16 @@ DUK_INTERNAL duk_uint_fast32_t duk_heap_strcache_offset_char2byte(duk_hthread *t
#endif
#if defined(DUK_USE_STRTAB_PTRCOMP)
-#define DUK__HEAPPTR_ENC16(heap,ptr) DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (ptr))
-#define DUK__HEAPPTR_DEC16(heap,val) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (val))
-#define DUK__GET_STRTABLE(heap) ((heap)->strtable16)
+#define DUK__HEAPPTR_ENC16(heap, ptr) DUK_USE_HEAPPTR_ENC16((heap)->heap_udata, (ptr))
+#define DUK__HEAPPTR_DEC16(heap, val) DUK_USE_HEAPPTR_DEC16((heap)->heap_udata, (val))
+#define DUK__GET_STRTABLE(heap) ((heap)->strtable16)
#else
-#define DUK__HEAPPTR_ENC16(heap,ptr) (ptr)
-#define DUK__HEAPPTR_DEC16(heap,val) (val)
-#define DUK__GET_STRTABLE(heap) ((heap)->strtable)
+#define DUK__HEAPPTR_ENC16(heap, ptr) (ptr)
+#define DUK__HEAPPTR_DEC16(heap, val) (val)
+#define DUK__GET_STRTABLE(heap) ((heap)->strtable)
#endif
-#define DUK__STRTAB_U32_MAX_STRLEN 10 /* 4'294'967'295 */
+#define DUK__STRTAB_U32_MAX_STRLEN 10 /* 4'294'967'295 */
/*
* Debug dump stringtable.
@@ -52228,7 +55391,7 @@ DUK_INTERNAL void duk_heap_strtable_dump(duk_heap *heap) {
duk_size_t count_chain;
duk_size_t count_chain_min = DUK_SIZE_MAX;
duk_size_t count_chain_max = 0;
- duk_size_t count_len[8]; /* chain lengths from 0 to 7 */
+ duk_size_t count_len[8]; /* chain lengths from 0 to 7 */
if (heap == NULL) {
DUK_D(DUK_DPRINT("string table, heap=NULL"));
@@ -52259,15 +55422,21 @@ DUK_INTERNAL void duk_heap_strtable_dump(duk_heap *heap) {
DUK_D(DUK_DPRINT("string table, strtab=%p, count=%lu, chain min=%lu max=%lu avg=%lf: "
"counts: %lu %lu %lu %lu %lu %lu %lu %lu ...",
- (void *) heap->strtable, (unsigned long) count_total,
- (unsigned long) count_chain_min, (unsigned long) count_chain_max,
+ (void *) heap->strtable,
+ (unsigned long) count_total,
+ (unsigned long) count_chain_min,
+ (unsigned long) count_chain_max,
(double) count_total / (double) heap->st_size,
- (unsigned long) count_len[0], (unsigned long) count_len[1],
- (unsigned long) count_len[2], (unsigned long) count_len[3],
- (unsigned long) count_len[4], (unsigned long) count_len[5],
- (unsigned long) count_len[6], (unsigned long) count_len[7]));
+ (unsigned long) count_len[0],
+ (unsigned long) count_len[1],
+ (unsigned long) count_len[2],
+ (unsigned long) count_len[3],
+ (unsigned long) count_len[4],
+ (unsigned long) count_len[5],
+ (unsigned long) count_len[6],
+ (unsigned long) count_len[7]));
}
-#endif /* DUK_USE_DEBUG */
+#endif /* DUK_USE_DEBUG */
/*
* Assertion helper to ensure strtable is populated correctly.
@@ -52308,7 +55477,7 @@ DUK_LOCAL void duk__strtable_assert_checks(duk_heap *heap) {
DUK_ASSERT(count == (duk_size_t) heap->st_count);
#endif
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Allocate and initialize a duk_hstring.
@@ -52359,16 +55528,16 @@ DUK_LOCAL duk_hstring *duk__strtable_alloc_hstring(duk_heap *heap,
#endif
DUK_HEAPHDR_SET_TYPE_AND_FLAGS(&res->hdr, DUK_HTYPE_STRING, DUK_HSTRING_FLAG_EXTDATA);
- DUK_ASSERT(extdata[blen] == 0); /* Application responsibility. */
+ DUK_ASSERT(extdata[blen] == 0); /* Application responsibility. */
data = extdata;
((duk_hstring_external *) res)->extdata = extdata;
} else
-#endif /* DUK_USE_HSTRING_EXTDATA && DUK_USE_EXTSTR_INTERN_CHECK */
+#endif /* DUK_USE_HSTRING_EXTDATA && DUK_USE_EXTSTR_INTERN_CHECK */
{
duk_uint8_t *data_tmp;
/* NUL terminate for convenient C access */
- DUK_ASSERT(sizeof(duk_hstring) + blen + 1 > blen); /* No wrap, limits ensure. */
+ DUK_ASSERT(sizeof(duk_hstring) + blen + 1 > blen); /* No wrap, limits ensure. */
res = (duk_hstring *) DUK_ALLOC(heap, sizeof(duk_hstring) + blen + 1);
if (DUK_UNLIKELY(res == NULL)) {
goto alloc_error;
@@ -52427,7 +55596,7 @@ DUK_LOCAL duk_hstring *duk__strtable_alloc_hstring(duk_heap *heap,
#if defined(DUK_USE_HSTRING_LAZY_CLEN)
/* Charlen initialized to 0, updated on-the-fly. */
#else
- duk_hstring_init_charlen(res); /* Also sets ASCII flag. */
+ duk_hstring_init_charlen(res); /* Also sets ASCII flag. */
#endif
}
@@ -52440,7 +55609,7 @@ DUK_LOCAL duk_hstring *duk__strtable_alloc_hstring(duk_heap *heap,
DUK_ASSERT(res != NULL);
return res;
- alloc_error:
+alloc_error:
return NULL;
}
@@ -52469,13 +55638,13 @@ DUK_LOCAL void duk__strtable_grow_inplace(duk_heap *heap) {
DUK_ASSERT(heap != NULL);
DUK_ASSERT(heap->st_resizing == 1);
DUK_ASSERT(heap->st_size >= 2);
- DUK_ASSERT((heap->st_size & (heap->st_size - 1)) == 0); /* 2^N */
+ DUK_ASSERT((heap->st_size & (heap->st_size - 1)) == 0); /* 2^N */
DUK_ASSERT(DUK__GET_STRTABLE(heap) != NULL);
DUK_STATS_INC(heap, stats_strtab_resize_grow);
new_st_size = heap->st_size << 1U;
- DUK_ASSERT(new_st_size > heap->st_size); /* No overflow. */
+ DUK_ASSERT(new_st_size > heap->st_size); /* No overflow. */
/* Reallocate the strtable first and then work in-place to rehash
* strings. We don't need an indirect allocation here: even if GC
@@ -52559,7 +55728,7 @@ DUK_LOCAL void duk__strtable_grow_inplace(duk_heap *heap) {
duk__strtable_assert_checks(heap);
#endif
}
-#endif /* DUK__STRTAB_RESIZE_CHECK */
+#endif /* DUK__STRTAB_RESIZE_CHECK */
/*
* Shrink strtable allocation in-place.
@@ -52587,7 +55756,7 @@ DUK_LOCAL void duk__strtable_shrink_inplace(duk_heap *heap) {
DUK_ASSERT(heap != NULL);
DUK_ASSERT(heap->st_resizing == 1);
DUK_ASSERT(heap->st_size >= 2);
- DUK_ASSERT((heap->st_size & (heap->st_size - 1)) == 0); /* 2^N */
+ DUK_ASSERT((heap->st_size & (heap->st_size - 1)) == 0); /* 2^N */
DUK_ASSERT(DUK__GET_STRTABLE(heap) != NULL);
DUK_STATS_INC(heap, stats_strtab_resize_shrink);
@@ -52645,7 +55814,7 @@ DUK_LOCAL void duk__strtable_shrink_inplace(duk_heap *heap) {
duk__strtable_assert_checks(heap);
#endif
}
-#endif /* DUK__STRTAB_RESIZE_CHECK */
+#endif /* DUK__STRTAB_RESIZE_CHECK */
/*
* Grow/shrink check.
@@ -52653,7 +55822,7 @@ DUK_LOCAL void duk__strtable_shrink_inplace(duk_heap *heap) {
#if defined(DUK__STRTAB_RESIZE_CHECK)
DUK_LOCAL DUK_COLD DUK_NOINLINE void duk__strtable_resize_check(duk_heap *heap) {
- duk_uint32_t load_factor; /* fixed point */
+ duk_uint32_t load_factor; /* fixed point */
DUK_ASSERT(heap != NULL);
#if defined(DUK_USE_STRTAB_PTRCOMP)
@@ -52677,7 +55846,8 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE void duk__strtable_resize_check(duk_heap *heap)
load_factor = heap->st_count / (heap->st_size >> 4U);
DUK_DD(DUK_DDPRINT("resize check string table: size=%lu, count=%lu, load_factor=%lu (fixed point .4; float %lf)",
- (unsigned long) heap->st_size, (unsigned long) heap->st_count,
+ (unsigned long) heap->st_size,
+ (unsigned long) heap->st_count,
(unsigned long) load_factor,
(double) heap->st_count / (double) heap->st_size));
@@ -52685,7 +55855,9 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE void duk__strtable_resize_check(duk_heap *heap)
if (heap->st_size >= DUK_USE_STRTAB_MAXSIZE) {
DUK_DD(DUK_DDPRINT("want to grow strtable (based on load factor) but already maximum size"));
} else {
- DUK_D(DUK_DPRINT("grow string table: %lu -> %lu", (unsigned long) heap->st_size, (unsigned long) heap->st_size * 2));
+ DUK_D(DUK_DPRINT("grow string table: %lu -> %lu",
+ (unsigned long) heap->st_size,
+ (unsigned long) heap->st_size * 2));
#if defined(DUK_USE_DEBUG)
duk_heap_strtable_dump(heap);
#endif
@@ -52695,7 +55867,9 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE void duk__strtable_resize_check(duk_heap *heap)
if (heap->st_size <= DUK_USE_STRTAB_MINSIZE) {
DUK_DD(DUK_DDPRINT("want to shrink strtable (based on load factor) but already minimum size"));
} else {
- DUK_D(DUK_DPRINT("shrink string table: %lu -> %lu", (unsigned long) heap->st_size, (unsigned long) heap->st_size / 2));
+ DUK_D(DUK_DPRINT("shrink string table: %lu -> %lu",
+ (unsigned long) heap->st_size,
+ (unsigned long) heap->st_size / 2));
#if defined(DUK_USE_DEBUG)
duk_heap_strtable_dump(heap);
#endif
@@ -52707,7 +55881,7 @@ DUK_LOCAL DUK_COLD DUK_NOINLINE void duk__strtable_resize_check(duk_heap *heap)
heap->st_resizing = 0;
}
-#endif /* DUK__STRTAB_RESIZE_CHECK */
+#endif /* DUK__STRTAB_RESIZE_CHECK */
/*
* Torture grow/shrink: unconditionally grow and shrink back.
@@ -52731,7 +55905,7 @@ DUK_LOCAL void duk__strtable_resize_torture(duk_heap *heap) {
}
heap->st_resizing = 0;
}
-#endif /* DUK_USE_STRTAB_TORTURE && DUK__STRTAB_RESIZE_CHECK */
+#endif /* DUK_USE_STRTAB_TORTURE && DUK__STRTAB_RESIZE_CHECK */
/*
* Raw intern; string already checked not to be present.
@@ -52747,8 +55921,12 @@ DUK_LOCAL duk_hstring *duk__strtable_do_intern(duk_heap *heap, const duk_uint8_t
#endif
DUK_DDD(DUK_DDDPRINT("do_intern: heap=%p, str=%p, blen=%lu, strhash=%lx, st_size=%lu, st_count=%lu, load=%lf",
- (void *) heap, (const void *) str, (unsigned long) blen, (unsigned long) strhash,
- (unsigned long) heap->st_size, (unsigned long) heap->st_count,
+ (void *) heap,
+ (const void *) str,
+ (unsigned long) blen,
+ (unsigned long) strhash,
+ (unsigned long) heap->st_size,
+ (unsigned long) heap->st_count,
(double) heap->st_count / (double) heap->st_size));
DUK_ASSERT(heap != NULL);
@@ -52764,7 +55942,7 @@ DUK_LOCAL duk_hstring *duk__strtable_do_intern(duk_heap *heap, const duk_uint8_t
*/
heap->pf_prevent_count++;
- DUK_ASSERT(heap->pf_prevent_count != 0); /* Wrap. */
+ DUK_ASSERT(heap->pf_prevent_count != 0); /* Wrap. */
#if defined(DUK_USE_STRTAB_TORTURE) && defined(DUK__STRTAB_RESIZE_CHECK)
duk__strtable_resize_torture(heap);
@@ -52791,7 +55969,8 @@ DUK_LOCAL duk_hstring *duk__strtable_do_intern(duk_heap *heap, const duk_uint8_t
/* External string check (low memory optimization). */
#if defined(DUK_USE_HSTRING_EXTDATA) && defined(DUK_USE_EXTSTR_INTERN_CHECK)
- extdata = (const duk_uint8_t *) DUK_USE_EXTSTR_INTERN_CHECK(heap->heap_udata, (void *) DUK_LOSE_CONST(str), (duk_size_t) blen);
+ extdata =
+ (const duk_uint8_t *) DUK_USE_EXTSTR_INTERN_CHECK(heap->heap_udata, (void *) DUK_LOSE_CONST(str), (duk_size_t) blen);
#else
extdata = (const duk_uint8_t *) NULL;
#endif
@@ -52829,7 +56008,7 @@ DUK_LOCAL duk_hstring *duk__strtable_do_intern(duk_heap *heap, const duk_uint8_t
#else
slot = heap->strtable + (strhash & heap->st_mask);
#endif
- DUK_ASSERT(res->hdr.h_next == NULL); /* This is the case now, but unnecessary zeroing/NULLing. */
+ DUK_ASSERT(res->hdr.h_next == NULL); /* This is the case now, but unnecessary zeroing/NULLing. */
res->hdr.h_next = DUK__HEAPPTR_DEC16(heap, *slot);
*slot = DUK__HEAPPTR_ENC16(heap, res);
@@ -52876,11 +56055,12 @@ DUK_LOCAL duk_hstring *duk__strtab_romstring_lookup(duk_heap *heap, const duk_ui
curr = (duk_hstring *) DUK_LOSE_CONST(duk_rom_strings_lookup[lookup_hash]);
while (curr != NULL) {
/* Unsafe memcmp() because for zero blen, str may be NULL. */
- if (strhash == DUK_HSTRING_GET_HASH(curr) &&
- blen == DUK_HSTRING_GET_BYTELEN(curr) &&
+ if (strhash == DUK_HSTRING_GET_HASH(curr) && blen == DUK_HSTRING_GET_BYTELEN(curr) &&
duk_memcmp_unsafe((const void *) str, (const void *) DUK_HSTRING_GET_DATA(curr), blen) == 0) {
DUK_DDD(DUK_DDDPRINT("intern check: rom string: %!O, computed hash 0x%08lx, rom hash 0x%08lx",
- curr, (unsigned long) strhash, (unsigned long) DUK_HSTRING_GET_HASH(curr)));
+ curr,
+ (unsigned long) strhash,
+ (unsigned long) DUK_HSTRING_GET_HASH(curr)));
return curr;
}
curr = curr->hdr.h_next;
@@ -52888,7 +56068,7 @@ DUK_LOCAL duk_hstring *duk__strtab_romstring_lookup(duk_heap *heap, const duk_ui
return NULL;
}
-#endif /* DUK_USE_ROM_STRINGS */
+#endif /* DUK_USE_ROM_STRINGS */
DUK_INTERNAL duk_hstring *duk_heap_strtable_intern(duk_heap *heap, const duk_uint8_t *str, duk_uint32_t blen) {
duk_uint32_t strhash;
@@ -52901,7 +56081,7 @@ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern(duk_heap *heap, const duk_uin
/* XXX: maybe just require 'str != NULL' even for zero size? */
DUK_ASSERT(heap != NULL);
DUK_ASSERT(blen == 0 || str != NULL);
- DUK_ASSERT(blen <= DUK_HSTRING_MAX_BYTELEN); /* Caller is responsible for ensuring this. */
+ DUK_ASSERT(blen <= DUK_HSTRING_MAX_BYTELEN); /* Caller is responsible for ensuring this. */
strhash = duk_heap_hashstring(heap, str, (duk_size_t) blen);
/* String table lookup. */
@@ -52915,8 +56095,7 @@ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern(duk_heap *heap, const duk_uin
h = heap->strtable[strhash & heap->st_mask];
#endif
while (h != NULL) {
- if (DUK_HSTRING_GET_HASH(h) == strhash &&
- DUK_HSTRING_GET_BYTELEN(h) == blen &&
+ if (DUK_HSTRING_GET_HASH(h) == strhash && DUK_HSTRING_GET_BYTELEN(h) == blen &&
duk_memcmp_unsafe((const void *) str, (const void *) DUK_HSTRING_GET_DATA(h), (size_t) blen) == 0) {
/* Found existing entry. */
DUK_STATS_INC(heap, stats_strtab_intern_hit);
@@ -52942,7 +56121,7 @@ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern(duk_heap *heap, const duk_uin
DUK_STATS_INC(heap, stats_strtab_intern_miss);
h = duk__strtable_do_intern(heap, str, blen, strhash);
- return h; /* may be NULL */
+ return h; /* may be NULL */
}
/*
@@ -52965,7 +56144,7 @@ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_u32(duk_heap *heap, duk_uint3
p--;
*p = duk_lc_digits[val % 10];
val = val / 10;
- } while (val != 0); /* For val == 0, emit exactly one '0'. */
+ } while (val != 0); /* For val == 0, emit exactly one '0'. */
DUK_ASSERT(p >= buf);
return duk_heap_strtable_intern(heap, (const duk_uint8_t *) p, (duk_uint32_t) ((buf + sizeof(buf)) - p));
@@ -53003,7 +56182,7 @@ DUK_LOCAL duk_uint_t duk__strtable_litcache_key(const duk_uint8_t *str, duk_uint
DUK_ASSERT(DUK_IS_POWER_OF_TWO((duk_uint_t) DUK_USE_LITCACHE_SIZE));
key = (duk_uintptr_t) blen ^ (duk_uintptr_t) str;
- key &= (duk_uintptr_t) (DUK_USE_LITCACHE_SIZE - 1); /* Assumes size is power of 2. */
+ key &= (duk_uintptr_t) (DUK_USE_LITCACHE_SIZE - 1); /* Assumes size is power of 2. */
/* Due to masking, cast is in 32-bit range. */
DUK_ASSERT(key <= DUK_UINT_MAX);
return (duk_uint_t) key;
@@ -53019,7 +56198,9 @@ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_literal_checked(duk_hthread *
ent = thr->heap->litcache + key;
if (ent->addr == str) {
DUK_DD(DUK_DDPRINT("intern check for cached, pinned literal: str=%p, blen=%ld -> duk_hstring %!O",
- (const void *) str, (long) blen, (duk_heaphdr *) ent->h));
+ (const void *) str,
+ (long) blen,
+ (duk_heaphdr *) ent->h));
DUK_ASSERT(ent->h != NULL);
DUK_ASSERT(DUK_HSTRING_HAS_PINNED_LITERAL(ent->h));
DUK_STATS_INC(thr->heap, stats_strtab_litcache_hit);
@@ -53049,7 +56230,7 @@ DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_literal_checked(duk_hthread *
return h;
}
-#endif /* DUK_USE_LITCACHE_SIZE */
+#endif /* DUK_USE_LITCACHE_SIZE */
DUK_INTERNAL duk_hstring *duk_heap_strtable_intern_u32_checked(duk_hthread *thr, duk_uint32_t val) {
duk_hstring *res;
@@ -53084,7 +56265,8 @@ DUK_INTERNAL void duk_heap_strtable_unlink(duk_heap *heap, duk_hstring *h) {
duk_hstring *prev;
DUK_DDD(DUK_DDDPRINT("remove: heap=%p, h=%p, blen=%lu, strhash=%lx",
- (void *) heap, (void *) h,
+ (void *) heap,
+ (void *) h,
(unsigned long) (h != NULL ? DUK_HSTRING_GET_BYTELEN(h) : 0),
(unsigned long) (h != NULL ? DUK_HSTRING_GET_HASH(h) : 0)));
@@ -53102,13 +56284,13 @@ DUK_INTERNAL void duk_heap_strtable_unlink(duk_heap *heap, duk_hstring *h) {
slot = heap->strtable + (DUK_HSTRING_GET_HASH(h) & heap->st_mask);
#endif
other = DUK__HEAPPTR_DEC16(heap, *slot);
- DUK_ASSERT(other != NULL); /* At least argument string is in the chain. */
+ DUK_ASSERT(other != NULL); /* At least argument string is in the chain. */
prev = NULL;
while (other != h) {
prev = other;
other = other->hdr.h_next;
- DUK_ASSERT(other != NULL); /* We'll eventually find 'h'. */
+ DUK_ASSERT(other != NULL); /* We'll eventually find 'h'. */
}
if (prev != NULL) {
/* Middle of list. */
@@ -53122,7 +56304,7 @@ DUK_INTERNAL void duk_heap_strtable_unlink(duk_heap *heap, duk_hstring *h) {
* intern will do one.
*/
}
-#endif /* DUK_USE_REFERENCE_COUNTING */
+#endif /* DUK_USE_REFERENCE_COUNTING */
/* Unlink with a 'prev' pointer. */
DUK_INTERNAL void duk_heap_strtable_unlink_prev(duk_heap *heap, duk_hstring *h, duk_hstring *prev) {
@@ -53133,7 +56315,9 @@ DUK_INTERNAL void duk_heap_strtable_unlink_prev(duk_heap *heap, duk_hstring *h,
#endif
DUK_DDD(DUK_DDDPRINT("remove: heap=%p, prev=%p, h=%p, blen=%lu, strhash=%lx",
- (void *) heap, (void *) prev, (void *) h,
+ (void *) heap,
+ (void *) prev,
+ (void *) h,
(unsigned long) (h != NULL ? DUK_HSTRING_GET_BYTELEN(h) : 0),
(unsigned long) (h != NULL ? DUK_HSTRING_GET_HASH(h) : 0)));
@@ -53311,7 +56495,7 @@ DUK_INTERNAL void duk_heaphdr_assert_valid_subclassed(duk_heaphdr *h) {
}
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Hobject allocation.
*
@@ -53335,7 +56519,7 @@ DUK_LOCAL void duk__init_object_parts(duk_heap *heap, duk_uint_t hobject_flags,
/* Zeroed by caller. */
obj->hdr.h_flags = hobject_flags | DUK_HTYPE_OBJECT;
- DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(&obj->hdr) == DUK_HTYPE_OBJECT); /* Assume zero shift. */
+ DUK_ASSERT(DUK_HEAPHDR_GET_TYPE(&obj->hdr) == DUK_HTYPE_OBJECT); /* Assume zero shift. */
#if defined(DUK_USE_EXPLICIT_NULL_INIT)
DUK_HOBJECT_SET_PROTOTYPE(heap, obj, NULL);
@@ -53471,7 +56655,7 @@ DUK_INTERNAL duk_hbufobj *duk_hbufobj_alloc(duk_hthread *thr, duk_uint_t hobject
DUK_HBUFOBJ_ASSERT_VALID(res);
return res;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* Allocate a new thread.
*
@@ -53593,20 +56777,18 @@ DUK_INTERNAL duk_hproxy *duk_hproxy_alloc(duk_hthread *thr, duk_uint_t hobject_f
DUK_INTERNAL void duk_hobject_assert_valid(duk_hobject *h) {
DUK_ASSERT(h != NULL);
- DUK_ASSERT(!DUK_HOBJECT_IS_CALLABLE(h) ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_FUNCTION);
- DUK_ASSERT(!DUK_HOBJECT_IS_BUFOBJ(h) ||
- (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAYBUFFER ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_DATAVIEW ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_INT8ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT8ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_INT16ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT16ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_INT32ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT32ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_FLOAT32ARRAY ||
- DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_FLOAT64ARRAY));
+ DUK_ASSERT(!DUK_HOBJECT_IS_CALLABLE(h) || DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_FUNCTION);
+ DUK_ASSERT(!DUK_HOBJECT_IS_BUFOBJ(h) || (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAYBUFFER ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_DATAVIEW ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_INT8ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT8ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT8CLAMPEDARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_INT16ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT16ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_INT32ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_UINT32ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_FLOAT32ARRAY ||
+ DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_FLOAT64ARRAY));
/* Object is an Array <=> object has exotic array behavior */
DUK_ASSERT((DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY && DUK_HOBJECT_HAS_EXOTIC_ARRAY(h)) ||
(DUK_HOBJECT_GET_CLASS_NUMBER(h) != DUK_HOBJECT_CLASS_ARRAY && !DUK_HOBJECT_HAS_EXOTIC_ARRAY(h)));
@@ -53622,8 +56804,7 @@ DUK_INTERNAL void duk_hboundfunc_assert_valid(duk_hboundfunc *h) {
DUK_ASSERT(h != NULL);
DUK_ASSERT(DUK_HOBJECT_IS_BOUNDFUNC((duk_hobject *) h));
DUK_ASSERT(DUK_TVAL_IS_LIGHTFUNC(&h->target) ||
- (DUK_TVAL_IS_OBJECT(&h->target) &&
- DUK_HOBJECT_IS_CALLABLE(DUK_TVAL_GET_OBJECT(&h->target))));
+ (DUK_TVAL_IS_OBJECT(&h->target) && DUK_HOBJECT_IS_CALLABLE(DUK_TVAL_GET_OBJECT(&h->target))));
DUK_ASSERT(!DUK_TVAL_IS_UNUSED(&h->this_binding));
DUK_ASSERT(h->nargs == 0 || h->args != NULL);
}
@@ -53655,7 +56836,7 @@ DUK_INTERNAL void duk_hbufobj_assert_valid(duk_hbufobj *h) {
DUK_ASSERT(h->offset + h->length >= h->offset);
}
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
DUK_INTERNAL void duk_hcompfunc_assert_valid(duk_hcompfunc *h) {
DUK_ASSERT(h != NULL);
@@ -53709,7 +56890,7 @@ DUK_INTERNAL void duk_ctx_assert_valid(duk_hthread *thr) {
DUK_ASSERT(thr->valstack_alloc_end >= thr->valstack_end);
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Object enumeration support.
*
@@ -53736,7 +56917,7 @@ DUK_INTERNAL void duk_ctx_assert_valid(duk_hthread *thr) {
/* First enumerated key index in enumerator object, must match exactly the
* number of control properties inserted to the enumerator.
*/
-#define DUK__ENUM_START_INDEX 2
+#define DUK__ENUM_START_INDEX 2
/* Current implementation suffices for ES2015 for now because there's no symbol
* sorting, so commented out for now.
@@ -53805,7 +56986,7 @@ DUK_LOCAL duk_bool_t duk__sort_compare_es6(duk_hstring *a, duk_hstring *b, duk__
DUK_ASSERT(a != NULL);
DUK_ASSERT(b != NULL);
- DUK_UNREF(b); /* Not actually needed now, val_b suffices. */
+ DUK_UNREF(b); /* Not actually needed now, val_b suffices. */
val_a = duk__hstring_sort_key(a);
@@ -53826,7 +57007,7 @@ DUK_LOCAL void duk__sort_enum_keys_es6(duk_hthread *thr, duk_hobject *h_obj, duk
DUK_UNREF(thr);
if (idx_end <= idx_start + 1) {
- return; /* Zero or one element(s). */
+ return; /* Zero or one element(s). */
}
keys = DUK_HOBJECT_E_GET_KEY_BASE(thr->heap, h_obj);
@@ -53844,7 +57025,7 @@ DUK_LOCAL void duk__sort_enum_keys_es6(duk_hthread *thr, duk_hobject *h_obj, duk
* (and optimized for) case.
*/
- val_curr = duk__hstring_sort_key(h_curr); /* Remains same during scanning. */
+ val_curr = duk__hstring_sort_key(h_curr); /* Remains same during scanning. */
for (idx_insert = idx - 1; idx_insert >= idx_start; idx_insert--) {
duk_hstring *h_insert;
h_insert = keys[idx_insert];
@@ -53877,6 +57058,13 @@ DUK_LOCAL void duk__sort_enum_keys_es6(duk_hthread *thr, duk_hobject *h_obj, duk
keys[idx_insert] = h_curr;
}
}
+
+ /* Entry part has been reordered now with no side effects.
+ * If the object has a hash part, it will now be incorrect
+ * and we need to rehash. Do that by forcing a resize to
+ * the current size.
+ */
+ duk_hobject_resize_entrypart(thr, h_obj, DUK_HOBJECT_GET_ESIZE(h_obj));
}
/*
@@ -53910,7 +57098,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
duk_hobject *h_proxy_handler;
duk_hobject *h_trap_result;
#endif
- duk_uint_fast32_t i, len; /* used for array, stack, and entry indices */
+ duk_uint_fast32_t i, len; /* used for array, stack, and entry indices */
duk_uint_fast32_t sort_start_index;
DUK_ASSERT(thr != NULL);
@@ -53929,11 +57117,11 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
* real object to check against.
*/
duk_push_hobject(thr, enum_target);
- duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_INT_TARGET); /* Target is bare, plain put OK. */
+ duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_INT_TARGET); /* Target is bare, plain put OK. */
/* Initialize index so that we skip internal control keys. */
duk_push_int(thr, DUK__ENUM_START_INDEX);
- duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_INT_NEXT); /* Target is bare, plain put OK. */
+ duk_put_prop_stridx_short(thr, -2, DUK_STRIDX_INT_NEXT); /* Target is bare, plain put OK. */
/*
* Proxy object handling
@@ -53943,9 +57131,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
if (DUK_LIKELY((enum_flags & DUK_ENUM_NO_PROXY_BEHAVIOR) != 0)) {
goto skip_proxy;
}
- if (DUK_LIKELY(!duk_hobject_proxy_check(enum_target,
- &h_proxy_target,
- &h_proxy_handler))) {
+ if (DUK_LIKELY(!duk_hobject_proxy_check(enum_target, &h_proxy_target, &h_proxy_handler))) {
goto skip_proxy;
}
@@ -53966,17 +57152,17 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
DUK_DDD(DUK_DDDPRINT("h_proxy_target=%!O", (duk_heaphdr *) h_proxy_target));
enum_target = h_proxy_target;
- duk_push_hobject(thr, enum_target); /* -> [ ... enum_target res handler undefined target ] */
- duk_put_prop_stridx_short(thr, -4, DUK_STRIDX_INT_TARGET); /* Target is bare, plain put OK. */
+ duk_push_hobject(thr, enum_target); /* -> [ ... enum_target res handler undefined target ] */
+ duk_put_prop_stridx_short(thr, -4, DUK_STRIDX_INT_TARGET); /* Target is bare, plain put OK. */
- duk_pop_2(thr); /* -> [ ... enum_target res ] */
+ duk_pop_2(thr); /* -> [ ... enum_target res ] */
goto skip_proxy;
}
/* [ ... enum_target res handler trap ] */
duk_insert(thr, -2);
- duk_push_hobject(thr, h_proxy_target); /* -> [ ... enum_target res trap handler target ] */
- duk_call_method(thr, 1 /*nargs*/); /* -> [ ... enum_target res trap_result ] */
+ duk_push_hobject(thr, h_proxy_target); /* -> [ ... enum_target res trap handler target ] */
+ duk_call_method(thr, 1 /*nargs*/); /* -> [ ... enum_target res trap_result ] */
h_trap_result = duk_require_hobject(thr, -1);
DUK_UNREF(h_trap_result);
@@ -53989,7 +57175,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
len = (duk_uint_fast32_t) duk_get_length(thr, -1);
for (i = 0; i < len; i++) {
(void) duk_get_prop_index(thr, -1, (duk_uarridx_t) i);
- DUK_ASSERT(duk_is_string(thr, -1)); /* postprocess cleaned up */
+ DUK_ASSERT(duk_is_string(thr, -1)); /* postprocess cleaned up */
/* [ ... enum_target res trap_result keys_array val ] */
duk_push_true(thr);
/* [ ... enum_target res trap_result keys_array val true ] */
@@ -54010,8 +57196,8 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
DUK_DDD(DUK_DDDPRINT("proxy enumeration, final res: %!O", (duk_heaphdr *) res));
goto compact_and_return;
- skip_proxy:
-#endif /* DUK_USE_ES6_PROXY */
+skip_proxy:
+#endif /* DUK_USE_ES6_PROXY */
curr = enum_target;
sort_start_index = DUK__ENUM_START_INDEX;
@@ -54062,7 +57248,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
if (DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(curr)) {
duk_hstring *h_val;
h_val = duk_hobject_get_internal_value_string(thr->heap, curr);
- DUK_ASSERT(h_val != NULL); /* string objects must not created without internal value */
+ DUK_ASSERT(h_val != NULL); /* string objects must not created without internal value */
len = (duk_uint_fast32_t) DUK_HSTRING_GET_CHARLEN(h_val);
}
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
@@ -54085,7 +57271,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
len = (duk_uint_fast32_t) (h_bufobj->length >> h_bufobj->shift);
}
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
for (i = 0; i < len; i++) {
duk_hstring *k;
@@ -54125,7 +57311,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
if (DUK_TVAL_IS_UNUSED(tv)) {
continue;
}
- k = duk_heap_strtable_intern_u32_checked(thr, (duk_uint32_t) i); /* Fragile reachability. */
+ k = duk_heap_strtable_intern_u32_checked(thr, (duk_uint32_t) i); /* Fragile reachability. */
DUK_ASSERT(k);
duk__add_enum_key(thr, k);
@@ -54157,8 +57343,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
continue;
}
if (DUK_UNLIKELY(DUK_HSTRING_HAS_SYMBOL(k))) {
- if (!(enum_flags & DUK_ENUM_INCLUDE_HIDDEN) &&
- DUK_HSTRING_HAS_HIDDEN(k)) {
+ if (!(enum_flags & DUK_ENUM_INCLUDE_HIDDEN) && DUK_HSTRING_HAS_HIDDEN(k)) {
continue;
}
if (!(enum_flags & DUK_ENUM_INCLUDE_SYMBOLS)) {
@@ -54168,7 +57353,7 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
need_sort = 1;
#endif
} else {
- DUK_ASSERT(!DUK_HSTRING_HAS_HIDDEN(k)); /* would also have symbol flag */
+ DUK_ASSERT(!DUK_HSTRING_HAS_HIDDEN(k)); /* would also have symbol flag */
if (enum_flags & DUK_ENUM_EXCLUDE_STRINGS) {
continue;
}
@@ -54217,7 +57402,10 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
#else
if (need_sort) {
DUK_DDD(DUK_DDDPRINT("need to sort"));
- duk__sort_enum_keys_es6(thr, res, (duk_int_fast32_t) sort_start_index, (duk_int_fast32_t) sort_end_index);
+ duk__sort_enum_keys_es6(thr,
+ res,
+ (duk_int_fast32_t) sort_start_index,
+ (duk_int_fast32_t) sort_end_index);
} else {
DUK_DDD(DUK_DDDPRINT("no need to sort"));
}
@@ -54250,11 +57438,14 @@ DUK_INTERNAL void duk_hobject_enumerator_create(duk_hthread *thr, duk_small_uint
/* Sort to ES2015 order which works for pure array incides but
* also for mixed keys.
*/
- duk__sort_enum_keys_es6(thr, res, (duk_int_fast32_t) DUK__ENUM_START_INDEX, (duk_int_fast32_t) DUK_HOBJECT_GET_ENEXT(res));
+ duk__sort_enum_keys_es6(thr,
+ res,
+ (duk_int_fast32_t) DUK__ENUM_START_INDEX,
+ (duk_int_fast32_t) DUK_HOBJECT_GET_ENEXT(res));
}
#if defined(DUK_USE_ES6_PROXY)
- compact_and_return:
+compact_and_return:
#endif
/* compact; no need to seal because object is internal */
duk_hobject_compact_props(thr, res);
@@ -54302,10 +57493,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_enumerator_next(duk_hthread *thr, duk_bool_t
#else
check_existence = 1;
#endif
- duk_pop(thr); /* still reachable */
+ duk_pop(thr); /* still reachable */
DUK_DDD(DUK_DDDPRINT("getting next enum value, enum_target=%!iO, enumerator=%!iT",
- (duk_heaphdr *) enum_target, (duk_tval *) duk_get_tval(thr, -1)));
+ (duk_heaphdr *) enum_target,
+ (duk_tval *) duk_get_tval(thr, -1)));
/* no array part */
for (;;) {
@@ -54346,16 +57538,16 @@ DUK_INTERNAL duk_bool_t duk_hobject_enumerator_next(duk_hthread *thr, duk_bool_t
duk_push_hstring(thr, res);
if (get_value) {
duk_push_hobject(thr, enum_target);
- duk_dup_m2(thr); /* -> [... enum key enum_target key] */
+ duk_dup_m2(thr); /* -> [... enum key enum_target key] */
duk_get_prop(thr, -2); /* -> [... enum key enum_target val] */
- duk_remove_m2(thr); /* -> [... enum key val] */
- duk_remove(thr, -3); /* -> [... key val] */
+ duk_remove_m2(thr); /* -> [... enum key val] */
+ duk_remove(thr, -3); /* -> [... key val] */
} else {
- duk_remove_m2(thr); /* -> [... key] */
+ duk_remove_m2(thr); /* -> [... key] */
}
return 1;
} else {
- duk_pop(thr); /* -> [...] */
+ duk_pop(thr); /* -> [...] */
return 0;
}
}
@@ -54402,7 +57594,7 @@ DUK_INTERNAL duk_ret_t duk_hobject_get_enumerated_keys(duk_hthread *thr, duk_sma
duk_hstring *k;
k = *keys++;
- DUK_ASSERT(k != NULL); /* enumerator must have no keys deleted */
+ DUK_ASSERT(k != NULL); /* enumerator must have no keys deleted */
DUK_TVAL_SET_STRING(tv, k);
tv++;
@@ -54414,7 +57606,7 @@ DUK_INTERNAL duk_ret_t duk_hobject_get_enumerated_keys(duk_hthread *thr, duk_sma
/* [enum_target res] */
- return 1; /* return 1 to allow callers to tail call */
+ return 1; /* return 1 to allow callers to tail call */
}
/* automatic undefs */
@@ -54425,7 +57617,10 @@ DUK_INTERNAL duk_ret_t duk_hobject_get_enumerated_keys(duk_hthread *thr, duk_sma
/* #include duk_internal.h -> already included */
-DUK_INTERNAL duk_bool_t duk_hobject_prototype_chain_contains(duk_hthread *thr, duk_hobject *h, duk_hobject *p, duk_bool_t ignore_loop) {
+DUK_INTERNAL duk_bool_t duk_hobject_prototype_chain_contains(duk_hthread *thr,
+ duk_hobject *h,
+ duk_hobject *p,
+ duk_bool_t ignore_loop) {
duk_uint_t sanity;
DUK_ASSERT(thr != NULL);
@@ -54464,7 +57659,7 @@ DUK_INTERNAL void duk_hobject_set_prototype_updref(duk_hthread *thr, duk_hobject
DUK_ASSERT(h);
tmp = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, h);
DUK_HOBJECT_SET_PROTOTYPE(thr->heap, h, p);
- DUK_HOBJECT_INCREF_ALLOWNULL(thr, p); /* avoid problems if p == h->prototype */
+ DUK_HOBJECT_INCREF_ALLOWNULL(thr, p); /* avoid problems if p == h->prototype */
DUK_HOBJECT_DECREF_ALLOWNULL(thr, tmp);
#else
DUK_ASSERT(h);
@@ -54509,7 +57704,7 @@ DUK_INTERNAL void duk_hobject_pc2line_pack(duk_hthread *thr, duk_compiler_instr
hdr = (duk_uint32_t *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(thr->heap, h_buf);
DUK_ASSERT(hdr != NULL);
- hdr[0] = (duk_uint32_t) length; /* valid pc range is [0, length[ */
+ hdr[0] = (duk_uint32_t) length; /* valid pc range is [0, length[ */
curr_pc = 0U;
while (curr_pc < length) {
@@ -54538,8 +57733,8 @@ DUK_INTERNAL void duk_hobject_pc2line_pack(duk_hthread *thr, duk_compiler_instr
for (;;) {
curr_pc++;
- if ( ((curr_pc % DUK_PC2LINE_SKIP) == 0) || /* end of diff run */
- (curr_pc >= length) ) { /* end of bytecode */
+ if (((curr_pc % DUK_PC2LINE_SKIP) == 0) || /* end of diff run */
+ (curr_pc >= length)) { /* end of bytecode */
break;
}
DUK_ASSERT(curr_pc < length);
@@ -54586,7 +57781,9 @@ DUK_INTERNAL void duk_hobject_pc2line_pack(duk_hthread *thr, duk_compiler_instr
(void) duk_to_fixed_buffer(thr, -1, NULL);
DUK_DDD(DUK_DDDPRINT("final pc2line data: pc_limit=%ld, length=%ld, %lf bits/opcode --> %!ixT",
- (long) length, (long) new_size, (double) new_size * 8.0 / (double) length,
+ (long) length,
+ (long) new_size,
+ (double) new_size * 8.0 / (double) length,
(duk_tval *) duk_get_tval(thr, -1)));
}
@@ -54626,8 +57823,7 @@ DUK_LOCAL duk_uint_fast32_t duk__hobject_pc2line_query_raw(duk_hthread *thr, duk
pc_limit = hdr[0];
if (pc >= pc_limit) {
/* Note: pc is unsigned and cannot be negative */
- DUK_DD(DUK_DDPRINT("pc2line lookup failed: pc out of bounds (pc=%ld, limit=%ld)",
- (long) pc, (long) pc_limit));
+ DUK_DD(DUK_DDPRINT("pc2line lookup failed: pc out of bounds (pc=%ld, limit=%ld)", (long) pc, (long) pc_limit));
goto pc2line_error;
}
@@ -54635,7 +57831,8 @@ DUK_LOCAL duk_uint_fast32_t duk__hobject_pc2line_query_raw(duk_hthread *thr, duk
start_offset = hdr[1 + hdr_index * 2 + 1];
if ((duk_size_t) start_offset > DUK_HBUFFER_FIXED_GET_SIZE(buf)) {
DUK_DD(DUK_DDPRINT("pc2line lookup failed: start_offset out of bounds (start_offset=%ld, buffer_size=%ld)",
- (long) start_offset, (long) DUK_HBUFFER_GET_SIZE((duk_hbuffer *) buf)));
+ (long) start_offset,
+ (long) DUK_HBUFFER_GET_SIZE((duk_hbuffer *) buf)));
goto pc2line_error;
}
@@ -54662,7 +57859,7 @@ DUK_LOCAL duk_uint_fast32_t duk__hobject_pc2line_query_raw(duk_hthread *thr, duk
if (duk_bd_decode_flag(bd_ctx)) {
/* 1 1 1 <32 bits> */
duk_uint_fast32_t t;
- t = duk_bd_decode(bd_ctx, 16); /* workaround: max nbits = 24 now */
+ t = duk_bd_decode(bd_ctx, 16); /* workaround: max nbits = 24 now */
t = (t << 16) + duk_bd_decode(bd_ctx, 16);
curr_line = t;
} else {
@@ -54687,7 +57884,7 @@ DUK_LOCAL duk_uint_fast32_t duk__hobject_pc2line_query_raw(duk_hthread *thr, duk
DUK_DDD(DUK_DDDPRINT("pc2line lookup result: pc %ld -> line %ld", (long) pc, (long) curr_line));
return curr_line;
- pc2line_error:
+pc2line_error:
DUK_D(DUK_DPRINT("pc2line conversion failed for pc=%ld", (long) pc));
return 0;
}
@@ -54715,7 +57912,7 @@ DUK_INTERNAL duk_uint_fast32_t duk_hobject_pc2line_query(duk_hthread *thr, duk_i
return line;
}
-#endif /* DUK_USE_PC2LINE */
+#endif /* DUK_USE_PC2LINE */
/*
* duk_hobject property access functionality.
*
@@ -54764,35 +57961,56 @@ DUK_INTERNAL duk_uint_fast32_t duk_hobject_pc2line_query(duk_hthread *thr, duk_i
* Local defines
*/
-#define DUK__NO_ARRAY_INDEX DUK_HSTRING_NO_ARRAY_INDEX
+#define DUK__NO_ARRAY_INDEX DUK_HSTRING_NO_ARRAY_INDEX
/* Marker values for hash part. */
-#define DUK__HASH_UNUSED DUK_HOBJECT_HASHIDX_UNUSED
-#define DUK__HASH_DELETED DUK_HOBJECT_HASHIDX_DELETED
+#define DUK__HASH_UNUSED DUK_HOBJECT_HASHIDX_UNUSED
+#define DUK__HASH_DELETED DUK_HOBJECT_HASHIDX_DELETED
/* Valstack space that suffices for all local calls, excluding any recursion
* into ECMAScript or Duktape/C calls (Proxy, getters, etc).
*/
-#define DUK__VALSTACK_SPACE 10
+#define DUK__VALSTACK_SPACE 10
/* Valstack space allocated especially for proxy lookup which does a
* recursive property lookup.
*/
-#define DUK__VALSTACK_PROXY_LOOKUP 20
+#define DUK__VALSTACK_PROXY_LOOKUP 20
/*
* Local prototypes
*/
-DUK_LOCAL_DECL duk_bool_t duk__check_arguments_map_for_get(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *temp_desc);
-DUK_LOCAL_DECL void duk__check_arguments_map_for_put(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *temp_desc, duk_bool_t throw_flag);
-DUK_LOCAL_DECL void duk__check_arguments_map_for_delete(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *temp_desc);
-
-DUK_LOCAL_DECL duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr, duk_hobject *obj, duk_uint32_t old_len, duk_uint32_t new_len, duk_bool_t force_flag, duk_uint32_t *out_result_len);
+DUK_LOCAL_DECL duk_bool_t duk__check_arguments_map_for_get(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_propdesc *temp_desc);
+DUK_LOCAL_DECL void duk__check_arguments_map_for_put(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_propdesc *temp_desc,
+ duk_bool_t throw_flag);
+DUK_LOCAL_DECL void duk__check_arguments_map_for_delete(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_propdesc *temp_desc);
+
+DUK_LOCAL_DECL duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_uint32_t old_len,
+ duk_uint32_t new_len,
+ duk_bool_t force_flag,
+ duk_uint32_t *out_result_len);
DUK_LOCAL_DECL duk_bool_t duk__handle_put_array_length(duk_hthread *thr, duk_hobject *obj);
-DUK_LOCAL_DECL duk_bool_t duk__get_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags);
-DUK_LOCAL_DECL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_uint32_t arr_idx, duk_propdesc *out_desc, duk_small_uint_t flags);
+DUK_LOCAL_DECL duk_bool_t
+duk__get_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags);
+DUK_LOCAL_DECL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_uint32_t arr_idx,
+ duk_propdesc *out_desc,
+ duk_small_uint_t flags);
DUK_LOCAL_DECL void duk__abandon_array_part(duk_hthread *thr, duk_hobject *obj);
DUK_LOCAL_DECL void duk__grow_props_for_array_item(duk_hthread *thr, duk_hobject *obj, duk_uint32_t highest_arr_idx);
@@ -54820,8 +58038,8 @@ DUK_LOCAL duk_uint32_t duk__tval_number_to_arr_idx(duk_tval *tv) {
*/
dbl = DUK_TVAL_GET_NUMBER(tv);
idx = (duk_uint32_t) dbl;
- if ((duk_double_t) idx == dbl) {
- /* Is whole and within 32 bit range. If the value happens to be 0xFFFFFFFF,
+ if (duk_double_equals((duk_double_t) idx, dbl)) {
+ /* Is whole and within 32 bit range. If the value happens to be 0xFFFFFFFF,
* it's not a valid array index but will then match DUK__NO_ARRAY_INDEX.
*/
return idx;
@@ -54848,7 +58066,7 @@ DUK_LOCAL duk_uint32_t duk__tval_fastint_to_arr_idx(duk_tval *tv) {
*/
return (duk_uint32_t) t;
}
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
/* Convert a duk_tval on the value stack (in a trusted index we don't validate)
* to a string or symbol using ES2015 ToPropertyKey():
@@ -54873,7 +58091,7 @@ DUK_LOCAL duk_uint32_t duk__to_property_key(duk_hthread *thr, duk_idx_t idx, duk
* but still be compliant and share code.
*/
- tv_dst = DUK_GET_TVAL_NEGIDX(thr, idx); /* intentionally unvalidated */
+ tv_dst = DUK_GET_TVAL_NEGIDX(thr, idx); /* intentionally unvalidated */
if (DUK_TVAL_IS_STRING(tv_dst)) {
/* Most important path: strings and plain symbols are used as
* is. For symbols the array index check below is unnecessary
@@ -54893,7 +58111,7 @@ DUK_LOCAL duk_uint32_t duk__to_property_key(duk_hthread *thr, duk_idx_t idx, duk
}
DUK_LOCAL duk_uint32_t duk__push_tval_to_property_key(duk_hthread *thr, duk_tval *tv_key, duk_hstring **out_h) {
- duk_push_tval(thr, tv_key); /* XXX: could use an unsafe push here */
+ duk_push_tval(thr, tv_key); /* XXX: could use an unsafe push here */
return duk__to_property_key(thr, -1, out_h);
}
@@ -54933,7 +58151,7 @@ DUK_LOCAL duk_uint32_t duk__get_default_h_size(duk_uint32_t e_size) {
* is relatively sparse.
*/
tmp = e_size;
- res = 2; /* Result will be 2 ** (N + 1). */
+ res = 2; /* Result will be 2 ** (N + 1). */
while (tmp >= 0x40) {
tmp >>= 6;
res <<= 6;
@@ -54942,21 +58160,21 @@ DUK_LOCAL duk_uint32_t duk__get_default_h_size(duk_uint32_t e_size) {
tmp >>= 1;
res <<= 1;
}
- DUK_ASSERT((DUK_HOBJECT_MAX_PROPERTIES << 2U) > DUK_HOBJECT_MAX_PROPERTIES); /* Won't wrap, even shifted by 2. */
+ DUK_ASSERT((DUK_HOBJECT_MAX_PROPERTIES << 2U) > DUK_HOBJECT_MAX_PROPERTIES); /* Won't wrap, even shifted by 2. */
DUK_ASSERT(res > e_size);
return res;
} else {
return 0;
}
}
-#endif /* USE_PROP_HASH_PART */
+#endif /* USE_PROP_HASH_PART */
/* Get minimum entry part growth for a certain size. */
DUK_LOCAL duk_uint32_t duk__get_min_grow_e(duk_uint32_t e_size) {
duk_uint32_t res;
res = (e_size + DUK_USE_HOBJECT_ENTRY_MINGROW_ADD) / DUK_USE_HOBJECT_ENTRY_MINGROW_DIVISOR;
- DUK_ASSERT(res >= 1); /* important for callers */
+ DUK_ASSERT(res >= 1); /* important for callers */
return res;
}
@@ -54965,7 +58183,7 @@ DUK_LOCAL duk_uint32_t duk__get_min_grow_a(duk_uint32_t a_size) {
duk_uint32_t res;
res = (a_size + DUK_USE_HOBJECT_ARRAY_MINGROW_ADD) / DUK_USE_HOBJECT_ARRAY_MINGROW_DIVISOR;
- DUK_ASSERT(res >= 1); /* important for callers */
+ DUK_ASSERT(res >= 1); /* important for callers */
return res;
}
@@ -54995,7 +58213,7 @@ DUK_LOCAL duk_uint32_t duk__count_used_e_keys(duk_hthread *thr, duk_hobject *obj
DUK_LOCAL void duk__compute_a_stats(duk_hthread *thr, duk_hobject *obj, duk_uint32_t *out_used, duk_uint32_t *out_min_size) {
duk_uint_fast32_t i;
duk_uint_fast32_t used = 0;
- duk_uint_fast32_t highest_idx = (duk_uint_fast32_t) -1; /* see below */
+ duk_uint_fast32_t highest_idx = (duk_uint_fast32_t) -1; /* see below */
duk_tval *a;
DUK_ASSERT(obj != NULL);
@@ -55018,7 +58236,7 @@ DUK_LOCAL void duk__compute_a_stats(duk_hthread *thr, duk_hobject *obj, duk_uint
*/
*out_used = (duk_uint32_t) used;
- *out_min_size = (duk_uint32_t) (highest_idx + 1); /* 0 if no used entries */
+ *out_min_size = (duk_uint32_t) (highest_idx + 1); /* 0 if no used entries */
}
/* Check array density and indicate whether or not the array part should be abandoned. */
@@ -55044,6 +58262,8 @@ DUK_LOCAL duk_bool_t duk__abandon_array_density_check(duk_uint32_t a_used, duk_u
/* Fast check for extending array: check whether or not a slow density check is required. */
DUK_LOCAL duk_bool_t duk__abandon_array_slow_check_required(duk_uint32_t arr_idx, duk_uint32_t old_size) {
+ duk_uint32_t new_size_min;
+
/*
* In a fast check we assume old_size equals old_used (i.e., existing
* array is fully dense).
@@ -55065,7 +58285,9 @@ DUK_LOCAL duk_bool_t duk__abandon_array_slow_check_required(duk_uint32_t arr_idx
* arr_idx > limit'' * ((old_size + 7) / 8)
*/
- return (arr_idx > DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT * ((old_size + 7) >> 3));
+ new_size_min = arr_idx + 1;
+ return (new_size_min >= DUK_USE_HOBJECT_ARRAY_ABANDON_MINSIZE) &&
+ (arr_idx > DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT * ((old_size + 7) >> 3));
}
DUK_LOCAL duk_bool_t duk__abandon_array_check(duk_hthread *thr, duk_uint32_t arr_idx, duk_hobject *obj) {
@@ -55081,7 +58303,9 @@ DUK_LOCAL duk_bool_t duk__abandon_array_check(duk_hthread *thr, duk_uint32_t arr
duk__compute_a_stats(thr, obj, &old_used, &old_size);
DUK_DDD(DUK_DDDPRINT("abandon check, array stats: old_used=%ld, old_size=%ld, arr_idx=%ld",
- (long) old_used, (long) old_size, (long) arr_idx));
+ (long) old_used,
+ (long) old_size,
+ (long) arr_idx));
min_size = arr_idx + 1;
#if defined(DUK_USE_OBJSIZES16)
@@ -55109,7 +58333,7 @@ DUK_LOCAL duk_bool_t duk__abandon_array_check(duk_hthread *thr, duk_uint32_t arr
DUK_DDD(DUK_DDDPRINT("=> decided to keep array part"));
return 0;
- do_abandon:
+do_abandon:
duk__abandon_array_part(thr, obj);
DUK_ASSERT(!DUK_HOBJECT_HAS_ARRAY_PART(obj));
return 1;
@@ -55136,7 +58360,8 @@ DUK_LOCAL duk_tval *duk__obtain_arridx_slot_slowpath(duk_hthread *thr, duk_uint3
DUK_DDD(DUK_DDDPRINT("write to new array requires array resize, decide whether to do a "
"fast resize without abandon check (arr_idx=%ld, old_size=%ld)",
- (long) arr_idx, (long) DUK_HOBJECT_GET_ASIZE(obj)));
+ (long) arr_idx,
+ (long) DUK_HOBJECT_GET_ASIZE(obj)));
if (DUK_UNLIKELY(duk__abandon_array_check(thr, arr_idx, obj) != 0)) {
DUK_ASSERT(!DUK_HOBJECT_HAS_ARRAY_PART(obj));
@@ -55195,7 +58420,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_proxy_check(duk_hobject *obj, duk_hobject **
return 1;
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
/* Get Proxy target object. If the argument is not a Proxy, return it as is.
* If a Proxy is revoked, an error is thrown.
@@ -55221,10 +58446,14 @@ DUK_INTERNAL duk_hobject *duk_hobject_resolve_proxy_target(duk_hobject *obj) {
DUK_ASSERT(obj != NULL);
return obj;
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
#if defined(DUK_USE_ES6_PROXY)
-DUK_LOCAL duk_bool_t duk__proxy_check_prop(duk_hthread *thr, duk_hobject *obj, duk_small_uint_t stridx_trap, duk_tval *tv_key, duk_hobject **out_target) {
+DUK_LOCAL duk_bool_t duk__proxy_check_prop(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_small_uint_t stridx_trap,
+ duk_tval *tv_key,
+ duk_hobject **out_target) {
duk_hobject *h_handler;
DUK_ASSERT(thr != NULL);
@@ -55278,7 +58507,7 @@ DUK_LOCAL duk_bool_t duk__proxy_check_prop(duk_hthread *thr, duk_hobject *obj, d
duk_push_hobject(thr, h_handler);
if (duk_get_prop_stridx_short(thr, -1, stridx_trap)) {
/* -> [ ... handler trap ] */
- duk_insert(thr, -2); /* -> [ ... trap handler ] */
+ duk_insert(thr, -2); /* -> [ ... trap handler ] */
/* stack prepped for func call: [ ... trap handler ] */
return 1;
@@ -55287,7 +58516,7 @@ DUK_LOCAL duk_bool_t duk__proxy_check_prop(duk_hthread *thr, duk_hobject *obj, d
return 0;
}
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
/*
* Reallocate property allocation, moving properties to the new allocation.
@@ -55342,11 +58571,12 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
DUK_ASSERT(thr != NULL);
DUK_ASSERT(obj != NULL);
- DUK_ASSERT(!abandon_array || new_a_size == 0); /* if abandon_array, new_a_size must be 0 */
- DUK_ASSERT(DUK_HOBJECT_GET_PROPS(thr->heap, obj) != NULL || (DUK_HOBJECT_GET_ESIZE(obj) == 0 && DUK_HOBJECT_GET_ASIZE(obj) == 0));
- DUK_ASSERT(new_h_size == 0 || new_h_size >= new_e_size); /* required to guarantee success of rehashing,
- * intentionally use unadjusted new_e_size
- */
+ DUK_ASSERT(!abandon_array || new_a_size == 0); /* if abandon_array, new_a_size must be 0 */
+ DUK_ASSERT(DUK_HOBJECT_GET_PROPS(thr->heap, obj) != NULL ||
+ (DUK_HOBJECT_GET_ESIZE(obj) == 0 && DUK_HOBJECT_GET_ASIZE(obj) == 0));
+ DUK_ASSERT(new_h_size == 0 || new_h_size >= new_e_size); /* required to guarantee success of rehashing,
+ * intentionally use unadjusted new_e_size
+ */
DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj));
DUK_ASSERT_VALSTACK_SPACE(thr, DUK__VALSTACK_SPACE);
@@ -55376,10 +58606,12 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("using layout 1, but no need to pad e_size: %ld", (long) new_e_size));
new_e_size_adjusted = new_e_size;
#elif defined(DUK_USE_HOBJECT_LAYOUT_1) && ((DUK_HOBJECT_ALIGN_TARGET == 4) || (DUK_HOBJECT_ALIGN_TARGET == 8))
- new_e_size_adjusted = (new_e_size + (duk_uint32_t) DUK_HOBJECT_ALIGN_TARGET - 1U) &
- (~((duk_uint32_t) DUK_HOBJECT_ALIGN_TARGET - 1U));
+ new_e_size_adjusted =
+ (new_e_size + (duk_uint32_t) DUK_HOBJECT_ALIGN_TARGET - 1U) & (~((duk_uint32_t) DUK_HOBJECT_ALIGN_TARGET - 1U));
DUK_DDD(DUK_DDDPRINT("using layout 1, and alignment target is %ld, adjusted e_size: %ld -> %ld",
- (long) DUK_HOBJECT_ALIGN_TARGET, (long) new_e_size, (long) new_e_size_adjusted));
+ (long) DUK_HOBJECT_ALIGN_TARGET,
+ (long) new_e_size,
+ (long) new_e_size_adjusted));
DUK_ASSERT(new_e_size_adjusted >= new_e_size);
#else
#error invalid hobject layout defines
@@ -55389,23 +58621,22 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
* Debug logging after adjustment.
*/
- DUK_DDD(DUK_DDDPRINT("attempt to resize hobject %p props (%ld -> %ld bytes), from {p=%p,e_size=%ld,e_next=%ld,a_size=%ld,h_size=%ld} to "
- "{e_size=%ld,a_size=%ld,h_size=%ld}, abandon_array=%ld, unadjusted new_e_size=%ld",
- (void *) obj,
- (long) DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj),
- DUK_HOBJECT_GET_ASIZE(obj),
- DUK_HOBJECT_GET_HSIZE(obj)),
- (long) DUK_HOBJECT_P_COMPUTE_SIZE(new_e_size_adjusted, new_a_size, new_h_size),
- (void *) DUK_HOBJECT_GET_PROPS(thr->heap, obj),
- (long) DUK_HOBJECT_GET_ESIZE(obj),
- (long) DUK_HOBJECT_GET_ENEXT(obj),
- (long) DUK_HOBJECT_GET_ASIZE(obj),
- (long) DUK_HOBJECT_GET_HSIZE(obj),
- (long) new_e_size_adjusted,
- (long) new_a_size,
- (long) new_h_size,
- (long) abandon_array,
- (long) new_e_size));
+ DUK_DDD(DUK_DDDPRINT(
+ "attempt to resize hobject %p props (%ld -> %ld bytes), from {p=%p,e_size=%ld,e_next=%ld,a_size=%ld,h_size=%ld} to "
+ "{e_size=%ld,a_size=%ld,h_size=%ld}, abandon_array=%ld, unadjusted new_e_size=%ld",
+ (void *) obj,
+ (long) DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj), DUK_HOBJECT_GET_ASIZE(obj), DUK_HOBJECT_GET_HSIZE(obj)),
+ (long) DUK_HOBJECT_P_COMPUTE_SIZE(new_e_size_adjusted, new_a_size, new_h_size),
+ (void *) DUK_HOBJECT_GET_PROPS(thr->heap, obj),
+ (long) DUK_HOBJECT_GET_ESIZE(obj),
+ (long) DUK_HOBJECT_GET_ENEXT(obj),
+ (long) DUK_HOBJECT_GET_ASIZE(obj),
+ (long) DUK_HOBJECT_GET_HSIZE(obj),
+ (long) new_e_size_adjusted,
+ (long) new_a_size,
+ (long) new_h_size,
+ (long) abandon_array,
+ (long) new_e_size));
/*
* Property count check. This is the only point where we ensure that
@@ -55448,9 +58679,9 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
#endif
prev_ms_base_flags = thr->heap->ms_base_flags;
thr->heap->ms_base_flags |=
- DUK_MS_FLAG_NO_OBJECT_COMPACTION; /* Avoid attempt to compact the current object (all objects really). */
- thr->heap->pf_prevent_count++; /* Avoid finalizers. */
- DUK_ASSERT(thr->heap->pf_prevent_count != 0); /* Wrap. */
+ DUK_MS_FLAG_NO_OBJECT_COMPACTION; /* Avoid attempt to compact the current object (all objects really). */
+ thr->heap->pf_prevent_count++; /* Avoid finalizers. */
+ DUK_ASSERT(thr->heap->pf_prevent_count != 0); /* Wrap. */
new_alloc_size = DUK_HOBJECT_P_COMPUTE_SIZE(new_e_size_adjusted, new_a_size, new_h_size);
DUK_DDD(DUK_DDDPRINT("new hobject allocation size is %ld", (long) new_alloc_size));
@@ -55463,7 +58694,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
/* Alloc may trigger mark-and-sweep but no compaction, and
* cannot throw.
*/
-#if 0 /* XXX: inject test */
+#if 0 /* XXX: inject test */
if (1) {
new_p = NULL;
goto alloc_failed;
@@ -55481,19 +58712,28 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
/* Set up pointers to the new property area: this is hidden behind a macro
* because it is memory layout specific.
*/
- DUK_HOBJECT_P_SET_REALLOC_PTRS(new_p, new_e_k, new_e_pv, new_e_f, new_a, new_h,
- new_e_size_adjusted, new_a_size, new_h_size);
- DUK_UNREF(new_h); /* happens when hash part dropped */
+ DUK_HOBJECT_P_SET_REALLOC_PTRS(new_p,
+ new_e_k,
+ new_e_pv,
+ new_e_f,
+ new_a,
+ new_h,
+ new_e_size_adjusted,
+ new_a_size,
+ new_h_size);
+ DUK_UNREF(new_h); /* happens when hash part dropped */
new_e_next = 0;
/* if new_p == NULL, all of these pointers are NULL */
- DUK_ASSERT((new_p != NULL) ||
- (new_e_k == NULL && new_e_pv == NULL && new_e_f == NULL &&
- new_a == NULL && new_h == NULL));
+ DUK_ASSERT((new_p != NULL) || (new_e_k == NULL && new_e_pv == NULL && new_e_f == NULL && new_a == NULL && new_h == NULL));
DUK_DDD(DUK_DDDPRINT("new alloc size %ld, new_e_k=%p, new_e_pv=%p, new_e_f=%p, new_a=%p, new_h=%p",
- (long) new_alloc_size, (void *) new_e_k, (void *) new_e_pv, (void *) new_e_f,
- (void *) new_a, (void *) new_h));
+ (long) new_alloc_size,
+ (void *) new_e_k,
+ (void *) new_e_pv,
+ (void *) new_e_f,
+ (void *) new_a,
+ (void *) new_h));
/*
* Migrate array part to start of entries if requested.
@@ -55534,8 +58774,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
continue;
}
- DUK_ASSERT(new_p != NULL && new_e_k != NULL &&
- new_e_pv != NULL && new_e_f != NULL);
+ DUK_ASSERT(new_p != NULL && new_e_k != NULL && new_e_pv != NULL && new_e_f != NULL);
/*
* Intern key via the valstack to ensure reachability behaves
@@ -55547,7 +58786,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
* must be careful.
*/
-#if 0 /* XXX: inject test */
+#if 0 /* XXX: inject test */
if (1) {
goto abandon_error;
}
@@ -55563,7 +58802,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
if (key == NULL) {
goto abandon_error;
}
- duk_push_hstring(thr, key); /* keep key reachable for GC etc; guaranteed not to fail */
+ duk_push_hstring(thr, key); /* keep key reachable for GC etc; guaranteed not to fail */
/* Key is now reachable in the valstack, don't INCREF
* the new allocation yet (we'll steal the refcounts
@@ -55571,11 +58810,10 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
*/
new_e_k[new_e_next] = key;
- tv2 = &new_e_pv[new_e_next].v; /* array entries are all plain values */
+ tv2 = &new_e_pv[new_e_next].v; /* array entries are all plain values */
DUK_TVAL_SET_TVAL(tv2, tv1);
- new_e_f[new_e_next] = DUK_PROPDESC_FLAG_WRITABLE |
- DUK_PROPDESC_FLAG_ENUMERABLE |
- DUK_PROPDESC_FLAG_CONFIGURABLE;
+ new_e_f[new_e_next] =
+ DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE | DUK_PROPDESC_FLAG_CONFIGURABLE;
new_e_next++;
/* Note: new_e_next matches pushed temp key count, and nothing can
@@ -55602,8 +58840,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
continue;
}
- DUK_ASSERT(new_p != NULL && new_e_k != NULL &&
- new_e_pv != NULL && new_e_f != NULL);
+ DUK_ASSERT(new_p != NULL && new_e_k != NULL && new_e_pv != NULL && new_e_f != NULL);
new_e_k[new_e_next] = key;
new_e_pv[new_e_next] = DUK_HOBJECT_E_GET_VALUE(thr->heap, obj, i);
@@ -55637,9 +58874,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
DUK_ASSERT(new_a != NULL || array_copy_size == 0U);
DUK_ASSERT(DUK_HOBJECT_GET_PROPS(thr->heap, obj) != NULL || array_copy_size == 0U);
DUK_ASSERT(DUK_HOBJECT_GET_ASIZE(obj) > 0 || array_copy_size == 0U);
- duk_memcpy_unsafe((void *) new_a,
- (const void *) DUK_HOBJECT_A_GET_BASE(thr->heap, obj),
- array_copy_size);
+ duk_memcpy_unsafe((void *) new_a, (const void *) DUK_HOBJECT_A_GET_BASE(thr->heap, obj), array_copy_size);
for (i = DUK_HOBJECT_GET_ASIZE(obj); i < new_a_size; i++) {
duk_tval *tv = &new_a[i];
@@ -55667,7 +58902,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
DUK_ASSERT(new_h_size > 0);
duk_memset(new_h, 0xff, sizeof(duk_uint32_t) * new_h_size);
- DUK_ASSERT(new_e_next <= new_h_size); /* equality not actually possible */
+ DUK_ASSERT(new_e_next <= new_h_size); /* equality not actually possible */
mask = new_h_size - 1;
for (i = 0; i < new_e_next; i++) {
@@ -55676,10 +58911,10 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
DUK_ASSERT(key != NULL);
j = DUK_HSTRING_GET_HASH(key) & mask;
- step = 1; /* Cache friendly but clustering prone. */
+ step = 1; /* Cache friendly but clustering prone. */
for (;;) {
- DUK_ASSERT(new_h[j] != DUK__HASH_DELETED); /* should never happen */
+ DUK_ASSERT(new_h[j] != DUK__HASH_DELETED); /* should never happen */
if (new_h[j] == DUK__HASH_UNUSED) {
DUK_DDD(DUK_DDDPRINT("rebuild hit %ld -> %ld", (long) j, (long) i));
new_h[j] = (duk_uint32_t) i;
@@ -55692,37 +58927,36 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
}
}
}
-#endif /* DUK_USE_HOBJECT_HASH_PART */
+#endif /* DUK_USE_HOBJECT_HASH_PART */
/*
* Nice debug log.
*/
- DUK_DD(DUK_DDPRINT("resized hobject %p props (%ld -> %ld bytes), from {p=%p,e_size=%ld,e_next=%ld,a_size=%ld,h_size=%ld} to "
- "{p=%p,e_size=%ld,e_next=%ld,a_size=%ld,h_size=%ld}, abandon_array=%ld, unadjusted new_e_size=%ld",
- (void *) obj,
- (long) DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj),
- DUK_HOBJECT_GET_ASIZE(obj),
- DUK_HOBJECT_GET_HSIZE(obj)),
- (long) new_alloc_size,
- (void *) DUK_HOBJECT_GET_PROPS(thr->heap, obj),
- (long) DUK_HOBJECT_GET_ESIZE(obj),
- (long) DUK_HOBJECT_GET_ENEXT(obj),
- (long) DUK_HOBJECT_GET_ASIZE(obj),
- (long) DUK_HOBJECT_GET_HSIZE(obj),
- (void *) new_p,
- (long) new_e_size_adjusted,
- (long) new_e_next,
- (long) new_a_size,
- (long) new_h_size,
- (long) abandon_array,
- (long) new_e_size));
+ DUK_DD(DUK_DDPRINT(
+ "resized hobject %p props (%ld -> %ld bytes), from {p=%p,e_size=%ld,e_next=%ld,a_size=%ld,h_size=%ld} to "
+ "{p=%p,e_size=%ld,e_next=%ld,a_size=%ld,h_size=%ld}, abandon_array=%ld, unadjusted new_e_size=%ld",
+ (void *) obj,
+ (long) DUK_HOBJECT_P_COMPUTE_SIZE(DUK_HOBJECT_GET_ESIZE(obj), DUK_HOBJECT_GET_ASIZE(obj), DUK_HOBJECT_GET_HSIZE(obj)),
+ (long) new_alloc_size,
+ (void *) DUK_HOBJECT_GET_PROPS(thr->heap, obj),
+ (long) DUK_HOBJECT_GET_ESIZE(obj),
+ (long) DUK_HOBJECT_GET_ENEXT(obj),
+ (long) DUK_HOBJECT_GET_ASIZE(obj),
+ (long) DUK_HOBJECT_GET_HSIZE(obj),
+ (void *) new_p,
+ (long) new_e_size_adjusted,
+ (long) new_e_next,
+ (long) new_a_size,
+ (long) new_h_size,
+ (long) abandon_array,
+ (long) new_e_size));
/*
* All done, switch properties ('p') allocation to new one.
*/
- DUK_FREE_CHECKED(thr, DUK_HOBJECT_GET_PROPS(thr->heap, obj)); /* NULL obj->p is OK */
+ DUK_FREE_CHECKED(thr, DUK_HOBJECT_GET_PROPS(thr->heap, obj)); /* NULL obj->p is OK */
DUK_HOBJECT_SET_PROPS(thr->heap, obj, new_p);
DUK_HOBJECT_SET_ESIZE(obj, new_e_size_adjusted);
DUK_HOBJECT_SET_ENEXT(obj, new_e_next);
@@ -55761,11 +58995,11 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
* unwind.
*/
- abandon_error:
- alloc_failed:
+abandon_error:
+alloc_failed:
DUK_D(DUK_DPRINT("object property table resize failed"));
- DUK_FREE_CHECKED(thr, new_p); /* OK for NULL. */
+ DUK_FREE_CHECKED(thr, new_p); /* OK for NULL. */
thr->heap->pf_prevent_count--;
thr->heap->ms_base_flags = prev_ms_base_flags;
@@ -55782,9 +59016,7 @@ DUK_INTERNAL void duk_hobject_realloc_props(duk_hthread *thr,
* Helpers to resize properties allocation on specific needs.
*/
-DUK_INTERNAL void duk_hobject_resize_entrypart(duk_hthread *thr,
- duk_hobject *obj,
- duk_uint32_t new_e_size) {
+DUK_INTERNAL void duk_hobject_resize_entrypart(duk_hthread *thr, duk_hobject *obj, duk_uint32_t new_e_size) {
duk_uint32_t old_e_size;
duk_uint32_t new_a_size;
duk_uint32_t new_h_size;
@@ -55808,7 +59040,7 @@ DUK_INTERNAL void duk_hobject_resize_entrypart(duk_hthread *thr,
/* Grow entry part allocation for one additional entry. */
DUK_LOCAL void duk__grow_props_for_new_entry_item(duk_hthread *thr, duk_hobject *obj) {
- duk_uint32_t old_e_used; /* actually used, non-NULL entries */
+ duk_uint32_t old_e_used; /* actually used, non-NULL entries */
duk_uint32_t new_e_size_minimum;
duk_uint32_t new_e_size;
duk_uint32_t new_a_size;
@@ -55870,7 +59102,7 @@ DUK_LOCAL void duk__grow_props_for_array_item(duk_hthread *thr, duk_hobject *obj
new_h_size = DUK_HOBJECT_GET_HSIZE(obj);
new_a_size_minimum = highest_arr_idx + 1;
new_a_size = highest_arr_idx + duk__get_min_grow_a(highest_arr_idx);
- DUK_ASSERT(new_a_size >= highest_arr_idx + 1); /* duk__get_min_grow_a() is always >= 1 */
+ DUK_ASSERT(new_a_size >= highest_arr_idx + 1); /* duk__get_min_grow_a() is always >= 1 */
#if defined(DUK_USE_OBJSIZES16)
if (new_e_size > DUK_UINT16_MAX) {
@@ -55902,7 +59134,7 @@ DUK_LOCAL void duk__abandon_array_part(duk_hthread *thr, duk_hobject *obj) {
duk_uint32_t new_e_size;
duk_uint32_t new_a_size;
duk_uint32_t new_h_size;
- duk_uint32_t e_used; /* actually used, non-NULL keys */
+ duk_uint32_t e_used; /* actually used, non-NULL keys */
duk_uint32_t a_used;
duk_uint32_t a_size;
@@ -55947,8 +59179,13 @@ DUK_LOCAL void duk__abandon_array_part(duk_hthread *thr, duk_hobject *obj) {
DUK_DD(DUK_DDPRINT("abandon array part for hobject %p, "
"array stats before: e_used=%ld, a_used=%ld, a_size=%ld; "
"resize to e_size=%ld, a_size=%ld, h_size=%ld",
- (void *) obj, (long) e_used, (long) a_used, (long) a_size,
- (long) new_e_size, (long) new_a_size, (long) new_h_size));
+ (void *) obj,
+ (long) e_used,
+ (long) a_used,
+ (long) a_size,
+ (long) new_e_size,
+ (long) new_a_size,
+ (long) new_h_size));
duk_hobject_realloc_props(thr, obj, new_e_size, new_a_size, new_h_size, 1);
}
@@ -55966,9 +59203,9 @@ DUK_LOCAL void duk__abandon_array_part(duk_hthread *thr, duk_hobject *obj) {
*/
DUK_INTERNAL void duk_hobject_compact_props(duk_hthread *thr, duk_hobject *obj) {
- duk_uint32_t e_size; /* currently used -> new size */
- duk_uint32_t a_size; /* currently required */
- duk_uint32_t a_used; /* actually used */
+ duk_uint32_t e_size; /* currently used -> new size */
+ duk_uint32_t a_size; /* currently required */
+ duk_uint32_t a_used; /* actually used */
duk_uint32_t h_size;
duk_bool_t abandon_array;
@@ -55987,13 +59224,17 @@ DUK_INTERNAL void duk_hobject_compact_props(duk_hthread *thr, duk_hobject *obj)
DUK_DD(DUK_DDPRINT("compacting hobject, used e keys %ld, used a keys %ld, min a size %ld, "
"resized array density would be: %ld/%ld = %lf",
- (long) e_size, (long) a_used, (long) a_size,
- (long) a_used, (long) a_size,
+ (long) e_size,
+ (long) a_used,
+ (long) a_size,
+ (long) a_used,
+ (long) a_size,
(double) a_used / (double) a_size));
if (duk__abandon_array_density_check(a_used, a_size)) {
DUK_DD(DUK_DDPRINT("decided to abandon array during compaction, a_used=%ld, a_size=%ld",
- (long) a_used, (long) a_size));
+ (long) a_used,
+ (long) a_size));
abandon_array = 1;
e_size += a_used;
a_size = 0;
@@ -56013,7 +59254,10 @@ DUK_INTERNAL void duk_hobject_compact_props(duk_hthread *thr, duk_hobject *obj)
#endif
DUK_DD(DUK_DDPRINT("compacting hobject -> new e_size %ld, new a_size=%ld, new h_size=%ld, abandon_array=%ld",
- (long) e_size, (long) a_size, (long) h_size, (long) abandon_array));
+ (long) e_size,
+ (long) a_size,
+ (long) h_size,
+ (long) abandon_array));
duk_hobject_realloc_props(thr, obj, e_size, a_size, h_size, abandon_array);
}
@@ -56028,15 +59272,15 @@ DUK_INTERNAL void duk_hobject_compact_props(duk_hthread *thr, duk_hobject *obj)
* but there is no hash part, h_idx is set to -1.
*/
-DUK_INTERNAL duk_bool_t duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_int_t *e_idx, duk_int_t *h_idx) {
+DUK_INTERNAL duk_bool_t
+duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_int_t *e_idx, duk_int_t *h_idx) {
DUK_ASSERT(obj != NULL);
DUK_ASSERT(key != NULL);
DUK_ASSERT(e_idx != NULL);
DUK_ASSERT(h_idx != NULL);
DUK_UNREF(heap);
- if (DUK_LIKELY(DUK_HOBJECT_GET_HSIZE(obj) == 0))
- {
+ if (DUK_LIKELY(DUK_HOBJECT_GET_HSIZE(obj) == 0)) {
/* Linear scan: more likely because most objects are small.
* This is an important fast path.
*
@@ -56058,8 +59302,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj,
}
}
#if defined(DUK_USE_HOBJECT_HASH_PART)
- else
- {
+ else {
/* hash lookup */
duk_uint32_t n;
duk_uint32_t i, step;
@@ -56072,40 +59315,38 @@ DUK_INTERNAL duk_bool_t duk_hobject_find_entry(duk_heap *heap, duk_hobject *obj,
n = DUK_HOBJECT_GET_HSIZE(obj);
mask = n - 1;
i = DUK_HSTRING_GET_HASH(key) & mask;
- step = 1; /* Cache friendly but clustering prone. */
+ step = 1; /* Cache friendly but clustering prone. */
for (;;) {
duk_uint32_t t;
- DUK_ASSERT_DISABLE(i >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(i >= 0); /* unsigned */
DUK_ASSERT(i < DUK_HOBJECT_GET_HSIZE(obj));
t = h_base[i];
DUK_ASSERT(t == DUK__HASH_UNUSED || t == DUK__HASH_DELETED ||
- (t < DUK_HOBJECT_GET_ESIZE(obj))); /* t >= 0 always true, unsigned */
+ (t < DUK_HOBJECT_GET_ESIZE(obj))); /* t >= 0 always true, unsigned */
if (t == DUK__HASH_UNUSED) {
break;
} else if (t == DUK__HASH_DELETED) {
- DUK_DDD(DUK_DDDPRINT("lookup miss (deleted) i=%ld, t=%ld",
- (long) i, (long) t));
+ DUK_DDD(DUK_DDDPRINT("lookup miss (deleted) i=%ld, t=%ld", (long) i, (long) t));
} else {
DUK_ASSERT(t < DUK_HOBJECT_GET_ESIZE(obj));
if (DUK_HOBJECT_E_GET_KEY(heap, obj, t) == key) {
- DUK_DDD(DUK_DDDPRINT("lookup hit i=%ld, t=%ld -> key %p",
- (long) i, (long) t, (void *) key));
+ DUK_DDD(
+ DUK_DDDPRINT("lookup hit i=%ld, t=%ld -> key %p", (long) i, (long) t, (void *) key));
*e_idx = (duk_int_t) t;
*h_idx = (duk_int_t) i;
return 1;
}
- DUK_DDD(DUK_DDDPRINT("lookup miss i=%ld, t=%ld",
- (long) i, (long) t));
+ DUK_DDD(DUK_DDDPRINT("lookup miss i=%ld, t=%ld", (long) i, (long) t));
}
i = (i + step) & mask;
/* Guaranteed to finish (hash is larger than #props). */
}
}
-#endif /* DUK_USE_HOBJECT_HASH_PART */
+#endif /* DUK_USE_HOBJECT_HASH_PART */
/* Not found, leave e_idx and h_idx unset. */
return 0;
@@ -56134,7 +59375,10 @@ DUK_INTERNAL duk_tval *duk_hobject_find_entry_tval_ptr_stridx(duk_heap *heap, du
}
/* For internal use: get non-accessor entry value and attributes */
-DUK_INTERNAL duk_tval *duk_hobject_find_entry_tval_ptr_and_attrs(duk_heap *heap, duk_hobject *obj, duk_hstring *key, duk_uint_t *out_attrs) {
+DUK_INTERNAL duk_tval *duk_hobject_find_entry_tval_ptr_and_attrs(duk_heap *heap,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_uint_t *out_attrs) {
duk_int_t e_idx;
duk_int_t h_idx;
@@ -56219,14 +59463,15 @@ DUK_LOCAL duk_int_t duk__hobject_alloc_entry_checked(duk_hthread *thr, duk_hobje
n = DUK_HOBJECT_GET_HSIZE(obj);
mask = n - 1;
i = DUK_HSTRING_GET_HASH(key) & mask;
- step = 1; /* Cache friendly but clustering prone. */
+ step = 1; /* Cache friendly but clustering prone. */
for (;;) {
duk_uint32_t t = h_base[i];
if (t == DUK__HASH_UNUSED || t == DUK__HASH_DELETED) {
DUK_DDD(DUK_DDDPRINT("duk__hobject_alloc_entry_checked() inserted key into hash part, %ld -> %ld",
- (long) i, (long) idx));
- DUK_ASSERT_DISABLE(i >= 0); /* unsigned */
+ (long) i,
+ (long) idx));
+ DUK_ASSERT_DISABLE(i >= 0); /* unsigned */
DUK_ASSERT(i < DUK_HOBJECT_GET_HSIZE(obj));
DUK_ASSERT_DISABLE(idx >= 0);
DUK_ASSERT(idx < DUK_HOBJECT_GET_ESIZE(obj));
@@ -56239,7 +59484,7 @@ DUK_LOCAL duk_int_t duk__hobject_alloc_entry_checked(duk_hthread *thr, duk_hobje
/* Guaranteed to finish (hash is larger than #props). */
}
}
-#endif /* DUK_USE_HOBJECT_HASH_PART */
+#endif /* DUK_USE_HOBJECT_HASH_PART */
/* Note: we could return the hash index here too, but it's not
* needed right now.
@@ -56347,8 +59592,12 @@ duk_bool_t duk__lookup_arguments_map(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("arguments map lookup: thr=%p, obj=%p, key=%p, temp_desc=%p "
"(obj -> %!O, key -> %!O)",
- (void *) thr, (void *) obj, (void *) key, (void *) temp_desc,
- (duk_heaphdr *) obj, (duk_heaphdr *) key));
+ (void *) thr,
+ (void *) obj,
+ (void *) key,
+ (void *) temp_desc,
+ (duk_heaphdr *) obj,
+ (duk_heaphdr *) key));
if (!duk_hobject_get_own_propdesc(thr, obj, DUK_HTHREAD_STRING_INT_MAP(thr), temp_desc, DUK_GETDESC_FLAG_PUSH_VALUE)) {
DUK_DDD(DUK_DDDPRINT("-> no 'map'"));
@@ -56357,7 +59606,7 @@ duk_bool_t duk__lookup_arguments_map(duk_hthread *thr,
map = duk_require_hobject(thr, -1);
DUK_ASSERT(map != NULL);
- duk_pop_unsafe(thr); /* map is reachable through obj */
+ duk_pop_unsafe(thr); /* map is reachable through obj */
if (!duk_hobject_get_own_propdesc(thr, map, key, temp_desc, DUK_GETDESC_FLAG_PUSH_VALUE)) {
DUK_DDD(DUK_DDDPRINT("-> 'map' exists, but key not in map"));
@@ -56367,29 +59616,32 @@ duk_bool_t duk__lookup_arguments_map(duk_hthread *thr,
/* [... varname] */
DUK_DDD(DUK_DDDPRINT("-> 'map' exists, and contains key, key is mapped to argument/variable binding %!T",
(duk_tval *) duk_get_tval(thr, -1)));
- DUK_ASSERT(duk_is_string(thr, -1)); /* guaranteed when building arguments */
+ DUK_ASSERT(duk_is_string(thr, -1)); /* guaranteed when building arguments */
/* get varenv for varname (callee's declarative lexical environment) */
rc = duk_hobject_get_own_propdesc(thr, obj, DUK_HTHREAD_STRING_INT_VARENV(thr), temp_desc, DUK_GETDESC_FLAG_PUSH_VALUE);
DUK_UNREF(rc);
- DUK_ASSERT(rc != 0); /* arguments MUST have an initialized lexical environment reference */
+ DUK_ASSERT(rc != 0); /* arguments MUST have an initialized lexical environment reference */
varenv = duk_require_hobject(thr, -1);
DUK_ASSERT(varenv != NULL);
- duk_pop_unsafe(thr); /* varenv remains reachable through 'obj' */
+ duk_pop_unsafe(thr); /* varenv remains reachable through 'obj' */
DUK_DDD(DUK_DDDPRINT("arguments varenv is: %!dO", (duk_heaphdr *) varenv));
/* success: leave varname in stack */
*out_map = map;
*out_varenv = varenv;
- return 1; /* [... varname] */
+ return 1; /* [... varname] */
}
/* Lookup 'key' from arguments internal 'map', and leave replacement value
* on stack top if mapped (and return non-zero).
* Used in E5 Section 10.6 algorithm for [[GetOwnProperty]] (used by [[Get]]).
*/
-DUK_LOCAL duk_bool_t duk__check_arguments_map_for_get(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *temp_desc) {
+DUK_LOCAL duk_bool_t duk__check_arguments_map_for_get(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_propdesc *temp_desc) {
duk_hobject *map;
duk_hobject *varenv;
duk_hstring *varname;
@@ -56405,7 +59657,7 @@ DUK_LOCAL duk_bool_t duk__check_arguments_map_for_get(duk_hthread *thr, duk_hobj
varname = duk_require_hstring(thr, -1);
DUK_ASSERT(varname != NULL);
- duk_pop_unsafe(thr); /* varname is still reachable */
+ duk_pop_unsafe(thr); /* varname is still reachable */
DUK_DDD(DUK_DDDPRINT("arguments object automatic getvar for a bound variable; "
"key=%!O, varname=%!O",
@@ -56426,7 +59678,11 @@ DUK_LOCAL duk_bool_t duk__check_arguments_map_for_get(duk_hthread *thr, duk_hobj
* Used in E5 Section 10.6 algorithm for [[DefineOwnProperty]] (used by [[Put]]).
* Assumes stack top contains 'put' value (which is NOT popped).
*/
-DUK_LOCAL void duk__check_arguments_map_for_put(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *temp_desc, duk_bool_t throw_flag) {
+DUK_LOCAL void duk__check_arguments_map_for_put(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_propdesc *temp_desc,
+ duk_bool_t throw_flag) {
duk_hobject *map;
duk_hobject *varenv;
duk_hstring *varname;
@@ -56442,7 +59698,7 @@ DUK_LOCAL void duk__check_arguments_map_for_put(duk_hthread *thr, duk_hobject *o
varname = duk_require_hstring(thr, -1);
DUK_ASSERT(varname != NULL);
- duk_pop_unsafe(thr); /* varname is still reachable */
+ duk_pop_unsafe(thr); /* varname is still reachable */
DUK_DDD(DUK_DDDPRINT("arguments object automatic putvar for a bound variable; "
"key=%!O, varname=%!O, value=%!T",
@@ -56481,15 +59737,14 @@ DUK_LOCAL void duk__check_arguments_map_for_delete(duk_hthread *thr, duk_hobject
map = duk_require_hobject(thr, -1);
DUK_ASSERT(map != NULL);
- duk_pop_unsafe(thr); /* map is reachable through obj */
+ duk_pop_unsafe(thr); /* map is reachable through obj */
- DUK_DDD(DUK_DDDPRINT("-> have 'map', delete key %!O from map (if exists)); ignore result",
- (duk_heaphdr *) key));
+ DUK_DDD(DUK_DDDPRINT("-> have 'map', delete key %!O from map (if exists)); ignore result", (duk_heaphdr *) key));
/* Note: no recursion issue, we can trust 'map' to behave */
DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_BEHAVIOR(map));
DUK_DDD(DUK_DDDPRINT("map before deletion: %!O", (duk_heaphdr *) map));
- (void) duk_hobject_delprop_raw(thr, map, key, 0); /* ignore result */
+ (void) duk_hobject_delprop_raw(thr, map, key, 0); /* ignore result */
DUK_DDD(DUK_DDDPRINT("map after deletion: %!O", (duk_heaphdr *) map));
}
@@ -56532,14 +59787,24 @@ DUK_LOCAL void duk__check_arguments_map_for_delete(duk_hthread *thr, duk_hobject
* accessor properties later, this would need to change.
*/
-DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_uint32_t arr_idx, duk_propdesc *out_desc, duk_small_uint_t flags) {
+DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_uint32_t arr_idx,
+ duk_propdesc *out_desc,
+ duk_small_uint_t flags) {
duk_tval *tv;
DUK_DDD(DUK_DDDPRINT("duk_hobject_get_own_propdesc: thr=%p, obj=%p, key=%p, out_desc=%p, flags=%lx, "
"arr_idx=%ld (obj -> %!O, key -> %!O)",
- (void *) thr, (void *) obj, (void *) key, (void *) out_desc,
- (long) flags, (long) arr_idx,
- (duk_heaphdr *) obj, (duk_heaphdr *) key));
+ (void *) thr,
+ (void *) obj,
+ (void *) key,
+ (void *) out_desc,
+ (long) flags,
+ (long) arr_idx,
+ (duk_heaphdr *) obj,
+ (duk_heaphdr *) key));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -56613,14 +59878,13 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
duk_push_tval(thr, tv);
}
/* implicit attributes */
- out_desc->flags = DUK_PROPDESC_FLAG_WRITABLE |
- DUK_PROPDESC_FLAG_CONFIGURABLE |
- DUK_PROPDESC_FLAG_ENUMERABLE;
+ out_desc->flags =
+ DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_CONFIGURABLE | DUK_PROPDESC_FLAG_ENUMERABLE;
out_desc->get = NULL;
out_desc->set = NULL;
out_desc->e_idx = -1;
out_desc->h_idx = -1;
- out_desc->a_idx = (duk_int_t) arr_idx; /* XXX: limit 2G due to being signed */
+ out_desc->a_idx = (duk_int_t) arr_idx; /* XXX: limit 2G due to being signed */
goto prop_found;
}
}
@@ -56641,7 +59905,8 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
duk_harray *a;
DUK_DDD(DUK_DDDPRINT("array object exotic property get for key: %!O, arr_idx: %ld",
- (duk_heaphdr *) key, (long) arr_idx));
+ (duk_heaphdr *) key,
+ (long) arr_idx));
a = (duk_harray *) obj;
DUK_HARRAY_ASSERT_VALID(a);
@@ -56663,11 +59928,12 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
out_desc->a_idx = -1;
DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj));
- goto prop_found_noexotic; /* cannot be arguments exotic */
+ goto prop_found_noexotic; /* cannot be arguments exotic */
}
} else if (DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(obj)) {
DUK_DDD(DUK_DDDPRINT("string object exotic property get for key: %!O, arr_idx: %ld",
- (duk_heaphdr *) key, (long) arr_idx));
+ (duk_heaphdr *) key,
+ (long) arr_idx));
/* XXX: charlen; avoid multiple lookups? */
@@ -56682,9 +59948,9 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
DUK_DDD(DUK_DDDPRINT("-> found, array index inside string"));
if (flags & DUK_GETDESC_FLAG_PUSH_VALUE) {
duk_push_hstring(thr, h_val);
- duk_substring(thr, -1, arr_idx, arr_idx + 1); /* [str] -> [substr] */
+ duk_substring(thr, -1, arr_idx, arr_idx + 1); /* [str] -> [substr] */
}
- out_desc->flags = DUK_PROPDESC_FLAG_ENUMERABLE | /* E5 Section 15.5.5.2 */
+ out_desc->flags = DUK_PROPDESC_FLAG_ENUMERABLE | /* E5 Section 15.5.5.2 */
DUK_PROPDESC_FLAG_VIRTUAL;
out_desc->get = NULL;
out_desc->set = NULL;
@@ -56693,7 +59959,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
out_desc->a_idx = -1;
DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj));
- goto prop_found_noexotic; /* cannot be arguments exotic */
+ goto prop_found_noexotic; /* cannot be arguments exotic */
} else {
/* index is above internal string length -> property is fully normal */
DUK_DDD(DUK_DDDPRINT("array index outside string -> normal property"));
@@ -56708,7 +59974,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
if (flags & DUK_GETDESC_FLAG_PUSH_VALUE) {
duk_push_uint(thr, (duk_uint_t) DUK_HSTRING_GET_CHARLEN(h_val));
}
- out_desc->flags = DUK_PROPDESC_FLAG_VIRTUAL; /* E5 Section 15.5.5.1 */
+ out_desc->flags = DUK_PROPDESC_FLAG_VIRTUAL; /* E5 Section 15.5.5.1 */
out_desc->get = NULL;
out_desc->set = NULL;
out_desc->e_idx = -1;
@@ -56716,7 +59982,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
out_desc->a_idx = -1;
DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj));
- goto prop_found_noexotic; /* cannot be arguments exotic */
+ goto prop_found_noexotic; /* cannot be arguments exotic */
}
}
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
@@ -56727,8 +59993,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
h_bufobj = (duk_hbufobj *) obj;
DUK_HBUFOBJ_ASSERT_VALID(h_bufobj);
- DUK_DDD(DUK_DDDPRINT("bufobj property get for key: %!O, arr_idx: %ld",
- (duk_heaphdr *) key, (long) arr_idx));
+ DUK_DDD(DUK_DDDPRINT("bufobj property get for key: %!O, arr_idx: %ld", (duk_heaphdr *) key, (long) arr_idx));
if (arr_idx != DUK__NO_ARRAY_INDEX && DUK_HBUFOBJ_HAS_VIRTUAL_INDICES(h_bufobj)) {
DUK_DDD(DUK_DDDPRINT("array index exists"));
@@ -56737,21 +60002,22 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
* length downshift won't.
*/
if (arr_idx < (h_bufobj->length >> h_bufobj->shift)) {
- byte_off = arr_idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
+ byte_off = arr_idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
elem_size = (duk_small_uint_t) (1U << h_bufobj->shift);
if (flags & DUK_GETDESC_FLAG_PUSH_VALUE) {
duk_uint8_t *data;
- if (h_bufobj->buf != NULL && DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_bufobj, byte_off + elem_size)) {
- data = (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufobj->buf) + h_bufobj->offset + byte_off;
+ if (h_bufobj->buf != NULL &&
+ DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_bufobj, byte_off + elem_size)) {
+ data = (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufobj->buf) +
+ h_bufobj->offset + byte_off;
duk_hbufobj_push_validated_read(thr, h_bufobj, data, elem_size);
} else {
DUK_D(DUK_DPRINT("bufobj access out of underlying buffer, ignoring (read zero)"));
duk_push_uint(thr, 0);
}
}
- out_desc->flags = DUK_PROPDESC_FLAG_WRITABLE |
- DUK_PROPDESC_FLAG_VIRTUAL;
+ out_desc->flags = DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_VIRTUAL;
if (DUK_HOBJECT_GET_CLASS_NUMBER(obj) != DUK_HOBJECT_CLASS_ARRAYBUFFER) {
/* ArrayBuffer indices are non-standard and are
* non-enumerable to avoid their serialization.
@@ -56765,7 +60031,8 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
out_desc->a_idx = -1;
DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj));
- goto prop_found_noexotic; /* cannot be e.g. arguments exotic, since exotic 'traits' are mutually exclusive */
+ goto prop_found_noexotic; /* cannot be e.g. arguments exotic, since exotic 'traits' are mutually
+ exclusive */
} else {
/* index is above internal buffer length -> property is fully normal */
DUK_DDD(DUK_DDDPRINT("array index outside buffer -> normal property"));
@@ -56787,10 +60054,10 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
out_desc->a_idx = -1;
DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj));
- goto prop_found_noexotic; /* cannot be arguments exotic */
+ goto prop_found_noexotic; /* cannot be arguments exotic */
}
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/* Array properties have exotic behavior but they are concrete,
* so no special handling here.
@@ -56804,7 +60071,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
* Not found as concrete or virtual.
*/
- prop_not_found:
+prop_not_found:
DUK_DDD(DUK_DDDPRINT("-> not found (virtual, entry part, or array part)"));
DUK_STATS_INC(thr->heap, stats_getownpropdesc_miss);
return 0;
@@ -56816,7 +60083,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
* description of [[GetOwnProperty]] variant for arguments.
*/
- prop_found:
+prop_found:
DUK_DDD(DUK_DDDPRINT("-> property found, checking for arguments exotic post-behavior"));
/* Notes:
@@ -56826,8 +60093,7 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
* DUK_GETDESC_FLAG_PUSH_VALUE is not set.
*/
- if (DUK_UNLIKELY(DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj) &&
- arr_idx != DUK__NO_ARRAY_INDEX &&
+ if (DUK_UNLIKELY(DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj) && arr_idx != DUK__NO_ARRAY_INDEX &&
(flags & DUK_GETDESC_FLAG_PUSH_VALUE))) {
duk_propdesc temp_desc;
@@ -56853,12 +60119,13 @@ DUK_LOCAL duk_bool_t duk__get_own_propdesc_raw(duk_hthread *thr, duk_hobject *ob
}
}
- prop_found_noexotic:
+prop_found_noexotic:
DUK_STATS_INC(thr->heap, stats_getownpropdesc_hit);
return 1;
}
-DUK_INTERNAL duk_bool_t duk_hobject_get_own_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags) {
+DUK_INTERNAL duk_bool_t
+duk_hobject_get_own_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(obj != NULL);
DUK_ASSERT(key != NULL);
@@ -56887,7 +60154,8 @@ DUK_INTERNAL duk_bool_t duk_hobject_get_own_propdesc(duk_hthread *thr, duk_hobje
* pointers.
*/
-DUK_LOCAL duk_bool_t duk__get_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags) {
+DUK_LOCAL duk_bool_t
+duk__get_propdesc(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_propdesc *out_desc, duk_small_uint_t flags) {
duk_hobject *curr;
duk_uint32_t arr_idx;
duk_uint_t sanity;
@@ -56905,9 +60173,14 @@ DUK_LOCAL duk_bool_t duk__get_propdesc(duk_hthread *thr, duk_hobject *obj, duk_h
DUK_DDD(DUK_DDDPRINT("duk__get_propdesc: thr=%p, obj=%p, key=%p, out_desc=%p, flags=%lx, "
"arr_idx=%ld (obj -> %!O, key -> %!O)",
- (void *) thr, (void *) obj, (void *) key, (void *) out_desc,
- (long) flags, (long) arr_idx,
- (duk_heaphdr *) obj, (duk_heaphdr *) key));
+ (void *) thr,
+ (void *) obj,
+ (void *) key,
+ (void *) out_desc,
+ (long) flags,
+ (long) arr_idx,
+ (duk_heaphdr *) obj,
+ (duk_heaphdr *) key));
curr = obj;
DUK_ASSERT(curr != NULL);
@@ -56967,11 +60240,8 @@ DUK_LOCAL duk_tval *duk__getprop_shallow_fastpath_array_tval(duk_hthread *thr, d
DUK_UNREF(thr);
- if (!(DUK_HOBJECT_HAS_ARRAY_PART(obj) &&
- !DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj) &&
- !DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(obj) &&
- !DUK_HOBJECT_IS_BUFOBJ(obj) &&
- !DUK_HOBJECT_IS_PROXY(obj))) {
+ if (!(DUK_HOBJECT_HAS_ARRAY_PART(obj) && !DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(obj) && !DUK_HOBJECT_HAS_EXOTIC_STRINGOBJ(obj) &&
+ !DUK_HOBJECT_IS_BUFOBJ(obj) && !DUK_HOBJECT_IS_PROXY(obj))) {
/* Must have array part and no conflicting exotic behaviors.
* Doesn't need to have array special behavior, e.g. Arguments
* object has array part.
@@ -56989,7 +60259,7 @@ DUK_LOCAL duk_tval *duk__getprop_shallow_fastpath_array_tval(duk_hthread *thr, d
idx = duk__tval_fastint_to_arr_idx(tv_key);
} else
#endif
- if (DUK_TVAL_IS_DOUBLE(tv_key)) {
+ if (DUK_TVAL_IS_DOUBLE(tv_key)) {
idx = duk__tval_number_to_arr_idx(tv_key);
} else {
DUK_DDD(DUK_DDDPRINT("key is not a number"));
@@ -57023,18 +60293,19 @@ DUK_LOCAL duk_tval *duk__getprop_shallow_fastpath_array_tval(duk_hthread *thr, d
return NULL;
}
-DUK_LOCAL duk_bool_t duk__putprop_shallow_fastpath_array_tval(duk_hthread *thr, duk_hobject *obj, duk_tval *tv_key, duk_tval *tv_val) {
+DUK_LOCAL duk_bool_t duk__putprop_shallow_fastpath_array_tval(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_tval *tv_key,
+ duk_tval *tv_val) {
duk_tval *tv;
duk_harray *a;
duk_uint32_t idx;
duk_uint32_t old_len, new_len;
- if (!(DUK_HOBJECT_HAS_EXOTIC_ARRAY(obj) &&
- DUK_HOBJECT_HAS_ARRAY_PART(obj) &&
- DUK_HOBJECT_HAS_EXTENSIBLE(obj))) {
+ if (!(DUK_HOBJECT_HAS_EXOTIC_ARRAY(obj) && DUK_HOBJECT_HAS_ARRAY_PART(obj) && DUK_HOBJECT_HAS_EXTENSIBLE(obj))) {
return 0;
}
- DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj)); /* caller ensures */
+ DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj)); /* caller ensures */
a = (duk_harray *) obj;
DUK_HARRAY_ASSERT_VALID(a);
@@ -57044,7 +60315,7 @@ DUK_LOCAL duk_bool_t duk__putprop_shallow_fastpath_array_tval(duk_hthread *thr,
idx = duk__tval_fastint_to_arr_idx(tv_key);
} else
#endif
- if (DUK_TVAL_IS_DOUBLE(tv_key)) {
+ if (DUK_TVAL_IS_DOUBLE(tv_key)) {
idx = duk__tval_number_to_arr_idx(tv_key);
} else {
DUK_DDD(DUK_DDDPRINT("key is not a number"));
@@ -57056,7 +60327,7 @@ DUK_LOCAL duk_bool_t duk__putprop_shallow_fastpath_array_tval(duk_hthread *thr,
* because 0xffffffffUL will never be inside object 'a_size'.
*/
- if (idx >= DUK_HOBJECT_GET_ASIZE(obj)) { /* for resizing of array part, use slow path */
+ if (idx >= DUK_HOBJECT_GET_ASIZE(obj)) { /* for resizing of array part, use slow path */
return 0;
}
DUK_ASSERT(idx != 0xffffffffUL);
@@ -57067,7 +60338,8 @@ DUK_LOCAL duk_bool_t duk__putprop_shallow_fastpath_array_tval(duk_hthread *thr,
if (idx >= old_len) {
DUK_DDD(DUK_DDDPRINT("write new array entry requires length update "
"(arr_idx=%ld, old_len=%ld)",
- (long) idx, (long) old_len));
+ (long) idx,
+ (long) old_len));
if (DUK_HARRAY_LENGTH_NONWRITABLE(a)) {
/* The correct behavior here is either a silent error
* or a TypeError, depending on strictness. Fall back
@@ -57081,12 +60353,12 @@ DUK_LOCAL duk_bool_t duk__putprop_shallow_fastpath_array_tval(duk_hthread *thr,
}
tv = DUK_HOBJECT_A_GET_VALUE_PTR(thr->heap, obj, idx);
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv_val); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv_val); /* side effects */
DUK_DDD(DUK_DDDPRINT("array fast path success for index %ld", (long) idx));
return 1;
}
-#endif /* DUK_USE_ARRAY_PROP_FASTPATH */
+#endif /* DUK_USE_ARRAY_PROP_FASTPATH */
/*
* Fast path for bufobj getprop/putprop
@@ -57113,7 +60385,7 @@ DUK_LOCAL duk_bool_t duk__getprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
idx = duk__tval_fastint_to_arr_idx(tv_key);
} else
#endif
- if (DUK_TVAL_IS_DOUBLE(tv_key)) {
+ if (DUK_TVAL_IS_DOUBLE(tv_key)) {
idx = duk__tval_number_to_arr_idx(tv_key);
} else {
return 0;
@@ -57130,7 +60402,7 @@ DUK_LOCAL duk_bool_t duk__getprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
}
DUK_ASSERT(idx != DUK__NO_ARRAY_INDEX);
- byte_off = idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
+ byte_off = idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
elem_size = (duk_small_uint_t) (1U << h_bufobj->shift);
if (h_bufobj->buf != NULL && DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_bufobj, byte_off + elem_size)) {
@@ -57143,7 +60415,7 @@ DUK_LOCAL duk_bool_t duk__getprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
#if defined(DUK_USE_BUFFEROBJECT_SUPPORT)
DUK_LOCAL duk_bool_t duk__putprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hobject *obj, duk_tval *tv_key, duk_tval *tv_val) {
@@ -57153,11 +60425,10 @@ DUK_LOCAL duk_bool_t duk__putprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
duk_small_uint_t elem_size;
duk_uint8_t *data;
- if (!(DUK_HOBJECT_IS_BUFOBJ(obj) &&
- DUK_TVAL_IS_NUMBER(tv_val))) {
+ if (!(DUK_HOBJECT_IS_BUFOBJ(obj) && DUK_TVAL_IS_NUMBER(tv_val))) {
return 0;
}
- DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj)); /* caller ensures; rom objects are never bufobjs now */
+ DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj)); /* caller ensures; rom objects are never bufobjs now */
h_bufobj = (duk_hbufobj *) obj;
if (!DUK_HBUFOBJ_HAS_VIRTUAL_INDICES(h_bufobj)) {
@@ -57169,7 +60440,7 @@ DUK_LOCAL duk_bool_t duk__putprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
idx = duk__tval_fastint_to_arr_idx(tv_key);
} else
#endif
- if (DUK_TVAL_IS_DOUBLE(tv_key)) {
+ if (DUK_TVAL_IS_DOUBLE(tv_key)) {
idx = duk__tval_number_to_arr_idx(tv_key);
} else {
return 0;
@@ -57186,7 +60457,7 @@ DUK_LOCAL duk_bool_t duk__putprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
}
DUK_ASSERT(idx != DUK__NO_ARRAY_INDEX);
- byte_off = idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
+ byte_off = idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
elem_size = (duk_small_uint_t) (1U << h_bufobj->shift);
/* Value is required to be a number in the fast path so there
@@ -57205,7 +60476,7 @@ DUK_LOCAL duk_bool_t duk__putprop_fastpath_bufobj_tval(duk_hthread *thr, duk_hob
duk_pop_unsafe(thr);
return 1;
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
/*
* GETPROP: ECMAScript property read.
@@ -57221,8 +60492,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
duk_uint_t sanity;
DUK_DDD(DUK_DDDPRINT("getprop: thr=%p, obj=%p, key=%p (obj -> %!T, key -> %!T)",
- (void *) thr, (void *) tv_obj, (void *) tv_key,
- (duk_tval *) tv_obj, (duk_tval *) tv_key));
+ (void *) thr,
+ (void *) tv_obj,
+ (void *) tv_key,
+ (duk_tval *) tv_obj,
+ (duk_tval *) tv_key));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -57259,8 +60533,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
#if defined(DUK_USE_PARANOID_ERRORS)
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_BASE);
#else
- DUK_ERROR_FMT2(thr, DUK_ERR_TYPE_ERROR, "cannot read property %s of %s",
- duk_push_string_tval_readable(thr, tv_key), duk_push_string_tval_readable(thr, tv_obj));
+ DUK_ERROR_FMT2(thr,
+ DUK_ERR_TYPE_ERROR,
+ "cannot read property %s of %s",
+ duk_push_string_tval_readable(thr, tv_key),
+ duk_push_string_tval_readable(thr, tv_obj));
#endif
DUK_WO_NORETURN(return 0;);
break;
@@ -57290,7 +60567,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
pop_count = 0;
} else
#endif
- if (DUK_TVAL_IS_NUMBER(tv_key)) {
+ if (DUK_TVAL_IS_NUMBER(tv_key)) {
arr_idx = duk__tval_number_to_arr_idx(tv_key);
DUK_DDD(DUK_DDDPRINT("base object string, key is a fast-path number; arr_idx %ld", (long) arr_idx));
pop_count = 0;
@@ -57299,15 +60576,15 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
DUK_DDD(DUK_DDDPRINT("base object string, key is a non-fast-path number; after "
"coercion key is %!T, arr_idx %ld",
- (duk_tval *) duk_get_tval(thr, -1), (long) arr_idx));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (long) arr_idx));
pop_count = 1;
}
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- arr_idx < DUK_HSTRING_GET_CHARLEN(h)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && arr_idx < DUK_HSTRING_GET_CHARLEN(h)) {
duk_pop_n_unsafe(thr, pop_count);
duk_push_hstring(thr, h);
- duk_substring(thr, -1, arr_idx, arr_idx + 1); /* [str] -> [substr] */
+ duk_substring(thr, -1, arr_idx, arr_idx + 1); /* [str] -> [substr] */
DUK_STATS_INC(thr->heap, stats_getprop_stringidx);
DUK_DDD(DUK_DDDPRINT("-> %!T (base is string, key is an index inside string length "
@@ -57324,12 +60601,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
DUK_DDD(DUK_DDDPRINT("base object string, key is a non-fast-path number; after "
"coercion key is %!T, arr_idx %ld",
- (duk_tval *) duk_get_tval(thr, -1), (long) arr_idx));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (long) arr_idx));
}
if (key == DUK_HTHREAD_STRING_LENGTH(thr)) {
- duk_pop_unsafe(thr); /* [key] -> [] */
- duk_push_uint(thr, (duk_uint_t) DUK_HSTRING_GET_CHARLEN(h)); /* [] -> [res] */
+ duk_pop_unsafe(thr); /* [key] -> [] */
+ duk_push_uint(thr, (duk_uint_t) DUK_HSTRING_GET_CHARLEN(h)); /* [] -> [res] */
DUK_STATS_INC(thr->heap, stats_getprop_stringlen);
DUK_DDD(DUK_DDDPRINT("-> %!T (base is string, key is 'length' after coercion -> "
@@ -57340,7 +60618,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_DDD(DUK_DDDPRINT("base object is a string, start lookup from string prototype"));
curr = thr->builtins[DUK_BIDX_STRING_PROTOTYPE];
- goto lookup; /* avoid double coercion */
+ goto lookup; /* avoid double coercion */
}
case DUK_TAG_OBJECT: {
@@ -57385,9 +60663,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
/* -> [ ... trap handler ] */
DUK_DDD(DUK_DDDPRINT("-> proxy object 'get' for key %!T", (duk_tval *) tv_key));
DUK_STATS_INC(thr->heap, stats_getprop_proxy);
- duk_push_hobject(thr, h_target); /* target */
- duk_push_tval(thr, tv_key); /* P */
- duk_push_tval(thr, tv_obj); /* Receiver: Proxy object */
+ duk_push_hobject(thr, h_target); /* target */
+ duk_push_tval(thr, tv_key); /* P */
+ duk_push_tval(thr, tv_obj); /* Receiver: Proxy object */
duk_call_method(thr, 3 /*nargs*/);
/* Target object must be checked for a conflicting
@@ -57397,25 +60675,27 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
if (duk__get_own_propdesc_raw(thr, h_target, key, arr_idx, &desc, DUK_GETDESC_FLAG_PUSH_VALUE)) {
- duk_tval *tv_hook = duk_require_tval(thr, -3); /* value from hook */
- duk_tval *tv_targ = duk_require_tval(thr, -1); /* value from target */
+ duk_tval *tv_hook = duk_require_tval(thr, -3); /* value from hook */
+ duk_tval *tv_targ = duk_require_tval(thr, -1); /* value from target */
duk_bool_t datadesc_reject;
duk_bool_t accdesc_reject;
DUK_DDD(DUK_DDDPRINT("proxy 'get': target has matching property %!O, check for "
"conflicting property; tv_hook=%!T, tv_targ=%!T, desc.flags=0x%08lx, "
"desc.get=%p, desc.set=%p",
- (duk_heaphdr *) key, (duk_tval *) tv_hook, (duk_tval *) tv_targ,
+ (duk_heaphdr *) key,
+ (duk_tval *) tv_hook,
+ (duk_tval *) tv_targ,
(unsigned long) desc.flags,
- (void *) desc.get, (void *) desc.set));
+ (void *) desc.get,
+ (void *) desc.set));
datadesc_reject = !(desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) &&
!(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) &&
!(desc.flags & DUK_PROPDESC_FLAG_WRITABLE) &&
!duk_js_samevalue(tv_hook, tv_targ);
accdesc_reject = (desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) &&
- !(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) &&
- (desc.get == NULL) &&
+ !(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) && (desc.get == NULL) &&
!DUK_TVAL_IS_UNDEFINED(tv_hook);
if (datadesc_reject || accdesc_reject) {
DUK_ERROR_TYPE(thr, DUK_STR_PROXY_REJECTED);
@@ -57426,13 +60706,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
} else {
duk_pop_unsafe(thr);
}
- return 1; /* return value */
+ return 1; /* return value */
}
- curr = h_target; /* resume lookup from target */
+ curr = h_target; /* resume lookup from target */
DUK_TVAL_SET_OBJECT(tv_obj, curr);
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
if (DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(curr)) {
arr_idx = duk__push_tval_to_property_key(thr, tv_key, &key);
@@ -57447,11 +60727,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
/* no need for 'caller' post-check, because 'key' must be an array index */
- duk_remove_m2(thr); /* [key result] -> [result] */
+ duk_remove_m2(thr); /* [key result] -> [result] */
return 1;
}
- goto lookup; /* avoid double coercion */
+ goto lookup; /* avoid double coercion */
}
break;
}
@@ -57473,10 +60753,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
arr_idx = duk__tval_fastint_to_arr_idx(tv_key);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a fast-path fastint; arr_idx %ld", (long) arr_idx));
pop_count = 0;
- }
- else
+ } else
#endif
- if (DUK_TVAL_IS_NUMBER(tv_key)) {
+ if (DUK_TVAL_IS_NUMBER(tv_key)) {
arr_idx = duk__tval_number_to_arr_idx(tv_key);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a fast-path number; arr_idx %ld", (long) arr_idx));
pop_count = 0;
@@ -57485,12 +60764,12 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a non-fast-path number; after "
"coercion key is %!T, arr_idx %ld",
- (duk_tval *) duk_get_tval(thr, -1), (long) arr_idx));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (long) arr_idx));
pop_count = 1;
}
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- arr_idx < DUK_HBUFFER_GET_SIZE(h)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && arr_idx < DUK_HBUFFER_GET_SIZE(h)) {
duk_pop_n_unsafe(thr, pop_count);
duk_push_uint(thr, ((duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h))[arr_idx]);
DUK_STATS_INC(thr->heap, stats_getprop_bufferidx);
@@ -57508,12 +60787,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a non-fast-path number; after "
"coercion key is %!T, arr_idx %ld",
- (duk_tval *) duk_get_tval(thr, -1), (long) arr_idx));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (long) arr_idx));
}
if (key == DUK_HTHREAD_STRING_LENGTH(thr)) {
- duk_pop_unsafe(thr); /* [key] -> [] */
- duk_push_uint(thr, (duk_uint_t) DUK_HBUFFER_GET_SIZE(h)); /* [] -> [res] */
+ duk_pop_unsafe(thr); /* [key] -> [] */
+ duk_push_uint(thr, (duk_uint_t) DUK_HBUFFER_GET_SIZE(h)); /* [] -> [res] */
DUK_STATS_INC(thr->heap, stats_getprop_bufferlen);
DUK_DDD(DUK_DDDPRINT("-> %!T (base is buffer, key is 'length' "
@@ -57524,7 +60804,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_DDD(DUK_DDDPRINT("base object is a buffer, start lookup from Uint8Array prototype"));
curr = thr->builtins[DUK_BIDX_UINT8ARRAY_PROTOTYPE];
- goto lookup; /* avoid double coercion */
+ goto lookup; /* avoid double coercion */
}
case DUK_TAG_POINTER: {
@@ -57561,7 +60841,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
* Property lookup
*/
- lookup:
+lookup:
/* [key] (coerced) */
DUK_ASSERT(curr != NULL);
DUK_ASSERT(key != NULL);
@@ -57576,25 +60856,23 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
/* accessor with defined getter */
DUK_ASSERT((desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) != 0);
- duk_pop_unsafe(thr); /* [key undefined] -> [key] */
+ duk_pop_unsafe(thr); /* [key undefined] -> [key] */
duk_push_hobject(thr, desc.get);
- duk_push_tval(thr, tv_obj); /* note: original, uncoerced base */
+ duk_push_tval(thr, tv_obj); /* note: original, uncoerced base */
#if defined(DUK_USE_NONSTD_GETTER_KEY_ARGUMENT)
duk_dup_m3(thr);
- duk_call_method(thr, 1); /* [key getter this key] -> [key retval] */
+ duk_call_method(thr, 1); /* [key getter this key] -> [key retval] */
#else
- duk_call_method(thr, 0); /* [key getter this] -> [key retval] */
+ duk_call_method(thr, 0); /* [key getter this] -> [key retval] */
#endif
} else {
/* [key value] or [key undefined] */
/* data property or accessor without getter */
- DUK_ASSERT(((desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) == 0) ||
- (desc.get == NULL));
+ DUK_ASSERT(((desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) == 0) || (desc.get == NULL));
/* if accessor without getter, return value is undefined */
- DUK_ASSERT(((desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) == 0) ||
- duk_is_undefined(thr, -1));
+ DUK_ASSERT(((desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) == 0) || duk_is_undefined(thr, -1));
/* Note: for an accessor without getter, falling through to
* check for "caller" exotic behavior is unnecessary as
@@ -57603,9 +60881,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
*/
}
- goto found; /* [key result] */
+ goto found; /* [key result] */
- next_in_chain:
+ next_in_chain:
/* XXX: option to pretend property doesn't exist if sanity limit is
* hit might be useful.
*/
@@ -57620,7 +60898,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
* Not found
*/
- duk_to_undefined(thr, -1); /* [key] -> [undefined] (default value) */
+ duk_to_undefined(thr, -1); /* [key] -> [undefined] (default value) */
DUK_DDD(DUK_DDDPRINT("-> %!T (not found)", (duk_tval *) duk_get_tval(thr, -1)));
return 0;
@@ -57629,7 +60907,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
* Found; post-processing (Function and arguments objects)
*/
- found:
+found:
/* [key result] */
#if !defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
@@ -57659,13 +60937,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
* This exotic behavior is disabled when the non-standard 'caller' property
* is enabled, as it conflicts with the free use of 'caller'.
*/
- if (key == DUK_HTHREAD_STRING_CALLER(thr) &&
- DUK_TVAL_IS_OBJECT(tv_obj)) {
+ if (key == DUK_HTHREAD_STRING_CALLER(thr) && DUK_TVAL_IS_OBJECT(tv_obj)) {
duk_hobject *orig = DUK_TVAL_GET_OBJECT(tv_obj);
DUK_ASSERT(orig != NULL);
- if (DUK_HOBJECT_IS_NONBOUND_FUNCTION(orig) ||
- DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(orig)) {
+ if (DUK_HOBJECT_IS_NONBOUND_FUNCTION(orig) || DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(orig)) {
duk_hobject *h;
/* XXX: The TypeError is currently not applied to bound
@@ -57676,19 +60952,17 @@ DUK_INTERNAL duk_bool_t duk_hobject_getprop(duk_hthread *thr, duk_tval *tv_obj,
*/
DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(orig));
- h = duk_get_hobject(thr, -1); /* NULL if not an object */
- if (h &&
- DUK_HOBJECT_IS_FUNCTION(h) &&
- DUK_HOBJECT_HAS_STRICT(h)) {
+ h = duk_get_hobject(thr, -1); /* NULL if not an object */
+ if (h && DUK_HOBJECT_IS_FUNCTION(h) && DUK_HOBJECT_HAS_STRICT(h)) {
/* XXX: sufficient to check 'strict', assert for 'is function' */
DUK_ERROR_TYPE(thr, DUK_STR_STRICT_CALLER_READ);
DUK_WO_NORETURN(return 0;);
}
}
}
-#endif /* !DUK_USE_NONSTD_FUNC_CALLER_PROPERTY */
+#endif /* !DUK_USE_NONSTD_FUNC_CALLER_PROPERTY */
- duk_remove_m2(thr); /* [key result] -> [result] */
+ duk_remove_m2(thr); /* [key result] -> [result] */
DUK_DDD(DUK_DDDPRINT("-> %!T (found)", (duk_tval *) duk_get_tval(thr, -1)));
return 1;
@@ -57710,8 +60984,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_hasprop(duk_hthread *thr, duk_tval *tv_obj,
duk_propdesc desc;
DUK_DDD(DUK_DDDPRINT("hasprop: thr=%p, obj=%p, key=%p (obj -> %!T, key -> %!T)",
- (void *) thr, (void *) tv_obj, (void *) tv_key,
- (duk_tval *) tv_obj, (duk_tval *) tv_key));
+ (void *) thr,
+ (void *) tv_obj,
+ (void *) tv_key,
+ (duk_tval *) tv_obj,
+ (duk_tval *) tv_key));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -57783,8 +61060,8 @@ DUK_INTERNAL duk_bool_t duk_hobject_hasprop(duk_hthread *thr, duk_tval *tv_obj,
if (duk__proxy_check_prop(thr, obj, DUK_STRIDX_HAS, tv_key, &h_target)) {
/* [ ... key trap handler ] */
DUK_DDD(DUK_DDDPRINT("-> proxy object 'has' for key %!T", (duk_tval *) tv_key));
- duk_push_hobject(thr, h_target); /* target */
- duk_push_tval(thr, tv_key); /* P */
+ duk_push_hobject(thr, h_target); /* target */
+ duk_push_tval(thr, tv_key); /* P */
duk_call_method(thr, 2 /*nargs*/);
tmp_bool = duk_to_boolean_top_pop(thr);
if (!tmp_bool) {
@@ -57792,39 +61069,42 @@ DUK_INTERNAL duk_bool_t duk_hobject_hasprop(duk_hthread *thr, duk_tval *tv_obj,
* non-configurable property.
*/
- if (duk__get_own_propdesc_raw(thr, h_target, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
+ if (duk__get_own_propdesc_raw(thr, h_target, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push
+ value */
DUK_DDD(DUK_DDDPRINT("proxy 'has': target has matching property %!O, check for "
"conflicting property; desc.flags=0x%08lx, "
"desc.get=%p, desc.set=%p",
- (duk_heaphdr *) key, (unsigned long) desc.flags,
- (void *) desc.get, (void *) desc.set));
+ (duk_heaphdr *) key,
+ (unsigned long) desc.flags,
+ (void *) desc.get,
+ (void *) desc.set));
/* XXX: Extensibility check for target uses IsExtensible(). If we
* implemented the isExtensible trap and didn't reject proxies as
* proxy targets, it should be respected here.
*/
- if (!((desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) && /* property is configurable and */
- DUK_HOBJECT_HAS_EXTENSIBLE(h_target))) { /* ... target is extensible */
+ if (!((desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) && /* property is configurable and */
+ DUK_HOBJECT_HAS_EXTENSIBLE(h_target))) { /* ... target is extensible */
DUK_ERROR_TYPE(thr, DUK_STR_PROXY_REJECTED);
DUK_WO_NORETURN(return 0;);
}
}
}
- duk_pop_unsafe(thr); /* [ key ] -> [] */
+ duk_pop_unsafe(thr); /* [ key ] -> [] */
return tmp_bool;
}
- obj = h_target; /* resume check from proxy target */
+ obj = h_target; /* resume check from proxy target */
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
/* XXX: inline into a prototype walking loop? */
- rc = duk__get_propdesc(thr, obj, key, &desc, 0 /*flags*/); /* don't push value */
+ rc = duk__get_propdesc(thr, obj, key, &desc, 0 /*flags*/); /* don't push value */
/* fall through */
- pop_and_return:
- duk_pop_unsafe(thr); /* [ key ] -> [] */
+pop_and_return:
+ duk_pop_unsafe(thr); /* [ key ] -> [] */
return rc;
}
@@ -57850,7 +61130,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_hasprop_raw(duk_hthread *thr, duk_hobject *o
DUK_ASSERT_VALSTACK_SPACE(thr, DUK__VALSTACK_SPACE);
- return duk__get_propdesc(thr, obj, key, &dummy, DUK_GETDESC_FLAG_IGNORE_PROTOLOOP); /* don't push value */
+ return duk__get_propdesc(thr, obj, key, &dummy, DUK_GETDESC_FLAG_IGNORE_PROTOLOOP); /* don't push value */
}
/*
@@ -57882,16 +61162,16 @@ DUK_LOCAL duk_uint32_t duk__to_new_array_length_checked(duk_hthread *thr, duk_tv
}
return (duk_uint32_t) fi;
}
-#else /* DUK_USE_FASTINT */
+#else /* DUK_USE_FASTINT */
/* When fastints are not enabled, the most interesting case is any
* number.
*/
if (DUK_TVAL_IS_DOUBLE(tv)) {
d = DUK_TVAL_GET_NUMBER(tv);
}
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
else
-#endif /* !DUK_USE_PREFER_SIZE */
+#endif /* !DUK_USE_PREFER_SIZE */
{
/* In all other cases, and when doing a size optimized build,
* fall back to the comprehensive handler.
@@ -57903,13 +61183,13 @@ DUK_LOCAL duk_uint32_t duk__to_new_array_length_checked(duk_hthread *thr, duk_tv
* 32-bit range. Negative zero is accepted as zero.
*/
res = duk_double_to_uint32_t(d);
- if ((duk_double_t) res != d) {
+ if (!duk_double_equals((duk_double_t) res, d)) {
goto fail_range;
}
return res;
- fail_range:
+fail_range:
DUK_ERROR_RANGE(thr, DUK_STR_INVALID_ARRAY_LENGTH);
DUK_WO_NORETURN(return 0;);
}
@@ -57937,7 +61217,8 @@ duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("new array length smaller than old (%ld -> %ld), "
"probably need to remove elements",
- (long) old_len, (long) new_len));
+ (long) old_len,
+ (long) new_len));
/*
* New length is smaller than old length, need to delete properties above
@@ -57983,7 +61264,7 @@ duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr,
while (i > new_len) {
i--;
tv = DUK_HOBJECT_A_GET_VALUE_PTR(thr->heap, obj, i);
- DUK_TVAL_SET_UNUSED_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_UNUSED_UPDREF(thr, tv); /* side effects */
}
*out_result_len = new_len;
@@ -58018,19 +61299,22 @@ duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr,
continue;
}
- DUK_ASSERT(DUK_HSTRING_HAS_ARRIDX(key)); /* XXX: macro checks for array index flag, which is unnecessary here */
+ DUK_ASSERT(
+ DUK_HSTRING_HAS_ARRIDX(key)); /* XXX: macro checks for array index flag, which is unnecessary here */
arr_idx = DUK_HSTRING_GET_ARRIDX_SLOW(key);
DUK_ASSERT(arr_idx != DUK__NO_ARRAY_INDEX);
- DUK_ASSERT(arr_idx < old_len); /* consistency requires this */
+ DUK_ASSERT(arr_idx < old_len); /* consistency requires this */
if (arr_idx < new_len) {
DUK_DDD(DUK_DDDPRINT("skip entry index %ld: key is array index %ld, below new_len",
- (long) i, (long) arr_idx));
+ (long) i,
+ (long) arr_idx));
continue;
}
if (DUK_HOBJECT_E_SLOT_IS_CONFIGURABLE(thr->heap, obj, i)) {
DUK_DDD(DUK_DDDPRINT("skip entry index %ld: key is a relevant array index %ld, but configurable",
- (long) i, (long) arr_idx));
+ (long) i,
+ (long) arr_idx));
continue;
}
@@ -58038,17 +61322,19 @@ duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr,
if (arr_idx >= target_len) {
DUK_DDD(DUK_DDDPRINT("entry at index %ld has arr_idx %ld, is not configurable, "
"update target_len %ld -> %ld",
- (long) i, (long) arr_idx, (long) target_len,
+ (long) i,
+ (long) arr_idx,
+ (long) target_len,
(long) (arr_idx + 1)));
target_len = arr_idx + 1;
}
}
- skip_stage1:
+ skip_stage1:
/* stage 2: delete configurable entries above target length */
- DUK_DDD(DUK_DDDPRINT("old_len=%ld, new_len=%ld, target_len=%ld",
- (long) old_len, (long) new_len, (long) target_len));
+ DUK_DDD(
+ DUK_DDDPRINT("old_len=%ld, new_len=%ld, target_len=%ld", (long) old_len, (long) new_len, (long) target_len));
DUK_DDD(DUK_DDDPRINT("array length write, no array part, stage 2: remove "
"entries >= target_len"));
@@ -58064,20 +61350,21 @@ duk_bool_t duk__handle_put_array_length_smaller(duk_hthread *thr,
continue;
}
- DUK_ASSERT(DUK_HSTRING_HAS_ARRIDX(key)); /* XXX: macro checks for array index flag, which is unnecessary here */
+ DUK_ASSERT(
+ DUK_HSTRING_HAS_ARRIDX(key)); /* XXX: macro checks for array index flag, which is unnecessary here */
arr_idx = DUK_HSTRING_GET_ARRIDX_SLOW(key);
DUK_ASSERT(arr_idx != DUK__NO_ARRAY_INDEX);
- DUK_ASSERT(arr_idx < old_len); /* consistency requires this */
+ DUK_ASSERT(arr_idx < old_len); /* consistency requires this */
if (arr_idx < target_len) {
DUK_DDD(DUK_DDDPRINT("skip entry index %ld: key is array index %ld, below target_len",
- (long) i, (long) arr_idx));
+ (long) i,
+ (long) arr_idx));
continue;
}
- DUK_ASSERT(force_flag || DUK_HOBJECT_E_SLOT_IS_CONFIGURABLE(thr->heap, obj, i)); /* stage 1 guarantees */
+ DUK_ASSERT(force_flag || DUK_HOBJECT_E_SLOT_IS_CONFIGURABLE(thr->heap, obj, i)); /* stage 1 guarantees */
- DUK_DDD(DUK_DDDPRINT("delete entry index %ld: key is array index %ld",
- (long) i, (long) arr_idx));
+ DUK_DDD(DUK_DDDPRINT("delete entry index %ld: key is array index %ld", (long) i, (long) arr_idx));
/*
* Slow delete, but we don't care as we're already in a very slow path.
@@ -58208,11 +61495,12 @@ DUK_LOCAL duk_bool_t duk__handle_put_array_length(duk_hthread *thr, duk_hobject
* (We currently make a copy of all of the input values to avoid issues.)
*/
-DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key, duk_tval *tv_val, duk_bool_t throw_flag) {
+DUK_INTERNAL duk_bool_t
+duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj, duk_tval *tv_key, duk_tval *tv_val, duk_bool_t throw_flag) {
duk_tval tv_obj_copy;
duk_tval tv_key_copy;
duk_tval tv_val_copy;
- duk_hobject *orig = NULL; /* NULL if tv_obj is primitive */
+ duk_hobject *orig = NULL; /* NULL if tv_obj is primitive */
duk_hobject *curr;
duk_hstring *key = NULL;
duk_propdesc desc;
@@ -58221,12 +61509,18 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
duk_bool_t rc;
duk_int_t e_idx;
duk_uint_t sanity;
- duk_uint32_t new_array_length = 0; /* 0 = no update */
+ duk_uint32_t new_array_length = 0; /* 0 = no update */
DUK_DDD(DUK_DDDPRINT("putprop: thr=%p, obj=%p, key=%p, val=%p, throw=%ld "
"(obj -> %!T, key -> %!T, val -> %!T)",
- (void *) thr, (void *) tv_obj, (void *) tv_key, (void *) tv_val,
- (long) throw_flag, (duk_tval *) tv_obj, (duk_tval *) tv_key, (duk_tval *) tv_val));
+ (void *) thr,
+ (void *) tv_obj,
+ (void *) tv_key,
+ (void *) tv_val,
+ (long) throw_flag,
+ (duk_tval *) tv_obj,
+ (duk_tval *) tv_key,
+ (duk_tval *) tv_val));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -58261,13 +61555,15 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
case DUK_TAG_UNDEFINED:
case DUK_TAG_NULL: {
/* Note: unconditional throw */
- DUK_DDD(DUK_DDDPRINT("base object is undefined or null -> reject (object=%!iT)",
- (duk_tval *) tv_obj));
+ DUK_DDD(DUK_DDDPRINT("base object is undefined or null -> reject (object=%!iT)", (duk_tval *) tv_obj));
#if defined(DUK_USE_PARANOID_ERRORS)
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_BASE);
#else
- DUK_ERROR_FMT2(thr, DUK_ERR_TYPE_ERROR, "cannot write property %s of %s",
- duk_push_string_tval_readable(thr, tv_key), duk_push_string_tval_readable(thr, tv_obj));
+ DUK_ERROR_FMT2(thr,
+ DUK_ERR_TYPE_ERROR,
+ "cannot write property %s of %s",
+ duk_push_string_tval_readable(thr, tv_key),
+ duk_push_string_tval_readable(thr, tv_obj));
#endif
DUK_WO_NORETURN(return 0;);
break;
@@ -58301,14 +61597,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
goto fail_not_writable;
}
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- arr_idx < DUK_HSTRING_GET_CHARLEN(h)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && arr_idx < DUK_HSTRING_GET_CHARLEN(h)) {
goto fail_not_writable;
}
DUK_DDD(DUK_DDDPRINT("base object is a string, start lookup from string prototype"));
curr = thr->builtins[DUK_BIDX_STRING_PROTOTYPE];
- goto lookup; /* avoid double coercion */
+ goto lookup; /* avoid double coercion */
}
case DUK_TAG_OBJECT: {
@@ -58323,7 +61618,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
*/
if (DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) orig)) {
DUK_DD(DUK_DDPRINT("attempt to putprop on read-only target object"));
- goto fail_not_writable_no_pop; /* Must avoid duk_pop() in exit path */
+ goto fail_not_writable_no_pop; /* Must avoid duk_pop() in exit path */
}
#endif
@@ -58369,10 +61664,10 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
/* -> [ ... trap handler ] */
DUK_DDD(DUK_DDDPRINT("-> proxy object 'set' for key %!T", (duk_tval *) tv_key));
DUK_STATS_INC(thr->heap, stats_putprop_proxy);
- duk_push_hobject(thr, h_target); /* target */
- duk_push_tval(thr, tv_key); /* P */
- duk_push_tval(thr, tv_val); /* V */
- duk_push_tval(thr, tv_obj); /* Receiver: Proxy object */
+ duk_push_hobject(thr, h_target); /* target */
+ duk_push_tval(thr, tv_key); /* P */
+ duk_push_tval(thr, tv_val); /* V */
+ duk_push_tval(thr, tv_obj); /* Receiver: Proxy object */
duk_call_method(thr, 4 /*nargs*/);
tmp_bool = duk_to_boolean_top_pop(thr);
if (!tmp_bool) {
@@ -58393,17 +61688,19 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_DDD(DUK_DDDPRINT("proxy 'set': target has matching property %!O, check for "
"conflicting property; tv_val=%!T, tv_targ=%!T, desc.flags=0x%08lx, "
"desc.get=%p, desc.set=%p",
- (duk_heaphdr *) key, (duk_tval *) tv_val, (duk_tval *) tv_targ,
+ (duk_heaphdr *) key,
+ (duk_tval *) tv_val,
+ (duk_tval *) tv_targ,
(unsigned long) desc.flags,
- (void *) desc.get, (void *) desc.set));
+ (void *) desc.get,
+ (void *) desc.set));
datadesc_reject = !(desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) &&
!(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) &&
!(desc.flags & DUK_PROPDESC_FLAG_WRITABLE) &&
!duk_js_samevalue(tv_val, tv_targ);
accdesc_reject = (desc.flags & DUK_PROPDESC_FLAG_ACCESSOR) &&
- !(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) &&
- (desc.set == NULL);
+ !(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE) && (desc.set == NULL);
if (datadesc_reject || accdesc_reject) {
DUK_ERROR_TYPE(thr, DUK_STR_PROXY_REJECTED);
DUK_WO_NORETURN(return 0;);
@@ -58413,13 +61710,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
} else {
duk_pop_unsafe(thr);
}
- return 1; /* success */
+ return 1; /* success */
}
- orig = h_target; /* resume write to target */
+ orig = h_target; /* resume write to target */
DUK_TVAL_SET_OBJECT(tv_obj, orig);
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
curr = orig;
break;
@@ -58441,7 +61738,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
pop_count = 0;
} else
#endif
- if (DUK_TVAL_IS_NUMBER(tv_key)) {
+ if (DUK_TVAL_IS_NUMBER(tv_key)) {
arr_idx = duk__tval_number_to_arr_idx(tv_key);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a fast-path number; arr_idx %ld", (long) arr_idx));
pop_count = 0;
@@ -58450,12 +61747,12 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a non-fast-path number; after "
"coercion key is %!T, arr_idx %ld",
- (duk_tval *) duk_get_tval(thr, -1), (long) arr_idx));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (long) arr_idx));
pop_count = 1;
}
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- arr_idx < DUK_HBUFFER_GET_SIZE(h)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && arr_idx < DUK_HBUFFER_GET_SIZE(h)) {
duk_uint8_t *data;
DUK_DDD(DUK_DDDPRINT("writing to buffer data at index %ld", (long) arr_idx));
data = (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h);
@@ -58467,8 +61764,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
/* Buffer writes are often integers. */
if (DUK_TVAL_IS_FASTINT(tv_val)) {
data[arr_idx] = (duk_uint8_t) DUK_TVAL_GET_FASTINT_U32(tv_val);
- }
- else
+ } else
#endif
{
duk_push_tval(thr, tv_val);
@@ -58490,7 +61786,8 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(key != NULL);
DUK_DDD(DUK_DDDPRINT("base object buffer, key is a non-fast-path number; after "
"coercion key is %!T, arr_idx %ld",
- (duk_tval *) duk_get_tval(thr, -1), (long) arr_idx));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (long) arr_idx));
}
if (key == DUK_HTHREAD_STRING_LENGTH(thr)) {
@@ -58499,7 +61796,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_DDD(DUK_DDDPRINT("base object is a buffer, start lookup from Uint8Array prototype"));
curr = thr->builtins[DUK_BIDX_UINT8ARRAY_PROTOTYPE];
- goto lookup; /* avoid double coercion */
+ goto lookup; /* avoid double coercion */
}
case DUK_TAG_POINTER: {
@@ -58534,7 +61831,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
arr_idx = duk__push_tval_to_property_key(thr, tv_key, &key);
DUK_ASSERT(key != NULL);
- lookup:
+lookup:
/*
* Check whether the property already exists in the prototype chain.
@@ -58547,7 +61844,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(curr != NULL);
sanity = DUK_HOBJECT_PROTOTYPE_CHAIN_SANITY;
do {
- if (!duk__get_own_propdesc_raw(thr, curr, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
+ if (!duk__get_own_propdesc_raw(thr, curr, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
goto next_in_chain;
}
@@ -58570,15 +61867,15 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
goto fail_no_setter;
}
duk_push_hobject(thr, setter);
- duk_push_tval(thr, tv_obj); /* note: original, uncoerced base */
- duk_push_tval(thr, tv_val); /* [key setter this val] */
+ duk_push_tval(thr, tv_obj); /* note: original, uncoerced base */
+ duk_push_tval(thr, tv_val); /* [key setter this val] */
#if defined(DUK_USE_NONSTD_SETTER_KEY_ARGUMENT)
duk_dup_m4(thr);
- duk_call_method(thr, 2); /* [key setter this val key] -> [key retval] */
+ duk_call_method(thr, 2); /* [key setter this val key] -> [key retval] */
#else
- duk_call_method(thr, 1); /* [key setter this val] -> [key retval] */
+ duk_call_method(thr, 1); /* [key setter this val] -> [key retval] */
#endif
- duk_pop_unsafe(thr); /* ignore retval -> [key] */
+ duk_pop_unsafe(thr); /* ignore retval -> [key] */
goto success_no_arguments_exotic;
}
@@ -58598,11 +61895,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
* new property to 'orig'.
*/
if (!DUK_HOBJECT_HAS_EXTENSIBLE(orig)) {
- DUK_DD(DUK_DDPRINT("found existing inherited plain property, but original object is not extensible"));
+ DUK_DD(
+ DUK_DDPRINT("found existing inherited plain property, but original object is not extensible"));
goto fail_not_extensible;
}
if (!(desc.flags & DUK_PROPDESC_FLAG_WRITABLE)) {
- DUK_DD(DUK_DDPRINT("found existing inherited plain property, original object is extensible, but inherited property is not writable"));
+ DUK_DD(DUK_DDPRINT("found existing inherited plain property, original object is extensible, but "
+ "inherited property is not writable"));
goto fail_not_writable;
}
DUK_DD(DUK_DDPRINT("put to new property, object extensible, inherited property found and is writable"));
@@ -58614,7 +61913,8 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
*/
if (!(desc.flags & DUK_PROPDESC_FLAG_WRITABLE)) {
- DUK_DD(DUK_DDPRINT("found existing own (non-inherited) plain property, but property is not writable"));
+ DUK_DD(
+ DUK_DDPRINT("found existing own (non-inherited) plain property, but property is not writable"));
goto fail_not_writable;
}
if (desc.flags & DUK_PROPDESC_FLAG_VIRTUAL) {
@@ -58631,18 +61931,19 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
* Note: the helper has an unnecessary writability check
* for 'length', we already know it is writable.
*/
- DUK_ASSERT(key == DUK_HTHREAD_STRING_LENGTH(thr)); /* only virtual array property */
+ DUK_ASSERT(key == DUK_HTHREAD_STRING_LENGTH(thr)); /* only virtual array property */
- DUK_DDD(DUK_DDDPRINT("writing existing 'length' property to array exotic, invoke complex helper"));
+ DUK_DDD(DUK_DDDPRINT(
+ "writing existing 'length' property to array exotic, invoke complex helper"));
/* XXX: the helper currently assumes stack top contains new
* 'length' value and the whole calling convention is not very
* compatible with what we need.
*/
- duk_push_tval(thr, tv_val); /* [key val] */
+ duk_push_tval(thr, tv_val); /* [key val] */
rc = duk__handle_put_array_length(thr, orig);
- duk_pop_unsafe(thr); /* [key val] -> [key] */
+ duk_pop_unsafe(thr); /* [key val] -> [key] */
if (!rc) {
goto fail_array_length_partial;
}
@@ -58664,12 +61965,14 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
/* Careful with wrapping: arr_idx upshift may easily wrap, whereas
* length downshift won't.
*/
- if (arr_idx < (h_bufobj->length >> h_bufobj->shift) && DUK_HBUFOBJ_HAS_VIRTUAL_INDICES(h_bufobj)) {
+ if (arr_idx < (h_bufobj->length >> h_bufobj->shift) &&
+ DUK_HBUFOBJ_HAS_VIRTUAL_INDICES(h_bufobj)) {
duk_uint8_t *data;
DUK_DDD(DUK_DDDPRINT("writing to buffer data at index %ld", (long) arr_idx));
- DUK_ASSERT(arr_idx != DUK__NO_ARRAY_INDEX); /* index/length check guarantees */
- byte_off = arr_idx << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
+ DUK_ASSERT(arr_idx != DUK__NO_ARRAY_INDEX); /* index/length check guarantees */
+ byte_off = arr_idx
+ << h_bufobj->shift; /* no wrap assuming h_bufobj->length is valid */
elem_size = (duk_small_uint_t) (1U << h_bufobj->shift);
/* Coerce to number before validating pointers etc so that the
@@ -58680,27 +61983,30 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
duk_push_tval(thr, tv_val);
(void) duk_to_number_m1(thr);
- if (h_bufobj->buf != NULL && DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_bufobj, byte_off + elem_size)) {
- data = (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufobj->buf) + h_bufobj->offset + byte_off;
+ if (h_bufobj->buf != NULL &&
+ DUK_HBUFOBJ_VALID_BYTEOFFSET_EXCL(h_bufobj, byte_off + elem_size)) {
+ data = (duk_uint8_t *) DUK_HBUFFER_GET_DATA_PTR(thr->heap, h_bufobj->buf) +
+ h_bufobj->offset + byte_off;
duk_hbufobj_validated_write(thr, h_bufobj, data, elem_size);
} else {
- DUK_D(DUK_DPRINT("bufobj access out of underlying buffer, ignoring (write skipped)"));
+ DUK_D(DUK_DPRINT(
+ "bufobj access out of underlying buffer, ignoring (write skipped)"));
}
duk_pop_unsafe(thr);
goto success_no_arguments_exotic;
}
}
-#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
+#endif /* DUK_USE_BUFFEROBJECT_SUPPORT */
DUK_D(DUK_DPRINT("should not happen, key %!O", key));
- goto fail_internal; /* should not happen */
+ goto fail_internal; /* should not happen */
}
DUK_DD(DUK_DDPRINT("put to existing own plain property, property is writable"));
goto update_old;
}
DUK_UNREACHABLE();
- next_in_chain:
+ next_in_chain:
/* XXX: option to pretend property doesn't exist if sanity limit is
* hit might be useful.
*/
@@ -58729,7 +62035,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
goto create_new;
- update_old:
+update_old:
/*
* Update an existing property of the base object.
@@ -58762,10 +62068,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
if (desc.e_idx >= 0) {
tv = DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(thr->heap, orig, desc.e_idx);
DUK_DDD(DUK_DDDPRINT("previous entry value: %!iT", (duk_tval *) tv));
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv_val); /* side effects; e_idx may be invalidated */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv_val); /* side effects; e_idx may be invalidated */
/* don't touch property attributes or hash part */
- DUK_DD(DUK_DDPRINT("put to an existing entry at index %ld -> new value %!iT",
- (long) desc.e_idx, (duk_tval *) tv));
+ DUK_DD(DUK_DDPRINT("put to an existing entry at index %ld -> new value %!iT", (long) desc.e_idx, (duk_tval *) tv));
} else {
/* Note: array entries are always writable, so the writability check
* above is pointless for them. The check could be avoided with some
@@ -58775,9 +62080,10 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(desc.a_idx >= 0);
tv = DUK_HOBJECT_A_GET_VALUE_PTR(thr->heap, orig, desc.a_idx);
DUK_DDD(DUK_DDDPRINT("previous array value: %!iT", (duk_tval *) tv));
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv_val); /* side effects; a_idx may be invalidated */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv_val); /* side effects; a_idx may be invalidated */
DUK_DD(DUK_DDPRINT("put to an existing array entry at index %ld -> new value %!iT",
- (long) desc.a_idx, (duk_tval *) tv));
+ (long) desc.a_idx,
+ (duk_tval *) tv));
}
/* Regardless of whether property is found in entry or array part,
@@ -58786,7 +62092,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
*/
goto success_with_arguments_exotic;
- create_new:
+create_new:
/*
* Create a new property in the original object.
@@ -58819,11 +62125,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
* from its creation and cannot be deleted, and is thus
* caught as an existing property above.
*/
- DUK_ASSERT(!(DUK_HOBJECT_HAS_EXOTIC_ARRAY(orig) &&
- key == DUK_HTHREAD_STRING_LENGTH(thr)));
+ DUK_ASSERT(!(DUK_HOBJECT_HAS_EXOTIC_ARRAY(orig) && key == DUK_HTHREAD_STRING_LENGTH(thr)));
- if (DUK_HOBJECT_HAS_EXOTIC_ARRAY(orig) &&
- arr_idx != DUK__NO_ARRAY_INDEX) {
+ if (DUK_HOBJECT_HAS_EXOTIC_ARRAY(orig) && arr_idx != DUK__NO_ARRAY_INDEX) {
/* automatic length update */
duk_uint32_t old_len;
duk_harray *a;
@@ -58836,7 +62140,8 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
if (arr_idx >= old_len) {
DUK_DDD(DUK_DDDPRINT("write new array entry requires length update "
"(arr_idx=%ld, old_len=%ld)",
- (long) arr_idx, (long) old_len));
+ (long) arr_idx,
+ (long) old_len));
if (DUK_HARRAY_LENGTH_NONWRITABLE(a)) {
DUK_DD(DUK_DDPRINT("attempt to extend array, but array 'length' is not writable"));
@@ -58850,15 +62155,16 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
*/
DUK_ASSERT(arr_idx != 0xffffffffUL);
- new_array_length = arr_idx + 1; /* flag for later write */
+ new_array_length = arr_idx + 1; /* flag for later write */
} else {
DUK_DDD(DUK_DDDPRINT("write new array entry does not require length update "
"(arr_idx=%ld, old_len=%ld)",
- (long) arr_idx, (long) old_len));
+ (long) arr_idx,
+ (long) old_len));
}
}
- /* write_to_array_part: */
+ /* write_to_array_part: */
/*
* Write to array part?
@@ -58880,8 +62186,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(DUK_TVAL_IS_UNUSED(tv));
DUK_TVAL_SET_TVAL(tv, tv_val);
DUK_TVAL_INCREF(thr, tv);
- DUK_DD(DUK_DDPRINT("put to new array entry: %ld -> %!T",
- (long) arr_idx, (duk_tval *) tv));
+ DUK_DD(DUK_DDPRINT("put to new array entry: %ld -> %!T", (long) arr_idx, (duk_tval *) tv));
/* Note: array part values are [[Writable]], [[Enumerable]],
* and [[Configurable]] which matches the required attributes
@@ -58890,7 +62195,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
goto entry_updated;
}
- write_to_entry_part:
+write_to_entry_part:
/*
* Write to entry part
@@ -58910,7 +62215,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_HOBJECT_E_SET_FLAGS(thr->heap, orig, e_idx, DUK_PROPDESC_FLAGS_WEC);
goto entry_updated;
- entry_updated:
+entry_updated:
/*
* Possible pending array length update, which must only be done
@@ -58924,8 +62229,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_ASSERT(DUK_HOBJECT_HAS_EXOTIC_ARRAY(orig));
- DUK_DDD(DUK_DDDPRINT("write successful, pending array length update to: %ld",
- (long) new_array_length));
+ DUK_DDD(DUK_DDDPRINT("write successful, pending array length update to: %ld", (long) new_array_length));
((duk_harray *) orig)->length = new_array_length;
}
@@ -58939,7 +62243,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
goto success_no_arguments_exotic;
- success_with_arguments_exotic:
+success_with_arguments_exotic:
/*
* Arguments objects have exotic [[DefineOwnProperty]] which updates
@@ -58954,8 +62258,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
* we end up in step 5.b.i.
*/
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(orig)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && DUK_HOBJECT_HAS_EXOTIC_ARGUMENTS(orig)) {
/* Note: only numbered indices are relevant, so arr_idx fast reject
* is good (this is valid unless there are more than 4**32-1 arguments).
*/
@@ -58974,14 +62277,14 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
}
/* fall thru */
- success_no_arguments_exotic:
+success_no_arguments_exotic:
/* shared exit path now */
DUK_DDD(DUK_DDDPRINT("result: success"));
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 1;
#if defined(DUK_USE_ES6_PROXY)
- fail_proxy_rejected:
+fail_proxy_rejected:
DUK_DDD(DUK_DDDPRINT("result: error, proxy rejects"));
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_PROXY_REJECTED);
@@ -58991,40 +62294,43 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
return 0;
#endif
- fail_base_primitive:
+fail_base_primitive:
DUK_DDD(DUK_DDDPRINT("result: error, base primitive"));
if (throw_flag) {
#if defined(DUK_USE_PARANOID_ERRORS)
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_BASE);
#else
- DUK_ERROR_FMT2(thr, DUK_ERR_TYPE_ERROR, "cannot write property %s of %s",
- duk_push_string_tval_readable(thr, tv_key), duk_push_string_tval_readable(thr, tv_obj));
+ DUK_ERROR_FMT2(thr,
+ DUK_ERR_TYPE_ERROR,
+ "cannot write property %s of %s",
+ duk_push_string_tval_readable(thr, tv_key),
+ duk_push_string_tval_readable(thr, tv_obj));
#endif
DUK_WO_NORETURN(return 0;);
}
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 0;
- fail_not_extensible:
+fail_not_extensible:
DUK_DDD(DUK_DDDPRINT("result: error, not extensible"));
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_EXTENSIBLE);
DUK_WO_NORETURN(return 0;);
}
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 0;
- fail_not_writable:
+fail_not_writable:
DUK_DDD(DUK_DDDPRINT("result: error, not writable"));
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_WRITABLE);
DUK_WO_NORETURN(return 0;);
}
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 0;
#if defined(DUK_USE_ROM_OBJECTS)
- fail_not_writable_no_pop:
+fail_not_writable_no_pop:
DUK_DDD(DUK_DDDPRINT("result: error, not writable"));
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_WRITABLE);
@@ -59033,31 +62339,31 @@ DUK_INTERNAL duk_bool_t duk_hobject_putprop(duk_hthread *thr, duk_tval *tv_obj,
return 0;
#endif
- fail_array_length_partial:
+fail_array_length_partial:
DUK_DD(DUK_DDPRINT("result: error, array length write only partially successful"));
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE);
DUK_WO_NORETURN(return 0;);
}
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 0;
- fail_no_setter:
+fail_no_setter:
DUK_DDD(DUK_DDDPRINT("result: error, accessor property without setter"));
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_SETTER_UNDEFINED);
DUK_WO_NORETURN(return 0;);
}
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 0;
- fail_internal:
+fail_internal:
DUK_DDD(DUK_DDDPRINT("result: error, internal"));
if (throw_flag) {
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return 0;);
}
- duk_pop_unsafe(thr); /* remove key */
+ duk_pop_unsafe(thr); /* remove key */
return 0;
}
@@ -59076,8 +62382,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
force_flag = (flags & DUK_DELPROP_FLAG_FORCE);
DUK_DDD(DUK_DDDPRINT("delprop_raw: thr=%p, obj=%p, key=%p, throw=%ld, force=%ld (obj -> %!O, key -> %!O)",
- (void *) thr, (void *) obj, (void *) key, (long) throw_flag, (long) force_flag,
- (duk_heaphdr *) obj, (duk_heaphdr *) key));
+ (void *) thr,
+ (void *) obj,
+ (void *) key,
+ (long) throw_flag,
+ (long) force_flag,
+ (duk_heaphdr *) obj,
+ (duk_heaphdr *) key));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -59089,7 +62400,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
arr_idx = DUK_HSTRING_GET_ARRIDX_FAST(key);
/* 0 = don't push current value */
- if (!duk__get_own_propdesc_raw(thr, obj, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
+ if (!duk__get_own_propdesc_raw(thr, obj, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
DUK_DDD(DUK_DDDPRINT("property not found, succeed always"));
goto success;
}
@@ -59116,7 +62427,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
DUK_ASSERT(desc.e_idx < 0);
tv = DUK_HOBJECT_A_GET_VALUE_PTR(thr->heap, obj, desc.a_idx);
- DUK_TVAL_SET_UNUSED_UPDREF(thr, tv); /* side effects */
+ DUK_TVAL_SET_UNUSED_UPDREF(thr, tv); /* side effects */
goto success;
} else {
DUK_ASSERT(desc.a_idx < 0);
@@ -59142,7 +62453,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
* invalidated.
*/
DUK_DDD(DUK_DDDPRINT("before removing value, e_idx %ld, key %p, key at slot %p",
- (long) desc.e_idx, (void *) key, (void *) DUK_HOBJECT_E_GET_KEY(thr->heap, obj, desc.e_idx)));
+ (long) desc.e_idx,
+ (void *) key,
+ (void *) DUK_HOBJECT_E_GET_KEY(thr->heap, obj, desc.e_idx)));
DUK_DDD(DUK_DDDPRINT("removing value at e_idx %ld", (long) desc.e_idx));
if (DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, obj, desc.e_idx)) {
duk_hobject *tmp;
@@ -59167,7 +62480,9 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
/* Remove key. */
DUK_DDD(DUK_DDDPRINT("before removing key, e_idx %ld, key %p, key at slot %p",
- (long) desc.e_idx, (void *) key, (void *) DUK_HOBJECT_E_GET_KEY(thr->heap, obj, desc.e_idx)));
+ (long) desc.e_idx,
+ (void *) key,
+ (void *) DUK_HOBJECT_E_GET_KEY(thr->heap, obj, desc.e_idx)));
DUK_DDD(DUK_DDDPRINT("removing key at e_idx %ld", (long) desc.e_idx));
DUK_ASSERT(key == DUK_HOBJECT_E_GET_KEY(thr->heap, obj, desc.e_idx));
DUK_HOBJECT_E_SET_KEY(thr->heap, obj, desc.e_idx, NULL);
@@ -59183,7 +62498,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
DUK_UNREACHABLE();
- success:
+success:
/*
* Argument exotic [[Delete]] behavior (E5 Section 10.6) is
* a post-check, keeping arguments internal 'map' in sync with
@@ -59210,8 +62525,8 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop_raw(duk_hthread *thr, duk_hobject *o
DUK_DDD(DUK_DDDPRINT("delete successful"));
return 1;
- fail_virtual: /* just use the same "not configurable" error message */
- fail_not_configurable:
+fail_virtual: /* just use the same "not configurable" error message */
+fail_not_configurable:
DUK_DDD(DUK_DDDPRINT("delete failed: property found, not configurable"));
if (throw_flag) {
@@ -59235,8 +62550,11 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
duk_bool_t rc;
DUK_DDD(DUK_DDDPRINT("delprop: thr=%p, obj=%p, key=%p (obj -> %!T, key -> %!T)",
- (void *) thr, (void *) tv_obj, (void *) tv_key,
- (duk_tval *) tv_obj, (duk_tval *) tv_key));
+ (void *) thr,
+ (void *) tv_obj,
+ (void *) tv_key,
+ (duk_tval *) tv_obj,
+ (duk_tval *) tv_key));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -59250,8 +62568,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
*/
entry_top = duk_get_top(thr);
- if (DUK_TVAL_IS_UNDEFINED(tv_obj) ||
- DUK_TVAL_IS_NULL(tv_obj)) {
+ if (DUK_TVAL_IS_UNDEFINED(tv_obj) || DUK_TVAL_IS_NULL(tv_obj)) {
DUK_DDD(DUK_DDDPRINT("base object is undefined or null -> reject"));
goto fail_invalid_base_uncond;
}
@@ -59274,12 +62591,12 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
if (duk__proxy_check_prop(thr, obj, DUK_STRIDX_DELETE_PROPERTY, tv_key, &h_target)) {
/* -> [ ... obj key trap handler ] */
DUK_DDD(DUK_DDDPRINT("-> proxy object 'deleteProperty' for key %!T", (duk_tval *) tv_key));
- duk_push_hobject(thr, h_target); /* target */
- duk_dup_m4(thr); /* P */
+ duk_push_hobject(thr, h_target); /* target */
+ duk_dup_m4(thr); /* P */
duk_call_method(thr, 2 /*nargs*/);
tmp_bool = duk_to_boolean_top_pop(thr);
if (!tmp_bool) {
- goto fail_proxy_rejected; /* retval indicates delete failed */
+ goto fail_proxy_rejected; /* retval indicates delete failed */
}
/* Target object must be checked for a conflicting
@@ -59289,14 +62606,17 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
arr_idx = duk__push_tval_to_property_key(thr, tv_key, &key);
DUK_ASSERT(key != NULL);
- if (duk__get_own_propdesc_raw(thr, h_target, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
+ if (duk__get_own_propdesc_raw(thr, h_target, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push
+ value */
duk_small_int_t desc_reject;
DUK_DDD(DUK_DDDPRINT("proxy 'deleteProperty': target has matching property %!O, check for "
"conflicting property; desc.flags=0x%08lx, "
"desc.get=%p, desc.set=%p",
- (duk_heaphdr *) key, (unsigned long) desc.flags,
- (void *) desc.get, (void *) desc.set));
+ (duk_heaphdr *) key,
+ (unsigned long) desc.flags,
+ (void *) desc.get,
+ (void *) desc.set));
desc_reject = !(desc.flags & DUK_PROPDESC_FLAG_CONFIGURABLE);
if (desc_reject) {
@@ -59305,13 +62625,13 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
DUK_WO_NORETURN(return 0;);
}
}
- rc = 1; /* success */
+ rc = 1; /* success */
goto done_rc;
}
- obj = h_target; /* resume delete to target */
+ obj = h_target; /* resume delete to target */
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
arr_idx = duk__to_property_key(thr, -1, &key);
DUK_ASSERT(key != NULL);
@@ -59336,8 +62656,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
goto fail_not_configurable;
}
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- arr_idx < DUK_HSTRING_GET_CHARLEN(h)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && arr_idx < DUK_HSTRING_GET_CHARLEN(h)) {
goto fail_not_configurable;
}
} else if (DUK_TVAL_IS_BUFFER(tv_obj)) {
@@ -59355,8 +62674,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
goto fail_not_configurable;
}
- if (arr_idx != DUK__NO_ARRAY_INDEX &&
- arr_idx < DUK_HBUFFER_GET_SIZE(h)) {
+ if (arr_idx != DUK__NO_ARRAY_INDEX && arr_idx < DUK_HBUFFER_GET_SIZE(h)) {
goto fail_not_configurable;
}
} else if (DUK_TVAL_IS_LIGHTFUNC(tv_obj)) {
@@ -59373,23 +62691,26 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
rc = 1;
goto done_rc;
- done_rc:
+done_rc:
duk_set_top_unsafe(thr, entry_top);
return rc;
- fail_invalid_base_uncond:
+fail_invalid_base_uncond:
/* Note: unconditional throw */
DUK_ASSERT(duk_get_top(thr) == entry_top);
#if defined(DUK_USE_PARANOID_ERRORS)
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_BASE);
#else
- DUK_ERROR_FMT2(thr, DUK_ERR_TYPE_ERROR, "cannot delete property %s of %s",
- duk_push_string_tval_readable(thr, tv_key), duk_push_string_tval_readable(thr, tv_obj));
+ DUK_ERROR_FMT2(thr,
+ DUK_ERR_TYPE_ERROR,
+ "cannot delete property %s of %s",
+ duk_push_string_tval_readable(thr, tv_key),
+ duk_push_string_tval_readable(thr, tv_obj));
#endif
DUK_WO_NORETURN(return 0;);
#if defined(DUK_USE_ES6_PROXY)
- fail_proxy_rejected:
+fail_proxy_rejected:
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_PROXY_REJECTED);
DUK_WO_NORETURN(return 0;);
@@ -59398,7 +62719,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
return 0;
#endif
- fail_not_configurable:
+fail_not_configurable:
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE);
DUK_WO_NORETURN(return 0;);
@@ -59426,17 +62747,23 @@ DUK_INTERNAL duk_bool_t duk_hobject_delprop(duk_hthread *thr, duk_tval *tv_obj,
* operations.
*/
-DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hobject *obj, duk_hstring *key, duk_small_uint_t flags) {
+DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_hstring *key,
+ duk_small_uint_t flags) {
duk_propdesc desc;
duk_uint32_t arr_idx;
duk_int_t e_idx;
duk_tval *tv1 = NULL;
duk_tval *tv2 = NULL;
- duk_small_uint_t propflags = flags & DUK_PROPDESC_FLAGS_MASK; /* mask out flags not actually stored */
+ duk_small_uint_t propflags = flags & DUK_PROPDESC_FLAGS_MASK; /* mask out flags not actually stored */
DUK_DDD(DUK_DDDPRINT("define new property (internal): thr=%p, obj=%!O, key=%!O, flags=0x%02lx, val=%!T",
- (void *) thr, (duk_heaphdr *) obj, (duk_heaphdr *) key,
- (unsigned long) flags, (duk_tval *) duk_get_tval(thr, -1)));
+ (void *) thr,
+ (duk_heaphdr *) obj,
+ (duk_heaphdr *) key,
+ (unsigned long) flags,
+ (duk_tval *) duk_get_tval(thr, -1)));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(thr->heap != NULL);
@@ -59444,11 +62771,11 @@ DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hob
DUK_ASSERT(key != NULL);
DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj));
DUK_ASSERT_VALSTACK_SPACE(thr, DUK__VALSTACK_SPACE);
- DUK_ASSERT(duk_is_valid_index(thr, -1)); /* contains value */
+ DUK_ASSERT(duk_is_valid_index(thr, -1)); /* contains value */
arr_idx = DUK_HSTRING_GET_ARRIDX_SLOW(key);
- if (duk__get_own_propdesc_raw(thr, obj, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
+ if (duk__get_own_propdesc_raw(thr, obj, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */
if (desc.e_idx >= 0) {
if (flags & DUK_PROPDESC_FLAG_NO_OVERWRITE) {
DUK_DDD(DUK_DDDPRINT("property already exists in the entry part -> skip as requested"));
@@ -59489,7 +62816,8 @@ DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hob
new_len = duk__to_new_array_length_checked(thr, DUK_GET_TVAL_NEGIDX(thr, -1));
((duk_harray *) obj)->length = new_len;
DUK_DD(DUK_DDPRINT("internal define property for array .length: %ld -> %ld",
- (long) prev_len, (long) ((duk_harray *) obj)->length));
+ (long) prev_len,
+ (long) ((duk_harray *) obj)->length));
goto pop_exit;
}
DUK_DD(DUK_DDPRINT("property already exists but is virtual -> failure"));
@@ -59501,7 +62829,8 @@ DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hob
if (DUK_HOBJECT_HAS_ARRAY_PART(obj)) {
if (arr_idx != DUK__NO_ARRAY_INDEX) {
- DUK_DDD(DUK_DDDPRINT("property does not exist, object has array part -> possibly extend array part and write value (assert attributes)"));
+ DUK_DDD(DUK_DDDPRINT("property does not exist, object has array part -> possibly extend array part and "
+ "write value (assert attributes)"));
DUK_ASSERT(propflags == DUK_PROPDESC_FLAGS_WEC);
tv1 = duk__obtain_arridx_slot(thr, arr_idx, obj);
@@ -59515,9 +62844,10 @@ DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hob
}
}
- write_to_entry_part:
- DUK_DDD(DUK_DDDPRINT("property does not exist, object belongs in entry part -> allocate new entry and write value and attributes"));
- e_idx = duk__hobject_alloc_entry_checked(thr, obj, key); /* increases key refcount */
+write_to_entry_part:
+ DUK_DDD(DUK_DDDPRINT(
+ "property does not exist, object belongs in entry part -> allocate new entry and write value and attributes"));
+ e_idx = duk__hobject_alloc_entry_checked(thr, obj, key); /* increases key refcount */
DUK_ASSERT(e_idx >= 0);
DUK_HOBJECT_E_SET_FLAGS(thr->heap, obj, e_idx, propflags);
tv1 = DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(thr->heap, obj, e_idx);
@@ -59525,22 +62855,21 @@ DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hob
DUK_TVAL_SET_UNDEFINED(tv1);
goto write_value;
- write_value:
+write_value:
/* tv1 points to value storage */
- tv2 = duk_require_tval(thr, -1); /* late lookup, avoid side effects */
- DUK_DDD(DUK_DDDPRINT("writing/updating value: %!T -> %!T",
- (duk_tval *) tv1, (duk_tval *) tv2));
+ tv2 = duk_require_tval(thr, -1); /* late lookup, avoid side effects */
+ DUK_DDD(DUK_DDDPRINT("writing/updating value: %!T -> %!T", (duk_tval *) tv1, (duk_tval *) tv2));
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
goto pop_exit;
- pop_exit:
- duk_pop_unsafe(thr); /* remove in_val */
+pop_exit:
+ duk_pop_unsafe(thr); /* remove in_val */
return;
- error_virtual: /* share error message */
- error_internal:
+error_virtual: /* share error message */
+error_internal:
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return;);
}
@@ -59551,13 +62880,19 @@ DUK_INTERNAL void duk_hobject_define_property_internal(duk_hthread *thr, duk_hob
* must avoid interning.
*/
-DUK_INTERNAL void duk_hobject_define_property_internal_arridx(duk_hthread *thr, duk_hobject *obj, duk_uarridx_t arr_idx, duk_small_uint_t flags) {
+DUK_INTERNAL void duk_hobject_define_property_internal_arridx(duk_hthread *thr,
+ duk_hobject *obj,
+ duk_uarridx_t arr_idx,
+ duk_small_uint_t flags) {
duk_hstring *key;
duk_tval *tv1, *tv2;
DUK_DDD(DUK_DDDPRINT("define new property (internal) arr_idx fast path: thr=%p, obj=%!O, "
"arr_idx=%ld, flags=0x%02lx, val=%!T",
- (void *) thr, obj, (long) arr_idx, (unsigned long) flags,
+ (void *) thr,
+ obj,
+ (long) arr_idx,
+ (unsigned long) flags,
(duk_tval *) duk_get_tval(thr, -1)));
DUK_ASSERT(thr != NULL);
@@ -59565,10 +62900,8 @@ DUK_INTERNAL void duk_hobject_define_property_internal_arridx(duk_hthread *thr,
DUK_ASSERT(obj != NULL);
DUK_ASSERT(!DUK_HEAPHDR_HAS_READONLY((duk_heaphdr *) obj));
- if (DUK_HOBJECT_HAS_ARRAY_PART(obj) &&
- arr_idx != DUK__NO_ARRAY_INDEX &&
- flags == DUK_PROPDESC_FLAGS_WEC) {
- DUK_ASSERT((flags & DUK_PROPDESC_FLAG_NO_OVERWRITE) == 0); /* covered by comparison */
+ if (DUK_HOBJECT_HAS_ARRAY_PART(obj) && arr_idx != DUK__NO_ARRAY_INDEX && flags == DUK_PROPDESC_FLAGS_WEC) {
+ DUK_ASSERT((flags & DUK_PROPDESC_FLAG_NO_OVERWRITE) == 0); /* covered by comparison */
DUK_DDD(DUK_DDDPRINT("define property to array part (property may or may not exist yet)"));
@@ -59579,22 +62912,22 @@ DUK_INTERNAL void duk_hobject_define_property_internal_arridx(duk_hthread *thr,
}
tv2 = duk_require_tval(thr, -1);
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
- duk_pop_unsafe(thr); /* [ ...val ] -> [ ... ] */
+ duk_pop_unsafe(thr); /* [ ...val ] -> [ ... ] */
return;
}
- write_slow:
+write_slow:
DUK_DDD(DUK_DDDPRINT("define property fast path didn't work, use slow path"));
key = duk_push_uint_to_hstring(thr, (duk_uint_t) arr_idx);
DUK_ASSERT(key != NULL);
- duk_insert(thr, -2); /* [ ... val key ] -> [ ... key val ] */
+ duk_insert(thr, -2); /* [ ... val key ] -> [ ... key val ] */
duk_hobject_define_property_internal(thr, obj, key, flags);
- duk_pop_unsafe(thr); /* [ ... key ] -> [ ... ] */
+ duk_pop_unsafe(thr); /* [ ... key ] -> [ ... ] */
}
/*
@@ -59615,9 +62948,7 @@ DUK_INTERNAL duk_size_t duk_hobject_get_length(duk_hthread *thr, duk_hobject *ob
/* Slow path, .length can be e.g. accessor, obj can be a Proxy, etc. */
duk_push_hobject(thr, obj);
duk_push_hstring_stridx(thr, DUK_STRIDX_LENGTH);
- (void) duk_hobject_getprop(thr,
- DUK_GET_TVAL_NEGIDX(thr, -2),
- DUK_GET_TVAL_NEGIDX(thr, -1));
+ (void) duk_hobject_getprop(thr, DUK_GET_TVAL_NEGIDX(thr, -2), DUK_GET_TVAL_NEGIDX(thr, -1));
val = duk_to_number_m1(thr);
duk_pop_3_unsafe(thr);
@@ -59658,7 +62989,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_has_finalizer_fast_raw(duk_hobject *obj) {
DUK_ASSERT(heap != NULL);
obj = DUK_HOBJECT_GET_PROTOTYPE(heap, obj);
#else
- obj = DUK_HOBJECT_GET_PROTOTYPE(NULL, obj); /* 'heap' arg ignored */
+ obj = DUK_HOBJECT_GET_PROTOTYPE(NULL, obj); /* 'heap' arg ignored */
#endif
} while (obj != NULL);
@@ -59725,7 +63056,7 @@ DUK_INTERNAL void duk_hobject_object_get_own_property_descriptor(duk_hthread *th
/* [ ... key value desc ] */
duk_replace(thr, -3);
- duk_pop_unsafe(thr); /* -> [ ... desc ] */
+ duk_pop_unsafe(thr); /* -> [ ... desc ] */
}
/*
@@ -59762,7 +63093,7 @@ void duk_hobject_prepare_property_descriptor(duk_hthread *thr,
DUK_ASSERT(out_idx_value != NULL);
DUK_ASSERT(out_getter != NULL);
DUK_ASSERT(out_setter != NULL);
- DUK_ASSERT(idx_in <= 0x7fffL); /* short variants would be OK, but not used to avoid shifts */
+ DUK_ASSERT(idx_in <= 0x7fffL); /* short variants would be OK, but not used to avoid shifts */
/* Must be an object, otherwise TypeError (E5.1 Section 8.10.5, step 1). */
idx_in = duk_require_normalize_index(thr, idx_in);
@@ -59818,7 +63149,7 @@ void duk_hobject_prepare_property_descriptor(duk_hthread *thr,
if (DUK_TVAL_IS_UNDEFINED(tv)) {
/* undefined is accepted */
DUK_ASSERT(setter == NULL);
- } else {
+ } else {
/* NOTE: lightfuncs are coerced to full functions because
* lightfuncs don't fit into a property value slot. This
* has some side effects, see test-dev-lightfunc-accessor.js.
@@ -59861,7 +63192,7 @@ void duk_hobject_prepare_property_descriptor(duk_hthread *thr,
/* [ ... [multiple values] ] */
return;
- type_error:
+type_error:
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_DESCRIPTOR);
DUK_WO_NORETURN(return;);
}
@@ -59909,7 +63240,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
duk_bool_t force_flag;
duk_small_uint_t new_flags;
duk_propdesc curr;
- duk_uint32_t arridx_new_array_length; /* != 0 => post-update for array 'length' (used when key is an array index) */
+ duk_uint32_t arridx_new_array_length; /* != 0 => post-update for array 'length' (used when key is an array index) */
duk_uint32_t arrlen_old_len;
duk_uint32_t arrlen_new_len;
duk_bool_t pending_write_protect;
@@ -59949,13 +63280,22 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
"has_get=%ld get=%p=%!O "
"has_set=%ld set=%p=%!O "
"arr_idx=%ld throw_flag=!%ld",
- (long) has_enumerable, (long) is_enumerable,
- (long) has_configurable, (long) is_configurable,
- (long) has_writable, (long) is_writable,
- (long) has_value, (duk_tval *) (idx_value >= 0 ? duk_get_tval(thr, idx_value) : NULL),
- (long) has_get, (void *) get, (duk_heaphdr *) get,
- (long) has_set, (void *) set, (duk_heaphdr *) set,
- (long) arr_idx, (long) throw_flag));
+ (long) has_enumerable,
+ (long) is_enumerable,
+ (long) has_configurable,
+ (long) is_configurable,
+ (long) has_writable,
+ (long) is_writable,
+ (long) has_value,
+ (duk_tval *) (idx_value >= 0 ? duk_get_tval(thr, idx_value) : NULL),
+ (long) has_get,
+ (void *) get,
+ (duk_heaphdr *) get,
+ (long) has_set,
+ (void *) set,
+ (duk_heaphdr *) set,
+ (long) arr_idx,
+ (long) throw_flag));
/*
* Array exotic behaviors can be implemented at this point. The local variables
@@ -59989,7 +63329,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_ASSERT(idx_value >= 0);
arrlen_new_len = duk__to_new_array_length_checked(thr, DUK_GET_TVAL_POSIDX(thr, idx_value));
duk_push_u32(thr, arrlen_new_len);
- duk_replace(thr, idx_value); /* step 3.e: replace 'Desc.[[Value]]' */
+ duk_replace(thr, idx_value); /* step 3.e: replace 'Desc.[[Value]]' */
DUK_DDD(DUK_DDDPRINT("old_len=%ld, new_len=%ld", (long) arrlen_old_len, (long) arrlen_new_len));
@@ -60031,7 +63371,8 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
if (arr_idx >= old_len) {
DUK_DDD(DUK_DDDPRINT("defineProperty requires array length update "
"(arr_idx=%ld, old_len=%ld)",
- (long) arr_idx, (long) old_len));
+ (long) arr_idx,
+ (long) old_len));
if (DUK_HARRAY_LENGTH_NONWRITABLE(a) && !force_flag) {
/* Array .length is always non-configurable, so
@@ -60049,10 +63390,11 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
} else {
DUK_DDD(DUK_DDDPRINT("defineProperty does not require length update "
"(arr_idx=%ld, old_len=%ld) -> standard behavior",
- (long) arr_idx, (long) old_len));
+ (long) arr_idx,
+ (long) old_len));
}
}
- skip_array_exotic:
+skip_array_exotic:
/* XXX: There is currently no support for writing buffer object
* indexed elements here. Attempt to do so will succeed and
@@ -60104,7 +63446,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_ASSERT(!has_value);
DUK_ASSERT(!has_writable);
- new_flags = DUK_PROPDESC_FLAG_ACCESSOR; /* defaults, E5 Section 8.6.1, Table 7 */
+ new_flags = DUK_PROPDESC_FLAG_ACCESSOR; /* defaults, E5 Section 8.6.1, Table 7 */
if (has_enumerable && is_enumerable) {
new_flags |= DUK_PROPDESC_FLAG_ENUMERABLE;
}
@@ -60137,7 +63479,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_ASSERT(!has_set);
DUK_ASSERT(!has_get);
- new_flags = 0; /* defaults, E5 Section 8.6.1, Table 7 */
+ new_flags = 0; /* defaults, E5 Section 8.6.1, Table 7 */
if (has_writable && is_writable) {
new_flags |= DUK_PROPDESC_FLAG_WRITABLE;
}
@@ -60151,12 +63493,13 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
duk_tval *tv_tmp = duk_require_tval(thr, idx_value);
DUK_TVAL_SET_TVAL(&tv, tv_tmp);
} else {
- DUK_TVAL_SET_UNDEFINED(&tv); /* default value */
+ DUK_TVAL_SET_UNDEFINED(&tv); /* default value */
}
if (arr_idx != DUK__NO_ARRAY_INDEX && DUK_HOBJECT_HAS_ARRAY_PART(obj)) {
if (new_flags == DUK_PROPDESC_FLAGS_WEC) {
- DUK_DDD(DUK_DDDPRINT("new data property attributes match array defaults, attempt to write to array part"));
+ DUK_DDD(DUK_DDDPRINT(
+ "new data property attributes match array defaults, attempt to write to array part"));
tv2 = duk__obtain_arridx_slot(thr, arr_idx, obj);
if (tv2 == NULL) {
DUK_DDD(DUK_DDDPRINT("failed writing to array part, abandoned array"));
@@ -60229,8 +63572,8 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
goto need_check;
}
- tmp1 = duk_require_tval(thr, -1); /* curr value */
- tmp2 = duk_require_tval(thr, idx_value); /* new value */
+ tmp1 = duk_require_tval(thr, -1); /* curr value */
+ tmp2 = duk_require_tval(thr, idx_value); /* new value */
if (!duk_js_samevalue(tmp1, tmp2)) {
goto need_check;
}
@@ -60275,7 +63618,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
*/
goto success_no_exotics;
- need_check:
+need_check:
/*
* Some change(s) need to be made. Steps 7-11.
@@ -60347,9 +63690,10 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("convert property to accessor property"));
if (curr.a_idx >= 0) {
- DUK_DDD(DUK_DDDPRINT("property to convert is stored in an array entry, abandon array and re-lookup"));
+ DUK_DDD(
+ DUK_DDDPRINT("property to convert is stored in an array entry, abandon array and re-lookup"));
duk__abandon_array_part(thr, obj);
- duk_pop_unsafe(thr); /* remove old value */
+ duk_pop_unsafe(thr); /* remove old value */
rc = duk__get_own_propdesc_raw(thr, obj, key, arr_idx, &curr, DUK_GETDESC_FLAG_PUSH_VALUE);
DUK_UNREF(rc);
DUK_ASSERT(rc != 0);
@@ -60357,14 +63701,14 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
}
if (curr.e_idx < 0) {
DUK_ASSERT(curr.a_idx < 0 && curr.e_idx < 0);
- goto fail_virtual; /* safeguard for virtual property */
+ goto fail_virtual; /* safeguard for virtual property */
}
DUK_ASSERT(curr.e_idx >= 0);
DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, obj, curr.e_idx));
tv1 = DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(thr->heap, obj, curr.e_idx);
- DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ(thr, tv1); /* XXX: just decref */
+ DUK_TVAL_SET_UNDEFINED_UPDREF_NORZ(thr, tv1); /* XXX: just decref */
DUK_HOBJECT_E_SET_VALUE_GETTER(thr->heap, obj, curr.e_idx, NULL);
DUK_HOBJECT_E_SET_VALUE_SETTER(thr->heap, obj, curr.e_idx, NULL);
@@ -60393,7 +63737,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
/* curr is accessor -> cannot be in array part. */
DUK_ASSERT(curr.a_idx < 0);
if (curr.e_idx < 0) {
- goto fail_virtual; /* safeguard; no virtual accessors now */
+ goto fail_virtual; /* safeguard; no virtual accessors now */
}
DUK_DDD(DUK_DDDPRINT("convert property to data property"));
@@ -60425,8 +63769,8 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
}
/* Note: changing from writable to non-writable is OK */
if (!(curr.flags & DUK_PROPDESC_FLAG_WRITABLE) && has_value) {
- duk_tval *tmp1 = duk_require_tval(thr, -1); /* curr value */
- duk_tval *tmp2 = duk_require_tval(thr, idx_value); /* new value */
+ duk_tval *tmp1 = duk_require_tval(thr, -1); /* curr value */
+ duk_tval *tmp2 = duk_require_tval(thr, idx_value); /* new value */
if (!duk_js_samevalue(tmp1, tmp2)) {
goto fail_not_configurable;
}
@@ -60475,8 +63819,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
/* XXX: write protect after flag? -> any chance of handling it here? */
- DUK_DDD(DUK_DDDPRINT("new flags that we want to write: 0x%02lx",
- (unsigned long) new_flags));
+ DUK_DDD(DUK_DDDPRINT("new flags that we want to write: 0x%02lx", (unsigned long) new_flags));
/*
* Check whether we need to abandon an array part (if it exists)
@@ -60492,20 +63835,23 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("array index, new property attributes match array defaults, update in-place"));
- DUK_ASSERT(curr.flags == DUK_PROPDESC_FLAGS_WEC); /* must have been, since in array part */
+ DUK_ASSERT(curr.flags == DUK_PROPDESC_FLAGS_WEC); /* must have been, since in array part */
DUK_ASSERT(!has_set);
DUK_ASSERT(!has_get);
- DUK_ASSERT(idx_value >= 0); /* must be: if attributes match and we get here the value must differ (otherwise no change) */
+ DUK_ASSERT(
+ idx_value >=
+ 0); /* must be: if attributes match and we get here the value must differ (otherwise no change) */
tv2 = duk_require_tval(thr, idx_value);
tv1 = DUK_HOBJECT_A_GET_VALUE_PTR(thr->heap, obj, curr.a_idx);
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects; may invalidate a_idx */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects; may invalidate a_idx */
goto success_exotics;
}
- DUK_DDD(DUK_DDDPRINT("array index, new property attributes do not match array defaults, abandon array and re-lookup"));
+ DUK_DDD(
+ DUK_DDDPRINT("array index, new property attributes do not match array defaults, abandon array and re-lookup"));
duk__abandon_array_part(thr, obj);
- duk_pop_unsafe(thr); /* remove old value */
+ duk_pop_unsafe(thr); /* remove old value */
rc = duk__get_own_propdesc_raw(thr, obj, key, arr_idx, &curr, DUK_GETDESC_FLAG_PUSH_VALUE);
DUK_UNREF(rc);
DUK_ASSERT(rc != 0);
@@ -60529,10 +63875,12 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
if (key == DUK_HTHREAD_STRING_LENGTH(thr) && DUK_HOBJECT_HAS_EXOTIC_ARRAY(obj)) {
duk_harray *a;
a = (duk_harray *) obj;
- DUK_DD(DUK_DDPRINT("Object.defineProperty() attribute update for duk_harray .length -> %02lx", (unsigned long) new_flags));
+ DUK_DD(DUK_DDPRINT("Object.defineProperty() attribute update for duk_harray .length -> %02lx",
+ (unsigned long) new_flags));
DUK_HARRAY_ASSERT_VALID(a);
if ((new_flags & DUK_PROPDESC_FLAGS_EC) != (curr.flags & DUK_PROPDESC_FLAGS_EC)) {
- DUK_D(DUK_DPRINT("Object.defineProperty() attempt to change virtual array .length enumerable or configurable attribute, fail"));
+ DUK_D(DUK_DPRINT("Object.defineProperty() attempt to change virtual array .length enumerable or "
+ "configurable attribute, fail"));
goto fail_virtual;
}
if (new_flags & DUK_PROPDESC_FLAG_WRITABLE) {
@@ -60560,7 +63908,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_UNREF(tmp);
DUK_HOBJECT_E_SET_VALUE_SETTER(thr->heap, obj, curr.e_idx, set);
DUK_HOBJECT_INCREF_ALLOWNULL(thr, set);
- DUK_HOBJECT_DECREF_ALLOWNULL(thr, tmp); /* side effects; may invalidate e_idx */
+ DUK_HOBJECT_DECREF_ALLOWNULL(thr, tmp); /* side effects; may invalidate e_idx */
}
if (has_get) {
duk_hobject *tmp;
@@ -60576,7 +63924,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_UNREF(tmp);
DUK_HOBJECT_E_SET_VALUE_GETTER(thr->heap, obj, curr.e_idx, get);
DUK_HOBJECT_INCREF_ALLOWNULL(thr, get);
- DUK_HOBJECT_DECREF_ALLOWNULL(thr, tmp); /* side effects; may invalidate e_idx */
+ DUK_HOBJECT_DECREF_ALLOWNULL(thr, tmp); /* side effects; may invalidate e_idx */
}
if (has_value) {
duk_tval *tv1, *tv2;
@@ -60587,9 +63935,9 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, obj, curr.e_idx));
tv2 = duk_require_tval(thr, idx_value);
tv1 = DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(thr->heap, obj, curr.e_idx);
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects; may invalidate e_idx */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects; may invalidate e_idx */
} else {
- DUK_ASSERT(curr.a_idx < 0); /* array part case handled comprehensively previously */
+ DUK_ASSERT(curr.a_idx < 0); /* array part case handled comprehensively previously */
DUK_DD(DUK_DDPRINT("Object.defineProperty(), value update for virtual property"));
/* XXX: Uint8Array and other typed array virtual writes not currently
@@ -60598,11 +63946,12 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
if (key == DUK_HTHREAD_STRING_LENGTH(thr) && DUK_HOBJECT_HAS_EXOTIC_ARRAY(obj)) {
duk_harray *a;
a = (duk_harray *) obj;
- DUK_DD(DUK_DDPRINT("Object.defineProperty() value update for duk_harray .length -> %ld", (long) arrlen_new_len));
+ DUK_DD(DUK_DDPRINT("Object.defineProperty() value update for duk_harray .length -> %ld",
+ (long) arrlen_new_len));
DUK_HARRAY_ASSERT_VALID(a);
a->length = arrlen_new_len;
} else {
- goto fail_virtual; /* should not happen */
+ goto fail_virtual; /* should not happen */
}
}
}
@@ -60619,7 +63968,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
* - for 'length' key the element deletion and 'length' update occurs here
*/
- success_exotics:
+success_exotics:
/* curr.a_idx or curr.e_idx may have been invalidated by side effects
* above.
@@ -60663,7 +64012,8 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("defineProperty successful, key is 'length', exotic array behavior, "
"doing array element deletion and length update"));
- rc = duk__handle_put_array_length_smaller(thr, obj, arrlen_old_len, arrlen_new_len, force_flag, &result_len);
+ rc =
+ duk__handle_put_array_length_smaller(thr, obj, arrlen_old_len, arrlen_new_len, force_flag, &result_len);
/* update length (curr points to length, and we assume it's still valid) */
DUK_ASSERT(result_len >= arrlen_new_len && result_len <= arrlen_old_len);
@@ -60686,7 +64036,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
duk_hobject *varenv;
DUK_ASSERT(arridx_new_array_length == 0);
- DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARRAY(obj)); /* traits are separate; in particular, arguments not an array */
+ DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARRAY(obj)); /* traits are separate; in particular, arguments not an array */
map = NULL;
varenv = NULL;
@@ -60703,7 +64053,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("defineProperty successful, key mapped to arguments 'map' "
"changed to an accessor, delete arguments binding"));
- (void) duk_hobject_delprop_raw(thr, map, key, 0); /* ignore result */
+ (void) duk_hobject_delprop_raw(thr, map, key, 0); /* ignore result */
} else {
/* Note: this order matters (final value before deleting map entry must be done) */
DUK_DDD(DUK_DDDPRINT("defineProperty successful, key mapped to arguments 'map', "
@@ -60731,7 +64081,7 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("defineProperty successful, key mapped to arguments 'map', "
"changed to non-writable, delete arguments binding"));
- (void) duk_hobject_delprop_raw(thr, map, key, 0); /* ignore result */
+ (void) duk_hobject_delprop_raw(thr, map, key, 0); /* ignore result */
}
}
@@ -60740,22 +64090,22 @@ duk_bool_t duk_hobject_define_property_helper(duk_hthread *thr,
*/
}
- success_no_exotics:
+success_no_exotics:
/* Some code paths use NORZ macros for simplicity, ensure refzero
* handling is completed.
*/
DUK_REFZERO_CHECK_SLOW(thr);
return 1;
- fail_not_extensible:
+fail_not_extensible:
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_EXTENSIBLE);
DUK_WO_NORETURN(return 0;);
}
return 0;
- fail_virtual: /* just use the same "not configurable" error message" */
- fail_not_configurable:
+fail_virtual: /* just use the same "not configurable" error message" */
+fail_not_configurable:
if (throw_flag) {
DUK_ERROR_TYPE(thr, DUK_STR_NOT_CONFIGURABLE);
DUK_WO_NORETURN(return 0;);
@@ -60780,7 +64130,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_object_ownprop_helper(duk_hthread *thr, duk_
h_obj = duk_push_this_coercible_to_object(thr);
DUK_ASSERT(h_obj != NULL);
- ret = duk_hobject_get_own_propdesc(thr, h_obj, h_v, &desc, 0 /*flags*/); /* don't push value */
+ ret = duk_hobject_get_own_propdesc(thr, h_obj, h_v, &desc, 0 /*flags*/); /* don't push value */
duk_push_boolean(thr, ret && ((desc.flags & required_desc_flags) == required_desc_flags));
return 1;
@@ -60894,9 +64244,7 @@ DUK_INTERNAL duk_bool_t duk_hobject_object_is_sealed_frozen_helper(duk_hthread *
if (flags & DUK_PROPDESC_FLAG_CONFIGURABLE) {
return 0;
}
- if (is_frozen &&
- !(flags & DUK_PROPDESC_FLAG_ACCESSOR) &&
- (flags & DUK_PROPDESC_FLAG_WRITABLE)) {
+ if (is_frozen && !(flags & DUK_PROPDESC_FLAG_ACCESSOR) && (flags & DUK_PROPDESC_FLAG_WRITABLE)) {
return 0;
}
}
@@ -60939,7 +64287,7 @@ DUK_INTERNAL void duk_hstring_assert_valid(duk_hstring *h) {
DUK_ASSERT(h != NULL);
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Misc support functions
*/
@@ -60950,7 +64298,10 @@ DUK_INTERNAL void duk_hstring_assert_valid(duk_hstring *h) {
* duk_hstring charCodeAt, with and without surrogate awareness
*/
-DUK_INTERNAL duk_ucodepoint_t duk_hstring_char_code_at_raw(duk_hthread *thr, duk_hstring *h, duk_uint_t pos, duk_bool_t surrogate_aware) {
+DUK_INTERNAL duk_ucodepoint_t duk_hstring_char_code_at_raw(duk_hthread *thr,
+ duk_hstring *h,
+ duk_uint_t pos,
+ duk_bool_t surrogate_aware) {
duk_uint32_t boff;
const duk_uint8_t *p, *p_start, *p_end;
duk_ucodepoint_t cp1;
@@ -60959,21 +64310,18 @@ DUK_INTERNAL duk_ucodepoint_t duk_hstring_char_code_at_raw(duk_hthread *thr, duk
/* Caller must check character offset to be inside the string. */
DUK_ASSERT(thr != NULL);
DUK_ASSERT(h != NULL);
- DUK_ASSERT_DISABLE(pos >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(pos >= 0); /* unsigned */
DUK_ASSERT(pos < (duk_uint_t) DUK_HSTRING_GET_CHARLEN(h));
boff = (duk_uint32_t) duk_heap_strcache_offset_char2byte(thr, h, (duk_uint32_t) pos);
- DUK_DDD(DUK_DDDPRINT("charCodeAt: pos=%ld -> boff=%ld, str=%!O",
- (long) pos, (long) boff, (duk_heaphdr *) h));
+ DUK_DDD(DUK_DDDPRINT("charCodeAt: pos=%ld -> boff=%ld, str=%!O", (long) pos, (long) boff, (duk_heaphdr *) h));
DUK_ASSERT_DISABLE(boff >= 0);
DUK_ASSERT(boff < DUK_HSTRING_GET_BYTELEN(h));
p_start = DUK_HSTRING_GET_DATA(h);
p_end = p_start + DUK_HSTRING_GET_BYTELEN(h);
p = p_start + boff;
- DUK_DDD(DUK_DDDPRINT("p_start=%p, p_end=%p, p=%p",
- (const void *) p_start, (const void *) p_end,
- (const void *) p));
+ DUK_DDD(DUK_DDDPRINT("p_start=%p, p_end=%p, p=%p", (const void *) p_start, (const void *) p_end, (const void *) p));
/* For invalid UTF-8 (never happens for standard ECMAScript strings)
* return U+FFFD replacement character.
@@ -60984,7 +64332,7 @@ DUK_INTERNAL duk_ucodepoint_t duk_hstring_char_code_at_raw(duk_hthread *thr, duk
* decoded at the end of the string and 'p' is no longer
* within string memory range.
*/
- cp2 = 0; /* If call fails, this is left untouched and won't match cp2 check. */
+ cp2 = 0; /* If call fails, this is left untouched and won't match cp2 check. */
(void) duk_unicode_decode_xutf8(thr, &p, p_start, p_end, &cp2);
if (cp2 >= 0xdc00UL && cp2 <= 0xdfffUL) {
cp1 = (duk_ucodepoint_t) (((cp1 - 0xd800UL) << 10) + (cp2 - 0xdc00UL) + 0x10000UL);
@@ -61014,7 +64362,7 @@ DUK_INTERNAL void duk_hstring_init_charlen(duk_hstring *h) {
clen = duk_unicode_unvalidated_utf8_length(DUK_HSTRING_GET_DATA(h), DUK_HSTRING_GET_BYTELEN(h));
#if defined(DUK_USE_STRLEN16)
- DUK_ASSERT(clen <= 0xffffUL); /* Bytelength checked during interning. */
+ DUK_ASSERT(clen <= 0xffffUL); /* Bytelength checked during interning. */
h->clen16 = (duk_uint16_t) clen;
#else
h->clen = (duk_uint32_t) clen;
@@ -61031,7 +64379,7 @@ DUK_INTERNAL DUK_HOT duk_size_t duk_hstring_get_charlen(duk_hstring *h) {
return h->clen;
#endif
}
-#endif /* !DUK_USE_HSTRING_LAZY_CLEN */
+#endif /* !DUK_USE_HSTRING_LAZY_CLEN */
/*
* duk_hstring charlen, when lazy charlen enabled
@@ -61042,7 +64390,7 @@ DUK_INTERNAL DUK_HOT duk_size_t duk_hstring_get_charlen(duk_hstring *h) {
DUK_LOCAL DUK_COLD duk_size_t duk__hstring_get_charlen_slowpath(duk_hstring *h) {
duk_size_t res;
- DUK_ASSERT(h->clen == 0); /* Checked by caller. */
+ DUK_ASSERT(h->clen == 0); /* Checked by caller. */
#if defined(DUK_USE_ROM_STRINGS)
/* ROM strings have precomputed clen, but if the computed clen is zero
@@ -61055,7 +64403,7 @@ DUK_LOCAL DUK_COLD duk_size_t duk__hstring_get_charlen_slowpath(duk_hstring *h)
res = duk_unicode_unvalidated_utf8_length(DUK_HSTRING_GET_DATA(h), DUK_HSTRING_GET_BYTELEN(h));
#if defined(DUK_USE_STRLEN16)
- DUK_ASSERT(res <= 0xffffUL); /* Bytelength checked during interning. */
+ DUK_ASSERT(res <= 0xffffUL); /* Bytelength checked during interning. */
h->clen16 = (duk_uint16_t) res;
#else
h->clen = (duk_uint32_t) res;
@@ -61065,7 +64413,7 @@ DUK_LOCAL DUK_COLD duk_size_t duk__hstring_get_charlen_slowpath(duk_hstring *h)
}
return res;
}
-#else /* DUK_USE_HSTRING_CLEN */
+#else /* DUK_USE_HSTRING_CLEN */
DUK_LOCAL duk_size_t duk__hstring_get_charlen_slowpath(duk_hstring *h) {
if (DUK_LIKELY(DUK_HSTRING_HAS_ASCII(h))) {
/* Most practical strings will go here. */
@@ -61094,7 +64442,7 @@ DUK_LOCAL duk_size_t duk__hstring_get_charlen_slowpath(duk_hstring *h) {
return res;
}
}
-#endif /* DUK_USE_HSTRING_CLEN */
+#endif /* DUK_USE_HSTRING_CLEN */
#if defined(DUK_USE_HSTRING_CLEN)
DUK_INTERNAL DUK_HOT duk_size_t duk_hstring_get_charlen(duk_hstring *h) {
@@ -61109,13 +64457,13 @@ DUK_INTERNAL DUK_HOT duk_size_t duk_hstring_get_charlen(duk_hstring *h) {
#endif
return duk__hstring_get_charlen_slowpath(h);
}
-#else /* DUK_USE_HSTRING_CLEN */
+#else /* DUK_USE_HSTRING_CLEN */
DUK_INTERNAL DUK_HOT duk_size_t duk_hstring_get_charlen(duk_hstring *h) {
/* Always use slow path. */
return duk__hstring_get_charlen_slowpath(h);
}
-#endif /* DUK_USE_HSTRING_CLEN */
-#endif /* DUK_USE_HSTRING_LAZY_CLEN */
+#endif /* DUK_USE_HSTRING_CLEN */
+#endif /* DUK_USE_HSTRING_LAZY_CLEN */
/*
* Compare duk_hstring to an ASCII cstring.
@@ -61180,7 +64528,7 @@ DUK_INTERNAL duk_bool_t duk_hthread_init_stacks(duk_heap *heap, duk_hthread *thr
return 1;
- fail:
+fail:
DUK_FREE(heap, thr->valstack);
DUK_ASSERT(thr->callstack_curr == NULL);
@@ -61207,21 +64555,21 @@ DUK_INTERNAL void *duk_hthread_get_valstack_ptr(duk_heap *heap, void *ud) {
* Encoding constants, must match genbuiltins.py
*/
-#define DUK__PROP_FLAGS_BITS 3
-#define DUK__LENGTH_PROP_BITS 3
-#define DUK__NARGS_BITS 3
-#define DUK__PROP_TYPE_BITS 3
+#define DUK__PROP_FLAGS_BITS 3
+#define DUK__LENGTH_PROP_BITS 3
+#define DUK__NARGS_BITS 3
+#define DUK__PROP_TYPE_BITS 3
-#define DUK__NARGS_VARARGS_MARKER 0x07
+#define DUK__NARGS_VARARGS_MARKER 0x07
-#define DUK__PROP_TYPE_DOUBLE 0
-#define DUK__PROP_TYPE_STRING 1
-#define DUK__PROP_TYPE_STRIDX 2
-#define DUK__PROP_TYPE_BUILTIN 3
-#define DUK__PROP_TYPE_UNDEFINED 4
-#define DUK__PROP_TYPE_BOOLEAN_TRUE 5
-#define DUK__PROP_TYPE_BOOLEAN_FALSE 6
-#define DUK__PROP_TYPE_ACCESSOR 7
+#define DUK__PROP_TYPE_DOUBLE 0
+#define DUK__PROP_TYPE_STRING 1
+#define DUK__PROP_TYPE_STRIDX 2
+#define DUK__PROP_TYPE_BUILTIN 3
+#define DUK__PROP_TYPE_UNDEFINED 4
+#define DUK__PROP_TYPE_BOOLEAN_TRUE 5
+#define DUK__PROP_TYPE_BOOLEAN_FALSE 6
+#define DUK__PROP_TYPE_ACCESSOR 7
/*
* Create built-in objects by parsing an init bitstream generated
@@ -61244,9 +64592,8 @@ DUK_LOCAL void duk__duplicate_ram_global_object(duk_hthread *thr) {
#if defined(DUK_USE_ROM_GLOBAL_INHERIT)
/* Inherit from ROM-based global object: less RAM usage, less transparent. */
h_global = duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_GLOBAL),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_GLOBAL),
DUK_BIDX_GLOBAL);
DUK_ASSERT(h_global != NULL);
#elif defined(DUK_USE_ROM_GLOBAL_CLONE)
@@ -61255,9 +64602,8 @@ DUK_LOCAL void duk__duplicate_ram_global_object(duk_hthread *thr) {
* model but more compliant.
*/
h_global = duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_GLOBAL),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_GLOBAL),
DUK_BIDX_OBJECT_PROTOTYPE);
DUK_ASSERT(h_global != NULL);
h_oldglobal = thr->builtins[DUK_BIDX_GLOBAL];
@@ -61291,7 +64637,8 @@ DUK_LOCAL void duk__duplicate_ram_global_object(duk_hthread *thr) {
duk_hobject_compact_props(thr, h_global);
DUK_ASSERT(thr->builtins[DUK_BIDX_GLOBAL] != NULL);
- DUK_ASSERT(!DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE((duk_heaphdr *) thr->builtins[DUK_BIDX_GLOBAL])); /* no need to decref: ROM object */
+ DUK_ASSERT(
+ !DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE((duk_heaphdr *) thr->builtins[DUK_BIDX_GLOBAL])); /* no need to decref: ROM object */
thr->builtins[DUK_BIDX_GLOBAL] = h_global;
DUK_HOBJECT_INCREF(thr, h_global);
DUK_D(DUK_DPRINT("duplicated global object: %!O", h_global));
@@ -61300,9 +64647,9 @@ DUK_LOCAL void duk__duplicate_ram_global_object(duk_hthread *thr) {
* needed so that the global scope points to the newly created RAM-based
* global object.
*/
- h_objenv = (duk_hobject *) duk_hobjenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
+ h_objenv =
+ (duk_hobject *) duk_hobjenv_alloc(thr,
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
DUK_ASSERT(h_objenv != NULL);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, h_objenv) == NULL);
duk_push_hobject(thr, h_objenv);
@@ -61313,16 +64660,17 @@ DUK_LOCAL void duk__duplicate_ram_global_object(duk_hthread *thr) {
DUK_ASSERT(((duk_hobjenv *) h_objenv)->has_this == 0);
DUK_ASSERT(thr->builtins[DUK_BIDX_GLOBAL_ENV] != NULL);
- DUK_ASSERT(!DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE((duk_heaphdr *) thr->builtins[DUK_BIDX_GLOBAL_ENV])); /* no need to decref: ROM object */
+ DUK_ASSERT(!DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(
+ (duk_heaphdr *) thr->builtins[DUK_BIDX_GLOBAL_ENV])); /* no need to decref: ROM object */
thr->builtins[DUK_BIDX_GLOBAL_ENV] = h_objenv;
DUK_HOBJECT_INCREF(thr, h_objenv);
DUK_D(DUK_DPRINT("duplicated global env: %!O", h_objenv));
DUK_HOBJENV_ASSERT_VALID((duk_hobjenv *) h_objenv);
- duk_pop_2(thr); /* Pop global object and global env. */
+ duk_pop_2(thr); /* Pop global object and global env. */
}
-#endif /* DUK_USE_ROM_GLOBAL_CLONE || DUK_USE_ROM_GLOBAL_INHERIT */
+#endif /* DUK_USE_ROM_GLOBAL_CLONE || DUK_USE_ROM_GLOBAL_INHERIT */
DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
/* Setup builtins from ROM objects. All heaps/threads will share
@@ -61346,12 +64694,12 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
duk__duplicate_ram_global_object(thr);
#endif
}
-#else /* DUK_USE_ROM_OBJECTS */
+#else /* DUK_USE_ROM_OBJECTS */
DUK_LOCAL void duk__push_stridx(duk_hthread *thr, duk_bitdecoder_ctx *bd) {
duk_small_uint_t n;
n = (duk_small_uint_t) duk_bd_decode_varuint(bd);
- DUK_ASSERT_DISABLE(n >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(n >= 0); /* unsigned */
DUK_ASSERT(n < DUK_HEAP_NUM_STRINGS);
duk_push_hstring_stridx(thr, n);
}
@@ -61388,16 +64736,18 @@ DUK_LOCAL void duk__push_double(duk_hthread *thr, duk_bitdecoder_ctx *bd) {
du.uc[i] = (duk_uint8_t) duk_bd_decode(bd, 8);
}
- duk_push_number(thr, du.d); /* push operation normalizes NaNs */
+ duk_push_number(thr, du.d); /* push operation normalizes NaNs */
}
DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
duk_bitdecoder_ctx bd_ctx;
- duk_bitdecoder_ctx *bd = &bd_ctx; /* convenience */
+ duk_bitdecoder_ctx *bd = &bd_ctx; /* convenience */
duk_hobject *h;
duk_small_uint_t i, j;
- DUK_D(DUK_DPRINT("INITBUILTINS BEGIN: DUK_NUM_BUILTINS=%d, DUK_NUM_BUILTINS_ALL=%d", (int) DUK_NUM_BUILTINS, (int) DUK_NUM_ALL_BUILTINS));
+ DUK_D(DUK_DPRINT("INITBUILTINS BEGIN: DUK_NUM_BUILTINS=%d, DUK_NUM_BUILTINS_ALL=%d",
+ (int) DUK_NUM_BUILTINS,
+ (int) DUK_NUM_ALL_BUILTINS));
duk_memzero(&bd_ctx, sizeof(bd_ctx));
bd->data = (const duk_uint8_t *) duk_builtins_data;
@@ -61424,14 +64774,14 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
DUK_ASSERT_TOP(thr, 0);
for (i = 0; i < DUK_NUM_ALL_BUILTINS; i++) {
duk_small_uint_t class_num;
- duk_small_int_t len = -1; /* must be signed */
+ duk_small_int_t len = -1; /* must be signed */
class_num = (duk_small_uint_t) duk_bd_decode_varuint(bd);
len = (duk_small_int_t) duk_bd_decode_flagged_signed(bd, DUK__LENGTH_PROP_BITS, (duk_int32_t) -1 /*def_value*/);
if (class_num == DUK_HOBJECT_CLASS_FUNCTION) {
duk_small_uint_t natidx;
- duk_small_int_t c_nargs; /* must hold DUK_VARARGS */
+ duk_small_int_t c_nargs; /* must hold DUK_VARARGS */
duk_c_function c_func;
duk_int16_t magic;
@@ -61462,12 +64812,9 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
duk__push_stridx_or_string(thr, bd);
#if defined(DUK_USE_FUNC_NAME_PROPERTY)
- duk_xdef_prop_stridx_short(thr,
- -2,
- DUK_STRIDX_NAME,
- DUK_PROPDESC_FLAGS_C);
+ duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_NAME, DUK_PROPDESC_FLAGS_C);
#else
- duk_pop(thr); /* Not very ideal but good enough for now. */
+ duk_pop(thr); /* Not very ideal but good enough for now. */
#endif
/* Almost all global level Function objects are constructable
@@ -61493,8 +64840,7 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
DUK_ASSERT(DUK_BIDX_GLOBAL_ENV > DUK_BIDX_GLOBAL);
env = duk_hobjenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
DUK_ASSERT(env->target == NULL);
duk_push_hobject(thr, (duk_hobject *) env);
@@ -61509,10 +64855,8 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
DUK_ASSERT(class_num != DUK_HOBJECT_CLASS_DECENV);
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_EXTENSIBLE,
- -1); /* no prototype or class yet */
-
+ DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_EXTENSIBLE,
+ -1); /* no prototype or class yet */
}
h = duk_known_hobject(thr, -1);
@@ -61534,18 +64878,15 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
* not encoded explicitly in init data.
*/
- DUK_ASSERT(class_num != DUK_HOBJECT_CLASS_ARRAY); /* .length is virtual */
+ DUK_ASSERT(class_num != DUK_HOBJECT_CLASS_ARRAY); /* .length is virtual */
duk_push_int(thr, len);
- duk_xdef_prop_stridx_short(thr,
- -2,
- DUK_STRIDX_LENGTH,
- DUK_PROPDESC_FLAGS_C);
+ duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_LENGTH, DUK_PROPDESC_FLAGS_C);
}
/* enable exotic behaviors last */
if (class_num == DUK_HOBJECT_CLASS_ARRAY) {
- DUK_ASSERT(DUK_HOBJECT_HAS_EXOTIC_ARRAY(h)); /* set by duk_push_array() */
+ DUK_ASSERT(DUK_HOBJECT_HAS_EXOTIC_ARRAY(h)); /* set by duk_push_array() */
}
if (class_num == DUK_HOBJECT_CLASS_STRING) {
DUK_HOBJECT_SET_EXOTIC_STRINGOBJ(h);
@@ -61562,7 +64903,7 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
DUK_ASSERT(!DUK_HOBJECT_IS_PROXY(h));
DUK_ASSERT(!DUK_HOBJECT_HAS_ARRAY_PART(h) || class_num == DUK_HOBJECT_CLASS_ARRAY);
/* DUK_HOBJECT_FLAG_STRICT varies */
- DUK_ASSERT(!DUK_HOBJECT_HAS_NATFUNC(h) || /* all native functions have NEWENV */
+ DUK_ASSERT(!DUK_HOBJECT_HAS_NATFUNC(h) || /* all native functions have NEWENV */
DUK_HOBJECT_HAS_NEWENV(h));
DUK_ASSERT(!DUK_HOBJECT_HAS_NAMEBINDING(h));
DUK_ASSERT(!DUK_HOBJECT_HAS_CREATEARGS(h));
@@ -61645,11 +64986,9 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
defprop_flags = (duk_small_uint_t) duk_bd_decode_flagged(bd,
DUK__PROP_FLAGS_BITS,
(duk_uint32_t) DUK_PROPDESC_FLAGS_WC);
- defprop_flags |= DUK_DEFPROP_FORCE |
- DUK_DEFPROP_HAVE_VALUE |
- DUK_DEFPROP_HAVE_WRITABLE |
+ defprop_flags |= DUK_DEFPROP_FORCE | DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_HAVE_WRITABLE |
DUK_DEFPROP_HAVE_ENUMERABLE |
- DUK_DEFPROP_HAVE_CONFIGURABLE; /* Defaults for data properties. */
+ DUK_DEFPROP_HAVE_CONFIGURABLE; /* Defaults for data properties. */
/* The writable, enumerable, configurable flags in prop_flags
* match both duk_def_prop() and internal property flags.
@@ -61661,7 +65000,11 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
t = (duk_small_uint_t) duk_bd_decode(bd, DUK__PROP_TYPE_BITS);
DUK_DDD(DUK_DDDPRINT("built-in %ld, normal-valued property %ld, key %!T, flags 0x%02lx, type %ld",
- (long) i, (long) j, duk_get_tval(thr, -1), (unsigned long) defprop_flags, (long) t));
+ (long) i,
+ (long) j,
+ duk_get_tval(thr, -1),
+ (unsigned long) defprop_flags,
+ (long) t));
switch (t) {
case DUK__PROP_TYPE_DOUBLE: {
@@ -61702,24 +65045,29 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
duk_c_function c_func_getter;
duk_c_function c_func_setter;
- DUK_DDD(DUK_DDDPRINT("built-in accessor property: objidx=%ld, key=%!T, getteridx=%ld, setteridx=%ld, flags=0x%04lx",
- (long) i, duk_get_tval(thr, -1), (long) natidx_getter, (long) natidx_setter, (unsigned long) defprop_flags));
+ DUK_DDD(DUK_DDDPRINT(
+ "built-in accessor property: objidx=%ld, key=%!T, getteridx=%ld, setteridx=%ld, flags=0x%04lx",
+ (long) i,
+ duk_get_tval(thr, -1),
+ (long) natidx_getter,
+ (long) natidx_setter,
+ (unsigned long) defprop_flags));
c_func_getter = duk_bi_native_functions[natidx_getter];
if (c_func_getter != NULL) {
- duk_push_c_function_builtin_noconstruct(thr, c_func_getter, 0); /* always 0 args */
+ duk_push_c_function_builtin_noconstruct(thr, c_func_getter, 0); /* always 0 args */
duk_set_magic(thr, -1, (duk_int_t) accessor_magic);
defprop_flags |= DUK_DEFPROP_HAVE_GETTER;
}
c_func_setter = duk_bi_native_functions[natidx_setter];
if (c_func_setter != NULL) {
- duk_push_c_function_builtin_noconstruct(thr, c_func_setter, 1); /* always 1 arg */
+ duk_push_c_function_builtin_noconstruct(thr, c_func_setter, 1); /* always 1 arg */
duk_set_magic(thr, -1, (duk_int_t) accessor_magic);
defprop_flags |= DUK_DEFPROP_HAVE_SETTER;
}
/* Writable flag doesn't make sense for an accessor. */
- DUK_ASSERT((defprop_flags & DUK_PROPDESC_FLAG_WRITABLE) == 0); /* genbuiltins.py ensures */
+ DUK_ASSERT((defprop_flags & DUK_PROPDESC_FLAG_WRITABLE) == 0); /* genbuiltins.py ensures */
defprop_flags &= ~(DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_HAVE_WRITABLE);
defprop_flags |= DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE;
@@ -61741,7 +65089,7 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
for (j = 0; j < num; j++) {
duk_hstring *h_key;
duk_small_uint_t natidx;
- duk_int_t c_nargs; /* must hold DUK_VARARGS */
+ duk_int_t c_nargs; /* must hold DUK_VARARGS */
duk_small_uint_t c_length;
duk_int16_t magic;
duk_c_function c_func;
@@ -61764,51 +65112,66 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
c_func = duk_bi_native_functions[natidx];
- DUK_DDD(DUK_DDDPRINT("built-in %ld, function-valued property %ld, key %!O, natidx %ld, length %ld, nargs %ld",
- (long) i, (long) j, (duk_heaphdr *) h_key, (long) natidx, (long) c_length,
- (c_nargs == DUK_VARARGS ? (long) -1 : (long) c_nargs)));
+ DUK_DDD(
+ DUK_DDDPRINT("built-in %ld, function-valued property %ld, key %!O, natidx %ld, length %ld, nargs %ld",
+ (long) i,
+ (long) j,
+ (duk_heaphdr *) h_key,
+ (long) natidx,
+ (long) c_length,
+ (c_nargs == DUK_VARARGS ? (long) -1 : (long) c_nargs)));
/* Cast converts magic to 16-bit signed value */
magic = (duk_int16_t) duk_bd_decode_varuint(bd);
#if defined(DUK_USE_LIGHTFUNC_BUILTINS)
lightfunc_eligible =
- ((c_nargs >= DUK_LFUNC_NARGS_MIN && c_nargs <= DUK_LFUNC_NARGS_MAX) || (c_nargs == DUK_VARARGS)) &&
- (c_length <= DUK_LFUNC_LENGTH_MAX) &&
- (magic >= DUK_LFUNC_MAGIC_MIN && magic <= DUK_LFUNC_MAGIC_MAX);
+ ((c_nargs >= DUK_LFUNC_NARGS_MIN && c_nargs <= DUK_LFUNC_NARGS_MAX) || (c_nargs == DUK_VARARGS)) &&
+ (c_length <= DUK_LFUNC_LENGTH_MAX) && (magic >= DUK_LFUNC_MAGIC_MIN && magic <= DUK_LFUNC_MAGIC_MAX);
/* These functions have trouble working as lightfuncs.
* Some of them have specific asserts and some may have
- * additional properties (e.g. 'require.id' may be written).
+ * additional properties (e.g. 'require.id' may be written).
*/
if (c_func == duk_bi_global_object_eval) {
lightfunc_eligible = 0;
}
#if defined(DUK_USE_COROUTINE_SUPPORT)
- if (c_func == duk_bi_thread_yield ||
- c_func == duk_bi_thread_resume) {
+ if (c_func == duk_bi_thread_yield || c_func == duk_bi_thread_resume) {
lightfunc_eligible = 0;
}
#endif
- if (c_func == duk_bi_function_prototype_call ||
- c_func == duk_bi_function_prototype_apply ||
- c_func == duk_bi_reflect_apply ||
- c_func == duk_bi_reflect_construct) {
+ if (c_func == duk_bi_function_prototype_call || c_func == duk_bi_function_prototype_apply ||
+ c_func == duk_bi_reflect_apply || c_func == duk_bi_reflect_construct) {
lightfunc_eligible = 0;
}
if (lightfunc_eligible) {
duk_tval tv_lfunc;
- duk_small_uint_t lf_nargs = (duk_small_uint_t) (c_nargs == DUK_VARARGS ? DUK_LFUNC_NARGS_VARARGS : c_nargs);
+ duk_small_uint_t lf_nargs =
+ (duk_small_uint_t) (c_nargs == DUK_VARARGS ? DUK_LFUNC_NARGS_VARARGS : c_nargs);
duk_small_uint_t lf_flags = DUK_LFUNC_FLAGS_PACK(magic, c_length, lf_nargs);
DUK_TVAL_SET_LIGHTFUNC(&tv_lfunc, c_func, lf_flags);
duk_push_tval(thr, &tv_lfunc);
- DUK_D(DUK_DPRINT("built-in function eligible as light function: i=%d, j=%d c_length=%ld, c_nargs=%ld, magic=%ld -> %!iT", (int) i, (int) j, (long) c_length, (long) c_nargs, (long) magic, duk_get_tval(thr, -1)));
+ DUK_D(DUK_DPRINT("built-in function eligible as light function: i=%d, j=%d c_length=%ld, "
+ "c_nargs=%ld, magic=%ld -> %!iT",
+ (int) i,
+ (int) j,
+ (long) c_length,
+ (long) c_nargs,
+ (long) magic,
+ duk_get_tval(thr, -1)));
goto lightfunc_skip;
}
- DUK_D(DUK_DPRINT("built-in function NOT ELIGIBLE as light function: i=%d, j=%d c_length=%ld, c_nargs=%ld, magic=%ld", (int) i, (int) j, (long) c_length, (long) c_nargs, (long) magic));
-#endif /* DUK_USE_LIGHTFUNC_BUILTINS */
+ DUK_D(DUK_DPRINT(
+ "built-in function NOT ELIGIBLE as light function: i=%d, j=%d c_length=%ld, c_nargs=%ld, magic=%ld",
+ (int) i,
+ (int) j,
+ (long) c_length,
+ (long) c_nargs,
+ (long) magic));
+#endif /* DUK_USE_LIGHTFUNC_BUILTINS */
/* [ (builtin objects) name ] */
@@ -61819,10 +65182,8 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
/* XXX: add into init data? */
/* Special call handling, not described in init data. */
- if (c_func == duk_bi_global_object_eval ||
- c_func == duk_bi_function_prototype_call ||
- c_func == duk_bi_function_prototype_apply ||
- c_func == duk_bi_reflect_apply ||
+ if (c_func == duk_bi_global_object_eval || c_func == duk_bi_function_prototype_call ||
+ c_func == duk_bi_function_prototype_apply || c_func == duk_bi_reflect_apply ||
c_func == duk_bi_reflect_construct) {
DUK_HOBJECT_SET_SPECIAL_CALL((duk_hobject *) h_func);
}
@@ -61856,7 +65217,9 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
/* XXX: other properties of function instances; 'arguments', 'caller'. */
DUK_DD(DUK_DDPRINT("built-in object %ld, function property %ld -> %!T",
- (long) i, (long) j, (duk_tval *) duk_get_tval(thr, -1)));
+ (long) i,
+ (long) j,
+ (duk_tval *) duk_get_tval(thr, -1)));
/* [ (builtin objects) name func ] */
@@ -61866,17 +65229,14 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
*/
#if defined(DUK_USE_LIGHTFUNC_BUILTINS)
- lightfunc_skip:
+ lightfunc_skip:
#endif
defprop_flags = (duk_small_uint_t) duk_bd_decode_flagged(bd,
DUK__PROP_FLAGS_BITS,
(duk_uint32_t) DUK_PROPDESC_FLAGS_WC);
- defprop_flags |= DUK_DEFPROP_FORCE |
- DUK_DEFPROP_HAVE_VALUE |
- DUK_DEFPROP_HAVE_WRITABLE |
- DUK_DEFPROP_HAVE_ENUMERABLE |
- DUK_DEFPROP_HAVE_CONFIGURABLE;
+ defprop_flags |= DUK_DEFPROP_FORCE | DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_HAVE_WRITABLE |
+ DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE;
DUK_ASSERT(DUK_PROPDESC_FLAG_WRITABLE == DUK_DEFPROP_WRITABLE);
DUK_ASSERT(DUK_PROPDESC_FLAG_ENUMERABLE == DUK_DEFPROP_ENUMERABLE);
DUK_ASSERT(DUK_PROPDESC_FLAG_CONFIGURABLE == DUK_DEFPROP_CONFIGURABLE);
@@ -61914,22 +65274,28 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
#if !defined(DUK_USE_ES6_OBJECT_PROTO_PROPERTY)
DUK_DD(DUK_DDPRINT("delete Object.prototype.__proto__ built-in which is not enabled in features"));
- (void) duk_hobject_delprop_raw(thr, thr->builtins[DUK_BIDX_OBJECT_PROTOTYPE], DUK_HTHREAD_STRING___PROTO__(thr), DUK_DELPROP_FLAG_THROW);
+ (void) duk_hobject_delprop_raw(thr,
+ thr->builtins[DUK_BIDX_OBJECT_PROTOTYPE],
+ DUK_HTHREAD_STRING___PROTO__(thr),
+ DUK_DELPROP_FLAG_THROW);
#endif
#if !defined(DUK_USE_ES6_OBJECT_SETPROTOTYPEOF)
DUK_DD(DUK_DDPRINT("delete Object.setPrototypeOf built-in which is not enabled in features"));
- (void) duk_hobject_delprop_raw(thr, thr->builtins[DUK_BIDX_OBJECT_CONSTRUCTOR], DUK_HTHREAD_STRING_SET_PROTOTYPE_OF(thr), DUK_DELPROP_FLAG_THROW);
+ (void) duk_hobject_delprop_raw(thr,
+ thr->builtins[DUK_BIDX_OBJECT_CONSTRUCTOR],
+ DUK_HTHREAD_STRING_SET_PROTOTYPE_OF(thr),
+ DUK_DELPROP_FLAG_THROW);
#endif
/* XXX: relocate */
duk_push_string(thr,
- /* Endianness indicator */
+ /* Endianness indicator */
#if defined(DUK_USE_INTEGER_LE)
"l"
#elif defined(DUK_USE_INTEGER_BE)
"b"
-#elif defined(DUK_USE_INTEGER_ME) /* integer mixed endian not really used now */
+#elif defined(DUK_USE_INTEGER_ME) /* integer mixed endian not really used now */
"m"
#else
"?"
@@ -61944,89 +65310,85 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
"?"
#endif
" "
- /* Packed or unpacked tval */
+ /* Packed or unpacked tval */
#if defined(DUK_USE_PACKED_TVAL)
"p"
#else
"u"
#endif
#if defined(DUK_USE_FASTINT)
- "f"
+ "f"
#endif
- " "
- /* Low memory/performance options */
+ " "
+ /* Low memory/performance options */
#if defined(DUK_USE_STRTAB_PTRCOMP)
- "s"
+ "s"
#endif
#if !defined(DUK_USE_HEAPPTR16) && !defined(DUK_DATAPTR16) && !defined(DUK_FUNCPTR16)
- "n"
+ "n"
#endif
#if defined(DUK_USE_HEAPPTR16)
- "h"
+ "h"
#endif
#if defined(DUK_USE_DATAPTR16)
- "d"
+ "d"
#endif
#if defined(DUK_USE_FUNCPTR16)
- "f"
+ "f"
#endif
#if defined(DUK_USE_REFCOUNT16)
- "R"
+ "R"
#endif
#if defined(DUK_USE_STRHASH16)
- "H"
+ "H"
#endif
#if defined(DUK_USE_STRLEN16)
- "S"
+ "S"
#endif
#if defined(DUK_USE_BUFLEN16)
- "B"
+ "B"
#endif
#if defined(DUK_USE_OBJSIZES16)
- "O"
+ "O"
#endif
#if defined(DUK_USE_LIGHTFUNC_BUILTINS)
- "L"
+ "L"
#endif
#if defined(DUK_USE_ROM_STRINGS) || defined(DUK_USE_ROM_OBJECTS)
- /* XXX: This won't be shown in practice now
- * because this code is not run when builtins
- * are in ROM.
- */
- "Z"
+ /* XXX: This won't be shown in practice now
+ * because this code is not run when builtins
+ * are in ROM.
+ */
+ "Z"
#endif
#if defined(DUK_USE_LITCACHE_SIZE)
- "l"
+ "l"
#endif
" "
- /* Object property allocation layout */
+ /* Object property allocation layout */
#if defined(DUK_USE_HOBJECT_LAYOUT_1)
- "p1"
+ "p1"
#elif defined(DUK_USE_HOBJECT_LAYOUT_2)
- "p2"
+ "p2"
#elif defined(DUK_USE_HOBJECT_LAYOUT_3)
- "p3"
+ "p3"
#else
- "p?"
+ "p?"
#endif
- " "
- /* Alignment guarantee */
+ " "
+ /* Alignment guarantee */
#if (DUK_USE_ALIGN_BY == 4)
- "a4"
+ "a4"
#elif (DUK_USE_ALIGN_BY == 8)
- "a8"
+ "a8"
#elif (DUK_USE_ALIGN_BY == 1)
- "a1"
+ "a1"
#else
#error invalid DUK_USE_ALIGN_BY
#endif
- " "
- /* Architecture, OS, and compiler strings */
- DUK_USE_ARCH_STRING
- " "
- DUK_USE_OS_STRING
- " "
- DUK_USE_COMPILER_STRING);
+ " "
+ /* Architecture, OS, and compiler strings */
+ DUK_USE_ARCH_STRING " " DUK_USE_OS_STRING " " DUK_USE_COMPILER_STRING);
duk_xdef_prop_stridx_short(thr, DUK_BIDX_DUKTAPE, DUK_STRIDX_ENV, DUK_PROPDESC_FLAGS_WC);
/*
@@ -62043,7 +65405,8 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 1)
for (i = 0; i < DUK_NUM_ALL_BUILTINS; i++) {
DUK_DD(DUK_DDPRINT("built-in object %ld after initialization and compacting: %!@iO",
- (long) i, (duk_heaphdr *) duk_require_hobject(thr, (duk_idx_t) i)));
+ (long) i,
+ (duk_heaphdr *) duk_require_hobject(thr, (duk_idx_t) i)));
}
#endif
@@ -62056,14 +65419,14 @@ DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) {
duk_set_top(thr, 0);
DUK_ASSERT_TOP(thr, 0);
}
-#endif /* DUK_USE_ROM_OBJECTS */
+#endif /* DUK_USE_ROM_OBJECTS */
DUK_INTERNAL void duk_hthread_copy_builtin_objects(duk_hthread *thr_from, duk_hthread *thr_to) {
duk_small_uint_t i;
for (i = 0; i < DUK_NUM_BUILTINS; i++) {
thr_to->builtins[i] = thr_from->builtins[i];
- DUK_HOBJECT_INCREF_ALLOWNULL(thr_to, thr_to->builtins[i]); /* side effect free */
+ DUK_HOBJECT_INCREF_ALLOWNULL(thr_to, thr_to->builtins[i]); /* side effect free */
}
}
@@ -62095,7 +65458,7 @@ DUK_INTERNAL void duk_hthread_terminate(duk_hthread *thr) {
}
thr->valstack_bottom = thr->valstack;
- duk_set_top(thr, 0); /* unwinds valstack, updating refcounts */
+ duk_set_top(thr, 0); /* unwinds valstack, updating refcounts */
thr->state = DUK_HTHREAD_STATE_TERMINATED;
@@ -62126,7 +65489,7 @@ DUK_INTERNAL duk_uint_fast32_t duk_hthread_get_act_curr_pc(duk_hthread *thr, duk
}
return 0;
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
DUK_INTERNAL duk_uint_fast32_t duk_hthread_get_act_prev_pc(duk_hthread *thr, duk_activation *act) {
duk_instr_t *bcode;
@@ -62195,7 +65558,7 @@ DUK_INTERNAL void duk_hthread_catcher_unwind_norz(duk_hthread *thr, duk_activati
DUK_ASSERT(thr != NULL);
DUK_ASSERT(act != NULL);
- DUK_ASSERT(act->cat != NULL); /* caller must check */
+ DUK_ASSERT(act->cat != NULL); /* caller must check */
cat = act->cat;
DUK_ASSERT(cat != NULL);
@@ -62204,9 +65567,9 @@ DUK_INTERNAL void duk_hthread_catcher_unwind_norz(duk_hthread *thr, duk_activati
if (DUK_CAT_HAS_LEXENV_ACTIVE(cat)) {
duk_hobject *env;
- env = act->lex_env; /* current lex_env of the activation (created for catcher) */
- DUK_ASSERT(env != NULL); /* must be, since env was created when catcher was created */
- act->lex_env = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, env); /* prototype is lex_env before catcher created */
+ env = act->lex_env; /* current lex_env of the activation (created for catcher) */
+ DUK_ASSERT(env != NULL); /* must be, since env was created when catcher was created */
+ act->lex_env = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, env); /* prototype is lex_env before catcher created */
DUK_HOBJECT_INCREF(thr, act->lex_env);
DUK_HOBJECT_DECREF_NORZ(thr, env);
@@ -62225,7 +65588,7 @@ DUK_INTERNAL void duk_hthread_catcher_unwind_nolexenv_norz(duk_hthread *thr, duk
DUK_ASSERT(thr != NULL);
DUK_ASSERT(act != NULL);
- DUK_ASSERT(act->cat != NULL); /* caller must check */
+ DUK_ASSERT(act->cat != NULL); /* caller must check */
cat = act->cat;
DUK_ASSERT(cat != NULL);
@@ -62263,11 +65626,11 @@ DUK_INTERNAL DUK_INLINE duk_catcher *duk_hthread_catcher_alloc(duk_hthread *thr)
return duk__hthread_catcher_alloc_slow(thr);
}
-#else /* DUK_USE_CACHE_CATCHER */
+#else /* DUK_USE_CACHE_CATCHER */
DUK_INTERNAL duk_catcher *duk_hthread_catcher_alloc(duk_hthread *thr) {
return duk__hthread_catcher_alloc_slow(thr);
}
-#endif /* DUK_USE_CACHE_CATCHER */
+#endif /* DUK_USE_CACHE_CATCHER */
DUK_INTERNAL void duk_hthread_catcher_free(duk_hthread *thr, duk_catcher *cat) {
DUK_ASSERT(thr != NULL);
@@ -62308,12 +65671,11 @@ DUK_INTERNAL DUK_INLINE duk_activation *duk_hthread_activation_alloc(duk_hthread
return duk__hthread_activation_alloc_slow(thr);
}
-#else /* DUK_USE_CACHE_ACTIVATION */
+#else /* DUK_USE_CACHE_ACTIVATION */
DUK_INTERNAL duk_activation *duk_hthread_activation_alloc(duk_hthread *thr) {
return duk__hthread_activation_alloc_slow(thr);
}
-#endif /* DUK_USE_CACHE_ACTIVATION */
-
+#endif /* DUK_USE_CACHE_ACTIVATION */
DUK_INTERNAL void duk_hthread_activation_free(duk_hthread *thr, duk_activation *act) {
DUK_ASSERT(thr != NULL);
@@ -62340,7 +65702,7 @@ DUK_LOCAL void duk__activation_unwind_nofree_norz(duk_hthread *thr) {
duk_hobject *tmp;
DUK_ASSERT(thr != NULL);
- DUK_ASSERT(thr->callstack_curr != NULL); /* caller must check */
+ DUK_ASSERT(thr->callstack_curr != NULL); /* caller must check */
DUK_ASSERT(thr->callstack_top > 0);
act = thr->callstack_curr;
DUK_ASSERT(act != NULL);
@@ -62377,7 +65739,7 @@ DUK_LOCAL void duk__activation_unwind_nofree_norz(duk_hthread *thr) {
DUK_TVAL_SET_OBJECT(tv_caller, act->prev_caller);
act->prev_caller = NULL;
} else {
- DUK_TVAL_SET_NULL(tv_caller); /* no incref needed */
+ DUK_TVAL_SET_NULL(tv_caller); /* no incref needed */
DUK_ASSERT(act->prev_caller == NULL);
}
DUK_TVAL_DECREF_NORZ(thr, &tv_tmp);
@@ -62406,7 +65768,7 @@ DUK_LOCAL void duk__activation_unwind_nofree_norz(duk_hthread *thr) {
duk_debug_set_paused(heap);
} else {
DUK_D(DUK_DPRINT("unwound past dbg_pause_act, set to NULL"));
- heap->dbg_pause_act = NULL; /* avoid stale pointers */
+ heap->dbg_pause_act = NULL; /* avoid stale pointers */
}
DUK_ASSERT(heap->dbg_pause_act == NULL);
}
@@ -62455,12 +65817,11 @@ DUK_LOCAL void duk__activation_unwind_nofree_norz(duk_hthread *thr) {
* fixed e.g. by preallocating the scope property slots.
*/
if (act->var_env != NULL) {
- DUK_DDD(DUK_DDDPRINT("closing var_env record %p -> %!O",
- (void *) act->var_env, (duk_heaphdr *) act->var_env));
+ DUK_DDD(DUK_DDDPRINT("closing var_env record %p -> %!O", (void *) act->var_env, (duk_heaphdr *) act->var_env));
duk_js_close_environment_record(thr, act->var_env);
}
- skip_env_close:
+skip_env_close:
/*
* Update preventcount
@@ -62584,7 +65945,7 @@ DUK_INTERNAL void duk_hthread_valstack_torture_realloc(duk_hthread *thr) {
DUK_D(DUK_DPRINT("failed to realloc valstack for torture, ignore"));
}
}
-#endif /* DUK_USE_FINALIZER_TORTURE */
+#endif /* DUK_USE_FINALIZER_TORTURE */
/*
* Shared helpers for arithmetic operations
*/
@@ -62606,11 +65967,11 @@ DUK_INTERNAL double duk_js_arith_mod(double d1, double d2) {
} else {
return d1;
}
- } else if (d1 == 0.0) {
+ } else if (duk_double_equals(d1, 0.0)) {
/* d1 +/-0 is returned as is (preserving sign) except when
* d2 is zero or NaN.
*/
- if (d2 == 0.0 || DUK_ISNAN(d2)) {
+ if (duk_double_equals(d2, 0.0) || DUK_ISNAN(d2)) {
return DUK_DOUBLE_NAN;
} else {
return d1;
@@ -62618,20 +65979,24 @@ DUK_INTERNAL double duk_js_arith_mod(double d1, double d2) {
}
#else
/* Some ISO C assumptions. */
- DUK_ASSERT(DUK_FMOD(1.0, DUK_DOUBLE_INFINITY) == 1.0);
- DUK_ASSERT(DUK_FMOD(-1.0, DUK_DOUBLE_INFINITY) == -1.0);
- DUK_ASSERT(DUK_FMOD(1.0, -DUK_DOUBLE_INFINITY) == 1.0);
- DUK_ASSERT(DUK_FMOD(-1.0, -DUK_DOUBLE_INFINITY) == -1.0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(1.0, DUK_DOUBLE_INFINITY), 1.0));
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(-1.0, DUK_DOUBLE_INFINITY), -1.0));
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(1.0, -DUK_DOUBLE_INFINITY), 1.0));
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(-1.0, -DUK_DOUBLE_INFINITY), -1.0));
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(DUK_DOUBLE_INFINITY, DUK_DOUBLE_INFINITY)));
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(DUK_DOUBLE_INFINITY, -DUK_DOUBLE_INFINITY)));
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(-DUK_DOUBLE_INFINITY, DUK_DOUBLE_INFINITY)));
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(-DUK_DOUBLE_INFINITY, -DUK_DOUBLE_INFINITY)));
- DUK_ASSERT(DUK_FMOD(0.0, 1.0) == 0.0 && DUK_SIGNBIT(DUK_FMOD(0.0, 1.0)) == 0);
- DUK_ASSERT(DUK_FMOD(-0.0, 1.0) == 0.0 && DUK_SIGNBIT(DUK_FMOD(-0.0, 1.0)) != 0);
- DUK_ASSERT(DUK_FMOD(0.0, DUK_DOUBLE_INFINITY) == 0.0 && DUK_SIGNBIT(DUK_FMOD(0.0, DUK_DOUBLE_INFINITY)) == 0);
- DUK_ASSERT(DUK_FMOD(-0.0, DUK_DOUBLE_INFINITY) == 0.0 && DUK_SIGNBIT(DUK_FMOD(-0.0, DUK_DOUBLE_INFINITY)) != 0);
- DUK_ASSERT(DUK_FMOD(0.0, -DUK_DOUBLE_INFINITY) == 0.0 && DUK_SIGNBIT(DUK_FMOD(0.0, DUK_DOUBLE_INFINITY)) == 0);
- DUK_ASSERT(DUK_FMOD(-0.0, -DUK_DOUBLE_INFINITY) == 0.0 && DUK_SIGNBIT(DUK_FMOD(-0.0, -DUK_DOUBLE_INFINITY)) != 0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(0.0, 1.0), 0.0) && DUK_SIGNBIT(DUK_FMOD(0.0, 1.0)) == 0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(-0.0, 1.0), 0.0) && DUK_SIGNBIT(DUK_FMOD(-0.0, 1.0)) != 0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(0.0, DUK_DOUBLE_INFINITY), 0.0) &&
+ DUK_SIGNBIT(DUK_FMOD(0.0, DUK_DOUBLE_INFINITY)) == 0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(-0.0, DUK_DOUBLE_INFINITY), 0.0) &&
+ DUK_SIGNBIT(DUK_FMOD(-0.0, DUK_DOUBLE_INFINITY)) != 0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(0.0, -DUK_DOUBLE_INFINITY), 0.0) &&
+ DUK_SIGNBIT(DUK_FMOD(0.0, DUK_DOUBLE_INFINITY)) == 0);
+ DUK_ASSERT(duk_double_equals(DUK_FMOD(-0.0, -DUK_DOUBLE_INFINITY), 0.0) &&
+ DUK_SIGNBIT(DUK_FMOD(-0.0, -DUK_DOUBLE_INFINITY)) != 0);
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(0.0, 0.0)));
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(-0.0, 0.0)));
DUK_ASSERT(DUK_ISNAN(DUK_FMOD(0.0, -0.0)));
@@ -62660,7 +66025,7 @@ DUK_INTERNAL double duk_js_arith_pow(double x, double y) {
if (cy == DUK_FP_NAN) {
goto ret_nan;
}
- if (DUK_FABS(x) == 1.0 && cy == DUK_FP_INFINITE) {
+ if (duk_double_equals(DUK_FABS(x), 1.0) && cy == DUK_FP_INFINITE) {
goto ret_nan;
}
@@ -62702,7 +66067,7 @@ DUK_INTERNAL double duk_js_arith_pow(double x, double y) {
}
}
} else if (cx == DUK_FP_NAN) {
- if (y == 0.0) {
+ if (duk_double_equals(y, 0.0)) {
/* NaN ** +/- 0 should always be 1, but is NaN on
* at least some Cygwin/MinGW versions.
*/
@@ -62711,7 +66076,7 @@ DUK_INTERNAL double duk_js_arith_pow(double x, double y) {
}
#else
/* Some ISO C assumptions. */
- DUK_ASSERT(DUK_POW(DUK_DOUBLE_NAN, 0.0) == 1.0);
+ DUK_ASSERT(duk_double_equals(DUK_POW(DUK_DOUBLE_NAN, 0.0), 1.0));
DUK_ASSERT(DUK_ISINF(DUK_POW(0.0, -1.0)) && DUK_SIGNBIT(DUK_POW(0.0, -1.0)) == 0);
DUK_ASSERT(DUK_ISINF(DUK_POW(-0.0, -2.0)) && DUK_SIGNBIT(DUK_POW(-0.0, -2.0)) == 0);
DUK_ASSERT(DUK_ISINF(DUK_POW(-0.0, -3.0)) && DUK_SIGNBIT(DUK_POW(-0.0, -3.0)) != 0);
@@ -62719,7 +66084,7 @@ DUK_INTERNAL double duk_js_arith_pow(double x, double y) {
return DUK_POW(x, y);
- ret_nan:
+ret_nan:
return DUK_DOUBLE_NAN;
}
/*
@@ -62775,10 +66140,10 @@ DUK_INTERNAL void duk_native_stack_check(duk_hthread *thr) {
* for, e.g. a print() call at the deepest level, and an extra
* +1 for protected call wrapping.
*/
-#define DUK__AUGMENT_CALL_RELAX_COUNT (10 + 2)
+#define DUK__AUGMENT_CALL_RELAX_COUNT (10 + 2)
/* Stack space required by call handling entry. */
-#define DUK__CALL_HANDLING_REQUIRE_STACK 8
+#define DUK__CALL_HANDLING_REQUIRE_STACK 8
DUK_LOCAL DUK_NOINLINE void duk__call_c_recursion_limit_check_slowpath(duk_hthread *thr) {
/* When augmenting an error, the effective limit is a bit higher.
@@ -62872,7 +66237,8 @@ DUK_LOCAL void duk__interrupt_fixup(duk_hthread *thr, duk_hthread *entry_curr_th
thr->heap->inst_count_interrupt += thr->interrupt_init;
DUK_DD(DUK_DDPRINT("debug test: updated interrupt count on exit to "
"user code, instruction counts: executor=%ld, interrupt=%ld",
- (long) thr->heap->inst_count_exec, (long) thr->heap->inst_count_interrupt));
+ (long) thr->heap->inst_count_exec,
+ (long) thr->heap->inst_count_interrupt));
DUK_ASSERT(thr->heap->inst_count_exec == thr->heap->inst_count_interrupt);
}
#else
@@ -62891,12 +66257,9 @@ DUK_LOCAL void duk__interrupt_fixup(duk_hthread *thr, duk_hthread *entry_curr_th
* object flag DUK_HOBJECT_FLAG_EXOTIC_ARGUMENTS.
*/
-DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
- duk_hobject *func,
- duk_hobject *varenv,
- duk_idx_t idx_args) {
- duk_hobject *arg; /* 'arguments' */
- duk_hobject *formals; /* formals for 'func' (may be NULL if func is a C function) */
+DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr, duk_hobject *func, duk_hobject *varenv, duk_idx_t idx_args) {
+ duk_hobject *arg; /* 'arguments' */
+ duk_hobject *formals; /* formals for 'func' (may be NULL if func is a C function) */
duk_idx_t i_arg;
duk_idx_t i_map;
duk_idx_t i_mappednames;
@@ -62942,9 +66305,8 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
DUK_ASSERT(n_formals >= 0);
DUK_ASSERT(formals != NULL || n_formals == 0);
- DUK_DDD(DUK_DDDPRINT("func=%!O, formals=%!O, n_formals=%ld",
- (duk_heaphdr *) func, (duk_heaphdr *) formals,
- (long) n_formals));
+ DUK_DDD(
+ DUK_DDDPRINT("func=%!O, formals=%!O, n_formals=%ld", (duk_heaphdr *) func, (duk_heaphdr *) formals, (long) n_formals));
/* [ ... formals ] */
@@ -62956,28 +66318,24 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
*/
arg = duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_FLAG_ARRAY_PART |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARGUMENTS),
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS | DUK_HOBJECT_FLAG_ARRAY_PART |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ARGUMENTS),
DUK_BIDX_OBJECT_PROTOTYPE);
DUK_ASSERT(arg != NULL);
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
- -1); /* no prototype */
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
+ -1); /* no prototype */
(void) duk_push_object_helper(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_FLAG_FASTREFS |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
- -1); /* no prototype */
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_FLAG_FASTREFS |
+ DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJECT),
+ -1); /* no prototype */
i_arg = duk_get_top(thr) - 3;
i_map = i_arg + 1;
i_mappednames = i_arg + 2;
- DUK_ASSERT(!duk_is_bare_object(thr, -3)); /* arguments */
- DUK_ASSERT(duk_is_bare_object(thr, -2)); /* map */
- DUK_ASSERT(duk_is_bare_object(thr, -1)); /* mappedNames */
+ DUK_ASSERT(!duk_is_bare_object(thr, -3)); /* arguments */
+ DUK_ASSERT(duk_is_bare_object(thr, -2)); /* map */
+ DUK_ASSERT(duk_is_bare_object(thr, -1)); /* mappedNames */
/* [ ... formals arguments map mappedNames ] */
@@ -62985,9 +66343,12 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
"arguments at index %ld -> %!O "
"map at index %ld -> %!O "
"mappednames at index %ld -> %!O",
- (long) i_arg, (duk_heaphdr *) duk_get_hobject(thr, i_arg),
- (long) i_map, (duk_heaphdr *) duk_get_hobject(thr, i_map),
- (long) i_mappednames, (duk_heaphdr *) duk_get_hobject(thr, i_mappednames)));
+ (long) i_arg,
+ (duk_heaphdr *) duk_get_hobject(thr, i_arg),
+ (long) i_map,
+ (duk_heaphdr *) duk_get_hobject(thr, i_map),
+ (long) i_mappednames,
+ (duk_heaphdr *) duk_get_hobject(thr, i_mappednames)));
/*
* Init arguments properties, map, etc.
@@ -63003,8 +66364,8 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
/* step 11 */
idx = num_stack_args - 1;
while (idx >= 0) {
- DUK_DDD(DUK_DDDPRINT("arg idx %ld, argbase=%ld, argidx=%ld",
- (long) idx, (long) i_argbase, (long) (i_argbase + idx)));
+ DUK_DDD(
+ DUK_DDDPRINT("arg idx %ld, argbase=%ld, argidx=%ld", (long) idx, (long) i_argbase, (long) (i_argbase + idx)));
DUK_DDD(DUK_DDDPRINT("define arguments[%ld]=arg", (long) idx));
duk_dup(thr, i_argbase + idx);
@@ -63015,13 +66376,12 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
if (!DUK_HOBJECT_HAS_STRICT(func) && idx < n_formals) {
DUK_ASSERT(formals != NULL);
- DUK_DDD(DUK_DDDPRINT("strict function, index within formals (%ld < %ld)",
- (long) idx, (long) n_formals));
+ DUK_DDD(DUK_DDDPRINT("strict function, index within formals (%ld < %ld)", (long) idx, (long) n_formals));
duk_get_prop_index(thr, i_formals, (duk_uarridx_t) idx);
DUK_ASSERT(duk_is_string(thr, -1));
- duk_dup_top(thr); /* [ ... name name ] */
+ duk_dup_top(thr); /* [ ... name name ] */
if (!duk_has_prop(thr, i_mappednames)) {
/* steps 11.c.ii.1 - 11.c.ii.4, but our internal book-keeping
@@ -63032,24 +66392,21 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
need_map = 1;
- DUK_DDD(DUK_DDDPRINT("set mappednames[%s]=%ld",
- (const char *) duk_get_string(thr, -1),
- (long) idx));
- duk_dup_top(thr); /* name */
- (void) duk_push_uint_to_hstring(thr, (duk_uint_t) idx); /* index */
- duk_xdef_prop_wec(thr, i_mappednames); /* out of spec, must be configurable */
+ DUK_DDD(
+ DUK_DDDPRINT("set mappednames[%s]=%ld", (const char *) duk_get_string(thr, -1), (long) idx));
+ duk_dup_top(thr); /* name */
+ (void) duk_push_uint_to_hstring(thr, (duk_uint_t) idx); /* index */
+ duk_xdef_prop_wec(thr, i_mappednames); /* out of spec, must be configurable */
- DUK_DDD(DUK_DDDPRINT("set map[%ld]=%s",
- (long) idx,
- duk_get_string(thr, -1)));
- duk_dup_top(thr); /* name */
- duk_xdef_prop_index_wec(thr, i_map, (duk_uarridx_t) idx); /* out of spec, must be configurable */
+ DUK_DDD(DUK_DDDPRINT("set map[%ld]=%s", (long) idx, duk_get_string(thr, -1)));
+ duk_dup_top(thr); /* name */
+ duk_xdef_prop_index_wec(thr, i_map, (duk_uarridx_t) idx); /* out of spec, must be configurable */
} else {
/* duk_has_prop() popped the second 'name' */
}
/* [ ... name ] */
- duk_pop(thr); /* pop 'name' */
+ duk_pop(thr); /* pop 'name' */
}
idx--;
@@ -63065,7 +66422,7 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
DUK_ASSERT(!DUK_HOBJECT_HAS_STRICT(func));
duk_dup(thr, i_map);
- duk_xdef_prop_stridx(thr, i_arg, DUK_STRIDX_INT_MAP, DUK_PROPDESC_FLAGS_NONE); /* out of spec, don't care */
+ duk_xdef_prop_stridx(thr, i_arg, DUK_STRIDX_INT_MAP, DUK_PROPDESC_FLAGS_NONE); /* out of spec, don't care */
/* The variable environment for magic variable bindings needs to be
* given by the caller and recorded in the arguments object.
@@ -63077,7 +66434,7 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
*/
duk_push_hobject(thr, varenv);
- duk_xdef_prop_stridx(thr, i_arg, DUK_STRIDX_INT_VARENV, DUK_PROPDESC_FLAGS_NONE); /* out of spec, don't care */
+ duk_xdef_prop_stridx(thr, i_arg, DUK_STRIDX_INT_VARENV, DUK_PROPDESC_FLAGS_NONE); /* out of spec, don't care */
}
/* steps 13-14 */
@@ -63130,9 +66487,12 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
"arguments at index %ld -> %!O "
"map at index %ld -> %!O "
"mappednames at index %ld -> %!O",
- (long) i_arg, (duk_heaphdr *) duk_get_hobject(thr, i_arg),
- (long) i_map, (duk_heaphdr *) duk_get_hobject(thr, i_map),
- (long) i_mappednames, (duk_heaphdr *) duk_get_hobject(thr, i_mappednames)));
+ (long) i_arg,
+ (duk_heaphdr *) duk_get_hobject(thr, i_arg),
+ (long) i_map,
+ (duk_heaphdr *) duk_get_hobject(thr, i_map),
+ (long) i_mappednames,
+ (duk_heaphdr *) duk_get_hobject(thr, i_mappednames)));
/* [ args(n) envobj formals arguments map mappednames ] */
@@ -63145,10 +66505,7 @@ DUK_LOCAL void duk__create_arguments_object(duk_hthread *thr,
/* Helper for creating the arguments object and adding it to the env record
* on top of the value stack.
*/
-DUK_LOCAL void duk__handle_createargs_for_call(duk_hthread *thr,
- duk_hobject *func,
- duk_hobject *env,
- duk_idx_t idx_args) {
+DUK_LOCAL void duk__handle_createargs_for_call(duk_hthread *thr, duk_hobject *func, duk_hobject *env, duk_idx_t idx_args) {
DUK_DDD(DUK_DDDPRINT("creating arguments object for function call"));
DUK_ASSERT(thr != NULL);
@@ -63158,18 +66515,15 @@ DUK_LOCAL void duk__handle_createargs_for_call(duk_hthread *thr,
/* [ ... arg1 ... argN envobj ] */
- duk__create_arguments_object(thr,
- func,
- env,
- idx_args);
+ duk__create_arguments_object(thr, func, env, idx_args);
/* [ ... arg1 ... argN envobj argobj ] */
duk_xdef_prop_stridx_short(thr,
-2,
DUK_STRIDX_LC_ARGUMENTS,
- DUK_HOBJECT_HAS_STRICT(func) ? DUK_PROPDESC_FLAGS_E : /* strict: non-deletable, non-writable */
- DUK_PROPDESC_FLAGS_WE); /* non-strict: non-deletable, writable */
+ DUK_HOBJECT_HAS_STRICT(func) ? DUK_PROPDESC_FLAGS_E : /* strict: non-deletable, non-writable */
+ DUK_PROPDESC_FLAGS_WE); /* non-strict: non-deletable, writable */
/* [ ... arg1 ... argN envobj ] */
}
@@ -63219,7 +66573,8 @@ DUK_LOCAL void duk__update_default_instance_proto(duk_hthread *thr, duk_idx_t id
"-> leave standard Object prototype as fallback prototype"));
} else {
DUK_DDD(DUK_DDDPRINT("constructor has 'prototype' property with object value "
- "-> set fallback prototype to that value: %!iO", (duk_heaphdr *) proto));
+ "-> set fallback prototype to that value: %!iO",
+ (duk_heaphdr *) proto));
/* Original fallback (default instance) is untouched when
* resolving bound functions etc.
*/
@@ -63241,9 +66596,7 @@ DUK_INTERNAL void duk_call_construct_postprocess(duk_hthread *thr, duk_small_uin
* Object (we accept object-like values like buffers and
* lightfuncs too). If not, TypeError.
*/
- if (duk_check_type_mask(thr, -1, DUK_TYPE_MASK_OBJECT |
- DUK_TYPE_MASK_BUFFER |
- DUK_TYPE_MASK_LIGHTFUNC)) {
+ if (duk_check_type_mask(thr, -1, DUK_TYPE_MASK_OBJECT | DUK_TYPE_MASK_BUFFER | DUK_TYPE_MASK_LIGHTFUNC)) {
DUK_DDD(DUK_DDDPRINT("replacement value"));
} else {
if (DUK_UNLIKELY(proxy_invariant != 0U)) {
@@ -63265,8 +66618,7 @@ DUK_INTERNAL void duk_call_construct_postprocess(duk_hthread *thr, duk_small_uin
* out right; however it is always synced here so just assert for it.
*/
DUK_ASSERT(thr->ptr_curr_pc == NULL);
- duk_err_augment_error_create(thr, thr, NULL, 0, DUK_AUGMENT_FLAG_NOBLAME_FILELINE |
- DUK_AUGMENT_FLAG_SKIP_ONE);
+ duk_err_augment_error_create(thr, thr, NULL, 0, DUK_AUGMENT_FLAG_NOBLAME_FILELINE | DUK_AUGMENT_FLAG_SKIP_ONE);
#endif
}
@@ -63283,9 +66635,7 @@ DUK_INTERNAL void duk_call_construct_postprocess(duk_hthread *thr, duk_small_uin
* [[BoundThis]].
*/
-DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr,
- duk_idx_t idx_func,
- duk_bool_t is_constructor_call) {
+DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr, duk_idx_t idx_func, duk_bool_t is_constructor_call) {
duk_tval *tv_func;
duk_hobject *func;
duk_idx_t len;
@@ -63316,7 +66666,8 @@ DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr,
DUK_ASSERT(len == 0 || tv_args != NULL);
DUK_DDD(DUK_DDDPRINT("bound function encountered, ptr=%p: %!T",
- (void *) DUK_TVAL_GET_OBJECT(tv_func), tv_func));
+ (void *) DUK_TVAL_GET_OBJECT(tv_func),
+ tv_func));
/* [ ... func this arg1 ... argN ] */
@@ -63326,7 +66677,7 @@ DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr,
} else {
/* XXX: duk_replace_tval */
duk_push_tval(thr, &h_bound->this_binding);
- duk_replace(thr, idx_func + 1); /* idx_this = idx_func + 1 */
+ duk_replace(thr, idx_func + 1); /* idx_this = idx_func + 1 */
}
/* [ ... func this arg1 ... argN ] */
@@ -63339,10 +66690,11 @@ DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr,
/* [ ... func this <bound args> arg1 ... argN ] */
duk_push_tval(thr, &h_bound->target);
- duk_replace(thr, idx_func); /* replace in stack */
+ duk_replace(thr, idx_func); /* replace in stack */
DUK_DDD(DUK_DDDPRINT("bound function handled, idx_func=%ld, curr func=%!T",
- (long) idx_func, duk_get_tval(thr, idx_func)));
+ (long) idx_func,
+ duk_get_tval(thr, idx_func)));
}
} else if (DUK_TVAL_IS_LIGHTFUNC(tv_func)) {
/* Lightweight function: never bound, so terminate. */
@@ -63364,9 +66716,7 @@ DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr,
func = DUK_TVAL_GET_OBJECT(tv_func);
DUK_ASSERT(func != NULL);
DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(func));
- DUK_ASSERT(DUK_HOBJECT_HAS_COMPFUNC(func) ||
- DUK_HOBJECT_HAS_NATFUNC(func) ||
- DUK_HOBJECT_IS_PROXY(func));
+ DUK_ASSERT(DUK_HOBJECT_HAS_COMPFUNC(func) || DUK_HOBJECT_HAS_NATFUNC(func) || DUK_HOBJECT_IS_PROXY(func));
}
#endif
}
@@ -63375,14 +66725,18 @@ DUK_LOCAL void duk__handle_bound_chain_for_call(duk_hthread *thr,
* Helper for inline handling of .call(), .apply(), and .construct().
*/
-DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx_t idx_func, duk_hobject *func, duk_small_uint_t *call_flags, duk_bool_t first) {
+DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr,
+ duk_idx_t idx_func,
+ duk_hobject *func,
+ duk_small_uint_t *call_flags,
+ duk_bool_t first) {
#if defined(DUK_USE_ASSERTIONS)
duk_c_function natfunc;
#endif
duk_tval *tv_args;
DUK_ASSERT(func != NULL);
- DUK_ASSERT((*call_flags & DUK_CALL_FLAG_CONSTRUCT) == 0); /* Caller. */
+ DUK_ASSERT((*call_flags & DUK_CALL_FLAG_CONSTRUCT) == 0); /* Caller. */
#if defined(DUK_USE_ASSERTIONS)
natfunc = ((duk_hnatfunc *) func)->func;
@@ -63410,7 +66764,7 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
*call_flags = (*call_flags & ~DUK_CALL_FLAG_CALLED_AS_EVAL) | DUK_CALL_FLAG_DIRECT_EVAL;
}
DUK_ASSERT(duk_get_top(thr) >= idx_func + 2);
- return 1; /* stop resolving */
+ return 1; /* stop resolving */
}
/* Handle special functions based on the DUK_HOBJECT_FLAG_SPECIAL_CALL
@@ -63420,7 +66774,7 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
* for the result values (unlike most other value stack calls).
*/
switch (((duk_hnatfunc *) func)->magic) {
- case 0: { /* 0=Function.prototype.call() */
+ case 0: { /* 0=Function.prototype.call() */
/* Value stack:
* idx_func + 0: Function.prototype.call() [removed]
* idx_func + 1: this binding for .call (target function)
@@ -63439,11 +66793,11 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
tv_args = thr->valstack_bottom + idx_func + 2;
if (thr->valstack_top < tv_args) {
DUK_ASSERT(tv_args <= thr->valstack_end);
- thr->valstack_top = tv_args; /* at least target function and 'this' binding present */
+ thr->valstack_top = tv_args; /* at least target function and 'this' binding present */
}
break;
}
- case 1: { /* 1=Function.prototype.apply() */
+ case 1: { /* 1=Function.prototype.apply() */
/* Value stack:
* idx_func + 0: Function.prototype.apply() [removed]
* idx_func + 1: this binding for .apply (target function)
@@ -63462,7 +66816,7 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
goto apply_shared;
}
#if defined(DUK_USE_REFLECT_BUILTIN)
- case 2: { /* 2=Reflect.apply() */
+ case 2: { /* 2=Reflect.apply() */
/* Value stack:
* idx_func + 0: Reflect.apply() [removed]
* idx_func + 1: this binding for .apply (ignored, usually Reflect) [removed]
@@ -63481,7 +66835,7 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
duk_remove_n_unsafe(thr, idx_func, 2);
goto apply_shared;
}
- case 3: { /* 3=Reflect.construct() */
+ case 3: { /* 3=Reflect.construct() */
/* Value stack:
* idx_func + 0: Reflect.construct() [removed]
* idx_func + 1: this binding for .construct (ignored, usually Reflect) [removed]
@@ -63515,11 +66869,11 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
* unpacking argArray (which may cause side effects).
* Just return; caller will throw the error.
*/
- duk_set_top_unsafe(thr, idx_func + 2); /* satisfy asserts */
+ duk_set_top_unsafe(thr, idx_func + 2); /* satisfy asserts */
break;
}
duk_push_object(thr);
- duk_insert(thr, idx_func + 1); /* default instance */
+ duk_insert(thr, idx_func + 1); /* default instance */
/* [ ... func default_instance argArray newTarget? ] */
@@ -63535,16 +66889,17 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
DUK_ERROR_UNSUPPORTED(thr);
DUK_WO_NORETURN(return 0;);
}
- duk_set_top_unsafe(thr, idx_func + 3); /* remove any args beyond argArray */
+ duk_set_top_unsafe(thr, idx_func + 3); /* remove any args beyond argArray */
}
DUK_ASSERT(duk_get_top(thr) == idx_func + 3);
DUK_ASSERT(duk_is_valid_index(thr, idx_func + 2));
- (void) duk_unpack_array_like(thr, idx_func + 2); /* XXX: should also remove target to be symmetric with duk_pack()? */
+ (void) duk_unpack_array_like(thr,
+ idx_func + 2); /* XXX: should also remove target to be symmetric with duk_pack()? */
duk_remove(thr, idx_func + 2);
DUK_ASSERT(duk_get_top(thr) >= idx_func + 2);
break;
}
-#endif /* DUK_USE_REFLECT_BUILTIN */
+#endif /* DUK_USE_REFLECT_BUILTIN */
default: {
DUK_ASSERT(0);
DUK_UNREACHABLE();
@@ -63552,18 +66907,18 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
}
DUK_ASSERT(duk_get_top(thr) >= idx_func + 2);
- return 0; /* keep resolving */
+ return 0; /* keep resolving */
- apply_shared:
+apply_shared:
tv_args = thr->valstack_bottom + idx_func + 2;
if (thr->valstack_top <= tv_args) {
DUK_ASSERT(tv_args <= thr->valstack_end);
- thr->valstack_top = tv_args; /* at least target func and 'this' binding present */
+ thr->valstack_top = tv_args; /* at least target func and 'this' binding present */
/* No need to check for argArray. */
} else {
- DUK_ASSERT(duk_get_top(thr) >= idx_func + 3); /* idx_func + 2 covered above */
+ DUK_ASSERT(duk_get_top(thr) >= idx_func + 3); /* idx_func + 2 covered above */
if (thr->valstack_top > tv_args + 1) {
- duk_set_top_unsafe(thr, idx_func + 3); /* remove any args beyond argArray */
+ duk_set_top_unsafe(thr, idx_func + 3); /* remove any args beyond argArray */
}
DUK_ASSERT(duk_is_valid_index(thr, idx_func + 2));
if (!duk_is_callable(thr, idx_func)) {
@@ -63576,7 +66931,7 @@ DUK_LOCAL duk_bool_t duk__handle_specialfuncs_for_call(duk_hthread *thr, duk_idx
}
}
DUK_ASSERT(duk_get_top(thr) >= idx_func + 2);
- return 0; /* keep resolving */
+ return 0; /* keep resolving */
}
/*
@@ -63674,8 +67029,8 @@ DUK_LOCAL void duk__handle_proxy_for_call(duk_hthread *thr, duk_idx_t idx_func,
DUK_ASSERT(duk_get_top(thr) == idx_func + 6);
if (*call_flags & DUK_CALL_FLAG_CONSTRUCT) {
- *call_flags |= DUK_CALL_FLAG_CONSTRUCT_PROXY; /* Enable 'construct' trap return invariant check. */
- *call_flags &= ~(DUK_CALL_FLAG_CONSTRUCT); /* Resume as non-constructor call to the trap. */
+ *call_flags |= DUK_CALL_FLAG_CONSTRUCT_PROXY; /* Enable 'construct' trap return invariant check. */
+ *call_flags &= ~(DUK_CALL_FLAG_CONSTRUCT); /* Resume as non-constructor call to the trap. */
/* 'apply' args: target, thisArg, argArray
* 'construct' args: target, argArray, newTarget
@@ -63686,19 +67041,17 @@ DUK_LOCAL void duk__handle_proxy_for_call(duk_hthread *thr, duk_idx_t idx_func,
/* Finalize value stack layout by removing Proxy reference. */
duk_remove(thr, idx_func);
- h_proxy = NULL; /* invalidated */
+ h_proxy = NULL; /* invalidated */
DUK_ASSERT(duk_get_top(thr) == idx_func + 5);
}
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
/*
* Helper for setting up var_env and lex_env of an activation,
* assuming it does NOT have the DUK_HOBJECT_FLAG_NEWENV flag.
*/
-DUK_LOCAL void duk__handle_oldenv_for_call(duk_hthread *thr,
- duk_hobject *func,
- duk_activation *act) {
+DUK_LOCAL void duk__handle_oldenv_for_call(duk_hthread *thr, duk_hobject *func, duk_activation *act) {
duk_hcompfunc *f;
duk_hobject *h_lex;
duk_hobject *h_var;
@@ -63714,7 +67067,7 @@ DUK_LOCAL void duk__handle_oldenv_for_call(duk_hthread *thr,
f = (duk_hcompfunc *) func;
h_lex = DUK_HCOMPFUNC_GET_LEXENV(thr->heap, f);
h_var = DUK_HCOMPFUNC_GET_VARENV(thr->heap, f);
- DUK_ASSERT(h_lex != NULL); /* Always true for closures (not for templates) */
+ DUK_ASSERT(h_lex != NULL); /* Always true for closures (not for templates) */
DUK_ASSERT(h_var != NULL);
act->lex_env = h_lex;
act->var_env = h_var;
@@ -63735,7 +67088,7 @@ DUK_LOCAL void duk__update_func_caller_prop(duk_hthread *thr, duk_hobject *func)
DUK_ASSERT(thr != NULL);
DUK_ASSERT(func != NULL);
- DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(func)); /* bound chain resolved */
+ DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(func)); /* bound chain resolved */
DUK_ASSERT(thr->callstack_top >= 1);
if (DUK_HOBJECT_HAS_STRICT(func)) {
@@ -63789,7 +67142,7 @@ DUK_LOCAL void duk__update_func_caller_prop(duk_hthread *thr, duk_hobject *func)
DUK_TVAL_SET_OBJECT(tv_caller, act_caller->func);
DUK_TVAL_INCREF(thr, tv_caller);
} else {
- DUK_TVAL_SET_NULL(tv_caller); /* no incref */
+ DUK_TVAL_SET_NULL(tv_caller); /* no incref */
}
} else {
/* 'caller' must only take on 'null' or function value */
@@ -63802,12 +67155,12 @@ DUK_LOCAL void duk__update_func_caller_prop(duk_hthread *thr, duk_hobject *func)
DUK_TVAL_SET_OBJECT(tv_caller, act_caller->func);
DUK_TVAL_INCREF(thr, tv_caller);
} else {
- DUK_TVAL_SET_NULL(tv_caller); /* no incref */
+ DUK_TVAL_SET_NULL(tv_caller); /* no incref */
}
}
}
}
-#endif /* DUK_USE_NONSTD_FUNC_CALLER_PROPERTY */
+#endif /* DUK_USE_NONSTD_FUNC_CALLER_PROPERTY */
/*
* Shared helpers for resolving the final, non-bound target function of the
@@ -63853,7 +67206,7 @@ DUK_LOCAL DUK_INLINE void duk__coerce_nonstrict_this_binding(duk_hthread *thr, d
obj_global = thr->builtins[DUK_BIDX_GLOBAL];
/* XXX: avoid this check somehow */
if (DUK_LIKELY(obj_global != NULL)) {
- DUK_ASSERT(!DUK_TVAL_IS_HEAP_ALLOCATED(tv_this)); /* no need to decref previous value */
+ DUK_ASSERT(!DUK_TVAL_IS_HEAP_ALLOCATED(tv_this)); /* no need to decref previous value */
DUK_TVAL_SET_OBJECT(tv_this, obj_global);
DUK_HOBJECT_INCREF(thr, obj_global);
} else {
@@ -63861,8 +67214,8 @@ DUK_LOCAL DUK_INLINE void duk__coerce_nonstrict_this_binding(duk_hthread *thr, d
* This behavior is out of specification scope.
*/
DUK_D(DUK_DPRINT("this binding: wanted to use global object, but it is NULL -> using undefined instead"));
- DUK_ASSERT(!DUK_TVAL_IS_HEAP_ALLOCATED(tv_this)); /* no need to decref previous value */
- DUK_TVAL_SET_UNDEFINED(tv_this); /* nothing to incref */
+ DUK_ASSERT(!DUK_TVAL_IS_HEAP_ALLOCATED(tv_this)); /* no need to decref previous value */
+ DUK_TVAL_SET_UNDEFINED(tv_this); /* nothing to incref */
}
break;
default:
@@ -63873,18 +67226,21 @@ DUK_LOCAL DUK_INLINE void duk__coerce_nonstrict_this_binding(duk_hthread *thr, d
*/
DUK_ASSERT(!DUK_TVAL_IS_UNUSED(tv_this));
DUK_DDD(DUK_DDDPRINT("this binding: non-strict, not object/undefined/null -> use ToObject(value)"));
- duk_to_object(thr, idx_this); /* may have side effects */
+ duk_to_object(thr, idx_this); /* may have side effects */
break;
}
}
-DUK_LOCAL DUK_ALWAYS_INLINE duk_bool_t duk__resolve_target_fastpath_check(duk_hthread *thr, duk_idx_t idx_func, duk_hobject **out_func, duk_small_uint_t call_flags) {
+DUK_LOCAL DUK_ALWAYS_INLINE duk_bool_t duk__resolve_target_fastpath_check(duk_hthread *thr,
+ duk_idx_t idx_func,
+ duk_hobject **out_func,
+ duk_small_uint_t call_flags) {
#if defined(DUK_USE_PREFER_SIZE)
DUK_UNREF(thr);
DUK_UNREF(idx_func);
DUK_UNREF(out_func);
DUK_UNREF(call_flags);
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
duk_tval *tv_func;
duk_hobject *func;
@@ -63897,9 +67253,7 @@ DUK_LOCAL DUK_ALWAYS_INLINE duk_bool_t duk__resolve_target_fastpath_check(duk_ht
if (DUK_LIKELY(DUK_TVAL_IS_OBJECT(tv_func))) {
func = DUK_TVAL_GET_OBJECT(tv_func);
- if (DUK_HOBJECT_IS_CALLABLE(func) &&
- !DUK_HOBJECT_HAS_BOUNDFUNC(func) &&
- !DUK_HOBJECT_HAS_SPECIAL_CALL(func)) {
+ if (DUK_HOBJECT_IS_CALLABLE(func) && !DUK_HOBJECT_HAS_BOUNDFUNC(func) && !DUK_HOBJECT_HAS_SPECIAL_CALL(func)) {
*out_func = func;
if (DUK_HOBJECT_HAS_STRICT(func)) {
@@ -63919,8 +67273,8 @@ DUK_LOCAL DUK_ALWAYS_INLINE duk_bool_t duk__resolve_target_fastpath_check(duk_ht
*/
return 1;
}
-#endif /* DUK_USE_PREFER_SIZE */
- return 0; /* let slow path deal with it */
+#endif /* DUK_USE_PREFER_SIZE */
+ return 0; /* let slow path deal with it */
}
DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *thr,
@@ -63953,8 +67307,7 @@ DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *th
}
}
- if (DUK_LIKELY(!DUK_HOBJECT_HAS_BOUNDFUNC(func) &&
- !DUK_HOBJECT_HAS_SPECIAL_CALL(func) &&
+ if (DUK_LIKELY(!DUK_HOBJECT_HAS_BOUNDFUNC(func) && !DUK_HOBJECT_HAS_SPECIAL_CALL(func) &&
!DUK_HOBJECT_HAS_EXOTIC_PROXYOBJ(func))) {
/* Common case, so test for using a single bitfield test.
* Break out to handle this coercion etc.
@@ -63990,8 +67343,7 @@ DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *th
* the trap may be bound.
*/
duk__handle_proxy_for_call(thr, idx_func, (duk_hproxy *) func, call_flags);
- }
- else
+ } else
#endif
{
DUK_ASSERT(DUK_HOBJECT_IS_NATFUNC(func));
@@ -64038,28 +67390,25 @@ DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *th
}
}
- finished:
-
+finished :
#if defined(DUK_USE_ASSERTIONS)
- {
- duk_tval *tv_tmp;
+{
+ duk_tval *tv_tmp;
- tv_tmp = duk_get_tval(thr, idx_func);
- DUK_ASSERT(tv_tmp != NULL);
+ tv_tmp = duk_get_tval(thr, idx_func);
+ DUK_ASSERT(tv_tmp != NULL);
- DUK_ASSERT((DUK_TVAL_IS_OBJECT(tv_tmp) && DUK_HOBJECT_IS_CALLABLE(DUK_TVAL_GET_OBJECT(tv_tmp))) ||
- DUK_TVAL_IS_LIGHTFUNC(tv_tmp));
- DUK_ASSERT(func == NULL || !DUK_HOBJECT_HAS_BOUNDFUNC(func));
- DUK_ASSERT(func == NULL || (DUK_HOBJECT_IS_COMPFUNC(func) ||
- DUK_HOBJECT_IS_NATFUNC(func)));
- DUK_ASSERT(func == NULL || (DUK_HOBJECT_HAS_CONSTRUCTABLE(func) ||
- (*call_flags & DUK_CALL_FLAG_CONSTRUCT) == 0));
- }
+ DUK_ASSERT((DUK_TVAL_IS_OBJECT(tv_tmp) && DUK_HOBJECT_IS_CALLABLE(DUK_TVAL_GET_OBJECT(tv_tmp))) ||
+ DUK_TVAL_IS_LIGHTFUNC(tv_tmp));
+ DUK_ASSERT(func == NULL || !DUK_HOBJECT_HAS_BOUNDFUNC(func));
+ DUK_ASSERT(func == NULL || (DUK_HOBJECT_IS_COMPFUNC(func) || DUK_HOBJECT_IS_NATFUNC(func)));
+ DUK_ASSERT(func == NULL || (DUK_HOBJECT_HAS_CONSTRUCTABLE(func) || (*call_flags & DUK_CALL_FLAG_CONSTRUCT) == 0));
+}
#endif
return func;
- not_callable:
+not_callable:
DUK_ASSERT(tv_func != NULL);
#if defined(DUK_USE_VERBOSE_ERRORS)
@@ -64071,7 +67420,8 @@ DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *th
* (which would be dangerous).
*/
if (DUK_TVAL_IS_OBJECT(tv_func)) {
- duk_tval *tv_wrap = duk_hobject_find_entry_tval_ptr_stridx(thr->heap, DUK_TVAL_GET_OBJECT(tv_func), DUK_STRIDX_INT_TARGET);
+ duk_tval *tv_wrap =
+ duk_hobject_find_entry_tval_ptr_stridx(thr->heap, DUK_TVAL_GET_OBJECT(tv_func), DUK_STRIDX_INT_TARGET);
if (tv_wrap != NULL) {
DUK_DD(DUK_DDPRINT("delayed error from GETPROPC: %!T", tv_wrap));
duk_push_tval(thr, tv_wrap);
@@ -64092,7 +67442,7 @@ DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *th
#endif
DUK_WO_NORETURN(return NULL;);
- not_constructable:
+not_constructable:
/* For now GETPROPC delayed error not needed for constructor calls. */
#if defined(DUK_USE_VERBOSE_ERRORS)
#if defined(DUK_USE_PARANOID_ERRORS)
@@ -64116,7 +67466,10 @@ DUK_LOCAL duk_hobject *duk__resolve_target_func_and_this_binding(duk_hthread *th
* empty (below idx_retbase).
*/
-DUK_LOCAL void duk__safe_call_adjust_valstack(duk_hthread *thr, duk_idx_t idx_retbase, duk_idx_t num_stack_rets, duk_idx_t num_actual_rets) {
+DUK_LOCAL void duk__safe_call_adjust_valstack(duk_hthread *thr,
+ duk_idx_t idx_retbase,
+ duk_idx_t num_stack_rets,
+ duk_idx_t num_actual_rets) {
duk_idx_t idx_rcbase;
DUK_ASSERT(thr != NULL);
@@ -64124,7 +67477,7 @@ DUK_LOCAL void duk__safe_call_adjust_valstack(duk_hthread *thr, duk_idx_t idx_re
DUK_ASSERT(num_stack_rets >= 0);
DUK_ASSERT(num_actual_rets >= 0);
- idx_rcbase = duk_get_top(thr) - num_actual_rets; /* base of known return values */
+ idx_rcbase = duk_get_top(thr) - num_actual_rets; /* base of known return values */
if (DUK_UNLIKELY(idx_rcbase < 0)) {
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_CFUNC_RC);
DUK_WO_NORETURN(return;);
@@ -64132,10 +67485,13 @@ DUK_LOCAL void duk__safe_call_adjust_valstack(duk_hthread *thr, duk_idx_t idx_re
DUK_DDD(DUK_DDDPRINT("adjust valstack after func call: "
"num_stack_rets=%ld, num_actual_rets=%ld, stack_top=%ld, idx_retbase=%ld, idx_rcbase=%ld",
- (long) num_stack_rets, (long) num_actual_rets, (long) duk_get_top(thr),
- (long) idx_retbase, (long) idx_rcbase));
+ (long) num_stack_rets,
+ (long) num_actual_rets,
+ (long) duk_get_top(thr),
+ (long) idx_retbase,
+ (long) idx_rcbase));
- DUK_ASSERT(idx_rcbase >= 0); /* caller must check */
+ DUK_ASSERT(idx_rcbase >= 0); /* caller must check */
/* Space for num_stack_rets was reserved before the safe call.
* Because value stack reserve cannot shrink except in call returns,
@@ -64150,24 +67506,28 @@ DUK_LOCAL void duk__safe_call_adjust_valstack(duk_hthread *thr, duk_idx_t idx_re
duk_idx_t count = idx_rcbase - idx_retbase;
DUK_DDD(DUK_DDDPRINT("elements at/after idx_retbase have enough to cover func retvals "
- "(idx_retbase=%ld, idx_rcbase=%ld)", (long) idx_retbase, (long) idx_rcbase));
+ "(idx_retbase=%ld, idx_rcbase=%ld)",
+ (long) idx_retbase,
+ (long) idx_rcbase));
/* Remove values between irc_rcbase (start of intended return
* values) and idx_retbase to lower return values to idx_retbase.
*/
DUK_ASSERT(count > 0);
- duk_remove_n(thr, idx_retbase, count); /* may be NORZ */
+ duk_remove_n(thr, idx_retbase, count); /* may be NORZ */
} else {
duk_idx_t count = idx_retbase - idx_rcbase;
DUK_DDD(DUK_DDDPRINT("not enough elements at/after idx_retbase to cover func retvals "
- "(idx_retbase=%ld, idx_rcbase=%ld)", (long) idx_retbase, (long) idx_rcbase));
+ "(idx_retbase=%ld, idx_rcbase=%ld)",
+ (long) idx_retbase,
+ (long) idx_rcbase));
/* Insert 'undefined' at idx_rcbase (start of intended return
* values) to lift return values to idx_retbase.
*/
DUK_ASSERT(count >= 0);
- DUK_ASSERT(thr->valstack_end - thr->valstack_top >= count); /* reserve cannot shrink */
+ DUK_ASSERT(thr->valstack_end - thr->valstack_top >= count); /* reserve cannot shrink */
duk_insert_undefined_n(thr, idx_rcbase, count);
}
@@ -64228,12 +67588,12 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
#if defined(DUK_USE_ES6_PROXY)
| (duk_small_uint_t) ((act->flags & DUK_ACT_FLAG_CONSTRUCT_PROXY) ? 2 : 0)
#endif
- ;
+ ;
flags2 = (duk_small_uint_t) ((call_flags & DUK_CALL_FLAG_CONSTRUCT) ? 1 : 0)
#if defined(DUK_USE_ES6_PROXY)
| (duk_small_uint_t) ((call_flags & DUK_CALL_FLAG_CONSTRUCT_PROXY) ? 2 : 0);
#endif
- ;
+ ;
if (flags1 != flags2) {
DUK_DDD(DUK_DDDPRINT("tail call prevented by incompatible return value handling"));
return 0;
@@ -64271,8 +67631,7 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
* https://github.com/svaarala/duktape/issues/1726.
*/
- DUK_DDD(DUK_DDDPRINT("is tail call, reusing activation at callstack top, at index %ld",
- (long) (thr->callstack_top - 1)));
+ DUK_DDD(DUK_DDDPRINT("is tail call, reusing activation at callstack top, at index %ld", (long) (thr->callstack_top - 1)));
DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(func));
DUK_ASSERT(!DUK_HOBJECT_HAS_NATFUNC(func));
@@ -64316,7 +67675,7 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
act->lex_env = NULL;
DUK_ASSERT(func != NULL);
DUK_ASSERT(DUK_HOBJECT_HAS_COMPFUNC(func));
- act->func = func; /* don't want an intermediate exposed state with func == NULL */
+ act->func = func; /* don't want an intermediate exposed state with func == NULL */
#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
act->prev_caller = NULL;
#endif
@@ -64325,7 +67684,7 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
#if defined(DUK_USE_DEBUGGER_SUPPORT)
act->prev_line = 0;
#endif
- DUK_TVAL_SET_OBJECT(&act->tv_func, func); /* borrowed, no refcount */
+ DUK_TVAL_SET_OBJECT(&act->tv_func, func); /* borrowed, no refcount */
DUK_HOBJECT_INCREF(thr, func);
act->flags = DUK_ACT_FLAG_TAILCALLED;
@@ -64341,10 +67700,10 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
}
#endif
- DUK_ASSERT(DUK_ACT_GET_FUNC(act) == func); /* already updated */
+ DUK_ASSERT(DUK_ACT_GET_FUNC(act) == func); /* already updated */
DUK_ASSERT(act->var_env == NULL);
DUK_ASSERT(act->lex_env == NULL);
- act->bottom_byteoff = entry_valstack_bottom_byteoff; /* tail call -> reuse current "frame" */
+ act->bottom_byteoff = entry_valstack_bottom_byteoff; /* tail call -> reuse current "frame" */
#if 0
/* Topmost activation retval_byteoff is considered garbage, no need to init. */
act->retval_byteoff = 0;
@@ -64369,22 +67728,23 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
tv1 = thr->valstack_bottom - 1;
tv2 = thr->valstack_bottom + idx_func + 1;
- DUK_ASSERT(tv1 >= thr->valstack && tv1 < thr->valstack_top); /* tv1 is -below- valstack_bottom */
+ DUK_ASSERT(tv1 >= thr->valstack && tv1 < thr->valstack_top); /* tv1 is -below- valstack_bottom */
DUK_ASSERT(tv2 >= thr->valstack_bottom && tv2 < thr->valstack_top);
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
idx_args = idx_func + 2;
- duk_remove_n(thr, 0, idx_args); /* may be NORZ */
+ duk_remove_n(thr, 0, idx_args); /* may be NORZ */
- idx_func = 0; DUK_UNREF(idx_func); /* really 'not applicable' anymore, should not be referenced after this */
+ idx_func = 0;
+ DUK_UNREF(idx_func); /* really 'not applicable' anymore, should not be referenced after this */
idx_args = 0;
*out_nargs = ((duk_hcompfunc *) func)->nargs;
*out_nregs = ((duk_hcompfunc *) func)->nregs;
DUK_ASSERT(*out_nregs >= 0);
DUK_ASSERT(*out_nregs >= *out_nargs);
- *out_vs_min_bytes = entry_valstack_bottom_byteoff + sizeof(duk_tval) * ((duk_size_t) *out_nregs + DUK_VALSTACK_INTERNAL_EXTRA);
-
+ *out_vs_min_bytes =
+ entry_valstack_bottom_byteoff + sizeof(duk_tval) * ((duk_size_t) *out_nregs + DUK_VALSTACK_INTERNAL_EXTRA);
#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
#if defined(DUK_USE_TAILCALL)
@@ -64401,7 +67761,7 @@ DUK_LOCAL duk_small_uint_t duk__call_setup_act_attempt_tailcall(duk_hthread *thr
return 1;
}
-#endif /* DUK_USE_TAILCALL */
+#endif /* DUK_USE_TAILCALL */
DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
duk_small_uint_t call_flags,
@@ -64418,8 +67778,7 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
DUK_UNREF(entry_valstack_end_byteoff);
- DUK_DDD(DUK_DDDPRINT("not a tail call, pushing a new activation to callstack, to index %ld",
- (long) (thr->callstack_top)));
+ DUK_DDD(DUK_DDDPRINT("not a tail call, pushing a new activation to callstack, to index %ld", (long) (thr->callstack_top)));
duk__call_callstack_limit_check(thr);
new_act = duk_hthread_activation_alloc(thr);
@@ -64446,7 +67805,7 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
act = new_act;
*out_act = act;
- DUK_ASSERT(thr->valstack_top > thr->valstack_bottom); /* at least effective 'this' */
+ DUK_ASSERT(thr->valstack_top > thr->valstack_bottom); /* at least effective 'this' */
DUK_ASSERT(func == NULL || !DUK_HOBJECT_HAS_BOUNDFUNC(func));
act->cat = NULL;
@@ -64465,9 +67824,9 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
}
/* start of arguments: idx_func + 2. */
- act->func = func; /* NULL for lightfunc */
+ act->func = func; /* NULL for lightfunc */
if (DUK_LIKELY(func != NULL)) {
- DUK_TVAL_SET_OBJECT(&act->tv_func, func); /* borrowed, no refcount */
+ DUK_TVAL_SET_OBJECT(&act->tv_func, func); /* borrowed, no refcount */
if (DUK_HOBJECT_HAS_STRICT(func)) {
act->flags |= DUK_ACT_FLAG_STRICT;
}
@@ -64476,8 +67835,9 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
*out_nregs = ((duk_hcompfunc *) func)->nregs;
DUK_ASSERT(*out_nregs >= 0);
DUK_ASSERT(*out_nregs >= *out_nargs);
- *out_vs_min_bytes = entry_valstack_bottom_byteoff +
- sizeof(duk_tval) * ((duk_size_t) idx_func + 2U + (duk_size_t) *out_nregs + DUK_VALSTACK_INTERNAL_EXTRA);
+ *out_vs_min_bytes =
+ entry_valstack_bottom_byteoff +
+ sizeof(duk_tval) * ((duk_size_t) idx_func + 2U + (duk_size_t) *out_nregs + DUK_VALSTACK_INTERNAL_EXTRA);
} else {
/* True because of call target lookup checks. */
DUK_ASSERT(DUK_HOBJECT_IS_NATFUNC(func));
@@ -64485,13 +67845,16 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
*out_nargs = ((duk_hnatfunc *) func)->nargs;
*out_nregs = *out_nargs;
if (*out_nargs >= 0) {
- *out_vs_min_bytes = entry_valstack_bottom_byteoff +
- sizeof(duk_tval) * ((duk_size_t) idx_func + 2U + (duk_size_t) *out_nregs + DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
+ *out_vs_min_bytes =
+ entry_valstack_bottom_byteoff +
+ sizeof(duk_tval) * ((duk_size_t) idx_func + 2U + (duk_size_t) *out_nregs +
+ DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
} else {
/* Vararg function. */
- duk_size_t valstack_top_byteoff = (duk_size_t) ((duk_uint8_t *) thr->valstack_top - ((duk_uint8_t *) thr->valstack));
- *out_vs_min_bytes = valstack_top_byteoff +
- sizeof(duk_tval) * (DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
+ duk_size_t valstack_top_byteoff =
+ (duk_size_t) ((duk_uint8_t *) thr->valstack_top - ((duk_uint8_t *) thr->valstack));
+ *out_vs_min_bytes = valstack_top_byteoff + sizeof(duk_tval) * (DUK_VALSTACK_API_ENTRY_MINIMUM +
+ DUK_VALSTACK_INTERNAL_EXTRA);
}
}
} else {
@@ -64502,18 +67865,20 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
tv_func = DUK_GET_TVAL_POSIDX(thr, idx_func);
DUK_ASSERT(DUK_TVAL_IS_LIGHTFUNC(tv_func));
- DUK_TVAL_SET_TVAL(&act->tv_func, tv_func); /* borrowed, no refcount */
+ DUK_TVAL_SET_TVAL(&act->tv_func, tv_func); /* borrowed, no refcount */
lf_flags = DUK_TVAL_GET_LIGHTFUNC_FLAGS(tv_func);
*out_nargs = DUK_LFUNC_FLAGS_GET_NARGS(lf_flags);
if (*out_nargs != DUK_LFUNC_NARGS_VARARGS) {
*out_vs_min_bytes = entry_valstack_bottom_byteoff +
- sizeof(duk_tval) * ((duk_size_t) idx_func + 2U + (duk_size_t) *out_nargs + DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
+ sizeof(duk_tval) * ((duk_size_t) idx_func + 2U + (duk_size_t) *out_nargs +
+ DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
} else {
- duk_size_t valstack_top_byteoff = (duk_size_t) ((duk_uint8_t *) thr->valstack_top - ((duk_uint8_t *) thr->valstack));
+ duk_size_t valstack_top_byteoff =
+ (duk_size_t) ((duk_uint8_t *) thr->valstack_top - ((duk_uint8_t *) thr->valstack));
*out_vs_min_bytes = valstack_top_byteoff +
- sizeof(duk_tval) * (DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
- *out_nargs = -1; /* vararg */
+ sizeof(duk_tval) * (DUK_VALSTACK_API_ENTRY_MINIMUM + DUK_VALSTACK_INTERNAL_EXTRA);
+ *out_nargs = -1; /* vararg */
}
*out_nregs = *out_nargs;
}
@@ -64535,13 +67900,13 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
* even in error unwind because reserve_byteoff is only used when
* returning to -this- activation.
*/
- act->reserve_byteoff = 0; /* filled in by caller */
+ act->reserve_byteoff = 0; /* filled in by caller */
/* XXX: Is this INCREF necessary? 'func' is always a borrowed
* reference reachable through the value stack? If changed, stack
* unwind code also needs to be fixed to match.
*/
- DUK_HOBJECT_INCREF_ALLOWNULL(thr, func); /* act->func */
+ DUK_HOBJECT_INCREF_ALLOWNULL(thr, func); /* act->func */
#if defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
if (func) {
@@ -64557,7 +67922,7 @@ DUK_LOCAL void duk__call_setup_act_not_tailcall(duk_hthread *thr,
DUK_LOCAL void duk__call_env_setup(duk_hthread *thr, duk_hobject *func, duk_activation *act, duk_idx_t idx_args) {
duk_hobject *env;
- DUK_ASSERT(func == NULL || !DUK_HOBJECT_HAS_BOUNDFUNC(func)); /* bound function has already been resolved */
+ DUK_ASSERT(func == NULL || !DUK_HOBJECT_HAS_BOUNDFUNC(func)); /* bound function has already been resolved */
if (DUK_LIKELY(func != NULL)) {
if (DUK_LIKELY(DUK_HOBJECT_HAS_NEWENV(func))) {
@@ -64588,7 +67953,7 @@ DUK_LOCAL void duk__call_env_setup(duk_hthread *thr, duk_hobject *func, duk_acti
act->lex_env = env;
act->var_env = env;
DUK_HOBJECT_INCREF(thr, env);
- DUK_HOBJECT_INCREF(thr, env); /* XXX: incref by count (2) directly */
+ DUK_HOBJECT_INCREF(thr, env); /* XXX: incref by count (2) directly */
duk_pop(thr);
}
} else {
@@ -64626,8 +67991,7 @@ DUK_LOCAL void duk__call_thread_state_update(duk_hthread *thr) {
goto thread_state_error;
}
} else {
- DUK_ASSERT(thr->heap->curr_thread == NULL ||
- thr->heap->curr_thread->state == DUK_HTHREAD_STATE_RUNNING);
+ DUK_ASSERT(thr->heap->curr_thread == NULL || thr->heap->curr_thread->state == DUK_HTHREAD_STATE_RUNNING);
if (DUK_UNLIKELY(thr->state != DUK_HTHREAD_STATE_INACTIVE)) {
goto thread_state_error;
}
@@ -64642,7 +68006,7 @@ DUK_LOCAL void duk__call_thread_state_update(duk_hthread *thr) {
DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_RUNNING);
return;
- thread_state_error:
+thread_state_error:
DUK_ERROR_FMT1(thr, DUK_ERR_TYPE_ERROR, "invalid thread state (%ld)", (long) thr->state);
DUK_WO_NORETURN(return;);
}
@@ -64668,9 +68032,7 @@ DUK_LOCAL void duk__call_thread_state_update(duk_hthread *thr) {
* place; the only guarantee is that the state is consistent for unwinding.
*/
-DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
- duk_idx_t idx_func,
- duk_small_uint_t call_flags) {
+DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr, duk_idx_t idx_func, duk_small_uint_t call_flags) {
#if defined(DUK_USE_ASSERTIONS)
duk_activation *entry_act;
duk_size_t entry_callstack_top;
@@ -64682,10 +68044,10 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
duk_uint_fast8_t entry_thread_state;
duk_instr_t **entry_ptr_curr_pc;
duk_idx_t idx_args;
- duk_idx_t nargs; /* # argument registers target function wants (< 0 => "as is") */
- duk_idx_t nregs; /* # total registers target function wants on entry (< 0 => "as is") */
- duk_size_t vs_min_bytes; /* minimum value stack size (bytes) for handling call */
- duk_hobject *func; /* 'func' on stack (borrowed reference) */
+ duk_idx_t nargs; /* # argument registers target function wants (< 0 => "as is") */
+ duk_idx_t nregs; /* # total registers target function wants on entry (< 0 => "as is") */
+ duk_size_t vs_min_bytes; /* minimum value stack size (bytes) for handling call */
+ duk_hobject *func; /* 'func' on stack (borrowed reference) */
duk_activation *act;
duk_ret_t rc;
duk_small_uint_t use_tailcall;
@@ -64726,7 +68088,7 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
DUK_ASSERT(DUK_CAT_GET_TYPE(tmp_cat) == DUK_CAT_TYPE_LABEL); /* a non-catching entry */
}
}
-#endif /* DUK_USE_ASSERTIONS */
+#endif /* DUK_USE_ASSERTIONS */
/*
* Store entry state.
@@ -64739,9 +68101,9 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
entry_valstack_bottom_byteoff = (duk_size_t) ((duk_uint8_t *) thr->valstack_bottom - (duk_uint8_t *) thr->valstack);
entry_valstack_end_byteoff = (duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack);
entry_call_recursion_depth = thr->heap->call_recursion_depth;
- entry_curr_thread = thr->heap->curr_thread; /* may be NULL if first call */
+ entry_curr_thread = thr->heap->curr_thread; /* may be NULL if first call */
entry_thread_state = thr->state;
- entry_ptr_curr_pc = thr->ptr_curr_pc; /* may be NULL */
+ entry_ptr_curr_pc = thr->ptr_curr_pc; /* may be NULL */
/* If thr->ptr_curr_pc is set, sync curr_pc to act->pc. Then NULL
* thr->ptr_curr_pc so that it's not accidentally used with an incorrect
@@ -64809,11 +68171,10 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("slow path target resolve"));
func = duk__resolve_target_func_and_this_binding(thr, idx_func, &call_flags);
}
- DUK_ASSERT(duk_get_top(thr) - idx_func >= 2); /* at least func and this present */
+ DUK_ASSERT(duk_get_top(thr) - idx_func >= 2); /* at least func and this present */
DUK_ASSERT(func == NULL || !DUK_HOBJECT_HAS_BOUNDFUNC(func));
- DUK_ASSERT(func == NULL || (DUK_HOBJECT_IS_COMPFUNC(func) ||
- DUK_HOBJECT_IS_NATFUNC(func)));
+ DUK_ASSERT(func == NULL || (DUK_HOBJECT_IS_COMPFUNC(func) || DUK_HOBJECT_IS_NATFUNC(func)));
/* [ ... func this arg1 ... argN ] */
@@ -64848,7 +68209,7 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
&act);
}
#else
- DUK_ASSERT((call_flags & DUK_CALL_FLAG_TAILCALL) == 0); /* compiler ensures this */
+ DUK_ASSERT((call_flags & DUK_CALL_FLAG_TAILCALL) == 0); /* compiler ensures this */
use_tailcall = 0;
#endif
@@ -64875,6 +68236,15 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
/* [ ... func this arg1 ... argN ] */
/*
+ * Grow value stack to required size before env setup. This
+ * must happen before env setup to handle some corner cases
+ * correctly, e.g. test-bug-scope-segv-gh2448.js.
+ */
+
+ duk_valstack_grow_check_throw(thr, vs_min_bytes);
+ act->reserve_byteoff = (duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack);
+
+ /*
* Environment record creation and 'arguments' object creation.
* Named function expression name binding is handled by the
* compiler; the compiled function's parent env will contain
@@ -64895,13 +68265,8 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
* Setup value stack: clamp to 'nargs', fill up to 'nregs',
* ensure value stack size matches target requirements, and
* switch value stack bottom. Valstack top is kept.
- *
- * Value stack can only grow here.
*/
- duk_valstack_grow_check_throw(thr, vs_min_bytes);
- act->reserve_byteoff = (duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack);
-
if (use_tailcall) {
DUK_ASSERT(nregs >= 0);
DUK_ASSERT(nregs >= nargs);
@@ -64940,8 +68305,8 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
DUK_ASSERT((act->flags & DUK_ACT_FLAG_PREVENT_YIELD) == 0);
DUK_REFZERO_CHECK_FAST(thr);
DUK_ASSERT(thr->ptr_curr_pc == NULL);
- thr->heap->call_recursion_depth--; /* No recursion increase for this case. */
- return 1; /* 1=reuse executor */
+ thr->heap->call_recursion_depth--; /* No recursion increase for this case. */
+ return 1; /* 1=reuse executor */
}
DUK_ASSERT(use_tailcall == 0);
@@ -65065,7 +68430,7 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
/* Explicit check for fastint downgrade. */
DUK_TVAL_CHKFAST_INPLACE_FAST(tv_funret);
#endif
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv_ret, tv_funret); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv_ret, tv_funret); /* side effects */
}
duk_set_top_unsafe(thr, idx_func + 1);
@@ -65084,7 +68449,7 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
/* Restore entry thread executor curr_pc stack frame pointer. */
thr->ptr_curr_pc = entry_ptr_curr_pc;
- DUK_HEAP_SWITCH_THREAD(thr->heap, entry_curr_thread); /* may be NULL */
+ DUK_HEAP_SWITCH_THREAD(thr->heap, entry_curr_thread); /* may be NULL */
thr->state = (duk_uint8_t) entry_thread_state;
/* Disabled assert: triggered with some torture tests. */
@@ -65125,12 +68490,10 @@ DUK_LOCAL duk_int_t duk__handle_call_raw(duk_hthread *thr,
DUK_REFZERO_CHECK_FAST(thr);
- return 0; /* 0=call handled inline */
+ return 0; /* 0=call handled inline */
}
-DUK_INTERNAL duk_int_t duk_handle_call_unprotected_nargs(duk_hthread *thr,
- duk_idx_t nargs,
- duk_small_uint_t call_flags) {
+DUK_INTERNAL duk_int_t duk_handle_call_unprotected_nargs(duk_hthread *thr, duk_idx_t nargs, duk_small_uint_t call_flags) {
duk_idx_t idx_func;
DUK_ASSERT(duk_get_top(thr) >= nargs + 2);
idx_func = duk_get_top(thr) - (nargs + 2);
@@ -65138,9 +68501,7 @@ DUK_INTERNAL duk_int_t duk_handle_call_unprotected_nargs(duk_hthread *thr,
return duk_handle_call_unprotected(thr, idx_func, call_flags);
}
-DUK_INTERNAL duk_int_t duk_handle_call_unprotected(duk_hthread *thr,
- duk_idx_t idx_func,
- duk_small_uint_t call_flags) {
+DUK_INTERNAL duk_int_t duk_handle_call_unprotected(duk_hthread *thr, duk_idx_t idx_func, duk_small_uint_t call_flags) {
DUK_ASSERT(duk_is_valid_index(thr, idx_func));
DUK_ASSERT(idx_func >= 0);
return duk__handle_call_raw(thr, idx_func, call_flags);
@@ -65207,7 +68568,8 @@ DUK_LOCAL void duk__handle_safe_call_inner(duk_hthread *thr,
/* we're running inside the caller's activation, so no change in call/catch stack or valstack bottom */
DUK_ASSERT(thr->callstack_top == entry_callstack_top);
DUK_ASSERT(thr->valstack_bottom >= thr->valstack);
- DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_bottom - (duk_uint8_t *) thr->valstack) == entry_valstack_bottom_byteoff);
+ DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_bottom - (duk_uint8_t *) thr->valstack) ==
+ entry_valstack_bottom_byteoff);
DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
DUK_ASSERT(thr->valstack_end >= thr->valstack_top);
@@ -65217,9 +68579,9 @@ DUK_LOCAL void duk__handle_safe_call_inner(duk_hthread *thr,
}
DUK_ASSERT(rc >= 0);
- duk__safe_call_adjust_valstack(thr, idx_retbase, num_stack_rets, rc); /* throws for insane rc */
+ duk__safe_call_adjust_valstack(thr, idx_retbase, num_stack_rets, rc); /* throws for insane rc */
- DUK_HEAP_SWITCH_THREAD(thr->heap, entry_curr_thread); /* may be NULL */
+ DUK_HEAP_SWITCH_THREAD(thr->heap, entry_curr_thread); /* may be NULL */
thr->state = (duk_uint8_t) entry_thread_state;
}
@@ -65272,7 +68634,7 @@ DUK_LOCAL void duk__handle_safe_call_error(duk_hthread *thr,
/* Switch active thread before any side effects to avoid a
* dangling curr_thread pointer.
*/
- DUK_HEAP_SWITCH_THREAD(thr->heap, entry_curr_thread); /* may be NULL */
+ DUK_HEAP_SWITCH_THREAD(thr->heap, entry_curr_thread); /* may be NULL */
thr->state = (duk_uint8_t) entry_thread_state;
DUK_ASSERT(thr->heap->curr_thread == entry_curr_thread);
@@ -65288,9 +68650,9 @@ DUK_LOCAL void duk__handle_safe_call_error(duk_hthread *thr,
/* [ ... | (crud) errobj ] */
- DUK_ASSERT(duk_get_top(thr) >= 1); /* at least errobj must be on stack */
+ DUK_ASSERT(duk_get_top(thr) >= 1); /* at least errobj must be on stack */
- duk__safe_call_adjust_valstack(thr, idx_retbase, num_stack_rets, 1); /* 1 = num actual 'return values' */
+ duk__safe_call_adjust_valstack(thr, idx_retbase, num_stack_rets, 1); /* 1 = num actual 'return values' */
/* [ ... | ] or [ ... | errobj (M * undefined)] where M = num_stack_rets - 1 */
@@ -65376,7 +68738,7 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
duk_int_t retval;
DUK_ASSERT(thr != NULL);
- DUK_ASSERT(duk_get_top(thr) >= num_stack_args); /* Caller ensures. */
+ DUK_ASSERT(duk_get_top(thr) >= num_stack_args); /* Caller ensures. */
DUK_STATS_INC(thr->heap, stats_safecall_all);
@@ -65395,14 +68757,14 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
entry_callstack_preventcount = thr->callstack_preventcount;
#endif
entry_call_recursion_depth = thr->heap->call_recursion_depth;
- entry_curr_thread = thr->heap->curr_thread; /* may be NULL if first call */
+ entry_curr_thread = thr->heap->curr_thread; /* may be NULL if first call */
entry_thread_state = thr->state;
- entry_ptr_curr_pc = thr->ptr_curr_pc; /* may be NULL */
- idx_retbase = duk_get_top(thr) - num_stack_args; /* not a valid stack index if num_stack_args == 0 */
+ entry_ptr_curr_pc = thr->ptr_curr_pc; /* may be NULL */
+ idx_retbase = duk_get_top(thr) - num_stack_args; /* not a valid stack index if num_stack_args == 0 */
DUK_ASSERT(idx_retbase >= 0);
- DUK_ASSERT((duk_idx_t) (thr->valstack_top - thr->valstack_bottom) >= num_stack_args); /* Caller ensures. */
- DUK_ASSERT((duk_idx_t) (thr->valstack_end - (thr->valstack_bottom + idx_retbase)) >= num_stack_rets); /* Caller ensures. */
+ DUK_ASSERT((duk_idx_t) (thr->valstack_top - thr->valstack_bottom) >= num_stack_args); /* Caller ensures. */
+ DUK_ASSERT((duk_idx_t) (thr->valstack_end - (thr->valstack_bottom + idx_retbase)) >= num_stack_rets); /* Caller ensures. */
/* Cannot portably debug print a function pointer, hence 'func' not printed! */
DUK_DD(DUK_DDPRINT("duk_handle_safe_call: thr=%p, num_stack_args=%ld, num_stack_rets=%ld, "
@@ -65462,7 +68824,8 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
* whatever calls are made. Reserve cannot decrease.
*/
DUK_ASSERT(thr->callstack_curr == entry_act);
- DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >= entry_valstack_end_byteoff);
+ DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >=
+ entry_valstack_end_byteoff);
retval = DUK_EXEC_SUCCESS;
#if defined(DUK_USE_CPP_EXCEPTIONS)
@@ -65472,7 +68835,8 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
} else {
/* Error path. */
#endif
- DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >= entry_valstack_end_byteoff);
+ DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >=
+ entry_valstack_end_byteoff);
DUK_STATS_INC(thr->heap, stats_safecall_throw);
@@ -65493,17 +68857,22 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
#if defined(DUK_USE_CPP_EXCEPTIONS)
catch (duk_fatal_exception &exc) {
DUK_D(DUK_DPRINT("rethrow duk_fatal_exception"));
+ DUK_UNREF(exc);
throw;
} catch (std::exception &exc) {
const char *what = exc.what();
- DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >= entry_valstack_end_byteoff);
+ DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >=
+ entry_valstack_end_byteoff);
DUK_STATS_INC(thr->heap, stats_safecall_throw);
if (!what) {
what = "unknown";
}
DUK_D(DUK_DPRINT("unexpected c++ std::exception (perhaps thrown by user code)"));
try {
- DUK_ERROR_FMT1(thr, DUK_ERR_TYPE_ERROR, "caught invalid c++ std::exception '%s' (perhaps thrown by user code)", what);
+ DUK_ERROR_FMT1(thr,
+ DUK_ERR_TYPE_ERROR,
+ "caught invalid c++ std::exception '%s' (perhaps thrown by user code)",
+ what);
DUK_WO_NORETURN(return 0;);
} catch (duk_internal_exception exc) {
DUK_D(DUK_DPRINT("caught api error thrown from unexpected c++ std::exception"));
@@ -65523,7 +68892,8 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
}
} catch (...) {
DUK_D(DUK_DPRINT("unexpected c++ exception (perhaps thrown by user code)"));
- DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >= entry_valstack_end_byteoff);
+ DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >=
+ entry_valstack_end_byteoff);
DUK_STATS_INC(thr->heap, stats_safecall_throw);
try {
DUK_ERROR_TYPE(thr, "caught invalid c++ exception (perhaps thrown by user code)");
@@ -65547,7 +68917,7 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
}
#endif
- DUK_ASSERT(thr->heap->lj.jmpbuf_ptr == old_jmpbuf_ptr); /* success/error path both do this */
+ DUK_ASSERT(thr->heap->lj.jmpbuf_ptr == old_jmpbuf_ptr); /* success/error path both do this */
DUK_ASSERT_LJSTATE_UNSET(thr->heap);
@@ -65568,7 +68938,8 @@ DUK_INTERNAL duk_int_t duk_handle_safe_call(duk_hthread *thr,
/* Final asserts. */
DUK_ASSERT(thr->callstack_curr == entry_act);
- DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_bottom - (duk_uint8_t *) thr->valstack) == entry_valstack_bottom_byteoff);
+ DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_bottom - (duk_uint8_t *) thr->valstack) ==
+ entry_valstack_bottom_byteoff);
DUK_ASSERT((duk_size_t) ((duk_uint8_t *) thr->valstack_end - (duk_uint8_t *) thr->valstack) >= entry_valstack_end_byteoff);
DUK_ASSERT(thr->callstack_top == entry_callstack_top);
DUK_ASSERT(thr->heap->call_recursion_depth == entry_call_recursion_depth);
@@ -65629,8 +69000,11 @@ DUK_INTERNAL DUK_NOINLINE DUK_COLD void duk_call_setup_propcall_error(duk_hthrea
str_base = duk_get_type_name(thr, -3);
duk_push_error_object(thr,
DUK_ERR_TYPE_ERROR | DUK_ERRCODE_FLAG_NOBLAME_FILELINE,
- "%s not callable (property %s of %s)", str_targ, str_key, str_base);
- duk_xdef_prop_stridx(thr, -2, DUK_STRIDX_INT_TARGET, DUK_PROPDESC_FLAGS_NONE); /* Marker property, reuse _Target. */
+ "%s not callable (property %s of %s)",
+ str_targ,
+ str_key,
+ str_base);
+ duk_xdef_prop_stridx(thr, -2, DUK_STRIDX_INT_TARGET, DUK_PROPDESC_FLAGS_NONE); /* Marker property, reuse _Target. */
/* [ <nargs> target base key { _Target: error } ] */
duk_replace(thr, entry_top - 1);
#else
@@ -65639,9 +69013,12 @@ DUK_INTERNAL DUK_NOINLINE DUK_COLD void duk_call_setup_propcall_error(duk_hthrea
str_base = duk_push_string_readable(thr, -5);
duk_push_error_object(thr,
DUK_ERR_TYPE_ERROR | DUK_ERRCODE_FLAG_NOBLAME_FILELINE,
- "%s not callable (property %s of %s)", str_targ, str_key, str_base);
+ "%s not callable (property %s of %s)",
+ str_targ,
+ str_key,
+ str_base);
/* [ <nargs> target base key {} str_targ str_key str_base error ] */
- duk_xdef_prop_stridx(thr, -5, DUK_STRIDX_INT_TARGET, DUK_PROPDESC_FLAGS_NONE); /* Marker property, reuse _Target. */
+ duk_xdef_prop_stridx(thr, -5, DUK_STRIDX_INT_TARGET, DUK_PROPDESC_FLAGS_NONE); /* Marker property, reuse _Target. */
/* [ <nargs> target base key { _Target: error } str_targ str_key str_base ] */
duk_swap(thr, -4, entry_top - 1);
/* [ <nargs> { _Target: error } base key target str_targ str_key str_base ] */
@@ -65651,9 +69028,9 @@ DUK_INTERNAL DUK_NOINLINE DUK_COLD void duk_call_setup_propcall_error(duk_hthrea
duk_set_top(thr, entry_top);
/* [ <nregs> { _Target: error } */
- DUK_ASSERT(!duk_is_callable(thr, -1)); /* Critical so that call handling will throw the error. */
+ DUK_ASSERT(!duk_is_callable(thr, -1)); /* Critical so that call handling will throw the error. */
}
-#endif /* DUK_USE_VERBOSE_ERRORS */
+#endif /* DUK_USE_VERBOSE_ERRORS */
/* automatic undefs */
#undef DUK__AUGMENT_CALL_RELAX_COUNT
@@ -65694,45 +69071,51 @@ DUK_INTERNAL DUK_NOINLINE DUK_COLD void duk_call_setup_propcall_error(duk_hthrea
* uses this approach to avoid an explicit DUK__ISREG() check (the condition is
* logically "'x' is a register AND 'x' >= temp_first").
*/
-#define DUK__CONST_MARKER DUK_REGCONST_CONST_MARKER
-#define DUK__REMOVECONST(x) ((x) & ~DUK__CONST_MARKER)
-#define DUK__ISREG(x) ((x) >= 0)
-#define DUK__ISCONST(x) ((x) < 0)
-#define DUK__ISREG_TEMP(comp_ctx,x) ((duk_int32_t) (x) >= (duk_int32_t) ((comp_ctx)->curr_func.temp_first)) /* Check for x >= temp_first && x >= 0 by comparing as signed. */
-#define DUK__ISREG_NOTTEMP(comp_ctx,x) ((duk_uint32_t) (x) < (duk_uint32_t) ((comp_ctx)->curr_func.temp_first)) /* Check for x >= 0 && x < temp_first by interpreting as unsigned. */
-#define DUK__GETTEMP(comp_ctx) ((comp_ctx)->curr_func.temp_next)
-#define DUK__SETTEMP(comp_ctx,x) ((comp_ctx)->curr_func.temp_next = (x)) /* dangerous: must only lower (temp_max not updated) */
-#define DUK__SETTEMP_CHECKMAX(comp_ctx,x) duk__settemp_checkmax((comp_ctx),(x))
-#define DUK__ALLOCTEMP(comp_ctx) duk__alloctemp((comp_ctx))
-#define DUK__ALLOCTEMPS(comp_ctx,count) duk__alloctemps((comp_ctx),(count))
+#define DUK__CONST_MARKER DUK_REGCONST_CONST_MARKER
+#define DUK__REMOVECONST(x) ((x) & ~DUK__CONST_MARKER)
+#define DUK__ISREG(x) ((x) >= 0)
+#define DUK__ISCONST(x) ((x) < 0)
+#define DUK__ISREG_TEMP(comp_ctx, x) \
+ ((duk_int32_t) (x) >= \
+ (duk_int32_t) ((comp_ctx)->curr_func.temp_first)) /* Check for x >= temp_first && x >= 0 by comparing as signed. */
+#define DUK__ISREG_NOTTEMP(comp_ctx, x) \
+ ((duk_uint32_t) (x) < \
+ (duk_uint32_t) ((comp_ctx)->curr_func.temp_first)) /* Check for x >= 0 && x < temp_first by interpreting as unsigned. */
+#define DUK__GETTEMP(comp_ctx) ((comp_ctx)->curr_func.temp_next)
+#define DUK__SETTEMP(comp_ctx, x) ((comp_ctx)->curr_func.temp_next = (x)) /* dangerous: must only lower (temp_max not updated) */
+#define DUK__SETTEMP_CHECKMAX(comp_ctx, x) duk__settemp_checkmax((comp_ctx), (x))
+#define DUK__ALLOCTEMP(comp_ctx) duk__alloctemp((comp_ctx))
+#define DUK__ALLOCTEMPS(comp_ctx, count) duk__alloctemps((comp_ctx), (count))
/* Init value set size for array and object literals. */
-#define DUK__MAX_ARRAY_INIT_VALUES 20
-#define DUK__MAX_OBJECT_INIT_PAIRS 10
+#define DUK__MAX_ARRAY_INIT_VALUES 20
+#define DUK__MAX_OBJECT_INIT_PAIRS 10
/* XXX: hack, remove when const lookup is not O(n) */
-#define DUK__GETCONST_MAX_CONSTS_CHECK 256
+#define DUK__GETCONST_MAX_CONSTS_CHECK 256
/* These limits are based on bytecode limits. Max temps is limited
* by duk_hcompfunc nargs/nregs fields being 16 bits.
*/
-#define DUK__MAX_CONSTS DUK_BC_BC_MAX
-#define DUK__MAX_FUNCS DUK_BC_BC_MAX
-#define DUK__MAX_TEMPS 0xffffL
+#define DUK__MAX_CONSTS DUK_BC_BC_MAX
+#define DUK__MAX_FUNCS DUK_BC_BC_MAX
+#define DUK__MAX_TEMPS 0xffffL
/* Initial bytecode size allocation. */
#if defined(DUK_USE_PREFER_SIZE)
-#define DUK__BC_INITIAL_INSTS 16
+#define DUK__BC_INITIAL_INSTS 16
#else
-#define DUK__BC_INITIAL_INSTS 256
+#define DUK__BC_INITIAL_INSTS 256
#endif
-#define DUK__RECURSION_INCREASE(comp_ctx,thr) do { \
+#define DUK__RECURSION_INCREASE(comp_ctx, thr) \
+ do { \
DUK_DDD(DUK_DDDPRINT("RECURSION INCREASE: %s:%ld", (const char *) DUK_FILE_MACRO, (long) DUK_LINE_MACRO)); \
duk__comp_recursion_increase((comp_ctx)); \
} while (0)
-#define DUK__RECURSION_DECREASE(comp_ctx,thr) do { \
+#define DUK__RECURSION_DECREASE(comp_ctx, thr) \
+ do { \
DUK_DDD(DUK_DDDPRINT("RECURSION DECREASE: %s:%ld", (const char *) DUK_FILE_MACRO, (long) DUK_LINE_MACRO)); \
duk__comp_recursion_decrease((comp_ctx)); \
} while (0)
@@ -65740,11 +69123,11 @@ DUK_INTERNAL DUK_NOINLINE DUK_COLD void duk_call_setup_propcall_error(duk_hthrea
/* Value stack slot limits: these are quite approximate right now, and
* because they overlap in control flow, some could be eliminated.
*/
-#define DUK__COMPILE_ENTRY_SLOTS 8
-#define DUK__FUNCTION_INIT_REQUIRE_SLOTS 16
-#define DUK__FUNCTION_BODY_REQUIRE_SLOTS 16
-#define DUK__PARSE_STATEMENTS_SLOTS 16
-#define DUK__PARSE_EXPR_SLOTS 16
+#define DUK__COMPILE_ENTRY_SLOTS 8
+#define DUK__FUNCTION_INIT_REQUIRE_SLOTS 16
+#define DUK__FUNCTION_BODY_REQUIRE_SLOTS 16
+#define DUK__PARSE_STATEMENTS_SLOTS 16
+#define DUK__PARSE_EXPR_SLOTS 16
/* Temporary structure used to pass a stack allocated region through
* duk_safe_call().
@@ -65776,10 +69159,14 @@ DUK_LOCAL_DECL duk_int_t duk__get_current_pc(duk_compiler_ctx *comp_ctx);
DUK_LOCAL_DECL duk_compiler_instr *duk__get_instr_ptr(duk_compiler_ctx *comp_ctx, duk_int_t pc);
DUK_LOCAL_DECL void duk__emit(duk_compiler_ctx *comp_ctx, duk_instr_t ins);
DUK_LOCAL_DECL void duk__emit_op_only(duk_compiler_ctx *comp_ctx, duk_small_uint_t op);
-DUK_LOCAL_DECL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t a, duk_regconst_t b, duk_regconst_t c);
+DUK_LOCAL_DECL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx,
+ duk_small_uint_t op_flags,
+ duk_regconst_t a,
+ duk_regconst_t b,
+ duk_regconst_t c);
DUK_LOCAL_DECL void duk__emit_a_b(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t a, duk_regconst_t b);
DUK_LOCAL_DECL void duk__emit_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t b, duk_regconst_t c);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL void duk__emit_a(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t a);
DUK_LOCAL_DECL void duk__emit_b(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t b);
#endif
@@ -65793,7 +69180,12 @@ DUK_LOCAL_DECL duk_int_t duk__emit_jump_empty(duk_compiler_ctx *comp_ctx);
DUK_LOCAL_DECL void duk__insert_jump_entry(duk_compiler_ctx *comp_ctx, duk_int_t jump_pc);
DUK_LOCAL_DECL void duk__patch_jump(duk_compiler_ctx *comp_ctx, duk_int_t jump_pc, duk_int_t target_pc);
DUK_LOCAL_DECL void duk__patch_jump_here(duk_compiler_ctx *comp_ctx, duk_int_t jump_pc);
-DUK_LOCAL_DECL void duk__patch_trycatch(duk_compiler_ctx *comp_ctx, duk_int_t ldconst_pc, duk_int_t trycatch_pc, duk_regconst_t reg_catch, duk_regconst_t const_varname, duk_small_uint_t flags);
+DUK_LOCAL_DECL void duk__patch_trycatch(duk_compiler_ctx *comp_ctx,
+ duk_int_t ldconst_pc,
+ duk_int_t trycatch_pc,
+ duk_regconst_t reg_catch,
+ duk_regconst_t const_varname,
+ duk_small_uint_t flags);
DUK_LOCAL_DECL void duk__emit_if_false_skip(duk_compiler_ctx *comp_ctx, duk_regconst_t regconst);
DUK_LOCAL_DECL void duk__emit_if_true_skip(duk_compiler_ctx *comp_ctx, duk_regconst_t regconst);
DUK_LOCAL_DECL void duk__emit_invalid(duk_compiler_ctx *comp_ctx);
@@ -65824,7 +69216,7 @@ duk_regconst_t duk__ivalue_toregconst_raw(duk_compiler_ctx *comp_ctx,
duk_regconst_t forced_reg,
duk_small_uint_t flags);
DUK_LOCAL_DECL duk_regconst_t duk__ivalue_toreg(duk_compiler_ctx *comp_ctx, duk_ivalue *x);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL duk_regconst_t duk__ivalue_totemp(duk_compiler_ctx *comp_ctx, duk_ivalue *x);
#endif
DUK_LOCAL_DECL void duk__ivalue_toforcedreg(duk_compiler_ctx *comp_ctx, duk_ivalue *x, duk_int_t forced_reg);
@@ -65838,7 +69230,13 @@ DUK_LOCAL_DECL duk_bool_t duk__lookup_lhs(duk_compiler_ctx *ctx, duk_regconst_t
/* label handling */
DUK_LOCAL_DECL void duk__add_label(duk_compiler_ctx *comp_ctx, duk_hstring *h_label, duk_int_t pc_label, duk_int_t label_id);
DUK_LOCAL_DECL void duk__update_label_flags(duk_compiler_ctx *comp_ctx, duk_int_t label_id, duk_small_uint_t flags);
-DUK_LOCAL_DECL void duk__lookup_active_label(duk_compiler_ctx *comp_ctx, duk_hstring *h_label, duk_bool_t is_break, duk_int_t *out_label_id, duk_int_t *out_label_catch_depth, duk_int_t *out_label_pc, duk_bool_t *out_is_closest);
+DUK_LOCAL_DECL void duk__lookup_active_label(duk_compiler_ctx *comp_ctx,
+ duk_hstring *h_label,
+ duk_bool_t is_break,
+ duk_int_t *out_label_id,
+ duk_int_t *out_label_catch_depth,
+ duk_int_t *out_label_pc,
+ duk_bool_t *out_is_closest);
DUK_LOCAL_DECL void duk__reset_labels_to_length(duk_compiler_ctx *comp_ctx, duk_size_t len);
/* top-down expression parser */
@@ -65852,26 +69250,32 @@ DUK_LOCAL_DECL void duk__expr(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_s
DUK_LOCAL_DECL void duk__exprtop(duk_compiler_ctx *ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
/* convenience helpers */
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL duk_regconst_t duk__expr_toreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
#endif
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL duk_regconst_t duk__expr_totemp(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
#endif
-DUK_LOCAL_DECL void duk__expr_toforcedreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags, duk_regconst_t forced_reg);
+DUK_LOCAL_DECL void duk__expr_toforcedreg(duk_compiler_ctx *comp_ctx,
+ duk_ivalue *res,
+ duk_small_uint_t rbp_flags,
+ duk_regconst_t forced_reg);
DUK_LOCAL_DECL duk_regconst_t duk__expr_toregconst(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL duk_regconst_t duk__expr_totempconst(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
#endif
DUK_LOCAL_DECL void duk__expr_toplain(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
DUK_LOCAL_DECL void duk__expr_toplain_ignore(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
DUK_LOCAL_DECL duk_regconst_t duk__exprtop_toreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL duk_regconst_t duk__exprtop_totemp(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
#endif
-DUK_LOCAL_DECL void duk__exprtop_toforcedreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags, duk_regconst_t forced_reg);
+DUK_LOCAL_DECL void duk__exprtop_toforcedreg(duk_compiler_ctx *comp_ctx,
+ duk_ivalue *res,
+ duk_small_uint_t rbp_flags,
+ duk_regconst_t forced_reg);
DUK_LOCAL_DECL duk_regconst_t duk__exprtop_toregconst(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL_DECL void duk__exprtop_toplain_ignore(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags);
#endif
@@ -65881,7 +69285,11 @@ DUK_LOCAL_DECL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalu
DUK_LOCAL_DECL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *res);
/* statement parsing */
-DUK_LOCAL_DECL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t expr_flags, duk_regconst_t *out_reg_varbind, duk_regconst_t *out_rc_varname);
+DUK_LOCAL_DECL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx,
+ duk_ivalue *res,
+ duk_small_uint_t expr_flags,
+ duk_regconst_t *out_reg_varbind,
+ duk_regconst_t *out_rc_varname);
DUK_LOCAL_DECL void duk__parse_var_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t expr_flags);
DUK_LOCAL_DECL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_int_t pc_label_site);
DUK_LOCAL_DECL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_int_t pc_label_site);
@@ -65895,18 +69303,25 @@ DUK_LOCAL_DECL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *
DUK_LOCAL_DECL void duk__parse_with_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res);
DUK_LOCAL_DECL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_bool_t allow_source_elem);
DUK_LOCAL_DECL duk_int_t duk__stmt_label_site(duk_compiler_ctx *comp_ctx, duk_int_t label_id);
-DUK_LOCAL_DECL void duk__parse_stmts(duk_compiler_ctx *comp_ctx, duk_bool_t allow_source_elem, duk_bool_t expect_eof, duk_bool_t regexp_after);
-
-DUK_LOCAL_DECL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expect_eof, duk_bool_t implicit_return_value, duk_bool_t regexp_after, duk_small_int_t expect_token);
+DUK_LOCAL_DECL void duk__parse_stmts(duk_compiler_ctx *comp_ctx,
+ duk_bool_t allow_source_elem,
+ duk_bool_t expect_eof,
+ duk_bool_t regexp_after);
+
+DUK_LOCAL_DECL void duk__parse_func_body(duk_compiler_ctx *comp_ctx,
+ duk_bool_t expect_eof,
+ duk_bool_t implicit_return_value,
+ duk_bool_t regexp_after,
+ duk_small_int_t expect_token);
DUK_LOCAL_DECL void duk__parse_func_formals(duk_compiler_ctx *comp_ctx);
DUK_LOCAL_DECL void duk__parse_func_like_raw(duk_compiler_ctx *comp_ctx, duk_small_uint_t flags);
DUK_LOCAL_DECL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, duk_small_uint_t flags);
-#define DUK__FUNC_FLAG_DECL (1 << 0) /* Parsing a function declaration. */
-#define DUK__FUNC_FLAG_GETSET (1 << 1) /* Parsing an object literal getter/setter. */
-#define DUK__FUNC_FLAG_METDEF (1 << 2) /* Parsing an object literal method definition shorthand. */
-#define DUK__FUNC_FLAG_PUSHNAME_PASS1 (1 << 3) /* Push function name when creating template (first pass only). */
-#define DUK__FUNC_FLAG_USE_PREVTOKEN (1 << 4) /* Use prev_token to start function parsing (workaround for object literal). */
+#define DUK__FUNC_FLAG_DECL (1 << 0) /* Parsing a function declaration. */
+#define DUK__FUNC_FLAG_GETSET (1 << 1) /* Parsing an object literal getter/setter. */
+#define DUK__FUNC_FLAG_METDEF (1 << 2) /* Parsing an object literal method definition shorthand. */
+#define DUK__FUNC_FLAG_PUSHNAME_PASS1 (1 << 3) /* Push function name when creating template (first pass only). */
+#define DUK__FUNC_FLAG_USE_PREVTOKEN (1 << 4) /* Use prev_token to start function parsing (workaround for object literal). */
/*
* Parser control values for tokens. The token table is ordered by the
@@ -65923,141 +69338,141 @@ DUK_LOCAL_DECL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, d
/* XXX: actually single step levels would work just fine, clean up */
/* binding power "levels" (see doc/compiler.rst) */
-#define DUK__BP_INVALID 0 /* always terminates led() */
-#define DUK__BP_EOF 2
-#define DUK__BP_CLOSING 4 /* token closes expression, e.g. ')', ']' */
-#define DUK__BP_FOR_EXPR DUK__BP_CLOSING /* bp to use when parsing a top level Expression */
-#define DUK__BP_COMMA 6
-#define DUK__BP_ASSIGNMENT 8
-#define DUK__BP_CONDITIONAL 10
-#define DUK__BP_LOR 12
-#define DUK__BP_LAND 14
-#define DUK__BP_BOR 16
-#define DUK__BP_BXOR 18
-#define DUK__BP_BAND 20
-#define DUK__BP_EQUALITY 22
-#define DUK__BP_RELATIONAL 24
-#define DUK__BP_SHIFT 26
-#define DUK__BP_ADDITIVE 28
-#define DUK__BP_MULTIPLICATIVE 30
-#define DUK__BP_EXPONENTIATION 32
-#define DUK__BP_POSTFIX 34
-#define DUK__BP_CALL 36
-#define DUK__BP_MEMBER 38
+#define DUK__BP_INVALID 0 /* always terminates led() */
+#define DUK__BP_EOF 2
+#define DUK__BP_CLOSING 4 /* token closes expression, e.g. ')', ']' */
+#define DUK__BP_FOR_EXPR DUK__BP_CLOSING /* bp to use when parsing a top level Expression */
+#define DUK__BP_COMMA 6
+#define DUK__BP_ASSIGNMENT 8
+#define DUK__BP_CONDITIONAL 10
+#define DUK__BP_LOR 12
+#define DUK__BP_LAND 14
+#define DUK__BP_BOR 16
+#define DUK__BP_BXOR 18
+#define DUK__BP_BAND 20
+#define DUK__BP_EQUALITY 22
+#define DUK__BP_RELATIONAL 24
+#define DUK__BP_SHIFT 26
+#define DUK__BP_ADDITIVE 28
+#define DUK__BP_MULTIPLICATIVE 30
+#define DUK__BP_EXPONENTIATION 32
+#define DUK__BP_POSTFIX 34
+#define DUK__BP_CALL 36
+#define DUK__BP_MEMBER 38
#define DUK__TOKEN_LBP_BP_MASK 0x1f
-#define DUK__TOKEN_LBP_FLAG_NO_REGEXP (1 << 5) /* regexp literal must not follow this token */
-#define DUK__TOKEN_LBP_FLAG_TERMINATES (1 << 6) /* terminates expression; e.g. post-increment/-decrement */
-#define DUK__TOKEN_LBP_FLAG_UNUSED (1 << 7) /* unused */
+#define DUK__TOKEN_LBP_FLAG_NO_REGEXP (1 << 5) /* regexp literal must not follow this token */
+#define DUK__TOKEN_LBP_FLAG_TERMINATES (1 << 6) /* terminates expression; e.g. post-increment/-decrement */
+#define DUK__TOKEN_LBP_FLAG_UNUSED (1 << 7) /* unused */
-#define DUK__TOKEN_LBP_GET_BP(x) ((duk_small_uint_t) (((x) & DUK__TOKEN_LBP_BP_MASK) * 2))
+#define DUK__TOKEN_LBP_GET_BP(x) ((duk_small_uint_t) (((x) &DUK__TOKEN_LBP_BP_MASK) * 2))
-#define DUK__MK_LBP(bp) ((bp) >> 1) /* bp is assumed to be even */
-#define DUK__MK_LBP_FLAGS(bp,flags) (((bp) >> 1) | (flags))
+#define DUK__MK_LBP(bp) ((bp) >> 1) /* bp is assumed to be even */
+#define DUK__MK_LBP_FLAGS(bp, flags) (((bp) >> 1) | (flags))
DUK_LOCAL const duk_uint8_t duk__token_lbp[] = {
- DUK__MK_LBP(DUK__BP_EOF), /* DUK_TOK_EOF */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_IDENTIFIER */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_BREAK */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CASE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CATCH */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CONTINUE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DEBUGGER */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DEFAULT */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DELETE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DO */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_ELSE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_FINALLY */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_FOR */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_FUNCTION */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_IF */
- DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_IN */
- DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_INSTANCEOF */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_NEW */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_RETURN */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SWITCH */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_THIS */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_THROW */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_TRY */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_TYPEOF */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_VAR */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CONST */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_VOID */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_WHILE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_WITH */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CLASS */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_ENUM */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_EXPORT */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_EXTENDS */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_IMPORT */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SUPER */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_NULL */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_TRUE */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_FALSE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_GET */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SET */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_IMPLEMENTS */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_INTERFACE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_LET */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PACKAGE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PRIVATE */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PROTECTED */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PUBLIC */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_STATIC */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_YIELD */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_LCURLY */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_RCURLY */
- DUK__MK_LBP(DUK__BP_MEMBER), /* DUK_TOK_LBRACKET */
- DUK__MK_LBP_FLAGS(DUK__BP_CLOSING, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_RBRACKET */
- DUK__MK_LBP(DUK__BP_CALL), /* DUK_TOK_LPAREN */
- DUK__MK_LBP_FLAGS(DUK__BP_CLOSING, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_RPAREN */
- DUK__MK_LBP(DUK__BP_MEMBER), /* DUK_TOK_PERIOD */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SEMICOLON */
- DUK__MK_LBP(DUK__BP_COMMA), /* DUK_TOK_COMMA */
- DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_LT */
- DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_GT */
- DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_LE */
- DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_GE */
- DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_EQ */
- DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_NEQ */
- DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_SEQ */
- DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_SNEQ */
- DUK__MK_LBP(DUK__BP_ADDITIVE), /* DUK_TOK_ADD */
- DUK__MK_LBP(DUK__BP_ADDITIVE), /* DUK_TOK_SUB */
- DUK__MK_LBP(DUK__BP_MULTIPLICATIVE), /* DUK_TOK_MUL */
- DUK__MK_LBP(DUK__BP_MULTIPLICATIVE), /* DUK_TOK_DIV */
- DUK__MK_LBP(DUK__BP_MULTIPLICATIVE), /* DUK_TOK_MOD */
- DUK__MK_LBP(DUK__BP_EXPONENTIATION), /* DUK_TOK_EXP */
- DUK__MK_LBP_FLAGS(DUK__BP_POSTFIX, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_INCREMENT */
- DUK__MK_LBP_FLAGS(DUK__BP_POSTFIX, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_DECREMENT */
- DUK__MK_LBP(DUK__BP_SHIFT), /* DUK_TOK_ALSHIFT */
- DUK__MK_LBP(DUK__BP_SHIFT), /* DUK_TOK_ARSHIFT */
- DUK__MK_LBP(DUK__BP_SHIFT), /* DUK_TOK_RSHIFT */
- DUK__MK_LBP(DUK__BP_BAND), /* DUK_TOK_BAND */
- DUK__MK_LBP(DUK__BP_BOR), /* DUK_TOK_BOR */
- DUK__MK_LBP(DUK__BP_BXOR), /* DUK_TOK_BXOR */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_LNOT */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_BNOT */
- DUK__MK_LBP(DUK__BP_LAND), /* DUK_TOK_LAND */
- DUK__MK_LBP(DUK__BP_LOR), /* DUK_TOK_LOR */
- DUK__MK_LBP(DUK__BP_CONDITIONAL), /* DUK_TOK_QUESTION */
- DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_COLON */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_EQUALSIGN */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_ADD_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_SUB_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_MUL_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_DIV_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_MOD_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_EXP_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_ALSHIFT_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_ARSHIFT_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_RSHIFT_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_BAND_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_BOR_EQ */
- DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_BXOR_EQ */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_NUMBER */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_STRING */
- DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_REGEXP */
+ DUK__MK_LBP(DUK__BP_EOF), /* DUK_TOK_EOF */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_IDENTIFIER */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_BREAK */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CASE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CATCH */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CONTINUE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DEBUGGER */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DEFAULT */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DELETE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_DO */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_ELSE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_FINALLY */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_FOR */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_FUNCTION */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_IF */
+ DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_IN */
+ DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_INSTANCEOF */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_NEW */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_RETURN */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SWITCH */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_THIS */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_THROW */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_TRY */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_TYPEOF */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_VAR */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CONST */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_VOID */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_WHILE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_WITH */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_CLASS */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_ENUM */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_EXPORT */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_EXTENDS */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_IMPORT */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SUPER */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_NULL */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_TRUE */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_FALSE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_GET */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SET */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_IMPLEMENTS */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_INTERFACE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_LET */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PACKAGE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PRIVATE */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PROTECTED */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_PUBLIC */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_STATIC */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_YIELD */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_LCURLY */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_RCURLY */
+ DUK__MK_LBP(DUK__BP_MEMBER), /* DUK_TOK_LBRACKET */
+ DUK__MK_LBP_FLAGS(DUK__BP_CLOSING, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_RBRACKET */
+ DUK__MK_LBP(DUK__BP_CALL), /* DUK_TOK_LPAREN */
+ DUK__MK_LBP_FLAGS(DUK__BP_CLOSING, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_RPAREN */
+ DUK__MK_LBP(DUK__BP_MEMBER), /* DUK_TOK_PERIOD */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_SEMICOLON */
+ DUK__MK_LBP(DUK__BP_COMMA), /* DUK_TOK_COMMA */
+ DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_LT */
+ DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_GT */
+ DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_LE */
+ DUK__MK_LBP(DUK__BP_RELATIONAL), /* DUK_TOK_GE */
+ DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_EQ */
+ DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_NEQ */
+ DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_SEQ */
+ DUK__MK_LBP(DUK__BP_EQUALITY), /* DUK_TOK_SNEQ */
+ DUK__MK_LBP(DUK__BP_ADDITIVE), /* DUK_TOK_ADD */
+ DUK__MK_LBP(DUK__BP_ADDITIVE), /* DUK_TOK_SUB */
+ DUK__MK_LBP(DUK__BP_MULTIPLICATIVE), /* DUK_TOK_MUL */
+ DUK__MK_LBP(DUK__BP_MULTIPLICATIVE), /* DUK_TOK_DIV */
+ DUK__MK_LBP(DUK__BP_MULTIPLICATIVE), /* DUK_TOK_MOD */
+ DUK__MK_LBP(DUK__BP_EXPONENTIATION), /* DUK_TOK_EXP */
+ DUK__MK_LBP_FLAGS(DUK__BP_POSTFIX, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_INCREMENT */
+ DUK__MK_LBP_FLAGS(DUK__BP_POSTFIX, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_DECREMENT */
+ DUK__MK_LBP(DUK__BP_SHIFT), /* DUK_TOK_ALSHIFT */
+ DUK__MK_LBP(DUK__BP_SHIFT), /* DUK_TOK_ARSHIFT */
+ DUK__MK_LBP(DUK__BP_SHIFT), /* DUK_TOK_RSHIFT */
+ DUK__MK_LBP(DUK__BP_BAND), /* DUK_TOK_BAND */
+ DUK__MK_LBP(DUK__BP_BOR), /* DUK_TOK_BOR */
+ DUK__MK_LBP(DUK__BP_BXOR), /* DUK_TOK_BXOR */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_LNOT */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_BNOT */
+ DUK__MK_LBP(DUK__BP_LAND), /* DUK_TOK_LAND */
+ DUK__MK_LBP(DUK__BP_LOR), /* DUK_TOK_LOR */
+ DUK__MK_LBP(DUK__BP_CONDITIONAL), /* DUK_TOK_QUESTION */
+ DUK__MK_LBP(DUK__BP_INVALID), /* DUK_TOK_COLON */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_EQUALSIGN */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_ADD_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_SUB_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_MUL_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_DIV_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_MOD_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_EXP_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_ALSHIFT_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_ARSHIFT_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_RSHIFT_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_BAND_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_BOR_EQ */
+ DUK__MK_LBP(DUK__BP_ASSIGNMENT), /* DUK_TOK_BXOR_EQ */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_NUMBER */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_STRING */
+ DUK__MK_LBP_FLAGS(DUK__BP_INVALID, DUK__TOKEN_LBP_FLAG_NO_REGEXP), /* DUK_TOK_REGEXP */
};
/*
@@ -66088,8 +69503,7 @@ DUK_LOCAL duk_bool_t duk__hstring_is_eval_or_arguments(duk_compiler_ctx *comp_ct
DUK_LOCAL duk_bool_t duk__hstring_is_eval_or_arguments_in_strict_mode(duk_compiler_ctx *comp_ctx, duk_hstring *h) {
DUK_ASSERT(h != NULL);
- return (comp_ctx->curr_func.is_strict &&
- DUK_HSTRING_HAS_EVAL_OR_ARGUMENTS(h));
+ return (comp_ctx->curr_func.is_strict && DUK_HSTRING_HAS_EVAL_OR_ARGUMENTS(h));
}
/*
@@ -66104,8 +69518,8 @@ DUK_LOCAL void duk__advance_helper(duk_compiler_ctx *comp_ctx, duk_small_int_t e
duk_hthread *thr = comp_ctx->thr;
duk_bool_t regexp;
- DUK_ASSERT_DISABLE(comp_ctx->curr_token.t >= 0); /* unsigned */
- DUK_ASSERT(comp_ctx->curr_token.t <= DUK_TOK_MAXVAL); /* MAXVAL is inclusive */
+ DUK_ASSERT_DISABLE(comp_ctx->curr_token.t >= 0); /* unsigned */
+ DUK_ASSERT(comp_ctx->curr_token.t <= DUK_TOK_MAXVAL); /* MAXVAL is inclusive */
/*
* Use current token to decide whether a RegExp can follow.
@@ -66130,8 +69544,7 @@ DUK_LOCAL void duk__advance_helper(duk_compiler_ctx *comp_ctx, duk_small_int_t e
}
if (expect >= 0 && comp_ctx->curr_token.t != (duk_small_uint_t) expect) {
- DUK_D(DUK_DPRINT("parse error: expect=%ld, got=%ld",
- (long) expect, (long) comp_ctx->curr_token.t));
+ DUK_D(DUK_DPRINT("parse error: expect=%ld, got=%ld", (long) expect, (long) comp_ctx->curr_token.t));
DUK_ERROR_SYNTAX(thr, DUK_STR_PARSE_ERROR);
DUK_WO_NORETURN(return;);
}
@@ -66142,10 +69555,7 @@ DUK_LOCAL void duk__advance_helper(duk_compiler_ctx *comp_ctx, duk_small_int_t e
duk_copy(thr, comp_ctx->tok12_idx, comp_ctx->tok22_idx);
/* parse new token */
- duk_lexer_parse_js_input_element(&comp_ctx->lex,
- &comp_ctx->curr_token,
- comp_ctx->curr_func.is_strict,
- regexp);
+ duk_lexer_parse_js_input_element(&comp_ctx->lex, &comp_ctx->curr_token, comp_ctx->curr_func.is_strict, regexp);
DUK_DDD(DUK_DDDPRINT("advance: curr: tok=%ld/%ld,%ld,term=%ld,%!T,%!T "
"prev: tok=%ld/%ld,%ld,term=%ld,%!T,%!T",
@@ -66185,7 +69595,7 @@ DUK_LOCAL void duk__init_func_valstack_slots(duk_compiler_ctx *comp_ctx) {
entry_top = duk_get_top(thr);
- duk_memzero(func, sizeof(*func)); /* intentional overlap with earlier memzero */
+ duk_memzero(func, sizeof(*func)); /* intentional overlap with earlier memzero */
#if defined(DUK_USE_EXPLICIT_NULL_INIT)
func->h_name = NULL;
func->h_consts = NULL;
@@ -66351,7 +69761,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
h_res = duk_push_hcompfunc(thr);
DUK_ASSERT(h_res != NULL);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) h_res) == thr->builtins[DUK_BIDX_FUNCTION_PROTOTYPE]);
- DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr, (duk_hobject *) h_res, NULL); /* Function templates are "bare objects". */
+ DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr, (duk_hobject *) h_res, NULL); /* Function templates are "bare objects". */
if (func->is_function) {
DUK_DDD(DUK_DDDPRINT("function -> set NEWENV"));
@@ -66420,16 +69830,19 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
code_count = DUK_BW_GET_SIZE(thr, &func->bw_code) / sizeof(duk_compiler_instr);
code_size = code_count * sizeof(duk_instr_t);
- data_size = consts_count * sizeof(duk_tval) +
- funcs_count * sizeof(duk_hobject *) +
- code_size;
+ data_size = consts_count * sizeof(duk_tval) + funcs_count * sizeof(duk_hobject *) + code_size;
DUK_DDD(DUK_DDDPRINT("consts_count=%ld, funcs_count=%ld, code_size=%ld -> "
"data_size=%ld*%ld + %ld*%ld + %ld = %ld",
- (long) consts_count, (long) funcs_count, (long) code_size,
- (long) consts_count, (long) sizeof(duk_tval),
- (long) funcs_count, (long) sizeof(duk_hobject *),
- (long) code_size, (long) data_size));
+ (long) consts_count,
+ (long) funcs_count,
+ (long) code_size,
+ (long) consts_count,
+ (long) sizeof(duk_tval),
+ (long) funcs_count,
+ (long) sizeof(duk_hobject *),
+ (long) code_size,
+ (long) data_size));
duk_push_fixed_buffer_nozero(thr, data_size);
h_data = (duk_hbuffer_fixed *) (void *) duk_known_hbuffer(thr, -1);
@@ -66439,12 +69852,12 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
p_const = (duk_tval *) (void *) DUK_HBUFFER_FIXED_GET_DATA_PTR(thr->heap, h_data);
for (i = 0; i < consts_count; i++) {
- DUK_ASSERT(i <= DUK_UARRIDX_MAX); /* const limits */
+ DUK_ASSERT(i <= DUK_UARRIDX_MAX); /* const limits */
tv = duk_hobject_find_array_entry_tval_ptr(thr->heap, func->h_consts, (duk_uarridx_t) i);
DUK_ASSERT(tv != NULL);
DUK_TVAL_SET_TVAL(p_const, tv);
p_const++;
- DUK_TVAL_INCREF(thr, tv); /* may be a string constant */
+ DUK_TVAL_INCREF(thr, tv); /* may be a string constant */
DUK_DDD(DUK_DDDPRINT("constant: %!T", (duk_tval *) tv));
}
@@ -66453,7 +69866,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
DUK_HCOMPFUNC_SET_FUNCS(thr->heap, h_res, p_func);
for (i = 0; i < funcs_count; i++) {
duk_hobject *h;
- DUK_ASSERT(i * 3 <= DUK_UARRIDX_MAX); /* func limits */
+ DUK_ASSERT(i * 3 <= DUK_UARRIDX_MAX); /* func limits */
tv = duk_hobject_find_array_entry_tval_ptr(thr->heap, func->h_funcs, (duk_uarridx_t) (i * 3));
DUK_ASSERT(tv != NULL);
DUK_ASSERT(DUK_TVAL_IS_OBJECT(tv));
@@ -66463,8 +69876,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
*p_func++ = h;
DUK_HOBJECT_INCREF(thr, h);
- DUK_DDD(DUK_DDDPRINT("inner function: %p -> %!iO",
- (void *) h, (duk_heaphdr *) h));
+ DUK_DDD(DUK_DDDPRINT("inner function: %p -> %!iO", (void *) h, (duk_heaphdr *) h));
}
p_instr = (duk_instr_t *) p_func;
@@ -66479,7 +69891,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
DUK_ASSERT((duk_uint8_t *) (p_instr + code_count) == DUK_HBUFFER_FIXED_GET_DATA_PTR(thr->heap, h_data) + data_size);
- duk_pop(thr); /* 'data' (and everything in it) is reachable through h_res now */
+ duk_pop(thr); /* 'data' (and everything in it) is reachable through h_res now */
/*
* Init non-property result fields
@@ -66494,7 +69906,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
DUK_ASSERT(func->temp_max >= 0);
h_res->nregs = (duk_uint16_t) func->temp_max;
h_res->nargs = (duk_uint16_t) duk_hobject_get_length(thr, func->h_argnames);
- DUK_ASSERT(h_res->nregs >= h_res->nargs); /* pass2 allocation handles this */
+ DUK_ASSERT(h_res->nregs >= h_res->nargs); /* pass2 allocation handles this */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
h_res->start_line = (duk_uint32_t) func->min_line;
h_res->end_line = (duk_uint32_t) func->max_line;
@@ -66522,11 +69934,13 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
DUK_DD(DUK_DDPRINT("keeping _Varmap because debugger support is enabled"));
keep_varmap = 1;
#else
- if (func->id_access_slow_own || /* directly uses slow accesses that may match own variables */
- func->id_access_arguments || /* accesses 'arguments' directly */
- func->may_direct_eval || /* may indirectly slow access through a direct eval */
- funcs_count > 0) { /* has inner functions which may slow access (XXX: this can be optimized by looking at the inner functions) */
- DUK_DD(DUK_DDPRINT("keeping _Varmap because of direct eval, slow path access that may match local variables, or presence of inner functions"));
+ if (func->id_access_slow_own || /* directly uses slow accesses that may match own variables */
+ func->id_access_arguments || /* accesses 'arguments' directly */
+ func->may_direct_eval || /* may indirectly slow access through a direct eval */
+ funcs_count >
+ 0) { /* has inner functions which may slow access (XXX: this can be optimized by looking at the inner functions) */
+ DUK_DD(DUK_DDPRINT("keeping _Varmap because of direct eval, slow path access that may match local variables, or "
+ "presence of inner functions"));
keep_varmap = 1;
} else {
DUK_DD(DUK_DDPRINT("dropping _Varmap"));
@@ -66538,8 +69952,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
duk_int_t num_used;
duk_dup(thr, func->varmap_idx);
num_used = duk__cleanup_varmap(comp_ctx);
- DUK_DDD(DUK_DDDPRINT("cleaned up varmap: %!T (num_used=%ld)",
- (duk_tval *) duk_get_tval(thr, -1), (long) num_used));
+ DUK_DDD(DUK_DDDPRINT("cleaned up varmap: %!T (num_used=%ld)", (duk_tval *) duk_get_tval(thr, -1), (long) num_used));
if (num_used > 0) {
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_VARMAP, DUK_PROPDESC_FLAGS_NONE);
@@ -66568,12 +69981,12 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
*/
DUK_DD(DUK_DDPRINT("keeping _Formals because _Formals.length != nargs"));
keep_formals = 1;
- } else if ((func->id_access_arguments || func->may_direct_eval) &&
- (formals_length > 0)) {
+ } else if ((func->id_access_arguments || func->may_direct_eval) && (formals_length > 0)) {
/* Direct eval (may access 'arguments') or accesses 'arguments'
* explicitly: keep _Formals unless it is zero length.
*/
- DUK_DD(DUK_DDPRINT("keeping _Formals because of direct eval or explicit access to 'arguments', and _Formals.length != 0"));
+ DUK_DD(DUK_DDPRINT(
+ "keeping _Formals because of direct eval or explicit access to 'arguments', and _Formals.length != 0"));
keep_formals = 1;
} else {
DUK_DD(DUK_DDPRINT("omitting _Formals, nargs matches _Formals.length, so no properties added"));
@@ -66593,7 +70006,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
DUK_DD(DUK_DDPRINT("setting function template .name to %!T", duk_get_tval(thr, -1)));
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_NAME, DUK_PROPDESC_FLAGS_NONE);
}
-#endif /* DUK_USE_FUNC_NAME_PROPERTY */
+#endif /* DUK_USE_FUNC_NAME_PROPERTY */
/* _Source */
#if defined(DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY)
@@ -66641,7 +70054,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_SOURCE, DUK_PROPDESC_FLAGS_NONE);
#endif
}
-#endif /* DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY */
+#endif /* DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY */
/* _Pc2line */
#if defined(DUK_USE_PC2LINE)
@@ -66651,14 +70064,14 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
*/
DUK_ASSERT(code_count <= DUK_COMPILER_MAX_BYTECODE_LENGTH);
- duk_hobject_pc2line_pack(thr, q_instr, (duk_uint_fast32_t) code_count); /* -> pushes fixed buffer */
+ duk_hobject_pc2line_pack(thr, q_instr, (duk_uint_fast32_t) code_count); /* -> pushes fixed buffer */
duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_INT_PC2LINE, DUK_PROPDESC_FLAGS_NONE);
/* XXX: if assertions enabled, walk through all valid PCs
* and check line mapping.
*/
}
-#endif /* DUK_USE_PC2LINE */
+#endif /* DUK_USE_PC2LINE */
/* fileName */
#if defined(DUK_USE_FUNC_FILENAME_PROPERTY)
@@ -66672,8 +70085,7 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
}
#endif
- DUK_DD(DUK_DDPRINT("converted function: %!ixT",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DD(DUK_DDPRINT("converted function: %!ixT", (duk_tval *) duk_get_tval(thr, -1)));
/*
* Compact the function template.
@@ -66745,14 +70157,14 @@ DUK_LOCAL void duk__convert_to_func_template(duk_compiler_ctx *comp_ctx) {
/* Code emission flags, passed in the 'opcode' field. Opcode + flags
* fit into 16 bits for now, so use duk_small_uint_t.
*/
-#define DUK__EMIT_FLAG_NO_SHUFFLE_A (1 << 8)
-#define DUK__EMIT_FLAG_NO_SHUFFLE_B (1 << 9)
-#define DUK__EMIT_FLAG_NO_SHUFFLE_C (1 << 10)
-#define DUK__EMIT_FLAG_A_IS_SOURCE (1 << 11) /* slot A is a source (default: target) */
-#define DUK__EMIT_FLAG_B_IS_TARGET (1 << 12) /* slot B is a target (default: source) */
-#define DUK__EMIT_FLAG_C_IS_TARGET (1 << 13) /* slot C is a target (default: source) */
-#define DUK__EMIT_FLAG_BC_REGCONST (1 << 14) /* slots B and C are reg/const */
-#define DUK__EMIT_FLAG_RESERVE_JUMPSLOT (1 << 15) /* reserve a jumpslot after instr before target spilling, used for NEXTENUM */
+#define DUK__EMIT_FLAG_NO_SHUFFLE_A (1 << 8)
+#define DUK__EMIT_FLAG_NO_SHUFFLE_B (1 << 9)
+#define DUK__EMIT_FLAG_NO_SHUFFLE_C (1 << 10)
+#define DUK__EMIT_FLAG_A_IS_SOURCE (1 << 11) /* slot A is a source (default: target) */
+#define DUK__EMIT_FLAG_B_IS_TARGET (1 << 12) /* slot B is a target (default: source) */
+#define DUK__EMIT_FLAG_C_IS_TARGET (1 << 13) /* slot C is a target (default: source) */
+#define DUK__EMIT_FLAG_BC_REGCONST (1 << 14) /* slots B and C are reg/const */
+#define DUK__EMIT_FLAG_RESERVE_JUMPSLOT (1 << 15) /* reserve a jumpslot after instr before target spilling, used for NEXTENUM */
/* XXX: macro smaller than call? */
DUK_LOCAL duk_int_t duk__get_current_pc(duk_compiler_ctx *comp_ctx) {
@@ -66763,7 +70175,8 @@ DUK_LOCAL duk_int_t duk__get_current_pc(duk_compiler_ctx *comp_ctx) {
DUK_LOCAL duk_compiler_instr *duk__get_instr_ptr(duk_compiler_ctx *comp_ctx, duk_int_t pc) {
DUK_ASSERT(pc >= 0);
- DUK_ASSERT((duk_size_t) pc < (duk_size_t) (DUK_BW_GET_SIZE(comp_ctx->thr, &comp_ctx->curr_func.bw_code) / sizeof(duk_compiler_instr)));
+ DUK_ASSERT((duk_size_t) pc <
+ (duk_size_t) (DUK_BW_GET_SIZE(comp_ctx->thr, &comp_ctx->curr_func.bw_code) / sizeof(duk_compiler_instr)));
return ((duk_compiler_instr *) (void *) DUK_BW_GET_BASEPTR(comp_ctx->thr, &comp_ctx->curr_func.bw_code)) + pc;
}
@@ -66783,7 +70196,9 @@ DUK_LOCAL void duk__emit(duk_compiler_ctx *comp_ctx, duk_instr_t ins) {
(long) duk__get_current_pc(comp_ctx),
(duk_instr_t) ins));
- instr = (duk_compiler_instr *) (void *) DUK_BW_ENSURE_GETPTR(comp_ctx->thr, &comp_ctx->curr_func.bw_code, sizeof(duk_compiler_instr));
+ instr = (duk_compiler_instr *) (void *) DUK_BW_ENSURE_GETPTR(comp_ctx->thr,
+ &comp_ctx->curr_func.bw_code,
+ sizeof(duk_compiler_instr));
DUK_BW_ADD_PTR(comp_ctx->thr, &comp_ctx->curr_func.bw_code, sizeof(duk_compiler_instr));
#if defined(DUK_USE_PC2LINE)
@@ -66834,7 +70249,7 @@ DUK_LOCAL void duk__emit(duk_compiler_ctx *comp_ctx, duk_instr_t ins) {
return;
- fail_bc_limit:
+fail_bc_limit:
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_BYTECODE_LIMIT);
DUK_WO_NORETURN(return;);
}
@@ -66868,7 +70283,11 @@ DUK_LOCAL void duk__emit_op_only(duk_compiler_ctx *comp_ctx, duk_small_uint_t op
}
/* Important main primitive. */
-DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t a, duk_regconst_t b, duk_regconst_t c) {
+DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx,
+ duk_small_uint_t op_flags,
+ duk_regconst_t a,
+ duk_regconst_t b,
+ duk_regconst_t c) {
duk_instr_t ins = 0;
duk_int_t a_out = -1;
duk_int_t b_out = -1;
@@ -66876,8 +70295,7 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
duk_int_t tmp;
duk_small_uint_t op = op_flags & 0xffU;
- DUK_DDD(DUK_DDDPRINT("emit: op_flags=%04lx, a=%ld, b=%ld, c=%ld",
- (unsigned long) op_flags, (long) a, (long) b, (long) c));
+ DUK_DDD(DUK_DDDPRINT("emit: op_flags=%04lx, a=%ld, b=%ld, c=%ld", (unsigned long) op_flags, (long) a, (long) b, (long) c));
/* We could rely on max temp/const checks: if they don't exceed BC
* limit, nothing here can either (just asserts would be enough).
@@ -66886,11 +70304,11 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
* bugs.
*/
- DUK_ASSERT_DISABLE((op_flags & 0xff) >= DUK_BC_OP_MIN); /* unsigned */
+ DUK_ASSERT_DISABLE((op_flags & 0xff) >= DUK_BC_OP_MIN); /* unsigned */
DUK_ASSERT((op_flags & 0xff) <= DUK_BC_OP_MAX);
DUK_ASSERT(DUK__ISREG(a));
- DUK_ASSERT(b != -1); /* Not 'none'. */
- DUK_ASSERT(c != -1); /* Not 'none'. */
+ DUK_ASSERT(b != -1); /* Not 'none'. */
+ DUK_ASSERT(c != -1); /* Not 'none'. */
/* Input shuffling happens before the actual operation, while output
* shuffling happens afterwards. Output shuffling decisions are still
@@ -66952,7 +70370,7 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
if (op_flags & DUK__EMIT_FLAG_BC_REGCONST) {
/* Opcode follows B/C reg/const convention. */
DUK_ASSERT((op & 0x01) == 0);
- ins |= DUK_ENC_OP_A_B_C(0x01, 0, 0, 0); /* const flag for B */
+ ins |= DUK_ENC_OP_A_B_C(0x01, 0, 0, 0); /* const flag for B */
} else {
DUK_D(DUK_DPRINT("B is const, opcode is not B/C reg/const: %x", op_flags));
}
@@ -66975,7 +70393,8 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
} else if (op_flags & DUK__EMIT_FLAG_NO_SHUFFLE_B) {
if (b > DUK_BC_B_MAX) {
/* Note: 0xff != DUK_BC_B_MAX */
- DUK_D(DUK_DPRINT("out of regs: 'b' (reg) needs shuffling but shuffle prohibited, b: %ld", (long) b));
+ DUK_D(
+ DUK_DPRINT("out of regs: 'b' (reg) needs shuffling but shuffle prohibited, b: %ld", (long) b));
goto error_outofregs;
}
} else if (b <= DUK_BC_BC_MAX) {
@@ -66996,7 +70415,7 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
duk__emit_load_int32_noshuffle(comp_ctx, tmp, b);
DUK_ASSERT(DUK_OP_MPUTOBJI == DUK_OP_MPUTOBJ + 1);
DUK_ASSERT(DUK_OP_MPUTARRI == DUK_OP_MPUTARR + 1);
- op_flags++; /* indirect opcode follows direct */
+ op_flags++; /* indirect opcode follows direct */
} else {
duk__emit(comp_ctx, DUK_ENC_OP_A_BC(DUK_OP_LDREG, tmp, b));
}
@@ -67022,7 +70441,7 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
if (op_flags & DUK__EMIT_FLAG_BC_REGCONST) {
/* Opcode follows B/C reg/const convention. */
DUK_ASSERT((op & 0x02) == 0);
- ins |= DUK_ENC_OP_A_B_C(0x02, 0, 0, 0); /* const flag for C */
+ ins |= DUK_ENC_OP_A_B_C(0x02, 0, 0, 0); /* const flag for C */
} else {
DUK_D(DUK_DPRINT("C is const, opcode is not B/C reg/const: %x", op_flags));
}
@@ -67045,7 +70464,8 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
} else if (op_flags & DUK__EMIT_FLAG_NO_SHUFFLE_C) {
if (c > DUK_BC_C_MAX) {
/* Note: 0xff != DUK_BC_C_MAX */
- DUK_D(DUK_DPRINT("out of regs: 'c' (reg) needs shuffling but shuffle prohibited, c: %ld", (long) c));
+ DUK_D(
+ DUK_DPRINT("out of regs: 'c' (reg) needs shuffling but shuffle prohibited, c: %ld", (long) c));
goto error_outofregs;
}
} else if (c <= DUK_BC_BC_MAX) {
@@ -67119,7 +70539,7 @@ DUK_LOCAL void duk__emit_a_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_f
return;
- error_outofregs:
+error_outofregs:
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_REG_LIMIT);
DUK_WO_NORETURN(return;);
}
@@ -67147,7 +70567,7 @@ DUK_LOCAL void duk__emit_b_c(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_fla
duk__emit_a_b_c(comp_ctx, op_flags, 0, b, c);
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL void duk__emit_a(duk_compiler_ctx *comp_ctx, int op_flags, int a) {
#if defined(DUK_USE_SHUFFLE_TORTURE)
op_flags |= DUK__EMIT_FLAG_NO_SHUFFLE_B | DUK__EMIT_FLAG_NO_SHUFFLE_C;
@@ -67156,7 +70576,7 @@ DUK_LOCAL void duk__emit_a(duk_compiler_ctx *comp_ctx, int op_flags, int a) {
}
#endif
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL void duk__emit_b(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_flags, duk_regconst_t b) {
#if defined(DUK_USE_SHUFFLE_TORTURE)
op_flags |= DUK__EMIT_FLAG_NO_SHUFFLE_A | DUK__EMIT_FLAG_NO_SHUFFLE_C;
@@ -67170,10 +70590,10 @@ DUK_LOCAL void duk__emit_a_bc(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_fl
duk_int_t tmp;
/* allow caller to give a const number with the DUK__CONST_MARKER */
- DUK_ASSERT(bc != -1); /* Not 'none'. */
+ DUK_ASSERT(bc != -1); /* Not 'none'. */
bc = bc & (~DUK__CONST_MARKER);
- DUK_ASSERT_DISABLE((op_flags & 0xff) >= DUK_BC_OP_MIN); /* unsigned */
+ DUK_ASSERT_DISABLE((op_flags & 0xff) >= DUK_BC_OP_MIN); /* unsigned */
DUK_ASSERT((op_flags & 0xff) <= DUK_BC_OP_MAX);
DUK_ASSERT(bc >= DUK_BC_BC_MIN);
DUK_ASSERT(bc <= DUK_BC_BC_MAX);
@@ -67218,7 +70638,7 @@ DUK_LOCAL void duk__emit_a_bc(duk_compiler_ctx *comp_ctx, duk_small_uint_t op_fl
}
return;
- error_outofregs:
+error_outofregs:
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_REG_LIMIT);
DUK_WO_NORETURN(return;);
}
@@ -67233,12 +70653,12 @@ DUK_LOCAL void duk__emit_bc(duk_compiler_ctx *comp_ctx, duk_small_uint_t op, duk
DUK_LOCAL void duk__emit_abc(duk_compiler_ctx *comp_ctx, duk_small_uint_t op, duk_regconst_t abc) {
duk_instr_t ins;
- DUK_ASSERT_DISABLE(op >= DUK_BC_OP_MIN); /* unsigned */
+ DUK_ASSERT_DISABLE(op >= DUK_BC_OP_MIN); /* unsigned */
DUK_ASSERT(op <= DUK_BC_OP_MAX);
- DUK_ASSERT_DISABLE(abc >= DUK_BC_ABC_MIN); /* unsigned */
+ DUK_ASSERT_DISABLE(abc >= DUK_BC_ABC_MIN); /* unsigned */
DUK_ASSERT(abc <= DUK_BC_ABC_MAX);
DUK_ASSERT((abc & DUK__CONST_MARKER) == 0);
- DUK_ASSERT(abc != -1); /* Not 'none'. */
+ DUK_ASSERT(abc != -1); /* Not 'none'. */
if (abc <= DUK_BC_ABC_MAX) {
;
@@ -67247,18 +70667,25 @@ DUK_LOCAL void duk__emit_abc(duk_compiler_ctx *comp_ctx, duk_small_uint_t op, du
}
ins = DUK_ENC_OP_ABC(op, abc);
DUK_DDD(DUK_DDDPRINT("duk__emit_abc: 0x%08lx line=%ld pc=%ld op=%ld (%!X) abc=%ld (%!I)",
- (unsigned long) ins, (long) comp_ctx->curr_token.start_line,
- (long) duk__get_current_pc(comp_ctx), (long) op, (long) op,
- (long) abc, (duk_instr_t) ins));
+ (unsigned long) ins,
+ (long) comp_ctx->curr_token.start_line,
+ (long) duk__get_current_pc(comp_ctx),
+ (long) op,
+ (long) op,
+ (long) abc,
+ (duk_instr_t) ins));
duk__emit(comp_ctx, ins);
return;
- error_outofregs:
+error_outofregs:
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_REG_LIMIT);
DUK_WO_NORETURN(return;);
}
-DUK_LOCAL void duk__emit_load_int32_raw(duk_compiler_ctx *comp_ctx, duk_regconst_t reg, duk_int32_t val, duk_small_uint_t op_flags) {
+DUK_LOCAL void duk__emit_load_int32_raw(duk_compiler_ctx *comp_ctx,
+ duk_regconst_t reg,
+ duk_int32_t val,
+ duk_small_uint_t op_flags) {
/* XXX: Shuffling support could be implemented here so that LDINT+LDINTX
* would only shuffle once (instead of twice). The current code works
* though, and has a smaller compiler footprint.
@@ -67273,7 +70700,10 @@ DUK_LOCAL void duk__emit_load_int32_raw(duk_compiler_ctx *comp_ctx, duk_regconst
duk_int32_t lo = val & ((((duk_int32_t) 1) << DUK_BC_LDINTX_SHIFT) - 1);
DUK_ASSERT(lo >= 0);
DUK_DDD(DUK_DDDPRINT("emit LDINT+LDINTX to reg %ld for %ld -> hi %ld, lo %ld",
- (long) reg, (long) val, (long) hi, (long) lo));
+ (long) reg,
+ (long) val,
+ (long) hi,
+ (long) lo));
duk__emit_a_bc(comp_ctx, DUK_OP_LDINT | op_flags, reg, (duk_regconst_t) (hi + (duk_int32_t) DUK_BC_LDINT_BIAS));
duk__emit_a_bc(comp_ctx, DUK_OP_LDINTX | op_flags, reg, (duk_regconst_t) lo);
}
@@ -67314,7 +70744,7 @@ DUK_LOCAL void duk__emit_jump(duk_compiler_ctx *comp_ctx, duk_int_t target_pc) {
DUK_LOCAL duk_int_t duk__emit_jump_empty(duk_compiler_ctx *comp_ctx) {
duk_int_t ret;
- ret = duk__get_current_pc(comp_ctx); /* useful for patching jumps later */
+ ret = duk__get_current_pc(comp_ctx); /* useful for patching jumps later */
duk__emit_op_only(comp_ctx, DUK_OP_JUMP);
return ret;
}
@@ -67332,13 +70762,10 @@ DUK_LOCAL void duk__insert_jump_entry(duk_compiler_ctx *comp_ctx, duk_int_t jump
DUK_ASSERT(jump_pc >= 0);
offset = (duk_size_t) jump_pc * sizeof(duk_compiler_instr);
instr = (duk_compiler_instr *) (void *)
- DUK_BW_INSERT_ENSURE_AREA(comp_ctx->thr,
- &comp_ctx->curr_func.bw_code,
- offset,
- sizeof(duk_compiler_instr));
+ DUK_BW_INSERT_ENSURE_AREA(comp_ctx->thr, &comp_ctx->curr_func.bw_code, offset, sizeof(duk_compiler_instr));
#if defined(DUK_USE_PC2LINE)
- line = comp_ctx->curr_token.start_line; /* approximation, close enough */
+ line = comp_ctx->curr_token.start_line; /* approximation, close enough */
#endif
instr->ins = DUK_ENC_OP_ABC(DUK_OP_JUMP, 0);
#if defined(DUK_USE_PC2LINE)
@@ -67351,7 +70778,7 @@ DUK_LOCAL void duk__insert_jump_entry(duk_compiler_ctx *comp_ctx, duk_int_t jump
}
return;
- fail_bc_limit:
+fail_bc_limit:
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_BYTECODE_LIMIT);
DUK_WO_NORETURN(return;);
}
@@ -67365,8 +70792,8 @@ DUK_LOCAL void duk__patch_jump(duk_compiler_ctx *comp_ctx, duk_int_t jump_pc, du
/* allow negative PCs, behave as a no-op */
if (jump_pc < 0) {
- DUK_DDD(DUK_DDDPRINT("duk__patch_jump(): nop call, jump_pc=%ld (<0), target_pc=%ld",
- (long) jump_pc, (long) target_pc));
+ DUK_DDD(
+ DUK_DDDPRINT("duk__patch_jump(): nop call, jump_pc=%ld (<0), target_pc=%ld", (long) jump_pc, (long) target_pc));
return;
}
DUK_ASSERT(jump_pc >= 0);
@@ -67380,14 +70807,21 @@ DUK_LOCAL void duk__patch_jump(duk_compiler_ctx *comp_ctx, duk_int_t jump_pc, du
instr->ins = DUK_ENC_OP_ABC(DUK_OP_JUMP, offset + DUK_BC_JUMP_BIAS);
DUK_DDD(DUK_DDDPRINT("duk__patch_jump(): jump_pc=%ld, target_pc=%ld, offset=%ld",
- (long) jump_pc, (long) target_pc, (long) offset));
+ (long) jump_pc,
+ (long) target_pc,
+ (long) offset));
}
DUK_LOCAL void duk__patch_jump_here(duk_compiler_ctx *comp_ctx, duk_int_t jump_pc) {
duk__patch_jump(comp_ctx, jump_pc, duk__get_current_pc(comp_ctx));
}
-DUK_LOCAL void duk__patch_trycatch(duk_compiler_ctx *comp_ctx, duk_int_t ldconst_pc, duk_int_t trycatch_pc, duk_regconst_t reg_catch, duk_regconst_t const_varname, duk_small_uint_t flags) {
+DUK_LOCAL void duk__patch_trycatch(duk_compiler_ctx *comp_ctx,
+ duk_int_t ldconst_pc,
+ duk_int_t trycatch_pc,
+ duk_regconst_t reg_catch,
+ duk_regconst_t const_varname,
+ duk_small_uint_t flags) {
duk_compiler_instr *instr;
DUK_ASSERT(DUK__ISREG(reg_catch));
@@ -67407,7 +70841,10 @@ DUK_LOCAL void duk__patch_trycatch(duk_compiler_ctx *comp_ctx, duk_int_t ldconst
* See: test-bug-trycatch-many-constants.js.
*/
DUK_D(DUK_DPRINT("failed to patch trycatch: flags=%ld, reg_catch=%ld, const_varname=%ld (0x%08lx)",
- (long) flags, (long) reg_catch, (long) const_varname, (long) const_varname));
+ (long) flags,
+ (long) reg_catch,
+ (long) const_varname,
+ (long) const_varname));
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_REG_LIMIT);
DUK_WO_NORETURN(return;);
}
@@ -67430,14 +70867,14 @@ DUK_LOCAL void duk__emit_if_false_skip(duk_compiler_ctx *comp_ctx, duk_regconst_
duk_small_uint_t op;
op = DUK__ISREG(regconst) ? DUK_OP_IFFALSE_R : DUK_OP_IFFALSE_C;
- duk__emit_bc(comp_ctx, op, regconst); /* helper will remove const flag */
+ duk__emit_bc(comp_ctx, op, regconst); /* helper will remove const flag */
}
DUK_LOCAL void duk__emit_if_true_skip(duk_compiler_ctx *comp_ctx, duk_regconst_t regconst) {
duk_small_uint_t op;
op = DUK__ISREG(regconst) ? DUK_OP_IFTRUE_R : DUK_OP_IFTRUE_C;
- duk__emit_bc(comp_ctx, op, regconst); /* helper will remove const flag */
+ duk__emit_bc(comp_ctx, op, regconst); /* helper will remove const flag */
}
DUK_LOCAL void duk__emit_invalid(duk_compiler_ctx *comp_ctx) {
@@ -67461,7 +70898,8 @@ DUK_LOCAL void duk__peephole_optimize_bytecode(duk_compiler_ctx *comp_ctx) {
#if defined(DUK_USE_BUFLEN16)
/* No need to assert, buffer size maximum is 0xffff. */
#else
- DUK_ASSERT((duk_size_t) DUK_BW_GET_SIZE(comp_ctx->thr, &comp_ctx->curr_func.bw_code) / sizeof(duk_compiler_instr) <= (duk_size_t) DUK_INT_MAX); /* bytecode limits */
+ DUK_ASSERT((duk_size_t) DUK_BW_GET_SIZE(comp_ctx->thr, &comp_ctx->curr_func.bw_code) / sizeof(duk_compiler_instr) <=
+ (duk_size_t) DUK_INT_MAX); /* bytecode limits */
#endif
n = (duk_int_t) (DUK_BW_GET_SIZE(comp_ctx->thr, &comp_ctx->curr_func.bw_code) / sizeof(duk_compiler_instr));
@@ -67496,7 +70934,9 @@ DUK_LOCAL void duk__peephole_optimize_bytecode(duk_compiler_ctx *comp_ctx) {
target_pc2 = target_pc1 + 1 + (duk_int_t) DUK_DEC_ABC(ins) - (duk_int_t) DUK_BC_JUMP_BIAS;
DUK_DDD(DUK_DDDPRINT("optimizing jump at pc %ld; old target is %ld -> new target is %ld",
- (long) i, (long) target_pc1, (long) target_pc2));
+ (long) i,
+ (long) target_pc1,
+ (long) target_pc2));
bc[i].ins = DUK_ENC_OP_ABC(DUK_OP_JUMP, target_pc2 - (i + 1) + DUK_BC_JUMP_BIAS);
@@ -67522,15 +70962,21 @@ DUK_LOCAL void duk__peephole_optimize_bytecode(duk_compiler_ctx *comp_ctx) {
/* XXX: DUK__IVAL_FLAG_REQUIRE_SHORT is passed but not currently implemented
* by ispec/ivalue operations.
*/
-#define DUK__IVAL_FLAG_ALLOW_CONST (1 << 0) /* allow a constant to be returned */
-#define DUK__IVAL_FLAG_REQUIRE_TEMP (1 << 1) /* require a (mutable) temporary as a result (or a const if allowed) */
-#define DUK__IVAL_FLAG_REQUIRE_SHORT (1 << 2) /* require a short (8-bit) reg/const which fits into bytecode B/C slot */
+#define DUK__IVAL_FLAG_ALLOW_CONST (1 << 0) /* allow a constant to be returned */
+#define DUK__IVAL_FLAG_REQUIRE_TEMP (1 << 1) /* require a (mutable) temporary as a result (or a const if allowed) */
+#define DUK__IVAL_FLAG_REQUIRE_SHORT (1 << 2) /* require a short (8-bit) reg/const which fits into bytecode B/C slot */
/* XXX: some code might benefit from DUK__SETTEMP_IFTEMP(thr,x) */
-#if 0 /* enable manually for dumping */
-#define DUK__DUMP_ISPEC(compctx,ispec) do { duk__dump_ispec((compctx), (ispec)); } while (0)
-#define DUK__DUMP_IVALUE(compctx,ivalue) do { duk__dump_ivalue((compctx), (ivalue)); } while (0)
+#if 0 /* enable manually for dumping */
+#define DUK__DUMP_ISPEC(compctx, ispec) \
+ do { \
+ duk__dump_ispec((compctx), (ispec)); \
+ } while (0)
+#define DUK__DUMP_IVALUE(compctx, ivalue) \
+ do { \
+ duk__dump_ivalue((compctx), (ivalue)); \
+ } while (0)
DUK_LOCAL void duk__dump_ispec(duk_compiler_ctx *comp_ctx, duk_ispec *x) {
DUK_D(DUK_DPRINT("ispec dump: t=%ld regconst=0x%08lx, valstack_idx=%ld, value=%!T",
@@ -67548,8 +70994,12 @@ DUK_LOCAL void duk__dump_ivalue(duk_compiler_ctx *comp_ctx, duk_ivalue *x) {
duk_get_tval(comp_ctx->thr, x->x2.valstack_idx)));
}
#else
-#define DUK__DUMP_ISPEC(comp_ctx,x) do {} while (0)
-#define DUK__DUMP_IVALUE(comp_ctx,x) do {} while (0)
+#define DUK__DUMP_ISPEC(comp_ctx, x) \
+ do { \
+ } while (0)
+#define DUK__DUMP_IVALUE(comp_ctx, x) \
+ do { \
+ } while (0)
#endif
DUK_LOCAL void duk__ivalue_regconst(duk_ivalue *x, duk_regconst_t regconst) {
@@ -67599,7 +71049,7 @@ DUK_LOCAL duk_regconst_t duk__alloctemps(duk_compiler_ctx *comp_ctx, duk_small_i
res = comp_ctx->curr_func.temp_next;
comp_ctx->curr_func.temp_next += num;
- if (comp_ctx->curr_func.temp_next > DUK__MAX_TEMPS) { /* == DUK__MAX_TEMPS is OK */
+ if (comp_ctx->curr_func.temp_next > DUK__MAX_TEMPS) { /* == DUK__MAX_TEMPS is OK */
DUK_ERROR_RANGE(comp_ctx->thr, DUK_STR_TEMP_LIMIT);
DUK_WO_NORETURN(return 0;);
}
@@ -67652,8 +71102,7 @@ DUK_LOCAL duk_regconst_t duk__getconst(duk_compiler_ctx *comp_ctx) {
* constant for e.g. +0 and -0.
*/
if (duk_js_samevalue(tv1, tv2)) {
- DUK_DDD(DUK_DDDPRINT("reused existing constant for %!T -> const index %ld",
- (duk_tval *) tv1, (long) i));
+ DUK_DDD(DUK_DDDPRINT("reused existing constant for %!T -> const index %ld", (duk_tval *) tv1, (long) i));
duk_pop(thr);
return (duk_regconst_t) i | (duk_regconst_t) DUK__CONST_MARKER;
}
@@ -67664,9 +71113,8 @@ DUK_LOCAL duk_regconst_t duk__getconst(duk_compiler_ctx *comp_ctx) {
DUK_WO_NORETURN(return 0;);
}
- DUK_DDD(DUK_DDDPRINT("allocating new constant for %!T -> const index %ld",
- (duk_tval *) tv1, (long) n));
- (void) duk_put_prop_index(thr, f->consts_idx, (duk_uarridx_t) n); /* invalidates tv1, tv2 */
+ DUK_DDD(DUK_DDDPRINT("allocating new constant for %!T -> const index %ld", (duk_tval *) tv1, (long) n));
+ (void) duk_put_prop_index(thr, f->consts_idx, (duk_uarridx_t) n); /* invalidates tv1, tv2 */
return (duk_regconst_t) n | (duk_regconst_t) DUK__CONST_MARKER;
}
@@ -67675,15 +71123,15 @@ DUK_LOCAL duk_bool_t duk__const_needs_refcount(duk_compiler_ctx *comp_ctx, duk_r
duk_compiler_func *f = &comp_ctx->curr_func;
duk_bool_t ret;
- DUK_ASSERT((rc & DUK__CONST_MARKER) == 0); /* caller removes const marker */
+ DUK_ASSERT((rc & DUK__CONST_MARKER) == 0); /* caller removes const marker */
(void) duk_get_prop_index(comp_ctx->thr, f->consts_idx, (duk_uarridx_t) rc);
- ret = !duk_is_number(comp_ctx->thr, -1); /* now only number/string, so conservative check */
+ ret = !duk_is_number(comp_ctx->thr, -1); /* now only number/string, so conservative check */
duk_pop(comp_ctx->thr);
return ret;
#else
DUK_UNREF(comp_ctx);
DUK_UNREF(rc);
- DUK_ASSERT((rc & DUK__CONST_MARKER) == 0); /* caller removes const marker */
+ DUK_ASSERT((rc & DUK__CONST_MARKER) == 0); /* caller removes const marker */
return 0;
#endif
}
@@ -67746,9 +71194,7 @@ duk_regconst_t duk__ispec_toregconst_raw(duk_compiler_ctx *comp_ctx,
}
case DUK_TAG_BOOLEAN: {
duk_regconst_t dest = (forced_reg >= 0 ? forced_reg : DUK__ALLOCTEMP(comp_ctx));
- duk__emit_bc(comp_ctx,
- (DUK_TVAL_GET_BOOLEAN(tv) ? DUK_OP_LDTRUE : DUK_OP_LDFALSE),
- dest);
+ duk__emit_bc(comp_ctx, (DUK_TVAL_GET_BOOLEAN(tv) ? DUK_OP_LDTRUE : DUK_OP_LDFALSE), dest);
return dest;
}
case DUK_TAG_POINTER: {
@@ -67764,7 +71210,7 @@ duk_regconst_t duk__ispec_toregconst_raw(duk_compiler_ctx *comp_ctx,
DUK_UNREF(h);
DUK_ASSERT(h != NULL);
-#if 0 /* XXX: to be implemented? */
+#if 0 /* XXX: to be implemented? */
/* Use special opcodes to load short strings */
if (DUK_HSTRING_GET_BYTELEN(h) <= 2) {
/* Encode into a single opcode (18 bits can encode 1-2 bytes + length indicator) */
@@ -67834,8 +71280,8 @@ duk_regconst_t duk__ispec_toregconst_raw(duk_compiler_ctx *comp_ctx,
return dest;
}
}
- } /* end switch */
- goto fail_internal; /* never here */
+ } /* end switch */
+ goto fail_internal; /* never here */
}
case DUK_ISPEC_REGCONST: {
if (forced_reg >= 0) {
@@ -67868,11 +71314,11 @@ duk_regconst_t duk__ispec_toregconst_raw(duk_compiler_ctx *comp_ctx,
return x->regconst;
}
default: {
- break; /* never here */
+ break; /* never here */
}
}
- fail_internal:
+fail_internal:
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return 0;);
}
@@ -67892,10 +71338,13 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
DUK_DDD(DUK_DDDPRINT("duk__ivalue_toplain_raw(): x={t=%ld,op=%ld,x1={%ld:%ld:%!T},x2={%ld:%ld:%!T}}, "
"forced_reg=%ld",
- (long) x->t, (long) x->op,
- (long) x->x1.t, (long) x->x1.regconst,
+ (long) x->t,
+ (long) x->op,
+ (long) x->x1.t,
+ (long) x->x1.regconst,
(duk_tval *) duk_get_tval(thr, x->x1.valstack_idx),
- (long) x->x2.t, (long) x->x2.regconst,
+ (long) x->x2.t,
+ (long) x->x2.regconst,
(duk_tval *) duk_get_tval(thr, x->x2.valstack_idx),
(long) forced_reg));
@@ -67921,9 +71370,7 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
DUK_ASSERT(tv1 != NULL);
DUK_ASSERT(tv2 != NULL);
- DUK_DDD(DUK_DDDPRINT("arith: tv1=%!T, tv2=%!T",
- (duk_tval *) tv1,
- (duk_tval *) tv2));
+ DUK_DDD(DUK_DDDPRINT("arith: tv1=%!T, tv2=%!T", (duk_tval *) tv1, (duk_tval *) tv2));
if (DUK_TVAL_IS_NUMBER(tv1) && DUK_TVAL_IS_NUMBER(tv2)) {
duk_double_t d1 = DUK_TVAL_GET_NUMBER(tv1);
@@ -67932,7 +71379,9 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
duk_bool_t accept_fold = 1;
DUK_DDD(DUK_DDDPRINT("arith inline check: d1=%lf, d2=%lf, op=%ld",
- (double) d1, (double) d2, (long) x->op));
+ (double) d1,
+ (double) d2,
+ (long) x->op));
switch (x->op) {
case DUK_OP_ADD: {
d3 = d1 + d2;
@@ -67958,7 +71407,7 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
break;
}
default: {
- d3 = 0.0; /* Won't be used, but silence MSVC /W4 warning. */
+ d3 = 0.0; /* Won't be used, but silence MSVC /W4 warning. */
accept_fold = 0;
break;
}
@@ -67972,7 +71421,7 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
x->t = DUK_IVAL_PLAIN;
DUK_ASSERT(x->x1.t == DUK_ISPEC_VALUE);
- DUK_TVAL_SET_NUMBER(tv1, d3); /* old value is number: no refcount */
+ DUK_TVAL_SET_NUMBER(tv1, d3); /* old value is number: no refcount */
return;
}
} else if (x->op == DUK_OP_ADD && DUK_TVAL_IS_STRING(tv1) && DUK_TVAL_IS_STRING(tv2)) {
@@ -67989,8 +71438,14 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
}
}
- arg1 = duk__ispec_toregconst_raw(comp_ctx, &x->x1, -1, DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
- arg2 = duk__ispec_toregconst_raw(comp_ctx, &x->x2, -1, DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
+ arg1 = duk__ispec_toregconst_raw(comp_ctx,
+ &x->x1,
+ -1,
+ DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
+ arg2 = duk__ispec_toregconst_raw(comp_ctx,
+ &x->x2,
+ -1,
+ DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
/* If forced reg, use it as destination. Otherwise try to
* use either coerced ispec if it is a temporary.
@@ -68018,8 +71473,14 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
duk_regconst_t dest;
/* Need a short reg/const, does not have to be a mutable temp. */
- arg1 = duk__ispec_toregconst_raw(comp_ctx, &x->x1, -1, DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
- arg2 = duk__ispec_toregconst_raw(comp_ctx, &x->x2, -1, DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
+ arg1 = duk__ispec_toregconst_raw(comp_ctx,
+ &x->x1,
+ -1,
+ DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
+ arg2 = duk__ispec_toregconst_raw(comp_ctx,
+ &x->x2,
+ -1,
+ DUK__IVAL_FLAG_ALLOW_CONST | DUK__IVAL_FLAG_REQUIRE_SHORT /*flags*/);
/* Pick a destination register. If either base value or key
* happens to be a temp value, reuse it as the destination.
@@ -68040,11 +71501,7 @@ DUK_LOCAL void duk__ivalue_toplain_raw(duk_compiler_ctx *comp_ctx, duk_ivalue *x
dest = DUK__ALLOCTEMP(comp_ctx);
}
- duk__emit_a_b_c(comp_ctx,
- DUK_OP_GETPROP | DUK__EMIT_FLAG_BC_REGCONST,
- dest,
- arg1,
- arg2);
+ duk__emit_a_b_c(comp_ctx, DUK_OP_GETPROP | DUK__EMIT_FLAG_BC_REGCONST, dest, arg1, arg2);
duk__ivalue_regconst(x, dest);
return;
@@ -68112,10 +71569,13 @@ duk_regconst_t duk__ivalue_toregconst_raw(duk_compiler_ctx *comp_ctx,
DUK_DDD(DUK_DDDPRINT("duk__ivalue_toregconst_raw(): x={t=%ld,op=%ld,x1={%ld:%ld:%!T},x2={%ld:%ld:%!T}}, "
"forced_reg=%ld, flags 0x%08lx: allow_const=%ld require_temp=%ld require_short=%ld",
- (long) x->t, (long) x->op,
- (long) x->x1.t, (long) x->x1.regconst,
+ (long) x->t,
+ (long) x->op,
+ (long) x->x1.t,
+ (long) x->x1.regconst,
(duk_tval *) duk_get_tval(thr, x->x1.valstack_idx),
- (long) x->x2.t, (long) x->x2.regconst,
+ (long) x->x2.t,
+ (long) x->x2.regconst,
(duk_tval *) duk_get_tval(thr, x->x2.valstack_idx),
(long) forced_reg,
(unsigned long) flags,
@@ -68138,7 +71598,7 @@ DUK_LOCAL duk_regconst_t duk__ivalue_toreg(duk_compiler_ctx *comp_ctx, duk_ivalu
return duk__ivalue_toregconst_raw(comp_ctx, x, -1, 0 /*flags*/);
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL duk_regconst_t duk__ivalue_totemp(duk_compiler_ctx *comp_ctx, duk_ivalue *x) {
return duk__ivalue_toregconst_raw(comp_ctx, x, -1, DUK__IVAL_FLAG_REQUIRE_TEMP /*flags*/);
}
@@ -68174,8 +71634,7 @@ DUK_LOCAL duk_regconst_t duk__lookup_active_register_binding(duk_compiler_ctx *c
duk_hstring *h_varname;
duk_regconst_t ret;
- DUK_DDD(DUK_DDDPRINT("resolving identifier reference to '%!T'",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("resolving identifier reference to '%!T'", (duk_tval *) duk_get_tval(thr, -1)));
/*
* Special name handling
@@ -68228,13 +71687,13 @@ DUK_LOCAL duk_regconst_t duk__lookup_active_register_binding(duk_compiler_ctx *c
DUK_DDD(DUK_DDDPRINT("identifier lookup -> reg %ld", (long) ret));
return ret;
- slow_path_notown:
+slow_path_notown:
DUK_DDD(DUK_DDDPRINT("identifier lookup -> slow path, not own variable"));
comp_ctx->curr_func.id_access_slow = 1;
return (duk_regconst_t) -1;
- slow_path_own:
+slow_path_own:
DUK_DDD(DUK_DDDPRINT("identifier lookup -> slow path, may be own variable"));
comp_ctx->curr_func.id_access_slow = 1;
@@ -68262,7 +71721,7 @@ DUK_LOCAL duk_bool_t duk__lookup_lhs(duk_compiler_ctx *comp_ctx, duk_regconst_t
if (reg_varbind >= 0) {
*out_reg_varbind = reg_varbind;
- *out_rc_varname = 0; /* duk_regconst_t is unsigned, so use 0 as dummy value (ignored by caller) */
+ *out_rc_varname = 0; /* duk_regconst_t is unsigned, so use 0 as dummy value (ignored by caller) */
duk_pop(thr);
return 1;
} else {
@@ -68312,7 +71771,7 @@ DUK_LOCAL void duk__add_label(duk_compiler_ctx *comp_ctx, duk_hstring *h_label,
}
duk_push_hstring(thr, h_label);
- DUK_ASSERT(n <= DUK_UARRIDX_MAX); /* label limits */
+ DUK_ASSERT(n <= DUK_UARRIDX_MAX); /* label limits */
(void) duk_put_prop_index(thr, comp_ctx->curr_func.labelnames_idx, (duk_uarridx_t) n);
new_size = (n + 1) * sizeof(duk_labelinfo);
@@ -68322,7 +71781,7 @@ DUK_LOCAL void duk__add_label(duk_compiler_ctx *comp_ctx, duk_hstring *h_label,
/* relookup after possible realloc */
p = (duk_uint8_t *) DUK_HBUFFER_DYNAMIC_GET_DATA_PTR(thr->heap, comp_ctx->curr_func.h_labelinfos);
li_start = (duk_labelinfo *) (void *) p;
- DUK_UNREF(li_start); /* silence scan-build warning */
+ DUK_UNREF(li_start); /* silence scan-build warning */
li = (duk_labelinfo *) (void *) (p + DUK_HBUFFER_GET_SIZE(comp_ctx->curr_func.h_labelinfos));
li--;
@@ -68336,12 +71795,15 @@ DUK_LOCAL void duk__add_label(duk_compiler_ctx *comp_ctx, duk_hstring *h_label,
li->flags = DUK_LABEL_FLAG_ALLOW_BREAK;
li->label_id = label_id;
li->h_label = h_label;
- li->catch_depth = comp_ctx->curr_func.catch_depth; /* catch depth from current func */
+ li->catch_depth = comp_ctx->curr_func.catch_depth; /* catch depth from current func */
li->pc_label = pc_label;
DUK_DDD(DUK_DDDPRINT("registered label: flags=0x%08lx, id=%ld, name=%!O, catch_depth=%ld, pc_label=%ld",
- (unsigned long) li->flags, (long) li->label_id, (duk_heaphdr *) li->h_label,
- (long) li->catch_depth, (long) li->pc_label));
+ (unsigned long) li->flags,
+ (long) li->label_id,
+ (duk_heaphdr *) li->h_label,
+ (long) li->catch_depth,
+ (long) li->pc_label));
}
/* Update all labels with matching label_id. */
@@ -68365,7 +71827,9 @@ DUK_LOCAL void duk__update_label_flags(duk_compiler_ctx *comp_ctx, duk_int_t lab
}
DUK_DDD(DUK_DDDPRINT("updating (overwriting) label flags for li=%p, label_id=%ld, flags=%ld",
- (void *) li, (long) label_id, (long) flags));
+ (void *) li,
+ (long) label_id,
+ (long) flags));
li->flags = flags;
}
@@ -68386,14 +71850,19 @@ DUK_LOCAL void duk__update_label_flags(duk_compiler_ctx *comp_ctx, duk_int_t lab
*/
/* XXX: awkward, especially the bunch of separate output values -> output struct? */
-DUK_LOCAL void duk__lookup_active_label(duk_compiler_ctx *comp_ctx, duk_hstring *h_label, duk_bool_t is_break, duk_int_t *out_label_id, duk_int_t *out_label_catch_depth, duk_int_t *out_label_pc, duk_bool_t *out_is_closest) {
+DUK_LOCAL void duk__lookup_active_label(duk_compiler_ctx *comp_ctx,
+ duk_hstring *h_label,
+ duk_bool_t is_break,
+ duk_int_t *out_label_id,
+ duk_int_t *out_label_catch_depth,
+ duk_int_t *out_label_pc,
+ duk_bool_t *out_is_closest) {
duk_hthread *thr = comp_ctx->thr;
duk_uint8_t *p;
duk_labelinfo *li_start, *li_end, *li;
duk_bool_t match = 0;
- DUK_DDD(DUK_DDDPRINT("looking up active label: label='%!O', is_break=%ld",
- (duk_heaphdr *) h_label, (long) is_break));
+ DUK_DDD(DUK_DDDPRINT("looking up active label: label='%!O', is_break=%ld", (duk_heaphdr *) h_label, (long) is_break));
DUK_UNREF(thr);
@@ -68417,7 +71886,8 @@ DUK_LOCAL void duk__lookup_active_label(duk_compiler_ctx *comp_ctx, duk_hstring
}
DUK_DDD(DUK_DDDPRINT("labelinfo[%ld] -> '%!O' label name matches (still need to check type)",
- (long) (li - li_start), (duk_heaphdr *) h_label));
+ (long) (li - li_start),
+ (duk_heaphdr *) h_label));
/* currently all labels accept a break, so no explicit check for it now */
DUK_ASSERT(li->flags & DUK_LABEL_FLAG_ALLOW_BREAK);
@@ -68451,8 +71921,10 @@ DUK_LOCAL void duk__lookup_active_label(duk_compiler_ctx *comp_ctx, duk_hstring
}
DUK_DDD(DUK_DDDPRINT("label match: %!O -> label_id %ld, catch_depth=%ld, pc_label=%ld",
- (duk_heaphdr *) h_label, (long) li->label_id,
- (long) li->catch_depth, (long) li->pc_label));
+ (duk_heaphdr *) h_label,
+ (long) li->label_id,
+ (long) li->catch_depth,
+ (long) li->pc_label));
*out_label_id = li->label_id;
*out_label_catch_depth = li->catch_depth;
@@ -68476,21 +71948,21 @@ DUK_LOCAL void duk__reset_labels_to_length(duk_compiler_ctx *comp_ctx, duk_size_
*/
/* object literal key tracking flags */
-#define DUK__OBJ_LIT_KEY_PLAIN (1 << 0) /* key encountered as a plain property */
-#define DUK__OBJ_LIT_KEY_GET (1 << 1) /* key encountered as a getter */
-#define DUK__OBJ_LIT_KEY_SET (1 << 2) /* key encountered as a setter */
+#define DUK__OBJ_LIT_KEY_PLAIN (1 << 0) /* key encountered as a plain property */
+#define DUK__OBJ_LIT_KEY_GET (1 << 1) /* key encountered as a getter */
+#define DUK__OBJ_LIT_KEY_SET (1 << 2) /* key encountered as a setter */
DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk_hthread *thr = comp_ctx->thr;
- duk_regconst_t reg_obj; /* result reg */
- duk_regconst_t reg_temp; /* temp reg */
- duk_regconst_t temp_start; /* temp reg value for start of loop */
- duk_small_uint_t max_init_values; /* max # of values initialized in one MPUTARR set */
- duk_small_uint_t num_values; /* number of values in current MPUTARR set */
- duk_uarridx_t curr_idx; /* current (next) array index */
- duk_uarridx_t start_idx; /* start array index of current MPUTARR set */
- duk_uarridx_t init_idx; /* last array index explicitly initialized, +1 */
- duk_bool_t require_comma; /* next loop requires a comma */
+ duk_regconst_t reg_obj; /* result reg */
+ duk_regconst_t reg_temp; /* temp reg */
+ duk_regconst_t temp_start; /* temp reg value for start of loop */
+ duk_small_uint_t max_init_values; /* max # of values initialized in one MPUTARR set */
+ duk_small_uint_t num_values; /* number of values in current MPUTARR set */
+ duk_uarridx_t curr_idx; /* current (next) array index */
+ duk_uarridx_t start_idx; /* start array index of current MPUTARR set */
+ duk_uarridx_t init_idx; /* last array index explicitly initialized, +1 */
+ duk_bool_t require_comma; /* next loop requires a comma */
#if !defined(DUK_USE_PREFER_SIZE)
duk_int_t pc_newarr;
duk_compiler_instr *instr;
@@ -68499,13 +71971,13 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
/* DUK_TOK_LBRACKET already eaten, current token is right after that */
DUK_ASSERT(comp_ctx->prev_token.t == DUK_TOK_LBRACKET);
- max_init_values = DUK__MAX_ARRAY_INIT_VALUES; /* XXX: depend on available temps? */
+ max_init_values = DUK__MAX_ARRAY_INIT_VALUES; /* XXX: depend on available temps? */
reg_obj = DUK__ALLOCTEMP(comp_ctx);
#if !defined(DUK_USE_PREFER_SIZE)
pc_newarr = duk__get_current_pc(comp_ctx);
#endif
- duk__emit_bc(comp_ctx, DUK_OP_NEWARR, reg_obj); /* XXX: patch initial size hint afterwards? */
+ duk__emit_bc(comp_ctx, DUK_OP_NEWARR, reg_obj); /* XXX: patch initial size hint afterwards? */
temp_start = DUK__GETTEMP(comp_ctx);
/*
@@ -68521,7 +71993,7 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
*/
curr_idx = 0;
- init_idx = 0; /* tracks maximum initialized index + 1 */
+ init_idx = 0; /* tracks maximum initialized index + 1 */
start_idx = 0;
require_comma = 0;
@@ -68567,7 +72039,7 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
duk__emit_load_int32(comp_ctx, reg_temp, (duk_int32_t) start_idx);
}
- reg_temp = DUK__ALLOCTEMP(comp_ctx); /* alloc temp just in case, to update max temp */
+ reg_temp = DUK__ALLOCTEMP(comp_ctx); /* alloc temp just in case, to update max temp */
DUK__SETTEMP(comp_ctx, reg_temp);
duk__expr_toforcedreg(comp_ctx, res, DUK__BP_COMMA /*rbp_flags*/, reg_temp /*forced_reg*/);
DUK__SETTEMP(comp_ctx, reg_temp + 1);
@@ -68592,9 +72064,7 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
* never needs to be.
*/
duk__emit_a_b_c(comp_ctx,
- DUK_OP_MPUTARR |
- DUK__EMIT_FLAG_NO_SHUFFLE_C |
- DUK__EMIT_FLAG_A_IS_SOURCE,
+ DUK_OP_MPUTARR | DUK__EMIT_FLAG_NO_SHUFFLE_C | DUK__EMIT_FLAG_A_IS_SOURCE,
reg_obj,
temp_start,
(duk_regconst_t) (num_values + 1));
@@ -68615,8 +72085,7 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
DUK_ASSERT(comp_ctx->curr_token.t == DUK_TOK_RBRACKET);
duk__advance(comp_ctx);
- DUK_DDD(DUK_DDDPRINT("array literal done, curridx=%ld, initidx=%ld",
- (long) curr_idx, (long) init_idx));
+ DUK_DDD(DUK_DDDPRINT("array literal done, curridx=%ld, initidx=%ld", (long) curr_idx, (long) init_idx));
/* trailing elisions? */
if (curr_idx > init_idx) {
@@ -68624,10 +72093,7 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
DUK_DDD(DUK_DDDPRINT("array literal has trailing elisions which affect its length"));
reg_temp = DUK__ALLOCTEMP(comp_ctx);
duk__emit_load_int32(comp_ctx, reg_temp, (duk_int_t) curr_idx);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_SETALEN | DUK__EMIT_FLAG_A_IS_SOURCE,
- reg_obj,
- reg_temp);
+ duk__emit_a_bc(comp_ctx, DUK_OP_SETALEN | DUK__EMIT_FLAG_A_IS_SOURCE, reg_obj, reg_temp);
}
DUK__SETTEMP(comp_ctx, temp_start);
@@ -68635,7 +72101,7 @@ DUK_LOCAL void duk__nud_array_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *re
duk__ivalue_regconst(res, reg_obj);
return;
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_ARRAY_LITERAL);
DUK_WO_NORETURN(return;);
}
@@ -68659,9 +72125,7 @@ DUK_LOCAL void duk__objlit_flush_keys(duk_compiler_ctx *comp_ctx, duk__objlit_st
*/
DUK_ASSERT(st->num_pairs > 0);
duk__emit_a_b_c(comp_ctx,
- DUK_OP_MPUTOBJ |
- DUK__EMIT_FLAG_NO_SHUFFLE_C |
- DUK__EMIT_FLAG_A_IS_SOURCE,
+ DUK_OP_MPUTOBJ | DUK__EMIT_FLAG_NO_SHUFFLE_C | DUK__EMIT_FLAG_A_IS_SOURCE,
st->reg_obj,
st->temp_start,
(duk_regconst_t) (st->num_pairs * 2));
@@ -68680,7 +72144,7 @@ DUK_LOCAL duk_bool_t duk__objlit_load_key(duk_compiler_ctx *comp_ctx, duk_ivalue
/* numbers can be loaded as numbers and coerced on the fly */
duk_push_number(comp_ctx->thr, tok->num);
} else {
- return 1; /* error */
+ return 1; /* error */
}
duk__ivalue_plain_fromstack(comp_ctx, res);
@@ -68693,10 +72157,10 @@ DUK_LOCAL duk_bool_t duk__objlit_load_key(duk_compiler_ctx *comp_ctx, duk_ivalue
DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk_hthread *thr = comp_ctx->thr;
duk__objlit_state st;
- duk_regconst_t reg_temp; /* temp reg */
- duk_small_uint_t max_init_pairs; /* max # of key-value pairs initialized in one MPUTOBJ set */
- duk_bool_t first; /* first value: comma must not precede the value */
- duk_bool_t is_set, is_get; /* temps */
+ duk_regconst_t reg_temp; /* temp reg */
+ duk_small_uint_t max_init_pairs; /* max # of key-value pairs initialized in one MPUTOBJ set */
+ duk_bool_t first; /* first value: comma must not precede the value */
+ duk_bool_t is_set, is_get; /* temps */
#if !defined(DUK_USE_PREFER_SIZE)
duk_int_t pc_newobj;
duk_compiler_instr *instr;
@@ -68704,12 +72168,12 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
DUK_ASSERT(comp_ctx->prev_token.t == DUK_TOK_LCURLY);
- max_init_pairs = DUK__MAX_OBJECT_INIT_PAIRS; /* XXX: depend on available temps? */
+ max_init_pairs = DUK__MAX_OBJECT_INIT_PAIRS; /* XXX: depend on available temps? */
- st.reg_obj = DUK__ALLOCTEMP(comp_ctx); /* target object */
- st.temp_start = DUK__GETTEMP(comp_ctx); /* start of MPUTOBJ argument list */
- st.num_pairs = 0; /* number of key/value pairs emitted for current MPUTOBJ set */
- st.num_total_pairs = 0; /* number of key/value pairs emitted overall */
+ st.reg_obj = DUK__ALLOCTEMP(comp_ctx); /* target object */
+ st.temp_start = DUK__GETTEMP(comp_ctx); /* start of MPUTOBJ argument list */
+ st.num_pairs = 0; /* number of key/value pairs emitted for current MPUTOBJ set */
+ st.num_total_pairs = 0; /* number of key/value pairs emitted overall */
#if !defined(DUK_USE_PREFER_SIZE)
pc_newobj = duk__get_current_pc(comp_ctx);
@@ -68748,8 +72212,7 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
* worth the effort and would increase code size.
*/
- DUK_DDD(DUK_DDDPRINT("object literal loop, curr_token->t = %ld",
- (long) comp_ctx->curr_token.t));
+ DUK_DDD(DUK_DDDPRINT("object literal loop, curr_token->t = %ld", (long) comp_ctx->curr_token.t));
if (comp_ctx->curr_token.t == DUK_TOK_RCURLY) {
break;
@@ -68789,16 +72252,15 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
* identifier string content.
*/
- is_get = (comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER &&
- comp_ctx->prev_token.str1 == DUK_HTHREAD_STRING_GET(thr));
- is_set = (comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER &&
- comp_ctx->prev_token.str1 == DUK_HTHREAD_STRING_SET(thr));
+ is_get = (comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER && comp_ctx->prev_token.str1 == DUK_HTHREAD_STRING_GET(thr));
+ is_set = (comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER && comp_ctx->prev_token.str1 == DUK_HTHREAD_STRING_SET(thr));
if ((is_get || is_set) && comp_ctx->curr_token.t != DUK_TOK_COLON) {
/* getter/setter */
duk_int_t fnum;
duk__objlit_flush_keys(comp_ctx, &st);
- DUK_ASSERT(DUK__GETTEMP(comp_ctx) == st.temp_start); /* 2 regs are guaranteed to be allocated w.r.t. temp_max */
+ DUK_ASSERT(DUK__GETTEMP(comp_ctx) ==
+ st.temp_start); /* 2 regs are guaranteed to be allocated w.r.t. temp_max */
reg_temp = DUK__ALLOCTEMPS(comp_ctx, 2);
if (duk__objlit_load_key(comp_ctx, res, &comp_ctx->curr_token, reg_temp) != 0) {
@@ -68808,21 +72270,18 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
/* curr_token = get/set name */
fnum = duk__parse_func_like_fnum(comp_ctx, DUK__FUNC_FLAG_GETSET);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CLOSURE,
- st.temp_start + 1,
- (duk_regconst_t) fnum);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CLOSURE, st.temp_start + 1, (duk_regconst_t) fnum);
/* Slot C is used in a non-standard fashion (range of regs),
* emitter code has special handling for it (must not set the
* "no shuffle" flag).
*/
duk__emit_a_bc(comp_ctx,
- (is_get ? DUK_OP_INITGET : DUK_OP_INITSET) | DUK__EMIT_FLAG_A_IS_SOURCE,
- st.reg_obj,
- st.temp_start); /* temp_start+0 = key, temp_start+1 = closure */
+ (is_get ? DUK_OP_INITGET : DUK_OP_INITSET) | DUK__EMIT_FLAG_A_IS_SOURCE,
+ st.reg_obj,
+ st.temp_start); /* temp_start+0 = key, temp_start+1 = closure */
- DUK_ASSERT(st.num_pairs == 0); /* temp state is reset on next loop */
+ DUK_ASSERT(st.num_pairs == 0); /* temp state is reset on next loop */
#if defined(DUK_USE_ES6)
} else if (comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER &&
(comp_ctx->curr_token.t == DUK_TOK_COMMA || comp_ctx->curr_token.t == DUK_TOK_RCURLY)) {
@@ -68830,15 +72289,14 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
load_rc = duk__objlit_load_key(comp_ctx, res, &comp_ctx->prev_token, reg_temp);
DUK_UNREF(load_rc);
- DUK_ASSERT(load_rc == 0); /* always succeeds because token is identifier */
+ DUK_ASSERT(load_rc == 0); /* always succeeds because token is identifier */
duk__ivalue_var_hstring(comp_ctx, res, comp_ctx->prev_token.str1);
DUK_ASSERT(DUK__GETTEMP(comp_ctx) == reg_temp + 1);
duk__ivalue_toforcedreg(comp_ctx, res, reg_temp + 1);
st.num_pairs++;
- } else if ((comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER ||
- comp_ctx->prev_token.t == DUK_TOK_STRING ||
+ } else if ((comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER || comp_ctx->prev_token.t == DUK_TOK_STRING ||
comp_ctx->prev_token.t == DUK_TOK_NUMBER) &&
comp_ctx->curr_token.t == DUK_TOK_LPAREN) {
duk_int_t fnum;
@@ -68856,13 +72314,10 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
fnum = duk__parse_func_like_fnum(comp_ctx, DUK__FUNC_FLAG_USE_PREVTOKEN | DUK__FUNC_FLAG_METDEF);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CLOSURE,
- reg_temp + 1,
- (duk_regconst_t) fnum);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CLOSURE, reg_temp + 1, (duk_regconst_t) fnum);
st.num_pairs++;
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
} else {
#if defined(DUK_USE_ES6)
if (comp_ctx->prev_token.t == DUK_TOK_LBRACKET) {
@@ -68879,9 +72334,8 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
* form is not yet supported and causes a
* SyntaxError on the DUK_TOK_COLON check below.
*/
- }
- else
-#endif /* DUK_USE_ES6 */
+ } else
+#endif /* DUK_USE_ES6 */
{
if (duk__objlit_load_key(comp_ctx, res, &comp_ctx->prev_token, reg_temp) != 0) {
goto syntax_error;
@@ -68895,7 +72349,7 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
st.num_pairs++;
}
- } /* property loop */
+ } /* property loop */
/* Flush remaining properties. */
duk__objlit_flush_keys(comp_ctx, &st);
@@ -68914,12 +72368,12 @@ DUK_LOCAL void duk__nud_object_literal(duk_compiler_ctx *comp_ctx, duk_ivalue *r
#endif
DUK_ASSERT(comp_ctx->curr_token.t == DUK_TOK_RCURLY);
- duk__advance(comp_ctx); /* No RegExp after object literal. */
+ duk__advance(comp_ctx); /* No RegExp after object literal. */
duk__ivalue_regconst(res, st.reg_obj);
return;
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_OBJECT_LITERAL);
DUK_WO_NORETURN(return;);
}
@@ -68935,7 +72389,8 @@ DUK_LOCAL duk_int_t duk__parse_arguments(duk_compiler_ctx *comp_ctx, duk_ivalue
/* Note: expect that caller has already eaten the left paren */
DUK_DDD(DUK_DDDPRINT("start parsing arguments, prev_token.t=%ld, curr_token.t=%ld",
- (long) comp_ctx->prev_token.t, (long) comp_ctx->curr_token.t));
+ (long) comp_ctx->prev_token.t,
+ (long) comp_ctx->curr_token.t));
for (;;) {
if (comp_ctx->curr_token.t == DUK_TOK_RPAREN) {
@@ -68952,11 +72407,14 @@ DUK_LOCAL duk_int_t duk__parse_arguments(duk_compiler_ctx *comp_ctx, duk_ivalue
* This is not the cleanest possible approach.
*/
- reg_temp = DUK__ALLOCTEMP(comp_ctx); /* bump up "allocated" reg count, just in case */
+ reg_temp = DUK__ALLOCTEMP(comp_ctx); /* bump up "allocated" reg count, just in case */
DUK__SETTEMP(comp_ctx, reg_temp);
/* binding power must be high enough to NOT allow comma expressions directly */
- duk__expr_toforcedreg(comp_ctx, res, DUK__BP_COMMA /*rbp_flags*/, reg_temp); /* always allow 'in', coerce to 'tr' just in case */
+ duk__expr_toforcedreg(comp_ctx,
+ res,
+ DUK__BP_COMMA /*rbp_flags*/,
+ reg_temp); /* always allow 'in', coerce to 'tr' just in case */
DUK__SETTEMP(comp_ctx, reg_temp + 1);
nargs++;
@@ -68965,7 +72423,7 @@ DUK_LOCAL duk_int_t duk__parse_arguments(duk_compiler_ctx *comp_ctx, duk_ivalue
}
/* eat the right paren */
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* RegExp mode does not matter. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* RegExp mode does not matter. */
DUK_DDD(DUK_DDDPRINT("end parsing arguments"));
@@ -68974,8 +72432,7 @@ DUK_LOCAL duk_int_t duk__parse_arguments(duk_compiler_ctx *comp_ctx, duk_ivalue
DUK_LOCAL duk_bool_t duk__expr_is_empty(duk_compiler_ctx *comp_ctx) {
/* empty expressions can be detected conveniently with nud/led counts */
- return (comp_ctx->curr_func.nud_count == 0) &&
- (comp_ctx->curr_func.led_count == 0);
+ return (comp_ctx->curr_func.nud_count == 0) && (comp_ctx->curr_func.led_count == 0);
}
DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
@@ -68983,7 +72440,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk_token *tk;
duk_regconst_t temp_at_entry;
duk_small_uint_t tok;
- duk_uint32_t args; /* temp variable to pass constants and flags to shared code */
+ duk_uint32_t args; /* temp variable to pass constants and flags to shared code */
/*
* ctx->prev_token token to process with duk__expr_nud()
@@ -69001,18 +72458,17 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
res->t = DUK_IVAL_NONE;
DUK_DDD(DUK_DDDPRINT("duk__expr_nud(), prev_token.t=%ld, allow_in=%ld, paren_level=%ld",
- (long) tk->t, (long) comp_ctx->curr_func.allow_in, (long) comp_ctx->curr_func.paren_level));
+ (long) tk->t,
+ (long) comp_ctx->curr_func.allow_in,
+ (long) comp_ctx->curr_func.paren_level));
switch (tok) {
-
- /* PRIMARY EXPRESSIONS */
+ /* PRIMARY EXPRESSIONS */
case DUK_TOK_THIS: {
duk_regconst_t reg_temp;
reg_temp = DUK__ALLOCTEMP(comp_ctx);
- duk__emit_bc(comp_ctx,
- DUK_OP_LDTHIS,
- reg_temp);
+ duk__emit_bc(comp_ctx, DUK_OP_LDTHIS, reg_temp);
duk__ivalue_regconst(res, reg_temp);
return;
}
@@ -69044,15 +72500,13 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
case DUK_TOK_REGEXP: {
#if defined(DUK_USE_REGEXP_SUPPORT)
duk_regconst_t reg_temp;
- duk_regconst_t rc_re_bytecode; /* const */
- duk_regconst_t rc_re_source; /* const */
+ duk_regconst_t rc_re_bytecode; /* const */
+ duk_regconst_t rc_re_source; /* const */
DUK_ASSERT(tk->str1 != NULL);
DUK_ASSERT(tk->str2 != NULL);
- DUK_DDD(DUK_DDDPRINT("emitting regexp op, str1=%!O, str2=%!O",
- (duk_heaphdr *) tk->str1,
- (duk_heaphdr *) tk->str2));
+ DUK_DDD(DUK_DDDPRINT("emitting regexp op, str1=%!O, str2=%!O", (duk_heaphdr *) tk->str1, (duk_heaphdr *) tk->str2));
reg_temp = DUK__ALLOCTEMP(comp_ctx);
duk_push_hstring(thr, tk->str1);
@@ -69075,9 +72529,9 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk__ivalue_regconst(res, reg_temp);
return;
-#else /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
goto syntax_error;
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
}
case DUK_TOK_LBRACKET: {
DUK_DDD(DUK_DDDPRINT("parsing array literal"));
@@ -69096,15 +72550,15 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
prev_allow_in = comp_ctx->curr_func.allow_in;
comp_ctx->curr_func.allow_in = 1; /* reset 'allow_in' for parenthesized expression */
- duk__expr(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/); /* Expression, terminates at a ')' */
+ duk__expr(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/); /* Expression, terminates at a ')' */
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* No RegExp after parenthesized expression. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* No RegExp after parenthesized expression. */
comp_ctx->curr_func.allow_in = prev_allow_in;
comp_ctx->curr_func.paren_level--;
return;
}
- /* MEMBER/NEW/CALL EXPRESSIONS */
+ /* MEMBER/NEW/CALL EXPRESSIONS */
case DUK_TOK_NEW: {
/*
@@ -69141,16 +72595,14 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
goto syntax_error_newtarget;
}
duk__advance(comp_ctx);
- duk__emit_bc(comp_ctx,
- DUK_OP_NEWTARGET,
- reg_target);
+ duk__emit_bc(comp_ctx, DUK_OP_NEWTARGET, reg_target);
duk__ivalue_regconst(res, reg_target);
return;
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
duk__expr_toforcedreg(comp_ctx, res, DUK__BP_CALL /*rbp_flags*/, reg_target /*forced_reg*/);
- duk__emit_bc(comp_ctx, DUK_OP_NEWOBJ, reg_target + 1); /* default instance */
+ duk__emit_bc(comp_ctx, DUK_OP_NEWOBJ, reg_target + 1); /* default instance */
DUK__SETTEMP(comp_ctx, reg_target + 2);
/* XXX: 'new obj.noSuch()' doesn't use GETPROPC now which
@@ -69161,7 +72613,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
/* 'new' MemberExpression Arguments */
DUK_DDD(DUK_DDDPRINT("new expression has argument list"));
duk__advance(comp_ctx);
- nargs = duk__parse_arguments(comp_ctx, res); /* parse args starting from "next temp", reg_target + 1 */
+ nargs = duk__parse_arguments(comp_ctx, res); /* parse args starting from "next temp", reg_target + 1 */
/* right paren eaten */
} else {
/* 'new' MemberExpression */
@@ -69169,10 +72621,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
nargs = 0;
}
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CALL0 | DUK_BC_CALL_FLAG_CONSTRUCT,
- nargs /*num_args*/,
- reg_target /*target*/);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CALL0 | DUK_BC_CALL_FLAG_CONSTRUCT, nargs /*num_args*/, reg_target /*target*/);
DUK_DDD(DUK_DDDPRINT("end parsing new expression"));
@@ -69180,7 +72629,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
return;
}
- /* FUNCTION EXPRESSIONS */
+ /* FUNCTION EXPRESSIONS */
case DUK_TOK_FUNCTION: {
/* Function expression. Note that any statement beginning with 'function'
@@ -69203,16 +72652,13 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
fnum = duk__parse_func_like_fnum(comp_ctx, 0 /*flags*/);
DUK_DDD(DUK_DDDPRINT("parsed inner function -> fnum %ld", (long) fnum));
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CLOSURE,
- reg_temp /*a*/,
- (duk_regconst_t) fnum /*bc*/);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CLOSURE, reg_temp /*a*/, (duk_regconst_t) fnum /*bc*/);
duk__ivalue_regconst(res, reg_temp);
return;
}
- /* UNARY EXPRESSIONS */
+ /* UNARY EXPRESSIONS */
case DUK_TOK_DELETE: {
/* Delete semantics are a bit tricky. The description in E5 specification
@@ -69220,7 +72666,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
* a reference (which is only known at runtime) seemingly at compile time
* (= SyntaxError throwing).
*/
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
if (res->t == DUK_IVAL_VAR) {
/* not allowed in strict mode, regardless of whether resolves;
* in non-strict mode DELVAR handles both non-resolving and
@@ -69242,16 +72688,11 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk_dup(thr, res->x1.valstack_idx);
if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
/* register bound variables are non-configurable -> always false */
- duk__emit_bc(comp_ctx,
- DUK_OP_LDFALSE,
- reg_temp);
+ duk__emit_bc(comp_ctx, DUK_OP_LDFALSE, reg_temp);
} else {
duk_dup(thr, res->x1.valstack_idx);
rc_varname = duk__getconst(comp_ctx);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_DELVAR,
- reg_temp,
- rc_varname);
+ duk__emit_a_bc(comp_ctx, DUK_OP_DELVAR, reg_temp, rc_varname);
}
duk__ivalue_regconst(res, reg_temp);
} else if (res->t == DUK_IVAL_PROP) {
@@ -69261,13 +72702,11 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
DUK__SETTEMP(comp_ctx, temp_at_entry);
reg_temp = DUK__ALLOCTEMP(comp_ctx);
- reg_obj = duk__ispec_toregconst_raw(comp_ctx, &res->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
- rc_key = duk__ispec_toregconst_raw(comp_ctx, &res->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
- duk__emit_a_b_c(comp_ctx,
- DUK_OP_DELPROP | DUK__EMIT_FLAG_BC_REGCONST,
- reg_temp,
- reg_obj,
- rc_key);
+ reg_obj =
+ duk__ispec_toregconst_raw(comp_ctx, &res->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
+ rc_key =
+ duk__ispec_toregconst_raw(comp_ctx, &res->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
+ duk__emit_a_b_c(comp_ctx, DUK_OP_DELPROP | DUK__EMIT_FLAG_BC_REGCONST, reg_temp, reg_obj, rc_key);
duk__ivalue_regconst(res, reg_temp);
} else {
@@ -69278,7 +72717,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
return;
}
case DUK_TOK_VOID: {
- duk__expr_toplain_ignore(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ duk__expr_toplain_ignore(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
duk_push_undefined(thr);
goto plain_value;
}
@@ -69288,7 +72727,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
* will never be unresolvable so special handling is only required
* when an identifier is a "slow path" one.
*/
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
if (res->t == DUK_IVAL_VAR) {
duk_regconst_t reg_varbind;
@@ -69300,10 +72739,7 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
DUK_DDD(DUK_DDDPRINT("typeof for an identifier name which could not be resolved "
"at compile time, need to use special run-time handling"));
reg_temp = DUK__ALLOCTEMP(comp_ctx);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_TYPEOFID,
- reg_temp,
- rc_varname);
+ duk__emit_a_bc(comp_ctx, DUK_OP_TYPEOFID, reg_temp, rc_varname);
duk__ivalue_regconst(res, reg_temp);
return;
}
@@ -69322,9 +72758,8 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
}
case DUK_TOK_ADD: {
/* unary plus */
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
- if (res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_VALUE &&
- duk_is_number(thr, res->x1.valstack_idx)) {
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ if (res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_VALUE && duk_is_number(thr, res->x1.valstack_idx)) {
/* unary plus of a number is identity */
return;
}
@@ -69333,9 +72768,8 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
}
case DUK_TOK_SUB: {
/* unary minus */
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
- if (res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_VALUE &&
- duk_is_number(thr, res->x1.valstack_idx)) {
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ if (res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_VALUE && duk_is_number(thr, res->x1.valstack_idx)) {
/* this optimization is important to handle negative literals
* (which are not directly provided by the lexical grammar)
*/
@@ -69355,12 +72789,12 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
goto unary;
}
case DUK_TOK_BNOT: {
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
args = DUK_OP_BNOT;
goto unary;
}
case DUK_TOK_LNOT: {
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
if (res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_VALUE) {
/* Very minimal inlining to handle common idioms '!0' and '!1',
* and also boolean arguments like '!false' and '!true'.
@@ -69372,12 +72806,12 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
if (DUK_TVAL_IS_NUMBER(tv_val)) {
duk_double_t d;
d = DUK_TVAL_GET_NUMBER(tv_val);
- if (d == 0.0) {
+ if (duk_double_equals(d, 0.0)) {
/* Matches both +0 and -0 on purpose. */
DUK_DDD(DUK_DDDPRINT("inlined lnot: !0 -> true"));
DUK_TVAL_SET_BOOLEAN_TRUE(tv_val);
return;
- } else if (d == 1.0) {
+ } else if (duk_double_equals(d, 1.0)) {
DUK_DDD(DUK_DDDPRINT("inlined lnot: !1 -> false"));
DUK_TVAL_SET_BOOLEAN_FALSE(tv_val);
return;
@@ -69395,117 +72829,110 @@ DUK_LOCAL void duk__expr_nud(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
goto unary;
}
- } /* end switch */
+ } /* end switch */
DUK_ERROR_SYNTAX(thr, DUK_STR_PARSE_ERROR);
DUK_WO_NORETURN(return;);
- unary:
- {
- /* Unary opcodes use just the 'BC' register source because it
- * matches current shuffle limits, and maps cleanly to 16 high
- * bits of the opcode.
- */
+unary : {
+ /* Unary opcodes use just the 'BC' register source because it
+ * matches current shuffle limits, and maps cleanly to 16 high
+ * bits of the opcode.
+ */
- duk_regconst_t reg_src, reg_res;
+ duk_regconst_t reg_src, reg_res;
- reg_src = duk__ivalue_toregconst_raw(comp_ctx, res, -1 /*forced_reg*/, 0 /*flags*/);
- if (DUK__ISREG_TEMP(comp_ctx, reg_src)) {
- reg_res = reg_src;
- } else {
- reg_res = DUK__ALLOCTEMP(comp_ctx);
- }
- duk__emit_a_bc(comp_ctx,
- args,
- reg_res,
- reg_src);
- duk__ivalue_regconst(res, reg_res);
- return;
+ reg_src = duk__ivalue_toregconst_raw(comp_ctx, res, -1 /*forced_reg*/, 0 /*flags*/);
+ if (DUK__ISREG_TEMP(comp_ctx, reg_src)) {
+ reg_res = reg_src;
+ } else {
+ reg_res = DUK__ALLOCTEMP(comp_ctx);
}
+ duk__emit_a_bc(comp_ctx, args, reg_res, reg_src);
+ duk__ivalue_regconst(res, reg_res);
+ return;
+}
- preincdec:
- {
- /* preincrement and predecrement */
- duk_regconst_t reg_res;
- duk_small_uint_t args_op1 = args & 0xff; /* DUK_OP_PREINCR/DUK_OP_PREDECR */
- duk_small_uint_t args_op2 = args >> 8; /* DUK_OP_PREINCP_RR/DUK_OP_PREDECP_RR */
-
- /* Specific assumptions for opcode numbering. */
- DUK_ASSERT(DUK_OP_PREINCR + 4 == DUK_OP_PREINCV);
- DUK_ASSERT(DUK_OP_PREDECR + 4 == DUK_OP_PREDECV);
+preincdec : {
+ /* preincrement and predecrement */
+ duk_regconst_t reg_res;
+ duk_small_uint_t args_op1 = args & 0xff; /* DUK_OP_PREINCR/DUK_OP_PREDECR */
+ duk_small_uint_t args_op2 = args >> 8; /* DUK_OP_PREINCP_RR/DUK_OP_PREDECP_RR */
- reg_res = DUK__ALLOCTEMP(comp_ctx);
+ /* Specific assumptions for opcode numbering. */
+ DUK_ASSERT(DUK_OP_PREINCR + 4 == DUK_OP_PREINCV);
+ DUK_ASSERT(DUK_OP_PREDECR + 4 == DUK_OP_PREDECV);
- duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
- if (res->t == DUK_IVAL_VAR) {
- duk_hstring *h_varname;
- duk_regconst_t reg_varbind;
- duk_regconst_t rc_varname;
+ reg_res = DUK__ALLOCTEMP(comp_ctx);
- h_varname = duk_known_hstring(thr, res->x1.valstack_idx);
+ duk__expr(comp_ctx, res, DUK__BP_MULTIPLICATIVE /*rbp_flags*/); /* UnaryExpression */
+ if (res->t == DUK_IVAL_VAR) {
+ duk_hstring *h_varname;
+ duk_regconst_t reg_varbind;
+ duk_regconst_t rc_varname;
- if (duk__hstring_is_eval_or_arguments_in_strict_mode(comp_ctx, h_varname)) {
- goto syntax_error;
- }
+ h_varname = duk_known_hstring(thr, res->x1.valstack_idx);
- duk_dup(thr, res->x1.valstack_idx);
- if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
- duk__emit_a_bc(comp_ctx,
- args_op1, /* e.g. DUK_OP_PREINCR */
- reg_res,
- reg_varbind);
- } else {
- duk__emit_a_bc(comp_ctx,
- args_op1 + 4, /* e.g. DUK_OP_PREINCV */
- reg_res,
- rc_varname);
- }
+ if (duk__hstring_is_eval_or_arguments_in_strict_mode(comp_ctx, h_varname)) {
+ goto syntax_error;
+ }
- DUK_DDD(DUK_DDDPRINT("preincdec to '%!O' -> reg_varbind=%ld, rc_varname=%ld",
- (duk_heaphdr *) h_varname, (long) reg_varbind, (long) rc_varname));
- } else if (res->t == DUK_IVAL_PROP) {
- duk_regconst_t reg_obj; /* allocate to reg only (not const) */
- duk_regconst_t rc_key;
- reg_obj = duk__ispec_toregconst_raw(comp_ctx, &res->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
- rc_key = duk__ispec_toregconst_raw(comp_ctx, &res->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
- duk__emit_a_b_c(comp_ctx,
- args_op2 | DUK__EMIT_FLAG_BC_REGCONST, /* e.g. DUK_OP_PREINCP */
- reg_res,
- reg_obj,
- rc_key);
+ duk_dup(thr, res->x1.valstack_idx);
+ if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
+ duk__emit_a_bc(comp_ctx,
+ args_op1, /* e.g. DUK_OP_PREINCR */
+ reg_res,
+ reg_varbind);
} else {
- /* Technically return value is not needed because INVLHS will
- * unconditially throw a ReferenceError. Coercion is necessary
- * for proper semantics (consider ToNumber() called for an object).
- * Use DUK_OP_UNP with a dummy register to get ToNumber().
- */
-
- duk__ivalue_toforcedreg(comp_ctx, res, reg_res);
- duk__emit_bc(comp_ctx,
- DUK_OP_UNP,
- reg_res); /* for side effects, result ignored */
- duk__emit_op_only(comp_ctx,
- DUK_OP_INVLHS);
+ duk__emit_a_bc(comp_ctx,
+ args_op1 + 4, /* e.g. DUK_OP_PREINCV */
+ reg_res,
+ rc_varname);
}
- DUK__SETTEMP(comp_ctx, reg_res + 1);
- duk__ivalue_regconst(res, reg_res);
- return;
- }
- plain_value:
- {
- /* Stack top contains plain value */
- duk__ivalue_plain_fromstack(comp_ctx, res);
- return;
+ DUK_DDD(DUK_DDDPRINT("preincdec to '%!O' -> reg_varbind=%ld, rc_varname=%ld",
+ (duk_heaphdr *) h_varname,
+ (long) reg_varbind,
+ (long) rc_varname));
+ } else if (res->t == DUK_IVAL_PROP) {
+ duk_regconst_t reg_obj; /* allocate to reg only (not const) */
+ duk_regconst_t rc_key;
+ reg_obj = duk__ispec_toregconst_raw(comp_ctx, &res->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
+ rc_key = duk__ispec_toregconst_raw(comp_ctx, &res->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
+ duk__emit_a_b_c(comp_ctx,
+ args_op2 | DUK__EMIT_FLAG_BC_REGCONST, /* e.g. DUK_OP_PREINCP */
+ reg_res,
+ reg_obj,
+ rc_key);
+ } else {
+ /* Technically return value is not needed because INVLHS will
+ * unconditially throw a ReferenceError. Coercion is necessary
+ * for proper semantics (consider ToNumber() called for an object).
+ * Use DUK_OP_UNP with a dummy register to get ToNumber().
+ */
+
+ duk__ivalue_toforcedreg(comp_ctx, res, reg_res);
+ duk__emit_bc(comp_ctx, DUK_OP_UNP, reg_res); /* for side effects, result ignored */
+ duk__emit_op_only(comp_ctx, DUK_OP_INVLHS);
}
+ DUK__SETTEMP(comp_ctx, reg_res + 1);
+ duk__ivalue_regconst(res, reg_res);
+ return;
+}
+
+plain_value : {
+ /* Stack top contains plain value */
+ duk__ivalue_plain_fromstack(comp_ctx, res);
+ return;
+}
#if defined(DUK_USE_ES6)
- syntax_error_newtarget:
+syntax_error_newtarget:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_NEWTARGET);
DUK_WO_NORETURN(return;);
#endif
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_EXPRESSION);
DUK_WO_NORETURN(return;);
}
@@ -69518,7 +72945,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
duk_hthread *thr = comp_ctx->thr;
duk_token *tk;
duk_small_uint_t tok;
- duk_uint32_t args; /* temp variable to pass constants and flags to shared code */
+ duk_uint32_t args; /* temp variable to pass constants and flags to shared code */
/*
* ctx->prev_token token to process with duk__expr_led()
@@ -69532,13 +72959,14 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
tok = tk->t;
DUK_DDD(DUK_DDDPRINT("duk__expr_led(), prev_token.t=%ld, allow_in=%ld, paren_level=%ld",
- (long) tk->t, (long) comp_ctx->curr_func.allow_in, (long) comp_ctx->curr_func.paren_level));
+ (long) tk->t,
+ (long) comp_ctx->curr_func.allow_in,
+ (long) comp_ctx->curr_func.paren_level));
/* XXX: default priority for infix operators is duk__expr_lbp(tok) -> get it here? */
switch (tok) {
-
- /* PRIMARY EXPRESSIONS */
+ /* PRIMARY EXPRESSIONS */
case DUK_TOK_PERIOD: {
/* Property access expressions are critical for correct LHS ordering,
@@ -69566,7 +72994,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
}
res->t = DUK_IVAL_PROP;
- duk__copy_ispec(comp_ctx, &left->x1, &res->x1); /* left.x1 -> res.x1 */
+ duk__copy_ispec(comp_ctx, &left->x1, &res->x1); /* left.x1 -> res.x1 */
DUK_ASSERT(comp_ctx->curr_token.str1 != NULL);
duk_push_hstring(thr, comp_ctx->curr_token.str1);
duk_replace(thr, res->x2.valstack_idx);
@@ -69601,12 +73029,12 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* See: test-bug-nested-prop-mutate.js.
*/
duk__ivalue_totempconst(comp_ctx, left);
- duk__expr_toplain(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/); /* Expression, ']' terminates */
+ duk__expr_toplain(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/); /* Expression, ']' terminates */
duk__advance_expect(comp_ctx, DUK_TOK_RBRACKET);
res->t = DUK_IVAL_PROP;
- duk__copy_ispec(comp_ctx, &res->x1, &res->x2); /* res.x1 -> res.x2 */
- duk__copy_ispec(comp_ctx, &left->x1, &res->x1); /* left.x1 -> res.x1 */
+ duk__copy_ispec(comp_ctx, &res->x1, &res->x2); /* res.x1 -> res.x2 */
+ duk__copy_ispec(comp_ctx, &left->x1, &res->x1); /* left.x1 -> res.x1 */
return;
}
case DUK_TOK_LPAREN: {
@@ -69650,19 +73078,13 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
duk_dup(thr, left->x1.valstack_idx);
if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CSREG | DUK__EMIT_FLAG_A_IS_SOURCE,
- reg_varbind,
- reg_cs + 0);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CSREG | DUK__EMIT_FLAG_A_IS_SOURCE, reg_varbind, reg_cs + 0);
} else {
/* XXX: expand target register or constant field to
* reduce shuffling.
*/
DUK_ASSERT(DUK__ISCONST(rc_varname));
- duk__emit_a_b(comp_ctx,
- DUK_OP_CSVAR | DUK__EMIT_FLAG_BC_REGCONST,
- reg_cs + 0,
- rc_varname);
+ duk__emit_a_b(comp_ctx, DUK_OP_CSVAR | DUK__EMIT_FLAG_BC_REGCONST, reg_cs + 0, rc_varname);
}
} else if (left->t == DUK_IVAL_PROP) {
/* Call through a property lookup, E5 Section 11.2.3, step 6.a.i,
@@ -69684,16 +73106,12 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* and reuse, but it would still be in the wrong position
* (reg_cs + 0 rather than reg_cs + 1).
*/
- duk__ispec_toforcedreg(comp_ctx, &left->x1, reg_cs + 1); /* base */
+ duk__ispec_toforcedreg(comp_ctx, &left->x1, reg_cs + 1); /* base */
#if defined(DUK_USE_VERBOSE_ERRORS)
reg_key = duk__ispec_toregconst_raw(comp_ctx, &left->x2, -1, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
- duk__emit_a_b_c(comp_ctx,
- DUK_OP_GETPROPC | DUK__EMIT_FLAG_BC_REGCONST,
- reg_cs + 0,
- reg_cs + 1,
- reg_key);
+ duk__emit_a_b_c(comp_ctx, DUK_OP_GETPROPC | DUK__EMIT_FLAG_BC_REGCONST, reg_cs + 0, reg_cs + 1, reg_key);
#else
- duk__ivalue_toforcedreg(comp_ctx, left, reg_cs + 0); /* base[key] */
+ duk__ivalue_toforcedreg(comp_ctx, left, reg_cs + 0); /* base[key] */
#endif
} else {
DUK_DDD(DUK_DDDPRINT("function call with register base"));
@@ -69712,23 +73130,20 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
}
DUK__SETTEMP(comp_ctx, reg_cs + 2);
- nargs = duk__parse_arguments(comp_ctx, res); /* parse args starting from "next temp" */
+ nargs = duk__parse_arguments(comp_ctx, res); /* parse args starting from "next temp" */
/* Tailcalls are handled by back-patching the already emitted opcode
* later in return statement parser.
*/
- duk__emit_a_bc(comp_ctx,
- call_op,
- (duk_regconst_t) nargs /*numargs*/,
- reg_cs /*basereg*/);
- DUK__SETTEMP(comp_ctx, reg_cs + 1); /* result in csreg */
+ duk__emit_a_bc(comp_ctx, call_op, (duk_regconst_t) nargs /*numargs*/, reg_cs /*basereg*/);
+ DUK__SETTEMP(comp_ctx, reg_cs + 1); /* result in csreg */
duk__ivalue_regconst(res, reg_cs);
return;
}
- /* POSTFIX EXPRESSION */
+ /* POSTFIX EXPRESSION */
case DUK_TOK_INCREMENT: {
args = (DUK_OP_POSTINCP_RR << 16) + (DUK_OP_POSTINCR << 8) + 0;
@@ -69743,38 +73158,38 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
#if defined(DUK_USE_ES7_EXP_OPERATOR)
case DUK_TOK_EXP: {
- args = (DUK_OP_EXP << 8) + DUK__BP_EXPONENTIATION - 1; /* UnaryExpression */
+ args = (DUK_OP_EXP << 8) + DUK__BP_EXPONENTIATION - 1; /* UnaryExpression */
goto binary;
}
#endif
- /* MULTIPLICATIVE EXPRESSION */
+ /* MULTIPLICATIVE EXPRESSION */
case DUK_TOK_MUL: {
- args = (DUK_OP_MUL << 8) + DUK__BP_MULTIPLICATIVE; /* ExponentiationExpression */
+ args = (DUK_OP_MUL << 8) + DUK__BP_MULTIPLICATIVE; /* ExponentiationExpression */
goto binary;
}
case DUK_TOK_DIV: {
- args = (DUK_OP_DIV << 8) + DUK__BP_MULTIPLICATIVE; /* ExponentiationExpression */
+ args = (DUK_OP_DIV << 8) + DUK__BP_MULTIPLICATIVE; /* ExponentiationExpression */
goto binary;
}
case DUK_TOK_MOD: {
- args = (DUK_OP_MOD << 8) + DUK__BP_MULTIPLICATIVE; /* ExponentiationExpression */
+ args = (DUK_OP_MOD << 8) + DUK__BP_MULTIPLICATIVE; /* ExponentiationExpression */
goto binary;
}
- /* ADDITIVE EXPRESSION */
+ /* ADDITIVE EXPRESSION */
case DUK_TOK_ADD: {
- args = (DUK_OP_ADD << 8) + DUK__BP_ADDITIVE; /* MultiplicativeExpression */
+ args = (DUK_OP_ADD << 8) + DUK__BP_ADDITIVE; /* MultiplicativeExpression */
goto binary;
}
case DUK_TOK_SUB: {
- args = (DUK_OP_SUB << 8) + DUK__BP_ADDITIVE; /* MultiplicativeExpression */
+ args = (DUK_OP_SUB << 8) + DUK__BP_ADDITIVE; /* MultiplicativeExpression */
goto binary;
}
- /* SHIFT EXPRESSION */
+ /* SHIFT EXPRESSION */
case DUK_TOK_ALSHIFT: {
/* << */
@@ -69792,7 +73207,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
goto binary;
}
- /* RELATIONAL EXPRESSION */
+ /* RELATIONAL EXPRESSION */
case DUK_TOK_LT: {
/* < */
@@ -69820,7 +73235,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
goto binary;
}
- /* EQUALITY EXPRESSION */
+ /* EQUALITY EXPRESSION */
case DUK_TOK_EQ: {
args = (DUK_OP_EQ << 8) + DUK__BP_EQUALITY;
@@ -69839,7 +73254,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
goto binary;
}
- /* BITWISE EXPRESSIONS */
+ /* BITWISE EXPRESSIONS */
case DUK_TOK_BAND: {
args = (DUK_OP_BAND << 8) + DUK__BP_BAND;
@@ -69854,7 +73269,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
goto binary;
}
- /* LOGICAL EXPRESSIONS */
+ /* LOGICAL EXPRESSIONS */
case DUK_TOK_LAND: {
/* syntactically left-associative but parsed as right-associative */
@@ -69867,7 +73282,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
goto binary_logical;
}
- /* CONDITIONAL EXPRESSION */
+ /* CONDITIONAL EXPRESSION */
case DUK_TOK_QUESTION: {
/* XXX: common reg allocation need is to reuse a sub-expression's temp reg,
@@ -69880,12 +73295,18 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
reg_temp = DUK__ALLOCTEMP(comp_ctx);
duk__ivalue_toforcedreg(comp_ctx, left, reg_temp);
duk__emit_if_true_skip(comp_ctx, reg_temp);
- pc_jump1 = duk__emit_jump_empty(comp_ctx); /* jump to false */
- duk__expr_toforcedreg(comp_ctx, res, DUK__BP_COMMA /*rbp_flags*/, reg_temp /*forced_reg*/); /* AssignmentExpression */
+ pc_jump1 = duk__emit_jump_empty(comp_ctx); /* jump to false */
+ duk__expr_toforcedreg(comp_ctx,
+ res,
+ DUK__BP_COMMA /*rbp_flags*/,
+ reg_temp /*forced_reg*/); /* AssignmentExpression */
duk__advance_expect(comp_ctx, DUK_TOK_COLON);
- pc_jump2 = duk__emit_jump_empty(comp_ctx); /* jump to end */
+ pc_jump2 = duk__emit_jump_empty(comp_ctx); /* jump to end */
duk__patch_jump_here(comp_ctx, pc_jump1);
- duk__expr_toforcedreg(comp_ctx, res, DUK__BP_COMMA /*rbp_flags*/, reg_temp /*forced_reg*/); /* AssignmentExpression */
+ duk__expr_toforcedreg(comp_ctx,
+ res,
+ DUK__BP_COMMA /*rbp_flags*/,
+ reg_temp /*forced_reg*/); /* AssignmentExpression */
duk__patch_jump_here(comp_ctx, pc_jump2);
DUK__SETTEMP(comp_ctx, reg_temp + 1);
@@ -69893,7 +73314,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
return;
}
- /* ASSIGNMENT EXPRESSION */
+ /* ASSIGNMENT EXPRESSION */
case DUK_TOK_EQUALSIGN: {
/*
@@ -69907,7 +73328,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
*
* XXX: just use DUK__BP_COMMA (i.e. no need for 2-step bp levels)?
*/
- args = (DUK_OP_NONE << 8) + DUK__BP_ASSIGNMENT - 1; /* DUK_OP_NONE marks a 'plain' assignment */
+ args = (DUK_OP_NONE << 8) + DUK__BP_ASSIGNMENT - 1; /* DUK_OP_NONE marks a 'plain' assignment */
goto assign;
}
case DUK_TOK_ADD_EQ: {
@@ -69973,12 +73394,12 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
goto assign;
}
- /* COMMA */
+ /* COMMA */
case DUK_TOK_COMMA: {
/* right associative */
- duk__ivalue_toplain_ignore(comp_ctx, left); /* need side effects, not value */
+ duk__ivalue_toplain_ignore(comp_ctx, left); /* need side effects, not value */
duk__expr_toplain(comp_ctx, res, DUK__BP_COMMA - 1 /*rbp_flags*/);
/* return 'res' (of right part) as our result */
@@ -70001,7 +73422,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
}
#endif
- binary:
+binary:
/*
* Shared handling of binary operations
*
@@ -70027,11 +73448,15 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
duk_copy(thr, left->x1.valstack_idx, res->x1.valstack_idx);
DUK_DDD(DUK_DDDPRINT("binary op, res: t=%ld, x1.t=%ld, x1.regconst=0x%08lx, x2.t=%ld, x2.regconst=0x%08lx",
- (long) res->t, (long) res->x1.t, (unsigned long) res->x1.regconst, (long) res->x2.t, (unsigned long) res->x2.regconst));
+ (long) res->t,
+ (long) res->x1.t,
+ (unsigned long) res->x1.regconst,
+ (long) res->x2.t,
+ (unsigned long) res->x2.regconst));
return;
}
- binary_logical:
+binary_logical:
/*
* Shared handling for logical AND and logical OR.
*
@@ -70064,8 +73489,8 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
duk__ivalue_toforcedreg(comp_ctx, left, reg_temp);
DUK_ASSERT(DUK__ISREG(reg_temp));
duk__emit_bc(comp_ctx,
- (args_truthval ? DUK_OP_IFTRUE_R : DUK_OP_IFFALSE_R),
- reg_temp); /* skip jump conditionally */
+ (args_truthval ? DUK_OP_IFTRUE_R : DUK_OP_IFFALSE_R),
+ reg_temp); /* skip jump conditionally */
pc_jump = duk__emit_jump_empty(comp_ctx);
duk__expr_toforcedreg(comp_ctx, res, args_rbp /*rbp_flags*/, reg_temp /*forced_reg*/);
duk__patch_jump_here(comp_ctx, pc_jump);
@@ -70074,7 +73499,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
return;
}
- assign:
+assign:
/*
* Shared assignment expression handling
*
@@ -70127,7 +73552,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* is relevant for e.g. eval code.
*/
toplevel_assign = (comp_ctx->curr_func.nud_count == 1 && /* one token before */
- comp_ctx->curr_func.led_count == 1); /* one operator (= assign) */
+ comp_ctx->curr_func.led_count == 1); /* one operator (= assign) */
DUK_DDD(DUK_DDDPRINT("assignment: nud_count=%ld, led_count=%ld, toplevel_assign=%ld",
(long) comp_ctx->curr_func.nud_count,
(long) comp_ctx->curr_func.led_count,
@@ -70138,7 +73563,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
duk_regconst_t reg_varbind;
duk_regconst_t rc_varname;
- DUK_ASSERT(left->x1.t == DUK_ISPEC_VALUE); /* LHS is already side effect free */
+ DUK_ASSERT(left->x1.t == DUK_ISPEC_VALUE); /* LHS is already side effect free */
h_varname = duk_known_hstring(thr, left->x1.valstack_idx);
if (duk__hstring_is_eval_or_arguments_in_strict_mode(comp_ctx, h_varname)) {
@@ -70155,9 +73580,10 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
DUK_DDD(DUK_DDDPRINT("plain assignment, toplevel assign, use as is"));
} else {
/* 'res' must be a plain ivalue, and not register-bound variable. */
- DUK_DDD(DUK_DDDPRINT("plain assignment, not toplevel assign, ensure not a reg-bound identifier"));
- if (res->t != DUK_IVAL_PLAIN || (res->x1.t == DUK_ISPEC_REGCONST &&
- DUK__ISREG_NOTTEMP(comp_ctx, res->x1.regconst))) {
+ DUK_DDD(DUK_DDDPRINT(
+ "plain assignment, not toplevel assign, ensure not a reg-bound identifier"));
+ if (res->t != DUK_IVAL_PLAIN ||
+ (res->x1.t == DUK_ISPEC_REGCONST && DUK__ISREG_NOTTEMP(comp_ctx, res->x1.regconst))) {
duk__ivalue_totempconst(comp_ctx, res);
}
}
@@ -70190,7 +73616,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* value, so go through a temp.
*/
DUK_DD(DUK_DDPRINT("<op>= expression is not top level, write to reg_temp"));
- reg_res = reg_temp; /* reg_res should be smallest possible */
+ reg_res = reg_temp; /* reg_res should be smallest possible */
reg_temp = DUK__ALLOCTEMP(comp_ctx);
}
@@ -70202,10 +73628,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
*/
pc_temp_load = duk__get_current_pc(comp_ctx);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_LDREG,
- reg_temp,
- reg_varbind);
+ duk__emit_a_bc(comp_ctx, DUK_OP_LDREG, reg_temp, reg_varbind);
pc_before_rhs = duk__get_current_pc(comp_ctx);
duk__expr_toregconst(comp_ctx, res, args_rbp /*rbp_flags*/);
@@ -70213,7 +73636,8 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
pc_after_rhs = duk__get_current_pc(comp_ctx);
DUK_DD(DUK_DDPRINT("pc_temp_load=%ld, pc_before_rhs=%ld, pc_after_rhs=%ld",
- (long) pc_temp_load, (long) pc_before_rhs,
+ (long) pc_temp_load,
+ (long) pc_before_rhs,
(long) pc_after_rhs));
if (pc_after_rhs == pc_before_rhs) {
@@ -70221,11 +73645,16 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* instructions, we may need to rewind more than
* one instruction, so use explicit PC computation.
*/
- DUK_DD(DUK_DDPRINT("rhs is side effect free, rewind and avoid unnecessary temp for reg-based <op>="));
- DUK_BW_ADD_PTR(comp_ctx->thr, &comp_ctx->curr_func.bw_code, (pc_temp_load - pc_before_rhs) * (duk_int_t) sizeof(duk_compiler_instr));
+ DUK_DD(DUK_DDPRINT("rhs is side effect free, rewind and avoid unnecessary temp for "
+ "reg-based <op>="));
+ DUK_BW_ADD_PTR(comp_ctx->thr,
+ &comp_ctx->curr_func.bw_code,
+ (pc_temp_load - pc_before_rhs) *
+ (duk_int_t) sizeof(duk_compiler_instr));
reg_src = reg_varbind;
} else {
- DUK_DD(DUK_DDPRINT("rhs evaluation emitted code, not sure if rhs is side effect free; use temp reg for LHS"));
+ DUK_DD(DUK_DDPRINT("rhs evaluation emitted code, not sure if rhs is side effect "
+ "free; use temp reg for LHS"));
reg_src = reg_temp;
}
@@ -70246,10 +73675,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* temporary. No optimization for top level assignment.
*/
- duk__emit_a_bc(comp_ctx,
- DUK_OP_GETVAR,
- reg_temp,
- rc_varname);
+ duk__emit_a_bc(comp_ctx, DUK_OP_GETVAR, reg_temp, rc_varname);
duk__expr_toregconst(comp_ctx, res, args_rbp /*rbp_flags*/);
DUK_ASSERT(res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_REGCONST);
@@ -70282,7 +73708,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
duk__ivalue_toforcedreg(comp_ctx, res, (duk_int_t) reg_varbind);
} else {
duk__ivalue_totempconst(comp_ctx, res);
- duk__copy_ivalue(comp_ctx, res, left); /* use 'left' as a temp */
+ duk__copy_ivalue(comp_ctx, res, left); /* use 'left' as a temp */
duk__ivalue_toforcedreg(comp_ctx, left, (duk_int_t) reg_varbind);
}
} else {
@@ -70290,7 +73716,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
* free and may be a plain value, a register, or a
* constant) and write it to the LHS binding too.
*/
- duk__copy_ivalue(comp_ctx, res, left); /* use 'left' as a temp */
+ duk__copy_ivalue(comp_ctx, res, left); /* use 'left' as a temp */
duk__ivalue_toforcedreg(comp_ctx, left, (duk_int_t) reg_varbind);
}
} else {
@@ -70303,10 +73729,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
*/
duk__ivalue_toreg(comp_ctx, res);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE,
- res->x1.regconst,
- rc_varname);
+ duk__emit_a_bc(comp_ctx, DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE, res->x1.regconst, rc_varname);
}
/* 'res' contains expression value */
@@ -70346,11 +73769,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
rc_res = res->x1.regconst;
} else {
reg_temp = DUK__ALLOCTEMP(comp_ctx);
- duk__emit_a_b_c(comp_ctx,
- DUK_OP_GETPROP | DUK__EMIT_FLAG_BC_REGCONST,
- reg_temp,
- reg_obj,
- rc_key);
+ duk__emit_a_b_c(comp_ctx, DUK_OP_GETPROP | DUK__EMIT_FLAG_BC_REGCONST, reg_temp, reg_obj, rc_key);
duk__expr_toregconst(comp_ctx, res, args_rbp /*rbp_flags*/);
DUK_ASSERT(res->t == DUK_IVAL_PLAIN && res->x1.t == DUK_ISPEC_REGCONST);
@@ -70401,90 +73820,88 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
return;
}
- postincdec:
- {
- /*
- * Post-increment/decrement will return the original value as its
- * result value. However, even that value will be coerced using
- * ToNumber() which is quite awkward. Specific bytecode opcodes
- * are used to handle these semantics.
- *
- * Note that post increment/decrement has a "no LineTerminator here"
- * restriction. This is handled by duk__expr_lbp(), which forcibly terminates
- * the previous expression if a LineTerminator occurs before '++'/'--'.
- */
-
- duk_regconst_t reg_res;
- duk_small_uint_t args_op1 = (args >> 8) & 0xff; /* DUK_OP_POSTINCR/DUK_OP_POSTDECR */
- duk_small_uint_t args_op2 = args >> 16; /* DUK_OP_POSTINCP_RR/DUK_OP_POSTDECP_RR */
-
- /* Specific assumptions for opcode numbering. */
- DUK_ASSERT(DUK_OP_POSTINCR + 4 == DUK_OP_POSTINCV);
- DUK_ASSERT(DUK_OP_POSTDECR + 4 == DUK_OP_POSTDECV);
+postincdec : {
+ /*
+ * Post-increment/decrement will return the original value as its
+ * result value. However, even that value will be coerced using
+ * ToNumber() which is quite awkward. Specific bytecode opcodes
+ * are used to handle these semantics.
+ *
+ * Note that post increment/decrement has a "no LineTerminator here"
+ * restriction. This is handled by duk__expr_lbp(), which forcibly terminates
+ * the previous expression if a LineTerminator occurs before '++'/'--'.
+ */
- reg_res = DUK__ALLOCTEMP(comp_ctx);
+ duk_regconst_t reg_res;
+ duk_small_uint_t args_op1 = (args >> 8) & 0xff; /* DUK_OP_POSTINCR/DUK_OP_POSTDECR */
+ duk_small_uint_t args_op2 = args >> 16; /* DUK_OP_POSTINCP_RR/DUK_OP_POSTDECP_RR */
- if (left->t == DUK_IVAL_VAR) {
- duk_hstring *h_varname;
- duk_regconst_t reg_varbind;
- duk_regconst_t rc_varname;
+ /* Specific assumptions for opcode numbering. */
+ DUK_ASSERT(DUK_OP_POSTINCR + 4 == DUK_OP_POSTINCV);
+ DUK_ASSERT(DUK_OP_POSTDECR + 4 == DUK_OP_POSTDECV);
- h_varname = duk_known_hstring(thr, left->x1.valstack_idx);
+ reg_res = DUK__ALLOCTEMP(comp_ctx);
- if (duk__hstring_is_eval_or_arguments_in_strict_mode(comp_ctx, h_varname)) {
- goto syntax_error;
- }
+ if (left->t == DUK_IVAL_VAR) {
+ duk_hstring *h_varname;
+ duk_regconst_t reg_varbind;
+ duk_regconst_t rc_varname;
- duk_dup(thr, left->x1.valstack_idx);
- if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
- duk__emit_a_bc(comp_ctx,
- args_op1, /* e.g. DUK_OP_POSTINCR */
- reg_res,
- reg_varbind);
- } else {
- duk__emit_a_bc(comp_ctx,
- args_op1 + 4, /* e.g. DUK_OP_POSTINCV */
- reg_res,
- rc_varname);
- }
+ h_varname = duk_known_hstring(thr, left->x1.valstack_idx);
- DUK_DDD(DUK_DDDPRINT("postincdec to '%!O' -> reg_varbind=%ld, rc_varname=%ld",
- (duk_heaphdr *) h_varname, (long) reg_varbind, (long) rc_varname));
- } else if (left->t == DUK_IVAL_PROP) {
- duk_regconst_t reg_obj; /* allocate to reg only (not const) */
- duk_regconst_t rc_key;
+ if (duk__hstring_is_eval_or_arguments_in_strict_mode(comp_ctx, h_varname)) {
+ goto syntax_error;
+ }
- reg_obj = duk__ispec_toregconst_raw(comp_ctx, &left->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
- rc_key = duk__ispec_toregconst_raw(comp_ctx, &left->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
- duk__emit_a_b_c(comp_ctx,
- args_op2 | DUK__EMIT_FLAG_BC_REGCONST, /* e.g. DUK_OP_POSTINCP */
- reg_res,
- reg_obj,
- rc_key);
+ duk_dup(thr, left->x1.valstack_idx);
+ if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
+ duk__emit_a_bc(comp_ctx,
+ args_op1, /* e.g. DUK_OP_POSTINCR */
+ reg_res,
+ reg_varbind);
} else {
- /* Technically return value is not needed because INVLHS will
- * unconditially throw a ReferenceError. Coercion is necessary
- * for proper semantics (consider ToNumber() called for an object).
- * Use DUK_OP_UNP with a dummy register to get ToNumber().
- */
- duk__ivalue_toforcedreg(comp_ctx, left, reg_res);
- duk__emit_bc(comp_ctx,
- DUK_OP_UNP,
- reg_res); /* for side effects, result ignored */
- duk__emit_op_only(comp_ctx,
- DUK_OP_INVLHS);
+ duk__emit_a_bc(comp_ctx,
+ args_op1 + 4, /* e.g. DUK_OP_POSTINCV */
+ reg_res,
+ rc_varname);
}
- DUK__SETTEMP(comp_ctx, reg_res + 1);
- duk__ivalue_regconst(res, reg_res);
- return;
+ DUK_DDD(DUK_DDDPRINT("postincdec to '%!O' -> reg_varbind=%ld, rc_varname=%ld",
+ (duk_heaphdr *) h_varname,
+ (long) reg_varbind,
+ (long) rc_varname));
+ } else if (left->t == DUK_IVAL_PROP) {
+ duk_regconst_t reg_obj; /* allocate to reg only (not const) */
+ duk_regconst_t rc_key;
+
+ reg_obj = duk__ispec_toregconst_raw(comp_ctx, &left->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
+ rc_key = duk__ispec_toregconst_raw(comp_ctx, &left->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
+ duk__emit_a_b_c(comp_ctx,
+ args_op2 | DUK__EMIT_FLAG_BC_REGCONST, /* e.g. DUK_OP_POSTINCP */
+ reg_res,
+ reg_obj,
+ rc_key);
+ } else {
+ /* Technically return value is not needed because INVLHS will
+ * unconditially throw a ReferenceError. Coercion is necessary
+ * for proper semantics (consider ToNumber() called for an object).
+ * Use DUK_OP_UNP with a dummy register to get ToNumber().
+ */
+ duk__ivalue_toforcedreg(comp_ctx, left, reg_res);
+ duk__emit_bc(comp_ctx, DUK_OP_UNP, reg_res); /* for side effects, result ignored */
+ duk__emit_op_only(comp_ctx, DUK_OP_INVLHS);
}
- syntax_error:
+ DUK__SETTEMP(comp_ctx, reg_res + 1);
+ duk__ivalue_regconst(res, reg_res);
+ return;
+}
+
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_EXPRESSION);
DUK_WO_NORETURN(return;);
- syntax_error_lvalue:
+syntax_error_lvalue:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_LVALUE);
DUK_WO_NORETURN(return;);
}
@@ -70492,7 +73909,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i
DUK_LOCAL duk_small_uint_t duk__expr_lbp(duk_compiler_ctx *comp_ctx) {
duk_small_uint_t tok = comp_ctx->curr_token.t;
- DUK_ASSERT_DISABLE(tok >= DUK_TOK_MINVAL); /* unsigned */
+ DUK_ASSERT_DISABLE(tok >= DUK_TOK_MINVAL); /* unsigned */
DUK_ASSERT(tok <= DUK_TOK_MAXVAL);
DUK_ASSERT(sizeof(duk__token_lbp) == DUK_TOK_MAXVAL + 1);
@@ -70505,8 +73922,7 @@ DUK_LOCAL duk_small_uint_t duk__expr_lbp(duk_compiler_ctx *comp_ctx) {
return 0;
}
- if ((tok == DUK_TOK_DECREMENT || tok == DUK_TOK_INCREMENT) &&
- (comp_ctx->curr_token.lineterm)) {
+ if ((tok == DUK_TOK_DECREMENT || tok == DUK_TOK_INCREMENT) && (comp_ctx->curr_token.lineterm)) {
/* '++' or '--' in a post-increment/decrement position,
* and a LineTerminator occurs between the operator and
* the preceding expression. Force the previous expr
@@ -70516,7 +73932,7 @@ DUK_LOCAL duk_small_uint_t duk__expr_lbp(duk_compiler_ctx *comp_ctx) {
return 0;
}
- return DUK__TOKEN_LBP_GET_BP(duk__token_lbp[tok]); /* format is bit packed */
+ return DUK__TOKEN_LBP_GET_BP(duk__token_lbp[tok]); /* format is bit packed */
}
/*
@@ -70528,15 +73944,15 @@ DUK_LOCAL duk_small_uint_t duk__expr_lbp(duk_compiler_ctx *comp_ctx) {
* statement).
*/
-#define DUK__EXPR_RBP_MASK 0xff
-#define DUK__EXPR_FLAG_REJECT_IN (1 << 8) /* reject 'in' token (used for for-in) */
-#define DUK__EXPR_FLAG_ALLOW_EMPTY (1 << 9) /* allow empty expression */
-#define DUK__EXPR_FLAG_REQUIRE_INIT (1 << 10) /* require initializer for var/const */
+#define DUK__EXPR_RBP_MASK 0xff
+#define DUK__EXPR_FLAG_REJECT_IN (1 << 8) /* reject 'in' token (used for for-in) */
+#define DUK__EXPR_FLAG_ALLOW_EMPTY (1 << 9) /* allow empty expression */
+#define DUK__EXPR_FLAG_REQUIRE_INIT (1 << 10) /* require initializer for var/const */
/* main expression parser function */
DUK_LOCAL void duk__expr(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags) {
duk_hthread *thr = comp_ctx->thr;
- duk_ivalue tmp_alloc; /* 'res' is used for "left", and 'tmp' for "right" */
+ duk_ivalue tmp_alloc; /* 'res' is used for "left", and 'tmp' for "right" */
duk_ivalue *tmp = &tmp_alloc;
duk_small_uint_t rbp;
@@ -70548,7 +73964,9 @@ DUK_LOCAL void duk__expr(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_
rbp = rbp_flags & DUK__EXPR_RBP_MASK;
DUK_DDD(DUK_DDDPRINT("duk__expr(), rbp_flags=%ld, rbp=%ld, allow_in=%ld, paren_level=%ld",
- (long) rbp_flags, (long) rbp, (long) comp_ctx->curr_func.allow_in,
+ (long) rbp_flags,
+ (long) rbp,
+ (long) comp_ctx->curr_func.allow_in,
(long) comp_ctx->curr_func.paren_level));
duk_memzero(&tmp_alloc, sizeof(tmp_alloc));
@@ -70579,14 +73997,14 @@ DUK_LOCAL void duk__expr(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_
}
duk__advance(comp_ctx);
- duk__expr_nud(comp_ctx, res); /* reuse 'res' as 'left' */
+ duk__expr_nud(comp_ctx, res); /* reuse 'res' as 'left' */
while (rbp < duk__expr_lbp(comp_ctx)) {
duk__advance(comp_ctx);
duk__expr_led(comp_ctx, res, tmp);
- duk__copy_ivalue(comp_ctx, tmp, res); /* tmp -> res */
+ duk__copy_ivalue(comp_ctx, tmp, res); /* tmp -> res */
}
- cleanup:
+cleanup:
/* final result is already in 'res' */
duk_pop_2(thr);
@@ -70620,21 +74038,24 @@ DUK_LOCAL void duk__exprtop(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_sma
* Each helper needs at least 2-3 calls to make it worth while to wrap.
*/
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL duk_regconst_t duk__expr_toreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags) {
duk__expr(comp_ctx, res, rbp_flags);
return duk__ivalue_toreg(comp_ctx, res);
}
#endif
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL duk_regconst_t duk__expr_totemp(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags) {
duk__expr(comp_ctx, res, rbp_flags);
return duk__ivalue_totemp(comp_ctx, res);
}
#endif
-DUK_LOCAL void duk__expr_toforcedreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags, duk_regconst_t forced_reg) {
+DUK_LOCAL void duk__expr_toforcedreg(duk_compiler_ctx *comp_ctx,
+ duk_ivalue *res,
+ duk_small_uint_t rbp_flags,
+ duk_regconst_t forced_reg) {
DUK_ASSERT(forced_reg >= 0);
duk__expr(comp_ctx, res, rbp_flags);
duk__ivalue_toforcedreg(comp_ctx, res, forced_reg);
@@ -70645,7 +74066,7 @@ DUK_LOCAL duk_regconst_t duk__expr_toregconst(duk_compiler_ctx *comp_ctx, duk_iv
return duk__ivalue_toregconst(comp_ctx, res);
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL duk_regconst_t duk__expr_totempconst(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags) {
duk__expr(comp_ctx, res, rbp_flags);
return duk__ivalue_totempconst(comp_ctx, res);
@@ -70667,14 +74088,17 @@ DUK_LOCAL duk_regconst_t duk__exprtop_toreg(duk_compiler_ctx *comp_ctx, duk_ival
return duk__ivalue_toreg(comp_ctx, res);
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL duk_regconst_t duk__exprtop_totemp(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags) {
duk__exprtop(comp_ctx, res, rbp_flags);
return duk__ivalue_totemp(comp_ctx, res);
}
#endif
-DUK_LOCAL void duk__exprtop_toforcedreg(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t rbp_flags, duk_regconst_t forced_reg) {
+DUK_LOCAL void duk__exprtop_toforcedreg(duk_compiler_ctx *comp_ctx,
+ duk_ivalue *res,
+ duk_small_uint_t rbp_flags,
+ duk_regconst_t forced_reg) {
DUK_ASSERT(forced_reg >= 0);
duk__exprtop(comp_ctx, res, rbp_flags);
duk__ivalue_toforcedreg(comp_ctx, res, forced_reg);
@@ -70685,7 +74109,7 @@ DUK_LOCAL duk_regconst_t duk__exprtop_toregconst(duk_compiler_ctx *comp_ctx, duk
return duk__ivalue_toregconst(comp_ctx, res);
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL void duk__exprtop_toplain_ignore(duk_compiler_ctx *comp_ctx, duk_ivalue *res, int rbp_flags) {
duk__exprtop(comp_ctx, res, rbp_flags);
duk__ivalue_toplain_ignore(comp_ctx, res);
@@ -70704,11 +74128,11 @@ DUK_LOCAL void duk__exprtop_toplain_ignore(duk_compiler_ctx *comp_ctx, duk_ivalu
* the token after the terminator).
*/
-#define DUK__HAS_VAL (1 << 0) /* stmt has non-empty value */
-#define DUK__HAS_TERM (1 << 1) /* stmt has explicit/implicit semicolon terminator */
-#define DUK__ALLOW_AUTO_SEMI_ALWAYS (1 << 2) /* allow automatic semicolon even without lineterm (compatibility) */
-#define DUK__STILL_PROLOGUE (1 << 3) /* statement does not terminate directive prologue */
-#define DUK__IS_TERMINAL (1 << 4) /* statement is guaranteed to be terminal (control doesn't flow to next statement) */
+#define DUK__HAS_VAL (1 << 0) /* stmt has non-empty value */
+#define DUK__HAS_TERM (1 << 1) /* stmt has explicit/implicit semicolon terminator */
+#define DUK__ALLOW_AUTO_SEMI_ALWAYS (1 << 2) /* allow automatic semicolon even without lineterm (compatibility) */
+#define DUK__STILL_PROLOGUE (1 << 3) /* statement does not terminate directive prologue */
+#define DUK__IS_TERMINAL (1 << 4) /* statement is guaranteed to be terminal (control doesn't flow to next statement) */
/* Parse a single variable declaration (e.g. "i" or "i=10"). A leading 'var'
* has already been eaten. These is no return value in 'res', it is used only
@@ -70728,7 +74152,11 @@ DUK_LOCAL void duk__exprtop_toplain_ignore(duk_compiler_ctx *comp_ctx, duk_ivalu
* as is done in 'for-in' parsing.
*/
-DUK_LOCAL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_small_uint_t expr_flags, duk_regconst_t *out_reg_varbind, duk_regconst_t *out_rc_varname) {
+DUK_LOCAL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx,
+ duk_ivalue *res,
+ duk_small_uint_t expr_flags,
+ duk_regconst_t *out_reg_varbind,
+ duk_regconst_t *out_rc_varname) {
duk_hthread *thr = comp_ctx->thr;
duk_hstring *h_varname;
duk_regconst_t reg_varbind;
@@ -70752,8 +74180,7 @@ DUK_LOCAL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
/* register declarations in first pass */
if (comp_ctx->curr_func.in_scanning) {
duk_uarridx_t n;
- DUK_DDD(DUK_DDDPRINT("register variable declaration %!O in pass 1",
- (duk_heaphdr *) h_varname));
+ DUK_DDD(DUK_DDDPRINT("register variable declaration %!O in pass 1", (duk_heaphdr *) h_varname));
n = (duk_uarridx_t) duk_get_length(thr, comp_ctx->curr_func.decls_idx);
duk_push_hstring(thr, h_varname);
duk_put_prop_index(thr, comp_ctx->curr_func.decls_idx, n);
@@ -70761,31 +74188,30 @@ DUK_LOCAL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
duk_put_prop_index(thr, comp_ctx->curr_func.decls_idx, n + 1);
}
- duk_push_hstring(thr, h_varname); /* push before advancing to keep reachable */
+ duk_push_hstring(thr, h_varname); /* push before advancing to keep reachable */
/* register binding lookup is based on varmap (even in first pass) */
duk_dup_top(thr);
(void) duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname);
- duk__advance(comp_ctx); /* eat identifier */
+ duk__advance(comp_ctx); /* eat identifier */
if (comp_ctx->curr_token.t == DUK_TOK_EQUALSIGN) {
duk__advance(comp_ctx);
DUK_DDD(DUK_DDDPRINT("vardecl, assign to '%!O' -> reg_varbind=%ld, rc_varname=%ld",
- (duk_heaphdr *) h_varname, (long) reg_varbind, (long) rc_varname));
+ (duk_heaphdr *) h_varname,
+ (long) reg_varbind,
+ (long) rc_varname));
- duk__exprtop(comp_ctx, res, DUK__BP_COMMA | expr_flags /*rbp_flags*/); /* AssignmentExpression */
+ duk__exprtop(comp_ctx, res, DUK__BP_COMMA | expr_flags /*rbp_flags*/); /* AssignmentExpression */
if (reg_varbind >= 0) {
duk__ivalue_toforcedreg(comp_ctx, res, reg_varbind);
} else {
duk_regconst_t reg_val;
reg_val = duk__ivalue_toreg(comp_ctx, res);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE,
- reg_val,
- rc_varname);
+ duk__emit_a_bc(comp_ctx, DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE, reg_val, rc_varname);
}
} else {
if (expr_flags & DUK__EXPR_FLAG_REQUIRE_INIT) {
@@ -70794,14 +74220,14 @@ DUK_LOCAL void duk__parse_var_decl(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
}
}
- duk_pop(thr); /* pop varname */
+ duk_pop(thr); /* pop varname */
*out_rc_varname = rc_varname;
*out_reg_varbind = reg_varbind;
return;
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_VAR_DECLARATION);
DUK_WO_NORETURN(return;);
}
@@ -70810,7 +74236,7 @@ DUK_LOCAL void duk__parse_var_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
duk_regconst_t reg_varbind;
duk_regconst_t rc_varname;
- duk__advance(comp_ctx); /* eat 'var' */
+ duk__advance(comp_ctx); /* eat 'var' */
for (;;) {
/* rc_varname and reg_varbind are ignored here */
@@ -70825,9 +74251,9 @@ DUK_LOCAL void duk__parse_var_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_int_t pc_label_site) {
duk_hthread *thr = comp_ctx->thr;
- duk_int_t pc_v34_lhs; /* start variant 3/4 left-hand-side code (L1 in doc/compiler.rst example) */
- duk_regconst_t temp_reset; /* knock back "next temp" to this whenever possible */
- duk_regconst_t reg_temps; /* preallocated temporaries (2) for variants 3 and 4 */
+ duk_int_t pc_v34_lhs; /* start variant 3/4 left-hand-side code (L1 in doc/compiler.rst example) */
+ duk_regconst_t temp_reset; /* knock back "next temp" to this whenever possible */
+ duk_regconst_t reg_temps; /* preallocated temporaries (2) for variants 3 and 4 */
DUK_DDD(DUK_DDDPRINT("start parsing a for/for-in statement"));
@@ -70856,7 +74282,7 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
* issues, evaluation order issues, etc.
*/
- duk__advance(comp_ctx); /* eat 'for' */
+ duk__advance(comp_ctx); /* eat 'for' */
duk__advance_expect(comp_ctx, DUK_TOK_LPAREN);
DUK_DDD(DUK_DDDPRINT("detecting for/for-in loop variant, pc=%ld", (long) duk__get_current_pc(comp_ctx)));
@@ -70870,10 +74296,10 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
* Variant 2 or 4
*/
- duk_regconst_t reg_varbind; /* variable binding register if register-bound (otherwise < 0) */
- duk_regconst_t rc_varname; /* variable name reg/const, if variable not register-bound */
+ duk_regconst_t reg_varbind; /* variable binding register if register-bound (otherwise < 0) */
+ duk_regconst_t rc_varname; /* variable name reg/const, if variable not register-bound */
- duk__advance(comp_ctx); /* eat 'var' */
+ duk__advance(comp_ctx); /* eat 'var' */
duk__parse_var_decl(comp_ctx, res, DUK__EXPR_FLAG_REJECT_IN, &reg_varbind, &rc_varname);
DUK__SETTEMP(comp_ctx, temp_reset);
@@ -70883,17 +74309,11 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
*/
DUK_DDD(DUK_DDDPRINT("detected for variant 4: for (var VariableDeclarationNoIn in Expression) Statement"));
- pc_v34_lhs = duk__get_current_pc(comp_ctx); /* jump is inserted here */
+ pc_v34_lhs = duk__get_current_pc(comp_ctx); /* jump is inserted here */
if (reg_varbind >= 0) {
- duk__emit_a_bc(comp_ctx,
- DUK_OP_LDREG,
- reg_varbind,
- reg_temps + 0);
+ duk__emit_a_bc(comp_ctx, DUK_OP_LDREG, reg_varbind, reg_temps + 0);
} else {
- duk__emit_a_bc(comp_ctx,
- DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE,
- reg_temps + 0,
- rc_varname);
+ duk__emit_a_bc(comp_ctx, DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE, reg_temps + 0, rc_varname);
}
goto parse_3_or_4;
} else {
@@ -70901,7 +74321,8 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
* Variant 2
*/
- DUK_DDD(DUK_DDDPRINT("detected for variant 2: for (var VariableDeclarationNoIn; Expression_opt; Expression_opt) Statement"));
+ DUK_DDD(DUK_DDDPRINT(
+ "detected for variant 2: for (var VariableDeclarationNoIn; Expression_opt; Expression_opt) Statement"));
for (;;) {
/* more initializers */
if (comp_ctx->curr_token.t != DUK_TOK_COMMA) {
@@ -70909,7 +74330,7 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
}
DUK_DDD(DUK_DDDPRINT("variant 2 has another variable initializer"));
- duk__advance(comp_ctx); /* eat comma */
+ duk__advance(comp_ctx); /* eat comma */
duk__parse_var_decl(comp_ctx, res, DUK__EXPR_FLAG_REJECT_IN, &reg_varbind, &rc_varname);
}
goto parse_1_or_2;
@@ -70919,14 +74340,17 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
* Variant 1 or 3
*/
- pc_v34_lhs = duk__get_current_pc(comp_ctx); /* jump is inserted here (variant 3) */
+ pc_v34_lhs = duk__get_current_pc(comp_ctx); /* jump is inserted here (variant 3) */
/* Note that duk__exprtop() here can clobber any reg above current temp_next,
* so any loop variables (e.g. enumerator) must be "preallocated".
*/
/* don't coerce yet to a plain value (variant 3 needs special handling) */
- duk__exprtop(comp_ctx, res, DUK__BP_FOR_EXPR | DUK__EXPR_FLAG_REJECT_IN | DUK__EXPR_FLAG_ALLOW_EMPTY /*rbp_flags*/); /* Expression */
+ duk__exprtop(comp_ctx,
+ res,
+ DUK__BP_FOR_EXPR | DUK__EXPR_FLAG_REJECT_IN |
+ DUK__EXPR_FLAG_ALLOW_EMPTY /*rbp_flags*/); /* Expression */
if (comp_ctx->curr_token.t == DUK_TOK_IN) {
/*
* Variant 3
@@ -70935,7 +74359,7 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
/* XXX: need to determine LHS type, and check that it is LHS compatible */
DUK_DDD(DUK_DDDPRINT("detected for variant 3: for (LeftHandSideExpression in Expression) Statement"));
if (duk__expr_is_empty(comp_ctx)) {
- goto syntax_error; /* LeftHandSideExpression does not allow empty expression */
+ goto syntax_error; /* LeftHandSideExpression does not allow empty expression */
}
if (res->t == DUK_IVAL_VAR) {
@@ -70944,10 +74368,7 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
duk_dup(thr, res->x1.valstack_idx);
if (duk__lookup_lhs(comp_ctx, &reg_varbind, &rc_varname)) {
- duk__emit_a_bc(comp_ctx,
- DUK_OP_LDREG,
- reg_varbind,
- reg_temps + 0);
+ duk__emit_a_bc(comp_ctx, DUK_OP_LDREG, reg_varbind, reg_temps + 0);
} else {
duk__emit_a_bc(comp_ctx,
DUK_OP_PUTVAR | DUK__EMIT_FLAG_A_IS_SOURCE,
@@ -70960,17 +74381,22 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
*/
duk_regconst_t reg_obj;
duk_regconst_t rc_key;
- reg_obj = duk__ispec_toregconst_raw(comp_ctx, &res->x1, -1 /*forced_reg*/, 0 /*flags*/); /* don't allow const */
- rc_key = duk__ispec_toregconst_raw(comp_ctx, &res->x2, -1 /*forced_reg*/, DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
+ reg_obj = duk__ispec_toregconst_raw(comp_ctx,
+ &res->x1,
+ -1 /*forced_reg*/,
+ 0 /*flags*/); /* don't allow const */
+ rc_key = duk__ispec_toregconst_raw(comp_ctx,
+ &res->x2,
+ -1 /*forced_reg*/,
+ DUK__IVAL_FLAG_ALLOW_CONST /*flags*/);
duk__emit_a_b_c(comp_ctx,
DUK_OP_PUTPROP | DUK__EMIT_FLAG_A_IS_SOURCE | DUK__EMIT_FLAG_BC_REGCONST,
reg_obj,
rc_key,
reg_temps + 0);
} else {
- duk__ivalue_toplain_ignore(comp_ctx, res); /* just in case */
- duk__emit_op_only(comp_ctx,
- DUK_OP_INVLHS);
+ duk__ivalue_toplain_ignore(comp_ctx, res); /* just in case */
+ duk__emit_op_only(comp_ctx, DUK_OP_INVLHS);
}
goto parse_3_or_4;
} else {
@@ -70978,13 +74404,14 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
* Variant 1
*/
- DUK_DDD(DUK_DDDPRINT("detected for variant 1: for (ExpressionNoIn_opt; Expression_opt; Expression_opt) Statement"));
+ DUK_DDD(DUK_DDDPRINT(
+ "detected for variant 1: for (ExpressionNoIn_opt; Expression_opt; Expression_opt) Statement"));
duk__ivalue_toplain_ignore(comp_ctx, res);
goto parse_1_or_2;
}
}
- parse_1_or_2:
+parse_1_or_2:
/*
* Parse variant 1 or 2. The first part expression (which differs
* in the variants) has already been parsed and its code emitted.
@@ -71007,23 +74434,23 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
duk__advance_expect(comp_ctx, DUK_TOK_SEMICOLON);
pc_l1 = duk__get_current_pc(comp_ctx);
- duk__exprtop(comp_ctx, res, DUK__BP_FOR_EXPR | DUK__EXPR_FLAG_ALLOW_EMPTY /*rbp_flags*/); /* Expression_opt */
+ duk__exprtop(comp_ctx, res, DUK__BP_FOR_EXPR | DUK__EXPR_FLAG_ALLOW_EMPTY /*rbp_flags*/); /* Expression_opt */
if (duk__expr_is_empty(comp_ctx)) {
/* no need to coerce */
- pc_jumpto_l3 = duk__emit_jump_empty(comp_ctx); /* to body */
- pc_jumpto_l4 = -1; /* omitted */
+ pc_jumpto_l3 = duk__emit_jump_empty(comp_ctx); /* to body */
+ pc_jumpto_l4 = -1; /* omitted */
} else {
rc_cond = duk__ivalue_toregconst(comp_ctx, res);
duk__emit_if_false_skip(comp_ctx, rc_cond);
- pc_jumpto_l3 = duk__emit_jump_empty(comp_ctx); /* to body */
- pc_jumpto_l4 = duk__emit_jump_empty(comp_ctx); /* to exit */
+ pc_jumpto_l3 = duk__emit_jump_empty(comp_ctx); /* to body */
+ pc_jumpto_l4 = duk__emit_jump_empty(comp_ctx); /* to exit */
}
DUK__SETTEMP(comp_ctx, temp_reset);
duk__advance_expect(comp_ctx, DUK_TOK_SEMICOLON);
pc_l2 = duk__get_current_pc(comp_ctx);
- duk__exprtop(comp_ctx, res, DUK__BP_FOR_EXPR | DUK__EXPR_FLAG_ALLOW_EMPTY /*rbp_flags*/); /* Expression_opt */
+ duk__exprtop(comp_ctx, res, DUK__BP_FOR_EXPR | DUK__EXPR_FLAG_ALLOW_EMPTY /*rbp_flags*/); /* Expression_opt */
if (duk__expr_is_empty(comp_ctx)) {
/* no need to coerce */
expr_c_empty = 1;
@@ -71036,7 +74463,7 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
DUK__SETTEMP(comp_ctx, temp_reset);
comp_ctx->curr_func.allow_regexp_in_adv = 1;
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
pc_l3 = duk__get_current_pc(comp_ctx);
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
@@ -71051,21 +74478,23 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
DUK_DDD(DUK_DDDPRINT("patching jumps: jumpto_l3: %ld->%ld, jumpto_l4: %ld->%ld, "
"break: %ld->%ld, continue: %ld->%ld",
- (long) pc_jumpto_l3, (long) pc_l3, (long) pc_jumpto_l4, (long) pc_l4,
- (long) (pc_label_site + 1), (long) pc_l4, (long) (pc_label_site + 2), (long) pc_l2));
+ (long) pc_jumpto_l3,
+ (long) pc_l3,
+ (long) pc_jumpto_l4,
+ (long) pc_l4,
+ (long) (pc_label_site + 1),
+ (long) pc_l4,
+ (long) (pc_label_site + 2),
+ (long) pc_l2));
duk__patch_jump(comp_ctx, pc_jumpto_l3, pc_l3);
duk__patch_jump(comp_ctx, pc_jumpto_l4, pc_l4);
- duk__patch_jump(comp_ctx,
- pc_label_site + 1,
- pc_l4); /* break jump */
- duk__patch_jump(comp_ctx,
- pc_label_site + 2,
- expr_c_empty ? pc_l1 : pc_l2); /* continue jump */
+ duk__patch_jump(comp_ctx, pc_label_site + 1, pc_l4); /* break jump */
+ duk__patch_jump(comp_ctx, pc_label_site + 2, expr_c_empty ? pc_l1 : pc_l2); /* continue jump */
}
goto finished;
- parse_3_or_4:
+parse_3_or_4:
/*
* Parse variant 3 or 4.
*
@@ -71101,16 +74530,16 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
*/
duk__insert_jump_entry(comp_ctx, pc_v34_lhs);
- pc_jumpto_l2 = pc_v34_lhs; /* inserted jump */
- pc_l1 = pc_v34_lhs + 1; /* +1, right after inserted jump */
+ pc_jumpto_l2 = pc_v34_lhs; /* inserted jump */
+ pc_l1 = pc_v34_lhs + 1; /* +1, right after inserted jump */
/* The code for writing reg_temps + 0 to the left hand side has already
* been emitted.
*/
- pc_jumpto_l3 = duk__emit_jump_empty(comp_ctx); /* -> loop body */
+ pc_jumpto_l3 = duk__emit_jump_empty(comp_ctx); /* -> loop body */
- duk__advance(comp_ctx); /* eat 'in' */
+ duk__advance(comp_ctx); /* eat 'in' */
/* Parse enumeration target and initialize enumerator. For 'null' and 'undefined',
* INITENUM will creates a 'null' enumerator which works like an empty enumerator
@@ -71119,16 +74548,13 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
*/
pc_l2 = duk__get_current_pc(comp_ctx);
- reg_target = duk__exprtop_toreg(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/); /* Expression */
- duk__emit_b_c(comp_ctx,
- DUK_OP_INITENUM | DUK__EMIT_FLAG_B_IS_TARGET,
- reg_temps + 1,
- reg_target);
+ reg_target = duk__exprtop_toreg(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/); /* Expression */
+ duk__emit_b_c(comp_ctx, DUK_OP_INITENUM | DUK__EMIT_FLAG_B_IS_TARGET, reg_temps + 1, reg_target);
pc_jumpto_l4 = duk__emit_jump_empty(comp_ctx);
DUK__SETTEMP(comp_ctx, temp_reset);
comp_ctx->curr_func.allow_regexp_in_adv = 1;
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
pc_l3 = duk__get_current_pc(comp_ctx);
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
@@ -71145,8 +74571,8 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
DUK_OP_NEXTENUM | DUK__EMIT_FLAG_B_IS_TARGET | DUK__EMIT_FLAG_RESERVE_JUMPSLOT,
reg_temps + 0,
reg_temps + 1);
- pc_jumpto_l5 = comp_ctx->emit_jumpslot_pc; /* NEXTENUM jump slot: executed when enum finished */
- duk__emit_jump(comp_ctx, pc_l1); /* jump to next loop, using reg_v34_iter as iterated value */
+ pc_jumpto_l5 = comp_ctx->emit_jumpslot_pc; /* NEXTENUM jump slot: executed when enum finished */
+ duk__emit_jump(comp_ctx, pc_l1); /* jump to next loop, using reg_v34_iter as iterated value */
pc_l5 = duk__get_current_pc(comp_ctx);
@@ -71158,24 +74584,33 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
DUK_DDD(DUK_DDDPRINT("patching jumps: jumpto_l2: %ld->%ld, jumpto_l3: %ld->%ld, "
"jumpto_l4: %ld->%ld, jumpto_l5: %ld->%ld, "
"break: %ld->%ld, continue: %ld->%ld",
- (long) pc_jumpto_l2, (long) pc_l2, (long) pc_jumpto_l3, (long) pc_l3,
- (long) pc_jumpto_l4, (long) pc_l4, (long) pc_jumpto_l5, (long) pc_l5,
- (long) (pc_label_site + 1), (long) pc_l5, (long) (pc_label_site + 2), (long) pc_l4));
+ (long) pc_jumpto_l2,
+ (long) pc_l2,
+ (long) pc_jumpto_l3,
+ (long) pc_l3,
+ (long) pc_jumpto_l4,
+ (long) pc_l4,
+ (long) pc_jumpto_l5,
+ (long) pc_l5,
+ (long) (pc_label_site + 1),
+ (long) pc_l5,
+ (long) (pc_label_site + 2),
+ (long) pc_l4));
duk__patch_jump(comp_ctx, pc_jumpto_l2, pc_l2);
duk__patch_jump(comp_ctx, pc_jumpto_l3, pc_l3);
duk__patch_jump(comp_ctx, pc_jumpto_l4, pc_l4);
duk__patch_jump(comp_ctx, pc_jumpto_l5, pc_l5);
- duk__patch_jump(comp_ctx, pc_label_site + 1, pc_l5); /* break jump */
- duk__patch_jump(comp_ctx, pc_label_site + 2, pc_l4); /* continue jump */
+ duk__patch_jump(comp_ctx, pc_label_site + 1, pc_l5); /* break jump */
+ duk__patch_jump(comp_ctx, pc_label_site + 2, pc_l4); /* continue jump */
}
goto finished;
- finished:
+finished:
DUK_DDD(DUK_DDDPRINT("end parsing a for/for-in statement"));
return;
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_FOR);
DUK_WO_NORETURN(return;);
}
@@ -71183,12 +74618,12 @@ DUK_LOCAL void duk__parse_for_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res,
DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_int_t pc_label_site) {
duk_hthread *thr = comp_ctx->thr;
duk_regconst_t temp_at_loop;
- duk_regconst_t rc_switch; /* reg/const for switch value */
- duk_regconst_t rc_case; /* reg/const for case value */
- duk_regconst_t reg_temp; /* general temp register */
+ duk_regconst_t rc_switch; /* reg/const for switch value */
+ duk_regconst_t rc_case; /* reg/const for case value */
+ duk_regconst_t reg_temp; /* general temp register */
duk_int_t pc_prevcase = -1;
duk_int_t pc_prevstmt = -1;
- duk_int_t pc_default = -1; /* -1 == not set, -2 == pending (next statement list) */
+ duk_int_t pc_default = -1; /* -1 == not set, -2 == pending (next statement list) */
/* Note: negative pc values are ignored when patching jumps, so no explicit checks needed */
@@ -71219,7 +74654,7 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
duk__advance(comp_ctx);
duk__advance_expect(comp_ctx, DUK_TOK_LPAREN);
rc_switch = duk__exprtop_toregconst(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/);
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* RegExp mode does not matter. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* RegExp mode does not matter. */
duk__advance_expect(comp_ctx, DUK_TOK_LCURLY);
DUK_DDD(DUK_DDDPRINT("switch value in register %ld", (long) rc_switch));
@@ -71249,24 +74684,20 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
* because it may be a constant.
*/
- duk__patch_jump_here(comp_ctx, pc_prevcase); /* chain jumps for case
- * evaluation and checking
- */
+ duk__patch_jump_here(comp_ctx, pc_prevcase); /* chain jumps for case
+ * evaluation and checking
+ */
duk__advance(comp_ctx);
rc_case = duk__exprtop_toregconst(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/);
duk__advance_expect(comp_ctx, DUK_TOK_COLON);
reg_temp = DUK__ALLOCTEMP(comp_ctx);
- duk__emit_a_b_c(comp_ctx,
- DUK_OP_SEQ | DUK__EMIT_FLAG_BC_REGCONST,
- reg_temp,
- rc_switch,
- rc_case);
+ duk__emit_a_b_c(comp_ctx, DUK_OP_SEQ | DUK__EMIT_FLAG_BC_REGCONST, reg_temp, rc_switch, rc_case);
duk__emit_if_true_skip(comp_ctx, reg_temp);
/* jump to next case clause */
- pc_prevcase = duk__emit_jump_empty(comp_ctx); /* no match, next case */
+ pc_prevcase = duk__emit_jump_empty(comp_ctx); /* no match, next case */
/* statements go here (if any) on next loop */
} else if (comp_ctx->curr_token.t == DUK_TOK_DEFAULT) {
@@ -71315,14 +74746,13 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
* they participate in 'fall-through' behavior even if the
* default clause is in the middle.
*/
- duk__patch_jump_here(comp_ctx, pc_prevstmt); /* chain jumps for 'fall-through'
- * after a case matches.
- */
+ duk__patch_jump_here(comp_ctx, pc_prevstmt); /* chain jumps for 'fall-through'
+ * after a case matches.
+ */
for (;;) {
tok = comp_ctx->curr_token.t;
- if (tok == DUK_TOK_CASE || tok == DUK_TOK_DEFAULT ||
- tok == DUK_TOK_RCURLY) {
+ if (tok == DUK_TOK_CASE || tok == DUK_TOK_DEFAULT || tok == DUK_TOK_RCURLY) {
break;
}
num_stmts++;
@@ -71345,7 +74775,7 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
DUK_ASSERT(comp_ctx->curr_token.t == DUK_TOK_RCURLY);
comp_ctx->curr_func.allow_regexp_in_adv = 1;
- duk__advance(comp_ctx); /* Allow RegExp as part of next stmt. */
+ duk__advance(comp_ctx); /* Allow RegExp as part of next stmt. */
/* default case control flow patchup; note that if pc_prevcase < 0
* (i.e. no case clauses), control enters default case automatically.
@@ -71366,7 +74796,7 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
duk__patch_jump_here(comp_ctx, pc_prevstmt);
/* continue jump not patched, an INVALID opcode remains there */
- duk__patch_jump_here(comp_ctx, pc_label_site + 1); /* break jump */
+ duk__patch_jump_here(comp_ctx, pc_label_site + 1); /* break jump */
/* Note: 'fast' breaks will jump to pc_label_site + 1, which will
* then jump here. The double jump will be eliminated by a
@@ -71376,7 +74806,7 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
return;
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_SWITCH);
DUK_WO_NORETURN(return;);
}
@@ -71390,16 +74820,16 @@ DUK_LOCAL void duk__parse_if_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
temp_reset = DUK__GETTEMP(comp_ctx);
- duk__advance(comp_ctx); /* eat 'if' */
+ duk__advance(comp_ctx); /* eat 'if' */
duk__advance_expect(comp_ctx, DUK_TOK_LPAREN);
rc_cond = duk__exprtop_toregconst(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/);
duk__emit_if_true_skip(comp_ctx, rc_cond);
- pc_jump_false = duk__emit_jump_empty(comp_ctx); /* jump to end or else part */
+ pc_jump_false = duk__emit_jump_empty(comp_ctx); /* jump to end or else part */
DUK__SETTEMP(comp_ctx, temp_reset);
comp_ctx->curr_func.allow_regexp_in_adv = 1;
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
@@ -71414,7 +74844,7 @@ DUK_LOCAL void duk__parse_if_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk__advance(comp_ctx);
- pc_jump_end = duk__emit_jump_empty(comp_ctx); /* jump from true part to end */
+ pc_jump_end = duk__emit_jump_empty(comp_ctx); /* jump from true part to end */
duk__patch_jump_here(comp_ctx, pc_jump_false);
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
@@ -71435,11 +74865,11 @@ DUK_LOCAL void duk__parse_do_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, d
DUK_DDD(DUK_DDDPRINT("begin parsing do statement"));
- duk__advance(comp_ctx); /* Eat 'do'; allow RegExp as part of next stmt. */
+ duk__advance(comp_ctx); /* Eat 'do'; allow RegExp as part of next stmt. */
pc_start = duk__get_current_pc(comp_ctx);
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
- duk__patch_jump_here(comp_ctx, pc_label_site + 2); /* continue jump */
+ duk__patch_jump_here(comp_ctx, pc_label_site + 2); /* continue jump */
duk__advance_expect(comp_ctx, DUK_TOK_WHILE);
duk__advance_expect(comp_ctx, DUK_TOK_LPAREN);
@@ -71449,10 +74879,10 @@ DUK_LOCAL void duk__parse_do_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, d
duk__emit_jump(comp_ctx, pc_start);
/* no need to reset temps, as we're finished emitting code */
- comp_ctx->curr_func.allow_regexp_in_adv = 1; /* Allow RegExp as part of next stmt. */
+ comp_ctx->curr_func.allow_regexp_in_adv = 1; /* Allow RegExp as part of next stmt. */
duk__advance_expect(comp_ctx, DUK_TOK_RPAREN);
- duk__patch_jump_here(comp_ctx, pc_label_site + 1); /* break jump */
+ duk__patch_jump_here(comp_ctx, pc_label_site + 1); /* break jump */
DUK_DDD(DUK_DDDPRINT("end parsing do statement"));
}
@@ -71467,12 +74897,12 @@ DUK_LOCAL void duk__parse_while_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res
temp_reset = DUK__GETTEMP(comp_ctx);
- duk__advance(comp_ctx); /* eat 'while' */
+ duk__advance(comp_ctx); /* eat 'while' */
duk__advance_expect(comp_ctx, DUK_TOK_LPAREN);
pc_start = duk__get_current_pc(comp_ctx);
- duk__patch_jump_here(comp_ctx, pc_label_site + 2); /* continue jump */
+ duk__patch_jump_here(comp_ctx, pc_label_site + 2); /* continue jump */
rc_cond = duk__exprtop_toregconst(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/);
duk__emit_if_true_skip(comp_ctx, rc_cond);
@@ -71480,13 +74910,13 @@ DUK_LOCAL void duk__parse_while_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res
DUK__SETTEMP(comp_ctx, temp_reset);
comp_ctx->curr_func.allow_regexp_in_adv = 1;
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
duk__emit_jump(comp_ctx, pc_start);
duk__patch_jump_here(comp_ctx, pc_jump_false);
- duk__patch_jump_here(comp_ctx, pc_label_site + 1); /* break jump */
+ duk__patch_jump_here(comp_ctx, pc_label_site + 1); /* break jump */
DUK_DDD(DUK_DDDPRINT("end parsing while statement"));
}
@@ -71496,23 +74926,35 @@ DUK_LOCAL void duk__parse_break_or_continue_stmt(duk_compiler_ctx *comp_ctx, duk
duk_bool_t is_break = (comp_ctx->curr_token.t == DUK_TOK_BREAK);
duk_int_t label_id;
duk_int_t label_catch_depth;
- duk_int_t label_pc; /* points to LABEL; pc+1 = jump site for break; pc+2 = jump site for continue */
+ duk_int_t label_pc; /* points to LABEL; pc+1 = jump site for break; pc+2 = jump site for continue */
duk_bool_t label_is_closest;
DUK_UNREF(res);
- duk__advance(comp_ctx); /* eat 'break' or 'continue' */
+ duk__advance(comp_ctx); /* eat 'break' or 'continue' */
- if (comp_ctx->curr_token.t == DUK_TOK_SEMICOLON || /* explicit semi follows */
- comp_ctx->curr_token.lineterm || /* automatic semi will be inserted */
- comp_ctx->curr_token.allow_auto_semi) { /* automatic semi will be inserted */
+ if (comp_ctx->curr_token.t == DUK_TOK_SEMICOLON || /* explicit semi follows */
+ comp_ctx->curr_token.lineterm || /* automatic semi will be inserted */
+ comp_ctx->curr_token.allow_auto_semi) { /* automatic semi will be inserted */
/* break/continue without label */
- duk__lookup_active_label(comp_ctx, DUK_HTHREAD_STRING_EMPTY_STRING(thr), is_break, &label_id, &label_catch_depth, &label_pc, &label_is_closest);
+ duk__lookup_active_label(comp_ctx,
+ DUK_HTHREAD_STRING_EMPTY_STRING(thr),
+ is_break,
+ &label_id,
+ &label_catch_depth,
+ &label_pc,
+ &label_is_closest);
} else if (comp_ctx->curr_token.t == DUK_TOK_IDENTIFIER) {
/* break/continue with label (label cannot be a reserved word, production is 'Identifier' */
DUK_ASSERT(comp_ctx->curr_token.str1 != NULL);
- duk__lookup_active_label(comp_ctx, comp_ctx->curr_token.str1, is_break, &label_id, &label_catch_depth, &label_pc, &label_is_closest);
+ duk__lookup_active_label(comp_ctx,
+ comp_ctx->curr_token.str1,
+ is_break,
+ &label_id,
+ &label_catch_depth,
+ &label_pc,
+ &label_is_closest);
duk__advance(comp_ctx);
} else {
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_BREAK_CONT_LABEL);
@@ -71525,25 +74967,28 @@ DUK_LOCAL void duk__parse_break_or_continue_stmt(duk_compiler_ctx *comp_ctx, duk
* The peephole optimizer will optimize the jump to a direct one.
*/
- if (label_catch_depth == comp_ctx->curr_func.catch_depth &&
- label_is_closest) {
+ if (label_catch_depth == comp_ctx->curr_func.catch_depth && label_is_closest) {
DUK_DDD(DUK_DDDPRINT("break/continue: is_break=%ld, label_id=%ld, label_is_closest=%ld, "
"label_catch_depth=%ld, catch_depth=%ld "
"-> use fast variant (direct jump)",
- (long) is_break, (long) label_id, (long) label_is_closest,
- (long) label_catch_depth, (long) comp_ctx->curr_func.catch_depth));
+ (long) is_break,
+ (long) label_id,
+ (long) label_is_closest,
+ (long) label_catch_depth,
+ (long) comp_ctx->curr_func.catch_depth));
duk__emit_jump(comp_ctx, label_pc + (is_break ? 1 : 2));
} else {
DUK_DDD(DUK_DDDPRINT("break/continue: is_break=%ld, label_id=%ld, label_is_closest=%ld, "
"label_catch_depth=%ld, catch_depth=%ld "
"-> use slow variant (longjmp)",
- (long) is_break, (long) label_id, (long) label_is_closest,
- (long) label_catch_depth, (long) comp_ctx->curr_func.catch_depth));
+ (long) is_break,
+ (long) label_id,
+ (long) label_is_closest,
+ (long) label_catch_depth,
+ (long) comp_ctx->curr_func.catch_depth));
- duk__emit_bc(comp_ctx,
- is_break ? DUK_OP_BREAK : DUK_OP_CONTINUE,
- (duk_regconst_t) label_id);
+ duk__emit_bc(comp_ctx, is_break ? DUK_OP_BREAK : DUK_OP_CONTINUE, (duk_regconst_t) label_id);
}
}
@@ -71551,7 +74996,7 @@ DUK_LOCAL void duk__parse_return_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
duk_hthread *thr = comp_ctx->thr;
duk_regconst_t rc_val;
- duk__advance(comp_ctx); /* eat 'return' */
+ duk__advance(comp_ctx); /* eat 'return' */
/* A 'return' statement is only allowed inside an actual function body,
* not as part of eval or global code.
@@ -71561,9 +75006,9 @@ DUK_LOCAL void duk__parse_return_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
DUK_WO_NORETURN(return;);
}
- if (comp_ctx->curr_token.t == DUK_TOK_SEMICOLON || /* explicit semi follows */
- comp_ctx->curr_token.lineterm || /* automatic semi will be inserted */
- comp_ctx->curr_token.allow_auto_semi) { /* automatic semi will be inserted */
+ if (comp_ctx->curr_token.t == DUK_TOK_SEMICOLON || /* explicit semi follows */
+ comp_ctx->curr_token.lineterm || /* automatic semi will be inserted */
+ comp_ctx->curr_token.allow_auto_semi) { /* automatic semi will be inserted */
DUK_DDD(DUK_DDDPRINT("empty return value -> undefined"));
duk__emit_op_only(comp_ctx, DUK_OP_RETUNDEF);
} else {
@@ -71615,8 +75060,8 @@ DUK_LOCAL void duk__parse_return_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
*/
#if defined(DUK_USE_TAILCALL)
- if (comp_ctx->curr_func.catch_depth == 0 && /* no catchers */
- pc_after_expr > pc_before_expr) { /* at least one opcode emitted */
+ if (comp_ctx->curr_func.catch_depth == 0 && /* no catchers */
+ pc_after_expr > pc_before_expr) { /* at least one opcode emitted */
duk_compiler_instr *instr;
duk_instr_t ins;
duk_small_uint_t op;
@@ -71626,8 +75071,7 @@ DUK_LOCAL void duk__parse_return_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
ins = instr->ins;
op = (duk_small_uint_t) DUK_DEC_OP(ins);
- if ((op & ~0x0fU) == DUK_OP_CALL0 &&
- DUK__ISREG_TEMP(comp_ctx, rc_val) /* see above */) {
+ if ((op & ~0x0fU) == DUK_OP_CALL0 && DUK__ISREG_TEMP(comp_ctx, rc_val) /* see above */) {
DUK_DDD(DUK_DDDPRINT("return statement detected a tail call opportunity: "
"catch depth is 0, duk__exprtop() emitted >= 1 instructions, "
"and last instruction is a CALL "
@@ -71636,7 +75080,7 @@ DUK_LOCAL void duk__parse_return_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
instr->ins = ins;
}
}
-#endif /* DUK_USE_TAILCALL */
+#endif /* DUK_USE_TAILCALL */
if (DUK__ISREG(rc_val)) {
duk__emit_bc(comp_ctx, DUK_OP_RETREG, rc_val);
@@ -71654,7 +75098,7 @@ DUK_LOCAL void duk__parse_return_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re
DUK_LOCAL void duk__parse_throw_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk_regconst_t reg_val;
- duk__advance(comp_ctx); /* eat 'throw' */
+ duk__advance(comp_ctx); /* eat 'throw' */
/* Unlike break/continue, throw statement does not allow an empty value. */
@@ -71664,14 +75108,12 @@ DUK_LOCAL void duk__parse_throw_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res
}
reg_val = duk__exprtop_toreg(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/);
- duk__emit_bc(comp_ctx,
- DUK_OP_THROW,
- reg_val);
+ duk__emit_bc(comp_ctx, DUK_OP_THROW, reg_val);
}
DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res) {
duk_hthread *thr = comp_ctx->thr;
- duk_regconst_t reg_catch; /* reg_catch+0 and reg_catch+1 are reserved for TRYCATCH */
+ duk_regconst_t reg_catch; /* reg_catch+0 and reg_catch+1 are reserved for TRYCATCH */
duk_regconst_t rc_varname = 0;
duk_small_uint_t trycatch_flags = 0;
duk_int_t pc_ldconst = -1;
@@ -71698,7 +75140,7 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
comp_ctx->curr_func.catch_depth++;
- duk__advance(comp_ctx); /* eat 'try' */
+ duk__advance(comp_ctx); /* eat 'try' */
reg_catch = DUK__ALLOCTEMPS(comp_ctx, 2);
@@ -71711,9 +75153,9 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
duk__emit_a_bc(comp_ctx, DUK_OP_LDCONST, reg_catch, 0 /*patched later*/);
pc_trycatch = duk__get_current_pc(comp_ctx);
- duk__emit_invalid(comp_ctx); /* TRYCATCH, cannot emit now (not enough info) */
- duk__emit_invalid(comp_ctx); /* jump for 'catch' case */
- duk__emit_invalid(comp_ctx); /* jump for 'finally' case or end (if no finally) */
+ duk__emit_invalid(comp_ctx); /* TRYCATCH, cannot emit now (not enough info) */
+ duk__emit_invalid(comp_ctx); /* jump for 'catch' case */
+ duk__emit_invalid(comp_ctx); /* jump for 'finally' case or end (if no finally) */
/* try part */
duk__advance_expect(comp_ctx, DUK_TOK_LCURLY);
@@ -71742,7 +75184,7 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
*/
duk_hstring *h_var;
- duk_int_t varmap_value; /* for storing/restoring the varmap binding for catch variable */
+ duk_int_t varmap_value; /* for storing/restoring the varmap binding for catch variable */
DUK_DDD(DUK_DDDPRINT("stack top at start of catch clause: %ld", (long) duk_get_top(thr)));
@@ -71760,19 +75202,17 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
h_var = comp_ctx->curr_token.str1;
DUK_ASSERT(h_var != NULL);
- duk_push_hstring(thr, h_var); /* keep in on valstack, use borrowed ref below */
+ duk_push_hstring(thr, h_var); /* keep in on valstack, use borrowed ref below */
if (comp_ctx->curr_func.is_strict &&
- ((h_var == DUK_HTHREAD_STRING_EVAL(thr)) ||
- (h_var == DUK_HTHREAD_STRING_LC_ARGUMENTS(thr)))) {
+ ((h_var == DUK_HTHREAD_STRING_EVAL(thr)) || (h_var == DUK_HTHREAD_STRING_LC_ARGUMENTS(thr)))) {
DUK_DDD(DUK_DDDPRINT("catch identifier 'eval' or 'arguments' in strict mode -> SyntaxError"));
goto syntax_error;
}
duk_dup_top(thr);
rc_varname = duk__getconst(comp_ctx);
- DUK_DDD(DUK_DDDPRINT("catch clause, rc_varname=0x%08lx (%ld)",
- (unsigned long) rc_varname, (long) rc_varname));
+ DUK_DDD(DUK_DDDPRINT("catch clause, rc_varname=0x%08lx (%ld)", (unsigned long) rc_varname, (long) rc_varname));
duk__advance(comp_ctx);
duk__advance_expect(comp_ctx, DUK_TOK_RPAREN);
@@ -71835,8 +75275,7 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
DUK_DDD(DUK_DDDPRINT("varmap after restore catch clause: %!iT",
(duk_tval *) duk_get_tval(thr, comp_ctx->curr_func.varmap_idx)));
- duk__emit_op_only(comp_ctx,
- DUK_OP_ENDCATCH);
+ duk__emit_op_only(comp_ctx, DUK_OP_ENDCATCH);
/*
* XXX: for now, indicate that an expensive catch binding
@@ -71859,13 +75298,10 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
duk__advance_expect(comp_ctx, DUK_TOK_LCURLY);
duk__parse_stmts(comp_ctx, 0 /*allow_source_elem*/, 0 /*expect_eof*/, 1 /*regexp_after*/);
/* the DUK_TOK_RCURLY is eaten by duk__parse_stmts() */
- duk__emit_abc(comp_ctx,
- DUK_OP_ENDFIN,
- reg_catch); /* rethrow */
+ duk__emit_abc(comp_ctx, DUK_OP_ENDFIN, reg_catch); /* rethrow */
}
- if (!(trycatch_flags & DUK_BC_TRYCATCH_FLAG_HAVE_CATCH) &&
- !(trycatch_flags & DUK_BC_TRYCATCH_FLAG_HAVE_FINALLY)) {
+ if (!(trycatch_flags & DUK_BC_TRYCATCH_FLAG_HAVE_CATCH) && !(trycatch_flags & DUK_BC_TRYCATCH_FLAG_HAVE_FINALLY)) {
/* must have catch and/or finally */
goto syntax_error;
}
@@ -71875,12 +75311,7 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
* constant 0) the DUK__CONST_MARKER flag will be set in rc_varname.
*/
- duk__patch_trycatch(comp_ctx,
- pc_ldconst,
- pc_trycatch,
- reg_catch,
- rc_varname,
- trycatch_flags);
+ duk__patch_trycatch(comp_ctx, pc_ldconst, pc_trycatch, reg_catch, rc_varname, trycatch_flags);
if (trycatch_flags & DUK_BC_TRYCATCH_FLAG_HAVE_CATCH) {
DUK_ASSERT(pc_catch >= 0);
@@ -71898,7 +75329,7 @@ DUK_LOCAL void duk__parse_try_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
comp_ctx->curr_func.catch_depth--;
return;
- syntax_error:
+syntax_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_TRY);
DUK_WO_NORETURN(return;);
}
@@ -71916,23 +75347,23 @@ DUK_LOCAL void duk__parse_with_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res)
comp_ctx->curr_func.catch_depth++;
- duk__advance(comp_ctx); /* eat 'with' */
+ duk__advance(comp_ctx); /* eat 'with' */
reg_catch = DUK__ALLOCTEMPS(comp_ctx, 2);
duk__advance_expect(comp_ctx, DUK_TOK_LPAREN);
duk__exprtop_toforcedreg(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/, reg_catch);
comp_ctx->curr_func.allow_regexp_in_adv = 1;
- duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
+ duk__advance_expect(comp_ctx, DUK_TOK_RPAREN); /* Allow RegExp as part of next stmt. */
pc_trycatch = duk__get_current_pc(comp_ctx);
trycatch_flags = DUK_BC_TRYCATCH_FLAG_WITH_BINDING;
duk__emit_a_bc(comp_ctx,
- DUK_OP_TRYCATCH | DUK__EMIT_FLAG_NO_SHUFFLE_A,
- (duk_regconst_t) trycatch_flags /*a*/,
- reg_catch /*bc*/);
- duk__emit_invalid(comp_ctx); /* catch jump */
- duk__emit_invalid(comp_ctx); /* finished jump */
+ DUK_OP_TRYCATCH | DUK__EMIT_FLAG_NO_SHUFFLE_A,
+ (duk_regconst_t) trycatch_flags /*a*/,
+ reg_catch /*bc*/);
+ duk__emit_invalid(comp_ctx); /* catch jump */
+ duk__emit_invalid(comp_ctx); /* finished jump */
duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/);
duk__emit_op_only(comp_ctx, DUK_OP_ENDTRY);
@@ -71953,9 +75384,7 @@ DUK_LOCAL duk_int_t duk__stmt_label_site(duk_compiler_ctx *comp_ctx, duk_int_t l
label_id = comp_ctx->curr_func.label_next++;
DUK_DDD(DUK_DDDPRINT("allocated new label id for label site: %ld", (long) label_id));
- duk__emit_bc(comp_ctx,
- DUK_OP_LABEL,
- (duk_regconst_t) label_id);
+ duk__emit_bc(comp_ctx, DUK_OP_LABEL, (duk_regconst_t) label_id);
duk__emit_invalid(comp_ctx);
duk__emit_invalid(comp_ctx);
@@ -71969,10 +75398,10 @@ DUK_LOCAL duk_int_t duk__stmt_label_site(duk_compiler_ctx *comp_ctx, duk_int_t l
*/
DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_bool_t allow_source_elem) {
duk_hthread *thr = comp_ctx->thr;
- duk_bool_t dir_prol_at_entry; /* directive prologue status at entry */
+ duk_bool_t dir_prol_at_entry; /* directive prologue status at entry */
duk_regconst_t temp_at_entry;
duk_size_t labels_len_at_entry;
- duk_int_t pc_at_entry; /* assumed to also be PC of "LABEL" */
+ duk_int_t pc_at_entry; /* assumed to also be PC of "LABEL" */
duk_int_t stmt_id;
duk_small_uint_t stmt_flags = 0;
duk_int_t label_id = -1;
@@ -71991,8 +75420,11 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
DUK_DDD(DUK_DDDPRINT("parsing a statement, stmt_id=%ld, temp_at_entry=%ld, labels_len_at_entry=%ld, "
"is_strict=%ld, in_directive_prologue=%ld, catch_depth=%ld",
- (long) stmt_id, (long) temp_at_entry, (long) labels_len_at_entry,
- (long) comp_ctx->curr_func.is_strict, (long) comp_ctx->curr_func.in_directive_prologue,
+ (long) stmt_id,
+ (long) temp_at_entry,
+ (long) labels_len_at_entry,
+ (long) comp_ctx->curr_func.is_strict,
+ (long) comp_ctx->curr_func.in_directive_prologue,
(long) comp_ctx->curr_func.catch_depth));
/* The directive prologue flag is cleared by default so that it is
@@ -72002,10 +75434,12 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
comp_ctx->curr_func.in_directive_prologue = 0;
- retry_parse:
+retry_parse:
DUK_DDD(DUK_DDDPRINT("try stmt parse, stmt_id=%ld, label_id=%ld, allow_source_elem=%ld, catch_depth=%ld",
- (long) stmt_id, (long) label_id, (long) allow_source_elem,
+ (long) stmt_id,
+ (long) label_id,
+ (long) allow_source_elem,
(long) comp_ctx->curr_func.catch_depth));
/*
@@ -72014,15 +75448,11 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
tok = comp_ctx->curr_token.t;
- if (tok == DUK_TOK_FOR || tok == DUK_TOK_DO || tok == DUK_TOK_WHILE ||
- tok == DUK_TOK_SWITCH) {
+ if (tok == DUK_TOK_FOR || tok == DUK_TOK_DO || tok == DUK_TOK_WHILE || tok == DUK_TOK_SWITCH) {
DUK_DDD(DUK_DDDPRINT("iteration/switch statement -> add empty label"));
label_id = duk__stmt_label_site(comp_ctx, label_id);
- duk__add_label(comp_ctx,
- DUK_HTHREAD_STRING_EMPTY_STRING(thr),
- pc_at_entry /*pc_label*/,
- label_id);
+ duk__add_label(comp_ctx, DUK_HTHREAD_STRING_EMPTY_STRING(thr), pc_at_entry /*pc_label*/, label_id);
}
/*
@@ -72045,11 +75475,12 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
test_func_decl = allow_source_elem;
#if defined(DUK_USE_NONSTD_FUNC_STMT)
- /* Lenient: allow function declarations outside top level in
- * non-strict mode but reject them in strict mode.
+ /* Lenient: allow function declarations outside top level in both
+ * strict and non-strict modes. However, don't allow labelled
+ * function declarations in strict mode.
*/
- test_func_decl = test_func_decl || !comp_ctx->curr_func.is_strict;
-#endif /* DUK_USE_NONSTD_FUNC_STMT */
+ test_func_decl = test_func_decl || !comp_ctx->curr_func.is_strict || label_id < 0;
+#endif /* DUK_USE_NONSTD_FUNC_STMT */
/* Strict: never allow function declarations outside top level. */
if (test_func_decl) {
/* FunctionDeclaration: not strictly a statement but handled as such.
@@ -72071,7 +75502,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
top_before = duk_get_top(thr);
#endif
- duk__advance(comp_ctx); /* eat 'function' */
+ duk__advance(comp_ctx); /* eat 'function' */
fnum = duk__parse_func_like_fnum(comp_ctx, DUK__FUNC_FLAG_DECL | DUK__FUNC_FLAG_PUSHNAME_PASS1);
/* The value stack convention here is a bit odd: the function
@@ -72085,7 +75516,8 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
DUK_ASSERT(duk_get_top(thr) == top_before + 1);
#endif
DUK_DDD(DUK_DDDPRINT("register function declaration %!T in pass 1, fnum %ld",
- duk_get_tval(thr, -1), (long) fnum));
+ duk_get_tval(thr, -1),
+ (long) fnum));
n = (duk_uarridx_t) duk_get_length(thr, comp_ctx->curr_func.decls_idx);
/* funcname is at index -1 */
duk_put_prop_index(thr, comp_ctx->curr_func.decls_idx, n);
@@ -72112,7 +75544,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
duk__parse_stmts(comp_ctx, 0 /*allow_source_elem*/, 0 /*expect_eof*/, 1 /*regexp_after*/);
/* the DUK_TOK_RCURLY is eaten by duk__parse_stmts() */
if (label_id >= 0) {
- duk__patch_jump_here(comp_ctx, pc_at_entry + 1); /* break jump */
+ duk__patch_jump_here(comp_ctx, pc_at_entry + 1); /* break jump */
}
stmt_flags = 0;
break;
@@ -72139,7 +75571,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
DUK_DDD(DUK_DDDPRINT("if statement"));
duk__parse_if_stmt(comp_ctx, res);
if (label_id >= 0) {
- duk__patch_jump_here(comp_ctx, pc_at_entry + 1); /* break jump */
+ duk__patch_jump_here(comp_ctx, pc_at_entry + 1); /* break jump */
}
stmt_flags = 0;
break;
@@ -72156,19 +75588,15 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
DUK_DDD(DUK_DDDPRINT("do statement"));
DUK_ASSERT(label_id >= 0);
- duk__update_label_flags(comp_ctx,
- label_id,
- DUK_LABEL_FLAG_ALLOW_BREAK | DUK_LABEL_FLAG_ALLOW_CONTINUE);
+ duk__update_label_flags(comp_ctx, label_id, DUK_LABEL_FLAG_ALLOW_BREAK | DUK_LABEL_FLAG_ALLOW_CONTINUE);
duk__parse_do_stmt(comp_ctx, res, pc_at_entry);
- stmt_flags = DUK__HAS_TERM | DUK__ALLOW_AUTO_SEMI_ALWAYS; /* DUK__ALLOW_AUTO_SEMI_ALWAYS workaround */
+ stmt_flags = DUK__HAS_TERM | DUK__ALLOW_AUTO_SEMI_ALWAYS; /* DUK__ALLOW_AUTO_SEMI_ALWAYS workaround */
break;
}
case DUK_TOK_WHILE: {
DUK_DDD(DUK_DDDPRINT("while statement"));
DUK_ASSERT(label_id >= 0);
- duk__update_label_flags(comp_ctx,
- label_id,
- DUK_LABEL_FLAG_ALLOW_BREAK | DUK_LABEL_FLAG_ALLOW_CONTINUE);
+ duk__update_label_flags(comp_ctx, label_id, DUK_LABEL_FLAG_ALLOW_BREAK | DUK_LABEL_FLAG_ALLOW_CONTINUE);
duk__parse_while_stmt(comp_ctx, res, pc_at_entry);
stmt_flags = 0;
break;
@@ -72183,9 +75611,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
DUK_DDD(DUK_DDDPRINT("for/for-in statement"));
DUK_ASSERT(label_id >= 0);
- duk__update_label_flags(comp_ctx,
- label_id,
- DUK_LABEL_FLAG_ALLOW_BREAK | DUK_LABEL_FLAG_ALLOW_CONTINUE);
+ duk__update_label_flags(comp_ctx, label_id, DUK_LABEL_FLAG_ALLOW_BREAK | DUK_LABEL_FLAG_ALLOW_CONTINUE);
duk__parse_for_stmt(comp_ctx, res, pc_at_entry);
stmt_flags = 0;
break;
@@ -72208,7 +75634,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
comp_ctx->curr_func.with_depth++;
duk__parse_with_stmt(comp_ctx, res);
if (label_id >= 0) {
- duk__patch_jump_here(comp_ctx, pc_at_entry + 1); /* break jump */
+ duk__patch_jump_here(comp_ctx, pc_at_entry + 1); /* break jump */
}
comp_ctx->curr_func.with_depth--;
stmt_flags = 0;
@@ -72221,9 +75647,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
DUK_DDD(DUK_DDDPRINT("switch statement"));
DUK_ASSERT(label_id >= 0);
- duk__update_label_flags(comp_ctx,
- label_id,
- DUK_LABEL_FLAG_ALLOW_BREAK); /* don't allow continue */
+ duk__update_label_flags(comp_ctx, label_id, DUK_LABEL_FLAG_ALLOW_BREAK); /* don't allow continue */
duk__parse_switch_stmt(comp_ctx, res, pc_at_entry);
stmt_flags = 0;
break;
@@ -72290,12 +75714,10 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
DUK_DDD(DUK_DDDPRINT("expression statement"));
duk__exprtop(comp_ctx, res, DUK__BP_FOR_EXPR /*rbp_flags*/);
- single_token = (comp_ctx->curr_func.nud_count == 1 && /* one token */
- comp_ctx->curr_func.led_count == 0); /* no operators */
+ single_token = (comp_ctx->curr_func.nud_count == 1 && /* one token */
+ comp_ctx->curr_func.led_count == 0); /* no operators */
- if (single_token &&
- comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER &&
- comp_ctx->curr_token.t == DUK_TOK_COLON) {
+ if (single_token && comp_ctx->prev_token.t == DUK_TOK_IDENTIFIER && comp_ctx->curr_token.t == DUK_TOK_COLON) {
/*
* Detected label
*/
@@ -72309,17 +75731,13 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
h_lab = comp_ctx->prev_token.str1;
DUK_ASSERT(h_lab != NULL);
- DUK_DDD(DUK_DDDPRINT("explicit label site for label '%!O'",
- (duk_heaphdr *) h_lab));
+ DUK_DDD(DUK_DDDPRINT("explicit label site for label '%!O'", (duk_heaphdr *) h_lab));
- duk__advance(comp_ctx); /* eat colon */
+ duk__advance(comp_ctx); /* eat colon */
label_id = duk__stmt_label_site(comp_ctx, label_id);
- duk__add_label(comp_ctx,
- h_lab,
- pc_at_entry /*pc_label*/,
- label_id);
+ duk__add_label(comp_ctx, h_lab, pc_at_entry /*pc_label*/, label_id);
/* a statement following a label cannot be a source element
* (a function declaration).
@@ -72332,8 +75750,8 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
stmt_flags = 0;
- if (dir_prol_at_entry && /* still in prologue */
- single_token && /* single string token */
+ if (dir_prol_at_entry && /* still in prologue */
+ single_token && /* single string token */
comp_ctx->prev_token.t == DUK_TOK_STRING) {
/*
* Detected a directive
@@ -72366,7 +75784,8 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
DUK_STRCMP((const char *) DUK_HSTRING_GET_DATA(h_dir), "use strict") == 0) {
#if defined(DUK_USE_STRICT_DECL)
DUK_DDD(DUK_DDDPRINT("use strict directive detected: strict flag %ld -> %ld",
- (long) comp_ctx->curr_func.is_strict, (long) 1));
+ (long) comp_ctx->curr_func.is_strict,
+ (long) 1));
comp_ctx->curr_func.is_strict = 1;
#else
DUK_DDD(DUK_DDDPRINT("use strict detected but strict declarations disabled, ignoring"));
@@ -72374,21 +75793,23 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
} else if (DUK_HSTRING_GET_BYTELEN(h_dir) == 14 &&
DUK_STRCMP((const char *) DUK_HSTRING_GET_DATA(h_dir), "use duk notail") == 0) {
DUK_DDD(DUK_DDDPRINT("use duk notail directive detected: notail flag %ld -> %ld",
- (long) comp_ctx->curr_func.is_notail, (long) 1));
+ (long) comp_ctx->curr_func.is_notail,
+ (long) 1));
comp_ctx->curr_func.is_notail = 1;
} else {
DUK_DD(DUK_DDPRINT("unknown directive: '%!O', ignoring but not terminating "
- "directive prologue", (duk_hobject *) h_dir));
+ "directive prologue",
+ (duk_hobject *) h_dir));
}
}
} else {
DUK_DDD(DUK_DDDPRINT("non-directive expression statement or no longer in prologue; "
"prologue terminated if still active"));
- }
+ }
stmt_flags |= DUK__HAS_VAL | DUK__HAS_TERM;
}
- } /* end switch (tok) */
+ } /* end switch (tok) */
/*
* Statement value handling.
@@ -72464,9 +75885,7 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
*/
if (label_id >= 0) {
- duk__emit_bc(comp_ctx,
- DUK_OP_ENDLABEL,
- (duk_regconst_t) label_id);
+ duk__emit_bc(comp_ctx, DUK_OP_ENDLABEL, (duk_regconst_t) label_id);
}
DUK__SETTEMP(comp_ctx, temp_at_entry);
@@ -72489,7 +75908,10 @@ DUK_LOCAL void duk__parse_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *res, duk_
* (EOF or closing brace).
*/
-DUK_LOCAL void duk__parse_stmts(duk_compiler_ctx *comp_ctx, duk_bool_t allow_source_elem, duk_bool_t expect_eof, duk_bool_t regexp_after) {
+DUK_LOCAL void duk__parse_stmts(duk_compiler_ctx *comp_ctx,
+ duk_bool_t allow_source_elem,
+ duk_bool_t expect_eof,
+ duk_bool_t regexp_after) {
duk_hthread *thr = comp_ctx->thr;
duk_ivalue res_alloc;
duk_ivalue *res = &res_alloc;
@@ -72655,7 +76077,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
/* only functions can have arguments */
DUK_ASSERT(comp_ctx->curr_func.is_function);
- duk_push_uarridx(thr, i); /* -> [ ... name index ] */
+ duk_push_uarridx(thr, i); /* -> [ ... name index ] */
duk_put_prop(thr, comp_ctx->curr_func.varmap_idx); /* -> [ ... ] */
/* no code needs to be emitted, the regs already have values */
@@ -72691,16 +76113,15 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
*/
num_decls = (duk_uarridx_t) duk_get_length(thr, comp_ctx->curr_func.decls_idx);
- DUK_DDD(DUK_DDDPRINT("num_decls=%ld -> %!T",
- (long) num_decls,
- (duk_tval *) duk_get_tval(thr, comp_ctx->curr_func.decls_idx)));
+ DUK_DDD(
+ DUK_DDDPRINT("num_decls=%ld -> %!T", (long) num_decls, (duk_tval *) duk_get_tval(thr, comp_ctx->curr_func.decls_idx)));
for (i = 0; i < num_decls; i += 2) {
duk_int_t decl_type;
duk_int_t fnum;
- duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i + 1); /* decl type */
+ duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i + 1); /* decl type */
decl_type = duk_to_int(thr, -1);
- fnum = decl_type >> 8; /* XXX: macros */
+ fnum = decl_type >> 8; /* XXX: macros */
decl_type = decl_type & 0xff;
duk_pop(thr);
@@ -72708,7 +76129,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
continue;
}
- duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i); /* decl name */
+ duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i); /* decl name */
/* XXX: spilling */
if (comp_ctx->curr_func.is_function) {
@@ -72718,18 +76139,12 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
/* shadowed; update value */
duk_dup_top(thr);
duk_get_prop(thr, comp_ctx->curr_func.varmap_idx);
- reg_bind = duk_to_int(thr, -1); /* [ ... name reg_bind ] */
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CLOSURE,
- reg_bind,
- (duk_regconst_t) fnum);
+ reg_bind = duk_to_int(thr, -1); /* [ ... name reg_bind ] */
+ duk__emit_a_bc(comp_ctx, DUK_OP_CLOSURE, reg_bind, (duk_regconst_t) fnum);
} else {
/* function: always register bound */
reg_bind = DUK__ALLOCTEMP(comp_ctx);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CLOSURE,
- reg_bind,
- (duk_regconst_t) fnum);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CLOSURE, reg_bind, (duk_regconst_t) fnum);
duk_push_int(thr, (duk_int_t) reg_bind);
}
} else {
@@ -72746,14 +76161,9 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
rc_name = duk__getconst(comp_ctx);
duk_push_null(thr);
- duk__emit_a_bc(comp_ctx,
- DUK_OP_CLOSURE,
- reg_temp,
- (duk_regconst_t) fnum);
+ duk__emit_a_bc(comp_ctx, DUK_OP_CLOSURE, reg_temp, (duk_regconst_t) fnum);
- declvar_flags = DUK_PROPDESC_FLAG_WRITABLE |
- DUK_PROPDESC_FLAG_ENUMERABLE |
- DUK_BC_DECLVAR_FLAG_FUNC_DECL;
+ declvar_flags = DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE | DUK_BC_DECLVAR_FLAG_FUNC_DECL;
if (configurable_bindings) {
declvar_flags |= DUK_PROPDESC_FLAG_CONFIGURABLE;
@@ -72765,7 +76175,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
rc_name /*name*/,
reg_temp /*value*/);
- DUK__SETTEMP(comp_ctx, reg_temp); /* forget temp */
+ DUK__SETTEMP(comp_ctx, reg_temp); /* forget temp */
}
DUK_DDD(DUK_DDDPRINT("function declaration to varmap: %!T -> %!T",
@@ -72775,7 +76185,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
#if defined(DUK_USE_FASTINT)
DUK_ASSERT(DUK_TVAL_IS_NULL(duk_get_tval(thr, -1)) || DUK_TVAL_IS_FASTINT(duk_get_tval(thr, -1)));
#endif
- duk_put_prop(thr, comp_ctx->curr_func.varmap_idx); /* [ ... name reg/null ] -> [ ... ] */
+ duk_put_prop(thr, comp_ctx->curr_func.varmap_idx); /* [ ... name reg/null ] -> [ ... ] */
}
/*
@@ -72802,7 +76212,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
for (i = 0; i < num_decls; i += 2) {
duk_int_t decl_type;
- duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i + 1); /* decl type */
+ duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i + 1); /* decl type */
decl_type = duk_to_int(thr, -1);
decl_type = decl_type & 0xff;
duk_pop(thr);
@@ -72811,16 +76221,15 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
continue;
}
- duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i); /* decl name */
+ duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i); /* decl name */
if (duk_has_prop(thr, comp_ctx->curr_func.varmap_idx)) {
/* shadowed, ignore */
} else {
- duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i); /* decl name */
+ duk_get_prop_index(thr, comp_ctx->curr_func.decls_idx, i); /* decl name */
h_name = duk_known_hstring(thr, -1);
- if (h_name == DUK_HTHREAD_STRING_LC_ARGUMENTS(thr) &&
- !comp_ctx->curr_func.is_arguments_shadowed) {
+ if (h_name == DUK_HTHREAD_STRING_LC_ARGUMENTS(thr) && !comp_ctx->curr_func.is_arguments_shadowed) {
/* E5 Section steps 7-8 */
DUK_DDD(DUK_DDDPRINT("'arguments' not shadowed by a function declaration, "
"but appears as a variable declaration -> treat as "
@@ -72839,8 +76248,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
rc_name = duk__getconst(comp_ctx);
duk_push_null(thr);
- declvar_flags = DUK_PROPDESC_FLAG_WRITABLE |
- DUK_PROPDESC_FLAG_ENUMERABLE;
+ declvar_flags = DUK_PROPDESC_FLAG_WRITABLE | DUK_PROPDESC_FLAG_ENUMERABLE;
if (configurable_bindings) {
declvar_flags |= DUK_PROPDESC_FLAG_CONFIGURABLE;
}
@@ -72852,7 +76260,7 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
0 /*value*/);
}
- duk_put_prop(thr, comp_ctx->curr_func.varmap_idx); /* [ ... name reg/null ] -> [ ... ] */
+ duk_put_prop(thr, comp_ctx->curr_func.varmap_idx); /* [ ... name reg/null ] -> [ ... ] */
}
}
@@ -72867,11 +76275,11 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
DUK_ASSERT_TOP(thr, entry_top);
return;
- error_outofregs:
+error_outofregs:
DUK_ERROR_RANGE(thr, DUK_STR_REG_LIMIT);
DUK_WO_NORETURN(return;);
- error_argname:
+error_argname:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_ARG_NAME);
DUK_WO_NORETURN(return;);
}
@@ -72910,7 +76318,11 @@ DUK_LOCAL void duk__init_varmap_and_prologue_for_pass2(duk_compiler_ctx *comp_ct
* token (EOF or closing brace).
*/
-DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expect_eof, duk_bool_t implicit_return_value, duk_bool_t regexp_after, duk_small_int_t expect_token) {
+DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx,
+ duk_bool_t expect_eof,
+ duk_bool_t implicit_return_value,
+ duk_bool_t regexp_after,
+ duk_small_int_t expect_token) {
duk_compiler_func *func;
duk_hthread *thr;
duk_regconst_t reg_stmt_value = -1;
@@ -73002,8 +76414,8 @@ DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expec
DUK_DDD(DUK_DDDPRINT("begin 1st pass"));
duk__parse_stmts(comp_ctx,
- 1, /* allow source elements */
- expect_eof, /* expect EOF instead of } */
+ 1, /* allow source elements */
+ expect_eof, /* expect EOF instead of } */
regexp_after); /* regexp after */
DUK_DDD(DUK_DDDPRINT("end 1st pass"));
@@ -73032,8 +76444,8 @@ DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expec
DUK_DDD(DUK_DDDPRINT("rewind lexer"));
DUK_LEXER_SETPOINT(&comp_ctx->lex, &lex_pt);
- comp_ctx->curr_token.t = 0; /* this is needed for regexp mode */
- comp_ctx->curr_token.start_line = 0; /* needed for line number tracking (becomes prev_token.start_line) */
+ comp_ctx->curr_token.t = 0; /* this is needed for regexp mode */
+ comp_ctx->curr_token.start_line = 0; /* needed for line number tracking (becomes prev_token.start_line) */
duk__advance(comp_ctx);
/*
@@ -73054,8 +76466,7 @@ DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expec
/* must be able to emit code, alloc consts, etc. */
- duk__init_varmap_and_prologue_for_pass2(comp_ctx,
- (implicit_return_value ? &reg_stmt_value : NULL));
+ duk__init_varmap_and_prologue_for_pass2(comp_ctx, (implicit_return_value ? &reg_stmt_value : NULL));
func->reg_stmt_value = reg_stmt_value;
temp_first = DUK__GETTEMP(comp_ctx);
@@ -73103,15 +76514,13 @@ DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expec
if (implicit_return_value) {
/* Default implicit return value. */
- duk__emit_bc(comp_ctx,
- DUK_OP_LDUNDEF,
- 0);
+ duk__emit_bc(comp_ctx, DUK_OP_LDUNDEF, 0);
}
DUK_DDD(DUK_DDDPRINT("begin 2nd pass"));
duk__parse_stmts(comp_ctx,
- 1, /* allow source elements */
- expect_eof, /* expect EOF instead of } */
+ 1, /* allow source elements */
+ expect_eof, /* expect EOF instead of } */
regexp_after); /* regexp after */
DUK_DDD(DUK_DDDPRINT("end 2nd pass"));
@@ -73167,7 +76576,7 @@ DUK_LOCAL void duk__parse_func_body(duk_compiler_ctx *comp_ctx, duk_bool_t expec
DUK__RECURSION_DECREASE(comp_ctx, thr);
return;
- error_funcname:
+error_funcname:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_FUNC_NAME);
DUK_WO_NORETURN(return;);
}
@@ -73222,15 +76631,14 @@ DUK_LOCAL void duk__parse_func_formals(duk_compiler_ctx *comp_ctx) {
}
DUK_ASSERT(comp_ctx->curr_token.t == DUK_TOK_IDENTIFIER);
DUK_ASSERT(comp_ctx->curr_token.str1 != NULL);
- DUK_DDD(DUK_DDDPRINT("formal argument: %!O",
- (duk_heaphdr *) comp_ctx->curr_token.str1));
+ DUK_DDD(DUK_DDDPRINT("formal argument: %!O", (duk_heaphdr *) comp_ctx->curr_token.str1));
/* XXX: append primitive */
duk_push_hstring(thr, comp_ctx->curr_token.str1);
n = (duk_uarridx_t) duk_get_length(thr, comp_ctx->curr_func.argnames_idx);
duk_put_prop_index(thr, comp_ctx->curr_func.argnames_idx, n);
- duk__advance(comp_ctx); /* eat identifier */
+ duk__advance(comp_ctx); /* eat identifier */
}
}
@@ -73278,7 +76686,7 @@ DUK_LOCAL void duk__parse_func_like_raw(duk_compiler_ctx *comp_ctx, duk_small_ui
if (flags & DUK__FUNC_FLAG_GETSET) {
/* PropertyName -> IdentifierName | StringLiteral | NumericLiteral */
if (tok->t_nores == DUK_TOK_IDENTIFIER || tok->t == DUK_TOK_STRING) {
- duk_push_hstring(thr, tok->str1); /* keep in valstack */
+ duk_push_hstring(thr, tok->str1); /* keep in valstack */
} else if (tok->t == DUK_TOK_NUMBER) {
duk_push_number(thr, tok->num);
duk_to_string(thr, -1);
@@ -73286,15 +76694,15 @@ DUK_LOCAL void duk__parse_func_like_raw(duk_compiler_ctx *comp_ctx, duk_small_ui
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_GETSET_NAME);
DUK_WO_NORETURN(return;);
}
- comp_ctx->curr_func.h_name = duk_known_hstring(thr, -1); /* borrowed reference */
+ comp_ctx->curr_func.h_name = duk_known_hstring(thr, -1); /* borrowed reference */
} else {
/* Function name is an Identifier (not IdentifierName), but we get
* the raw name (not recognizing keywords) here and perform the name
* checks only after pass 1.
*/
if (tok->t_nores == DUK_TOK_IDENTIFIER) {
- duk_push_hstring(thr, tok->str1); /* keep in valstack */
- comp_ctx->curr_func.h_name = duk_known_hstring(thr, -1); /* borrowed reference */
+ duk_push_hstring(thr, tok->str1); /* keep in valstack */
+ comp_ctx->curr_func.h_name = duk_known_hstring(thr, -1); /* borrowed reference */
} else {
/* valstack will be unbalanced, which is OK */
DUK_ASSERT((flags & DUK__FUNC_FLAG_GETSET) == 0);
@@ -73307,8 +76715,7 @@ DUK_LOCAL void duk__parse_func_like_raw(duk_compiler_ctx *comp_ctx, duk_small_ui
}
}
- DUK_DD(DUK_DDPRINT("function name: %!O",
- (duk_heaphdr *) comp_ctx->curr_func.h_name));
+ DUK_DD(DUK_DDPRINT("function name: %!O", (duk_heaphdr *) comp_ctx->curr_func.h_name));
if (!no_advance) {
duk__advance(comp_ctx);
@@ -73334,17 +76741,17 @@ DUK_LOCAL void duk__parse_func_like_raw(duk_compiler_ctx *comp_ctx, duk_small_ui
*/
duk__parse_func_body(comp_ctx,
- 0, /* expect_eof */
- 0, /* implicit_return_value */
+ 0, /* expect_eof */
+ 0, /* implicit_return_value */
flags & DUK__FUNC_FLAG_DECL, /* regexp_after */
- DUK_TOK_LCURLY); /* expect_token */
+ DUK_TOK_LCURLY); /* expect_token */
/*
* Convert duk_compiler_func to a function template and add it
* to the parent function table.
*/
- duk__convert_to_func_template(comp_ctx); /* -> [ ... func ] */
+ duk__convert_to_func_template(comp_ctx); /* -> [ ... func ] */
}
/* Parse an inner function, adding the function template to the current function's
@@ -73382,12 +76789,14 @@ DUK_LOCAL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, duk_sm
lex_pt.line = duk_to_int(thr, -1);
duk_pop(thr);
- DUK_DDD(DUK_DDDPRINT("second pass of an inner func, skip the function, reparse closing brace; lex offset=%ld, line=%ld",
- (long) lex_pt.offset, (long) lex_pt.line));
+ DUK_DDD(
+ DUK_DDDPRINT("second pass of an inner func, skip the function, reparse closing brace; lex offset=%ld, line=%ld",
+ (long) lex_pt.offset,
+ (long) lex_pt.line));
DUK_LEXER_SETPOINT(&comp_ctx->lex, &lex_pt);
- comp_ctx->curr_token.t = 0; /* this is needed for regexp mode */
- comp_ctx->curr_token.start_line = 0; /* needed for line number tracking (becomes prev_token.start_line) */
+ comp_ctx->curr_token.t = 0; /* this is needed for regexp mode */
+ comp_ctx->curr_token.start_line = 0; /* needed for line number tracking (becomes prev_token.start_line) */
duk__advance(comp_ctx);
/* RegExp is not allowed after a function expression, e.g. in
@@ -73409,7 +76818,8 @@ DUK_LOCAL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, duk_sm
entry_top = duk_get_top(thr);
DUK_DDD(DUK_DDDPRINT("before func: entry_top=%ld, curr_tok.start_offset=%ld",
- (long) entry_top, (long) comp_ctx->curr_token.start_offset));
+ (long) entry_top,
+ (long) comp_ctx->curr_token.start_offset));
duk_memcpy(&old_func, &comp_ctx->curr_func, sizeof(duk_compiler_func));
@@ -73429,24 +76839,25 @@ DUK_LOCAL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, duk_sm
DUK_ASSERT(comp_ctx->curr_func.is_eval == 0);
DUK_ASSERT(comp_ctx->curr_func.is_global == 0);
comp_ctx->curr_func.is_setget = ((flags & DUK__FUNC_FLAG_GETSET) != 0);
- comp_ctx->curr_func.is_namebinding = !(flags & (DUK__FUNC_FLAG_GETSET |
- DUK__FUNC_FLAG_METDEF |
- DUK__FUNC_FLAG_DECL)); /* no name binding for: declarations, objlit getset, objlit method def */
- comp_ctx->curr_func.is_constructable = !(flags & (DUK__FUNC_FLAG_GETSET |
- DUK__FUNC_FLAG_METDEF)); /* not constructable: objlit getset, objlit method def */
+ comp_ctx->curr_func.is_namebinding =
+ !(flags & (DUK__FUNC_FLAG_GETSET | DUK__FUNC_FLAG_METDEF |
+ DUK__FUNC_FLAG_DECL)); /* no name binding for: declarations, objlit getset, objlit method def */
+ comp_ctx->curr_func.is_constructable =
+ !(flags & (DUK__FUNC_FLAG_GETSET | DUK__FUNC_FLAG_METDEF)); /* not constructable: objlit getset, objlit method def */
/*
* Parse inner function
*/
- duk__parse_func_like_raw(comp_ctx, flags); /* pushes function template */
+ duk__parse_func_like_raw(comp_ctx, flags); /* pushes function template */
/* prev_token.start_offset points to the closing brace here; when skipping
* we're going to reparse the closing brace to ensure semicolon insertion
* etc work as expected.
*/
DUK_DDD(DUK_DDDPRINT("after func: prev_tok.start_offset=%ld, curr_tok.start_offset=%ld",
- (long) comp_ctx->prev_token.start_offset, (long) comp_ctx->curr_token.start_offset));
+ (long) comp_ctx->prev_token.start_offset,
+ (long) comp_ctx->curr_token.start_offset));
DUK_ASSERT(comp_ctx->lex.input[comp_ctx->prev_token.start_offset] == (duk_uint8_t) DUK_ASC_RCURLY);
/* XXX: append primitive */
@@ -73532,7 +76943,7 @@ DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_hthread *thr, void *udata) {
is_strict = (flags & DUK_COMPILE_STRICT ? 1 : 0);
is_funcexpr = (flags & DUK_COMPILE_FUNCEXPR ? 1 : 0);
- h_filename = duk_get_hstring(thr, -1); /* may be undefined */
+ h_filename = duk_get_hstring(thr, -1); /* may be undefined */
/*
* Init compiler and lexer contexts
@@ -73550,11 +76961,11 @@ DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_hthread *thr, void *udata) {
duk_require_stack(thr, DUK__COMPILE_ENTRY_SLOTS);
- duk_push_dynamic_buffer(thr, 0); /* entry_top + 0 */
- duk_push_undefined(thr); /* entry_top + 1 */
- duk_push_undefined(thr); /* entry_top + 2 */
- duk_push_undefined(thr); /* entry_top + 3 */
- duk_push_undefined(thr); /* entry_top + 4 */
+ duk_push_dynamic_buffer(thr, 0); /* entry_top + 0 */
+ duk_push_undefined(thr); /* entry_top + 1 */
+ duk_push_undefined(thr); /* entry_top + 2 */
+ duk_push_undefined(thr); /* entry_top + 3 */
+ duk_push_undefined(thr); /* entry_top + 4 */
comp_ctx->thr = thr;
comp_ctx->h_filename = h_filename;
@@ -73578,8 +76989,8 @@ DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_hthread *thr, void *udata) {
lex_pt->offset = 0;
lex_pt->line = 1;
- DUK_LEXER_SETPOINT(&comp_ctx->lex, lex_pt); /* fills window */
- comp_ctx->curr_token.start_line = 0; /* needed for line number tracking (becomes prev_token.start_line) */
+ DUK_LEXER_SETPOINT(&comp_ctx->lex, lex_pt); /* fills window */
+ comp_ctx->curr_token.start_line = 0; /* needed for line number tracking (becomes prev_token.start_line) */
/*
* Initialize function state for a zero-argument function
@@ -73595,8 +77006,7 @@ DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_hthread *thr, void *udata) {
*/
DUK_ASSERT(func->h_name == NULL);
} else {
- duk_push_hstring_stridx(thr, (is_eval ? DUK_STRIDX_EVAL :
- DUK_STRIDX_GLOBAL));
+ duk_push_hstring_stridx(thr, (is_eval ? DUK_STRIDX_EVAL : DUK_STRIDX_GLOBAL));
func->h_name = duk_get_hstring(thr, -1);
}
@@ -73616,7 +77026,7 @@ DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_hthread *thr, void *udata) {
func->is_namebinding = 1;
func->is_constructable = 1;
- duk__advance(comp_ctx); /* init 'curr_token' */
+ duk__advance(comp_ctx); /* init 'curr_token' */
duk__advance_expect(comp_ctx, DUK_TOK_FUNCTION);
(void) duk__parse_func_like_raw(comp_ctx, 0 /*flags*/);
} else {
@@ -73628,10 +77038,10 @@ DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_hthread *thr, void *udata) {
DUK_ASSERT(func->is_constructable == 0);
duk__parse_func_body(comp_ctx,
- 1, /* expect_eof */
- 1, /* implicit_return_value */
- 1, /* regexp_after (does not matter) */
- -1); /* expect_token */
+ 1, /* expect_eof */
+ 1, /* implicit_return_value */
+ 1, /* regexp_after (does not matter) */
+ -1); /* expect_token */
}
/*
@@ -73663,14 +77073,14 @@ DUK_INTERNAL void duk_js_compile(duk_hthread *thr, const duk_uint8_t *src_buffer
DUK_LEXER_INITCTX(&comp_stk.comp_ctx_alloc.lex);
comp_stk.comp_ctx_alloc.lex.input = src_buffer;
comp_stk.comp_ctx_alloc.lex.input_length = src_length;
- comp_stk.comp_ctx_alloc.lex.flags = flags; /* Forward flags directly for now. */
+ comp_stk.comp_ctx_alloc.lex.flags = flags; /* Forward flags directly for now. */
/* [ ... filename ] */
prev_ctx = thr->compile_ctx;
- thr->compile_ctx = &comp_stk.comp_ctx_alloc; /* for duk_error_augment.c */
+ thr->compile_ctx = &comp_stk.comp_ctx_alloc; /* for duk_error_augment.c */
safe_rc = duk_safe_call(thr, duk__js_compile_raw, (void *) &comp_stk /*udata*/, 1 /*nargs*/, 1 /*nrets*/);
- thr->compile_ctx = prev_ctx; /* must restore reliably before returning */
+ thr->compile_ctx = prev_ctx; /* must restore reliably before returning */
if (safe_rc != DUK_EXEC_SUCCESS) {
DUK_D(DUK_DPRINT("compilation failed: %!T", duk_get_tval(thr, -1)));
@@ -73781,19 +77191,11 @@ DUK_LOCAL_DECL void duk__js_execute_bytecode_inner(duk_hthread *entry_thread, du
* Misc helpers.
*/
-/* Forced inline declaration, only applied for performance oriented build. */
-#if defined(DUK_USE_EXEC_PREFER_SIZE)
-#define DUK__INLINE_PERF
-#define DUK__NOINLINE_PERF
-#else
-#define DUK__INLINE_PERF DUK_ALWAYS_INLINE
-#define DUK__NOINLINE_PERF DUK_NOINLINE
-#endif
-
/* Replace value stack top to value at 'tv_ptr'. Optimize for
* performance by only applying the net refcount change.
*/
-#define DUK__REPLACE_TO_TVPTR(thr,tv_ptr) do { \
+#define DUK__REPLACE_TO_TVPTR(thr, tv_ptr) \
+ do { \
duk_hthread *duk__thr; \
duk_tval *duk__tvsrc; \
duk_tval *duk__tvdst; \
@@ -73803,13 +77205,13 @@ DUK_LOCAL_DECL void duk__js_execute_bytecode_inner(duk_hthread *entry_thread, du
duk__tvdst = (tv_ptr); \
DUK_TVAL_SET_TVAL(&duk__tvtmp, duk__tvdst); \
DUK_TVAL_SET_TVAL(duk__tvdst, duk__tvsrc); \
- DUK_TVAL_SET_UNDEFINED(duk__tvsrc); /* value stack init policy */ \
+ DUK_TVAL_SET_UNDEFINED(duk__tvsrc); /* value stack init policy */ \
duk__thr->valstack_top = duk__tvsrc; \
DUK_TVAL_DECREF(duk__thr, &duk__tvtmp); \
} while (0)
/* XXX: candidate of being an internal shared API call */
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL void duk__push_tvals_incref_only(duk_hthread *thr, duk_tval *tv_src, duk_small_uint_fast_t count) {
duk_tval *tv_dst;
duk_size_t copy_size;
@@ -73841,17 +77243,20 @@ DUK_LOCAL void duk__push_tvals_incref_only(duk_hthread *thr, duk_tval *tv_src, d
* possible.
*/
-DUK_LOCAL DUK__INLINE_PERF duk_double_t duk__compute_mod(duk_double_t d1, duk_double_t d2) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF duk_double_t duk__compute_mod(duk_double_t d1, duk_double_t d2) {
return (duk_double_t) duk_js_arith_mod((double) d1, (double) d2);
}
#if defined(DUK_USE_ES7_EXP_OPERATOR)
-DUK_LOCAL DUK__INLINE_PERF duk_double_t duk__compute_exp(duk_double_t d1, duk_double_t d2) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF duk_double_t duk__compute_exp(duk_double_t d1, duk_double_t d2) {
return (duk_double_t) duk_js_arith_pow((double) d1, (double) d2);
}
#endif
-DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_small_uint_fast_t idx_z) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__vm_arith_add(duk_hthread *thr,
+ duk_tval *tv_x,
+ duk_tval *tv_y,
+ duk_small_uint_fast_t idx_z) {
/*
* Addition operator is different from other arithmetic
* operations in that it also provides string concatenation.
@@ -73871,9 +77276,9 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv
duk_double_union du;
DUK_ASSERT(thr != NULL);
- DUK_ASSERT(tv_x != NULL); /* may be reg or const */
- DUK_ASSERT(tv_y != NULL); /* may be reg or const */
- DUK_ASSERT_DISABLE(idx_z >= 0); /* unsigned */
+ DUK_ASSERT(tv_x != NULL); /* may be reg or const */
+ DUK_ASSERT(tv_y != NULL); /* may be reg or const */
+ DUK_ASSERT_DISABLE(idx_z >= 0); /* unsigned */
DUK_ASSERT((duk_uint_t) idx_z < (duk_uint_t) duk_get_top(thr));
/*
@@ -73896,14 +77301,14 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv
v3_hi = (duk_int32_t) (v3 >> 32);
if (DUK_LIKELY(v3_hi >= DUK_I64_CONSTANT(-0x8000) && v3_hi <= DUK_I64_CONSTANT(0x7fff))) {
tv_z = thr->valstack_bottom + idx_z;
- DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_z, v3); /* side effects */
+ DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_z, v3); /* side effects */
return;
} else {
/* overflow, fall through */
;
}
}
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
if (DUK_TVAL_IS_NUMBER(tv_x) && DUK_TVAL_IS_NUMBER(tv_y)) {
#if !defined(DUK_USE_EXEC_PREFER_SIZE)
@@ -73912,14 +77317,14 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv
du.d = DUK_TVAL_GET_NUMBER(tv_x) + DUK_TVAL_GET_NUMBER(tv_y);
#if defined(DUK_USE_EXEC_PREFER_SIZE)
- duk_push_number(thr, du.d); /* will NaN normalize result */
+ duk_push_number(thr, du.d); /* will NaN normalize result */
duk_replace(thr, (duk_idx_t) idx_z);
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
DUK_DBLUNION_NORMALIZE_NAN_CHECK(&du);
DUK_ASSERT(DUK_DBLUNION_IS_NORMALIZED(&du));
tv_z = thr->valstack_bottom + idx_z;
- DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_z, du.d); /* side effects */
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+ DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_z, du.d); /* side effects */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
return;
}
@@ -73929,7 +77334,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv
duk_push_tval(thr, tv_x);
duk_push_tval(thr, tv_y);
- duk_to_primitive(thr, -2, DUK_HINT_NONE); /* side effects -> don't use tv_x, tv_y after */
+ duk_to_primitive(thr, -2, DUK_HINT_NONE); /* side effects -> don't use tv_x, tv_y after */
duk_to_primitive(thr, -1, DUK_HINT_NONE);
/* Since Duktape 2.x plain buffers are treated like ArrayBuffer. */
@@ -73940,7 +77345,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv
* in duk_concat_2() which also fails with TypeError so no
* explicit check is needed.
*/
- duk_concat_2(thr); /* [... s1 s2] -> [... s1+s2] */
+ duk_concat_2(thr); /* [... s1 s2] -> [... s1+s2] */
} else {
duk_double_t d1, d2;
@@ -73953,12 +77358,16 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_add(duk_hthread *thr, duk_tval *tv
du.d = d1 + d2;
duk_pop_2_unsafe(thr);
- duk_push_number(thr, du.d); /* will NaN normalize result */
+ duk_push_number(thr, du.d); /* will NaN normalize result */
}
- duk_replace(thr, (duk_idx_t) idx_z); /* side effects */
+ duk_replace(thr, (duk_idx_t) idx_z); /* side effects */
}
-DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_binary_op(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_uint_fast_t idx_z, duk_small_uint_fast_t opcode) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__vm_arith_binary_op(duk_hthread *thr,
+ duk_tval *tv_x,
+ duk_tval *tv_y,
+ duk_uint_fast_t idx_z,
+ duk_small_uint_fast_t opcode) {
/*
* Arithmetic operations other than '+' have number-only semantics
* and are implemented here. The separate switch-case here means a
@@ -73975,12 +77384,12 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_binary_op(duk_hthread *thr, duk_tv
#endif
DUK_ASSERT(thr != NULL);
- DUK_ASSERT(tv_x != NULL); /* may be reg or const */
- DUK_ASSERT(tv_y != NULL); /* may be reg or const */
- DUK_ASSERT_DISABLE(idx_z >= 0); /* unsigned */
+ DUK_ASSERT(tv_x != NULL); /* may be reg or const */
+ DUK_ASSERT(tv_y != NULL); /* may be reg or const */
+ DUK_ASSERT_DISABLE(idx_z >= 0); /* unsigned */
DUK_ASSERT((duk_uint_t) idx_z < (duk_uint_t) duk_get_top(thr));
- opcode_shifted = opcode >> 2; /* Get base opcode without reg/const modifiers. */
+ opcode_shifted = opcode >> 2; /* Get base opcode without reg/const modifiers. */
#if defined(DUK_USE_FASTINT)
if (DUK_TVAL_IS_FASTINT(tv_x) && DUK_TVAL_IS_FASTINT(tv_y)) {
@@ -74047,13 +77456,13 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_binary_op(duk_hthread *thr, duk_tv
v3_hi = (duk_int32_t) (v3 >> 32);
if (DUK_LIKELY(v3_hi >= DUK_I64_CONSTANT(-0x8000) && v3_hi <= DUK_I64_CONSTANT(0x7fff))) {
tv_z = thr->valstack_bottom + idx_z;
- DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_z, v3); /* side effects */
+ DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_z, v3); /* side effects */
return;
}
/* fall through if overflow etc */
}
- skip_fastint:
-#endif /* DUK_USE_FASTINT */
+skip_fastint:
+#endif /* DUK_USE_FASTINT */
if (DUK_TVAL_IS_NUMBER(tv_x) && DUK_TVAL_IS_NUMBER(tv_y)) {
/* fast path */
@@ -74062,7 +77471,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_binary_op(duk_hthread *thr, duk_tv
} else {
duk_push_tval(thr, tv_x);
duk_push_tval(thr, tv_y);
- d1 = duk_to_number_m2(thr); /* side effects */
+ d1 = duk_to_number_m2(thr); /* side effects */
d2 = duk_to_number_m1(thr);
DUK_ASSERT(duk_is_number(thr, -2));
DUK_ASSERT(duk_is_number(thr, -1));
@@ -74099,24 +77508,28 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_binary_op(duk_hthread *thr, duk_tv
#endif
default: {
DUK_UNREACHABLE();
- du.d = DUK_DOUBLE_NAN; /* should not happen */
+ du.d = DUK_DOUBLE_NAN; /* should not happen */
break;
}
}
#if defined(DUK_USE_EXEC_PREFER_SIZE)
- duk_push_number(thr, du.d); /* will NaN normalize result */
+ duk_push_number(thr, du.d); /* will NaN normalize result */
duk_replace(thr, (duk_idx_t) idx_z);
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
/* important to use normalized NaN with 8-byte tagged types */
DUK_DBLUNION_NORMALIZE_NAN_CHECK(&du);
DUK_ASSERT(DUK_DBLUNION_IS_NORMALIZED(&du));
tv_z = thr->valstack_bottom + idx_z;
- DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_z, du.d); /* side effects */
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+ DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_z, du.d); /* side effects */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
}
-DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_small_uint_fast_t idx_z, duk_small_uint_fast_t opcode) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr,
+ duk_tval *tv_x,
+ duk_tval *tv_y,
+ duk_small_uint_fast_t idx_z,
+ duk_small_uint_fast_t opcode) {
/*
* Binary bitwise operations use different coercions (ToInt32, ToUint32)
* depending on the operation. We coerce the arguments first using
@@ -74140,20 +77553,19 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr, duk_
#endif
DUK_ASSERT(thr != NULL);
- DUK_ASSERT(tv_x != NULL); /* may be reg or const */
- DUK_ASSERT(tv_y != NULL); /* may be reg or const */
- DUK_ASSERT_DISABLE(idx_z >= 0); /* unsigned */
+ DUK_ASSERT(tv_x != NULL); /* may be reg or const */
+ DUK_ASSERT(tv_y != NULL); /* may be reg or const */
+ DUK_ASSERT_DISABLE(idx_z >= 0); /* unsigned */
DUK_ASSERT((duk_uint_t) idx_z < (duk_uint_t) duk_get_top(thr));
- opcode_shifted = opcode >> 2; /* Get base opcode without reg/const modifiers. */
+ opcode_shifted = opcode >> 2; /* Get base opcode without reg/const modifiers. */
#if defined(DUK_USE_FASTINT)
if (DUK_TVAL_IS_FASTINT(tv_x) && DUK_TVAL_IS_FASTINT(tv_y)) {
i1 = (duk_int32_t) DUK_TVAL_GET_FASTINT_I32(tv_x);
i2 = (duk_int32_t) DUK_TVAL_GET_FASTINT_I32(tv_y);
- }
- else
-#endif /* DUK_USE_FASTINT */
+ } else
+#endif /* DUK_USE_FASTINT */
{
duk_push_tval(thr, tv_x);
duk_push_tval(thr, tv_y);
@@ -74182,15 +77594,15 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr, duk_
*/
u2 = ((duk_uint32_t) i2) & 0xffffffffUL;
- i3 = (duk_int32_t) (((duk_uint32_t) i1) << (u2 & 0x1fUL)); /* E5 Section 11.7.1, steps 7 and 8 */
- i3 = i3 & ((duk_int32_t) 0xffffffffUL); /* Note: left shift, should mask */
+ i3 = (duk_int32_t) (((duk_uint32_t) i1) << (u2 & 0x1fUL)); /* E5 Section 11.7.1, steps 7 and 8 */
+ i3 = i3 & ((duk_int32_t) 0xffffffffUL); /* Note: left shift, should mask */
break;
}
case DUK_OP_BASR >> 2: {
/* signed shift */
u2 = ((duk_uint32_t) i2) & 0xffffffffUL;
- i3 = i1 >> (u2 & 0x1fUL); /* E5 Section 11.7.2, steps 7 and 8 */
+ i3 = i1 >> (u2 & 0x1fUL); /* E5 Section 11.7.2, steps 7 and 8 */
break;
}
case DUK_OP_BLSR >> 2: {
@@ -74200,7 +77612,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr, duk_
u2 = ((duk_uint32_t) i2) & 0xffffffffUL;
/* special result value handling */
- u3 = u1 >> (u2 & 0x1fUL); /* E5 Section 11.7.2, steps 7 and 8 */
+ u3 = u1 >> (u2 & 0x1fUL); /* E5 Section 11.7.2, steps 7 and 8 */
#if defined(DUK_USE_FASTINT)
fi3 = (duk_int64_t) u3;
goto fastint_result_set;
@@ -74211,7 +77623,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr, duk_
}
default: {
DUK_UNREACHABLE();
- i3 = 0; /* should not happen */
+ i3 = 0; /* should not happen */
break;
}
}
@@ -74223,28 +77635,31 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_binary_op(duk_hthread *thr, duk_
*/
fi3 = (duk_int64_t) i3;
- fastint_result_set:
+fastint_result_set:
tv_z = thr->valstack_bottom + idx_z;
- DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_z, fi3); /* side effects */
-#else /* DUK_USE_FASTINT */
+ DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_z, fi3); /* side effects */
+#else /* DUK_USE_FASTINT */
d3 = (duk_double_t) i3;
- result_set:
- DUK_ASSERT(!DUK_ISNAN(d3)); /* 'd3' is never NaN, so no need to normalize */
- DUK_ASSERT_DOUBLE_IS_NORMALIZED(d3); /* always normalized */
+result_set:
+ DUK_ASSERT(!DUK_ISNAN(d3)); /* 'd3' is never NaN, so no need to normalize */
+ DUK_ASSERT_DOUBLE_IS_NORMALIZED(d3); /* always normalized */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
- duk_push_number(thr, d3); /* would NaN normalize result, but unnecessary */
+ duk_push_number(thr, d3); /* would NaN normalize result, but unnecessary */
duk_replace(thr, (duk_idx_t) idx_z);
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
tv_z = thr->valstack_bottom + idx_z;
- DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_z, d3); /* side effects */
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
-#endif /* DUK_USE_FASTINT */
+ DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_z, d3); /* side effects */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_FASTINT */
}
/* In-place unary operation. */
-DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_unary_op(duk_hthread *thr, duk_uint_fast_t idx_src, duk_uint_fast_t idx_dst, duk_small_uint_fast_t opcode) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__vm_arith_unary_op(duk_hthread *thr,
+ duk_uint_fast_t idx_src,
+ duk_uint_fast_t idx_dst,
+ duk_small_uint_fast_t opcode) {
/*
* Arithmetic operations other than '+' have number-only semantics
* and are implemented here. The separate switch-case here means a
@@ -74290,12 +77705,12 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_unary_op(duk_hthread *thr, duk_uin
}
/* fall through if overflow etc */
}
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
if (DUK_TVAL_IS_NUMBER(tv)) {
d1 = DUK_TVAL_GET_NUMBER(tv);
} else {
- d1 = duk_to_number_tval(thr, tv); /* side effects */
+ d1 = duk_to_number_tval(thr, tv); /* side effects */
}
if (opcode == DUK_OP_UNP) {
@@ -74306,13 +77721,13 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_unary_op(duk_hthread *thr, duk_uin
DUK_ASSERT(DUK_DBLUNION_IS_NORMALIZED(&du));
#if defined(DUK_USE_FASTINT)
tv = DUK_GET_TVAL_POSIDX(thr, (duk_idx_t) idx_dst);
- DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF(thr, tv, du.d); /* always 'fast', i.e. inlined */
+ DUK_TVAL_SET_NUMBER_CHKFAST_UPDREF(thr, tv, du.d); /* always 'fast', i.e. inlined */
return;
#endif
} else {
DUK_ASSERT(opcode == DUK_OP_UNM);
du.d = -d1;
- DUK_DBLUNION_NORMALIZE_NAN_CHECK(&du); /* mandatory if du.d is a NaN */
+ DUK_DBLUNION_NORMALIZE_NAN_CHECK(&du); /* mandatory if du.d is a NaN */
DUK_ASSERT(DUK_DBLUNION_IS_NORMALIZED(&du));
}
@@ -74321,7 +77736,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_arith_unary_op(duk_hthread *thr, duk_uin
DUK_TVAL_SET_NUMBER_UPDREF(thr, tv, du.d);
}
-DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_not(duk_hthread *thr, duk_uint_fast_t idx_src, duk_uint_fast_t idx_dst) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__vm_bitwise_not(duk_hthread *thr, duk_uint_fast_t idx_src, duk_uint_fast_t idx_dst) {
/*
* E5 Section 11.4.8
*/
@@ -74340,22 +77755,21 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_bitwise_not(duk_hthread *thr, duk_uint_f
#if defined(DUK_USE_FASTINT)
if (DUK_TVAL_IS_FASTINT(tv)) {
i1 = (duk_int32_t) DUK_TVAL_GET_FASTINT_I32(tv);
- }
- else
-#endif /* DUK_USE_FASTINT */
+ } else
+#endif /* DUK_USE_FASTINT */
{
duk_push_tval(thr, tv);
- i1 = duk_to_int32(thr, -1); /* side effects */
+ i1 = duk_to_int32(thr, -1); /* side effects */
duk_pop_unsafe(thr);
}
/* Result is always fastint compatible. */
i2 = ~i1;
tv = DUK_GET_TVAL_POSIDX(thr, (duk_idx_t) idx_dst);
- DUK_TVAL_SET_I32_UPDREF(thr, tv, i2); /* side effects */
+ DUK_TVAL_SET_I32_UPDREF(thr, tv, i2); /* side effects */
}
-DUK_LOCAL DUK__INLINE_PERF void duk__vm_logical_not(duk_hthread *thr, duk_uint_fast_t idx_src, duk_uint_fast_t idx_dst) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__vm_logical_not(duk_hthread *thr, duk_uint_fast_t idx_src, duk_uint_fast_t idx_dst) {
/*
* E5 Section 11.4.9
*/
@@ -74374,16 +77788,19 @@ DUK_LOCAL DUK__INLINE_PERF void duk__vm_logical_not(duk_hthread *thr, duk_uint_f
* duk_js_toboolean() and then push+replace to the result slot.
*/
tv = DUK_GET_TVAL_POSIDX(thr, (duk_idx_t) idx_src);
- res = duk_js_toboolean(tv); /* does not modify 'tv' */
+ res = duk_js_toboolean(tv); /* does not modify 'tv' */
DUK_ASSERT(res == 0 || res == 1);
res ^= 1;
tv = DUK_GET_TVAL_POSIDX(thr, (duk_idx_t) idx_dst);
/* XXX: size optimize: push+replace? */
- DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv, res); /* side effects */
+ DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv, res); /* side effects */
}
/* XXX: size optimized variant */
-DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_reg_helper(duk_hthread *thr, duk_tval *tv_dst, duk_tval *tv_src, duk_small_uint_t op) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__prepost_incdec_reg_helper(duk_hthread *thr,
+ duk_tval *tv_dst,
+ duk_tval *tv_src,
+ duk_small_uint_t op) {
duk_double_t x, y, z;
/* Two lowest bits of opcode are used to distinguish
@@ -74410,13 +77827,13 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_reg_helper(duk_hthread *thr,
y_fi = x_fi + 1;
}
- DUK_TVAL_SET_FASTINT(tv_src, y_fi); /* no need for refcount update */
+ DUK_TVAL_SET_FASTINT(tv_src, y_fi); /* no need for refcount update */
z_fi = (op & 0x02) ? x_fi : y_fi;
- DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_dst, z_fi); /* side effects */
+ DUK_TVAL_SET_FASTINT_UPDREF(thr, tv_dst, z_fi); /* side effects */
return;
}
- skip_fastint:
+skip_fastint:
#endif
if (DUK_TVAL_IS_NUMBER(tv_src)) {
/* Fast path for the case where the register
@@ -74430,7 +77847,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_reg_helper(duk_hthread *thr,
y = x + 1.0;
}
- DUK_TVAL_SET_NUMBER(tv_src, y); /* no need for refcount update */
+ DUK_TVAL_SET_NUMBER(tv_src, y); /* no need for refcount update */
} else {
/* Preserve duk_tval pointer(s) across a potential valstack
* resize by converting them into offsets temporarily.
@@ -74439,8 +77856,8 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_reg_helper(duk_hthread *thr,
duk_size_t off_dst;
off_dst = (duk_size_t) ((duk_uint8_t *) tv_dst - (duk_uint8_t *) thr->valstack_bottom);
- bc = (duk_idx_t) (tv_src - thr->valstack_bottom); /* XXX: pass index explicitly? */
- tv_src = NULL; /* no longer referenced */
+ bc = (duk_idx_t) (tv_src - thr->valstack_bottom); /* XXX: pass index explicitly? */
+ tv_src = NULL; /* no longer referenced */
x = duk_to_number(thr, bc);
if (op & 0x01) {
@@ -74456,10 +77873,14 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_reg_helper(duk_hthread *thr,
}
z = (op & 0x02) ? x : y;
- DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_dst, z); /* side effects */
+ DUK_TVAL_SET_NUMBER_UPDREF(thr, tv_dst, z); /* side effects */
}
-DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_var_helper(duk_hthread *thr, duk_small_uint_t idx_dst, duk_tval *tv_id, duk_small_uint_t op, duk_small_uint_t is_strict) {
+DUK_LOCAL DUK_EXEC_ALWAYS_INLINE_PERF void duk__prepost_incdec_var_helper(duk_hthread *thr,
+ duk_small_uint_t idx_dst,
+ duk_tval *tv_id,
+ duk_small_uint_t op,
+ duk_small_uint_t is_strict) {
duk_activation *act;
duk_double_t x, y;
duk_hstring *name;
@@ -74485,7 +77906,7 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_var_helper(duk_hthread *thr,
name = DUK_TVAL_GET_STRING(tv_id);
DUK_ASSERT(name != NULL);
act = thr->callstack_curr;
- (void) duk_js_getvar_activation(thr, act, name, 1 /*throw*/); /* -> [ ... val this ] */
+ (void) duk_js_getvar_activation(thr, act, name, 1 /*throw*/); /* -> [ ... val this ] */
/* XXX: Fastint fast path would be useful here. Also fastints
* now lose their fastint status in current handling which is
@@ -74502,22 +77923,22 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_var_helper(duk_hthread *thr,
/* [... x this] */
if (op & 0x02) {
- duk_push_number(thr, y); /* -> [ ... x this y ] */
+ duk_push_number(thr, y); /* -> [ ... x this y ] */
DUK_ASSERT(act == thr->callstack_curr);
duk_js_putvar_activation(thr, act, name, DUK_GET_TVAL_NEGIDX(thr, -1), is_strict);
- duk_pop_2_unsafe(thr); /* -> [ ... x ] */
+ duk_pop_2_unsafe(thr); /* -> [ ... x ] */
} else {
- duk_pop_2_unsafe(thr); /* -> [ ... ] */
- duk_push_number(thr, y); /* -> [ ... y ] */
+ duk_pop_2_unsafe(thr); /* -> [ ... ] */
+ duk_push_number(thr, y); /* -> [ ... y ] */
DUK_ASSERT(act == thr->callstack_curr);
duk_js_putvar_activation(thr, act, name, DUK_GET_TVAL_NEGIDX(thr, -1), is_strict);
}
#if defined(DUK_USE_EXEC_PREFER_SIZE)
duk_replace(thr, (duk_idx_t) idx_dst);
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
DUK__REPLACE_TO_TVPTR(thr, DUK_GET_TVAL_POSIDX(thr, (duk_idx_t) idx_dst));
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
}
/*
@@ -74531,11 +77952,11 @@ DUK_LOCAL DUK__INLINE_PERF void duk__prepost_incdec_var_helper(duk_hthread *thr,
* handled recursively.
*/
-#define DUK__LONGJMP_RESTART 0 /* state updated, restart bytecode execution */
-#define DUK__LONGJMP_RETHROW 1 /* exit bytecode executor by rethrowing an error to caller */
+#define DUK__LONGJMP_RESTART 0 /* state updated, restart bytecode execution */
+#define DUK__LONGJMP_RETHROW 1 /* exit bytecode executor by rethrowing an error to caller */
-#define DUK__RETHAND_RESTART 0 /* state updated, restart bytecode execution */
-#define DUK__RETHAND_FINISHED 1 /* exit bytecode execution with return value */
+#define DUK__RETHAND_RESTART 0 /* state updated, restart bytecode execution */
+#define DUK__RETHAND_FINISHED 1 /* exit bytecode execution with return value */
/* XXX: optimize reconfig valstack operations so that resize, clamp, and setting
* top are combined into one pass.
@@ -74564,7 +77985,8 @@ DUK_LOCAL void duk__reconfig_valstack_ecma_return(duk_hthread *thr) {
thr->valstack_bottom = (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + act->bottom_byteoff);
DUK_ASSERT(act->retval_byteoff >= act->bottom_byteoff);
- clamp_top = (duk_idx_t) ((act->retval_byteoff - act->bottom_byteoff + sizeof(duk_tval)) / sizeof(duk_tval)); /* +1 = one retval */
+ clamp_top =
+ (duk_idx_t) ((act->retval_byteoff - act->bottom_byteoff + sizeof(duk_tval)) / sizeof(duk_tval)); /* +1 = one retval */
duk_set_top_and_wipe(thr, h_func->nregs, clamp_top);
DUK_ASSERT((duk_uint8_t *) thr->valstack_end >= (duk_uint8_t *) thr->valstack + act->reserve_byteoff);
@@ -74594,7 +78016,7 @@ DUK_LOCAL void duk__reconfig_valstack_ecma_catcher(duk_hthread *thr, duk_activat
thr->valstack_bottom = (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + act->bottom_byteoff);
idx_bottom = (duk_size_t) (thr->valstack_bottom - thr->valstack);
DUK_ASSERT(cat->idx_base >= idx_bottom);
- clamp_top = (duk_idx_t) (cat->idx_base - idx_bottom + 2); /* +2 = catcher value, catcher lj_type */
+ clamp_top = (duk_idx_t) (cat->idx_base - idx_bottom + 2); /* +2 = catcher value, catcher lj_type */
duk_set_top_and_wipe(thr, h_func->nregs, clamp_top);
DUK_ASSERT((duk_uint8_t *) thr->valstack_end >= (duk_uint8_t *) thr->valstack + act->reserve_byteoff);
@@ -74622,7 +78044,10 @@ DUK_LOCAL void duk__set_catcher_regs_norz(duk_hthread *thr, duk_catcher *cat, du
DUK_TVAL_SET_U32_UPDREF_NORZ(thr, tv1, (duk_uint32_t) lj_type);
}
-DUK_LOCAL void duk__handle_catch_part1(duk_hthread *thr, duk_tval *tv_val_unstable, duk_small_uint_t lj_type, volatile duk_bool_t *out_delayed_catch_setup) {
+DUK_LOCAL void duk__handle_catch_part1(duk_hthread *thr,
+ duk_tval *tv_val_unstable,
+ duk_small_uint_t lj_type,
+ volatile duk_bool_t *out_delayed_catch_setup) {
duk_activation *act;
duk_catcher *cat;
@@ -74660,7 +78085,7 @@ DUK_LOCAL void duk__handle_catch_part1(duk_hthread *thr, duk_tval *tv_val_unstab
cat = act->cat;
DUK_ASSERT(cat != NULL);
- act->curr_pc = cat->pc_base + 0; /* +0 = catch */
+ act->curr_pc = cat->pc_base + 0; /* +0 = catch */
/*
* If the catch block has an automatic catch variable binding,
@@ -74720,9 +78145,7 @@ DUK_LOCAL void duk__handle_catch_part2(duk_hthread *thr) {
DUK_ASSERT(act->var_env != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(act) != NULL);
- new_env = duk_hdecenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
+ new_env = duk_hdecenv_alloc(thr, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
DUK_ASSERT(new_env != NULL);
duk_push_hobject(thr, (duk_hobject *) new_env);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) new_env) == NULL);
@@ -74740,7 +78163,7 @@ DUK_LOCAL void duk__handle_catch_part2(duk_hthread *thr) {
duk_push_hstring(thr, cat->h_varname);
DUK_ASSERT(thr->valstack + cat->idx_base < thr->valstack_top);
duk_push_tval(thr, thr->valstack + cat->idx_base);
- duk_xdef_prop(thr, -3, DUK_PROPDESC_FLAGS_W); /* writable, not configurable */
+ duk_xdef_prop(thr, -3, DUK_PROPDESC_FLAGS_W); /* writable, not configurable */
/* [ ... env ] */
@@ -74748,7 +78171,7 @@ DUK_LOCAL void duk__handle_catch_part2(duk_hthread *thr) {
DUK_ASSERT(act != NULL);
DUK_HOBJECT_SET_PROTOTYPE(thr->heap, (duk_hobject *) new_env, act->lex_env);
act->lex_env = (duk_hobject *) new_env;
- DUK_HOBJECT_INCREF(thr, (duk_hobject *) new_env); /* reachable through activation */
+ DUK_HOBJECT_INCREF(thr, (duk_hobject *) new_env); /* reachable through activation */
/* Net refcount change to act->lex_env is 0: incref for new_env's
* prototype, decref for act->lex_env overwrite.
*/
@@ -74790,7 +78213,7 @@ DUK_LOCAL void duk__handle_finally(duk_hthread *thr, duk_tval *tv_val_unstable,
cat = act->cat;
DUK_ASSERT(cat != NULL);
- act->curr_pc = cat->pc_base + 1; /* +1 = finally */
+ act->curr_pc = cat->pc_base + 1; /* +1 = finally */
DUK_CAT_CLEAR_FINALLY_ENABLED(cat);
}
@@ -74839,18 +78262,21 @@ DUK_LOCAL void duk__handle_yield(duk_hthread *thr, duk_hthread *resumer, duk_tva
act_resumer = resumer->callstack_curr;
DUK_ASSERT(act_resumer != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(act_resumer) != NULL);
- DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(act_resumer))); /* resume caller must be an ECMAScript func */
+ DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(act_resumer))); /* resume caller must be an ECMAScript func */
- tv1 = (duk_tval *) (void *) ((duk_uint8_t *) resumer->valstack + act_resumer->retval_byteoff); /* return value from Duktape.Thread.resume() */
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv_val_unstable); /* side effects */ /* XXX: avoid side effects */
+ tv1 = (duk_tval *) (void *) ((duk_uint8_t *) resumer->valstack +
+ act_resumer->retval_byteoff); /* return value from Duktape.Thread.resume() */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv_val_unstable); /* side effects */ /* XXX: avoid side effects */
duk__reconfig_valstack_ecma_return(resumer);
/* caller must change active thread, and set thr->resumer to NULL */
}
-#endif /* DUK_USE_COROUTINE_SUPPORT */
+#endif /* DUK_USE_COROUTINE_SUPPORT */
-DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation *entry_act, volatile duk_bool_t *out_delayed_catch_setup) {
+DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr,
+ duk_activation *entry_act,
+ volatile duk_bool_t *out_delayed_catch_setup) {
duk_small_uint_t retval = DUK__LONGJMP_RESTART;
DUK_ASSERT(thr != NULL);
@@ -74871,17 +78297,16 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
* - 'thr' must reflect the "throwing" thread
*/
- check_longjmp:
+check_longjmp:
DUK_DD(DUK_DDPRINT("handling longjmp: type=%ld, value1=%!T, value2=%!T, iserror=%ld, top=%ld",
(long) thr->heap->lj.type,
(duk_tval *) &thr->heap->lj.value1,
(duk_tval *) &thr->heap->lj.value2,
(long) thr->heap->lj.iserror,
- (long) duk_get_top(thr)));
+ (long) duk_get_top(thr)));
switch (thr->heap->lj.type) {
-
#if defined(DUK_USE_COROUTINE_SUPPORT)
case DUK_LJ_TYPE_RESUME: {
/*
@@ -74895,15 +78320,15 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
/* duk_bi_duk_object_yield() and duk_bi_duk_object_resume() ensure all of these are met */
- DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_RUNNING); /* unchanged by Duktape.Thread.resume() */
- DUK_ASSERT(thr->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
+ DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_RUNNING); /* unchanged by Duktape.Thread.resume() */
+ DUK_ASSERT(thr->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
DUK_ASSERT(thr->callstack_curr != NULL);
DUK_ASSERT(thr->callstack_curr->parent != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr) != NULL &&
DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr)) &&
((duk_hnatfunc *) DUK_ACT_GET_FUNC(thr->callstack_curr))->func == duk_bi_thread_resume);
- tv = &thr->heap->lj.value2; /* resumee */
+ tv = &thr->heap->lj.value2; /* resumee */
DUK_ASSERT(DUK_TVAL_IS_OBJECT(tv));
DUK_ASSERT(DUK_TVAL_GET_OBJECT(tv) != NULL);
DUK_ASSERT(DUK_HOBJECT_IS_THREAD(DUK_TVAL_GET_OBJECT(tv)));
@@ -74912,15 +78337,15 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
DUK_ASSERT(resumee != NULL);
DUK_ASSERT(resumee->resumer == NULL);
DUK_ASSERT(resumee->state == DUK_HTHREAD_STATE_INACTIVE ||
- resumee->state == DUK_HTHREAD_STATE_YIELDED); /* checked by Duktape.Thread.resume() */
+ resumee->state == DUK_HTHREAD_STATE_YIELDED); /* checked by Duktape.Thread.resume() */
DUK_ASSERT(resumee->state != DUK_HTHREAD_STATE_YIELDED ||
- resumee->callstack_top >= 2); /* YIELDED: ECMAScript activation + Duktape.Thread.yield() activation */
+ resumee->callstack_top >= 2); /* YIELDED: ECMAScript activation + Duktape.Thread.yield() activation */
DUK_ASSERT(resumee->state != DUK_HTHREAD_STATE_YIELDED ||
(DUK_ACT_GET_FUNC(resumee->callstack_curr) != NULL &&
DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(resumee->callstack_curr)) &&
((duk_hnatfunc *) DUK_ACT_GET_FUNC(resumee->callstack_curr))->func == duk_bi_thread_yield));
DUK_ASSERT(resumee->state != DUK_HTHREAD_STATE_INACTIVE ||
- resumee->callstack_top == 0); /* INACTIVE: no activation, single function value on valstack */
+ resumee->callstack_top == 0); /* INACTIVE: no activation, single function value on valstack */
if (thr->heap->lj.iserror) {
/*
@@ -74946,7 +78371,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
/* thr->heap->lj.value1 is already the value to throw */
/* thr->heap->lj.value2 is 'thread', will be wiped out at the end */
- DUK_ASSERT(thr->heap->lj.iserror); /* already set */
+ DUK_ASSERT(thr->heap->lj.iserror); /* already set */
DUK_DD(DUK_DDPRINT("-> resume with an error, converted to a throw in the resumee, propagate"));
goto check_longjmp;
@@ -74959,17 +78384,18 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
duk_activation *act_resumee;
DUK_ASSERT(resumee->callstack_top >= 2);
- act_resumee = resumee->callstack_curr; /* Duktape.Thread.yield() */
+ act_resumee = resumee->callstack_curr; /* Duktape.Thread.yield() */
DUK_ASSERT(act_resumee != NULL);
- act_resumee = act_resumee->parent; /* ECMAScript call site for yield() */
+ act_resumee = act_resumee->parent; /* ECMAScript call site for yield() */
DUK_ASSERT(act_resumee != NULL);
- tv = (duk_tval *) (void *) ((duk_uint8_t *) resumee->valstack + act_resumee->retval_byteoff); /* return value from Duktape.Thread.yield() */
+ tv = (duk_tval *) (void *) ((duk_uint8_t *) resumee->valstack +
+ act_resumee->retval_byteoff); /* return value from Duktape.Thread.yield() */
DUK_ASSERT(tv >= resumee->valstack && tv < resumee->valstack_top);
tv2 = &thr->heap->lj.value1;
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv2); /* side effects */ /* XXX: avoid side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv, tv2); /* side effects */ /* XXX: avoid side effects */
- duk_hthread_activation_unwind_norz(resumee); /* unwind to 'yield' caller */
+ duk_hthread_activation_unwind_norz(resumee); /* unwind to 'yield' caller */
/* no need to unwind catch stack */
duk__reconfig_valstack_ecma_return(resumee);
@@ -74999,7 +78425,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
/* resumee: [... initial_func undefined(= this) resume_value ] */
- call_flags = DUK_CALL_FLAG_ALLOW_ECMATOECMA; /* not tailcall, ecma-to-ecma (assumed to succeed) */
+ call_flags = DUK_CALL_FLAG_ALLOW_ECMATOECMA; /* not tailcall, ecma-to-ecma (assumed to succeed) */
setup_rc = duk_handle_call_unprotected_nargs(resumee, 1 /*nargs*/, call_flags);
if (setup_rc == 0) {
@@ -75026,7 +78452,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
goto wipe_and_return;
}
DUK_UNREACHABLE();
- break; /* never here */
+ break; /* never here */
}
case DUK_LJ_TYPE_YIELD: {
@@ -75044,31 +78470,31 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
/* duk_bi_duk_object_yield() and duk_bi_duk_object_resume() ensure all of these are met */
-#if 0 /* entry_thread not available for assert */
+#if 0 /* entry_thread not available for assert */
DUK_ASSERT(thr != entry_thread); /* Duktape.Thread.yield() should prevent */
#endif
- DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_RUNNING); /* unchanged from Duktape.Thread.yield() */
- DUK_ASSERT(thr->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.yield() activation */
+ DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_RUNNING); /* unchanged from Duktape.Thread.yield() */
+ DUK_ASSERT(thr->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.yield() activation */
DUK_ASSERT(thr->callstack_curr != NULL);
DUK_ASSERT(thr->callstack_curr->parent != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr) != NULL &&
DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr)) &&
((duk_hnatfunc *) DUK_ACT_GET_FUNC(thr->callstack_curr))->func == duk_bi_thread_yield);
DUK_ASSERT(DUK_ACT_GET_FUNC(thr->callstack_curr->parent) != NULL &&
- DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr->parent))); /* an ECMAScript function */
+ DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr->parent))); /* an ECMAScript function */
resumer = thr->resumer;
DUK_ASSERT(resumer != NULL);
- DUK_ASSERT(resumer->state == DUK_HTHREAD_STATE_RESUMED); /* written by a previous RESUME handling */
- DUK_ASSERT(resumer->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
+ DUK_ASSERT(resumer->state == DUK_HTHREAD_STATE_RESUMED); /* written by a previous RESUME handling */
+ DUK_ASSERT(resumer->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
DUK_ASSERT(resumer->callstack_curr != NULL);
DUK_ASSERT(resumer->callstack_curr->parent != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(resumer->callstack_curr) != NULL &&
DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(resumer->callstack_curr)) &&
((duk_hnatfunc *) DUK_ACT_GET_FUNC(resumer->callstack_curr))->func == duk_bi_thread_resume);
DUK_ASSERT(DUK_ACT_GET_FUNC(resumer->callstack_curr->parent) != NULL &&
- DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(resumer->callstack_curr->parent))); /* an ECMAScript function */
+ DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(resumer->callstack_curr->parent))); /* an ECMAScript function */
if (thr->heap->lj.iserror) {
thr->state = DUK_HTHREAD_STATE_YIELDED;
@@ -75080,31 +78506,35 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
thr->heap->lj.type = DUK_LJ_TYPE_THROW;
/* lj.value1 is already set */
- DUK_ASSERT(thr->heap->lj.iserror); /* already set */
+ DUK_ASSERT(thr->heap->lj.iserror); /* already set */
DUK_DD(DUK_DDPRINT("-> yield an error, converted to a throw in the resumer, propagate"));
goto check_longjmp;
} else {
- duk_hthread_activation_unwind_norz(resumer);
- duk__handle_yield(thr, resumer, &thr->heap->lj.value1);
+ /* When handling the yield, the last reference to
+ * 'thr' may disappear.
+ */
+ DUK_GC_TORTURE(resumer->heap);
+ duk_hthread_activation_unwind_norz(resumer);
+ DUK_GC_TORTURE(resumer->heap);
thr->state = DUK_HTHREAD_STATE_YIELDED;
thr->resumer = NULL;
DUK_HTHREAD_DECREF_NORZ(thr, resumer);
resumer->state = DUK_HTHREAD_STATE_RUNNING;
DUK_HEAP_SWITCH_THREAD(thr->heap, resumer);
-#if 0
- thr = resumer; /* not needed, as we exit right away */
-#endif
+ duk__handle_yield(thr, resumer, &thr->heap->lj.value1);
+ thr = resumer;
+ DUK_GC_TORTURE(resumer->heap);
DUK_DD(DUK_DDPRINT("-> yield a value, restart execution in resumer"));
retval = DUK__LONGJMP_RESTART;
goto wipe_and_return;
}
DUK_UNREACHABLE();
- break; /* never here */
+ break; /* never here */
}
-#endif /* DUK_USE_COROUTINE_SUPPORT */
+#endif /* DUK_USE_COROUTINE_SUPPORT */
case DUK_LJ_TYPE_THROW: {
/*
@@ -75145,11 +78575,13 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
DUK_ASSERT(DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_TCF);
DUK_DDD(DUK_DDDPRINT("before catch part 1: thr=%p, act=%p, cat=%p",
- (void *) thr, (void *) act, (void *) act->cat));
+ (void *) thr,
+ (void *) act,
+ (void *) act->cat));
duk__handle_catch_part1(thr,
&thr->heap->lj.value1,
DUK_LJ_TYPE_THROW,
- out_delayed_catch_setup);
+ out_delayed_catch_setup);
DUK_DD(DUK_DDPRINT("-> throw caught by a 'catch' clause, restart execution"));
retval = DUK__LONGJMP_RESTART;
@@ -75160,9 +78592,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
DUK_ASSERT(DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_TCF);
DUK_ASSERT(!DUK_CAT_HAS_CATCH_ENABLED(cat));
- duk__handle_finally(thr,
- &thr->heap->lj.value1,
- DUK_LJ_TYPE_THROW);
+ duk__handle_finally(thr, &thr->heap->lj.value1, DUK_LJ_TYPE_THROW);
DUK_DD(DUK_DDPRINT("-> throw caught by a 'finally' clause, restart execution"));
retval = DUK__LONGJMP_RESTART;
@@ -75192,20 +78622,21 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
*/
DUK_ASSERT(thr->resumer != NULL);
- DUK_ASSERT(thr->resumer->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
+ DUK_ASSERT(thr->resumer->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
DUK_ASSERT(thr->resumer->callstack_curr != NULL);
DUK_ASSERT(thr->resumer->callstack_curr->parent != NULL);
- DUK_ASSERT(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent) != NULL &&
- DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent))); /* an ECMAScript function */
+ DUK_ASSERT(
+ DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent) != NULL &&
+ DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent))); /* an ECMAScript function */
resumer = thr->resumer;
/* reset longjmp */
- DUK_ASSERT(thr->heap->lj.type == DUK_LJ_TYPE_THROW); /* already set */
+ DUK_ASSERT(thr->heap->lj.type == DUK_LJ_TYPE_THROW); /* already set */
/* lj.value1 already set */
- duk_hthread_terminate(thr); /* updates thread state, minimizes its allocations */
+ duk_hthread_terminate(thr); /* updates thread state, minimizes its allocations */
DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_TERMINATED);
thr->resumer = NULL;
@@ -75216,7 +78647,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
goto check_longjmp;
}
- case DUK_LJ_TYPE_BREAK: /* pseudotypes, not used in actual longjmps */
+ case DUK_LJ_TYPE_BREAK: /* pseudotypes, not used in actual longjmps */
case DUK_LJ_TYPE_CONTINUE:
case DUK_LJ_TYPE_RETURN:
case DUK_LJ_TYPE_NORMAL:
@@ -75226,25 +78657,24 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
goto convert_to_internal_error;
}
- } /* end switch */
+ } /* end switch */
DUK_UNREACHABLE();
- wipe_and_return:
- DUK_DD(DUK_DDPRINT("handling longjmp done, wipe-and-return, top=%ld",
- (long) duk_get_top(thr)));
+wipe_and_return:
+ DUK_DD(DUK_DDPRINT("handling longjmp done, wipe-and-return, top=%ld", (long) duk_get_top(thr)));
thr->heap->lj.type = DUK_LJ_TYPE_UNKNOWN;
thr->heap->lj.iserror = 0;
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, &thr->heap->lj.value1); /* side effects */
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, &thr->heap->lj.value2); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, &thr->heap->lj.value1); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, &thr->heap->lj.value2); /* side effects */
DUK_GC_TORTURE(thr->heap);
- just_return:
+just_return:
return retval;
- convert_to_internal_error:
+convert_to_internal_error:
/* This could also be thrown internally (set the error, goto check_longjmp),
* but it's better for internal errors to bubble outwards so that we won't
* infinite loop in this catchpoint.
@@ -75257,9 +78687,9 @@ DUK_LOCAL duk_small_uint_t duk__handle_longjmp(duk_hthread *thr, duk_activation
* handling because it has a measurable performance impact in ordinary
* environments and an extreme impact in Emscripten (GH-342).
*/
-DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_break_or_continue(duk_hthread *thr,
- duk_uint_t label_id,
- duk_small_uint_t lj_type) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF void duk__handle_break_or_continue(duk_hthread *thr,
+ duk_uint_t label_id,
+ duk_small_uint_t lj_type) {
duk_activation *act;
duk_catcher *cat;
@@ -75290,8 +78720,7 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_break_or_continue(duk_hthread *thr
/* XXX: bit mask test; FINALLY <-> TCF, single bit mask would suffice? */
- if (DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_TCF &&
- DUK_CAT_HAS_FINALLY_ENABLED(cat)) {
+ if (DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_TCF && DUK_CAT_HAS_FINALLY_ENABLED(cat)) {
duk_tval tv_tmp;
DUK_TVAL_SET_U32(&tv_tmp, (duk_uint32_t) label_id);
@@ -75300,11 +78729,11 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_break_or_continue(duk_hthread *thr
DUK_DD(DUK_DDPRINT("-> break/continue caught by 'finally', restart execution"));
return;
}
- if (DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_LABEL &&
- (duk_uint_t) DUK_CAT_GET_LABEL(cat) == label_id) {
+ if (DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_LABEL && (duk_uint_t) DUK_CAT_GET_LABEL(cat) == label_id) {
duk__handle_label(thr, lj_type);
- DUK_DD(DUK_DDPRINT("-> break/continue caught by a label catcher (in the same function), restart execution"));
+ DUK_DD(
+ DUK_DDPRINT("-> break/continue caught by a label catcher (in the same function), restart execution"));
return;
}
@@ -75312,7 +78741,8 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_break_or_continue(duk_hthread *thr
}
/* Should never happen, but be robust. */
- DUK_D(DUK_DPRINT("-> break/continue not caught by anything in the current function (should never happen), throw internal error"));
+ DUK_D(DUK_DPRINT(
+ "-> break/continue not caught by anything in the current function (should never happen), throw internal error"));
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return;);
}
@@ -75336,7 +78766,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
DUK_ASSERT(entry_act != NULL);
DUK_ASSERT(thr->valstack_top - 1 >= thr->valstack_bottom);
tv1 = thr->valstack_top - 1;
- DUK_TVAL_CHKFAST_INPLACE_FAST(tv1); /* fastint downgrade check for return values */
+ DUK_TVAL_CHKFAST_INPLACE_FAST(tv1); /* fastint downgrade check for return values */
/*
* Four possible outcomes:
@@ -75371,8 +78801,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
break;
}
- if (DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_TCF &&
- DUK_CAT_HAS_FINALLY_ENABLED(cat)) {
+ if (DUK_CAT_GET_TYPE(cat) == DUK_CAT_TYPE_TCF && DUK_CAT_HAS_FINALLY_ENABLED(cat)) {
DUK_ASSERT(thr->valstack_top - 1 >= thr->valstack_bottom);
duk__handle_finally(thr, thr->valstack_top - 1, DUK_LJ_TYPE_RETURN);
@@ -75403,22 +78832,24 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
DUK_ASSERT(thr->callstack_curr != NULL);
DUK_ASSERT(thr->callstack_curr->parent != NULL);
- DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr->parent))); /* must be ECMAScript */
+ DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->callstack_curr->parent))); /* must be ECMAScript */
#if defined(DUK_USE_ES6_PROXY)
if (thr->callstack_curr->flags & (DUK_ACT_FLAG_CONSTRUCT | DUK_ACT_FLAG_CONSTRUCT_PROXY)) {
- duk_call_construct_postprocess(thr, thr->callstack_curr->flags & DUK_ACT_FLAG_CONSTRUCT_PROXY); /* side effects */
+ duk_call_construct_postprocess(thr,
+ thr->callstack_curr->flags &
+ DUK_ACT_FLAG_CONSTRUCT_PROXY); /* side effects */
}
#else
if (thr->callstack_curr->flags & DUK_ACT_FLAG_CONSTRUCT) {
- duk_call_construct_postprocess(thr, 0); /* side effects */
+ duk_call_construct_postprocess(thr, 0); /* side effects */
}
#endif
tv1 = (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + thr->callstack_curr->parent->retval_byteoff);
DUK_ASSERT(thr->valstack_top - 1 >= thr->valstack_bottom);
tv2 = thr->valstack_top - 1;
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv1, tv2); /* side effects */
/* Catch stack unwind happens inline in callstack unwind. */
duk_hthread_activation_unwind_norz(thr);
@@ -75433,14 +78864,15 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
DUK_DD(DUK_DDPRINT("no calling activation, thread finishes (similar to yield)"));
DUK_ASSERT(thr->resumer != NULL);
- DUK_ASSERT(thr->resumer->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
+ DUK_ASSERT(thr->resumer->callstack_top >= 2); /* ECMAScript activation + Duktape.Thread.resume() activation */
DUK_ASSERT(thr->resumer->callstack_curr != NULL);
DUK_ASSERT(thr->resumer->callstack_curr->parent != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr) != NULL &&
- DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr)) &&
- ((duk_hnatfunc *) DUK_ACT_GET_FUNC(thr->resumer->callstack_curr))->func == duk_bi_thread_resume); /* Duktape.Thread.resume() */
+ DUK_HOBJECT_IS_NATFUNC(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr)) &&
+ ((duk_hnatfunc *) DUK_ACT_GET_FUNC(thr->resumer->callstack_curr))->func ==
+ duk_bi_thread_resume); /* Duktape.Thread.resume() */
DUK_ASSERT(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent) != NULL &&
- DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent))); /* an ECMAScript function */
+ DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(thr->resumer->callstack_curr->parent))); /* an ECMAScript function */
DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_RUNNING);
DUK_ASSERT(thr->resumer->state == DUK_HTHREAD_STATE_RESUMED);
@@ -75462,11 +78894,11 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
*/
DUK_ASSERT(thr->valstack_top - 1 >= thr->valstack_bottom);
- duk_hthread_activation_unwind_norz(resumer); /* May remove last reference to 'thr', but is NORZ. */
- duk_push_tval(resumer, thr->valstack_top - 1); /* Capture return value, side effect free. */
- duk_push_hthread(resumer, thr); /* Make 'thr' reachable again, before side effects. */
+ duk_hthread_activation_unwind_norz(resumer); /* May remove last reference to 'thr', but is NORZ. */
+ duk_push_tval(resumer, thr->valstack_top - 1); /* Capture return value, side effect free. */
+ duk_push_hthread(resumer, thr); /* Make 'thr' reachable again, before side effects. */
- duk_hthread_terminate(thr); /* Updates thread state, minimizes its allocations. */
+ duk_hthread_terminate(thr); /* Updates thread state, minimizes its allocations. */
thr->resumer = NULL;
DUK_HTHREAD_DECREF(thr, resumer);
DUK_ASSERT(thr->state == DUK_HTHREAD_STATE_TERMINATED);
@@ -75476,7 +78908,7 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
DUK_ASSERT(resumer->valstack_top - 2 >= resumer->valstack_bottom);
duk__handle_yield(thr, resumer, resumer->valstack_top - 2);
- thr = NULL; /* 'thr' invalidated by call */
+ thr = NULL; /* 'thr' invalidated by call */
#if 0
thr = resumer; /* not needed */
@@ -75518,8 +78950,8 @@ DUK_LOCAL duk_small_uint_t duk__handle_return(duk_hthread *thr, duk_activation *
#if defined(DUK_USE_INTERRUPT_COUNTER)
-#define DUK__INT_NOACTION 0 /* no specific action, resume normal execution */
-#define DUK__INT_RESTART 1 /* must "goto restart_execution", e.g. breakpoints changed */
+#define DUK__INT_NOACTION 0 /* no specific action, resume normal execution */
+#define DUK__INT_RESTART 1 /* must "goto restart_execution", e.g. breakpoints changed */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
DUK_LOCAL void duk__interrupt_handle_debugger(duk_hthread *thr, duk_bool_t *out_immediate, duk_small_uint_t *out_interrupt_retval) {
@@ -75530,7 +78962,7 @@ DUK_LOCAL void duk__interrupt_handle_debugger(duk_hthread *thr, duk_bool_t *out_
duk_bool_t process_messages;
duk_bool_t processed_messages = 0;
- DUK_ASSERT(thr->heap->dbg_processing == 0); /* don't re-enter e.g. during Eval */
+ DUK_ASSERT(thr->heap->dbg_processing == 0); /* don't re-enter e.g. during Eval */
act = thr->callstack_curr;
DUK_ASSERT(act != NULL);
@@ -75553,17 +78985,14 @@ DUK_LOCAL void duk__interrupt_handle_debugger(duk_hthread *thr, duk_bool_t *out_
* Breakpoint and step state checks
*/
- if (act->flags & DUK_ACT_FLAG_BREAKPOINT_ACTIVE ||
- (thr->heap->dbg_pause_act == thr->callstack_curr)) {
+ if (act->flags & DUK_ACT_FLAG_BREAKPOINT_ACTIVE || (thr->heap->dbg_pause_act == thr->callstack_curr)) {
line = duk_debug_curr_line(thr);
if (act->prev_line != line) {
/* Stepped? Step out is handled by callstack unwind. */
if ((thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_LINE_CHANGE) &&
- (thr->heap->dbg_pause_act == thr->callstack_curr) &&
- (line != thr->heap->dbg_pause_startline)) {
- DUK_D(DUK_DPRINT("PAUSE TRIGGERED by line change, at line %ld",
- (long) line));
+ (thr->heap->dbg_pause_act == thr->callstack_curr) && (line != thr->heap->dbg_pause_startline)) {
+ DUK_D(DUK_DPRINT("PAUSE TRIGGERED by line change, at line %ld", (long) line));
duk_debug_set_paused(thr->heap);
}
@@ -75589,7 +79018,8 @@ DUK_LOCAL void duk__interrupt_handle_debugger(duk_hthread *thr, duk_bool_t *out_
DUK_ASSERT(bp->filename != NULL);
if (act->prev_line != bp->line && line == bp->line) {
DUK_D(DUK_DPRINT("PAUSE TRIGGERED by breakpoint at %!O:%ld",
- (duk_heaphdr *) bp->filename, (long) bp->line));
+ (duk_heaphdr *) bp->filename,
+ (long) bp->line));
duk_debug_set_paused(thr->heap);
}
}
@@ -75682,11 +79112,10 @@ DUK_LOCAL void duk__interrupt_handle_debugger(duk_hthread *thr, duk_bool_t *out_
if (duk_debug_is_attached(thr->heap)) {
DUK_ASSERT(act == thr->callstack_curr);
DUK_ASSERT(act != NULL);
- if (act->flags & DUK_ACT_FLAG_BREAKPOINT_ACTIVE ||
- (thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_ONE_OPCODE) ||
+ if (act->flags & DUK_ACT_FLAG_BREAKPOINT_ACTIVE || (thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_ONE_OPCODE) ||
((thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_LINE_CHANGE) &&
thr->heap->dbg_pause_act == thr->callstack_curr) ||
- DUK_HEAP_HAS_DEBUGGER_PAUSED(thr->heap)) {
+ DUK_HEAP_HAS_DEBUGGER_PAUSED(thr->heap)) {
*out_immediate = 1;
}
@@ -75708,9 +79137,9 @@ DUK_LOCAL void duk__interrupt_handle_debugger(duk_hthread *thr, duk_bool_t *out_
DUK_D(DUK_DPRINT("debugger became detached, resume normal execution"));
}
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
-DUK_LOCAL DUK__NOINLINE_PERF DUK_COLD duk_small_uint_t duk__executor_interrupt(duk_hthread *thr) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF DUK_COLD duk_small_uint_t duk__executor_interrupt(duk_hthread *thr) {
duk_int_t ctr;
duk_activation *act;
duk_hcompfunc *fun;
@@ -75725,8 +79154,10 @@ DUK_LOCAL DUK__NOINLINE_PERF DUK_COLD duk_small_uint_t duk__executor_interrupt(d
thr->heap->inst_count_interrupt += thr->interrupt_init;
DUK_DD(DUK_DDPRINT("execution interrupt, counter=%ld, init=%ld, "
"instruction counts: executor=%ld, interrupt=%ld",
- (long) thr->interrupt_counter, (long) thr->interrupt_init,
- (long) thr->heap->inst_count_exec, (long) thr->heap->inst_count_interrupt));
+ (long) thr->interrupt_counter,
+ (long) thr->interrupt_init,
+ (long) thr->heap->inst_count_exec,
+ (long) thr->heap->inst_count_interrupt));
#endif
retval = DUK__INT_NOACTION;
@@ -75788,18 +79219,17 @@ DUK_LOCAL DUK__NOINLINE_PERF DUK_COLD duk_small_uint_t duk__executor_interrupt(d
DUK_ERROR_RANGE(thr, "execution timeout");
DUK_WO_NORETURN(return 0;);
}
-#endif /* DUK_USE_EXEC_TIMEOUT_CHECK */
+#endif /* DUK_USE_EXEC_TIMEOUT_CHECK */
#if defined(DUK_USE_DEBUGGER_SUPPORT)
- if (!thr->heap->dbg_processing &&
- (thr->heap->dbg_read_cb != NULL || thr->heap->dbg_detaching)) {
+ if (!thr->heap->dbg_processing && (thr->heap->dbg_read_cb != NULL || thr->heap->dbg_detaching)) {
/* Avoid recursive re-entry; enter when we're attached or
* detaching (to finish off the pending detach).
*/
duk__interrupt_handle_debugger(thr, &immediate, &retval);
DUK_ASSERT(act == thr->callstack_curr);
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
/*
* Update the interrupt counter
@@ -75822,7 +79252,7 @@ DUK_LOCAL DUK__NOINLINE_PERF DUK_COLD duk_small_uint_t duk__executor_interrupt(d
return retval;
}
-#endif /* DUK_USE_INTERRUPT_COUNTER */
+#endif /* DUK_USE_INTERRUPT_COUNTER */
/*
* Debugger handling for executor restart
@@ -75890,8 +79320,7 @@ DUK_LOCAL void duk__executor_recheck_debugger(duk_hthread *thr, duk_activation *
duk_hcompfunc *inner_fun;
duk_bool_t bp_match;
- if (bp->filename == filename &&
- bp->line >= fun->start_line && bp->line <= fun->end_line) {
+ if (bp->filename == filename && bp->line >= fun->start_line && bp->line <= fun->end_line) {
bp_match = 1;
DUK_DD(DUK_DDPRINT("breakpoint filename and line match: "
"%s:%ld vs. %s (line %ld vs. %ld-%ld)",
@@ -75928,13 +79357,12 @@ DUK_LOCAL void duk__executor_recheck_debugger(duk_hthread *thr, duk_activation *
}
}
- *bp_active = NULL; /* terminate */
+ *bp_active = NULL; /* terminate */
DUK_DD(DUK_DDPRINT("ACTIVE BREAKPOINTS: %ld", (long) (bp_active - thr->heap->dbg_breakpoints_active)));
/* Force pause if we were doing "step into" in another activation. */
- if ((thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_FUNC_ENTRY) &&
- thr->heap->dbg_pause_act != thr->callstack_curr) {
+ if ((thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_FUNC_ENTRY) && thr->heap->dbg_pause_act != thr->callstack_curr) {
DUK_D(DUK_DPRINT("PAUSE TRIGGERED by function entry"));
duk_debug_set_paused(thr->heap);
}
@@ -75942,10 +79370,8 @@ DUK_LOCAL void duk__executor_recheck_debugger(duk_hthread *thr, duk_activation *
/* Force interrupt right away if we're paused or in "checked mode".
* Step out is handled by callstack unwind.
*/
- if ((act->flags & DUK_ACT_FLAG_BREAKPOINT_ACTIVE) ||
- DUK_HEAP_HAS_DEBUGGER_PAUSED(thr->heap) ||
- ((thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_LINE_CHANGE) &&
- thr->heap->dbg_pause_act == thr->callstack_curr)) {
+ if ((act->flags & DUK_ACT_FLAG_BREAKPOINT_ACTIVE) || DUK_HEAP_HAS_DEBUGGER_PAUSED(thr->heap) ||
+ ((thr->heap->dbg_pause_flags & DUK_PAUSE_FLAG_LINE_CHANGE) && thr->heap->dbg_pause_act == thr->callstack_curr)) {
/* We'll need to interrupt early so recompute the init
* counter to reflect the number of bytecode instructions
* executed so that step counts for e.g. debugger rate
@@ -75956,14 +79382,14 @@ DUK_LOCAL void duk__executor_recheck_debugger(duk_hthread *thr, duk_activation *
thr->interrupt_counter = 0;
}
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
/*
* Opcode handlers for opcodes with a lot of code and which are relatively
* rare; NOINLINE to reduce amount of code in main bytecode dispatcher.
*/
-DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_initset_initget(duk_hthread *thr, duk_uint_fast32_t ins) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF void duk__handle_op_initset_initget(duk_hthread *thr, duk_uint_fast32_t ins) {
duk_bool_t is_set = (DUK_DEC_OP(ins) == DUK_OP_INITSET);
duk_uint_fast_t idx;
duk_uint_t defprop_flags;
@@ -75980,23 +79406,19 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_initset_initget(duk_hthread *th
/* This could be made more optimal by accessing internals directly. */
idx = (duk_uint_fast_t) DUK_DEC_BC(ins);
- duk_dup(thr, (duk_idx_t) (idx + 0)); /* key */
- duk_dup(thr, (duk_idx_t) (idx + 1)); /* getter/setter */
+ duk_dup(thr, (duk_idx_t) (idx + 0)); /* key */
+ duk_dup(thr, (duk_idx_t) (idx + 1)); /* getter/setter */
if (is_set) {
- defprop_flags = DUK_DEFPROP_HAVE_SETTER |
- DUK_DEFPROP_FORCE |
- DUK_DEFPROP_SET_ENUMERABLE |
- DUK_DEFPROP_SET_CONFIGURABLE;
+ defprop_flags =
+ DUK_DEFPROP_HAVE_SETTER | DUK_DEFPROP_FORCE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE;
} else {
- defprop_flags = DUK_DEFPROP_HAVE_GETTER |
- DUK_DEFPROP_FORCE |
- DUK_DEFPROP_SET_ENUMERABLE |
- DUK_DEFPROP_SET_CONFIGURABLE;
+ defprop_flags =
+ DUK_DEFPROP_HAVE_GETTER | DUK_DEFPROP_FORCE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE;
}
duk_def_prop(thr, (duk_idx_t) DUK_DEC_A(ins), defprop_flags);
}
-DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_uint_fast32_t ins, duk_instr_t *curr_pc) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_uint_fast32_t ins, duk_instr_t *curr_pc) {
duk_activation *act;
duk_catcher *cat;
duk_tval *tv1;
@@ -76056,7 +79478,7 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
* error handling, so there's no side effect problem even if the
* error value has a finalizer.
*/
- duk_dup(thr, (duk_idx_t) bc); /* Stabilize value. */
+ duk_dup(thr, (duk_idx_t) bc); /* Stabilize value. */
duk_to_undefined(thr, (duk_idx_t) bc);
duk_to_undefined(thr, (duk_idx_t) (bc + 1));
@@ -76071,7 +79493,7 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
cat->flags = DUK_CAT_TYPE_TCF;
cat->h_varname = NULL;
- cat->pc_base = (duk_instr_t *) curr_pc; /* pre-incremented, points to first jump slot */
+ cat->pc_base = (duk_instr_t *) curr_pc; /* pre-incremented, points to first jump slot */
cat->idx_base = (duk_size_t) (thr->valstack_bottom - thr->valstack) + bc;
act = thr->callstack_curr;
@@ -76110,7 +79532,7 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
duk_js_init_activation_environment_records_delayed(thr, act);
DUK_ASSERT(act == thr->callstack_curr);
- DUK_UNREF(act); /* 'act' is no longer accessed, scanbuild fix */
+ DUK_UNREF(act); /* 'act' is no longer accessed, scanbuild fix */
}
DUK_ASSERT(act->lex_env != NULL);
DUK_ASSERT(act->var_env != NULL);
@@ -76123,12 +79545,10 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
* so avoid side effects very carefully until it is
* referenced.
*/
- env = duk_hobjenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
+ env = duk_hobjenv_alloc(thr, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_OBJENV));
DUK_ASSERT(env != NULL);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) env) == NULL);
- env->target = target; /* always provideThis=true */
+ env->target = target; /* always provideThis=true */
DUK_HOBJECT_INCREF(thr, target);
env->has_this = 1;
DUK_HOBJENV_ASSERT_VALID(env);
@@ -76138,7 +79558,7 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) env) == NULL);
DUK_ASSERT(act->lex_env != NULL);
DUK_HOBJECT_SET_PROTOTYPE(thr->heap, (duk_hobject *) env, act->lex_env);
- act->lex_env = (duk_hobject *) env; /* Now reachable. */
+ act->lex_env = (duk_hobject *) env; /* Now reachable. */
DUK_HOBJECT_INCREF(thr, (duk_hobject *) env);
/* Net refcount change to act->lex_env is 0: incref for env's
* prototype, decref for act->lex_env overwrite.
@@ -76147,7 +79567,7 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
/* Set catcher lex_env active (affects unwind)
* only when the whole setup is complete.
*/
- cat = act->cat; /* XXX: better to relookup? not mandatory because 'cat' is stable */
+ cat = act->cat; /* XXX: better to relookup? not mandatory because 'cat' is stable */
cat->flags |= DUK_CAT_FLAG_LEXENV_ACTIVE;
} else {
;
@@ -76156,12 +79576,14 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_trycatch(duk_hthread *thr, duk_
DUK_DDD(DUK_DDDPRINT("TRYCATCH catcher: flags=0x%08lx, pc_base=%ld, "
"idx_base=%ld, h_varname=%!O",
(unsigned long) cat->flags,
- (long) cat->pc_base, (long) cat->idx_base, (duk_heaphdr *) cat->h_varname));
+ (long) cat->pc_base,
+ (long) cat->idx_base,
+ (duk_heaphdr *) cat->h_varname));
duk_pop_unsafe(thr);
}
-DUK_LOCAL DUK__NOINLINE_PERF duk_instr_t *duk__handle_op_endtry(duk_hthread *thr, duk_uint_fast32_t ins) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF duk_instr_t *duk__handle_op_endtry(duk_hthread *thr, duk_uint_fast32_t ins) {
duk_activation *act;
duk_catcher *cat;
duk_tval *tv1;
@@ -76186,26 +79608,27 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_instr_t *duk__handle_op_endtry(duk_hthread *thr
tv1 = thr->valstack + cat->idx_base;
DUK_ASSERT(tv1 >= thr->valstack && tv1 < thr->valstack_top);
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv1); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv1); /* side effects */
tv1 = NULL;
tv1 = thr->valstack + cat->idx_base + 1;
DUK_ASSERT(tv1 >= thr->valstack && tv1 < thr->valstack_top);
- DUK_TVAL_SET_U32_UPDREF(thr, tv1, (duk_uint32_t) DUK_LJ_TYPE_NORMAL); /* side effects */
+ DUK_TVAL_SET_U32_UPDREF(thr, tv1, (duk_uint32_t) DUK_LJ_TYPE_NORMAL); /* side effects */
tv1 = NULL;
DUK_CAT_CLEAR_FINALLY_ENABLED(cat);
} else {
- DUK_DDD(DUK_DDDPRINT("ENDTRY: no finally part, dismantle catcher, jump through 2nd jump slot (to end of statement)"));
+ DUK_DDD(
+ DUK_DDDPRINT("ENDTRY: no finally part, dismantle catcher, jump through 2nd jump slot (to end of statement)"));
- duk_hthread_catcher_unwind_norz(thr, act); /* lexenv may be set for 'with' binding */
+ duk_hthread_catcher_unwind_norz(thr, act); /* lexenv may be set for 'with' binding */
/* no need to unwind callstack */
}
- return pc_base + 1; /* new curr_pc value */
+ return pc_base + 1; /* new curr_pc value */
}
-DUK_LOCAL DUK__NOINLINE_PERF duk_instr_t *duk__handle_op_endcatch(duk_hthread *thr, duk_uint_fast32_t ins) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF duk_instr_t *duk__handle_op_endcatch(duk_hthread *thr, duk_uint_fast32_t ins) {
duk_activation *act;
duk_catcher *cat;
duk_tval *tv1;
@@ -76218,7 +79641,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_instr_t *duk__handle_op_endcatch(duk_hthread *t
DUK_ASSERT(act != NULL);
cat = act->cat;
DUK_ASSERT(cat != NULL);
- DUK_ASSERT(!DUK_CAT_HAS_CATCH_ENABLED(cat)); /* cleared before entering catch part */
+ DUK_ASSERT(!DUK_CAT_HAS_CATCH_ENABLED(cat)); /* cleared before entering catch part */
if (DUK_CAT_HAS_LEXENV_ACTIVE(cat)) {
duk_hobject *prev_env;
@@ -76234,7 +79657,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_instr_t *duk__handle_op_endcatch(duk_hthread *t
act->lex_env = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, prev_env);
DUK_CAT_CLEAR_LEXENV_ACTIVE(cat);
DUK_HOBJECT_INCREF(thr, act->lex_env);
- DUK_HOBJECT_DECREF(thr, prev_env); /* side effects */
+ DUK_HOBJECT_DECREF(thr, prev_env); /* side effects */
DUK_ASSERT(act == thr->callstack_curr);
DUK_ASSERT(act != NULL);
@@ -76247,26 +79670,29 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_instr_t *duk__handle_op_endcatch(duk_hthread *t
tv1 = thr->valstack + cat->idx_base;
DUK_ASSERT(tv1 >= thr->valstack && tv1 < thr->valstack_top);
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv1); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv1); /* side effects */
tv1 = NULL;
tv1 = thr->valstack + cat->idx_base + 1;
DUK_ASSERT(tv1 >= thr->valstack && tv1 < thr->valstack_top);
- DUK_TVAL_SET_U32_UPDREF(thr, tv1, (duk_uint32_t) DUK_LJ_TYPE_NORMAL); /* side effects */
+ DUK_TVAL_SET_U32_UPDREF(thr, tv1, (duk_uint32_t) DUK_LJ_TYPE_NORMAL); /* side effects */
tv1 = NULL;
DUK_CAT_CLEAR_FINALLY_ENABLED(cat);
} else {
- DUK_DDD(DUK_DDDPRINT("ENDCATCH: no finally part, dismantle catcher, jump through 2nd jump slot (to end of statement)"));
+ DUK_DDD(
+ DUK_DDDPRINT("ENDCATCH: no finally part, dismantle catcher, jump through 2nd jump slot (to end of statement)"));
duk_hthread_catcher_unwind_norz(thr, act);
/* no need to unwind callstack */
}
- return pc_base + 1; /* new curr_pc value */
+ return pc_base + 1; /* new curr_pc value */
}
-DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread *thr, duk_uint_fast32_t ins, duk_activation *entry_act) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread *thr,
+ duk_uint_fast32_t ins,
+ duk_activation *entry_act) {
duk_activation *act;
duk_tval *tv1;
duk_uint_t reg_catch;
@@ -76288,7 +79714,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
(duk_tval *) (thr->valstack_bottom + reg_catch + 0),
(duk_tval *) (thr->valstack_bottom + reg_catch + 1)));
- tv1 = thr->valstack_bottom + reg_catch + 1; /* type */
+ tv1 = thr->valstack_bottom + reg_catch + 1; /* type */
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv1));
#if defined(DUK_USE_FASTINT)
DUK_ASSERT(DUK_TVAL_IS_FASTINT(tv1));
@@ -76297,7 +79723,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
cont_type = (duk_small_uint_t) DUK_TVAL_GET_NUMBER(tv1);
#endif
- tv1--; /* value */
+ tv1--; /* value */
switch (cont_type) {
case DUK_LJ_TYPE_NORMAL: {
@@ -76306,11 +79732,12 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
duk_hthread_catcher_unwind_norz(thr, act);
/* no need to unwind callstack */
- return 0; /* restart execution */
+ return 0; /* restart execution */
}
case DUK_LJ_TYPE_RETURN: {
DUK_DDD(DUK_DDDPRINT("ENDFIN: finally part finishing with 'return' complation -> dismantle "
- "catcher, handle return, lj.value1=%!T", tv1));
+ "catcher, handle return, lj.value1=%!T",
+ tv1));
/* Not necessary to unwind catch stack: return handling will
* do it. The finally flag of 'cat' is no longer set. The
@@ -76320,12 +79747,12 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
duk_push_tval(thr, tv1);
ret_result = duk__handle_return(thr, entry_act);
if (ret_result == DUK__RETHAND_RESTART) {
- return 0; /* restart execution */
+ return 0; /* restart execution */
}
DUK_ASSERT(ret_result == DUK__RETHAND_FINISHED);
DUK_DDD(DUK_DDDPRINT("exiting executor after ENDFIN and RETURN (pseudo) longjmp type"));
- return 1; /* exit executor */
+ return 1; /* exit executor */
}
case DUK_LJ_TYPE_BREAK:
case DUK_LJ_TYPE_CONTINUE: {
@@ -76347,7 +79774,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
#endif
lj_type = cont_type;
duk__handle_break_or_continue(thr, label_id, lj_type);
- return 0; /* restart execution */
+ return 0; /* restart execution */
}
default: {
DUK_DDD(DUK_DDDPRINT("ENDFIN: finally part finishing with abrupt completion, lj_type=%ld -> "
@@ -76357,7 +79784,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
duk_err_setup_ljstate1(thr, (duk_small_uint_t) cont_type, tv1);
/* No debugger Throw notify check on purpose (rethrow). */
- DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* always in executor */
+ DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* always in executor */
duk_err_longjmp(thr);
DUK_UNREACHABLE();
}
@@ -76367,7 +79794,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_endfin(duk_hthread
return 0;
}
-DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_initenum(duk_hthread *thr, duk_uint_fast32_t ins) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF void duk__handle_op_initenum(duk_hthread *thr, duk_uint_fast32_t ins) {
duk_small_uint_t b;
duk_small_uint_t c;
@@ -76390,12 +79817,12 @@ DUK_LOCAL DUK__NOINLINE_PERF void duk__handle_op_initenum(duk_hthread *thr, duk_
} else {
duk_dup(thr, (duk_idx_t) c);
duk_to_object(thr, -1);
- duk_hobject_enumerator_create(thr, 0 /*enum_flags*/); /* [ ... val ] --> [ ... enum ] */
+ duk_hobject_enumerator_create(thr, 0 /*enum_flags*/); /* [ ... val ] --> [ ... enum ] */
duk_replace(thr, (duk_idx_t) b);
}
}
-DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_nextenum(duk_hthread *thr, duk_uint_fast32_t ins) {
+DUK_LOCAL DUK_EXEC_NOINLINE_PERF duk_small_uint_t duk__handle_op_nextenum(duk_hthread *thr, duk_uint_fast32_t ins) {
duk_small_uint_t b;
duk_small_uint_t c;
duk_small_uint_t pc_skip = 0;
@@ -76422,13 +79849,12 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_nextenum(duk_hthrea
duk_dup(thr, (duk_idx_t) c);
if (duk_hobject_enumerator_next(thr, 0 /*get_value*/)) {
/* [ ... enum ] -> [ ... next_key ] */
- DUK_DDD(DUK_DDDPRINT("enum active, next key is %!T, skip jump slot ",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(DUK_DDDPRINT("enum active, next key is %!T, skip jump slot ", (duk_tval *) duk_get_tval(thr, -1)));
pc_skip = 1;
} else {
/* [ ... enum ] -> [ ... ] */
DUK_DDD(DUK_DDDPRINT("enum finished, execute jump slot"));
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* valstack policy */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* valstack policy */
thr->valstack_top++;
}
duk_replace(thr, (duk_idx_t) b);
@@ -76448,7 +79874,7 @@ DUK_LOCAL DUK__NOINLINE_PERF duk_small_uint_t duk__handle_op_nextenum(duk_hthrea
DUK_LOCAL duk_bool_t duk__executor_handle_call(duk_hthread *thr, duk_idx_t idx, duk_idx_t nargs, duk_small_uint_t call_flags) {
duk_bool_t rc;
- duk_set_top_unsafe(thr, (duk_idx_t) (idx + nargs + 2)); /* [ ... func this arg1 ... argN ] */
+ duk_set_top_unsafe(thr, (duk_idx_t) (idx + nargs + 2)); /* [ ... func this arg1 ... argN ] */
/* Attempt an Ecma-to-Ecma call setup. If the call
* target is (directly or indirectly) Reflect.construct(),
@@ -76502,22 +79928,22 @@ DUK_LOCAL duk_bool_t duk__executor_handle_call(duk_hthread *thr, duk_idx_t idx,
* difference and the best option is architecture dependent.
*/
#if defined(DUK_USE_EXEC_FUN_LOCAL)
-#define DUK__FUN() fun
+#define DUK__FUN() fun
#else
-#define DUK__FUN() ((duk_hcompfunc *) DUK_ACT_GET_FUNC((thr)->callstack_curr))
+#define DUK__FUN() ((duk_hcompfunc *) DUK_ACT_GET_FUNC((thr)->callstack_curr))
#endif
/* Strict flag. */
-#define DUK__STRICT() ((duk_small_uint_t) DUK_HOBJECT_HAS_STRICT((duk_hobject *) DUK__FUN()))
+#define DUK__STRICT() ((duk_small_uint_t) DUK_HOBJECT_HAS_STRICT((duk_hobject *) DUK__FUN()))
/* Reg/const access macros: these are very footprint and performance sensitive
* so modify with care. Arguments are sometimes evaluated multiple times which
* is not ideal.
*/
-#define DUK__REG(x) (*(thr->valstack_bottom + (x)))
-#define DUK__REGP(x) (thr->valstack_bottom + (x))
-#define DUK__CONST(x) (*(consts + (x)))
-#define DUK__CONSTP(x) (consts + (x))
+#define DUK__REG(x) (*(thr->valstack_bottom + (x)))
+#define DUK__REGP(x) (thr->valstack_bottom + (x))
+#define DUK__CONST(x) (*(consts + (x)))
+#define DUK__CONSTP(x) (consts + (x))
/* Reg/const access macros which take the 32-bit instruction and avoid an
* explicit field decoding step by using shifts and masks. These must be
@@ -76526,68 +79952,74 @@ DUK_LOCAL duk_bool_t duk__executor_handle_call(duk_hthread *thr, duk_idx_t idx,
* instead of a duk_tval offset which needs further shifting (which is an
* issue on some, but not all, CPUs).
*/
-#define DUK__RCBIT_B DUK_BC_REGCONST_B
-#define DUK__RCBIT_C DUK_BC_REGCONST_C
+#define DUK__RCBIT_B DUK_BC_REGCONST_B
+#define DUK__RCBIT_C DUK_BC_REGCONST_C
#if defined(DUK_USE_EXEC_REGCONST_OPTIMIZE)
#if defined(DUK_USE_PACKED_TVAL)
-#define DUK__TVAL_SHIFT 3 /* sizeof(duk_tval) == 8 */
+#define DUK__TVAL_SHIFT 3 /* sizeof(duk_tval) == 8 */
#else
-#define DUK__TVAL_SHIFT 4 /* sizeof(duk_tval) == 16; not always the case so also asserted for */
-#endif
-#define DUK__SHIFT_A (DUK_BC_SHIFT_A - DUK__TVAL_SHIFT)
-#define DUK__SHIFT_B (DUK_BC_SHIFT_B - DUK__TVAL_SHIFT)
-#define DUK__SHIFT_C (DUK_BC_SHIFT_C - DUK__TVAL_SHIFT)
-#define DUK__SHIFT_BC (DUK_BC_SHIFT_BC - DUK__TVAL_SHIFT)
-#define DUK__MASK_A (DUK_BC_UNSHIFTED_MASK_A << DUK__TVAL_SHIFT)
-#define DUK__MASK_B (DUK_BC_UNSHIFTED_MASK_B << DUK__TVAL_SHIFT)
-#define DUK__MASK_C (DUK_BC_UNSHIFTED_MASK_C << DUK__TVAL_SHIFT)
-#define DUK__MASK_BC (DUK_BC_UNSHIFTED_MASK_BC << DUK__TVAL_SHIFT)
-#define DUK__BYTEOFF_A(ins) (((ins) >> DUK__SHIFT_A) & DUK__MASK_A)
-#define DUK__BYTEOFF_B(ins) (((ins) >> DUK__SHIFT_B) & DUK__MASK_B)
-#define DUK__BYTEOFF_C(ins) (((ins) >> DUK__SHIFT_C) & DUK__MASK_C)
-#define DUK__BYTEOFF_BC(ins) (((ins) >> DUK__SHIFT_BC) & DUK__MASK_BC)
-
-#define DUK__REGP_A(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_A((ins))))
-#define DUK__REGP_B(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_B((ins))))
-#define DUK__REGP_C(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_C((ins))))
-#define DUK__REGP_BC(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_BC((ins))))
-#define DUK__CONSTP_A(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_A((ins))))
-#define DUK__CONSTP_B(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_B((ins))))
-#define DUK__CONSTP_C(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_C((ins))))
-#define DUK__CONSTP_BC(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_BC((ins))))
-#define DUK__REGCONSTP_B(ins) ((duk_tval *) (void *) ((duk_uint8_t *) (((ins) & DUK__RCBIT_B) ? consts : thr->valstack_bottom) + DUK__BYTEOFF_B((ins))))
-#define DUK__REGCONSTP_C(ins) ((duk_tval *) (void *) ((duk_uint8_t *) (((ins) & DUK__RCBIT_C) ? consts : thr->valstack_bottom) + DUK__BYTEOFF_C((ins))))
-#else /* DUK_USE_EXEC_REGCONST_OPTIMIZE */
+#define DUK__TVAL_SHIFT 4 /* sizeof(duk_tval) == 16; not always the case so also asserted for */
+#endif
+#define DUK__SHIFT_A (DUK_BC_SHIFT_A - DUK__TVAL_SHIFT)
+#define DUK__SHIFT_B (DUK_BC_SHIFT_B - DUK__TVAL_SHIFT)
+#define DUK__SHIFT_C (DUK_BC_SHIFT_C - DUK__TVAL_SHIFT)
+#define DUK__SHIFT_BC (DUK_BC_SHIFT_BC - DUK__TVAL_SHIFT)
+#define DUK__MASK_A (DUK_BC_UNSHIFTED_MASK_A << DUK__TVAL_SHIFT)
+#define DUK__MASK_B (DUK_BC_UNSHIFTED_MASK_B << DUK__TVAL_SHIFT)
+#define DUK__MASK_C (DUK_BC_UNSHIFTED_MASK_C << DUK__TVAL_SHIFT)
+#define DUK__MASK_BC (DUK_BC_UNSHIFTED_MASK_BC << DUK__TVAL_SHIFT)
+#define DUK__BYTEOFF_A(ins) (((ins) >> DUK__SHIFT_A) & DUK__MASK_A)
+#define DUK__BYTEOFF_B(ins) (((ins) >> DUK__SHIFT_B) & DUK__MASK_B)
+#define DUK__BYTEOFF_C(ins) (((ins) >> DUK__SHIFT_C) & DUK__MASK_C)
+#define DUK__BYTEOFF_BC(ins) (((ins) >> DUK__SHIFT_BC) & DUK__MASK_BC)
+
+#define DUK__REGP_A(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_A((ins))))
+#define DUK__REGP_B(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_B((ins))))
+#define DUK__REGP_C(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_C((ins))))
+#define DUK__REGP_BC(ins) ((duk_tval *) (void *) ((duk_uint8_t *) thr->valstack_bottom + DUK__BYTEOFF_BC((ins))))
+#define DUK__CONSTP_A(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_A((ins))))
+#define DUK__CONSTP_B(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_B((ins))))
+#define DUK__CONSTP_C(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_C((ins))))
+#define DUK__CONSTP_BC(ins) ((duk_tval *) (void *) ((duk_uint8_t *) consts + DUK__BYTEOFF_BC((ins))))
+#define DUK__REGCONSTP_B(ins) \
+ ((duk_tval *) (void *) ((duk_uint8_t *) (((ins) &DUK__RCBIT_B) ? consts : thr->valstack_bottom) + DUK__BYTEOFF_B((ins))))
+#define DUK__REGCONSTP_C(ins) \
+ ((duk_tval *) (void *) ((duk_uint8_t *) (((ins) &DUK__RCBIT_C) ? consts : thr->valstack_bottom) + DUK__BYTEOFF_C((ins))))
+#else /* DUK_USE_EXEC_REGCONST_OPTIMIZE */
/* Safe alternatives, no assumption about duk_tval size. */
-#define DUK__REGP_A(ins) DUK__REGP(DUK_DEC_A((ins)))
-#define DUK__REGP_B(ins) DUK__REGP(DUK_DEC_B((ins)))
-#define DUK__REGP_C(ins) DUK__REGP(DUK_DEC_C((ins)))
-#define DUK__REGP_BC(ins) DUK__REGP(DUK_DEC_BC((ins)))
-#define DUK__CONSTP_A(ins) DUK__CONSTP(DUK_DEC_A((ins)))
-#define DUK__CONSTP_B(ins) DUK__CONSTP(DUK_DEC_B((ins)))
-#define DUK__CONSTP_C(ins) DUK__CONSTP(DUK_DEC_C((ins)))
-#define DUK__CONSTP_BC(ins) DUK__CONSTP(DUK_DEC_BC((ins)))
-#define DUK__REGCONSTP_B(ins) ((((ins) & DUK__RCBIT_B) ? consts : thr->valstack_bottom) + DUK_DEC_B((ins)))
-#define DUK__REGCONSTP_C(ins) ((((ins) & DUK__RCBIT_C) ? consts : thr->valstack_bottom) + DUK_DEC_C((ins)))
-#endif /* DUK_USE_EXEC_REGCONST_OPTIMIZE */
+#define DUK__REGP_A(ins) DUK__REGP(DUK_DEC_A((ins)))
+#define DUK__REGP_B(ins) DUK__REGP(DUK_DEC_B((ins)))
+#define DUK__REGP_C(ins) DUK__REGP(DUK_DEC_C((ins)))
+#define DUK__REGP_BC(ins) DUK__REGP(DUK_DEC_BC((ins)))
+#define DUK__CONSTP_A(ins) DUK__CONSTP(DUK_DEC_A((ins)))
+#define DUK__CONSTP_B(ins) DUK__CONSTP(DUK_DEC_B((ins)))
+#define DUK__CONSTP_C(ins) DUK__CONSTP(DUK_DEC_C((ins)))
+#define DUK__CONSTP_BC(ins) DUK__CONSTP(DUK_DEC_BC((ins)))
+#define DUK__REGCONSTP_B(ins) ((((ins) &DUK__RCBIT_B) ? consts : thr->valstack_bottom) + DUK_DEC_B((ins)))
+#define DUK__REGCONSTP_C(ins) ((((ins) &DUK__RCBIT_C) ? consts : thr->valstack_bottom) + DUK_DEC_C((ins)))
+#endif /* DUK_USE_EXEC_REGCONST_OPTIMIZE */
#if defined(DUK_USE_VERBOSE_EXECUTOR_ERRORS)
-#define DUK__INTERNAL_ERROR(msg) do { \
+#define DUK__INTERNAL_ERROR(msg) \
+ do { \
DUK_ERROR_ERROR(thr, (msg)); \
DUK_WO_NORETURN(return;); \
} while (0)
#else
-#define DUK__INTERNAL_ERROR(msg) do { \
+#define DUK__INTERNAL_ERROR(msg) \
+ do { \
goto internal_error; \
} while (0)
#endif
-#define DUK__SYNC_CURR_PC() do { \
+#define DUK__SYNC_CURR_PC() \
+ do { \
duk_activation *duk__act; \
duk__act = thr->callstack_curr; \
duk__act->curr_pc = curr_pc; \
} while (0)
-#define DUK__SYNC_AND_NULL_CURR_PC() do { \
+#define DUK__SYNC_AND_NULL_CURR_PC() \
+ do { \
duk_activation *duk__act; \
duk__act = thr->callstack_curr; \
duk__act->curr_pc = curr_pc; \
@@ -76595,19 +80027,22 @@ DUK_LOCAL duk_bool_t duk__executor_handle_call(duk_hthread *thr, duk_idx_t idx,
} while (0)
#if defined(DUK_USE_EXEC_PREFER_SIZE)
-#define DUK__LOOKUP_INDIRECT(idx) do { \
+#define DUK__LOOKUP_INDIRECT(idx) \
+ do { \
(idx) = (duk_uint_fast_t) duk_get_uint(thr, (duk_idx_t) (idx)); \
} while (0)
#elif defined(DUK_USE_FASTINT)
-#define DUK__LOOKUP_INDIRECT(idx) do { \
+#define DUK__LOOKUP_INDIRECT(idx) \
+ do { \
duk_tval *tv_ind; \
tv_ind = DUK__REGP((idx)); \
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_ind)); \
- DUK_ASSERT(DUK_TVAL_IS_FASTINT(tv_ind)); /* compiler guarantees */ \
+ DUK_ASSERT(DUK_TVAL_IS_FASTINT(tv_ind)); /* compiler guarantees */ \
(idx) = (duk_uint_fast_t) DUK_TVAL_GET_FASTINT_U32(tv_ind); \
} while (0)
#else
-#define DUK__LOOKUP_INDIRECT(idx) do { \
+#define DUK__LOOKUP_INDIRECT(idx) \
+ do { \
duk_tval *tv_ind; \
tv_ind = DUK__REGP(idx); \
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_ind)); \
@@ -76660,8 +80095,8 @@ DUK_LOCAL void duk__handle_executor_error(duk_heap *heap,
* will be re-bumped by the longjmp.
*/
- DUK_ASSERT(lj_ret == DUK__LONGJMP_RETHROW); /* Rethrow error to calling state. */
- DUK_ASSERT(heap->lj.jmpbuf_ptr == entry_jmpbuf_ptr); /* Longjmp handling has restored jmpbuf_ptr. */
+ DUK_ASSERT(lj_ret == DUK__LONGJMP_RETHROW); /* Rethrow error to calling state. */
+ DUK_ASSERT(heap->lj.jmpbuf_ptr == entry_jmpbuf_ptr); /* Longjmp handling has restored jmpbuf_ptr. */
/* Thread may have changed, e.g. YIELD converted to THROW. */
duk_err_longjmp(heap->curr_thread);
@@ -76684,7 +80119,7 @@ DUK_INTERNAL void duk_js_execute_bytecode(duk_hthread *exec_thr) {
DUK_ASSERT(exec_thr->heap != NULL);
DUK_ASSERT(exec_thr->heap->curr_thread != NULL);
DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR((duk_heaphdr *) exec_thr);
- DUK_ASSERT(exec_thr->callstack_top >= 1); /* at least one activation, ours */
+ DUK_ASSERT(exec_thr->callstack_top >= 1); /* at least one activation, ours */
DUK_ASSERT(exec_thr->callstack_curr != NULL);
DUK_ASSERT(DUK_ACT_GET_FUNC(exec_thr->callstack_curr) != NULL);
DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC(DUK_ACT_GET_FUNC(exec_thr->callstack_curr)));
@@ -76750,11 +80185,12 @@ DUK_INTERNAL void duk_js_execute_bytecode(duk_hthread *exec_thr) {
entry_act,
entry_call_recursion_depth,
entry_jmpbuf_ptr,
- &delayed_catch_setup);
+ &delayed_catch_setup);
}
#if defined(DUK_USE_CPP_EXCEPTIONS)
catch (duk_fatal_exception &exc) {
DUK_D(DUK_DPRINT("rethrow duk_fatal_exception"));
+ DUK_UNREF(exc);
throw;
} catch (std::exception &exc) {
const char *what = exc.what();
@@ -76765,7 +80201,10 @@ DUK_INTERNAL void duk_js_execute_bytecode(duk_hthread *exec_thr) {
DUK_STATS_INC(exec_thr->heap, stats_exec_throw);
try {
DUK_ASSERT(heap->curr_thread != NULL);
- DUK_ERROR_FMT1(heap->curr_thread, DUK_ERR_TYPE_ERROR, "caught invalid c++ std::exception '%s' (perhaps thrown by user code)", what);
+ DUK_ERROR_FMT1(heap->curr_thread,
+ DUK_ERR_TYPE_ERROR,
+ "caught invalid c++ std::exception '%s' (perhaps thrown by user code)",
+ what);
DUK_WO_NORETURN(return;);
} catch (duk_internal_exception exc) {
DUK_D(DUK_DPRINT("caught api error thrown from unexpected c++ std::exception"));
@@ -76774,7 +80213,7 @@ DUK_INTERNAL void duk_js_execute_bytecode(duk_hthread *exec_thr) {
entry_act,
entry_call_recursion_depth,
entry_jmpbuf_ptr,
- &delayed_catch_setup);
+ &delayed_catch_setup);
}
} catch (...) {
DUK_D(DUK_DPRINT("unexpected c++ exception (perhaps thrown by user code)"));
@@ -76790,7 +80229,7 @@ DUK_INTERNAL void duk_js_execute_bytecode(duk_hthread *exec_thr) {
entry_act,
entry_call_recursion_depth,
entry_jmpbuf_ptr,
- &delayed_catch_setup);
+ &delayed_catch_setup);
}
}
#endif
@@ -76806,13 +80245,13 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
* but that eliminates performance benefits; aliasing guarantees
* should be enough though.
*/
- duk_instr_t *curr_pc; /* bytecode has a stable pointer */
+ duk_instr_t *curr_pc; /* bytecode has a stable pointer */
/* Hot variables for interpretation. Critical for performance,
* but must add sparingly to minimize register shuffling.
*/
- duk_hthread *thr; /* stable */
- duk_tval *consts; /* stable */
+ duk_hthread *thr; /* stable */
+ duk_tval *consts; /* stable */
duk_uint_fast32_t ins;
/* 'funcs' is quite rarely used, so no local for it */
#if defined(DUK_USE_EXEC_FUN_LOCAL)
@@ -76826,7 +80265,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
#endif
#if defined(DUK_USE_ASSERTIONS)
- duk_size_t valstack_top_base; /* valstack top, should match before interpreting each op (no leftovers) */
+ duk_size_t valstack_top_base; /* valstack top, should match before interpreting each op (no leftovers) */
#endif
/* Optimized reg/const access macros assume sizeof(duk_tval) to be
@@ -76882,7 +80321,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
* See execution.rst for discussion.
*/
- restart_execution:
+restart_execution:
/* Lookup current thread; use the stable 'entry_thread' for this to
* avoid clobber warnings. Any valid, reachable 'thr' value would be
@@ -76923,7 +80362,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_ASSERT(act == thr->callstack_curr);
DUK_ASSERT(act != NULL);
}
-#endif /* DUK_USE_DEBUGGER_SUPPORT */
+#endif /* DUK_USE_DEBUGGER_SUPPORT */
#if defined(DUK_USE_ASSERTIONS)
valstack_top_base = (duk_size_t) (thr->valstack_top - thr->valstack);
@@ -76987,7 +80426,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
*/
#if defined(DUK_USE_DEBUGGER_SUPPORT)
if (thr->heap->dbg_force_restart) {
- DUK_DD(DUK_DDPRINT("dbg_force_restart flag forced restart execution")); /* GH-303 */
+ DUK_DD(DUK_DDPRINT("dbg_force_restart flag forced restart execution")); /* GH-303 */
thr->heap->dbg_force_restart = 0;
goto restart_execution;
}
@@ -76999,7 +80438,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
goto restart_execution;
}
}
-#endif /* DUK_USE_INTERRUPT_COUNTER */
+#endif /* DUK_USE_INTERRUPT_COUNTER */
#if defined(DUK_USE_INTERRUPT_COUNTER) && defined(DUK_USE_DEBUG)
/* For cross-checking during development: ensure dispatch count
* matches cumulative interrupt counter init value sums.
@@ -77013,16 +80452,17 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
act = thr->callstack_curr;
DUK_ASSERT(curr_pc >= DUK_HCOMPFUNC_GET_CODE_BASE(thr->heap, DUK__FUN()));
DUK_ASSERT(curr_pc < DUK_HCOMPFUNC_GET_CODE_END(thr->heap, DUK__FUN()));
- DUK_UNREF(act); /* if debugging disabled */
+ DUK_UNREF(act); /* if debugging disabled */
- DUK_DDD(DUK_DDDPRINT("executing bytecode: pc=%ld, ins=0x%08lx, op=%ld, valstack_top=%ld/%ld, nregs=%ld --> %!I",
- (long) (curr_pc - DUK_HCOMPFUNC_GET_CODE_BASE(thr->heap, DUK__FUN())),
- (unsigned long) *curr_pc,
- (long) DUK_DEC_OP(*curr_pc),
- (long) (thr->valstack_top - thr->valstack),
- (long) (thr->valstack_end - thr->valstack),
- (long) (DUK__FUN() ? DUK__FUN()->nregs : -1),
- (duk_instr_t) *curr_pc));
+ DUK_DDD(DUK_DDDPRINT(
+ "executing bytecode: pc=%ld, ins=0x%08lx, op=%ld, valstack_top=%ld/%ld, nregs=%ld --> %!I",
+ (long) (curr_pc - DUK_HCOMPFUNC_GET_CODE_BASE(thr->heap, DUK__FUN())),
+ (unsigned long) *curr_pc,
+ (long) DUK_DEC_OP(*curr_pc),
+ (long) (thr->valstack_top - thr->valstack),
+ (long) (thr->valstack_end - thr->valstack),
+ (long) (DUK__FUN() ? DUK__FUN()->nregs : -1),
+ (duk_instr_t) *curr_pc));
}
#endif
@@ -77059,14 +80499,16 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
*/
op = (duk_uint8_t) DUK_DEC_OP(ins);
switch (op) {
-
- /* Some useful macros. These access inner executor variables
- * directly so they only apply within the executor.
- */
+ /* Some useful macros. These access inner executor variables
+ * directly so they only apply within the executor.
+ */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
-#define DUK__REPLACE_TOP_A_BREAK() { goto replace_top_a; }
-#define DUK__REPLACE_TOP_BC_BREAK() { goto replace_top_bc; }
-#define DUK__REPLACE_BOOL_A_BREAK(bval) { \
+#define DUK__REPLACE_TOP_A_BREAK() \
+ { goto replace_top_a; }
+#define DUK__REPLACE_TOP_BC_BREAK() \
+ { goto replace_top_bc; }
+#define DUK__REPLACE_BOOL_A_BREAK(bval) \
+ { \
duk_bool_t duk__bval; \
duk__bval = (bval); \
DUK_ASSERT(duk__bval == 0 || duk__bval == 1); \
@@ -77074,9 +80516,18 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK__REPLACE_TOP_A_BREAK(); \
}
#else
-#define DUK__REPLACE_TOP_A_BREAK() { DUK__REPLACE_TO_TVPTR(thr, DUK__REGP_A(ins)); break; }
-#define DUK__REPLACE_TOP_BC_BREAK() { DUK__REPLACE_TO_TVPTR(thr, DUK__REGP_BC(ins)); break; }
-#define DUK__REPLACE_BOOL_A_BREAK(bval) { \
+#define DUK__REPLACE_TOP_A_BREAK() \
+ { \
+ DUK__REPLACE_TO_TVPTR(thr, DUK__REGP_A(ins)); \
+ break; \
+ }
+#define DUK__REPLACE_TOP_BC_BREAK() \
+ { \
+ DUK__REPLACE_TO_TVPTR(thr, DUK__REGP_BC(ins)); \
+ break; \
+ }
+#define DUK__REPLACE_BOOL_A_BREAK(bval) \
+ { \
duk_bool_t duk__bval; \
duk_tval *duk__tvdst; \
duk__bval = (bval); \
@@ -77100,7 +80551,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
tv1 = DUK__REGP_A(ins);
tv2 = DUK__REGP_BC(ins);
- DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv1, tv2); /* side effects */
break;
}
@@ -77109,7 +80560,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
tv1 = DUK__REGP_A(ins);
tv2 = DUK__REGP_BC(ins);
- DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv2, tv1); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv2, tv1); /* side effects */
break;
}
@@ -77118,7 +80569,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
tv1 = DUK__REGP_A(ins);
tv2 = DUK__CONSTP_BC(ins);
- DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv1, tv2); /* side effects */
break;
}
@@ -77138,18 +80589,18 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk_int32_t val;
val = (duk_int32_t) duk_get_int(thr, DUK_DEC_A(ins));
- val = (val << DUK_BC_LDINTX_SHIFT) + (duk_int32_t) DUK_DEC_BC(ins); /* no bias */
+ val = (val << DUK_BC_LDINTX_SHIFT) + (duk_int32_t) DUK_DEC_BC(ins); /* no bias */
duk_push_int(thr, val);
DUK__REPLACE_TOP_A_BREAK();
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_LDINT: {
duk_tval *tv1;
duk_int32_t val;
val = (duk_int32_t) DUK_DEC_BC(ins) - (duk_int32_t) DUK_BC_LDINT_BIAS;
tv1 = DUK__REGP_A(ins);
- DUK_TVAL_SET_I32_UPDREF(thr, tv1, val); /* side effects */
+ DUK_TVAL_SET_I32_UPDREF(thr, tv1, val); /* side effects */
break;
}
case DUK_OP_LDINTX: {
@@ -77165,11 +80616,12 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
/* XXX: fast double-to-int conversion, we know number is integer in [-0x80000000,0xffffffff]. */
val = (duk_int32_t) DUK_TVAL_GET_NUMBER(tv1);
#endif
- val = (duk_int32_t) ((duk_uint32_t) val << DUK_BC_LDINTX_SHIFT) + (duk_int32_t) DUK_DEC_BC(ins); /* no bias */
- DUK_TVAL_SET_I32_UPDREF(thr, tv1, val); /* side effects */
+ val =
+ (duk_int32_t) ((duk_uint32_t) val << DUK_BC_LDINTX_SHIFT) + (duk_int32_t) DUK_DEC_BC(ins); /* no bias */
+ DUK_TVAL_SET_I32_UPDREF(thr, tv1, val); /* side effects */
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
case DUK_OP_LDTHIS: {
@@ -77192,46 +80644,46 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk_push_false(thr);
DUK__REPLACE_TOP_BC_BREAK();
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_LDTHIS: {
/* Note: 'this' may be bound to any value, not just an object */
duk_tval *tv1, *tv2;
tv1 = DUK__REGP_BC(ins);
- tv2 = thr->valstack_bottom - 1; /* 'this binding' is just under bottom */
+ tv2 = thr->valstack_bottom - 1; /* 'this binding' is just under bottom */
DUK_ASSERT(tv2 >= thr->valstack);
- DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv1, tv2); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF_FAST(thr, tv1, tv2); /* side effects */
break;
}
case DUK_OP_LDUNDEF: {
duk_tval *tv1;
tv1 = DUK__REGP_BC(ins);
- DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv1); /* side effects */
+ DUK_TVAL_SET_UNDEFINED_UPDREF(thr, tv1); /* side effects */
break;
}
case DUK_OP_LDNULL: {
duk_tval *tv1;
tv1 = DUK__REGP_BC(ins);
- DUK_TVAL_SET_NULL_UPDREF(thr, tv1); /* side effects */
+ DUK_TVAL_SET_NULL_UPDREF(thr, tv1); /* side effects */
break;
}
case DUK_OP_LDTRUE: {
duk_tval *tv1;
tv1 = DUK__REGP_BC(ins);
- DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv1, 1); /* side effects */
+ DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv1, 1); /* side effects */
break;
}
case DUK_OP_LDFALSE: {
duk_tval *tv1;
tv1 = DUK__REGP_BC(ins);
- DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv1, 0); /* side effects */
+ DUK_TVAL_SET_BOOLEAN_UPDREF(thr, tv1, 0); /* side effects */
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_BNOT: {
duk__vm_bitwise_not(thr, DUK_DEC_BC(ins), DUK_DEC_A(ins));
@@ -77249,7 +80701,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_arith_unary_op(thr, DUK_DEC_BC(ins), DUK_DEC_A(ins), op);
break;
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_UNM: {
duk__vm_arith_unary_op(thr, DUK_DEC_BC(ins), DUK_DEC_A(ins), DUK_OP_UNM);
break;
@@ -77258,7 +80710,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_arith_unary_op(thr, DUK_DEC_BC(ins), DUK_DEC_A(ins), DUK_OP_UNP);
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
case DUK_OP_TYPEOF: {
@@ -77269,7 +80721,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk_push_hstring_stridx(thr, stridx);
DUK__REPLACE_TOP_A_BREAK();
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_TYPEOF: {
duk_tval *tv;
duk_small_uint_t stridx;
@@ -77283,7 +80735,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_TVAL_SET_STRING_UPDREF(thr, tv, h_str);
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_TYPEOFID: {
duk_small_uint_t stridx;
@@ -77301,13 +80753,13 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
tv = DUK__CONSTP_BC(ins);
DUK_ASSERT(DUK_TVAL_IS_STRING(tv));
name = DUK_TVAL_GET_STRING(tv);
- tv = NULL; /* lookup has side effects */
+ tv = NULL; /* lookup has side effects */
act = thr->callstack_curr;
if (duk_js_getvar_activation(thr, act, name, 0 /*throw*/)) {
/* -> [... val this] */
tv = DUK_GET_TVAL_NEGIDX(thr, -2);
stridx = duk_js_typeof_stridx(tv);
- tv = NULL; /* no longer needed */
+ tv = NULL; /* no longer needed */
duk_pop_2_unsafe(thr);
} else {
/* unresolvable, no stack changes */
@@ -77317,36 +80769,40 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
#if defined(DUK_USE_EXEC_PREFER_SIZE)
duk_push_hstring_stridx(thr, stridx);
DUK__REPLACE_TOP_A_BREAK();
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
h_str = DUK_HTHREAD_GET_STRING(thr, stridx);
tv = DUK__REGP_A(ins);
DUK_TVAL_SET_STRING_UPDREF(thr, tv, h_str);
break;
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
}
/* Equality: E5 Sections 11.9.1, 11.9.3 */
-#define DUK__EQ_BODY(barg,carg) { \
+#define DUK__EQ_BODY(barg, carg) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_equals(thr, (barg), (carg)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
DUK__REPLACE_BOOL_A_BREAK(tmp); \
}
-#define DUK__NEQ_BODY(barg,carg) { \
+#define DUK__NEQ_BODY(barg, carg) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_equals(thr, (barg), (carg)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
tmp ^= 1; \
DUK__REPLACE_BOOL_A_BREAK(tmp); \
}
-#define DUK__SEQ_BODY(barg,carg) { \
+#define DUK__SEQ_BODY(barg, carg) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_strict_equals((barg), (carg)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
DUK__REPLACE_BOOL_A_BREAK(tmp); \
}
-#define DUK__SNEQ_BODY(barg,carg) { \
+#define DUK__SNEQ_BODY(barg, carg) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_strict_equals((barg), (carg)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
@@ -77374,7 +80830,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_SNEQ_RC:
case DUK_OP_SNEQ_CC:
DUK__SNEQ_BODY(DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins));
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_EQ_RR:
DUK__EQ_BODY(DUK__REGP_B(ins), DUK__REGP_C(ins));
case DUK_OP_EQ_CR:
@@ -77407,18 +80863,19 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK__SNEQ_BODY(DUK__REGP_B(ins), DUK__CONSTP_C(ins));
case DUK_OP_SNEQ_CC:
DUK__SNEQ_BODY(DUK__CONSTP_B(ins), DUK__CONSTP_C(ins));
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
-#define DUK__COMPARE_BODY(arg1,arg2,flags) { \
+#define DUK__COMPARE_BODY(arg1, arg2, flags) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_compare_helper(thr, (arg1), (arg2), (flags)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
DUK__REPLACE_BOOL_A_BREAK(tmp); \
}
-#define DUK__GT_BODY(barg,carg) DUK__COMPARE_BODY((carg), (barg), 0)
-#define DUK__GE_BODY(barg,carg) DUK__COMPARE_BODY((barg), (carg), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST | DUK_COMPARE_FLAG_NEGATE)
-#define DUK__LT_BODY(barg,carg) DUK__COMPARE_BODY((barg), (carg), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST)
-#define DUK__LE_BODY(barg,carg) DUK__COMPARE_BODY((carg), (barg), DUK_COMPARE_FLAG_NEGATE)
+#define DUK__GT_BODY(barg, carg) DUK__COMPARE_BODY((carg), (barg), 0)
+#define DUK__GE_BODY(barg, carg) DUK__COMPARE_BODY((barg), (carg), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST | DUK_COMPARE_FLAG_NEGATE)
+#define DUK__LT_BODY(barg, carg) DUK__COMPARE_BODY((barg), (carg), DUK_COMPARE_FLAG_EVAL_LEFT_FIRST)
+#define DUK__LE_BODY(barg, carg) DUK__COMPARE_BODY((carg), (barg), DUK_COMPARE_FLAG_NEGATE)
#if defined(DUK_USE_EXEC_PREFER_SIZE)
case DUK_OP_GT_RR:
case DUK_OP_GT_CR:
@@ -77440,7 +80897,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_LE_RC:
case DUK_OP_LE_CC:
DUK__LE_BODY(DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins));
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_GT_RR:
DUK__GT_BODY(DUK__REGP_B(ins), DUK__REGP_C(ins));
case DUK_OP_GT_CR:
@@ -77473,7 +80930,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK__LE_BODY(DUK__REGP_B(ins), DUK__CONSTP_C(ins));
case DUK_OP_LE_CC:
DUK__LE_BODY(DUK__CONSTP_B(ins), DUK__CONSTP_C(ins));
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
/* No size optimized variant at present for IF. */
case DUK_OP_IFTRUE_R: {
@@ -77510,7 +80967,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_arith_add(thr, DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins), DUK_DEC_A(ins));
break;
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_ADD_RR: {
duk__vm_arith_add(thr, DUK__REGP_B(ins), DUK__REGP_C(ins), DUK_DEC_A(ins));
break;
@@ -77527,7 +80984,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_arith_add(thr, DUK__CONSTP_B(ins), DUK__CONSTP_C(ins), DUK_DEC_A(ins));
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
case DUK_OP_SUB_RR:
@@ -77551,13 +81008,13 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_EXP_CR:
case DUK_OP_EXP_RC:
case DUK_OP_EXP_CC:
-#endif /* DUK_USE_ES7_EXP_OPERATOR */
+#endif /* DUK_USE_ES7_EXP_OPERATOR */
{
/* XXX: could leave value on stack top and goto replace_top_a; */
duk__vm_arith_binary_op(thr, DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins), DUK_DEC_A(ins), op);
break;
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_SUB_RR: {
duk__vm_arith_binary_op(thr, DUK__REGP_B(ins), DUK__REGP_C(ins), DUK_DEC_A(ins), DUK_OP_SUB);
break;
@@ -77639,8 +81096,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_arith_binary_op(thr, DUK__CONSTP_B(ins), DUK__CONSTP_C(ins), DUK_DEC_A(ins), DUK_OP_EXP);
break;
}
-#endif /* DUK_USE_ES7_EXP_OPERATOR */
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_ES7_EXP_OPERATOR */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
case DUK_OP_BAND_RR:
@@ -77671,7 +81128,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_bitwise_binary_op(thr, DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins), DUK_DEC_A(ins), op);
break;
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_BAND_RR: {
duk__vm_bitwise_binary_op(thr, DUK__REGP_B(ins), DUK__REGP_C(ins), DUK_DEC_A(ins), DUK_OP_BAND);
break;
@@ -77768,16 +81225,18 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__vm_bitwise_binary_op(thr, DUK__CONSTP_B(ins), DUK__CONSTP_C(ins), DUK_DEC_A(ins), DUK_OP_BASR);
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
/* For INSTOF and IN, B is always a register. */
-#define DUK__INSTOF_BODY(barg,carg) { \
+#define DUK__INSTOF_BODY(barg, carg) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_instanceof(thr, (barg), (carg)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
DUK__REPLACE_BOOL_A_BREAK(tmp); \
}
-#define DUK__IN_BODY(barg,carg) { \
+#define DUK__IN_BODY(barg, carg) \
+ { \
duk_bool_t tmp; \
tmp = duk_js_in(thr, (barg), (carg)); \
DUK_ASSERT(tmp == 0 || tmp == 1); \
@@ -77794,7 +81253,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_IN_RC:
case DUK_OP_IN_CC:
DUK__IN_BODY(DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins));
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_INSTOF_RR:
DUK__INSTOF_BODY(DUK__REGP_B(ins), DUK__REGP_C(ins));
case DUK_OP_INSTOF_CR:
@@ -77811,9 +81270,9 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK__IN_BODY(DUK__REGP_B(ins), DUK__CONSTP_C(ins));
case DUK_OP_IN_CC:
DUK__IN_BODY(DUK__CONSTP_B(ins), DUK__CONSTP_C(ins));
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
- /* Pre/post inc/dec for register variables, important for loops. */
+ /* Pre/post inc/dec for register variables, important for loops. */
#if defined(DUK_USE_EXEC_PREFER_SIZE)
case DUK_OP_PREINCR:
case DUK_OP_PREDECR:
@@ -77829,7 +81288,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__prepost_incdec_var_helper(thr, DUK_DEC_A(ins), DUK__CONSTP_BC(ins), op, DUK__STRICT());
break;
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_PREINCR: {
duk__prepost_incdec_reg_helper(thr, DUK__REGP_A(ins), DUK__REGP_BC(ins), DUK_OP_PREINCR);
break;
@@ -77862,7 +81321,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk__prepost_incdec_var_helper(thr, DUK_DEC_A(ins), DUK__CONSTP_BC(ins), DUK_OP_POSTDECV, DUK__STRICT());
break;
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
/* XXX: Move to separate helper, optimize for perf/size separately. */
/* Preinc/predec for object properties. */
@@ -77889,7 +81348,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk_double_t x, y, z;
#if !defined(DUK_USE_EXEC_PREFER_SIZE)
duk_tval *tv_dst;
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
/* A -> target reg
* B -> object reg/const (may be const e.g. in "'foo'[1]")
@@ -77907,10 +81366,10 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
tv_obj = DUK__REGCONSTP_B(ins);
tv_key = DUK__REGCONSTP_C(ins);
- rc = duk_hobject_getprop(thr, tv_obj, tv_key); /* -> [val] */
- DUK_UNREF(rc); /* ignore */
- tv_obj = NULL; /* invalidated */
- tv_key = NULL; /* invalidated */
+ rc = duk_hobject_getprop(thr, tv_obj, tv_key); /* -> [val] */
+ DUK_UNREF(rc); /* ignore */
+ tv_obj = NULL; /* invalidated */
+ tv_key = NULL; /* invalidated */
/* XXX: Fastint fast path would be useful here. Also fastints
* now lose their fastint status in current handling which is
@@ -77931,9 +81390,9 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
tv_obj = DUK__REGCONSTP_B(ins);
tv_key = DUK__REGCONSTP_C(ins);
rc = duk_hobject_putprop(thr, tv_obj, tv_key, tv_val, DUK__STRICT());
- DUK_UNREF(rc); /* ignore */
- tv_obj = NULL; /* invalidated */
- tv_key = NULL; /* invalidated */
+ DUK_UNREF(rc); /* ignore */
+ tv_obj = NULL; /* invalidated */
+ tv_key = NULL; /* invalidated */
duk_pop_unsafe(thr);
z = (ins & DUK_BC_INCDECP_FLAG_POST) ? x : y;
@@ -77951,7 +81410,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
* Occurs relatively often in object oriented code.
*/
-#define DUK__GETPROP_BODY(barg,carg) { \
+#define DUK__GETPROP_BODY(barg, carg) \
+ { \
/* A -> target reg \
* B -> object reg/const (may be const e.g. in "'foo'[1]") \
* C -> key reg/const \
@@ -77959,7 +81419,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
(void) duk_hobject_getprop(thr, (barg), (carg)); \
DUK__REPLACE_TOP_A_BREAK(); \
}
-#define DUK__GETPROPC_BODY(barg,carg) { \
+#define DUK__GETPROPC_BODY(barg, carg) \
+ { \
/* Same as GETPROP but callability check for property-based calls. */ \
duk_tval *tv__targ; \
(void) duk_hobject_getprop(thr, (barg), (carg)); \
@@ -77974,7 +81435,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
} \
DUK__REPLACE_TOP_A_BREAK(); \
}
-#define DUK__PUTPROP_BODY(aarg,barg,carg) { \
+#define DUK__PUTPROP_BODY(aarg, barg, carg) \
+ { \
/* A -> object reg \
* B -> key reg/const \
* C -> value reg/const \
@@ -77985,7 +81447,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
(void) duk_hobject_putprop(thr, (aarg), (barg), (carg), DUK__STRICT()); \
break; \
}
-#define DUK__DELPROP_BODY(barg,carg) { \
+#define DUK__DELPROP_BODY(barg, carg) \
+ { \
/* A -> result reg \
* B -> object reg \
* C -> key reg/const \
@@ -78014,9 +81477,9 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_PUTPROP_CC:
DUK__PUTPROP_BODY(DUK__REGP_A(ins), DUK__REGCONSTP_B(ins), DUK__REGCONSTP_C(ins));
case DUK_OP_DELPROP_RR:
- case DUK_OP_DELPROP_RC: /* B is always reg */
+ case DUK_OP_DELPROP_RC: /* B is always reg */
DUK__DELPROP_BODY(DUK__REGP_B(ins), DUK__REGCONSTP_C(ins));
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_GETPROP_RR:
DUK__GETPROP_BODY(DUK__REGP_B(ins), DUK__REGP_C(ins));
case DUK_OP_GETPROP_CR:
@@ -78043,11 +81506,11 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK__PUTPROP_BODY(DUK__REGP_A(ins), DUK__REGP_B(ins), DUK__CONSTP_C(ins));
case DUK_OP_PUTPROP_CC:
DUK__PUTPROP_BODY(DUK__REGP_A(ins), DUK__CONSTP_B(ins), DUK__CONSTP_C(ins));
- case DUK_OP_DELPROP_RR: /* B is always reg */
+ case DUK_OP_DELPROP_RR: /* B is always reg */
DUK__DELPROP_BODY(DUK__REGP_B(ins), DUK__REGP_C(ins));
case DUK_OP_DELPROP_RC:
DUK__DELPROP_BODY(DUK__REGP_B(ins), DUK__CONSTP_C(ins));
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
/* No fast path for DECLVAR now, it's quite a rare instruction. */
case DUK_OP_DECLVAR_RR:
@@ -78080,7 +81543,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
if (is_func_decl) {
duk_push_tval(thr, DUK__REGCONSTP_C(ins));
} else {
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* valstack policy */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* valstack policy */
thr->valstack_top++;
}
tv1 = DUK_GET_TVAL_NEGIDX(thr, -1);
@@ -78116,11 +81579,11 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
*/
duk_push_tval(thr, DUK__REGCONSTP_C(ins));
- duk_push_tval(thr, DUK__REGCONSTP_B(ins)); /* -> [ ... escaped_source bytecode ] */
- duk_regexp_create_instance(thr); /* -> [ ... regexp_instance ] */
+ duk_push_tval(thr, DUK__REGCONSTP_B(ins)); /* -> [ ... escaped_source bytecode ] */
+ duk_regexp_create_instance(thr); /* -> [ ... regexp_instance ] */
DUK__REPLACE_TOP_A_BREAK();
}
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/* XXX: 'c' is unused, use whole BC, etc. */
case DUK_OP_CSVAR_RR:
@@ -78149,13 +81612,13 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
name = DUK_TVAL_GET_STRING(tv1);
DUK_ASSERT(name != NULL);
act = thr->callstack_curr;
- (void) duk_js_getvar_activation(thr, act, name, 1 /*throw*/); /* -> [... val this] */
+ (void) duk_js_getvar_activation(thr, act, name, 1 /*throw*/); /* -> [... val this] */
idx = (duk_uint_fast_t) DUK_DEC_A(ins);
/* Could add direct value stack handling. */
- duk_replace(thr, (duk_idx_t) (idx + 1)); /* 'this' binding */
- duk_replace(thr, (duk_idx_t) idx); /* variable value (function, we hope, not checked here) */
+ duk_replace(thr, (duk_idx_t) (idx + 1)); /* 'this' binding */
+ duk_replace(thr, (duk_idx_t) idx); /* variable value (function, we hope, not checked here) */
break;
}
@@ -78170,7 +81633,9 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
*/
DUK_DDD(DUK_DDDPRINT("CLOSURE to target register %ld, fnum %ld (count %ld)",
- (long) DUK_DEC_A(ins), (long) DUK_DEC_BC(ins), (long) DUK_HCOMPFUNC_GET_FUNCS_COUNT(thr->heap, DUK__FUN())));
+ (long) DUK_DEC_A(ins),
+ (long) DUK_DEC_BC(ins),
+ (long) DUK_HCOMPFUNC_GET_FUNCS_COUNT(thr->heap, DUK__FUN())));
DUK_ASSERT_DISABLE(bc >= 0); /* unsigned */
DUK_ASSERT((duk_uint_t) bc < (duk_uint_t) DUK_HCOMPFUNC_GET_FUNCS_COUNT(thr->heap, DUK__FUN()));
@@ -78181,8 +81646,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_ASSERT(fun_temp != NULL);
DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC(fun_temp));
- DUK_DDD(DUK_DDDPRINT("CLOSURE: function template is: %p -> %!O",
- (void *) fun_temp, (duk_heaphdr *) fun_temp));
+ DUK_DDD(
+ DUK_DDDPRINT("CLOSURE: function template is: %p -> %!O", (void *) fun_temp, (duk_heaphdr *) fun_temp));
if (act->lex_env == NULL) {
DUK_ASSERT(act->var_env == NULL);
@@ -78196,11 +81661,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
* new variable declaration environment, so only lex_env
* matters here.
*/
- duk_js_push_closure(thr,
- (duk_hcompfunc *) fun_temp,
- act->var_env,
- act->lex_env,
- 1 /*add_auto_proto*/);
+ duk_js_push_closure(thr, (duk_hcompfunc *) fun_temp, act->var_env, act->lex_env, 1 /*add_auto_proto*/);
DUK__REPLACE_TOP_A_BREAK();
}
@@ -78215,8 +81676,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_ASSERT(name != NULL);
act = thr->callstack_curr;
DUK_ASSERT(act != NULL);
- (void) duk_js_getvar_activation(thr, act, name, 1 /*throw*/); /* -> [... val this] */
- duk_pop_unsafe(thr); /* 'this' binding is not needed here */
+ (void) duk_js_getvar_activation(thr, act, name, 1 /*throw*/); /* -> [... val this] */
+ duk_pop_unsafe(thr); /* 'this' binding is not needed here */
DUK__REPLACE_TOP_A_BREAK();
}
@@ -78234,7 +81695,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
* should be reworked.
*/
- tv1 = DUK__REGP_A(ins); /* val */
+ tv1 = DUK__REGP_A(ins); /* val */
act = thr->callstack_curr;
duk_js_putvar_activation(thr, act, name, tv1, DUK__STRICT());
break;
@@ -78264,7 +81725,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
break;
}
-#define DUK__RETURN_SHARED() do { \
+#define DUK__RETURN_SHARED() \
+ do { \
duk_small_uint_t ret_result; \
/* duk__handle_return() is guaranteed never to throw, except \
* for potential out-of-memory situations which will then \
@@ -78283,14 +81745,14 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_RETCONST:
case DUK_OP_RETCONSTN:
case DUK_OP_RETUNDEF: {
- /* BC -> return value reg/const */
+ /* BC -> return value reg/const */
DUK__SYNC_AND_NULL_CURR_PC();
if (op == DUK_OP_RETREG) {
duk_push_tval(thr, DUK__REGP_BC(ins));
} else if (op == DUK_OP_RETUNDEF) {
- DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* valstack policy */
+ DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top)); /* valstack policy */
thr->valstack_top++;
} else {
DUK_ASSERT(op == DUK_OP_RETCONST || op == DUK_OP_RETCONSTN);
@@ -78299,7 +81761,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK__RETURN_SHARED();
}
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_RETREG: {
duk_tval *tv;
@@ -78329,18 +81791,18 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_TVAL_SET_TVAL(thr->valstack_top, tv);
#if defined(DUK_USE_REFERENCE_COUNTING)
/* Without refcounting only RETCONSTN is used. */
- DUK_ASSERT(!DUK_TVAL_IS_HEAP_ALLOCATED(tv)); /* no INCREF for this constant */
+ DUK_ASSERT(!DUK_TVAL_IS_HEAP_ALLOCATED(tv)); /* no INCREF for this constant */
#endif
thr->valstack_top++;
DUK__RETURN_SHARED();
}
case DUK_OP_RETUNDEF: {
DUK__SYNC_AND_NULL_CURR_PC();
- thr->valstack_top++; /* value at valstack top is already undefined by valstack policy */
+ thr->valstack_top++; /* value at valstack top is already undefined by valstack policy */
DUK_ASSERT(DUK_TVAL_IS_UNDEFINED(thr->valstack_top));
DUK__RETURN_SHARED();
}
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
case DUK_OP_LABEL: {
duk_activation *act;
@@ -78353,8 +81815,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_ASSERT(cat != NULL);
cat->flags = (duk_uint32_t) (DUK_CAT_TYPE_LABEL | (bc << DUK_CAT_LABEL_SHIFT));
- cat->pc_base = (duk_instr_t *) curr_pc; /* pre-incremented, points to first jump slot */
- cat->idx_base = 0; /* unused for label */
+ cat->pc_base = (duk_instr_t *) curr_pc; /* pre-incremented, points to first jump slot */
+ cat->idx_base = 0; /* unused for label */
cat->h_varname = NULL;
act = thr->callstack_curr;
@@ -78364,10 +81826,13 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_DDD(DUK_DDDPRINT("LABEL catcher: flags=0x%08lx, pc_base=%ld, "
"idx_base=%ld, h_varname=%!O, label_id=%ld",
- (long) cat->flags, (long) cat->pc_base,
- (long) cat->idx_base, (duk_heaphdr *) cat->h_varname, (long) DUK_CAT_GET_LABEL(cat)));
+ (long) cat->flags,
+ (long) cat->pc_base,
+ (long) cat->idx_base,
+ (duk_heaphdr *) cat->h_varname,
+ (long) DUK_CAT_GET_LABEL(cat)));
- curr_pc += 2; /* skip jump slots */
+ curr_pc += 2; /* skip jump slots */
break;
}
@@ -78409,7 +81874,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
/* XXX: move to helper, too large to be inline here */
case DUK_OP_TRYCATCH: {
duk__handle_op_trycatch(thr, ins, curr_pc);
- curr_pc += 2; /* skip jump slots */
+ curr_pc += 2; /* skip jump slots */
break;
}
@@ -78454,8 +81919,8 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
(duk_tval *) duk_get_tval(thr, -1)));
#if defined(DUK_USE_AUGMENT_ERROR_THROW)
duk_err_augment_error_throw(thr);
- DUK_DDD(DUK_DDDPRINT("THROW ERROR (BYTECODE): %!dT (after throw augment)",
- (duk_tval *) duk_get_tval(thr, -1)));
+ DUK_DDD(
+ DUK_DDDPRINT("THROW ERROR (BYTECODE): %!dT (after throw augment)", (duk_tval *) duk_get_tval(thr, -1)));
#endif
duk_err_setup_ljstate1(thr, DUK_LJ_TYPE_THROW, DUK_GET_TVAL_NEGIDX(thr, -1));
@@ -78463,7 +81928,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk_err_check_debugger_integration(thr);
#endif
- DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* always in executor */
+ DUK_ASSERT(thr->heap->lj.jmpbuf_ptr != NULL); /* always in executor */
duk_err_longjmp(thr);
DUK_UNREACHABLE();
break;
@@ -78500,20 +81965,19 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_TVAL_SET_TVAL(&tv_tmp2, tv2);
tv3 = DUK__REGP(a);
DUK_TVAL_SET_TVAL(tv1, tv3);
- DUK_TVAL_INCREF(thr, tv1); /* no side effects */
- DUK_TVAL_SET_UNDEFINED(tv2); /* no need for incref */
+ DUK_TVAL_INCREF(thr, tv1); /* no side effects */
+ DUK_TVAL_SET_UNDEFINED(tv2); /* no need for incref */
DUK_TVAL_DECREF(thr, &tv_tmp1);
DUK_TVAL_DECREF(thr, &tv_tmp2);
#endif
break;
}
-
- /* XXX: in some cases it's faster NOT to reuse the value
- * stack but rather copy the arguments on top of the stack
- * (mainly when the calling value stack is large and the value
- * stack resize would be large).
- */
+ /* XXX: in some cases it's faster NOT to reuse the value
+ * stack but rather copy the arguments on top of the stack
+ * (mainly when the calling value stack is large and the value
+ * stack resize would be large).
+ */
case DUK_OP_CALL0:
case DUK_OP_CALL1:
@@ -78674,7 +82138,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
}
count = (duk_small_uint_fast_t) DUK_DEC_C(ins);
- DUK_ASSERT(count > 0); /* compiler guarantees */
+ DUK_ASSERT(count > 0); /* compiler guarantees */
idx_end = idx + count;
#if defined(DUK_USE_EXEC_INDIRECT_BOUND_CHECK)
@@ -78698,11 +82162,10 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
/* XXX: faster initialization (direct access or better primitives) */
duk_dup(thr, (duk_idx_t) idx);
duk_dup(thr, (duk_idx_t) (idx + 1));
- duk_def_prop(thr, obj_idx, DUK_DEFPROP_HAVE_VALUE |
- DUK_DEFPROP_FORCE |
- DUK_DEFPROP_SET_WRITABLE |
- DUK_DEFPROP_SET_ENUMERABLE |
- DUK_DEFPROP_SET_CONFIGURABLE);
+ duk_def_prop(thr,
+ obj_idx,
+ DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_FORCE | DUK_DEFPROP_SET_WRITABLE |
+ DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE);
idx += 2;
} while (idx < idx_end);
break;
@@ -78737,7 +82200,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
}
count = (duk_small_uint_fast_t) DUK_DEC_C(ins);
- DUK_ASSERT(count > 0 + 1); /* compiler guarantees */
+ DUK_ASSERT(count > 0 + 1); /* compiler guarantees */
idx_end = idx + count;
#if defined(DUK_USE_EXEC_INDIRECT_BOUND_CHECK)
@@ -78864,7 +82327,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
duk_push_new_target(thr);
DUK__REPLACE_TOP_BC_BREAK();
}
-#endif /* DUK_USE_ES6 */
+#endif /* DUK_USE_ES6 */
#if !defined(DUK_USE_EXEC_PREFER_SIZE)
#if !defined(DUK_USE_ES7_EXP_OPERATOR)
@@ -78927,16 +82390,16 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
case DUK_OP_UNUSED253:
case DUK_OP_UNUSED254:
case DUK_OP_UNUSED255:
- /* Force all case clauses to map to an actual handler
- * so that the compiler can emit a jump without a bounds
- * check: the switch argument is a duk_uint8_t so that
- * the compiler may be able to figure it out. This is
- * a small detail and obviously compiler dependent.
- */
- /* default: clause omitted on purpose */
-#else /* DUK_USE_EXEC_PREFER_SIZE */
+ /* Force all case clauses to map to an actual handler
+ * so that the compiler can emit a jump without a bounds
+ * check: the switch argument is a duk_uint8_t so that
+ * the compiler may be able to figure it out. This is
+ * a small detail and obviously compiler dependent.
+ */
+ /* default: clause omitted on purpose */
+#else /* DUK_USE_EXEC_PREFER_SIZE */
default:
-#endif /* DUK_USE_EXEC_PREFER_SIZE */
+#endif /* DUK_USE_EXEC_PREFER_SIZE */
{
/* Default case catches invalid/unsupported opcodes. */
DUK_D(DUK_DPRINT("invalid opcode: %ld - %!I", (long) op, ins));
@@ -78944,7 +82407,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
break;
}
- } /* end switch */
+ } /* end switch */
continue;
@@ -78955,10 +82418,10 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
*/
#if defined(DUK_USE_EXEC_PREFER_SIZE)
- replace_top_a:
+ replace_top_a:
DUK__REPLACE_TO_TVPTR(thr, DUK__REGP_A(ins));
continue;
- replace_top_bc:
+ replace_top_bc:
DUK__REPLACE_TO_TVPTR(thr, DUK__REGP_BC(ins));
continue;
#endif
@@ -78966,7 +82429,7 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
DUK_WO_NORETURN(return;);
#if !defined(DUK_USE_VERBOSE_EXECUTOR_ERRORS)
- internal_error:
+internal_error:
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return;);
#endif
@@ -78991,7 +82454,6 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
#undef DUK__GETPROP_BODY
#undef DUK__GE_BODY
#undef DUK__GT_BODY
-#undef DUK__INLINE_PERF
#undef DUK__INSTOF_BODY
#undef DUK__INTERNAL_ERROR
#undef DUK__INT_NOACTION
@@ -79007,7 +82469,6 @@ DUK_LOCAL DUK_NOINLINE DUK_HOT void duk__js_execute_bytecode_inner(duk_hthread *
#undef DUK__MASK_BC
#undef DUK__MASK_C
#undef DUK__NEQ_BODY
-#undef DUK__NOINLINE_PERF
#undef DUK__PUTPROP_BODY
#undef DUK__RCBIT_B
#undef DUK__RCBIT_C
@@ -79157,6 +82618,7 @@ DUK_INTERNAL duk_bool_t duk_js_toboolean(duk_tval *tv) {
}
}
DUK_UNREACHABLE();
+ DUK_WO_UNREACHABLE(return 0;);
}
/*
@@ -79198,19 +82660,10 @@ DUK_LOCAL duk_double_t duk__tonumber_string_raw(duk_hthread *thr) {
/* Quite lenient, e.g. allow empty as zero, but don't allow trailing
* garbage.
*/
- s2n_flags = DUK_S2N_FLAG_TRIM_WHITE |
- DUK_S2N_FLAG_ALLOW_EXP |
- DUK_S2N_FLAG_ALLOW_PLUS |
- DUK_S2N_FLAG_ALLOW_MINUS |
- DUK_S2N_FLAG_ALLOW_INF |
- DUK_S2N_FLAG_ALLOW_FRAC |
- DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
- DUK_S2N_FLAG_ALLOW_EMPTY_FRAC |
- DUK_S2N_FLAG_ALLOW_EMPTY_AS_ZERO |
- DUK_S2N_FLAG_ALLOW_LEADING_ZERO |
- DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT |
- DUK_S2N_FLAG_ALLOW_AUTO_OCT_INT |
- DUK_S2N_FLAG_ALLOW_AUTO_BIN_INT;
+ s2n_flags = DUK_S2N_FLAG_TRIM_WHITE | DUK_S2N_FLAG_ALLOW_EXP | DUK_S2N_FLAG_ALLOW_PLUS | DUK_S2N_FLAG_ALLOW_MINUS |
+ DUK_S2N_FLAG_ALLOW_INF | DUK_S2N_FLAG_ALLOW_FRAC | DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
+ DUK_S2N_FLAG_ALLOW_EMPTY_FRAC | DUK_S2N_FLAG_ALLOW_EMPTY_AS_ZERO | DUK_S2N_FLAG_ALLOW_LEADING_ZERO |
+ DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT | DUK_S2N_FLAG_ALLOW_AUTO_OCT_INT | DUK_S2N_FLAG_ALLOW_AUTO_BIN_INT;
duk_numconv_parse(thr, 10 /*radix*/, s2n_flags);
@@ -79220,9 +82673,9 @@ DUK_LOCAL duk_double_t duk__tonumber_string_raw(duk_hthread *thr) {
#else
thr->valstack_top--;
DUK_ASSERT(DUK_TVAL_IS_NUMBER(thr->valstack_top));
- DUK_ASSERT(DUK_TVAL_IS_DOUBLE(thr->valstack_top)); /* no fastint conversion in numconv now */
+ DUK_ASSERT(DUK_TVAL_IS_DOUBLE(thr->valstack_top)); /* no fastint conversion in numconv now */
DUK_ASSERT(!DUK_TVAL_NEEDS_REFCOUNT_UPDATE(thr->valstack_top));
- d = DUK_TVAL_GET_DOUBLE(thr->valstack_top); /* assumes not a fastint */
+ d = DUK_TVAL_GET_DOUBLE(thr->valstack_top); /* assumes not a fastint */
DUK_TVAL_SET_UNDEFINED(thr->valstack_top);
#endif
@@ -79261,11 +82714,11 @@ DUK_INTERNAL duk_double_t duk_js_tonumber(duk_hthread *thr, duk_tval *tv) {
duk_push_hstring(thr, h);
return duk__tonumber_string_raw(thr);
}
- case DUK_TAG_BUFFER: /* plain buffer treated like object */
+ case DUK_TAG_BUFFER: /* plain buffer treated like object */
case DUK_TAG_OBJECT: {
duk_double_t d;
duk_push_tval(thr, tv);
- duk_to_primitive(thr, -1, DUK_HINT_NUMBER); /* 'tv' becomes invalid */
+ duk_to_primitive(thr, -1, DUK_HINT_NUMBER); /* 'tv' becomes invalid */
/* recursive call for a primitive value (guaranteed not to cause second
* recursion).
@@ -79298,6 +82751,7 @@ DUK_INTERNAL duk_double_t duk_js_tonumber(duk_hthread *thr, duk_tval *tv) {
}
DUK_UNREACHABLE();
+ DUK_WO_UNREACHABLE(return 0.0;);
}
/*
@@ -79319,7 +82773,7 @@ DUK_INTERNAL duk_double_t duk_js_tointeger_number(duk_double_t x) {
*/
return duk_double_trunc_towards_zero(x);
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
/* NaN and Infinity have the same exponent so it's a cheap
* initial check for the rare path.
*/
@@ -79332,12 +82786,12 @@ DUK_INTERNAL duk_double_t duk_js_tointeger_number(duk_double_t x) {
} else {
return duk_double_trunc_towards_zero(x);
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
}
DUK_INTERNAL duk_double_t duk_js_tointeger(duk_hthread *thr, duk_tval *tv) {
/* XXX: fastint */
- duk_double_t d = duk_js_tonumber(thr, tv); /* invalidates tv */
+ duk_double_t d = duk_js_tonumber(thr, tv); /* invalidates tv */
return duk_js_tointeger_number(d);
}
@@ -79347,11 +82801,11 @@ DUK_INTERNAL duk_double_t duk_js_tointeger(duk_hthread *thr, duk_tval *tv) {
/* combined algorithm matching E5 Sections 9.5 and 9.6 */
DUK_LOCAL duk_double_t duk__toint32_touint32_helper(duk_double_t x, duk_bool_t is_toint32) {
-#if defined (DUK_USE_PREFER_SIZE)
+#if defined(DUK_USE_PREFER_SIZE)
duk_small_int_t c;
#endif
-#if defined (DUK_USE_PREFER_SIZE)
+#if defined(DUK_USE_PREFER_SIZE)
c = (duk_small_int_t) DUK_FPCLASSIFY(x);
if (c == DUK_FP_NAN || c == DUK_FP_ZERO || c == DUK_FP_INFINITE) {
return 0.0;
@@ -79369,18 +82823,18 @@ DUK_LOCAL duk_double_t duk__toint32_touint32_helper(duk_double_t x, duk_bool_t i
* differs from what Javascript wants (see Section 9.6).
*/
- x = DUK_FMOD(x, DUK_DOUBLE_2TO32); /* -> x in ]-2**32, 2**32[ */
+ x = DUK_FMOD(x, DUK_DOUBLE_2TO32); /* -> x in ]-2**32, 2**32[ */
if (x < 0.0) {
x += DUK_DOUBLE_2TO32;
}
- DUK_ASSERT(x >= 0 && x < DUK_DOUBLE_2TO32); /* -> x in [0, 2**32[ */
+ DUK_ASSERT(x >= 0 && x < DUK_DOUBLE_2TO32); /* -> x in [0, 2**32[ */
if (is_toint32) {
if (x >= DUK_DOUBLE_2TO31) {
/* x in [2**31, 2**32[ */
- x -= DUK_DOUBLE_2TO32; /* -> x in [-2**31,2**31[ */
+ x -= DUK_DOUBLE_2TO32; /* -> x in [-2**31,2**31[ */
}
}
@@ -79396,15 +82850,14 @@ DUK_INTERNAL duk_int32_t duk_js_toint32(duk_hthread *thr, duk_tval *tv) {
}
#endif
- d = duk_js_tonumber(thr, tv); /* invalidates tv */
+ d = duk_js_tonumber(thr, tv); /* invalidates tv */
d = duk__toint32_touint32_helper(d, 1);
DUK_ASSERT(DUK_FPCLASSIFY(d) == DUK_FP_ZERO || DUK_FPCLASSIFY(d) == DUK_FP_NORMAL);
- DUK_ASSERT(d >= -2147483648.0 && d <= 2147483647.0); /* [-0x80000000,0x7fffffff] */
- DUK_ASSERT(d == ((duk_double_t) ((duk_int32_t) d))); /* whole, won't clip */
+ DUK_ASSERT(d >= -2147483648.0 && d <= 2147483647.0); /* [-0x80000000,0x7fffffff] */
+ DUK_ASSERT(duk_double_equals(d, (duk_double_t) ((duk_int32_t) d))); /* whole, won't clip */
return (duk_int32_t) d;
}
-
DUK_INTERNAL duk_uint32_t duk_js_touint32(duk_hthread *thr, duk_tval *tv) {
duk_double_t d;
@@ -79414,13 +82867,12 @@ DUK_INTERNAL duk_uint32_t duk_js_touint32(duk_hthread *thr, duk_tval *tv) {
}
#endif
- d = duk_js_tonumber(thr, tv); /* invalidates tv */
+ d = duk_js_tonumber(thr, tv); /* invalidates tv */
d = duk__toint32_touint32_helper(d, 0);
DUK_ASSERT(DUK_FPCLASSIFY(d) == DUK_FP_ZERO || DUK_FPCLASSIFY(d) == DUK_FP_NORMAL);
- DUK_ASSERT(d >= 0.0 && d <= 4294967295.0); /* [0x00000000, 0xffffffff] */
- DUK_ASSERT(d == ((duk_double_t) ((duk_uint32_t) d))); /* whole, won't clip */
+ DUK_ASSERT(d >= 0.0 && d <= 4294967295.0); /* [0x00000000, 0xffffffff] */
+ DUK_ASSERT(duk_double_equals(d, (duk_double_t) ((duk_uint32_t) d))); /* whole, won't clip */
return (duk_uint32_t) d;
-
}
DUK_INTERNAL duk_uint16_t duk_js_touint16(duk_hthread *thr, duk_tval *tv) {
@@ -79470,14 +82922,14 @@ DUK_LOCAL duk_bool_t duk__js_equals_number(duk_double_t x, duk_double_t y) {
return 1;
}
return 0;
-#else /* DUK_USE_PARANOID_MATH */
+#else /* DUK_USE_PARANOID_MATH */
/* Better equivalent algorithm. If the compiler is compliant, C and
* ECMAScript semantics are identical for this particular comparison.
* In particular, NaNs must never compare equal and zeroes must compare
* equal regardless of sign. Could also use a macro, but this inlines
* already nicely (no difference on gcc, for instance).
*/
- if (x == y) {
+ if (duk_double_equals(x, y)) {
/* IEEE requires that NaNs compare false */
DUK_ASSERT(DUK_FPCLASSIFY(x) != DUK_FP_NAN);
DUK_ASSERT(DUK_FPCLASSIFY(y) != DUK_FP_NAN);
@@ -79490,7 +82942,7 @@ DUK_LOCAL duk_bool_t duk__js_equals_number(duk_double_t x, duk_double_t y) {
DUK_ASSERT(!(DUK_FPCLASSIFY(x) == DUK_FP_ZERO && DUK_FPCLASSIFY(y) == DUK_FP_ZERO));
return 0;
}
-#endif /* DUK_USE_PARANOID_MATH */
+#endif /* DUK_USE_PARANOID_MATH */
}
DUK_LOCAL duk_bool_t duk__js_samevalue_number(duk_double_t x, duk_double_t y) {
@@ -79520,11 +82972,11 @@ DUK_LOCAL duk_bool_t duk__js_samevalue_number(duk_double_t x, duk_double_t y) {
*/
return (x == y);
-#else /* DUK_USE_PARANOID_MATH */
+#else /* DUK_USE_PARANOID_MATH */
duk_small_int_t cx = (duk_small_int_t) DUK_FPCLASSIFY(x);
duk_small_int_t cy = (duk_small_int_t) DUK_FPCLASSIFY(y);
- if (x == y) {
+ if (duk_double_equals(x, y)) {
/* IEEE requires that NaNs compare false */
DUK_ASSERT(DUK_FPCLASSIFY(x) != DUK_FP_NAN);
DUK_ASSERT(DUK_FPCLASSIFY(y) != DUK_FP_NAN);
@@ -79555,7 +83007,7 @@ DUK_LOCAL duk_bool_t duk__js_samevalue_number(duk_double_t x, duk_double_t y) {
}
return 0;
}
-#endif /* DUK_USE_PARANOID_MATH */
+#endif /* DUK_USE_PARANOID_MATH */
}
DUK_INTERNAL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_small_uint_t flags) {
@@ -79581,10 +83033,9 @@ DUK_INTERNAL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, d
} else {
return 0;
}
- }
- else
+ } else
#endif
- if (DUK_TVAL_IS_NUMBER(tv_x) && DUK_TVAL_IS_NUMBER(tv_y)) {
+ if (DUK_TVAL_IS_NUMBER(tv_x) && DUK_TVAL_IS_NUMBER(tv_y)) {
duk_double_t d1, d2;
/* Catches both doubles and cases where only one argument is
@@ -79649,7 +83100,7 @@ DUK_INTERNAL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, d
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_x));
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv_y));
DUK_UNREACHABLE();
- return 0;
+ DUK_WO_UNREACHABLE(return 0;);
}
}
}
@@ -79658,7 +83109,7 @@ DUK_INTERNAL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, d
return 0;
}
- DUK_ASSERT(flags == 0); /* non-strict equality from here on */
+ DUK_ASSERT(flags == 0); /* non-strict equality from here on */
/*
* Types are different; various cases for non-strict comparison
@@ -79715,34 +83166,29 @@ DUK_INTERNAL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, d
}
/* String-number-symbol/object -> coerce object to primitive (apparently without hint), then try again. */
- if ((type_mask_x & (DUK_TYPE_MASK_STRING | DUK_TYPE_MASK_NUMBER)) &&
- (type_mask_y & DUK_TYPE_MASK_OBJECT)) {
+ if ((type_mask_x & (DUK_TYPE_MASK_STRING | DUK_TYPE_MASK_NUMBER)) && (type_mask_y & DUK_TYPE_MASK_OBJECT)) {
/* No symbol check needed because symbols and strings are accepted. */
duk_push_tval(thr, tv_x);
duk_push_tval(thr, tv_y);
- duk_to_primitive(thr, -1, DUK_HINT_NONE); /* apparently no hint? */
+ duk_to_primitive(thr, -1, DUK_HINT_NONE); /* apparently no hint? */
goto recursive_call;
}
- if ((type_mask_x & DUK_TYPE_MASK_OBJECT) &&
- (type_mask_y & (DUK_TYPE_MASK_STRING | DUK_TYPE_MASK_NUMBER))) {
+ if ((type_mask_x & DUK_TYPE_MASK_OBJECT) && (type_mask_y & (DUK_TYPE_MASK_STRING | DUK_TYPE_MASK_NUMBER))) {
/* No symbol check needed because symbols and strings are accepted. */
duk_push_tval(thr, tv_x);
duk_push_tval(thr, tv_y);
- duk_to_primitive(thr, -2, DUK_HINT_NONE); /* apparently no hint? */
+ duk_to_primitive(thr, -2, DUK_HINT_NONE); /* apparently no hint? */
goto recursive_call;
}
/* Nothing worked -> not equal. */
return 0;
- recursive_call:
+recursive_call:
/* Shared code path to call the helper again with arguments on stack top. */
{
duk_bool_t rc;
- rc = duk_js_equals_helper(thr,
- DUK_GET_TVAL_NEGIDX(thr, -2),
- DUK_GET_TVAL_NEGIDX(thr, -1),
- 0 /*flags:nonstrict*/);
+ rc = duk_js_equals_helper(thr, DUK_GET_TVAL_NEGIDX(thr, -2), DUK_GET_TVAL_NEGIDX(thr, -1), 0 /*flags:nonstrict*/);
duk_pop_2_unsafe(thr);
return rc;
}
@@ -79759,7 +83205,10 @@ DUK_INTERNAL duk_bool_t duk_js_equals_helper(duk_hthread *thr, duk_tval *tv_x, d
* needs to push stuff on the stack anyway...
*/
-DUK_INTERNAL duk_small_int_t duk_js_data_compare(const duk_uint8_t *buf1, const duk_uint8_t *buf2, duk_size_t len1, duk_size_t len2) {
+DUK_INTERNAL duk_small_int_t duk_js_data_compare(const duk_uint8_t *buf1,
+ const duk_uint8_t *buf2,
+ duk_size_t len1,
+ duk_size_t len2) {
duk_size_t prefix_len;
duk_small_int_t rc;
@@ -79768,9 +83217,7 @@ DUK_INTERNAL duk_small_int_t duk_js_data_compare(const duk_uint8_t *buf1, const
/* duk_memcmp() is guaranteed to return zero (equal) for zero length
* inputs.
*/
- rc = duk_memcmp_unsafe((const void *) buf1,
- (const void *) buf2,
- (size_t) prefix_len);
+ rc = duk_memcmp_unsafe((const void *) buf1, (const void *) buf2, (size_t) prefix_len);
if (rc < 0) {
return -1;
@@ -79812,7 +83259,7 @@ DUK_INTERNAL duk_small_int_t duk_js_string_compare(duk_hstring *h1, duk_hstring
(duk_size_t) DUK_HSTRING_GET_BYTELEN(h2));
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_INTERNAL duk_small_int_t duk_js_buffer_compare(duk_heap *heap, duk_hbuffer *h1, duk_hbuffer *h2) {
/* Similar to String comparison. */
@@ -79849,47 +83296,47 @@ DUK_LOCAL duk_bool_t duk__compare_number(duk_bool_t retval, duk_double_t d1, duk
s2 = (duk_small_int_t) DUK_SIGNBIT(d2);
if (c1 == DUK_FP_NAN || c2 == DUK_FP_NAN) {
- return 0; /* Always false, regardless of negation. */
+ return 0; /* Always false, regardless of negation. */
}
if (c1 == DUK_FP_ZERO && c2 == DUK_FP_ZERO) {
/* For all combinations: +0 < +0, +0 < -0, -0 < +0, -0 < -0,
* steps e, f, and g.
*/
- return retval; /* false */
+ return retval; /* false */
}
if (d1 == d2) {
- return retval; /* false */
+ return retval; /* false */
}
if (c1 == DUK_FP_INFINITE && s1 == 0) {
/* x == +Infinity */
- return retval; /* false */
+ return retval; /* false */
}
if (c2 == DUK_FP_INFINITE && s2 == 0) {
/* y == +Infinity */
- return retval ^ 1; /* true */
+ return retval ^ 1; /* true */
}
if (c2 == DUK_FP_INFINITE && s2 != 0) {
/* y == -Infinity */
- return retval; /* false */
+ return retval; /* false */
}
if (c1 == DUK_FP_INFINITE && s1 != 0) {
/* x == -Infinity */
- return retval ^ 1; /* true */
+ return retval ^ 1; /* true */
}
if (d1 < d2) {
- return retval ^ 1; /* true */
+ return retval ^ 1; /* true */
}
- return retval; /* false */
+ return retval; /* false */
}
-#else /* DUK_USE_PARANOID_MATH */
+#else /* DUK_USE_PARANOID_MATH */
DUK_LOCAL duk_bool_t duk__compare_number(duk_bool_t retval, duk_double_t d1, duk_double_t d2) {
/* This comparison tree relies doesn't match the exact steps in
* E5 Section 11.8.5 but should produce the same results. The
@@ -79926,39 +83373,35 @@ DUK_LOCAL duk_bool_t duk__compare_number(duk_bool_t retval, duk_double_t d1, duk
* results in false return (see e.g. Section
* 11.8.3) - hence special treatment here.
*/
- return 0; /* zero regardless of negation */
+ return 0; /* zero regardless of negation */
} else {
return retval;
}
}
}
}
-#endif /* DUK_USE_PARANOID_MATH */
+#endif /* DUK_USE_PARANOID_MATH */
DUK_INTERNAL duk_bool_t duk_js_compare_helper(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv_y, duk_small_uint_t flags) {
duk_double_t d1, d2;
duk_small_int_t rc;
duk_bool_t retval;
- DUK_ASSERT(DUK_COMPARE_FLAG_NEGATE == 1); /* Rely on this flag being lowest. */
+ DUK_ASSERT(DUK_COMPARE_FLAG_NEGATE == 1); /* Rely on this flag being lowest. */
retval = flags & DUK_COMPARE_FLAG_NEGATE;
DUK_ASSERT(retval == 0 || retval == 1);
/* Fast path for fastints */
#if defined(DUK_USE_FASTINT)
if (DUK_LIKELY(DUK_TVAL_IS_FASTINT(tv_x) && DUK_TVAL_IS_FASTINT(tv_y))) {
- return duk__compare_fastint(retval,
- DUK_TVAL_GET_FASTINT(tv_x),
- DUK_TVAL_GET_FASTINT(tv_y));
+ return duk__compare_fastint(retval, DUK_TVAL_GET_FASTINT(tv_x), DUK_TVAL_GET_FASTINT(tv_y));
}
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
/* Fast path for numbers (one of which may be a fastint) */
#if !defined(DUK_USE_PREFER_SIZE)
if (DUK_LIKELY(DUK_TVAL_IS_NUMBER(tv_x) && DUK_TVAL_IS_NUMBER(tv_y))) {
- return duk__compare_number(retval,
- DUK_TVAL_GET_NUMBER(tv_x),
- DUK_TVAL_GET_NUMBER(tv_y));
+ return duk__compare_number(retval, DUK_TVAL_GET_NUMBER(tv_x), DUK_TVAL_GET_NUMBER(tv_y));
}
#endif
@@ -80025,7 +83468,7 @@ DUK_INTERNAL duk_bool_t duk_js_compare_helper(duk_hthread *thr, duk_tval *tv_x,
thr->valstack_top -= 2;
tv_x = thr->valstack_top;
tv_y = tv_x + 1;
- DUK_TVAL_SET_UNDEFINED(tv_x); /* Value stack policy */
+ DUK_TVAL_SET_UNDEFINED(tv_x); /* Value stack policy */
DUK_TVAL_SET_UNDEFINED(tv_y);
#endif
@@ -80079,8 +83522,8 @@ DUK_LOCAL duk_bool_t duk__js_instanceof_helper(duk_hthread *thr, duk_tval *tv_x,
if (!skip_sym_check) {
if (duk_get_method_stridx(thr, -1, DUK_STRIDX_WELLKNOWN_SYMBOL_HAS_INSTANCE)) {
/* [ ... lhs rhs func ] */
- duk_insert(thr, -3); /* -> [ ... func lhs rhs ] */
- duk_swap_top(thr, -2); /* -> [ ... func rhs(this) lhs ] */
+ duk_insert(thr, -3); /* -> [ ... func lhs rhs ] */
+ duk_swap_top(thr, -2); /* -> [ ... func rhs(this) lhs ] */
duk_call_method(thr, 1);
return duk_to_boolean_top_pop(thr);
}
@@ -80112,7 +83555,7 @@ DUK_LOCAL duk_bool_t duk__js_instanceof_helper(duk_hthread *thr, duk_tval *tv_x,
if (DUK_HOBJECT_HAS_BOUNDFUNC(func)) {
duk_push_tval(thr, &((duk_hboundfunc *) (void *) func)->target);
duk_replace(thr, -2);
- func = duk_require_hobject(thr, -1); /* lightfunc throws */
+ func = duk_require_hobject(thr, -1); /* lightfunc throws */
/* Rely on Function.prototype.bind() never creating bound
* functions whose target is not proper.
@@ -80152,19 +83595,19 @@ DUK_LOCAL duk_bool_t duk__js_instanceof_helper(duk_hthread *thr, duk_tval *tv_x,
DUK_ASSERT(val != NULL);
break;
case DUK_TAG_OBJECT:
- skip_first = 1; /* Ignore object itself on first round. */
+ skip_first = 1; /* Ignore object itself on first round. */
val = DUK_TVAL_GET_OBJECT(tv);
DUK_ASSERT(val != NULL);
break;
default:
goto pop2_and_false;
}
- DUK_ASSERT(val != NULL); /* Loop doesn't actually rely on this. */
+ DUK_ASSERT(val != NULL); /* Loop doesn't actually rely on this. */
/* Look up .prototype of rval. Leave it on the value stack in case it
* has been virtualized (e.g. getter, Proxy trap).
*/
- duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_PROTOTYPE); /* -> [ ... lval rval rval.prototype ] */
+ duk_get_prop_stridx_short(thr, -1, DUK_STRIDX_PROTOTYPE); /* -> [ ... lval rval rval.prototype ] */
#if defined(DUK_USE_VERBOSE_ERRORS)
proto = duk_get_hobject(thr, -1);
if (proto == NULL) {
@@ -80213,30 +83656,28 @@ DUK_LOCAL duk_bool_t duk__js_instanceof_helper(duk_hthread *thr, duk_tval *tv_x,
val = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, val);
} while (--sanity > 0);
- if (DUK_UNLIKELY(sanity == 0)) {
- DUK_ERROR_RANGE(thr, DUK_STR_PROTOTYPE_CHAIN_LIMIT);
- DUK_WO_NORETURN(return 0;);
- }
- DUK_UNREACHABLE();
+ DUK_ASSERT(sanity == 0);
+ DUK_ERROR_RANGE(thr, DUK_STR_PROTOTYPE_CHAIN_LIMIT);
+ DUK_WO_NORETURN(return 0;);
- pop2_and_false:
+pop2_and_false:
duk_pop_2_unsafe(thr);
return 0;
- pop3_and_false:
+pop3_and_false:
duk_pop_3_unsafe(thr);
return 0;
- pop3_and_true:
+pop3_and_true:
duk_pop_3_unsafe(thr);
return 1;
- error_invalid_rval:
+error_invalid_rval:
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_INSTANCEOF_RVAL);
DUK_WO_NORETURN(return 0;);
#if defined(DUK_USE_VERBOSE_ERRORS)
- error_invalid_rval_noproto:
+error_invalid_rval_noproto:
DUK_ERROR_TYPE(thr, DUK_STR_INVALID_INSTANCEOF_RVAL_NOPROTO);
DUK_WO_NORETURN(return 0;);
#endif
@@ -80288,9 +83729,7 @@ DUK_INTERNAL duk_bool_t duk_js_in(duk_hthread *thr, duk_tval *tv_x, duk_tval *tv
(void) duk_to_property_key_hstring(thr, -2);
- retval = duk_hobject_hasprop(thr,
- DUK_GET_TVAL_NEGIDX(thr, -1),
- DUK_GET_TVAL_NEGIDX(thr, -2));
+ retval = duk_hobject_hasprop(thr, DUK_GET_TVAL_NEGIDX(thr, -1), DUK_GET_TVAL_NEGIDX(thr, -2));
duk_pop_2_unsafe(thr);
return retval;
@@ -80384,6 +83823,26 @@ DUK_INTERNAL duk_small_uint_t duk_js_typeof_stridx(duk_tval *tv_x) {
}
/*
+ * IsArray()
+ */
+
+DUK_INTERNAL duk_bool_t duk_js_isarray_hobject(duk_hobject *h) {
+ DUK_ASSERT(h != NULL);
+#if defined(DUK_USE_ES6_PROXY)
+ h = duk_hobject_resolve_proxy_target(h);
+#endif
+ return (DUK_HOBJECT_GET_CLASS_NUMBER(h) == DUK_HOBJECT_CLASS_ARRAY ? 1 : 0);
+}
+
+DUK_INTERNAL duk_bool_t duk_js_isarray(duk_tval *tv) {
+ DUK_ASSERT(tv != NULL);
+ if (DUK_TVAL_IS_OBJECT(tv)) {
+ return duk_js_isarray_hobject(DUK_TVAL_GET_OBJECT(tv));
+ }
+ return 0;
+}
+
+/*
* Array index and length
*
* Array index: E5 Section 15.4
@@ -80430,7 +83889,7 @@ DUK_INTERNAL duk_uarridx_t duk_js_to_arrayindex_string(const duk_uint8_t *str, d
}
res = 0xfffffffaUL + dig;
DUK_ASSERT(res >= 0xfffffffaUL);
- DUK_ASSERT_DISABLE(res <= 0xffffffffUL); /* range */
+ DUK_ASSERT_DISABLE(res <= 0xffffffffUL); /* range */
} else {
res = res * 10U + dig;
if (DUK_UNLIKELY(res == 0)) {
@@ -80455,7 +83914,7 @@ DUK_INTERNAL duk_uarridx_t duk_js_to_arrayindex_string(const duk_uint8_t *str, d
return res;
- parse_fail:
+parse_fail:
return DUK_HSTRING_NO_ARRAY_INDEX;
}
@@ -80493,7 +83952,7 @@ DUK_INTERNAL duk_uarridx_t duk_js_to_arrayindex_hstring_fast(duk_hstring *h) {
}
return duk_js_to_arrayindex_hstring_fast_known(h);
}
-#endif /* DUK_USE_HSTRING_ARRIDX */
+#endif /* DUK_USE_HSTRING_ARRIDX */
/*
* Identifier access and function closure handling.
*
@@ -80534,10 +83993,10 @@ DUK_INTERNAL duk_uarridx_t duk_js_to_arrayindex_hstring_fast(duk_hstring *h) {
typedef struct {
duk_hobject *env;
- duk_hobject *holder; /* for object-bound identifiers */
- duk_tval *value; /* for register-bound and declarative env identifiers */
- duk_uint_t attrs; /* property attributes for identifier (relevant if value != NULL) */
- duk_bool_t has_this; /* for object-bound identifiers: provide 'this' binding */
+ duk_hobject *holder; /* for object-bound identifiers */
+ duk_tval *value; /* for register-bound and declarative env identifiers */
+ duk_uint_t attrs; /* property attributes for identifier (relevant if value != NULL) */
+ duk_bool_t has_this; /* for object-bound identifiers: provide 'this' binding */
} duk__id_lookup_result;
/*
@@ -80641,7 +84100,7 @@ void duk_js_push_closure(duk_hthread *thr,
DUK_ASSERT(fun_clos != NULL);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) fun_clos) == thr->builtins[DUK_BIDX_FUNCTION_PROTOTYPE]);
- duk_push_hobject(thr, &fun_temp->obj); /* -> [ ... closure template ] */
+ duk_push_hobject(thr, &fun_temp->obj); /* -> [ ... closure template ] */
DUK_ASSERT(DUK_HOBJECT_IS_COMPFUNC((duk_hobject *) fun_clos));
DUK_ASSERT(DUK_HCOMPFUNC_GET_DATA(thr->heap, fun_clos) == NULL);
@@ -80749,9 +84208,9 @@ void duk_js_push_closure(duk_hthread *thr,
}
/* -> [ ... closure template env ] */
- new_env = duk_hdecenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
+ new_env =
+ duk_hdecenv_alloc(thr,
+ DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
DUK_ASSERT(new_env != NULL);
duk_push_hobject(thr, (duk_hobject *) new_env);
@@ -80759,7 +84218,7 @@ void duk_js_push_closure(duk_hthread *thr,
DUK_HOBJECT_SET_PROTOTYPE(thr->heap, (duk_hobject *) new_env, proto);
DUK_HOBJECT_INCREF_ALLOWNULL(thr, proto);
- DUK_ASSERT(new_env->thread == NULL); /* Closed. */
+ DUK_ASSERT(new_env->thread == NULL); /* Closed. */
DUK_ASSERT(new_env->varmap == NULL);
/* It's important that duk_xdef_prop() is a 'raw define' so that any
@@ -80773,8 +84232,8 @@ void duk_js_push_closure(duk_hthread *thr,
*/
(void) duk_get_prop_stridx_short(thr, -2, DUK_STRIDX_NAME);
/* -> [ ... closure template env funcname ] */
- duk_dup_m4(thr); /* -> [ ... closure template env funcname closure ] */
- duk_xdef_prop(thr, -3, DUK_PROPDESC_FLAGS_NONE); /* -> [ ... closure template env ] */
+ duk_dup_m4(thr); /* -> [ ... closure template env funcname closure ] */
+ duk_xdef_prop(thr, -3, DUK_PROPDESC_FLAGS_NONE); /* -> [ ... closure template env ] */
/* env[funcname] = closure */
/* [ ... closure template env ] */
@@ -80786,9 +84245,8 @@ void duk_js_push_closure(duk_hthread *thr,
duk_pop_unsafe(thr);
/* [ ... closure template ] */
- }
- else
-#endif /* DUK_USE_FUNC_NAME_PROPERTY */
+ } else
+#endif /* DUK_USE_FUNC_NAME_PROPERTY */
{
/*
* Other cases (function declaration, anonymous function expression,
@@ -80816,7 +84274,7 @@ void duk_js_push_closure(duk_hthread *thr,
DUK_HCOMPFUNC_SET_LEXENV(thr->heap, fun_clos, outer_lex_env);
DUK_HCOMPFUNC_SET_VARENV(thr->heap, fun_clos, outer_var_env);
- DUK_HOBJECT_INCREF(thr, outer_lex_env); /* NULLs not allowed; asserted on entry */
+ DUK_HOBJECT_INCREF(thr, outer_lex_env); /* NULLs not allowed; asserted on entry */
DUK_HOBJECT_INCREF(thr, outer_var_env);
}
DUK_DDD(DUK_DDDPRINT("closure varenv -> %!ipO, lexenv -> %!ipO",
@@ -80875,7 +84333,7 @@ void duk_js_push_closure(duk_hthread *thr,
DUK_DD(DUK_DDPRINT("closure length defaulted from nargs -> %ld", (long) len_value));
}
- duk_push_uint(thr, len_value); /* [ ... closure template len_value ] */
+ duk_push_uint(thr, len_value); /* [ ... closure template len_value ] */
duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_LENGTH, DUK_PROPDESC_FLAGS_C);
/*
@@ -80895,11 +84353,14 @@ void duk_js_push_closure(duk_hthread *thr,
/* [ ... closure template ] */
if (add_auto_proto) {
- duk_push_object(thr); /* -> [ ... closure template newobj ] */
- duk_dup_m3(thr); /* -> [ ... closure template newobj closure ] */
- duk_xdef_prop_stridx_short(thr, -2, DUK_STRIDX_CONSTRUCTOR, DUK_PROPDESC_FLAGS_WC); /* -> [ ... closure template newobj ] */
- duk_compact(thr, -1); /* compact the prototype */
- duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_PROTOTYPE, DUK_PROPDESC_FLAGS_W); /* -> [ ... closure template ] */
+ duk_push_object(thr); /* -> [ ... closure template newobj ] */
+ duk_dup_m3(thr); /* -> [ ... closure template newobj closure ] */
+ duk_xdef_prop_stridx_short(thr,
+ -2,
+ DUK_STRIDX_CONSTRUCTOR,
+ DUK_PROPDESC_FLAGS_WC); /* -> [ ... closure template newobj ] */
+ duk_compact(thr, -1); /* compact the prototype */
+ duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_PROTOTYPE, DUK_PROPDESC_FLAGS_W); /* -> [ ... closure template ] */
}
/*
@@ -80940,7 +84401,7 @@ void duk_js_push_closure(duk_hthread *thr,
/* [ ... closure template name ] */
DUK_ASSERT(duk_is_string(thr, -1));
DUK_DD(DUK_DDPRINT("setting function instance name to %!T", duk_get_tval(thr, -1)));
- duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_NAME, DUK_PROPDESC_FLAGS_C); /* -> [ ... closure template ] */
+ duk_xdef_prop_stridx_short(thr, -3, DUK_STRIDX_NAME, DUK_PROPDESC_FLAGS_C); /* -> [ ... closure template ] */
} else {
/* Anonymous functions don't have a .name in ES2015, so don't set
* it on the instance either. The instance will then inherit
@@ -80972,10 +84433,8 @@ void duk_js_push_closure(duk_hthread *thr,
DUK_ASSERT(duk_has_prop_stridx(thr, -2, DUK_STRIDX_LENGTH) != 0);
DUK_ASSERT(add_auto_proto == 0 || duk_has_prop_stridx(thr, -2, DUK_STRIDX_PROTOTYPE) != 0);
/* May be missing .name */
- DUK_ASSERT(!DUK_HOBJECT_HAS_STRICT(&fun_clos->obj) ||
- duk_has_prop_stridx(thr, -2, DUK_STRIDX_CALLER) != 0);
- DUK_ASSERT(!DUK_HOBJECT_HAS_STRICT(&fun_clos->obj) ||
- duk_has_prop_stridx(thr, -2, DUK_STRIDX_LC_ARGUMENTS) != 0);
+ DUK_ASSERT(!DUK_HOBJECT_HAS_STRICT(&fun_clos->obj) || duk_has_prop_stridx(thr, -2, DUK_STRIDX_CALLER) != 0);
+ DUK_ASSERT(!DUK_HOBJECT_HAS_STRICT(&fun_clos->obj) || duk_has_prop_stridx(thr, -2, DUK_STRIDX_LC_ARGUMENTS) != 0);
/*
* Finish
@@ -81006,8 +84465,8 @@ DUK_LOCAL void duk__preallocate_env_entries(duk_hthread *thr, duk_hobject *varma
duk_hstring *key;
key = DUK_HOBJECT_E_GET_KEY(thr->heap, varmap, i);
- DUK_ASSERT(key != NULL); /* assume keys are compact in _Varmap */
- DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, varmap, i)); /* assume plain values */
+ DUK_ASSERT(key != NULL); /* assume keys are compact in _Varmap */
+ DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, varmap, i)); /* assume plain values */
/* Predefine as 'undefined' to reserve a property slot.
* This makes the unwind process (where register values
@@ -81024,9 +84483,7 @@ DUK_LOCAL void duk__preallocate_env_entries(duk_hthread *thr, duk_hobject *varma
/* shared helper */
DUK_INTERNAL
-duk_hobject *duk_create_activation_environment_record(duk_hthread *thr,
- duk_hobject *func,
- duk_size_t bottom_byteoff) {
+duk_hobject *duk_create_activation_environment_record(duk_hthread *thr, duk_hobject *func, duk_size_t bottom_byteoff) {
duk_hdecenv *env;
duk_hobject *parent;
duk_hcompfunc *f;
@@ -81042,15 +84499,13 @@ duk_hobject *duk_create_activation_environment_record(duk_hthread *thr,
parent = thr->builtins[DUK_BIDX_GLOBAL_ENV];
}
- env = duk_hdecenv_alloc(thr,
- DUK_HOBJECT_FLAG_EXTENSIBLE |
- DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
+ env = duk_hdecenv_alloc(thr, DUK_HOBJECT_FLAG_EXTENSIBLE | DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_DECENV));
DUK_ASSERT(env != NULL);
duk_push_hobject(thr, (duk_hobject *) env);
DUK_ASSERT(DUK_HOBJECT_GET_PROTOTYPE(thr->heap, (duk_hobject *) env) == NULL);
DUK_HOBJECT_SET_PROTOTYPE(thr->heap, (duk_hobject *) env, parent);
- DUK_HOBJECT_INCREF_ALLOWNULL(thr, parent); /* parent env is the prototype */
+ DUK_HOBJECT_INCREF_ALLOWNULL(thr, parent); /* parent env is the prototype */
/* open scope information, for compiled functions only */
@@ -81084,15 +84539,14 @@ duk_hobject *duk_create_activation_environment_record(duk_hthread *thr,
}
DUK_INTERNAL
-void duk_js_init_activation_environment_records_delayed(duk_hthread *thr,
- duk_activation *act) {
+void duk_js_init_activation_environment_records_delayed(duk_hthread *thr, duk_activation *act) {
duk_hobject *func;
duk_hobject *env;
DUK_ASSERT(thr != NULL);
func = DUK_ACT_GET_FUNC(act);
DUK_ASSERT(func != NULL);
- DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(func)); /* bound functions are never in act 'func' */
+ DUK_ASSERT(!DUK_HOBJECT_HAS_BOUNDFUNC(func)); /* bound functions are never in act 'func' */
/*
* Delayed initialization only occurs for 'NEWENV' functions.
@@ -81121,7 +84575,7 @@ void duk_js_init_activation_environment_records_delayed(duk_hthread *thr,
act->lex_env = env;
act->var_env = env;
- DUK_HOBJECT_INCREF(thr, env); /* XXX: incref by count (here 2 times) */
+ DUK_HOBJECT_INCREF(thr, env); /* XXX: incref by count (here 2 times) */
DUK_HOBJECT_INCREF(thr, env);
duk_pop_unsafe(thr);
@@ -81191,12 +84645,12 @@ DUK_INTERNAL void duk_js_close_environment_record(duk_hthread *thr, duk_hobject
duk_size_t regbase_byteoff;
key = DUK_HOBJECT_E_GET_KEY(thr->heap, varmap, i);
- DUK_ASSERT(key != NULL); /* assume keys are compact in _Varmap */
- DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, varmap, i)); /* assume plain values */
+ DUK_ASSERT(key != NULL); /* assume keys are compact in _Varmap */
+ DUK_ASSERT(!DUK_HOBJECT_E_SLOT_IS_ACCESSOR(thr->heap, varmap, i)); /* assume plain values */
tv = DUK_HOBJECT_E_GET_VALUE_TVAL_PTR(thr->heap, varmap, i);
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv));
- DUK_ASSERT(DUK_TVAL_GET_NUMBER(tv) <= (duk_double_t) DUK_UINT32_MAX); /* limits */
+ DUK_ASSERT(DUK_TVAL_GET_NUMBER(tv) <= (duk_double_t) DUK_UINT32_MAX); /* limits */
#if defined(DUK_USE_FASTINT)
DUK_ASSERT(DUK_TVAL_IS_FASTINT(tv));
regnum = (duk_uint_t) DUK_TVAL_GET_FASTINT_U32(tv);
@@ -81205,8 +84659,10 @@ DUK_INTERNAL void duk_js_close_environment_record(duk_hthread *thr, duk_hobject
#endif
regbase_byteoff = ((duk_hdecenv *) env)->regbase_byteoff;
- DUK_ASSERT((duk_uint8_t *) thr->valstack + regbase_byteoff + sizeof(duk_tval) * regnum >= (duk_uint8_t *) thr->valstack);
- DUK_ASSERT((duk_uint8_t *) thr->valstack + regbase_byteoff + sizeof(duk_tval) * regnum < (duk_uint8_t *) thr->valstack_top);
+ DUK_ASSERT((duk_uint8_t *) thr->valstack + regbase_byteoff + sizeof(duk_tval) * regnum >=
+ (duk_uint8_t *) thr->valstack);
+ DUK_ASSERT((duk_uint8_t *) thr->valstack + regbase_byteoff + sizeof(duk_tval) * regnum <
+ (duk_uint8_t *) thr->valstack_top);
/* Write register value into env as named properties.
* If property already exists, overwrites silently.
@@ -81220,7 +84676,8 @@ DUK_INTERNAL void duk_js_close_environment_record(duk_hthread *thr, duk_hobject
* out-of-memory error should be possible. If this guarantee
* is not provided, problems like GH-476 may happen.
*/
- duk_push_tval(thr, (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + regbase_byteoff + sizeof(duk_tval) * regnum));
+ duk_push_tval(thr,
+ (duk_tval *) (void *) ((duk_uint8_t *) thr->valstack + regbase_byteoff + sizeof(duk_tval) * regnum));
DUK_DDD(DUK_DDDPRINT("closing identifier %!O -> reg %ld, value %!T",
(duk_heaphdr *) key,
(long) regnum,
@@ -81262,10 +84719,7 @@ DUK_INTERNAL void duk_js_close_environment_record(duk_hthread *thr, duk_hobject
/* lookup name from an open declarative record's registers */
DUK_LOCAL
-duk_bool_t duk__getid_open_decl_env_regs(duk_hthread *thr,
- duk_hstring *name,
- duk_hdecenv *env,
- duk__id_lookup_result *out) {
+duk_bool_t duk__getid_open_decl_env_regs(duk_hthread *thr, duk_hstring *name, duk_hdecenv *env, duk__id_lookup_result *out) {
duk_tval *tv;
duk_size_t reg_rel;
@@ -81289,20 +84743,20 @@ duk_bool_t duk__getid_open_decl_env_regs(duk_hthread *thr,
}
DUK_ASSERT(DUK_TVAL_IS_NUMBER(tv));
- DUK_ASSERT(DUK_TVAL_GET_NUMBER(tv) <= (duk_double_t) DUK_UINT32_MAX); /* limits */
+ DUK_ASSERT(DUK_TVAL_GET_NUMBER(tv) <= (duk_double_t) DUK_UINT32_MAX); /* limits */
#if defined(DUK_USE_FASTINT)
DUK_ASSERT(DUK_TVAL_IS_FASTINT(tv));
reg_rel = (duk_size_t) DUK_TVAL_GET_FASTINT_U32(tv);
#else
reg_rel = (duk_size_t) DUK_TVAL_GET_NUMBER(tv);
#endif
- DUK_ASSERT_DISABLE(reg_rel >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(reg_rel >= 0); /* unsigned */
tv = (duk_tval *) (void *) ((duk_uint8_t *) env->thread->valstack + env->regbase_byteoff + sizeof(duk_tval) * reg_rel);
- DUK_ASSERT(tv >= env->thread->valstack && tv < env->thread->valstack_end); /* XXX: more accurate? */
+ DUK_ASSERT(tv >= env->thread->valstack && tv < env->thread->valstack_end); /* XXX: more accurate? */
out->value = tv;
- out->attrs = DUK_PROPDESC_FLAGS_W; /* registers are mutable, non-deletable */
+ out->attrs = DUK_PROPDESC_FLAGS_W; /* registers are mutable, non-deletable */
out->env = (duk_hobject *) env;
out->holder = NULL;
out->has_this = 0;
@@ -81311,10 +84765,7 @@ duk_bool_t duk__getid_open_decl_env_regs(duk_hthread *thr,
/* lookup name from current activation record's functions' registers */
DUK_LOCAL
-duk_bool_t duk__getid_activation_regs(duk_hthread *thr,
- duk_hstring *name,
- duk_activation *act,
- duk__id_lookup_result *out) {
+duk_bool_t duk__getid_activation_regs(duk_hthread *thr, duk_hstring *name, duk_activation *act, duk__id_lookup_result *out) {
duk_tval *tv;
duk_hobject *func;
duk_hobject *varmap;
@@ -81352,7 +84803,7 @@ duk_bool_t duk__getid_activation_regs(duk_hthread *thr,
tv += reg_rel;
out->value = tv;
- out->attrs = DUK_PROPDESC_FLAGS_W; /* registers are mutable, non-deletable */
+ out->attrs = DUK_PROPDESC_FLAGS_W; /* registers are mutable, non-deletable */
out->env = NULL;
out->holder = NULL;
out->has_this = 0;
@@ -81408,9 +84859,12 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("duk__get_identifier_reference successful: "
"name=%!O -> value=%!T, attrs=%ld, has_this=%ld, env=%!O, holder=%!O "
"(found from register bindings when env=NULL)",
- (duk_heaphdr *) name, (duk_tval *) out->value,
- (long) out->attrs, (long) out->has_this,
- (duk_heaphdr *) out->env, (duk_heaphdr *) out->holder));
+ (duk_heaphdr *) name,
+ (duk_tval *) out->value,
+ (long) out->attrs,
+ (long) out->has_this,
+ (duk_heaphdr *) out->env,
+ (duk_heaphdr *) out->holder));
return 1;
}
@@ -81447,8 +84901,7 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
env = thr->builtins[DUK_BIDX_GLOBAL_ENV];
}
- DUK_DDD(DUK_DDDPRINT("continue lookup from env: %!iO",
- (duk_heaphdr *) env));
+ DUK_DDD(DUK_DDDPRINT("continue lookup from env: %!iO", (duk_heaphdr *) env));
}
/*
@@ -81491,9 +84944,12 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("duk__get_identifier_reference successful: "
"name=%!O -> value=%!T, attrs=%ld, has_this=%ld, env=%!O, holder=%!O "
"(declarative environment record, scope open, found in regs)",
- (duk_heaphdr *) name, (duk_tval *) out->value,
- (long) out->attrs, (long) out->has_this,
- (duk_heaphdr *) out->env, (duk_heaphdr *) out->holder));
+ (duk_heaphdr *) name,
+ (duk_tval *) out->value,
+ (long) out->attrs,
+ (long) out->has_this,
+ (duk_heaphdr *) out->env,
+ (duk_heaphdr *) out->holder));
return 1;
}
@@ -81508,9 +84964,12 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("duk__get_identifier_reference successful: "
"name=%!O -> value=%!T, attrs=%ld, has_this=%ld, env=%!O, holder=%!O "
"(declarative environment record, found in properties)",
- (duk_heaphdr *) name, (duk_tval *) out->value,
- (long) out->attrs, (long) out->has_this,
- (duk_heaphdr *) out->env, (duk_heaphdr *) out->holder));
+ (duk_heaphdr *) name,
+ (duk_tval *) out->value,
+ (long) out->attrs,
+ (long) out->has_this,
+ (duk_heaphdr *) out->env,
+ (duk_heaphdr *) out->holder));
return 1;
}
} else {
@@ -81555,7 +85014,7 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
found = duk_hobject_hasprop(thr, &tv_target_tmp, &tv_name);
} else
-#endif /* DUK_USE_ES6_PROXY */
+#endif /* DUK_USE_ES6_PROXY */
{
/* XXX: duk_hobject_hasprop() would be correct for
* non-Proxy objects too, but it is about ~20-25%
@@ -81566,8 +85025,8 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
}
if (found) {
- out->value = NULL; /* can't get value, may be accessor */
- out->attrs = 0; /* irrelevant when out->value == NULL */
+ out->value = NULL; /* can't get value, may be accessor */
+ out->attrs = 0; /* irrelevant when out->value == NULL */
out->env = env;
out->holder = target;
out->has_this = ((duk_hobjenv *) env)->has_this;
@@ -81575,9 +85034,12 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("duk__get_identifier_reference successful: "
"name=%!O -> value=%!T, attrs=%ld, has_this=%ld, env=%!O, holder=%!O "
"(object environment record)",
- (duk_heaphdr *) name, (duk_tval *) out->value,
- (long) out->attrs, (long) out->has_this,
- (duk_heaphdr *) out->env, (duk_heaphdr *) out->holder));
+ (duk_heaphdr *) name,
+ (duk_tval *) out->value,
+ (long) out->attrs,
+ (long) out->has_this,
+ (duk_heaphdr *) out->env,
+ (duk_heaphdr *) out->holder));
return 1;
}
}
@@ -81588,10 +85050,10 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
goto fail_not_found;
}
- if (DUK_UNLIKELY(sanity-- == 0)) {
- DUK_ERROR_RANGE(thr, DUK_STR_PROTOTYPE_CHAIN_LIMIT);
+ if (DUK_UNLIKELY(sanity-- == 0)) {
+ DUK_ERROR_RANGE(thr, DUK_STR_PROTOTYPE_CHAIN_LIMIT);
DUK_WO_NORETURN(return 0;);
- }
+ }
env = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, env);
}
@@ -81599,7 +85061,7 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
* Not found (even in global object)
*/
- fail_not_found:
+fail_not_found:
return 0;
}
@@ -81618,7 +85080,7 @@ duk_bool_t duk__get_identifier_reference(duk_hthread *thr,
* a 'strict' parameter.
*/
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL
duk_bool_t duk_js_hasvar_envrec(duk_hthread *thr,
duk_hobject *env,
@@ -81674,11 +85136,7 @@ duk_bool_t duk_js_hasvar_envrec(duk_hthread *thr,
*/
DUK_LOCAL
-duk_bool_t duk__getvar_helper(duk_hthread *thr,
- duk_hobject *env,
- duk_activation *act,
- duk_hstring *name,
- duk_bool_t throw_flag) {
+duk_bool_t duk__getvar_helper(duk_hthread *thr, duk_hobject *env, duk_activation *act, duk_hstring *name, duk_bool_t throw_flag) {
duk__id_lookup_result ref;
duk_tval tv_tmp_obj;
duk_tval tv_tmp_key;
@@ -81686,8 +85144,11 @@ duk_bool_t duk__getvar_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("getvar: thr=%p, env=%p, act=%p, name=%!O "
"(env -> %!dO)",
- (void *) thr, (void *) env, (void *) act,
- (duk_heaphdr *) name, (duk_heaphdr *) env));
+ (void *) thr,
+ (void *) env,
+ (void *) act,
+ (duk_heaphdr *) name,
+ (duk_heaphdr *) env));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(name != NULL);
@@ -81695,10 +85156,10 @@ duk_bool_t duk__getvar_helper(duk_hthread *thr,
DUK_STATS_INC(thr->heap, stats_getvar_all);
- DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(env);
- DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(name);
+ DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(env);
+ DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(name);
- parents = 1; /* follow parent chain */
+ parents = 1; /* follow parent chain */
if (duk__get_identifier_reference(thr, env, name, act, parents, &ref)) {
if (ref.value) {
duk_push_tval(thr, ref.value);
@@ -81713,7 +85174,7 @@ duk_bool_t duk__getvar_helper(duk_hthread *thr,
DUK_TVAL_SET_OBJECT(&tv_tmp_obj, ref.holder);
DUK_TVAL_SET_STRING(&tv_tmp_key, name);
- (void) duk_hobject_getprop(thr, &tv_tmp_obj, &tv_tmp_key); /* [value] */
+ (void) duk_hobject_getprop(thr, &tv_tmp_obj, &tv_tmp_key); /* [value] */
if (ref.has_this) {
duk_push_hobject(thr, ref.holder);
@@ -81727,7 +85188,8 @@ duk_bool_t duk__getvar_helper(duk_hthread *thr,
return 1;
} else {
if (throw_flag) {
- DUK_ERROR_FMT1(thr, DUK_ERR_REFERENCE_ERROR,
+ DUK_ERROR_FMT1(thr,
+ DUK_ERR_REFERENCE_ERROR,
"identifier '%s' undefined",
(const char *) DUK_HSTRING_GET_DATA(name));
DUK_WO_NORETURN(return 0;);
@@ -81738,18 +85200,12 @@ duk_bool_t duk__getvar_helper(duk_hthread *thr,
}
DUK_INTERNAL
-duk_bool_t duk_js_getvar_envrec(duk_hthread *thr,
- duk_hobject *env,
- duk_hstring *name,
- duk_bool_t throw_flag) {
+duk_bool_t duk_js_getvar_envrec(duk_hthread *thr, duk_hobject *env, duk_hstring *name, duk_bool_t throw_flag) {
return duk__getvar_helper(thr, env, NULL, name, throw_flag);
}
DUK_INTERNAL
-duk_bool_t duk_js_getvar_activation(duk_hthread *thr,
- duk_activation *act,
- duk_hstring *name,
- duk_bool_t throw_flag) {
+duk_bool_t duk_js_getvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name, duk_bool_t throw_flag) {
DUK_ASSERT(act != NULL);
return duk__getvar_helper(thr, act->lex_env, act, name, throw_flag);
}
@@ -81777,6 +85233,7 @@ void duk__putvar_helper(duk_hthread *thr,
duk_tval *val,
duk_bool_t strict) {
duk__id_lookup_result ref;
+ duk_tval tv_tmp_val;
duk_tval tv_tmp_obj;
duk_tval tv_tmp_key;
duk_bool_t parents;
@@ -81785,19 +85242,27 @@ void duk__putvar_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("putvar: thr=%p, env=%p, act=%p, name=%!O, val=%p, strict=%ld "
"(env -> %!dO, val -> %!T)",
- (void *) thr, (void *) env, (void *) act,
- (duk_heaphdr *) name, (void *) val, (long) strict,
- (duk_heaphdr *) env, (duk_tval *) val));
+ (void *) thr,
+ (void *) env,
+ (void *) act,
+ (duk_heaphdr *) name,
+ (void *) val,
+ (long) strict,
+ (duk_heaphdr *) env,
+ (duk_tval *) val));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(name != NULL);
DUK_ASSERT(val != NULL);
/* env and act may be NULL */
- DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(env);
- DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(name);
+ DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(env);
+ DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(name);
DUK_ASSERT_REFCOUNT_NONZERO_TVAL(val);
+ DUK_TVAL_SET_TVAL(&tv_tmp_val, val); /* Stabilize. */
+ val = NULL;
+
/*
* In strict mode E5 protects 'eval' and 'arguments' from being
* assigned to (or even declared anywhere). Attempt to do so
@@ -81808,15 +85273,13 @@ void duk__putvar_helper(duk_hthread *thr,
* and name 'eval' or 'arguments'.
*/
- DUK_ASSERT(!strict ||
- (name != DUK_HTHREAD_STRING_EVAL(thr) &&
- name != DUK_HTHREAD_STRING_LC_ARGUMENTS(thr)));
+ DUK_ASSERT(!strict || (name != DUK_HTHREAD_STRING_EVAL(thr) && name != DUK_HTHREAD_STRING_LC_ARGUMENTS(thr)));
/*
* Lookup variable and update in-place if found.
*/
- parents = 1; /* follow parent chain */
+ parents = 1; /* follow parent chain */
if (duk__get_identifier_reference(thr, env, name, act, parents, &ref)) {
if (ref.value && (ref.attrs & DUK_PROPDESC_FLAG_WRITABLE)) {
@@ -81829,7 +85292,7 @@ void duk__putvar_helper(duk_hthread *thr,
tv_val = ref.value;
DUK_ASSERT(tv_val != NULL);
- DUK_TVAL_SET_TVAL_UPDREF(thr, tv_val, val); /* side effects */
+ DUK_TVAL_SET_TVAL_UPDREF(thr, tv_val, &tv_tmp_val); /* side effects */
/* ref.value invalidated here */
} else {
@@ -81837,7 +85300,7 @@ void duk__putvar_helper(duk_hthread *thr,
DUK_TVAL_SET_OBJECT(&tv_tmp_obj, ref.holder);
DUK_TVAL_SET_STRING(&tv_tmp_key, name);
- (void) duk_hobject_putprop(thr, &tv_tmp_obj, &tv_tmp_key, val, strict);
+ (void) duk_hobject_putprop(thr, &tv_tmp_obj, &tv_tmp_key, &tv_tmp_val, strict);
/* ref.value invalidated here */
}
@@ -81852,7 +85315,8 @@ void duk__putvar_helper(duk_hthread *thr,
if (strict) {
DUK_DDD(DUK_DDDPRINT("identifier binding not found, strict => reference error"));
- DUK_ERROR_FMT1(thr, DUK_ERR_REFERENCE_ERROR,
+ DUK_ERROR_FMT1(thr,
+ DUK_ERR_REFERENCE_ERROR,
"identifier '%s' undefined",
(const char *) DUK_HSTRING_GET_DATA(name));
DUK_WO_NORETURN(return;);
@@ -81862,7 +85326,7 @@ void duk__putvar_helper(duk_hthread *thr,
DUK_TVAL_SET_OBJECT(&tv_tmp_obj, thr->builtins[DUK_BIDX_GLOBAL]);
DUK_TVAL_SET_STRING(&tv_tmp_key, name);
- (void) duk_hobject_putprop(thr, &tv_tmp_obj, &tv_tmp_key, val, 0); /* 0 = no throw */
+ (void) duk_hobject_putprop(thr, &tv_tmp_obj, &tv_tmp_key, &tv_tmp_val, 0); /* 0 = no throw */
/* NB: 'val' may be invalidated here because put_value may realloc valstack,
* caller beware.
@@ -81870,20 +85334,12 @@ void duk__putvar_helper(duk_hthread *thr,
}
DUK_INTERNAL
-void duk_js_putvar_envrec(duk_hthread *thr,
- duk_hobject *env,
- duk_hstring *name,
- duk_tval *val,
- duk_bool_t strict) {
+void duk_js_putvar_envrec(duk_hthread *thr, duk_hobject *env, duk_hstring *name, duk_tval *val, duk_bool_t strict) {
duk__putvar_helper(thr, env, NULL, name, val, strict);
}
DUK_INTERNAL
-void duk_js_putvar_activation(duk_hthread *thr,
- duk_activation *act,
- duk_hstring *name,
- duk_tval *val,
- duk_bool_t strict) {
+void duk_js_putvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name, duk_tval *val, duk_bool_t strict) {
DUK_ASSERT(act != NULL);
duk__putvar_helper(thr, act->lex_env, act, name, val, strict);
}
@@ -81908,25 +85364,25 @@ void duk_js_putvar_activation(duk_hthread *thr,
*/
DUK_LOCAL
-duk_bool_t duk__delvar_helper(duk_hthread *thr,
- duk_hobject *env,
- duk_activation *act,
- duk_hstring *name) {
+duk_bool_t duk__delvar_helper(duk_hthread *thr, duk_hobject *env, duk_activation *act, duk_hstring *name) {
duk__id_lookup_result ref;
duk_bool_t parents;
DUK_DDD(DUK_DDDPRINT("delvar: thr=%p, env=%p, act=%p, name=%!O "
"(env -> %!dO)",
- (void *) thr, (void *) env, (void *) act,
- (duk_heaphdr *) name, (duk_heaphdr *) env));
+ (void *) thr,
+ (void *) env,
+ (void *) act,
+ (duk_heaphdr *) name,
+ (duk_heaphdr *) env));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(name != NULL);
/* env and act may be NULL */
- DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(name);
+ DUK_ASSERT_REFCOUNT_NONZERO_HEAPHDR(name);
- parents = 1; /* follow parent chain */
+ parents = 1; /* follow parent chain */
if (duk__get_identifier_reference(thr, env, name, act, parents, &ref)) {
if (ref.value && !(ref.attrs & DUK_PROPDESC_FLAG_CONFIGURABLE)) {
@@ -81954,7 +85410,7 @@ duk_bool_t duk__delvar_helper(duk_hthread *thr,
return 1;
}
-#if 0 /*unused*/
+#if 0 /*unused*/
DUK_INTERNAL
duk_bool_t duk_js_delvar_envrec(duk_hthread *thr,
duk_hobject *env,
@@ -81964,9 +85420,7 @@ duk_bool_t duk_js_delvar_envrec(duk_hthread *thr,
#endif
DUK_INTERNAL
-duk_bool_t duk_js_delvar_activation(duk_hthread *thr,
- duk_activation *act,
- duk_hstring *name) {
+duk_bool_t duk_js_delvar_activation(duk_hthread *thr, duk_activation *act, duk_hstring *name) {
DUK_ASSERT(act != NULL);
return duk__delvar_helper(thr, act->lex_env, act, name);
}
@@ -82035,9 +85489,13 @@ duk_bool_t duk__declvar_helper(duk_hthread *thr,
DUK_DDD(DUK_DDDPRINT("declvar: thr=%p, env=%p, name=%!O, val=%!T, prop_flags=0x%08lx, is_func_decl=%ld "
"(env -> %!iO)",
- (void *) thr, (void *) env, (duk_heaphdr *) name,
- (duk_tval *) val, (unsigned long) prop_flags,
- (unsigned int) is_func_decl, (duk_heaphdr *) env));
+ (void *) thr,
+ (void *) env,
+ (duk_heaphdr *) name,
+ (duk_tval *) val,
+ (unsigned long) prop_flags,
+ (unsigned int) is_func_decl,
+ (duk_heaphdr *) env));
DUK_ASSERT(thr != NULL);
DUK_ASSERT(env != NULL);
@@ -82064,7 +85522,7 @@ duk_bool_t duk__declvar_helper(duk_hthread *thr,
* environment target object.
*/
- parents = 0; /* just check 'env' */
+ parents = 0; /* just check 'env' */
if (duk__get_identifier_reference(thr, env, name, NULL, parents, &ref)) {
duk_int_t e_idx;
duk_int_t h_idx;
@@ -82079,7 +85537,7 @@ duk_bool_t duk__declvar_helper(duk_hthread *thr,
if (!(is_func_decl && env == thr->builtins[DUK_BIDX_GLOBAL_ENV])) {
DUK_DDD(DUK_DDDPRINT("re-declare a binding, ignoring"));
- return 1; /* 1 -> needs a PUTVAR */
+ return 1; /* 1 -> needs a PUTVAR */
}
/*
@@ -82109,7 +85567,7 @@ duk_bool_t duk__declvar_helper(duk_hthread *thr,
* where the property was found (see duk__get_identifier_reference()).
*/
DUK_ASSERT(DUK_HOBJECT_GET_CLASS_NUMBER(holder) == DUK_HOBJECT_CLASS_GLOBAL);
- DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARRAY(holder)); /* global object doesn't have array part */
+ DUK_ASSERT(!DUK_HOBJECT_HAS_EXOTIC_ARRAY(holder)); /* global object doesn't have array part */
/* XXX: use a helper for prototype traversal; no loop check here */
/* must be found: was found earlier, and cannot be inherited */
@@ -82142,8 +85600,7 @@ duk_bool_t duk__declvar_helper(duk_hthread *thr,
"accessor -> reject"));
goto fail_existing_attributes;
}
- if (!((flags & DUK_PROPDESC_FLAG_WRITABLE) &&
- (flags & DUK_PROPDESC_FLAG_ENUMERABLE))) {
+ if (!((flags & DUK_PROPDESC_FLAG_WRITABLE) && (flags & DUK_PROPDESC_FLAG_ENUMERABLE))) {
DUK_DDD(DUK_DDDPRINT("existing property is a non-configurable "
"plain property which is not writable and "
"enumerable -> reject"));
@@ -82238,13 +85695,13 @@ duk_bool_t duk__declvar_helper(duk_hthread *thr,
duk_push_hobject(thr, holder);
duk_push_hstring(thr, name);
duk_push_tval(thr, val);
- duk_xdef_prop(thr, -3, prop_flags); /* [holder name val] -> [holder] */
+ duk_xdef_prop(thr, -3, prop_flags); /* [holder name val] -> [holder] */
duk_pop_unsafe(thr);
return 0;
- fail_existing_attributes:
- fail_not_extensible:
+fail_existing_attributes:
+fail_not_extensible:
DUK_ERROR_TYPE(thr, "declaration failed");
DUK_WO_NORETURN(return 0;);
}
@@ -82365,34 +85822,34 @@ duk_bool_t duk_js_declvar_activation(duk_hthread *thr,
* Various defines and file specific helper macros
*/
-#define DUK__MAX_RE_DECESC_DIGITS 9
-#define DUK__MAX_RE_QUANT_DIGITS 9 /* Does not allow e.g. 2**31-1, but one more would allow overflows of u32. */
+#define DUK__MAX_RE_DECESC_DIGITS 9
+#define DUK__MAX_RE_QUANT_DIGITS 9 /* Does not allow e.g. 2**31-1, but one more would allow overflows of u32. */
/* whether to use macros or helper function depends on call count */
-#define DUK__ISDIGIT(x) ((x) >= DUK_ASC_0 && (x) <= DUK_ASC_9)
-#define DUK__ISHEXDIGIT(x) duk__is_hex_digit((x))
-#define DUK__ISOCTDIGIT(x) ((x) >= DUK_ASC_0 && (x) <= DUK_ASC_7)
-#define DUK__ISDIGIT03(x) ((x) >= DUK_ASC_0 && (x) <= DUK_ASC_3)
-#define DUK__ISDIGIT47(x) ((x) >= DUK_ASC_4 && (x) <= DUK_ASC_7)
+#define DUK__ISDIGIT(x) ((x) >= DUK_ASC_0 && (x) <= DUK_ASC_9)
+#define DUK__ISHEXDIGIT(x) duk__is_hex_digit((x))
+#define DUK__ISOCTDIGIT(x) ((x) >= DUK_ASC_0 && (x) <= DUK_ASC_7)
+#define DUK__ISDIGIT03(x) ((x) >= DUK_ASC_0 && (x) <= DUK_ASC_3)
+#define DUK__ISDIGIT47(x) ((x) >= DUK_ASC_4 && (x) <= DUK_ASC_7)
/* lexer character window helpers */
-#define DUK__LOOKUP(lex_ctx,idx) ((lex_ctx)->window[(idx)].codepoint)
-#define DUK__ADVANCECHARS(lex_ctx,count) duk__advance_chars((lex_ctx), (count))
-#define DUK__ADVANCEBYTES(lex_ctx,count) duk__advance_bytes((lex_ctx), (count))
+#define DUK__LOOKUP(lex_ctx, idx) ((lex_ctx)->window[(idx)].codepoint)
+#define DUK__ADVANCECHARS(lex_ctx, count) duk__advance_chars((lex_ctx), (count))
+#define DUK__ADVANCEBYTES(lex_ctx, count) duk__advance_bytes((lex_ctx), (count))
#define DUK__INITBUFFER(lex_ctx) duk__initbuffer((lex_ctx))
-#define DUK__APPENDBUFFER(lex_ctx,x) duk__appendbuffer((lex_ctx), (duk_codepoint_t) (x))
-#define DUK__APPENDBUFFER_ASCII(lex_ctx,x) duk__appendbuffer_ascii((lex_ctx), (duk_codepoint_t) (x))
+#define DUK__APPENDBUFFER(lex_ctx, x) duk__appendbuffer((lex_ctx), (duk_codepoint_t) (x))
+#define DUK__APPENDBUFFER_ASCII(lex_ctx, x) duk__appendbuffer_ascii((lex_ctx), (duk_codepoint_t) (x))
/* lookup shorthands (note: assume context variable is named 'lex_ctx') */
-#define DUK__L0() DUK__LOOKUP(lex_ctx, 0)
-#define DUK__L1() DUK__LOOKUP(lex_ctx, 1)
-#define DUK__L2() DUK__LOOKUP(lex_ctx, 2)
-#define DUK__L3() DUK__LOOKUP(lex_ctx, 3)
-#define DUK__L4() DUK__LOOKUP(lex_ctx, 4)
-#define DUK__L5() DUK__LOOKUP(lex_ctx, 5)
+#define DUK__L0() DUK__LOOKUP(lex_ctx, 0)
+#define DUK__L1() DUK__LOOKUP(lex_ctx, 1)
+#define DUK__L2() DUK__LOOKUP(lex_ctx, 2)
+#define DUK__L3() DUK__LOOKUP(lex_ctx, 3)
+#define DUK__L4() DUK__LOOKUP(lex_ctx, 4)
+#define DUK__L5() DUK__LOOKUP(lex_ctx, 5)
/* packed advance/token number macro used by multiple functions */
-#define DUK__ADVTOK(advbytes,tok) ((((advbytes) * sizeof(duk_lexer_codepoint)) << 8) + (tok))
+#define DUK__ADVTOK(advbytes, tok) ((((advbytes) * sizeof(duk_lexer_codepoint)) << 8) + (tok))
/*
* Advance lookup window by N characters, filling in new characters as
@@ -82502,10 +85959,9 @@ DUK_LOCAL void duk__fill_lexer_buffer(duk_lexer_ctx *lex_ctx, duk_small_uint_t s
/* Fast path. */
if (DUK_LIKELY(x < 0x80UL)) {
- DUK_ASSERT(x != 0x2028UL && x != 0x2029UL); /* not LS/PS */
+ DUK_ASSERT(x != 0x2028UL && x != 0x2029UL); /* not LS/PS */
if (DUK_UNLIKELY(x <= 0x000dUL)) {
- if ((x == 0x000aUL) ||
- ((x == 0x000dUL) && (p >= p_end || *p != 0x000aUL))) {
+ if ((x == 0x000aUL) || ((x == 0x000dUL) && (p >= p_end || *p != 0x000aUL))) {
/* lookup for 0x000a above assumes shortest encoding now */
/* E5 Section 7.3, treat the following as newlines:
@@ -82596,8 +86052,8 @@ DUK_LOCAL void duk__fill_lexer_buffer(duk_lexer_ctx *lex_ctx, duk_small_uint_t s
lex_ctx->input_line = input_line;
return;
- error_clipped: /* clipped codepoint */
- error_encoding: /* invalid codepoint encoding or codepoint */
+error_clipped: /* clipped codepoint */
+error_encoding: /* invalid codepoint encoding or codepoint */
lex_ctx->input_offset = (duk_size_t) (p - lex_ctx->input);
lex_ctx->input_line = input_line;
@@ -82608,26 +86064,25 @@ DUK_LOCAL void duk__fill_lexer_buffer(duk_lexer_ctx *lex_ctx, duk_small_uint_t s
DUK_LOCAL void duk__advance_bytes(duk_lexer_ctx *lex_ctx, duk_small_uint_t count_bytes) {
duk_small_uint_t used_bytes, avail_bytes;
- DUK_ASSERT_DISABLE(count_bytes >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(count_bytes >= 0); /* unsigned */
DUK_ASSERT(count_bytes <= (duk_small_uint_t) (DUK_LEXER_WINDOW_SIZE * sizeof(duk_lexer_codepoint)));
DUK_ASSERT(lex_ctx->window >= lex_ctx->buffer);
DUK_ASSERT(lex_ctx->window < lex_ctx->buffer + DUK_LEXER_BUFFER_SIZE);
- DUK_ASSERT((duk_uint8_t *) lex_ctx->window + count_bytes <= (duk_uint8_t *) lex_ctx->buffer + DUK_LEXER_BUFFER_SIZE * sizeof(duk_lexer_codepoint));
+ DUK_ASSERT((duk_uint8_t *) lex_ctx->window + count_bytes <=
+ (duk_uint8_t *) lex_ctx->buffer + DUK_LEXER_BUFFER_SIZE * sizeof(duk_lexer_codepoint));
/* Zero 'count' is also allowed to make call sites easier.
* Arithmetic in bytes generates better code in GCC.
*/
- lex_ctx->window = (duk_lexer_codepoint *) (void *) ((duk_uint8_t *) lex_ctx->window + count_bytes); /* avoid multiply */
+ lex_ctx->window = (duk_lexer_codepoint *) (void *) ((duk_uint8_t *) lex_ctx->window + count_bytes); /* avoid multiply */
used_bytes = (duk_small_uint_t) ((duk_uint8_t *) lex_ctx->window - (duk_uint8_t *) lex_ctx->buffer);
avail_bytes = DUK_LEXER_BUFFER_SIZE * sizeof(duk_lexer_codepoint) - used_bytes;
if (avail_bytes < (duk_small_uint_t) (DUK_LEXER_WINDOW_SIZE * sizeof(duk_lexer_codepoint))) {
/* Not enough data to provide a full window, so "scroll" window to
* start of buffer and fill up the rest.
*/
- duk_memmove((void *) lex_ctx->buffer,
- (const void *) lex_ctx->window,
- (size_t) avail_bytes);
+ duk_memmove((void *) lex_ctx->buffer, (const void *) lex_ctx->window, (size_t) avail_bytes);
lex_ctx->window = lex_ctx->buffer;
duk__fill_lexer_buffer(lex_ctx, avail_bytes);
}
@@ -82637,7 +86092,7 @@ DUK_LOCAL void duk__init_lexer_window(duk_lexer_ctx *lex_ctx) {
lex_ctx->window = lex_ctx->buffer;
duk__fill_lexer_buffer(lex_ctx, 0);
}
-#else /* DUK_USE_LEXER_SLIDING_WINDOW */
+#else /* DUK_USE_LEXER_SLIDING_WINDOW */
DUK_LOCAL duk_codepoint_t duk__read_char(duk_lexer_ctx *lex_ctx) {
duk_ucodepoint_t x;
duk_small_uint_t len;
@@ -82667,11 +86122,10 @@ DUK_LOCAL duk_codepoint_t duk__read_char(duk_lexer_ctx *lex_ctx) {
/* input offset tracking */
lex_ctx->input_offset++;
- DUK_ASSERT(x != 0x2028UL && x != 0x2029UL); /* not LS/PS */
+ DUK_ASSERT(x != 0x2028UL && x != 0x2029UL); /* not LS/PS */
if (DUK_UNLIKELY(x <= 0x000dUL)) {
- if ((x == 0x000aUL) ||
- ((x == 0x000dUL) && (lex_ctx->input_offset >= lex_ctx->input_length ||
- lex_ctx->input[lex_ctx->input_offset] != 0x000aUL))) {
+ if ((x == 0x000aUL) || ((x == 0x000dUL) && (lex_ctx->input_offset >= lex_ctx->input_length ||
+ lex_ctx->input[lex_ctx->input_offset] != 0x000aUL))) {
/* lookup for 0x000a above assumes shortest encoding now */
/* E5 Section 7.3, treat the following as newlines:
@@ -82760,8 +86214,8 @@ DUK_LOCAL duk_codepoint_t duk__read_char(duk_lexer_ctx *lex_ctx) {
return (duk_codepoint_t) x;
- error_clipped: /* clipped codepoint */
- error_encoding: /* invalid codepoint encoding or codepoint */
+error_clipped: /* clipped codepoint */
+error_encoding: /* invalid codepoint encoding or codepoint */
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_SOURCE_DECODE_FAILED);
DUK_WO_NORETURN(return 0;);
}
@@ -82770,15 +86224,13 @@ DUK_LOCAL void duk__advance_bytes(duk_lexer_ctx *lex_ctx, duk_small_uint_t count
duk_small_uint_t keep_bytes;
duk_lexer_codepoint *cp, *cp_end;
- DUK_ASSERT_DISABLE(count_bytes >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(count_bytes >= 0); /* unsigned */
DUK_ASSERT(count_bytes <= (duk_small_uint_t) (DUK_LEXER_WINDOW_SIZE * sizeof(duk_lexer_codepoint)));
/* Zero 'count' is also allowed to make call sites easier. */
keep_bytes = DUK_LEXER_WINDOW_SIZE * sizeof(duk_lexer_codepoint) - count_bytes;
- duk_memmove((void *) lex_ctx->window,
- (const void *) ((duk_uint8_t *) lex_ctx->window + count_bytes),
- (size_t) keep_bytes);
+ duk_memmove((void *) lex_ctx->window, (const void *) ((duk_uint8_t *) lex_ctx->window + count_bytes), (size_t) keep_bytes);
cp = (duk_lexer_codepoint *) ((duk_uint8_t *) lex_ctx->window + keep_bytes);
cp_end = lex_ctx->window + DUK_LEXER_WINDOW_SIZE;
@@ -82791,9 +86243,9 @@ DUK_LOCAL void duk__advance_bytes(duk_lexer_ctx *lex_ctx, duk_small_uint_t count
DUK_LOCAL void duk__init_lexer_window(duk_lexer_ctx *lex_ctx) {
/* Call with count == DUK_LEXER_WINDOW_SIZE to fill buffer initially. */
- duk__advance_bytes(lex_ctx, DUK_LEXER_WINDOW_SIZE * sizeof(duk_lexer_codepoint)); /* fill window */
+ duk__advance_bytes(lex_ctx, DUK_LEXER_WINDOW_SIZE * sizeof(duk_lexer_codepoint)); /* fill window */
}
-#endif /* DUK_USE_LEXER_SLIDING_WINDOW */
+#endif /* DUK_USE_LEXER_SLIDING_WINDOW */
DUK_LOCAL void duk__advance_chars(duk_lexer_ctx *lex_ctx, duk_small_uint_t count_chars) {
duk__advance_bytes(lex_ctx, count_chars * sizeof(duk_lexer_codepoint));
@@ -82886,7 +86338,7 @@ DUK_INTERNAL void duk_lexer_getpoint(duk_lexer_ctx *lex_ctx, duk_lexer_point *pt
}
DUK_INTERNAL void duk_lexer_setpoint(duk_lexer_ctx *lex_ctx, duk_lexer_point *pt) {
- DUK_ASSERT_DISABLE(pt->offset >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(pt->offset >= 0); /* unsigned */
DUK_ASSERT(pt->line >= 1);
lex_ctx->input_offset = pt->offset;
lex_ctx->input_line = pt->line;
@@ -82920,8 +86372,7 @@ DUK_LOCAL duk_codepoint_t duk__hexval_validate(duk_codepoint_t x) {
DUK_LOCAL duk_codepoint_t duk__hexval(duk_codepoint_t x) {
duk_codepoint_t ret;
- DUK_ASSERT((x >= DUK_ASC_0 && x <= DUK_ASC_9) ||
- (x >= DUK_ASC_LC_A && x <= DUK_ASC_LC_F) ||
+ DUK_ASSERT((x >= DUK_ASC_0 && x <= DUK_ASC_9) || (x >= DUK_ASC_LC_A && x <= DUK_ASC_LC_F) ||
(x >= DUK_ASC_UC_A && x <= DUK_ASC_UC_F));
ret = duk__hexval_validate(x);
DUK_ASSERT(ret >= 0 && ret <= 15);
@@ -82940,12 +86391,12 @@ DUK_LOCAL duk_bool_t duk__is_hex_digit(duk_codepoint_t x) {
* source and RegExp parsing.
*/
DUK_LOCAL duk_codepoint_t duk__lexer_parse_escape(duk_lexer_ctx *lex_ctx, duk_bool_t allow_es6) {
- duk_small_int_t digits; /* Initial value 2 or 4 for fixed length escapes, 0 for ES2015 \u{H+}. */
+ duk_small_int_t digits; /* Initial value 2 or 4 for fixed length escapes, 0 for ES2015 \u{H+}. */
duk_codepoint_t escval;
duk_codepoint_t x;
duk_small_uint_t adv;
- DUK_ASSERT(DUK__L0() == DUK_ASC_BACKSLASH); /* caller responsibilities */
+ DUK_ASSERT(DUK__L0() == DUK_ASC_BACKSLASH); /* caller responsibilities */
DUK_ASSERT(DUK__L1() == DUK_ASC_LC_X || DUK__L1() == DUK_ASC_LC_U);
DUK_UNREF(allow_es6);
@@ -83019,16 +86470,16 @@ DUK_LOCAL duk_codepoint_t duk__lexer_parse_escape(duk_lexer_ctx *lex_ctx, duk_bo
} else {
goto fail_escape;
}
- digits = -1; /* Indicate we have at least one digit. */
-#else /* DUK_USE_ES6_UNICODE_ESCAPE */
- DUK_ASSERT(0); /* Never happens if \u{H+} support disabled. */
-#endif /* DUK_USE_ES6_UNICODE_ESCAPE */
+ digits = -1; /* Indicate we have at least one digit. */
+#else /* DUK_USE_ES6_UNICODE_ESCAPE */
+ DUK_ASSERT(0); /* Never happens if \u{H+} support disabled. */
+#endif /* DUK_USE_ES6_UNICODE_ESCAPE */
}
}
return escval;
- fail_escape:
+fail_escape:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_ESCAPE);
DUK_WO_NORETURN(return 0;);
}
@@ -83038,7 +86489,9 @@ DUK_LOCAL duk_codepoint_t duk__lexer_parse_escape(duk_lexer_ctx *lex_ctx, duk_bo
* RegExp octal escape parsing. Window[0] must be the slash '\' and the first
* digit must already be validated to be in [0-9] by the caller.
*/
-DUK_LOCAL duk_codepoint_t duk__lexer_parse_legacy_octal(duk_lexer_ctx *lex_ctx, duk_small_uint_t *out_adv, duk_bool_t reject_annex_b) {
+DUK_LOCAL duk_codepoint_t duk__lexer_parse_legacy_octal(duk_lexer_ctx *lex_ctx,
+ duk_small_uint_t *out_adv,
+ duk_bool_t reject_annex_b) {
duk_codepoint_t cp;
duk_small_uint_t lookup_idx;
duk_small_uint_t adv;
@@ -83073,7 +86526,7 @@ DUK_LOCAL duk_codepoint_t duk__lexer_parse_legacy_octal(duk_lexer_ctx *lex_ctx,
DUK_DDD(DUK_DDDPRINT("\\8 or \\9 -> treat as literal, accept in strict mode too"));
DUK_ASSERT(tmp == DUK_ASC_8 || tmp == DUK_ASC_9);
cp = tmp;
- adv++; /* correction to above, eat offending character */
+ adv++; /* correction to above, eat offending character */
} else if (lookup_idx == 2 && cp == 0) {
/* Note: 'foo\0bar' is OK in strict mode, but 'foo\00bar' is not.
* It won't be interpreted as 'foo\u{0}0bar' but as a SyntaxError.
@@ -83097,18 +86550,21 @@ DUK_LOCAL duk_codepoint_t duk__lexer_parse_legacy_octal(duk_lexer_ctx *lex_ctx,
}
/* XXX: move strict mode to lex_ctx? */
-DUK_LOCAL void duk__lexer_parse_string_literal(duk_lexer_ctx *lex_ctx, duk_token *out_token, duk_small_int_t quote, duk_bool_t strict_mode) {
+DUK_LOCAL void duk__lexer_parse_string_literal(duk_lexer_ctx *lex_ctx,
+ duk_token *out_token,
+ duk_small_int_t quote,
+ duk_bool_t strict_mode) {
duk_small_uint_t adv;
- for (adv = 1 /* initial quote */ ;;) {
+ for (adv = 1 /* initial quote */;;) {
duk_codepoint_t x;
- DUK__ADVANCECHARS(lex_ctx, adv); /* eat opening quote on first loop */
+ DUK__ADVANCECHARS(lex_ctx, adv); /* eat opening quote on first loop */
x = DUK__L0();
adv = 1;
if (x == quote) {
- DUK__ADVANCECHARS(lex_ctx, 1); /* eat closing quote */
+ DUK__ADVANCECHARS(lex_ctx, 1); /* eat closing quote */
break;
} else if (x == '\\') {
/* DUK__L0 -> '\' char
@@ -83119,7 +86575,7 @@ DUK_LOCAL void duk__lexer_parse_string_literal(duk_lexer_ctx *lex_ctx, duk_token
x = DUK__L1();
/* How much to advance before next loop. */
- adv = 2; /* note: long live range */
+ adv = 2; /* note: long live range */
switch (x) {
case '\'':
@@ -83162,7 +86618,7 @@ DUK_LOCAL void duk__lexer_parse_string_literal(duk_lexer_ctx *lex_ctx, duk_token
/* line continuation */
if (x == 0x000d && DUK__L2() == 0x000a) {
/* CR LF again a special case */
- adv = 3; /* line terminator, CR, LF */
+ adv = 3; /* line terminator, CR, LF */
}
} else if (DUK__ISDIGIT(x)) {
/*
@@ -83191,8 +86647,8 @@ DUK_LOCAL void duk__lexer_parse_string_literal(duk_lexer_ctx *lex_ctx, duk_token
/* escaped NonEscapeCharacter */
DUK__APPENDBUFFER(lex_ctx, x);
}
- } /* end default clause */
- } /* end switch */
+ } /* end default clause */
+ } /* end switch */
/* Shared handling for single codepoint escapes. */
if (emitcp >= 0) {
@@ -83225,11 +86681,11 @@ DUK_LOCAL void duk__lexer_parse_string_literal(duk_lexer_ctx *lex_ctx, duk_token
return;
- fail_escape:
+fail_escape:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_ESCAPE);
DUK_WO_NORETURN(return;);
- fail_unterminated:
+fail_unterminated:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_UNTERMINATED_STRING);
DUK_WO_NORETURN(return;);
}
@@ -83316,19 +86772,19 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
duk_token *out_token,
duk_bool_t strict_mode,
duk_bool_t regexp_mode) {
- duk_codepoint_t x; /* temporary, must be signed and 32-bit to hold Unicode code points */
+ duk_codepoint_t x; /* temporary, must be signed and 32-bit to hold Unicode code points */
duk_small_uint_t advtok = 0; /* (advance << 8) + token_type, updated at function end,
* init is unnecessary but suppresses "may be used uninitialized" warnings.
*/
- duk_bool_t got_lineterm = 0; /* got lineterm preceding non-whitespace, non-lineterm token */
+ duk_bool_t got_lineterm = 0; /* got lineterm preceding non-whitespace, non-lineterm token */
if (++lex_ctx->token_count >= lex_ctx->token_limit) {
goto fail_token_limit;
}
out_token->t = DUK_TOK_EOF;
- out_token->t_nores = DUK_TOK_INVALID; /* marker: copy t if not changed */
-#if 0 /* not necessary to init, disabled for faster parsing */
+ out_token->t_nores = DUK_TOK_INVALID; /* marker: copy t if not changed */
+#if 0 /* not necessary to init, disabled for faster parsing */
out_token->num = DUK_DOUBLE_NAN;
out_token->str1 = NULL;
out_token->str2 = NULL;
@@ -83368,35 +86824,34 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
* in the clauses, so it's not trivial to convert to a switch.
*/
- restart_lineupdate:
+restart_lineupdate:
out_token->start_line = lex_ctx->window[0].line;
- restart:
+restart:
out_token->start_offset = lex_ctx->window[0].offset;
x = DUK__L0();
switch (x) {
case DUK_ASC_SPACE:
- case DUK_ASC_HT: /* fast paths for space and tab */
+ case DUK_ASC_HT: /* fast paths for space and tab */
DUK__ADVANCECHARS(lex_ctx, 1);
goto restart;
- case DUK_ASC_LF: /* LF line terminator; CR LF and Unicode lineterms are handled in slow path */
+ case DUK_ASC_LF: /* LF line terminator; CR LF and Unicode lineterms are handled in slow path */
DUK__ADVANCECHARS(lex_ctx, 1);
got_lineterm = 1;
goto restart_lineupdate;
#if defined(DUK_USE_SHEBANG_COMMENTS)
- case DUK_ASC_HASH: /* '#' */
- if (DUK__L1() == DUK_ASC_EXCLAMATION && lex_ctx->window[0].offset == 0 &&
- (lex_ctx->flags & DUK_COMPILE_SHEBANG)) {
+ case DUK_ASC_HASH: /* '#' */
+ if (DUK__L1() == DUK_ASC_EXCLAMATION && lex_ctx->window[0].offset == 0 && (lex_ctx->flags & DUK_COMPILE_SHEBANG)) {
/* "Shebang" comment ('#! ...') on first line. */
/* DUK__ADVANCECHARS(lex_ctx, 2) would be correct here, but not necessary */
duk__lexer_skip_to_endofline(lex_ctx);
- goto restart; /* line terminator will be handled on next round */
+ goto restart; /* line terminator will be handled on next round */
}
goto fail_token;
-#endif /* DUK_USE_SHEBANG_COMMENTS */
- case DUK_ASC_SLASH: /* '/' */
+#endif /* DUK_USE_SHEBANG_COMMENTS */
+ case DUK_ASC_SLASH: /* '/' */
if (DUK__L1() == DUK_ASC_SLASH) {
/*
* E5 Section 7.4, allow SourceCharacter (which is any 16-bit
@@ -83405,7 +86860,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
/* DUK__ADVANCECHARS(lex_ctx, 2) would be correct here, but not necessary */
duk__lexer_skip_to_endofline(lex_ctx);
- goto restart; /* line terminator will be handled on next round */
+ goto restart; /* line terminator will be handled on next round */
} else if (DUK__L1() == DUK_ASC_STAR) {
/*
* E5 Section 7.4. If the multi-line comment contains a newline,
@@ -83489,19 +86944,19 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
/* first, parse regexp body roughly */
- duk_small_int_t state = 0; /* 0=base, 1=esc, 2=class, 3=class+esc */
+ duk_small_int_t state = 0; /* 0=base, 1=esc, 2=class, 3=class+esc */
DUK__INITBUFFER(lex_ctx);
for (;;) {
- DUK__ADVANCECHARS(lex_ctx, 1); /* skip opening slash on first loop */
+ DUK__ADVANCECHARS(lex_ctx, 1); /* skip opening slash on first loop */
x = DUK__L0();
if (x < 0 || duk_unicode_is_line_terminator(x)) {
goto fail_unterm_regexp;
}
- x = DUK__L0(); /* re-read to avoid spill / fetch */
+ x = DUK__L0(); /* re-read to avoid spill / fetch */
if (state == 0) {
if (x == DUK_ASC_SLASH) {
- DUK__ADVANCECHARS(lex_ctx, 1); /* eat closing slash */
+ DUK__ADVANCECHARS(lex_ctx, 1); /* eat closing slash */
break;
} else if (x == DUK_ASC_BACKSLASH) {
state = 1;
@@ -83531,20 +86986,20 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
if (!duk_unicode_is_identifier_part(x)) {
break;
}
- x = DUK__L0(); /* re-read to avoid spill / fetch */
+ x = DUK__L0(); /* re-read to avoid spill / fetch */
DUK__APPENDBUFFER(lex_ctx, x);
DUK__ADVANCECHARS(lex_ctx, 1);
}
out_token->str2 = duk__internbuffer(lex_ctx, lex_ctx->slot2_idx);
- DUK__INITBUFFER(lex_ctx); /* free some memory */
+ DUK__INITBUFFER(lex_ctx); /* free some memory */
/* validation of the regexp is caller's responsibility */
advtok = DUK__ADVTOK(0, DUK_TOK_REGEXP);
-#else /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
goto fail_regexp_support;
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
} else if (DUK__L1() == DUK_ASC_EQUALS) {
/* "/=" and not in regexp mode */
advtok = DUK__ADVTOK(2, DUK_TOK_DIV_EQ);
@@ -83553,25 +87008,25 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_DIV);
}
break;
- case DUK_ASC_LCURLY: /* '{' */
+ case DUK_ASC_LCURLY: /* '{' */
advtok = DUK__ADVTOK(1, DUK_TOK_LCURLY);
break;
- case DUK_ASC_RCURLY: /* '}' */
+ case DUK_ASC_RCURLY: /* '}' */
advtok = DUK__ADVTOK(1, DUK_TOK_RCURLY);
break;
- case DUK_ASC_LPAREN: /* '(' */
+ case DUK_ASC_LPAREN: /* '(' */
advtok = DUK__ADVTOK(1, DUK_TOK_LPAREN);
break;
- case DUK_ASC_RPAREN: /* ')' */
+ case DUK_ASC_RPAREN: /* ')' */
advtok = DUK__ADVTOK(1, DUK_TOK_RPAREN);
break;
- case DUK_ASC_LBRACKET: /* '[' */
+ case DUK_ASC_LBRACKET: /* '[' */
advtok = DUK__ADVTOK(1, DUK_TOK_LBRACKET);
break;
- case DUK_ASC_RBRACKET: /* ']' */
+ case DUK_ASC_RBRACKET: /* ']' */
advtok = DUK__ADVTOK(1, DUK_TOK_RBRACKET);
break;
- case DUK_ASC_PERIOD: /* '.' */
+ case DUK_ASC_PERIOD: /* '.' */
if (DUK__ISDIGIT(DUK__L1())) {
/* Period followed by a digit can only start DecimalLiteral
* (handled in slow path). We could jump straight into the
@@ -83582,13 +87037,13 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
}
advtok = DUK__ADVTOK(1, DUK_TOK_PERIOD);
break;
- case DUK_ASC_SEMICOLON: /* ';' */
+ case DUK_ASC_SEMICOLON: /* ';' */
advtok = DUK__ADVTOK(1, DUK_TOK_SEMICOLON);
break;
- case DUK_ASC_COMMA: /* ',' */
+ case DUK_ASC_COMMA: /* ',' */
advtok = DUK__ADVTOK(1, DUK_TOK_COMMA);
break;
- case DUK_ASC_LANGLE: /* '<' */
+ case DUK_ASC_LANGLE: /* '<' */
#if defined(DUK_USE_HTML_COMMENTS)
if (DUK__L1() == DUK_ASC_EXCLAMATION && DUK__L2() == DUK_ASC_MINUS && DUK__L3() == DUK_ASC_MINUS) {
/*
@@ -83597,11 +87052,10 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
/* DUK__ADVANCECHARS(lex_ctx, 4) would be correct here, but not necessary */
duk__lexer_skip_to_endofline(lex_ctx);
- goto restart; /* line terminator will be handled on next round */
- }
- else
-#endif /* DUK_USE_HTML_COMMENTS */
- if (DUK__L1() == DUK_ASC_LANGLE && DUK__L2() == DUK_ASC_EQUALS) {
+ goto restart; /* line terminator will be handled on next round */
+ } else
+#endif /* DUK_USE_HTML_COMMENTS */
+ if (DUK__L1() == DUK_ASC_LANGLE && DUK__L2() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(3, DUK_TOK_ALSHIFT_EQ);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(2, DUK_TOK_LE);
@@ -83611,7 +87065,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_LT);
}
break;
- case DUK_ASC_RANGLE: /* '>' */
+ case DUK_ASC_RANGLE: /* '>' */
if (DUK__L1() == DUK_ASC_RANGLE && DUK__L2() == DUK_ASC_RANGLE && DUK__L3() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(4, DUK_TOK_RSHIFT_EQ);
} else if (DUK__L1() == DUK_ASC_RANGLE && DUK__L2() == DUK_ASC_RANGLE) {
@@ -83626,7 +87080,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_GT);
}
break;
- case DUK_ASC_EQUALS: /* '=' */
+ case DUK_ASC_EQUALS: /* '=' */
if (DUK__L1() == DUK_ASC_EQUALS && DUK__L2() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(3, DUK_TOK_SEQ);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
@@ -83635,7 +87089,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_EQUALSIGN);
}
break;
- case DUK_ASC_EXCLAMATION: /* '!' */
+ case DUK_ASC_EXCLAMATION: /* '!' */
if (DUK__L1() == DUK_ASC_EQUALS && DUK__L2() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(3, DUK_TOK_SNEQ);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
@@ -83644,7 +87098,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_LNOT);
}
break;
- case DUK_ASC_PLUS: /* '+' */
+ case DUK_ASC_PLUS: /* '+' */
if (DUK__L1() == DUK_ASC_PLUS) {
advtok = DUK__ADVTOK(2, DUK_TOK_INCREMENT);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
@@ -83653,7 +87107,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_ADD);
}
break;
- case DUK_ASC_MINUS: /* '-' */
+ case DUK_ASC_MINUS: /* '-' */
#if defined(DUK_USE_HTML_COMMENTS)
if (got_lineterm && DUK__L1() == DUK_ASC_MINUS && DUK__L2() == DUK_ASC_RANGLE) {
/*
@@ -83670,10 +87124,10 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
/* DUK__ADVANCECHARS(lex_ctx, 3) would be correct here, but not necessary */
duk__lexer_skip_to_endofline(lex_ctx);
- goto restart; /* line terminator will be handled on next round */
+ goto restart; /* line terminator will be handled on next round */
} else
-#endif /* DUK_USE_HTML_COMMENTS */
- if (DUK__L1() == DUK_ASC_MINUS) {
+#endif /* DUK_USE_HTML_COMMENTS */
+ if (DUK__L1() == DUK_ASC_MINUS) {
advtok = DUK__ADVTOK(2, DUK_TOK_DECREMENT);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(2, DUK_TOK_SUB_EQ);
@@ -83681,7 +87135,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_SUB);
}
break;
- case DUK_ASC_STAR: /* '*' */
+ case DUK_ASC_STAR: /* '*' */
#if defined(DUK_USE_ES7_EXP_OPERATOR)
if (DUK__L1() == DUK_ASC_STAR && DUK__L2() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(3, DUK_TOK_EXP_EQ);
@@ -83689,20 +87143,20 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(2, DUK_TOK_EXP);
} else
#endif
- if (DUK__L1() == DUK_ASC_EQUALS) {
+ if (DUK__L1() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(2, DUK_TOK_MUL_EQ);
} else {
advtok = DUK__ADVTOK(1, DUK_TOK_MUL);
}
break;
- case DUK_ASC_PERCENT: /* '%' */
+ case DUK_ASC_PERCENT: /* '%' */
if (DUK__L1() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(2, DUK_TOK_MOD_EQ);
} else {
advtok = DUK__ADVTOK(1, DUK_TOK_MOD);
}
break;
- case DUK_ASC_AMP: /* '&' */
+ case DUK_ASC_AMP: /* '&' */
if (DUK__L1() == DUK_ASC_AMP) {
advtok = DUK__ADVTOK(2, DUK_TOK_LAND);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
@@ -83711,7 +87165,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_BAND);
}
break;
- case DUK_ASC_PIPE: /* '|' */
+ case DUK_ASC_PIPE: /* '|' */
if (DUK__L1() == DUK_ASC_PIPE) {
advtok = DUK__ADVTOK(2, DUK_TOK_LOR);
} else if (DUK__L1() == DUK_ASC_EQUALS) {
@@ -83720,41 +87174,41 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(1, DUK_TOK_BOR);
}
break;
- case DUK_ASC_CARET: /* '^' */
+ case DUK_ASC_CARET: /* '^' */
if (DUK__L1() == DUK_ASC_EQUALS) {
advtok = DUK__ADVTOK(2, DUK_TOK_BXOR_EQ);
} else {
advtok = DUK__ADVTOK(1, DUK_TOK_BXOR);
}
break;
- case DUK_ASC_TILDE: /* '~' */
+ case DUK_ASC_TILDE: /* '~' */
advtok = DUK__ADVTOK(1, DUK_TOK_BNOT);
break;
- case DUK_ASC_QUESTION: /* '?' */
+ case DUK_ASC_QUESTION: /* '?' */
advtok = DUK__ADVTOK(1, DUK_TOK_QUESTION);
break;
- case DUK_ASC_COLON: /* ':' */
+ case DUK_ASC_COLON: /* ':' */
advtok = DUK__ADVTOK(1, DUK_TOK_COLON);
break;
- case DUK_ASC_DOUBLEQUOTE: /* '"' */
- case DUK_ASC_SINGLEQUOTE: { /* '\'' */
+ case DUK_ASC_DOUBLEQUOTE: /* '"' */
+ case DUK_ASC_SINGLEQUOTE: { /* '\'' */
DUK__INITBUFFER(lex_ctx);
duk__lexer_parse_string_literal(lex_ctx, out_token, x /*quote*/, strict_mode);
duk__internbuffer(lex_ctx, lex_ctx->slot1_idx);
out_token->str1 = duk_known_hstring(lex_ctx->thr, lex_ctx->slot1_idx);
- DUK__INITBUFFER(lex_ctx); /* free some memory */
+ DUK__INITBUFFER(lex_ctx); /* free some memory */
advtok = DUK__ADVTOK(0, DUK_TOK_STRING);
break;
}
default:
goto slow_path;
- } /* switch */
+ } /* switch */
goto skip_slow_path;
- slow_path:
+slow_path:
if (duk_unicode_is_line_terminator(x)) {
if (x == 0x000d && DUK__L1() == 0x000a) {
/*
@@ -83845,7 +87299,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
str = out_token->str1;
out_token->t_nores = DUK_TOK_IDENTIFIER;
- DUK__INITBUFFER(lex_ctx); /* free some memory */
+ DUK__INITBUFFER(lex_ctx); /* free some memory */
/*
* Interned identifier is compared against reserved words, which are
@@ -83872,7 +87326,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
advtok = DUK__ADVTOK(0, DUK_TOK_IDENTIFIER);
if (out_token->num_escapes == 0) {
for (i = DUK_STRIDX_START_RESERVED; i < i_end; i++) {
- DUK_ASSERT_DISABLE(i >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(i >= 0); /* unsigned */
DUK_ASSERT(i < DUK_HEAP_NUM_STRINGS);
if (DUK_HTHREAD_GET_STRING(lex_ctx->thr, i) == str) {
advtok = DUK__ADVTOK(0, DUK_STRIDX_TO_TOK(i));
@@ -83907,11 +87361,11 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
duk_double_t val;
duk_bool_t legacy_oct = 0;
- duk_small_int_t state; /* 0=before period/exp,
- * 1=after period, before exp
- * 2=after exp, allow '+' or '-'
- * 3=after exp and exp sign
- */
+ duk_small_int_t state; /* 0=before period/exp,
+ * 1=after period, before exp
+ * 2=after exp, allow '+' or '-'
+ * 3=after exp and exp sign
+ */
duk_small_uint_t s2n_flags;
duk_codepoint_t y, z;
duk_small_int_t s2n_radix = 10;
@@ -83923,7 +87377,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
if (x == DUK_ASC_0) {
z = DUK_LOWERCASE_CHAR_ASCII(y);
- pre_adv = 2; /* default for 0xNNN, 0oNNN, 0bNNN. */
+ pre_adv = 2; /* default for 0xNNN, 0oNNN, 0bNNN. */
if (z == DUK_ASC_LC_X) {
s2n_radix = 16;
} else if (z == DUK_ASC_LC_O) {
@@ -83946,7 +87400,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
DUK__APPENDBUFFER(lex_ctx, x);
pre_adv = 1;
legacy_oct = 1;
- s2n_radix = 8; /* tentative unless conflicting digits found */
+ s2n_radix = 8; /* tentative unless conflicting digits found */
}
}
}
@@ -83960,7 +87414,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
*/
state = 0;
for (;;) {
- x = DUK__L0(); /* re-lookup curr char on first round */
+ x = DUK__L0(); /* re-lookup curr char on first round */
if (DUK__ISDIGIT(x)) {
/* Note: intentionally allow leading zeroes here, as the
* actual parser will check for them.
@@ -84013,11 +87467,8 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
/* For bases other than 10, integer only. */
s2n_flags = DUK_S2N_FLAG_ALLOW_LEADING_ZERO;
} else {
- s2n_flags = DUK_S2N_FLAG_ALLOW_EXP |
- DUK_S2N_FLAG_ALLOW_FRAC |
- DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
- DUK_S2N_FLAG_ALLOW_EMPTY_FRAC |
- DUK_S2N_FLAG_ALLOW_LEADING_ZERO;
+ s2n_flags = DUK_S2N_FLAG_ALLOW_EXP | DUK_S2N_FLAG_ALLOW_FRAC | DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
+ DUK_S2N_FLAG_ALLOW_EMPTY_FRAC | DUK_S2N_FLAG_ALLOW_LEADING_ZERO;
}
duk_dup(lex_ctx->thr, lex_ctx->slot1_idx);
@@ -84026,9 +87477,9 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
if (DUK_ISNAN(val)) {
goto fail_number_literal;
}
- duk_replace(lex_ctx->thr, lex_ctx->slot1_idx); /* could also just pop? */
+ duk_replace(lex_ctx->thr, lex_ctx->slot1_idx); /* could also just pop? */
- DUK__INITBUFFER(lex_ctx); /* free some memory */
+ DUK__INITBUFFER(lex_ctx); /* free some memory */
/* Section 7.8.3 (note): NumericLiteral must be followed by something other than
* IdentifierStart or DecimalDigit.
@@ -84048,7 +87499,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
} else {
goto fail_token;
}
- skip_slow_path:
+skip_slow_path:
/*
* Shared exit path
@@ -84073,32 +87524,32 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
return;
- fail_token_limit:
+fail_token_limit:
DUK_ERROR_RANGE(lex_ctx->thr, DUK_STR_TOKEN_LIMIT);
DUK_WO_NORETURN(return;);
- fail_token:
+fail_token:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_TOKEN);
DUK_WO_NORETURN(return;);
- fail_number_literal:
+fail_number_literal:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_NUMBER_LITERAL);
DUK_WO_NORETURN(return;);
- fail_escape:
+fail_escape:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_ESCAPE);
DUK_WO_NORETURN(return;);
- fail_unterm_regexp:
+fail_unterm_regexp:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_UNTERMINATED_REGEXP);
DUK_WO_NORETURN(return;);
- fail_unterm_comment:
+fail_unterm_comment:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_UNTERMINATED_COMMENT);
DUK_WO_NORETURN(return;);
#if !defined(DUK_USE_REGEXP_SUPPORT)
- fail_regexp_support:
+fail_regexp_support:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_REGEXP_SUPPORT_DISABLED);
DUK_WO_NORETURN(return;);
#endif
@@ -84116,7 +87567,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
*/
DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token *out_token) {
- duk_small_uint_t advtok = 0; /* init is unnecessary but suppresses "may be used uninitialized" warnings */
+ duk_small_uint_t advtok = 0; /* init is unnecessary but suppresses "may be used uninitialized" warnings */
duk_codepoint_t x, y;
if (++lex_ctx->token_count >= lex_ctx->token_limit) {
@@ -84194,7 +87645,7 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
#endif
for (;;) {
- DUK__ADVANCECHARS(lex_ctx, 1); /* eat '{' on entry */
+ DUK__ADVANCECHARS(lex_ctx, 1); /* eat '{' on entry */
x = DUK__L0();
if (DUK__ISDIGIT(x)) {
digits++;
@@ -84218,7 +87669,7 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
}
val2 = val1;
val1 = 0;
- digits = 0; /* not strictly necessary because of lookahead '}' above */
+ digits = 0; /* not strictly necessary because of lookahead '}' above */
} else if (x == DUK_ASC_RCURLY) {
if (digits > DUK__MAX_RE_QUANT_DIGITS) {
goto invalid_quantifier;
@@ -84249,7 +87700,7 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
}
advtok = DUK__ADVTOK(0, DUK_RETOK_QUANTIFIER);
break;
- invalid_quantifier:
+ invalid_quantifier:
#if defined(DUK_USE_ES6_REGEXP_SYNTAX)
/* Failed to match the quantifier, restore lexer and parse
* opening brace as a literal.
@@ -84275,7 +87726,7 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
* ES2015 Annex B relaxes the rules to allow these (and other) real world forms.
*/
- advtok = DUK__ADVTOK(2, DUK_RETOK_ATOM_CHAR); /* default: char escape (two chars) */
+ advtok = DUK__ADVTOK(2, DUK_RETOK_ATOM_CHAR); /* default: char escape (two chars) */
if (y == DUK_ASC_LC_B) {
advtok = DUK__ADVTOK(2, DUK_RETOK_ASSERT_WORD_BOUNDARY);
} else if (y == DUK_ASC_UC_B) {
@@ -84292,8 +87743,7 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
out_token->num = 0x000b;
} else if (y == DUK_ASC_LC_C) {
x = DUK__L2();
- if ((x >= DUK_ASC_LC_A && x <= DUK_ASC_LC_Z) ||
- (x >= DUK_ASC_UC_A && x <= DUK_ASC_UC_Z)) {
+ if ((x >= DUK_ASC_LC_A && x <= DUK_ASC_LC_Z) || (x >= DUK_ASC_UC_A && x <= DUK_ASC_UC_Z)) {
out_token->num = (duk_uint32_t) (x % 32);
advtok = DUK__ADVTOK(3, DUK_RETOK_ATOM_CHAR);
} else {
@@ -84331,11 +87781,11 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
/* XXX: shared parsing? */
duk_uint32_t val = 0;
duk_small_int_t i;
- for (i = 0; ; i++) {
+ for (i = 0;; i++) {
if (i >= DUK__MAX_RE_DECESC_DIGITS) {
goto fail_escape;
}
- DUK__ADVANCECHARS(lex_ctx, 1); /* eat backslash on entry */
+ DUK__ADVANCECHARS(lex_ctx, 1); /* eat backslash on entry */
x = DUK__L0();
if (!DUK__ISDIGIT(x)) {
break;
@@ -84355,17 +87805,15 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
* This is not yet full ES2015 Annex B because cases above
* (like hex escape) won't backtrack.
*/
- DUK_ASSERT(y != DUK_ASC_LC_C); /* covered above */
-#else /* DUK_USE_ES6_REGEXP_SYNTAX */
- } else if ((y >= 0 && !duk_unicode_is_identifier_part(y)) ||
- y == DUK_UNICODE_CP_ZWNJ ||
- y == DUK_UNICODE_CP_ZWJ) {
+ DUK_ASSERT(y != DUK_ASC_LC_C); /* covered above */
+#else /* DUK_USE_ES6_REGEXP_SYNTAX */
+ } else if ((y >= 0 && !duk_unicode_is_identifier_part(y)) || y == DUK_UNICODE_CP_ZWNJ || y == DUK_UNICODE_CP_ZWJ) {
/* For ES5.1 identity escapes are not allowed for identifier
* parts. This conflicts with a lot of real world code as this
* doesn't e.g. allow escaping a dollar sign as /\$/, see
* test-regexp-identity-escape-dollar.js.
*/
-#endif /* DUK_USE_ES6_REGEXP_SYNTAX */
+#endif /* DUK_USE_ES6_REGEXP_SYNTAX */
out_token->num = (duk_uint32_t) y;
} else {
goto fail_escape;
@@ -84446,24 +87894,24 @@ DUK_INTERNAL void duk_lexer_parse_re_token(duk_lexer_ctx *lex_ctx, duk_re_token
out_token->t = advtok & 0xff;
return;
- fail_token_limit:
+fail_token_limit:
DUK_ERROR_RANGE(lex_ctx->thr, DUK_STR_TOKEN_LIMIT);
DUK_WO_NORETURN(return;);
- fail_escape:
+fail_escape:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_REGEXP_ESCAPE);
DUK_WO_NORETURN(return;);
- fail_group:
+fail_group:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_REGEXP_GROUP);
DUK_WO_NORETURN(return;);
#if !defined(DUK_USE_ES6_REGEXP_SYNTAX)
- fail_invalid_char:
+fail_invalid_char:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_REGEXP_CHARACTER);
DUK_WO_NORETURN(return;);
- fail_quantifier:
+fail_quantifier:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_QUANTIFIER);
DUK_WO_NORETURN(return;);
#endif
@@ -84522,7 +87970,7 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
x = DUK__L0();
- ch = -1; /* not strictly necessary, but avoids "uninitialized variable" warnings */
+ ch = -1; /* not strictly necessary, but avoids "uninitialized variable" warnings */
DUK_UNREF(ch);
if (x < 0) {
@@ -84531,7 +87979,7 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
if (start >= 0) {
gen_range(userdata, start, start, 0);
}
- DUK__ADVANCECHARS(lex_ctx, 1); /* eat ']' before finishing */
+ DUK__ADVANCECHARS(lex_ctx, 1); /* eat ']' before finishing */
break;
} else if (x == DUK_ASC_MINUS) {
if (start >= 0 && !dash && DUK__L1() != DUK_ASC_RBRACKET) {
@@ -84576,8 +88024,7 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
} else if (x == DUK_ASC_LC_C) {
x = DUK__L2();
adv = 3;
- if ((x >= DUK_ASC_LC_A && x <= DUK_ASC_LC_Z) ||
- (x >= DUK_ASC_UC_A && x <= DUK_ASC_UC_Z)) {
+ if ((x >= DUK_ASC_LC_A && x <= DUK_ASC_LC_Z) || (x >= DUK_ASC_UC_A && x <= DUK_ASC_UC_Z)) {
ch = (x % 32);
} else {
goto fail_escape;
@@ -84641,7 +88088,7 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
#if defined(DUK_USE_ES6_REGEXP_SYNTAX)
ch = duk__lexer_parse_legacy_octal(lex_ctx, &adv, 0 /*reject_annex_b*/);
- DUK_ASSERT(ch >= 0); /* no rejections */
+ DUK_ASSERT(ch >= 0); /* no rejections */
#else
if (x == DUK_ASC_0 && !DUK__ISDIGIT(DUK__L2())) {
ch = 0x0000;
@@ -84656,7 +88103,7 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
* EOF here.
*/
ch = x;
-#else /* DUK_USE_ES6_REGEXP_SYNTAX */
+#else /* DUK_USE_ES6_REGEXP_SYNTAX */
} else if (!duk_unicode_is_identifier_part(x)) {
/* IdentityEscape: ES5.1 doesn't allow identity escape
* for identifier part characters, which conflicts with
@@ -84664,7 +88111,7 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
* /[\$]/ which is awkward.
*/
ch = x;
-#endif /* DUK_USE_ES6_REGEXP_SYNTAX */
+#endif /* DUK_USE_ES6_REGEXP_SYNTAX */
} else {
goto fail_escape;
}
@@ -84712,20 +88159,20 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
return;
- fail_escape:
+fail_escape:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_REGEXP_ESCAPE);
DUK_WO_NORETURN(return;);
- fail_range:
+fail_range:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_INVALID_RANGE);
DUK_WO_NORETURN(return;);
- fail_unterm_charclass:
+fail_unterm_charclass:
DUK_ERROR_SYNTAX(lex_ctx->thr, DUK_STR_UNTERMINATED_CHARCLASS);
DUK_WO_NORETURN(return;);
}
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/* automatic undefs */
#undef DUK__ADVANCEBYTES
@@ -84762,10 +88209,10 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
/* #include duk_internal.h -> already included */
-#define DUK__IEEE_DOUBLE_EXP_BIAS 1023
-#define DUK__IEEE_DOUBLE_EXP_MIN (-1022) /* biased exp == 0 -> denormal, exp -1022 */
+#define DUK__IEEE_DOUBLE_EXP_BIAS 1023
+#define DUK__IEEE_DOUBLE_EXP_MIN (-1022) /* biased exp == 0 -> denormal, exp -1022 */
-#define DUK__DIGITCHAR(x) duk_lc_digits[(x)]
+#define DUK__DIGITCHAR(x) duk_lc_digits[(x)]
/*
* Tables generated with util/gennumdigits.py.
@@ -84783,10 +88230,10 @@ DUK_INTERNAL void duk_lexer_parse_re_ranges(duk_lexer_ctx *lex_ctx, duk_re_range
*/
DUK_LOCAL const duk_uint8_t duk__str2num_digits_for_radix[] = {
- 69, 44, 35, 30, 27, 25, 23, 22, 20, 20, /* 2 to 11 */
- 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, /* 12 to 21 */
- 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, /* 22 to 31 */
- 14, 14, 14, 14, 14 /* 31 to 36 */
+ 69, 44, 35, 30, 27, 25, 23, 22, 20, 20, /* 2 to 11 */
+ 20, 19, 19, 18, 18, 17, 17, 17, 16, 16, /* 12 to 21 */
+ 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, /* 22 to 31 */
+ 14, 14, 14, 14, 14 /* 31 to 36 */
};
typedef struct {
@@ -84795,15 +88242,11 @@ typedef struct {
} duk__exp_limits;
DUK_LOCAL const duk__exp_limits duk__str2num_exp_limits[] = {
- { 957, -1147 }, { 605, -725 }, { 479, -575 }, { 414, -496 },
- { 372, -446 }, { 342, -411 }, { 321, -384 }, { 304, -364 },
- { 291, -346 }, { 279, -334 }, { 268, -323 }, { 260, -312 },
- { 252, -304 }, { 247, -296 }, { 240, -289 }, { 236, -283 },
- { 231, -278 }, { 227, -273 }, { 223, -267 }, { 220, -263 },
- { 216, -260 }, { 213, -256 }, { 210, -253 }, { 208, -249 },
- { 205, -246 }, { 203, -244 }, { 201, -241 }, { 198, -239 },
- { 196, -237 }, { 195, -234 }, { 193, -232 }, { 191, -230 },
- { 190, -228 }, { 188, -226 }, { 187, -225 },
+ { 957, -1147 }, { 605, -725 }, { 479, -575 }, { 414, -496 }, { 372, -446 }, { 342, -411 }, { 321, -384 },
+ { 304, -364 }, { 291, -346 }, { 279, -334 }, { 268, -323 }, { 260, -312 }, { 252, -304 }, { 247, -296 },
+ { 240, -289 }, { 236, -283 }, { 231, -278 }, { 227, -273 }, { 223, -267 }, { 220, -263 }, { 216, -260 },
+ { 213, -256 }, { 210, -253 }, { 208, -249 }, { 205, -246 }, { 203, -244 }, { 201, -241 }, { 198, -239 },
+ { 196, -237 }, { 195, -234 }, { 193, -232 }, { 191, -230 }, { 190, -228 }, { 188, -226 }, { 187, -225 },
};
/*
@@ -84821,18 +88264,18 @@ DUK_LOCAL const duk__exp_limits duk__str2num_exp_limits[] = {
/* This upper value has been experimentally determined; debug build will check
* bigint size with assertions.
*/
-#define DUK__BI_MAX_PARTS 37 /* 37x32 = 1184 bits */
+#define DUK__BI_MAX_PARTS 37 /* 37x32 = 1184 bits */
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 2)
-#define DUK__BI_PRINT(name,x) duk__bi_print((name),(x))
+#define DUK__BI_PRINT(name, x) duk__bi_print((name), (x))
#else
-#define DUK__BI_PRINT(name,x)
+#define DUK__BI_PRINT(name, x)
#endif
/* Current size is about 152 bytes. */
typedef struct {
duk_small_int_t n;
- duk_uint32_t v[DUK__BI_MAX_PARTS]; /* low to high */
+ duk_uint32_t v[DUK__BI_MAX_PARTS]; /* low to high */
} duk__bigint;
#if defined(DUK_USE_DEBUG_LEVEL) && (DUK_USE_DEBUG_LEVEL >= 2)
@@ -84857,9 +88300,8 @@ DUK_LOCAL void duk__bi_print(const char *name, duk__bigint *x) {
#if defined(DUK_USE_ASSERTIONS)
DUK_LOCAL duk_small_int_t duk__bi_is_valid(duk__bigint *x) {
- return (duk_small_int_t)
- ( ((x->n >= 0) && (x->n <= DUK__BI_MAX_PARTS)) /* is valid size */ &&
- ((x->n == 0) || (x->v[x->n - 1] != 0)) /* is normalized */ );
+ return (duk_small_int_t) (((x->n >= 0) && (x->n <= DUK__BI_MAX_PARTS)) /* is valid size */ &&
+ ((x->n == 0) || (x->v[x->n - 1] != 0)) /* is normalized */);
}
#endif
@@ -84930,10 +88372,10 @@ DUK_LOCAL int duk__bi_compare(duk__bigint *x, duk__bigint *y) {
return 0;
- ret_gt:
+ret_gt:
return 1;
- ret_lt:
+ret_lt:
return -1;
}
@@ -84948,11 +88390,14 @@ DUK_LOCAL void duk__bi_add(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
if (z->n > y->n) {
duk__bigint *t;
- t = y; y = z; z = t;
+ t = y;
+ y = z;
+ z = t;
}
DUK_ASSERT(y->n >= z->n);
- ny = y->n; nz = z->n;
+ ny = y->n;
+ nz = z->n;
tmp = 0U;
for (i = 0; i < ny; i++) {
DUK_ASSERT(i < DUK__BI_MAX_PARTS);
@@ -84973,7 +88418,7 @@ DUK_LOCAL void duk__bi_add(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
/* no need to normalize */
DUK_ASSERT(duk__bi_is_valid(x));
}
-#else /* DUK_USE_64BIT_OPS */
+#else /* DUK_USE_64BIT_OPS */
DUK_LOCAL void duk__bi_add(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
duk_uint32_t carry, tmp1, tmp2;
duk_small_int_t i, ny, nz;
@@ -84983,11 +88428,14 @@ DUK_LOCAL void duk__bi_add(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
if (z->n > y->n) {
duk__bigint *t;
- t = y; y = z; z = t;
+ t = y;
+ y = z;
+ z = t;
}
DUK_ASSERT(y->n >= z->n);
- ny = y->n; nz = z->n;
+ ny = y->n;
+ nz = z->n;
carry = 0U;
for (i = 0; i < ny; i++) {
/* Carry is detected based on wrapping which relies on exact 32-bit
@@ -85024,7 +88472,7 @@ DUK_LOCAL void duk__bi_add(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
/* no need to normalize */
DUK_ASSERT(duk__bi_is_valid(x));
}
-#endif /* DUK_USE_64BIT_OPS */
+#endif /* DUK_USE_64BIT_OPS */
/* x <- y + z */
DUK_LOCAL void duk__bi_add_small(duk__bigint *x, duk__bigint *y, duk_uint32_t z) {
@@ -85039,7 +88487,7 @@ DUK_LOCAL void duk__bi_add_small(duk__bigint *x, duk__bigint *y, duk_uint32_t z)
DUK_ASSERT(duk__bi_is_valid(x));
}
-#if 0 /* unused */
+#if 0 /* unused */
/* x <- x + y, use t as temp */
DUK_LOCAL void duk__bi_add_copy(duk__bigint *x, duk__bigint *y, duk__bigint *t) {
duk__bi_add(t, x, y);
@@ -85059,7 +88507,8 @@ DUK_LOCAL void duk__bi_sub(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
DUK_ASSERT(duk__bi_compare(y, z) >= 0);
DUK_ASSERT(y->n >= z->n);
- ny = y->n; nz = z->n;
+ ny = y->n;
+ nz = z->n;
tmp = 0;
for (i = 0; i < ny; i++) {
ty = y->v[i];
@@ -85070,12 +88519,12 @@ DUK_LOCAL void duk__bi_sub(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
}
tmp = (duk_int64_t) ty - (duk_int64_t) tz + tmp;
x->v[i] = (duk_uint32_t) ((duk_uint64_t) tmp & 0xffffffffUL);
- tmp = tmp >> 32; /* 0 or -1 */
+ tmp = tmp >> 32; /* 0 or -1 */
}
DUK_ASSERT(tmp == 0);
x->n = i;
- duk__bi_normalize(x); /* need to normalize, may even cancel to 0 */
+ duk__bi_normalize(x); /* need to normalize, may even cancel to 0 */
DUK_ASSERT(duk__bi_is_valid(x));
}
#else
@@ -85088,7 +88537,8 @@ DUK_LOCAL void duk__bi_sub(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
DUK_ASSERT(duk__bi_compare(y, z) >= 0);
DUK_ASSERT(y->n >= z->n);
- ny = y->n; nz = z->n;
+ ny = y->n;
+ nz = z->n;
borrow = 0U;
for (i = 0; i < ny; i++) {
/* Borrow is detected based on wrapping which relies on exact 32-bit
@@ -85116,12 +88566,12 @@ DUK_LOCAL void duk__bi_sub(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
DUK_ASSERT(borrow == 0U);
x->n = i;
- duk__bi_normalize(x); /* need to normalize, may even cancel to 0 */
+ duk__bi_normalize(x); /* need to normalize, may even cancel to 0 */
DUK_ASSERT(duk__bi_is_valid(x));
}
#endif
-#if 0 /* unused */
+#if 0 /* unused */
/* x <- y - z */
DUK_LOCAL void duk__bi_sub_small(duk__bigint *x, duk__bigint *y, duk_uint32_t z) {
duk__bigint tmp;
@@ -85149,7 +88599,7 @@ DUK_LOCAL void duk__bi_mul(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
DUK_ASSERT(duk__bi_is_valid(y));
DUK_ASSERT(duk__bi_is_valid(z));
- nx = y->n + z->n; /* max possible */
+ nx = y->n + z->n; /* max possible */
DUK_ASSERT(nx <= DUK__BI_MAX_PARTS);
if (nx == 0) {
@@ -85168,15 +88618,15 @@ DUK_LOCAL void duk__bi_mul(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
#if defined(DUK_USE_64BIT_OPS)
duk_uint64_t tmp = 0U;
for (j = 0; j < nz; j++) {
- tmp += (duk_uint64_t) y->v[i] * (duk_uint64_t) z->v[j] + x->v[i+j];
- x->v[i+j] = (duk_uint32_t) (tmp & 0xffffffffUL);
+ tmp += (duk_uint64_t) y->v[i] * (duk_uint64_t) z->v[j] + x->v[i + j];
+ x->v[i + j] = (duk_uint32_t) (tmp & 0xffffffffUL);
tmp = tmp >> 32;
}
if (tmp > 0) {
DUK_ASSERT(i + j < nx);
DUK_ASSERT(i + j < DUK__BI_MAX_PARTS);
- DUK_ASSERT(x->v[i+j] == 0U);
- x->v[i+j] = (duk_uint32_t) tmp;
+ DUK_ASSERT(x->v[i + j] == 0U);
+ x->v[i + j] = (duk_uint32_t) tmp;
}
#else
/*
@@ -85196,12 +88646,16 @@ DUK_LOCAL void duk__bi_mul(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
duk_uint32_t a, b, c, d, e, f;
duk_uint32_t r, s, t;
- a = y->v[i]; b = a & 0xffffUL; a = a >> 16;
+ a = y->v[i];
+ b = a & 0xffffUL;
+ a = a >> 16;
f = 0;
for (j = 0; j < nz; j++) {
- c = z->v[j]; d = c & 0xffffUL; c = c >> 16;
- e = x->v[i+j];
+ c = z->v[j];
+ d = c & 0xffffUL;
+ c = c >> 16;
+ e = x->v[i + j];
/* build result as: (r << 32) + s: start with (BD + E + F) */
r = 0;
@@ -85209,26 +88663,34 @@ DUK_LOCAL void duk__bi_mul(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
/* add E */
t = s + e;
- if (t < s) { r++; } /* carry */
+ if (t < s) {
+ r++;
+ } /* carry */
s = t;
/* add F */
t = s + f;
- if (t < s) { r++; } /* carry */
+ if (t < s) {
+ r++;
+ } /* carry */
s = t;
/* add BC*2^16 */
t = b * c;
r += (t >> 16);
t = s + ((t & 0xffffUL) << 16);
- if (t < s) { r++; } /* carry */
+ if (t < s) {
+ r++;
+ } /* carry */
s = t;
/* add AD*2^16 */
t = a * d;
r += (t >> 16);
t = s + ((t & 0xffffUL) << 16);
- if (t < s) { r++; } /* carry */
+ if (t < s) {
+ r++;
+ } /* carry */
s = t;
/* add AC*2^32 */
@@ -85236,20 +88698,22 @@ DUK_LOCAL void duk__bi_mul(duk__bigint *x, duk__bigint *y, duk__bigint *z) {
r += t;
DUK_DDD(DUK_DDDPRINT("ab=%08lx cd=%08lx ef=%08lx -> rs=%08lx %08lx",
- (unsigned long) y->v[i], (unsigned long) z->v[j],
- (unsigned long) x->v[i+j], (unsigned long) r,
+ (unsigned long) y->v[i],
+ (unsigned long) z->v[j],
+ (unsigned long) x->v[i + j],
+ (unsigned long) r,
(unsigned long) s));
- x->v[i+j] = s;
+ x->v[i + j] = s;
f = r;
}
if (f > 0U) {
DUK_ASSERT(i + j < nx);
DUK_ASSERT(i + j < DUK__BI_MAX_PARTS);
- DUK_ASSERT(x->v[i+j] == 0U);
- x->v[i+j] = (duk_uint32_t) f;
+ DUK_ASSERT(x->v[i + j] == 0U);
+ x->v[i + j] = (duk_uint32_t) f;
}
-#endif /* DUK_USE_64BIT_OPS */
+#endif /* DUK_USE_64BIT_OPS */
}
duk__bi_normalize(x);
@@ -85288,7 +88752,7 @@ DUK_LOCAL int duk__bi_is_even(duk__bigint *x) {
DUK_LOCAL int duk__bi_is_zero(duk__bigint *x) {
DUK_ASSERT(duk__bi_is_valid(x));
- return (x->n == 0); /* this is the case for normalized numbers */
+ return (x->n == 0); /* this is the case for normalized numbers */
}
/* Bigint is 2^52. Used to detect normalized IEEE double mantissa values
@@ -85299,8 +88763,7 @@ DUK_LOCAL int duk__bi_is_zero(duk__bigint *x) {
*/
DUK_LOCAL duk_small_int_t duk__bi_is_2to52(duk__bigint *x) {
DUK_ASSERT(duk__bi_is_valid(x));
- return (duk_small_int_t)
- (x->n == 2) && (x->v[0] == 0U) && (x->v[1] == (1U << (52-32)));
+ return (duk_small_int_t) (x->n == 2) && (x->v[0] == 0U) && (x->v[1] == (1U << (52 - 32)));
}
/* x <- (1<<y) */
@@ -85319,7 +88782,7 @@ DUK_LOCAL void duk__bi_twoexp(duk__bigint *x, duk_small_int_t y) {
DUK_LOCAL void duk__bi_exp_small(duk__bigint *x, duk_small_int_t b, duk_small_int_t y, duk__bigint *t1, duk__bigint *t2) {
/* Fast path the binary case */
- DUK_ASSERT(x != t1 && x != t2 && t1 != t2); /* distinct bignums, easy mistake to make */
+ DUK_ASSERT(x != t1 && x != t2 && t1 != t2); /* distinct bignums, easy mistake to make */
DUK_ASSERT(b >= 0);
DUK_ASSERT(y >= 0);
@@ -85374,14 +88837,14 @@ DUK_LOCAL void duk__bi_exp_small(duk__bigint *x, duk_small_int_t b, duk_small_in
*/
/* Maximum number of digits generated. */
-#define DUK__MAX_OUTPUT_DIGITS 1040 /* (Number.MAX_VALUE).toString(2).length == 1024, + slack */
+#define DUK__MAX_OUTPUT_DIGITS 1040 /* (Number.MAX_VALUE).toString(2).length == 1024, + slack */
/* Maximum number of characters in formatted value. */
-#define DUK__MAX_FORMATTED_LENGTH 1040 /* (-Number.MAX_VALUE).toString(2).length == 1025, + slack */
+#define DUK__MAX_FORMATTED_LENGTH 1040 /* (-Number.MAX_VALUE).toString(2).length == 1025, + slack */
/* Number and (minimum) size of bigints in the nc_ctx structure. */
-#define DUK__NUMCONV_CTX_NUM_BIGINTS 7
-#define DUK__NUMCONV_CTX_BIGINTS_SIZE (sizeof(duk__bigint) * DUK__NUMCONV_CTX_NUM_BIGINTS)
+#define DUK__NUMCONV_CTX_NUM_BIGINTS 7
+#define DUK__NUMCONV_CTX_BIGINTS_SIZE (sizeof(duk__bigint) * DUK__NUMCONV_CTX_NUM_BIGINTS)
typedef struct {
/* Currently about 7*152 = 1064 bytes. The space for these
@@ -85391,31 +88854,32 @@ typedef struct {
*/
duk__bigint f, r, s, mp, mm, t1, t2;
- duk_small_int_t is_s2n; /* if 1, doing a string-to-number; else doing a number-to-string */
- duk_small_int_t is_fixed; /* if 1, doing a fixed format output (not free format) */
- duk_small_int_t req_digits; /* requested number of output digits; 0 = free-format */
- duk_small_int_t abs_pos; /* digit position is absolute, not relative */
- duk_small_int_t e; /* exponent for 'f' */
- duk_small_int_t b; /* input radix */
- duk_small_int_t B; /* output radix */
- duk_small_int_t k; /* see algorithm */
- duk_small_int_t low_ok; /* see algorithm */
- duk_small_int_t high_ok; /* see algorithm */
- duk_small_int_t unequal_gaps; /* m+ != m- (very rarely) */
+ duk_small_int_t is_s2n; /* if 1, doing a string-to-number; else doing a number-to-string */
+ duk_small_int_t is_fixed; /* if 1, doing a fixed format output (not free format) */
+ duk_small_int_t req_digits; /* requested number of output digits; 0 = free-format */
+ duk_small_int_t abs_pos; /* digit position is absolute, not relative */
+ duk_small_int_t e; /* exponent for 'f' */
+ duk_small_int_t b; /* input radix */
+ duk_small_int_t B; /* output radix */
+ duk_small_int_t k; /* see algorithm */
+ duk_small_int_t low_ok; /* see algorithm */
+ duk_small_int_t high_ok; /* see algorithm */
+ duk_small_int_t unequal_gaps; /* m+ != m- (very rarely) */
/* Buffer used for generated digits, values are in the range [0,B-1]. */
duk_uint8_t digits[DUK__MAX_OUTPUT_DIGITS];
- duk_small_int_t count; /* digit count */
+ duk_small_int_t count; /* digit count */
} duk__numconv_stringify_ctx;
/* Note: computes with 'idx' in assertions, so caller beware.
* 'idx' is preincremented, i.e. '1' on first call, because it
* is more convenient for the caller.
*/
-#define DUK__DRAGON4_OUTPUT_PREINC(nc_ctx,preinc_idx,x) do { \
- DUK_ASSERT((preinc_idx) - 1 >= 0); \
- DUK_ASSERT((preinc_idx) - 1 < DUK__MAX_OUTPUT_DIGITS); \
- ((nc_ctx)->digits[(preinc_idx) - 1]) = (duk_uint8_t) (x); \
+#define DUK__DRAGON4_OUTPUT_PREINC(nc_ctx, preinc_idx, x) \
+ do { \
+ DUK_ASSERT((preinc_idx) -1 >= 0); \
+ DUK_ASSERT((preinc_idx) -1 < DUK__MAX_OUTPUT_DIGITS); \
+ ((nc_ctx)->digits[(preinc_idx) -1]) = (duk_uint8_t) (x); \
} while (0)
DUK_LOCAL duk_size_t duk__dragon4_format_uint32(duk_uint8_t *buf, duk_uint32_t x, duk_small_int_t radix) {
@@ -85514,11 +88978,11 @@ DUK_LOCAL void duk__dragon4_prepare(duk__numconv_stringify_ctx *nc_ctx) {
"lowest mantissa value for this exponent -> "
"unequal gaps"));
- duk__bi_exp_small(&nc_ctx->mm, nc_ctx->b, nc_ctx->e, &nc_ctx->t1, &nc_ctx->t2); /* mm <- b^e */
- duk__bi_mul_small(&nc_ctx->mp, &nc_ctx->mm, (duk_uint32_t) nc_ctx->b); /* mp <- b^(e+1) */
+ duk__bi_exp_small(&nc_ctx->mm, nc_ctx->b, nc_ctx->e, &nc_ctx->t1, &nc_ctx->t2); /* mm <- b^e */
+ duk__bi_mul_small(&nc_ctx->mp, &nc_ctx->mm, (duk_uint32_t) nc_ctx->b); /* mp <- b^(e+1) */
duk__bi_mul_small(&nc_ctx->t1, &nc_ctx->f, 2);
- duk__bi_mul(&nc_ctx->r, &nc_ctx->t1, &nc_ctx->mp); /* r <- (2 * f) * b^(e+1) */
- duk__bi_set_small(&nc_ctx->s, (duk_uint32_t) (nc_ctx->b * 2)); /* s <- 2 * b */
+ duk__bi_mul(&nc_ctx->r, &nc_ctx->t1, &nc_ctx->mp); /* r <- (2 * f) * b^(e+1) */
+ duk__bi_set_small(&nc_ctx->s, (duk_uint32_t) (nc_ctx->b * 2)); /* s <- 2 * b */
nc_ctx->unequal_gaps = 1;
} else {
/* (>= e 0) AND (not (= f (expt b (- p 1))))
@@ -85538,11 +89002,11 @@ DUK_LOCAL void duk__dragon4_prepare(duk__numconv_stringify_ctx *nc_ctx) {
"not lowest mantissa for this exponent -> "
"equal gaps"));
- duk__bi_exp_small(&nc_ctx->mm, nc_ctx->b, nc_ctx->e, &nc_ctx->t1, &nc_ctx->t2); /* mm <- b^e */
- duk__bi_copy(&nc_ctx->mp, &nc_ctx->mm); /* mp <- b^e */
+ duk__bi_exp_small(&nc_ctx->mm, nc_ctx->b, nc_ctx->e, &nc_ctx->t1, &nc_ctx->t2); /* mm <- b^e */
+ duk__bi_copy(&nc_ctx->mp, &nc_ctx->mm); /* mp <- b^e */
duk__bi_mul_small(&nc_ctx->t1, &nc_ctx->f, 2);
- duk__bi_mul(&nc_ctx->r, &nc_ctx->t1, &nc_ctx->mp); /* r <- (2 * f) * b^e */
- duk__bi_set_small(&nc_ctx->s, 2); /* s <- 2 */
+ duk__bi_mul(&nc_ctx->r, &nc_ctx->t1, &nc_ctx->mp); /* r <- (2 * f) * b^e */
+ duk__bi_set_small(&nc_ctx->s, 2); /* s <- 2 */
}
} else {
/* When doing string-to-number, lowest_mantissa is always 0 so
@@ -85564,9 +89028,13 @@ DUK_LOCAL void duk__dragon4_prepare(duk__numconv_stringify_ctx *nc_ctx) {
"lowest mantissa for this exponent -> "
"unequal gaps"));
- duk__bi_mul_small(&nc_ctx->r, &nc_ctx->f, (duk_uint32_t) (nc_ctx->b * 2)); /* r <- (2 * b) * f */
- duk__bi_exp_small(&nc_ctx->t1, nc_ctx->b, 1 - nc_ctx->e, &nc_ctx->s, &nc_ctx->t2); /* NB: use 's' as temp on purpose */
- duk__bi_mul_small(&nc_ctx->s, &nc_ctx->t1, 2); /* s <- b^(1-e) * 2 */
+ duk__bi_mul_small(&nc_ctx->r, &nc_ctx->f, (duk_uint32_t) (nc_ctx->b * 2)); /* r <- (2 * b) * f */
+ duk__bi_exp_small(&nc_ctx->t1,
+ nc_ctx->b,
+ 1 - nc_ctx->e,
+ &nc_ctx->s,
+ &nc_ctx->t2); /* NB: use 's' as temp on purpose */
+ duk__bi_mul_small(&nc_ctx->s, &nc_ctx->t1, 2); /* s <- b^(1-e) * 2 */
duk__bi_set_small(&nc_ctx->mp, 2);
duk__bi_set_small(&nc_ctx->mm, 1);
nc_ctx->unequal_gaps = 1;
@@ -85585,9 +89053,13 @@ DUK_LOCAL void duk__dragon4_prepare(duk__numconv_stringify_ctx *nc_ctx) {
"lowest mantissa for this exponent -> "
"equal gaps"));
- duk__bi_mul_small(&nc_ctx->r, &nc_ctx->f, 2); /* r <- 2 * f */
- duk__bi_exp_small(&nc_ctx->t1, nc_ctx->b, -nc_ctx->e, &nc_ctx->s, &nc_ctx->t2); /* NB: use 's' as temp on purpose */
- duk__bi_mul_small(&nc_ctx->s, &nc_ctx->t1, 2); /* s <- b^(-e) * 2 */
+ duk__bi_mul_small(&nc_ctx->r, &nc_ctx->f, 2); /* r <- 2 * f */
+ duk__bi_exp_small(&nc_ctx->t1,
+ nc_ctx->b,
+ -nc_ctx->e,
+ &nc_ctx->s,
+ &nc_ctx->t2); /* NB: use 's' as temp on purpose */
+ duk__bi_mul_small(&nc_ctx->s, &nc_ctx->t1, 2); /* s <- b^(-e) * 2 */
duk__bi_set_small(&nc_ctx->mp, 1);
duk__bi_set_small(&nc_ctx->mm, 1);
}
@@ -85619,8 +89091,8 @@ DUK_LOCAL void duk__dragon4_scale(duk__numconv_stringify_ctx *nc_ctx) {
* impact for very large and very small numbers.
*/
- DUK_DDD(DUK_DDDPRINT("scale: B=%ld, low_ok=%ld, high_ok=%ld",
- (long) nc_ctx->B, (long) nc_ctx->low_ok, (long) nc_ctx->high_ok));
+ DUK_DDD(
+ DUK_DDDPRINT("scale: B=%ld, low_ok=%ld, high_ok=%ld", (long) nc_ctx->B, (long) nc_ctx->low_ok, (long) nc_ctx->high_ok));
DUK__BI_PRINT("r(init)", &nc_ctx->r);
DUK__BI_PRINT("s(init)", &nc_ctx->s);
DUK__BI_PRINT("mp(init)", &nc_ctx->mp);
@@ -85633,7 +89105,7 @@ DUK_LOCAL void duk__dragon4_scale(duk__numconv_stringify_ctx *nc_ctx) {
DUK__BI_PRINT("m+", &nc_ctx->mp);
DUK__BI_PRINT("m-", &nc_ctx->mm);
- duk__bi_add(&nc_ctx->t1, &nc_ctx->r, &nc_ctx->mp); /* t1 = (+ r m+) */
+ duk__bi_add(&nc_ctx->t1, &nc_ctx->r, &nc_ctx->mp); /* t1 = (+ r m+) */
if (duk__bi_compare(&nc_ctx->t1, &nc_ctx->s) >= (nc_ctx->high_ok ? 0 : 1)) {
DUK_DDD(DUK_DDDPRINT("k is too low"));
/* r <- r
@@ -85662,8 +89134,8 @@ DUK_LOCAL void duk__dragon4_scale(duk__numconv_stringify_ctx *nc_ctx) {
DUK__BI_PRINT("m+", &nc_ctx->mp);
DUK__BI_PRINT("m-", &nc_ctx->mm);
- duk__bi_add(&nc_ctx->t1, &nc_ctx->r, &nc_ctx->mp); /* t1 = (+ r m+) */
- duk__bi_mul_small(&nc_ctx->t2, &nc_ctx->t1, (duk_uint32_t) nc_ctx->B); /* t2 = (* (+ r m+) B) */
+ duk__bi_add(&nc_ctx->t1, &nc_ctx->r, &nc_ctx->mp); /* t1 = (+ r m+) */
+ duk__bi_mul_small(&nc_ctx->t2, &nc_ctx->t1, (duk_uint32_t) nc_ctx->B); /* t2 = (* (+ r m+) B) */
if (duk__bi_compare(&nc_ctx->t2, &nc_ctx->s) <= (nc_ctx->high_ok ? -1 : 0)) {
DUK_DDD(DUK_DDDPRINT("k is too high"));
/* r <- (* r B)
@@ -85684,11 +89156,11 @@ DUK_LOCAL void duk__dragon4_scale(duk__numconv_stringify_ctx *nc_ctx) {
}
}
- skip_dec_k:
+skip_dec_k:
if (!nc_ctx->unequal_gaps) {
DUK_DDD(DUK_DDDPRINT("equal gaps, copy m- from m+"));
- duk__bi_copy(&nc_ctx->mm, &nc_ctx->mp); /* mm <- mp */
+ duk__bi_copy(&nc_ctx->mm, &nc_ctx->mp); /* mm <- mp */
}
nc_ctx->k = k;
@@ -85700,9 +89172,9 @@ DUK_LOCAL void duk__dragon4_scale(duk__numconv_stringify_ctx *nc_ctx) {
}
DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
- duk_small_int_t tc1, tc2; /* terminating conditions */
- duk_small_int_t d; /* current digit */
- duk_small_int_t count = 0; /* digit count */
+ duk_small_int_t tc1, tc2; /* terminating conditions */
+ duk_small_int_t d; /* current digit */
+ duk_small_int_t count = 0; /* digit count */
/*
* Digit generation loop.
@@ -85724,25 +89196,28 @@ DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
for (;;) {
DUK_DDD(DUK_DDDPRINT("generate loop, count=%ld, k=%ld, B=%ld, low_ok=%ld, high_ok=%ld",
- (long) count, (long) nc_ctx->k, (long) nc_ctx->B,
- (long) nc_ctx->low_ok, (long) nc_ctx->high_ok));
+ (long) count,
+ (long) nc_ctx->k,
+ (long) nc_ctx->B,
+ (long) nc_ctx->low_ok,
+ (long) nc_ctx->high_ok));
DUK__BI_PRINT("r", &nc_ctx->r);
DUK__BI_PRINT("s", &nc_ctx->s);
DUK__BI_PRINT("m+", &nc_ctx->mp);
DUK__BI_PRINT("m-", &nc_ctx->mm);
/* (quotient-remainder (* r B) s) using a dummy subtraction loop */
- duk__bi_mul_small(&nc_ctx->t1, &nc_ctx->r, (duk_uint32_t) nc_ctx->B); /* t1 <- (* r B) */
+ duk__bi_mul_small(&nc_ctx->t1, &nc_ctx->r, (duk_uint32_t) nc_ctx->B); /* t1 <- (* r B) */
d = 0;
for (;;) {
if (duk__bi_compare(&nc_ctx->t1, &nc_ctx->s) < 0) {
break;
}
- duk__bi_sub_copy(&nc_ctx->t1, &nc_ctx->s, &nc_ctx->t2); /* t1 <- t1 - s */
+ duk__bi_sub_copy(&nc_ctx->t1, &nc_ctx->s, &nc_ctx->t2); /* t1 <- t1 - s */
d++;
}
- duk__bi_copy(&nc_ctx->r, &nc_ctx->t1); /* r <- (remainder (* r B) s) */
- /* d <- (quotient (* r B) s) (in range 0...B-1) */
+ duk__bi_copy(&nc_ctx->r, &nc_ctx->t1); /* r <- (remainder (* r B) s) */
+ /* d <- (quotient (* r B) s) (in range 0...B-1) */
DUK_DDD(DUK_DDDPRINT("-> d(quot)=%ld", (long) d));
DUK__BI_PRINT("r(rem)", &nc_ctx->r);
@@ -85761,7 +89236,7 @@ DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
/* free-form */
tc1 = (duk__bi_compare(&nc_ctx->r, &nc_ctx->mm) <= (nc_ctx->low_ok ? 0 : -1));
- duk__bi_add(&nc_ctx->t1, &nc_ctx->r, &nc_ctx->mp); /* t1 <- (+ r m+) */
+ duk__bi_add(&nc_ctx->t1, &nc_ctx->r, &nc_ctx->mp); /* t1 <- (+ r m+) */
tc2 = (duk__bi_compare(&nc_ctx->t1, &nc_ctx->s) >= (nc_ctx->high_ok ? 0 : 1));
DUK_DDD(DUK_DDDPRINT("tc1=%ld, tc2=%ld", (long) tc1, (long) tc2));
@@ -85780,20 +89255,21 @@ DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
if (tc2) {
/* tc1 = true, tc2 = true */
duk__bi_mul_small(&nc_ctx->t1, &nc_ctx->r, 2);
- if (duk__bi_compare(&nc_ctx->t1, &nc_ctx->s) < 0) { /* (< (* r 2) s) */
+ if (duk__bi_compare(&nc_ctx->t1, &nc_ctx->s) < 0) { /* (< (* r 2) s) */
DUK_DDD(DUK_DDDPRINT("tc1=true, tc2=true, 2r > s: output d --> %ld (k=%ld)",
- (long) d, (long) nc_ctx->k));
+ (long) d,
+ (long) nc_ctx->k));
DUK__DRAGON4_OUTPUT_PREINC(nc_ctx, count, d);
} else {
DUK_DDD(DUK_DDDPRINT("tc1=true, tc2=true, 2r <= s: output d+1 --> %ld (k=%ld)",
- (long) (d + 1), (long) nc_ctx->k));
+ (long) (d + 1),
+ (long) nc_ctx->k));
DUK__DRAGON4_OUTPUT_PREINC(nc_ctx, count, d + 1);
}
break;
} else {
/* tc1 = true, tc2 = false */
- DUK_DDD(DUK_DDDPRINT("tc1=true, tc2=false: output d --> %ld (k=%ld)",
- (long) d, (long) nc_ctx->k));
+ DUK_DDD(DUK_DDDPRINT("tc1=true, tc2=false: output d --> %ld (k=%ld)", (long) d, (long) nc_ctx->k));
DUK__DRAGON4_OUTPUT_PREINC(nc_ctx, count, d);
break;
}
@@ -85801,13 +89277,13 @@ DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
if (tc2) {
/* tc1 = false, tc2 = true */
DUK_DDD(DUK_DDDPRINT("tc1=false, tc2=true: output d+1 --> %ld (k=%ld)",
- (long) (d + 1), (long) nc_ctx->k));
+ (long) (d + 1),
+ (long) nc_ctx->k));
DUK__DRAGON4_OUTPUT_PREINC(nc_ctx, count, d + 1);
break;
} else {
/* tc1 = false, tc2 = false */
- DUK_DDD(DUK_DDDPRINT("tc1=false, tc2=false: output d --> %ld (k=%ld)",
- (long) d, (long) nc_ctx->k));
+ DUK_DDD(DUK_DDDPRINT("tc1=false, tc2=false: output d --> %ld (k=%ld)", (long) d, (long) nc_ctx->k));
DUK__DRAGON4_OUTPUT_PREINC(nc_ctx, count, d);
/* r <- r (updated above: r <- (remainder (* r B) s)
@@ -85824,23 +89300,28 @@ DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
/* fixed-format termination conditions */
if (nc_ctx->is_fixed) {
if (nc_ctx->abs_pos) {
- int pos = nc_ctx->k - count + 1; /* count is already incremented, take into account */
+ int pos = nc_ctx->k - count + 1; /* count is already incremented, take into account */
DUK_DDD(DUK_DDDPRINT("fixed format, absolute: abs pos=%ld, k=%ld, count=%ld, req=%ld",
- (long) pos, (long) nc_ctx->k, (long) count, (long) nc_ctx->req_digits));
+ (long) pos,
+ (long) nc_ctx->k,
+ (long) count,
+ (long) nc_ctx->req_digits));
if (pos <= nc_ctx->req_digits) {
DUK_DDD(DUK_DDDPRINT("digit position reached req_digits, end generate loop"));
break;
}
} else {
DUK_DDD(DUK_DDDPRINT("fixed format, relative: k=%ld, count=%ld, req=%ld",
- (long) nc_ctx->k, (long) count, (long) nc_ctx->req_digits));
+ (long) nc_ctx->k,
+ (long) count,
+ (long) nc_ctx->req_digits));
if (count >= nc_ctx->req_digits) {
DUK_DDD(DUK_DDDPRINT("digit count reached req_digits, end generate loop"));
break;
}
}
}
- } /* for */
+ } /* for */
nc_ctx->count = count;
@@ -85859,8 +89340,7 @@ DUK_LOCAL void duk__dragon4_generate(duk__numconv_stringify_ctx *nc_ctx) {
buf[i] = (duk_uint8_t) DUK__DIGITCHAR(t);
}
}
- DUK_DDD(DUK_DDDPRINT("-> generated digits; k=%ld, digits='%s'",
- (long) nc_ctx->k, (const char *) buf));
+ DUK_DDD(DUK_DDDPRINT("-> generated digits; k=%ld, digits='%s'", (long) nc_ctx->k, (const char *) buf));
}
#endif
}
@@ -85889,11 +89369,11 @@ DUK_LOCAL duk_small_int_t duk__dragon4_fixed_format_round(duk__numconv_stringify
if (round_idx >= nc_ctx->count) {
DUK_DDD(DUK_DDDPRINT("round_idx out of bounds (%ld >= %ld (count)) -> no rounding",
- (long) round_idx, (long) nc_ctx->count));
+ (long) round_idx,
+ (long) nc_ctx->count));
return 0;
} else if (round_idx < 0) {
- DUK_DDD(DUK_DDDPRINT("round_idx out of bounds (%ld < 0) -> no rounding",
- (long) round_idx));
+ DUK_DDD(DUK_DDDPRINT("round_idx out of bounds (%ld < 0) -> no rounding", (long) round_idx));
return 0;
}
@@ -85918,15 +89398,18 @@ DUK_LOCAL duk_small_int_t duk__dragon4_fixed_format_round(duk__numconv_stringify
duk_memmove((void *) (&nc_ctx->digits[1]),
(const void *) (&nc_ctx->digits[0]),
(size_t) (sizeof(char) * (size_t) nc_ctx->count));
- nc_ctx->digits[0] = 1; /* don't increase 'count' */
- nc_ctx->k++; /* position of highest digit changed */
- nc_ctx->count++; /* number of digits changed */
+ nc_ctx->digits[0] = 1; /* don't increase 'count' */
+ nc_ctx->k++; /* position of highest digit changed */
+ nc_ctx->count++; /* number of digits changed */
ret = 1;
break;
}
DUK_DDD(DUK_DDDPRINT("fixed-format rounding carry: B=%ld, roundup_limit=%ld, p=%p, digits=%p",
- (long) nc_ctx->B, (long) roundup_limit, (void *) p, (void *) nc_ctx->digits));
+ (long) nc_ctx->B,
+ (long) roundup_limit,
+ (void *) p,
+ (void *) nc_ctx->digits));
p--;
t = *p;
DUK_DDD(DUK_DDDPRINT("digit before carry: %ld", (long) t));
@@ -85943,7 +89426,7 @@ DUK_LOCAL duk_small_int_t duk__dragon4_fixed_format_round(duk__numconv_stringify
return ret;
}
-#define DUK__NO_EXP (65536) /* arbitrary marker, outside valid exp range */
+#define DUK__NO_EXP (65536) /* arbitrary marker, outside valid exp range */
DUK_LOCAL void duk__dragon4_convert_and_push(duk__numconv_stringify_ctx *nc_ctx,
duk_hthread *thr,
@@ -85986,7 +89469,7 @@ DUK_LOCAL void duk__dragon4_convert_and_push(duk__numconv_stringify_ctx *nc_ctx,
DUK_ASSERT(nc_ctx->count >= 1);
k = nc_ctx->k;
- buf = (duk_uint8_t *) &nc_ctx->f; /* XXX: union would be more correct */
+ buf = (duk_uint8_t *) &nc_ctx->f; /* XXX: union would be more correct */
q = buf;
/* Exponent handling: if exponent format is used, record exponent value and
@@ -85998,14 +89481,13 @@ DUK_LOCAL void duk__dragon4_convert_and_push(duk__numconv_stringify_ctx *nc_ctx,
expt = DUK__NO_EXP;
if (!nc_ctx->abs_pos /* toFixed() */) {
- if ((flags & DUK_N2S_FLAG_FORCE_EXP) || /* exponential notation forced */
- ((flags & DUK_N2S_FLAG_NO_ZERO_PAD) && /* fixed precision and zero padding would be required */
- (k - digits >= 1)) || /* (e.g. k=3, digits=2 -> "12X") */
- ((k > 21 || k <= -6) && (radix == 10))) { /* toString() conditions */
- DUK_DDD(DUK_DDDPRINT("use exponential notation: k=%ld -> expt=%ld",
- (long) k, (long) (k - 1)));
- expt = k - 1; /* e.g. 12.3 -> digits="123" k=2 -> 1.23e1 */
- k = 1; /* generate mantissa with a single leading whole number digit */
+ if ((flags & DUK_N2S_FLAG_FORCE_EXP) || /* exponential notation forced */
+ ((flags & DUK_N2S_FLAG_NO_ZERO_PAD) && /* fixed precision and zero padding would be required */
+ (k - digits >= 1)) || /* (e.g. k=3, digits=2 -> "12X") */
+ ((k > 21 || k <= -6) && (radix == 10))) { /* toString() conditions */
+ DUK_DDD(DUK_DDDPRINT("use exponential notation: k=%ld -> expt=%ld", (long) k, (long) (k - 1)));
+ expt = k - 1; /* e.g. 12.3 -> digits="123" k=2 -> 1.23e1 */
+ k = 1; /* generate mantissa with a single leading whole number digit */
}
}
@@ -86031,13 +89513,18 @@ DUK_LOCAL void duk__dragon4_convert_and_push(duk__numconv_stringify_ctx *nc_ctx,
DUK_DDD(DUK_DDDPRINT("expt=%ld, k=%ld, count=%ld, pos=%ld, pos_end=%ld, is_fixed=%ld, "
"digits=%ld, abs_pos=%ld",
- (long) expt, (long) k, (long) nc_ctx->count, (long) pos, (long) pos_end,
- (long) nc_ctx->is_fixed, (long) digits, (long) nc_ctx->abs_pos));
+ (long) expt,
+ (long) k,
+ (long) nc_ctx->count,
+ (long) pos,
+ (long) pos_end,
+ (long) nc_ctx->is_fixed,
+ (long) digits,
+ (long) nc_ctx->abs_pos));
/* Digit generation */
while (pos > pos_end) {
- DUK_DDD(DUK_DDDPRINT("digit generation: pos=%ld, pos_end=%ld",
- (long) pos, (long) pos_end));
+ DUK_DDD(DUK_DDDPRINT("digit generation: pos=%ld, pos_end=%ld", (long) pos, (long) pos_end));
if (pos == 0) {
*q++ = (duk_uint8_t) '.';
}
@@ -86130,7 +89617,7 @@ DUK_LOCAL void duk__dragon4_double_to_ctx(duk__numconv_stringify_ctx *nc_ctx, du
/* normal: implicit leading 1-bit */
nc_ctx->f.v[1] |= 0x00100000UL;
expt = expt - DUK__IEEE_DOUBLE_EXP_BIAS - 52;
- DUK_ASSERT(duk__bi_is_valid(&nc_ctx->f)); /* true, because v[1] has at least one bit set */
+ DUK_ASSERT(duk__bi_is_valid(&nc_ctx->f)); /* true, because v[1] has at least one bit set */
}
DUK_ASSERT(duk__bi_is_valid(&nc_ctx->f));
@@ -86153,7 +89640,7 @@ DUK_LOCAL void duk__dragon4_ctx_to_double(duk__numconv_stringify_ctx *nc_ctx, du
/* Sometimes this assert is not true right now; it will be true after
* rounding. See: test-bug-numconv-mantissa-assert.js.
*/
- DUK_ASSERT_DISABLE(nc_ctx->digits[0] == 1); /* zero handled by caller */
+ DUK_ASSERT_DISABLE(nc_ctx->digits[0] == 1); /* zero handled by caller */
/* Should not be required because the code below always sets both high
* and low parts, but at least gcc-4.4.5 fails to deduce this correctly
@@ -86198,31 +89685,30 @@ DUK_LOCAL void duk__dragon4_ctx_to_double(duk__numconv_stringify_ctx *nc_ctx, du
skip_round = 0;
- recheck_exp:
+recheck_exp:
- expt = nc_ctx->k - 1; /* IEEE exp without bias */
+ expt = nc_ctx->k - 1; /* IEEE exp without bias */
if (expt > 1023) {
/* Infinity */
- bitstart = -255; /* needed for inf: causes mantissa to become zero,
- * and rounding to be skipped.
- */
+ bitstart = -255; /* needed for inf: causes mantissa to become zero,
+ * and rounding to be skipped.
+ */
expt = 2047;
} else if (expt >= -1022) {
/* normal */
- bitstart = 1; /* skip leading digit */
+ bitstart = 1; /* skip leading digit */
expt += DUK__IEEE_DOUBLE_EXP_BIAS;
DUK_ASSERT(expt >= 1 && expt <= 2046);
} else {
/* denormal or zero */
- bitstart = 1023 + expt; /* expt==-1023 -> bitstart=0 (leading 1);
- * expt==-1024 -> bitstart=-1 (one left of leading 1), etc
- */
+ bitstart = 1023 + expt; /* expt==-1023 -> bitstart=0 (leading 1);
+ * expt==-1024 -> bitstart=-1 (one left of leading 1), etc
+ */
expt = 0;
}
bitround = bitstart + 52;
- DUK_DDD(DUK_DDDPRINT("ieee expt=%ld, bitstart=%ld, bitround=%ld",
- (long) expt, (long) bitstart, (long) bitround));
+ DUK_DDD(DUK_DDDPRINT("ieee expt=%ld, bitstart=%ld, bitround=%ld", (long) expt, (long) bitstart, (long) bitround));
if (!skip_round) {
if (duk__dragon4_fixed_format_round(nc_ctx, bitround)) {
@@ -86260,13 +89746,11 @@ DUK_LOCAL void duk__dragon4_ctx_to_double(duk__numconv_stringify_ctx *nc_ctx, du
}
/* t has high mantissa */
- DUK_DDD(DUK_DDDPRINT("mantissa is complete: %08lx %08lx",
- (unsigned long) t,
- (unsigned long) DUK_DBLUNION_GET_LOW32(&u)));
+ DUK_DDD(DUK_DDDPRINT("mantissa is complete: %08lx %08lx", (unsigned long) t, (unsigned long) DUK_DBLUNION_GET_LOW32(&u)));
DUK_ASSERT(expt >= 0 && expt <= 0x7ffL);
t += ((duk_uint32_t) expt) << 20;
-#if 0 /* caller handles sign change */
+#if 0 /* caller handles sign change */
if (negative) {
t |= 0x80000000U;
}
@@ -86287,12 +89771,15 @@ DUK_LOCAL void duk__dragon4_ctx_to_double(duk__numconv_stringify_ctx *nc_ctx, du
* Output: [ string ]
*/
-DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_small_int_t radix, duk_small_int_t digits, duk_small_uint_t flags) {
+DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr,
+ duk_small_int_t radix,
+ duk_small_int_t digits,
+ duk_small_uint_t flags) {
duk_double_t x;
duk_small_int_t c;
duk_small_int_t neg;
duk_uint32_t uval;
- duk__numconv_stringify_ctx nc_ctx_alloc; /* large context; around 2kB now */
+ duk__numconv_stringify_ctx nc_ctx_alloc; /* large context; around 2kB now */
duk__numconv_stringify_ctx *nc_ctx = &nc_ctx_alloc;
x = (duk_double_t) duk_require_number(thr, -1);
@@ -86344,13 +89831,13 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_sma
*/
uval = duk_double_to_uint32_t(x);
- if (((double) uval) == x && /* integer number in range */
- flags == 0) { /* no special formatting */
+ if (duk_double_equals((double) uval, x) && /* integer number in range */
+ flags == 0) { /* no special formatting */
/* use bigint area as a temp */
duk_uint8_t *buf = (duk_uint8_t *) (&nc_ctx->f);
duk_uint8_t *p = buf;
- DUK_ASSERT(DUK__NUMCONV_CTX_BIGINTS_SIZE >= 32 + 1); /* max size: radix=2 + sign */
+ DUK_ASSERT(DUK__NUMCONV_CTX_BIGINTS_SIZE >= 32 + 1); /* max size: radix=2 + sign */
if (neg && uval != 0) {
/* no negative sign for zero */
*p++ = (duk_uint8_t) '-';
@@ -86406,9 +89893,9 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_sma
duk_small_int_t count;
if (nc_ctx->is_fixed) {
if (nc_ctx->abs_pos) {
- count = digits + 2; /* lead zero + 'digits' fractions + 1 for rounding */
+ count = digits + 2; /* lead zero + 'digits' fractions + 1 for rounding */
} else {
- count = digits + 1; /* + 1 for rounding */
+ count = digits + 1; /* + 1 for rounding */
}
} else {
count = 1;
@@ -86417,12 +89904,12 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_sma
DUK_ASSERT(count >= 1);
duk_memzero((void *) nc_ctx->digits, (size_t) count);
nc_ctx->count = count;
- nc_ctx->k = 1; /* 0.000... */
+ nc_ctx->k = 1; /* 0.000... */
neg = 0;
goto zero_skip;
}
- duk__dragon4_double_to_ctx(nc_ctx, x); /* -> sets 'f' and 'e' */
+ duk__dragon4_double_to_ctx(nc_ctx, x); /* -> sets 'f' and 'e' */
DUK__BI_PRINT("f", &nc_ctx->f);
DUK_DDD(DUK_DDDPRINT("e=%ld", (long) nc_ctx->e));
@@ -86430,7 +89917,7 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_sma
* Dragon4 slow path digit generation.
*/
- duk__dragon4_prepare(nc_ctx); /* setup many variables in nc_ctx */
+ duk__dragon4_prepare(nc_ctx); /* setup many variables in nc_ctx */
DUK_DDD(DUK_DDDPRINT("after prepare:"));
DUK__BI_PRINT("r", &nc_ctx->r);
@@ -86452,7 +89939,7 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_sma
* Convert and push final string.
*/
- zero_skip:
+zero_skip:
if (flags & DUK_N2S_FLAG_FIXED_FORMAT) {
/* Perform fixed-format rounding. */
@@ -86461,13 +89948,16 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_stringify_raw(duk_hthread *thr, duk_sma
/* 'roundpos' is relative to nc_ctx->k and increases to the right
* (opposite of how 'k' changes).
*/
- roundpos = -digits; /* absolute position for digit considered for rounding */
+ roundpos = -digits; /* absolute position for digit considered for rounding */
roundpos = nc_ctx->k - roundpos;
} else {
roundpos = digits;
}
DUK_DDD(DUK_DDDPRINT("rounding: k=%ld, count=%ld, digits=%ld, roundpos=%ld",
- (long) nc_ctx->k, (long) nc_ctx->count, (long) digits, (long) roundpos));
+ (long) nc_ctx->k,
+ (long) nc_ctx->count,
+ (long) digits,
+ (long) roundpos));
(void) duk__dragon4_fixed_format_round(nc_ctx, roundpos);
/* Note: 'count' is currently not adjusted by rounding (i.e. the
@@ -86496,7 +89986,7 @@ DUK_INTERNAL void duk_numconv_stringify(duk_hthread *thr, duk_small_int_t radix,
*/
DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_int_t radix, duk_small_uint_t flags) {
- duk__numconv_stringify_ctx nc_ctx_alloc; /* large context; around 2kB now */
+ duk__numconv_stringify_ctx nc_ctx_alloc; /* large context; around 2kB now */
duk__numconv_stringify_ctx *nc_ctx = &nc_ctx_alloc;
duk_double_t res;
duk_hstring *h_str;
@@ -86516,7 +90006,8 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
DUK_DDD(DUK_DDDPRINT("parse number: %!T, radix=%ld, flags=0x%08lx",
(duk_tval *) duk_get_tval(thr, -1),
- (long) radix, (unsigned long) flags));
+ (long) radix,
+ (unsigned long) flags));
DUK_ASSERT(radix >= 2 && radix <= 36);
DUK_ASSERT(radix - 2 < (duk_small_int_t) sizeof(duk__str2num_digits_for_radix));
@@ -86589,7 +90080,7 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
ch = *p;
if (ch == (duk_small_int_t) '0') {
duk_small_int_t detect_radix = 0;
- ch = DUK_LOWERCASE_CHAR_ASCII(p[1]); /* 'x' or 'X' -> 'x' */
+ ch = DUK_LOWERCASE_CHAR_ASCII(p[1]); /* 'x' or 'X' -> 'x' */
if ((flags & DUK_S2N_FLAG_ALLOW_AUTO_HEX_INT) && ch == DUK_ASC_LC_X) {
DUK_DDD(DUK_DDDPRINT("detected 0x/0X hex prefix, changing radix and preventing fractions and exponent"));
detect_radix = 16;
@@ -86616,10 +90107,9 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
if (detect_radix > 0) {
radix = detect_radix;
/* Clear empty as zero flag: interpret e.g. '0x' and '0xg' as a NaN (= parse error) */
- flags &= ~(DUK_S2N_FLAG_ALLOW_EXP | DUK_S2N_FLAG_ALLOW_EMPTY_FRAC |
- DUK_S2N_FLAG_ALLOW_FRAC | DUK_S2N_FLAG_ALLOW_NAKED_FRAC |
- DUK_S2N_FLAG_ALLOW_EMPTY_AS_ZERO);
- flags |= DUK_S2N_FLAG_ALLOW_LEADING_ZERO; /* allow e.g. '0x0009' and '0b00010001' */
+ flags &= ~(DUK_S2N_FLAG_ALLOW_EXP | DUK_S2N_FLAG_ALLOW_EMPTY_FRAC | DUK_S2N_FLAG_ALLOW_FRAC |
+ DUK_S2N_FLAG_ALLOW_NAKED_FRAC | DUK_S2N_FLAG_ALLOW_EMPTY_AS_ZERO);
+ flags |= DUK_S2N_FLAG_ALLOW_LEADING_ZERO; /* allow e.g. '0x0009' and '0b00010001' */
p += 2;
}
}
@@ -86677,16 +90167,23 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
dig_frac = -1;
dig_expt = -1;
expt = 0;
- expt_adj = 0; /* essentially tracks digit position of lowest 'f' digit */
+ expt_adj = 0; /* essentially tracks digit position of lowest 'f' digit */
expt_neg = 0;
for (;;) {
ch = *p++;
DUK_DDD(DUK_DDDPRINT("parse digits: p=%p, ch='%c' (%ld), expt=%ld, expt_adj=%ld, "
"dig_whole=%ld, dig_frac=%ld, dig_expt=%ld, dig_lzero=%ld, dig_prec=%ld",
- (const void *) p, (int) ((ch >= 0x20 && ch <= 0x7e) ? ch : '?'), (long) ch,
- (long) expt, (long) expt_adj, (long) dig_whole, (long) dig_frac,
- (long) dig_expt, (long) dig_lzero, (long) dig_prec));
+ (const void *) p,
+ (int) ((ch >= 0x20 && ch <= 0x7e) ? ch : '?'),
+ (long) ch,
+ (long) expt,
+ (long) expt_adj,
+ (long) dig_whole,
+ (long) dig_frac,
+ (long) dig_expt,
+ (long) dig_lzero,
+ (long) dig_prec));
DUK__BI_PRINT("f", &nc_ctx->f);
/* Most common cases first. */
@@ -86725,8 +90222,8 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
} else if (ch == (duk_small_int_t) 0) {
DUK_DDD(DUK_DDDPRINT("NUL termination"));
break;
- } else if ((flags & DUK_S2N_FLAG_ALLOW_EXP) &&
- dig_expt < 0 && (ch == (duk_small_int_t) 'e' || ch == (duk_small_int_t) 'E')) {
+ } else if ((flags & DUK_S2N_FLAG_ALLOW_EXP) && dig_expt < 0 &&
+ (ch == (duk_small_int_t) 'e' || ch == (duk_small_int_t) 'E')) {
/* Note: we don't parse back exponent notation for anything else
* than radix 10, so this is not an ambiguous check (e.g. hex
* exponent values may have 'e' either as a significand digit
@@ -86756,7 +90253,7 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
} else if (ch >= (duk_small_int_t) 'A' && ch <= (duk_small_int_t) 'Z') {
dig = (duk_small_int_t) (ch - (duk_small_int_t) 'A' + 0x0a);
} else {
- dig = 255; /* triggers garbage digit check below */
+ dig = 255; /* triggers garbage digit check below */
}
DUK_ASSERT((dig >= 0 && dig <= 35) || dig == 255);
@@ -86889,14 +90386,14 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
if (expt_neg) {
expt = -expt;
}
- DUK_DDD(DUK_DDDPRINT("expt=%ld, expt_adj=%ld, net exponent -> %ld",
- (long) expt, (long) expt_adj, (long) (expt + expt_adj)));
+ DUK_DDD(
+ DUK_DDDPRINT("expt=%ld, expt_adj=%ld, net exponent -> %ld", (long) expt, (long) expt_adj, (long) (expt + expt_adj)));
expt += expt_adj;
/* Fast path check. */
- if (nc_ctx->f.n <= 1 && /* 32-bit value */
- expt == 0 /* no net exponent */) {
+ if (nc_ctx->f.n <= 1 && /* 32-bit value */
+ expt == 0 /* no net exponent */) {
/* Fast path is triggered for no exponent and also for balanced exponent
* and fraction parts, e.g. for "1.23e2" == "123". Remember to respect
* zero sign.
@@ -86938,7 +90435,6 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
goto negcheck_and_ret;
}
-
/* Quick reject of too large or too small exponents. This check
* would be incorrect for zero (e.g. "0e1000" is zero, not Infinity)
* so zero check must be above.
@@ -86971,7 +90467,7 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
* An extra digit is generated for rounding.
*/
- duk__dragon4_prepare(nc_ctx); /* setup many variables in nc_ctx */
+ duk__dragon4_prepare(nc_ctx); /* setup many variables in nc_ctx */
DUK_DDD(DUK_DDDPRINT("after prepare:"));
DUK__BI_PRINT("r", &nc_ctx->r);
@@ -87003,7 +90499,7 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
duk__dragon4_ctx_to_double(nc_ctx, &res);
goto negcheck_and_ret;
- negcheck_and_ret:
+negcheck_and_ret:
if (neg) {
res = -res;
}
@@ -87012,13 +90508,13 @@ DUK_LOCAL DUK_NOINLINE void duk__numconv_parse_raw(duk_hthread *thr, duk_small_i
DUK_DDD(DUK_DDDPRINT("result: %!T", (duk_tval *) duk_get_tval(thr, -1)));
return;
- parse_fail:
+parse_fail:
DUK_DDD(DUK_DDDPRINT("parse failed"));
duk_pop(thr);
duk_push_nan(thr);
return;
- parse_explimit_error:
+parse_explimit_error:
DUK_DDD(DUK_DDDPRINT("parse failed, internal error, can't return a value"));
DUK_ERROR_RANGE(thr, "exponent too large");
DUK_WO_NORETURN(return;);
@@ -87071,8 +90567,7 @@ DUK_INTERNAL void duk_numconv_parse(duk_hthread *thr, duk_small_int_t radix, duk
#define DUK__RE_INITIAL_BUFSIZE 64
-#define DUK__RE_BUFLEN(re_ctx) \
- DUK_BW_GET_SIZE(re_ctx->thr, &re_ctx->bw)
+#define DUK__RE_BUFLEN(re_ctx) DUK_BW_GET_SIZE(re_ctx->thr, &re_ctx->bw)
/*
* Disjunction struct: result of parsing a disjunction
@@ -87162,7 +90657,7 @@ DUK_LOCAL void duk__append_reop(duk_re_compiler_ctx *re_ctx, duk_uint32_t reop)
(void) duk__append_7bit(re_ctx, reop);
}
-#if 0 /* unused */
+#if 0 /* unused */
DUK_LOCAL void duk__append_i32(duk_re_compiler_ctx *re_ctx, duk_int32_t x) {
duk__append_u32(re_ctx, duk__encode_i32(x));
}
@@ -87176,7 +90671,10 @@ DUK_LOCAL void duk__append_u16_list(duk_re_compiler_ctx *re_ctx, const duk_uint1
}
}
-DUK_LOCAL void duk__insert_slice(duk_re_compiler_ctx *re_ctx, duk_uint32_t offset, duk_uint32_t data_offset, duk_uint32_t data_length) {
+DUK_LOCAL void duk__insert_slice(duk_re_compiler_ctx *re_ctx,
+ duk_uint32_t offset,
+ duk_uint32_t data_offset,
+ duk_uint32_t data_length) {
DUK_BW_INSERT_ENSURE_SLICE(re_ctx->thr, &re_ctx->bw, offset, data_offset, data_length);
}
@@ -87239,7 +90737,7 @@ DUK_LOCAL duk_uint32_t duk__insert_jump_offset(duk_re_compiler_ctx *re_ctx, duk_
skip--;
}
}
-#else /* DUK_USE_PREFER_SIZE */
+#else /* DUK_USE_PREFER_SIZE */
/* Closed form solution, this produces fastest code.
* See re_neg_jump_offset (closed1).
*/
@@ -87260,7 +90758,7 @@ DUK_LOCAL duk_uint32_t duk__insert_jump_offset(duk_re_compiler_ctx *re_ctx, duk_
skip -= 7;
}
}
-#endif /* DUK_USE_PREFER_SIZE */
+#endif /* DUK_USE_PREFER_SIZE */
return duk__insert_i32(re_ctx, offset, skip);
}
@@ -87393,10 +90891,10 @@ DUK_LOCAL duk_codepoint_t duk__re_canon_next_discontinuity(duk_codepoint_t start
}
}
}
- DUK_ASSERT(blk == end_blk + 1); /* Reached end block which is continuous. */
+ DUK_ASSERT(blk == end_blk + 1); /* Reached end block which is continuous. */
return end;
}
-#else /* DUK_USE_REGEXP_CANON_BITMAP */
+#else /* DUK_USE_REGEXP_CANON_BITMAP */
DUK_LOCAL duk_codepoint_t duk__re_canon_next_discontinuity(duk_codepoint_t start, duk_codepoint_t end) {
DUK_ASSERT(start >= 0);
DUK_ASSERT(end >= 0);
@@ -87407,7 +90905,7 @@ DUK_LOCAL duk_codepoint_t duk__re_canon_next_discontinuity(duk_codepoint_t start
}
return start;
}
-#endif /* DUK_USE_REGEXP_CANON_BITMAP */
+#endif /* DUK_USE_REGEXP_CANON_BITMAP */
DUK_LOCAL void duk__regexp_generate_ranges(void *userdata, duk_codepoint_t r1, duk_codepoint_t r2, duk_bool_t direct) {
duk_re_compiler_ctx *re_ctx = (duk_re_compiler_ctx *) userdata;
@@ -87418,9 +90916,12 @@ DUK_LOCAL void duk__regexp_generate_ranges(void *userdata, duk_codepoint_t r1, d
duk_codepoint_t r_disc;
DUK_DD(DUK_DDPRINT("duk__regexp_generate_ranges(): re_ctx=%p, range=[%ld,%ld] direct=%ld",
- (void *) re_ctx, (long) r1, (long) r2, (long) direct));
+ (void *) re_ctx,
+ (long) r1,
+ (long) r2,
+ (long) direct));
- DUK_ASSERT(r2 >= r1); /* SyntaxError for out of order range. */
+ DUK_ASSERT(r2 >= r1); /* SyntaxError for out of order range. */
if (direct || (re_ctx->re_flags & DUK_RE_FLAG_IGNORE_CASE) == 0) {
DUK_DD(DUK_DDPRINT("direct or not case sensitive, emit range: [%ld,%ld]", (long) r1, (long) r2));
@@ -87442,7 +90943,7 @@ DUK_LOCAL void duk__regexp_generate_ranges(void *userdata, duk_codepoint_t r1, d
DUK_ASSERT(r_disc >= i);
DUK_ASSERT(r_disc <= r2);
- r_end += r_disc - i; /* May be zero. */
+ r_end += r_disc - i; /* May be zero. */
t = duk_unicode_re_canonicalize_char(re_ctx->thr, r_disc);
if (t == r_end + 1) {
/* Not actually a discontinuity, continue range
@@ -87454,11 +90955,11 @@ DUK_LOCAL void duk__regexp_generate_ranges(void *userdata, duk_codepoint_t r1, d
r_start = t;
r_end = t;
}
- i = r_disc + 1; /* Guarantees progress. */
+ i = r_disc + 1; /* Guarantees progress. */
}
duk__regexp_emit_range(re_ctx, r_start, r_end);
-#if 0 /* Exhaustive search, very slow. */
+#if 0 /* Exhaustive search, very slow. */
r_start = duk_unicode_re_canonicalize_char(re_ctx->thr, r1);
r_end = r_start;
for (i = r1 + 1; i <= r2; i++) {
@@ -87531,18 +91032,17 @@ DUK_LOCAL void duk__regexp_generate_ranges(void *userdata, duk_codepoint_t r1, d
* as complex though.
*/
-DUK_LOCAL const duk_uint16_t * const duk__re_range_lookup1[3] = {
- duk_unicode_re_ranges_digit,
- duk_unicode_re_ranges_white,
- duk_unicode_re_ranges_wordchar
-};
-DUK_LOCAL const duk_uint8_t duk__re_range_lookup2[3] = {
- sizeof(duk_unicode_re_ranges_digit) / (2 * sizeof(duk_uint16_t)),
- sizeof(duk_unicode_re_ranges_white) / (2 * sizeof(duk_uint16_t)),
- sizeof(duk_unicode_re_ranges_wordchar) / (2 * sizeof(duk_uint16_t))
-};
+DUK_LOCAL const duk_uint16_t * const duk__re_range_lookup1[3] = { duk_unicode_re_ranges_digit,
+ duk_unicode_re_ranges_white,
+ duk_unicode_re_ranges_wordchar };
+DUK_LOCAL const duk_uint8_t duk__re_range_lookup2[3] = { sizeof(duk_unicode_re_ranges_digit) / (2 * sizeof(duk_uint16_t)),
+ sizeof(duk_unicode_re_ranges_white) / (2 * sizeof(duk_uint16_t)),
+ sizeof(duk_unicode_re_ranges_wordchar) / (2 * sizeof(duk_uint16_t)) };
-DUK_LOCAL void duk__append_range_atom_matcher(duk_re_compiler_ctx *re_ctx, duk_small_uint_t re_op, const duk_uint16_t *ranges, duk_small_uint_t count) {
+DUK_LOCAL void duk__append_range_atom_matcher(duk_re_compiler_ctx *re_ctx,
+ duk_small_uint_t re_op,
+ const duk_uint16_t *ranges,
+ duk_small_uint_t count) {
#if 0
DUK_ASSERT(re_op <= 0x7fUL);
DUK_ASSERT(count <= 0x7fUL);
@@ -87554,13 +91054,13 @@ DUK_LOCAL void duk__append_range_atom_matcher(duk_re_compiler_ctx *re_ctx, duk_s
}
DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t expect_eof, duk__re_disjunction_info *out_atom_info) {
- duk_int32_t atom_start_offset = -1; /* negative -> no atom matched on previous round */
- duk_int32_t atom_char_length = 0; /* negative -> complex atom */
- duk_uint32_t atom_start_captures = re_ctx->captures; /* value of re_ctx->captures at start of atom */
+ duk_int32_t atom_start_offset = -1; /* negative -> no atom matched on previous round */
+ duk_int32_t atom_char_length = 0; /* negative -> complex atom */
+ duk_uint32_t atom_start_captures = re_ctx->captures; /* value of re_ctx->captures at start of atom */
duk_int32_t unpatched_disjunction_split = -1;
duk_int32_t unpatched_disjunction_jump = -1;
duk_uint32_t entry_offset = (duk_uint32_t) DUK__RE_BUFLEN(re_ctx);
- duk_int32_t res_charlen = 0; /* -1 if disjunction is complex, char length if simple */
+ duk_int32_t res_charlen = 0; /* -1 if disjunction is complex, char length if simple */
duk__re_disjunction_info tmp_disj;
DUK_ASSERT(out_atom_info != NULL);
@@ -87583,19 +91083,19 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
* new_atom_char_length etc are for the atom parsed on this round;
* they're written to atom_char_length etc at the end of the round.
*/
- duk_int32_t new_atom_char_length; /* char length of the atom parsed in this loop */
- duk_int32_t new_atom_start_offset; /* bytecode start offset of the atom parsed in this loop
- * (allows quantifiers to copy the atom bytecode)
- */
- duk_uint32_t new_atom_start_captures; /* re_ctx->captures at the start of the atom parsed in this loop */
+ duk_int32_t new_atom_char_length; /* char length of the atom parsed in this loop */
+ duk_int32_t new_atom_start_offset; /* bytecode start offset of the atom parsed in this loop
+ * (allows quantifiers to copy the atom bytecode)
+ */
+ duk_uint32_t new_atom_start_captures; /* re_ctx->captures at the start of the atom parsed in this loop */
duk_lexer_parse_re_token(&re_ctx->lex, &re_ctx->curr_token);
- DUK_DD(DUK_DDPRINT("re token: %ld (num=%ld, char=%c)",
- (long) re_ctx->curr_token.t,
- (long) re_ctx->curr_token.num,
- (re_ctx->curr_token.num >= 0x20 && re_ctx->curr_token.num <= 0x7e) ?
- (int) re_ctx->curr_token.num : (int) '?'));
+ DUK_DD(DUK_DDPRINT(
+ "re token: %ld (num=%ld, char=%c)",
+ (long) re_ctx->curr_token.t,
+ (long) re_ctx->curr_token.num,
+ (re_ctx->curr_token.num >= 0x20 && re_ctx->curr_token.num <= 0x7e) ? (int) re_ctx->curr_token.num : (int) '?'));
/* set by atom case clauses */
new_atom_start_offset = -1;
@@ -87616,9 +91116,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
DUK_ASSERT(unpatched_disjunction_split >= 0);
offset = (duk_uint32_t) unpatched_disjunction_jump;
- offset += duk__insert_jump_offset(re_ctx,
- offset,
- (duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - offset));
+ offset += duk__insert_jump_offset(re_ctx, offset, (duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - offset));
/* offset is now target of the pending split (right after jump) */
duk__insert_jump_offset(re_ctx,
(duk_uint32_t) unpatched_disjunction_split,
@@ -87626,10 +91124,8 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
}
/* add a new pending split to the beginning of the entire disjunction */
- (void) duk__insert_u32(re_ctx,
- entry_offset,
- DUK_REOP_SPLIT1); /* prefer direct execution */
- unpatched_disjunction_split = (duk_int32_t) (entry_offset + 1); /* +1 for opcode */
+ (void) duk__insert_u32(re_ctx, entry_offset, DUK_REOP_SPLIT1); /* prefer direct execution */
+ unpatched_disjunction_split = (duk_int32_t) (entry_offset + 1); /* +1 for opcode */
/* add a new pending match jump for latest finished alternative */
duk__append_reop(re_ctx, DUK_REOP_JUMP);
@@ -87677,7 +91173,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
}
}
- duk__append_reop(re_ctx, DUK_REOP_MATCH); /* complete 'sub atom' */
+ duk__append_reop(re_ctx, DUK_REOP_MATCH); /* complete 'sub atom' */
atom_code_length = (duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - (duk_size_t) atom_start_offset);
offset = (duk_uint32_t) atom_start_offset;
@@ -87693,7 +91189,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
offset += duk__insert_u32(re_ctx, offset, qmax);
offset += duk__insert_jump_offset(re_ctx, offset, atom_code_length);
}
- DUK_UNREF(offset); /* silence scan-build warning */
+ DUK_UNREF(offset); /* silence scan-build warning */
} else {
/*
* Complex atom
@@ -87711,8 +91207,8 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
duk_uint32_t tmp_qmin, tmp_qmax;
/* pre-check how many atom copies we're willing to make (atom_copies not needed below) */
- atom_copies = (re_ctx->curr_token.qmax == DUK_RE_QUANTIFIER_INFINITE) ?
- re_ctx->curr_token.qmin : re_ctx->curr_token.qmax;
+ atom_copies = (re_ctx->curr_token.qmax == DUK_RE_QUANTIFIER_INFINITE) ? re_ctx->curr_token.qmin :
+ re_ctx->curr_token.qmax;
if (atom_copies > DUK_RE_MAX_ATOM_COPIES) {
DUK_ERROR_RANGE(re_ctx->thr, DUK_STR_QUANTIFIER_TOO_MANY_COPIES);
DUK_WO_NORETURN(return;);
@@ -87723,15 +91219,19 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
if (atom_start_captures != re_ctx->captures) {
DUK_ASSERT(atom_start_captures < re_ctx->captures);
DUK_DDD(DUK_DDDPRINT("must wipe ]atom_start_captures,re_ctx->captures]: ]%ld,%ld]",
- (long) atom_start_captures, (long) re_ctx->captures));
+ (long) atom_start_captures,
+ (long) re_ctx->captures));
/* insert (DUK_REOP_WIPERANGE, start, count) in reverse order so the order ends up right */
- duk__insert_u32(re_ctx, (duk_uint32_t) atom_start_offset, (re_ctx->captures - atom_start_captures) * 2U);
+ duk__insert_u32(re_ctx,
+ (duk_uint32_t) atom_start_offset,
+ (re_ctx->captures - atom_start_captures) * 2U);
duk__insert_u32(re_ctx, (duk_uint32_t) atom_start_offset, (atom_start_captures + 1) * 2);
duk__insert_u32(re_ctx, (duk_uint32_t) atom_start_offset, DUK_REOP_WIPERANGE);
} else {
- DUK_DDD(DUK_DDDPRINT("no need to wipe captures: atom_start_captures == re_ctx->captures == %ld",
- (long) atom_start_captures));
+ DUK_DDD(
+ DUK_DDDPRINT("no need to wipe captures: atom_start_captures == re_ctx->captures == %ld",
+ (long) atom_start_captures));
}
atom_code_length = (duk_int32_t) DUK__RE_BUFLEN(re_ctx) - atom_start_offset;
@@ -87740,7 +91240,9 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
tmp_qmin = re_ctx->curr_token.qmin;
tmp_qmax = re_ctx->curr_token.qmax;
while (tmp_qmin > 0) {
- duk__append_slice(re_ctx, (duk_uint32_t) atom_start_offset, (duk_uint32_t) atom_code_length);
+ duk__append_slice(re_ctx,
+ (duk_uint32_t) atom_start_offset,
+ (duk_uint32_t) atom_code_length);
tmp_qmin--;
if (tmp_qmax != DUK_RE_QUANTIFIER_INFINITE) {
tmp_qmax--;
@@ -87758,14 +91260,16 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
*/
duk__append_reop(re_ctx, DUK_REOP_JUMP);
duk__append_jump_offset(re_ctx, atom_code_length);
- duk__append_slice(re_ctx, (duk_uint32_t) atom_start_offset, (duk_uint32_t) atom_code_length);
+ duk__append_slice(re_ctx,
+ (duk_uint32_t) atom_start_offset,
+ (duk_uint32_t) atom_code_length);
}
if (re_ctx->curr_token.greedy) {
- duk__append_reop(re_ctx, DUK_REOP_SPLIT2); /* prefer jump */
+ duk__append_reop(re_ctx, DUK_REOP_SPLIT2); /* prefer jump */
} else {
- duk__append_reop(re_ctx, DUK_REOP_SPLIT1); /* prefer direct */
+ duk__append_reop(re_ctx, DUK_REOP_SPLIT1); /* prefer direct */
}
- duk__append_jump_offset(re_ctx, -atom_code_length - 1); /* -1 for opcode */
+ duk__append_jump_offset(re_ctx, -atom_code_length - 1); /* -1 for opcode */
} else {
/*
* The remaining matches are emitted as sequence of SPLITs and atom
@@ -87785,14 +91289,17 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
*/
duk_uint32_t offset = (duk_uint32_t) DUK__RE_BUFLEN(re_ctx);
while (tmp_qmax > 0) {
- duk__insert_slice(re_ctx, offset, (duk_uint32_t) atom_start_offset, (duk_uint32_t) atom_code_length);
+ duk__insert_slice(re_ctx,
+ offset,
+ (duk_uint32_t) atom_start_offset,
+ (duk_uint32_t) atom_code_length);
if (re_ctx->curr_token.greedy) {
- duk__insert_u32(re_ctx, offset, DUK_REOP_SPLIT1); /* prefer direct */
+ duk__insert_u32(re_ctx, offset, DUK_REOP_SPLIT1); /* prefer direct */
} else {
- duk__insert_u32(re_ctx, offset, DUK_REOP_SPLIT2); /* prefer jump */
+ duk__insert_u32(re_ctx, offset, DUK_REOP_SPLIT2); /* prefer jump */
}
duk__insert_jump_offset(re_ctx,
- offset + 1, /* +1 for opcode */
+ offset + 1, /* +1 for opcode */
(duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - (offset + 1)));
tmp_qmax--;
}
@@ -87825,8 +91332,8 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
case DUK_RETOK_ASSERT_START_POS_LOOKAHEAD:
case DUK_RETOK_ASSERT_START_NEG_LOOKAHEAD: {
duk_uint32_t offset;
- duk_uint32_t opcode = (re_ctx->curr_token.t == DUK_RETOK_ASSERT_START_POS_LOOKAHEAD) ?
- DUK_REOP_LOOKPOS : DUK_REOP_LOOKNEG;
+ duk_uint32_t opcode =
+ (re_ctx->curr_token.t == DUK_RETOK_ASSERT_START_POS_LOOKAHEAD) ? DUK_REOP_LOOKPOS : DUK_REOP_LOOKNEG;
offset = (duk_uint32_t) DUK__RE_BUFLEN(re_ctx);
duk__parse_disjunction(re_ctx, 0, &tmp_disj);
@@ -87834,7 +91341,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
(void) duk__insert_u32(re_ctx, offset, opcode);
(void) duk__insert_jump_offset(re_ctx,
- offset + 1, /* +1 for opcode */
+ offset + 1, /* +1 for opcode */
(duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - (offset + 1)));
/* 'taint' result as complex -- this is conservative,
@@ -87895,7 +91402,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
DUK_ASSERT(DUK_RETOK_ATOM_WHITE == DUK_RETOK_ATOM_DIGIT + 2);
DUK_ASSERT(DUK_RETOK_ATOM_WORD_CHAR == DUK_RETOK_ATOM_DIGIT + 4);
idx = (duk_small_uint_t) ((re_ctx->curr_token.t - DUK_RETOK_ATOM_DIGIT) >> 1U);
- DUK_ASSERT(idx <= 2U); /* Assume continuous token numbers; also checks negative underflow. */
+ DUK_ASSERT(idx <= 2U); /* Assume continuous token numbers; also checks negative underflow. */
duk__append_range_atom_matcher(re_ctx, re_op, duk__re_range_lookup1[idx], duk__re_range_lookup2[idx]);
break;
@@ -87905,7 +91412,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
if (backref > re_ctx->highest_backref) {
re_ctx->highest_backref = backref;
}
- new_atom_char_length = -1; /* mark as complex */
+ new_atom_char_length = -1; /* mark as complex */
new_atom_start_offset = (duk_int32_t) DUK__RE_BUFLEN(re_ctx);
duk__append_reop(re_ctx, DUK_REOP_BACKREFERENCE);
duk__append_u32(re_ctx, backref);
@@ -87914,12 +91421,14 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
case DUK_RETOK_ATOM_START_CAPTURE_GROUP: {
duk_uint32_t cap;
- new_atom_char_length = -1; /* mark as complex (capture handling) */
+ new_atom_char_length = -1; /* mark as complex (capture handling) */
new_atom_start_offset = (duk_int32_t) DUK__RE_BUFLEN(re_ctx);
cap = ++re_ctx->captures;
duk__append_reop(re_ctx, DUK_REOP_SAVE);
duk__append_u32(re_ctx, cap * 2);
- duk__parse_disjunction(re_ctx, 0, &tmp_disj); /* retval (sub-atom char length) unused, tainted as complex above */
+ duk__parse_disjunction(re_ctx,
+ 0,
+ &tmp_disj); /* retval (sub-atom char length) unused, tainted as complex above */
duk__append_reop(re_ctx, DUK_REOP_SAVE);
duk__append_u32(re_ctx, cap * 2 + 1);
break;
@@ -87964,12 +91473,12 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
new_atom_char_length = 1;
new_atom_start_offset = (duk_int32_t) DUK__RE_BUFLEN(re_ctx);
duk__append_reop(re_ctx,
- (re_ctx->curr_token.t == DUK_RETOK_ATOM_START_CHARCLASS) ?
- DUK_REOP_RANGES : DUK_REOP_INVRANGES);
- offset = (duk_uint32_t) DUK__RE_BUFLEN(re_ctx); /* patch in range count later */
+ (re_ctx->curr_token.t == DUK_RETOK_ATOM_START_CHARCLASS) ? DUK_REOP_RANGES :
+ DUK_REOP_INVRANGES);
+ offset = (duk_uint32_t) DUK__RE_BUFLEN(re_ctx); /* patch in range count later */
/* parse ranges until character class ends */
- re_ctx->nranges = 0; /* note: ctx-wide temporary */
+ re_ctx->nranges = 0; /* note: ctx-wide temporary */
duk_lexer_parse_re_ranges(&re_ctx->lex, duk__regexp_generate_ranges, (void *) re_ctx);
/* insert range count */
@@ -88012,7 +91521,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
atom_start_captures = new_atom_start_captures;
}
- done:
+done:
/* finish up pending jump and split for last alternative */
if (unpatched_disjunction_jump >= 0) {
@@ -88020,9 +91529,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
DUK_ASSERT(unpatched_disjunction_split >= 0);
offset = (duk_uint32_t) unpatched_disjunction_jump;
- offset += duk__insert_jump_offset(re_ctx,
- offset,
- (duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - offset));
+ offset += duk__insert_jump_offset(re_ctx, offset, (duk_int32_t) (DUK__RE_BUFLEN(re_ctx) - offset));
/* offset is now target of the pending split (right after jump) */
duk__insert_jump_offset(re_ctx,
(duk_uint32_t) unpatched_disjunction_split,
@@ -88033,8 +91540,7 @@ DUK_LOCAL void duk__parse_disjunction(duk_re_compiler_ctx *re_ctx, duk_bool_t ex
out_atom_info->end_captures = re_ctx->captures;
#endif
out_atom_info->charlen = res_charlen;
- DUK_DDD(DUK_DDDPRINT("parse disjunction finished: charlen=%ld",
- (long) out_atom_info->charlen));
+ DUK_DDD(DUK_DDDPRINT("parse disjunction finished: charlen=%ld", (long) out_atom_info->charlen));
re_ctx->recursion_depth--;
}
@@ -88085,7 +91591,7 @@ DUK_LOCAL duk_uint32_t duk__parse_regexp_flags(duk_hthread *thr, duk_hstring *h)
return flags;
- flags_error:
+flags_error:
DUK_ERROR_SYNTAX(thr, DUK_STR_INVALID_REGEXP_FLAGS);
DUK_WO_NORETURN(return 0U;);
}
@@ -88151,7 +91657,7 @@ DUK_LOCAL void duk__create_escaped_source(duk_hthread *thr, int idx_pattern) {
}
DUK_BW_SETPTR_AND_COMPACT(thr, bw, q);
- (void) duk_buffer_to_string(thr, -1); /* Safe if input is safe. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe if input is safe. */
/* [ ... escaped_source ] */
}
@@ -88205,7 +91711,7 @@ DUK_INTERNAL void duk_regexp_compile(duk_hthread *thr) {
/* [ ... pattern flags escaped_source buffer ] */
duk_memzero(&re_ctx, sizeof(re_ctx));
- DUK_LEXER_INITCTX(&re_ctx.lex); /* duplicate zeroing, expect for (possible) NULL inits */
+ DUK_LEXER_INITCTX(&re_ctx.lex); /* duplicate zeroing, expect for (possible) NULL inits */
re_ctx.thr = thr;
re_ctx.lex.thr = thr;
re_ctx.lex.input = DUK_HSTRING_GET_DATA(h_pattern);
@@ -88217,13 +91723,14 @@ DUK_INTERNAL void duk_regexp_compile(duk_hthread *thr) {
DUK_BW_INIT_PUSHBUF(thr, &re_ctx.bw, DUK__RE_INITIAL_BUFSIZE);
DUK_DD(DUK_DDPRINT("regexp compiler ctx initialized, flags=0x%08lx, recursion_limit=%ld",
- (unsigned long) re_ctx.re_flags, (long) re_ctx.recursion_limit));
+ (unsigned long) re_ctx.re_flags,
+ (long) re_ctx.recursion_limit));
/*
* Init lexer
*/
- lex_point.offset = 0; /* expensive init, just want to fill window */
+ lex_point.offset = 0; /* expensive init, just want to fill window */
lex_point.line = 1;
DUK_LEXER_SETPOINT(&re_ctx.lex, &lex_point);
@@ -88265,7 +91772,7 @@ DUK_INTERNAL void duk_regexp_compile(duk_hthread *thr) {
/* [ ... pattern flags escaped_source buffer ] */
DUK_BW_COMPACT(thr, &re_ctx.bw);
- (void) duk_buffer_to_string(thr, -1); /* Safe because flags is at most 7 bit. */
+ (void) duk_buffer_to_string(thr, -1); /* Safe because flags is at most 7 bit. */
/* [ ... pattern flags escaped_source bytecode ] */
@@ -88273,11 +91780,12 @@ DUK_INTERNAL void duk_regexp_compile(duk_hthread *thr) {
* Finalize stack
*/
- duk_remove(thr, -4); /* -> [ ... flags escaped_source bytecode ] */
- duk_remove(thr, -3); /* -> [ ... escaped_source bytecode ] */
+ duk_remove(thr, -4); /* -> [ ... flags escaped_source bytecode ] */
+ duk_remove(thr, -3); /* -> [ ... escaped_source bytecode ] */
DUK_DD(DUK_DDPRINT("regexp compilation successful, bytecode: %!T, escaped source: %!T",
- (duk_tval *) duk_get_tval(thr, -1), (duk_tval *) duk_get_tval(thr, -2)));
+ (duk_tval *) duk_get_tval(thr, -1),
+ (duk_tval *) duk_get_tval(thr, -2)));
}
/*
@@ -88323,11 +91831,11 @@ DUK_INTERNAL void duk_regexp_create_instance(duk_hthread *thr) {
/* [ ... regexp_object ] */
}
-#else /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
/* regexp support disabled */
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/* automatic undefs */
#undef DUK__RE_BUFLEN
@@ -88375,7 +91883,11 @@ DUK_LOCAL duk_int32_t duk__bc_get_i32(duk_re_matcher_ctx *re_ctx, const duk_uint
}
}
-DUK_LOCAL const duk_uint8_t *duk__utf8_backtrack(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end, duk_uint_fast32_t count) {
+DUK_LOCAL const duk_uint8_t *duk__utf8_backtrack(duk_hthread *thr,
+ const duk_uint8_t **ptr,
+ const duk_uint8_t *ptr_start,
+ const duk_uint8_t *ptr_end,
+ duk_uint_fast32_t count) {
const duk_uint8_t *p;
/* Note: allow backtracking from p == ptr_end */
@@ -88400,12 +91912,16 @@ DUK_LOCAL const duk_uint8_t *duk__utf8_backtrack(duk_hthread *thr, const duk_uin
*ptr = p;
return p;
- fail:
+fail:
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return NULL;);
}
-DUK_LOCAL const duk_uint8_t *duk__utf8_advance(duk_hthread *thr, const duk_uint8_t **ptr, const duk_uint8_t *ptr_start, const duk_uint8_t *ptr_end, duk_uint_fast32_t count) {
+DUK_LOCAL const duk_uint8_t *duk__utf8_advance(duk_hthread *thr,
+ const duk_uint8_t **ptr,
+ const duk_uint8_t *ptr_start,
+ const duk_uint8_t *ptr_end,
+ duk_uint_fast32_t count) {
const duk_uint8_t *p;
p = *ptr;
@@ -88431,7 +91947,7 @@ DUK_LOCAL const duk_uint8_t *duk__utf8_advance(duk_hthread *thr, const duk_uint8
*ptr = p;
return p;
- fail:
+fail:
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return NULL;);
}
@@ -88535,7 +92051,7 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
c1 = (duk_codepoint_t) duk__bc_get_u32(re_ctx, &pc);
DUK_ASSERT(!(re_ctx->re_flags & DUK_RE_FLAG_IGNORE_CASE) ||
- c1 == duk_unicode_re_canonicalize_char(re_ctx->thr, c1)); /* canonicalized by compiler */
+ c1 == duk_unicode_re_canonicalize_char(re_ctx->thr, c1)); /* canonicalized by compiler */
c2 = duk__inp_get_cp(re_ctx, &sp);
/* No need to check for c2 < 0 (end of input): because c1 >= 0, it
* will fail the match below automatically and cause goto fail.
@@ -88581,7 +92097,10 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
r1 = (duk_codepoint_t) duk__bc_get_u32(re_ctx, &pc);
r2 = (duk_codepoint_t) duk__bc_get_u32(re_ctx, &pc);
DUK_DDD(DUK_DDDPRINT("matching ranges/invranges, n=%ld, r1=%ld, r2=%ld, c=%ld",
- (long) n, (long) r1, (long) r2, (long) c));
+ (long) n,
+ (long) r1,
+ (long) r2,
+ (long) c));
if (c >= r1 && c <= r2) {
/* Note: don't bail out early, we must read all the ranges from
* bytecode. Another option is to skip them efficiently after
@@ -88650,16 +92169,16 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
duk_small_int_t w1, w2;
if (sp <= re_ctx->input) {
- w1 = 0; /* not a wordchar */
+ w1 = 0; /* not a wordchar */
} else {
duk_codepoint_t c;
c = duk__inp_get_prev_cp(re_ctx, sp);
w1 = duk_unicode_re_is_wordchar(c);
}
if (sp >= re_ctx->input_end) {
- w2 = 0; /* not a wordchar */
+ w2 = 0; /* not a wordchar */
} else {
- const duk_uint8_t *tmp_sp = sp; /* dummy so sp won't get updated */
+ const duk_uint8_t *tmp_sp = sp; /* dummy so sp won't get updated */
duk_codepoint_t c;
c = duk__inp_get_cp(re_ctx, &tmp_sp);
w2 = duk_unicode_re_is_wordchar(c);
@@ -88720,7 +92239,9 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
qmax = duk__bc_get_u32(re_ctx, &pc);
skip = duk__bc_get_i32(re_ctx, &pc);
DUK_DDD(DUK_DDDPRINT("minimal quantifier, qmin=%lu, qmax=%lu, skip=%ld",
- (unsigned long) qmin, (unsigned long) qmax, (long) skip));
+ (unsigned long) qmin,
+ (unsigned long) qmax,
+ (long) skip));
q = 0;
while (q <= qmax) {
@@ -88750,7 +92271,10 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
atomlen = duk__bc_get_u32(re_ctx, &pc);
skip = duk__bc_get_i32(re_ctx, &pc);
DUK_DDD(DUK_DDDPRINT("greedy quantifier, qmin=%lu, qmax=%lu, atomlen=%lu, skip=%ld",
- (unsigned long) qmin, (unsigned long) qmax, (unsigned long) atomlen, (long) skip));
+ (unsigned long) qmin,
+ (unsigned long) qmax,
+ (unsigned long) atomlen,
+ (long) skip));
q = 0;
while (q < qmax) {
@@ -88776,8 +92300,7 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
* do not allow captures in their atom now, so this is not an issue.
*/
- DUK_DDD(DUK_DDDPRINT("greedy quantifier, backtrack %ld characters (atomlen)",
- (long) atomlen));
+ DUK_DDD(DUK_DDDPRINT("greedy quantifier, backtrack %ld characters (atomlen)", (long) atomlen));
sp = duk__inp_backtrack(re_ctx, &sp, (duk_uint_fast32_t) atomlen);
q--;
}
@@ -88823,20 +92346,23 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
idx_start = duk__bc_get_u32(re_ctx, &pc);
idx_count = duk__bc_get_u32(re_ctx, &pc);
DUK_DDD(DUK_DDDPRINT("wipe saved range: start=%ld, count=%ld -> [%ld,%ld] (captures [%ld,%ld])",
- (long) idx_start, (long) idx_count,
- (long) idx_start, (long) (idx_start + idx_count - 1),
- (long) (idx_start / 2), (long) ((idx_start + idx_count - 1) / 2)));
+ (long) idx_start,
+ (long) idx_count,
+ (long) idx_start,
+ (long) (idx_start + idx_count - 1),
+ (long) (idx_start / 2),
+ (long) ((idx_start + idx_count - 1) / 2)));
if (idx_start + idx_count > re_ctx->nsaved || idx_count == 0) {
/* idx is unsigned, < 0 check is not necessary */
DUK_D(DUK_DPRINT("internal error, regexp wipe indices insane: idx_start=%ld, idx_count=%ld",
- (long) idx_start, (long) idx_count));
+ (long) idx_start,
+ (long) idx_count));
goto internal_error;
}
DUK_ASSERT(idx_count > 0);
duk_require_stack(re_ctx->thr, 1);
- range_save = (duk_uint8_t **) duk_push_fixed_buffer_nozero(re_ctx->thr,
- sizeof(duk_uint8_t *) * idx_count);
+ range_save = (duk_uint8_t **) duk_push_fixed_buffer_nozero(re_ctx->thr, sizeof(duk_uint8_t *) * idx_count);
DUK_ASSERT(range_save != NULL);
duk_memcpy(range_save, re_ctx->saved + idx_start, sizeof(duk_uint8_t *) * idx_count);
#if defined(DUK_USE_EXPLICIT_NULL_INIT)
@@ -88852,8 +92378,10 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
if (sub_sp) {
/* match: keep wiped/resaved values */
DUK_DDD(DUK_DDDPRINT("match: keep wiped/resaved values [%ld,%ld] (captures [%ld,%ld])",
- (long) idx_start, (long) (idx_start + idx_count - 1),
- (long) (idx_start / 2), (long) ((idx_start + idx_count - 1) / 2)));
+ (long) idx_start,
+ (long) (idx_start + idx_count - 1),
+ (long) (idx_start / 2),
+ (long) ((idx_start + idx_count - 1) / 2)));
duk_pop_unsafe(re_ctx->thr);
sp = sub_sp;
goto match;
@@ -88861,8 +92389,10 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
/* fail: restore saves */
DUK_DDD(DUK_DDDPRINT("fail: restore wiped/resaved values [%ld,%ld] (captures [%ld,%ld])",
- (long) idx_start, (long) (idx_start + idx_count - 1),
- (long) (idx_start / 2), (long) ((idx_start + idx_count - 1) / 2)));
+ (long) idx_start,
+ (long) (idx_start + idx_count - 1),
+ (long) (idx_start / 2),
+ (long) ((idx_start + idx_count - 1) / 2)));
duk_memcpy((void *) (re_ctx->saved + idx_start),
(const void *) range_save,
sizeof(duk_uint8_t *) * idx_count);
@@ -88892,8 +92422,8 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
DUK_ASSERT(re_ctx->nsaved > 0);
duk_require_stack(re_ctx->thr, 1);
- full_save = (duk_uint8_t **) duk_push_fixed_buffer_nozero(re_ctx->thr,
- sizeof(duk_uint8_t *) * re_ctx->nsaved);
+ full_save =
+ (duk_uint8_t **) duk_push_fixed_buffer_nozero(re_ctx->thr, sizeof(duk_uint8_t *) * re_ctx->nsaved);
DUK_ASSERT(full_save != NULL);
duk_memcpy(full_save, re_ctx->saved, sizeof(duk_uint8_t *) * re_ctx->nsaved);
@@ -88918,11 +92448,9 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
/* fall through */
- lookahead_fail:
+ lookahead_fail:
/* fail: restore saves */
- duk_memcpy((void *) re_ctx->saved,
- (const void *) full_save,
- sizeof(duk_uint8_t *) * re_ctx->nsaved);
+ duk_memcpy((void *) re_ctx->saved, (const void *) full_save, sizeof(duk_uint8_t *) * re_ctx->nsaved);
duk_pop_unsafe(re_ctx->thr);
goto fail;
}
@@ -88945,22 +92473,23 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
const duk_uint8_t *p;
idx = duk__bc_get_u32(re_ctx, &pc);
- idx = idx << 1; /* backref n -> saved indices [n*2, n*2+1] */
+ idx = idx << 1; /* backref n -> saved indices [n*2, n*2+1] */
if (idx < 2 || idx + 1 >= re_ctx->nsaved) {
/* regexp compiler should catch these */
DUK_D(DUK_DPRINT("internal error, backreference index insane"));
goto internal_error;
}
- if (!re_ctx->saved[idx] || !re_ctx->saved[idx+1]) {
+ if (!re_ctx->saved[idx] || !re_ctx->saved[idx + 1]) {
/* capture is 'undefined', always matches! */
DUK_DDD(DUK_DDDPRINT("backreference: saved[%ld,%ld] not complete, always match",
- (long) idx, (long) (idx + 1)));
+ (long) idx,
+ (long) (idx + 1)));
break;
}
DUK_DDD(DUK_DDDPRINT("backreference: match saved[%ld,%ld]", (long) idx, (long) (idx + 1)));
p = re_ctx->saved[idx];
- while (p < re_ctx->saved[idx+1]) {
+ while (p < re_ctx->saved[idx + 1]) {
duk_codepoint_t c1, c2;
/* Note: not necessary to check p against re_ctx->input_end:
@@ -88992,15 +92521,15 @@ DUK_LOCAL const duk_uint8_t *duk__match_regexp(duk_re_matcher_ctx *re_ctx, const
}
}
- match:
+match:
re_ctx->recursion_depth--;
return sp;
- fail:
+fail:
re_ctx->recursion_depth--;
return NULL;
- internal_error:
+internal_error:
DUK_ERROR_INTERNAL(re_ctx->thr);
DUK_WO_NORETURN(return NULL;);
}
@@ -89052,8 +92581,9 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
h_input = duk_to_hstring(thr, -1);
DUK_ASSERT(h_input != NULL);
- duk_xget_owndataprop_stridx_short(thr, -2, DUK_STRIDX_INT_BYTECODE); /* [ ... re_obj input ] -> [ ... re_obj input bc ] */
- h_bytecode = duk_require_hstring(thr, -1); /* no regexp instance should exist without a non-configurable bytecode property */
+ duk_xget_owndataprop_stridx_short(thr, -2, DUK_STRIDX_INT_BYTECODE); /* [ ... re_obj input ] -> [ ... re_obj input bc ] */
+ h_bytecode =
+ duk_require_hstring(thr, -1); /* no regexp instance should exist without a non-configurable bytecode property */
DUK_ASSERT(h_bytecode != NULL);
/*
@@ -89085,13 +92615,13 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
re_ctx.nsaved = duk__bc_get_u32(&re_ctx, &pc);
re_ctx.bytecode = pc;
- DUK_ASSERT(DUK_RE_FLAG_GLOBAL < 0x10000UL); /* must fit into duk_small_int_t */
+ DUK_ASSERT(DUK_RE_FLAG_GLOBAL < 0x10000UL); /* must fit into duk_small_int_t */
global = (duk_small_int_t) (force_global | (duk_small_int_t) (re_ctx.re_flags & DUK_RE_FLAG_GLOBAL));
DUK_ASSERT(re_ctx.nsaved >= 2);
DUK_ASSERT((re_ctx.nsaved % 2) == 0);
- p_buf = (duk_uint8_t *) duk_push_fixed_buffer(thr, sizeof(duk_uint8_t *) * re_ctx.nsaved); /* rely on zeroing */
+ p_buf = (duk_uint8_t *) duk_push_fixed_buffer(thr, sizeof(duk_uint8_t *) * re_ctx.nsaved); /* rely on zeroing */
DUK_UNREF(p_buf);
re_ctx.saved = (const duk_uint8_t **) duk_get_buffer(thr, -1, NULL);
DUK_ASSERT(re_ctx.saved != NULL);
@@ -89109,7 +92639,9 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
#endif
DUK_DDD(DUK_DDDPRINT("regexp ctx initialized, flags=0x%08lx, nsaved=%ld, recursion_limit=%ld, steps_limit=%ld",
- (unsigned long) re_ctx.re_flags, (long) re_ctx.nsaved, (long) re_ctx.recursion_limit,
+ (unsigned long) re_ctx.re_flags,
+ (long) re_ctx.nsaved,
+ (long) re_ctx.recursion_limit,
(long) re_ctx.steps_limit));
/*
@@ -89131,15 +92663,15 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
/* [ ... re_obj input bc saved_buf ] */
- duk_get_prop_stridx_short(thr, -4, DUK_STRIDX_LAST_INDEX); /* -> [ ... re_obj input bc saved_buf lastIndex ] */
- (void) duk_to_int(thr, -1); /* ToInteger(lastIndex) */
- d = duk_get_number(thr, -1); /* integer, but may be +/- Infinite, +/- zero (not NaN, though) */
+ duk_get_prop_stridx_short(thr, -4, DUK_STRIDX_LAST_INDEX); /* -> [ ... re_obj input bc saved_buf lastIndex ] */
+ (void) duk_to_int(thr, -1); /* ToInteger(lastIndex) */
+ d = duk_get_number(thr, -1); /* integer, but may be +/- Infinite, +/- zero (not NaN, though) */
duk_pop_nodecref_unsafe(thr);
if (global) {
if (d < 0.0 || d > (double) DUK_HSTRING_GET_CHARLEN(h_input)) {
/* match fail */
- char_offset = 0; /* not really necessary */
+ char_offset = 0; /* not really necessary */
DUK_ASSERT(match == 0);
goto match_over;
}
@@ -89175,8 +92707,10 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
DUK_ASSERT(re_ctx.recursion_depth == 0);
DUK_DDD(DUK_DDDPRINT("attempt match at char offset %ld; %p [%p,%p]",
- (long) char_offset, (const void *) sp,
- (const void *) re_ctx.input, (const void *) re_ctx.input_end));
+ (long) char_offset,
+ (const void *) sp,
+ (const void *) re_ctx.input,
+ (const void *) re_ctx.input_end));
/*
* Note:
@@ -89223,7 +92757,7 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
(void) duk__utf8_advance(thr, &sp, re_ctx.input, re_ctx.input_end, (duk_uint_fast32_t) 1);
}
- match_over:
+match_over:
/*
* Matching complete, create result array or return a 'null'. Update lastIndex
@@ -89249,8 +92783,8 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
DUK_DDD(DUK_DDDPRINT("regexp matches at char_offset %ld", (long) char_offset));
- DUK_ASSERT(re_ctx.nsaved >= 2); /* must have start and end */
- DUK_ASSERT((re_ctx.nsaved % 2) == 0); /* and even number */
+ DUK_ASSERT(re_ctx.nsaved >= 2); /* must have start and end */
+ DUK_ASSERT((re_ctx.nsaved % 2) == 0); /* and even number */
/* XXX: Array size is known before and (2 * re_ctx.nsaved) but not taken
* advantage of now. The array is not compacted either, as regexp match
@@ -89279,24 +92813,26 @@ DUK_LOCAL void duk__regexp_match_helper(duk_hthread *thr, duk_small_int_t force_
* as 'undefined'. The same is done when saved[] pointers are insane
* (this should, of course, never happen in practice).
*/
+ duk_push_uarridx(thr, (duk_uarridx_t) (i / 2));
+
if (re_ctx.saved[i] && re_ctx.saved[i + 1] && re_ctx.saved[i + 1] >= re_ctx.saved[i]) {
duk_push_lstring(thr,
(const char *) re_ctx.saved[i],
- (duk_size_t) (re_ctx.saved[i+1] - re_ctx.saved[i]));
+ (duk_size_t) (re_ctx.saved[i + 1] - re_ctx.saved[i]));
if (i == 0) {
/* Assumes that saved[0] and saved[1] are always
* set by regexp bytecode (if not, char_end_offset
* will be zero). Also assumes clen reflects the
* correct char length.
*/
- char_end_offset = char_offset + (duk_uint32_t) duk_get_length(thr, -1); /* add charlen */
+ char_end_offset = char_offset + (duk_uint32_t) duk_get_length(thr, -1); /* add charlen */
}
} else {
duk_push_undefined(thr);
}
- /* [ ... re_obj input bc saved_buf res_obj val ] */
- duk_put_prop_index(thr, -2, (duk_uarridx_t) (i / 2));
+ /* [ ... re_obj input bc saved_buf res_obj idx val ] */
+ duk_def_prop(thr, -3, DUK_DEFPROP_HAVE_VALUE | DUK_DEFPROP_SET_WEC);
}
/* [ ... re_obj input bc saved_buf res_obj ] */
@@ -89354,11 +92890,11 @@ DUK_INTERNAL void duk_regexp_match_force_global(duk_hthread *thr) {
duk__regexp_match_helper(thr, 1 /*force_global*/);
}
-#else /* DUK_USE_REGEXP_SUPPORT */
+#else /* DUK_USE_REGEXP_SUPPORT */
/* regexp support disabled */
-#endif /* DUK_USE_REGEXP_SUPPORT */
+#endif /* DUK_USE_REGEXP_SUPPORT */
/*
* Self tests to ensure execution environment is sane. Intended to catch
* compiler/platform problems which cannot be detected at compile time.
@@ -89378,18 +92914,21 @@ typedef union {
} duk__test_double_union;
/* Self test failed. Expects a local variable 'error_count' to exist. */
-#define DUK__FAILED(msg) do { \
+#define DUK__FAILED(msg) \
+ do { \
DUK_D(DUK_DPRINT("self test failed: " #msg " at " DUK_FILE_MACRO ":" DUK_MACRO_STRINGIFY(DUK_LINE_MACRO))); \
error_count++; \
} while (0)
-#define DUK__DBLUNION_CMP_TRUE(a,b) do { \
+#define DUK__DBLUNION_CMP_TRUE(a, b) \
+ do { \
if (duk_memcmp((const void *) (a), (const void *) (b), sizeof(duk__test_double_union)) != 0) { \
DUK__FAILED("double union compares false (expected true)"); \
} \
} while (0)
-#define DUK__DBLUNION_CMP_FALSE(a,b) do { \
+#define DUK__DBLUNION_CMP_FALSE(a, b) \
+ do { \
if (duk_memcmp((const void *) (a), (const void *) (b), sizeof(duk__test_double_union)) == 0) { \
DUK__FAILED("double union compares true (expected false)"); \
} \
@@ -89401,43 +92940,72 @@ typedef union {
} duk__test_u32_union;
#if defined(DUK_USE_INTEGER_LE)
-#define DUK__U32_INIT(u, a, b, c, d) do { \
- (u)->x[0] = (d); (u)->x[1] = (c); (u)->x[2] = (b); (u)->x[3] = (a); \
+#define DUK__U32_INIT(u, a, b, c, d) \
+ do { \
+ (u)->x[0] = (d); \
+ (u)->x[1] = (c); \
+ (u)->x[2] = (b); \
+ (u)->x[3] = (a); \
} while (0)
#elif defined(DUK_USE_INTEGER_ME)
#error integer mixed endian not supported now
#elif defined(DUK_USE_INTEGER_BE)
-#define DUK__U32_INIT(u, a, b, c, d) do { \
- (u)->x[0] = (a); (u)->x[1] = (b); (u)->x[2] = (c); (u)->x[3] = (d); \
+#define DUK__U32_INIT(u, a, b, c, d) \
+ do { \
+ (u)->x[0] = (a); \
+ (u)->x[1] = (b); \
+ (u)->x[2] = (c); \
+ (u)->x[3] = (d); \
} while (0)
#else
#error unknown integer endianness
#endif
#if defined(DUK_USE_DOUBLE_LE)
-#define DUK__DOUBLE_INIT(u, a, b, c, d, e, f, g, h) do { \
- (u)->x[0] = (h); (u)->x[1] = (g); (u)->x[2] = (f); (u)->x[3] = (e); \
- (u)->x[4] = (d); (u)->x[5] = (c); (u)->x[6] = (b); (u)->x[7] = (a); \
+#define DUK__DOUBLE_INIT(u, a, b, c, d, e, f, g, h) \
+ do { \
+ (u)->x[0] = (h); \
+ (u)->x[1] = (g); \
+ (u)->x[2] = (f); \
+ (u)->x[3] = (e); \
+ (u)->x[4] = (d); \
+ (u)->x[5] = (c); \
+ (u)->x[6] = (b); \
+ (u)->x[7] = (a); \
} while (0)
#define DUK__DOUBLE_COMPARE(u, a, b, c, d, e, f, g, h) \
- ((u)->x[0] == (h) && (u)->x[1] == (g) && (u)->x[2] == (f) && (u)->x[3] == (e) && \
- (u)->x[4] == (d) && (u)->x[5] == (c) && (u)->x[6] == (b) && (u)->x[7] == (a))
+ ((u)->x[0] == (h) && (u)->x[1] == (g) && (u)->x[2] == (f) && (u)->x[3] == (e) && (u)->x[4] == (d) && (u)->x[5] == (c) && \
+ (u)->x[6] == (b) && (u)->x[7] == (a))
#elif defined(DUK_USE_DOUBLE_ME)
-#define DUK__DOUBLE_INIT(u, a, b, c, d, e, f, g, h) do { \
- (u)->x[0] = (d); (u)->x[1] = (c); (u)->x[2] = (b); (u)->x[3] = (a); \
- (u)->x[4] = (h); (u)->x[5] = (g); (u)->x[6] = (f); (u)->x[7] = (e); \
+#define DUK__DOUBLE_INIT(u, a, b, c, d, e, f, g, h) \
+ do { \
+ (u)->x[0] = (d); \
+ (u)->x[1] = (c); \
+ (u)->x[2] = (b); \
+ (u)->x[3] = (a); \
+ (u)->x[4] = (h); \
+ (u)->x[5] = (g); \
+ (u)->x[6] = (f); \
+ (u)->x[7] = (e); \
} while (0)
#define DUK__DOUBLE_COMPARE(u, a, b, c, d, e, f, g, h) \
- ((u)->x[0] == (d) && (u)->x[1] == (c) && (u)->x[2] == (b) && (u)->x[3] == (a) && \
- (u)->x[4] == (h) && (u)->x[5] == (g) && (u)->x[6] == (f) && (u)->x[7] == (e))
+ ((u)->x[0] == (d) && (u)->x[1] == (c) && (u)->x[2] == (b) && (u)->x[3] == (a) && (u)->x[4] == (h) && (u)->x[5] == (g) && \
+ (u)->x[6] == (f) && (u)->x[7] == (e))
#elif defined(DUK_USE_DOUBLE_BE)
-#define DUK__DOUBLE_INIT(u, a, b, c, d, e, f, g, h) do { \
- (u)->x[0] = (a); (u)->x[1] = (b); (u)->x[2] = (c); (u)->x[3] = (d); \
- (u)->x[4] = (e); (u)->x[5] = (f); (u)->x[6] = (g); (u)->x[7] = (h); \
+#define DUK__DOUBLE_INIT(u, a, b, c, d, e, f, g, h) \
+ do { \
+ (u)->x[0] = (a); \
+ (u)->x[1] = (b); \
+ (u)->x[2] = (c); \
+ (u)->x[3] = (d); \
+ (u)->x[4] = (e); \
+ (u)->x[5] = (f); \
+ (u)->x[6] = (g); \
+ (u)->x[7] = (h); \
} while (0)
#define DUK__DOUBLE_COMPARE(u, a, b, c, d, e, f, g, h) \
- ((u)->x[0] == (a) && (u)->x[1] == (b) && (u)->x[2] == (c) && (u)->x[3] == (d) && \
- (u)->x[4] == (e) && (u)->x[5] == (f) && (u)->x[6] == (g) && (u)->x[7] == (h))
+ ((u)->x[0] == (a) && (u)->x[1] == (b) && (u)->x[2] == (c) && (u)->x[3] == (d) && (u)->x[4] == (e) && (u)->x[5] == (f) && \
+ (u)->x[6] == (g) && (u)->x[7] == (h))
#else
#error unknown double endianness
#endif
@@ -89449,17 +93017,12 @@ typedef union {
DUK_LOCAL duk_uint_t duk__selftest_types(void) {
duk_uint_t error_count = 0;
- if (!(sizeof(duk_int8_t) == 1 &&
- sizeof(duk_uint8_t) == 1 &&
- sizeof(duk_int16_t) == 2 &&
- sizeof(duk_uint16_t) == 2 &&
- sizeof(duk_int32_t) == 4 &&
- sizeof(duk_uint32_t) == 4)) {
+ if (!(sizeof(duk_int8_t) == 1 && sizeof(duk_uint8_t) == 1 && sizeof(duk_int16_t) == 2 && sizeof(duk_uint16_t) == 2 &&
+ sizeof(duk_int32_t) == 4 && sizeof(duk_uint32_t) == 4)) {
DUK__FAILED("duk_(u)int{8,16,32}_t size");
}
#if defined(DUK_USE_64BIT_OPS)
- if (!(sizeof(duk_int64_t) == 8 &&
- sizeof(duk_uint64_t) == 8)) {
+ if (!(sizeof(duk_int64_t) == 8 && sizeof(duk_uint64_t) == 8)) {
DUK__FAILED("duk_(u)int64_t size");
}
#endif
@@ -89535,7 +93098,7 @@ DUK_LOCAL duk_uint_t duk__selftest_byte_order(void) {
DUK__FAILED("duk_uint32_t byte order");
}
- if (u2.d != (double) 102030405060.0) {
+ if (!duk_double_equals(u2.d, 102030405060.0)) {
DUK__FAILED("double byte order");
}
@@ -89611,8 +93174,14 @@ DUK_LOCAL duk_uint_t duk__selftest_bswap_macros(void) {
* (2.008366013071895,)
*/
- du.uc[0] = 0x40; du.uc[1] = 0x00; du.uc[2] = 0x11; du.uc[3] = 0x22;
- du.uc[4] = 0x33; du.uc[5] = 0x44; du.uc[6] = 0x55; du.uc[7] = 0x66;
+ du.uc[0] = 0x40;
+ du.uc[1] = 0x00;
+ du.uc[2] = 0x11;
+ du.uc[3] = 0x22;
+ du.uc[4] = 0x33;
+ du.uc[5] = 0x44;
+ du.uc[6] = 0x55;
+ du.uc[7] = 0x66;
DUK_DBLUNION_DOUBLE_NTOH(&du);
du_diff = du.d - 2.008366013071895;
#if 0
@@ -89667,20 +93236,38 @@ DUK_LOCAL duk_uint_t duk__selftest_double_aliasing(void) {
*/
/* little endian */
- a.x[0] = 0x11; a.x[1] = 0x22; a.x[2] = 0x33; a.x[3] = 0x44;
- a.x[4] = 0x00; a.x[5] = 0x00; a.x[6] = 0xf1; a.x[7] = 0xff;
+ a.x[0] = 0x11;
+ a.x[1] = 0x22;
+ a.x[2] = 0x33;
+ a.x[3] = 0x44;
+ a.x[4] = 0x00;
+ a.x[5] = 0x00;
+ a.x[6] = 0xf1;
+ a.x[7] = 0xff;
b = a;
DUK__DBLUNION_CMP_TRUE(&a, &b);
/* big endian */
- a.x[0] = 0xff; a.x[1] = 0xf1; a.x[2] = 0x00; a.x[3] = 0x00;
- a.x[4] = 0x44; a.x[5] = 0x33; a.x[6] = 0x22; a.x[7] = 0x11;
+ a.x[0] = 0xff;
+ a.x[1] = 0xf1;
+ a.x[2] = 0x00;
+ a.x[3] = 0x00;
+ a.x[4] = 0x44;
+ a.x[5] = 0x33;
+ a.x[6] = 0x22;
+ a.x[7] = 0x11;
b = a;
DUK__DBLUNION_CMP_TRUE(&a, &b);
/* mixed endian */
- a.x[0] = 0x00; a.x[1] = 0x00; a.x[2] = 0xf1; a.x[3] = 0xff;
- a.x[4] = 0x11; a.x[5] = 0x22; a.x[6] = 0x33; a.x[7] = 0x44;
+ a.x[0] = 0x00;
+ a.x[1] = 0x00;
+ a.x[2] = 0xf1;
+ a.x[3] = 0xff;
+ a.x[4] = 0x11;
+ a.x[5] = 0x22;
+ a.x[6] = 0x33;
+ a.x[7] = 0x44;
b = a;
DUK__DBLUNION_CMP_TRUE(&a, &b);
@@ -89745,10 +93332,14 @@ DUK_LOCAL duk_uint_t duk__selftest_double_rounding(void) {
c.d = a.d + b.d;
if (!DUK__DOUBLE_COMPARE(&c, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)) {
DUK_D(DUK_DPRINT("broken result (native endiannesss): %02x %02x %02x %02x %02x %02x %02x %02x",
- (unsigned int) c.x[0], (unsigned int) c.x[1],
- (unsigned int) c.x[2], (unsigned int) c.x[3],
- (unsigned int) c.x[4], (unsigned int) c.x[5],
- (unsigned int) c.x[6], (unsigned int) c.x[7]));
+ (unsigned int) c.x[0],
+ (unsigned int) c.x[1],
+ (unsigned int) c.x[2],
+ (unsigned int) c.x[3],
+ (unsigned int) c.x[4],
+ (unsigned int) c.x[5],
+ (unsigned int) c.x[6],
+ (unsigned int) c.x[7]));
DUK__FAILED("invalid result from 1.0 + 0.5ulp");
}
@@ -89765,10 +93356,14 @@ DUK_LOCAL duk_uint_t duk__selftest_double_rounding(void) {
c.d = a.d + b.d;
if (!DUK__DOUBLE_COMPARE(&c, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02)) {
DUK_D(DUK_DPRINT("broken result (native endiannesss): %02x %02x %02x %02x %02x %02x %02x %02x",
- (unsigned int) c.x[0], (unsigned int) c.x[1],
- (unsigned int) c.x[2], (unsigned int) c.x[3],
- (unsigned int) c.x[4], (unsigned int) c.x[5],
- (unsigned int) c.x[6], (unsigned int) c.x[7]));
+ (unsigned int) c.x[0],
+ (unsigned int) c.x[1],
+ (unsigned int) c.x[2],
+ (unsigned int) c.x[3],
+ (unsigned int) c.x[4],
+ (unsigned int) c.x[5],
+ (unsigned int) c.x[6],
+ (unsigned int) c.x[7]));
DUK__FAILED("invalid result from (1.0 + ulp) + 0.5ulp");
}
@@ -89910,7 +93505,7 @@ DUK_LOCAL duk_uint_t duk__selftest_cast_double_to_small_uint(void) {
u = (duk_small_uint_t) d1;
d2 = (duk_double_t) u;
- if (!(d1 == 1.0 && u == 1 && d2 == 1.0 && d1 == d2)) {
+ if (!(duk_double_equals(d1, 1.0) && u == 1 && duk_double_equals(d2, 1.0) && duk_double_equals(d1, d2))) {
DUK__FAILED("double to duk_small_uint_t cast failed");
}
@@ -89920,7 +93515,7 @@ DUK_LOCAL duk_uint_t duk__selftest_cast_double_to_small_uint(void) {
uv = (duk_small_uint_t) d1v;
d2v = (duk_double_t) uv;
- if (!(d1v == 1.0 && uv == 1 && d2v == 1.0 && d1v == d2v)) {
+ if (!(duk_double_equals(d1v, 1.0) && uv == 1 && duk_double_equals(d2v, 1.0) && duk_double_equals(d1v, d2v))) {
DUK__FAILED("double to duk_small_uint_t cast failed");
}
@@ -89939,7 +93534,7 @@ DUK_LOCAL duk_uint_t duk__selftest_cast_double_to_uint32(void) {
duk_double_t dv;
duk_uint32_t uv;
- dv = 3735928559.0; /* 0xdeadbeef in decimal */
+ dv = 3735928559.0; /* 0xdeadbeef in decimal */
uv = (duk_uint32_t) dv;
if (uv != 0xdeadbeefUL) {
@@ -89976,7 +93571,7 @@ DUK_LOCAL duk_uint_t duk__selftest_alloc_funcs(duk_alloc_function alloc_func,
ptr = alloc_func(udata, (duk_size_t) i);
if (ptr == NULL) {
DUK_D(DUK_DPRINT("alloc failed, ignore"));
- continue; /* alloc failed, ignore */
+ continue; /* alloc failed, ignore */
}
for (j = 0; j < i; j++) {
((unsigned char *) ptr)[j] = (unsigned char) (0x80 + j);
@@ -89985,14 +93580,15 @@ DUK_LOCAL duk_uint_t duk__selftest_alloc_funcs(duk_alloc_function alloc_func,
if (new_ptr == NULL) {
DUK_D(DUK_DPRINT("realloc failed, ignore"));
free_func(udata, ptr);
- continue; /* realloc failed, ignore */
+ continue; /* realloc failed, ignore */
}
ptr = new_ptr;
for (j = 0; j < i; j++) {
x = ((unsigned char *) ptr)[j];
if (x != (unsigned char) (0x80 + j)) {
DUK_D(DUK_DPRINT("byte at index %ld doesn't match after realloc: %02lx",
- (long) j, (unsigned long) x));
+ (long) j,
+ (unsigned long) x));
DUK__FAILED("byte compare after realloc");
break;
}
@@ -90036,7 +93632,7 @@ DUK_INTERNAL duk_uint_t duk_selftest_run_tests(duk_alloc_function alloc_func,
return error_count;
}
-#endif /* DUK_USE_SELF_TESTS */
+#endif /* DUK_USE_SELF_TESTS */
/* automatic undefs */
#undef DUK__DBLUNION_CMP_FALSE
@@ -90079,11 +93675,11 @@ DUK_INTERNAL DUK_ALWAYS_INLINE void duk_tval_set_number_chkfast_fast(duk_tval *t
expt = (duk_small_int_t) ((i >> 52) & 0x07ff);
shift = expt - 1023;
- if (shift >= 0 && shift <= 46) { /* exponents 1023 to 1069 */
+ if (shift >= 0 && shift <= 46) { /* exponents 1023 to 1069 */
duk_int64_t t;
if (((DUK_I64_CONSTANT(0x000fffffffffffff) >> shift) & i) == 0) {
- t = i | DUK_I64_CONSTANT(0x0010000000000000); /* implicit leading one */
+ t = i | DUK_I64_CONSTANT(0x0010000000000000); /* implicit leading one */
t = t & DUK_I64_CONSTANT(0x001fffffffffffff);
t = t >> (52 - shift);
if (i < 0) {
@@ -90092,13 +93688,13 @@ DUK_INTERNAL DUK_ALWAYS_INLINE void duk_tval_set_number_chkfast_fast(duk_tval *t
DUK_TVAL_SET_FASTINT(tv, t);
return;
}
- } else if (shift == -1023) { /* exponent 0 */
+ } else if (shift == -1023) { /* exponent 0 */
if (i >= 0 && (i & DUK_I64_CONSTANT(0x000fffffffffffff)) == 0) {
/* Note: reject negative zero. */
DUK_TVAL_SET_FASTINT(tv, (duk_int64_t) 0);
return;
}
- } else if (shift == 47) { /* exponent 1070 */
+ } else if (shift == 47) { /* exponent 1070 */
if (i < 0 && (i & DUK_I64_CONSTANT(0x000fffffffffffff)) == 0) {
DUK_TVAL_SET_FASTINT(tv, (duk_int64_t) DUK_FASTINT_MIN);
return;
@@ -90126,23 +93722,23 @@ DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_tval_get_number_packed(duk_tval
if ((t >> 48) != DUK_TAG_FASTINT) {
return tv->d;
} else if (t & DUK_U64_CONSTANT(0x0000800000000000)) {
- t = (duk_uint64_t) (-((duk_int64_t) t)); /* avoid unary minus on unsigned */
- t = t & DUK_U64_CONSTANT(0x0000ffffffffffff); /* negative */
+ t = (duk_uint64_t) (-((duk_int64_t) t)); /* avoid unary minus on unsigned */
+ t = t & DUK_U64_CONSTANT(0x0000ffffffffffff); /* negative */
t |= DUK_U64_CONSTANT(0xc330000000000000);
DUK_DBLUNION_SET_UINT64(&du, t);
- return du.d + 4503599627370496.0; /* 1 << 52 */
+ return du.d + 4503599627370496.0; /* 1 << 52 */
} else if (t != 0) {
- t &= DUK_U64_CONSTANT(0x0000ffffffffffff); /* positive */
+ t &= DUK_U64_CONSTANT(0x0000ffffffffffff); /* positive */
t |= DUK_U64_CONSTANT(0x4330000000000000);
DUK_DBLUNION_SET_UINT64(&du, t);
- return du.d - 4503599627370496.0; /* 1 << 52 */
+ return du.d - 4503599627370496.0; /* 1 << 52 */
} else {
- return 0.0; /* zero */
+ return 0.0; /* zero */
}
}
-#endif /* DUK_USE_FASTINT && DUK_USE_PACKED_TVAL */
+#endif /* DUK_USE_FASTINT && DUK_USE_PACKED_TVAL */
-#if 0 /* unused */
+#if 0 /* unused */
#if defined(DUK_USE_FASTINT) && !defined(DUK_USE_PACKED_TVAL)
DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_tval_get_number_unpacked(duk_tval *tv) {
duk_double_union du;
@@ -90164,8 +93760,8 @@ DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_tval_get_number_unpacked(duk_tva
return tv->v.d;
}
}
-#endif /* DUK_USE_FASTINT && DUK_USE_PACKED_TVAL */
-#endif /* 0 */
+#endif /* DUK_USE_FASTINT && DUK_USE_PACKED_TVAL */
+#endif /* 0 */
#if defined(DUK_USE_FASTINT) && !defined(DUK_USE_PACKED_TVAL)
DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_tval_get_number_unpacked_fastint(duk_tval *tv) {
@@ -90177,16 +93773,16 @@ DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_tval_get_number_unpacked_fastint
if (tv->v.fi >= 0) {
t = DUK_U64_CONSTANT(0x4330000000000000) | (duk_uint64_t) tv->v.fi;
DUK_DBLUNION_SET_UINT64(&du, t);
- return du.d - 4503599627370496.0; /* 1 << 52 */
+ return du.d - 4503599627370496.0; /* 1 << 52 */
} else {
t = DUK_U64_CONSTANT(0xc330000000000000) | (duk_uint64_t) (-tv->v.fi);
DUK_DBLUNION_SET_UINT64(&du, t);
- return du.d + 4503599627370496.0; /* 1 << 52 */
+ return du.d + 4503599627370496.0; /* 1 << 52 */
}
}
-#endif /* DUK_USE_FASTINT && DUK_USE_PACKED_TVAL */
+#endif /* DUK_USE_FASTINT && DUK_USE_PACKED_TVAL */
-#endif /* DUK_USE_FASTINT */
+#endif /* DUK_USE_FASTINT */
/*
* Assertion helpers.
@@ -96417,7 +100013,7 @@ DUK_INTERNAL duk_uint32_t duk_bd_decode(duk_bitdecoder_ctx *ctx, duk_small_int_t
shift = ctx->currbits - bits;
mask = (((duk_uint32_t) 1U) << bits) - 1U;
tmp = (ctx->currval >> shift) & mask;
- ctx->currbits = shift; /* remaining */
+ ctx->currbits = shift; /* remaining */
#if 0
DUK_DDD(DUK_DDDPRINT("decode_bits: %ld bits -> 0x%08lx (%ld), currbits=%ld, currval=0x%08lx",
@@ -96456,17 +100052,17 @@ DUK_INTERNAL duk_uint32_t duk_bd_decode_varuint(duk_bitdecoder_ctx *ctx) {
*/
switch (duk_bd_decode(ctx, 2)) {
case 0:
- return 0; /* [0,0] */
+ return 0; /* [0,0] */
case 1:
- return duk_bd_decode(ctx, 2) + 1; /* [1,4] */
+ return duk_bd_decode(ctx, 2) + 1; /* [1,4] */
case 2:
- return duk_bd_decode(ctx, 5) + 5; /* [5,36] */
+ return duk_bd_decode(ctx, 5) + 5; /* [5,36] */
default:
t = duk_bd_decode(ctx, 7);
if (t == 0) {
return duk_bd_decode(ctx, 20);
}
- return (t - 1) + 37; /* [37,163] */
+ return (t - 1) + 37; /* [37,163] */
}
}
@@ -96475,20 +100071,18 @@ DUK_INTERNAL duk_uint32_t duk_bd_decode_varuint(duk_bitdecoder_ctx *ctx) {
* Caller must supply the output buffer whose size is NOT checked!
*/
-#define DUK__BITPACK_LETTER_LIMIT 26
-#define DUK__BITPACK_LOOKUP1 26
-#define DUK__BITPACK_LOOKUP2 27
-#define DUK__BITPACK_SWITCH1 28
-#define DUK__BITPACK_SWITCH 29
-#define DUK__BITPACK_UNUSED1 30
-#define DUK__BITPACK_EIGHTBIT 31
+#define DUK__BITPACK_LETTER_LIMIT 26
+#define DUK__BITPACK_LOOKUP1 26
+#define DUK__BITPACK_LOOKUP2 27
+#define DUK__BITPACK_SWITCH1 28
+#define DUK__BITPACK_SWITCH 29
+#define DUK__BITPACK_UNUSED1 30
+#define DUK__BITPACK_EIGHTBIT 31
-DUK_LOCAL const duk_uint8_t duk__bitpacked_lookup[16] = {
- DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3,
- DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7,
- DUK_ASC_8, DUK_ASC_9, DUK_ASC_UNDERSCORE, DUK_ASC_SPACE,
- 0x82, 0x80, DUK_ASC_DOUBLEQUOTE, DUK_ASC_LCURLY
-};
+DUK_LOCAL const duk_uint8_t duk__bitpacked_lookup[16] = { DUK_ASC_0, DUK_ASC_1, DUK_ASC_2, DUK_ASC_3,
+ DUK_ASC_4, DUK_ASC_5, DUK_ASC_6, DUK_ASC_7,
+ DUK_ASC_8, DUK_ASC_9, DUK_ASC_UNDERSCORE, DUK_ASC_SPACE,
+ 0x82, 0x80, DUK_ASC_DOUBLEQUOTE, DUK_ASC_LCURLY };
DUK_INTERNAL duk_small_uint_t duk_bd_decode_bitpacked_string(duk_bitdecoder_ctx *bd, duk_uint8_t *out) {
duk_small_uint_t len;
@@ -96498,10 +100092,10 @@ DUK_INTERNAL duk_small_uint_t duk_bd_decode_bitpacked_string(duk_bitdecoder_ctx
len = duk_bd_decode(bd, 5);
if (len == 31) {
- len = duk_bd_decode(bd, 8); /* Support up to 256 bytes; rare. */
+ len = duk_bd_decode(bd, 8); /* Support up to 256 bytes; rare. */
}
- mode = 32; /* 0 = uppercase, 32 = lowercase (= 'a' - 'A') */
+ mode = 32; /* 0 = uppercase, 32 = lowercase (= 'a' - 'A') */
for (i = 0; i < len; i++) {
t = duk_bd_decode(bd, 5);
if (t < DUK__BITPACK_LETTER_LIMIT) {
@@ -96512,7 +100106,7 @@ DUK_INTERNAL duk_small_uint_t duk_bd_decode_bitpacked_string(duk_bitdecoder_ctx
t = duk__bitpacked_lookup[8 + duk_bd_decode(bd, 3)];
} else if (t == DUK__BITPACK_SWITCH1) {
t = duk_bd_decode(bd, 5);
- DUK_ASSERT_DISABLE(t >= 0); /* unsigned */
+ DUK_ASSERT_DISABLE(t >= 0); /* unsigned */
DUK_ASSERT(t <= 25);
t = t + DUK_ASC_UC_A + (mode ^ 32);
} else if (t == DUK__BITPACK_SWITCH) {
@@ -96654,7 +100248,7 @@ DUK_INTERNAL duk_uint8_t *duk_bw_resize(duk_hthread *thr, duk_bufwriter_ctx *bw_
DUK_ERROR_RANGE(thr, DUK_STR_BUFFER_TOO_LONG);
DUK_WO_NORETURN(return NULL;);
}
-#if 0 /* for manual torture testing: tight allocation, useful with valgrind */
+#if 0 /* for manual torture testing: tight allocation, useful with valgrind */
new_sz = curr_off + sz;
#endif
@@ -96695,9 +100289,7 @@ DUK_INTERNAL void duk_bw_write_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw
DUK_UNREF(thr);
p_base = bw->p_base;
- duk_memcpy_unsafe((void *) bw->p,
- (const void *) (p_base + src_off),
- (size_t) len);
+ duk_memcpy_unsafe((void *) bw->p, (const void *) (p_base + src_off), (size_t) len);
bw->p += len;
}
@@ -96712,7 +100304,11 @@ DUK_INTERNAL void duk_bw_write_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx
duk_bw_write_raw_slice(thr, bw, src_off, len);
}
-DUK_INTERNAL void duk_bw_insert_raw_bytes(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, const duk_uint8_t *buf, duk_size_t len) {
+DUK_INTERNAL void duk_bw_insert_raw_bytes(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ const duk_uint8_t *buf,
+ duk_size_t len) {
duk_uint8_t *p_base;
duk_size_t buf_sz, move_sz;
@@ -96723,20 +100319,20 @@ DUK_INTERNAL void duk_bw_insert_raw_bytes(duk_hthread *thr, duk_bufwriter_ctx *b
DUK_UNREF(thr);
p_base = bw->p_base;
- buf_sz = (duk_size_t) (bw->p - p_base); /* constrained by maximum buffer size */
+ buf_sz = (duk_size_t) (bw->p - p_base); /* constrained by maximum buffer size */
move_sz = buf_sz - dst_off;
- DUK_ASSERT(p_base != NULL); /* buffer size is >= 1 */
- duk_memmove_unsafe((void *) (p_base + dst_off + len),
- (const void *) (p_base + dst_off),
- (size_t) move_sz);
- duk_memcpy_unsafe((void *) (p_base + dst_off),
- (const void *) buf,
- (size_t) len);
+ DUK_ASSERT(p_base != NULL); /* buffer size is >= 1 */
+ duk_memmove_unsafe((void *) (p_base + dst_off + len), (const void *) (p_base + dst_off), (size_t) move_sz);
+ duk_memcpy_unsafe((void *) (p_base + dst_off), (const void *) buf, (size_t) len);
bw->p += len;
}
-DUK_INTERNAL void duk_bw_insert_ensure_bytes(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, const duk_uint8_t *buf, duk_size_t len) {
+DUK_INTERNAL void duk_bw_insert_ensure_bytes(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ const duk_uint8_t *buf,
+ duk_size_t len) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(bw != NULL);
DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw));
@@ -96746,7 +100342,11 @@ DUK_INTERNAL void duk_bw_insert_ensure_bytes(duk_hthread *thr, duk_bufwriter_ctx
duk_bw_insert_raw_bytes(thr, bw, dst_off, buf, len);
}
-DUK_INTERNAL void duk_bw_insert_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, duk_size_t src_off, duk_size_t len) {
+DUK_INTERNAL void duk_bw_insert_raw_slice(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ duk_size_t src_off,
+ duk_size_t len) {
duk_uint8_t *p_base;
duk_size_t buf_sz, move_sz;
@@ -96773,17 +100373,17 @@ DUK_INTERNAL void duk_bw_insert_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *b
buf_sz = (duk_size_t) (bw->p - p_base);
move_sz = buf_sz - dst_off;
- DUK_ASSERT(p_base != NULL); /* buffer size is >= 1 */
- duk_memmove_unsafe((void *) (p_base + dst_off + len),
- (const void *) (p_base + dst_off),
- (size_t) move_sz);
- duk_memcpy_unsafe((void *) (p_base + dst_off),
- (const void *) (p_base + src_off),
- (size_t) len);
+ DUK_ASSERT(p_base != NULL); /* buffer size is >= 1 */
+ duk_memmove_unsafe((void *) (p_base + dst_off + len), (const void *) (p_base + dst_off), (size_t) move_sz);
+ duk_memcpy_unsafe((void *) (p_base + dst_off), (const void *) (p_base + src_off), (size_t) len);
bw->p += len;
}
-DUK_INTERNAL void duk_bw_insert_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_off, duk_size_t src_off, duk_size_t len) {
+DUK_INTERNAL void duk_bw_insert_ensure_slice(duk_hthread *thr,
+ duk_bufwriter_ctx *bw,
+ duk_size_t dst_off,
+ duk_size_t src_off,
+ duk_size_t len) {
DUK_ASSERT(thr != NULL);
DUK_ASSERT(bw != NULL);
DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw));
@@ -96813,7 +100413,7 @@ DUK_INTERNAL duk_uint8_t *duk_bw_insert_raw_area(duk_hthread *thr, duk_bufwriter
p_dst = p_base + off + len;
p_src = p_base + off;
duk_memmove_unsafe((void *) p_dst, (const void *) p_src, (size_t) move_sz);
- return p_src; /* point to start of 'reserved area' */
+ return p_src; /* point to start of 'reserved area' */
}
DUK_INTERNAL duk_uint8_t *duk_bw_insert_ensure_area(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t off, duk_size_t len) {
@@ -96843,105 +100443,11 @@ DUK_INTERNAL void duk_bw_remove_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *b
p_dst = p_base + off;
p_src = p_dst + len;
move_sz = (duk_size_t) (bw->p - p_src);
- duk_memmove_unsafe((void *) p_dst,
- (const void *) p_src,
- (size_t) move_sz);
+ duk_memmove_unsafe((void *) p_dst, (const void *) p_src, (size_t) move_sz);
bw->p -= len;
}
/*
- * Macro support functions for reading/writing raw data.
- *
- * These are done using mempcy to ensure they're valid even for unaligned
- * reads/writes on platforms where alignment counts. On x86 at least gcc
- * is able to compile these into a bswap+mov. "Always inline" is used to
- * ensure these macros compile to minimal code.
- *
- * Not really bufwriter related, but currently used together.
- */
-
-DUK_INTERNAL DUK_ALWAYS_INLINE duk_uint16_t duk_raw_read_u16_be(duk_uint8_t **p) {
- union {
- duk_uint8_t b[2];
- duk_uint16_t x;
- } u;
-
- duk_memcpy((void *) u.b, (const void *) (*p), (size_t) 2);
- u.x = DUK_NTOH16(u.x);
- *p += 2;
- return u.x;
-}
-
-DUK_INTERNAL DUK_ALWAYS_INLINE duk_uint32_t duk_raw_read_u32_be(duk_uint8_t **p) {
- union {
- duk_uint8_t b[4];
- duk_uint32_t x;
- } u;
-
- duk_memcpy((void *) u.b, (const void *) (*p), (size_t) 4);
- u.x = DUK_NTOH32(u.x);
- *p += 4;
- return u.x;
-}
-
-DUK_INTERNAL DUK_ALWAYS_INLINE duk_double_t duk_raw_read_double_be(duk_uint8_t **p) {
- duk_double_union du;
- union {
- duk_uint8_t b[4];
- duk_uint32_t x;
- } u;
-
- duk_memcpy((void *) u.b, (const void *) (*p), (size_t) 4);
- u.x = DUK_NTOH32(u.x);
- du.ui[DUK_DBL_IDX_UI0] = u.x;
- duk_memcpy((void *) u.b, (const void *) (*p + 4), (size_t) 4);
- u.x = DUK_NTOH32(u.x);
- du.ui[DUK_DBL_IDX_UI1] = u.x;
- *p += 8;
-
- return du.d;
-}
-
-DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_u16_be(duk_uint8_t **p, duk_uint16_t val) {
- union {
- duk_uint8_t b[2];
- duk_uint16_t x;
- } u;
-
- u.x = DUK_HTON16(val);
- duk_memcpy((void *) (*p), (const void *) u.b, (size_t) 2);
- *p += 2;
-}
-
-DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_u32_be(duk_uint8_t **p, duk_uint32_t val) {
- union {
- duk_uint8_t b[4];
- duk_uint32_t x;
- } u;
-
- u.x = DUK_HTON32(val);
- duk_memcpy((void *) (*p), (const void *) u.b, (size_t) 4);
- *p += 4;
-}
-
-DUK_INTERNAL DUK_ALWAYS_INLINE void duk_raw_write_double_be(duk_uint8_t **p, duk_double_t val) {
- duk_double_union du;
- union {
- duk_uint8_t b[4];
- duk_uint32_t x;
- } u;
-
- du.d = val;
- u.x = du.ui[DUK_DBL_IDX_UI0];
- u.x = DUK_HTON32(u.x);
- duk_memcpy((void *) (*p), (const void *) u.b, (size_t) 4);
- u.x = du.ui[DUK_DBL_IDX_UI1];
- u.x = DUK_HTON32(u.x);
- duk_memcpy((void *) (*p + 4), (const void *) u.b, (size_t) 4);
- *p += 8;
-}
-
-/*
* Assertion helpers
*/
@@ -96951,12 +100457,8 @@ DUK_INTERNAL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *bw_ct
DUK_ASSERT(bw_ctx != NULL);
DUK_ASSERT(bw_ctx->buf != NULL);
DUK_ASSERT((DUK_HBUFFER_DYNAMIC_GET_SIZE(bw_ctx->buf) == 0) ||
- (bw_ctx->p != NULL &&
- bw_ctx->p_base != NULL &&
- bw_ctx->p_limit != NULL &&
- bw_ctx->p_limit >= bw_ctx->p_base &&
- bw_ctx->p >= bw_ctx->p_base &&
- bw_ctx->p <= bw_ctx->p_limit));
+ (bw_ctx->p != NULL && bw_ctx->p_base != NULL && bw_ctx->p_limit != NULL && bw_ctx->p_limit >= bw_ctx->p_base &&
+ bw_ctx->p >= bw_ctx->p_base && bw_ctx->p <= bw_ctx->p_limit));
}
#endif
/*
@@ -96978,7 +100480,8 @@ DUK_INTERNAL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *bw_ct
* relying on fmin(), fmax(), or other intrinsics. Out-of-range results are
* not assumed by caller, but here value is clamped, NaN converts to minval.
*/
-#define DUK__DOUBLE_INT_CAST1(tname,minval,maxval) do { \
+#define DUK__DOUBLE_INT_CAST1(tname, minval, maxval) \
+ do { \
if (DUK_LIKELY(x >= (duk_double_t) (minval))) { \
DUK_ASSERT(!DUK_ISNAN(x)); \
if (DUK_LIKELY(x <= (duk_double_t) (maxval))) { \
@@ -96999,19 +100502,22 @@ DUK_INTERNAL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *bw_ct
* argument is a NaN, return the second argument. This avoids a
* NaN-to-integer cast which is undefined behavior.
*/
-#define DUK__DOUBLE_INT_CAST2(tname,minval,maxval) do { \
+#define DUK__DOUBLE_INT_CAST2(tname, minval, maxval) \
+ do { \
return (tname) duk_double_fmin(duk_double_fmax(x, (duk_double_t) (minval)), (duk_double_t) (maxval)); \
} while (0)
/* Another solution which doesn't need C99+ behavior for fmin() and fmax(). */
-#define DUK__DOUBLE_INT_CAST3(tname,minval,maxval) do { \
+#define DUK__DOUBLE_INT_CAST3(tname, minval, maxval) \
+ do { \
if (DUK_ISNAN(x)) { \
/* 0 or any other value is fine. */ \
return (tname) 0; \
} else \
return (tname) DUK_FMIN(DUK_FMAX(x, (duk_double_t) (minval)), (duk_double_t) (maxval)); \
- } \
- } while (0)
+ } \
+ } \
+ while (0)
/* C99+ solution: relies on specific fmin() and fmax() behavior in C99: if
* one argument is NaN but the other isn't, the non-NaN argument is returned.
@@ -97020,7 +100526,8 @@ DUK_INTERNAL void duk_bw_assert_valid(duk_hthread *thr, duk_bufwriter_ctx *bw_ct
* the fmin() and fmax() calls (unless one uses -ffast-math which we don't
* support).
*/
-#define DUK__DOUBLE_INT_CAST4(tname,minval,maxval) do { \
+#define DUK__DOUBLE_INT_CAST4(tname, minval, maxval) \
+ do { \
return (tname) DUK_FMIN(DUK_FMAX(x, (duk_double_t) (minval)), (duk_double_t) (maxval)); \
} while (0)
@@ -97064,12 +100571,12 @@ DUK_INTERNAL duk_uint32_t duk_double_to_uint32_t(duk_double_t x) {
* infinity, at least on x64. This number is one double unit below that
* midpoint. See misc/float_cast.c.
*/
-#define DUK__FLOAT_ROUND_LIMIT 340282356779733623858607532500980858880.0
+#define DUK__FLOAT_ROUND_LIMIT 340282356779733623858607532500980858880.0
/* Maximum IEEE float. Double-to-float conversion above this would be out of
* range and thus technically undefined behavior.
*/
-#define DUK__FLOAT_MAX 340282346638528859811704183484516925440.0
+#define DUK__FLOAT_MAX 340282346638528859811704183484516925440.0
DUK_INTERNAL duk_float_t duk_double_to_float_t(duk_double_t x) {
/* Even a double-to-float cast is technically undefined behavior if
@@ -97088,8 +100595,7 @@ DUK_INTERNAL duk_float_t duk_double_to_float_t(duk_double_t x) {
duk_double_t t;
t = DUK_FABS(x);
- DUK_ASSERT((DUK_ISNAN(x) && DUK_ISNAN(t)) ||
- (!DUK_ISNAN(x) && !DUK_ISNAN(t)));
+ DUK_ASSERT((DUK_ISNAN(x) && DUK_ISNAN(t)) || (!DUK_ISNAN(x) && !DUK_ISNAN(t)));
if (DUK_LIKELY(t <= DUK__FLOAT_MAX)) {
/* Standard in-range case, try to get here with a minimum
@@ -97237,7 +100743,7 @@ DUK_INTERNAL duk_small_uint_t duk_double_signbit(duk_double_t x) {
DUK_INTERNAL duk_double_t duk_double_trunc_towards_zero(duk_double_t x) {
/* XXX: optimize */
duk_small_uint_t s = duk_double_signbit(x);
- x = DUK_FLOOR(DUK_FABS(x)); /* truncate towards zero */
+ x = DUK_FLOOR(DUK_FABS(x)); /* truncate towards zero */
if (s) {
x = -x;
}
@@ -97279,7 +100785,7 @@ DUK_INTERNAL duk_bool_t duk_double_is_integer(duk_double_t x) {
if (duk_double_is_nan_or_inf(x)) {
return 0;
} else {
- return duk_js_tointeger_number(x) == x;
+ return duk_double_equals(duk_js_tointeger_number(x), x);
}
}
@@ -97299,7 +100805,7 @@ DUK_INTERNAL duk_bool_t duk_is_whole_get_int32_nonegzero(duk_double_t x, duk_int
duk_int32_t t;
t = duk_double_to_int32_t(x);
- if (!((duk_double_t) t == x)) {
+ if (!duk_double_equals((duk_double_t) t, x)) {
return 0;
}
if (t == 0) {
@@ -97320,7 +100826,7 @@ DUK_INTERNAL duk_bool_t duk_is_whole_get_int32(duk_double_t x, duk_int32_t *ival
duk_int32_t t;
t = duk_double_to_int32_t(x);
- if (!((duk_double_t) t == x)) {
+ if (!duk_double_equals((duk_double_t) t, x)) {
return 0;
}
*ival = t;
@@ -97333,7 +100839,7 @@ DUK_INTERNAL duk_bool_t duk_is_whole_get_int32(duk_double_t x, duk_int32_t *ival
DUK_INTERNAL DUK_INLINE duk_double_t duk_double_div(duk_double_t x, duk_double_t y) {
#if !defined(DUK_USE_ALLOW_UNDEFINED_BEHAVIOR)
- if (DUK_UNLIKELY(y == 0.0)) {
+ if (DUK_UNLIKELY(duk_double_equals(y, 0.0) != 0)) {
/* In C99+ division by zero is undefined behavior so
* avoid it entirely. Hopefully the compiler is
* smart enough to avoid emitting any actual code
@@ -97361,6 +100867,115 @@ DUK_INTERNAL DUK_INLINE duk_double_t duk_double_div(duk_double_t x, duk_double_t
return x / y;
}
+
+/* Double and float byteorder changes. */
+
+DUK_INTERNAL DUK_INLINE void duk_dblunion_host_to_little(duk_double_union *u) {
+#if defined(DUK_USE_DOUBLE_LE)
+ /* HGFEDCBA -> HGFEDCBA */
+ DUK_UNREF(u);
+#elif defined(DUK_USE_DOUBLE_ME)
+ duk_uint32_t a, b;
+
+ /* DCBAHGFE -> HGFEDCBA */
+ a = u->ui[0];
+ b = u->ui[1];
+ u->ui[0] = b;
+ u->ui[1] = a;
+#elif defined(DUK_USE_DOUBLE_BE)
+ /* ABCDEFGH -> HGFEDCBA */
+#if defined(DUK_USE_64BIT_OPS)
+ u->ull[0] = DUK_BSWAP64(u->ull[0]);
+#else
+ duk_uint32_t a, b;
+
+ a = u->ui[0];
+ b = u->ui[1];
+ u->ui[0] = DUK_BSWAP32(b);
+ u->ui[1] = DUK_BSWAP32(a);
+#endif
+#else
+#error internal error
+#endif
+}
+
+DUK_INTERNAL DUK_INLINE void duk_dblunion_little_to_host(duk_double_union *u) {
+ duk_dblunion_host_to_little(u);
+}
+
+DUK_INTERNAL DUK_INLINE void duk_dblunion_host_to_big(duk_double_union *u) {
+#if defined(DUK_USE_DOUBLE_LE)
+ /* HGFEDCBA -> ABCDEFGH */
+#if defined(DUK_USE_64BIT_OPS)
+ u->ull[0] = DUK_BSWAP64(u->ull[0]);
+#else
+ duk_uint32_t a, b;
+
+ a = u->ui[0];
+ b = u->ui[1];
+ u->ui[0] = DUK_BSWAP32(b);
+ u->ui[1] = DUK_BSWAP32(a);
+#endif
+#elif defined(DUK_USE_DOUBLE_ME)
+ duk_uint32_t a, b;
+
+ /* DCBAHGFE -> ABCDEFGH */
+ a = u->ui[0];
+ b = u->ui[1];
+ u->ui[0] = DUK_BSWAP32(a);
+ u->ui[1] = DUK_BSWAP32(b);
+#elif defined(DUK_USE_DOUBLE_BE)
+ /* ABCDEFGH -> ABCDEFGH */
+ DUK_UNREF(u);
+#else
+#error internal error
+#endif
+}
+
+DUK_INTERNAL DUK_INLINE void duk_dblunion_big_to_host(duk_double_union *u) {
+ duk_dblunion_host_to_big(u);
+}
+
+DUK_INTERNAL DUK_INLINE void duk_fltunion_host_to_big(duk_float_union *u) {
+#if defined(DUK_USE_DOUBLE_LE) || defined(DUK_USE_DOUBLE_ME)
+ /* DCBA -> ABCD */
+ u->ui[0] = DUK_BSWAP32(u->ui[0]);
+#elif defined(DUK_USE_DOUBLE_BE)
+ /* ABCD -> ABCD */
+ DUK_UNREF(u);
+#else
+#error internal error
+#endif
+}
+
+DUK_INTERNAL DUK_INLINE void duk_fltunion_big_to_host(duk_float_union *u) {
+ duk_fltunion_host_to_big(u);
+}
+
+/* Comparison: ensures comparison operates on exactly correct types, avoiding
+ * some floating point comparison pitfalls (e.g. atan2() assertions failed on
+ * -m32 with direct comparison, even with explicit casts).
+ */
+#if defined(DUK_USE_GCC_PRAGMAS)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#elif defined(DUK_USE_CLANG_PRAGMAS)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wfloat-equal"
+#endif
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_bool_t duk_double_equals(duk_double_t x, duk_double_t y) {
+ return x == y;
+}
+
+DUK_INTERNAL DUK_ALWAYS_INLINE duk_bool_t duk_float_equals(duk_float_t x, duk_float_t y) {
+ return x == y;
+}
+#if defined(DUK_USE_GCC_PRAGMAS)
+#pragma GCC diagnostic pop
+#elif defined(DUK_USE_CLANG_PRAGMAS)
+#pragma clang diagnostic pop
+#endif
/*
* Hash function duk_util_hashbytes().
*
@@ -97374,8 +100989,8 @@ DUK_INTERNAL DUK_INLINE duk_double_t duk_double_div(duk_double_t x, duk_double_t
#if defined(DUK_USE_STRHASH_DENSE)
/* 'magic' constants for Murmurhash2 */
-#define DUK__MAGIC_M ((duk_uint32_t) 0x5bd1e995UL)
-#define DUK__MAGIC_R 24
+#define DUK__MAGIC_M ((duk_uint32_t) 0x5bd1e995UL)
+#define DUK__MAGIC_R 24
DUK_INTERNAL duk_uint32_t duk_util_hashbytes(const duk_uint8_t *data, duk_size_t len, duk_uint32_t seed) {
duk_uint32_t h = seed ^ ((duk_uint32_t) len);
@@ -97389,9 +101004,7 @@ DUK_INTERNAL duk_uint32_t duk_util_hashbytes(const duk_uint8_t *data, duk_size_t
#if defined(DUK_USE_HASHBYTES_UNALIGNED_U32_ACCESS)
duk_uint32_t k = *((const duk_uint32_t *) (const void *) data);
#else
- duk_uint32_t k = ((duk_uint32_t) data[0]) |
- (((duk_uint32_t) data[1]) << 8) |
- (((duk_uint32_t) data[2]) << 16) |
+ duk_uint32_t k = ((duk_uint32_t) data[0]) | (((duk_uint32_t) data[1]) << 8) | (((duk_uint32_t) data[2]) << 16) |
(((duk_uint32_t) data[3]) << 24);
#endif
@@ -97405,11 +101018,14 @@ DUK_INTERNAL duk_uint32_t duk_util_hashbytes(const duk_uint8_t *data, duk_size_t
}
switch (len) {
- case 3: h ^= data[2] << 16;
- case 2: h ^= data[1] << 8;
- case 1: h ^= data[0];
- h *= DUK__MAGIC_M;
- }
+ case 3:
+ h ^= data[2] << 16;
+ case 2:
+ h ^= data[1] << 8;
+ case 1:
+ h ^= data[0];
+ h *= DUK__MAGIC_M;
+ }
h ^= h >> 13;
h *= DUK__MAGIC_M;
@@ -97417,7 +101033,7 @@ DUK_INTERNAL duk_uint32_t duk_util_hashbytes(const duk_uint8_t *data, duk_size_t
return h;
}
-#endif /* DUK_USE_STRHASH_DENSE */
+#endif /* DUK_USE_STRHASH_DENSE */
/* automatic undefs */
#undef DUK__MAGIC_M
@@ -97440,7 +101056,7 @@ DUK_INTERNAL DUK_INLINE duk_small_int_t duk_memcmp(const void *s1, const void *s
DUK_ASSERT(s2 != NULL);
return DUK_MEMCMP(s1, s2, (size_t) len);
}
-#else /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
+#else /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
DUK_INTERNAL DUK_INLINE duk_small_int_t duk_memcmp_unsafe(const void *s1, const void *s2, duk_size_t len) {
DUK_ASSERT(s1 != NULL || len == 0U);
DUK_ASSERT(s2 != NULL || len == 0U);
@@ -97457,7 +101073,7 @@ DUK_INTERNAL DUK_INLINE duk_small_int_t duk_memcmp(const void *s1, const void *s
DUK_ASSERT(s2 != NULL);
return DUK_MEMCMP(s1, s2, (size_t) len);
}
-#endif /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
+#endif /* DUK_USE_ALLOW_UNDEFINED_BEHAVIOR */
/*
* A tiny random number generator used for Math.random() and other internals.
*
@@ -97481,15 +101097,16 @@ DUK_INTERNAL DUK_INLINE duk_small_int_t duk_memcmp(const void *s1, const void *s
#endif
#if defined(DUK__RANDOM_SHAMIR3OP)
-#define DUK__UPDATE_RND(rnd) do { \
+#define DUK__UPDATE_RND(rnd) \
+ do { \
(rnd) += ((rnd) * (rnd)) | 0x05UL; \
- (rnd) = ((rnd) & 0xffffffffUL); /* if duk_uint32_t is exactly 32 bits, this is a NOP */ \
+ (rnd) = ((rnd) &0xffffffffUL); /* if duk_uint32_t is exactly 32 bits, this is a NOP */ \
} while (0)
-#define DUK__RND_BIT(rnd) ((rnd) >> 31) /* only use the highest bit */
+#define DUK__RND_BIT(rnd) ((rnd) >> 31) /* only use the highest bit */
DUK_INTERNAL void duk_util_tinyrandom_prepare_seed(duk_hthread *thr) {
- DUK_UNREF(thr); /* Nothing now. */
+ DUK_UNREF(thr); /* Nothing now. */
}
DUK_INTERNAL duk_double_t duk_util_tinyrandom_get_double(duk_hthread *thr) {
@@ -97499,7 +101116,7 @@ DUK_INTERNAL duk_double_t duk_util_tinyrandom_get_double(duk_hthread *thr) {
rnd = thr->heap->rnd_state;
- n = 53; /* enough to cover the whole mantissa */
+ n = 53; /* enough to cover the whole mantissa */
t = 0.0;
do {
@@ -97515,7 +101132,7 @@ DUK_INTERNAL duk_double_t duk_util_tinyrandom_get_double(duk_hthread *thr) {
return t;
}
-#endif /* DUK__RANDOM_SHAMIR3OP */
+#endif /* DUK__RANDOM_SHAMIR3OP */
#if defined(DUK__RANDOM_XOROSHIRO128PLUS)
DUK_LOCAL DUK_ALWAYS_INLINE duk_uint64_t duk__rnd_splitmix64(duk_uint64_t *x) {
@@ -97554,9 +101171,9 @@ DUK_INTERNAL void duk_util_tinyrandom_prepare_seed(duk_hthread *thr) {
* because current seed is Date.now()) result in different xoroshiro128+
* seeds.
*/
- x = thr->heap->rnd_state[0]; /* Only [0] is used as input here. */
+ x = thr->heap->rnd_state[0]; /* Only [0] is used as input here. */
for (i = 0; i < 64; i++) {
- thr->heap->rnd_state[i & 0x01] = duk__rnd_splitmix64(&x); /* Keep last 2 values. */
+ thr->heap->rnd_state[i & 0x01] = duk__rnd_splitmix64(&x); /* Keep last 2 values. */
}
}
@@ -97580,9 +101197,9 @@ DUK_INTERNAL duk_double_t duk_util_tinyrandom_get_double(duk_hthread *thr) {
#endif
return du.d - 1.0;
}
-#endif /* DUK__RANDOM_XOROSHIRO128PLUS */
+#endif /* DUK__RANDOM_XOROSHIRO128PLUS */
-#endif /* !DUK_USE_GET_RANDOM_DOUBLE */
+#endif /* !DUK_USE_GET_RANDOM_DOUBLE */
/* automatic undefs */
#undef DUK__RANDOM_SHAMIR3OP
diff --git a/content/handlers/javascript/duktape/duktape.h b/content/handlers/javascript/duktape/duktape.h
index e851df397..d3cba119e 100644
--- a/content/handlers/javascript/duktape/duktape.h
+++ b/content/handlers/javascript/duktape/duktape.h
@@ -1,5 +1,5 @@
/*
- * Duktape public API for Duktape 2.4.0.
+ * Duktape public API for Duktape 2.7.0.
*
* See the API reference for documentation on call semantics. The exposed,
* supported API is between the "BEGIN PUBLIC API" and "END PUBLIC API"
@@ -21,7 +21,7 @@
*
* (http://opensource.org/licenses/MIT)
*
- * Copyright (c) 2013-2019 by Duktape authors (see AUTHORS.rst)
+ * Copyright (c) 2013-present by Duktape authors (see AUTHORS.rst)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -109,6 +109,13 @@
* * James Swift (https://github.com/phraemer)
* * Luis de Bethencourt (https://github.com/luisbg)
* * Ian Whyman (https://github.com/v00d00)
+ * * Rick Sayre (https://github.com/whorfin)
+ * * Craig Leres (https://github.com/leres)
+ * * Maurici Abad (https://github.com/mauriciabad)
+ * * Nancy Li (https://github.com/NancyLi1013)
+ * * William Parks (https://github.com/WilliamParks)
+ * * Sam Hellawell (https://github.com/samhellawell)
+ * * Vladislavs Sokurenko (https://github.com/sokurenko)
*
* Other contributions
* ===================
@@ -175,7 +182,7 @@
* development snapshots have 99 for patch level (e.g. 0.10.99 would be a
* development version after 0.10.0 but before the next official release).
*/
-#define DUK_VERSION 20400L
+#define DUK_VERSION 20700L
/* Git commit, describe, and branch for Duktape build. Useful for
* non-official snapshot builds so that application code can easily log
@@ -394,30 +401,35 @@ struct duk_time_components {
#define DUK_DEFPROP_C DUK_DEFPROP_CONFIGURABLE
#define DUK_DEFPROP_WE (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE)
#define DUK_DEFPROP_WC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_CONFIGURABLE)
+#define DUK_DEFPROP_EC (DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
#define DUK_DEFPROP_WEC (DUK_DEFPROP_WRITABLE | DUK_DEFPROP_ENUMERABLE | DUK_DEFPROP_CONFIGURABLE)
#define DUK_DEFPROP_HAVE_W DUK_DEFPROP_HAVE_WRITABLE
#define DUK_DEFPROP_HAVE_E DUK_DEFPROP_HAVE_ENUMERABLE
#define DUK_DEFPROP_HAVE_C DUK_DEFPROP_HAVE_CONFIGURABLE
#define DUK_DEFPROP_HAVE_WE (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE)
#define DUK_DEFPROP_HAVE_WC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
+#define DUK_DEFPROP_HAVE_EC (DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
#define DUK_DEFPROP_HAVE_WEC (DUK_DEFPROP_HAVE_WRITABLE | DUK_DEFPROP_HAVE_ENUMERABLE | DUK_DEFPROP_HAVE_CONFIGURABLE)
#define DUK_DEFPROP_SET_W DUK_DEFPROP_SET_WRITABLE
#define DUK_DEFPROP_SET_E DUK_DEFPROP_SET_ENUMERABLE
#define DUK_DEFPROP_SET_C DUK_DEFPROP_SET_CONFIGURABLE
#define DUK_DEFPROP_SET_WE (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE)
#define DUK_DEFPROP_SET_WC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_CONFIGURABLE)
+#define DUK_DEFPROP_SET_EC (DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
#define DUK_DEFPROP_SET_WEC (DUK_DEFPROP_SET_WRITABLE | DUK_DEFPROP_SET_ENUMERABLE | DUK_DEFPROP_SET_CONFIGURABLE)
#define DUK_DEFPROP_CLEAR_W DUK_DEFPROP_CLEAR_WRITABLE
#define DUK_DEFPROP_CLEAR_E DUK_DEFPROP_CLEAR_ENUMERABLE
#define DUK_DEFPROP_CLEAR_C DUK_DEFPROP_CLEAR_CONFIGURABLE
#define DUK_DEFPROP_CLEAR_WE (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE)
#define DUK_DEFPROP_CLEAR_WC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
+#define DUK_DEFPROP_CLEAR_EC (DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
#define DUK_DEFPROP_CLEAR_WEC (DUK_DEFPROP_CLEAR_WRITABLE | DUK_DEFPROP_CLEAR_ENUMERABLE | DUK_DEFPROP_CLEAR_CONFIGURABLE)
#define DUK_DEFPROP_ATTR_W (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_W)
#define DUK_DEFPROP_ATTR_E (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_E)
#define DUK_DEFPROP_ATTR_C (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_C)
#define DUK_DEFPROP_ATTR_WE (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WE)
#define DUK_DEFPROP_ATTR_WC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WC)
+#define DUK_DEFPROP_ATTR_EC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_EC)
#define DUK_DEFPROP_ATTR_WEC (DUK_DEFPROP_HAVE_WEC | DUK_DEFPROP_WEC)
/* Flags for duk_push_thread_raw() */
@@ -661,6 +673,7 @@ DUK_EXTERNAL_DECL void duk_swap_top(duk_context *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL void duk_dup(duk_context *ctx, duk_idx_t from_idx);
DUK_EXTERNAL_DECL void duk_dup_top(duk_context *ctx);
DUK_EXTERNAL_DECL void duk_insert(duk_context *ctx, duk_idx_t to_idx);
+DUK_EXTERNAL_DECL void duk_pull(duk_context *ctx, duk_idx_t from_idx);
DUK_EXTERNAL_DECL void duk_replace(duk_context *ctx, duk_idx_t to_idx);
DUK_EXTERNAL_DECL void duk_copy(duk_context *ctx, duk_idx_t from_idx, duk_idx_t to_idx);
DUK_EXTERNAL_DECL void duk_remove(duk_context *ctx, duk_idx_t idx);
@@ -1032,6 +1045,8 @@ DUK_EXTERNAL_DECL const char *duk_hex_encode(duk_context *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL void duk_hex_decode(duk_context *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL const char *duk_json_encode(duk_context *ctx, duk_idx_t idx);
DUK_EXTERNAL_DECL void duk_json_decode(duk_context *ctx, duk_idx_t idx);
+DUK_EXTERNAL_DECL void duk_cbor_encode(duk_context *ctx, duk_idx_t idx, duk_uint_t encode_flags);
+DUK_EXTERNAL_DECL void duk_cbor_decode(duk_context *ctx, duk_idx_t idx, duk_uint_t decode_flags);
DUK_EXTERNAL_DECL const char *duk_buffer_to_string(duk_context *ctx, duk_idx_t idx);
diff --git a/content/handlers/javascript/duktape/netsurf.bnd b/content/handlers/javascript/duktape/netsurf.bnd
index e47f07d2b..483f3471f 100644
--- a/content/handlers/javascript/duktape/netsurf.bnd
+++ b/content/handlers/javascript/duktape/netsurf.bnd
@@ -60,6 +60,8 @@ struct dom_html_br_element;
#include "Document.bnd"
#include "Node.bnd"
#include "NodeList.bnd"
+#include "DOMTokenList.bnd"
+#include "DOMSettableTokenList.bnd"
#include "NamedNodeMap.bnd"
#include "Element.bnd"
#include "HTMLCollection.bnd"
@@ -205,3 +207,7 @@ init HTMLPropertiesCollection(struct dom_html_collection *coll);
#include "CanvasRenderingContext2D.bnd"
#include "ImageData.bnd"
+/* CSS Object model */
+
+#include "CSSRule.bnd"
+#include "CSSStyleSheet.bnd"
diff --git a/content/handlers/javascript/duktape/polyfill.js b/content/handlers/javascript/duktape/polyfill.js
index 5f0215618..6c85ce1a0 100644
--- a/content/handlers/javascript/duktape/polyfill.js
+++ b/content/handlers/javascript/duktape/polyfill.js
@@ -83,3 +83,21 @@ if (!Array.from) {
};
}());
}
+
+// DOMTokenList formatter, in theory we can remove this if we do the stringifier IDL support
+
+DOMTokenList.prototype.toString = function () {
+ if (this.length == 0) {
+ return "";
+ }
+
+ var ret = this.item(0);
+ for (var index = 1; index < this.length; index++) {
+ ret = ret + " " + this.item(index);
+ }
+
+ return ret;
+}
+
+// Inherit the same toString for settable lists
+DOMSettableTokenList.prototype.toString = DOMTokenList.prototype.toString; \ No newline at end of file
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c
index 60051f5c9..cee89a1a5 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -264,7 +264,7 @@ textplain_drain_input(textplain_content *c,
parserutils_inputstream *stream,
parserutils_error terminator)
{
- static const uint8_t *u_fffd = (const uint8_t *) "\xef\xbf\xfd";
+ static const uint8_t *u_fffd = (const uint8_t *) "\xef\xbf\xbd";
const uint8_t *ch;
size_t chlen, offset = 0;
diff --git a/content/hlcache.c b/content/hlcache.c
index d860015a5..5cba88bc6 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -30,6 +30,7 @@
#include "utils/messages.h"
#include "utils/ring.h"
#include "utils/utils.h"
+#include "netsurf/inttypes.h"
#include "netsurf/misc.h"
#include "netsurf/content.h"
#include "desktop/gui_internal.h"
@@ -592,7 +593,7 @@ void hlcache_finalise(void)
num_contents++;
}
- NSLOG(netsurf, INFO, "%d contents remain before cache drain",
+ NSLOG(netsurf, INFO, "%"PRIu32" contents remain before cache drain",
num_contents);
/* Drain cache */
@@ -607,7 +608,8 @@ void hlcache_finalise(void)
}
} while (num_contents > 0 && num_contents != prev_contents);
- NSLOG(netsurf, INFO, "%d contents remaining after being polite", num_contents);
+ NSLOG(netsurf, INFO, "%"PRIu32" contents remaining after being polite",
+ num_contents);
/* Drain cache again, forcing the matter */
do {
@@ -621,12 +623,12 @@ void hlcache_finalise(void)
}
} while (num_contents > 0 && num_contents != prev_contents);
- NSLOG(netsurf, INFO, "%d contents remaining:", num_contents);
+ NSLOG(netsurf, INFO, "%"PRIu32" contents remaining:", num_contents);
for (entry = hlcache->content_list; entry != NULL; entry = entry->next) {
hlcache_handle entry_handle = { entry, NULL, NULL };
if (entry->content != NULL) {
- NSLOG(netsurf, INFO, " %p : %s (%d users)",
+ NSLOG(netsurf, INFO, " %p : %s (%"PRIu32" users)",
entry,
nsurl_access(hlcache_handle_get_url(&entry_handle)),
content_count_users(entry->content));
diff --git a/content/llcache.c b/content/llcache.c
index 81e08383c..32c7449d2 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -116,7 +116,7 @@ typedef struct {
bool tried_with_auth; /**< Whether we've tried with auth */
- bool tried_with_tls_downgrade; /**< Whether we've tried TLS <= 1.0 */
+ bool tried_with_tls_downgrade; /**< Whether we've tried TLS 1.2 */
bool tainted_tls; /**< Whether the TLS transport is tainted */
} llcache_fetch_ctx;
@@ -1923,7 +1923,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
llcache_object *obj, *newest = NULL;
NSLOG(llcache, DEBUG,
- "Searching cache for %s flags:%x referer:%s post:%p",
+ "Searching cache for %s flags:%"PRIx32" referer:%s post:%p",
nsurl_access(url), flags,
referer==NULL?"":nsurl_access(referer),
post);
@@ -2100,7 +2100,7 @@ llcache_object_retrieve(nsurl *url,
nsurl *defragmented_url;
bool uncachable = false;
- NSLOG(llcache, DEBUG, "Retrieve %s (%x, %s, %p)", nsurl_access(url), flags,
+ NSLOG(llcache, DEBUG, "Retrieve %s (%"PRIx32", %s, %p)", nsurl_access(url), flags,
referer==NULL?"":nsurl_access(referer), post);
@@ -2207,10 +2207,17 @@ static nserror llcache_hsts_transform_url(nsurl *url, nsurl **result,
scheme = nsurl_get_component(url, NSURL_SCHEME);
if (lwc_string_caseless_isequal(scheme, corestring_lwc_http,
&match) != lwc_error_ok || match == false) {
- /* Non-HTTP fetch: ignore */
+ /* Non-HTTP fetch: no transform required */
+ if (lwc_string_caseless_isequal(scheme, corestring_lwc_https,
+ &match) == lwc_error_ok && match) {
+ /* HTTPS: ask urldb if HSTS is enabled */
+ *hsts_in_use = urldb_get_hsts_enabled(url);
+ } else {
+ /* Anything else: no HSTS */
+ *hsts_in_use = false;
+ }
lwc_string_unref(scheme);
*result = nsurl_ref(url);
- *hsts_in_use = false;
return error;
}
lwc_string_unref(scheme);
@@ -2966,7 +2973,7 @@ static void llcache_persist(void *p)
total_bandwidth = (total_written * 1000) / total_elapsed;
NSLOG(llcache, DEBUG,
- "Wrote %"PRIssizet" bytes in %lums bw:%lu %s",
+ "Wrote %"PRIsizet" bytes in %lums bw:%lu %s",
written, elapsed, (written * 1000) / elapsed,
nsurl_access(lst[idx]->url) );
@@ -3034,7 +3041,7 @@ static void llcache_persist(void *p)
llcache->total_elapsed += total_elapsed;
NSLOG(llcache, DEBUG,
- "writeout size:%"PRIssizet" time:%lu bandwidth:%lubytes/s",
+ "writeout size:%"PRIsizet" time:%lu bandwidth:%lubytes/s",
total_written, total_elapsed, total_bandwidth);
NSLOG(llcache, DEBUG, "Rescheduling writeout in %dms", next);
@@ -3813,7 +3820,7 @@ void llcache_clean(bool purge)
llcache_size -= object->source_len;
NSLOG(llcache, DEBUG,
- "Freeing source data for %p len:%"PRIssizet,
+ "Freeing source data for %p len:%"PRIsizet,
object, object->source_len);
}
}
@@ -3832,7 +3839,7 @@ void llcache_clean(bool purge)
(object->store_state == LLCACHE_STATE_DISC) &&
(object->source_data == NULL)) {
NSLOG(llcache, DEBUG,
- "discarding backed object len:%"PRIssizet" age:%ld (%p) %s",
+ "discarding backed object len:%"PRIsizet" age:%ld (%p) %s",
object->source_len,
(long)(time(NULL) - object->last_used),
object,
@@ -3862,7 +3869,7 @@ void llcache_clean(bool purge)
(object->fetch.fetch == NULL) &&
(object->store_state == LLCACHE_STATE_RAM)) {
NSLOG(llcache, DEBUG,
- "discarding fresh object len:%"PRIssizet" age:%ld (%p) %s",
+ "discarding fresh object len:%"PRIsizet" age:%ld (%p) %s",
object->source_len,
(long)(time(NULL) - object->last_used),
object,
@@ -3876,7 +3883,7 @@ void llcache_clean(bool purge)
}
}
- NSLOG(llcache, DEBUG, "Size: %u (limit: %u)", llcache_size, limit);
+ NSLOG(llcache, DEBUG, "Size: %"PRIu32" (limit: %"PRIu32")", llcache_size, limit);
}
/* Exported interface documented in content/llcache.h */
@@ -3897,7 +3904,7 @@ llcache_initialise(const struct llcache_parameters *prm)
llcache->all_caught_up = true;
NSLOG(llcache, INFO,
- "llcache initialising with a limit of %d bytes",
+ "llcache initialising with a limit of %"PRIu32" bytes",
llcache->limit);
/* backing store initialisation */
diff --git a/content/mimesniff.c b/content/mimesniff.c
index 9a11834f9..adc000dd7 100644
--- a/content/mimesniff.c
+++ b/content/mimesniff.c
@@ -260,6 +260,13 @@ static nserror mimesniff__match_unknown_exact(const uint8_t *data, size_t len,
SIG(&corestring_lwc_application_x_gzip, "\x1f\x8b\x08", true),
SIG(&corestring_lwc_application_postscript, "%!PS-Adobe-",true),
SIG(&corestring_lwc_application_pdf, "%PDF-", false),
+ SIG(&corestring_lwc_image_jxl, "\xFF\x0A", true), /* containerless jpeg xl*/
+ {
+ (const uint8_t *)"\x00\x00\x00\x0CJXL \x0D\x0A\x87\x0A",
+ 12,
+ true,
+ &corestring_lwc_image_jxl
+ }, /* containered jpeg xl*/
{ NULL, 0, false, NULL }
};
#undef SIG
@@ -376,6 +383,12 @@ static nserror mimesniff__compute_image(lwc_string *official_type,
SIG(&corestring_lwc_image_jpeg, "\xff\xd8\xff"),
SIG(&corestring_lwc_image_bmp, "BM"),
SIG(&corestring_lwc_image_vnd_microsoft_icon, "\x00\x00\x01\x00"),
+ SIG(&corestring_lwc_image_jxl, "\xFF\x0A"), /* containerless jpeg xl*/
+ {
+ (const uint8_t *)"\x00\x00\x00\x0CJXL \x0D\x0A\x87\x0A",
+ 12,
+ &corestring_lwc_image_jxl
+ }, /* containered jpeg xl*/
{ NULL, 0, NULL }
};
#undef SIG
diff --git a/content/urldb.c b/content/urldb.c
index 74d0b7db2..881f76f6d 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -115,11 +115,6 @@
#include "content/content.h"
#include "content/urldb.h"
-#ifdef WITH_AMISSL
-/* AmiSSL needs everything to be using bsdsocket directly to avoid conflicts */
-#include <proto/bsdsocket.h>
-#endif
-
/**
* cookie entry.
*
@@ -1526,7 +1521,10 @@ static void urldb_dump_search(struct search_node *parent, int depth)
for (h = parent->data; h; h = h->parent) {
if (h->part) {
r = snprintf(&s[i], sl - i, "%s", h->part);
- if ((i + r) > sl) {
+ if (r < 0) {
+ break;
+ }
+ if ((i + r) >= sl) {
break;
}
i += r;
diff --git a/desktop/Makefile b/desktop/Makefile
index 63749a6f2..5e190275d 100644
--- a/desktop/Makefile
+++ b/desktop/Makefile
@@ -12,7 +12,7 @@ desktop/version.c: testament $(OBJROOT)/testament.h
# S_BROWSER are sources related to full browsers but are common
# between RISC OS, GTK, BeOS and AmigaOS builds
-S_BROWSER := browser.c browser_window.c browser_history.c \
+S_BROWSER := bitmap.c browser.c browser_window.c browser_history.c \
download.c frames.c netsurf.c cw_helper.c \
save_complete.c save_text.c selection.c textinput.c gui_factory.c \
save_pdf.c font_haru.c
diff --git a/desktop/bitmap.c b/desktop/bitmap.c
new file mode 100644
index 000000000..0602773ca
--- /dev/null
+++ b/desktop/bitmap.c
@@ -0,0 +1,338 @@
+/*
+ * Copyright 2022 Michael Drake <tlsa@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** \file
+ * Internal core bitmap interface.
+ */
+
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "utils/log.h"
+#include "utils/errors.h"
+
+#include "desktop/bitmap.h"
+#include "desktop/gui_internal.h"
+
+/** The client bitmap format. */
+bitmap_fmt_t bitmap_fmt;
+
+/** The client bitmap colour channel layout. */
+struct bitmap_colour_layout bitmap_layout = {
+ .r = 0,
+ .g = 1,
+ .b = 2,
+ .a = 3,
+};
+
+/**
+ * Get the colour layout for the given bitmap format.
+ *
+ * \param[in] fmt Pixel format to get channel layout for,
+ * \return channel layout structure.
+ */
+static struct bitmap_colour_layout bitmap__get_colour_layout(
+ const bitmap_fmt_t *fmt)
+{
+ switch (fmt->layout) {
+ default:
+ /* Fall through. */
+ case BITMAP_LAYOUT_R8G8B8A8:
+ return (struct bitmap_colour_layout) {
+ .r = 0,
+ .g = 1,
+ .b = 2,
+ .a = 3,
+ };
+
+ case BITMAP_LAYOUT_B8G8R8A8:
+ return (struct bitmap_colour_layout) {
+ .b = 0,
+ .g = 1,
+ .r = 2,
+ .a = 3,
+ };
+
+ case BITMAP_LAYOUT_A8R8G8B8:
+ return (struct bitmap_colour_layout) {
+ .a = 0,
+ .r = 1,
+ .g = 2,
+ .b = 3,
+ };
+
+ case BITMAP_LAYOUT_A8B8G8R8:
+ return (struct bitmap_colour_layout) {
+ .a = 0,
+ .b = 1,
+ .g = 2,
+ .r = 3,
+ };
+ }
+}
+
+/**
+ * Get string for given pixel layout.
+ *
+ * \param[in] layout The pixel layout to get string for,
+ * \return String for given layout.
+ */
+static const char *bitmap__layout_to_str(enum bitmap_layout layout)
+{
+ const char *const str[] = {
+ [BITMAP_LAYOUT_R8G8B8A8] = "Byte-wise RGBA",
+ [BITMAP_LAYOUT_B8G8R8A8] = "Byte-wise BGRA",
+ [BITMAP_LAYOUT_A8R8G8B8] = "Byte-wise ARGB",
+ [BITMAP_LAYOUT_A8B8G8R8] = "Byte-wise ABGR",
+ [BITMAP_LAYOUT_RGBA8888] = "0xRRGGBBAA (native endian)",
+ [BITMAP_LAYOUT_BGRA8888] = "0xBBGGRRAA (native endian)",
+ [BITMAP_LAYOUT_ARGB8888] = "0xAARRGGBB (native endian)",
+ [BITMAP_LAYOUT_ABGR8888] = "0xAABBGGRR (native endian)",
+ };
+
+ if ((size_t)layout >= (sizeof(str)) / sizeof(*str) ||
+ str[layout] == NULL) {
+ return "Unknown";
+ }
+
+ return str[layout];
+}
+
+/* Exported function, documented in include/netsurf/bitmap.h */
+void bitmap_set_format(const bitmap_fmt_t *bitmap_format)
+{
+ bitmap_fmt = *bitmap_format;
+
+ NSLOG(netsurf, INFO, "Setting core bitmap format to: %s%s",
+ bitmap__layout_to_str(bitmap_format->layout),
+ bitmap_format->pma ? " pre multiplied alpha" : "");
+
+ bitmap_fmt.layout = bitmap_sanitise_bitmap_layout(bitmap_fmt.layout);
+
+ if (bitmap_format->layout != bitmap_fmt.layout) {
+ NSLOG(netsurf, INFO, "Sanitised layout to: %s",
+ bitmap__layout_to_str(bitmap_fmt.layout));
+ }
+
+ bitmap_layout = bitmap__get_colour_layout(&bitmap_fmt);
+}
+
+/**
+ * Swap colour component order.
+ *
+ * \param[in] width Bitmap width in pixels.
+ * \param[in] height Bitmap height in pixels.
+ * \param[in] buffer Pixel buffer.
+ * \param[in] rowstride Pixel buffer row stride in bytes.
+ * \param[in] to Pixel layout to convert to.
+ * \param[in] from Pixel layout to convert from.
+ */
+static inline void bitmap__format_convert(
+ int width,
+ int height,
+ uint8_t *buffer,
+ size_t rowstride,
+ struct bitmap_colour_layout to,
+ struct bitmap_colour_layout from)
+{
+ /* Just swapping the components around */
+ for (int y = 0; y < height; y++) {
+ uint8_t *row = buffer;
+
+ for (int x = 0; x < width; x++) {
+ const uint32_t px = *((uint32_t *)(void *) row);
+
+ row[to.r] = ((const uint8_t *) &px)[from.r];
+ row[to.g] = ((const uint8_t *) &px)[from.g];
+ row[to.b] = ((const uint8_t *) &px)[from.b];
+ row[to.a] = ((const uint8_t *) &px)[from.a];
+
+ row += sizeof(uint32_t);
+ }
+
+ buffer += rowstride;
+ }
+}
+
+/**
+ * Convert plain alpha to premultiplied alpha.
+ *
+ * \param[in] width Bitmap width in pixels.
+ * \param[in] height Bitmap height in pixels.
+ * \param[in] buffer Pixel buffer.
+ * \param[in] rowstride Pixel buffer row stride in bytes.
+ * \param[in] to Pixel layout to convert to.
+ * \param[in] from Pixel layout to convert from.
+ */
+static inline void bitmap__format_convert_to_pma(
+ int width,
+ int height,
+ uint8_t *buffer,
+ size_t rowstride,
+ struct bitmap_colour_layout to,
+ struct bitmap_colour_layout from)
+{
+ for (int y = 0; y < height; y++) {
+ uint8_t *row = buffer;
+
+ for (int x = 0; x < width; x++) {
+ const uint32_t px = *((uint32_t *)(void *) row);
+ uint32_t a, r, g, b;
+
+ r = ((const uint8_t *) &px)[from.r];
+ g = ((const uint8_t *) &px)[from.g];
+ b = ((const uint8_t *) &px)[from.b];
+ a = ((const uint8_t *) &px)[from.a];
+
+ if (a != 0) {
+ r = ((r * (a + 1)) >> 8) & 0xff;
+ g = ((g * (a + 1)) >> 8) & 0xff;
+ b = ((b * (a + 1)) >> 8) & 0xff;
+ } else {
+ r = g = b = 0;
+ }
+
+ row[to.r] = r;
+ row[to.g] = g;
+ row[to.b] = b;
+ row[to.a] = a;
+
+ row += sizeof(uint32_t);
+ }
+
+ buffer += rowstride;
+ }
+}
+
+/**
+ * Convert from premultiplied alpha to plain alpha.
+ *
+ * \param[in] width Bitmap width in pixels.
+ * \param[in] height Bitmap height in pixels.
+ * \param[in] buffer Pixel buffer.
+ * \param[in] rowstride Pixel buffer row stride in bytes.
+ * \param[in] to Pixel layout to convert to.
+ * \param[in] from Pixel layout to convert from.
+ */
+static inline void bitmap__format_convert_from_pma(
+ int width,
+ int height,
+ uint8_t *buffer,
+ size_t rowstride,
+ struct bitmap_colour_layout to,
+ struct bitmap_colour_layout from)
+{
+ for (int y = 0; y < height; y++) {
+ uint8_t *row = buffer;
+
+ for (int x = 0; x < width; x++) {
+ const uint32_t px = *((uint32_t *)(void *) row);
+ uint32_t a, r, g, b;
+
+ r = ((const uint8_t *) &px)[from.r];
+ g = ((const uint8_t *) &px)[from.g];
+ b = ((const uint8_t *) &px)[from.b];
+ a = ((const uint8_t *) &px)[from.a];
+
+ if (a != 0) {
+ r = (r << 8) / a;
+ g = (g << 8) / a;
+ b = (b << 8) / a;
+
+ r = (r > 255) ? 255 : r;
+ g = (g > 255) ? 255 : g;
+ b = (b > 255) ? 255 : b;
+ } else {
+ r = g = b = 0;
+ }
+
+ row[to.r] = r;
+ row[to.g] = g;
+ row[to.b] = b;
+ row[to.a] = a;
+
+ row += sizeof(uint32_t);
+ }
+
+ buffer += rowstride;
+ }
+}
+
+/* Exported function, documented in desktop/bitmap.h */
+void bitmap_format_convert(void *bitmap,
+ const bitmap_fmt_t *fmt_from,
+ const bitmap_fmt_t *fmt_to)
+{
+ int width = guit->bitmap->get_width(bitmap);
+ int height = guit->bitmap->get_height(bitmap);
+ bool opaque = guit->bitmap->get_opaque(bitmap);
+ uint8_t *buffer = guit->bitmap->get_buffer(bitmap);
+ size_t rowstride = guit->bitmap->get_rowstride(bitmap);
+ struct bitmap_colour_layout to = bitmap__get_colour_layout(fmt_to);
+ struct bitmap_colour_layout from = bitmap__get_colour_layout(fmt_from);
+
+ NSLOG(netsurf, DEEPDEBUG, "%p: format conversion (%u%s --> %u%s)",
+ bitmap,
+ fmt_from->layout, fmt_from->pma ? " pma" : "",
+ fmt_to->layout, fmt_to->pma ? " pma" : "");
+
+ if (fmt_from->pma == fmt_to->pma) {
+ /* Just component order to switch. */
+ bitmap__format_convert(
+ width, height, buffer,
+ rowstride, to, from);
+
+ } else if (opaque == false) {
+ /* Need to do conversion to/from premultiplied alpha. */
+ if (fmt_to->pma) {
+ bitmap__format_convert_to_pma(
+ width, height, buffer,
+ rowstride, to, from);
+ } else {
+ bitmap__format_convert_from_pma(
+ width, height, buffer,
+ rowstride, to, from);
+ }
+ }
+}
+
+/* Exported function, documented in desktop/bitmap.h */
+bool bitmap_test_opaque(void *bitmap)
+{
+ int width = guit->bitmap->get_width(bitmap);
+ int height = guit->bitmap->get_height(bitmap);
+ size_t rowstride = guit->bitmap->get_rowstride(bitmap);
+ const uint8_t *buffer = guit->bitmap->get_buffer(bitmap);
+
+ width *= sizeof(uint32_t);
+
+ for (int y = 0; y < height; y++) {
+ const uint8_t *row = buffer;
+
+ for (int x = bitmap_layout.a; x < width; x += 4) {
+ if (row[x] != 0xff) {
+ return false;
+ }
+ }
+
+ buffer += rowstride;
+ }
+
+ return true;
+}
diff --git a/desktop/bitmap.h b/desktop/bitmap.h
new file mode 100644
index 000000000..51ce2c908
--- /dev/null
+++ b/desktop/bitmap.h
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2022 Michael Drake <tlsa@nesturf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** \file
+ * Internal core bitmap interface.
+ */
+
+#ifndef _NETSURF_DESKTOP_BITMAP_H_
+#define _NETSURF_DESKTOP_BITMAP_H_
+
+#include <nsutils/endian.h>
+
+#include "netsurf/types.h"
+#include "netsurf/bitmap.h"
+
+/** Pixel format: colour component order. */
+struct bitmap_colour_layout {
+ uint8_t r; /**< Byte offset within pixel to red component. */
+ uint8_t g; /**< Byte offset within pixel to green component. */
+ uint8_t b; /**< Byte offset within pixel to blue component. */
+ uint8_t a; /**< Byte offset within pixel to alpha component. */
+};
+
+/** The client bitmap format. */
+extern bitmap_fmt_t bitmap_fmt;
+
+/** The client bitmap colour channel layout. */
+extern struct bitmap_colour_layout bitmap_layout;
+
+/**
+ * Convert a bitmap pixel to a NetSurf colour (0xAARRGGBB).
+ *
+ * The bitmap must be in the client format.
+ *
+ * \param[in] Pointer to a pixel in the bitmap's pixel data.
+ * \return The corresponding NetSurf colour.
+ */
+static inline colour bitmap_pixel_to_colour(const uint8_t *pixel)
+{
+ return (pixel[bitmap_layout.r] << 0) |
+ (pixel[bitmap_layout.g] << 8) |
+ (pixel[bitmap_layout.b] << 16) |
+ (pixel[bitmap_layout.a] << 24);
+}
+
+/**
+ * Sanitise bitmap pixel component layout.
+ *
+ * Map endian-dependant layouts to byte-wise layout for the host.
+ *
+ * \param[in] layout Layout to convert.
+ * \return sanitised layout.
+ */
+static inline enum bitmap_layout bitmap_sanitise_bitmap_layout(
+ enum bitmap_layout layout)
+{
+ bool le = endian_host_is_le();
+
+ switch (layout) {
+ case BITMAP_LAYOUT_RGBA8888:
+ layout = (le) ? BITMAP_LAYOUT_A8B8G8R8
+ : BITMAP_LAYOUT_R8G8B8A8;
+ break;
+ case BITMAP_LAYOUT_BGRA8888:
+ layout = (le) ? BITMAP_LAYOUT_A8R8G8B8
+ : BITMAP_LAYOUT_B8G8R8A8;
+ break;
+ case BITMAP_LAYOUT_ARGB8888:
+ layout = (le) ? BITMAP_LAYOUT_B8G8R8A8
+ : BITMAP_LAYOUT_A8R8G8B8;
+ break;
+ case BITMAP_LAYOUT_ABGR8888:
+ layout = (le) ? BITMAP_LAYOUT_R8G8B8A8
+ : BITMAP_LAYOUT_A8B8G8R8;
+ break;
+ default:
+ break;
+ }
+
+ return layout;
+}
+
+/**
+ * Convert bitmap from one format to another.
+ *
+ * Note that both formats should be sanitised.
+ *
+ * \param[in] bitmap The bitmap to convert.
+ * \param[in] from The current bitmap format specifier.
+ * \param[in] to The bitmap format to convert to.
+ */
+void bitmap_format_convert(void *bitmap,
+ const bitmap_fmt_t *from,
+ const bitmap_fmt_t *to);
+
+/**
+ * Convert a bitmap to the client bitmap format.
+ *
+ * \param[in] bitmap The bitmap to convert.
+ * \param[in] current_fmt The current bitmap format specifier.
+ */
+static inline void bitmap_format_to_client(
+ void *bitmap,
+ const bitmap_fmt_t *current_fmt)
+{
+ bitmap_fmt_t from = *current_fmt;
+
+ from.layout = bitmap_sanitise_bitmap_layout(from.layout);
+ if (from.layout != bitmap_fmt.layout || from.pma != bitmap_fmt.pma) {
+ bitmap_format_convert(bitmap, &from, &bitmap_fmt);
+ }
+}
+
+/**
+ * Convert a bitmap to the client bitmap format.
+ *
+ * \param[in] bitmap The bitmap to convert.
+ * \param[in] target_fmt The target bitmap format specifier.
+ */
+static inline void bitmap_format_from_client(
+ void *bitmap,
+ const bitmap_fmt_t *target_fmt)
+{
+ bitmap_fmt_t to = *target_fmt;
+
+ to.layout = bitmap_sanitise_bitmap_layout(to.layout);
+ if (to.layout != bitmap_fmt.layout || to.pma != bitmap_fmt.pma) {
+ bitmap_format_convert(bitmap, &bitmap_fmt, &to);
+ }
+}
+
+#endif
diff --git a/desktop/browser_history.c b/desktop/browser_history.c
index 2fbc80f89..ce9821af8 100644
--- a/desktop/browser_history.c
+++ b/desktop/browser_history.c
@@ -106,7 +106,7 @@ browser_window_history__clone_entry(struct history *history,
new_entry->page.bitmap = guit->bitmap->create(
LOCAL_HISTORY_WIDTH,
LOCAL_HISTORY_HEIGHT,
- BITMAP_NEW | BITMAP_OPAQUE);
+ BITMAP_OPAQUE);
if (new_entry->page.bitmap != NULL) {
bmsrc_data = guit->bitmap->get_buffer(entry->page.bitmap);
@@ -388,7 +388,7 @@ browser_window_history_add(struct browser_window *bw,
entry->page.bitmap = guit->bitmap->create(
LOCAL_HISTORY_WIDTH, LOCAL_HISTORY_HEIGHT,
- BITMAP_NEW | BITMAP_CLEAR_MEMORY | BITMAP_OPAQUE);
+ BITMAP_CLEAR | BITMAP_OPAQUE);
if (entry->page.bitmap != NULL) {
ret = guit->bitmap->render(entry->page.bitmap, content);
if (ret != NSERROR_OK) {
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 7b553f4e0..c70db7cf1 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -62,6 +62,11 @@
#include "desktop/hotlist.h"
#include "desktop/knockout.h"
#include "desktop/browser_history.h"
+#include "desktop/theme.h"
+
+#ifdef WITH_THEME_INSTALL
+#include "desktop/theme.h"
+#endif
/**
* smallest scale that can be applied to a browser window
diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c
index 3e0417f23..b5ec89618 100644
--- a/desktop/cookie_manager.c
+++ b/desktop/cookie_manager.c
@@ -232,10 +232,6 @@ cookie_manager_field_builder(enum cookie_manager_field field,
*
* The time should be converted to text in the users locacle
*
- * \todo This should probably generate the user text using localtime
- * and strftime with the c format specifier. Currently ctime will
- * always generate output in the C locale.
- *
* \param field Cookie manager treeview field to build
* \param fdata Cookie manager entry field data to set
* \param value Time to show in field
@@ -246,22 +242,20 @@ cookie_manager_field_builder_time(enum cookie_manager_field field,
struct treeview_field_data *fdata,
const time_t *value)
{
- const char *date;
- char *date2;
+ struct tm *ftime;
fdata->field = cm_ctx.fields[field].field;
-
- date = ctime(value);
- date2 = strdup(date);
- if (date2 == NULL) {
- fdata->value = NULL;
- fdata->value_len = 0;
- } else {
- assert(date2[24] == '\n');
- date2[24] = '\0';
-
- fdata->value = date2;
- fdata->value_len = strlen(date2);
+ fdata->value = NULL;
+ fdata->value_len = 0;
+
+ if ((ftime = localtime(value)) != NULL) {
+ const size_t vsize = 256;
+ char *value = malloc(vsize);
+ if (value != NULL) {
+ fdata->value = value;
+ fdata->value_len = strftime(value, vsize,
+ "%a %b %e %H:%M:%S %Y", ftime);
+ }
}
return NSERROR_OK;
diff --git a/desktop/global_history.c b/desktop/global_history.c
index ad39a3e41..e98e4cb29 100644
--- a/desktop/global_history.c
+++ b/desktop/global_history.c
@@ -266,9 +266,9 @@ static nserror global_history_create_treeview_field_data(
const char *title = (data->title != NULL) ?
data->title : messages_get("NoTitle");
char buffer[16];
- const char *last_visited;
- char *last_visited2;
- int len;
+ struct tm *lvtime;
+ char *last_visited = NULL;
+ size_t len = 0;
e->data[GH_TITLE].field = gh_ctx.fields[GH_TITLE].field;
e->data[GH_TITLE].value = strdup(title);
@@ -279,16 +279,18 @@ static nserror global_history_create_treeview_field_data(
e->data[GH_URL].value = nsurl_access(e->url);
e->data[GH_URL].value_len = nsurl_length(e->url);
- last_visited = ctime(&data->last_visit);
- last_visited2 = strdup(last_visited);
- if (last_visited2 != NULL) {
- assert(last_visited2[24] == '\n');
- last_visited2[24] = '\0';
+ if ((lvtime = localtime(&data->last_visit)) != NULL) {
+ const size_t lvsize = 256;
+ last_visited = malloc(lvsize);
+ if (last_visited != NULL) {
+ len = strftime(last_visited, lvsize,
+ "%a %b %e %H:%M:%S %Y", lvtime);
+ }
}
e->data[GH_LAST_VISIT].field = gh_ctx.fields[GH_LAST_VISIT].field;
- e->data[GH_LAST_VISIT].value = last_visited2;
- e->data[GH_LAST_VISIT].value_len = (last_visited2 != NULL) ? 24 : 0;
+ e->data[GH_LAST_VISIT].value = last_visited;
+ e->data[GH_LAST_VISIT].value_len = len;
len = snprintf(buffer, 16, "%u", data->visits);
if (len == 16) {
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index a141d7d23..0d4d9a904 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -20,10 +20,12 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
+#include <unistd.h>
#include "utils/config.h"
#include "utils/errors.h"
#include "utils/file.h"
+#include "utils/inet.h"
#include "netsurf/bitmap.h"
#include "content/hlcache.h"
#include "content/backing_store.h"
@@ -472,6 +474,16 @@ static char *gui_default_mimetype(const char *path)
return strdup(guit->fetch->filetype(path));
}
+static int gui_default_socket_open(int domain, int type, int protocol)
+{
+ return (int) socket(domain, type, protocol);
+}
+
+static int gui_default_socket_close(int fd)
+{
+ return (int) ns_close_socket(fd);
+}
+
/** verify fetch table is valid */
static nserror verify_fetch_register(struct gui_fetch_table *gft)
{
@@ -498,6 +510,12 @@ static nserror verify_fetch_register(struct gui_fetch_table *gft)
if (gft->mimetype == NULL) {
gft->mimetype = gui_default_mimetype;
}
+ if (gft->socket_open == NULL) {
+ gft->socket_open = gui_default_socket_open;
+ }
+ if (gft->socket_close == NULL) {
+ gft->socket_close = gui_default_socket_close;
+ }
return NSERROR_OK;
}
@@ -560,10 +578,6 @@ static nserror verify_bitmap_register(struct gui_bitmap_table *gbt)
return NSERROR_BAD_PARAMETER;
}
- if (gbt->test_opaque == NULL) {
- return NSERROR_BAD_PARAMETER;
- }
-
if (gbt->get_buffer == NULL) {
return NSERROR_BAD_PARAMETER;
}
@@ -580,14 +594,6 @@ static nserror verify_bitmap_register(struct gui_bitmap_table *gbt)
return NSERROR_BAD_PARAMETER;
}
- if (gbt->get_bpp == NULL) {
- return NSERROR_BAD_PARAMETER;
- }
-
- if (gbt->save == NULL) {
- return NSERROR_BAD_PARAMETER;
- }
-
if (gbt->modified == NULL) {
return NSERROR_BAD_PARAMETER;
}
diff --git a/desktop/hotlist.c b/desktop/hotlist.c
index e9cbb5ffb..20c0890a1 100644
--- a/desktop/hotlist.c
+++ b/desktop/hotlist.c
@@ -193,29 +193,32 @@ static nserror hotlist_create_treeview_field_visits_data(
struct hotlist_entry *e, const struct url_data *data)
{
char buffer[16];
- const char *last_visited;
- char *last_visited2;
- int len;
+ char *last_visited = NULL;
+ size_t len = 0;
/* Last visited */
if (data->visits != 0) {
- last_visited = ctime(&data->last_visit);
- last_visited2 = strdup(last_visited);
- len = 24;
+ const size_t lvsize = 256;
+ struct tm *lvtime;
+
+ if ((lvtime = localtime(&data->last_visit)) != NULL) {
+ last_visited = malloc(lvsize);
+ if (last_visited != NULL) {
+ len = strftime(last_visited, lvsize,
+ "%a %b %e %H:%M:%S %Y",
+ lvtime);
+ }
+ }
} else {
- last_visited2 = strdup("-");
+ last_visited = strdup("-");
len = 1;
}
- if (last_visited2 == NULL) {
+ if (last_visited == NULL) {
return NSERROR_NOMEM;
-
- } else if (len == 24) {
- assert(last_visited2[24] == '\n');
- last_visited2[24] = '\0';
}
e->data[HL_LAST_VISIT].field = hl_ctx.fields[HL_LAST_VISIT].field;
- e->data[HL_LAST_VISIT].value = last_visited2;
+ e->data[HL_LAST_VISIT].value = last_visited;
e->data[HL_LAST_VISIT].value_len = len;
/* Visits */
@@ -968,13 +971,13 @@ static nserror hotlist_generate(void)
const char *url;
const char *msg_key;
} default_entries[] = {
- { "http://www.netsurf-browser.org/",
+ { "https://www.netsurf-browser.org/",
"HotlistHomepage" },
- { "http://www.netsurf-browser.org/downloads/",
+ { "https://www.netsurf-browser.org/downloads/",
"HotlistDownloads" },
- { "http://www.netsurf-browser.org/documentation",
+ { "https://www.netsurf-browser.org/documentation",
"HotlistDocumentation" },
- { "http://www.netsurf-browser.org/contact",
+ { "https://www.netsurf-browser.org/contact",
"HotlistContact" }
};
const int n_entries = sizeof(default_entries) /
@@ -1626,7 +1629,7 @@ nserror hotlist_add_entry(nsurl *url, const char *title, bool at_y, int y)
enum treeview_relationship rel;
if (url == NULL) {
- err = nsurl_create("http://netsurf-browser.org/", &url);
+ err = nsurl_create("https://netsurf-browser.org/", &url);
if (err != NSERROR_OK) {
return err;
}
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index fd838b80b..bd785898f 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -99,7 +99,7 @@
static void netsurf_lwc_iterator(lwc_string *str, void *pw)
{
- NSLOG(netsurf, WARNING, "[%3u] %.*s", str->refcnt,
+ NSLOG(netsurf, WARNING, "[%3"PRIu32"] %.*s", str->refcnt,
(int)lwc_string_length(str), lwc_string_data(str));
}
diff --git a/desktop/options.h b/desktop/options.h
index 539ff21c8..b74fab829 100644
--- a/desktop/options.h
+++ b/desktop/options.h
@@ -123,6 +123,9 @@ NSOPTION_BOOL(animate_images, true)
/** Whether to execute javascript */
NSOPTION_BOOL(enable_javascript, false)
+/** Whether to allow Author level CSS. */
+NSOPTION_BOOL(author_level_css, true)
+
/** Maximum time (in seconds) to wait for a script to run */
NSOPTION_INTEGER(script_timeout, 10)
@@ -255,6 +258,9 @@ NSOPTION_BOOL(enable_PDF_compression, true)
/** setting a password and encoding PDF documents */
NSOPTION_BOOL(enable_PDF_password, false)
+/** whether to prefer dark mode (light on dark) */
+NSOPTION_BOOL(prefer_dark_mode, false)
+
/******** System colours ********/
NSOPTION_COLOUR(sys_colour_ActiveBorder, 0x00d3d3d3)
NSOPTION_COLOUR(sys_colour_ActiveCaption, 0x00f1f1f1)
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 24c188145..e4fadd274 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -51,7 +51,7 @@
#include "desktop/gui_internal.h"
#include "desktop/save_complete.h"
-regex_t save_complete_import_re;
+static regex_t save_complete_import_re;
/** An entry in save_complete_list. */
typedef struct save_complete_entry {
@@ -196,7 +196,7 @@ save_complete_save_buffer(save_complete_ctx *ctx,
* perform a posix regexec on a string without a null terminator
*/
static int
-snregexec(const regex_t *preg,
+snregexec(regex_t *preg,
const char *string,
size_t stringlen,
size_t nmatch,
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index 597b8fffe..361860190 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -53,7 +53,7 @@ static struct search_web_ctx_s {
} search_web_ctx;
-static const char *default_providers = "Google|www.google.com|http://www.google.com/search?q=%s|http://www.google.com/favicon.ico|\n";
+static const char *default_providers = "Google|www.google.com|https://www.google.com/search?q=%s|https://www.google.com/favicon.ico|\n";
static const char *default_search_icon_url = "resource:icons/search.png";
@@ -333,11 +333,11 @@ search_web_omni(const char *term,
}
/* try with adding default scheme */
- eterm = malloc(strlen(term) + SLEN("http://") + 1);
+ eterm = malloc(strlen(term) + SLEN("https://") + 1);
if (eterm == NULL) {
return NSERROR_NOMEM;
}
- sprintf(eterm, "http://%s", term);
+ sprintf(eterm, "https://%s", term);
ret = nsurl_create(eterm, &url);
free(eterm);
if (ret == NSERROR_OK) {
diff --git a/desktop/searchweb.h b/desktop/searchweb.h
index 69748b6d6..0712de9fe 100644
--- a/desktop/searchweb.h
+++ b/desktop/searchweb.h
@@ -62,7 +62,7 @@ enum search_web_omni_flags {
* term. The flags allow control over the operation. By default the
* operations are:
* - interpret the \a term as a url
- * - if missing a scheme as a http: url
+ * - if missing a scheme as a https: url
* - combined with the search providers url into a url for that provider.
*
* \param term The search term.
diff --git a/desktop/selection.c b/desktop/selection.c
index 332e9dafa..8b1f127c4 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -54,7 +54,6 @@ typedef enum {
struct selection {
struct content *c;
- struct box *root;
unsigned max_idx; /* total bytes in text representation */
@@ -257,7 +256,6 @@ struct selection *selection_create(struct content *c)
sel = calloc(1, sizeof(struct selection));
if (sel) {
sel->c = c;
- sel->root = NULL;
sel->drag_state = DRAG_NONE;
sel->max_idx = 0;
selection_clear(sel, false);
diff --git a/desktop/textarea.c b/desktop/textarea.c
index 5bae27a5c..e0e87444c 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -58,7 +58,7 @@ struct line_info {
struct textarea_drag {
textarea_drag_type type;
union {
- struct scrollbar* scrollbar;
+ struct scrollbar *scrollbar;
} data;
};
@@ -625,7 +625,7 @@ static bool textarea_select(struct textarea *ta, int b_start, int b_end,
* \param ta Text area
* \return True on success, false otherwise
*/
-static bool textarea_select_fragment(struct textarea * ta)
+static bool textarea_select_fragment(struct textarea *ta)
{
int caret_pos;
size_t sel_start, sel_end;
@@ -676,7 +676,7 @@ static bool textarea_select_fragment(struct textarea * ta)
* \param ta textarea widget
* \return True on success, false otherwise
*/
-static bool textarea_select_paragraph(struct textarea * ta)
+static bool textarea_select_paragraph(struct textarea *ta)
{
int caret_pos;
size_t sel_start, sel_end;
@@ -1607,7 +1607,7 @@ static bool textarea_copy_to_undo_buffer(struct textarea *ta,
* \param b_end End byte index of replaced section (exclusive)
* \param rep Replacement UTF-8 text to insert
* \param rep_len Byte length of replacement UTF-8 text
- * \param add_to_clipboard True iff replaced text to be added to clipboard
+ * \param add_to_clipboard True if replaced text to be added to clipboard
* \param byte_delta Updated to change in byte count in textarea (ta->show)
* \param r Updated to area where redraw is required
* \return false on memory exhaustion, true otherwise
@@ -2452,7 +2452,7 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
struct textarea_msg msg;
struct rect r; /**< Redraw rectangle */
char utf8[6];
- unsigned int caret, length, b_off, b_len;
+ unsigned int caret, caret_copy, length, b_off, b_len;
int h_extent = ta->h_extent;
int v_extent = ta->v_extent;
int line;
@@ -2466,7 +2466,7 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
/* Word separators */
static const char *sep = " .\n";
- caret = textarea_get_caret(ta);
+ caret = caret_copy = textarea_get_caret(ta);
line = ta->caret_pos.line;
readonly = (ta->flags & TEXTAREA_READONLY ? true : false);
@@ -2743,6 +2743,9 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
case NS_KEY_WORD_LEFT:
if (readonly)
break;
+ if (ta->sel_start != -1) {
+ textarea_clear_selection(ta);
+ }
if (caret == 0)
break;
caret--;
@@ -2756,13 +2759,59 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
break;
}
}
+ break;
+ case NS_KEY_DELETE_WORD_LEFT:
+ if (readonly)
+ break;
+
+ /* If there is a selection, remove the selected
+ * characters */
if (ta->sel_start != -1) {
+ if (!textarea_replace_text(ta, ta->sel_start,
+ ta->sel_end, "", 0, false,
+ &byte_delta, &r))
+ return false;
+ caret = ta->sel_start;
textarea_clear_selection(ta);
+ redraw = true;
+ break;
+ }
+
+ if (caret == 0)
+ break;
+
+ /* caret goes left until a non-separator is
+ * encountered */
+ caret--;
+ while (strchr(sep, ta->show->data[caret]) != NULL &&
+ caret > 0)
+ caret--;
+
+ /* caret goes left until a separator is encountered */
+ for (; caret > 0; caret--) {
+ if (strchr(sep, ta->show->data[caret]) !=
+ NULL) {
+ caret++;
+ break;
+ }
}
+
+ /* Remove the characters from new caret position to
+ * original caret position */
+ if (!textarea_replace_text(ta, caret, caret_copy,
+ "", 0, false, &byte_delta, &r))
+ return false;
+
+ redraw = true;
break;
case NS_KEY_WORD_RIGHT:
if (readonly)
break;
+ if (ta->sel_start != -1) {
+ textarea_clear_selection(ta);
+ }
+ if (caret == ta->show->len - 1)
+ break;
if (strchr(sep, ta->show->data[caret]) != NULL &&
caret < ta->show->len - 1) {
while (strchr(sep, ta->show->data[caret]) !=
@@ -2779,9 +2828,49 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
while (strchr(sep, ta->show->data[caret]) != NULL &&
caret < ta->show->len - 1)
caret++;
+ break;
+ case NS_KEY_DELETE_WORD_RIGHT:
+ if (readonly)
+ break;
+
+ /* If there is a selection, remove the selected
+ * characters */
if (ta->sel_start != -1) {
+ if (!textarea_replace_text(ta, ta->sel_start,
+ ta->sel_end, "", 0, false,
+ &byte_delta, &r))
+ return false;
+ caret = ta->sel_start;
textarea_clear_selection(ta);
+ redraw = true;
+ break;
}
+
+ if (caret == ta->show->len - 1)
+ break;
+
+ /* caret_copy goes right until a non-separator is
+ * encountered */
+ while (strchr(sep, ta->show->data[caret_copy]) != NULL
+ && caret_copy < ta->show->len - 1)
+ caret_copy++;
+
+ /* caret_copy goes right until a separator is
+ * encountered */
+ for (; caret_copy < ta->show->len - 1; caret_copy++) {
+ if (strchr(sep, ta->show->data[caret_copy]) !=
+ NULL) {
+ break;
+ }
+ }
+
+ /* Remove all the characters from original caret
+ * position to caret_copy */
+ if (!textarea_replace_text(ta, caret, caret_copy,
+ "", 0, false, &byte_delta, &r))
+ return false;
+
+ redraw = true;
break;
case NS_KEY_DELETE_LINE:
if (readonly)
diff --git a/desktop/treeview.c b/desktop/treeview.c
index feb1a7c6e..a65a37e72 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -41,6 +41,7 @@
#include "content/hlcache.h"
#include "css/utils.h"
+#include "desktop/bitmap.h"
#include "desktop/knockout.h"
#include "desktop/textarea.h"
#include "desktop/treeview.h"
@@ -5077,7 +5078,7 @@ treeview_generate_triangle_bitmap(colour bg, colour fg, int size)
colour colour4 = fg;
/* Create the bitmap */
- b = guit->bitmap->create(size, size, BITMAP_NEW | BITMAP_OPAQUE);
+ b = guit->bitmap->create(size, size, BITMAP_OPAQUE);
if (b == NULL)
return NULL;
@@ -5091,58 +5092,68 @@ treeview_generate_triangle_bitmap(colour bg, colour fg, int size)
if (y < size / 2) {
/* Top half */
for (x = 0; x < y * 2; x++) {
- *(pos++) = red_from_colour(colour4);
- *(pos++) = green_from_colour(colour4);
- *(pos++) = blue_from_colour(colour4);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour4);
+ pos[bitmap_layout.g] = green_from_colour(colour4);
+ pos[bitmap_layout.b] = blue_from_colour(colour4);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
}
- *(pos++) = red_from_colour(colour3);
- *(pos++) = green_from_colour(colour3);
- *(pos++) = blue_from_colour(colour3);
- *(pos++) = 0xff;
- *(pos++) = red_from_colour(colour1);
- *(pos++) = green_from_colour(colour1);
- *(pos++) = blue_from_colour(colour1);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour3);
+ pos[bitmap_layout.g] = green_from_colour(colour3);
+ pos[bitmap_layout.b] = blue_from_colour(colour3);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
+ pos[bitmap_layout.r] = red_from_colour(colour1);
+ pos[bitmap_layout.g] = green_from_colour(colour1);
+ pos[bitmap_layout.b] = blue_from_colour(colour1);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
for (x = y * 2 + 2; x < size ; x++) {
- *(pos++) = red_from_colour(colour0);
- *(pos++) = green_from_colour(colour0);
- *(pos++) = blue_from_colour(colour0);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour0);
+ pos[bitmap_layout.g] = green_from_colour(colour0);
+ pos[bitmap_layout.b] = blue_from_colour(colour0);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
}
} else if ((y == size / 2) && (size & 0x1)) {
/* Middle row */
for (x = 0; x < size - 1; x++) {
- *(pos++) = red_from_colour(colour4);
- *(pos++) = green_from_colour(colour4);
- *(pos++) = blue_from_colour(colour4);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour4);
+ pos[bitmap_layout.g] = green_from_colour(colour4);
+ pos[bitmap_layout.b] = blue_from_colour(colour4);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
}
- *(pos++) = red_from_colour(colour2);
- *(pos++) = green_from_colour(colour2);
- *(pos++) = blue_from_colour(colour2);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour2);
+ pos[bitmap_layout.g] = green_from_colour(colour2);
+ pos[bitmap_layout.b] = blue_from_colour(colour2);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
} else {
/* Bottom half */
for (x = 0; x < (size - y - 1) * 2; x++) {
- *(pos++) = red_from_colour(colour4);
- *(pos++) = green_from_colour(colour4);
- *(pos++) = blue_from_colour(colour4);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour4);
+ pos[bitmap_layout.g] = green_from_colour(colour4);
+ pos[bitmap_layout.b] = blue_from_colour(colour4);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
}
- *(pos++) = red_from_colour(colour3);
- *(pos++) = green_from_colour(colour3);
- *(pos++) = blue_from_colour(colour3);
- *(pos++) = 0xff;
- *(pos++) = red_from_colour(colour1);
- *(pos++) = green_from_colour(colour1);
- *(pos++) = blue_from_colour(colour1);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour3);
+ pos[bitmap_layout.g] = green_from_colour(colour3);
+ pos[bitmap_layout.b] = blue_from_colour(colour3);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
+ pos[bitmap_layout.r] = red_from_colour(colour1);
+ pos[bitmap_layout.g] = green_from_colour(colour1);
+ pos[bitmap_layout.b] = blue_from_colour(colour1);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
for (x = (size - y) * 2; x < size ; x++) {
- *(pos++) = red_from_colour(colour0);
- *(pos++) = green_from_colour(colour0);
- *(pos++) = blue_from_colour(colour0);
- *(pos++) = 0xff;
+ pos[bitmap_layout.r] = red_from_colour(colour0);
+ pos[bitmap_layout.g] = green_from_colour(colour0);
+ pos[bitmap_layout.b] = blue_from_colour(colour0);
+ pos[bitmap_layout.a] = 0xff;
+ pos += 4;
}
}
@@ -5176,7 +5187,7 @@ treeview_generate_copy_bitmap(struct bitmap *orig, int size)
assert(size == guit->bitmap->get_height(orig));
/* Create the bitmap */
- b = guit->bitmap->create(size, size, BITMAP_NEW | BITMAP_OPAQUE);
+ b = guit->bitmap->create(size, size, BITMAP_OPAQUE);
if (b == NULL)
return NULL;
@@ -5224,7 +5235,7 @@ treeview_generate_rotate_bitmap(struct bitmap *orig, int size)
assert(size == guit->bitmap->get_height(orig));
/* Create the bitmap */
- b = guit->bitmap->create(size, size, BITMAP_NEW | BITMAP_OPAQUE);
+ b = guit->bitmap->create(size, size, BITMAP_OPAQUE);
if (b == NULL)
return NULL;
diff --git a/desktop/version.c b/desktop/version.c
index f0ed06d5f..91a7532f4 100644
--- a/desktop/version.c
+++ b/desktop/version.c
@@ -20,11 +20,11 @@
#include "desktop/version.h"
-const char * const netsurf_version = "3.11 (Dev"
+const char * const netsurf_version = "3.12 (Dev"
#if defined(CI_BUILD)
" CI #" CI_BUILD
#endif
")"
;
const int netsurf_version_major = 3;
-const int netsurf_version_minor = 11;
+const int netsurf_version_minor = 12;
diff --git a/docs/PACKAGING-GTK b/docs/PACKAGING-GTK
index 4eab25b96..b81bc6162 100644
--- a/docs/PACKAGING-GTK
+++ b/docs/PACKAGING-GTK
@@ -64,18 +64,19 @@
===================
You may also want to change NetSurf's user agent string to include the
- name of your distribution. The user agent string is build by a function
+ name of your distribution. The user agent string is built by a function
kept in utils/useragent.c - you'll want to change the macro called
NETSURF_UA_FORMAT_STRING. It's processed via sprintf, so keep that in
- mind when changing it. The first two printf parameters are major and minor
- version numbers, the second two are OS name (uname -s) and architecture
- (uname -m). You might want change this to something like:
+ mind when changing it. The first format parameter is the OS name (uname -s)
+ and the remainder are major and minor version numbers. You might want
+ to change this to something like:
- "NetSurf/%d.%d (%s; %s; Debian GNU/Linux)"
+ "Mozilla/5.0 (%s; Debian GNU/Linux) NetSurf/%d.%d"
- or similar. Please don't be tempted to mention Mozilla or similar - let's
- let that lie die.
+ or similar.
+ Note that the "Mozilla/5.0" prefix is a requirement to enable modern
+ web standards on many websites. It should not be removed or modified.
Home page URL
===============
diff --git a/docs/UnimplementedJavascript.md b/docs/UnimplementedJavascript.md
index 4a2f02e3f..0d21dc852 100644
--- a/docs/UnimplementedJavascript.md
+++ b/docs/UnimplementedJavascript.md
@@ -170,7 +170,6 @@ getter | Element::namespaceURI(string);
getter | Element::prefix(string);
getter | Element::localName(string);
getter | Element::tagName(string);
-getter | Element::classList(user);
getter | Element::outerHTML(string);
setter | Element::outerHTML(string);
getter | Element::children(user);
@@ -597,10 +596,6 @@ method | CanvasRenderingContext2D::arcTo();
method | CanvasRenderingContext2D::rect();
method | CanvasRenderingContext2D::arc();
method | CanvasRenderingContext2D::ellipse();
-getter | CanvasRenderingContext2D::width(unsigned long);
-setter | CanvasRenderingContext2D::width(unsigned long);
-getter | CanvasRenderingContext2D::height(unsigned long);
-setter | CanvasRenderingContext2D::height(unsigned long);
getter | CanvasRenderingContext2D::currentTransform(user);
setter | CanvasRenderingContext2D::currentTransform(user);
getter | CanvasRenderingContext2D::globalAlpha(double);
@@ -647,8 +642,6 @@ method | HTMLCanvasElement::setContext();
method | HTMLCanvasElement::transferControlToProxy();
method | HTMLCanvasElement::toDataURL();
method | HTMLCanvasElement::toBlob();
-setter | HTMLCanvasElement::width(unsigned long);
-setter | HTMLCanvasElement::height(unsigned long);
getter | HTMLTemplateElement::content(user);
getter | HTMLScriptElement::async(boolean);
setter | HTMLScriptElement::async(boolean);
@@ -1344,14 +1337,6 @@ method | HTMLAllCollection::namedItem();
getter | HTMLAllCollection::length(unsigned long);
method | XMLSerializer::serializeToString();
method | DOMParser::parseFromString();
-method | DOMTokenList::item();
-method | DOMTokenList::contains();
-method | DOMTokenList::add();
-method | DOMTokenList::remove();
-method | DOMTokenList::toggle();
-getter | DOMTokenList::length(unsigned long);
-getter | DOMSettableTokenList::value(string);
-setter | DOMSettableTokenList::value(string);
method | NodeFilter::acceptNode();
method | TreeWalker::parentNode();
method | TreeWalker::firstChild();
@@ -1560,5 +1545,5 @@ method | EventListener::handleEvent();
method | CustomEvent::initCustomEvent();
getter | CustomEvent::detail(any);
- 1554 unimplemented bindings
+ 1539 unimplemented bindings
diff --git a/docs/env.sh b/docs/env.sh
index 690822036..4cb056ec1 100644
--- a/docs/env.sh
+++ b/docs/env.sh
@@ -263,64 +263,81 @@ NS_GIT="git://git.netsurf-browser.org"
# Buildsystem: everything depends on this
NS_BUILDSYSTEM="buildsystem"
-# internal libraries all frontends require (order is important)
-NS_INTERNAL_LIBS="libwapcaplet libparserutils libhubbub libdom libcss libnsgif libnsbmp libutf8proc libnsutils libnspsl libnslog"
+NS_TOOLS=""
+NS_FRONTEND_LIBS=""
-# The browser itself
-NS_BROWSER="netsurf"
+BUILD_TARGET="${TARGET:-netsurf}"
-
-# add target specific libraries
-case "${HOST}" in
- i586-pc-haiku)
- # tools required to build the browser for haiku (beos)
- NS_TOOLS="nsgenbind"
- # libraries required for the haiku target abi
- NS_FRONTEND_LIBS="libsvgtiny"
- ;;
- *arwin*)
- # tools required to build the browser for OS X
- NS_TOOLS=""
- # libraries required for the Darwin target abi
- NS_FRONTEND_LIBS="libsvgtiny libnsfb"
- ;;
- arm-unknown-riscos)
- # tools required to build the browser for RISC OS
- NS_TOOLS="nsgenbind"
- # libraries required for the risc os target abi
- NS_FRONTEND_LIBS="libsvgtiny librufl libpencil librosprite"
+case "$BUILD_TARGET" in
+ libhubbub)
+ NS_INTERNAL_LIBS="libparserutils"
;;
- *-atari-mint)
- # tools required to build the browser for atari
- NS_TOOLS=""
- # libraries required for the atari frontend
- NS_FRONTEND_LIBS=""
- ;;
- ppc-amigaos)
- # default tools required to build the browser
- NS_TOOLS="nsgenbind"
- # default additional internal libraries
- NS_FRONTEND_LIBS="libsvgtiny"
- ;;
- m68k-unknown-amigaos)
- # default tools required to build the browser
- NS_TOOLS="nsgenbind"
- # default additional internal libraries
- NS_FRONTEND_LIBS="libsvgtiny"
+
+ libdom)
+ NS_INTERNAL_LIBS="libwapcaplet libparserutils libhubbub"
;;
- *-unknown-freebsd*)
- # tools required to build the browser for freebsd
- NS_TOOLS=""
- # libraries required for the freebsd frontend
- NS_FRONTEND_LIBS=""
- # select gnu make
- MAKE=gmake
+
+ libcss)
+ NS_INTERNAL_LIBS="libwapcaplet libparserutils"
;;
- *)
- # default tools required to build the browser
- NS_TOOLS="nsgenbind"
- # default additional internal libraries
- NS_FRONTEND_LIBS="libsvgtiny libnsfb"
+
+ netsurf)
+ # internal libraries all frontends require (order is important)
+ NS_INTERNAL_LIBS="libwapcaplet libparserutils libhubbub libdom libcss libnsgif libnsbmp libutf8proc libnsutils libnspsl libnslog"
+
+ # add target specific libraries
+ case "${HOST}" in
+ i586-pc-haiku)
+ # tools required to build the browser for haiku (beos)
+ NS_TOOLS="nsgenbind"
+ # libraries required for the haiku target abi
+ NS_FRONTEND_LIBS="libsvgtiny"
+ ;;
+ *arwin*)
+ # tools required to build the browser for OS X
+ NS_TOOLS=""
+ # libraries required for the Darwin target abi
+ NS_FRONTEND_LIBS="libsvgtiny libnsfb"
+ ;;
+ arm-unknown-riscos|arm-riscos-gnueabi*)
+ # tools required to build the browser for RISC OS
+ NS_TOOLS="nsgenbind"
+ # libraries required for the risc os target abi
+ NS_FRONTEND_LIBS="libsvgtiny librufl libpencil librosprite"
+ ;;
+ *-atari-mint)
+ # tools required to build the browser for atari
+ NS_TOOLS=""
+ # libraries required for the atari frontend
+ NS_FRONTEND_LIBS=""
+ ;;
+ ppc-amigaos)
+ # default tools required to build the browser
+ NS_TOOLS="nsgenbind"
+ # default additional internal libraries
+ NS_FRONTEND_LIBS="libsvgtiny"
+ ;;
+ m68k-unknown-amigaos)
+ # default tools required to build the browser
+ NS_TOOLS="nsgenbind"
+ # default additional internal libraries
+ NS_FRONTEND_LIBS="libsvgtiny"
+ ;;
+ *-unknown-freebsd*)
+ # tools required to build the browser for freebsd
+ NS_TOOLS=""
+ # libraries required for the freebsd frontend
+ NS_FRONTEND_LIBS=""
+ # select gnu make
+ MAKE=gmake
+ ;;
+ *)
+ # default tools required to build the browser
+ NS_TOOLS="nsgenbind"
+ # default additional internal libraries
+ NS_FRONTEND_LIBS="libsvgtiny libnsfb"
+ ;;
+ esac
;;
esac
@@ -331,7 +348,7 @@ export MAKE
# git pull in all repos parameters are passed to git pull
ns-pull()
{
- for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_TOOLS} ${NS_BROWSER}) ; do
+ for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_TOOLS} ${BUILD_TARGET}) ; do
echo -n " GIT: Pulling ${REPO}: "
if [ -f "${TARGET_WORKSPACE}/${REPO}/.git/config" ]; then
(cd ${TARGET_WORKSPACE}/${REPO} && git pull $*; )
@@ -344,19 +361,42 @@ ns-pull()
# clone all repositories
ns-clone()
{
+ SHALLOW=""
+ SKIP=""
+ while [ $# -gt 0 ]
+ do
+ case "$1" in
+ -d | --deps-only) SKIP="${BUILD_TARGET}"
+ shift
+ ;;
+ -s | --shallow) SHALLOW="--depth 1"
+ shift
+ ;;
+ -*) echo "Error: Unknown option: $1" >&2
+ exit 1
+ ;;
+ *) # No more options
+ break
+ ;;
+ esac
+ done
+
mkdir -p ${TARGET_WORKSPACE}
- for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_RISCOS_LIBS} ${NS_TOOLS} ${NS_BROWSER}) ; do
+ for REPO in $(echo ${NS_BUILDSYSTEM} ${NS_INTERNAL_LIBS} ${NS_FRONTEND_LIBS} ${NS_RISCOS_LIBS} ${NS_TOOLS} ${BUILD_TARGET}) ; do
+ [ "x${REPO}" != "x${SKIP}" ] || continue
echo -n " GIT: Cloning ${REPO}: "
if [ -f ${TARGET_WORKSPACE}/${REPO}/.git/config ]; then
echo "Repository already present"
else
- (cd ${TARGET_WORKSPACE} && git clone ${NS_GIT}/${REPO}.git; )
+ (cd ${TARGET_WORKSPACE} && git clone ${SHALLOW} ${NS_GIT}/${REPO}.git; )
fi
done
# put current env.sh in place in workspace
- if [ ! -f "${TARGET_WORKSPACE}/env.sh" -a -f ${TARGET_WORKSPACE}/${NS_BROWSER}/docs/env.sh ]; then
- cp ${TARGET_WORKSPACE}/${NS_BROWSER}/docs/env.sh ${TARGET_WORKSPACE}/env.sh
+ if [ "x$NS_BROWSER" = "x" ]; then
+ if [ ! -f "${TARGET_WORKSPACE}/env.sh" -a -f ${TARGET_WORKSPACE}/${NS_BROWSER}/docs/env.sh ]; then
+ cp ${TARGET_WORKSPACE}/${NS_BROWSER}/docs/env.sh ${TARGET_WORKSPACE}/env.sh
+ fi
fi
}
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index 99745c90e..f537a1163 100644
--- a/frontends/amiga/Makefile
+++ b/frontends/amiga/Makefile
@@ -80,7 +80,7 @@ AMIGA_DISTRIBUTION_FILES := $(FRONTEND_SOURCE_DIR)/dist/*
AMIGA_PKG_DIR := $(FRONTEND_SOURCE_DIR)/pkg
AMIGA_INSTALL_TARGET_DIR := NetSurf_Amiga
-netsurf.lha: $(EXETARGET)
+netsurf.lha: $(EXETARGET) $(POSTEXES)
$(VQ)echo Creating netsurf.lha
$(Q)rm -rf $(AMIGA_INSTALL_TARGET_DIR)
$(Q)$(MKDIR) -p $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
diff --git a/frontends/amiga/Makefile.defaults b/frontends/amiga/Makefile.defaults
index 7fcbef0fe..25e1f42e4 100644
--- a/frontends/amiga/Makefile.defaults
+++ b/frontends/amiga/Makefile.defaults
@@ -40,6 +40,7 @@ CFLAGS += -fomit-frame-pointer
ifeq ($(SUBTARGET),os3)
NETSURF_USE_OPENSSL := NO
NETSURF_USE_AMISSL := YES
+ NETSURF_FS_BACKING_STORE := YES
else
CFLAGS += -gstabs
endif
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index e160f9351..e8534a395 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -108,7 +108,7 @@ static APTR pool_bitmap = NULL;
static bool guigfx_warned = false;
/* exported function documented in amiga/bitmap.h */
-void *amiga_bitmap_create(int width, int height, unsigned int state)
+void *amiga_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
@@ -139,8 +139,7 @@ void *amiga_bitmap_create(int width, int height, unsigned int state)
bitmap->width = width;
bitmap->height = height;
- if(state & BITMAP_OPAQUE) bitmap->opaque = true;
- else bitmap->opaque = false;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) == BITMAP_OPAQUE;
bitmap->nativebm = NULL;
bitmap->nativebmwidth = 0;
@@ -307,25 +306,6 @@ void amiga_bitmap_set_opaque(void *bitmap, bool opaque)
/* exported function documented in amiga/bitmap.h */
-bool amiga_bitmap_test_opaque(void *bitmap)
-{
- struct bitmap *bm = bitmap;
- uint32 p = bm->width * bm->height;
- uint32 a = 0;
- uint32 *bmi = (uint32 *)amiga_bitmap_get_buffer(bm);
-
- assert(bitmap);
-
- for(a=0;a<p;a+=4)
- {
- if ((*bmi & 0x000000ffU) != 0x000000ffU) return false;
- bmi++;
- }
- return true;
-}
-
-
-/* exported function documented in amiga/bitmap.h */
bool amiga_bitmap_get_opaque(void *bitmap)
{
struct bitmap *bm = bitmap;
@@ -367,40 +347,6 @@ int bitmap_get_height(void *bitmap)
}
}
-
-/**
- * Find the bytes per pixel of a bitmap
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixel
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- return 4;
-}
-
-static void ami_bitmap_argb_to_rgba(struct bitmap *bm)
-{
- if(bm == NULL) return;
-
- ULONG *data = (ULONG *)amiga_bitmap_get_buffer(bm);
- for(int i = 0; i < (bm->width * bm->height); i++) {
- data[i] = (data[i] << 8) | (data[i] >> 24);
- }
-}
-
-static void ami_bitmap_rgba_to_argb(struct bitmap *bm)
-{
- if(bm == NULL) return;
-
- ULONG *data = (ULONG *)amiga_bitmap_get_buffer(bm);
- for(int i = 0; i < (bm->width * bm->height); i++) {
- data[i] = (data[ i] >> 8) | (data[i] << 24);
- }
-}
-
#ifdef BITMAP_DUMP
void bitmap_dump(struct bitmap *bitmap)
{
@@ -436,7 +382,7 @@ Object *ami_datatype_object_from_bitmap(struct bitmap *bitmap)
{
bmhd->bmh_Width = (UWORD)bitmap_get_width(bitmap);
bmhd->bmh_Height = (UWORD)bitmap_get_height(bitmap);
- bmhd->bmh_Depth = (UBYTE)bitmap_get_bpp(bitmap) * 8;
+ bmhd->bmh_Depth = (UBYTE)32;
if(!amiga_bitmap_get_opaque(bitmap)) bmhd->bmh_Masking = mskHasAlpha;
}
@@ -450,7 +396,7 @@ Object *ami_datatype_object_from_bitmap(struct bitmap *bitmap)
TAG_DONE);
IDoMethod(dto, PDTM_WRITEPIXELARRAY, amiga_bitmap_get_buffer(bitmap),
- PBPAFMT_RGBA, amiga_bitmap_get_rowstride(bitmap), 0, 0,
+ PBPAFMT_ARGB, amiga_bitmap_get_rowstride(bitmap), 0, 0,
bitmap_get_width(bitmap), bitmap_get_height(bitmap));
}
@@ -475,10 +421,10 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
bm = amiga_bitmap_create(bmh->bmh_Width, bmh->bmh_Height, 0);
IDoMethod(dto, PDTM_READPIXELARRAY, amiga_bitmap_get_buffer(bm),
- PBPAFMT_RGBA, amiga_bitmap_get_rowstride(bm), 0, 0,
+ PBPAFMT_ARGB, amiga_bitmap_get_rowstride(bm), 0, 0,
bmh->bmh_Width, bmh->bmh_Height);
- amiga_bitmap_set_opaque(bm, amiga_bitmap_test_opaque(bm));
+ amiga_bitmap_set_opaque(bm, bitmap_test_opaque(bm));
}
DisposeDTObject(dto);
}
@@ -531,7 +477,6 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
dithermode = DITHERMODE_FS;
}
- ami_bitmap_rgba_to_argb(bitmap);
bitmap->drawhandle = ObtainDrawHandle(
NULL,
&rp,
@@ -548,7 +493,6 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
ReleaseDrawHandle(bitmap->drawhandle);
bitmap->drawhandle = NULL;
}
- ami_bitmap_argb_to_rgba(bitmap);
} else {
if(guigfx_warned == false) {
amiga_warn_user("BMConvErr", NULL);
@@ -698,7 +642,7 @@ PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int width,
for(y=0; y<height; y++) {
for(x=0; x<width; x++) {
- if ((*bmi & 0x000000ffU) <= (ULONG)nsoption_int(mask_alpha)) maskbit = 0;
+ if ((*bmi & 0xff000000U) <= (ULONG)nsoption_int(mask_alpha)) maskbit = 0;
else maskbit = 1;
bmi++;
bitmap->native_mask[(y*bpr) + (x/8)] |=
@@ -775,8 +719,6 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte
BLITA_DestY, 0,
TAG_DONE);
- ami_bitmap_argb_to_rgba(bitmap);
-
/**\todo In theory we should be able to move the bitmap to our native area
to try to avoid re-conversion (at the expense of memory) */
@@ -824,13 +766,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = amiga_bitmap_destroy,
.set_opaque = amiga_bitmap_set_opaque,
.get_opaque = amiga_bitmap_get_opaque,
- .test_opaque = amiga_bitmap_test_opaque,
.get_buffer = amiga_bitmap_get_buffer,
.get_rowstride = amiga_bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = amiga_bitmap_save,
.modified = amiga_bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/amiga/bitmap.h b/frontends/amiga/bitmap.h
index aaec26ac2..a7dc9198f 100755
--- a/frontends/amiga/bitmap.h
+++ b/frontends/amiga/bitmap.h
@@ -25,7 +25,9 @@
#include <intuition/classusr.h>
#include <libraries/Picasso96.h>
-#define AMI_BITMAP_FORMAT RGBFB_R8G8B8A8
+#include "netsurf/bitmap.h"
+
+#define AMI_BITMAP_FORMAT RGBFB_A8R8G8B8
#define AMI_BITMAP_SCALE_ICON 0xFF
extern struct gui_bitmap_table *amiga_bitmap_table;
@@ -101,10 +103,10 @@ void ami_bitmap_fini(void);
*
* \param width width of image in pixels
* \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *amiga_bitmap_create(int width, int height, unsigned int state);
+void *amiga_bitmap_create(int width, int height, enum gui_bitmap_flags flags);
/**
* Return a pointer to the pixel data in a bitmap.
@@ -174,14 +176,6 @@ void amiga_bitmap_modified(void *bitmap);
void amiga_bitmap_set_opaque(void *bitmap, bool opaque);
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-bool amiga_bitmap_test_opaque(void *bitmap);
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
diff --git a/frontends/amiga/dist/Rexx/YT_download_page.nsrx b/frontends/amiga/dist/Rexx/YT_download_page.nsrx
new file mode 100644
index 000000000..fdc06923d
--- /dev/null
+++ b/frontends/amiga/dist/Rexx/YT_download_page.nsrx
@@ -0,0 +1,21 @@
+/* YT play.nsrx by Chris Handley
+ This script shows download links for a YouTube video using YT (OS4Depot:video/misc/yt.lha)
+*/
+
+options results
+
+if ~open('yt','AppDir:YT','R') then do
+ GETSCREENNAME
+ address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result
+ OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */
+ exit
+end
+close('yt')
+
+GETURL
+/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/
+address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'" html silent'
+
+/* Hack to activate the newest tab */
+OPEN 'file:///RAM:' NEWTAB ACTIVE
+CLOSE
diff --git a/frontends/amiga/dist/Rexx/YT_open.nsrx b/frontends/amiga/dist/Rexx/YT_open.nsrx
new file mode 100644
index 000000000..4454f0c29
--- /dev/null
+++ b/frontends/amiga/dist/Rexx/YT_open.nsrx
@@ -0,0 +1,21 @@
+/* YT play.nsrx by Chris Handley
+ This script opens a YouTube video using YT (OS4Depot:video/misc/yt.lha)
+*/
+
+options results
+
+if ~open('yt','AppDir:YT','R') then do
+ GETSCREENNAME
+ address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result
+ OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */
+ exit
+end
+close('yt')
+
+address COMMAND 'Run >NIL: RequestChoice Title="NetSurf" BODY="When finished with YT, click OK to return to NetSurf" GADGETS="OK" INACTIVE >NIL:' /* Hack to get Workbench to front */
+
+GETURL
+/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/
+address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'"'
+
+/*TOBACK*/ /* ideally we'd bring Workbench to front */
diff --git a/frontends/amiga/dist/Rexx/YT_play.nsrx b/frontends/amiga/dist/Rexx/YT_play.nsrx
new file mode 100644
index 000000000..a8e29162f
--- /dev/null
+++ b/frontends/amiga/dist/Rexx/YT_play.nsrx
@@ -0,0 +1,19 @@
+/* YT play.nsrx by Chris Handley
+ This script auto-plays a YouTube video using YT (OS4Depot:video/misc/yt.lha)
+*/
+
+options results
+
+if ~open('yt','AppDir:YT','R') then do
+ GETSCREENNAME
+ address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result
+ OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */
+ exit
+end
+close('yt')
+
+GETURL
+/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/
+address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'" AutoPlay'
+
+/*TOBACK*/ /* ideally we'd bring Workbench to front */
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index a9fe809cf..1162d7214 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -173,7 +173,7 @@ bool amiga_dt_anim_convert(struct content *c)
size_t size;
UBYTE *bm_buffer;
struct BitMapHeader *bmh;
- unsigned int bm_flags = BITMAP_NEW | BITMAP_OPAQUE;
+ unsigned int bm_flags = BITMAP_OPAQUE;
struct adtFrame adt_frame;
APTR clut;
diff --git a/frontends/amiga/dt_picture.c b/frontends/amiga/dt_picture.c
index ed1272bc1..e13790d5c 100644
--- a/frontends/amiga/dt_picture.c
+++ b/frontends/amiga/dt_picture.c
@@ -187,7 +187,7 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c)
if((dto = amiga_dt_picture_newdtobject(adt)))
{
- bitmap = amiga_bitmap_create(c->width, c->height, BITMAP_NEW);
+ bitmap = amiga_bitmap_create(c->width, c->height, BITMAP_NONE);
if (!bitmap) {
msg_data.errordata.errorcode = NSERROR_NOMEM;
msg_data.errordata.errormsg = messages_get("NoMemory");
@@ -202,7 +202,7 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c)
amiga_bitmap_get_rowstride(bitmap),
0, 0, c->width, c->height);
- amiga_bitmap_set_opaque(bitmap, amiga_bitmap_test_opaque(bitmap));
+ amiga_bitmap_set_opaque(bitmap, bitmap_test_opaque(bitmap));
DisposeDTObject(dto);
adt->dto = NULL;
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index dec39a1f7..43f7b9488 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -554,6 +554,7 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
FIXED kern = 0;
ULONG glyphmaptag;
ULONG template_type;
+ bool skip_c2 = false;
uint32 long_char_1 = 0, long_char_2 = 0;
#ifndef __amigaos4__
struct BulletBase *BulletBase = ofont->BulletBase;
@@ -571,6 +572,8 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
}
#endif
+ if (*char2 < 0x0020) skip_c2 = true;
+
#ifdef __amigaos4__
if(__builtin_expect(aa == true, 1)) {
glyphmaptag = OT_GlyphMap8Bit;
@@ -633,7 +636,7 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
kern = 0;
- if(*char2) EObtainInfo(AMI_OFONT_ENGINE,
+ if((*char2) && (!skip_c2)) EObtainInfo(AMI_OFONT_ENGINE,
OT_TextKernPair, &kern,
TAG_END);
@@ -643,7 +646,7 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
glyphmaptag, glyph,
TAG_END);
- if(*char2) EReleaseInfo(AMI_OFONT_ENGINE,
+ if((*char2) && (!skip_c2)) EReleaseInfo(AMI_OFONT_ENGINE,
OT_TextKernPair, kern,
TAG_END);
}
diff --git a/frontends/amiga/font_diskfont.c b/frontends/amiga/font_diskfont.c
index a587d6eaf..be1b89194 100644
--- a/frontends/amiga/font_diskfont.c
+++ b/frontends/amiga/font_diskfont.c
@@ -100,7 +100,10 @@ static struct TextFont *ami_font_bm_open(struct RastPort *rp, const plot_font_st
tattr.ta_YSize = fstyle->size / PLOT_STYLE_SCALE;
NSLOG(netsurf, INFO, "font: %s/%d", tattr.ta_Name, tattr.ta_YSize);
- if(prev_font != NULL) CloseFont(prev_font);
+ if(prev_font != NULL) {
+ CloseFont(prev_font);
+ prev_font = NULL;
+ }
if((bmfont = OpenDiskFont(&tattr))) {
SetRPAttrs(rp, RPTAG_Font, bmfont, TAG_DONE);
@@ -300,7 +303,14 @@ void ami_font_diskfont_init(void)
void ami_font_diskfont_fini(void)
{
- if(prev_font != NULL) CloseFont(prev_font);
- if(prev_fstyle != NULL) free(prev_fstyle);
+ if(prev_font != NULL) {
+ CloseFont(prev_font);
+ prev_font = NULL;
+ }
+
+ if(prev_fstyle != NULL) {
+ free(prev_fstyle);
+ prev_fstyle = NULL;
+ }
}
diff --git a/frontends/amiga/gui_menu.c b/frontends/amiga/gui_menu.c
index b9c0dd9f8..dc1450fce 100644
--- a/frontends/amiga/gui_menu.c
+++ b/frontends/amiga/gui_menu.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2017-2024 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -375,6 +375,18 @@ HOOKF(void, ami_menu_item_browser_enablejs, APTR, window, struct IntuiMessage *)
ami_gui_menu_set_check_toggled();
}
+HOOKF(void, ami_menu_item_browser_enablecss, APTR, window, struct IntuiMessage *)
+{
+ struct Menu *menustrip;
+ bool checked = false;
+
+ GetAttr(WINDOW_MenuStrip, (Object *)window, (ULONG *)&menustrip);
+ checked = ami_menu_get_selected(menustrip, msg);
+
+ nsoption_set_bool(author_level_css, checked);
+ ami_gui_menu_set_check_toggled();
+}
+
HOOKF(void, ami_menu_item_browser_scale_decrease, APTR, window, struct IntuiMessage *)
{
struct gui_window_2 *gwin;
@@ -582,6 +594,10 @@ ULONG ami_gui_menu_number(int item)
case M_JS:
menu_num = FULLMENUNUM(2,9,0);
break;
+
+ case M_CSS:
+ menu_num = FULLMENUNUM(2,10,0);
+ break;
default:
NSLOG(netsurf, INFO,
@@ -690,6 +706,13 @@ void ami_gui_menu_update_checked(struct gui_window_2 *gwin)
if(ItemAddress(menustrip, ami_gui_menu_number(M_JS))->Flags & CHECKED)
ItemAddress(menustrip, ami_gui_menu_number(M_JS))->Flags ^= CHECKED;
}
+ if(nsoption_bool(author_level_css) == true) {
+ if((ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags & CHECKED) == 0)
+ ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags ^= CHECKED;
+ } else {
+ if(ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags & CHECKED)
+ ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags ^= CHECKED;
+ }
if(nsoption_bool(foreground_images) == true) {
if((ItemAddress(menustrip, ami_gui_menu_number(M_IMGFORE))->Flags & CHECKED) == 0)
ItemAddress(menustrip, ami_gui_menu_number(M_IMGFORE))->Flags ^= CHECKED;
@@ -919,6 +942,10 @@ static void ami_init_menulabs(struct ami_menu_data **md)
if(nsoption_bool(enable_javascript) == true)
js_flags |= CHECKED;
+ UWORD css_flags = CHECKIT | MENUTOGGLE;
+ if(nsoption_bool(author_level_css) == true)
+ css_flags |= CHECKED;
+
UWORD imgfore_flags = CHECKIT | MENUTOGGLE;
if(nsoption_bool(foreground_images) == true)
imgfore_flags |= CHECKED;
@@ -1007,6 +1034,8 @@ static void ami_init_menulabs(struct ami_menu_data **md)
ami_menu_item_browser_backimg, NULL, imgback_flags);
ami_menu_alloc_item(md, M_JS, NM_ITEM, "EnableJS", NULL, NULL,
ami_menu_item_browser_enablejs, NULL, js_flags);
+ ami_menu_alloc_item(md, M_CSS, NM_ITEM, "EnableCSS", NULL, NULL,
+ ami_menu_item_browser_enablecss, NULL, css_flags);
ami_menu_alloc_item(md, M_BAR_B4, NM_ITEM, NM_BARLABEL, NULL, NULL, NULL, NULL, 0);
ami_menu_alloc_item(md, M_REDRAW, NM_ITEM, "Redraw", NULL, "TBImages:list_wand",
ami_menu_item_browser_redraw, NULL, 0);
diff --git a/frontends/amiga/gui_menu.h b/frontends/amiga/gui_menu.h
index ed72c24a4..ae36397c5 100644
--- a/frontends/amiga/gui_menu.h
+++ b/frontends/amiga/gui_menu.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2024 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -78,13 +78,14 @@ enum {
M_IMGFORE,
M_IMGBACK,
M_JS,
+ M_CSS,
M_BAR_B4,
M_REDRAW,
/* Hotlist menu */
M_HOTLIST,
M_HLADD,
M_HLSHOW,
- M_BAR_H1, // 47
+ M_BAR_H1, // 48
AMI_MENU_HOTLIST, /* Where the hotlist entries start */
AMI_MENU_HOTLIST_MAX = AMI_MENU_HOTLIST + AMI_HOTLIST_ITEMS,
/* Settings menu */
diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c
index fa8cdee35..c8c51b012 100755
--- a/frontends/amiga/gui_options.c
+++ b/frontends/amiga/gui_options.c
@@ -94,6 +94,7 @@ enum
GID_OPTS_FROMLOCALE,
GID_OPTS_HISTORY,
GID_OPTS_JAVASCRIPT,
+ GID_OPTS_ENABLECSS,
GID_OPTS_REFERRAL,
GID_OPTS_DONOTTRACK,
GID_OPTS_FASTSCROLL,
@@ -102,6 +103,9 @@ enum
GID_OPTS_SCREENNAME,
GID_OPTS_WIN_SIMPLE,
GID_OPTS_THEME,
+ GID_OPTS_THEMEPAGE,
+ GID_OPTS_DARK,
+ GID_OPTS_LIGHT,
GID_OPTS_PTRTRUE,
GID_OPTS_PTROS,
GID_OPTS_PROXY,
@@ -210,6 +214,7 @@ enum
#define OPTS_LAST LAB_OPTS_LAST
#define OPTS_MAX_TABS 10
#define OPTS_MAX_SCREEN 4
+#define OPTS_MAX_THEMEPAGE 3
#define OPTS_MAX_PROXY 5
#define OPTS_MAX_NATIVEBM 4
#define OPTS_MAX_DITHER 4
@@ -227,6 +232,7 @@ struct ami_gui_opts_window {
#ifndef __amigaos4__
struct List clicktablist;
struct List screenoptslist;
+ struct List pagethemeoptslist;
struct List proxyoptslist;
struct List nativebmoptslist;
struct List ditheroptslist;
@@ -246,6 +252,7 @@ static struct ami_gui_opts_window *gow = NULL;
static CONST_STRPTR tabs[OPTS_MAX_TABS];
static STRPTR screenopts[OPTS_MAX_SCREEN];
+static CONST_STRPTR pagethemeopts[OPTS_MAX_THEMEPAGE];
static CONST_STRPTR proxyopts[OPTS_MAX_PROXY];
static CONST_STRPTR nativebmopts[OPTS_MAX_NATIVEBM];
static CONST_STRPTR ditheropts[OPTS_MAX_DITHER];
@@ -333,6 +340,10 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
screenopts[2] = (char *)ami_utf8_easy((char *)messages_get("ScreenPublic"));
screenopts[3] = NULL;
+ pagethemeopts[0] = (char *)ami_utf8_easy((char *)messages_get("Light"));
+ pagethemeopts[1] = (char *)ami_utf8_easy((char *)messages_get("Dark"));
+ pagethemeopts[2] = NULL;
+
proxyopts[0] = (char *)ami_utf8_easy((char *)messages_get("ProxyNone"));
proxyopts[1] = (char *)ami_utf8_easy((char *)messages_get("ProxyNoAuth"));
proxyopts[2] = (char *)ami_utf8_easy((char *)messages_get("ProxyBasic"));
@@ -359,10 +370,15 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
gadlab[GID_OPTS_FROMLOCALE] = (char *)ami_utf8_easy((char *)messages_get("LocaleLang"));
gadlab[GID_OPTS_HISTORY] = (char *)ami_utf8_easy((char *)messages_get("HistoryAge"));
gadlab[GID_OPTS_JAVASCRIPT] = (char *)ami_utf8_easy((char *)messages_get("EnableJS"));
+ gadlab[GID_OPTS_ENABLECSS] = (char *)ami_utf8_easy((char *)messages_get("EnableCSS"));
gadlab[GID_OPTS_REFERRAL] = (char *)ami_utf8_easy((char *)messages_get("SendReferer"));
gadlab[GID_OPTS_DONOTTRACK] = (char *)ami_utf8_easy((char *)messages_get("DoNotTrack"));
gadlab[GID_OPTS_FASTSCROLL] = (char *)ami_utf8_easy((char *)messages_get("FastScrolling"));
gadlab[GID_OPTS_WIN_SIMPLE] = (char *)ami_utf8_easy((char *)messages_get("SimpleRefresh"));
+ gadlab[GID_OPTS_THEME] = (char *)ami_utf8_easy((char *)messages_get("ThemeGUI"));
+ gadlab[GID_OPTS_THEMEPAGE] = (char *)ami_utf8_easy((char *)messages_get("ThemePage"));
+ gadlab[GID_OPTS_DARK] = (char *)ami_utf8_easy((char *)messages_get("Dark"));
+ gadlab[GID_OPTS_LIGHT] = (char *)ami_utf8_easy((char *)messages_get("Light"));
gadlab[GID_OPTS_PTRTRUE] = (char *)ami_utf8_easy((char *)messages_get("TrueColour"));
gadlab[GID_OPTS_PTROS] = (char *)ami_utf8_easy((char *)messages_get("OSPointers"));
gadlab[GID_OPTS_PROXY] = (char *)ami_utf8_easy((char *)messages_get("ProxyType"));
@@ -466,6 +482,7 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
#ifndef __amigaos4__
ami_gui_opts_array_to_list(&gow->clicktablist, tabs, NSA_LIST_CLICKTAB);
ami_gui_opts_array_to_list(&gow->screenoptslist, screenopts, NSA_LIST_RADIO);
+ ami_gui_opts_array_to_list(&gow->pagethemeoptslist, pagethemeopts, NSA_LIST_CHOOSER);
ami_gui_opts_array_to_list(&gow->proxyoptslist, proxyopts, NSA_LIST_CHOOSER);
ami_gui_opts_array_to_list(&gow->nativebmoptslist, nativebmopts, NSA_LIST_CHOOSER);
ami_gui_opts_array_to_list(&gow->ditheroptslist, ditheropts, NSA_LIST_CHOOSER);
@@ -497,6 +514,7 @@ static void ami_gui_opts_free(struct ami_gui_opts_window *gow)
#ifndef __amigaos4__
ami_gui_opts_free_list(&gow->clicktablist, NSA_LIST_CLICKTAB);
ami_gui_opts_free_list(&gow->screenoptslist, NSA_LIST_RADIO);
+ ami_gui_opts_free_list(&gow->pagethemeoptslist, NSA_LIST_CHOOSER);
ami_gui_opts_free_list(&gow->proxyoptslist, NSA_LIST_CHOOSER);
ami_gui_opts_free_list(&gow->nativebmoptslist, NSA_LIST_CHOOSER);
ami_gui_opts_free_list(&gow->ditheroptslist, NSA_LIST_CHOOSER);
@@ -858,6 +876,23 @@ void ami_gui_opts_open(void)
GETFILE_ReadOnly, TRUE,
GETFILE_FullFileExpand, FALSE,
GetFileEnd,
+ CHILD_Label, LabelObj,
+ LABEL_Text, gadlab[GID_OPTS_THEME],
+ LabelEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_THEMEPAGE] = ChooserObj,
+ GA_ID, GID_OPTS_THEMEPAGE,
+ GA_RelVerify, TRUE,
+ CHOOSER_PopUp, TRUE,
+#ifdef __amigaos4__
+ CHOOSER_LabelArray, pagethemeopts,
+#else
+ CHOOSER_Labels, &gow->pagethemeoptslist,
+#endif
+ CHOOSER_Selected, nsoption_bool(prefer_dark_mode),
+ ChooserEnd,
+ CHILD_Label, LabelObj,
+ LABEL_Text, gadlab[GID_OPTS_THEMEPAGE],
+ LabelEnd,
LayoutEnd, // theme
CHILD_WeightedHeight, 0,
LAYOUT_AddChild, LayoutVObj,
@@ -1466,6 +1501,12 @@ void ami_gui_opts_open(void)
GA_Selected, !nsoption_bool(core_select_menu),
GA_Disabled, !ami_selectmenu_is_safe(),
CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_ENABLECSS] = CheckBoxObj,
+ GA_ID, GID_OPTS_ENABLECSS,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_ENABLECSS],
+ GA_Selected, nsoption_bool(author_level_css),
+ CheckBoxEnd,
LayoutEnd, // misc
CHILD_WeightedHeight, 0,
@@ -1709,7 +1750,16 @@ static void ami_gui_opts_use(bool save)
} else {
nsoption_set_bool(do_not_track, false);
}
-
+
+ GetAttr(GA_Selected,gow->objects[GID_OPTS_ENABLECSS],(ULONG *)&data);
+ if (data) {
+ nsoption_set_bool(author_level_css, true);
+ } else {
+ nsoption_set_bool(author_level_css, false);
+ }
+
+ ami_gui_menu_set_checked(NULL, M_CSS, nsoption_bool(author_level_css));
+
GetAttr(GA_Selected,gow->objects[GID_OPTS_FASTSCROLL],(ULONG *)&data);
if (data) {
nsoption_set_bool(faster_scroll, true);
@@ -1754,6 +1804,13 @@ static void ami_gui_opts_use(bool save)
GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_THEME],(ULONG *)&data);
nsoption_set_charp(theme, (char *)strdup((char *)data));
+ GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_THEMEPAGE],(ULONG *)&data);
+ if(data) {
+ nsoption_set_bool(prefer_dark_mode, true);
+ } else {
+ nsoption_set_bool(prefer_dark_mode, false);
+ }
+
GetAttr(GA_Selected,gow->objects[GID_OPTS_PTRTRUE],(ULONG *)&data);
if (data) {
nsoption_set_bool(truecolour_mouse_pointers, true);
diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c
index 001874c86..2b7f61281 100644
--- a/frontends/amiga/icon.c
+++ b/frontends/amiga/icon.c
@@ -201,7 +201,7 @@ bool amiga_icon_convert(struct content *c)
return false;
}
- icon_c->bitmap = amiga_bitmap_create(width, height, BITMAP_NEW);
+ icon_c->bitmap = amiga_bitmap_create(width, height, BITMAP_NONE);
if (!icon_c->bitmap) {
msg_data.errordata.errorcode = NSERROR_NOMEM;
msg_data.errordata.errormsg = messages_get("NoMemory");
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 3c09bcb27..eb1f21617 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -223,6 +223,7 @@ bool ami_libs_open(void)
#ifdef __amigaos4__
/* Libraries only needed on OS4 */
AMINS_LIB_OPEN("application.library", 53, Application, "application", 2, false)
+ AMINS_LIB_OPEN("dos.library", 37, DOS, "main", 1, true)
#else
/* Libraries we get automatically on OS4 but not OS3 */
AMINS_LIB_OPEN("utility.library", 37, Utility, "main", 1, true)
@@ -231,7 +232,6 @@ bool ami_libs_open(void)
AMINS_LIB_OPEN("asl.library", 37, Asl, "main", 1, true)
AMINS_LIB_OPEN("datatypes.library", 39, DataTypes, "main", 1, true)
AMINS_LIB_OPEN("diskfont.library", 40, Diskfont, "main", 1, true)
- AMINS_LIB_OPEN("dos.library", 37, DOS, "main", 1, true)
AMINS_LIB_OPEN("gadtools.library", 37, GadTools, "main", 1, true)
AMINS_LIB_OPEN("graphics.library", 40, Graphics, "main", 1, true)
AMINS_LIB_OPEN("icon.library", 44, Icon, "main", 1, true)
@@ -332,7 +332,6 @@ void ami_libs_close(void)
AMINS_LIB_CLOSE(Asl)
AMINS_LIB_CLOSE(DataTypes)
AMINS_LIB_CLOSE(Diskfont)
- AMINS_LIB_CLOSE(DOS)
AMINS_LIB_CLOSE(GadTools)
AMINS_LIB_CLOSE(Graphics)
AMINS_LIB_CLOSE(Icon)
@@ -345,6 +344,7 @@ void ami_libs_close(void)
AMINS_LIB_CLOSE(Workbench)
#ifdef __amigaos4__
AMINS_LIB_CLOSE(Application)
+ AMINS_LIB_CLOSE(DOS)
#else
AMINS_LIB_CLOSE(Utility)
#endif
diff --git a/frontends/amiga/pkg/SearchEngines b/frontends/amiga/pkg/SearchEngines
index 3f4bdd95b..3095d43cf 100644
--- a/frontends/amiga/pkg/SearchEngines
+++ b/frontends/amiga/pkg/SearchEngines
@@ -1,2 +1,2 @@
-Aminet|www.aminet.net|http://aminet.net/search?query=%s|http://aminet.net/favicon.ico|
+Aminet|www.aminet.net|https://aminet.net/search?query=%s|https://aminet.net/favicon.ico|
OS4Depot|www.os4depot.net|http://www.os4depot.net/index.php?function=search&tool=simple&f_fields=%s|http://www.os4depot.net/favicon.ico|
diff --git a/frontends/amiga/pkg/netsurf.readme b/frontends/amiga/pkg/netsurf.readme
index 7d3b8defa..d2d83ac56 100755
--- a/frontends/amiga/pkg/netsurf.readme
+++ b/frontends/amiga/pkg/netsurf.readme
@@ -2,11 +2,11 @@ Short: Fast CSS capable web browser
Uploader: chris@unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 3.10
+Version: 3.11
Requires: dev/misc/guigfxlib.lha
Architecture: ppc-amigaos >= 4.0.0
-This is NetSurf 3.10 for AmigaOS 4 (native frontend).
+This is NetSurf 3.11 for AmigaOS 4 (native frontend).
For the latest version, visit http://www.netsurf-browser.org
*******************************************
diff --git a/frontends/amiga/pkg/netsurf_os3.readme b/frontends/amiga/pkg/netsurf_os3.readme
index 418a9dec0..53514f8db 100644
--- a/frontends/amiga/pkg/netsurf_os3.readme
+++ b/frontends/amiga/pkg/netsurf_os3.readme
@@ -2,14 +2,14 @@ Short: Fast CSS capable web browser
Uploader: chris@unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 3.10 BETA
-Requires: dev/misc/guigfxlib.lha util/libs/AmiSSL-4.3.lha
-Architecture: m68k-amigaos >= 3.5.0
+Version: 3.11 BETA
+Requires: dev/misc/guigfxlib.lha util/libs/AmiSSL-5.13-OS3.lha
+Architecture: m68k-amigaos >= 3.2.0
-This is NetSurf 3.10 BETA for AmigaOS 3.
+This is NetSurf 3.11 BETA for AmigaOS 3.
It is built off of the OS4 (Reaction) frontend.
-Requirements are AmigaOS 3.5 or 3.9, 32MB RAM.
+Requirements are AmigaOS 3.2, 3.5 or 3.9, 32MB RAM.
THIS IS EARLY BETA QUALITY SOFTWARE FOR TESTING ONLY.
ALL USE IS AT YOUR OWN RISK. IT *WILL* CRASH!
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index fe1e58f13..8bc1712dd 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -126,11 +126,34 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit
if(depth < 16) {
gg->palette_mapped = true;
if(force32bit == false) palette_mapped = true;
+
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = true,
+ });
+
+ NSLOG(netsurf, INFO, "Set bitmap format to 0xAARRGGBB (native endian) (PMA)");
+
} else {
gg->palette_mapped = false;
- if(force32bit == false) palette_mapped = false;
+
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = false,
+ });
+
+ NSLOG(netsurf, INFO, "Set bitmap format to 0xAARRGGBB (native endian)");
+
}
#else
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = true,
+ });
+
+ NSLOG(netsurf, INFO, "Set bitmap format to 0xAARRGGBB (native endian) (PMA)");
+
+
/* Friend BitMaps are weird.
* For OS4, we shouldn't use a friend BitMap here (see below).
* For OS3 AGA, we get no display blitted if we use a friend BitMap,
@@ -149,7 +172,6 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit
if(force32bit == false) palette_mapped = true;
} else {
gg->palette_mapped = false;
- if(force32bit == false) palette_mapped = false;
}
#endif
diff --git a/frontends/amiga/version.c b/frontends/amiga/version.c
index 7e017f3c8..ae898cb83 100644
--- a/frontends/amiga/version.c
+++ b/frontends/amiga/version.c
@@ -25,7 +25,7 @@
* problems created by "0" not being a valid AmigaOS revision number.
*/
#define NETSURF_VERSION_MAJOR "3"
-#define NETSURF_VERSION_MINOR_EXTERNAL "11"
+#define NETSURF_VERSION_MINOR_EXTERNAL "12"
#if defined(CI_BUILD)
#define NETSURF_VERSION_MINOR CI_BUILD
#else
diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index 6de15b62e..2f6d7118b 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -161,7 +161,7 @@ $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME):
package-atari: $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME) $(PKGNAME)
$(VQ)echo Creating $(PKGNAME)
-$(PKGNAME): $(EXETARGET)
+$(PKGNAME): $(EXETARGET) $(POSTEXES)
ifneq ($(strip $(STRIP)),)
$(Q)echo Stripping symbols from $(EXETARGET) with $(STRIP)
$(Q)$(STRIP) $(EXETARGET)
diff --git a/frontends/atari/bitmap.c b/frontends/atari/bitmap.c
index ae42da837..9b5a016a5 100644
--- a/frontends/atari/bitmap.c
+++ b/frontends/atari/bitmap.c
@@ -77,36 +77,36 @@ int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB * out )
* \param pixdata NULL or an memory address to use as the bitmap pixdata
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, unsigned int state, void * pixdata )
+static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, enum gui_bitmap_flags flags, void * pixdata )
{
- struct bitmap * bitmap;
+ struct bitmap * bitmap;
- NSLOG(netsurf, INFO,
- "width %d (rowstride: %d, bpp: %d), height %d, state %u", w,
- rowstride, bpp, h, state);
+ NSLOG(netsurf, INFO,
+ "width %d (rowstride: %d, bpp: %d), height %d, flags %u", w,
+ rowstride, bpp, h, (unsigned)flags);
if( rowstride == 0) {
rowstride = bpp * w;
}
assert( rowstride >= (w * bpp) );
- bitmap = calloc(1 , sizeof(struct bitmap) );
- if (bitmap) {
+ bitmap = calloc(1 , sizeof(struct bitmap) );
+ if (bitmap) {
if( pixdata == NULL) {
- bitmap->pixdata = calloc(1, (rowstride * h)+128);
+ bitmap->pixdata = calloc(1, (rowstride * h)+128);
}
else {
bitmap->pixdata = pixdata;
}
- if (bitmap->pixdata != NULL) {
+ if (bitmap->pixdata != NULL) {
bitmap->width = w;
bitmap->height = h;
- bitmap->opaque = (state & BITMAP_OPAQUE) ? true : false;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) ? true : false;
bitmap->bpp = bpp;
bitmap->resized = NULL;
bitmap->rowstride = rowstride;
- } else {
+ } else {
free(bitmap);
bitmap=NULL;
NSLOG(netsurf, INFO, "Out of memory!");
@@ -118,9 +118,9 @@ static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, uns
/* exported interface documented in atari/bitmap.h */
-void *atari_bitmap_create(int w, int h, unsigned int state)
+void *atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags)
{
- return atari_bitmap_create_ex( w, h, NS_BMP_DEFAULT_BPP, w * NS_BMP_DEFAULT_BPP, state, NULL );
+ return atari_bitmap_create_ex( w, h, NS_BMP_DEFAULT_BPP, w * NS_BMP_DEFAULT_BPP, flags, NULL );
}
/**
@@ -249,21 +249,6 @@ void atari_bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* Sets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -284,40 +269,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
}
-/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- struct bitmap *bm = bitmap;
-
- if (bitmap == NULL) {
- NSLOG(netsurf, INFO, "NULL bitmap!");
- return false;
- }
-
- if( nsoption_int(atari_transparency) == 0 ){
- return( true );
- }
-
- tst = bm->width * bm->height;
-
- while (tst-- > 0) {
- if (bm->pixdata[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO,
- "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
/* exported interface documented in atari/bitmap.h */
bool atari_bitmap_get_opaque(void *bitmap)
{
@@ -358,22 +309,12 @@ int atari_bitmap_get_height(void *bitmap)
return(bm->height);
}
-
-/**
- * Gets the number of BYTES per pixel.
- */
-static size_t bitmap_get_bpp(void *bitmap)
-{
- struct bitmap *bm = bitmap;
- return bm->bpp;
-}
-
/* exported interface documented in atari/bitmap.h */
bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
HermesFormat *fmt, int nw, int nh)
{
- unsigned int state = 0;
- short bpp = bitmap_get_bpp( img );
+ enum gui_bitmap_flags flags = 0;
+ short bpp = img->bpp;
int stride = atari_bitmap_get_rowstride( img );
int err;
@@ -389,9 +330,9 @@ bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
/* allocate the mem for resized bitmap */
if (img->opaque == true) {
- state |= BITMAP_OPAQUE;
+ flags |= BITMAP_OPAQUE;
}
- img->resized = atari_bitmap_create_ex( nw, nh, bpp, nw*bpp, state, NULL );
+ img->resized = atari_bitmap_create_ex( nw, nh, bpp, nw*bpp, flags, NULL );
if( img->resized == NULL ) {
printf("W: %d, H: %d, bpp: %d\n", nw, nh, bpp);
assert(img->resized);
@@ -439,13 +380,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = atari_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = atari_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = atari_bitmap_get_rowstride,
.get_width = atari_bitmap_get_width,
.get_height = atari_bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/atari/bitmap.h b/frontends/atari/bitmap.h
index 72bad555e..88985ad3c 100644
--- a/frontends/atari/bitmap.h
+++ b/frontends/atari/bitmap.h
@@ -90,7 +90,7 @@ int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB * out );
* \param state a flag word indicating the initial state
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *atari_bitmap_create(int w, int h, unsigned int state);
+void *atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags);
/**
* Find the width of a pixel row in bytes.
diff --git a/frontends/atari/plot/font_freetype.c b/frontends/atari/plot/font_freetype.c
index f8109f6f2..3ff4ab115 100644
--- a/frontends/atari/plot/font_freetype.c
+++ b/frontends/atari/plot/font_freetype.c
@@ -25,6 +25,7 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/mouse.h"
+#include "netsurf/bitmap.h"
#include "netsurf/plot_style.h"
#include "atari/gui.h"
diff --git a/frontends/atari/plot/font_internal.c b/frontends/atari/plot/font_internal.c
index 709697f74..11732c5ea 100644
--- a/frontends/atari/plot/font_internal.c
+++ b/frontends/atari/plot/font_internal.c
@@ -25,6 +25,7 @@
#include "utils/utf8.h"
#include "utils/log.h"
#include "netsurf/mouse.h"
+#include "netsurf/bitmap.h"
#include "netsurf/plot_style.h"
#include "atari/gui.h"
diff --git a/frontends/beos/Makefile b/frontends/beos/Makefile
index 46f12ec85..81c9326ee 100644
--- a/frontends/beos/Makefile
+++ b/frontends/beos/Makefile
@@ -151,7 +151,7 @@ install-beos:
package-beos: $(PKGNAME)
$(VQ)echo Creating $(PKGNAME)
-$(PKGNAME): $(EXETARGET)
+$(PKGNAME): $(EXETARGET) $(POSTEXES)
$(Q)rm -rf $(HAIKU_TARGET_DIR)
$(Q)rm -rf $(PKGNAME)
$(Q)$(MKDIR) $(HAIKU_TARGET_DIR)
diff --git a/frontends/beos/bitmap.cpp b/frontends/beos/bitmap.cpp
index c4b008755..f7e8fa032 100644
--- a/frontends/beos/bitmap.cpp
+++ b/frontends/beos/bitmap.cpp
@@ -114,28 +114,28 @@ static inline void nsbeos_rgba_to_bgra(void *src,
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param bflags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bmp = (struct bitmap *)malloc(sizeof(struct bitmap));
if (bmp == NULL)
return NULL;
- int32 flags = 0;
- if (state & BITMAP_CLEAR_MEMORY)
- flags |= B_BITMAP_CLEAR_TO_WHITE;
+ int32 Bflags = 0;
+ if (flags & BITMAP_CLEAR)
+ Bflags |= B_BITMAP_CLEAR_TO_WHITE;
BRect frame(0, 0, width - 1, height - 1);
//XXX: bytes per row ?
- bmp->primary = new BBitmap(frame, flags, B_RGBA32);
- bmp->shadow = new BBitmap(frame, flags, B_RGBA32);
+ bmp->primary = new BBitmap(frame, Bflags, B_RGBA32);
+ bmp->shadow = new BBitmap(frame, Bflags, B_RGBA32);
bmp->pretile_x = bmp->pretile_y = bmp->pretile_xy = NULL;
- bmp->opaque = (state & BITMAP_OPAQUE) != 0;
+ bmp->opaque = (flags & BITMAP_OPAQUE) != 0;
return bmp;
}
@@ -156,21 +156,6 @@ static void bitmap_set_opaque(void *vbitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- /* todo: test if bitmap is opaque */
- return false;
-}
-
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -216,20 +201,6 @@ static size_t bitmap_get_rowstride(void *vbitmap)
/**
- * Find the bytes per pixels of a bitmap.
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixels of the bitmap
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- return 4;
-}
-
-
-/**
* Free pretiles of a bitmap.
*
* \param bitmap The bitmap to free the pretiles of.
@@ -261,32 +232,6 @@ static void bitmap_destroy(void *vbitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags modify the behaviour of the save
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- BTranslatorRoster *roster = BTranslatorRoster::Default();
- BBitmapStream stream(bitmap->primary);
- BFile file(path, B_WRITE_ONLY | B_CREATE_FILE);
- uint32 type = B_PNG_FORMAT;
-
- if (file.InitCheck() < B_OK)
- return false;
-
- if (roster->Translate(&stream, NULL, NULL, &file, type) < B_OK)
- return false;
-
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -543,13 +488,10 @@ static struct gui_bitmap_table bitmap_table = {
/*.destroy =*/ bitmap_destroy,
/*.set_opaque =*/ bitmap_set_opaque,
/*.get_opaque =*/ bitmap_get_opaque,
- /*.test_opaque =*/ bitmap_test_opaque,
/*.get_buffer =*/ bitmap_get_buffer,
/*.get_rowstride =*/ bitmap_get_rowstride,
/*.get_width =*/ bitmap_get_width,
/*.get_height =*/ bitmap_get_height,
- /*.get_bpp =*/ bitmap_get_bpp,
- /*.save =*/ bitmap_save,
/*.modified =*/ bitmap_modified,
/*.render =*/ bitmap_render,
};
diff --git a/frontends/framebuffer/bitmap.c b/frontends/framebuffer/bitmap.c
index 1fc9f46a2..c9b58541e 100644
--- a/frontends/framebuffer/bitmap.c
+++ b/frontends/framebuffer/bitmap.c
@@ -47,19 +47,16 @@
* \param state a flag word indicating the initial state
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
- nsfb_t *bm;
-
- NSLOG(netsurf, INFO, "width %d, height %d, state %u", width, height,
- state);
+ nsfb_t *bm;
bm = nsfb_new(NSFB_SURFACE_RAM);
if (bm == NULL) {
return NULL;
}
- if ((state & BITMAP_OPAQUE) == 0) {
+ if ((flags & BITMAP_OPAQUE) == 0) {
nsfb_set_geometry(bm, width, height, NSFB_FMT_ABGR8888);
} else {
nsfb_set_geometry(bm, width, height, NSFB_FMT_XBGR8888);
@@ -70,9 +67,7 @@ static void *bitmap_create(int width, int height, unsigned int state)
return NULL;
}
- NSLOG(netsurf, INFO, "bitmap %p", bm);
-
- return bm;
+ return bm;
}
@@ -133,20 +128,6 @@ static void bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -175,39 +156,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- nsfb_t *bm = bitmap;
- unsigned char *bmpptr;
- int width;
- int height;
-
- assert(bm != NULL);
-
- nsfb_get_buffer(bm, &bmpptr, NULL);
-
- nsfb_get_geometry(bm, &width, &height, NULL);
-
- tst = width * height;
-
- while (tst-- > 0) {
- if (bmpptr[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO, "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
-/**
* Gets weather a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -251,12 +199,6 @@ static int bitmap_get_height(void *bitmap)
return(height);
}
-/* get bytes per pixel */
-static size_t bitmap_get_bpp(void *bitmap)
-{
- return 4;
-}
-
/**
* Render content into a bitmap.
*
@@ -332,13 +274,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = framebuffer_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c
index d755681c6..4d28c61ad 100644
--- a/frontends/framebuffer/font_internal.c
+++ b/frontends/framebuffer/font_internal.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "utils/nsoption.h"
+#include "utils/utils.h"
#include "utils/utf8.h"
#include "netsurf/utf8.h"
#include "netsurf/layout.h"
@@ -270,7 +271,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
- /* Fall through. */
+ fallthrough;
+
case FB_BOLD:
section = fb_bold_section_table[ucs4 / 256];
if (section != 0 || ucs4 / 256 == 0) {
@@ -281,7 +283,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
- /* Fall through. */
+ fallthrough;
+
case FB_ITALIC:
section = fb_italic_section_table[ucs4 / 256];
if (section != 0 || ucs4 / 256 == 0) {
@@ -292,7 +295,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
- /* Fall through. */
+ fallthrough;
+
case FB_REGULAR:
section = fb_regular_section_table[ucs4 / 256];
if (section != 0 || ucs4 / 256 == 0) {
@@ -303,7 +307,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
- /* Fall through. */
+ fallthrough;
+
default:
glyph_data = get_codepoint(ucs4, style & FB_ITALIC);
break;
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 934ba05c8..689b63dc1 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -1000,7 +1000,7 @@ fb_browser_window_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
break;
}
/* Z or Y pressed but not undo or redo; */
- /* Fall through */
+ fallthrough;
default:
ucs4 = fbtk_keycode_to_ucs4(cbi->event->value.keycode,
diff --git a/frontends/gtk/Makefile b/frontends/gtk/Makefile
index 4f3fd5f52..64a0872ba 100644
--- a/frontends/gtk/Makefile
+++ b/frontends/gtk/Makefile
@@ -11,6 +11,8 @@
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
+# determine if the rsvg library API version
+RSVG_API := $(shell $(PKG_CONFIG) --atleast-version=2.46 librsvg-2.0 && echo 246)
$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
@@ -32,13 +34,19 @@ ifeq ($(NETSURF_GTK_MAJOR),2)
GTKDEPFLAGS += -DGTK_DISABLE_DEPRECATED
endif
+# C library API control
+ifeq ($(HOST),FreeBSD)
+CAPIFLAGS :=
+else
+CAPIFLAGS := -D_XOPEN_SOURCE=700 \
+ -D_POSIX_C_SOURCE=200809L
+endif
GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk -g \
$(GTKDEPFLAGS) \
+ $(CAPIFLAGS) \
-D_BSD_SOURCE \
-D_DEFAULT_SOURCE \
- -D_XOPEN_SOURCE=700 \
- -D_POSIX_C_SOURCE=200809L \
-D_NETBSD_SOURCE \
-DGTK_RESPATH=\"$(NETSURF_GTK_RES_PATH)\"
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c
index e7b859d06..a995a9e28 100644
--- a/frontends/gtk/bitmap.c
+++ b/frontends/gtk/bitmap.c
@@ -45,22 +45,25 @@
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *gbitmap;
+ if (width == 0 || height == 0) {
+ return NULL;
+ }
+
gbitmap = calloc(1, sizeof(struct bitmap));
if (gbitmap != NULL) {
- if ((state & BITMAP_OPAQUE) != 0) {
- gbitmap->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
- } else {
- gbitmap->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
+ if (flags & BITMAP_OPAQUE) {
+ gbitmap->opaque = true;
}
+ gbitmap->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
if (cairo_surface_status(gbitmap->surface) != CAIRO_STATUS_SUCCESS) {
cairo_surface_destroy(gbitmap->surface);
free(gbitmap);
@@ -81,76 +84,8 @@ static void *bitmap_create(int width, int height, unsigned int state)
static void bitmap_set_opaque(void *vbitmap, bool opaque)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- cairo_format_t fmt;
- cairo_surface_t *nsurface = NULL;
-
- assert(gbitmap);
-
- fmt = cairo_image_surface_get_format(gbitmap->surface);
- if (fmt == CAIRO_FORMAT_RGB24) {
- if (opaque == false) {
- /* opaque to transparent */
- nsurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
- cairo_image_surface_get_width(gbitmap->surface),
- cairo_image_surface_get_height(gbitmap->surface));
-
- }
-
- } else {
- if (opaque == true) {
- /* transparent to opaque */
- nsurface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
- cairo_image_surface_get_width(gbitmap->surface),
- cairo_image_surface_get_height(gbitmap->surface));
-
- }
- }
-
- if (nsurface != NULL) {
- if (cairo_surface_status(nsurface) != CAIRO_STATUS_SUCCESS) {
- cairo_surface_destroy(nsurface);
- } else {
- memcpy(cairo_image_surface_get_data(nsurface),
- cairo_image_surface_get_data(gbitmap->surface),
- cairo_image_surface_get_stride(gbitmap->surface) * cairo_image_surface_get_height(gbitmap->surface));
- cairo_surface_destroy(gbitmap->surface);
- gbitmap->surface = nsurface;
-
- cairo_surface_mark_dirty(gbitmap->surface);
-
- }
- }
-}
-
-
-/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *vbitmap)
-{
- struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- unsigned char *pixels;
- int pcount;
- int ploop;
-
- assert(gbitmap);
-
- pixels = cairo_image_surface_get_data(gbitmap->surface);
-
- pcount = cairo_image_surface_get_stride(gbitmap->surface) *
- cairo_image_surface_get_height(gbitmap->surface);
-
- for (ploop = 3; ploop < pcount; ploop += 4) {
- if (pixels[ploop] != 0xff) {
- return false;
- }
- }
-
- return true;
+ gbitmap->opaque = opaque;
}
@@ -162,16 +97,8 @@ static bool bitmap_test_opaque(void *vbitmap)
static bool bitmap_get_opaque(void *vbitmap)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- cairo_format_t fmt;
-
- assert(gbitmap);
-
- fmt = cairo_image_surface_get_format(gbitmap->surface);
- if (fmt == CAIRO_FORMAT_RGB24) {
- return true;
- }
- return false;
+ return gbitmap->opaque;
}
@@ -187,83 +114,13 @@ static bool bitmap_get_opaque(void *vbitmap)
static unsigned char *bitmap_get_buffer(void *vbitmap)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- int pixel_loop;
- int pixel_count;
uint8_t *pixels;
- uint32_t t, r, g, b;
- cairo_format_t fmt;
assert(gbitmap);
cairo_surface_flush(gbitmap->surface);
pixels = cairo_image_surface_get_data(gbitmap->surface);
- if (!gbitmap->converted)
- return pixels;
-
- fmt = cairo_image_surface_get_format(gbitmap->surface);
- pixel_count = cairo_image_surface_get_width(gbitmap->surface) *
- cairo_image_surface_get_height(gbitmap->surface);
-
- if (fmt == CAIRO_FORMAT_RGB24) {
- /* Opaque image */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
- /* Cairo surface is ARGB, written in native endian */
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- b = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- r = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-#else
- t = pixels[4 * pixel_loop + 0];
- r = pixels[4 * pixel_loop + 1];
- g = pixels[4 * pixel_loop + 2];
- b = pixels[4 * pixel_loop + 3];
-#endif
-
- /* Core bitmaps always have a component order of rgba,
- * regardless of system endianness */
- pixels[4 * pixel_loop + 0] = r;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = b;
- pixels[4 * pixel_loop + 3] = t;
- }
- } else {
- /* Alpha image: de-multiply alpha */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- b = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- r = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-#else
- t = pixels[4 * pixel_loop + 0];
- r = pixels[4 * pixel_loop + 1];
- g = pixels[4 * pixel_loop + 2];
- b = pixels[4 * pixel_loop + 3];
-#endif
-
- if (t != 0) {
- r = (r << 8) / t;
- g = (g << 8) / t;
- b = (b << 8) / t;
-
- r = (r > 255) ? 255 : r;
- g = (g > 255) ? 255 : g;
- b = (b > 255) ? 255 : b;
- } else {
- r = g = b = 0;
- }
-
- pixels[4 * pixel_loop + 0] = r;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = b;
- pixels[4 * pixel_loop + 3] = t;
- }
- }
-
- gbitmap->converted = false;
-
return (unsigned char *) pixels;
}
@@ -284,22 +141,6 @@ static size_t bitmap_get_rowstride(void *vbitmap)
/**
- * Find the bytes per pixel of a bitmap
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixel
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- assert(gbitmap);
-
- return 4;
-}
-
-
-
-/**
* Free a bitmap.
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -320,23 +161,6 @@ static void bitmap_destroy(void *vbitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags modify the behaviour of the save
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
-{
- struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- assert(gbitmap);
-
- return false;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -344,81 +168,10 @@ static bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
static void bitmap_modified(void *vbitmap)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- int pixel_loop;
- int pixel_count;
- uint8_t *pixels;
- uint32_t t, r, g, b;
- cairo_format_t fmt;
assert(gbitmap);
- fmt = cairo_image_surface_get_format(gbitmap->surface);
-
- pixel_count = cairo_image_surface_get_width(gbitmap->surface) *
- cairo_image_surface_get_height(gbitmap->surface);
- pixels = cairo_image_surface_get_data(gbitmap->surface);
-
- if (gbitmap->converted) {
- cairo_surface_mark_dirty(gbitmap->surface);
- return;
- }
-
- if (fmt == CAIRO_FORMAT_RGB24) {
- /* Opaque image */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
- /* Core bitmaps always have a component order of rgba,
- * regardless of system endianness */
- r = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- b = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-
- /* Cairo surface is ARGB, written in native endian */
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- pixels[4 * pixel_loop + 0] = b;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = r;
- pixels[4 * pixel_loop + 3] = t;
-#else
- pixels[4 * pixel_loop + 0] = t;
- pixels[4 * pixel_loop + 1] = r;
- pixels[4 * pixel_loop + 2] = g;
- pixels[4 * pixel_loop + 3] = b;
-#endif
- }
- } else {
- /* Alpha image: pre-multiply alpha */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
- r = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- b = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-
- if (t != 0) {
- r = ((r * (t + 1)) >> 8) & 0xff;
- g = ((g * (t + 1)) >> 8) & 0xff;
- b = ((b * (t + 1)) >> 8) & 0xff;
- } else {
- r = g = b = 0;
- }
-
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- pixels[4 * pixel_loop + 0] = b;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = r;
- pixels[4 * pixel_loop + 3] = t;
-#else
- pixels[4 * pixel_loop + 0] = t;
- pixels[4 * pixel_loop + 1] = r;
- pixels[4 * pixel_loop + 2] = g;
- pixels[4 * pixel_loop + 3] = b;
-#endif
- }
- }
-
cairo_surface_mark_dirty(gbitmap->surface);
-
- gbitmap->converted = true;
}
/* exported interface documented in gtk/bitmap.h */
@@ -530,13 +283,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = nsgtk_bitmap_get_width,
.get_height = nsgtk_bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/gtk/bitmap.h b/frontends/gtk/bitmap.h
index 0f46d19a8..80a0e7a3a 100644
--- a/frontends/gtk/bitmap.h
+++ b/frontends/gtk/bitmap.h
@@ -26,7 +26,7 @@ extern struct gui_bitmap_table *nsgtk_bitmap_table;
struct bitmap {
cairo_surface_t *surface; /* original cairo surface */
cairo_surface_t *scsurface; /* scaled surface */
- bool converted; /** set if the surface data has been converted */
+ bool opaque;
};
int nsgtk_bitmap_get_width(void *vbitmap);
diff --git a/frontends/gtk/download.c b/frontends/gtk/download.c
index 173d2e46e..d1231634d 100644
--- a/frontends/gtk/download.c
+++ b/frontends/gtk/download.c
@@ -432,7 +432,7 @@ static gboolean nsgtk_download_update(gboolean force_update)
switch (dl->status) {
case NSGTK_DOWNLOAD_WORKING:
pulse_mode = TRUE;
- /* Fall through */
+ fallthrough;
case NSGTK_DOWNLOAD_NONE:
dl->speed = dl->size_downloaded /
@@ -449,12 +449,13 @@ static gboolean nsgtk_download_update(gboolean force_update)
dl_ctx.num_active++;
update = TRUE;
- /* Fall through */
+ fallthrough;
case NSGTK_DOWNLOAD_COMPLETE:
downloaded += dl->size_downloaded;
total += dl->size_total;
dls++;
+ fallthrough;
default:
;//Do nothing
@@ -1022,7 +1023,7 @@ nserror nsgtk_download_init(void)
/* exported interface documented in gtk/download.h */
-void nsgtk_download_destroy ()
+void nsgtk_download_destroy(void)
{
nsgtk_download_do(nsgtk_download_store_cancel_item);
}
diff --git a/frontends/gtk/fetch.c b/frontends/gtk/fetch.c
index 58bd0b853..d77073a63 100644
--- a/frontends/gtk/fetch.c
+++ b/frontends/gtk/fetch.c
@@ -75,6 +75,7 @@ void gtk_fetch_filetype_init(const char *mimefile)
hash_add(mime_hash, "html", "text/html");
hash_add(mime_hash, "jpg", "image/jpeg");
hash_add(mime_hash, "jpeg", "image/jpeg");
+ hash_add(mime_hash, "jxl", "image/jxl");
hash_add(mime_hash, "gif", "image/gif");
hash_add(mime_hash, "png", "image/png");
hash_add(mime_hash, "jng", "image/jng");
diff --git a/frontends/gtk/gdk.c b/frontends/gtk/gdk.c
index 2912862da..fe9a0791c 100644
--- a/frontends/gtk/gdk.c
+++ b/frontends/gtk/gdk.c
@@ -73,7 +73,7 @@ nsgdk_pixbuf_get_from_surface(cairo_surface_t *surface, int scwidth, int scheigh
memset(gdk_pixbuf_get_pixels(pixbuf),
0xff,
- gdk_pixbuf_get_rowstride(pixbuf) * scheight);
+ gdk_pixbuf_get_rowstride(pixbuf) * (size_t)scheight);
/* scale cairo surface into new surface the target size */
cairo_surface_flush(surface); /* ensure source surface is ready */
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index a826b053a..661176ded 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -44,6 +44,7 @@
#include "netsurf/browser.h"
#include "netsurf/browser_window.h"
#include "netsurf/netsurf.h"
+#include "netsurf/bitmap.h"
#include "content/fetch.h"
#include "content/backing_store.h"
#include "desktop/save_complete.h"
@@ -131,12 +132,16 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
case GDK_KEY(BackSpace):
if (key->state & GDK_SHIFT_MASK)
return NS_KEY_DELETE_LINE_START;
+ else if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_DELETE_WORD_LEFT;
else
return NS_KEY_DELETE_LEFT;
case GDK_KEY(Delete):
if (key->state & GDK_SHIFT_MASK)
return NS_KEY_DELETE_LINE_END;
+ else if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_DELETE_WORD_RIGHT;
else
return NS_KEY_DELETE_RIGHT;
@@ -148,10 +153,14 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
case GDK_KEY(Left):
case GDK_KEY(KP_Left):
+ if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_WORD_LEFT;
return NS_KEY_LEFT;
case GDK_KEY(Right):
case GDK_KEY(KP_Right):
+ if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_WORD_RIGHT;
return NS_KEY_RIGHT;
case GDK_KEY(Up):
@@ -972,6 +981,11 @@ static nserror nsgtk_setup(int argc, char** argv, char **respath)
browser_set_dpi(gdk_screen_get_resolution(gdk_screen_get_default()));
NSLOG(netsurf, INFO, "Set CSS DPI to %d", browser_get_dpi());
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = true,
+ });
+
filepath_sfinddef(respath, buf, "mime.types", "/etc/");
gtk_fetch_filetype_init(buf);
diff --git a/frontends/gtk/misc.c b/frontends/gtk/misc.c
index bda0dd688..8ab1d914c 100644
--- a/frontends/gtk/misc.c
+++ b/frontends/gtk/misc.c
@@ -21,9 +21,11 @@
* Implementation of netsurf miscellaneous operations table
*/
+#include <string.h>
#include <stdbool.h>
#include <gtk/gtk.h>
+#include "utils/config.h"
#include "utils/errors.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/frontends/gtk/res/fr/credits.html b/frontends/gtk/res/fr/credits.html
new file mode 120000
index 000000000..47da488e8
--- /dev/null
+++ b/frontends/gtk/res/fr/credits.html
@@ -0,0 +1 @@
+../../../../resources/fr/credits.html \ No newline at end of file
diff --git a/frontends/gtk/res/fr/licence.html b/frontends/gtk/res/fr/licence.html
new file mode 120000
index 000000000..2fd247ba8
--- /dev/null
+++ b/frontends/gtk/res/fr/licence.html
@@ -0,0 +1 @@
+../../../../resources/fr/licence.html \ No newline at end of file
diff --git a/frontends/gtk/res/fr/welcome.html b/frontends/gtk/res/fr/welcome.html
new file mode 120000
index 000000000..a7a2023ea
--- /dev/null
+++ b/frontends/gtk/res/fr/welcome.html
@@ -0,0 +1 @@
+../../../../resources/fr/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/netsurf.gresource.xml b/frontends/gtk/res/netsurf.gresource.xml
index ada2d59fc..21a2e7723 100644
--- a/frontends/gtk/res/netsurf.gresource.xml
+++ b/frontends/gtk/res/netsurf.gresource.xml
@@ -14,15 +14,18 @@
<file preprocess="to-pixdata">throbber/throbber7.png</file>
<file preprocess="to-pixdata">throbber/throbber8.png</file>
<file>credits.html</file>
+ <file>fr/credits.html</file>
<file>it/credits.html</file>
<file>nl/credits.html</file>
<file>zh_CN/credits.html</file>
<file>licence.html</file>
+ <file>fr/licence.html</file>
<file>it/licence.html</file>
<file>nl/licence.html</file>
<file>zh_CN/licence.html</file>
<file>welcome.html</file>
<file>de/welcome.html</file>
+ <file>fr/welcome.html</file>
<file>it/welcome.html</file>
<file>ja/welcome.html</file>
<file>nl/welcome.html</file>
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c
index f08d5d0d0..f9d4f6d67 100644
--- a/frontends/gtk/scaffolding.c
+++ b/frontends/gtk/scaffolding.c
@@ -18,6 +18,7 @@
#include <gtk/gtk.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <string.h>
#include "utils/utils.h"
@@ -192,6 +193,18 @@ static void scaffolding_window_destroy(GtkWidget *widget, gpointer data)
nsgtk_local_history_hide();
+ /* ensure scaffolding being destroyed is not current */
+ if (scaf_current == gs) {
+ scaf_current = NULL;
+ /* attempt to select nearest scaffold instead of just selecting the first */
+ if (gs->prev != NULL) {
+ scaf_current = gs->prev;
+ } else if (gs->next != NULL) {
+ scaf_current = gs->next;
+ }
+ }
+
+ /* remove scaffolding from list */
if (gs->prev != NULL) {
gs->prev->next = gs->next;
} else {
diff --git a/frontends/gtk/search.c b/frontends/gtk/search.c
index 068624153..f9a509f6e 100644
--- a/frontends/gtk/search.c
+++ b/frontends/gtk/search.c
@@ -25,6 +25,7 @@
* that generally means web search and is confusing.
*/
+#include <stdlib.h>
#include <stdbool.h>
#include <gtk/gtk.h>
@@ -269,6 +270,8 @@ nserror nsgtk_search_restyle(struct gtk_search *search)
case 4: /* Text icons only */
gtk_toolbar_set_style(GTK_TOOLBAR(search->bar),
GTK_TOOLBAR_TEXT);
+ break;
+
default:
break;
}
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index 32adabc5b..6ec41cc1d 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -673,15 +673,22 @@ nsgtk_toolbar_customisation_save(struct nsgtk_toolbar *tb)
for (location = BACK_BUTTON;
location < PLACEHOLDER_BUTTON;
location++) {
+ int written;
itemid = itemid_from_location(tb, location);
if (itemid == PLACEHOLDER_BUTTON) {
/* no more filled locations */
break;
}
- start += snprintf(start,
+ written = snprintf(start,
orderlen - (start - order),
"%s/",
tb->items[itemid].name);
+ if ((written < 0) ||
+ (written >= orderlen - (start - order))) {
+ free(order);
+ return NSERROR_UNKNOWN;
+ }
+ start += written;
if ((start - order) >= orderlen) {
break;
@@ -3066,7 +3073,7 @@ contents_button_clicked_cb(GtkWidget *widget, gpointer data)
struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
nserror res;
- res = toolbar_navigate_to_url(tb, "http://www.netsurf-browser.org/documentation/");
+ res = toolbar_navigate_to_url(tb, "https://www.netsurf-browser.org/documentation/");
if (res != NSERROR_OK) {
nsgtk_warning(messages_get_errorcode(res), 0);
}
@@ -3087,7 +3094,7 @@ guide_button_clicked_cb(GtkWidget *widget, gpointer data)
struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
nserror res;
- res = toolbar_navigate_to_url(tb, "http://www.netsurf-browser.org/documentation/guide");
+ res = toolbar_navigate_to_url(tb, "https://www.netsurf-browser.org/documentation/guide");
if (res != NSERROR_OK) {
nsgtk_warning(messages_get_errorcode(res), 0);
}
@@ -3109,7 +3116,7 @@ info_button_clicked_cb(GtkWidget *widget, gpointer data)
struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
nserror res;
- res = toolbar_navigate_to_url(tb, "http://www.netsurf-browser.org/documentation/info");
+ res = toolbar_navigate_to_url(tb, "https://www.netsurf-browser.org/documentation/info");
if (res != NSERROR_OK) {
nsgtk_warning(messages_get_errorcode(res), 0);
}
diff --git a/frontends/monkey/bitmap.c b/frontends/monkey/bitmap.c
index e53b565d1..900dbca72 100644
--- a/frontends/monkey/bitmap.c
+++ b/frontends/monkey/bitmap.c
@@ -31,26 +31,26 @@ struct bitmap {
size_t rowstride;
int width;
int height;
- unsigned int state;
+ bool opaque;
};
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *ret = calloc(sizeof(*ret), 1);
if (ret == NULL)
return NULL;
-
+
ret->width = width;
ret->height = height;
- ret->state = state;
-
+ ret->opaque = (flags & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+
ret->ptr = calloc(width, height * 4);
-
+
if (ret->ptr == NULL) {
free(ret);
return NULL;
}
-
+
return ret;
}
@@ -64,23 +64,15 @@ static void bitmap_destroy(void *bitmap)
static void bitmap_set_opaque(void *bitmap, bool opaque)
{
struct bitmap *bmap = bitmap;
-
- if (opaque)
- bmap->state |= (BITMAP_OPAQUE);
- else
- bmap->state &= ~(BITMAP_OPAQUE);
-}
-static bool bitmap_test_opaque(void *bitmap)
-{
- return false;
+ bmap->opaque = opaque;
}
static bool bitmap_get_opaque(void *bitmap)
{
struct bitmap *bmap = bitmap;
-
- return (bmap->state & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+
+ return bmap->opaque;
}
static unsigned char *bitmap_get_buffer(void *bitmap)
@@ -96,21 +88,9 @@ static size_t bitmap_get_rowstride(void *bitmap)
return bmap->width * 4;
}
-static size_t bitmap_get_bpp(void *bitmap)
-{
- /* OMG?! */
- return 4;
-}
-
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
static void bitmap_modified(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- bmap->state |= BITMAP_MODIFIED;
+ return;
}
static int bitmap_get_width(void *bitmap)
@@ -137,13 +117,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/riscos/Makefile b/frontends/riscos/Makefile
index af6585c46..265f9289d 100644
--- a/frontends/riscos/Makefile
+++ b/frontends/riscos/Makefile
@@ -22,6 +22,9 @@ RESOURCES = $(TPD_RISCOS)
CFLAGS += -Driscos -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \
-mpoke-function-name -fno-strict-aliasing
+ifeq ($(findstring -elfeabi,$(SUBTARGET)),-elfeabi)
+ CFLAGS += -funwind-tables
+endif
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
ifeq ($(HOST),riscos)
@@ -33,7 +36,7 @@ ifeq ($(HOST),riscos)
LDFLAGS += -LOSLib: -lOSLib32
else
LDFLAGS += -lOSLib32
- ifeq ($(SUBTARGET),-elf)
+ ifeq ($(findstring -elf,$(SUBTARGET)),-elf)
# Go for static builds & AIF binary at the moment:
CFLAGS += -static
LDFLAGS += -static
@@ -111,6 +114,9 @@ MESSAGES_FILTER=ro
$(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Run $(EXETARGET)
$(VQ)echo " MAKERUN: $@"
$(Q)$(MAKERUN) $(EXETARGET) $< $@
+ifeq ($(findstring -elfeabi,$(SUBTARGET)),-elfeabi)
+ $(Q)$(SED) -i -e 's/^|\(RMEnsure ARMEABISupport\)/\1/' -e 's/SharedUnixLibrary 1\.07/SharedUnixLibrary 1.16/g' $@
+endif
$(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Help
$(VQ)echo " CP: $@"
@@ -174,7 +180,7 @@ install-riscos:
package-riscos: netsurf.zip
-netsurf.zip: $(EXETARGET)
+netsurf.zip: $(EXETARGET) $(POSTEXES)
$(eval $@_TMPDIR := $(shell mktemp -d))
$(Q) $(RM) $@
$(Q) cp -rLvp $(FRONTEND_SOURCE_DIR)/appdir $($@_TMPDIR)/!NetSurf
@@ -184,5 +190,5 @@ netsurf.zip: $(EXETARGET)
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/3rdParty $($@_TMPDIR)
$(Q) cp $(FRONTEND_SOURCE_DIR)/distribution/ReadMe $($@_TMPDIR)
$(Q) cp $(FRONTEND_SOURCE_DIR)/distribution/LeesMij $($@_TMPDIR)
- $(Q) cd $($@_TMPDIR) && /opt/netsurf/arm-unknown-riscos/env/bin/zip -9vr\, $(CURDIR)/$@ *
+ $(Q) cd $($@_TMPDIR) && $(ZIP) -9vr\, $(CURDIR)/$@ *
$(Q) $(RM) -rf $($@_TMPDIR)
diff --git a/frontends/riscos/Makefile.tools b/frontends/riscos/Makefile.tools
index 9ea5c29f2..a5b5cca1e 100644
--- a/frontends/riscos/Makefile.tools
+++ b/frontends/riscos/Makefile.tools
@@ -15,21 +15,52 @@ ifeq ($(HOST),riscos)
CXX := g++
EXEEXT :=
PKG_CONFIG :=
+ ZIP := zip
+ SED :=
else
- # Cross-build for RO (either using GCCSDK 3.4.6 - AOF,
- # either using GCCSDK 4 - ELF)
+ # Cross-build for RO
+ # Four options are available:
+ # a. GCCSDK 3.4.6 - AOF (machine: arm-unknown-riscos)
+ # b. GCCSDK 4 - ELF (machine: arm-unknown-riscos)
+ # c. GCCSDK 8+ - ELF, using soft-float EABI (machine: arm-riscos-gnueabi)
+ # d. GCCSDK 8+ - ELF, using hard-float EABI (machine: arm-riscos-gnueabihf)
+ # GCCSDK 3.4.6 and 4 are distinguished by GCCSDK 3.4.6 binary names
+ # not having the machine prefix (e.g. gcc), whereas GCCSDK 4 binaries
+ # do (e.g. arm-unknown-riscos-gcc).
+
+ # Search for the toolchain install locations if we haven't been told
+ # The search order prefers GCCSDK 3.4.6/4 over 8+ and soft-float over hard.
ifeq ($(origin GCCSDK_INSTALL_ENV),undefined)
ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/env),)
GCCSDK_INSTALL_ENV := /opt/netsurf/arm-unknown-riscos/env
else
- GCCSDK_INSTALL_ENV := /home/riscos/env
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabi/env),)
+ GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabi/env
+ else
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/env),)
+ GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabihf/env
+ else
+ # No NetSurf-specific toolchain found: try the "normal" GCCSDK path
+ GCCSDK_INSTALL_ENV := /home/riscos/env
+ endif
+ endif
endif
endif
- ifeq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined)
+
+ ifeq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined)
ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/cross/bin),)
GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-unknown-riscos/cross/bin
else
- GCCSDK_INSTALL_CROSSBIN := /home/riscos/cross/bin
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabi/cross/bin),)
+ GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabi/cross/bin
+ else
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/cross/bin),)
+ GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabihf/cross/bin
+ else
+ # No NetSurf-specific toolchain found: try the "normal" GCCSDK path
+ GCCSDK_INSTALL_CROSSBIN := /home/riscos/cross/bin
+ endif
+ endif
endif
endif
@@ -39,14 +70,31 @@ else
SQUEEZE := $(GCCSDK_INSTALL_CROSSBIN)/squeeze
RUNEXT := ,feb
CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+
+ # Work out what kind of toolchain we're dealing with
ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC)))
+ # GCCSDK 4
SUBTARGET := -elf
EXEEXT := ,e1f
ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif
else
- SUBTARGET := -aof
- EXEEXT := ,ff8
+ ifneq (,$(findstring arm-riscos-gnueabi,$(CC)))
+ # GCCSDK 8+
+ SUBTARGET := -elfeabi
+ ifneq (,$(findstring gnueabihf,$(CC)))
+ SUBTARGET := -elfeabihf
+ endif
+ EXEEXT := ,e1f
+ ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif -e
+ else
+ # GCCSDK 3.4.6
+ SUBTARGET := -aof
+ EXEEXT := ,ff8
+ endif
endif
+
CXX := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++)
- PKG_CONFIG := $(GCCSDK_INSTALL_ENV)/ro-pkg-config
+ PKG_CONFIG = PKG_CONFIG_LIBDIR="$(PREFIX)/lib/pkgconfig:$(GCCSDK_INSTALL_ENV)/lib/pkgconfig:$(GCCSDK_INSTALL_ENV)/share/pkgconfig" pkg-config
+ ZIP := $(GCCSDK_INSTALL_CROSSBIN)/zip
+ SED := sed
endif
diff --git a/frontends/riscos/appdir/!Boot,feb b/frontends/riscos/appdir/!Boot,feb
index ca7a3feec..acaad8192 100644
--- a/frontends/riscos/appdir/!Boot,feb
+++ b/frontends/riscos/appdir/!Boot,feb
@@ -35,10 +35,8 @@ Set File$Type_F91 URI
Set File$Type_FAF HTML
| Application system variables
-|
-| See http://www.iyonix.com/32bit/help.shtml for more details.
If (("<NetSurf$Help>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Help <NetSurf$Dir>.Docs.docs_en
-If (("<NetSurf$Web>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Web "http://www.netsurf-browser.org/"
+If (("<NetSurf$Web>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Web "https://www.netsurf-browser.org/"
If (("<NetSurf$Title>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Title "NetSurf"
If (("<NetSurf$Publisher>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Publisher "The NetSurf Developers"
If (("<NetSurf$Description>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Description "Web browser"
diff --git a/frontends/riscos/appdir/Resources/SearchEngines b/frontends/riscos/appdir/Resources/SearchEngines
index e7fd7cb65..1e4530f06 100644
--- a/frontends/riscos/appdir/Resources/SearchEngines
+++ b/frontends/riscos/appdir/Resources/SearchEngines
@@ -1,22 +1,21 @@
-Google|www.google.com|http://www.google.com/search?q=%s|http://www.google.com/favicon.ico|
-Yahoo|search.yahoo.com|http://search.yahoo.com/search?p=%s|http://www.yahoo.com/favicon.ico|
-Bing|www.bing.com|http://www.bing.com/search?q=%s|http://www.bing.com/favicon.ico|
-Business.com|www.business.com|http://www.business.com/search/rslt_default.asp?query=%s|http://www.business.com/favicon.ico|
-Omgili|www.omgili.com|http://www.omgili.com/AAAAA/%s.html|http://www.omgili.com/favicon.ico|
-BBC News|search.bbc.co.uk|http://search.bbc.co.uk/search?q=%s&tab=ns|http://news.bbc.co.uk/favicon.ico|
-Ubuntu Packages|packages.ubuntu.com|http://packages.ubuntu.com/search?keywords=%s|http://packages.ubuntu.com/favicon.ico|
-Creative Commons|creativecommons.org|http://creativecommons.org/?s=%s|http://creativecommons.org/favicon.ico|
-Ask.com|www.ask.com|http://www.ask.com/web?q=%s|http://www.ask.com/favicon.ico|
-Answers.com|www.answers.com|http://www.answers.com/%s|http://www.answers.com/favicon.ico|
-Dictionary.com|dictionary.reference.com|http://dictionary.reference.com/browse/%s?jss=0|http://dictionary.reference.com/favicon.ico|
-Youtube|www.youtube.com|http://www.youtube.com/results?search_query=%s|http://www.youtube.com/favicon.ico|
-AeroMp3|www.aeromp3.com|http://www.aeromp3.com/search?q=%s|http://www.aeromp3.com/favicon.ico|
-AOL|search.aol.com|http://search.aol.com/aol/search?query=%s|http://www.aol.com/favicon.ico|
-Baidu|www.baidu.com|http://www.baidu.com/s?wd=%s|http://www.baidu.com/favicon.ico|
-Amazon|www.amazon.com|http://www.amazon.com/s/ref=nb_ss_gw?field-keywords=%s|http://www.amazon.com/favicon.ico|
-Ebay|shop.ebay.com|http://shop.ebay.com/items/%s|http://www.ebay.com/favicon.ico|
-IMDB|www.imdb.com|http://www.imdb.com/find?q=%s|http://www.imdb.com/favicon.ico|
-ESPN|search.espn.go.com|http://search.espn.go.com/%s/|http://www.espn.go.com/favicon.ico|
-Wikipedia|en.wikipedia.org|http://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=%s|http://en.wikipedia.org/favicon.ico|
-DuckDuckGo|www.duckduckgo.com|http://www.duckduckgo.com/?q=%s|http://www.duckduckgo.com/favicon.ico|
-Seeks|www.seeks-project.info|https://www.seeks-project.info/search.php/search?q=%s|http://www.seeks-project.info/search.php/public/images/seek_icon_32x32_transparent.png|
+Google|www.google.com|https://www.google.com/search?q=%s|https://www.google.com/favicon.ico|
+Yahoo|search.yahoo.com|https://search.yahoo.com/search?p=%s|https://www.yahoo.com/favicon.ico|
+Bing|www.bing.com|https://www.bing.com/search?q=%s|https://www.bing.com/favicon.ico|
+Business.com|www.business.com|https://www.business.com/search/rslt_default.asp?query=%s|https://www.business.com/favicon.ico|
+Omgili|www.omgili.com|https://www.omgili.com/AAAAA/%s.html|https://www.omgili.com/favicon.ico|
+BBC News|search.bbc.co.uk|https://search.bbc.co.uk/search?q=%s&tab=ns|https://news.bbc.co.uk/favicon.ico|
+Ubuntu Packages|packages.ubuntu.com|https://packages.ubuntu.com/search?keywords=%s|https://packages.ubuntu.com/favicon.ico|
+Creative Commons|creativecommons.org|https://creativecommons.org/?s=%s|https://creativecommons.org/favicon.ico|
+Ask.com|www.ask.com|https://www.ask.com/web?q=%s|https://www.ask.com/favicon.ico|
+Answers.com|www.answers.com|https://www.answers.com/%s|https://www.answers.com/favicon.ico|
+Dictionary.com|dictionary.reference.com|https://dictionary.reference.com/browse/%s?jss=0|https://dictionary.reference.com/favicon.ico|
+Youtube|www.youtube.com|https://www.youtube.com/results?search_query=%s|https://www.youtube.com/favicon.ico|
+AeroMp3|www.aeromp3.com|https://www.aeromp3.com/search?q=%s|https://www.aeromp3.com/favicon.ico|
+AOL|search.aol.com|https://search.aol.com/aol/search?query=%s|https://www.aol.com/favicon.ico|
+Baidu|www.baidu.com|https://www.baidu.com/s?wd=%s|https://www.baidu.com/favicon.ico|
+Amazon|www.amazon.com|https://www.amazon.com/s/ref=nb_ss_gw?field-keywords=%s|https://www.amazon.com/favicon.ico|
+Ebay|shop.ebay.com|https://shop.ebay.com/items/%s|https://www.ebay.com/favicon.ico|
+IMDB|www.imdb.com|https://www.imdb.com/find?q=%s|https://www.imdb.com/favicon.ico|
+ESPN|search.espn.go.com|https://search.espn.go.com/%s/|https://www.espn.go.com/favicon.ico|
+Wikipedia|en.wikipedia.org|https://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=%s|https://en.wikipedia.org/favicon.ico|
+DuckDuckGo|www.duckduckgo.com|https://www.duckduckgo.com/?q=%s|https://www.duckduckgo.com/favicon.ico|
diff --git a/frontends/riscos/appdir/Resources/en/!Help b/frontends/riscos/appdir/Resources/en/!Help
index 977f069d8..bba2b2a72 100644
--- a/frontends/riscos/appdir/Resources/en/!Help
+++ b/frontends/riscos/appdir/Resources/en/!Help
@@ -1,14 +1,14 @@
-NetSurf - Open Source web browser - http://www.netsurf-browser.org/
+NetSurf - Open Source web browser - https://www.netsurf-browser.org/
To view the full documentation, start NetSurf and choose "Help..." from the
icon bar menu.
This is a development build of NetSurf. In case of problems, please check
-for a newer development build at http://www.netsurf-browser.org/
+for a newer development build at https://www.netsurf-browser.org/
Please report any unexpected behaviour on the NetSurf bug tracker.
-This may be found at http://bugs.netsurf-browser.org/
+This may be found at https://bugs.netsurf-browser.org/
-Alternatively, the developers are often available on Freenode in the
+Alternatively, the developers are often available on libera.chat in the
channel #netsurf.
diff --git a/frontends/riscos/appdir/Resources/nl/!Help b/frontends/riscos/appdir/Resources/nl/!Help
index 4eca563bc..8a68e94f9 100644
--- a/frontends/riscos/appdir/Resources/nl/!Help
+++ b/frontends/riscos/appdir/Resources/nl/!Help
@@ -1,15 +1,15 @@
-NetSurf - Webbrowser (met open broncode) - http://www.netsurf-browser.org/
+NetSurf - Webbrowser (met open broncode) - https://www.netsurf-browser.org/
Om alle documentatie te kunnen raadplegen: start NetSurf en kies "Help..."
vanuit het symbolenbalkmenu.
Dit is een ontwikkelversie van NetSurf. Bij problemen: kijk eerst of er een
-nieuwere versie is op http://www.netsurf-browser.org/
+nieuwere versie is op https://www.netsurf-browser.org/
Gelieve ook elk onverwacht gedrag van NetSurf, in het Engels te melden via
-onze 'bug tracker' op http://bugs.netsurf-browser.org/
+onze 'bug tracker' op https://bugs.netsurf-browser.org/
-Een alternatief is Freenode op het kanaal #netsurf waar de ontwikkelaars
+Een alternatief is libera.chat op het kanaal #netsurf waar de ontwikkelaars
vaak bereikbaar zijn.
diff --git a/frontends/riscos/bitmap.c b/frontends/riscos/bitmap.c
index d554d54b4..97dce6acc 100644
--- a/frontends/riscos/bitmap.c
+++ b/frontends/riscos/bitmap.c
@@ -44,7 +44,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/plotters.h"
-#include "netsurf/bitmap.h"
#include "netsurf/content.h"
#include "riscos/gui.h"
@@ -91,7 +90,7 @@ static bool bitmap_initialise(struct bitmap *bitmap)
assert(!bitmap->sprite_area);
area_size = 16 + 44 + bitmap->width * bitmap->height * 4;
- if (bitmap->state & BITMAP_CLEAR_MEMORY)
+ if (bitmap->clear)
bitmap->sprite_area = calloc(1, area_size);
else
bitmap->sprite_area = malloc(area_size);
@@ -123,7 +122,7 @@ static bool bitmap_initialise(struct bitmap *bitmap)
/* exported interface documented in riscos/bitmap.h */
-void *riscos_bitmap_create(int width, int height, unsigned int state)
+void *riscos_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
@@ -135,7 +134,8 @@ void *riscos_bitmap_create(int width, int height, unsigned int state)
return NULL;
bitmap->width = width;
bitmap->height = height;
- bitmap->state = state;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+ bitmap->clear = (flags & BITMAP_CLEAR) == BITMAP_CLEAR;
return bitmap;
}
@@ -172,10 +172,7 @@ static void bitmap_set_opaque(void *vbitmap, bool opaque)
struct bitmap *bitmap = (struct bitmap *) vbitmap;
assert(bitmap);
- if (opaque)
- bitmap->state |= BITMAP_OPAQUE;
- else
- bitmap->state &= ~BITMAP_OPAQUE;
+ bitmap->opaque = opaque;
}
@@ -192,61 +189,12 @@ static size_t bitmap_get_rowstride(void *vbitmap)
}
-/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *) vbitmap;
- unsigned char *sprite;
- unsigned int width, height, size;
- osspriteop_header *sprite_header;
- unsigned *p, *ep;
-
- assert(bitmap);
-
- sprite = riscos_bitmap_get_buffer(bitmap);
- if (!sprite)
- return false;
-
- width = bitmap_get_rowstride(bitmap);
-
- sprite_header = (osspriteop_header *) (bitmap->sprite_area + 1);
-
- height = (sprite_header->height + 1);
-
- size = width * height;
-
- p = (void *) sprite;
-
- ep = (void *) (sprite + (size & ~31));
- while (p < ep) {
- /* \todo prefetch(p, 128)? */
- if (((p[0] & p[1] & p[2] & p[3] & p[4] & p[5] & p[6] & p[7])
- & 0xff000000U) != 0xff000000U)
- return false;
- p += 8;
- }
-
- ep = (void *) (sprite + size);
- while (p < ep) {
- if ((*p & 0xff000000U) != 0xff000000U) return false;
- p++;
- }
-
- return true;
-}
-
-
/* exported interface documented in riscos/bitmap.h */
bool riscos_bitmap_get_opaque(void *vbitmap)
{
struct bitmap *bitmap = (struct bitmap *) vbitmap;
assert(bitmap);
- return (bitmap->state & BITMAP_OPAQUE);
+ return bitmap->opaque;
}
@@ -449,8 +397,7 @@ bool riscos_bitmap_save(void *vbitmap, const char *path, unsigned flags)
*/
static void bitmap_modified(void *vbitmap)
{
- struct bitmap *bitmap = (struct bitmap *) vbitmap;
- bitmap->state |= BITMAP_MODIFIED;
+ (void)(vbitmap);
}
@@ -480,20 +427,6 @@ static int bitmap_get_height(void *vbitmap)
}
-/**
- * Find the bytes per pixel of a bitmap
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixel
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- return 4;
-}
-
-
/* exported interface documented in riscos/bitmap.h */
void riscos_bitmap_overlay_sprite(struct bitmap *bitmap,
const osspriteop_header *s)
@@ -874,13 +807,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = riscos_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = riscos_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = riscos_bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = riscos_bitmap_save,
.modified = bitmap_modified,
.render = riscos_bitmap_render,
};
diff --git a/frontends/riscos/bitmap.h b/frontends/riscos/bitmap.h
index f66ebb317..628ec4b7a 100644
--- a/frontends/riscos/bitmap.h
+++ b/frontends/riscos/bitmap.h
@@ -19,6 +19,8 @@
#ifndef _NETSURF_RISCOS_BITMAP_H_
#define _NETSURF_RISCOS_BITMAP_H_
+#include "netsurf/bitmap.h"
+
struct osspriteop_area;
struct osspriteop_header;
struct hlcache_handle;
@@ -37,7 +39,8 @@ struct bitmap {
int width; /**< width of bitmap */
int height; /**< height of bitmap */
- unsigned int state; /**< The bitmap attributes (opaque/dirty etc.) */
+ bool opaque; /**< Whether the bitmap is opaque. */
+ bool clear; /**< Whether the bitmap should be initialised to zeros. */
struct osspriteop_area *sprite_area; /**< Uncompressed data, or NULL */
};
@@ -71,11 +74,11 @@ void riscos_bitmap_overlay_sprite(struct bitmap *bitmap, const struct osspriteop
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state the state to create the bitmap in.
+ * \param height height of image in pixels
+ * \param flags flags for bitmap creation.
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *riscos_bitmap_create(int width, int height, unsigned int state);
+void *riscos_bitmap_create(int width, int height, enum gui_bitmap_flags flags);
/**
* Free a bitmap.
diff --git a/frontends/riscos/configure/con_content.c b/frontends/riscos/configure/con_content.c
index 50bbd15ef..bdf147bd4 100644
--- a/frontends/riscos/configure/con_content.c
+++ b/frontends/riscos/configure/con_content.c
@@ -30,7 +30,7 @@
#define CONTENT_BLOCK_ADVERTISEMENTS 2
#define CONTENT_BLOCK_POPUPS 3
-#define CONTENT_NO_PLUGINS 4
+#define CONTENT_BLOCK_CSS 4
#define CONTENT_TARGET_BLANK 7
#define CONTENT_DEFAULT_BUTTON 8
#define CONTENT_CANCEL_BUTTON 9
@@ -47,8 +47,8 @@ bool ro_gui_options_content_initialise(wimp_w w)
nsoption_bool(block_advertisements));
ro_gui_set_icon_selected_state(w, CONTENT_BLOCK_POPUPS,
nsoption_bool(block_popups));
- ro_gui_set_icon_selected_state(w, CONTENT_NO_PLUGINS,
- nsoption_bool(no_plugins));
+ ro_gui_set_icon_selected_state(w, CONTENT_BLOCK_CSS,
+ !nsoption_bool(author_level_css));
ro_gui_set_icon_selected_state(w, CONTENT_TARGET_BLANK,
nsoption_bool(target_blank));
ro_gui_set_icon_selected_state(w, CONTENT_NO_JAVASCRIPT,
@@ -57,7 +57,7 @@ bool ro_gui_options_content_initialise(wimp_w w)
/* initialise all functions for a newly created window */
ro_gui_wimp_event_register_checkbox(w, CONTENT_BLOCK_ADVERTISEMENTS);
ro_gui_wimp_event_register_checkbox(w, CONTENT_BLOCK_POPUPS);
- ro_gui_wimp_event_register_checkbox(w, CONTENT_NO_PLUGINS);
+ ro_gui_wimp_event_register_checkbox(w, CONTENT_BLOCK_CSS);
ro_gui_wimp_event_register_checkbox(w, CONTENT_TARGET_BLANK);
ro_gui_wimp_event_register_checkbox(w, CONTENT_NO_JAVASCRIPT);
ro_gui_wimp_event_register_button(w, CONTENT_DEFAULT_BUTTON,
@@ -78,7 +78,7 @@ void ro_gui_options_content_default(wimp_pointer *pointer)
false);
ro_gui_set_icon_selected_state(pointer->w, CONTENT_BLOCK_POPUPS,
false);
- ro_gui_set_icon_selected_state(pointer->w, CONTENT_NO_PLUGINS,
+ ro_gui_set_icon_selected_state(pointer->w, CONTENT_BLOCK_CSS,
false);
ro_gui_set_icon_selected_state(pointer->w, CONTENT_TARGET_BLANK,
true);
@@ -93,8 +93,8 @@ bool ro_gui_options_content_ok(wimp_w w)
nsoption_set_bool(block_popups,
ro_gui_get_icon_selected_state(w, CONTENT_BLOCK_POPUPS));
- nsoption_set_bool(no_plugins,
- ro_gui_get_icon_selected_state(w, CONTENT_NO_PLUGINS));
+ nsoption_set_bool(author_level_css,
+ !ro_gui_get_icon_selected_state(w, CONTENT_BLOCK_CSS));
nsoption_set_bool(target_blank,
ro_gui_get_icon_selected_state(w, CONTENT_TARGET_BLANK));
diff --git a/frontends/riscos/configure/con_image.c b/frontends/riscos/configure/con_image.c
index 23c663aff..d81dc5c3b 100644
--- a/frontends/riscos/configure/con_image.c
+++ b/frontends/riscos/configure/con_image.c
@@ -23,6 +23,7 @@
#include "utils/nsoption.h"
#include "utils/log.h"
+#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/configure/configure.h"
@@ -209,6 +210,7 @@ bool ro_gui_options_image_click(wimp_pointer *pointer)
data.indirected_text.text, true);
ro_gui_set_icon_selected_state(pointer->w,
IMAGE_DISABLE_ANIMATION, false);
+ fallthrough;
case IMAGE_DISABLE_ANIMATION:
ro_gui_options_update_shading(pointer->w);
break;
diff --git a/frontends/riscos/content-handlers/artworks.c b/frontends/riscos/content-handlers/artworks.c
index 0227603d9..c107ec6b4 100644
--- a/frontends/riscos/content-handlers/artworks.c
+++ b/frontends/riscos/content-handlers/artworks.c
@@ -93,7 +93,7 @@ struct awinfo_block {
/* Assembler routines for interfacing with the ArtworksRenderer module */
extern os_error *awrender_init(const char **doc,
- unsigned long *doc_size,
+ size_t *doc_size,
void *routine,
void *workspace);
diff --git a/frontends/riscos/content-handlers/awrender.s b/frontends/riscos/content-handlers/awrender.s
index 5bcafe520..fe37f66fb 100644
--- a/frontends/riscos/content-handlers/awrender.s
+++ b/frontends/riscos/content-handlers/awrender.s
@@ -209,12 +209,18 @@ errblk % 256
@ os_error *awrender_init(byte **doc, size_t *doc_size, void *init_routine, void *init_workspace);
.global awrender_init
-awrender_init: MOV ip,sp
+awrender_init:
+#ifndef __ARM_EABI__
+ MOV ip,sp
STMFD sp!,{a1,a2,v1,v2,fp,ip,lr,pc}
SUB fp,ip,#4
SUB ip,sp,#512
CMP ip,sl
BLMI __rt_stkovf_split_big
+#else
+ STMFD sp!,{a1,a2,v1,v2,fp,lr}
+ ADD fp,sp,#4*4
+#endif
LDR v2,=aw_temp
LDR a1,[a1]
@@ -235,14 +241,18 @@ awrender_init: MOV ip,sp
@ return updated block ptr & size to caller
- LDR a2,[fp,#-28]
- LDR a3,[fp,#-24]
+ LDR a2,[sp],#4
+ LDR a3,[sp],#4
LDR ip,[v2,#aw_rsz_block]
LDR lr,[v2,#aw_rsz_size]
STR ip,[a2]
STR lr,[a3]
- LDMEA fp,{v1,v2,fp,sp,pc}
+#ifndef __ARM_EABI__
+ LDMDB fp,{v1,v2,fp,sp,pc}
+#else
+ LDMIA sp!,{v1,v2,fp,pc}
+#endif
@ os_error *awrender_render(const char *doc,
@@ -258,37 +268,46 @@ awrender_init: MOV ip,sp
@ void *workspace);
.global awrender_render
-awrender_render: MOV ip,sp
- STMFD sp!,{v1-v4,fp,ip,lr,pc}
+awrender_render:
+#ifndef __ARM_EABI__
+ MOV ip,sp
+ STMFD sp!,{v1-v6,fp,ip,lr,pc}
SUB fp,ip,#4
SUB ip,sp,#512
CMP ip,sl
BLMI __rt_stkovf_split_big
+ ADD ip,fp,#4 @ ip -> stacked args
+#else
+ MOV ip,sp @ ip -> stacked args
+ STMFD sp!,{v1-v6,fp,lr}
+ ADD fp,sp,#6*4
+#endif
- LDR R12,[fp,#20]
LDR R14,=aw_temp
- LDR R5,[fp,#4]
- LDR R6,[fp,#12]
+ LDR R5,[ip,#0] @ rsz_block
+ LDR R6,[ip,#8] @ wysiwyg_setting
LDR R4,[R5] @ resizable block
- LDR R7,[fp,#16]
+ LDR R7,[ip,#12] @ output_dest
+ LDR R8,[ip,#16] @ doc_size
+ LDR R9,[ip,#4] @ rsz_size
STR R4,[R14,#aw_rsz_block]
STR R0,[R14,#aw_fixed_block] @ document ptr
- STR R12,[R14,#aw_fixed_size] @ document size
- LDR R12,[fp,#8]
+ STR R8,[R14,#aw_fixed_size] @ document size
STR R5,[sp,#-4]! @ ptr to receive block
- STR R12,[sp,#-4]! @ ptr to receive size
+ STR R9,[sp,#-4]! @ ptr to receive size
- LDR R12,[R12]
+ LDR R9,[R9]
ADR R5,aw_callback
- STR R12,[R14,#aw_rsz_size]
+ STR R9,[R14,#aw_rsz_size]
STR sl,[R14,#aw_sl]
STR fp,[R14,#aw_fp]
- LDR R12,[fp,#28]
+ LDR R8,[ip,#20] @ routine
+ LDR R12,[ip,#24] @ workspace
MOV lr,pc
- LDR pc,[fp,#24]
+ MOV pc,R8
MOVVC a1,#0
@ return updated block ptr & size to caller
@@ -301,7 +320,11 @@ awrender_render: MOV ip,sp
STR R5,[R12]
STR R6,[R4]
- LDMEA fp,{v1-v4,fp,sp,pc}
+#ifndef __ARM_EABI__
+ LDMDB fp,{v1-v6,fp,sp,pc}
+#else
+ LDMIA sp!,{v1-v6,fp,pc}
+#endif
@ Callback routine for block resizing
@@ -340,11 +363,18 @@ aw_callback: TEQ R11,#3
CMP R1,R2
BLS aw_read
- STMFD R13!,{R1,R10-R12,R14}
+ STMFD R13!,{R1,R4,R10-R12,R14}
+#ifdef __ARM_EABI__
+ MOV R4,R13 @ save original sp
+ BIC R13,R13,#7 @ align to multiple of 8
+#endif
LDR sl,[R11,#aw_sl]
LDR fp,[R11,#aw_fp]
BL realloc
- LDMFD R13!,{R1,R10-R12,R14}
+#ifdef __ARM_EABI__
+ MOV R13,R4 @ restore unaligned sp
+#endif
+ LDMFD R13!,{R1,R4,R10-R12,R14}
CMP R0,#0 @ did it work?
BEQ aw_nomem
@@ -359,7 +389,11 @@ aw_read: @ return details of fixed block
SUBS R11,R11,R11 @ clear V
MOV PC,R14
-aw_nomem: STMFD R13!,{R10,R12,R14}
+aw_nomem: STMFD R13!,{R4,R10,R12,R14}
+#ifdef __ARM_EABI__
+ MOV R4,R13 @ save original sp
+ BIC R13,R13,#7 @ align to multiple of 8
+#endif
LDR sl,[R11,#aw_sl]
LDR fp,[R11,#aw_fp]
ADR R0,tok_nomem
@@ -370,13 +404,17 @@ aw_nomem: STMFD R13!,{R10,R12,R14}
SUB R0,R0,#4 @ error number already 0
MOV R11,#0 @ restore reason code
CMP PC,#1<<31 @ set V
- LDMFD R13!,{R10,R12,PC}
+#ifdef __ARM_EABI__
+ MOV R13,R4 @ restore original sp
+#endif
+ LDMFD R13!,{R4,R10,R12,PC}
tok_nomem: .asciz "NoMemory"
.align
.bss
+ .align
aw_temp: .space sizeof_aw
.type aw_temp, %object
.size aw_temp, . - aw_temp
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb
index 7c0c46241..b2cdbf102 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb
@@ -2,4 +2,4 @@
|
Set Unicode$Dir <Obey$Dir>
SetMacro Unicode$Path <Unicode$Dir>.,Resources:$.Resources.Unicode.
-IconSprites Unicode:!Sprites
+IconSprites Unicode:Themes.!Sprites
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help
index 8c0488185..a24701e02 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help
@@ -1 +1,5 @@
-This application contains resources for Unicode support in applications.
+ !Unicode
+ ========
+
+This application contains resources for Unicode support in
+applications.
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb
index bd70e96ac..40999ded5 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb
@@ -2,4 +2,4 @@
|
Set Unicode$Dir <Obey$Dir>
SetMacro Unicode$Path <Unicode$Dir>.,Resources:$.Resources.Unicode.
-IconSprites Unicode:!Sprites
+IconSprites Unicode:Themes.!Sprites
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1,ffd
index bdf5d3b67..bdf5d3b67 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro,ffd
index 5ab69ff2e..5ab69ff2e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic,ffd
index 670fd6cdc..670fd6cdc 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman,ffd
index 254579e2c..254579e2c 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian,ffd
index a220587ba..a220587ba 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive,ffd
index c659cef19..c659cef19 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646],ffd
index cd92b5486..cd92b5486 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429],ffd
index 74002a168..74002a168 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old],ffd
index 00e2d1096..00e2d1096 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB],ffd
index c293f93d6..c293f93d6 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV],ffd
index e0b4bcadb..e0b4bcadb 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe],ffd
index 7d4646905..7d4646905 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE],ffd
index a6b091a22..a6b091a22 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE],ffd
index 9bd24ab29..9bd24ab29 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K],ffd
index 20ce8d498..20ce8d498 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K],ffd
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R],ffd
index 21d2a479b..21d2a479b 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE],ffd
index a2e284e1b..a2e284e1b 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT],ffd
index e076e2517..e076e2517 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988],ffd
index 3b43719ce..3b43719ce 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt],ffd
index 73ce49e17..73ce49e17 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT],ffd
index f1ae81962..f1ae81962 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES],ffd
index 674fc2d70..674fc2d70 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO],ffd
index fc92892ee..fc92892ee 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR],ffd
index 8dd604679..8dd604679 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU],ffd
index 65300b2c5..65300b2c5 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic],ffd
index c47689914..c47689914 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937],ffd
index 93453f5de..93453f5de 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr],ffd
index 9740e784e..9740e784e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226],ffd
index a677dfc3d..a677dfc3d 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312],ffd
index 679608ad2..679608ad2 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208],ffd
index 532b1f4f3..532b1f4f3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001],ffd
index 36186c864..36186c864 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212],ffd
index f5343a30e..f5343a30e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1],ffd
index da07f45d3..da07f45d3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2],ffd
index 44ee24c91..44ee24c91 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3],ffd
index a8464e5aa..a8464e5aa 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4],ffd
index a8f3e3270..a8f3e3270 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5],ffd
index 535b0f4b5..535b0f4b5 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6],ffd
index 7bfb2b1d4..7bfb2b1d4 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7],ffd
index be14c7279..be14c7279 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7],ffd
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1],ffd
index 97e6b1106..97e6b1106 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2],ffd
index b753c40fe..b753c40fe 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3],ffd
index 88d477886..88d477886 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4],ffd
index a40662d45..a40662d45 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek],ffd
index c42397388..c42397388 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic],ffd
index 4507f467a..4507f467a 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew],ffd
index 70f39cca6..70f39cca6 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill],ffd
index 8ff0115e4..8ff0115e4 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5],ffd
index 6381e607e..6381e607e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup],ffd
index a320c7fe8..a320c7fe8 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937],ffd
index dff6ccba4..dff6ccba4 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai],ffd
index d74377759..d74377759 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6],ffd
index 4e3e4f313..4e3e4f313 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami],ffd
index 4dfd9188c..4dfd9188c 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7],ffd
index 256a88e76..256a88e76 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh],ffd
index b5e00509f..b5e00509f 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami],ffd
index 15734c036..15734c036 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew],ffd
index a6593b071..a6593b071 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8],ffd
index c15713e82..c15713e82 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9],ffd
index 5bf449d58..5bf449d58 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10],ffd
index e8ba925d3..e8ba925d3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R,ffd
index 8063cd4bc..8063cd4bc 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250,ffd
index 7a0d35ceb..7a0d35ceb 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251,ffd
index 3d6009cab..3d6009cab 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252,ffd
index 6d3bf293d..6d3bf293d 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253,ffd
index 50a48be13..50a48be13 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254,ffd
index 45ecfe907..45ecfe907 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256,ffd
index 7fc95a92f..7fc95a92f 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866,ffd
index cd214d24b..cd214d24b 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874,ffd
index 26a6fc8c3..26a6fc8c3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932,ffd
index 2c0c111f9..2c0c111f9 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames
new file mode 100644
index 000000000..3600913be
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames
@@ -0,0 +1,14016 @@
+# > Unicode:Files.CharNames
+# Mapping of code points to character names
+#
+# Lines starting with a '#' are comments, blank lines are ignored.
+#
+# Copyright (c) 2002 Unicode, Inc. All rights reserved.
+# Based on http://www.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.txt
+#
+0000-001F:\ê
+0020:SPACE
+0021:EXCLAM\”\¥
+0022:QUOT\”\¥
+0023:\­SIGN
+0024:DOLLAR\‚
+0025:PERCENT\‚
+0026:AMPERSAND
+0027:APOSTROPHE
+0028:\‰ \ÑS
+0029:\ù\ÑS
+002A:ASTERISK
+002B:PLUS\‚
+002C:COMMA
+002D:HYPHEN-MINUS
+002E:FULL STOP
+002F:SOLIDUS
+0030:DIGIT ZERO
+0031:DIGIT ONE
+0032:DIGIT TWO
+0033:DIGIT THREE
+0034:DIGIT FOUR
+0035:DIGIT FIVE
+0036:DIGIT SIX
+0037:DIGIT SEVEN
+0038:DIGIT E\¼
+0039:DIGIT NINE
+003A:COLON
+003B:SEMICOLON
+003C:\µ\‚
+003D:EQUALS\‚
+003E:\’\‚
+003F:QUESTION\¥
+0040:COMMERCIAL AT
+0041:\PA
+0042:\PB
+0043:\PC
+0044:\PD
+0045:\PE
+0046:\PF
+0047:\PG
+0048:\PH
+0049:\PI
+004A:\PJ
+004B:\PK
+004C:\PL
+004D:\PM
+004E:\PN
+004F:\PO
+0050:\PP
+0051:\PQ
+0052:\PR
+0053:\PS
+0054:\PT
+0055:\PU
+0056:\PV
+0057:\PW
+0058:\PX
+0059:\PY
+005A:\PZ
+005B:\‰ \r\–
+005C:REVERSE SOLIDUS
+005D:\ù\r\–
+005E:CIRCUMFLEX\×
+005F:LOW \ä
+0060:GRAVE\×
+0061:\LA
+0062:\LB
+0063:\LC
+0064:\LD
+0065:\LE
+0066:\LF
+0067:\LG
+0068:\LH
+0069:\LI
+006A:\LJ
+006B:\LK
+006C:\LL
+006D:\LM
+006E:\LN
+006F:\LO
+0070:\LP
+0071:\LQ
+0072:\LR
+0073:\LS
+0074:\LT
+0075:\LU
+0076:\LV
+0077:\LW
+0078:\LX
+0079:\LY
+007A:\LZ
+007B:\‰ CURLY \–
+007C:\€ \ä
+007D:\ùCURLY \–
+007E:\æ
+007F:\ê
+0080:\ê
+0081:\ê
+0082:\ê
+0083:\ê
+0084:\ê
+0085:\ê
+0086:\ê
+0087:\ê
+0088:\ê
+0089:\ê
+008A:\ê
+008B:\ê
+008C:\ê
+008D:\ê
+008E:\ê
+008F:\ê
+0090:\ê
+0091:\ê
+0092:\ê
+0093:\ê
+0094:\ê
+0095:\ê
+0096:\ê
+0097:\ê
+0098:\ê
+0099:\ê
+009A:\ê
+009B:\ê
+009C:\ê
+009D:\ê
+009E:\ê
+009F:\ê
+00A0:NO-BREAK SPACE
+00A1:INVERT\ÂEXCLAM\”\¥
+00A2:CENT\‚
+00A3:POUND\‚
+00A4:CURRENCY\‚
+00A5:YEN\‚
+00A6:BROKEN\ì
+00A7:SECTION\‚
+00A8:DIAERESIS
+00A9:COPY\ùSIGN
+00AA:FEMININE ORDINAL INDICATOR
+00AB:\‰-\Ä\0 ANGLE QUOT\”\¥
+00AC:NOT\‚
+00AD:SOFT HYPHEN
+00AE:REGISTERED\‚
+00AF:\å
+00B0:DEGREE\‚
+00B1:PLUS-MINUS\‚
+00B2:SUPER\Ž TWO
+00B3:SUPER\Ž THREE
+00B4:\Ü\×
+00B5:MICRO\‚
+00B6:PILCROW\‚
+00B7:MIDDLE DOT
+00B8:CEDILLA
+00B9:SUPER\Ž ONE
+00BA:MASCU\ä ORDINAL INDICATOR
+00BB:\q-\Ä\0 ANGLE QUOT\”\¥
+00BC:\úONE QUARTER
+00BD:\úONE HALF
+00BE:\úTHREE QUARTERS
+00BF:INVERT\ÂQUESTION\¥
+00C0:\PA\HGRAVE
+00C1:\PA\H\Ü
+00C2:\PA\ˆ
+00C3:\PA\H\æ
+00C4:\PA\ž
+00C5:\PA\HR\ô\p
+00C6:\PAE
+00C7:\PC\HCEDILLA
+00C8:\PE\HGRAVE
+00C9:\PE\H\Ü
+00CA:\PE\ˆ
+00CB:\PE\ž
+00CC:\PI\HGRAVE
+00CD:\PI\H\Ü
+00CE:\PI\ˆ
+00CF:\PI\ž
+00D0:\PETH
+00D1:\PN\H\æ
+00D2:\PO\HGRAVE
+00D3:\PO\H\Ü
+00D4:\PO\ˆ
+00D5:\PO\H\æ
+00D6:\PO\ž
+00D7:MULTIPLIC\”\‚
+00D8:\PO\H\Á
+00D9:\PU\HGRAVE
+00DA:\PU\H\Ü
+00DB:\PU\ˆ
+00DC:\PU\ž
+00DD:\PY\H\Ü
+00DE:\PTHORN
+00DF:\LSHARP S
+00E0:\LA\HGRAVE
+00E1:\LA\H\Ü
+00E2:\LA\ˆ
+00E3:\LA\H\æ
+00E4:\LA\ž
+00E5:\LA\HR\ô\p
+00E6:\LAE
+00E7:\LC\HCEDILLA
+00E8:\LE\HGRAVE
+00E9:\LE\H\Ü
+00EA:\LE\ˆ
+00EB:\LE\ž
+00EC:\LI\HGRAVE
+00ED:\LI\H\Ü
+00EE:\LI\ˆ
+00EF:\LI\ž
+00F0:\LETH
+00F1:\LN\H\æ
+00F2:\LO\HGRAVE
+00F3:\LO\H\Ü
+00F4:\LO\ˆ
+00F5:\LO\H\æ
+00F6:\LO\ž
+00F7:DIVISION\‚
+00F8:\LO\H\Á
+00F9:\LU\HGRAVE
+00FA:\LU\H\Ü
+00FB:\LU\ˆ
+00FC:\LU\ž
+00FD:\LY\H\Ü
+00FE:\LTHORN
+00FF:\LY\ž
+0100:\PA\H\å
+0101:\LA\H\å
+0102:\PA\HBREVE
+0103:\LA\HBREVE
+0104:\PA\HOGONEK
+0105:\LA\HOGONEK
+0106:\PC\H\Ü
+0107:\LC\H\Ü
+0108:\PC\ˆ
+0109:\LC\ˆ
+010A:\PC\³\p
+010B:\LC\³\p
+010C:\PC\û
+010D:\LC\û
+010E:\PD\û
+010F:\LD\û
+0110:\PD\H\Á
+0111:\LD\H\Á
+0112:\PE\H\å
+0113:\LE\H\å
+0114:\PE\HBREVE
+0115:\LE\HBREVE
+0116:\PE\³\p
+0117:\LE\³\p
+0118:\PE\HOGONEK
+0119:\LE\HOGONEK
+011A:\PE\û
+011B:\LE\û
+011C:\PG\ˆ
+011D:\LG\ˆ
+011E:\PG\HBREVE
+011F:\LG\HBREVE
+0120:\PG\³\p
+0121:\LG\³\p
+0122:\PG\HCEDILLA
+0123:\LG\HCEDILLA
+0124:\PH\ˆ
+0125:\LH\ˆ
+0126:\PH\H\Á
+0127:\LH\H\Á
+0128:\PI\H\æ
+0129:\LI\H\æ
+012A:\PI\H\å
+012B:\LI\H\å
+012C:\PI\HBREVE
+012D:\LI\HBREVE
+012E:\PI\HOGONEK
+012F:\LI\HOGONEK
+0130:\PI\³\p
+0131:\LDOTLESS I
+0132:LATIN\Ò\òIJ
+0133:LATIN\Ç\òIJ
+0134:\PJ\ˆ
+0135:\LJ\ˆ
+0136:\PK\HCEDILLA
+0137:\LK\HCEDILLA
+0138:\LKRA
+0139:\PL\H\Ü
+013A:\LL\H\Ü
+013B:\PL\HCEDILLA
+013C:\LL\HCEDILLA
+013D:\PL\û
+013E:\LL\û
+013F:\PL\HMIDDLE DOT
+0140:\LL\HMIDDLE DOT
+0141:\PL\H\Á
+0142:\LL\H\Á
+0143:\PN\H\Ü
+0144:\LN\H\Ü
+0145:\PN\HCEDILLA
+0146:\LN\HCEDILLA
+0147:\PN\û
+0148:\LN\û
+0149:\LN PRECED\ÂBY APOSTROPHE
+014A:\PENG
+014B:\LENG
+014C:\PO\H\å
+014D:\LO\H\å
+014E:\PO\HBREVE
+014F:\LO\HBREVE
+0150:\PO\H\0 \Ü
+0151:\LO\H\0 \Ü
+0152:LATIN\Ò\òOE
+0153:LATIN\Ç\òOE
+0154:\PR\H\Ü
+0155:\LR\H\Ü
+0156:\PR\HCEDILLA
+0157:\LR\HCEDILLA
+0158:\PR\û
+0159:\LR\û
+015A:\PS\H\Ü
+015B:\LS\H\Ü
+015C:\PS\ˆ
+015D:\LS\ˆ
+015E:\PS\HCEDILLA
+015F:\LS\HCEDILLA
+0160:\PS\û
+0161:\LS\û
+0162:\PT\HCEDILLA
+0163:\LT\HCEDILLA
+0164:\PT\û
+0165:\LT\û
+0166:\PT\H\Á
+0167:\LT\H\Á
+0168:\PU\H\æ
+0169:\LU\H\æ
+016A:\PU\H\å
+016B:\LU\H\å
+016C:\PU\HBREVE
+016D:\LU\HBREVE
+016E:\PU\HR\ô\p
+016F:\LU\HR\ô\p
+0170:\PU\H\0 \Ü
+0171:\LU\H\0 \Ü
+0172:\PU\HOGONEK
+0173:\LU\HOGONEK
+0174:\PW\ˆ
+0175:\LW\ˆ
+0176:\PY\ˆ
+0177:\LY\ˆ
+0178:\PY\ž
+0179:\PZ\H\Ü
+017A:\LZ\H\Ü
+017B:\PZ\³\p
+017C:\LZ\³\p
+017D:\PZ\û
+017E:\LZ\û
+017F:\LLONG S
+0180:\LB\H\Á
+0181:\PB\í
+0182:\PB\HTOPBAR
+0183:\LB\HTOPBAR
+0184:\PTONE SIX
+0185:\LTONE SIX
+0186:\POPEN O
+0187:\PC\í
+0188:\LC\í
+0189:\PAFRICAN D
+018A:\PD\í
+018B:\PD\HTOPBAR
+018C:\LD\HTOPBAR
+018D:\LTURN\ÂDELTA
+018E:\P\öE
+018F:\PSCHWA
+0190:\POPEN E
+0191:\PF\í
+0192:\LF\í
+0193:\PG\í
+0194:\PGAMMA
+0195:\LHV
+0196:\PIOTA
+0197:\PI\H\Á
+0198:\PK\í
+0199:\LK\í
+019A:\LL\HBAR
+019B:\LLAMBDA\H\Á
+019C:\PTURN\ÂM
+019D:\PN\H\‰ HOOK
+019E:\LN\HLONG \ùLEG
+019F:\PO\HMIDDLE \æ
+01A0:\PO\HHORN
+01A1:\LO\HHORN
+01A2:\POI
+01A3:\LOI
+01A4:\PP\í
+01A5:\LP\í
+01A6:LATIN\@YR
+01A7:\PTONE TWO
+01A8:\LTONE TWO
+01A9:\PESH
+01AA:LATIN\@\öESH LOOP
+01AB:\LT\HPALATAL HOOK
+01AC:\PT\í
+01AD:\LT\í
+01AE:\PT\HRETROFLEX HOOK
+01AF:\PU\HHORN
+01B0:\LU\HHORN
+01B1:\PU\É
+01B2:\PV\í
+01B3:\PY\í
+01B4:\LY\í
+01B5:\PZ\H\Á
+01B6:\LZ\H\Á
+01B7:\PEZH
+01B8:\PEZH REVERSED
+01B9:\LEZH REVERSED
+01BA:\LEZH\HTAIL
+01BB:LATIN\@TWO\H\Á
+01BC:\PTONE FIVE
+01BD:\LTONE FIVE
+01BE:LATIN\@INVERT\ÂGLOTTAL STOP\H\Á
+01BF:LATIN\@WYNN
+01C0:LATIN\@DENTAL CLICK
+01C1:LATIN\@LATERAL CLICK
+01C2:LATIN\@ALVEOLAR CLICK
+01C3:LATIN\@RETROFLEX CLICK
+01C4:\PDZ\û
+01C5:\PD\HSMALL\@Z\û
+01C6:\LDZ\û
+01C7:\PLJ
+01C8:\PL\HSMALL\@J
+01C9:\LLJ
+01CA:\PNJ
+01CB:\PN\HSMALL\@J
+01CC:\LNJ
+01CD:\PA\û
+01CE:\LA\û
+01CF:\PI\û
+01D0:\LI\û
+01D1:\PO\û
+01D2:\LO\û
+01D3:\PU\û
+01D4:\LU\û
+01D5:\PU\ž\i\å
+01D6:\LU\ž\i\å
+01D7:\PU\ž\i\Ü
+01D8:\LU\ž\i\Ü
+01D9:\PU\ž\iCARON
+01DA:\LU\ž\iCARON
+01DB:\PU\ž\iGRAVE
+01DC:\LU\ž\iGRAVE
+01DD:\LTURN\ÂE
+01DE:\PA\ž\i\å
+01DF:\LA\ž\i\å
+01E0:\PA\³\p\i\å
+01E1:\LA\³\p\i\å
+01E2:\PAE\H\å
+01E3:\LAE\H\å
+01E4:\PG\H\Á
+01E5:\LG\H\Á
+01E6:\PG\û
+01E7:\LG\û
+01E8:\PK\û
+01E9:\LK\û
+01EA:\PO\HOGONEK
+01EB:\LO\HOGONEK
+01EC:\PO\HOGONEK\i\å
+01ED:\LO\HOGONEK\i\å
+01EE:\PEZH\û
+01EF:\LEZH\û
+01F0:\LJ\û
+01F1:\PDZ
+01F2:\PD\HSMALL\@Z
+01F3:\LDZ
+01F4:\PG\H\Ü
+01F5:\LG\H\Ü
+01F6:\PHWAIR
+01F7:\PWYNN
+01F8:\PN\HGRAVE
+01F9:\LN\HGRAVE
+01FA:\PA\HR\ô\p\i\Ü
+01FB:\LA\HR\ô\p\i\Ü
+01FC:\PAE\H\Ü
+01FD:\LAE\H\Ü
+01FE:\PO\H\Á\i\Ü
+01FF:\LO\H\Á\i\Ü
+0200:\PA\H\0 GRAVE
+0201:\LA\H\0 GRAVE
+0202:\PA\HINVERT\ÂBREVE
+0203:\LA\HINVERT\ÂBREVE
+0204:\PE\H\0 GRAVE
+0205:\LE\H\0 GRAVE
+0206:\PE\HINVERT\ÂBREVE
+0207:\LE\HINVERT\ÂBREVE
+0208:\PI\H\0 GRAVE
+0209:\LI\H\0 GRAVE
+020A:\PI\HINVERT\ÂBREVE
+020B:\LI\HINVERT\ÂBREVE
+020C:\PO\H\0 GRAVE
+020D:\LO\H\0 GRAVE
+020E:\PO\HINVERT\ÂBREVE
+020F:\LO\HINVERT\ÂBREVE
+0210:\PR\H\0 GRAVE
+0211:\LR\H\0 GRAVE
+0212:\PR\HINVERT\ÂBREVE
+0213:\LR\HINVERT\ÂBREVE
+0214:\PU\H\0 GRAVE
+0215:\LU\H\0 GRAVE
+0216:\PU\HINVERT\ÂBREVE
+0217:\LU\HINVERT\ÂBREVE
+0218:\PS\HCOMMA\…
+0219:\LS\HCOMMA\…
+021A:\PT\HCOMMA\…
+021B:\LT\HCOMMA\…
+021C:\PYOGH
+021D:\LYOGH
+021E:\PH\û
+021F:\LH\û
+0220:\PN\HLONG \ùLEG
+0222:\POU
+0223:\LOU
+0224:\PZ\í
+0225:\LZ\í
+0226:\PA\³\p
+0227:\LA\³\p
+0228:\PE\HCEDILLA
+0229:\LE\HCEDILLA
+022A:\PO\ž\i\å
+022B:\LO\ž\i\å
+022C:\PO\H\æ\i\å
+022D:\LO\H\æ\i\å
+022E:\PO\³\p
+022F:\LO\³\p
+0230:\PO\³\p\i\å
+0231:\LO\³\p\i\å
+0232:\PY\H\å
+0233:\LY\H\å
+0250:\LTURN\ÂA
+0251:\L\þ
+0252:\LTURN\Â\þ
+0253:\LB\í
+0254:\LOPEN O
+0255:\LC\HCURL
+0256:\LD\HTAIL
+0257:\LD\í
+0258:\L\öE
+0259:\LSCHWA
+025A:\LSCHWA\í
+025B:\LOPEN E
+025C:\L\öOPEN E
+025D:\L\öOPEN E\í
+025E:\LCLOS\Â\öOPEN E
+025F:\LDOTLESS J\H\Á
+0260:\LG\í
+0261:\L\Ž G
+0262:LATIN\@SMALL\ÒG
+0263:\LGAMMA
+0264:\LRAMS HORN
+0265:\LTURN\ÂH
+0266:\LH\í
+0267:\LHENG\í
+0268:\LI\H\Á
+0269:\LIOTA
+026A:LATIN\@SMALL\ÒI
+026B:\LL\HMIDDLE \æ
+026C:\LL\HBELT
+026D:\LL\HRETROFLEX HOOK
+026E:\LLEZH
+026F:\LTURN\ÂM
+0270:\LTURN\ÂM\HLONG LEG
+0271:\LM\í
+0272:\LN\H\‰ HOOK
+0273:\LN\HRETROFLEX HOOK
+0274:LATIN\@SMALL\ÒN
+0275:\LBARR\ÂO
+0276:LATIN\@SMALL\ÒOE
+0277:\LCLOS\Â\ü
+0278:\LPHI
+0279:\LTURN\ÂR
+027A:\LTURN\ÂR\HLONG LEG
+027B:\LTURN\ÂR\í
+027C:\LR\HLONG LEG
+027D:\LR\HTAIL
+027E:\LR\HFISHHOOK
+027F:\L\öR\HFISHHOOK
+0280:LATIN\@SMALL\ÒR
+0281:LATIN\@SMALL\ÒINVERT\ÂR
+0282:\LS\í
+0283:\LESH
+0284:\LDOTLESS J\H\Á\iHOOK
+0285:\LSQUAT \öESH
+0286:\LESH\HCURL
+0287:\LTURN\ÂT
+0288:\LT\HRETROFLEX HOOK
+0289:\LU\ì
+028A:\LU\É
+028B:\LV\í
+028C:\LTURN\ÂV
+028D:\LTURN\ÂW
+028E:\LTURN\ÂY
+028F:LATIN\@SMALL\ÒY
+0290:\LZ\HRETROFLEX HOOK
+0291:\LZ\HCURL
+0292:\LEZH
+0293:\LEZH\HCURL
+0294:LATIN\@GLOTTAL STOP
+0295:LATIN\@PHARYNGEAL VOIC\ÂFRICATIVE
+0296:LATIN\@INVERT\ÂGLOTTAL STOP
+0297:LATIN\@STRETCH\ÂC
+0298:LATIN\@BILABIAL CLICK
+0299:LATIN\@SMALL\ÒB
+029A:\LCLOS\ÂOPEN E
+029B:LATIN\@SMALL\ÒG\í
+029C:LATIN\@SMALL\ÒH
+029D:\LJ\HCROSSED-TAIL
+029E:\LTURN\ÂK
+029F:LATIN\@SMALL\ÒL
+02A0:\LQ\í
+02A1:LATIN\@GLOTTAL STOP\H\Á
+02A2:LATIN\@\öGLOTTAL STOP\H\Á
+02A3:\LDZ DIGRAPH
+02A4:\LDEZH DIGRAPH
+02A5:\LDZ DIGRAPH\HCURL
+02A6:\LTS DIGRAPH
+02A7:\LTESH DIGRAPH
+02A8:\LTC DIGRAPH\HCURL
+02A9:\LFENG DIGRAPH
+02AA:\LLS DIGRAPH
+02AB:\LLZ DIGRAPH
+02AC:LATIN\@BILABIAL PERCUSSIVE
+02AD:LATIN\@BIDENTAL PERCUSSIVE
+02B0:\®\§H
+02B1:\®\§H\í
+02B2:\®\§J
+02B3:\®\§R
+02B4:\®\§TURN\ÂR
+02B5:\®\§TURN\ÂR\í
+02B6:\®SMALL\ÒINVERT\ÂR
+02B7:\®\§W
+02B8:\®\§Y
+02B9:\®PRIME
+02BA:\®\0 PRIME
+02BB:\®TURN\ÂCOMMA
+02BC:\®APOSTROPHE
+02BD:\®\öCOMMA
+02BE:\®\ùHALF R\ô
+02BF:\®\‰ HALF R\ô
+02C0:\®GLOTTAL STOP
+02C1:\®\öGLOTTAL STOP
+02C2:\®\‰\uHEAD
+02C3:\®\q\uHEAD
+02C4:\®UP\uHEAD
+02C5:\®\Ë\uHEAD
+02C6:\®CIRCUMFLEX\×
+02C7:CARON
+02C8:\®\€ \ä
+02C9:\®\å
+02CA:\®\Ü\×
+02CB:\®GRAVE\×
+02CC:\®LOW \€ \ä
+02CD:\®LOW \å
+02CE:\®LOW GRAVE\×
+02CF:\®LOW \Ü\×
+02D0:\®TRIANGULAR COLON
+02D1:\®HALF TRIANGULAR COLON
+02D2:\®CENTR\Â\ùHALF R\ô
+02D3:\®CENTR\Â\‰ HALF R\ô
+02D4:\®UP TACK
+02D5:\®\Ë TACK
+02D6:\®PLUS\‚
+02D7:\®MINUS\‚
+02D8:BREVE
+02D9:DOT\p
+02DA:R\ô\p
+02DB:OGONEK
+02DC:\§\æ
+02DD:\0 \Ü\×
+02DE:\®RHOTIC HOOK
+02DF:\®CROSS\×
+02E0:\®\§GAMMA
+02E1:\®\§L
+02E2:\®\§S
+02E3:\®\§X
+02E4:\®\§\öGLOTTAL STOP
+02E5:\®EXTRA-HIGH TONE\ì
+02E6:\®HIGH TONE\ì
+02E7:\®MID TONE\ì
+02E8:\®LOW TONE\ì
+02E9:\®EXTRA-LOW TONE\ì
+02EA:\®YIN DEPART\ô TONE\¥
+02EB:\®YANG DEPART\ô TONE\¥
+02EC:\®VOIC\ô
+02ED:\®UNASPIRATED
+02EE:\®\0 APOSTROPHE
+0300:\oGRAVE\×
+0301:\o\Ü\×
+0302:\oCIRCUMFLEX\×
+0303:\o\æ
+0304:\o\å
+0305:\oOVER\ä
+0306:\oBREVE
+0307:\oDOT\p
+0308:\oDIAERESIS
+0309:\oHOOK\p
+030A:\oR\ô\p
+030B:\o\0 \Ü\×
+030C:\oCARON
+030D:\o\€ \ä\p
+030E:\o\0 \€ \ä\p
+030F:\o\0 GRAVE\×
+0310:\oCANDRABINDU
+0311:\oINVERT\ÂBREVE
+0312:\oTURN\ÂCOMMA\p
+0313:\oCOMMA\p
+0314:\o\öCOMMA\p
+0315:\oCOMMA\p \q
+0316:\oGRAVE\×\…
+0317:\o\Ü\×\…
+0318:\o\‰ TACK\…
+0319:\o\ùTACK\…
+031A:\o\‰ ANGLE\p
+031B:\oHORN
+031C:\o\‰ HALF R\ô\…
+031D:\oUP TACK\…
+031E:\o\Ë TACK\…
+031F:\oPLUS\‚\…
+0320:\oMINUS\‚\…
+0321:\oPALATALIZ\ÂHOOK\…
+0322:\oRETROFLEX HOOK\…
+0323:\oDOT\…
+0324:\oDIAERESIS\…
+0325:\oR\ô\…
+0326:\oCOMMA\…
+0327:\oCEDILLA
+0328:\oOGONEK
+0329:\o\€ \ä\…
+032A:\oBRIDGE\…
+032B:\oINVERT\Â\0 ARCH\…
+032C:\oCARON\…
+032D:\oCIRCUMFLEX\×\…
+032E:\oBREVE\…
+032F:\oINVERT\ÂBREVE\…
+0330:\o\æ\…
+0331:\o\å\…
+0332:\oLOW \ä
+0333:\o\0 LOW \ä
+0334:\o\æ OVERLAY
+0335:\oSHORT \Á OVERLAY
+0336:\oLONG \Á OVERLAY
+0337:\oSHORT SOLIDUS OVERLAY
+0338:\oLONG SOLIDUS OVERLAY
+0339:\o\ùHALF R\ô\…
+033A:\oINVERT\ÂBRIDGE\…
+033B:\o\rBELOW
+033C:\oSEAGULL\…
+033D:\oX\p
+033E:\o\€ \æ
+033F:\o\0 OVER\ä
+0340:\oGRAVE TONE\¥
+0341:\o\Ü TONE\¥
+0342:\oGREEK \´
+0343:\oGREEK KORONIS
+0344:\oGREEK DIALYTIKA TONOS
+0345:\oGREEK YPO\œ
+0346:\oBRIDGE\p
+0347:\oEQUALS\‚\…
+0348:\o\0 \€ \ä\…
+0349:\o\‰ ANGLE\…
+034A:\oNOT \æ\p
+034B:\oHOMOTHETIC\p
+034C:\oALMOST\‘\p
+034D:\o\‰ \q\u\…
+034E:\oUP\Š\u\…
+034F:\oGRAPHEME JOINER
+0360:\o\0 \æ
+0361:\o\0 INVERT\ÂBREVE
+0362:\o\0 \Ù\…
+0363:\o\LA
+0364:\o\LE
+0365:\o\LI
+0366:\o\LO
+0367:\o\LU
+0368:\o\LC
+0369:\o\LD
+036A:\o\LH
+036B:\o\LM
+036C:\o\LR
+036D:\o\LT
+036E:\o\LV
+036F:\o\LX
+0374:GREEK NUMERAL\‚
+0375:GREEK \ïNUMERAL\‚
+037A:GREEK YPO\œ
+037E:GREEK QUESTION\¥
+0384:GREEK TONOS
+0385:GREEK DIALYTIKA TONOS
+0386:\9\þ\HTONOS
+0387:GREEK ANO TELEIA
+0388:\9E\É\HTONOS
+0389:\9ETA\HTONOS
+038A:\9IOTA\HTONOS
+038C:\9OMICRON\HTONOS
+038E:\9U\É\HTONOS
+038F:\9\ü\HTONOS
+0390:\yIOTA\HDIALYTIKA\iTONOS
+0391:\9\þ
+0392:\9BETA
+0393:\9GAMMA
+0394:\9DELTA
+0395:\9E\É
+0396:\9ZETA
+0397:\9ETA
+0398:\9THETA
+0399:\9IOTA
+039A:\9KAPPA
+039B:\9LAMDA
+039C:\9MU
+039D:\9NU
+039E:\9XI
+039F:\9OMICRON
+03A0:\9PI
+03A1:\9RHO
+03A3:\9SIGMA
+03A4:\9TAU
+03A5:\9U\É
+03A6:\9PHI
+03A7:\9CHI
+03A8:\9PSI
+03A9:\9\ü
+03AA:\9IOTA\HDIALYTIKA
+03AB:\9U\É\HDIALYTIKA
+03AC:\y\þ\HTONOS
+03AD:\yE\É\HTONOS
+03AE:\yETA\HTONOS
+03AF:\yIOTA\HTONOS
+03B0:\yU\É\HDIALYTIKA\iTONOS
+03B1:\y\þ
+03B2:\yBETA
+03B3:\yGAMMA
+03B4:\yDELTA
+03B5:\yE\É
+03B6:\yZETA
+03B7:\yETA
+03B8:\yTHETA
+03B9:\yIOTA
+03BA:\yKAPPA
+03BB:\yLAMDA
+03BC:\yMU
+03BD:\yNU
+03BE:\yXI
+03BF:\yOMICRON
+03C0:\yPI
+03C1:\yRHO
+03C2:\yFINAL SIGMA
+03C3:\ySIGMA
+03C4:\yTAU
+03C5:\yU\É
+03C6:\yPHI
+03C7:\yCHI
+03C8:\yPSI
+03C9:\y\ü
+03CA:\yIOTA\HDIALYTIKA
+03CB:\yU\É\HDIALYTIKA
+03CC:\yOMICRON\HTONOS
+03CD:\yU\É\HTONOS
+03CE:\y\ü\HTONOS
+03D0:GREEK BETA \
+03D1:GREEK THETA \
+03D2:GREEK U\É\í \
+03D3:GREEK U\É\H\Ü\iHOOK \
+03D4:GREEK U\É\ž\iHOOK \
+03D5:GREEK PHI \
+03D6:GREEK PI \
+03D7:GREEK KAI \
+03D8:GREEK\@ARCHAIC KOPPA
+03D9:\yARCHAIC KOPPA
+03DA:GREEK\@STIGMA
+03DB:\ySTIGMA
+03DC:GREEK\@DIGAMMA
+03DD:\yDIGAMMA
+03DE:GREEK\@KOPPA
+03DF:\yKOPPA
+03E0:GREEK\@SAMPI
+03E1:\ySAMPI
+03E2:COPTIC\ãSHEI
+03E3:COPTIC\N\@SHEI
+03E4:COPTIC\ãFEI
+03E5:COPTIC\N\@FEI
+03E6:COPTIC\ãKHEI
+03E7:COPTIC\N\@KHEI
+03E8:COPTIC\ãHORI
+03E9:COPTIC\N\@HORI
+03EA:COPTIC\ãGANGIA
+03EB:COPTIC\N\@GANGIA
+03EC:COPTIC\ãSHIMA
+03ED:COPTIC\N\@SHIMA
+03EE:COPTIC\ãDEI
+03EF:COPTIC\N\@DEI
+03F0:GREEK KAPPA \
+03F1:GREEK RHO \
+03F2:GREEK LUNATE SIGMA \
+03F3:GREEK\@YOT
+03F4:GREEK\ÒTHETA \
+03F5:GREEK LUNATE E\É \
+03F6:GREEK \öLUNATE E\É \
+0400:\¡IE\HGRAVE
+0401:\¡IO
+0402:\¡DJE
+0403:\¡GJE
+0404:\¡UKRAINIAN IE
+0405:\¡DZE
+0406:\¡BYELORUSSIAN-UKRAINIAN I
+0407:\¡YI
+0408:\¡JE
+0409:\¡LJE
+040A:\¡NJE
+040B:\¡TSHE
+040C:\¡KJE
+040D:\¡I\HGRAVE
+040E:\¡SHORT U
+040F:\¡DZHE
+0410:\¡A
+0411:\¡BE
+0412:\¡VE
+0413:\¡GHE
+0414:\¡DE
+0415:\¡IE
+0416:\¡ZHE
+0417:\¡ZE
+0418:\¡I
+0419:\¡SHORT I
+041A:\¡KA
+041B:\¡EL
+041C:\¡EM
+041D:\¡EN
+041E:\¡O
+041F:\¡PE
+0420:\¡ER
+0421:\¡ES
+0422:\¡TE
+0423:\¡U
+0424:\¡EF
+0425:\¡HA
+0426:\¡TSE
+0427:\¡CHE
+0428:\¡SHA
+0429:\¡SHCHA
+042A:\¡HARD\‚
+042B:\¡YERU
+042C:\¡SOFT\‚
+042D:\¡E
+042E:\¡YU
+042F:\¡YA
+0430:\¢A
+0431:\¢BE
+0432:\¢VE
+0433:\¢GHE
+0434:\¢DE
+0435:\¢IE
+0436:\¢ZHE
+0437:\¢ZE
+0438:\¢I
+0439:\¢SHORT I
+043A:\¢KA
+043B:\¢EL
+043C:\¢EM
+043D:\¢EN
+043E:\¢O
+043F:\¢PE
+0440:\¢ER
+0441:\¢ES
+0442:\¢TE
+0443:\¢U
+0444:\¢EF
+0445:\¢HA
+0446:\¢TSE
+0447:\¢CHE
+0448:\¢SHA
+0449:\¢SHCHA
+044A:\¢HARD\‚
+044B:\¢YERU
+044C:\¢SOFT\‚
+044D:\¢E
+044E:\¢YU
+044F:\¢YA
+0450:\¢IE\HGRAVE
+0451:\¢IO
+0452:\¢DJE
+0453:\¢GJE
+0454:\¢UKRAINIAN IE
+0455:\¢DZE
+0456:\¢BYELORUSSIAN-UKRAINIAN I
+0457:\¢YI
+0458:\¢JE
+0459:\¢LJE
+045A:\¢NJE
+045B:\¢TSHE
+045C:\¢KJE
+045D:\¢I\HGRAVE
+045E:\¢SHORT U
+045F:\¢DZHE
+0460:\¡\ü
+0461:\¢\ü
+0462:\¡YAT
+0463:\¢YAT
+0464:\¡IOTIFI\ÂE
+0465:\¢IOTIFI\ÂE
+0466:\¡LITTLE YUS
+0467:\¢LITTLE YUS
+0468:\¡IOTIFI\ÂLITTLE YUS
+0469:\¢IOTIFI\ÂLITTLE YUS
+046A:\¡BIG YUS
+046B:\¢BIG YUS
+046C:\¡IOTIFI\ÂBIG YUS
+046D:\¢IOTIFI\ÂBIG YUS
+046E:\¡KSI
+046F:\¢KSI
+0470:\¡PSI
+0471:\¢PSI
+0472:\¡FITA
+0473:\¢FITA
+0474:\¡IZHITSA
+0475:\¢IZHITSA
+0476:\¡IZHITSA\H\0 GRAVE\×
+0477:\¢IZHITSA\H\0 GRAVE\×
+0478:\¡UK
+0479:\¢UK
+047A:\¡ROUND \ü
+047B:\¢ROUND \ü
+047C:\¡\ü\HTITLO
+047D:\¢\ü\HTITLO
+047E:\¡OT
+047F:\¢OT
+0480:\¡KOPPA
+0481:\¢KOPPA
+0482:\g THOUSANDS\‚
+0483:\o\g TITLO
+0484:\o\g PALATALIZ\”
+0485:\o\g DASIA PNEUMATA
+0486:\o\g PSILI PNEUMATA
+0488:\o\g HUNDR\ÂTHOUSANDS\‚
+0489:\o\g MILLIONS\‚
+048A:\¡SHORT I\HTAIL
+048B:\¢SHORT I\HTAIL
+048C:\¡SEMISOFT\‚
+048D:\¢SEMISOFT\‚
+048E:\¡ER\HTICK
+048F:\¢ER\HTICK
+0490:\¡GHE\HUPTURN
+0491:\¢GHE\HUPTURN
+0492:\¡GHE\H\Á
+0493:\¢GHE\H\Á
+0494:\¡GHE\HMIDDLE HOOK
+0495:\¢GHE\HMIDDLE HOOK
+0496:\¡ZHE\HDESCENDER
+0497:\¢ZHE\HDESCENDER
+0498:\¡ZE\HDESCENDER
+0499:\¢ZE\HDESCENDER
+049A:\¡KA\HDESCENDER
+049B:\¢KA\HDESCENDER
+049C:\¡KA\H\€ \Á
+049D:\¢KA\H\€ \Á
+049E:\¡KA\H\Á
+049F:\¢KA\H\Á
+04A0:\¡BASHKIR KA
+04A1:\¢BASHKIR KA
+04A2:\¡EN\HDESCENDER
+04A3:\¢EN\HDESCENDER
+04A4:\g\Ò\òEN GHE
+04A5:\g\Ç\òEN GHE
+04A6:\¡PE\HMIDDLE HOOK
+04A7:\¢PE\HMIDDLE HOOK
+04A8:\¡ABKHASIAN HA
+04A9:\¢ABKHASIAN HA
+04AA:\¡ES\HDESCENDER
+04AB:\¢ES\HDESCENDER
+04AC:\¡TE\HDESCENDER
+04AD:\¢TE\HDESCENDER
+04AE:\¡STRA\¼ U
+04AF:\¢STRA\¼ U
+04B0:\¡STRA\¼ U\H\Á
+04B1:\¢STRA\¼ U\H\Á
+04B2:\¡HA\HDESCENDER
+04B3:\¢HA\HDESCENDER
+04B4:\g\Ò\òTE TSE
+04B5:\g\Ç\òTE TSE
+04B6:\¡CHE\HDESCENDER
+04B7:\¢CHE\HDESCENDER
+04B8:\¡CHE\H\€ \Á
+04B9:\¢CHE\H\€ \Á
+04BA:\¡SHHA
+04BB:\¢SHHA
+04BC:\¡ABKHASIAN CHE
+04BD:\¢ABKHASIAN CHE
+04BE:\¡ABKHASIAN CHE\HDESCENDER
+04BF:\¢ABKHASIAN CHE\HDESCENDER
+04C0:\g\@PALOCHKA
+04C1:\¡ZHE\HBREVE
+04C2:\¢ZHE\HBREVE
+04C3:\¡KA\í
+04C4:\¢KA\í
+04C5:\¡EL\HTAIL
+04C6:\¢EL\HTAIL
+04C7:\¡EN\í
+04C8:\¢EN\í
+04C9:\¡EN\HTAIL
+04CA:\¢EN\HTAIL
+04CB:\¡KHAKASSIAN CHE
+04CC:\¢KHAKASSIAN CHE
+04CD:\¡EM\HTAIL
+04CE:\¢EM\HTAIL
+04D0:\¡A\HBREVE
+04D1:\¢A\HBREVE
+04D2:\¡A\ž
+04D3:\¢A\ž
+04D4:\g\Ò\òA IE
+04D5:\g\Ç\òA IE
+04D6:\¡IE\HBREVE
+04D7:\¢IE\HBREVE
+04D8:\¡SCHWA
+04D9:\¢SCHWA
+04DA:\¡SCHWA\ž
+04DB:\¢SCHWA\ž
+04DC:\¡ZHE\ž
+04DD:\¢ZHE\ž
+04DE:\¡ZE\ž
+04DF:\¢ZE\ž
+04E0:\¡ABKHASIAN DZE
+04E1:\¢ABKHASIAN DZE
+04E2:\¡I\H\å
+04E3:\¢I\H\å
+04E4:\¡I\ž
+04E5:\¢I\ž
+04E6:\¡O\ž
+04E7:\¢O\ž
+04E8:\¡BARR\ÂO
+04E9:\¢BARR\ÂO
+04EA:\¡BARR\ÂO\ž
+04EB:\¢BARR\ÂO\ž
+04EC:\¡E\ž
+04ED:\¢E\ž
+04EE:\¡U\H\å
+04EF:\¢U\H\å
+04F0:\¡U\ž
+04F1:\¢U\ž
+04F2:\¡U\H\0 \Ü
+04F3:\¢U\H\0 \Ü
+04F4:\¡CHE\ž
+04F5:\¢CHE\ž
+04F8:\¡YERU\ž
+04F9:\¢YERU\ž
+0500:\¡KOMI DE
+0501:\¢KOMI DE
+0502:\¡KOMI DJE
+0503:\¢KOMI DJE
+0504:\¡KOMI ZJE
+0505:\¢KOMI ZJE
+0506:\¡KOMI DZJE
+0507:\¢KOMI DZJE
+0508:\¡KOMI LJE
+0509:\¢KOMI LJE
+050A:\¡KOMI NJE
+050B:\¢KOMI NJE
+050C:\¡KOMI SJE
+050D:\¢KOMI SJE
+050E:\¡KOMI TJE
+050F:\¢KOMI TJE
+0531:ARMENIAN\ãAYB
+0532:ARMENIAN\ãBEN
+0533:ARMENIAN\ãGIM
+0534:ARMENIAN\ãDA
+0535:ARMENIAN\ãECH
+0536:ARMENIAN\ãZA
+0537:ARMENIAN\ãEH
+0538:ARMENIAN\ãET
+0539:ARMENIAN\ãTO
+053A:ARMENIAN\ãZHE
+053B:ARMENIAN\ãINI
+053C:ARMENIAN\ãLIWN
+053D:ARMENIAN\ãXEH
+053E:ARMENIAN\ãCA
+053F:ARMENIAN\ãKEN
+0540:ARMENIAN\ãHO
+0541:ARMENIAN\ãJA
+0542:ARMENIAN\ãGHAD
+0543:ARMENIAN\ãCHEH
+0544:ARMENIAN\ãMEN
+0545:ARMENIAN\ãYI
+0546:ARMENIAN\ãNOW
+0547:ARMENIAN\ãSHA
+0548:ARMENIAN\ãVO
+0549:ARMENIAN\ãCHA
+054A:ARMENIAN\ãPEH
+054B:ARMENIAN\ãJHEH
+054C:ARMENIAN\ãRA
+054D:ARMENIAN\ãSEH
+054E:ARMENIAN\ãVEW
+054F:ARMENIAN\ãTIWN
+0550:ARMENIAN\ãREH
+0551:ARMENIAN\ãCO
+0552:ARMENIAN\ãYIWN
+0553:ARMENIAN\ãPIWR
+0554:ARMENIAN\ãKEH
+0555:ARMENIAN\ãOH
+0556:ARMENIAN\ãFEH
+0559:ARMENIAN \®\‰ HALF R\ô
+055A:ARMENIAN APOSTROPHE
+055B:ARMENIAN EMPHASIS\¥
+055C:ARMENIAN EXCLAM\”\¥
+055D:ARMENIAN COMMA
+055E:ARMENIAN QUESTION\¥
+055F:ARMENIAN ABBREVI\”\¥
+0561:ARMENIAN\N\@AYB
+0562:ARMENIAN\N\@BEN
+0563:ARMENIAN\N\@GIM
+0564:ARMENIAN\N\@DA
+0565:ARMENIAN\N\@ECH
+0566:ARMENIAN\N\@ZA
+0567:ARMENIAN\N\@EH
+0568:ARMENIAN\N\@ET
+0569:ARMENIAN\N\@TO
+056A:ARMENIAN\N\@ZHE
+056B:ARMENIAN\N\@INI
+056C:ARMENIAN\N\@LIWN
+056D:ARMENIAN\N\@XEH
+056E:ARMENIAN\N\@CA
+056F:ARMENIAN\N\@KEN
+0570:ARMENIAN\N\@HO
+0571:ARMENIAN\N\@JA
+0572:ARMENIAN\N\@GHAD
+0573:ARMENIAN\N\@CHEH
+0574:ARMENIAN\N\@MEN
+0575:ARMENIAN\N\@YI
+0576:ARMENIAN\N\@NOW
+0577:ARMENIAN\N\@SHA
+0578:ARMENIAN\N\@VO
+0579:ARMENIAN\N\@CHA
+057A:ARMENIAN\N\@PEH
+057B:ARMENIAN\N\@JHEH
+057C:ARMENIAN\N\@RA
+057D:ARMENIAN\N\@SEH
+057E:ARMENIAN\N\@VEW
+057F:ARMENIAN\N\@TIWN
+0580:ARMENIAN\N\@REH
+0581:ARMENIAN\N\@CO
+0582:ARMENIAN\N\@YIWN
+0583:ARMENIAN\N\@PIWR
+0584:ARMENIAN\N\@KEH
+0585:ARMENIAN\N\@OH
+0586:ARMENIAN\N\@FEH
+0587:ARMENIAN\Ç\òECH YIWN
+0589:ARMENIAN\é
+058A:ARMENIAN HYPHEN
+0591:\Ÿ\× ETNAHTA
+0592:\Ÿ\× SEGOL
+0593:\Ÿ\× SHALSHELET
+0594:\Ÿ\× ZAQEF QATAN
+0595:\Ÿ\× ZAQEF GADOL
+0596:\Ÿ\× TIPEHA
+0597:\Ÿ\× REVIA
+0598:\Ÿ\× ZARQA
+0599:\Ÿ\× PASHTA
+059A:\Ÿ\× YETIV
+059B:\Ÿ\× TEVIR
+059C:\Ÿ\× GERESH
+059D:\Ÿ\× GERESH MUQDAM
+059E:\Ÿ\× GERSHAYIM
+059F:\Ÿ\× QARNEY PARA
+05A0:\Ÿ\× TELISHA GEDOLA
+05A1:\Ÿ\× PAZER
+05A3:\Ÿ\× MUNAH
+05A4:\Ÿ\× MAHAPAKH
+05A5:\Ÿ\× MERKHA
+05A6:\Ÿ\× MERKHA KEFULA
+05A7:\Ÿ\× DARGA
+05A8:\Ÿ\× QADMA
+05A9:\Ÿ\× TELISHA QETANA
+05AA:\Ÿ\× YERAH BEN YOMO
+05AB:\Ÿ\× OLE
+05AC:\Ÿ\× ILUY
+05AD:\Ÿ\× DEHI
+05AE:\Ÿ\× ZINOR
+05AF:\Ÿ\¥ MASORA \Ð
+05B0:\Ÿ POINT SHEVA
+05B1:\Ÿ POINT HATAF SEGOL
+05B2:\Ÿ POINT HATAF PATAH
+05B3:\Ÿ POINT HATAF QAMATS
+05B4:\Ÿ POINT HIRIQ
+05B5:\Ÿ POINT TSERE
+05B6:\Ÿ POINT SEGOL
+05B7:\Ÿ POINT PATAH
+05B8:\Ÿ POINT QAMATS
+05B9:\Ÿ POINT HOLAM
+05BB:\Ÿ POINT QUBUTS
+05BC:\Ÿ POINT DAGESH OR MAPIQ
+05BD:\Ÿ POINT METEG
+05BE:\Ÿ PUNCTU\” MAQAF
+05BF:\Ÿ POINT RAFE
+05C0:\Ÿ PUNCTU\” PASEQ
+05C1:\Ÿ POINT SHIN DOT
+05C2:\Ÿ POINT SIN DOT
+05C3:\Ÿ PUNCTU\” SOF PASUQ
+05C4:\Ÿ\¥ \÷DOT
+05D0:\Ÿ\@ALEF
+05D1:\Ÿ\@BET
+05D2:\Ÿ\@GIMEL
+05D3:\Ÿ\@DALET
+05D4:\Ÿ\@HE
+05D5:\Ÿ\@VAV
+05D6:\Ÿ\@ZAYIN
+05D7:\Ÿ\@HET
+05D8:\Ÿ\@TET
+05D9:\Ÿ\@YOD
+05DA:\Ÿ\@FINAL KAF
+05DB:\Ÿ\@KAF
+05DC:\Ÿ\@LAMED
+05DD:\Ÿ\@FINAL MEM
+05DE:\Ÿ\@MEM
+05DF:\Ÿ\@FINAL NUN
+05E0:\Ÿ\@NUN
+05E1:\Ÿ\@SAMEKH
+05E2:\Ÿ\@AYIN
+05E3:\Ÿ\@FINAL PE
+05E4:\Ÿ\@PE
+05E5:\Ÿ\@FINAL TSADI
+05E6:\Ÿ\@TSADI
+05E7:\Ÿ\@QOF
+05E8:\Ÿ\@RESH
+05E9:\Ÿ\@SHIN
+05EA:\Ÿ\@TAV
+05F0:\Ÿ \òYIDDISH \0 VAV
+05F1:\Ÿ \òYIDDISH VAV YOD
+05F2:\Ÿ \òYIDDISH \0 YOD
+05F3:\Ÿ PUNCTU\” GERESH
+05F4:\Ÿ PUNCTU\” GERSHAYIM
+060C:\Ê COMMA
+061B:\Ê SEMICOLON
+061F:\Ê QUESTION\¥
+0621:\^HAMZA
+0622:\^ALEF\HMADDA\p
+0623:\^ALEF\HHAMZA\p
+0624:\^WAW\HHAMZA\p
+0625:\^ALEF\HHAMZA\…
+0626:\^\º
+0627:\^ALEF
+0628:\^BEH
+0629:\^TEH MARBUTA
+062A:\^TEH
+062B:\^THEH
+062C:\^JEEM
+062D:\^HAH
+062E:\^KHAH
+062F:\^DAL
+0630:\^THAL
+0631:\^REH
+0632:\^ZAIN
+0633:\^SEEN
+0634:\^SHEEN
+0635:\^SAD
+0636:\^DAD
+0637:\^TAH
+0638:\^ZAH
+0639:\^AIN
+063A:\^GHAIN
+0640:\Ê TATWEEL
+0641:\^FEH
+0642:\^QAF
+0643:\^KAF
+0644:\^LAM
+0645:\^MEEM
+0646:\^NOON
+0647:\^HEH
+0648:\^WAW
+0649:\^ALEF MAKSURA
+064A:\^YEH
+064B:\Ê FATHATAN
+064C:\Ê DAMMATAN
+064D:\Ê KASRATAN
+064E:\Ê FATHA
+064F:\Ê DAMMA
+0650:\Ê KASRA
+0651:\Ê SHADDA
+0652:\Ê SUKUN
+0653:\Ê MADDAH\p
+0654:\Ê HAMZA\p
+0655:\Ê HAMZA\…
+0660:\Ê-INDIC\hZERO
+0661:\Ê-INDIC\hONE
+0662:\Ê-INDIC\hTWO
+0663:\Ê-INDIC\hTHREE
+0664:\Ê-INDIC\hFOUR
+0665:\Ê-INDIC\hFIVE
+0666:\Ê-INDIC\hSIX
+0667:\Ê-INDIC\hSEVEN
+0668:\Ê-INDIC\hE\¼
+0669:\Ê-INDIC\hNINE
+066A:\Ê PERCENT\‚
+066B:\Ê DECIMAL SEPARATOR
+066C:\Ê THOUSANDS SEPARATOR
+066D:\Ê FIVE POINT\ÂSTAR
+066E:\^DOTLESS BEH
+066F:\^DOTLESS QAF
+0670:\^SUPER\Ž ALEF
+0671:\^ALEF WASLA
+0672:\^ALEF\HWAVY HAMZA\p
+0673:\^ALEF\HWAVY HAMZA\…
+0674:\^HIGH HAMZA
+0675:\^HIGH HAMZA ALEF
+0676:\^HIGH HAMZA WAW
+0677:\^U\HHAMZA\p
+0678:\^HIGH HAMZA YEH
+0679:\^TTEH
+067A:\^TTEHEH
+067B:\^BEEH
+067C:\^TEH\HR\ô
+067D:\^TEH\HTHREE DOTS\p \Ë\Š
+067E:\^PEH
+067F:\^TEHEH
+0680:\^BEHEH
+0681:\^HAH\HHAMZA\p
+0682:\^HAH\HTWO DOTS \€\p
+0683:\^NYEH
+0684:\^DYEH
+0685:\^HAH\HTHREE DOTS\p
+0686:\^TCHEH
+0687:\^TCHEHEH
+0688:\^DDAL
+0689:\^DAL\HR\ô
+068A:\^DAL\³\…
+068B:\^DAL\³\… AND\ÇTAH
+068C:\^DAHAL
+068D:\^DDAHAL
+068E:\^DUL
+068F:\^DAL\HTHREE DOTS\p \Ë\Š
+0690:\^DAL\HFOUR DOTS\p
+0691:\^RREH
+0692:\^REH WITH\ÇV
+0693:\^REH\HR\ô
+0694:\^REH\³\…
+0695:\^REH WITH\ÇV\…
+0696:\^REH\³\…\iDOT\p
+0697:\^REH\HTWO DOTS\p
+0698:\^JEH
+0699:\^REH\HFOUR DOTS\p
+069A:\^SEEN\³\…\iDOT\p
+069B:\^SEEN\HTHREE DOTS\…
+069C:\^SEEN\HTHREE DOTS\…\iTHREE DOTS\p
+069D:\^SAD\HTWO DOTS\…
+069E:\^SAD\HTHREE DOTS\p
+069F:\^TAH\HTHREE DOTS\p
+06A0:\^AIN\HTHREE DOTS\p
+06A1:\^DOTLESS FEH
+06A2:\^FEH\³ MOVED\…
+06A3:\^FEH\³\…
+06A4:\^VEH
+06A5:\^FEH\HTHREE DOTS\…
+06A6:\^PEHEH
+06A7:\^QAF\³\p
+06A8:\^QAF\HTHREE DOTS\p
+06A9:\^KEHEH
+06AA:\^SWASH KAF
+06AB:\^KAF\HR\ô
+06AC:\^KAF\³\p
+06AD:\^NG
+06AE:\^KAF\HTHREE DOTS\…
+06AF:\^GAF
+06B0:\^GAF\HR\ô
+06B1:\^NGOEH
+06B2:\^GAF\HTWO DOTS\…
+06B3:\^GUEH
+06B4:\^GAF\HTHREE DOTS\p
+06B5:\^LAM WITH\ÇV
+06B6:\^LAM\³\p
+06B7:\^LAM\HTHREE DOTS\p
+06B8:\^LAM\HTHREE DOTS\…
+06B9:\^NOON\³\…
+06BA:\^NOON GHUNNA
+06BB:\^RNOON
+06BC:\^NOON\HR\ô
+06BD:\^NOON\HTHREE DOTS\p
+06BE:\^HEH DOACHASHMEE
+06BF:\^TCHEH\³\p
+06C0:\^HEH\HYEH\p
+06C1:\^HEH GOAL
+06C2:\^HEH GOAL\HHAMZA\p
+06C3:\^TEH MARBUTA GOAL
+06C4:\^WAW\HR\ô
+06C5:\^KIRGHIZ OE
+06C6:\^OE
+06C7:\^U
+06C8:\^YU
+06C9:\^KIRGHIZ YU
+06CA:\^WAW\HTWO DOTS\p
+06CB:\^VE
+06CC:\^FARSI YEH
+06CD:\^YEH\HTAIL
+06CE:\^YEH WITH\ÇV
+06CF:\^WAW\³\p
+06D0:\^E
+06D1:\^YEH\HTHREE DOTS\…
+06D2:\^YEH\ìREE
+06D3:\^YEH\ìREE\HHAMZA\p
+06D4:\Ê\é
+06D5:\^AE
+06D6:\Ê\ÇHIGH \òSAD\HLAM\‡
+06D7:\Ê\ÇHIGH \òQAF\HLAM\‡
+06D8:\Ê\ÇHIGH MEEM\2
+06D9:\Ê\ÇHIGH LAM ALEF
+06DA:\Ê\ÇHIGH JEEM
+06DB:\Ê\ÇHIGH THREE DOTS
+06DC:\Ê\ÇHIGH SEEN
+06DD:\Ê END OF AYAH
+06DE:\Ê START OF RUB EL HIZB
+06DF:\Ê\ÇHIGH ROUND\ÂZERO
+06E0:\Ê\ÇHIGH UP\ùRECTANGULAR ZERO
+06E1:\Ê\ÇHIGH DOTLESS HEAD OF KHAH
+06E2:\Ê\ÇHIGH MEEM\Q
+06E3:\Ê\ÇLOW SEEN
+06E4:\Ê\ÇHIGH MADDA
+06E5:\Ê\ÇWAW
+06E6:\Ê\ÇYEH
+06E7:\Ê\ÇHIGH YEH
+06E8:\Ê\ÇHIGH NOON
+06E9:\Ê PLACE OF SAJDAH
+06EA:\Ê EMPTY CENTRE LOW STOP
+06EB:\Ê EMPTY CENTRE HIGH STOP
+06EC:\Ê ROUND\ÂHIGH STOP\HFILL\ÂCENTRE
+06ED:\Ê\ÇLOW MEEM
+06F0:EXTEND\Â\Ê-INDIC\hZERO
+06F1:EXTEND\Â\Ê-INDIC\hONE
+06F2:EXTEND\Â\Ê-INDIC\hTWO
+06F3:EXTEND\Â\Ê-INDIC\hTHREE
+06F4:EXTEND\Â\Ê-INDIC\hFOUR
+06F5:EXTEND\Â\Ê-INDIC\hFIVE
+06F6:EXTEND\Â\Ê-INDIC\hSIX
+06F7:EXTEND\Â\Ê-INDIC\hSEVEN
+06F8:EXTEND\Â\Ê-INDIC\hE\¼
+06F9:EXTEND\Â\Ê-INDIC\hNINE
+06FA:\^SHEEN\³\…
+06FB:\^DAD\³\…
+06FC:\^GHAIN\³\…
+06FD:\Ê\‚ SINDHI AMPERSAND
+06FE:\Ê\‚ SINDHI POSTPOSITION MEN
+0700:\Ó END OF PARAGRAPH
+0701:\Ó SUPRA\äAR\é
+0702:\Ó SUB\äAR\é
+0703:\Ó SUPRA\äAR COLON
+0704:\Ó SUB\äAR COLON
+0705:\Ó \ COLON
+0706:\Ó COLON SKEW\Â\‰
+0707:\Ó COLON SKEW\Â\q
+0708:\Ó SUPRA\äAR COLON SKEW\Â\‰
+0709:\Ó SUB\äAR COLON SKEW\Â\q
+070A:\Ó CONTRACTION
+070B:\Ó HARKLEAN OBELUS
+070C:\Ó HARKLEAN METOBELUS
+070D:\Ó HARKLEAN ASTERISCUS
+070F:\Ó ABBREVI\”\¥
+0710:\Ó\@ALAPH
+0711:\Ó\@SUPER\Ž ALAPH
+0712:\Ó\@BETH
+0713:\Ó\@GAMAL
+0714:\Ó\@GAMAL GARSHUNI
+0715:\Ó\@DALATH
+0716:\Ó\@DOTLESS DALATH RISH
+0717:\Ó\@HE
+0718:\Ó\@WAW
+0719:\Ó\@ZAIN
+071A:\Ó\@HETH
+071B:\Ó\@TETH
+071C:\Ó\@TETH GARSHUNI
+071D:\Ó\@YUDH
+071E:\Ó\@YUDH HE
+071F:\Ó\@KAPH
+0720:\Ó\@LAMADH
+0721:\Ó\@MIM
+0722:\Ó\@NUN
+0723:\Ó\@SEMKATH
+0724:\Ó\@FINAL SEMKATH
+0725:\Ó\@E
+0726:\Ó\@PE
+0727:\Ó\@\öPE
+0728:\Ó\@SADHE
+0729:\Ó\@QAPH
+072A:\Ó\@RISH
+072B:\Ó\@SHIN
+072C:\Ó\@TAW
+0730:\Ó PTHAHA\p
+0731:\Ó PTHAHA\…
+0732:\Ó PTHAHA DOTTED
+0733:\Ó ZQAPHA\p
+0734:\Ó ZQAPHA\…
+0735:\Ó ZQAPHA DOTTED
+0736:\Ó RBASA\p
+0737:\Ó RBASA\…
+0738:\Ó DOTT\ÂZLAMA \
+0739:\Ó DOTT\ÂZLAMA ANGULAR
+073A:\Ó HBASA\p
+073B:\Ó HBASA\…
+073C:\Ó HBASA-ESASA DOTTED
+073D:\Ó ESASA\p
+073E:\Ó ESASA\…
+073F:\Ó RWAHA
+0740:\Ó FEMININE DOT
+0741:\Ó QUSHSHAYA
+0742:\Ó RUKKAKHA
+0743:\Ó TWO \€ DOTS\p
+0744:\Ó TWO \€ DOTS\…
+0745:\Ó THREE DOTS\p
+0746:\Ó THREE DOTS\…
+0747:\Ó OBLIQUE \ä\p
+0748:\Ó OBLIQUE \ä\…
+0749:\Ó MUSIC
+074A:\Ó\ìREKH
+0780:\ëHAA
+0781:\ëSHAVIYANI
+0782:\ëNOONU
+0783:\ëRAA
+0784:\ëBAA
+0785:\ëLHAVIYANI
+0786:\ëKAAFU
+0787:\ëALIFU
+0788:\ëVAAVU
+0789:\ëMEEMU
+078A:\ëFAAFU
+078B:\ëDHAALU
+078C:\ëTHAA
+078D:\ëLAAMU
+078E:\ëGAAFU
+078F:\ëGNAVIYANI
+0790:\ëSEENU
+0791:\ëDAVIYANI
+0792:\ëZAVIYANI
+0793:\ëTAVIYANI
+0794:\ëYAA
+0795:\ëPAVIYANI
+0796:\ëJAVIYANI
+0797:\ëCHAVIYANI
+0798:\ëTTAA
+0799:\ëHHAA
+079A:\ëKHAA
+079B:\ëTHAALU
+079C:\ëZAA
+079D:\ëSHEENU
+079E:\ëSAADHU
+079F:\ëDAADHU
+07A0:\ëTO
+07A1:\ëZO
+07A2:\ëAINU
+07A3:\ëGHAINU
+07A4:\ëQAAFU
+07A5:\ëWAAVU
+07A6:THAANA ABAFILI
+07A7:THAANA AABAAFILI
+07A8:THAANA IBIFILI
+07A9:THAANA EEBEEFILI
+07AA:THAANA UBUFILI
+07AB:THAANA OOBOOFILI
+07AC:THAANA EBEFILI
+07AD:THAANA EYBEYFILI
+07AE:THAANA OBOFILI
+07AF:THAANA OABOAFILI
+07B0:THAANA SUKUN
+07B1:\ëNAA
+0901:\„\‚ CANDRABINDU
+0902:\„\‚ ANUSVARA
+0903:\„\‚ VISARGA
+0905:\„\@A
+0906:\„\@AA
+0907:\„\@I
+0908:\„\@II
+0909:\„\@U
+090A:\„\@UU
+090B:\„\@\ÎR
+090C:\„\@\ÎL
+090D:\„\@CANDRA E
+090E:\„\@SHORT E
+090F:\„\@E
+0910:\„\@AI
+0911:\„\@CANDRA O
+0912:\„\@SHORT O
+0913:\„\@O
+0914:\„\@AU
+0915:\„\@KA
+0916:\„\@KHA
+0917:\„\@GA
+0918:\„\@GHA
+0919:\„\@NGA
+091A:\„\@CA
+091B:\„\@CHA
+091C:\„\@JA
+091D:\„\@JHA
+091E:\„\@NYA
+091F:\„\@TTA
+0920:\„\@TTHA
+0921:\„\@DDA
+0922:\„\@DDHA
+0923:\„\@NNA
+0924:\„\@TA
+0925:\„\@THA
+0926:\„\@DA
+0927:\„\@DHA
+0928:\„\@NA
+0929:\„\@NNNA
+092A:\„\@PA
+092B:\„\@PHA
+092C:\„\@BA
+092D:\„\@BHA
+092E:\„\@MA
+092F:\„\@YA
+0930:\„\@RA
+0931:\„\@RRA
+0932:\„\@LA
+0933:\„\@LLA
+0934:\„\@LLLA
+0935:\„\@VA
+0936:\„\@SHA
+0937:\„\@SSA
+0938:\„\@SA
+0939:\„\@HA
+093C:\„\‚ NUKTA
+093D:\„\‚ AVAGRAHA
+093E:\„\bAA
+093F:\„\bI
+0940:\„\bII
+0941:\„\bU
+0942:\„\bUU
+0943:\„\b\ÎR
+0944:\„\b\ÎRR
+0945:\„\bCANDRA E
+0946:\„\bSHORT E
+0947:\„\bE
+0948:\„\bAI
+0949:\„\bCANDRA O
+094A:\„\bSHORT O
+094B:\„\bO
+094C:\„\bAU
+094D:\„\‚ VIRAMA
+0950:\„ OM
+0951:\„ STRESS\‚ UDATTA
+0952:\„ STRESS\‚ ANUDATTA
+0953:\„ GRAVE\×
+0954:\„ \Ü\×
+0958:\„\@QA
+0959:\„\@KHHA
+095A:\„\@GHHA
+095B:\„\@ZA
+095C:\„\@DDDHA
+095D:\„\@RHA
+095E:\„\@FA
+095F:\„\@YYA
+0960:\„\@\ÎRR
+0961:\„\@\ÎLL
+0962:\„\b\ÎL
+0963:\„\b\ÎLL
+0964:\„ DANDA
+0965:\„ \0 DANDA
+0966:\„\hZERO
+0967:\„\hONE
+0968:\„\hTWO
+0969:\„\hTHREE
+096A:\„\hFOUR
+096B:\„\hFIVE
+096C:\„\hSIX
+096D:\„\hSEVEN
+096E:\„\hE\¼
+096F:\„\hNINE
+0970:\„ ABBREVI\”\‚
+0981:\°\‚ CANDRABINDU
+0982:\°\‚ ANUSVARA
+0983:\°\‚ VISARGA
+0985:\°\@A
+0986:\°\@AA
+0987:\°\@I
+0988:\°\@II
+0989:\°\@U
+098A:\°\@UU
+098B:\°\@\ÎR
+098C:\°\@\ÎL
+098F:\°\@E
+0990:\°\@AI
+0993:\°\@O
+0994:\°\@AU
+0995:\°\@KA
+0996:\°\@KHA
+0997:\°\@GA
+0998:\°\@GHA
+0999:\°\@NGA
+099A:\°\@CA
+099B:\°\@CHA
+099C:\°\@JA
+099D:\°\@JHA
+099E:\°\@NYA
+099F:\°\@TTA
+09A0:\°\@TTHA
+09A1:\°\@DDA
+09A2:\°\@DDHA
+09A3:\°\@NNA
+09A4:\°\@TA
+09A5:\°\@THA
+09A6:\°\@DA
+09A7:\°\@DHA
+09A8:\°\@NA
+09AA:\°\@PA
+09AB:\°\@PHA
+09AC:\°\@BA
+09AD:\°\@BHA
+09AE:\°\@MA
+09AF:\°\@YA
+09B0:\°\@RA
+09B2:\°\@LA
+09B6:\°\@SHA
+09B7:\°\@SSA
+09B8:\°\@SA
+09B9:\°\@HA
+09BC:\°\‚ NUKTA
+09BE:\°\bAA
+09BF:\°\bI
+09C0:\°\bII
+09C1:\°\bU
+09C2:\°\bUU
+09C3:\°\b\ÎR
+09C4:\°\b\ÎRR
+09C7:\°\bE
+09C8:\°\bAI
+09CB:\°\bO
+09CC:\°\bAU
+09CD:\°\‚ VIRAMA
+09D7:\° AU LENGTH\¥
+09DC:\°\@RRA
+09DD:\°\@RHA
+09DF:\°\@YYA
+09E0:\°\@\ÎRR
+09E1:\°\@\ÎLL
+09E2:\°\b\ÎL
+09E3:\°\b\ÎLL
+09E6:\°\hZERO
+09E7:\°\hONE
+09E8:\°\hTWO
+09E9:\°\hTHREE
+09EA:\°\hFOUR
+09EB:\°\hFIVE
+09EC:\°\hSIX
+09ED:\°\hSEVEN
+09EE:\°\hE\¼
+09EF:\°\hNINE
+09F0:\°\@RA\HMIDDLE DIAGONAL
+09F1:\°\@RA\H\ïDIAGONAL
+09F2:\° RUPEE\¥
+09F3:\° RUPEE\‚
+09F4:\° CURRENCY NUMERATOR ONE
+09F5:\° CURRENCY NUMERATOR TWO
+09F6:\° CURRENCY NUMERATOR THREE
+09F7:\° CURRENCY NUMERATOR FOUR
+09F8:\° CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR
+09F9:\° CURRENCY DENOMINATOR SIXTEEN
+09FA:\° ISSHAR
+0A02:\¯\‚ BINDI
+0A05:\¯\@A
+0A06:\¯\@AA
+0A07:\¯\@I
+0A08:\¯\@II
+0A09:\¯\@U
+0A0A:\¯\@UU
+0A0F:\¯\@EE
+0A10:\¯\@AI
+0A13:\¯\@OO
+0A14:\¯\@AU
+0A15:\¯\@KA
+0A16:\¯\@KHA
+0A17:\¯\@GA
+0A18:\¯\@GHA
+0A19:\¯\@NGA
+0A1A:\¯\@CA
+0A1B:\¯\@CHA
+0A1C:\¯\@JA
+0A1D:\¯\@JHA
+0A1E:\¯\@NYA
+0A1F:\¯\@TTA
+0A20:\¯\@TTHA
+0A21:\¯\@DDA
+0A22:\¯\@DDHA
+0A23:\¯\@NNA
+0A24:\¯\@TA
+0A25:\¯\@THA
+0A26:\¯\@DA
+0A27:\¯\@DHA
+0A28:\¯\@NA
+0A2A:\¯\@PA
+0A2B:\¯\@PHA
+0A2C:\¯\@BA
+0A2D:\¯\@BHA
+0A2E:\¯\@MA
+0A2F:\¯\@YA
+0A30:\¯\@RA
+0A32:\¯\@LA
+0A33:\¯\@LLA
+0A35:\¯\@VA
+0A36:\¯\@SHA
+0A38:\¯\@SA
+0A39:\¯\@HA
+0A3C:\¯\‚ NUKTA
+0A3E:\¯\bAA
+0A3F:\¯\bI
+0A40:\¯\bII
+0A41:\¯\bU
+0A42:\¯\bUU
+0A47:\¯\bEE
+0A48:\¯\bAI
+0A4B:\¯\bOO
+0A4C:\¯\bAU
+0A4D:\¯\‚ VIRAMA
+0A59:\¯\@KHHA
+0A5A:\¯\@GHHA
+0A5B:\¯\@ZA
+0A5C:\¯\@RRA
+0A5E:\¯\@FA
+0A66:\¯\hZERO
+0A67:\¯\hONE
+0A68:\¯\hTWO
+0A69:\¯\hTHREE
+0A6A:\¯\hFOUR
+0A6B:\¯\hFIVE
+0A6C:\¯\hSIX
+0A6D:\¯\hSEVEN
+0A6E:\¯\hE\¼
+0A6F:\¯\hNINE
+0A70:\¯ TIPPI
+0A71:\¯ ADDAK
+0A72:\¯ IRI
+0A73:\¯ URA
+0A74:\¯ EK ONKAR
+0A81:\ª\‚ CANDRABINDU
+0A82:\ª\‚ ANUSVARA
+0A83:\ª\‚ VISARGA
+0A85:\ª\@A
+0A86:\ª\@AA
+0A87:\ª\@I
+0A88:\ª\@II
+0A89:\ª\@U
+0A8A:\ª\@UU
+0A8B:\ª\@\ÎR
+0A8D:\ª VOWEL CANDRA E
+0A8F:\ª\@E
+0A90:\ª\@AI
+0A91:\ª VOWEL CANDRA O
+0A93:\ª\@O
+0A94:\ª\@AU
+0A95:\ª\@KA
+0A96:\ª\@KHA
+0A97:\ª\@GA
+0A98:\ª\@GHA
+0A99:\ª\@NGA
+0A9A:\ª\@CA
+0A9B:\ª\@CHA
+0A9C:\ª\@JA
+0A9D:\ª\@JHA
+0A9E:\ª\@NYA
+0A9F:\ª\@TTA
+0AA0:\ª\@TTHA
+0AA1:\ª\@DDA
+0AA2:\ª\@DDHA
+0AA3:\ª\@NNA
+0AA4:\ª\@TA
+0AA5:\ª\@THA
+0AA6:\ª\@DA
+0AA7:\ª\@DHA
+0AA8:\ª\@NA
+0AAA:\ª\@PA
+0AAB:\ª\@PHA
+0AAC:\ª\@BA
+0AAD:\ª\@BHA
+0AAE:\ª\@MA
+0AAF:\ª\@YA
+0AB0:\ª\@RA
+0AB2:\ª\@LA
+0AB3:\ª\@LLA
+0AB5:\ª\@VA
+0AB6:\ª\@SHA
+0AB7:\ª\@SSA
+0AB8:\ª\@SA
+0AB9:\ª\@HA
+0ABC:\ª\‚ NUKTA
+0ABD:\ª\‚ AVAGRAHA
+0ABE:\ª\bAA
+0ABF:\ª\bI
+0AC0:\ª\bII
+0AC1:\ª\bU
+0AC2:\ª\bUU
+0AC3:\ª\b\ÎR
+0AC4:\ª\b\ÎRR
+0AC5:\ª\bCANDRA E
+0AC7:\ª\bE
+0AC8:\ª\bAI
+0AC9:\ª\bCANDRA O
+0ACB:\ª\bO
+0ACC:\ª\bAU
+0ACD:\ª\‚ VIRAMA
+0AD0:\ª OM
+0AE0:\ª\@\ÎRR
+0AE6:\ª\hZERO
+0AE7:\ª\hONE
+0AE8:\ª\hTWO
+0AE9:\ª\hTHREE
+0AEA:\ª\hFOUR
+0AEB:\ª\hFIVE
+0AEC:\ª\hSIX
+0AED:\ª\hSEVEN
+0AEE:\ª\hE\¼
+0AEF:\ª\hNINE
+0B01:ORIYA\‚ CANDRABINDU
+0B02:ORIYA\‚ ANUSVARA
+0B03:ORIYA\‚ VISARGA
+0B05:\âA
+0B06:\âAA
+0B07:\âI
+0B08:\âII
+0B09:\âU
+0B0A:\âUU
+0B0B:\â\ÎR
+0B0C:\â\ÎL
+0B0F:\âE
+0B10:\âAI
+0B13:\âO
+0B14:\âAU
+0B15:\âKA
+0B16:\âKHA
+0B17:\âGA
+0B18:\âGHA
+0B19:\âNGA
+0B1A:\âCA
+0B1B:\âCHA
+0B1C:\âJA
+0B1D:\âJHA
+0B1E:\âNYA
+0B1F:\âTTA
+0B20:\âTTHA
+0B21:\âDDA
+0B22:\âDDHA
+0B23:\âNNA
+0B24:\âTA
+0B25:\âTHA
+0B26:\âDA
+0B27:\âDHA
+0B28:\âNA
+0B2A:\âPA
+0B2B:\âPHA
+0B2C:\âBA
+0B2D:\âBHA
+0B2E:\âMA
+0B2F:\âYA
+0B30:\âRA
+0B32:\âLA
+0B33:\âLLA
+0B36:\âSHA
+0B37:\âSSA
+0B38:\âSA
+0B39:\âHA
+0B3C:ORIYA\‚ NUKTA
+0B3D:ORIYA\‚ AVAGRAHA
+0B3E:ORIYA\bAA
+0B3F:ORIYA\bI
+0B40:ORIYA\bII
+0B41:ORIYA\bU
+0B42:ORIYA\bUU
+0B43:ORIYA\b\ÎR
+0B47:ORIYA\bE
+0B48:ORIYA\bAI
+0B4B:ORIYA\bO
+0B4C:ORIYA\bAU
+0B4D:ORIYA\‚ VIRAMA
+0B56:ORIYA AI LENGTH\¥
+0B57:ORIYA AU LENGTH\¥
+0B5C:\âRRA
+0B5D:\âRHA
+0B5F:\âYYA
+0B60:\â\ÎRR
+0B61:\â\ÎLL
+0B66:ORIYA\hZERO
+0B67:ORIYA\hONE
+0B68:ORIYA\hTWO
+0B69:ORIYA\hTHREE
+0B6A:ORIYA\hFOUR
+0B6B:ORIYA\hFIVE
+0B6C:ORIYA\hSIX
+0B6D:ORIYA\hSEVEN
+0B6E:ORIYA\hE\¼
+0B6F:ORIYA\hNINE
+0B70:ORIYA ISSHAR
+0B82:TAMIL\‚ ANUSVARA
+0B83:TAMIL\‚ VISARGA
+0B85:TAMIL\@A
+0B86:TAMIL\@AA
+0B87:TAMIL\@I
+0B88:TAMIL\@II
+0B89:TAMIL\@U
+0B8A:TAMIL\@UU
+0B8E:TAMIL\@E
+0B8F:TAMIL\@EE
+0B90:TAMIL\@AI
+0B92:TAMIL\@O
+0B93:TAMIL\@OO
+0B94:TAMIL\@AU
+0B95:TAMIL\@KA
+0B99:TAMIL\@NGA
+0B9A:TAMIL\@CA
+0B9C:TAMIL\@JA
+0B9E:TAMIL\@NYA
+0B9F:TAMIL\@TTA
+0BA3:TAMIL\@NNA
+0BA4:TAMIL\@TA
+0BA8:TAMIL\@NA
+0BA9:TAMIL\@NNNA
+0BAA:TAMIL\@PA
+0BAE:TAMIL\@MA
+0BAF:TAMIL\@YA
+0BB0:TAMIL\@RA
+0BB1:TAMIL\@RRA
+0BB2:TAMIL\@LA
+0BB3:TAMIL\@LLA
+0BB4:TAMIL\@LLLA
+0BB5:TAMIL\@VA
+0BB7:TAMIL\@SSA
+0BB8:TAMIL\@SA
+0BB9:TAMIL\@HA
+0BBE:TAMIL\bAA
+0BBF:TAMIL\bI
+0BC0:TAMIL\bII
+0BC1:TAMIL\bU
+0BC2:TAMIL\bUU
+0BC6:TAMIL\bE
+0BC7:TAMIL\bEE
+0BC8:TAMIL\bAI
+0BCA:TAMIL\bO
+0BCB:TAMIL\bOO
+0BCC:TAMIL\bAU
+0BCD:TAMIL\‚ VIRAMA
+0BD7:TAMIL AU LENGTH\¥
+0BE7:TAMIL\hONE
+0BE8:TAMIL\hTWO
+0BE9:TAMIL\hTHREE
+0BEA:TAMIL\hFOUR
+0BEB:TAMIL\hFIVE
+0BEC:TAMIL\hSIX
+0BED:TAMIL\hSEVEN
+0BEE:TAMIL\hE\¼
+0BEF:TAMIL\hNINE
+0BF0:TAMIL \­TEN
+0BF1:TAMIL \­ONE HUNDRED
+0BF2:TAMIL \­ONE THOUSAND
+0C01:\Ï\‚ CANDRABINDU
+0C02:\Ï\‚ ANUSVARA
+0C03:\Ï\‚ VISARGA
+0C05:\Ï\@A
+0C06:\Ï\@AA
+0C07:\Ï\@I
+0C08:\Ï\@II
+0C09:\Ï\@U
+0C0A:\Ï\@UU
+0C0B:\Ï\@\ÎR
+0C0C:\Ï\@\ÎL
+0C0E:\Ï\@E
+0C0F:\Ï\@EE
+0C10:\Ï\@AI
+0C12:\Ï\@O
+0C13:\Ï\@OO
+0C14:\Ï\@AU
+0C15:\Ï\@KA
+0C16:\Ï\@KHA
+0C17:\Ï\@GA
+0C18:\Ï\@GHA
+0C19:\Ï\@NGA
+0C1A:\Ï\@CA
+0C1B:\Ï\@CHA
+0C1C:\Ï\@JA
+0C1D:\Ï\@JHA
+0C1E:\Ï\@NYA
+0C1F:\Ï\@TTA
+0C20:\Ï\@TTHA
+0C21:\Ï\@DDA
+0C22:\Ï\@DDHA
+0C23:\Ï\@NNA
+0C24:\Ï\@TA
+0C25:\Ï\@THA
+0C26:\Ï\@DA
+0C27:\Ï\@DHA
+0C28:\Ï\@NA
+0C2A:\Ï\@PA
+0C2B:\Ï\@PHA
+0C2C:\Ï\@BA
+0C2D:\Ï\@BHA
+0C2E:\Ï\@MA
+0C2F:\Ï\@YA
+0C30:\Ï\@RA
+0C31:\Ï\@RRA
+0C32:\Ï\@LA
+0C33:\Ï\@LLA
+0C35:\Ï\@VA
+0C36:\Ï\@SHA
+0C37:\Ï\@SSA
+0C38:\Ï\@SA
+0C39:\Ï\@HA
+0C3E:\Ï\bAA
+0C3F:\Ï\bI
+0C40:\Ï\bII
+0C41:\Ï\bU
+0C42:\Ï\bUU
+0C43:\Ï\b\ÎR
+0C44:\Ï\b\ÎRR
+0C46:\Ï\bE
+0C47:\Ï\bEE
+0C48:\Ï\bAI
+0C4A:\Ï\bO
+0C4B:\Ï\bOO
+0C4C:\Ï\bAU
+0C4D:\Ï\‚ VIRAMA
+0C55:\Ï LENGTH\¥
+0C56:\Ï AI LENGTH\¥
+0C60:\Ï\@\ÎRR
+0C61:\Ï\@\ÎLL
+0C66:\Ï\hZERO
+0C67:\Ï\hONE
+0C68:\Ï\hTWO
+0C69:\Ï\hTHREE
+0C6A:\Ï\hFOUR
+0C6B:\Ï\hFIVE
+0C6C:\Ï\hSIX
+0C6D:\Ï\hSEVEN
+0C6E:\Ï\hE\¼
+0C6F:\Ï\hNINE
+0C82:\»\‚ ANUSVARA
+0C83:\»\‚ VISARGA
+0C85:\»\@A
+0C86:\»\@AA
+0C87:\»\@I
+0C88:\»\@II
+0C89:\»\@U
+0C8A:\»\@UU
+0C8B:\»\@\ÎR
+0C8C:\»\@\ÎL
+0C8E:\»\@E
+0C8F:\»\@EE
+0C90:\»\@AI
+0C92:\»\@O
+0C93:\»\@OO
+0C94:\»\@AU
+0C95:\»\@KA
+0C96:\»\@KHA
+0C97:\»\@GA
+0C98:\»\@GHA
+0C99:\»\@NGA
+0C9A:\»\@CA
+0C9B:\»\@CHA
+0C9C:\»\@JA
+0C9D:\»\@JHA
+0C9E:\»\@NYA
+0C9F:\»\@TTA
+0CA0:\»\@TTHA
+0CA1:\»\@DDA
+0CA2:\»\@DDHA
+0CA3:\»\@NNA
+0CA4:\»\@TA
+0CA5:\»\@THA
+0CA6:\»\@DA
+0CA7:\»\@DHA
+0CA8:\»\@NA
+0CAA:\»\@PA
+0CAB:\»\@PHA
+0CAC:\»\@BA
+0CAD:\»\@BHA
+0CAE:\»\@MA
+0CAF:\»\@YA
+0CB0:\»\@RA
+0CB1:\»\@RRA
+0CB2:\»\@LA
+0CB3:\»\@LLA
+0CB5:\»\@VA
+0CB6:\»\@SHA
+0CB7:\»\@SSA
+0CB8:\»\@SA
+0CB9:\»\@HA
+0CBE:\»\bAA
+0CBF:\»\bI
+0CC0:\»\bII
+0CC1:\»\bU
+0CC2:\»\bUU
+0CC3:\»\b\ÎR
+0CC4:\»\b\ÎRR
+0CC6:\»\bE
+0CC7:\»\bEE
+0CC8:\»\bAI
+0CCA:\»\bO
+0CCB:\»\bOO
+0CCC:\»\bAU
+0CCD:\»\‚ VIRAMA
+0CD5:\» LENGTH\¥
+0CD6:\» AI LENGTH\¥
+0CDE:\»\@FA
+0CE0:\»\@\ÎRR
+0CE1:\»\@\ÎLL
+0CE6:\»\hZERO
+0CE7:\»\hONE
+0CE8:\»\hTWO
+0CE9:\»\hTHREE
+0CEA:\»\hFOUR
+0CEB:\»\hFIVE
+0CEC:\»\hSIX
+0CED:\»\hSEVEN
+0CEE:\»\hE\¼
+0CEF:\»\hNINE
+0D02:\š\‚ ANUSVARA
+0D03:\š\‚ VISARGA
+0D05:\š\@A
+0D06:\š\@AA
+0D07:\š\@I
+0D08:\š\@II
+0D09:\š\@U
+0D0A:\š\@UU
+0D0B:\š\@\ÎR
+0D0C:\š\@\ÎL
+0D0E:\š\@E
+0D0F:\š\@EE
+0D10:\š\@AI
+0D12:\š\@O
+0D13:\š\@OO
+0D14:\š\@AU
+0D15:\š\@KA
+0D16:\š\@KHA
+0D17:\š\@GA
+0D18:\š\@GHA
+0D19:\š\@NGA
+0D1A:\š\@CA
+0D1B:\š\@CHA
+0D1C:\š\@JA
+0D1D:\š\@JHA
+0D1E:\š\@NYA
+0D1F:\š\@TTA
+0D20:\š\@TTHA
+0D21:\š\@DDA
+0D22:\š\@DDHA
+0D23:\š\@NNA
+0D24:\š\@TA
+0D25:\š\@THA
+0D26:\š\@DA
+0D27:\š\@DHA
+0D28:\š\@NA
+0D2A:\š\@PA
+0D2B:\š\@PHA
+0D2C:\š\@BA
+0D2D:\š\@BHA
+0D2E:\š\@MA
+0D2F:\š\@YA
+0D30:\š\@RA
+0D31:\š\@RRA
+0D32:\š\@LA
+0D33:\š\@LLA
+0D34:\š\@LLLA
+0D35:\š\@VA
+0D36:\š\@SHA
+0D37:\š\@SSA
+0D38:\š\@SA
+0D39:\š\@HA
+0D3E:\š\bAA
+0D3F:\š\bI
+0D40:\š\bII
+0D41:\š\bU
+0D42:\š\bUU
+0D43:\š\b\ÎR
+0D46:\š\bE
+0D47:\š\bEE
+0D48:\š\bAI
+0D4A:\š\bO
+0D4B:\š\bOO
+0D4C:\š\bAU
+0D4D:\š\‚ VIRAMA
+0D57:\š AU LENGTH\¥
+0D60:\š\@\ÎRR
+0D61:\š\@\ÎLL
+0D66:\š\hZERO
+0D67:\š\hONE
+0D68:\š\hTWO
+0D69:\š\hTHREE
+0D6A:\š\hFOUR
+0D6B:\š\hFIVE
+0D6C:\š\hSIX
+0D6D:\š\hSEVEN
+0D6E:\š\hE\¼
+0D6F:\š\hNINE
+0D82:SINHALA\‚ ANUSVARAYA
+0D83:SINHALA\‚ VISARGAYA
+0D85:\¶AYANNA
+0D86:\¶AAYANNA
+0D87:\¶AEYANNA
+0D88:\¶AEEYANNA
+0D89:\¶IYANNA
+0D8A:\¶IIYANNA
+0D8B:\¶UYANNA
+0D8C:\¶UUYANNA
+0D8D:\¶IRUYANNA
+0D8E:\¶IRUUYANNA
+0D8F:\¶ILUYANNA
+0D90:\¶ILUUYANNA
+0D91:\¶EYANNA
+0D92:\¶EEYANNA
+0D93:\¶AIYANNA
+0D94:\¶OYANNA
+0D95:\¶OOYANNA
+0D96:\¶AUYANNA
+0D9A:\¶ALPAPRAANA KAYANNA
+0D9B:\¶MAHAAPRAANA KAYANNA
+0D9C:\¶ALPAPRAANA GAYANNA
+0D9D:\¶MAHAAPRAANA GAYANNA
+0D9E:\¶KANTAJA NAASIKYAYA
+0D9F:\¶SANYAKA GAYANNA
+0DA0:\¶ALPAPRAANA CAYANNA
+0DA1:\¶MAHAAPRAANA CAYANNA
+0DA2:\¶ALPAPRAANA JAYANNA
+0DA3:\¶MAHAAPRAANA JAYANNA
+0DA4:\¶TAALUJA NAASIKYAYA
+0DA5:\¶TAALUJA SANYOOGA NAAKSIKYAYA
+0DA6:\¶SANYAKA JAYANNA
+0DA7:\¶ALPAPRAANA TTAYANNA
+0DA8:\¶MAHAAPRAANA TTAYANNA
+0DA9:\¶ALPAPRAANA DDAYANNA
+0DAA:\¶MAHAAPRAANA DDAYANNA
+0DAB:\¶MUURDHAJA NAYANNA
+0DAC:\¶SANYAKA DDAYANNA
+0DAD:\¶ALPAPRAANA TAYANNA
+0DAE:\¶MAHAAPRAANA TAYANNA
+0DAF:\¶ALPAPRAANA DAYANNA
+0DB0:\¶MAHAAPRAANA DAYANNA
+0DB1:\¶DANTAJA NAYANNA
+0DB3:\¶SANYAKA DAYANNA
+0DB4:\¶ALPAPRAANA PAYANNA
+0DB5:\¶MAHAAPRAANA PAYANNA
+0DB6:\¶ALPAPRAANA BAYANNA
+0DB7:\¶MAHAAPRAANA BAYANNA
+0DB8:\¶MAYANNA
+0DB9:\¶AMBA BAYANNA
+0DBA:\¶YAYANNA
+0DBB:\¶RAYANNA
+0DBD:\¶DANTAJA LAYANNA
+0DC0:\¶VAYANNA
+0DC1:\¶TAALUJA SAYANNA
+0DC2:\¶MUURDHAJA SAYANNA
+0DC3:\¶DANTAJA SAYANNA
+0DC4:\¶HAYANNA
+0DC5:\¶MUURDHAJA LAYANNA
+0DC6:\¶FAYANNA
+0DCA:SINHALA\‚ AL-LAKUNA
+0DCF:SINHALA\bAELA-PILLA
+0DD0:SINHALA\bKETTI AEDA-PILLA
+0DD1:SINHALA\bDIGA AEDA-PILLA
+0DD2:SINHALA\bKETTI IS-PILLA
+0DD3:SINHALA\bDIGA IS-PILLA
+0DD4:SINHALA\bKETTI PAA-PILLA
+0DD6:SINHALA\bDIGA PAA-PILLA
+0DD8:SINHALA\bGAETTA-PILLA
+0DD9:SINHALA\bKOMBUVA
+0DDA:SINHALA\bDIGA KOMBUVA
+0DDB:SINHALA\bKOMBU DEKA
+0DDC:SINHALA\bKOMBUVA HAA AELA-PILLA
+0DDD:SINHALA\bKOMBUVA HAA DIGA AELA-PILLA
+0DDE:SINHALA\bKOMBUVA HAA GAYANUKITTA
+0DDF:SINHALA\bGAYANUKITTA
+0DF2:SINHALA\bDIGA GAETTA-PILLA
+0DF3:SINHALA\bDIGA GAYANUKITTA
+0DF4:SINHALA PUNCTU\” KUNDDALIYA
+0E01:\3KO KAI
+0E02:\3KHO KHAI
+0E03:\3KHO KHUAT
+0E04:\3KHO KHWAI
+0E05:\3KHO KHON
+0E06:\3KHO RAKHANG
+0E07:\3NGO NGU
+0E08:\3CHO CHAN
+0E09:\3CHO CH\ô
+0E0A:\3CHO CHANG
+0E0B:\3SO SO
+0E0C:\3CHO CHOE
+0E0D:\3YO Y\ô
+0E0E:\3DO CHADA
+0E0F:\3TO PATAK
+0E10:\3THO THAN
+0E11:\3THO NANGMONTHO
+0E12:\3THO PHUTHAO
+0E13:\3NO NEN
+0E14:\3DO DEK
+0E15:\3TO TAO
+0E16:\3THO THUNG
+0E17:\3THO THAHAN
+0E18:\3THO THONG
+0E19:\3NO NU
+0E1A:\3BO BAIMAI
+0E1B:\3PO PLA
+0E1C:\3PHO PHUNG
+0E1D:\3FO FA
+0E1E:\3PHO PHAN
+0E1F:\3FO FAN
+0E20:\3PHO SAMPHAO
+0E21:\3MO MA
+0E22:\3YO YAK
+0E23:\3RO RUA
+0E24:\3RU
+0E25:\3LO L\ô
+0E26:\3LU
+0E27:\3WO WAEN
+0E28:\3SO SALA
+0E29:\3SO RUSI
+0E2A:\3SO SUA
+0E2B:\3HO HIP
+0E2C:\3LO CHULA
+0E2D:\3O ANG
+0E2E:\3HO NOKHUK
+0E2F:\3PAIYANNOI
+0E30:\3SARA A
+0E31:\3MAI HAN-AKAT
+0E32:\3SARA AA
+0E33:\3SARA AM
+0E34:\3SARA I
+0E35:\3SARA II
+0E36:\3SARA UE
+0E37:\3SARA UEE
+0E38:\3SARA U
+0E39:\3SARA UU
+0E3A:\3PHINTHU
+0E3F:THAI CURRENCY \ BAHT
+0E40:\3SARA E
+0E41:\3SARA AE
+0E42:\3SARA O
+0E43:\3SARA AI MAIMUAN
+0E44:\3SARA AI MAIMALAI
+0E45:\3LAKKHANGYAO
+0E46:\3MAIYAMOK
+0E47:\3MAITAIKHU
+0E48:\3MAI EK
+0E49:\3MAI THO
+0E4A:\3MAI TRI
+0E4B:\3MAI CHATTAWA
+0E4C:\3THANTHAKHAT
+0E4D:\3NIKHAHIT
+0E4E:\3YAMAKKAN
+0E4F:\3FONGMAN
+0E50:THAI\hZERO
+0E51:THAI\hONE
+0E52:THAI\hTWO
+0E53:THAI\hTHREE
+0E54:THAI\hFOUR
+0E55:THAI\hFIVE
+0E56:THAI\hSIX
+0E57:THAI\hSEVEN
+0E58:THAI\hE\¼
+0E59:THAI\hNINE
+0E5A:\3ANGKHANKHU
+0E5B:\3KHOMUT
+0E81:LAO\@KO
+0E82:LAO\@KHO SUNG
+0E84:LAO\@KHO TAM
+0E87:LAO\@NGO
+0E88:LAO\@CO
+0E8A:LAO\@SO TAM
+0E8D:LAO\@NYO
+0E94:LAO\@DO
+0E95:LAO\@TO
+0E96:LAO\@THO SUNG
+0E97:LAO\@THO TAM
+0E99:LAO\@NO
+0E9A:LAO\@BO
+0E9B:LAO\@PO
+0E9C:LAO\@PHO SUNG
+0E9D:LAO\@FO TAM
+0E9E:LAO\@PHO TAM
+0E9F:LAO\@FO SUNG
+0EA1:LAO\@MO
+0EA2:LAO\@YO
+0EA3:LAO\@LO L\ô
+0EA5:LAO\@LO LOOT
+0EA7:LAO\@WO
+0EAA:LAO\@SO SUNG
+0EAB:LAO\@HO SUNG
+0EAD:LAO\@O
+0EAE:LAO\@HO TAM
+0EAF:LAO ELLIPSIS
+0EB0:LAO\bA
+0EB1:LAO\bMAI KAN
+0EB2:LAO\bAA
+0EB3:LAO\bAM
+0EB4:LAO\bI
+0EB5:LAO\bII
+0EB6:LAO\bY
+0EB7:LAO\bYY
+0EB8:LAO\bU
+0EB9:LAO\bUU
+0EBB:LAO\bMAI KON
+0EBC:LAO SEMIVOWEL\‚ LO
+0EBD:LAO SEMIVOWEL\‚ NYO
+0EC0:LAO\bE
+0EC1:LAO\bEI
+0EC2:LAO\bO
+0EC3:LAO\bAY
+0EC4:LAO\bAI
+0EC6:LAO KO LA
+0EC8:LAO TONE MAI EK
+0EC9:LAO TONE MAI THO
+0ECA:LAO TONE MAI TI
+0ECB:LAO TONE MAI CATAWA
+0ECC:LAO CANCELL\”\¥
+0ECD:LAO NIGGAHITA
+0ED0:LAO\hZERO
+0ED1:LAO\hONE
+0ED2:LAO\hTWO
+0ED3:LAO\hTHREE
+0ED4:LAO\hFOUR
+0ED5:LAO\hFIVE
+0ED6:LAO\hSIX
+0ED7:LAO\hSEVEN
+0ED8:LAO\hE\¼
+0ED9:LAO\hNINE
+0EDC:LAO HO NO
+0EDD:LAO HO MO
+0F00:\5\COM
+0F01:\5\¥ GTER YIG MGO TRUNCAT\ÂA
+0F02:\5\¥ GTER YIG MGO -UM RNAM BCAD MA
+0F03:\5\¥ GTER YIG MGO -UM GTER TSHEG MA
+0F04:\5\¥ INITIAL YIG MGO MDUN MA
+0F05:\5\¥ CLOS\ô YIG MGO SGAB MA
+0F06:\5\¥ CARET YIG MGO PHUR SHAD MA
+0F07:\5\¥ YIG MGO TSHEG SHAD MA
+0F08:\5\¥ SBRUL SHAD
+0F09:\5\¥ BSKUR YIG MGO
+0F0A:\5\¥ BKA- SHOG YIG MGO
+0F0B:\5\¥ INTERSYLLABIC TSHEG
+0F0C:\5\¥ DELIMITER TSHEG BSTAR
+0F0D:\5\¥ SHAD
+0F0E:\5\¥ NYIS SHAD
+0F0F:\5\¥ TSHEG SHAD
+0F10:\5\¥ NYIS TSHEG SHAD
+0F11:\5\¥ RIN CHEN SPUNGS SHAD
+0F12:\5\¥ RGYA GRAM SHAD
+0F13:\5\¥ CARET -DZUD RTAGS ME LONG CAN
+0F14:\5\¥ GTER TSHEG
+0F15:\5 LOGOTYPE\‚ CHAD RTAGS
+0F16:\5 LOGOTYPE\‚ LHAG RTAGS
+0F17:\5 ASTROLOGICAL\‚ SGRA GCAN -CHAR RTAGS
+0F18:\5 ASTROLOGICAL\‚ -KHYUD PA
+0F19:\5 ASTROLOGICAL\‚ SDONG TSHUGS
+0F1A:\5\‚ RDEL DKAR GCIG
+0F1B:\5\‚ RDEL DKAR GNYIS
+0F1C:\5\‚ RDEL DKAR GSUM
+0F1D:\5\‚ RDEL NAG GCIG
+0F1E:\5\‚ RDEL NAG GNYIS
+0F1F:\5\‚ RDEL DKAR RDEL NAG
+0F20:\5\hZERO
+0F21:\5\hONE
+0F22:\5\hTWO
+0F23:\5\hTHREE
+0F24:\5\hFOUR
+0F25:\5\hFIVE
+0F26:\5\hSIX
+0F27:\5\hSEVEN
+0F28:\5\hE\¼
+0F29:\5\hNINE
+0F2A:\5\hHALF ONE
+0F2B:\5\hHALF TWO
+0F2C:\5\hHALF THREE
+0F2D:\5\hHALF FOUR
+0F2E:\5\hHALF FIVE
+0F2F:\5\hHALF SIX
+0F30:\5\hHALF SEVEN
+0F31:\5\hHALF E\¼
+0F32:\5\hHALF NINE
+0F33:\5\hHALF ZERO
+0F34:\5\¥ BSDUS RTAGS
+0F35:\5\¥ NGAS BZUNG NYI ZLA
+0F36:\5\¥ CARET -DZUD RTAGS BZHI MIG CAN
+0F37:\5\¥ NGAS BZUNG SGOR RTAGS
+0F38:\5\¥ CHE MGO
+0F39:\5\¥ TSA -PHRU
+0F3A:\5\¥ GUG RTAGS GYON
+0F3B:\5\¥ GUG RTAGS GYAS
+0F3C:\5\¥ ANG KHANG GYON
+0F3D:\5\¥ ANG KHANG GYAS
+0F3E:\5\‚ YAR TSHES
+0F3F:\5\‚ MAR TSHES
+0F40:\5\@KA
+0F41:\5\@KHA
+0F42:\5\@GA
+0F43:\5\@GHA
+0F44:\5\@NGA
+0F45:\5\@CA
+0F46:\5\@CHA
+0F47:\5\@JA
+0F49:\5\@NYA
+0F4A:\5\@TTA
+0F4B:\5\@TTHA
+0F4C:\5\@DDA
+0F4D:\5\@DDHA
+0F4E:\5\@NNA
+0F4F:\5\@TA
+0F50:\5\@THA
+0F51:\5\@DA
+0F52:\5\@DHA
+0F53:\5\@NA
+0F54:\5\@PA
+0F55:\5\@PHA
+0F56:\5\@BA
+0F57:\5\@BHA
+0F58:\5\@MA
+0F59:\5\@TSA
+0F5A:\5\@TSHA
+0F5B:\5\@DZA
+0F5C:\5\@DZHA
+0F5D:\5\@WA
+0F5E:\5\@ZHA
+0F5F:\5\@ZA
+0F60:\5\@-A
+0F61:\5\@YA
+0F62:\5\@RA
+0F63:\5\@LA
+0F64:\5\@SHA
+0F65:\5\@SSA
+0F66:\5\@SA
+0F67:\5\@HA
+0F68:\5\@A
+0F69:\5\@KSSA
+0F6A:\5\@FIXED-FORM RA
+0F71:\5\bAA
+0F72:\5\bI
+0F73:\5\bII
+0F74:\5\bU
+0F75:\5\bUU
+0F76:\5\b\ÎR
+0F77:\5\b\ÎRR
+0F78:\5\b\ÎL
+0F79:\5\b\ÎLL
+0F7A:\5\bE
+0F7B:\5\bEE
+0F7C:\5\bO
+0F7D:\5\bOO
+0F7E:\5\‚ RJES SU NGA RO
+0F7F:\5\‚ RNAM BCAD
+0F80:\5\b\öI
+0F81:\5\b\öII
+0F82:\5\‚ NYI ZLA NAA DA
+0F83:\5\‚ SNA LDAN
+0F84:\5\¥ HALANTA
+0F85:\5\¥ PALUTA
+0F86:\5\‚ LCI RTAGS
+0F87:\5\‚ YANG RTAGS
+0F88:\5\‚ LCE TSA CAN
+0F89:\5\‚ MCHU CAN
+0F8A:\5\‚ GRU CAN RGY\ôS
+0F8B:\5\‚ GRU M\ÂRGY\ôS
+0F90:\KA
+0F91:\KHA
+0F92:\GA
+0F93:\GHA
+0F94:\NGA
+0F95:\CA
+0F96:\CHA
+0F97:\JA
+0F99:\NYA
+0F9A:\TTA
+0F9B:\TTHA
+0F9C:\DDA
+0F9D:\DDHA
+0F9E:\NNA
+0F9F:\TA
+0FA0:\THA
+0FA1:\DA
+0FA2:\DHA
+0FA3:\NA
+0FA4:\PA
+0FA5:\PHA
+0FA6:\BA
+0FA7:\BHA
+0FA8:\MA
+0FA9:\TSA
+0FAA:\TSHA
+0FAB:\DZA
+0FAC:\DZHA
+0FAD:\WA
+0FAE:\ZHA
+0FAF:\ZA
+0FB0:\-A
+0FB1:\YA
+0FB2:\RA
+0FB3:\LA
+0FB4:\SHA
+0FB5:\SSA
+0FB6:\SA
+0FB7:\HA
+0FB8:\A
+0FB9:\KSSA
+0FBA:\FIXED-FORM WA
+0FBB:\FIXED-FORM YA
+0FBC:\FIXED-FORM RA
+0FBE:\5 KU RU KHA
+0FBF:\5 KU RU KHA BZHI MIG CAN
+0FC0:\5 CANTILL\”\‚ \Å BEAT
+0FC1:\5 CANTILL\”\‚ L\¼ BEAT
+0FC2:\5 CANTILL\”\‚ CANG TE-U
+0FC3:\5 CANTILL\”\‚ SBUB -CHAL
+0FC4:\5 \ DRIL BU
+0FC5:\5 \ RDO RJE
+0FC6:\5 \ PADMA GDAN
+0FC7:\5 \ RDO RJE RGYA GRAM
+0FC8:\5 \ PHUR PA
+0FC9:\5 \ NOR BU
+0FCA:\5 \ NOR BU NYIS -KHYIL
+0FCB:\5 \ NOR BU GSUM -KHYIL
+0FCC:\5 \ NOR BU BZHI -KHYIL
+0FCF:\5\‚ RDEL NAG GSUM
+1000:\½\@KA
+1001:\½\@KHA
+1002:\½\@GA
+1003:\½\@GHA
+1004:\½\@NGA
+1005:\½\@CA
+1006:\½\@CHA
+1007:\½\@JA
+1008:\½\@JHA
+1009:\½\@NYA
+100A:\½\@NNYA
+100B:\½\@TTA
+100C:\½\@TTHA
+100D:\½\@DDA
+100E:\½\@DDHA
+100F:\½\@NNA
+1010:\½\@TA
+1011:\½\@THA
+1012:\½\@DA
+1013:\½\@DHA
+1014:\½\@NA
+1015:\½\@PA
+1016:\½\@PHA
+1017:\½\@BA
+1018:\½\@BHA
+1019:\½\@MA
+101A:\½\@YA
+101B:\½\@RA
+101C:\½\@LA
+101D:\½\@WA
+101E:\½\@SA
+101F:\½\@HA
+1020:\½\@LLA
+1021:\½\@A
+1023:\½\@I
+1024:\½\@II
+1025:\½\@U
+1026:\½\@UU
+1027:\½\@E
+1029:\½\@O
+102A:\½\@AU
+102C:\½\bAA
+102D:\½\bI
+102E:\½\bII
+102F:\½\bU
+1030:\½\bUU
+1031:\½\bE
+1032:\½\bAI
+1036:\½\‚ ANUSVARA
+1037:\½\‚ DOT\…
+1038:\½\‚ VISARGA
+1039:\½\‚ VIRAMA
+1040:\½\hZERO
+1041:\½\hONE
+1042:\½\hTWO
+1043:\½\hTHREE
+1044:\½\hFOUR
+1045:\½\hFIVE
+1046:\½\hSIX
+1047:\½\hSEVEN
+1048:\½\hE\¼
+1049:\½\hNINE
+104A:\½\‚ LITTLE SECTION
+104B:\½\‚ SECTION
+104C:\½ \ LOCATIVE
+104D:\½ \ COMPLETED
+104E:\½ \ AFOREMENTIONED
+104F:\½ \ GENITIVE
+1050:\½\@SHA
+1051:\½\@SSA
+1052:\½\@\ÎR
+1053:\½\@\ÎRR
+1054:\½\@\ÎL
+1055:\½\@\ÎLL
+1056:\½\b\ÎR
+1057:\½\b\ÎRR
+1058:\½\b\ÎL
+1059:\½\b\ÎLL
+10A0:GEORGIAN\ãAN
+10A1:GEORGIAN\ãBAN
+10A2:GEORGIAN\ãGAN
+10A3:GEORGIAN\ãDON
+10A4:GEORGIAN\ãEN
+10A5:GEORGIAN\ãVIN
+10A6:GEORGIAN\ãZEN
+10A7:GEORGIAN\ãTAN
+10A8:GEORGIAN\ãIN
+10A9:GEORGIAN\ãKAN
+10AA:GEORGIAN\ãLAS
+10AB:GEORGIAN\ãMAN
+10AC:GEORGIAN\ãNAR
+10AD:GEORGIAN\ãON
+10AE:GEORGIAN\ãPAR
+10AF:GEORGIAN\ãZHAR
+10B0:GEORGIAN\ãRAE
+10B1:GEORGIAN\ãSAN
+10B2:GEORGIAN\ãTAR
+10B3:GEORGIAN\ãUN
+10B4:GEORGIAN\ãPHAR
+10B5:GEORGIAN\ãKHAR
+10B6:GEORGIAN\ãGHAN
+10B7:GEORGIAN\ãQAR
+10B8:GEORGIAN\ãSHIN
+10B9:GEORGIAN\ãCHIN
+10BA:GEORGIAN\ãCAN
+10BB:GEORGIAN\ãJIL
+10BC:GEORGIAN\ãCIL
+10BD:GEORGIAN\ãCHAR
+10BE:GEORGIAN\ãXAN
+10BF:GEORGIAN\ãJHAN
+10C0:GEORGIAN\ãHAE
+10C1:GEORGIAN\ãHE
+10C2:GEORGIAN\ãHIE
+10C3:GEORGIAN\ãWE
+10C4:GEORGIAN\ãHAR
+10C5:GEORGIAN\ãHOE
+10D0:GEORGIAN\@AN
+10D1:GEORGIAN\@BAN
+10D2:GEORGIAN\@GAN
+10D3:GEORGIAN\@DON
+10D4:GEORGIAN\@EN
+10D5:GEORGIAN\@VIN
+10D6:GEORGIAN\@ZEN
+10D7:GEORGIAN\@TAN
+10D8:GEORGIAN\@IN
+10D9:GEORGIAN\@KAN
+10DA:GEORGIAN\@LAS
+10DB:GEORGIAN\@MAN
+10DC:GEORGIAN\@NAR
+10DD:GEORGIAN\@ON
+10DE:GEORGIAN\@PAR
+10DF:GEORGIAN\@ZHAR
+10E0:GEORGIAN\@RAE
+10E1:GEORGIAN\@SAN
+10E2:GEORGIAN\@TAR
+10E3:GEORGIAN\@UN
+10E4:GEORGIAN\@PHAR
+10E5:GEORGIAN\@KHAR
+10E6:GEORGIAN\@GHAN
+10E7:GEORGIAN\@QAR
+10E8:GEORGIAN\@SHIN
+10E9:GEORGIAN\@CHIN
+10EA:GEORGIAN\@CAN
+10EB:GEORGIAN\@JIL
+10EC:GEORGIAN\@CIL
+10ED:GEORGIAN\@CHAR
+10EE:GEORGIAN\@XAN
+10EF:GEORGIAN\@JHAN
+10F0:GEORGIAN\@HAE
+10F1:GEORGIAN\@HE
+10F2:GEORGIAN\@HIE
+10F3:GEORGIAN\@WE
+10F4:GEORGIAN\@HAR
+10F5:GEORGIAN\@HOE
+10F6:GEORGIAN\@FI
+10F7:GEORGIAN\@YN
+10F8:GEORGIAN\@ELIFI
+10FB:GEORGIAN PARAGRAPH SEPARATOR
+1100:\™KIYEOK
+1101:\™SSANGKIYEOK
+1102:\™N\ÆN
+1103:\™TIKEUT
+1104:\™SSANGTIKEUT
+1105:\™R\ÆL
+1106:\™M\ÆM
+1107:\™P\ÆP
+1108:\™SSANGP\ÆP
+1109:\™SIOS
+110A:\™SSANGSIOS
+110B:\™\ÆNG
+110C:\™C\ÆC
+110D:\™SSANGC\ÆC
+110E:\™CH\ÆCH
+110F:\™KH\ÆKH
+1110:\™TH\ÆTH
+1111:\™PH\ÆPH
+1112:\™H\ÆH
+1113:\™N\ÆN-KIYEOK
+1114:\™SSANGN\ÆN
+1115:\™N\ÆN-TIKEUT
+1116:\™N\ÆN-P\ÆP
+1117:\™TIKEUT-KIYEOK
+1118:\™R\ÆL-N\ÆN
+1119:\™SSANGR\ÆL
+111A:\™R\ÆL-H\ÆH
+111B:\™KAPYEOUNR\ÆL
+111C:\™M\ÆM-P\ÆP
+111D:\™KAPYEOUNM\ÆM
+111E:\™P\ÆP-KIYEOK
+111F:\™P\ÆP-N\ÆN
+1120:\™P\ÆP-TIKEUT
+1121:\™P\ÆP-SIOS
+1122:\™P\ÆP-SIOS-KIYEOK
+1123:\™P\ÆP-SIOS-TIKEUT
+1124:\™P\ÆP-SIOS-P\ÆP
+1125:\™P\ÆP-SSANGSIOS
+1126:\™P\ÆP-SIOS-C\ÆC
+1127:\™P\ÆP-C\ÆC
+1128:\™P\ÆP-CH\ÆCH
+1129:\™P\ÆP-TH\ÆTH
+112A:\™P\ÆP-PH\ÆPH
+112B:\™KAPYEOUNP\ÆP
+112C:\™KAPYEOUNSSANGP\ÆP
+112D:\™SIOS-KIYEOK
+112E:\™SIOS-N\ÆN
+112F:\™SIOS-TIKEUT
+1130:\™SIOS-R\ÆL
+1131:\™SIOS-M\ÆM
+1132:\™SIOS-P\ÆP
+1133:\™SIOS-P\ÆP-KIYEOK
+1134:\™SIOS-SSANGSIOS
+1135:\™SIOS-\ÆNG
+1136:\™SIOS-C\ÆC
+1137:\™SIOS-CH\ÆCH
+1138:\™SIOS-KH\ÆKH
+1139:\™SIOS-TH\ÆTH
+113A:\™SIOS-PH\ÆPH
+113B:\™SIOS-H\ÆH
+113C:\™CHITUEUMSIOS
+113D:\™CHITUEUMSSANGSIOS
+113E:\™CEONGCH\ÆMSIOS
+113F:\™CEONGCH\ÆMSSANGSIOS
+1140:\™PANSIOS
+1141:\™\ÆNG-KIYEOK
+1142:\™\ÆNG-TIKEUT
+1143:\™\ÆNG-M\ÆM
+1144:\™\ÆNG-P\ÆP
+1145:\™\ÆNG-SIOS
+1146:\™\ÆNG-PANSIOS
+1147:\™SSANG\ÆNG
+1148:\™\ÆNG-C\ÆC
+1149:\™\ÆNG-CH\ÆCH
+114A:\™\ÆNG-TH\ÆTH
+114B:\™\ÆNG-PH\ÆPH
+114C:\™YES\ÆNG
+114D:\™C\ÆC-\ÆNG
+114E:\™CHITUEUMC\ÆC
+114F:\™CHITUEUMSSANGC\ÆC
+1150:\™CEONGCH\ÆMC\ÆC
+1151:\™CEONGCH\ÆMSSANGC\ÆC
+1152:\™CH\ÆCH-KH\ÆKH
+1153:\™CH\ÆCH-H\ÆH
+1154:\™CHITUEUMCH\ÆCH
+1155:\™CEONGCH\ÆMCH\ÆCH
+1156:\™PH\ÆPH-P\ÆP
+1157:\™KAPYEOUNPH\ÆPH
+1158:\™SSANGH\ÆH
+1159:\™YEORINH\ÆH
+115F:\™FILLER
+1160:\«FILLER
+1161:\«A
+1162:\«AE
+1163:\«YA
+1164:\«YAE
+1165:\«EO
+1166:\«E
+1167:\«YEO
+1168:\«YE
+1169:\«O
+116A:\«WA
+116B:\«WAE
+116C:\«OE
+116D:\«YO
+116E:\«U
+116F:\«WEO
+1170:\«WE
+1171:\«WI
+1172:\«YU
+1173:\«EU
+1174:\«YI
+1175:\«I
+1176:\«A-O
+1177:\«A-U
+1178:\«YA-O
+1179:\«YA-YO
+117A:\«EO-O
+117B:\«EO-U
+117C:\«EO-EU
+117D:\«YEO-O
+117E:\«YEO-U
+117F:\«O-EO
+1180:\«O-E
+1181:\«O-YE
+1182:\«O-O
+1183:\«O-U
+1184:\«YO-YA
+1185:\«YO-YAE
+1186:\«YO-YEO
+1187:\«YO-O
+1188:\«YO-I
+1189:\«U-A
+118A:\«U-AE
+118B:\«U-EO-EU
+118C:\«U-YE
+118D:\«U-U
+118E:\«YU-A
+118F:\«YU-EO
+1190:\«YU-E
+1191:\«YU-YEO
+1192:\«YU-YE
+1193:\«YU-U
+1194:\«YU-I
+1195:\«EU-U
+1196:\«EU-EU
+1197:\«YI-U
+1198:\«I-A
+1199:\«I-YA
+119A:\«I-O
+119B:\«I-U
+119C:\«I-EU
+119D:\«I-ARAEA
+119E:\«ARAEA
+119F:\«ARAEA-EO
+11A0:\«ARAEA-U
+11A1:\«ARAEA-I
+11A2:\«SSANGARAEA
+11A8:\“KIYEOK
+11A9:\“SSANGKIYEOK
+11AA:\“KIYEOK-SIOS
+11AB:\“N\ÆN
+11AC:\“N\ÆN-C\ÆC
+11AD:\“N\ÆN-H\ÆH
+11AE:\“TIKEUT
+11AF:\“R\ÆL
+11B0:\“R\ÆL-KIYEOK
+11B1:\“R\ÆL-M\ÆM
+11B2:\“R\ÆL-P\ÆP
+11B3:\“R\ÆL-SIOS
+11B4:\“R\ÆL-TH\ÆTH
+11B5:\“R\ÆL-PH\ÆPH
+11B6:\“R\ÆL-H\ÆH
+11B7:\“M\ÆM
+11B8:\“P\ÆP
+11B9:\“P\ÆP-SIOS
+11BA:\“SIOS
+11BB:\“SSANGSIOS
+11BC:\“\ÆNG
+11BD:\“C\ÆC
+11BE:\“CH\ÆCH
+11BF:\“KH\ÆKH
+11C0:\“TH\ÆTH
+11C1:\“PH\ÆPH
+11C2:\“H\ÆH
+11C3:\“KIYEOK-R\ÆL
+11C4:\“KIYEOK-SIOS-KIYEOK
+11C5:\“N\ÆN-KIYEOK
+11C6:\“N\ÆN-TIKEUT
+11C7:\“N\ÆN-SIOS
+11C8:\“N\ÆN-PANSIOS
+11C9:\“N\ÆN-TH\ÆTH
+11CA:\“TIKEUT-KIYEOK
+11CB:\“TIKEUT-R\ÆL
+11CC:\“R\ÆL-KIYEOK-SIOS
+11CD:\“R\ÆL-N\ÆN
+11CE:\“R\ÆL-TIKEUT
+11CF:\“R\ÆL-TIKEUT-H\ÆH
+11D0:\“SSANGR\ÆL
+11D1:\“R\ÆL-M\ÆM-KIYEOK
+11D2:\“R\ÆL-M\ÆM-SIOS
+11D3:\“R\ÆL-P\ÆP-SIOS
+11D4:\“R\ÆL-P\ÆP-H\ÆH
+11D5:\“R\ÆL-KAPYEOUNP\ÆP
+11D6:\“R\ÆL-SSANGSIOS
+11D7:\“R\ÆL-PANSIOS
+11D8:\“R\ÆL-KH\ÆKH
+11D9:\“R\ÆL-YEORINH\ÆH
+11DA:\“M\ÆM-KIYEOK
+11DB:\“M\ÆM-R\ÆL
+11DC:\“M\ÆM-P\ÆP
+11DD:\“M\ÆM-SIOS
+11DE:\“M\ÆM-SSANGSIOS
+11DF:\“M\ÆM-PANSIOS
+11E0:\“M\ÆM-CH\ÆCH
+11E1:\“M\ÆM-H\ÆH
+11E2:\“KAPYEOUNM\ÆM
+11E3:\“P\ÆP-R\ÆL
+11E4:\“P\ÆP-PH\ÆPH
+11E5:\“P\ÆP-H\ÆH
+11E6:\“KAPYEOUNP\ÆP
+11E7:\“SIOS-KIYEOK
+11E8:\“SIOS-TIKEUT
+11E9:\“SIOS-R\ÆL
+11EA:\“SIOS-P\ÆP
+11EB:\“PANSIOS
+11EC:\“\ÆNG-KIYEOK
+11ED:\“\ÆNG-SSANGKIYEOK
+11EE:\“SSANG\ÆNG
+11EF:\“\ÆNG-KH\ÆKH
+11F0:\“YES\ÆNG
+11F1:\“YES\ÆNG-SIOS
+11F2:\“YES\ÆNG-PANSIOS
+11F3:\“PH\ÆPH-P\ÆP
+11F4:\“KAPYEOUNPH\ÆPH
+11F5:\“H\ÆH-N\ÆN
+11F6:\“H\ÆH-R\ÆL
+11F7:\“H\ÆH-M\ÆM
+11F8:\“H\ÆH-P\ÆP
+11F9:\“YEORINH\ÆH
+1200:\VHA
+1201:\VHU
+1202:\VHI
+1203:\VHAA
+1204:\VHEE
+1205:\VHE
+1206:\VHO
+1208:\VLA
+1209:\VLU
+120A:\VLI
+120B:\VLAA
+120C:\VLEE
+120D:\VLE
+120E:\VLO
+120F:\VLWA
+1210:\VHHA
+1211:\VHHU
+1212:\VHHI
+1213:\VHHAA
+1214:\VHHEE
+1215:\VHHE
+1216:\VHHO
+1217:\VHHWA
+1218:\VMA
+1219:\VMU
+121A:\VMI
+121B:\VMAA
+121C:\VMEE
+121D:\VME
+121E:\VMO
+121F:\VMWA
+1220:\VSZA
+1221:\VSZU
+1222:\VSZI
+1223:\VSZAA
+1224:\VSZEE
+1225:\VSZE
+1226:\VSZO
+1227:\VSZWA
+1228:\VRA
+1229:\VRU
+122A:\VRI
+122B:\VRAA
+122C:\VREE
+122D:\VRE
+122E:\VRO
+122F:\VRWA
+1230:\VSA
+1231:\VSU
+1232:\VSI
+1233:\VSAA
+1234:\VSEE
+1235:\VSE
+1236:\VSO
+1237:\VSWA
+1238:\VSHA
+1239:\VSHU
+123A:\VSHI
+123B:\VSHAA
+123C:\VSHEE
+123D:\VSHE
+123E:\VSHO
+123F:\VSHWA
+1240:\VQA
+1241:\VQU
+1242:\VQI
+1243:\VQAA
+1244:\VQEE
+1245:\VQE
+1246:\VQO
+1248:\VQWA
+124A:\VQWI
+124B:\VQWAA
+124C:\VQWEE
+124D:\VQWE
+1250:\VQHA
+1251:\VQHU
+1252:\VQHI
+1253:\VQHAA
+1254:\VQHEE
+1255:\VQHE
+1256:\VQHO
+1258:\VQHWA
+125A:\VQHWI
+125B:\VQHWAA
+125C:\VQHWEE
+125D:\VQHWE
+1260:\VBA
+1261:\VBU
+1262:\VBI
+1263:\VBAA
+1264:\VBEE
+1265:\VBE
+1266:\VBO
+1267:\VBWA
+1268:\VVA
+1269:\VVU
+126A:\VVI
+126B:\VVAA
+126C:\VVEE
+126D:\VVE
+126E:\VVO
+126F:\VVWA
+1270:\VTA
+1271:\VTU
+1272:\VTI
+1273:\VTAA
+1274:\VTEE
+1275:\VTE
+1276:\VTO
+1277:\VTWA
+1278:\VCA
+1279:\VCU
+127A:\VCI
+127B:\VCAA
+127C:\VCEE
+127D:\VCE
+127E:\VCO
+127F:\VCWA
+1280:\VXA
+1281:\VXU
+1282:\VXI
+1283:\VXAA
+1284:\VXEE
+1285:\VXE
+1286:\VXO
+1288:\VXWA
+128A:\VXWI
+128B:\VXWAA
+128C:\VXWEE
+128D:\VXWE
+1290:\VNA
+1291:\VNU
+1292:\VNI
+1293:\VNAA
+1294:\VNEE
+1295:\VNE
+1296:\VNO
+1297:\VNWA
+1298:\VNYA
+1299:\VNYU
+129A:\VNYI
+129B:\VNYAA
+129C:\VNYEE
+129D:\VNYE
+129E:\VNYO
+129F:\VNYWA
+12A0:\VGLOTTAL A
+12A1:\VGLOTTAL U
+12A2:\VGLOTTAL I
+12A3:\VGLOTTAL AA
+12A4:\VGLOTTAL EE
+12A5:\VGLOTTAL E
+12A6:\VGLOTTAL O
+12A7:\VGLOTTAL WA
+12A8:\VKA
+12A9:\VKU
+12AA:\VKI
+12AB:\VKAA
+12AC:\VKEE
+12AD:\VKE
+12AE:\VKO
+12B0:\VKWA
+12B2:\VKWI
+12B3:\VKWAA
+12B4:\VKWEE
+12B5:\VKWE
+12B8:\VKXA
+12B9:\VKXU
+12BA:\VKXI
+12BB:\VKXAA
+12BC:\VKXEE
+12BD:\VKXE
+12BE:\VKXO
+12C0:\VKXWA
+12C2:\VKXWI
+12C3:\VKXWAA
+12C4:\VKXWEE
+12C5:\VKXWE
+12C8:\VWA
+12C9:\VWU
+12CA:\VWI
+12CB:\VWAA
+12CC:\VWEE
+12CD:\VWE
+12CE:\VWO
+12D0:\VPHARYNGEAL A
+12D1:\VPHARYNGEAL U
+12D2:\VPHARYNGEAL I
+12D3:\VPHARYNGEAL AA
+12D4:\VPHARYNGEAL EE
+12D5:\VPHARYNGEAL E
+12D6:\VPHARYNGEAL O
+12D8:\VZA
+12D9:\VZU
+12DA:\VZI
+12DB:\VZAA
+12DC:\VZEE
+12DD:\VZE
+12DE:\VZO
+12DF:\VZWA
+12E0:\VZHA
+12E1:\VZHU
+12E2:\VZHI
+12E3:\VZHAA
+12E4:\VZHEE
+12E5:\VZHE
+12E6:\VZHO
+12E7:\VZHWA
+12E8:\VYA
+12E9:\VYU
+12EA:\VYI
+12EB:\VYAA
+12EC:\VYEE
+12ED:\VYE
+12EE:\VYO
+12F0:\VDA
+12F1:\VDU
+12F2:\VDI
+12F3:\VDAA
+12F4:\VDEE
+12F5:\VDE
+12F6:\VDO
+12F7:\VDWA
+12F8:\VDDA
+12F9:\VDDU
+12FA:\VDDI
+12FB:\VDDAA
+12FC:\VDDEE
+12FD:\VDDE
+12FE:\VDDO
+12FF:\VDDWA
+1300:\VJA
+1301:\VJU
+1302:\VJI
+1303:\VJAA
+1304:\VJEE
+1305:\VJE
+1306:\VJO
+1307:\VJWA
+1308:\VGA
+1309:\VGU
+130A:\VGI
+130B:\VGAA
+130C:\VGEE
+130D:\VGE
+130E:\VGO
+1310:\VGWA
+1312:\VGWI
+1313:\VGWAA
+1314:\VGWEE
+1315:\VGWE
+1318:\VGGA
+1319:\VGGU
+131A:\VGGI
+131B:\VGGAA
+131C:\VGGEE
+131D:\VGGE
+131E:\VGGO
+1320:\VTHA
+1321:\VTHU
+1322:\VTHI
+1323:\VTHAA
+1324:\VTHEE
+1325:\VTHE
+1326:\VTHO
+1327:\VTHWA
+1328:\VCHA
+1329:\VCHU
+132A:\VCHI
+132B:\VCHAA
+132C:\VCHEE
+132D:\VCHE
+132E:\VCHO
+132F:\VCHWA
+1330:\VPHA
+1331:\VPHU
+1332:\VPHI
+1333:\VPHAA
+1334:\VPHEE
+1335:\VPHE
+1336:\VPHO
+1337:\VPHWA
+1338:\VTSA
+1339:\VTSU
+133A:\VTSI
+133B:\VTSAA
+133C:\VTSEE
+133D:\VTSE
+133E:\VTSO
+133F:\VTSWA
+1340:\VTZA
+1341:\VTZU
+1342:\VTZI
+1343:\VTZAA
+1344:\VTZEE
+1345:\VTZE
+1346:\VTZO
+1348:\VFA
+1349:\VFU
+134A:\VFI
+134B:\VFAA
+134C:\VFEE
+134D:\VFE
+134E:\VFO
+134F:\VFWA
+1350:\VPA
+1351:\VPU
+1352:\VPI
+1353:\VPAA
+1354:\VPEE
+1355:\VPE
+1356:\VPO
+1357:\VPWA
+1358:\VRYA
+1359:\VMYA
+135A:\VFYA
+1361:ETHIOPIC WORDSPACE
+1362:ETHIOPIC\é
+1363:ETHIOPIC COMMA
+1364:ETHIOPIC SEMICOLON
+1365:ETHIOPIC COLON
+1366:ETHIOPIC PREFACE COLON
+1367:ETHIOPIC QUESTION\¥
+1368:ETHIOPIC PARAGRAPH SEPARATOR
+1369:ETHIOPIC\hONE
+136A:ETHIOPIC\hTWO
+136B:ETHIOPIC\hTHREE
+136C:ETHIOPIC\hFOUR
+136D:ETHIOPIC\hFIVE
+136E:ETHIOPIC\hSIX
+136F:ETHIOPIC\hSEVEN
+1370:ETHIOPIC\hE\¼
+1371:ETHIOPIC\hNINE
+1372:ETHIOPIC \­TEN
+1373:ETHIOPIC \­TWENTY
+1374:ETHIOPIC \­THIRTY
+1375:ETHIOPIC \­FORTY
+1376:ETHIOPIC \­FIFTY
+1377:ETHIOPIC \­SIXTY
+1378:ETHIOPIC \­SEVENTY
+1379:ETHIOPIC \­E\¼Y
+137A:ETHIOPIC \­NINETY
+137B:ETHIOPIC \­HUNDRED
+137C:ETHIOPIC \­TEN THOUSAND
+13A0:\ŒA
+13A1:\ŒE
+13A2:\ŒI
+13A3:\ŒO
+13A4:\ŒU
+13A5:\ŒV
+13A6:\ŒGA
+13A7:\ŒKA
+13A8:\ŒGE
+13A9:\ŒGI
+13AA:\ŒGO
+13AB:\ŒGU
+13AC:\ŒGV
+13AD:\ŒHA
+13AE:\ŒHE
+13AF:\ŒHI
+13B0:\ŒHO
+13B1:\ŒHU
+13B2:\ŒHV
+13B3:\ŒLA
+13B4:\ŒLE
+13B5:\ŒLI
+13B6:\ŒLO
+13B7:\ŒLU
+13B8:\ŒLV
+13B9:\ŒMA
+13BA:\ŒME
+13BB:\ŒMI
+13BC:\ŒMO
+13BD:\ŒMU
+13BE:\ŒNA
+13BF:\ŒHNA
+13C0:\ŒNAH
+13C1:\ŒNE
+13C2:\ŒNI
+13C3:\ŒNO
+13C4:\ŒNU
+13C5:\ŒNV
+13C6:\ŒQUA
+13C7:\ŒQUE
+13C8:\ŒQUI
+13C9:\ŒQUO
+13CA:\ŒQUU
+13CB:\ŒQUV
+13CC:\ŒSA
+13CD:\ŒS
+13CE:\ŒSE
+13CF:\ŒSI
+13D0:\ŒSO
+13D1:\ŒSU
+13D2:\ŒSV
+13D3:\ŒDA
+13D4:\ŒTA
+13D5:\ŒDE
+13D6:\ŒTE
+13D7:\ŒDI
+13D8:\ŒTI
+13D9:\ŒDO
+13DA:\ŒDU
+13DB:\ŒDV
+13DC:\ŒDLA
+13DD:\ŒTLA
+13DE:\ŒTLE
+13DF:\ŒTLI
+13E0:\ŒTLO
+13E1:\ŒTLU
+13E2:\ŒTLV
+13E3:\ŒTSA
+13E4:\ŒTSE
+13E5:\ŒTSI
+13E6:\ŒTSO
+13E7:\ŒTSU
+13E8:\ŒTSV
+13E9:\ŒWA
+13EA:\ŒWE
+13EB:\ŒWI
+13EC:\ŒWO
+13ED:\ŒWU
+13EE:\ŒWV
+13EF:\ŒYA
+13F0:\ŒYE
+13F1:\ŒYI
+13F2:\ŒYO
+13F3:\ŒYU
+13F4:\ŒYV
+1401:\FE
+1402:\FAAI
+1403:\FI
+1404:\FII
+1405:\FO
+1406:\FOO
+1407:\FY-CREE OO
+1408:\kEE
+1409:\kI
+140A:\FA
+140B:\FAA
+140C:\FWE
+140D:\WE
+140E:\FWI
+140F:\WI
+1410:\FWII
+1411:\WII
+1412:\FWO
+1413:\WO
+1414:\FWOO
+1415:\WOO
+1416:\FNASKAPI WOO
+1417:\FWA
+1418:\WA
+1419:\FWAA
+141A:\WAA
+141B:\FNASKAPI WAA
+141C:\FAI
+141D:\FY-CREE W
+141E:\FGLOTTAL STOP
+141F:\FFINAL \Ü
+1420:\FFINAL GRAVE
+1421:\FFINAL BOTTOM HALF R\ô
+1422:\FFINAL TOP HALF R\ô
+1423:\FFINAL \ùHALF R\ô
+1424:\FFINAL R\ô
+1425:\FFINAL \0 \Ü
+1426:\FFINAL \0 SHORT \€ \ÁS
+1427:\FFINAL MIDDLE DOT
+1428:\FFINAL SHORT \ \Á
+1429:\FFINAL PLUS
+142A:\FFINAL \Ë TACK
+142B:\FEN
+142C:\FIN
+142D:\FON
+142E:\FAN
+142F:\FPE
+1430:\FPAAI
+1431:\FPI
+1432:\FPII
+1433:\FPO
+1434:\FPOO
+1435:\FY-CREE POO
+1436:\kHEE
+1437:\kHI
+1438:\FPA
+1439:\FPAA
+143A:\FPWE
+143B:\PWE
+143C:\FPWI
+143D:\PWI
+143E:\FPWII
+143F:\PWII
+1440:\FPWO
+1441:\PWO
+1442:\FPWOO
+1443:\PWOO
+1444:\FPWA
+1445:\PWA
+1446:\FPWAA
+1447:\PWAA
+1448:\FY-CREE PWAA
+1449:\FP
+144A:\P
+144B:\kH
+144C:\FTE
+144D:\FTAAI
+144E:\FTI
+144F:\FTII
+1450:\FTO
+1451:\FTOO
+1452:\FY-CREE TOO
+1453:\kDEE
+1454:\kDI
+1455:\FTA
+1456:\FTAA
+1457:\FTWE
+1458:\TWE
+1459:\FTWI
+145A:\TWI
+145B:\FTWII
+145C:\TWII
+145D:\FTWO
+145E:\TWO
+145F:\FTWOO
+1460:\TWOO
+1461:\FTWA
+1462:\TWA
+1463:\FTWAA
+1464:\TWAA
+1465:\FNASKAPI TWAA
+1466:\FT
+1467:\FTTE
+1468:\FTTI
+1469:\FTTO
+146A:\FTTA
+146B:\FKE
+146C:\FKAAI
+146D:\FKI
+146E:\FKII
+146F:\FKO
+1470:\FKOO
+1471:\FY-CREE KOO
+1472:\FKA
+1473:\FKAA
+1474:\FKWE
+1475:\KWE
+1476:\FKWI
+1477:\KWI
+1478:\FKWII
+1479:\KWII
+147A:\FKWO
+147B:\KWO
+147C:\FKWOO
+147D:\KWOO
+147E:\FKWA
+147F:\KWA
+1480:\FKWAA
+1481:\KWAA
+1482:\FNASKAPI KWAA
+1483:\FK
+1484:\FKW
+1485:\FSOUTH-SLAVEY KEH
+1486:\FSOUTH-SLAVEY KIH
+1487:\FSOUTH-SLAVEY KOH
+1488:\FSOUTH-SLAVEY KAH
+1489:\FCE
+148A:\FCAAI
+148B:\FCI
+148C:\FCII
+148D:\FCO
+148E:\FCOO
+148F:\FY-CREE COO
+1490:\FCA
+1491:\FCAA
+1492:\FCWE
+1493:\CWE
+1494:\FCWI
+1495:\CWI
+1496:\FCWII
+1497:\CWII
+1498:\FCWO
+1499:\CWO
+149A:\FCWOO
+149B:\CWOO
+149C:\FCWA
+149D:\CWA
+149E:\FCWAA
+149F:\CWAA
+14A0:\FNASKAPI CWAA
+14A1:\FC
+14A2:\FSAYISI TH
+14A3:\FME
+14A4:\FMAAI
+14A5:\FMI
+14A6:\FMII
+14A7:\FMO
+14A8:\FMOO
+14A9:\FY-CREE MOO
+14AA:\FMA
+14AB:\FMAA
+14AC:\FMWE
+14AD:\MWE
+14AE:\FMWI
+14AF:\MWI
+14B0:\FMWII
+14B1:\MWII
+14B2:\FMWO
+14B3:\MWO
+14B4:\FMWOO
+14B5:\MWOO
+14B6:\FMWA
+14B7:\MWA
+14B8:\FMWAA
+14B9:\MWAA
+14BA:\FNASKAPI MWAA
+14BB:\FM
+14BC:\M
+14BD:\FMH
+14BE:\FATHAPASCAN M
+14BF:\FSAYISI M
+14C0:\FNE
+14C1:\FNAAI
+14C2:\FNI
+14C3:\FNII
+14C4:\FNO
+14C5:\FNOO
+14C6:\FY-CREE NOO
+14C7:\FNA
+14C8:\FNAA
+14C9:\FNWE
+14CA:\NWE
+14CB:\FNWA
+14CC:\NWA
+14CD:\FNWAA
+14CE:\NWAA
+14CF:\FNASKAPI NWAA
+14D0:\FN
+14D1:\kNG
+14D2:\FNH
+14D3:\FLE
+14D4:\FLAAI
+14D5:\FLI
+14D6:\FLII
+14D7:\FLO
+14D8:\FLOO
+14D9:\FY-CREE LOO
+14DA:\FLA
+14DB:\FLAA
+14DC:\FLWE
+14DD:\LWE
+14DE:\FLWI
+14DF:\LWI
+14E0:\FLWII
+14E1:\LWII
+14E2:\FLWO
+14E3:\LWO
+14E4:\FLWOO
+14E5:\LWOO
+14E6:\FLWA
+14E7:\LWA
+14E8:\FLWAA
+14E9:\LWAA
+14EA:\FL
+14EB:\L
+14EC:\FMEDIAL L
+14ED:\FSE
+14EE:\FSAAI
+14EF:\FSI
+14F0:\FSII
+14F1:\FSO
+14F2:\FSOO
+14F3:\FY-CREE SOO
+14F4:\FSA
+14F5:\FSAA
+14F6:\FSWE
+14F7:\SWE
+14F8:\FSWI
+14F9:\SWI
+14FA:\FSWII
+14FB:\SWII
+14FC:\FSWO
+14FD:\SWO
+14FE:\FSWOO
+14FF:\SWOO
+1500:\FSWA
+1501:\SWA
+1502:\FSWAA
+1503:\SWAA
+1504:\FNASKAPI SWAA
+1505:\FS
+1506:\FATHAPASCAN S
+1507:\FSW
+1508:\F\¬FOOT S
+1509:\FMOOSE-CREE SK
+150A:\FNASKAPI SKW
+150B:\FNASKAPI S-W
+150C:\FNASKAPI SPWA
+150D:\FNASKAPI STWA
+150E:\FNASKAPI SKWA
+150F:\FNASKAPI SCWA
+1510:\FSHE
+1511:\FSHI
+1512:\FSHII
+1513:\FSHO
+1514:\FSHOO
+1515:\FSHA
+1516:\FSHAA
+1517:\FSHWE
+1518:\SHWE
+1519:\FSHWI
+151A:\SHWI
+151B:\FSHWII
+151C:\SHWII
+151D:\FSHWO
+151E:\SHWO
+151F:\FSHWOO
+1520:\SHWOO
+1521:\FSHWA
+1522:\SHWA
+1523:\FSHWAA
+1524:\SHWAA
+1525:\FSH
+1526:\FYE
+1527:\FYAAI
+1528:\FYI
+1529:\FYII
+152A:\FYO
+152B:\FYOO
+152C:\FY-CREE YOO
+152D:\FYA
+152E:\FYAA
+152F:\FYWE
+1530:\YWE
+1531:\FYWI
+1532:\YWI
+1533:\FYWII
+1534:\YWII
+1535:\FYWO
+1536:\YWO
+1537:\FYWOO
+1538:\YWOO
+1539:\FYWA
+153A:\YWA
+153B:\FYWAA
+153C:\YWAA
+153D:\FNASKAPI YWAA
+153E:\FY
+153F:\FBIBLE-CREE Y
+1540:\Y
+1541:\FSAYISI YI
+1542:\FRE
+1543:\FR-CREE RE
+1544:\LE
+1545:\FRAAI
+1546:\FRI
+1547:\FRII
+1548:\FRO
+1549:\FROO
+154A:\LO
+154B:\FRA
+154C:\FRAA
+154D:\LA
+154E:\FRWAA
+154F:\RWAA
+1550:\FR
+1551:\R
+1552:\FMEDIAL R
+1553:\FFE
+1554:\FFAAI
+1555:\FFI
+1556:\FFII
+1557:\FFO
+1558:\FFOO
+1559:\FFA
+155A:\FFAA
+155B:\FFWAA
+155C:\FWAA
+155D:\FF
+155E:\FTHE
+155F:\FN-CREE THE
+1560:\FTHI
+1561:\FN-CREE THI
+1562:\FTHII
+1563:\FN-CREE THII
+1564:\FTHO
+1565:\FTHOO
+1566:\FTHA
+1567:\FTHAA
+1568:\FTHWAA
+1569:\THWAA
+156A:\FTH
+156B:\FTTHE
+156C:\FTTHI
+156D:\FTTHO
+156E:\FTTHA
+156F:\FTTH
+1570:\FTYE
+1571:\FTYI
+1572:\FTYO
+1573:\FTYA
+1574:\FNUNAVIK HE
+1575:\FNUNAVIK HI
+1576:\FNUNAVIK HII
+1577:\FNUNAVIK HO
+1578:\FNUNAVIK HOO
+1579:\FNUNAVIK HA
+157A:\FNUNAVIK HAA
+157B:\FNUNAVIK H
+157C:\FNUNAVUT H
+157D:\FHK
+157E:\FQAAI
+157F:\FQI
+1580:\FQII
+1581:\FQO
+1582:\FQOO
+1583:\FQA
+1584:\FQAA
+1585:\FQ
+1586:\FTLHE
+1587:\FTLHI
+1588:\FTLHO
+1589:\FTLHA
+158A:\RE
+158B:\RI
+158C:\RO
+158D:\RA
+158E:\FNGAAI
+158F:\FNGI
+1590:\FNGII
+1591:\FNGO
+1592:\FNGOO
+1593:\FNGA
+1594:\FNGAA
+1595:\FNG
+1596:\FNNG
+1597:\FSAYISI SHE
+1598:\FSAYISI SHI
+1599:\FSAYISI SHO
+159A:\FSAYISI SHA
+159B:\FWOODS-CREE THE
+159C:\FWOODS-CREE THI
+159D:\FWOODS-CREE THO
+159E:\FWOODS-CREE THA
+159F:\FWOODS-CREE TH
+15A0:\FLHI
+15A1:\FLHII
+15A2:\FLHO
+15A3:\FLHOO
+15A4:\FLHA
+15A5:\FLHAA
+15A6:\FLH
+15A7:\FTH-CREE THE
+15A8:\FTH-CREE THI
+15A9:\FTH-CREE THII
+15AA:\FTH-CREE THO
+15AB:\FTH-CREE THOO
+15AC:\FTH-CREE THA
+15AD:\FTH-CREE THAA
+15AE:\FTH-CREE TH
+15AF:\FAIVILIK B
+15B0:\F\¬FOOT E
+15B1:\F\¬FOOT I
+15B2:\F\¬FOOT O
+15B3:\F\¬FOOT A
+15B4:\F\¬FOOT WE
+15B5:\F\¬FOOT WI
+15B6:\F\¬FOOT WO
+15B7:\F\¬FOOT WA
+15B8:\F\¬FOOT NE
+15B9:\F\¬FOOT NI
+15BA:\F\¬FOOT NO
+15BB:\F\¬FOOT NA
+15BC:\F\¬FOOT KE
+15BD:\F\¬FOOT KI
+15BE:\F\¬FOOT KO
+15BF:\F\¬FOOT KA
+15C0:\FSAYISI HE
+15C1:\FSAYISI HI
+15C2:\FSAYISI HO
+15C3:\FSAYISI HA
+15C4:\kGHU
+15C5:\kGHO
+15C6:\kGHE
+15C7:\kGHEE
+15C8:\kGHI
+15C9:\kGHA
+15CA:\kRU
+15CB:\kRO
+15CC:\kRE
+15CD:\kREE
+15CE:\kRI
+15CF:\kRA
+15D0:\kWU
+15D1:\kWO
+15D2:\kWE
+15D3:\kWEE
+15D4:\kWI
+15D5:\kWA
+15D6:\kHWU
+15D7:\kHWO
+15D8:\kHWE
+15D9:\kHWEE
+15DA:\kHWI
+15DB:\kHWA
+15DC:\kTHU
+15DD:\kTHO
+15DE:\kTHE
+15DF:\kTHEE
+15E0:\kTHI
+15E1:\kTHA
+15E2:\kTTU
+15E3:\kTTO
+15E4:\kTTE
+15E5:\kTTEE
+15E6:\kTTI
+15E7:\kTTA
+15E8:\kPU
+15E9:\kPO
+15EA:\kPE
+15EB:\kPEE
+15EC:\kPI
+15ED:\kPA
+15EE:\kP
+15EF:\kGU
+15F0:\kGO
+15F1:\kGE
+15F2:\kGEE
+15F3:\kGI
+15F4:\kGA
+15F5:\kKHU
+15F6:\kKHO
+15F7:\kKHE
+15F8:\kKHEE
+15F9:\kKHI
+15FA:\kKHA
+15FB:\kKKU
+15FC:\kKKO
+15FD:\kKKE
+15FE:\kKKEE
+15FF:\kKKI
+1600:\kKKA
+1601:\kKK
+1602:\kNU
+1603:\kNO
+1604:\kNE
+1605:\kNEE
+1606:\kNI
+1607:\kNA
+1608:\kMU
+1609:\kMO
+160A:\kME
+160B:\kMEE
+160C:\kMI
+160D:\kMA
+160E:\kYU
+160F:\kYO
+1610:\kYE
+1611:\kYEE
+1612:\kYI
+1613:\kYA
+1614:\kJU
+1615:\FSAYISI JU
+1616:\kJO
+1617:\kJE
+1618:\kJEE
+1619:\kJI
+161A:\FSAYISI JI
+161B:\kJA
+161C:\kJJU
+161D:\kJJO
+161E:\kJJE
+161F:\kJJEE
+1620:\kJJI
+1621:\kJJA
+1622:\kLU
+1623:\kLO
+1624:\kLE
+1625:\kLEE
+1626:\kLI
+1627:\kLA
+1628:\kDLU
+1629:\kDLO
+162A:\kDLE
+162B:\kDLEE
+162C:\kDLI
+162D:\kDLA
+162E:\kLHU
+162F:\kLHO
+1630:\kLHE
+1631:\kLHEE
+1632:\kLHI
+1633:\kLHA
+1634:\kTLHU
+1635:\kTLHO
+1636:\kTLHE
+1637:\kTLHEE
+1638:\kTLHI
+1639:\kTLHA
+163A:\kTLU
+163B:\kTLO
+163C:\kTLE
+163D:\kTLEE
+163E:\kTLI
+163F:\kTLA
+1640:\kZU
+1641:\kZO
+1642:\kZE
+1643:\kZEE
+1644:\kZI
+1645:\kZA
+1646:\kZ
+1647:\kINITIAL Z
+1648:\kDZU
+1649:\kDZO
+164A:\kDZE
+164B:\kDZEE
+164C:\kDZI
+164D:\kDZA
+164E:\kSU
+164F:\kSO
+1650:\kSE
+1651:\kSEE
+1652:\kSI
+1653:\kSA
+1654:\kSHU
+1655:\kSHO
+1656:\kSHE
+1657:\kSHEE
+1658:\kSHI
+1659:\kSHA
+165A:\kSH
+165B:\kTSU
+165C:\kTSO
+165D:\kTSE
+165E:\kTSEE
+165F:\kTSI
+1660:\kTSA
+1661:\kCHU
+1662:\kCHO
+1663:\kCHE
+1664:\kCHEE
+1665:\kCHI
+1666:\kCHA
+1667:\kTTSU
+1668:\kTTSO
+1669:\kTTSE
+166A:\kTTSEE
+166B:\kTTSI
+166C:\kTTSA
+166D:\FCHI\‚
+166E:\FFULL STOP
+166F:\FQAI
+1670:\FNGAI
+1671:\FNNGI
+1672:\FNNGII
+1673:\FNNGO
+1674:\FNNGOO
+1675:\FNNGA
+1676:\FNNGAA
+1680:OGHAM SPACE\¥
+1681:OGHAM\@BEITH
+1682:OGHAM\@LUIS
+1683:OGHAM\@FEARN
+1684:OGHAM\@SAIL
+1685:OGHAM\@NION
+1686:OGHAM\@UATH
+1687:OGHAM\@DAIR
+1688:OGHAM\@TINNE
+1689:OGHAM\@COLL
+168A:OGHAM\@CEIRT
+168B:OGHAM\@MUIN
+168C:OGHAM\@GORT
+168D:OGHAM\@NGEADAL
+168E:OGHAM\@STRAIF
+168F:OGHAM\@RUIS
+1690:OGHAM\@AILM
+1691:OGHAM\@ONN
+1692:OGHAM\@UR
+1693:OGHAM\@EADHADH
+1694:OGHAM\@IODHADH
+1695:OGHAM\@EABHADH
+1696:OGHAM\@OR
+1697:OGHAM\@UILLEANN
+1698:OGHAM\@IFIN
+1699:OGHAM\@EAMHANCHOLL
+169A:OGHAM\@PEITH
+169B:OGHAM FEATHER\¥
+169C:OGHAM \öFEATHER\¥
+16A0:\ÀFEHU FEOH FE F
+16A1:\ÀV
+16A2:\ÀURUZ UR U
+16A3:\ÀYR
+16A4:\ÀY
+16A5:\ÀW
+16A6:\ÀTHURISAZ THURS THORN
+16A7:\ÀETH
+16A8:\ÀANSUZ A
+16A9:\ÀOS O
+16AA:\ÀAC A
+16AB:\ÀAESC
+16AC:\ÀLONG-BRANCH-OSS O
+16AD:\ÀSHORT-TWIG-OSS O
+16AE:\ÀO
+16AF:\ÀOE
+16B0:\ÀON
+16B1:\ÀRAIDO RAD REID R
+16B2:\ÀKAUNA
+16B3:\ÀCEN
+16B4:\ÀKAUN K
+16B5:\ÀG
+16B6:\ÀENG
+16B7:\ÀGEBO GYFU G
+16B8:\ÀGAR
+16B9:\ÀWUNJO WYNN W
+16BA:\ÀHAGLAZ H
+16BB:\ÀHAEGL H
+16BC:\ÀLONG-BRANCH-HAGALL H
+16BD:\ÀSHORT-TWIG-HAGALL H
+16BE:\ÀNAUDIZ NYD NAUD N
+16BF:\ÀSHORT-TWIG-NAUD N
+16C0:\ÀDOTTED-N
+16C1:\ÀISAZ IS ISS I
+16C2:\ÀE
+16C3:\ÀJERAN J
+16C4:\ÀGER
+16C5:\ÀLONG-BRANCH-AR AE
+16C6:\ÀSHORT-TWIG-AR A
+16C7:\ÀIWAZ EOH
+16C8:\ÀPERTHO PEORTH P
+16C9:\ÀALGIZ EOLHX
+16CA:\ÀSOWILO S
+16CB:\ÀSIGEL LONG-BRANCH-SOL S
+16CC:\ÀSHORT-TWIG-SOL S
+16CD:\ÀC
+16CE:\ÀZ
+16CF:\ÀTIWAZ TIR TYR T
+16D0:\ÀSHORT-TWIG-TYR T
+16D1:\ÀD
+16D2:\ÀBERKANAN BEORC BJARKAN B
+16D3:\ÀSHORT-TWIG-BJARKAN B
+16D4:\ÀDOTTED-P
+16D5:\ÀOPEN-P
+16D6:\ÀEHWAZ EH E
+16D7:\ÀMANNAZ MAN M
+16D8:\ÀLONG-BRANCH-MADR M
+16D9:\ÀSHORT-TWIG-MADR M
+16DA:\ÀLAUKAZ LAGU LOGR L
+16DB:\ÀDOTTED-L
+16DC:\À\ôWAZ
+16DD:\À\ô
+16DE:\ÀDAGAZ DAEG D
+16DF:\ÀOTHALAN ETHEL O
+16E0:\ÀEAR
+16E1:\ÀIOR
+16E2:\ÀCWEORTH
+16E3:\ÀCALC
+16E4:\ÀCEALC
+16E5:\ÀSTAN
+16E6:\ÀLONG-BRANCH-YR
+16E7:\ÀSHORT-TWIG-YR
+16E8:\ÀICELANDIC-YR
+16E9:\ÀQ
+16EA:\ÀX
+16EB:RUNIC S\ôLE PUNCTU\”
+16EC:RUNIC MULTIPLE PUNCTU\”
+16ED:RUNIC CROSS PUNCTU\”
+16EE:RUNIC ARLAUG \
+16EF:RUNIC TVIMADUR \
+16F0:RUNIC BELGTHOR \
+1700:TAGALOG\@A
+1701:TAGALOG\@I
+1702:TAGALOG\@U
+1703:TAGALOG\@KA
+1704:TAGALOG\@GA
+1705:TAGALOG\@NGA
+1706:TAGALOG\@TA
+1707:TAGALOG\@DA
+1708:TAGALOG\@NA
+1709:TAGALOG\@PA
+170A:TAGALOG\@BA
+170B:TAGALOG\@MA
+170C:TAGALOG\@YA
+170E:TAGALOG\@LA
+170F:TAGALOG\@WA
+1710:TAGALOG\@SA
+1711:TAGALOG\@HA
+1712:TAGALOG\bI
+1713:TAGALOG\bU
+1714:TAGALOG\‚ VIRAMA
+1720:HANUNOO\@A
+1721:HANUNOO\@I
+1722:HANUNOO\@U
+1723:HANUNOO\@KA
+1724:HANUNOO\@GA
+1725:HANUNOO\@NGA
+1726:HANUNOO\@TA
+1727:HANUNOO\@DA
+1728:HANUNOO\@NA
+1729:HANUNOO\@PA
+172A:HANUNOO\@BA
+172B:HANUNOO\@MA
+172C:HANUNOO\@YA
+172D:HANUNOO\@RA
+172E:HANUNOO\@LA
+172F:HANUNOO\@WA
+1730:HANUNOO\@SA
+1731:HANUNOO\@HA
+1732:HANUNOO\bI
+1733:HANUNOO\bU
+1734:HANUNOO\‚ PAMUDPOD
+1735:PHILIPPINE S\ôLE PUNCTU\”
+1736:PHILIPPINE \0 PUNCTU\”
+1740:BUHID\@A
+1741:BUHID\@I
+1742:BUHID\@U
+1743:BUHID\@KA
+1744:BUHID\@GA
+1745:BUHID\@NGA
+1746:BUHID\@TA
+1747:BUHID\@DA
+1748:BUHID\@NA
+1749:BUHID\@PA
+174A:BUHID\@BA
+174B:BUHID\@MA
+174C:BUHID\@YA
+174D:BUHID\@RA
+174E:BUHID\@LA
+174F:BUHID\@WA
+1750:BUHID\@SA
+1751:BUHID\@HA
+1752:BUHID\bI
+1753:BUHID\bU
+1760:TAGBANWA\@A
+1761:TAGBANWA\@I
+1762:TAGBANWA\@U
+1763:TAGBANWA\@KA
+1764:TAGBANWA\@GA
+1765:TAGBANWA\@NGA
+1766:TAGBANWA\@TA
+1767:TAGBANWA\@DA
+1768:TAGBANWA\@NA
+1769:TAGBANWA\@PA
+176A:TAGBANWA\@BA
+176B:TAGBANWA\@MA
+176C:TAGBANWA\@YA
+176E:TAGBANWA\@LA
+176F:TAGBANWA\@WA
+1770:TAGBANWA\@SA
+1772:TAGBANWA\bI
+1773:TAGBANWA\bU
+1780:\Ý\@KA
+1781:\Ý\@KHA
+1782:\Ý\@KO
+1783:\Ý\@KHO
+1784:\Ý\@NGO
+1785:\Ý\@CA
+1786:\Ý\@CHA
+1787:\Ý\@CO
+1788:\Ý\@CHO
+1789:\Ý\@NYO
+178A:\Ý\@DA
+178B:\Ý\@TTHA
+178C:\Ý\@DO
+178D:\Ý\@TTHO
+178E:\Ý\@NNO
+178F:\Ý\@TA
+1790:\Ý\@THA
+1791:\Ý\@TO
+1792:\Ý\@THO
+1793:\Ý\@NO
+1794:\Ý\@BA
+1795:\Ý\@PHA
+1796:\Ý\@PO
+1797:\Ý\@PHO
+1798:\Ý\@MO
+1799:\Ý\@YO
+179A:\Ý\@RO
+179B:\Ý\@LO
+179C:\Ý\@VO
+179D:\Ý\@SHA
+179E:\Ý\@SSO
+179F:\Ý\@SA
+17A0:\Ý\@HA
+17A1:\Ý\@LA
+17A2:\Ý\@QA
+17A3:\ÃQAQ
+17A4:\ÃQAA
+17A5:\ÃQI
+17A6:\ÃQII
+17A7:\ÃQU
+17A8:\ÃQUK
+17A9:\ÃQUU
+17AA:\ÃQUUV
+17AB:\ÃRY
+17AC:\ÃRYY
+17AD:\ÃLY
+17AE:\ÃLYY
+17AF:\ÃQE
+17B0:\ÃQAI
+17B1:\ÃQOO TYPE ONE
+17B2:\ÃQOO TYPE TWO
+17B3:\ÃQAU
+17B4:\Ý VOWEL INHERENT AQ
+17B5:\Ý VOWEL INHERENT AA
+17B6:\Ý\bAA
+17B7:\Ý\bI
+17B8:\Ý\bII
+17B9:\Ý\bY
+17BA:\Ý\bYY
+17BB:\Ý\bU
+17BC:\Ý\bUU
+17BD:\Ý\bUA
+17BE:\Ý\bOE
+17BF:\Ý\bYA
+17C0:\Ý\bIE
+17C1:\Ý\bE
+17C2:\Ý\bAE
+17C3:\Ý\bAI
+17C4:\Ý\bOO
+17C5:\Ý\bAU
+17C6:\Ý\‚ NIKAHIT
+17C7:\Ý\‚ REAHMUK
+17C8:\Ý\‚ YUUKALEAPINTU
+17C9:\Ý\‚ MUUSIKATOAN
+17CA:\Ý\‚ TRIISAP
+17CB:\Ý\‚ BANTOC
+17CC:\Ý\‚ ROBAT
+17CD:\Ý\‚ TOANDAKHIAT
+17CE:\Ý\‚ KAKABAT
+17CF:\Ý\‚ AHSDA
+17D0:\Ý\‚ SAMYOK SANNYA
+17D1:\Ý\‚ VIRIAM
+17D2:\Ý\‚ COENG
+17D3:\Ý\‚ BATHAMASAT
+17D4:\Ý\‚ KHAN
+17D5:\Ý\‚\ìIYOOSAN
+17D6:\Ý\‚ CAMNUC PII KUUH
+17D7:\Ý\‚ LEK TOO
+17D8:\Ý\‚ BEYYAL
+17D9:\Ý\‚ PHNAEK MUAN
+17DA:\Ý\‚ KOOMUUT
+17DB:\Ý CURRENCY \ RIEL
+17DC:\Ý\‚ AVAKRAHASANYA
+17E0:\Ý\hZERO
+17E1:\Ý\hONE
+17E2:\Ý\hTWO
+17E3:\Ý\hTHREE
+17E4:\Ý\hFOUR
+17E5:\Ý\hFIVE
+17E6:\Ý\hSIX
+17E7:\Ý\hSEVEN
+17E8:\Ý\hE\¼
+17E9:\Ý\hNINE
+1800:MONGOLIAN BIRGA
+1801:MONGOLIAN ELLIPSIS
+1802:MONGOLIAN COMMA
+1803:MONGOLIAN\é
+1804:MONGOLIAN COLON
+1805:MONGOLIAN FOUR DOTS
+1806:MONGOLIAN TODO SOFT HYPHEN
+1807:MONGOLIAN SIBE\CBOUNDARY\¥ER
+1808:MONGOLIAN MANCHU COMMA
+1809:MONGOLIAN MANCHU\é
+180A:MONGOLIAN NIRUGU
+180B:MONGOLIAN FREE \ç ONE
+180C:MONGOLIAN FREE \ç TWO
+180D:MONGOLIAN FREE \ç THREE
+180E:MONGOLIAN VOWEL SEPARATOR
+1810:MONGOLIAN\hZERO
+1811:MONGOLIAN\hONE
+1812:MONGOLIAN\hTWO
+1813:MONGOLIAN\hTHREE
+1814:MONGOLIAN\hFOUR
+1815:MONGOLIAN\hFIVE
+1816:MONGOLIAN\hSIX
+1817:MONGOLIAN\hSEVEN
+1818:MONGOLIAN\hE\¼
+1819:MONGOLIAN\hNINE
+1820:\xA
+1821:\xE
+1822:\xI
+1823:\xO
+1824:\xU
+1825:\xOE
+1826:\xUE
+1827:\xEE
+1828:\xNA
+1829:\xANG
+182A:\xBA
+182B:\xPA
+182C:\xQA
+182D:\xGA
+182E:\xMA
+182F:\xLA
+1830:\xSA
+1831:\xSHA
+1832:\xTA
+1833:\xDA
+1834:\xCHA
+1835:\xJA
+1836:\xYA
+1837:\xRA
+1838:\xWA
+1839:\xFA
+183A:\xKA
+183B:\xKHA
+183C:\xTSA
+183D:\xZA
+183E:\xHAA
+183F:\xZRA
+1840:\xLHA
+1841:\xZHI
+1842:\xCHI
+1843:\xTODO LONG VOWEL\‚
+1844:\xTODO E
+1845:\xTODO I
+1846:\xTODO O
+1847:\xTODO U
+1848:\xTODO OE
+1849:\xTODO UE
+184A:\xTODO ANG
+184B:\xTODO BA
+184C:\xTODO PA
+184D:\xTODO QA
+184E:\xTODO GA
+184F:\xTODO MA
+1850:\xTODO TA
+1851:\xTODO DA
+1852:\xTODO CHA
+1853:\xTODO JA
+1854:\xTODO TSA
+1855:\xTODO YA
+1856:\xTODO WA
+1857:\xTODO KA
+1858:\xTODO GAA
+1859:\xTODO HAA
+185A:\xTODO JIA
+185B:\xTODO NIA
+185C:\xTODO DZA
+185D:\xSIBE E
+185E:\xSIBE I
+185F:\xSIBE IY
+1860:\xSIBE UE
+1861:\xSIBE U
+1862:\xSIBE ANG
+1863:\xSIBE KA
+1864:\xSIBE GA
+1865:\xSIBE HA
+1866:\xSIBE PA
+1867:\xSIBE SHA
+1868:\xSIBE TA
+1869:\xSIBE DA
+186A:\xSIBE JA
+186B:\xSIBE FA
+186C:\xSIBE GAA
+186D:\xSIBE HAA
+186E:\xSIBE TSA
+186F:\xSIBE ZA
+1870:\xSIBE RAA
+1871:\xSIBE CHA
+1872:\xSIBE ZHA
+1873:\xMANCHU I
+1874:\xMANCHU KA
+1875:\xMANCHU RA
+1876:\xMANCHU FA
+1877:\xMANCHU ZHA
+1880:\x\ÕANUSVARA ONE
+1881:\x\ÕVISARGA ONE
+1882:\x\ÕDAMARU
+1883:\x\ÕUBADAMA
+1884:\x\ÕINVERT\ÂUBADAMA
+1885:\x\ÕBALUDA
+1886:\x\ÕTHREE BALUDA
+1887:\x\ÕA
+1888:\x\ÕI
+1889:\x\ÕKA
+188A:\x\ÕNGA
+188B:\x\ÕCA
+188C:\x\ÕTTA
+188D:\x\ÕTTHA
+188E:\x\ÕDDA
+188F:\x\ÕNNA
+1890:\x\ÕTA
+1891:\x\ÕDA
+1892:\x\ÕPA
+1893:\x\ÕPHA
+1894:\x\ÕSSA
+1895:\x\ÕZHA
+1896:\x\ÕZA
+1897:\x\ÕAH
+1898:\xTODO \ÕTA
+1899:\xTODO \ÕZHA
+189A:\xMANCHU \ÕGHA
+189B:\xMANCHU \ÕNGA
+189C:\xMANCHU \ÕCA
+189D:\xMANCHU \ÕJHA
+189E:\xMANCHU \ÕTTA
+189F:\xMANCHU \ÕDDHA
+18A0:\xMANCHU \ÕTA
+18A1:\xMANCHU \ÕDHA
+18A2:\xMANCHU \ÕSSA
+18A3:\xMANCHU \ÕCYA
+18A4:\xMANCHU \ÕZHA
+18A5:\xMANCHU \ÕZA
+18A6:\x\ÕHALF U
+18A7:\x\ÕHALF YA
+18A8:\xMANCHU \ÕBHA
+18A9:\x\ÕDAGALGA
+1E00:\PA\HR\ô\…
+1E01:\LA\HR\ô\…
+1E02:\PB\³\p
+1E03:\LB\³\p
+1E04:\PB\³\…
+1E05:\LB\³\…
+1E06:\PB\H\ä\…
+1E07:\LB\H\ä\…
+1E08:\PC\HCEDILLA\i\Ü
+1E09:\LC\HCEDILLA\i\Ü
+1E0A:\PD\³\p
+1E0B:\LD\³\p
+1E0C:\PD\³\…
+1E0D:\LD\³\…
+1E0E:\PD\H\ä\…
+1E0F:\LD\H\ä\…
+1E10:\PD\HCEDILLA
+1E11:\LD\HCEDILLA
+1E12:\PD\ˆ\…
+1E13:\LD\ˆ\…
+1E14:\PE\H\å\iGRAVE
+1E15:\LE\H\å\iGRAVE
+1E16:\PE\H\å\i\Ü
+1E17:\LE\H\å\i\Ü
+1E18:\PE\ˆ\…
+1E19:\LE\ˆ\…
+1E1A:\PE\H\æ\…
+1E1B:\LE\H\æ\…
+1E1C:\PE\HCEDILLA\iBREVE
+1E1D:\LE\HCEDILLA\iBREVE
+1E1E:\PF\³\p
+1E1F:\LF\³\p
+1E20:\PG\H\å
+1E21:\LG\H\å
+1E22:\PH\³\p
+1E23:\LH\³\p
+1E24:\PH\³\…
+1E25:\LH\³\…
+1E26:\PH\ž
+1E27:\LH\ž
+1E28:\PH\HCEDILLA
+1E29:\LH\HCEDILLA
+1E2A:\PH\HBREVE\…
+1E2B:\LH\HBREVE\…
+1E2C:\PI\H\æ\…
+1E2D:\LI\H\æ\…
+1E2E:\PI\ž\i\Ü
+1E2F:\LI\ž\i\Ü
+1E30:\PK\H\Ü
+1E31:\LK\H\Ü
+1E32:\PK\³\…
+1E33:\LK\³\…
+1E34:\PK\H\ä\…
+1E35:\LK\H\ä\…
+1E36:\PL\³\…
+1E37:\LL\³\…
+1E38:\PL\³\…\i\å
+1E39:\LL\³\…\i\å
+1E3A:\PL\H\ä\…
+1E3B:\LL\H\ä\…
+1E3C:\PL\ˆ\…
+1E3D:\LL\ˆ\…
+1E3E:\PM\H\Ü
+1E3F:\LM\H\Ü
+1E40:\PM\³\p
+1E41:\LM\³\p
+1E42:\PM\³\…
+1E43:\LM\³\…
+1E44:\PN\³\p
+1E45:\LN\³\p
+1E46:\PN\³\…
+1E47:\LN\³\…
+1E48:\PN\H\ä\…
+1E49:\LN\H\ä\…
+1E4A:\PN\ˆ\…
+1E4B:\LN\ˆ\…
+1E4C:\PO\H\æ\i\Ü
+1E4D:\LO\H\æ\i\Ü
+1E4E:\PO\H\æ\iDIAERESIS
+1E4F:\LO\H\æ\iDIAERESIS
+1E50:\PO\H\å\iGRAVE
+1E51:\LO\H\å\iGRAVE
+1E52:\PO\H\å\i\Ü
+1E53:\LO\H\å\i\Ü
+1E54:\PP\H\Ü
+1E55:\LP\H\Ü
+1E56:\PP\³\p
+1E57:\LP\³\p
+1E58:\PR\³\p
+1E59:\LR\³\p
+1E5A:\PR\³\…
+1E5B:\LR\³\…
+1E5C:\PR\³\…\i\å
+1E5D:\LR\³\…\i\å
+1E5E:\PR\H\ä\…
+1E5F:\LR\H\ä\…
+1E60:\PS\³\p
+1E61:\LS\³\p
+1E62:\PS\³\…
+1E63:\LS\³\…
+1E64:\PS\H\Ü\iDOT\p
+1E65:\LS\H\Ü\iDOT\p
+1E66:\PS\û\iDOT\p
+1E67:\LS\û\iDOT\p
+1E68:\PS\³\…\iDOT\p
+1E69:\LS\³\…\iDOT\p
+1E6A:\PT\³\p
+1E6B:\LT\³\p
+1E6C:\PT\³\…
+1E6D:\LT\³\…
+1E6E:\PT\H\ä\…
+1E6F:\LT\H\ä\…
+1E70:\PT\ˆ\…
+1E71:\LT\ˆ\…
+1E72:\PU\ž\…
+1E73:\LU\ž\…
+1E74:\PU\H\æ\…
+1E75:\LU\H\æ\…
+1E76:\PU\ˆ\…
+1E77:\LU\ˆ\…
+1E78:\PU\H\æ\i\Ü
+1E79:\LU\H\æ\i\Ü
+1E7A:\PU\H\å\iDIAERESIS
+1E7B:\LU\H\å\iDIAERESIS
+1E7C:\PV\H\æ
+1E7D:\LV\H\æ
+1E7E:\PV\³\…
+1E7F:\LV\³\…
+1E80:\PW\HGRAVE
+1E81:\LW\HGRAVE
+1E82:\PW\H\Ü
+1E83:\LW\H\Ü
+1E84:\PW\ž
+1E85:\LW\ž
+1E86:\PW\³\p
+1E87:\LW\³\p
+1E88:\PW\³\…
+1E89:\LW\³\…
+1E8A:\PX\³\p
+1E8B:\LX\³\p
+1E8C:\PX\ž
+1E8D:\LX\ž
+1E8E:\PY\³\p
+1E8F:\LY\³\p
+1E90:\PZ\ˆ
+1E91:\LZ\ˆ
+1E92:\PZ\³\…
+1E93:\LZ\³\…
+1E94:\PZ\H\ä\…
+1E95:\LZ\H\ä\…
+1E96:\LH\H\ä\…
+1E97:\LT\ž
+1E98:\LW\HR\ô\p
+1E99:\LY\HR\ô\p
+1E9A:\LA\H\ùHALF R\ô
+1E9B:\LLONG S\³\p
+1EA0:\PA\³\…
+1EA1:\LA\³\…
+1EA2:\PA\í\p
+1EA3:\LA\í\p
+1EA4:\PA\ˆ\i\Ü
+1EA5:\LA\ˆ\i\Ü
+1EA6:\PA\ˆ\iGRAVE
+1EA7:\LA\ˆ\iGRAVE
+1EA8:\PA\ˆ\iHOOK\p
+1EA9:\LA\ˆ\iHOOK\p
+1EAA:\PA\ˆ\i\æ
+1EAB:\LA\ˆ\i\æ
+1EAC:\PA\ˆ\iDOT\…
+1EAD:\LA\ˆ\iDOT\…
+1EAE:\PA\HBREVE\i\Ü
+1EAF:\LA\HBREVE\i\Ü
+1EB0:\PA\HBREVE\iGRAVE
+1EB1:\LA\HBREVE\iGRAVE
+1EB2:\PA\HBREVE\iHOOK\p
+1EB3:\LA\HBREVE\iHOOK\p
+1EB4:\PA\HBREVE\i\æ
+1EB5:\LA\HBREVE\i\æ
+1EB6:\PA\HBREVE\iDOT\…
+1EB7:\LA\HBREVE\iDOT\…
+1EB8:\PE\³\…
+1EB9:\LE\³\…
+1EBA:\PE\í\p
+1EBB:\LE\í\p
+1EBC:\PE\H\æ
+1EBD:\LE\H\æ
+1EBE:\PE\ˆ\i\Ü
+1EBF:\LE\ˆ\i\Ü
+1EC0:\PE\ˆ\iGRAVE
+1EC1:\LE\ˆ\iGRAVE
+1EC2:\PE\ˆ\iHOOK\p
+1EC3:\LE\ˆ\iHOOK\p
+1EC4:\PE\ˆ\i\æ
+1EC5:\LE\ˆ\i\æ
+1EC6:\PE\ˆ\iDOT\…
+1EC7:\LE\ˆ\iDOT\…
+1EC8:\PI\í\p
+1EC9:\LI\í\p
+1ECA:\PI\³\…
+1ECB:\LI\³\…
+1ECC:\PO\³\…
+1ECD:\LO\³\…
+1ECE:\PO\í\p
+1ECF:\LO\í\p
+1ED0:\PO\ˆ\i\Ü
+1ED1:\LO\ˆ\i\Ü
+1ED2:\PO\ˆ\iGRAVE
+1ED3:\LO\ˆ\iGRAVE
+1ED4:\PO\ˆ\iHOOK\p
+1ED5:\LO\ˆ\iHOOK\p
+1ED6:\PO\ˆ\i\æ
+1ED7:\LO\ˆ\i\æ
+1ED8:\PO\ˆ\iDOT\…
+1ED9:\LO\ˆ\iDOT\…
+1EDA:\PO\HHORN\i\Ü
+1EDB:\LO\HHORN\i\Ü
+1EDC:\PO\HHORN\iGRAVE
+1EDD:\LO\HHORN\iGRAVE
+1EDE:\PO\HHORN\iHOOK\p
+1EDF:\LO\HHORN\iHOOK\p
+1EE0:\PO\HHORN\i\æ
+1EE1:\LO\HHORN\i\æ
+1EE2:\PO\HHORN\iDOT\…
+1EE3:\LO\HHORN\iDOT\…
+1EE4:\PU\³\…
+1EE5:\LU\³\…
+1EE6:\PU\í\p
+1EE7:\LU\í\p
+1EE8:\PU\HHORN\i\Ü
+1EE9:\LU\HHORN\i\Ü
+1EEA:\PU\HHORN\iGRAVE
+1EEB:\LU\HHORN\iGRAVE
+1EEC:\PU\HHORN\iHOOK\p
+1EED:\LU\HHORN\iHOOK\p
+1EEE:\PU\HHORN\i\æ
+1EEF:\LU\HHORN\i\æ
+1EF0:\PU\HHORN\iDOT\…
+1EF1:\LU\HHORN\iDOT\…
+1EF2:\PY\HGRAVE
+1EF3:\LY\HGRAVE
+1EF4:\PY\³\…
+1EF5:\LY\³\…
+1EF6:\PY\í\p
+1EF7:\LY\í\p
+1EF8:\PY\H\æ
+1EF9:\LY\H\æ
+1F00:\y\þ\HPSILI
+1F01:\y\þ\HDASIA
+1F02:\y\þ\·VARIA
+1F03:\y\þ\±VARIA
+1F04:\y\þ\·OXIA
+1F05:\y\þ\±OXIA
+1F06:\y\þ\·\´
+1F07:\y\þ\±\´
+1F08:\9\þ\HPSILI
+1F09:\9\þ\HDASIA
+1F0A:\9\þ\·VARIA
+1F0B:\9\þ\±VARIA
+1F0C:\9\þ\·OXIA
+1F0D:\9\þ\±OXIA
+1F0E:\9\þ\·\´
+1F0F:\9\þ\±\´
+1F10:\yE\É\HPSILI
+1F11:\yE\É\HDASIA
+1F12:\yE\É\·VARIA
+1F13:\yE\É\±VARIA
+1F14:\yE\É\·OXIA
+1F15:\yE\É\±OXIA
+1F18:\9E\É\HPSILI
+1F19:\9E\É\HDASIA
+1F1A:\9E\É\·VARIA
+1F1B:\9E\É\±VARIA
+1F1C:\9E\É\·OXIA
+1F1D:\9E\É\±OXIA
+1F20:\yETA\HPSILI
+1F21:\yETA\HDASIA
+1F22:\yETA\·VARIA
+1F23:\yETA\±VARIA
+1F24:\yETA\·OXIA
+1F25:\yETA\±OXIA
+1F26:\yETA\·\´
+1F27:\yETA\±\´
+1F28:\9ETA\HPSILI
+1F29:\9ETA\HDASIA
+1F2A:\9ETA\·VARIA
+1F2B:\9ETA\±VARIA
+1F2C:\9ETA\·OXIA
+1F2D:\9ETA\±OXIA
+1F2E:\9ETA\·\´
+1F2F:\9ETA\±\´
+1F30:\yIOTA\HPSILI
+1F31:\yIOTA\HDASIA
+1F32:\yIOTA\·VARIA
+1F33:\yIOTA\±VARIA
+1F34:\yIOTA\·OXIA
+1F35:\yIOTA\±OXIA
+1F36:\yIOTA\·\´
+1F37:\yIOTA\±\´
+1F38:\9IOTA\HPSILI
+1F39:\9IOTA\HDASIA
+1F3A:\9IOTA\·VARIA
+1F3B:\9IOTA\±VARIA
+1F3C:\9IOTA\·OXIA
+1F3D:\9IOTA\±OXIA
+1F3E:\9IOTA\·\´
+1F3F:\9IOTA\±\´
+1F40:\yOMICRON\HPSILI
+1F41:\yOMICRON\HDASIA
+1F42:\yOMICRON\·VARIA
+1F43:\yOMICRON\±VARIA
+1F44:\yOMICRON\·OXIA
+1F45:\yOMICRON\±OXIA
+1F48:\9OMICRON\HPSILI
+1F49:\9OMICRON\HDASIA
+1F4A:\9OMICRON\·VARIA
+1F4B:\9OMICRON\±VARIA
+1F4C:\9OMICRON\·OXIA
+1F4D:\9OMICRON\±OXIA
+1F50:\yU\É\HPSILI
+1F51:\yU\É\HDASIA
+1F52:\yU\É\·VARIA
+1F53:\yU\É\±VARIA
+1F54:\yU\É\·OXIA
+1F55:\yU\É\±OXIA
+1F56:\yU\É\·\´
+1F57:\yU\É\±\´
+1F59:\9U\É\HDASIA
+1F5B:\9U\É\±VARIA
+1F5D:\9U\É\±OXIA
+1F5F:\9U\É\±\´
+1F60:\y\ü\HPSILI
+1F61:\y\ü\HDASIA
+1F62:\y\ü\·VARIA
+1F63:\y\ü\±VARIA
+1F64:\y\ü\·OXIA
+1F65:\y\ü\±OXIA
+1F66:\y\ü\·\´
+1F67:\y\ü\±\´
+1F68:\9\ü\HPSILI
+1F69:\9\ü\HDASIA
+1F6A:\9\ü\·VARIA
+1F6B:\9\ü\±VARIA
+1F6C:\9\ü\·OXIA
+1F6D:\9\ü\±OXIA
+1F6E:\9\ü\·\´
+1F6F:\9\ü\±\´
+1F70:\y\þ\HVARIA
+1F71:\y\þ\HOXIA
+1F72:\yE\É\HVARIA
+1F73:\yE\É\HOXIA
+1F74:\yETA\HVARIA
+1F75:\yETA\HOXIA
+1F76:\yIOTA\HVARIA
+1F77:\yIOTA\HOXIA
+1F78:\yOMICRON\HVARIA
+1F79:\yOMICRON\HOXIA
+1F7A:\yU\É\HVARIA
+1F7B:\yU\É\HOXIA
+1F7C:\y\ü\HVARIA
+1F7D:\y\ü\HOXIA
+1F80:\y\þ\·YPO\œ
+1F81:\y\þ\±YPO\œ
+1F82:\y\þ\·VARIA\iYPO\œ
+1F83:\y\þ\±VARIA\iYPO\œ
+1F84:\y\þ\·OXIA\iYPO\œ
+1F85:\y\þ\±OXIA\iYPO\œ
+1F86:\y\þ\·\´\iYPO\œ
+1F87:\y\þ\±\´\iYPO\œ
+1F88:\9\þ\·PROS\œ
+1F89:\9\þ\±PROS\œ
+1F8A:\9\þ\·VARIA\iPROS\œ
+1F8B:\9\þ\±VARIA\iPROS\œ
+1F8C:\9\þ\·OXIA\iPROS\œ
+1F8D:\9\þ\±OXIA\iPROS\œ
+1F8E:\9\þ\·\´\iPROS\œ
+1F8F:\9\þ\±\´\iPROS\œ
+1F90:\yETA\·YPO\œ
+1F91:\yETA\±YPO\œ
+1F92:\yETA\·VARIA\iYPO\œ
+1F93:\yETA\±VARIA\iYPO\œ
+1F94:\yETA\·OXIA\iYPO\œ
+1F95:\yETA\±OXIA\iYPO\œ
+1F96:\yETA\·\´\iYPO\œ
+1F97:\yETA\±\´\iYPO\œ
+1F98:\9ETA\·PROS\œ
+1F99:\9ETA\±PROS\œ
+1F9A:\9ETA\·VARIA\iPROS\œ
+1F9B:\9ETA\±VARIA\iPROS\œ
+1F9C:\9ETA\·OXIA\iPROS\œ
+1F9D:\9ETA\±OXIA\iPROS\œ
+1F9E:\9ETA\·\´\iPROS\œ
+1F9F:\9ETA\±\´\iPROS\œ
+1FA0:\y\ü\·YPO\œ
+1FA1:\y\ü\±YPO\œ
+1FA2:\y\ü\·VARIA\iYPO\œ
+1FA3:\y\ü\±VARIA\iYPO\œ
+1FA4:\y\ü\·OXIA\iYPO\œ
+1FA5:\y\ü\±OXIA\iYPO\œ
+1FA6:\y\ü\·\´\iYPO\œ
+1FA7:\y\ü\±\´\iYPO\œ
+1FA8:\9\ü\·PROS\œ
+1FA9:\9\ü\±PROS\œ
+1FAA:\9\ü\·VARIA\iPROS\œ
+1FAB:\9\ü\±VARIA\iPROS\œ
+1FAC:\9\ü\·OXIA\iPROS\œ
+1FAD:\9\ü\±OXIA\iPROS\œ
+1FAE:\9\ü\·\´\iPROS\œ
+1FAF:\9\ü\±\´\iPROS\œ
+1FB0:\y\þ\HVRACHY
+1FB1:\y\þ\H\å
+1FB2:\y\þ\HVARIA\iYPO\œ
+1FB3:\y\þ\HYPO\œ
+1FB4:\y\þ\HOXIA\iYPO\œ
+1FB6:\y\þ\H\´
+1FB7:\y\þ\H\´\iYPO\œ
+1FB8:\9\þ\HVRACHY
+1FB9:\9\þ\H\å
+1FBA:\9\þ\HVARIA
+1FBB:\9\þ\HOXIA
+1FBC:\9\þ\HPROS\œ
+1FBD:GREEK KORONIS
+1FBE:GREEK PROS\œ
+1FBF:GREEK PSILI
+1FC0:GREEK \´
+1FC1:GREEK DIALYTIKA\i\´
+1FC2:\yETA\HVARIA\iYPO\œ
+1FC3:\yETA\HYPO\œ
+1FC4:\yETA\HOXIA\iYPO\œ
+1FC6:\yETA\H\´
+1FC7:\yETA\H\´\iYPO\œ
+1FC8:\9E\É\HVARIA
+1FC9:\9E\É\HOXIA
+1FCA:\9ETA\HVARIA
+1FCB:\9ETA\HOXIA
+1FCC:\9ETA\HPROS\œ
+1FCD:GREEK PSILI\iVARIA
+1FCE:GREEK PSILI\iOXIA
+1FCF:GREEK PSILI\i\´
+1FD0:\yIOTA\HVRACHY
+1FD1:\yIOTA\H\å
+1FD2:\yIOTA\HDIALYTIKA\iVARIA
+1FD3:\yIOTA\HDIALYTIKA\iOXIA
+1FD6:\yIOTA\H\´
+1FD7:\yIOTA\HDIALYTIKA\i\´
+1FD8:\9IOTA\HVRACHY
+1FD9:\9IOTA\H\å
+1FDA:\9IOTA\HVARIA
+1FDB:\9IOTA\HOXIA
+1FDD:GREEK DASIA\iVARIA
+1FDE:GREEK DASIA\iOXIA
+1FDF:GREEK DASIA\i\´
+1FE0:\yU\É\HVRACHY
+1FE1:\yU\É\H\å
+1FE2:\yU\É\HDIALYTIKA\iVARIA
+1FE3:\yU\É\HDIALYTIKA\iOXIA
+1FE4:\yRHO\HPSILI
+1FE5:\yRHO\HDASIA
+1FE6:\yU\É\H\´
+1FE7:\yU\É\HDIALYTIKA\i\´
+1FE8:\9U\É\HVRACHY
+1FE9:\9U\É\H\å
+1FEA:\9U\É\HVARIA
+1FEB:\9U\É\HOXIA
+1FEC:\9RHO\HDASIA
+1FED:GREEK DIALYTIKA\iVARIA
+1FEE:GREEK DIALYTIKA\iOXIA
+1FEF:GREEK VARIA
+1FF2:\y\ü\HVARIA\iYPO\œ
+1FF3:\y\ü\HYPO\œ
+1FF4:\y\ü\HOXIA\iYPO\œ
+1FF6:\y\ü\H\´
+1FF7:\y\ü\H\´\iYPO\œ
+1FF8:\9OMICRON\HVARIA
+1FF9:\9OMICRON\HOXIA
+1FFA:\9\ü\HVARIA
+1FFB:\9\ü\HOXIA
+1FFC:\9\ü\HPROS\œ
+1FFD:GREEK OXIA
+1FFE:GREEK DASIA
+2000:EN QUAD
+2001:EM QUAD
+2002:EN SPACE
+2003:EM SPACE
+2004:THREE-PER-EM SPACE
+2005:FOUR-PER-EM SPACE
+2006:SIX-PER-EM SPACE
+2007:FIGURE SPACE
+2008:PUNCTU\” SPACE
+2009:THIN SPACE
+200A:HAIR SPACE
+200B:ZERO WIDTH SPACE
+200C:ZERO WIDTH NON-JOINER
+200D:ZERO WIDTH JOINER
+200E:\‰-TO-\ùMARK
+200F:\q-TO-\‰\¥
+2010:HYPHEN
+2011:NON-BREAK\ô HYPHEN
+2012:FIGURE DASH
+2013:EN DASH
+2014:EM DASH
+2015:\\ì
+2016:\0 \€ \ä
+2017:\0 LOW \ä
+2018:\‰ S\ôLE QUOT\”\¥
+2019:\ùS\ôLE QUOT\”\¥
+201A:S\ôLE LOW-9 QUOT\”\¥
+201B:S\ôLE HIGH-REVERSED-9 QUOT\”\¥
+201C:\‰ \0 QUOT\”\¥
+201D:\ù\0 QUOT\”\¥
+201E:\0 LOW-9 QUOT\”\¥
+201F:\0 HIGH-REVERSED-9 QUOT\”\¥
+2020:DAGGER
+2021:\0 DAGGER
+2022:BULLET
+2023:TRIANGULAR BULLET
+2024:ONE DOT LEADER
+2025:TWO DOT LEADER
+2026:\ ELLIPSIS
+2027:HYPHEN\” POINT
+2028:\ä SEPARATOR
+2029:PARAGRAPH SEPARATOR
+202A:\‰-TO-\ùEMBEDD\ô
+202B:\q-TO-\‰ EMBEDD\ô
+202C:POP DIRECTION\XATT\ô
+202D:\‰-TO-\ùOVERRIDE
+202E:\q-TO-\‰ OVERRIDE
+202F:NARROW NO-BREAK SPACE
+2030:PER MILLE\‚
+2031:PER TEN THOUSAND\‚
+2032:PRIME
+2033:\0 PRIME
+2034:TRIPLE PRIME
+2035:\öPRIME
+2036:\ö\0 PRIME
+2037:\öTRIPLE PRIME
+2038:CARET
+2039:S\ôLE \‰-\ÄANGLE QUOT\”\¥
+203A:S\ôLE \q-\ÄANGLE QUOT\”\¥
+203B:REFERENCE\¥
+203C:\0 EXCLAM\”\¥
+203D:INTERROBANG
+203E:OVER\ä
+203F:UNDERTIE
+2040:CHARACTER TIE
+2041:CARET INSERTION POINT
+2042:ASTERISM
+2043:HYPHEN BULLET
+2044:FRACTION SLASH
+2045:\‰ \r\–\HQUILL
+2046:\ù\r\–\HQUILL
+2047:\0 QUESTION\¥
+2048:QUESTION EXCLAM\”\¥
+2049:EXCLAM\” QUESTION\¥
+204A:TIRONIAN\‚ ET
+204B:\öPILCROW\‚
+204C:\¬ \‰\Š BULLET
+204D:\¬ \q\Š BULLET
+204E:LOW ASTERISK
+204F:\öSEMICOLON
+2050:CLOSE UP
+2051:TWO ASTERISKS ALIGN\Â\€LY
+2052:COMMERCIAL MINUS\‚
+2057:QUADRUPLE PRIME
+205F:MEDIUM \ESPACE
+2060:WORD JOINER
+2061:FUNCTION APPLIC\”
+2062:INVISIBLE TIMES
+2063:INVISIBLE SEPARATOR
+206A:INHIBIT SYMMETRIC SWAPP\ô
+206B:ACTIVATE SYMMETRIC SWAPP\ô
+206C:INHIBIT \Ê FORM SHAP\ô
+206D:ACTIVATE \Ê FORM SHAP\ô
+206E:N\”AL\hSHAPES
+206F:NOMINAL\hSHAPES
+2070:SUPER\Ž ZERO
+2071:SUPER\Ž \LI
+2074:SUPER\Ž FOUR
+2075:SUPER\Ž FIVE
+2076:SUPER\Ž SIX
+2077:SUPER\Ž SEVEN
+2078:SUPER\Ž E\¼
+2079:SUPER\Ž NINE
+207A:SUPER\Ž PLUS\‚
+207B:SUPER\Ž MINUS
+207C:SUPER\Ž EQUALS\‚
+207D:SUPER\Ž \‰ \ÑS
+207E:SUPER\Ž \ù\ÑS
+207F:SUPER\Ž \LN
+2080:SUB\Ž ZERO
+2081:SUB\Ž ONE
+2082:SUB\Ž TWO
+2083:SUB\Ž THREE
+2084:SUB\Ž FOUR
+2085:SUB\Ž FIVE
+2086:SUB\Ž SIX
+2087:SUB\Ž SEVEN
+2088:SUB\Ž E\¼
+2089:SUB\Ž NINE
+208A:SUB\Ž PLUS\‚
+208B:SUB\Ž MINUS
+208C:SUB\Ž EQUALS\‚
+208D:SUB\Ž \‰ \ÑS
+208E:SUB\Ž \ù\ÑS
+20A0:EURO-CURRENCY\‚
+20A1:COLON\‚
+20A2:CRUZEIRO\‚
+20A3:FRENCH FRANC\‚
+20A4:LIRA\‚
+20A5:MILL\‚
+20A6:NAIRA\‚
+20A7:PESETA\‚
+20A8:RUPEE\‚
+20A9:WON\‚
+20AA:NEW SHEQEL\‚
+20AB:DONG\‚
+20AC:EURO\‚
+20AD:KIP\‚
+20AE:TUGRIK\‚
+20AF:DRACHMA\‚
+20B0:GERMAN PENNY\‚
+20B1:PESO\‚
+20D0:\o\‰ HARPOON\p
+20D1:\o\ùHARPOON\p
+20D2:\oLONG \€ \ä OVERLAY
+20D3:\oSHORT \€ \ä OVERLAY
+20D4:\oANTICLOCKWISE\u\p
+20D5:\oCLOCKWISE\u\p
+20D6:\o\‰\u\p
+20D7:\o\q\u\p
+20D8:\oR\ô OVERLAY
+20D9:\oCLOCKWISE R\ô OVERLAY
+20DA:\oANTICLOCKWISE R\ô OVERLAY
+20DB:\oTHREE DOTS\p
+20DC:\oFOUR DOTS\p
+20DD:\oENCLOS\ô \Ð
+20DE:\oENCLOS\ô \ý
+20DF:\oENCLOS\ô DIAMOND
+20E0:\oENCLOS\ô \Ð BACKSLASH
+20E1:\o\‰ \q\u\p
+20E2:\oENCLOS\ô SCREEN
+20E3:\oENCLOS\ô KEYCAP
+20E4:\oENCLOS\ô UPWARD \Ä\¾
+20E5:\oREVERSE SOLIDUS OVERLAY
+20E6:\o\0 \€ \Á OVERLAY
+20E7:\oANNUITY \
+20E8:\oTRIPLE UNDERDOT
+20E9:\oWIDE BRIDGE\p
+20EA:\o\‰\Š\u OVERLAY
+2100:ACCOUNT OF
+2101:ADDRESS\ÂTO THE SUBJECT
+2102:\¤\ÒC
+2103:DEGREE CELSIUS
+2104:CENTRE \ä \
+2105:CARE OF
+2106:CADA UNA
+2107:EULER CONSTANT
+2108:SCRUPLE
+2109:DEGREE FAHRENHEIT
+210A:\Ž\ÇG
+210B:\Ž\ÒH
+210C:\¬-LETTER\ÒH
+210D:\¤\ÒH
+210E:PLANCK CONSTANT
+210F:PLANCK CONSTANT OVER TWO PI
+2110:\Ž\ÒI
+2111:\¬-LETTER\ÒI
+2112:\Ž\ÒL
+2113:\Ž\ÇL
+2114:L B\ì \
+2115:\¤\ÒN
+2116:NUMERO\‚
+2117:SOUND RECORD\ô COPY\q
+2118:\Ž\ÒP
+2119:\¤\ÒP
+211A:\¤\ÒQ
+211B:\Ž\ÒR
+211C:\¬-LETTER\ÒR
+211D:\¤\ÒR
+211E:PRE\ŽION TAKE
+211F:RESPONSE
+2120:SERVICE\¥
+2121:TELEPHONE\‚
+2122:TRADE\¥\‚
+2123:VERSICLE
+2124:\¤\ÒZ
+2125:OUNCE\‚
+2126:OHM\‚
+2127:INVERT\ÂOHM\‚
+2128:\¬-LETTER\ÒZ
+2129:TURN\Â\yIOTA
+212A:KELVIN\‚
+212B:ANGSTROM\‚
+212C:\Ž\ÒB
+212D:\¬-LETTER\ÒC
+212E:ESTIMAT\Â\
+212F:\Ž\ÇE
+2130:\Ž\ÒE
+2131:\Ž\ÒF
+2132:TURNED\ÒF
+2133:\Ž\ÒM
+2134:\Ž\ÇO
+2135:ALEF \
+2136:BET \
+2137:GIMEL \
+2138:DALET \
+2139:INFORM\” SOURCE
+213A:ROTATED\ÒQ
+213D:\¤\ÇGAMMA
+213E:\¤\ÒGAMMA
+213F:\¤\ÒPI
+2140:\¤ N-ARY SUMM\”
+2141:TURN\ÂSANS-SERIF\ÒG
+2142:TURN\ÂSANS-SERIF\ÒL
+2143:\öSANS-SERIF\ÒL
+2144:TURN\ÂSANS-SERIF\ÒY
+2145:\¤ \›D
+2146:\¤ \—D
+2147:\¤ \—E
+2148:\¤ \—I
+2149:\¤ \—J
+214A:PROPERTY \ä
+214B:TURN\ÂAMPERSAND
+2153:\úONE THIRD
+2154:\úTWO THIRDS
+2155:\úONE FIFTH
+2156:\úTWO FIFTHS
+2157:\úTHREE FIFTHS
+2158:\úFOUR FIFTHS
+2159:\úONE SIXTH
+215A:\úFIVE SIXTHS
+215B:\úONE E\¼H
+215C:\úTHREE E\¼HS
+215D:\úFIVE E\¼HS
+215E:\úSEVEN E\¼HS
+215F:FRACTION NUMERATOR ONE
+2160:\²ONE
+2161:\²TWO
+2162:\²THREE
+2163:\²FOUR
+2164:\²FIVE
+2165:\²SIX
+2166:\²SEVEN
+2167:\²E\¼
+2168:\²NINE
+2169:\²TEN
+216A:\²ELEVEN
+216B:\²TWELVE
+216C:\²FIFTY
+216D:\²ONE HUNDRED
+216E:\²FIVE HUNDRED
+216F:\²ONE THOUSAND
+2170:\§\²ONE
+2171:\§\²TWO
+2172:\§\²THREE
+2173:\§\²FOUR
+2174:\§\²FIVE
+2175:\§\²SIX
+2176:\§\²SEVEN
+2177:\§\²E\¼
+2178:\§\²NINE
+2179:\§\²TEN
+217A:\§\²ELEVEN
+217B:\§\²TWELVE
+217C:\§\²FIFTY
+217D:\§\²ONE HUNDRED
+217E:\§\²FIVE HUNDRED
+217F:\§\²ONE THOUSAND
+2180:\²ONE THOUSAND C D
+2181:\²FIVE THOUSAND
+2182:\²TEN THOUSAND
+2183:\²\öONE HUNDRED
+2190:\‰\Š\u
+2191:UP\Š\u
+2192:\Ù
+2193:\Ë\Š\u
+2194:\‰ \q\u
+2195:UP \Ë\u
+2196:NORTH WEST\u
+2197:NORTH EAST\u
+2198:SOUTH EAST\u
+2199:SOUTH WEST\u
+219A:\‰\Š\u\H\Á
+219B:\Ù\H\Á
+219C:\‰\Š WAVE\u
+219D:\q\Š WAVE\u
+219E:\‰\Š TWO HEADED\u
+219F:UP\Š TWO HEADED\u
+21A0:\q\Š TWO HEADED\u
+21A1:\Ë\Š TWO HEADED\u
+21A2:\‰\Š\u\HTAIL
+21A3:\Ù\HTAIL
+21A4:\‰\Š\u FROM\ì
+21A5:UP\Š\u FROM\ì
+21A6:\Ù FROM\ì
+21A7:\Ë\Š\u FROM\ì
+21A8:UP \Ë\u\HBASE
+21A9:\‰\Š\u\í
+21AA:\Ù\í
+21AB:\‰\Š\u\HLOOP
+21AC:\Ù\HLOOP
+21AD:\‰ \ùWAVE\u
+21AE:\‰ \q\u\H\Á
+21AF:\Ë\Š ZIGZAG\u
+21B0:UP\Š\u\HTIP \‰\Š
+21B1:UP\Š\u\HTIP \q\Š
+21B2:\Ë\Š\u\HTIP \‰\Š
+21B3:\Ë\Š\u\HTIP \q\Š
+21B4:\Ù\HCORNER \Ë\Š
+21B5:\Ë\Š\u\HCORNER \‰\Š
+21B6:ANTICLOCKWISE TOP SEMI\Ð\u
+21B7:CLOCKWISE TOP SEMI\Ð\u
+21B8:NORTH WEST\u TO LONG\ì
+21B9:\‰\Š\u TO\ì OVER \Ù TO\ì
+21BA:ANTICLOCKWISE OPEN \Ð\u
+21BB:CLOCKWISE OPEN \Ð\u
+21BC:\‰\ƒUP\Š
+21BD:\‰\ƒ\Ë\Š
+21BE:UP\ƒ\q\Š
+21BF:UP\ƒ\‰\Š
+21C0:\q\ƒUP\Š
+21C1:\q\ƒ\Ë\Š
+21C2:\Ë\ƒ\q\Š
+21C3:\Ë\ƒ\‰\Š
+21C4:\Ù OVER \‰\Š\u
+21C5:UP\Š\u \‰\Š OF \Ë\Š\u
+21C6:\‰\Š\u OVER \Ù
+21C7:\‰\Š PAIRED\uS
+21C8:UP\Š PAIRED\uS
+21C9:\q\Š PAIRED\uS
+21CA:\Ë\Š PAIRED\uS
+21CB:\‰\Š HARPOON OVER \q\Š HARPOON
+21CC:\q\Š HARPOON OVER \‰\Š HARPOON
+21CD:\‰\Š \0\u\H\Á
+21CE:\‰ \ù\0\u\H\Á
+21CF:\q\Š \0\u\H\Á
+21D0:\‰\Š \0\u
+21D1:UP\Š \0\u
+21D2:\q\Š \0\u
+21D3:\Ë\Š \0\u
+21D4:\‰ \ù\0\u
+21D5:UP \Ë \0\u
+21D6:NORTH WEST \0\u
+21D7:NORTH EAST \0\u
+21D8:SOUTH EAST \0\u
+21D9:SOUTH WEST \0\u
+21DA:\‰\Š TRIPLE\u
+21DB:\q\Š TRIPLE\u
+21DC:\‰\Š SQUIGGLE\u
+21DD:\q\Š SQUIGGLE\u
+21DE:UP\Š\u\H\0 \Á
+21DF:\Ë\Š\u\H\0 \Á
+21E0:\‰\Š DASHED\u
+21E1:UP\Š DASHED\u
+21E2:\q\Š DASHED\u
+21E3:\Ë\Š DASHED\u
+21E4:\‰\Š\u TO\ì
+21E5:\Ù TO\ì
+21E6:\‰\Š WHITE\u
+21E7:UP\Š WHITE\u
+21E8:\q\Š WHITE\u
+21E9:\Ë\Š WHITE\u
+21EA:UP\Š WHITE\u FROM\ì
+21EB:UP\Š WHITE\u ON PEDESTAL
+21EC:UP\Š WHITE\u ON PEDESTAL\H\\ì
+21ED:UP\Š WHITE\u ON PEDESTAL\H\€\ì
+21EE:UP\Š \¦\0\u
+21EF:UP\Š \¦\0\u ON PEDESTAL
+21F0:\q\Š WHITE\u FROM WALL
+21F1:NORTH WEST\u TO CORNER
+21F2:SOUTH EAST\u TO CORNER
+21F3:UP \Ë WHITE\u
+21F4:\q\u WITH\Ç\Ð
+21F5:\Ë\Š\u \‰\Š OF UP\Š\u
+21F6:THREE \ÙS
+21F7:\‰\Š\u\H\€ \Á
+21F8:\Ù\H\€ \Á
+21F9:\‰ \q\u\H\€ \Á
+21FA:\‰\Š\u\H\0 \€ \Á
+21FB:\Ù\H\0 \€ \Á
+21FC:\‰ \q\u\H\0 \€ \Á
+21FD:\‰\Š OPEN-HEADED\u
+21FE:\q\Š OPEN-HEADED\u
+21FF:\‰ \ùOPEN-HEADED\u
+2200:FOR ALL
+2201:COMPLEMENT
+2202:PARTIAL DIFFERENTIAL
+2203:THERE EXISTS
+2204:THERE DOES NOT EXIST
+2205:EMPTY SET
+2206:INCREMENT
+2207:NABLA
+2208:ELEMENT OF
+2209:NOT AN ELEMENT OF
+220A:\§ELEMENT OF
+220B:CONTAINS AS MEMBER
+220C:DOES NOT CONTAIN AS MEMBER
+220D:\§CONTAINS AS MEMBER
+220E:END OF PROOF
+220F:N-ARY PRODUCT
+2210:N-ARY COPRODUCT
+2211:N-ARY SUMM\”
+2212:MINUS\‚
+2213:MINUS-OR-PLUS\‚
+2214:DOT PLUS
+2215:DIVISION SLASH
+2216:SET MINUS
+2217:ASTERISK\Ú
+2218:R\ô\Ú
+2219:BULLET\Ú
+221A:\rROOT
+221B:CUBE ROOT
+221C:FOURTH ROOT
+221D:PROPORTIONAL TO
+221E:INFINITY
+221F:\ùANGLE
+2220:ANGLE
+2221:MEASUR\ÂANGLE
+2222:SPHERICAL ANGLE
+2223:DIVIDES
+2224:DOES NOT DIVIDE
+2225:PARALLEL TO
+2226:NOT PARALLEL TO
+2227:LOGICAL AND
+2228:LOGICAL OR
+2229:INTERSECTION
+222A:UNION
+222B:INTEGRAL
+222C:\0 INTEGRAL
+222D:TRIPLE INTEGRAL
+222E:CONTOUR INTEGRAL
+222F:SURFACE INTEGRAL
+2230:VOLUME INTEGRAL
+2231:CLOCKWISE INTEGRAL
+2232:CLOCKWISE CONTOUR INTEGRAL
+2233:ANTICLOCKWISE CONTOUR INTEGRAL
+2234:THEREFORE
+2235:BECAUSE
+2236:RATIO
+2237:PROPORTION
+2238:DOT MINUS
+2239:EXCESS
+223A:GEOMETRIC PROPORTION
+223B:HOMOTHETIC
+223C:\æ\Ú
+223D:\ö\æ
+223E:INVERT\ÂLAZY S
+223F:SINE WAVE
+2240:WREATH PRODUCT
+2241:NOT \æ
+2242:MINUS \æ
+2243:ASYMPTOTICALLY\‘
+2244:NOT ASYMPTOTICALLY\‘
+2245:APPROXIMATELY\‘
+2246:APPROXIMATELY BUT NOT ACTUALLY\‘
+2247:NEITHER APPROXIMATELY NOR ACTUALLY\‘
+2248:ALMOST\‘
+2249:NOT ALMOST\‘
+224A:ALMOST EQUAL OR\‘
+224B:TRIPLE \æ
+224C:ALL\‘
+224D:EQUIVALENT TO
+224E:GEOMETRICALLY EQUIVALENT TO
+224F:DIFFERENCE BETWEEN
+2250:APPROACHES THE LIMIT
+2251:GEOMETRICALLY\‘
+2252:APPROXIMATELY\‘ OR THE IMAGE OF
+2253:IMAGE OF OR APPROXIMATELY\‘
+2254:COLON EQUALS
+2255:EQUALS COLON
+2256:R\ô IN\‘
+2257:R\ô\‘
+2258:CORRESPONDS TO
+2259:ESTIMATES
+225A:EQUIANGULAR TO
+225B:STAR EQUALS
+225C:DELTA\‘
+225D:EQUAL TO BY DEFINITION
+225E:MEASUR\ÂBY
+225F:QUESTIONED\‘
+2260:NOT\‘
+2261:IDENTICAL TO
+2262:NOT IDENTICAL TO
+2263:STRICTLY EQUIVALENT TO
+2264:\µ OR\‘
+2265:\’ OR\‘
+2266:\µ OVER\‘
+2267:\’ OVER\‘
+2268:\µ BUT NOT\‘
+2269:\’ BUT NOT\‘
+226A:MUCH \µ
+226B:MUCH \’
+226C:BETWEEN
+226D:NOT EQUIVALENT TO
+226E:NOT \µ
+226F:NOT \’
+2270:NEITHER \µ NOR\‘
+2271:NEITHER \’ NOR\‘
+2272:\µ OR EQUIVALENT TO
+2273:\’ OR EQUIVALENT TO
+2274:NEITHER \µ NOR EQUIVALENT TO
+2275:NEITHER \’ NOR EQUIVALENT TO
+2276:\µ OR \’
+2277:\’ OR \µ
+2278:NEITHER \µ NOR \’
+2279:NEITHER \’ NOR \µ
+227A:PRECEDES
+227B:SUCCEEDS
+227C:PRECEDES OR\‘
+227D:SUCCEEDS OR\‘
+227E:PRECEDES OR EQUIVALENT TO
+227F:SUCCEEDS OR EQUIVALENT TO
+2280:DOES NOT PRECEDE
+2281:DOES NOT SUCCEED
+2282:SUBSET OF
+2283:SUPERSET OF
+2284:NOT A SUBSET OF
+2285:NOT A SUPERSET OF
+2286:SUBSET OF OR\‘
+2287:SUPERSET OF OR\‘
+2288:NEITHER A SUBSET OF NOR\‘
+2289:NEITHER A SUPERSET OF NOR\‘
+228A:SUBSET OF\HNOT\‘
+228B:SUPERSET OF\HNOT\‘
+228C:MULTISET
+228D:MULTISET MULTIPLIC\”
+228E:MULTISET UNION
+228F:\rIMAGE OF
+2290:\rORIGINAL OF
+2291:\rIMAGE OF OR\‘
+2292:\rORIGINAL OF OR\‘
+2293:\rCAP
+2294:\rCUP
+2295:\cPLUS
+2296:\cMINUS
+2297:\cTIMES
+2298:\cDIVISION SLASH
+2299:\cDOT\Ú
+229A:\cR\ô\Ú
+229B:\cASTERISK\Ú
+229C:\cEQUALS
+229D:\cDASH
+229E:\ýD PLUS
+229F:\ýD MINUS
+22A0:\ýD TIMES
+22A1:\ýD DOT\Ú
+22A2:\ùTACK
+22A3:\‰ TACK
+22A4:\Ë TACK
+22A5:UP TACK
+22A6:ASSERTION
+22A7:MODELS
+22A8:TRUE
+22A9:FORCES
+22AA:TRIPLE \€\ì \ùTURNSTILE
+22AB:\0 \€\ì \0 \ùTURNSTILE
+22AC:DOES NOT PROVE
+22AD:NOT TRUE
+22AE:DOES NOT FORCE
+22AF:NEGAT\Â\0 \€\ì \0 \ùTURNSTILE
+22B0:PRECEDES UNDER REL\”
+22B1:SUCCEEDS UNDER REL\”
+22B2:NORMAL SUBGROUP OF
+22B3:CONTAINS AS NORMAL SUBGROUP
+22B4:NORMAL SUBGROUP OF OR\‘
+22B5:CONTAINS AS NORMAL SUBGROUP OR\‘
+22B6:ORIGINAL OF
+22B7:IMAGE OF
+22B8:MULTIMAP
+22B9:HERMITIAN CONJUGATE MATRIX
+22BA:INTERCALATE
+22BB:XOR
+22BC:NAND
+22BD:NOR
+22BE:\ùANGLE\HARC
+22BF:\ù\¾
+22C0:N-ARY LOGICAL AND
+22C1:N-ARY LOGICAL OR
+22C2:N-ARY INTERSECTION
+22C3:N-ARY UNION
+22C4:DIAMOND\Ú
+22C5:DOT\Ú
+22C6:STAR\Ú
+22C7:DIVISION TIMES
+22C8:BOWTIE
+22C9:\‰ NORMAL FACTOR SEMIDIRECT PRODUCT
+22CA:\ùNORMAL FACTOR SEMIDIRECT PRODUCT
+22CB:\‰ SEMIDIRECT PRODUCT
+22CC:\ùSEMIDIRECT PRODUCT
+22CD:\ö\æ EQUALS
+22CE:CURLY LOGICAL OR
+22CF:CURLY LOGICAL AND
+22D0:\0 SUBSET
+22D1:\0 SUPERSET
+22D2:\0 INTERSECTION
+22D3:\0 UNION
+22D4:PITCHFORK
+22D5:EQUAL\iPARALLEL TO
+22D6:\µ\³
+22D7:\’\³
+22D8:VERY MUCH \µ
+22D9:VERY MUCH \’
+22DA:\µ\‘ OR \’
+22DB:\’\‘ OR \µ
+22DC:EQUAL TO OR \µ
+22DD:EQUAL TO OR \’
+22DE:EQUAL TO OR PRECEDES
+22DF:EQUAL TO OR SUCCEEDS
+22E0:DOES NOT PRECEDE OR EQUAL
+22E1:DOES NOT SUCCE\ÂOR EQUAL
+22E2:NOT \rIMAGE OF OR\‘
+22E3:NOT \rORIGINAL OF OR\‘
+22E4:\rIMAGE OF OR NOT\‘
+22E5:\rORIGINAL OF OR NOT\‘
+22E6:\µ BUT NOT EQUIVALENT TO
+22E7:\’ BUT NOT EQUIVALENT TO
+22E8:PRECEDES BUT NOT EQUIVALENT TO
+22E9:SUCCEEDS BUT NOT EQUIVALENT TO
+22EA:NOT NORMAL SUBGROUP OF
+22EB:DOES NOT CONTAIN AS NORMAL SUBGROUP
+22EC:NOT NORMAL SUBGROUP OF OR\‘
+22ED:DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+22EE:\€ ELLIPSIS
+22EF:MID\ä \ ELLIPSIS
+22F0:UP \ùDIAGONAL ELLIPSIS
+22F1:\Ë \ùDIAGONAL ELLIPSIS
+22F2:ELEMENT OF\HLONG \ \Á
+22F3:ELEMENT OF\H\€\ì AT END OF \ \Á
+22F4:\§ELEMENT OF\H\€\ì AT END OF \ \Á
+22F5:ELEMENT OF\³\p
+22F6:ELEMENT OF\HOVERBAR
+22F7:\§ELEMENT OF\HOVERBAR
+22F8:ELEMENT OF\HUNDERBAR
+22F9:ELEMENT OF\HTWO \ \ÁS
+22FA:CONTAINS\HLONG \ \Á
+22FB:CONTAINS\H\€\ì AT END OF \ \Á
+22FC:\§CONTAINS\H\€\ì AT END OF \ \Á
+22FD:CONTAINS\HOVERBAR
+22FE:\§CONTAINS\HOVERBAR
+22FF:Z NOT\” BAG MEMBERSHIP
+2300:DIAMETER\‚
+2301:ELECTRIC\u
+2302:HOUSE
+2303:UP\uHEAD
+2304:\Ë\uHEAD
+2305:PROJECTIVE
+2306:PERSPECTIVE
+2307:WAVY \ä
+2308:\‰ CEIL\ô
+2309:\ùCEIL\ô
+230A:\‰ FLOOR
+230B:\ùFLOOR
+230C:BOTTOM \ùCROP
+230D:BOTTOM \‰ CROP
+230E:TOP \ùCROP
+230F:TOP \‰ CROP
+2310:\öNOT\‚
+2311:\rLOZENGE
+2312:ARC
+2313:SEGMENT
+2314:SECTOR
+2315:TELEPHONE RECORDER
+2316:POSITION INDICATOR
+2317:VIEWDATA \ý
+2318:PLACE OF INTEREST\‚
+2319:TURN\ÂNOT\‚
+231A:WATCH
+231B:HOURGLASS
+231C:TOP \‰ CORNER
+231D:TOP \ùCORNER
+231E:BOTTOM \‰ CORNER
+231F:BOTTOM \ùCORNER
+2320:TOP HALF INTEGRAL
+2321:BOTTOM HALF INTEGRAL
+2322:FROWN
+2323:SMILE
+2324:UP\uHEAD BETWEEN TWO \\ìS
+2325:OPTION KEY
+2326:ERASE TO THE \q
+2327:X IN A RECTANGLE BOX
+2328:KEYBOARD
+2329:\‰-\ÄANGLE \–
+232A:\q-\ÄANGLE \–
+232B:ERASE TO THE \‰
+232C:BENZENE R\ô
+232D:CYLINDRICITY
+232E:ALL AROUND-PROFILE
+232F:SYMMETRY
+2330:TOTAL RUNOUT
+2331:DIMENSION ORIGIN
+2332:CONICAL TAPER
+2333:SLOPE
+2334:COUNTERBORE
+2335:COUNTERSINK
+2336:\lI-BEAM
+2337:\lSQUISH QUAD
+2338:\lQUAD EQUAL
+2339:\lQUAD DIVIDE
+233A:\lQUAD DIAMOND
+233B:\lQUAD JOT
+233C:\lQUAD \Ð
+233D:\l\Ð STILE
+233E:\l\Ð JOT
+233F:\lSLASH\ì
+2340:\lBACKSLASH\ì
+2341:\lQUAD SLASH
+2342:\lQUAD BACKSLASH
+2343:\lQUAD \µ
+2344:\lQUAD \’
+2345:\l\‰\Š VANE
+2346:\l\q\Š VANE
+2347:\lQUAD \‰\Š\u
+2348:\lQUAD \Ù
+2349:\l\Ð BACKSLASH
+234A:\l\Ë TACK UNDERBAR
+234B:\lDELTA STILE
+234C:\lQUAD \Ë CARET
+234D:\lQUAD DELTA
+234E:\l\Ë TACK JOT
+234F:\lUP\Š VANE
+2350:\lQUAD UP\Š\u
+2351:\lUP TACK OVERBAR
+2352:\lDEL STILE
+2353:\lQUAD UP CARET
+2354:\lQUAD DEL
+2355:\lUP TACK JOT
+2356:\l\Ë\Š VANE
+2357:\lQUAD \Ë\Š\u
+2358:\lQUOTE UNDERBAR
+2359:\lDELTA UNDERBAR
+235A:\lDIAMOND UNDERBAR
+235B:\lJOT UNDERBAR
+235C:\l\Ð UNDERBAR
+235D:\lUP SHOE JOT
+235E:\lQUOTE QUAD
+235F:\l\Ð STAR
+2360:\lQUAD COLON
+2361:\lUP TACK DIAERESIS
+2362:\lDEL DIAERESIS
+2363:\lSTAR DIAERESIS
+2364:\lJOT DIAERESIS
+2365:\l\Ð DIAERESIS
+2366:\l\Ë SHOE STILE
+2367:\l\‰ SHOE STILE
+2368:\l\æ DIAERESIS
+2369:\l\’ DIAERESIS
+236A:\lCOMMA\ì
+236B:\lDEL \æ
+236C:\lZILDE
+236D:\lSTILE \æ
+236E:\lSEMICOLON UNDERBAR
+236F:\lQUAD NOT EQUAL
+2370:\lQUAD QUESTION
+2371:\l\Ë CARET \æ
+2372:\lUP CARET \æ
+2373:\lIOTA
+2374:\lRHO
+2375:\l\ü
+2376:\l\þ UNDERBAR
+2377:\lE\É UNDERBAR
+2378:\lIOTA UNDERBAR
+2379:\l\ü UNDERBAR
+237A:\l\þ
+237B:NOT CHECK\¥
+237C:\ùANGLE\H\Ë\Š ZIGZAG\u
+237D:SHOULDER\ÂOPEN BOX
+237E:BELL \
+237F:\€ \ä\HMIDDLE DOT
+2380:INSERTION \
+2381:CONTINUOUS UNDER\ä \
+2382:DISCONTINUOUS UNDER\ä \
+2383:EMPHASIS \
+2384:COMPOSITION \
+2385:\¦\rWITH CENTRE \€ \ä
+2386:ENTER \
+2387:ALTERNATIVE KEY \
+2388:HELM \
+2389:\c\\ì\HNOTCH
+238A:\c\¾ \Ë
+238B:BROKEN \Ð\HNORTHWEST\u
+238C:UNDO \
+238D:MONOSTABLE \
+238E:HYSTERESIS \
+238F:OPEN-CIRCUIT-OUTPUT H-TYPE \
+2390:OPEN-CIRCUIT-OUTPUT L-TYPE \
+2391:PASSIVE-PULL-\Ë-OUTPUT \
+2392:PASSIVE-PULL-UP-OUTPUT \
+2393:DIRECT CURRENT \ FORM TWO
+2394:SOFTWARE-FUNCTION \
+2395:\lQUAD
+2396:DECIMAL SEPARATOR KEY \
+2397:PREVIOUS PAGE
+2398:NEXT PAGE
+2399:PRINT SCREEN \
+239A:CLEAR SCREEN \
+239B:\‰ \ÑS \÷HOOK
+239C:\‰ \ÑS EXTENSION
+239D:\‰ \ÑS \ïHOOK
+239E:\ù\ÑS \÷HOOK
+239F:\ù\ÑS EXTENSION
+23A0:\ù\ÑS \ïHOOK
+23A1:\‰ \r\– \÷CORNER
+23A2:\‰ \r\– EXTENSION
+23A3:\‰ \r\– \ïCORNER
+23A4:\ù\r\– \÷CORNER
+23A5:\ù\r\– EXTENSION
+23A6:\ù\r\– \ïCORNER
+23A7:\‰ CURLY \– \÷HOOK
+23A8:\‰ CURLY \– MIDDLE PIECE
+23A9:\‰ CURLY \– \ïHOOK
+23AA:CURLY \– EXTENSION
+23AB:\ùCURLY \– \÷HOOK
+23AC:\ùCURLY \– MIDDLE PIECE
+23AD:\ùCURLY \– \ïHOOK
+23AE:INTEGRAL EXTENSION
+23AF:\ \ä EXTENSION
+23B0:\÷\‰ OR \ï\ùCURLY \– SECTION
+23B1:\÷\ùOR \ï\‰ CURLY \– SECTION
+23B2:SUMM\” TOP
+23B3:SUMM\” BOTTOM
+23B4:TOP \r\–
+23B5:BOTTOM \r\–
+23B6:BOTTOM \r\– OVER TOP \r\–
+23B7:RADICAL \ BOTTOM
+23B8:\‰ \€ BOX \ä
+23B9:\ù\€ BOX \ä
+23BA:\ SCAN \ä-1
+23BB:\ SCAN \ä-3
+23BC:\ SCAN \ä-7
+23BD:\ SCAN \ä-9
+23BE:\ó\€\iTOP \q
+23BF:\ó\€\iBOTTOM \q
+23C0:\ó\€\H\Ð
+23C1:\ó\Ë\i\\H\Ð
+23C2:\óUP\i\\H\Ð
+23C3:\ó\€\H\¾
+23C4:\ó\Ë\i\\H\¾
+23C5:\óUP\i\\H\¾
+23C6:\ó\€\iWAVE
+23C7:\ó\Ë\i\\HWAVE
+23C8:\óUP\i\\HWAVE
+23C9:\ó\Ë\i\
+23CA:\óUP\i\
+23CB:\ó\€\iTOP \‰
+23CC:\ó\€\iBOTTOM \‰
+23CD:\rFOOT
+23CE:RETURN \
+2400:\ñNULL
+2401:\ñSTART OF HEAD\ô
+2402:\ñSTART OF TEXT
+2403:\ñEND OF TEXT
+2404:\ñEND OF TRANSMISSION
+2405:\ñENQUIRY
+2406:\ñACKNOWLEDGE
+2407:\ñBELL
+2408:\ñBACKSPACE
+2409:\ñ\ TABUL\”
+240A:\ñ\ä FEED
+240B:\ñ\€ TABUL\”
+240C:\ñFORM FEED
+240D:\ñCARRIAGE RETURN
+240E:\ñSHIFT OUT
+240F:\ñSHIFT IN
+2410:\ñDATA LINK ESCAPE
+2411:\ñDEVICE CONTROL ONE
+2412:\ñDEVICE CONTROL TWO
+2413:\ñDEVICE CONTROL THREE
+2414:\ñDEVICE CONTROL FOUR
+2415:\ñNEGATIVE ACKNOWLEDGE
+2416:\ñSYNCHRONOUS IDLE
+2417:\ñEND OF TRANSMISSION BLOCK
+2418:\ñCANCEL
+2419:\ñEND OF MEDIUM
+241A:\ñSUBSTITUTE
+241B:\ñESCAPE
+241C:\ñFILE SEPARATOR
+241D:\ñGROUP SEPARATOR
+241E:\ñRECORD SEPARATOR
+241F:\ñUNIT SEPARATOR
+2420:\ñSPACE
+2421:\ñDELETE
+2422:BLANK \
+2423:OPEN BOX
+2424:\ñNEW\ä
+2425:\ñDELETE FORM TWO
+2426:\ñSUBSTITUTE FORM TWO
+2440:OCR HOOK
+2441:OCR CHAIR
+2442:OCR FORK
+2443:OCR INVERT\ÂFORK
+2444:OCR BELT BUCKLE
+2445:OCR BOW TIE
+2446:OCR BRANCH BANK IDENTIFIC\”
+2447:OCR AMOUNT OF CHECK
+2448:OCR DASH
+2449:OCR CUSTOMER ACCOUNT NUMBER
+244A:OCR \0 BACKSLASH
+2460:\cDIGIT ONE
+2461:\cDIGIT TWO
+2462:\cDIGIT THREE
+2463:\cDIGIT FOUR
+2464:\cDIGIT FIVE
+2465:\cDIGIT SIX
+2466:\cDIGIT SEVEN
+2467:\cDIGIT E\¼
+2468:\cDIGIT NINE
+2469:\c\­TEN
+246A:\c\­ELEVEN
+246B:\c\­TWELVE
+246C:\c\­THIRTEEN
+246D:\c\­FOURTEEN
+246E:\c\­FIFTEEN
+246F:\c\­SIXTEEN
+2470:\c\­SEVENTEEN
+2471:\c\­E\¼EEN
+2472:\c\­NINETEEN
+2473:\c\­TWENTY
+2474:\tDIGIT ONE
+2475:\tDIGIT TWO
+2476:\tDIGIT THREE
+2477:\tDIGIT FOUR
+2478:\tDIGIT FIVE
+2479:\tDIGIT SIX
+247A:\tDIGIT SEVEN
+247B:\tDIGIT E\¼
+247C:\tDIGIT NINE
+247D:\t\­TEN
+247E:\t\­ELEVEN
+247F:\t\­TWELVE
+2480:\t\­THIRTEEN
+2481:\t\­FOURTEEN
+2482:\t\­FIFTEEN
+2483:\t\­SIXTEEN
+2484:\t\­SEVENTEEN
+2485:\t\­E\¼EEN
+2486:\t\­NINETEEN
+2487:\t\­TWENTY
+2488:DIGIT ONE\é
+2489:DIGIT TWO\é
+248A:DIGIT THREE\é
+248B:DIGIT FOUR\é
+248C:DIGIT FIVE\é
+248D:DIGIT SIX\é
+248E:DIGIT SEVEN\é
+248F:DIGIT E\¼\é
+2490:DIGIT NINE\é
+2491:\­TEN\é
+2492:\­ELEVEN\é
+2493:\­TWELVE\é
+2494:\­THIRTEEN\é
+2495:\­FOURTEEN\é
+2496:\­FIFTEEN\é
+2497:\­SIXTEEN\é
+2498:\­SEVENTEEN\é
+2499:\­E\¼EEN\é
+249A:\­NINETEEN\é
+249B:\­TWENTY\é
+249C:\t\LA
+249D:\t\LB
+249E:\t\LC
+249F:\t\LD
+24A0:\t\LE
+24A1:\t\LF
+24A2:\t\LG
+24A3:\t\LH
+24A4:\t\LI
+24A5:\t\LJ
+24A6:\t\LK
+24A7:\t\LL
+24A8:\t\LM
+24A9:\t\LN
+24AA:\t\LO
+24AB:\t\LP
+24AC:\t\LQ
+24AD:\t\LR
+24AE:\t\LS
+24AF:\t\LT
+24B0:\t\LU
+24B1:\t\LV
+24B2:\t\LW
+24B3:\t\LX
+24B4:\t\LY
+24B5:\t\LZ
+24B6:\c\PA
+24B7:\c\PB
+24B8:\c\PC
+24B9:\c\PD
+24BA:\c\PE
+24BB:\c\PF
+24BC:\c\PG
+24BD:\c\PH
+24BE:\c\PI
+24BF:\c\PJ
+24C0:\c\PK
+24C1:\c\PL
+24C2:\c\PM
+24C3:\c\PN
+24C4:\c\PO
+24C5:\c\PP
+24C6:\c\PQ
+24C7:\c\PR
+24C8:\c\PS
+24C9:\c\PT
+24CA:\c\PU
+24CB:\c\PV
+24CC:\c\PW
+24CD:\c\PX
+24CE:\c\PY
+24CF:\c\PZ
+24D0:\c\LA
+24D1:\c\LB
+24D2:\c\LC
+24D3:\c\LD
+24D4:\c\LE
+24D5:\c\LF
+24D6:\c\LG
+24D7:\c\LH
+24D8:\c\LI
+24D9:\c\LJ
+24DA:\c\LK
+24DB:\c\LL
+24DC:\c\LM
+24DD:\c\LN
+24DE:\c\LO
+24DF:\c\LP
+24E0:\c\LQ
+24E1:\c\LR
+24E2:\c\LS
+24E3:\c\LT
+24E4:\c\LU
+24E5:\c\LV
+24E6:\c\LW
+24E7:\c\LX
+24E8:\c\LY
+24E9:\c\LZ
+24EA:\cDIGIT ZERO
+24EB:NEGATIVE \c\­ELEVEN
+24EC:NEGATIVE \c\­TWELVE
+24ED:NEGATIVE \c\­THIRTEEN
+24EE:NEGATIVE \c\­FOURTEEN
+24EF:NEGATIVE \c\­FIFTEEN
+24F0:NEGATIVE \c\­SIXTEEN
+24F1:NEGATIVE \c\­SEVENTEEN
+24F2:NEGATIVE \c\­E\¼EEN
+24F3:NEGATIVE \c\­NINETEEN
+24F4:NEGATIVE \c\­TWENTY
+24F5:\0 \cDIGIT ONE
+24F6:\0 \cDIGIT TWO
+24F7:\0 \cDIGIT THREE
+24F8:\0 \cDIGIT FOUR
+24F9:\0 \cDIGIT FIVE
+24FA:\0 \cDIGIT SIX
+24FB:\0 \cDIGIT SEVEN
+24FC:\0 \cDIGIT E\¼
+24FD:\0 \cDIGIT NINE
+24FE:\0 \c\­TEN
+2500:\jL\¼ \
+2501:\j\Å \
+2502:\jL\¼ \€
+2503:\j\Å \€
+2504:\jL\¼ TRIPLE DASH \
+2505:\j\Å TRIPLE DASH \
+2506:\jL\¼ TRIPLE DASH \€
+2507:\j\Å TRIPLE DASH \€
+2508:\jL\¼ QUADRUPLE DASH \
+2509:\j\Å QUADRUPLE DASH \
+250A:\jL\¼ QUADRUPLE DASH \€
+250B:\j\Å QUADRUPLE DASH \€
+250C:\jL\¼ \Ë\i\q
+250D:\j\Ë L\¼\i\ù\Å
+250E:\j\Ë \Å\i\ùL\¼
+250F:\j\Å \Ë\i\q
+2510:\jL\¼ \Ë\i\‰
+2511:\j\Ë L\¼\i\‰ \Å
+2512:\j\Ë \Å\i\‰ L\¼
+2513:\j\Å \Ë\i\‰
+2514:\jL\¼ UP\i\q
+2515:\jUP L\¼\i\ù\Å
+2516:\jUP \Å\i\ùL\¼
+2517:\j\Å UP\i\q
+2518:\jL\¼ UP\i\‰
+2519:\jUP L\¼\i\‰ \Å
+251A:\jUP \Å\i\‰ L\¼
+251B:\j\Å UP\i\‰
+251C:\jL\¼ \€\i\q
+251D:\j\€ L\¼\i\ù\Å
+251E:\jUP \Å\i\ù\Ë L\¼
+251F:\j\Ë \Å\i\ùUP L\¼
+2520:\j\€ \Å\i\ùL\¼
+2521:\j\Ë L\¼\i\ùUP \Å
+2522:\jUP L\¼\i\ù\Ë \Å
+2523:\j\Å \€\i\q
+2524:\jL\¼ \€\i\‰
+2525:\j\€ L\¼\i\‰ \Å
+2526:\jUP \Å\i\‰ \Ë L\¼
+2527:\j\Ë \Å\i\‰ UP L\¼
+2528:\j\€ \Å\i\‰ L\¼
+2529:\j\Ë L\¼\i\‰ UP \Å
+252A:\jUP L\¼\i\‰ \Ë \Å
+252B:\j\Å \€\i\‰
+252C:\jL\¼ \Ë\i\
+252D:\j\‰ \Å\i\ù\Ë L\¼
+252E:\j\ù\Å\i\‰ \Ë L\¼
+252F:\j\Ë L\¼\i\ \Å
+2530:\j\Ë \Å\i\ L\¼
+2531:\j\ùL\¼\i\‰ \Ë \Å
+2532:\j\‰ L\¼\i\ù\Ë \Å
+2533:\j\Å \Ë\i\
+2534:\jL\¼ UP\i\
+2535:\j\‰ \Å\i\ùUP L\¼
+2536:\j\ù\Å\i\‰ UP L\¼
+2537:\jUP L\¼\i\ \Å
+2538:\jUP \Å\i\ L\¼
+2539:\j\ùL\¼\i\‰ UP \Å
+253A:\j\‰ L\¼\i\ùUP \Å
+253B:\j\Å UP\i\
+253C:\jL\¼ \€\i\
+253D:\j\‰ \Å\i\ù\€ L\¼
+253E:\j\ù\Å\i\‰ \€ L\¼
+253F:\j\€ L\¼\i\ \Å
+2540:\jUP \Å\i\Ë \ L\¼
+2541:\j\Ë \Å\iUP \ L\¼
+2542:\j\€ \Å\i\ L\¼
+2543:\j\‰ UP \Å\i\ù\Ë L\¼
+2544:\j\ùUP \Å\i\‰ \Ë L\¼
+2545:\j\‰ \Ë \Å\i\ùUP L\¼
+2546:\j\ù\Ë \Å\i\‰ UP L\¼
+2547:\j\Ë L\¼\iUP \ \Å
+2548:\jUP L\¼\i\Ë \ \Å
+2549:\j\ùL\¼\i\‰ \€ \Å
+254A:\j\‰ L\¼\i\ù\€ \Å
+254B:\j\Å \€\i\
+254C:\jL\¼ \0 DASH \
+254D:\j\Å \0 DASH \
+254E:\jL\¼ \0 DASH \€
+254F:\j\Å \0 DASH \€
+2550:\j\0 \
+2551:\j\0 \€
+2552:\j\Ë S\ôLE\i\ù\0
+2553:\j\Ë \0\i\ùS\ôLE
+2554:\j\0 \Ë\i\q
+2555:\j\Ë S\ôLE\i\‰ \0
+2556:\j\Ë \0\i\‰ S\ôLE
+2557:\j\0 \Ë\i\‰
+2558:\jUP S\ôLE\i\ù\0
+2559:\jUP \0\i\ùS\ôLE
+255A:\j\0 UP\i\q
+255B:\jUP S\ôLE\i\‰ \0
+255C:\jUP \0\i\‰ S\ôLE
+255D:\j\0 UP\i\‰
+255E:\j\€ S\ôLE\i\ù\0
+255F:\j\€ \0\i\ùS\ôLE
+2560:\j\0 \€\i\q
+2561:\j\€ S\ôLE\i\‰ \0
+2562:\j\€ \0\i\‰ S\ôLE
+2563:\j\0 \€\i\‰
+2564:\j\Ë S\ôLE\i\ \0
+2565:\j\Ë \0\i\ S\ôLE
+2566:\j\0 \Ë\i\
+2567:\jUP S\ôLE\i\ \0
+2568:\jUP \0\i\ S\ôLE
+2569:\j\0 UP\i\
+256A:\j\€ S\ôLE\i\ \0
+256B:\j\€ \0\i\ S\ôLE
+256C:\j\0 \€\i\
+256D:\jL\¼ ARC \Ë\i\q
+256E:\jL\¼ ARC \Ë\i\‰
+256F:\jL\¼ ARC UP\i\‰
+2570:\jL\¼ ARC UP\i\q
+2571:\jL\¼ DIAGONAL \÷\ùTO \ï\‰
+2572:\jL\¼ DIAGONAL \÷\‰ TO \ï\q
+2573:\jL\¼ DIAGONAL CROSS
+2574:\jL\¼ \‰
+2575:\jL\¼ UP
+2576:\jL\¼ \q
+2577:\jL\¼ \Ë
+2578:\j\Å \‰
+2579:\j\Å UP
+257A:\j\Å \q
+257B:\j\Å \Ë
+257C:\jL\¼ \‰\i\Å \q
+257D:\jL\¼ UP\i\Å \Ë
+257E:\j\Å \‰\iL\¼ \q
+257F:\j\Å UP\iL\¼ \Ë
+2580:\÷HALF BLOCK
+2581:\ïONE E\¼H BLOCK
+2582:\ïONE QUARTER BLOCK
+2583:\ïTHREE E\¼HS BLOCK
+2584:\ïHALF BLOCK
+2585:\ïFIVE E\¼HS BLOCK
+2586:\ïTHREE QUARTERS BLOCK
+2587:\ïSEVEN E\¼HS BLOCK
+2588:FULL BLOCK
+2589:\‰ SEVEN E\¼HS BLOCK
+258A:\‰ THREE QUARTERS BLOCK
+258B:\‰ FIVE E\¼HS BLOCK
+258C:\‰ HALF BLOCK
+258D:\‰ THREE E\¼HS BLOCK
+258E:\‰ ONE QUARTER BLOCK
+258F:\‰ ONE E\¼H BLOCK
+2590:\ùHALF BLOCK
+2591:L\¼ SHADE
+2592:MEDIUM SHADE
+2593:DARK SHADE
+2594:\÷ONE E\¼H BLOCK
+2595:\ùONE E\¼H BLOCK
+2596:QUADRANT \ï\‰
+2597:QUADRANT \ï\q
+2598:QUADRANT \÷\‰
+2599:QUADRANT \÷\‰\i\ï\‰\i\ï\q
+259A:QUADRANT \÷\‰\i\ï\q
+259B:QUADRANT \÷\‰\i\÷\ùAND \ï\‰
+259C:QUADRANT \÷\‰\i\÷\ùAND \ï\q
+259D:QUADRANT \÷\q
+259E:QUADRANT \÷\ùAND \ï\‰
+259F:QUADRANT \÷\ùAND \ï\‰\i\ï\q
+25A0:\¬ \ý
+25A1:\¦\ý
+25A2:\¦\rWITH ROUND\ÂCORNERS
+25A3:\¦\rCONTAIN\ô \¬\Ç\ý
+25A4:\rWITH \ FILL
+25A5:\rWITH \€ FILL
+25A6:\rWITH ORTHOGONAL CROSSHATCH FILL
+25A7:\rWITH \÷\‰ TO \ï\ùFILL
+25A8:\rWITH \÷\ùTO \ï\‰ FILL
+25A9:\rWITH DIAGONAL CROSSHATCH FILL
+25AA:\¬\Ç\ý
+25AB:WHITE\Ç\ý
+25AC:\¬ RECTANGLE
+25AD:\¦RECTANGLE
+25AE:\¬ \€ RECTANGLE
+25AF:\¦\€ RECTANGLE
+25B0:\¬ PARALLELOGRAM
+25B1:\¦PARALLELOGRAM
+25B2:\¬ UP-\Ä\¾
+25B3:\¦UP-\Ä\¾
+25B4:\¬ UP-\Ä\§\¾
+25B5:\¦UP-\Ä\§\¾
+25B6:\¬ \q-\Ä\¾
+25B7:\¦\q-\Ä\¾
+25B8:\¬ \q-\Ä\§\¾
+25B9:\¦\q-\Ä\§\¾
+25BA:\¬ \q-\ÄPOINTER
+25BB:\¦\q-\ÄPOINTER
+25BC:\¬ \Ë-\Ä\¾
+25BD:\¦\Ë-\Ä\¾
+25BE:\¬ \Ë-\Ä\§\¾
+25BF:\¦\Ë-\Ä\§\¾
+25C0:\¬ \‰-\Ä\¾
+25C1:\¦\‰-\Ä\¾
+25C2:\¬ \‰-\Ä\§\¾
+25C3:\¦\‰-\Ä\§\¾
+25C4:\¬ \‰-\ÄPOINTER
+25C5:\¦\‰-\ÄPOINTER
+25C6:\¬ DIAMOND
+25C7:\¦DIAMOND
+25C8:\¦DIAMOND CONTAIN\ô \¬\ÇDIAMOND
+25C9:FISHEYE
+25CA:LOZENGE
+25CB:\¦\Ð
+25CC:DOTT\Â\Ð
+25CD:\Ð\H\€ FILL
+25CE:BULLSEYE
+25CF:\¬ \Ð
+25D0:\Ð\H\‰ HALF \¬
+25D1:\Ð\H\ùHALF \¬
+25D2:\Ð\H\ïHALF \¬
+25D3:\Ð\H\÷HALF \¬
+25D4:\Ð\H\÷\ùQUADRANT \¬
+25D5:\Ð\HALL BUT \÷\‰ QUADRANT \¬
+25D6:\‰ HALF \¬ \Ð
+25D7:\ùHALF \¬ \Ð
+25D8:INVERSE BULLET
+25D9:INVERSE \¦\Ð
+25DA:\÷HALF INVERSE \¦\Ð
+25DB:\ïHALF INVERSE \¦\Ð
+25DC:\÷\‰ QUADRANT CIRCULAR ARC
+25DD:\÷\ùQUADRANT CIRCULAR ARC
+25DE:\ï\ùQUADRANT CIRCULAR ARC
+25DF:\ï\‰ QUADRANT CIRCULAR ARC
+25E0:\÷HALF \Ð
+25E1:\ïHALF \Ð
+25E2:\¬ \ï\ù\¾
+25E3:\¬ \ï\‰ \¾
+25E4:\¬ \÷\‰ \¾
+25E5:\¬ \÷\ù\¾
+25E6:\¦BULLET
+25E7:\rWITH \‰ HALF \¬
+25E8:\rWITH \ùHALF \¬
+25E9:\rWITH \÷\‰ DIAGONAL HALF \¬
+25EA:\rWITH \ï\ùDIAGONAL HALF \¬
+25EB:\¦\rWITH \€ BISECT\ô \ä
+25EC:\¦UP-\Ä\¾\³
+25ED:UP-\Ä\¾\H\‰ HALF \¬
+25EE:UP-\Ä\¾\H\ùHALF \¬
+25EF:LARGE \Ð
+25F0:\¦\rWITH \÷\‰ QUADRANT
+25F1:\¦\rWITH \ï\‰ QUADRANT
+25F2:\¦\rWITH \ï\ùQUADRANT
+25F3:\¦\rWITH \÷\ùQUADRANT
+25F4:\¦\Ð\H\÷\‰ QUADRANT
+25F5:\¦\Ð\H\ï\‰ QUADRANT
+25F6:\¦\Ð\H\ï\ùQUADRANT
+25F7:\¦\Ð\H\÷\ùQUADRANT
+25F8:\÷\‰ \¾
+25F9:\÷\ù\¾
+25FA:\ï\‰ \¾
+25FB:\¦MEDIUM \ý
+25FC:\¬ MEDIUM \ý
+25FD:\¦MEDIUM\Ç\ý
+25FE:\¬ MEDIUM\Ç\ý
+25FF:\ï\ù\¾
+2600:\¬ SUN\HRAYS
+2601:CLOUD
+2602:UMBRELLA
+2603:SNOWMAN
+2604:COMET
+2605:\¬ STAR
+2606:\¦STAR
+2607:L\¼N\ô
+2608:THUNDERSTORM
+2609:SUN
+260A:ASCEND\ô NODE
+260B:DESCEND\ô NODE
+260C:CONJUNCTION
+260D:OPPOSITION
+260E:\¬ TELEPHONE
+260F:\¦TELEPHONE
+2610:BALLOT BOX
+2611:BALLOT BOX\HCHECK
+2612:BALLOT BOX\HX
+2613:SALTIRE
+2616:\¦SHOGI PIECE
+2617:\¬ SHOGI PIECE
+2619:\öROTAT\ÂFLORAL HEART BULLET
+261A:\¬ \‰ \ÄINDEX
+261B:\¬ \ù\ÄINDEX
+261C:\¦\‰ \ÄINDEX
+261D:\¦UP \ÄINDEX
+261E:\¦\ù\ÄINDEX
+261F:\¦\Ë \ÄINDEX
+2620:SKULL\iCROSSBONES
+2621:CAUTION\‚
+2622:RADIOACTIVE\‚
+2623:BIOHAZARD\‚
+2624:CADUCEUS
+2625:ANKH
+2626:ORTHODOX CROSS
+2627:CHI RHO
+2628:CROSS OF LORRAINE
+2629:CROSS OF JERUSALEM
+262A:STAR\iCRESCENT
+262B:FARSI \
+262C:ADI SHAKTI
+262D:HAMMER\iSICKLE
+262E:PEACE \
+262F:YIN YANG
+2630:TRIGRAM FOR HEAVEN
+2631:TRIGRAM FOR LAKE
+2632:TRIGRAM FOR FIRE
+2633:TRIGRAM FOR THUNDER
+2634:TRIGRAM FOR WIND
+2635:TRIGRAM FOR WATER
+2636:TRIGRAM FOR MOUNTAIN
+2637:TRIGRAM FOR EARTH
+2638:WHEEL OF DHARMA
+2639:\¦FROWN\ô FACE
+263A:\¦SMIL\ô FACE
+263B:\¬ SMIL\ô FACE
+263C:\¦SUN\HRAYS
+263D:FIRST QUARTER MOON
+263E:LAST QUARTER MOON
+263F:MERCURY
+2640:FEMALE\‚
+2641:EARTH
+2642:MALE\‚
+2643:JUPITER
+2644:SATURN
+2645:URANUS
+2646:NEPTUNE
+2647:PLUTO
+2648:ARIES
+2649:TAURUS
+264A:GEMINI
+264B:CANCER
+264C:LEO
+264D:VIRGO
+264E:LIBRA
+264F:SCORPIUS
+2650:SAGITTARIUS
+2651:CAPRICORN
+2652:AQUARIUS
+2653:PISCES
+2654:\¦CHESS K\ô
+2655:\¦CHESS QUEEN
+2656:\¦CHESS ROOK
+2657:\¦CHESS BISHOP
+2658:\¦CHESS KN\¼
+2659:\¦CHESS PAWN
+265A:\¬ CHESS K\ô
+265B:\¬ CHESS QUEEN
+265C:\¬ CHESS ROOK
+265D:\¬ CHESS BISHOP
+265E:\¬ CHESS KN\¼
+265F:\¬ CHESS PAWN
+2660:\¬ SPADE SUIT
+2661:\¦HEART SUIT
+2662:\¦DIAMOND SUIT
+2663:\¬ CLUB SUIT
+2664:\¦SPADE SUIT
+2665:\¬ HEART SUIT
+2666:\¬ DIAMOND SUIT
+2667:\¦CLUB SUIT
+2668:HOT SPR\ôS
+2669:QUARTER NOTE
+266A:E\¼H NOTE
+266B:BEAM\ÂE\¼H NOTES
+266C:BEAM\ÂSIXTEENTH NOTES
+266D:MUSIC FLAT\‚
+266E:MUSIC NATURAL\‚
+266F:MUSIC SHARP\‚
+2670:WEST \Ó CROSS
+2671:EAST \Ó CROSS
+2672:UNIVERSAL RECYCL\ô \
+2673:RECYCL\ô \ñTYPE-1 PLASTICS
+2674:RECYCL\ô \ñTYPE-2 PLASTICS
+2675:RECYCL\ô \ñTYPE-3 PLASTICS
+2676:RECYCL\ô \ñTYPE-4 PLASTICS
+2677:RECYCL\ô \ñTYPE-5 PLASTICS
+2678:RECYCL\ô \ñTYPE-6 PLASTICS
+2679:RECYCL\ô \ñTYPE-7 PLASTICS
+267A:RECYCL\ô \ñGENERIC MATERIALS
+267B:\¬ UNIVERSAL RECYCL\ô \
+267C:RECYCL\ÂPAPER \
+267D:PARTIALLY-RECYCL\ÂPAPER \
+2680:DIE FACE-1
+2681:DIE FACE-2
+2682:DIE FACE-3
+2683:DIE FACE-4
+2684:DIE FACE-5
+2685:DIE FACE-6
+2686:\¦\Ð\³ \q
+2687:\¦\Ð\HTWO DOTS
+2688:\¬ \Ð\H\¦DOT \q
+2689:\¬ \Ð\HTWO \¦DOTS
+2701:\÷BLADE SCISSORS
+2702:\¬ SCISSORS
+2703:\ïBLADE SCISSORS
+2704:\¦SCISSORS
+2706:TELEPHONE LOC\”\‚
+2707:TAPE DRIVE
+2708:AIRPLANE
+2709:ENVELOPE
+270C:VICTORY HAND
+270D:WRIT\ô HAND
+270E:\ï\ùPENCIL
+270F:PENCIL
+2710:\÷\ùPENCIL
+2711:\¦NIB
+2712:\¬ NIB
+2713:CHECK\¥
+2714:\Å CHECK\¥
+2715:MULTIPLIC\” X
+2716:\Å MULTIPLIC\” X
+2717:BALLOT X
+2718:\Å BALLOT X
+2719:OUT\äD GREEK CROSS
+271A:\Å GREEK CROSS
+271B:OPEN CENTRE CROSS
+271C:\Å OPEN CENTRE CROSS
+271D:LATIN CROSS
+271E:SHADOW\Â\¦LATIN CROSS
+271F:OUT\äD LATIN CROSS
+2720:MALTESE CROSS
+2721:STAR OF DAVID
+2722:FOUR TEARDROP-SPOK\ÂASTERISK
+2723:FOUR BALLOON-SPOK\ÂASTERISK
+2724:\Å FOUR BALLOON-SPOK\ÂASTERISK
+2725:FOUR CLUB-SPOK\ÂASTERISK
+2726:\¬ FOUR POINT\ÂSTAR
+2727:\¦FOUR POINT\ÂSTAR
+2729:STRESS OUT\äD \¦STAR
+272A:\c\¦STAR
+272B:OPEN CENTRE \¬ STAR
+272C:\¬ CENTRE \¦STAR
+272D:OUT\äD \¬ STAR
+272E:\Å OUT\äD \¬ STAR
+272F:PINWHEEL STAR
+2730:SHADOW\Â\¦STAR
+2731:\Å ASTERISK
+2732:OPEN CENTRE ASTERISK
+2733:E\¼ SPOK\ÂASTERISK
+2734:E\¼ POINT\Â\¬ STAR
+2735:E\¼ POINT\ÂPINWHEEL STAR
+2736:SIX POINT\Â\¬ STAR
+2737:E\¼ POINT\ÂRECTI\äAR \¬ STAR
+2738:\Å E\¼ POINT\ÂRECTI\äAR \¬ STAR
+2739:TWELVE POINT\Â\¬ STAR
+273A:SIXTEEN POINT\ÂASTERISK
+273B:TEARDROP-SPOK\ÂASTERISK
+273C:OPEN CENTRE TEARDROP-SPOK\ÂASTERISK
+273D:\Å TEARDROP-SPOK\ÂASTERISK
+273E:SIX PETALL\Â\¬\i\¦FLORETTE
+273F:\¬ FLORETTE
+2740:\¦FLORETTE
+2741:E\¼ PETALL\ÂOUT\äD \¬ FLORETTE
+2742:\cOPEN CENTRE E\¼ POINT\ÂSTAR
+2743:\Å TEARDROP-SPOK\ÂPINWHEEL ASTERISK
+2744:SNOWFLAKE
+2745:T\¼ TRIFOLIATE SNOWFLAKE
+2746:\Å CHEVRON SNOWFLAKE
+2747:SPARKLE
+2748:\Å SPARKLE
+2749:BALLOON-SPOK\ÂASTERISK
+274A:E\¼ TEARDROP-SPOK\ÂPROPELLER ASTERISK
+274B:\Å E\¼ TEARDROP-SPOK\ÂPROPELLER ASTERISK
+274D:SHADOW\Â\¦\Ð
+274F:\ï\ùDROP-SHADOW\Â\¦\ý
+2750:\÷\ùDROP-SHADOW\Â\¦\ý
+2751:\ï\ùSHADOW\Â\¦\ý
+2752:\÷\ùSHADOW\Â\¦\ý
+2756:\¬ DIAMOND MINUS \¦X
+2758:L\¼ \€\ì
+2759:MEDIUM \€\ì
+275A:\Å \€\ì
+275B:\Å S\ôLE TURN\ÂCOMMA QUOT\”\¥ ORNAMENT
+275C:\Å S\ôLE COMMA QUOT\”\¥ ORNAMENT
+275D:\Å \0 TURN\ÂCOMMA QUOT\”\¥ ORNAMENT
+275E:\Å \0 COMMA QUOT\”\¥ ORNAMENT
+2761:CURV\ÂSTEM PARAGRAPH\‚ ORNAMENT
+2762:\Å EXCLAM\”\¥ ORNAMENT
+2763:\Å HEART EXCLAM\”\¥ ORNAMENT
+2764:\Å \¬ HEART
+2765:ROTAT\Â\Å \¬ HEART BULLET
+2766:FLORAL HEART
+2767:ROTAT\ÂFLORAL HEART BULLET
+2768:MEDIUM \‰ \ÑS ORNAMENT
+2769:MEDIUM \ù\ÑS ORNAMENT
+276A:MEDIUM FLATTEN\Â\‰ \ÑS ORNAMENT
+276B:MEDIUM FLATTEN\Â\ù\ÑS ORNAMENT
+276C:MEDIUM \‰-\ÄANGLE \– ORNAMENT
+276D:MEDIUM \q-\ÄANGLE \– ORNAMENT
+276E:\Å \‰-\ÄANGLE QUOT\”\¥ ORNAMENT
+276F:\Å \q-\ÄANGLE QUOT\”\¥ ORNAMENT
+2770:\Å \‰-\ÄANGLE \– ORNAMENT
+2771:\Å \q-\ÄANGLE \– ORNAMENT
+2772:L\¼ \‰ TORTOISE SHELL \– ORNAMENT
+2773:L\¼ \ùTORTOISE SHELL \– ORNAMENT
+2774:MEDIUM \‰ CURLY \– ORNAMENT
+2775:MEDIUM \ùCURLY \– ORNAMENT
+2776:\ÌDIGIT ONE
+2777:\ÌDIGIT TWO
+2778:\ÌDIGIT THREE
+2779:\ÌDIGIT FOUR
+277A:\ÌDIGIT FIVE
+277B:\ÌDIGIT SIX
+277C:\ÌDIGIT SEVEN
+277D:\ÌDIGIT E\¼
+277E:\ÌDIGIT NINE
+277F:\Ì\­TEN
+2780:D\ôBAT \cSANS-SERIF\hONE
+2781:D\ôBAT \cSANS-SERIF\hTWO
+2782:D\ôBAT \cSANS-SERIF\hTHREE
+2783:D\ôBAT \cSANS-SERIF\hFOUR
+2784:D\ôBAT \cSANS-SERIF\hFIVE
+2785:D\ôBAT \cSANS-SERIF\hSIX
+2786:D\ôBAT \cSANS-SERIF\hSEVEN
+2787:D\ôBAT \cSANS-SERIF\hE\¼
+2788:D\ôBAT \cSANS-SERIF\hNINE
+2789:D\ôBAT \cSANS-SERIF \­TEN
+278A:\ÌSANS-SERIF\hONE
+278B:\ÌSANS-SERIF\hTWO
+278C:\ÌSANS-SERIF\hTHREE
+278D:\ÌSANS-SERIF\hFOUR
+278E:\ÌSANS-SERIF\hFIVE
+278F:\ÌSANS-SERIF\hSIX
+2790:\ÌSANS-SERIF\hSEVEN
+2791:\ÌSANS-SERIF\hE\¼
+2792:\ÌSANS-SERIF\hNINE
+2793:\ÌSANS-SERIF \­TEN
+2794:\Å WIDE-HEAD\Â\Ù
+2798:\Å SOUTH EAST\u
+2799:\Å \Ù
+279A:\Å NORTH EAST\u
+279B:DRAFT\ô POINT \Ù
+279C:\Å ROUND-TIPP\Â\Ù
+279D:\¾-HEAD\Â\Ù
+279E:\Å \¾-HEAD\Â\Ù
+279F:DASH\Â\¾-HEAD\Â\Ù
+27A0:\Å DASH\Â\¾-HEAD\Â\Ù
+27A1:\¬ \Ù
+27A2:THREE-D TOP-L\¼\Â\ÙHEAD
+27A3:THREE-D BOTTOM-L\¼\Â\ÙHEAD
+27A4:\¬ \ÙHEAD
+27A5:\Å \¬ CURV\Â\Ë\Š\i\Ù
+27A6:\Å \¬ CURV\ÂUP\Š\i\Ù
+27A7:SQUAT \¬ \Ù
+27A8:\Å CONCAVE-POINT\Â\¬ \Ù
+27A9:\q-SHAD\Â\¦\Ù
+27AA:\‰-SHAD\Â\¦\Ù
+27AB:BACK-TILT\ÂSHADOW\Â\¦\Ù
+27AC:FRONT-TILT\ÂSHADOW\Â\¦\Ù
+27AD:\Å \ï\q-SHADOW\Â\¦\Ù
+27AE:\Å \÷\q-SHADOW\Â\¦\Ù
+27AF:NOTCH\Â\ï\q-SHADOW\Â\¦\Ù
+27B1:NOTCH\Â\÷\q-SHADOW\Â\¦\Ù
+27B2:\c\Å \¦\Ù
+27B3:WHITE-FEATHER\Â\Ù
+27B4:\¬-FEATHER\ÂSOUTH EAST\u
+27B5:\¬-FEATHER\Â\Ù
+27B6:\¬-FEATHER\ÂNORTH EAST\u
+27B7:\Å \¬-FEATHER\ÂSOUTH EAST\u
+27B8:\Å \¬-FEATHER\Â\Ù
+27B9:\Å \¬-FEATHER\ÂNORTH EAST\u
+27BA:TEARDROP-BARB\Â\Ù
+27BB:\Å TEARDROP-SHANK\Â\Ù
+27BC:WEDGE-TAIL\Â\Ù
+27BD:\Å WEDGE-TAIL\Â\Ù
+27BE:OPEN-OUT\äD \Ù
+27D0:\¦DIAMOND\HCENTR\ÂDOT
+27D1:AND\³
+27D2:ELEMENT OF OPEN\ô UP\Š
+27D3:\ï\ùCORNER\³
+27D4:\÷\‰ CORNER\³
+27D5:\‰ OUTER JOIN
+27D6:\ùOUTER JOIN
+27D7:FULL OUTER JOIN
+27D8:LARGE UP TACK
+27D9:LARGE \Ë TACK
+27DA:\‰\i\ù\0 TURNSTILE
+27DB:\‰\i\ùTACK
+27DC:\‰ MULTIMAP
+27DD:LONG \ùTACK
+27DE:LONG \‰ TACK
+27DF:UP TACK\H\Ð\p
+27E0:LOZENGE DIVID\ÂBY \ RULE
+27E1:\¦CONCAVE-SID\ÂDIAMOND
+27E2:\¦CONCAVE-SID\ÂDIAMOND\H\‰\Š TICK
+27E3:\¦CONCAVE-SID\ÂDIAMOND\H\q\Š TICK
+27E4:\¦\rWITH \‰\Š TICK
+27E5:\¦\rWITH \q\Š TICK
+27E6:\E\‰ \¦\r\–
+27E7:\E\ù\¦\r\–
+27E8:\E\‰ ANGLE \–
+27E9:\E\ùANGLE \–
+27EA:\E\‰ \0 ANGLE \–
+27EB:\E\ù\0 ANGLE \–
+27F0:UP\Š QUADRUPLE\u
+27F1:\Ë\Š QUADRUPLE\u
+27F2:ANTICLOCKWISE GAPP\Â\Ð\u
+27F3:CLOCKWISE GAPP\Â\Ð\u
+27F4:\q\u\H\cPLUS
+27F5:LONG \‰\Š\u
+27F6:LONG \Ù
+27F7:LONG \‰ \q\u
+27F8:LONG \‰\Š \0\u
+27F9:LONG \q\Š \0\u
+27FA:LONG \‰ \ù\0\u
+27FB:LONG \‰\Š\u FROM\ì
+27FC:LONG \Ù FROM\ì
+27FD:LONG \‰\Š \0\u FROM\ì
+27FE:LONG \q\Š \0\u FROM\ì
+27FF:LONG \q\Š SQUIGGLE\u
+2800:BRAILLE PATTERN BLANK
+2801:\M1
+2802:\M2
+2803:\M12
+2804:\M3
+2805:\M13
+2806:\M23
+2807:\M123
+2808:\M4
+2809:\M14
+280A:\M24
+280B:\M124
+280C:\M34
+280D:\M134
+280E:\M234
+280F:\M1234
+2810:\M5
+2811:\M15
+2812:\M25
+2813:\M125
+2814:\M35
+2815:\M135
+2816:\M235
+2817:\M1235
+2818:\M45
+2819:\M145
+281A:\M245
+281B:\M1245
+281C:\M345
+281D:\M1345
+281E:\M2345
+281F:\M12345
+2820:\M6
+2821:\M16
+2822:\M26
+2823:\M126
+2824:\M36
+2825:\M136
+2826:\M236
+2827:\M1236
+2828:\M46
+2829:\M146
+282A:\M246
+282B:\M1246
+282C:\M346
+282D:\M1346
+282E:\M2346
+282F:\M12346
+2830:\M56
+2831:\M156
+2832:\M256
+2833:\M1256
+2834:\M356
+2835:\M1356
+2836:\M2356
+2837:\M12356
+2838:\M456
+2839:\M1456
+283A:\M2456
+283B:\M12456
+283C:\M3456
+283D:\M13456
+283E:\M23456
+283F:\M123456
+2840:\M7
+2841:\M17
+2842:\M27
+2843:\M127
+2844:\M37
+2845:\M137
+2846:\M237
+2847:\M1237
+2848:\M47
+2849:\M147
+284A:\M247
+284B:\M1247
+284C:\M347
+284D:\M1347
+284E:\M2347
+284F:\M12347
+2850:\M57
+2851:\M157
+2852:\M257
+2853:\M1257
+2854:\M357
+2855:\M1357
+2856:\M2357
+2857:\M12357
+2858:\M457
+2859:\M1457
+285A:\M2457
+285B:\M12457
+285C:\M3457
+285D:\M13457
+285E:\M23457
+285F:\M123457
+2860:\M67
+2861:\M167
+2862:\M267
+2863:\M1267
+2864:\M367
+2865:\M1367
+2866:\M2367
+2867:\M12367
+2868:\M467
+2869:\M1467
+286A:\M2467
+286B:\M12467
+286C:\M3467
+286D:\M13467
+286E:\M23467
+286F:\M123467
+2870:\M567
+2871:\M1567
+2872:\M2567
+2873:\M12567
+2874:\M3567
+2875:\M13567
+2876:\M23567
+2877:\M123567
+2878:\M4567
+2879:\M14567
+287A:\M24567
+287B:\M124567
+287C:\M34567
+287D:\M134567
+287E:\M234567
+287F:\M1234567
+2880:\M8
+2881:\M18
+2882:\M28
+2883:\M128
+2884:\M38
+2885:\M138
+2886:\M238
+2887:\M1238
+2888:\M48
+2889:\M148
+288A:\M248
+288B:\M1248
+288C:\M348
+288D:\M1348
+288E:\M2348
+288F:\M12348
+2890:\M58
+2891:\M158
+2892:\M258
+2893:\M1258
+2894:\M358
+2895:\M1358
+2896:\M2358
+2897:\M12358
+2898:\M458
+2899:\M1458
+289A:\M2458
+289B:\M12458
+289C:\M3458
+289D:\M13458
+289E:\M23458
+289F:\M123458
+28A0:\M68
+28A1:\M168
+28A2:\M268
+28A3:\M1268
+28A4:\M368
+28A5:\M1368
+28A6:\M2368
+28A7:\M12368
+28A8:\M468
+28A9:\M1468
+28AA:\M2468
+28AB:\M12468
+28AC:\M3468
+28AD:\M13468
+28AE:\M23468
+28AF:\M123468
+28B0:\M568
+28B1:\M1568
+28B2:\M2568
+28B3:\M12568
+28B4:\M3568
+28B5:\M13568
+28B6:\M23568
+28B7:\M123568
+28B8:\M4568
+28B9:\M14568
+28BA:\M24568
+28BB:\M124568
+28BC:\M34568
+28BD:\M134568
+28BE:\M234568
+28BF:\M1234568
+28C0:\M78
+28C1:\M178
+28C2:\M278
+28C3:\M1278
+28C4:\M378
+28C5:\M1378
+28C6:\M2378
+28C7:\M12378
+28C8:\M478
+28C9:\M1478
+28CA:\M2478
+28CB:\M12478
+28CC:\M3478
+28CD:\M13478
+28CE:\M23478
+28CF:\M123478
+28D0:\M578
+28D1:\M1578
+28D2:\M2578
+28D3:\M12578
+28D4:\M3578
+28D5:\M13578
+28D6:\M23578
+28D7:\M123578
+28D8:\M4578
+28D9:\M14578
+28DA:\M24578
+28DB:\M124578
+28DC:\M34578
+28DD:\M134578
+28DE:\M234578
+28DF:\M1234578
+28E0:\M678
+28E1:\M1678
+28E2:\M2678
+28E3:\M12678
+28E4:\M3678
+28E5:\M13678
+28E6:\M23678
+28E7:\M123678
+28E8:\M4678
+28E9:\M14678
+28EA:\M24678
+28EB:\M124678
+28EC:\M34678
+28ED:\M134678
+28EE:\M234678
+28EF:\M1234678
+28F0:\M5678
+28F1:\M15678
+28F2:\M25678
+28F3:\M125678
+28F4:\M35678
+28F5:\M135678
+28F6:\M235678
+28F7:\M1235678
+28F8:\M45678
+28F9:\M145678
+28FA:\M245678
+28FB:\M1245678
+28FC:\M345678
+28FD:\M1345678
+28FE:\M2345678
+28FF:\M12345678
+2900:\q\Š TWO-HEADED\u\H\€ \Á
+2901:\q\Š TWO-HEADED\u\H\0 \€ \Á
+2902:\‰\Š \0\u\H\€ \Á
+2903:\q\Š \0\u\H\€ \Á
+2904:\‰ \ù\0\u\H\€ \Á
+2905:\q\Š TWO-HEADED\u FROM\ì
+2906:\‰\Š \0\u FROM\ì
+2907:\q\Š \0\u FROM\ì
+2908:\Ë\Š\u\H\ \Á
+2909:UP\Š\u\H\ \Á
+290A:UP\Š TRIPLE\u
+290B:\Ë\Š TRIPLE\u
+290C:\‰\Š \0 DASH\u
+290D:\q\Š \0 DASH\u
+290E:\‰\Š TRIPLE DASH\u
+290F:\q\Š TRIPLE DASH\u
+2910:\q\Š TWO-HEAD\ÂTRIPLE DASH\u
+2911:\Ù\³T\ÂSTEM
+2912:UP\Š\u TO\ì
+2913:\Ë\Š\u TO\ì
+2914:\Ù\HTAIL\H\€ \Á
+2915:\Ù\HTAIL\H\0 \€ \Á
+2916:\q\Š TWO-HEADED\u\HTAIL
+2917:\q\Š TWO-HEADED\u\HTAIL\H\€ \Á
+2918:\q\Š TWO-HEADED\u\HTAIL\H\0 \€ \Á
+2919:\‰\Š\u-TAIL
+291A:\Ù-TAIL
+291B:\‰\Š \0\u-TAIL
+291C:\q\Š \0\u-TAIL
+291D:\‰\Š\u TO \¬ DIAMOND
+291E:\Ù TO \¬ DIAMOND
+291F:\‰\Š\u FROM\ì TO \¬ DIAMOND
+2920:\Ù FROM\ì TO \¬ DIAMOND
+2921:NORTH WEST\iSOUTH EAST\u
+2922:NORTH EAST\iSOUTH WEST\u
+2923:NORTH WEST\u\í
+2924:NORTH EAST\u\í
+2925:SOUTH EAST\u\í
+2926:SOUTH WEST\u\í
+2927:NORTH WEST\u\iNORTH EAST\u
+2928:NORTH EAST\u\iSOUTH EAST\u
+2929:SOUTH EAST\u\iSOUTH WEST\u
+292A:SOUTH WEST\u\iNORTH WEST\u
+292B:RIS\ô DIAGONAL CROSS\ô FALL\ô DIAGONAL
+292C:FALL\ô DIAGONAL CROSS\ô RIS\ô DIAGONAL
+292D:SOUTH EAST\u CROSS\ô NORTH EAST\u
+292E:NORTH EAST\u CROSS\ô SOUTH EAST\u
+292F:FALL\ô DIAGONAL CROSS\ô NORTH EAST\u
+2930:RIS\ô DIAGONAL CROSS\ô SOUTH EAST\u
+2931:NORTH EAST\u CROSS\ô NORTH WEST\u
+2932:NORTH WEST\u CROSS\ô NORTH EAST\u
+2933:WAVE\u \ÄDIRECTLY \q
+2934:ARROW \Ä\q\Š THEN CURV\ô UP\Š
+2935:ARROW \Ä\q\Š THEN CURV\ô \Ë\Š
+2936:ARROW \Ä\Ë\Š THEN CURV\ô \‰\Š
+2937:ARROW \Ä\Ë\Š THEN CURV\ô \q\Š
+2938:\q-SIDE ARC CLOCKWISE\u
+2939:\‰-SIDE ARC ANTICLOCKWISE\u
+293A:TOP ARC ANTICLOCKWISE\u
+293B:BOTTOM ARC ANTICLOCKWISE\u
+293C:TOP ARC CLOCKWISE\u\HMINUS
+293D:TOP ARC ANTICLOCKWISE\u\HPLUS
+293E:\ï\ùSEMICIRCULAR CLOCKWISE\u
+293F:\ï\‰ SEMICIRCULAR ANTICLOCKWISE\u
+2940:ANTICLOCKWISE CLOS\Â\Ð\u
+2941:CLOCKWISE CLOS\Â\Ð\u
+2942:\Ù\p SHORT \‰\Š\u
+2943:\‰\Š\u\p SHORT \Ù
+2944:SHORT \Ù\p \‰\Š\u
+2945:\Ù\HPLUS\…
+2946:\‰\Š\u\HPLUS\…
+2947:\Ù THROUGH X
+2948:\‰ \q\u THROUGH\Ç\Ð
+2949:UP\Š TWO-HEADED\u FROM\Ç\Ð
+294A:\‰\ìB UP \ùBARB \Ë HARPOON
+294B:\‰\ìB \Ë \ùBARB UP HARPOON
+294C:UP\ìB \ù\Ë\ìB \‰ HARPOON
+294D:UP\ìB \‰ \Ë\ìB \ùHARPOON
+294E:\‰\ìB UP \ùBARB UP HARPOON
+294F:UP\ìB \ù\Ë\ìB \ùHARPOON
+2950:\‰\ìB \Ë \ùBARB \Ë HARPOON
+2951:UP\ìB \‰ \Ë\ìB \‰ HARPOON
+2952:\‰\ƒUP TO\ì
+2953:\q\ƒUP TO\ì
+2954:UP\ƒ\ùTO\ì
+2955:\Ë\ƒ\ùTO\ì
+2956:\‰\ƒ\Ë TO\ì
+2957:\q\ƒ\Ë TO\ì
+2958:UP\ƒ\‰ TO\ì
+2959:\Ë\ƒ\‰ TO\ì
+295A:\‰\ƒUP FROM\ì
+295B:\q\ƒUP FROM\ì
+295C:UP\ƒ\ùFROM\ì
+295D:\Ë\ƒ\ùFROM\ì
+295E:\‰\ƒ\Ë FROM\ì
+295F:\q\ƒ\Ë FROM\ì
+2960:UP\ƒ\‰ FROM\ì
+2961:\Ë\ƒ\‰ FROM\ì
+2962:\‰\ƒUP\p \‰\ƒ\Ë
+2963:UP\ƒ\‰ BESIDE UP\ƒ\q
+2964:\q\ƒUP\p \q\ƒ\Ë
+2965:\Ë\ƒ\‰ BESIDE \Ë\ƒ\q
+2966:\‰\ƒUP\p \q\ƒUP
+2967:\‰\ƒ\Ë\p \q\ƒ\Ë
+2968:\q\ƒUP\p \‰\ƒUP
+2969:\q\ƒ\Ë\p \‰\ƒ\Ë
+296A:\‰\ƒUP\p LONG DASH
+296B:\‰\ƒ\Ë\… LONG DASH
+296C:\q\ƒUP\p LONG DASH
+296D:\q\ƒ\Ë\… LONG DASH
+296E:UP\ƒ\‰ BESIDE \Ë\ƒ\q
+296F:\Ë\ƒ\‰ BESIDE UP\ƒ\q
+2970:\ù\0\u\HROUND\ÂHEAD
+2971:EQUALS\‚\p \Ù
+2972:\æ\Ú\p \Ù
+2973:\‰\Š\u\p \æ\Ú
+2974:\Ù\p \æ\Ú
+2975:\Ù\p ALMOST\‘
+2976:\µ\p \‰\Š\u
+2977:\‰\Š\u THROUGH \µ
+2978:\’\p \Ù
+2979:SUBSET\p \Ù
+297A:\‰\Š\u THROUGH SUBSET
+297B:SUPERSET\p \‰\Š\u
+297C:\‰ FISH TAIL
+297D:\ùFISH TAIL
+297E:UP FISH TAIL
+297F:\Ë FISH TAIL
+2980:TRIPLE \€\ì DELIMITER
+2981:Z NOT\” SPOT
+2982:Z NOT\” TYPE COLON
+2983:\‰ \¦CURLY \–
+2984:\ù\¦CURLY \–
+2985:\‰ \¦\ÑS
+2986:\ù\¦\ÑS
+2987:Z NOT\” \‰ IMAGE \–
+2988:Z NOT\” \ùIMAGE \–
+2989:Z NOT\” \‰ BIND\ô \–
+298A:Z NOT\” \ùBIND\ô \–
+298B:\‰ \r\–\HUNDERBAR
+298C:\ù\r\–\HUNDERBAR
+298D:\‰ \r\–\HTICK IN TOP CORNER
+298E:\ù\r\–\HTICK IN BOTTOM CORNER
+298F:\‰ \r\–\HTICK IN BOTTOM CORNER
+2990:\ù\r\–\HTICK IN TOP CORNER
+2991:\‰ ANGLE \–\³
+2992:\ùANGLE \–\³
+2993:\‰ ARC \µ \–
+2994:\ùARC \’ \–
+2995:\0 \‰ ARC \’ \–
+2996:\0 \ùARC \µ \–
+2997:\‰ \¬ TORTOISE SHELL \–
+2998:\ù\¬ TORTOISE SHELL \–
+2999:DOTT\ÂFENCE
+299A:\€ ZIGZAG \ä
+299B:MEASUR\ÂANGLE OPEN\ô \‰
+299C:\ùANGLE VARIANT\H\ý
+299D:MEASUR\Â\ùANGLE\³
+299E:ANGLE\HS INSIDE
+299F:\Ü ANGLE
+29A0:SPHERICAL ANGLE OPEN\ô \‰
+29A1:SPHERICAL ANGLE OPEN\ô UP
+29A2:TURN\ÂANGLE
+29A3:\öANGLE
+29A4:ANGLE\HUNDERBAR
+29A5:\öANGLE\HUNDERBAR
+29A6:OBLIQUE ANGLE OPEN\ô UP
+29A7:OBLIQUE ANGLE OPEN\ô \Ë
+29A8:\àUP\i\q
+29A9:\àUP\i\‰
+29AA:\à\Ë\i\q
+29AB:\à\Ë\i\‰
+29AC:\à\ùAND UP
+29AD:\à\‰\iUP
+29AE:\à\ùAND \Ë
+29AF:\à\‰\i\Ë
+29B0:\öEMPTY SET
+29B1:EMPTY SET\HOVERBAR
+29B2:EMPTY SET WITH\Ç\Ð\p
+29B3:EMPTY SET\H\q\u\p
+29B4:EMPTY SET\H\‰\u\p
+29B5:\Ð\H\\ì
+29B6:\c\€\ì
+29B7:\cPARALLEL
+29B8:\cREVERSE SOLIDUS
+29B9:\cPERPENDICULAR
+29BA:\Ð DIVID\ÂBY \\ì\iTOP HALF DIVID\ÂBY \€\ì
+29BB:\Ð\HSUPERIMPOS\ÂX
+29BC:\cANTICLOCKWISE-ROTAT\ÂDIVISION\‚
+29BD:UP\u THROUGH \Ð
+29BE:\c\¦BULLET
+29BF:\cBULLET
+29C0:\c\µ
+29C1:\c\’
+29C2:\Ð WITH\Ç\Ð TO THE \q
+29C3:\Ð\HTWO \ \ÁS TO THE \q
+29C4:\ýD RIS\ô DIAGONAL SLASH
+29C5:\ýD FALL\ô DIAGONAL SLASH
+29C6:\ýD ASTERISK
+29C7:\ýD\Ç\Ð
+29C8:\ýD \ý
+29C9:TWO JOIN\Â\ýS
+29CA:\¾\³\p
+29CB:\¾\HUNDERBAR
+29CC:S IN \¾
+29CD:\¾\HSERIFS AT BOTTOM
+29CE:\ù\¾\p \‰ \¾
+29CF:\‰ \¾ BESIDE \€\ì
+29D0:\€\ì BESIDE \ù\¾
+29D1:BOWTIE\H\‰ HALF \¬
+29D2:BOWTIE\H\ùHALF \¬
+29D3:\¬ BOWTIE
+29D4:TIMES\H\‰ HALF \¬
+29D5:TIMES\H\ùHALF \¬
+29D6:\¦HOURGLASS
+29D7:\¬ HOURGLASS
+29D8:\‰ WIGGLY FENCE
+29D9:\ùWIGGLY FENCE
+29DA:\‰ \0 WIGGLY FENCE
+29DB:\ù\0 WIGGLY FENCE
+29DC:INCOMPLETE INFINITY
+29DD:TIE OVER INFINITY
+29DE:INFINITY NEGATED\H\€\ì
+29DF:\0-END\ÂMULTIMAP
+29E0:\rWITH CONTOUR\ÂOUT\ä
+29E1:INCREASES AS
+29E2:SHUFFLE PRODUCT
+29E3:EQUALS\‚\iSLANT\ÂPARALLEL
+29E4:EQUALS\‚\iSLANT\ÂPARALLEL\H\æ\p
+29E5:IDENTICAL TO\iSLANT\ÂPARALLEL
+29E6:GLEICH STARK
+29E7:THERMODYNAMIC
+29E8:\Ë-\Ä\¾\H\‰ HALF \¬
+29E9:\Ë-\Ä\¾\H\ùHALF \¬
+29EA:\¬ DIAMOND\H\Ë\u
+29EB:\¬ LOZENGE
+29EC:\¦\Ð\H\Ë\u
+29ED:\¬ \Ð\H\Ë\u
+29EE:ERROR-BARR\Â\¦\ý
+29EF:ERROR-BARR\Â\¬ \ý
+29F0:ERROR-BARR\Â\¦DIAMOND
+29F1:ERROR-BARR\Â\¬ DIAMOND
+29F2:ERROR-BARR\Â\¦\Ð
+29F3:ERROR-BARR\Â\¬ \Ð
+29F4:RULE-DELAYED
+29F5:REVERSE SOLIDUS\Ú
+29F6:SOLIDUS\HOVERBAR
+29F7:REVERSE SOLIDUS\H\ \Á
+29F8:BIG SOLIDUS
+29F9:BIG REVERSE SOLIDUS
+29FA:\0 PLUS
+29FB:TRIPLE PLUS
+29FC:\‰-\ÄCURV\ÂANGLE \–
+29FD:\q-\ÄCURV\ÂANGLE \–
+29FE:TINY
+29FF:MINY
+2A00:N-ARY \cDOT\Ú
+2A01:N-ARY \cPLUS\Ú
+2A02:N-ARY \cTIMES\Ú
+2A03:N-ARY UNION\Ú\³
+2A04:N-ARY UNION\Ú\HPLUS
+2A05:N-ARY \rINTERSECTION\Ú
+2A06:N-ARY \rUNION\Ú
+2A07:TWO LOGICAL AND\Ú
+2A08:TWO LOGICAL OR\Ú
+2A09:N-ARY TIMES\Ú
+2A0A:MODULO TWO SUM
+2A0B:SUMM\”\HINTEGRAL
+2A0C:QUADRUPLE INTEGRAL\Ú
+2A0D:FINITE PART INTEGRAL
+2A0E:INTEGRAL\H\0 \Á
+2A0F:INTEGRAL AVERAGE\HSLASH
+2A10:CIRCUL\” FUNCTION
+2A11:ANTICLOCKWISE INTEGR\”
+2A12:\ä INTEGR\”\HRECTANGULAR PATH AROUND POLE
+2A13:\ä INTEGR\”\HSEMICIRCULAR PATH AROUND POLE
+2A14:\ä INTEGR\” NOT INCLUD\ô THE POLE
+2A15:INTEGRAL AROUND A POINT\Ú
+2A16:QUATERNION INTEGRAL\Ú
+2A17:INTEGRAL\H\‰\Š\u\í
+2A18:INTEGRAL\HTIMES\‚
+2A19:INTEGRAL\HINTERSECTION
+2A1A:INTEGRAL\HUNION
+2A1B:INTEGRAL\HOVERBAR
+2A1C:INTEGRAL\HUNDERBAR
+2A1D:JOIN
+2A1E:LARGE \‰ \¾\Ú
+2A1F:Z NOT\” SCHEMA COMPOSITION
+2A20:Z NOT\” SCHEMA PIP\ô
+2A21:Z NOT\” SCHEMA PROJECTION
+2A22:PLUS\‚ WITH\Ç\Ð\p
+2A23:PLUS\‚\ˆ\×\p
+2A24:PLUS\‚\H\æ\p
+2A25:PLUS\‚\³\…
+2A26:PLUS\‚\H\æ\…
+2A27:PLUS\‚\HSUB\Ž TWO
+2A28:PLUS\‚\H\¬ \¾
+2A29:MINUS\‚\HCOMMA\p
+2A2A:MINUS\‚\³\…
+2A2B:MINUS\‚\HFALL\ô DOTS
+2A2C:MINUS\‚\HRIS\ô DOTS
+2A2D:PLUS\‚ IN \‰ HALF \Ð
+2A2E:PLUS\‚ IN \ùHALF \Ð
+2A2F:VECTOR OR CROSS PRODUCT
+2A30:MULTIPLIC\”\‚\³\p
+2A31:MULTIPLIC\”\‚\HUNDERBAR
+2A32:SEMIDIRECT PRODUCT\HBOTTOM CLOSED
+2A33:SMASH PRODUCT
+2A34:MULTIPLIC\”\‚ IN \‰ HALF \Ð
+2A35:MULTIPLIC\”\‚ IN \ùHALF \Ð
+2A36:\cMULTIPLIC\”\‚\ˆ\×
+2A37:MULTIPLIC\”\‚ IN \0 \Ð
+2A38:\cDIVISION\‚
+2A39:PLUS\‚ IN \¾
+2A3A:MINUS\‚ IN \¾
+2A3B:MULTIPLIC\”\‚ IN \¾
+2A3C:INTERIOR PRODUCT
+2A3D:\qHAND INTERIOR PRODUCT
+2A3E:Z NOT\” REL\”AL COMPOSITION
+2A3F:AMALGAM\” OR COPRODUCT
+2A40:INTERSECTION\³
+2A41:UNION\HMINUS\‚
+2A42:UNION\HOVERBAR
+2A43:INTERSECTION\HOVERBAR
+2A44:INTERSECTION\HLOGICAL AND
+2A45:UNION\HLOGICAL OR
+2A46:UNION\p INTERSECTION
+2A47:INTERSECTION\p UNION
+2A48:UNION\p\ì\p INTERSECTION
+2A49:INTERSECTION\p\ì\p UNION
+2A4A:UNION BESIDE\iJOINED\HUNION
+2A4B:INTERSECTION BESIDE\iJOINED\HINTERSECTION
+2A4C:CLOS\ÂUNION\HSERIFS
+2A4D:CLOS\ÂINTERSECTION\HSERIFS
+2A4E:\0 \rINTERSECTION
+2A4F:\0 \rUNION
+2A50:CLOS\ÂUNION\HSERIFS\iSMASH PRODUCT
+2A51:LOGICAL AND\³\p
+2A52:LOGICAL OR\³\p
+2A53:\0 LOGICAL AND
+2A54:\0 LOGICAL OR
+2A55:TWO INTERSECT\ô LOGICAL AND
+2A56:TWO INTERSECT\ô LOGICAL OR
+2A57:SLOP\ô LARGE OR
+2A58:SLOP\ô LARGE AND
+2A59:LOGICAL OR OVERLAPP\ô LOGICAL AND
+2A5A:LOGICAL AND\HMIDDLE STEM
+2A5B:LOGICAL OR\HMIDDLE STEM
+2A5C:LOGICAL AND\H\ DASH
+2A5D:LOGICAL OR\H\ DASH
+2A5E:LOGICAL AND\H\0 OVERBAR
+2A5F:LOGICAL AND\HUNDERBAR
+2A60:LOGICAL AND\H\0 UNDERBAR
+2A61:\§VEE\HUNDERBAR
+2A62:LOGICAL OR\H\0 OVERBAR
+2A63:LOGICAL OR\H\0 UNDERBAR
+2A64:Z NOT\” DOMAIN ANTIRESTRICTION
+2A65:Z NOT\” RANGE ANTIRESTRICTION
+2A66:EQUALS\‚\³\…
+2A67:IDENTICAL\³\p
+2A68:TRIPLE \\ì\H\0 \€ \Á
+2A69:TRIPLE \\ì\HTRIPLE \€ \Á
+2A6A:\æ\Ú\³\p
+2A6B:\æ\Ú\HRIS\ô DOTS
+2A6C:SIMILAR MINUS SIMILAR
+2A6D:CONGRUENT\³\p
+2A6E:EQUALS\HASTERISK
+2A6F:ALMOST\‘\ˆ\×
+2A70:APPROXIMATELY EQUAL OR\‘
+2A71:EQUALS\‚\p PLUS\‚
+2A72:PLUS\‚\p EQUALS\‚
+2A73:EQUALS\‚\p \æ\Ú
+2A74:\0 COLON EQUAL
+2A75:TWO CONSECUTIVE EQUALS\‚S
+2A76:THREE CONSECUTIVE EQUALS\‚S
+2A77:EQUALS\‚\HTWO DOTS\p\iTWO DOTS\…
+2A78:EQUIVALENT\HFOUR DOTS\p
+2A79:\µ\H\Ð INSIDE
+2A7A:\’\H\Ð INSIDE
+2A7B:\µ\HQUESTION\¥\p
+2A7C:\’\HQUESTION\¥\p
+2A7D:\µ OR SLANTED\‘
+2A7E:\’ OR SLANTED\‘
+2A7F:\µ OR SLANTED\‘\³ INSIDE
+2A80:\’ OR SLANTED\‘\³ INSIDE
+2A81:\µ OR SLANTED\‘\³\p
+2A82:\’ OR SLANTED\‘\³\p
+2A83:\µ OR SLANTED\‘\³\p \q
+2A84:\’ OR SLANTED\‘\³\p \‰
+2A85:\µ OR APPROXIMATE
+2A86:\’ OR APPROXIMATE
+2A87:\µ\iS\ôLE-\ä NOT\‘
+2A88:\’\iS\ôLE-\ä NOT\‘
+2A89:\µ\iNOT APPROXIMATE
+2A8A:\’\iNOT APPROXIMATE
+2A8B:\µ\p \0-\ä EQUAL\p \’
+2A8C:\’\p \0-\ä EQUAL\p \µ
+2A8D:\µ\p SIMILAR OR EQUAL
+2A8E:\’\p SIMILAR OR EQUAL
+2A8F:\µ\p SIMILAR\p \’
+2A90:\’\p SIMILAR\p \µ
+2A91:\µ\p \’\p \0-\ä EQUAL
+2A92:\’\p \µ\p \0-\ä EQUAL
+2A93:\µ\p SLANT\ÂEQUAL\p \’\p SLANT\ÂEQUAL
+2A94:\’\p SLANT\ÂEQUAL\p \µ\p SLANT\ÂEQUAL
+2A95:SLANTED\‘ OR \µ
+2A96:SLANTED\‘ OR \’
+2A97:SLANTED\‘ OR \µ\³ INSIDE
+2A98:SLANTED\‘ OR \’\³ INSIDE
+2A99:\0-\ä\‘ OR \µ
+2A9A:\0-\ä\‘ OR \’
+2A9B:\0-\ä SLANTED\‘ OR \µ
+2A9C:\0-\ä SLANTED\‘ OR \’
+2A9D:SIMILAR OR \µ
+2A9E:SIMILAR OR \’
+2A9F:SIMILAR\p \µ\p EQUALS\‚
+2AA0:SIMILAR\p \’\p EQUALS\‚
+2AA1:\0 NEST\Â\µ
+2AA2:\0 NEST\Â\’
+2AA3:\0 NEST\Â\µ\HUNDERBAR
+2AA4:\’ OVERLAPP\ô \µ
+2AA5:\’ BESIDE \µ
+2AA6:\µ CLOS\ÂBY CURVE
+2AA7:\’ CLOS\ÂBY CURVE
+2AA8:\µ CLOS\ÂBY CURVE\p SLANT\ÂEQUAL
+2AA9:\’ CLOS\ÂBY CURVE\p SLANT\ÂEQUAL
+2AAA:SMALLER THAN
+2AAB:LARGER THAN
+2AAC:SMALLER THAN OR\‘
+2AAD:LARGER THAN OR\‘
+2AAE:EQUALS\‚\HBUMPY\p
+2AAF:PRECEDES\p S\ôLE-\ä EQUALS\‚
+2AB0:SUCCEEDS\p S\ôLE-\ä EQUALS\‚
+2AB1:PRECEDES\p S\ôLE-\ä NOT\‘
+2AB2:SUCCEEDS\p S\ôLE-\ä NOT\‘
+2AB3:PRECEDES\p EQUALS\‚
+2AB4:SUCCEEDS\p EQUALS\‚
+2AB5:PRECEDES\p NOT\‘
+2AB6:SUCCEEDS\p NOT\‘
+2AB7:PRECEDES\p ALMOST\‘
+2AB8:SUCCEEDS\p ALMOST\‘
+2AB9:PRECEDES\p NOT ALMOST\‘
+2ABA:SUCCEEDS\p NOT ALMOST\‘
+2ABB:\0 PRECEDES
+2ABC:\0 SUCCEEDS
+2ABD:SUBSET\³
+2ABE:SUPERSET\³
+2ABF:SUBSET\HPLUS\‚\…
+2AC0:SUPERSET\HPLUS\‚\…
+2AC1:SUBSET\HMULTIPLIC\”\‚\…
+2AC2:SUPERSET\HMULTIPLIC\”\‚\…
+2AC3:SUBSET OF OR\‘\³\p
+2AC4:SUPERSET OF OR\‘\³\p
+2AC5:SUBSET OF\p EQUALS\‚
+2AC6:SUPERSET OF\p EQUALS\‚
+2AC7:SUBSET OF\p \æ\Ú
+2AC8:SUPERSET OF\p \æ\Ú
+2AC9:SUBSET OF\p ALMOST\‘
+2ACA:SUPERSET OF\p ALMOST\‘
+2ACB:SUBSET OF\p NOT\‘
+2ACC:SUPERSET OF\p NOT\‘
+2ACD:\r\‰ OPEN BOX\Ú
+2ACE:\r\ùOPEN BOX\Ú
+2ACF:CLOS\ÂSUBSET
+2AD0:CLOS\ÂSUPERSET
+2AD1:CLOS\ÂSUBSET OR\‘
+2AD2:CLOS\ÂSUPERSET OR\‘
+2AD3:SUBSET\p SUPERSET
+2AD4:SUPERSET\p SUBSET
+2AD5:SUBSET\p SUBSET
+2AD6:SUPERSET\p SUPERSET
+2AD7:SUPERSET BESIDE SUBSET
+2AD8:SUPERSET BESIDE\iJOIN\ÂBY DASH\HSUBSET
+2AD9:ELEMENT OF OPEN\ô \Ë\Š
+2ADA:PITCHFORK\HTEE TOP
+2ADB:TRANSVERSAL INTERSECTION
+2ADC:FORK\ô
+2ADD:NONFORK\ô
+2ADE:SHORT \‰ TACK
+2ADF:SHORT \Ë TACK
+2AE0:SHORT UP TACK
+2AE1:PERPENDICULAR\HS
+2AE2:\€\ì TRIPLE \ùTURNSTILE
+2AE3:\0 \€\ì \‰ TURNSTILE
+2AE4:\€\ì \0 \‰ TURNSTILE
+2AE5:\0 \€\ì \0 \‰ TURNSTILE
+2AE6:LONG DASH FROM \‰ MEMBER OF \0 \€
+2AE7:SHORT \Ë TACK\HOVERBAR
+2AE8:SHORT UP TACK\HUNDERBAR
+2AE9:SHORT UP TACK\p SHORT \Ë TACK
+2AEA:\0 \Ë TACK
+2AEB:\0 UP TACK
+2AEC:\0 \Á NOT\‚
+2AED:\ö\0 \Á NOT\‚
+2AEE:DOES NOT DIVIDE\H\öNEG\” SLASH
+2AEF:\€ \ä\H\Ð\p
+2AF0:\€ \ä\H\Ð\…
+2AF1:\Ë TACK\H\Ð\…
+2AF2:PARALLEL\H\ \Á
+2AF3:PARALLEL\H\æ\Ú
+2AF4:TRIPLE \€\ì BINARY REL\”
+2AF5:TRIPLE \€\ì\H\ \Á
+2AF6:TRIPLE COLON\Ú
+2AF7:TRIPLE NEST\Â\µ
+2AF8:TRIPLE NEST\Â\’
+2AF9:\0-\ä SLANT\Â\µ OR\‘
+2AFA:\0-\ä SLANT\Â\’ OR\‘
+2AFB:TRIPLE SOLIDUS BINARY REL\”
+2AFC:LARGE TRIPLE \€\ì\Ú
+2AFD:\0 SOLIDUS\Ú
+2AFE:\¦\€\ì
+2AFF:N-ARY \¦\€\ì
+2E80:CJK\vREPEAT
+2E81:CJK\vCLIFF
+2E82:CJK\vSECOND ONE
+2E83:CJK\vSECOND TWO
+2E84:CJK\vSECOND THREE
+2E85:CJK\vPERSON
+2E86:CJK\vBOX
+2E87:CJK\vTABLE
+2E88:CJK\vKNIFE ONE
+2E89:CJK\vKNIFE TWO
+2E8A:CJK\vDIVIN\”
+2E8B:CJK\vSEAL
+2E8C:CJK\v\§ONE
+2E8D:CJK\v\§TWO
+2E8E:CJK\vLAME ONE
+2E8F:CJK\vLAME TWO
+2E90:CJK\vLAME THREE
+2E91:CJK\vLAME FOUR
+2E92:CJK\vSNAKE
+2E93:CJK\vTHREAD
+2E94:CJK\vSNOUT ONE
+2E95:CJK\vSNOUT TWO
+2E96:CJK\vHEART ONE
+2E97:CJK\vHEART TWO
+2E98:CJK\vHAND
+2E99:CJK\vRAP
+2E9B:CJK\vCHOKE
+2E9C:CJK\vSUN
+2E9D:CJK\vMOON
+2E9E:CJK\vDEATH
+2E9F:CJK\vMOTHER
+2EA0:CJK\vCIVILIAN
+2EA1:CJK\vWATER ONE
+2EA2:CJK\vWATER TWO
+2EA3:CJK\vFIRE
+2EA4:CJK\vPAW ONE
+2EA5:CJK\vPAW TWO
+2EA6:CJK\vSIMPLIFI\ÂHALF TREE TRUNK
+2EA7:CJK\vCOW
+2EA8:CJK\vDOG
+2EA9:CJK\vJADE
+2EAA:CJK\vBOLT OF CLOTH
+2EAB:CJK\vEYE
+2EAC:CJK\vSPIRIT ONE
+2EAD:CJK\vSPIRIT TWO
+2EAE:CJK\vBAMBOO
+2EAF:CJK\vSILK
+2EB0:CJK\vC-SIMPLIFI\ÂSILK
+2EB1:CJK\vNET ONE
+2EB2:CJK\vNET TWO
+2EB3:CJK\vNET THREE
+2EB4:CJK\vNET FOUR
+2EB5:CJK\vMESH
+2EB6:CJK\vSHEEP
+2EB7:CJK\vRAM
+2EB8:CJK\vEWE
+2EB9:CJK\vOLD
+2EBA:CJK\vBRUSH ONE
+2EBB:CJK\vBRUSH TWO
+2EBC:CJK\vMEAT
+2EBD:CJK\vMORTAR
+2EBE:CJK\vGRASS ONE
+2EBF:CJK\vGRASS TWO
+2EC0:CJK\vGRASS THREE
+2EC1:CJK\vTIGER
+2EC2:CJK\vCLOTHES
+2EC3:CJK\vWEST ONE
+2EC4:CJK\vWEST TWO
+2EC5:CJK\vC-SIMPLIFI\ÂSEE
+2EC6:CJK\vSIMPLIFI\ÂHORN
+2EC7:CJK\vHORN
+2EC8:CJK\vC-SIMPLIFI\ÂSPEECH
+2EC9:CJK\vC-SIMPLIFI\ÂSHELL
+2ECA:CJK\vFOOT
+2ECB:CJK\vC-SIMPLIFI\ÂCART
+2ECC:CJK\vSIMPLIFI\ÂWALK
+2ECD:CJK\vWALK ONE
+2ECE:CJK\vWALK TWO
+2ECF:CJK\vCITY
+2ED0:CJK\vC-SIMPLIFI\ÂGOLD
+2ED1:CJK\vLONG ONE
+2ED2:CJK\vLONG TWO
+2ED3:CJK\vC-SIMPLIFI\ÂLONG
+2ED4:CJK\vC-SIMPLIFI\ÂGATE
+2ED5:CJK\vMOUND ONE
+2ED6:CJK\vMOUND TWO
+2ED7:CJK\vRAIN
+2ED8:CJK\vBLUE
+2ED9:CJK\vC-SIMPLIFI\ÂTANN\ÂLEATHER
+2EDA:CJK\vC-SIMPLIFI\ÂLEAF
+2EDB:CJK\vC-SIMPLIFI\ÂWIND
+2EDC:CJK\vC-SIMPLIFI\ÂFLY
+2EDD:CJK\vEAT ONE
+2EDE:CJK\vEAT TWO
+2EDF:CJK\vEAT THREE
+2EE0:CJK\vC-SIMPLIFI\ÂEAT
+2EE1:CJK\vHEAD
+2EE2:CJK\vC-SIMPLIFI\ÂHORSE
+2EE3:CJK\vBONE
+2EE4:CJK\vGHOST
+2EE5:CJK\vC-SIMPLIFI\ÂFISH
+2EE6:CJK\vC-SIMPLIFI\ÂBIRD
+2EE7:CJK\vC-SIMPLIFI\ÂSALT
+2EE8:CJK\vSIMPLIFI\ÂWHEAT
+2EE9:CJK\vSIMPLIFI\ÂYELLOW
+2EEA:CJK\vC-SIMPLIFI\ÂFROG
+2EEB:CJK\vJ-SIMPLIFI\ÂEVEN
+2EEC:CJK\vC-SIMPLIFI\ÂEVEN
+2EED:CJK\vJ-SIMPLIFI\ÂTOOTH
+2EEE:CJK\vC-SIMPLIFI\ÂTOOTH
+2EEF:CJK\vJ-SIMPLIFI\ÂDRAGON
+2EF0:CJK\vC-SIMPLIFI\ÂDRAGON
+2EF1:CJK\vTURTLE
+2EF2:CJK\vJ-SIMPLIFI\ÂTURTLE
+2EF3:CJK\vC-SIMPLIFI\ÂTURTLE
+2F00:\UONE
+2F01:\U\ä
+2F02:\UDOT
+2F03:\USLASH
+2F04:\USECOND
+2F05:\UHOOK
+2F06:\UTWO
+2F07:\ULID
+2F08:\UMAN
+2F09:\ULEGS
+2F0A:\UENTER
+2F0B:\UE\¼
+2F0C:\U\Ë BOX
+2F0D:\UCOVER
+2F0E:\UICE
+2F0F:\UTABLE
+2F10:\UOPEN BOX
+2F11:\UKNIFE
+2F12:\UPOWER
+2F13:\UWRAP
+2F14:\USPOON
+2F15:\U\ùOPEN BOX
+2F16:\UHID\ô ENCLOSURE
+2F17:\UTEN
+2F18:\UDIVIN\”
+2F19:\USEAL
+2F1A:\UCLIFF
+2F1B:\UPRIVATE
+2F1C:\UAGAIN
+2F1D:\UMOUTH
+2F1E:\UENCLOSURE
+2F1F:\UEARTH
+2F20:\USCHOLAR
+2F21:\UGO
+2F22:\UGO SLOWLY
+2F23:\UEVEN\ô
+2F24:\UBIG
+2F25:\UWOMAN
+2F26:\UCHILD
+2F27:\UROOF
+2F28:\UINCH
+2F29:\USMALL
+2F2A:\ULAME
+2F2B:\UCORPSE
+2F2C:\USPROUT
+2F2D:\UMOUNTAIN
+2F2E:\URIVER
+2F2F:\UWORK
+2F30:\UONESELF
+2F31:\UTURBAN
+2F32:\UDRY
+2F33:\USHORT THREAD
+2F34:\UDOTT\ÂCLIFF
+2F35:\ULONG STRIDE
+2F36:\UTWO HANDS
+2F37:\USHOOT
+2F38:\UBOW
+2F39:\USNOUT
+2F3A:\UBRISTLE
+2F3B:\USTEP
+2F3C:\UHEART
+2F3D:\UHALBERD
+2F3E:\UDOOR
+2F3F:\UHAND
+2F40:\UBRANCH
+2F41:\URAP
+2F42:\U\Ž
+2F43:\UDIPPER
+2F44:\UAXE
+2F45:\U\ý
+2F46:\UNOT
+2F47:\USUN
+2F48:\USAY
+2F49:\UMOON
+2F4A:\UTREE
+2F4B:\ULACK
+2F4C:\USTOP
+2F4D:\UDEATH
+2F4E:\UWEAPON
+2F4F:\UDO NOT
+2F50:\UCOMPARE
+2F51:\UFUR
+2F52:\UCLAN
+2F53:\USTEAM
+2F54:\UWATER
+2F55:\UFIRE
+2F56:\UCLAW
+2F57:\UFATHER
+2F58:\U\0 X
+2F59:\UHALF TREE TRUNK
+2F5A:\USLICE
+2F5B:\UFANG
+2F5C:\UCOW
+2F5D:\UDOG
+2F5E:\UPROFOUND
+2F5F:\UJADE
+2F60:\UMELON
+2F61:\UTILE
+2F62:\USWEET
+2F63:\ULIFE
+2F64:\UUSE
+2F65:\UFIELD
+2F66:\UBOLT OF CLOTH
+2F67:\USICKNESS
+2F68:\UDOTT\ÂTENT
+2F69:\UWHITE
+2F6A:\USKIN
+2F6B:\UDISH
+2F6C:\UEYE
+2F6D:\USPEAR
+2F6E:\UARROW
+2F6F:\USTONE
+2F70:\USPIRIT
+2F71:\UTRACK
+2F72:\UGRAIN
+2F73:\UCAVE
+2F74:\USTAND
+2F75:\UBAMBOO
+2F76:\URICE
+2F77:\USILK
+2F78:\UJAR
+2F79:\UNET
+2F7A:\USHEEP
+2F7B:\UFEATHER
+2F7C:\UOLD
+2F7D:\UAND
+2F7E:\UPLOW
+2F7F:\UEAR
+2F80:\UBRUSH
+2F81:\UMEAT
+2F82:\UMINISTER
+2F83:\USELF
+2F84:\UARRIVE
+2F85:\UMORTAR
+2F86:\UTONGUE
+2F87:\UOPPOSE
+2F88:\UBOAT
+2F89:\USTOPP\ô
+2F8A:\UCOLOR
+2F8B:\UGRASS
+2F8C:\UTIGER
+2F8D:\UINSECT
+2F8E:\UBLOOD
+2F8F:\UWALK ENCLOSURE
+2F90:\UCLOTHES
+2F91:\UWEST
+2F92:\USEE
+2F93:\UHORN
+2F94:\USPEECH
+2F95:\UVALLEY
+2F96:\UBEAN
+2F97:\UPIG
+2F98:\UBADGER
+2F99:\USHELL
+2F9A:\URED
+2F9B:\URUN
+2F9C:\UFOOT
+2F9D:\UBODY
+2F9E:\UCART
+2F9F:\UBITTER
+2FA0:\UMORN\ô
+2FA1:\UWALK
+2FA2:\UCITY
+2FA3:\UWINE
+2FA4:\UDIST\ôUISH
+2FA5:\UVILLAGE
+2FA6:\UGOLD
+2FA7:\ULONG
+2FA8:\UGATE
+2FA9:\UMOUND
+2FAA:\USLAVE
+2FAB:\USHORT TAIL\ÂBIRD
+2FAC:\URAIN
+2FAD:\UBLUE
+2FAE:\UWRONG
+2FAF:\UFACE
+2FB0:\ULEATHER
+2FB1:\UTANN\ÂLEATHER
+2FB2:\ULEEK
+2FB3:\USOUND
+2FB4:\ULEAF
+2FB5:\UWIND
+2FB6:\UFLY
+2FB7:\UEAT
+2FB8:\UHEAD
+2FB9:\UFRAGRANT
+2FBA:\UHORSE
+2FBB:\UBONE
+2FBC:\UTALL
+2FBD:\UHAIR
+2FBE:\UF\¼
+2FBF:\USACRIFICIAL WINE
+2FC0:\UCAULDRON
+2FC1:\UGHOST
+2FC2:\UFISH
+2FC3:\UBIRD
+2FC4:\USALT
+2FC5:\UDEER
+2FC6:\UWHEAT
+2FC7:\UHEMP
+2FC8:\UYELLOW
+2FC9:\UMILLET
+2FCA:\U\¬
+2FCB:\UEMBROIDERY
+2FCC:\UFROG
+2FCD:\UTRIPOD
+2FCE:\UDRUM
+2FCF:\URAT
+2FD0:\UNOSE
+2FD1:\UEVEN
+2FD2:\UTOOTH
+2FD3:\UDRAGON
+2FD4:\UTURTLE
+2FD5:\UFLUTE
+2FF0:\ð \‰ TO \q
+2FF1:\ð\p TO\…
+2FF2:\ð \‰ TO MIDDLE\i\q
+2FF3:\ð\p TO MIDDLE AND\…
+2FF4:\ð FULL SURROUND
+2FF5:\ð SURROUND FROM\p
+2FF6:\ð SURROUND FROM\…
+2FF7:\ð SURROUND FROM \‰
+2FF8:\ð SURROUND FROM \÷\‰
+2FF9:\ð SURROUND FROM \÷\q
+2FFA:\ð SURROUND FROM \ï\‰
+2FFB:\ð OVERLAID
+3000:\8IC SPACE
+3001:\8IC COMMA
+3002:\8IC\é
+3003:DITTO\¥
+3004:JAPANESE INDUSTRIAL STANDARD \
+3005:\8IC ITER\”\¥
+3006:\8IC CLOS\ô\¥
+3007:\8IC \­ZERO
+3008:\‰ ANGLE \–
+3009:\ùANGLE \–
+300A:\‰ \0 ANGLE \–
+300B:\ù\0 ANGLE \–
+300C:\‰ CORNER \–
+300D:\ùCORNER \–
+300E:\‰ \¦CORNER \–
+300F:\ù\¦CORNER \–
+3010:\‰ \¬ LENTICULAR \–
+3011:\ù\¬ LENTICULAR \–
+3012:POSTAL\¥
+3013:GETA\¥
+3014:\‰ TORTOISE SHELL \–
+3015:\ùTORTOISE SHELL \–
+3016:\‰ \¦LENTICULAR \–
+3017:\ù\¦LENTICULAR \–
+3018:\‰ \¦TORTOISE SHELL \–
+3019:\ù\¦TORTOISE SHELL \–
+301A:\‰ \¦\r\–
+301B:\ù\¦\r\–
+301C:WAVE DASH
+301D:\ö\0 PRIME QUOT\”\¥
+301E:\0 PRIME QUOT\”\¥
+301F:LOW \0 PRIME QUOT\”\¥
+3020:POSTAL\¥ FACE
+3021:HANGZHOU NUMERAL ONE
+3022:HANGZHOU NUMERAL TWO
+3023:HANGZHOU NUMERAL THREE
+3024:HANGZHOU NUMERAL FOUR
+3025:HANGZHOU NUMERAL FIVE
+3026:HANGZHOU NUMERAL SIX
+3027:HANGZHOU NUMERAL SEVEN
+3028:HANGZHOU NUMERAL E\¼
+3029:HANGZHOU NUMERAL NINE
+302A:\8IC LEVEL TONE\¥
+302B:\8IC RIS\ô TONE\¥
+302C:\8IC DEPART\ô TONE\¥
+302D:\8IC ENTER\ô TONE\¥
+302E:\e S\ôLE DOT TONE\¥
+302F:\e \0 DOT TONE\¥
+3030:WAVY DASH
+3031:\€ KANA REPEAT\¥
+3032:\€ KANA REPEAT\HVOIC\ÂSOUND\¥
+3033:\€ KANA REPEAT\¥ \÷HALF
+3034:\€ KANA REPEAT\HVOIC\ÂSOUND\¥ \÷HALF
+3035:\€ KANA REPEAT\¥ \ïHALF
+3036:\cPOSTAL\¥
+3037:\8IC TELEGRAPH \ä FE\ÂSEPARATOR \
+3038:HANGZHOU NUMERAL TEN
+3039:HANGZHOU NUMERAL TWENTY
+303A:HANGZHOU NUMERAL THIRTY
+303B:\€ \8IC ITER\”\¥
+303C:MASU\¥
+303D:PART ALTERN\”\¥
+303E:\8IC VARI\” INDICATOR
+303F:\8IC HALF FILL SPACE
+3041:\‹\§A
+3042:\‹A
+3043:\‹\§I
+3044:\‹I
+3045:\‹\§U
+3046:\‹U
+3047:\‹\§E
+3048:\‹E
+3049:\‹\§O
+304A:\‹O
+304B:\‹KA
+304C:\‹GA
+304D:\‹KI
+304E:\‹GI
+304F:\‹KU
+3050:\‹GU
+3051:\‹KE
+3052:\‹GE
+3053:\‹KO
+3054:\‹GO
+3055:\‹SA
+3056:\‹ZA
+3057:\‹SI
+3058:\‹ZI
+3059:\‹SU
+305A:\‹ZU
+305B:\‹SE
+305C:\‹ZE
+305D:\‹SO
+305E:\‹ZO
+305F:\‹TA
+3060:\‹DA
+3061:\‹TI
+3062:\‹DI
+3063:\‹\§TU
+3064:\‹TU
+3065:\‹DU
+3066:\‹TE
+3067:\‹DE
+3068:\‹TO
+3069:\‹DO
+306A:\‹NA
+306B:\‹NI
+306C:\‹NU
+306D:\‹NE
+306E:\‹NO
+306F:\‹HA
+3070:\‹BA
+3071:\‹PA
+3072:\‹HI
+3073:\‹BI
+3074:\‹PI
+3075:\‹HU
+3076:\‹BU
+3077:\‹PU
+3078:\‹HE
+3079:\‹BE
+307A:\‹PE
+307B:\‹HO
+307C:\‹BO
+307D:\‹PO
+307E:\‹MA
+307F:\‹MI
+3080:\‹MU
+3081:\‹ME
+3082:\‹MO
+3083:\‹\§YA
+3084:\‹YA
+3085:\‹\§YU
+3086:\‹YU
+3087:\‹\§YO
+3088:\‹YO
+3089:\‹RA
+308A:\‹RI
+308B:\‹RU
+308C:\‹RE
+308D:\‹RO
+308E:\‹\§WA
+308F:\‹WA
+3090:\‹WI
+3091:\‹WE
+3092:\‹WO
+3093:\‹N
+3094:\‹VU
+3095:\‹\§KA
+3096:\‹\§KE
+3099:\o\n-HIRAGANA VOIC\ÂSOUND\¥
+309A:\o\n-HIRAGANA SEMI-VOIC\ÂSOUND\¥
+309B:\n-HIRAGANA VOIC\ÂSOUND\¥
+309C:\n-HIRAGANA SEMI-VOIC\ÂSOUND\¥
+309D:HIRAGANA ITER\”\¥
+309E:HIRAGANA VOIC\ÂITER\”\¥
+309F:HIRAGANA DIGRAPH YORI
+30A0:\n-HIRAGANA \0 HYPHEN
+30A1:\Í\§A
+30A2:\ÍA
+30A3:\Í\§I
+30A4:\ÍI
+30A5:\Í\§U
+30A6:\ÍU
+30A7:\Í\§E
+30A8:\ÍE
+30A9:\Í\§O
+30AA:\ÍO
+30AB:\ÍKA
+30AC:\ÍGA
+30AD:\ÍKI
+30AE:\ÍGI
+30AF:\ÍKU
+30B0:\ÍGU
+30B1:\ÍKE
+30B2:\ÍGE
+30B3:\ÍKO
+30B4:\ÍGO
+30B5:\ÍSA
+30B6:\ÍZA
+30B7:\ÍSI
+30B8:\ÍZI
+30B9:\ÍSU
+30BA:\ÍZU
+30BB:\ÍSE
+30BC:\ÍZE
+30BD:\ÍSO
+30BE:\ÍZO
+30BF:\ÍTA
+30C0:\ÍDA
+30C1:\ÍTI
+30C2:\ÍDI
+30C3:\Í\§TU
+30C4:\ÍTU
+30C5:\ÍDU
+30C6:\ÍTE
+30C7:\ÍDE
+30C8:\ÍTO
+30C9:\ÍDO
+30CA:\ÍNA
+30CB:\ÍNI
+30CC:\ÍNU
+30CD:\ÍNE
+30CE:\ÍNO
+30CF:\ÍHA
+30D0:\ÍBA
+30D1:\ÍPA
+30D2:\ÍHI
+30D3:\ÍBI
+30D4:\ÍPI
+30D5:\ÍHU
+30D6:\ÍBU
+30D7:\ÍPU
+30D8:\ÍHE
+30D9:\ÍBE
+30DA:\ÍPE
+30DB:\ÍHO
+30DC:\ÍBO
+30DD:\ÍPO
+30DE:\ÍMA
+30DF:\ÍMI
+30E0:\ÍMU
+30E1:\ÍME
+30E2:\ÍMO
+30E3:\Í\§YA
+30E4:\ÍYA
+30E5:\Í\§YU
+30E6:\ÍYU
+30E7:\Í\§YO
+30E8:\ÍYO
+30E9:\ÍRA
+30EA:\ÍRI
+30EB:\ÍRU
+30EC:\ÍRE
+30ED:\ÍRO
+30EE:\Í\§WA
+30EF:\ÍWA
+30F0:\ÍWI
+30F1:\ÍWE
+30F2:\ÍWO
+30F3:\ÍN
+30F4:\ÍVU
+30F5:\Í\§KA
+30F6:\Í\§KE
+30F7:\ÍVA
+30F8:\ÍVI
+30F9:\ÍVE
+30FA:\ÍVO
+30FB:\n MIDDLE DOT
+30FC:\n-HIRAGANA PROLONG\ÂSOUND\¥
+30FD:\n ITER\”\¥
+30FE:\n VOIC\ÂITER\”\¥
+30FF:\n DIGRAPH KOTO
+3105:\©B
+3106:\©P
+3107:\©M
+3108:\©F
+3109:\©D
+310A:\©T
+310B:\©N
+310C:\©L
+310D:\©G
+310E:\©K
+310F:\©H
+3110:\©J
+3111:\©Q
+3112:\©X
+3113:\©ZH
+3114:\©CH
+3115:\©SH
+3116:\©R
+3117:\©Z
+3118:\©C
+3119:\©S
+311A:\©A
+311B:\©O
+311C:\©E
+311D:\©EH
+311E:\©AI
+311F:\©EI
+3120:\©AU
+3121:\©OU
+3122:\©AN
+3123:\©EN
+3124:\©ANG
+3125:\©ENG
+3126:\©ER
+3127:\©I
+3128:\©U
+3129:\©IU
+312A:\©V
+312B:\©NG
+312C:\©GN
+3131:\ÖKIYEOK
+3132:\ÖSSANGKIYEOK
+3133:\ÖKIYEOK-SIOS
+3134:\ÖN\ÆN
+3135:\ÖN\ÆN-C\ÆC
+3136:\ÖN\ÆN-H\ÆH
+3137:\ÖTIKEUT
+3138:\ÖSSANGTIKEUT
+3139:\ÖR\ÆL
+313A:\ÖR\ÆL-KIYEOK
+313B:\ÖR\ÆL-M\ÆM
+313C:\ÖR\ÆL-P\ÆP
+313D:\ÖR\ÆL-SIOS
+313E:\ÖR\ÆL-TH\ÆTH
+313F:\ÖR\ÆL-PH\ÆPH
+3140:\ÖR\ÆL-H\ÆH
+3141:\ÖM\ÆM
+3142:\ÖP\ÆP
+3143:\ÖSSANGP\ÆP
+3144:\ÖP\ÆP-SIOS
+3145:\ÖSIOS
+3146:\ÖSSANGSIOS
+3147:\Ö\ÆNG
+3148:\ÖC\ÆC
+3149:\ÖSSANGC\ÆC
+314A:\ÖCH\ÆCH
+314B:\ÖKH\ÆKH
+314C:\ÖTH\ÆTH
+314D:\ÖPH\ÆPH
+314E:\ÖH\ÆH
+314F:\ÖA
+3150:\ÖAE
+3151:\ÖYA
+3152:\ÖYAE
+3153:\ÖEO
+3154:\ÖE
+3155:\ÖYEO
+3156:\ÖYE
+3157:\ÖO
+3158:\ÖWA
+3159:\ÖWAE
+315A:\ÖOE
+315B:\ÖYO
+315C:\ÖU
+315D:\ÖWEO
+315E:\ÖWE
+315F:\ÖWI
+3160:\ÖYU
+3161:\ÖEU
+3162:\ÖYI
+3163:\ÖI
+3164:\e FILLER
+3165:\ÖSSANGN\ÆN
+3166:\ÖN\ÆN-TIKEUT
+3167:\ÖN\ÆN-SIOS
+3168:\ÖN\ÆN-PANSIOS
+3169:\ÖR\ÆL-KIYEOK-SIOS
+316A:\ÖR\ÆL-TIKEUT
+316B:\ÖR\ÆL-P\ÆP-SIOS
+316C:\ÖR\ÆL-PANSIOS
+316D:\ÖR\ÆL-YEORINH\ÆH
+316E:\ÖM\ÆM-P\ÆP
+316F:\ÖM\ÆM-SIOS
+3170:\ÖM\ÆM-PANSIOS
+3171:\ÖKAPYEOUNM\ÆM
+3172:\ÖP\ÆP-KIYEOK
+3173:\ÖP\ÆP-TIKEUT
+3174:\ÖP\ÆP-SIOS-KIYEOK
+3175:\ÖP\ÆP-SIOS-TIKEUT
+3176:\ÖP\ÆP-C\ÆC
+3177:\ÖP\ÆP-TH\ÆTH
+3178:\ÖKAPYEOUNP\ÆP
+3179:\ÖKAPYEOUNSSANGP\ÆP
+317A:\ÖSIOS-KIYEOK
+317B:\ÖSIOS-N\ÆN
+317C:\ÖSIOS-TIKEUT
+317D:\ÖSIOS-P\ÆP
+317E:\ÖSIOS-C\ÆC
+317F:\ÖPANSIOS
+3180:\ÖSSANG\ÆNG
+3181:\ÖYES\ÆNG
+3182:\ÖYES\ÆNG-SIOS
+3183:\ÖYES\ÆNG-PANSIOS
+3184:\ÖKAPYEOUNPH\ÆPH
+3185:\ÖSSANGH\ÆH
+3186:\ÖYEORINH\ÆH
+3187:\ÖYO-YA
+3188:\ÖYO-YAE
+3189:\ÖYO-I
+318A:\ÖYU-YEO
+318B:\ÖYU-YE
+318C:\ÖYU-I
+318D:\ÖARAEA
+318E:\ÖARAEAE
+3190:\8IC ANNOT\” LINK\ô\¥
+3191:\8IC ANNOT\” REVERSE\¥
+3192:\8IC ANNOT\” ONE\¥
+3193:\8IC ANNOT\” TWO\¥
+3194:\8IC ANNOT\” THREE\¥
+3195:\8IC ANNOT\” FOUR\¥
+3196:\8IC ANNOT\” TOP\¥
+3197:\8IC ANNOT\” MIDDLE\¥
+3198:\8IC ANNOT\” BOTTOM\¥
+3199:\8IC ANNOT\” FIRST\¥
+319A:\8IC ANNOT\” SECOND\¥
+319B:\8IC ANNOT\” THIRD\¥
+319C:\8IC ANNOT\” FOURTH\¥
+319D:\8IC ANNOT\” HEAVEN\¥
+319E:\8IC ANNOT\” EARTH\¥
+319F:\8IC ANNOT\” MAN\¥
+31A0:\©BU
+31A1:\©ZI
+31A2:\©JI
+31A3:\©GU
+31A4:\©EE
+31A5:\©ENN
+31A6:\©OO
+31A7:\©ONN
+31A8:\©IR
+31A9:\©ANN
+31AA:\©INN
+31AB:\©UNN
+31AC:\©IM
+31AD:\©NGG
+31AE:\©AINN
+31AF:\©AUNN
+31B0:\©AM
+31B1:\©OM
+31B2:\©ONG
+31B3:\©INNN
+31B4:BOPOMOFO FINAL\@P
+31B5:BOPOMOFO FINAL\@T
+31B6:BOPOMOFO FINAL\@K
+31B7:BOPOMOFO FINAL\@H
+31F0:\Í\§KU
+31F1:\Í\§SI
+31F2:\Í\§SU
+31F3:\Í\§TO
+31F4:\Í\§NU
+31F5:\Í\§HA
+31F6:\Í\§HI
+31F7:\Í\§HU
+31F8:\Í\§HE
+31F9:\Í\§HO
+31FA:\Í\§MU
+31FB:\Í\§RA
+31FC:\Í\§RI
+31FD:\Í\§RU
+31FE:\Í\§RE
+31FF:\Í\§RO
+3200:\t\e KIYEOK
+3201:\t\e N\ÆN
+3202:\t\e TIKEUT
+3203:\t\e R\ÆL
+3204:\t\e M\ÆM
+3205:\t\e P\ÆP
+3206:\t\e SIOS
+3207:\t\e \ÆNG
+3208:\t\e C\ÆC
+3209:\t\e CH\ÆCH
+320A:\t\e KH\ÆKH
+320B:\t\e TH\ÆTH
+320C:\t\e PH\ÆPH
+320D:\t\e H\ÆH
+320E:\t\e KIYEOK A
+320F:\t\e N\ÆN A
+3210:\t\e TIKEUT A
+3211:\t\e R\ÆL A
+3212:\t\e M\ÆM A
+3213:\t\e P\ÆP A
+3214:\t\e SIOS A
+3215:\t\e \ÆNG A
+3216:\t\e C\ÆC A
+3217:\t\e CH\ÆCH A
+3218:\t\e KH\ÆKH A
+3219:\t\e TH\ÆTH A
+321A:\t\e PH\ÆPH A
+321B:\t\e H\ÆH A
+321C:\t\e C\ÆC U
+3220:\t\8 ONE
+3221:\t\8 TWO
+3222:\t\8 THREE
+3223:\t\8 FOUR
+3224:\t\8 FIVE
+3225:\t\8 SIX
+3226:\t\8 SEVEN
+3227:\t\8 E\¼
+3228:\t\8 NINE
+3229:\t\8 TEN
+322A:\t\8 MOON
+322B:\t\8 FIRE
+322C:\t\8 WATER
+322D:\t\8 WOOD
+322E:\t\8 METAL
+322F:\t\8 EARTH
+3230:\t\8 SUN
+3231:\t\8 STOCK
+3232:\t\8 HAVE
+3233:\t\8 SOCIETY
+3234:\t\8 NAME
+3235:\t\8 SPECIAL
+3236:\t\8 FINANCIAL
+3237:\t\8 CONGRATUL\”
+3238:\t\8 LABOR
+3239:\t\8 REPRESENT
+323A:\t\8 CALL
+323B:\t\8 STUDY
+323C:\t\8 SUPERVISE
+323D:\t\8 ENTERPRISE
+323E:\t\8 RESOURCE
+323F:\t\8 ALLIANCE
+3240:\t\8 FESTIVAL
+3241:\t\8 REST
+3242:\t\8 SELF
+3243:\t\8 REACH
+3251:\c\­TWENTY ONE
+3252:\c\­TWENTY TWO
+3253:\c\­TWENTY THREE
+3254:\c\­TWENTY FOUR
+3255:\c\­TWENTY FIVE
+3256:\c\­TWENTY SIX
+3257:\c\­TWENTY SEVEN
+3258:\c\­TWENTY E\¼
+3259:\c\­TWENTY NINE
+325A:\c\­THIRTY
+325B:\c\­THIRTY ONE
+325C:\c\­THIRTY TWO
+325D:\c\­THIRTY THREE
+325E:\c\­THIRTY FOUR
+325F:\c\­THIRTY FIVE
+3260:\c\e KIYEOK
+3261:\c\e N\ÆN
+3262:\c\e TIKEUT
+3263:\c\e R\ÆL
+3264:\c\e M\ÆM
+3265:\c\e P\ÆP
+3266:\c\e SIOS
+3267:\c\e \ÆNG
+3268:\c\e C\ÆC
+3269:\c\e CH\ÆCH
+326A:\c\e KH\ÆKH
+326B:\c\e TH\ÆTH
+326C:\c\e PH\ÆPH
+326D:\c\e H\ÆH
+326E:\c\e KIYEOK A
+326F:\c\e N\ÆN A
+3270:\c\e TIKEUT A
+3271:\c\e R\ÆL A
+3272:\c\e M\ÆM A
+3273:\c\e P\ÆP A
+3274:\c\e SIOS A
+3275:\c\e \ÆNG A
+3276:\c\e C\ÆC A
+3277:\c\e CH\ÆCH A
+3278:\c\e KH\ÆKH A
+3279:\c\e TH\ÆTH A
+327A:\c\e PH\ÆPH A
+327B:\c\e H\ÆH A
+327F:KOREAN STANDARD \
+3280:\c\8 ONE
+3281:\c\8 TWO
+3282:\c\8 THREE
+3283:\c\8 FOUR
+3284:\c\8 FIVE
+3285:\c\8 SIX
+3286:\c\8 SEVEN
+3287:\c\8 E\¼
+3288:\c\8 NINE
+3289:\c\8 TEN
+328A:\c\8 MOON
+328B:\c\8 FIRE
+328C:\c\8 WATER
+328D:\c\8 WOOD
+328E:\c\8 METAL
+328F:\c\8 EARTH
+3290:\c\8 SUN
+3291:\c\8 STOCK
+3292:\c\8 HAVE
+3293:\c\8 SOCIETY
+3294:\c\8 NAME
+3295:\c\8 SPECIAL
+3296:\c\8 FINANCIAL
+3297:\c\8 CONGRATUL\”
+3298:\c\8 LABOR
+3299:\c\8 SECRET
+329A:\c\8 MALE
+329B:\c\8 FEMALE
+329C:\c\8 SUITABLE
+329D:\c\8 EXCELLENT
+329E:\c\8 PRINT
+329F:\c\8 ATTENTION
+32A0:\c\8 ITEM
+32A1:\c\8 REST
+32A2:\c\8 COPY
+32A3:\c\8 CORRECT
+32A4:\c\8 HIGH
+32A5:\c\8 CENTRE
+32A6:\c\8 LOW
+32A7:\c\8 \‰
+32A8:\c\8 \q
+32A9:\c\8 MEDICINE
+32AA:\c\8 RELIGION
+32AB:\c\8 STUDY
+32AC:\c\8 SUPERVISE
+32AD:\c\8 ENTERPRISE
+32AE:\c\8 RESOURCE
+32AF:\c\8 ALLIANCE
+32B0:\c\8 N\¼
+32B1:\c\­THIRTY SIX
+32B2:\c\­THIRTY SEVEN
+32B3:\c\­THIRTY E\¼
+32B4:\c\­THIRTY NINE
+32B5:\c\­FORTY
+32B6:\c\­FORTY ONE
+32B7:\c\­FORTY TWO
+32B8:\c\­FORTY THREE
+32B9:\c\­FORTY FOUR
+32BA:\c\­FORTY FIVE
+32BB:\c\­FORTY SIX
+32BC:\c\­FORTY SEVEN
+32BD:\c\­FORTY E\¼
+32BE:\c\­FORTY NINE
+32BF:\c\­FIFTY
+32C0:\_JANUARY
+32C1:\_FEBRUARY
+32C2:\_MARCH
+32C3:\_APRIL
+32C4:\_MAY
+32C5:\_JUNE
+32C6:\_JULY
+32C7:\_AUGUST
+32C8:\_SEPTEMBER
+32C9:\_OCTOBER
+32CA:\_NOVEMBER
+32CB:\_DECEMBER
+32D0:\c\n A
+32D1:\c\n I
+32D2:\c\n U
+32D3:\c\n E
+32D4:\c\n O
+32D5:\c\n KA
+32D6:\c\n KI
+32D7:\c\n KU
+32D8:\c\n KE
+32D9:\c\n KO
+32DA:\c\n SA
+32DB:\c\n SI
+32DC:\c\n SU
+32DD:\c\n SE
+32DE:\c\n SO
+32DF:\c\n TA
+32E0:\c\n TI
+32E1:\c\n TU
+32E2:\c\n TE
+32E3:\c\n TO
+32E4:\c\n NA
+32E5:\c\n NI
+32E6:\c\n NU
+32E7:\c\n NE
+32E8:\c\n NO
+32E9:\c\n HA
+32EA:\c\n HI
+32EB:\c\n HU
+32EC:\c\n HE
+32ED:\c\n HO
+32EE:\c\n MA
+32EF:\c\n MI
+32F0:\c\n MU
+32F1:\c\n ME
+32F2:\c\n MO
+32F3:\c\n YA
+32F4:\c\n YU
+32F5:\c\n YO
+32F6:\c\n RA
+32F7:\c\n RI
+32F8:\c\n RU
+32F9:\c\n RE
+32FA:\c\n RO
+32FB:\c\n WA
+32FC:\c\n WI
+32FD:\c\n WE
+32FE:\c\n WO
+3300:\rAPAATO
+3301:\rARUHUA
+3302:\rANPEA
+3303:\rAARU
+3304:\rIN\ôU
+3305:\rINTI
+3306:\rUON
+3307:\rESUKUUDO
+3308:\rEEKAA
+3309:\rONSU
+330A:\rOOMU
+330B:\rKAIRI
+330C:\rKARATTO
+330D:\rKARORII
+330E:\rGARON
+330F:\rGANMA
+3310:\rGIGA
+3311:\rGINII
+3312:\rKYURII
+3313:\rGIRUDAA
+3314:\rKIRO
+3315:\rKIROGURAMU
+3316:\rKIROMEETORU
+3317:\rKIROWATTO
+3318:\rGURAMU
+3319:\rGURAMUTON
+331A:\rKURUZEIRO
+331B:\rKUROONE
+331C:\rKEESU
+331D:\rKORUNA
+331E:\rKOOPO
+331F:\rSAIKURU
+3320:\rSANTIIMU
+3321:\rSIR\ôU
+3322:\rSENTI
+3323:\rSENTO
+3324:\rDAASU
+3325:\rDESI
+3326:\rDORU
+3327:\rTON
+3328:\rNANO
+3329:\rNOTTO
+332A:\rHAITU
+332B:\rPAASENTO
+332C:\rPAATU
+332D:\rBAARERU
+332E:\rPIASUTORU
+332F:\rPIKURU
+3330:\rPIKO
+3331:\rBIRU
+3332:\rHUARADDO
+3333:\rHUIITO
+3334:\rBUSSYERU
+3335:\rHURAN
+3336:\rHEKUTAARU
+3337:\rPESO
+3338:\rPENIHI
+3339:\rHERUTU
+333A:\rPENSU
+333B:\rPEEZI
+333C:\rBEETA
+333D:\rPOINTO
+333E:\rBORUTO
+333F:\rHON
+3340:\rPONDO
+3341:\rHOORU
+3342:\rHOON
+3343:\rMAIKURO
+3344:\rMAIRU
+3345:\rMAHHA
+3346:\rMARUKU
+3347:\rMANSYON
+3348:\rMIKURON
+3349:\rMIRI
+334A:\rMIRIBAARU
+334B:\rMEGA
+334C:\rMEGATON
+334D:\rMEETORU
+334E:\rYAADO
+334F:\rYAARU
+3350:\rYUAN
+3351:\rRITTORU
+3352:\rRIRA
+3353:\rRUPII
+3354:\rRUUBURU
+3355:\rREMU
+3356:\rRENTOGEN
+3357:\rWATTO
+3358:\_HOUR ZERO
+3359:\_HOUR ONE
+335A:\_HOUR TWO
+335B:\_HOUR THREE
+335C:\_HOUR FOUR
+335D:\_HOUR FIVE
+335E:\_HOUR SIX
+335F:\_HOUR SEVEN
+3360:\_HOUR E\¼
+3361:\_HOUR NINE
+3362:\_HOUR TEN
+3363:\_HOUR ELEVEN
+3364:\_HOUR TWELVE
+3365:\_HOUR THIRTEEN
+3366:\_HOUR FOURTEEN
+3367:\_HOUR FIFTEEN
+3368:\_HOUR SIXTEEN
+3369:\_HOUR SEVENTEEN
+336A:\_HOUR E\¼EEN
+336B:\_HOUR NINETEEN
+336C:\_HOUR TWENTY
+336D:\_HOUR TWENTY-ONE
+336E:\_HOUR TWENTY-TWO
+336F:\_HOUR TWENTY-THREE
+3370:\_HOUR TWENTY-FOUR
+3371:\rHPA
+3372:\rDA
+3373:\rAU
+3374:\rBAR
+3375:\rOV
+3376:\rPC
+337B:\rERA NAME HEISEI
+337C:\rERA NAME SYOUWA
+337D:\rERA NAME TAISYOU
+337E:\rERA NAME MEIZI
+337F:\rCORPOR\”
+3380:\rPA AMPS
+3381:\rNA
+3382:\rMU A
+3383:\rMA
+3384:\rKA
+3385:\rKB
+3386:\rMB
+3387:\rGB
+3388:\rCAL
+3389:\rKCAL
+338A:\rPF
+338B:\rNF
+338C:\rMU F
+338D:\rMU G
+338E:\rMG
+338F:\rKG
+3390:\rHZ
+3391:\rKHZ
+3392:\rMHZ
+3393:\rGHZ
+3394:\rTHZ
+3395:\rMU L
+3396:\rML
+3397:\rDL
+3398:\rKL
+3399:\rFM
+339A:\rNM
+339B:\rMU M
+339C:\rMM
+339D:\rCM
+339E:\rKM
+339F:\rMM \ýD
+33A0:\rCM \ýD
+33A1:\rM \ýD
+33A2:\rKM \ýD
+33A3:\rMM CUBED
+33A4:\rCM CUBED
+33A5:\rM CUBED
+33A6:\rKM CUBED
+33A7:\rM OVER S
+33A8:\rM OVER S \ýD
+33A9:\rPA
+33AA:\rKPA
+33AB:\rMPA
+33AC:\rGPA
+33AD:\rRAD
+33AE:\rRAD OVER S
+33AF:\rRAD OVER S \ýD
+33B0:\rPS
+33B1:\rNS
+33B2:\rMU S
+33B3:\rMS
+33B4:\rPV
+33B5:\rNV
+33B6:\rMU V
+33B7:\rMV
+33B8:\rKV
+33B9:\rMV MEGA
+33BA:\rPW
+33BB:\rNW
+33BC:\rMU W
+33BD:\rMW
+33BE:\rKW
+33BF:\rMW MEGA
+33C0:\rK OHM
+33C1:\rM OHM
+33C2:\rAM
+33C3:\rBQ
+33C4:\rCC
+33C5:\rCD
+33C6:\rC OVER KG
+33C7:\rCO
+33C8:\rDB
+33C9:\rGY
+33CA:\rHA
+33CB:\rHP
+33CC:\rIN
+33CD:\rKK
+33CE:\rKM\I
+33CF:\rKT
+33D0:\rLM
+33D1:\rLN
+33D2:\rLOG
+33D3:\rLX
+33D4:\rMB\N
+33D5:\rMIL
+33D6:\rMOL
+33D7:\rPH
+33D8:\rPM
+33D9:\rPPM
+33DA:\rPR
+33DB:\rSR
+33DC:\rSV
+33DD:\rWB
+33E0:\_DAY ONE
+33E1:\_DAY TWO
+33E2:\_DAY THREE
+33E3:\_DAY FOUR
+33E4:\_DAY FIVE
+33E5:\_DAY SIX
+33E6:\_DAY SEVEN
+33E7:\_DAY E\¼
+33E8:\_DAY NINE
+33E9:\_DAY TEN
+33EA:\_DAY ELEVEN
+33EB:\_DAY TWELVE
+33EC:\_DAY THIRTEEN
+33ED:\_DAY FOURTEEN
+33EE:\_DAY FIFTEEN
+33EF:\_DAY SIXTEEN
+33F0:\_DAY SEVENTEEN
+33F1:\_DAY E\¼EEN
+33F2:\_DAY NINETEEN
+33F3:\_DAY TWENTY
+33F4:\_DAY TWENTY-ONE
+33F5:\_DAY TWENTY-TWO
+33F6:\_DAY TWENTY-THREE
+33F7:\_DAY TWENTY-FOUR
+33F8:\_DAY TWENTY-FIVE
+33F9:\_DAY TWENTY-SIX
+33FA:\_DAY TWENTY-SEVEN
+33FB:\_DAY TWENTY-E\¼
+33FC:\_DAY TWENTY-NINE
+33FD:\_DAY THIRTY
+33FE:\_DAY THIRTY-ONE
+3400-4DB5:<CJK Ideograph Extension A>
+4E00-9FA5:<CJK Ideograph>
+A000:\ZIT
+A001:\ZIX
+A002:\ZI
+A003:\ZIP
+A004:\ZIET
+A005:\ZIEX
+A006:\ZIE
+A007:\ZIEP
+A008:\ZAT
+A009:\ZAX
+A00A:\ZA
+A00B:\ZAP
+A00C:\ZUOX
+A00D:\ZUO
+A00E:\ZUOP
+A00F:\ZOT
+A010:\ZOX
+A011:\ZO
+A012:\ZOP
+A013:\ZEX
+A014:\ZE
+A015:\ZWU
+A016:\ZBIT
+A017:\ZBIX
+A018:\ZBI
+A019:\ZBIP
+A01A:\ZBIET
+A01B:\ZBIEX
+A01C:\ZBIE
+A01D:\ZBIEP
+A01E:\ZBAT
+A01F:\ZBAX
+A020:\ZBA
+A021:\ZBAP
+A022:\ZBUOX
+A023:\ZBUO
+A024:\ZBUOP
+A025:\ZBOT
+A026:\ZBOX
+A027:\ZBO
+A028:\ZBOP
+A029:\ZBEX
+A02A:\ZBE
+A02B:\ZBEP
+A02C:\ZBUT
+A02D:\ZBUX
+A02E:\ZBU
+A02F:\ZBUP
+A030:\ZBURX
+A031:\ZBUR
+A032:\ZBYT
+A033:\ZBYX
+A034:\ZBY
+A035:\ZBYP
+A036:\ZBYRX
+A037:\ZBYR
+A038:\ZPIT
+A039:\ZPIX
+A03A:\ZPI
+A03B:\ZPIP
+A03C:\ZPIEX
+A03D:\ZPIE
+A03E:\ZPIEP
+A03F:\ZPAT
+A040:\ZPAX
+A041:\ZPA
+A042:\ZPAP
+A043:\ZPUOX
+A044:\ZPUO
+A045:\ZPUOP
+A046:\ZPOT
+A047:\ZPOX
+A048:\ZPO
+A049:\ZPOP
+A04A:\ZPUT
+A04B:\ZPUX
+A04C:\ZPU
+A04D:\ZPUP
+A04E:\ZPURX
+A04F:\ZPUR
+A050:\ZPYT
+A051:\ZPYX
+A052:\ZPY
+A053:\ZPYP
+A054:\ZPYRX
+A055:\ZPYR
+A056:\ZBBIT
+A057:\ZBBIX
+A058:\ZBBI
+A059:\ZBBIP
+A05A:\ZBBIET
+A05B:\ZBBIEX
+A05C:\ZBBIE
+A05D:\ZBBIEP
+A05E:\ZBBAT
+A05F:\ZBBAX
+A060:\ZBBA
+A061:\ZBBAP
+A062:\ZBBUOX
+A063:\ZBBUO
+A064:\ZBBUOP
+A065:\ZBBOT
+A066:\ZBBOX
+A067:\ZBBO
+A068:\ZBBOP
+A069:\ZBBEX
+A06A:\ZBBE
+A06B:\ZBBEP
+A06C:\ZBBUT
+A06D:\ZBBUX
+A06E:\ZBBU
+A06F:\ZBBUP
+A070:\ZBBURX
+A071:\ZBBUR
+A072:\ZBBYT
+A073:\ZBBYX
+A074:\ZBBY
+A075:\ZBBYP
+A076:\ÿBIT
+A077:\ÿBIX
+A078:\ÿBI
+A079:\ÿBIP
+A07A:\ÿBIEX
+A07B:\ÿBIE
+A07C:\ÿBIEP
+A07D:\ÿBAT
+A07E:\ÿBAX
+A07F:\ÿBA
+A080:\ÿBAP
+A081:\ÿBOT
+A082:\ÿBOX
+A083:\ÿBO
+A084:\ÿBOP
+A085:\ÿBUT
+A086:\ÿBUX
+A087:\ÿBU
+A088:\ÿBUP
+A089:\ÿBURX
+A08A:\ÿBUR
+A08B:\ÿBYT
+A08C:\ÿBYX
+A08D:\ÿBY
+A08E:\ÿBYP
+A08F:\ÿBYRX
+A090:\ÿBYR
+A091:\ZHMIT
+A092:\ZHMIX
+A093:\ZHMI
+A094:\ZHMIP
+A095:\ZHMIEX
+A096:\ZHMIE
+A097:\ZHMIEP
+A098:\ZHMAT
+A099:\ZHMAX
+A09A:\ZHMA
+A09B:\ZHMAP
+A09C:\ZHMUOX
+A09D:\ZHMUO
+A09E:\ZHMUOP
+A09F:\ZHMOT
+A0A0:\ZHMOX
+A0A1:\ZHMO
+A0A2:\ZHMOP
+A0A3:\ZHMUT
+A0A4:\ZHMUX
+A0A5:\ZHMU
+A0A6:\ZHMUP
+A0A7:\ZHMURX
+A0A8:\ZHMUR
+A0A9:\ZHMYX
+A0AA:\ZHMY
+A0AB:\ZHMYP
+A0AC:\ZHMYRX
+A0AD:\ZHMYR
+A0AE:\ZMIT
+A0AF:\ZMIX
+A0B0:\ZMI
+A0B1:\ZMIP
+A0B2:\ZMIEX
+A0B3:\ZMIE
+A0B4:\ZMIEP
+A0B5:\ZMAT
+A0B6:\ZMAX
+A0B7:\ZMA
+A0B8:\ZMAP
+A0B9:\ZMUOT
+A0BA:\ZMUOX
+A0BB:\ZMUO
+A0BC:\ZMUOP
+A0BD:\ZMOT
+A0BE:\ZMOX
+A0BF:\ZMO
+A0C0:\ZMOP
+A0C1:\ZMEX
+A0C2:\ZME
+A0C3:\ZMUT
+A0C4:\ZMUX
+A0C5:\ZMU
+A0C6:\ZMUP
+A0C7:\ZMURX
+A0C8:\ZMUR
+A0C9:\ZMYT
+A0CA:\ZMYX
+A0CB:\ZMY
+A0CC:\ZMYP
+A0CD:\ZFIT
+A0CE:\ZFIX
+A0CF:\ZFI
+A0D0:\ZFIP
+A0D1:\ZFAT
+A0D2:\ZFAX
+A0D3:\ZFA
+A0D4:\ZFAP
+A0D5:\ZFOX
+A0D6:\ZFO
+A0D7:\ZFOP
+A0D8:\ZFUT
+A0D9:\ZFUX
+A0DA:\ZFU
+A0DB:\ZFUP
+A0DC:\ZFURX
+A0DD:\ZFUR
+A0DE:\ZFYT
+A0DF:\ZFYX
+A0E0:\ZFY
+A0E1:\ZFYP
+A0E2:\ZVIT
+A0E3:\ZVIX
+A0E4:\ZVI
+A0E5:\ZVIP
+A0E6:\ZVIET
+A0E7:\ZVIEX
+A0E8:\ZVIE
+A0E9:\ZVIEP
+A0EA:\ZVAT
+A0EB:\ZVAX
+A0EC:\ZVA
+A0ED:\ZVAP
+A0EE:\ZVOT
+A0EF:\ZVOX
+A0F0:\ZVO
+A0F1:\ZVOP
+A0F2:\ZVEX
+A0F3:\ZVEP
+A0F4:\ZVUT
+A0F5:\ZVUX
+A0F6:\ZVU
+A0F7:\ZVUP
+A0F8:\ZVURX
+A0F9:\ZVUR
+A0FA:\ZVYT
+A0FB:\ZVYX
+A0FC:\ZVY
+A0FD:\ZVYP
+A0FE:\ZVYRX
+A0FF:\ZVYR
+A100:\ZDIT
+A101:\ZDIX
+A102:\ZDI
+A103:\ZDIP
+A104:\ZDIEX
+A105:\ZDIE
+A106:\ZDIEP
+A107:\ZDAT
+A108:\ZDAX
+A109:\ZDA
+A10A:\ZDAP
+A10B:\ZDUOX
+A10C:\ZDUO
+A10D:\ZDOT
+A10E:\ZDOX
+A10F:\ZDO
+A110:\ZDOP
+A111:\ZDEX
+A112:\ZDE
+A113:\ZDEP
+A114:\ZDUT
+A115:\ZDUX
+A116:\ZDU
+A117:\ZDUP
+A118:\ZDURX
+A119:\ZDUR
+A11A:\ZTIT
+A11B:\ZTIX
+A11C:\ZTI
+A11D:\ZTIP
+A11E:\ZTIEX
+A11F:\ZTIE
+A120:\ZTIEP
+A121:\ZTAT
+A122:\ZTAX
+A123:\ZTA
+A124:\ZTAP
+A125:\ZTUOT
+A126:\ZTUOX
+A127:\ZTUO
+A128:\ZTUOP
+A129:\ZTOT
+A12A:\ZTOX
+A12B:\ZTO
+A12C:\ZTOP
+A12D:\ZTEX
+A12E:\ZTE
+A12F:\ZTEP
+A130:\ZTUT
+A131:\ZTUX
+A132:\ZTU
+A133:\ZTUP
+A134:\ZTURX
+A135:\ZTUR
+A136:\ZDDIT
+A137:\ZDDIX
+A138:\ZDDI
+A139:\ZDDIP
+A13A:\ZDDIEX
+A13B:\ZDDIE
+A13C:\ZDDIEP
+A13D:\ZDDAT
+A13E:\ZDDAX
+A13F:\ZDDA
+A140:\ZDDAP
+A141:\ZDDUOX
+A142:\ZDDUO
+A143:\ZDDUOP
+A144:\ZDDOT
+A145:\ZDDOX
+A146:\ZDDO
+A147:\ZDDOP
+A148:\ZDDEX
+A149:\ZDDE
+A14A:\ZDDEP
+A14B:\ZDDUT
+A14C:\ZDDUX
+A14D:\ZDDU
+A14E:\ZDDUP
+A14F:\ZDDURX
+A150:\ZDDUR
+A151:\ÿDIT
+A152:\ÿDIX
+A153:\ÿDI
+A154:\ÿDIP
+A155:\ÿDIEX
+A156:\ÿDIE
+A157:\ÿDAT
+A158:\ÿDAX
+A159:\ÿDA
+A15A:\ÿDAP
+A15B:\ÿDOT
+A15C:\ÿDOX
+A15D:\ÿDO
+A15E:\ÿDOP
+A15F:\ÿDEX
+A160:\ÿDE
+A161:\ÿDEP
+A162:\ÿDUT
+A163:\ÿDUX
+A164:\ÿDU
+A165:\ÿDUP
+A166:\ÿDURX
+A167:\ÿDUR
+A168:\ZHNIT
+A169:\ZHNIX
+A16A:\ZHNI
+A16B:\ZHNIP
+A16C:\ZHNIET
+A16D:\ZHNIEX
+A16E:\ZHNIE
+A16F:\ZHNIEP
+A170:\ZHNAT
+A171:\ZHNAX
+A172:\ZHNA
+A173:\ZHNAP
+A174:\ZHNUOX
+A175:\ZHNUO
+A176:\ZHNOT
+A177:\ZHNOX
+A178:\ZHNOP
+A179:\ZHNEX
+A17A:\ZHNE
+A17B:\ZHNEP
+A17C:\ZHNUT
+A17D:\ÿIT
+A17E:\ÿIX
+A17F:\ÿI
+A180:\ÿIP
+A181:\ÿIEX
+A182:\ÿIE
+A183:\ÿIEP
+A184:\ÿAX
+A185:\ÿA
+A186:\ÿAP
+A187:\ÿUOX
+A188:\ÿUO
+A189:\ÿUOP
+A18A:\ÿOT
+A18B:\ÿOX
+A18C:\ÿO
+A18D:\ÿOP
+A18E:\ÿEX
+A18F:\ÿE
+A190:\ÿEP
+A191:\ÿUT
+A192:\ÿUX
+A193:\ÿU
+A194:\ÿUP
+A195:\ÿURX
+A196:\ÿUR
+A197:\ZHLIT
+A198:\ZHLIX
+A199:\ZHLI
+A19A:\ZHLIP
+A19B:\ZHLIEX
+A19C:\ZHLIE
+A19D:\ZHLIEP
+A19E:\ZHLAT
+A19F:\ZHLAX
+A1A0:\ZHLA
+A1A1:\ZHLAP
+A1A2:\ZHLUOX
+A1A3:\ZHLUO
+A1A4:\ZHLUOP
+A1A5:\ZHLOX
+A1A6:\ZHLO
+A1A7:\ZHLOP
+A1A8:\ZHLEX
+A1A9:\ZHLE
+A1AA:\ZHLEP
+A1AB:\ZHLUT
+A1AC:\ZHLUX
+A1AD:\ZHLU
+A1AE:\ZHLUP
+A1AF:\ZHLURX
+A1B0:\ZHLUR
+A1B1:\ZHLYT
+A1B2:\ZHLYX
+A1B3:\ZHLY
+A1B4:\ZHLYP
+A1B5:\ZHLYRX
+A1B6:\ZHLYR
+A1B7:\ZLIT
+A1B8:\ZLIX
+A1B9:\ZLI
+A1BA:\ZLIP
+A1BB:\ZLIET
+A1BC:\ZLIEX
+A1BD:\ZLIE
+A1BE:\ZLIEP
+A1BF:\ZLAT
+A1C0:\ZLAX
+A1C1:\ZLA
+A1C2:\ZLAP
+A1C3:\ZLUOT
+A1C4:\ZLUOX
+A1C5:\ZLUO
+A1C6:\ZLUOP
+A1C7:\ZLOT
+A1C8:\ZLOX
+A1C9:\ZLO
+A1CA:\ZLOP
+A1CB:\ZLEX
+A1CC:\ZLE
+A1CD:\ZLEP
+A1CE:\ZLUT
+A1CF:\ZLUX
+A1D0:\ZLU
+A1D1:\ZLUP
+A1D2:\ZLURX
+A1D3:\ZLUR
+A1D4:\ZLYT
+A1D5:\ZLYX
+A1D6:\ZLY
+A1D7:\ZLYP
+A1D8:\ZLYRX
+A1D9:\ZLYR
+A1DA:\ZGIT
+A1DB:\ZGIX
+A1DC:\ZGI
+A1DD:\ZGIP
+A1DE:\ZGIET
+A1DF:\ZGIEX
+A1E0:\ZGIE
+A1E1:\ZGIEP
+A1E2:\ZGAT
+A1E3:\ZGAX
+A1E4:\ZGA
+A1E5:\ZGAP
+A1E6:\ZGUOT
+A1E7:\ZGUOX
+A1E8:\ZGUO
+A1E9:\ZGUOP
+A1EA:\ZGOT
+A1EB:\ZGOX
+A1EC:\ZGO
+A1ED:\ZGOP
+A1EE:\ZGET
+A1EF:\ZGEX
+A1F0:\ZGE
+A1F1:\ZGEP
+A1F2:\ZGUT
+A1F3:\ZGUX
+A1F4:\ZGU
+A1F5:\ZGUP
+A1F6:\ZGURX
+A1F7:\ZGUR
+A1F8:\ZKIT
+A1F9:\ZKIX
+A1FA:\ZKI
+A1FB:\ZKIP
+A1FC:\ZKIEX
+A1FD:\ZKIE
+A1FE:\ZKIEP
+A1FF:\ZKAT
+A200:\ZKAX
+A201:\ZKA
+A202:\ZKAP
+A203:\ZKUOX
+A204:\ZKUO
+A205:\ZKUOP
+A206:\ZKOT
+A207:\ZKOX
+A208:\ZKO
+A209:\ZKOP
+A20A:\ZKET
+A20B:\ZKEX
+A20C:\ZKE
+A20D:\ZKEP
+A20E:\ZKUT
+A20F:\ZKUX
+A210:\ZKU
+A211:\ZKUP
+A212:\ZKURX
+A213:\ZKUR
+A214:\ZGGIT
+A215:\ZGGIX
+A216:\ZGGI
+A217:\ZGGIEX
+A218:\ZGGIE
+A219:\ZGGIEP
+A21A:\ZGGAT
+A21B:\ZGGAX
+A21C:\ZGGA
+A21D:\ZGGAP
+A21E:\ZGGUOT
+A21F:\ZGGUOX
+A220:\ZGGUO
+A221:\ZGGUOP
+A222:\ZGGOT
+A223:\ZGGOX
+A224:\ZGGO
+A225:\ZGGOP
+A226:\ZGGET
+A227:\ZGGEX
+A228:\ZGGE
+A229:\ZGGEP
+A22A:\ZGGUT
+A22B:\ZGGUX
+A22C:\ZGGU
+A22D:\ZGGUP
+A22E:\ZGGURX
+A22F:\ZGGUR
+A230:\ZMGIEX
+A231:\ZMGIE
+A232:\ZMGAT
+A233:\ZMGAX
+A234:\ZMGA
+A235:\ZMGAP
+A236:\ZMGUOX
+A237:\ZMGUO
+A238:\ZMGUOP
+A239:\ZMGOT
+A23A:\ZMGOX
+A23B:\ZMGO
+A23C:\ZMGOP
+A23D:\ZMGEX
+A23E:\ZMGE
+A23F:\ZMGEP
+A240:\ZMGUT
+A241:\ZMGUX
+A242:\ZMGU
+A243:\ZMGUP
+A244:\ZMGURX
+A245:\ZMGUR
+A246:\ZHXIT
+A247:\ZHXIX
+A248:\ZHXI
+A249:\ZHXIP
+A24A:\ZHXIET
+A24B:\ZHXIEX
+A24C:\ZHXIE
+A24D:\ZHXIEP
+A24E:\ZHXAT
+A24F:\ZHXAX
+A250:\ZHXA
+A251:\ZHXAP
+A252:\ZHXUOT
+A253:\ZHXUOX
+A254:\ZHXUO
+A255:\ZHXUOP
+A256:\ZHXOT
+A257:\ZHXOX
+A258:\ZHXO
+A259:\ZHXOP
+A25A:\ZHXEX
+A25B:\ZHXE
+A25C:\ZHXEP
+A25D:\ÿGIEX
+A25E:\ÿGIE
+A25F:\ÿGIEP
+A260:\ÿGAT
+A261:\ÿGAX
+A262:\ÿGA
+A263:\ÿGAP
+A264:\ÿGUOT
+A265:\ÿGUOX
+A266:\ÿGUO
+A267:\ÿGOT
+A268:\ÿGOX
+A269:\ÿGO
+A26A:\ÿGOP
+A26B:\ÿGEX
+A26C:\ÿGE
+A26D:\ÿGEP
+A26E:\ZHIT
+A26F:\ZHIEX
+A270:\ZHIE
+A271:\ZHAT
+A272:\ZHAX
+A273:\ZHA
+A274:\ZHAP
+A275:\ZHUOT
+A276:\ZHUOX
+A277:\ZHUO
+A278:\ZHUOP
+A279:\ZHOT
+A27A:\ZHOX
+A27B:\ZHO
+A27C:\ZHOP
+A27D:\ZHEX
+A27E:\ZHE
+A27F:\ZHEP
+A280:\ZWAT
+A281:\ZWAX
+A282:\ZWA
+A283:\ZWAP
+A284:\ZWUOX
+A285:\ZWUO
+A286:\ZWUOP
+A287:\ZWOX
+A288:\ZWO
+A289:\ZWOP
+A28A:\ZWEX
+A28B:\ZWE
+A28C:\ZWEP
+A28D:\ZZIT
+A28E:\ZZIX
+A28F:\ZZI
+A290:\ZZIP
+A291:\ZZIEX
+A292:\ZZIE
+A293:\ZZIEP
+A294:\ZZAT
+A295:\ZZAX
+A296:\ZZA
+A297:\ZZAP
+A298:\ZZUOX
+A299:\ZZUO
+A29A:\ZZUOP
+A29B:\ZZOT
+A29C:\ZZOX
+A29D:\ZZO
+A29E:\ZZOP
+A29F:\ZZEX
+A2A0:\ZZE
+A2A1:\ZZEP
+A2A2:\ZZUT
+A2A3:\ZZUX
+A2A4:\ZZU
+A2A5:\ZZUP
+A2A6:\ZZURX
+A2A7:\ZZUR
+A2A8:\ZZYT
+A2A9:\ZZYX
+A2AA:\ZZY
+A2AB:\ZZYP
+A2AC:\ZZYRX
+A2AD:\ZZYR
+A2AE:\ZCIT
+A2AF:\ZCIX
+A2B0:\ZCI
+A2B1:\ZCIP
+A2B2:\ZCIET
+A2B3:\ZCIEX
+A2B4:\ZCIE
+A2B5:\ZCIEP
+A2B6:\ZCAT
+A2B7:\ZCAX
+A2B8:\ZCA
+A2B9:\ZCAP
+A2BA:\ZCUOX
+A2BB:\ZCUO
+A2BC:\ZCUOP
+A2BD:\ZCOT
+A2BE:\ZCOX
+A2BF:\ZCO
+A2C0:\ZCOP
+A2C1:\ZCEX
+A2C2:\ZCE
+A2C3:\ZCEP
+A2C4:\ZCUT
+A2C5:\ZCUX
+A2C6:\ZCU
+A2C7:\ZCUP
+A2C8:\ZCURX
+A2C9:\ZCUR
+A2CA:\ZCYT
+A2CB:\ZCYX
+A2CC:\ZCY
+A2CD:\ZCYP
+A2CE:\ZCYRX
+A2CF:\ZCYR
+A2D0:\ZZZIT
+A2D1:\ZZZIX
+A2D2:\ZZZI
+A2D3:\ZZZIP
+A2D4:\ZZZIET
+A2D5:\ZZZIEX
+A2D6:\ZZZIE
+A2D7:\ZZZIEP
+A2D8:\ZZZAT
+A2D9:\ZZZAX
+A2DA:\ZZZA
+A2DB:\ZZZAP
+A2DC:\ZZZOX
+A2DD:\ZZZO
+A2DE:\ZZZOP
+A2DF:\ZZZEX
+A2E0:\ZZZE
+A2E1:\ZZZEP
+A2E2:\ZZZUX
+A2E3:\ZZZU
+A2E4:\ZZZUP
+A2E5:\ZZZURX
+A2E6:\ZZZUR
+A2E7:\ZZZYT
+A2E8:\ZZZYX
+A2E9:\ZZZY
+A2EA:\ZZZYP
+A2EB:\ZZZYRX
+A2EC:\ZZZYR
+A2ED:\ÿZIT
+A2EE:\ÿZIX
+A2EF:\ÿZI
+A2F0:\ÿZIP
+A2F1:\ÿZIEX
+A2F2:\ÿZIE
+A2F3:\ÿZIEP
+A2F4:\ÿZAT
+A2F5:\ÿZAX
+A2F6:\ÿZA
+A2F7:\ÿZAP
+A2F8:\ÿZUOX
+A2F9:\ÿZUO
+A2FA:\ÿZOX
+A2FB:\ÿZOP
+A2FC:\ÿZEX
+A2FD:\ÿZE
+A2FE:\ÿZUX
+A2FF:\ÿZU
+A300:\ÿZUP
+A301:\ÿZURX
+A302:\ÿZUR
+A303:\ÿZYT
+A304:\ÿZYX
+A305:\ÿZY
+A306:\ÿZYP
+A307:\ÿZYRX
+A308:\ÿZYR
+A309:\ZSIT
+A30A:\ZSIX
+A30B:\ZSI
+A30C:\ZSIP
+A30D:\ZSIEX
+A30E:\ZSIE
+A30F:\ZSIEP
+A310:\ZSAT
+A311:\ZSAX
+A312:\ZSA
+A313:\ZSAP
+A314:\ZSUOX
+A315:\ZSUO
+A316:\ZSUOP
+A317:\ZSOT
+A318:\ZSOX
+A319:\ZSO
+A31A:\ZSOP
+A31B:\ZSEX
+A31C:\ZSE
+A31D:\ZSEP
+A31E:\ZSUT
+A31F:\ZSUX
+A320:\ZSU
+A321:\ZSUP
+A322:\ZSURX
+A323:\ZSUR
+A324:\ZSYT
+A325:\ZSYX
+A326:\ZSY
+A327:\ZSYP
+A328:\ZSYRX
+A329:\ZSYR
+A32A:\ZSSIT
+A32B:\ZSSIX
+A32C:\ZSSI
+A32D:\ZSSIP
+A32E:\ZSSIEX
+A32F:\ZSSIE
+A330:\ZSSIEP
+A331:\ZSSAT
+A332:\ZSSAX
+A333:\ZSSA
+A334:\ZSSAP
+A335:\ZSSOT
+A336:\ZSSOX
+A337:\ZSSO
+A338:\ZSSOP
+A339:\ZSSEX
+A33A:\ZSSE
+A33B:\ZSSEP
+A33C:\ZSSUT
+A33D:\ZSSUX
+A33E:\ZSSU
+A33F:\ZSSUP
+A340:\ZSSYT
+A341:\ZSSYX
+A342:\ZSSY
+A343:\ZSSYP
+A344:\ZSSYRX
+A345:\ZSSYR
+A346:\ZZHAT
+A347:\ZZHAX
+A348:\ZZHA
+A349:\ZZHAP
+A34A:\ZZHUOX
+A34B:\ZZHUO
+A34C:\ZZHUOP
+A34D:\ZZHOT
+A34E:\ZZHOX
+A34F:\ZZHO
+A350:\ZZHOP
+A351:\ZZHET
+A352:\ZZHEX
+A353:\ZZHE
+A354:\ZZHEP
+A355:\ZZHUT
+A356:\ZZHUX
+A357:\ZZHU
+A358:\ZZHUP
+A359:\ZZHURX
+A35A:\ZZHUR
+A35B:\ZZHYT
+A35C:\ZZHYX
+A35D:\ZZHY
+A35E:\ZZHYP
+A35F:\ZZHYRX
+A360:\ZZHYR
+A361:\ZCHAT
+A362:\ZCHAX
+A363:\ZCHA
+A364:\ZCHAP
+A365:\ZCHUOT
+A366:\ZCHUOX
+A367:\ZCHUO
+A368:\ZCHUOP
+A369:\ZCHOT
+A36A:\ZCHOX
+A36B:\ZCHO
+A36C:\ZCHOP
+A36D:\ZCHET
+A36E:\ZCHEX
+A36F:\ZCHE
+A370:\ZCHEP
+A371:\ZCHUX
+A372:\ZCHU
+A373:\ZCHUP
+A374:\ZCHURX
+A375:\ZCHUR
+A376:\ZCHYT
+A377:\ZCHYX
+A378:\ZCHY
+A379:\ZCHYP
+A37A:\ZCHYRX
+A37B:\ZCHYR
+A37C:\ZRRAX
+A37D:\ZRRA
+A37E:\ZRRUOX
+A37F:\ZRRUO
+A380:\ZRROT
+A381:\ZRROX
+A382:\ZRRO
+A383:\ZRROP
+A384:\ZRRET
+A385:\ZRREX
+A386:\ZRRE
+A387:\ZRREP
+A388:\ZRRUT
+A389:\ZRRUX
+A38A:\ZRRU
+A38B:\ZRRUP
+A38C:\ZRRURX
+A38D:\ZRRUR
+A38E:\ZRRYT
+A38F:\ZRRYX
+A390:\ZRRY
+A391:\ZRRYP
+A392:\ZRRYRX
+A393:\ZRRYR
+A394:\ÿRAT
+A395:\ÿRAX
+A396:\ÿRA
+A397:\ÿRAP
+A398:\ÿROX
+A399:\ÿRO
+A39A:\ÿROP
+A39B:\ÿRET
+A39C:\ÿREX
+A39D:\ÿRE
+A39E:\ÿREP
+A39F:\ÿRUT
+A3A0:\ÿRUX
+A3A1:\ÿRU
+A3A2:\ÿRUP
+A3A3:\ÿRURX
+A3A4:\ÿRUR
+A3A5:\ÿRYT
+A3A6:\ÿRYX
+A3A7:\ÿRY
+A3A8:\ÿRYP
+A3A9:\ÿRYRX
+A3AA:\ÿRYR
+A3AB:\ZSHAT
+A3AC:\ZSHAX
+A3AD:\ZSHA
+A3AE:\ZSHAP
+A3AF:\ZSHUOX
+A3B0:\ZSHUO
+A3B1:\ZSHUOP
+A3B2:\ZSHOT
+A3B3:\ZSHOX
+A3B4:\ZSHO
+A3B5:\ZSHOP
+A3B6:\ZSHET
+A3B7:\ZSHEX
+A3B8:\ZSHE
+A3B9:\ZSHEP
+A3BA:\ZSHUT
+A3BB:\ZSHUX
+A3BC:\ZSHU
+A3BD:\ZSHUP
+A3BE:\ZSHURX
+A3BF:\ZSHUR
+A3C0:\ZSHYT
+A3C1:\ZSHYX
+A3C2:\ZSHY
+A3C3:\ZSHYP
+A3C4:\ZSHYRX
+A3C5:\ZSHYR
+A3C6:\ZRAT
+A3C7:\ZRAX
+A3C8:\ZRA
+A3C9:\ZRAP
+A3CA:\ZRUOX
+A3CB:\ZRUO
+A3CC:\ZRUOP
+A3CD:\ZROT
+A3CE:\ZROX
+A3CF:\ZRO
+A3D0:\ZROP
+A3D1:\ZREX
+A3D2:\ZRE
+A3D3:\ZREP
+A3D4:\ZRUT
+A3D5:\ZRUX
+A3D6:\ZRU
+A3D7:\ZRUP
+A3D8:\ZRURX
+A3D9:\ZRUR
+A3DA:\ZRYT
+A3DB:\ZRYX
+A3DC:\ZRY
+A3DD:\ZRYP
+A3DE:\ZRYRX
+A3DF:\ZRYR
+A3E0:\ZJIT
+A3E1:\ZJIX
+A3E2:\ZJI
+A3E3:\ZJIP
+A3E4:\ZJIET
+A3E5:\ZJIEX
+A3E6:\ZJIE
+A3E7:\ZJIEP
+A3E8:\ZJUOT
+A3E9:\ZJUOX
+A3EA:\ZJUO
+A3EB:\ZJUOP
+A3EC:\ZJOT
+A3ED:\ZJOX
+A3EE:\ZJO
+A3EF:\ZJOP
+A3F0:\ZJUT
+A3F1:\ZJUX
+A3F2:\ZJU
+A3F3:\ZJUP
+A3F4:\ZJURX
+A3F5:\ZJUR
+A3F6:\ZJYT
+A3F7:\ZJYX
+A3F8:\ZJY
+A3F9:\ZJYP
+A3FA:\ZJYRX
+A3FB:\ZJYR
+A3FC:\ZQIT
+A3FD:\ZQIX
+A3FE:\ZQI
+A3FF:\ZQIP
+A400:\ZQIET
+A401:\ZQIEX
+A402:\ZQIE
+A403:\ZQIEP
+A404:\ZQUOT
+A405:\ZQUOX
+A406:\ZQUO
+A407:\ZQUOP
+A408:\ZQOT
+A409:\ZQOX
+A40A:\ZQO
+A40B:\ZQOP
+A40C:\ZQUT
+A40D:\ZQUX
+A40E:\ZQU
+A40F:\ZQUP
+A410:\ZQURX
+A411:\ZQUR
+A412:\ZQYT
+A413:\ZQYX
+A414:\ZQY
+A415:\ZQYP
+A416:\ZQYRX
+A417:\ZQYR
+A418:\ZJJIT
+A419:\ZJJIX
+A41A:\ZJJI
+A41B:\ZJJIP
+A41C:\ZJJIET
+A41D:\ZJJIEX
+A41E:\ZJJIE
+A41F:\ZJJIEP
+A420:\ZJJUOX
+A421:\ZJJUO
+A422:\ZJJUOP
+A423:\ZJJOT
+A424:\ZJJOX
+A425:\ZJJO
+A426:\ZJJOP
+A427:\ZJJUT
+A428:\ZJJUX
+A429:\ZJJU
+A42A:\ZJJUP
+A42B:\ZJJURX
+A42C:\ZJJUR
+A42D:\ZJJYT
+A42E:\ZJJYX
+A42F:\ZJJY
+A430:\ZJJYP
+A431:\ÿJIT
+A432:\ÿJIX
+A433:\ÿJI
+A434:\ÿJIP
+A435:\ÿJIET
+A436:\ÿJIEX
+A437:\ÿJIE
+A438:\ÿJIEP
+A439:\ÿJUOX
+A43A:\ÿJUO
+A43B:\ÿJOT
+A43C:\ÿJOX
+A43D:\ÿJO
+A43E:\ÿJOP
+A43F:\ÿJUX
+A440:\ÿJU
+A441:\ÿJUP
+A442:\ÿJURX
+A443:\ÿJUR
+A444:\ÿJYT
+A445:\ÿJYX
+A446:\ÿJY
+A447:\ÿJYP
+A448:\ÿJYRX
+A449:\ÿJYR
+A44A:\ÿYIT
+A44B:\ÿYIX
+A44C:\ÿYI
+A44D:\ÿYIP
+A44E:\ÿYIET
+A44F:\ÿYIEX
+A450:\ÿYIE
+A451:\ÿYIEP
+A452:\ÿYUOX
+A453:\ÿYUO
+A454:\ÿYUOP
+A455:\ÿYOT
+A456:\ÿYOX
+A457:\ÿYO
+A458:\ÿYOP
+A459:\ÿYUT
+A45A:\ÿYUX
+A45B:\ÿYU
+A45C:\ÿYUP
+A45D:\ZXIT
+A45E:\ZXIX
+A45F:\ZXI
+A460:\ZXIP
+A461:\ZXIET
+A462:\ZXIEX
+A463:\ZXIE
+A464:\ZXIEP
+A465:\ZXUOX
+A466:\ZXUO
+A467:\ZXOT
+A468:\ZXOX
+A469:\ZXO
+A46A:\ZXOP
+A46B:\ZXYT
+A46C:\ZXYX
+A46D:\ZXY
+A46E:\ZXYP
+A46F:\ZXYRX
+A470:\ZXYR
+A471:\ZYIT
+A472:\ZYIX
+A473:\ZYI
+A474:\ZYIP
+A475:\ZYIET
+A476:\ZYIEX
+A477:\ZYIE
+A478:\ZYIEP
+A479:\ZYUOT
+A47A:\ZYUOX
+A47B:\ZYUO
+A47C:\ZYUOP
+A47D:\ZYOT
+A47E:\ZYOX
+A47F:\ZYO
+A480:\ZYOP
+A481:\ZYUT
+A482:\ZYUX
+A483:\ZYU
+A484:\ZYUP
+A485:\ZYURX
+A486:\ZYUR
+A487:\ZYYT
+A488:\ZYYX
+A489:\ZYY
+A48A:\ZYYP
+A48B:\ZYYRX
+A48C:\ZYYR
+A490:YI\vQOT
+A491:YI\vLI
+A492:YI\vKIT
+A493:YI\vNYIP
+A494:YI\vCYP
+A495:YI\vSSI
+A496:YI\vGGOP
+A497:YI\vGEP
+A498:YI\vMI
+A499:YI\vHXIT
+A49A:YI\vLYR
+A49B:YI\vBBUT
+A49C:YI\vMOP
+A49D:YI\vYO
+A49E:YI\vPUT
+A49F:YI\vHXUO
+A4A0:YI\vTAT
+A4A1:YI\vGA
+A4A2:YI\vZUP
+A4A3:YI\vCYT
+A4A4:YI\vDDUR
+A4A5:YI\vBUR
+A4A6:YI\vGGUO
+A4A7:YI\vNYOP
+A4A8:YI\vTU
+A4A9:YI\vOP
+A4AA:YI\vJJUT
+A4AB:YI\vZOT
+A4AC:YI\vPYT
+A4AD:YI\vHMO
+A4AE:YI\vYIT
+A4AF:YI\vVUR
+A4B0:YI\vSHY
+A4B1:YI\vVEP
+A4B2:YI\vZA
+A4B3:YI\vJO
+A4B4:YI\vNZUP
+A4B5:YI\vJJY
+A4B6:YI\vGOT
+A4B7:YI\vJJIE
+A4B8:YI\vWO
+A4B9:YI\vDU
+A4BA:YI\vSHUR
+A4BB:YI\vLIE
+A4BC:YI\vCY
+A4BD:YI\vCUOP
+A4BE:YI\vCIP
+A4BF:YI\vHXOP
+A4C0:YI\vSHAT
+A4C1:YI\vZUR
+A4C2:YI\vSHOP
+A4C3:YI\vCHE
+A4C4:YI\vZZIET
+A4C5:YI\vNBIE
+A4C6:YI\vKE
+AC00-D7A3:<Hangul Syllable>
+D800-DB7F:<Non Private Use High Surrogate>
+DB80-DBFF:<Private Use High Surrogate>
+DC00-DFFF:<Low Surrogate>
+E000-F8FF:<Private Use>
+F900:\ 00
+F901:\ 01
+F902:\ 02
+F903:\ 03
+F904:\ 04
+F905:\ 05
+F906:\ 06
+F907:\ 07
+F908:\ 08
+F909:\ 09
+F90A:\ 0A
+F90B:\ 0B
+F90C:\ 0C
+F90D:\ 0D
+F90E:\ 0E
+F90F:\ 0F
+F910:\ 10
+F911:\ 11
+F912:\ 12
+F913:\ 13
+F914:\ 14
+F915:\ 15
+F916:\ 16
+F917:\ 17
+F918:\ 18
+F919:\ 19
+F91A:\ 1A
+F91B:\ 1B
+F91C:\ 1C
+F91D:\ 1D
+F91E:\ 1E
+F91F:\ 1F
+F920:\ 20
+F921:\ 21
+F922:\ 22
+F923:\ 23
+F924:\ 24
+F925:\ 25
+F926:\ 26
+F927:\ 27
+F928:\ 28
+F929:\ 29
+F92A:\ 2A
+F92B:\ 2B
+F92C:\ 2C
+F92D:\ 2D
+F92E:\ 2E
+F92F:\ 2F
+F930:\ 30
+F931:\ 31
+F932:\ 32
+F933:\ 33
+F934:\ 34
+F935:\ 35
+F936:\ 36
+F937:\ 37
+F938:\ 38
+F939:\ 39
+F93A:\ 3A
+F93B:\ 3B
+F93C:\ 3C
+F93D:\ 3D
+F93E:\ 3E
+F93F:\ 3F
+F940:\ 40
+F941:\ 41
+F942:\ 42
+F943:\ 43
+F944:\ 44
+F945:\ 45
+F946:\ 46
+F947:\ 47
+F948:\ 48
+F949:\ 49
+F94A:\ 4A
+F94B:\ 4B
+F94C:\ 4C
+F94D:\ 4D
+F94E:\ 4E
+F94F:\ 4F
+F950:\ 50
+F951:\ 51
+F952:\ 52
+F953:\ 53
+F954:\ 54
+F955:\ 55
+F956:\ 56
+F957:\ 57
+F958:\ 58
+F959:\ 59
+F95A:\ 5A
+F95B:\ 5B
+F95C:\ 5C
+F95D:\ 5D
+F95E:\ 5E
+F95F:\ 5F
+F960:\ 60
+F961:\ 61
+F962:\ 62
+F963:\ 63
+F964:\ 64
+F965:\ 65
+F966:\ 66
+F967:\ 67
+F968:\ 68
+F969:\ 69
+F96A:\ 6A
+F96B:\ 6B
+F96C:\ 6C
+F96D:\ 6D
+F96E:\ 6E
+F96F:\ 6F
+F970:\ 70
+F971:\ 71
+F972:\ 72
+F973:\ 73
+F974:\ 74
+F975:\ 75
+F976:\ 76
+F977:\ 77
+F978:\ 78
+F979:\ 79
+F97A:\ 7A
+F97B:\ 7B
+F97C:\ 7C
+F97D:\ 7D
+F97E:\ 7E
+F97F:\ 7F
+F980:\ 80
+F981:\ 81
+F982:\ 82
+F983:\ 83
+F984:\ 84
+F985:\ 85
+F986:\ 86
+F987:\ 87
+F988:\ 88
+F989:\ 89
+F98A:\ 8A
+F98B:\ 8B
+F98C:\ 8C
+F98D:\ 8D
+F98E:\ 8E
+F98F:\ 8F
+F990:\ 90
+F991:\ 91
+F992:\ 92
+F993:\ 93
+F994:\ 94
+F995:\ 95
+F996:\ 96
+F997:\ 97
+F998:\ 98
+F999:\ 99
+F99A:\ 9A
+F99B:\ 9B
+F99C:\ 9C
+F99D:\ 9D
+F99E:\ 9E
+F99F:\ 9F
+F9A0:\ A0
+F9A1:\ A1
+F9A2:\ A2
+F9A3:\ A3
+F9A4:\ A4
+F9A5:\ A5
+F9A6:\ A6
+F9A7:\ A7
+F9A8:\ A8
+F9A9:\ A9
+F9AA:\ AA
+F9AB:\ AB
+F9AC:\ AC
+F9AD:\ AD
+F9AE:\ AE
+F9AF:\ AF
+F9B0:\ B0
+F9B1:\ B1
+F9B2:\ B2
+F9B3:\ B3
+F9B4:\ B4
+F9B5:\ B5
+F9B6:\ B6
+F9B7:\ B7
+F9B8:\ B8
+F9B9:\ B9
+F9BA:\ BA
+F9BB:\ BB
+F9BC:\ BC
+F9BD:\ BD
+F9BE:\ BE
+F9BF:\ BF
+F9C0:\ C0
+F9C1:\ C1
+F9C2:\ C2
+F9C3:\ C3
+F9C4:\ C4
+F9C5:\ C5
+F9C6:\ C6
+F9C7:\ C7
+F9C8:\ C8
+F9C9:\ C9
+F9CA:\ CA
+F9CB:\ CB
+F9CC:\ CC
+F9CD:\ CD
+F9CE:\ CE
+F9CF:\ CF
+F9D0:\ D0
+F9D1:\ D1
+F9D2:\ D2
+F9D3:\ D3
+F9D4:\ D4
+F9D5:\ D5
+F9D6:\ D6
+F9D7:\ D7
+F9D8:\ D8
+F9D9:\ D9
+F9DA:\ DA
+F9DB:\ DB
+F9DC:\ DC
+F9DD:\ DD
+F9DE:\ DE
+F9DF:\ DF
+F9E0:\ E0
+F9E1:\ E1
+F9E2:\ E2
+F9E3:\ E3
+F9E4:\ E4
+F9E5:\ E5
+F9E6:\ E6
+F9E7:\ E7
+F9E8:\ E8
+F9E9:\ E9
+F9EA:\ EA
+F9EB:\ EB
+F9EC:\ EC
+F9ED:\ ED
+F9EE:\ EE
+F9EF:\ EF
+F9F0:\ F0
+F9F1:\ F1
+F9F2:\ F2
+F9F3:\ F3
+F9F4:\ F4
+F9F5:\ F5
+F9F6:\ F6
+F9F7:\ F7
+F9F8:\ F8
+F9F9:\ F9
+F9FA:\ FA
+F9FB:\ FB
+F9FC:\ FC
+F9FD:\ FD
+F9FE:\ FE
+F9FF:\ FF
+FA00:\õ00
+FA01:\õ01
+FA02:\õ02
+FA03:\õ03
+FA04:\õ04
+FA05:\õ05
+FA06:\õ06
+FA07:\õ07
+FA08:\õ08
+FA09:\õ09
+FA0A:\õ0A
+FA0B:\õ0B
+FA0C:\õ0C
+FA0D:\õ0D
+FA0E:\õ0E
+FA0F:\õ0F
+FA10:\õ10
+FA11:\õ11
+FA12:\õ12
+FA13:\õ13
+FA14:\õ14
+FA15:\õ15
+FA16:\õ16
+FA17:\õ17
+FA18:\õ18
+FA19:\õ19
+FA1A:\õ1A
+FA1B:\õ1B
+FA1C:\õ1C
+FA1D:\õ1D
+FA1E:\õ1E
+FA1F:\õ1F
+FA20:\õ20
+FA21:\õ21
+FA22:\õ22
+FA23:\õ23
+FA24:\õ24
+FA25:\õ25
+FA26:\õ26
+FA27:\õ27
+FA28:\õ28
+FA29:\õ29
+FA2A:\õ2A
+FA2B:\õ2B
+FA2C:\õ2C
+FA2D:\õ2D
+FA30:\õ30
+FA31:\õ31
+FA32:\õ32
+FA33:\õ33
+FA34:\õ34
+FA35:\õ35
+FA36:\õ36
+FA37:\õ37
+FA38:\õ38
+FA39:\õ39
+FA3A:\õ3A
+FA3B:\õ3B
+FA3C:\õ3C
+FA3D:\õ3D
+FA3E:\õ3E
+FA3F:\õ3F
+FA40:\õ40
+FA41:\õ41
+FA42:\õ42
+FA43:\õ43
+FA44:\õ44
+FA45:\õ45
+FA46:\õ46
+FA47:\õ47
+FA48:\õ48
+FA49:\õ49
+FA4A:\õ4A
+FA4B:\õ4B
+FA4C:\õ4C
+FA4D:\õ4D
+FA4E:\õ4E
+FA4F:\õ4F
+FA50:\õ50
+FA51:\õ51
+FA52:\õ52
+FA53:\õ53
+FA54:\õ54
+FA55:\õ55
+FA56:\õ56
+FA57:\õ57
+FA58:\õ58
+FA59:\õ59
+FA5A:\õ5A
+FA5B:\õ5B
+FA5C:\õ5C
+FA5D:\õ5D
+FA5E:\õ5E
+FA5F:\õ5F
+FA60:\õ60
+FA61:\õ61
+FA62:\õ62
+FA63:\õ63
+FA64:\õ64
+FA65:\õ65
+FA66:\õ66
+FA67:\õ67
+FA68:\õ68
+FA69:\õ69
+FA6A:\õ6A
+FB00:LATIN\Ç\òFF
+FB01:LATIN\Ç\òFI
+FB02:LATIN\Ç\òFL
+FB03:LATIN\Ç\òFFI
+FB04:LATIN\Ç\òFFL
+FB05:LATIN\Ç\òLONG S T
+FB06:LATIN\Ç\òST
+FB13:ARMENIAN\Ç\òMEN NOW
+FB14:ARMENIAN\Ç\òMEN ECH
+FB15:ARMENIAN\Ç\òMEN INI
+FB16:ARMENIAN\Ç\òVEW NOW
+FB17:ARMENIAN\Ç\òMEN XEH
+FB1D:\Ÿ\@YOD\HHIRIQ
+FB1E:\Ÿ POINT JUDEO-SPANISH VARIKA
+FB1F:\Ÿ \òYIDDISH YOD YOD PATAH
+FB20:\Ÿ\@ALTERNATIVE AYIN
+FB21:\Ÿ\@WIDE ALEF
+FB22:\Ÿ\@WIDE DALET
+FB23:\Ÿ\@WIDE HE
+FB24:\Ÿ\@WIDE KAF
+FB25:\Ÿ\@WIDE LAMED
+FB26:\Ÿ\@WIDE FINAL MEM
+FB27:\Ÿ\@WIDE RESH
+FB28:\Ÿ\@WIDE TAV
+FB29:\Ÿ\@ALTERNATIVE PLUS\‚
+FB2A:\Ÿ\@SHIN\HSHIN DOT
+FB2B:\Ÿ\@SHIN\HSIN DOT
+FB2C:\Ÿ\@SHIN\HDAGESH\iSHIN DOT
+FB2D:\Ÿ\@SHIN\HDAGESH\iSIN DOT
+FB2E:\Ÿ\@ALEF\HPATAH
+FB2F:\Ÿ\@ALEF\HQAMATS
+FB30:\Ÿ\@ALEF\HMAPIQ
+FB31:\Ÿ\@BET\HDAGESH
+FB32:\Ÿ\@GIMEL\HDAGESH
+FB33:\Ÿ\@DALET\HDAGESH
+FB34:\Ÿ\@HE\HMAPIQ
+FB35:\Ÿ\@VAV\HDAGESH
+FB36:\Ÿ\@ZAYIN\HDAGESH
+FB38:\Ÿ\@TET\HDAGESH
+FB39:\Ÿ\@YOD\HDAGESH
+FB3A:\Ÿ\@FINAL KAF\HDAGESH
+FB3B:\Ÿ\@KAF\HDAGESH
+FB3C:\Ÿ\@LAMED\HDAGESH
+FB3E:\Ÿ\@MEM\HDAGESH
+FB40:\Ÿ\@NUN\HDAGESH
+FB41:\Ÿ\@SAMEKH\HDAGESH
+FB43:\Ÿ\@FINAL PE\HDAGESH
+FB44:\Ÿ\@PE\HDAGESH
+FB46:\Ÿ\@TSADI\HDAGESH
+FB47:\Ÿ\@QOF\HDAGESH
+FB48:\Ÿ\@RESH\HDAGESH
+FB49:\Ÿ\@SHIN\HDAGESH
+FB4A:\Ÿ\@TAV\HDAGESH
+FB4B:\Ÿ\@VAV\HHOLAM
+FB4C:\Ÿ\@BET\HRAFE
+FB4D:\Ÿ\@KAF\HRAFE
+FB4E:\Ÿ\@PE\HRAFE
+FB4F:\Ÿ \òALEF LAMED
+FB50:\^ALEF WASLA\Q
+FB51:\^ALEF WASLA\6
+FB52:\^BEEH\Q
+FB53:\^BEEH\6
+FB54:\^BEEH\2
+FB55:\^BEEH MEDI\X
+FB56:\^PEH\Q
+FB57:\^PEH\6
+FB58:\^PEH\2
+FB59:\^PEH MEDI\X
+FB5A:\^BEHEH\Q
+FB5B:\^BEHEH\6
+FB5C:\^BEHEH\2
+FB5D:\^BEHEH MEDI\X
+FB5E:\^TTEHEH\Q
+FB5F:\^TTEHEH\6
+FB60:\^TTEHEH\2
+FB61:\^TTEHEH MEDI\X
+FB62:\^TEHEH\Q
+FB63:\^TEHEH\6
+FB64:\^TEHEH\2
+FB65:\^TEHEH MEDI\X
+FB66:\^TTEH\Q
+FB67:\^TTEH\6
+FB68:\^TTEH\2
+FB69:\^TTEH MEDI\X
+FB6A:\^VEH\Q
+FB6B:\^VEH\6
+FB6C:\^VEH\2
+FB6D:\^VEH MEDI\X
+FB6E:\^PEHEH\Q
+FB6F:\^PEHEH\6
+FB70:\^PEHEH\2
+FB71:\^PEHEH MEDI\X
+FB72:\^DYEH\Q
+FB73:\^DYEH\6
+FB74:\^DYEH\2
+FB75:\^DYEH MEDI\X
+FB76:\^NYEH\Q
+FB77:\^NYEH\6
+FB78:\^NYEH\2
+FB79:\^NYEH MEDI\X
+FB7A:\^TCHEH\Q
+FB7B:\^TCHEH\6
+FB7C:\^TCHEH\2
+FB7D:\^TCHEH MEDI\X
+FB7E:\^TCHEHEH\Q
+FB7F:\^TCHEHEH\6
+FB80:\^TCHEHEH\2
+FB81:\^TCHEHEH MEDI\X
+FB82:\^DDAHAL\Q
+FB83:\^DDAHAL\6
+FB84:\^DAHAL\Q
+FB85:\^DAHAL\6
+FB86:\^DUL\Q
+FB87:\^DUL\6
+FB88:\^DDAL\Q
+FB89:\^DDAL\6
+FB8A:\^JEH\Q
+FB8B:\^JEH\6
+FB8C:\^RREH\Q
+FB8D:\^RREH\6
+FB8E:\^KEHEH\Q
+FB8F:\^KEHEH\6
+FB90:\^KEHEH\2
+FB91:\^KEHEH MEDI\X
+FB92:\^GAF\Q
+FB93:\^GAF\6
+FB94:\^GAF\2
+FB95:\^GAF MEDI\X
+FB96:\^GUEH\Q
+FB97:\^GUEH\6
+FB98:\^GUEH\2
+FB99:\^GUEH MEDI\X
+FB9A:\^NGOEH\Q
+FB9B:\^NGOEH\6
+FB9C:\^NGOEH\2
+FB9D:\^NGOEH MEDI\X
+FB9E:\^NOON GHUNNA\Q
+FB9F:\^NOON GHUNNA\6
+FBA0:\^RNOON\Q
+FBA1:\^RNOON\6
+FBA2:\^RNOON\2
+FBA3:\^RNOON MEDI\X
+FBA4:\^HEH\HYEH\p\Q
+FBA5:\^HEH\HYEH\p\6
+FBA6:\^HEH GOAL\Q
+FBA7:\^HEH GOAL\6
+FBA8:\^HEH GOAL\2
+FBA9:\^HEH GOAL MEDI\X
+FBAA:\^HEH DOACHASHMEE\Q
+FBAB:\^HEH DOACHASHMEE\6
+FBAC:\^HEH DOACHASHMEE\2
+FBAD:\^HEH DOACHASHMEE MEDI\X
+FBAE:\^YEH\ìREE\Q
+FBAF:\^YEH\ìREE\6
+FBB0:\^YEH\ìREE\HHAMZA\p\Q
+FBB1:\^YEH\ìREE\HHAMZA\p\6
+FBD3:\^NG\Q
+FBD4:\^NG\6
+FBD5:\^NG\2
+FBD6:\^NG MEDI\X
+FBD7:\^U\Q
+FBD8:\^U\6
+FBD9:\^OE\Q
+FBDA:\^OE\6
+FBDB:\^YU\Q
+FBDC:\^YU\6
+FBDD:\^U\HHAMZA\p\Q
+FBDE:\^VE\Q
+FBDF:\^VE\6
+FBE0:\^KIRGHIZ OE\Q
+FBE1:\^KIRGHIZ OE\6
+FBE2:\^KIRGHIZ YU\Q
+FBE3:\^KIRGHIZ YU\6
+FBE4:\^E\Q
+FBE5:\^E\6
+FBE6:\^E\2
+FBE7:\^E MEDI\X
+FBE8:\^UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA\2
+FBE9:\^UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDI\X
+FBEA:\J\º\HALEF\Q
+FBEB:\J\º\HALEF\6
+FBEC:\J\º\HAE\Q
+FBED:\J\º\HAE\6
+FBEE:\J\º\HWAW\Q
+FBEF:\J\º\HWAW\6
+FBF0:\J\º\HU\Q
+FBF1:\J\º\HU\6
+FBF2:\J\º\HOE\Q
+FBF3:\J\º\HOE\6
+FBF4:\J\º\HYU\Q
+FBF5:\J\º\HYU\6
+FBF6:\J\º\HE\Q
+FBF7:\J\º\HE\6
+FBF8:\J\º\HE\2
+FBF9:\JUIGHUR KIRGHIZ \º\‡\Q
+FBFA:\JUIGHUR KIRGHIZ \º\‡\6
+FBFB:\JUIGHUR KIRGHIZ \º\‡\2
+FBFC:\^FARSI YEH\Q
+FBFD:\^FARSI YEH\6
+FBFE:\^FARSI YEH\2
+FBFF:\^FARSI YEH MEDI\X
+FC00:\J\º\Ô\Q
+FC01:\J\º\HHAH\Q
+FC02:\J\º\\Q
+FC03:\J\º\‡\Q
+FC04:\J\º\HYEH\Q
+FC05:\JBEH\Ô\Q
+FC06:\JBEH\HHAH\Q
+FC07:\JBEH\HKHAH\Q
+FC08:\JBEH\\Q
+FC09:\JBEH\‡\Q
+FC0A:\JBEH\HYEH\Q
+FC0B:\JTEH\Ô\Q
+FC0C:\JTEH\HHAH\Q
+FC0D:\JTEH\HKHAH\Q
+FC0E:\JTEH\\Q
+FC0F:\JTEH\‡\Q
+FC10:\JTEH\HYEH\Q
+FC11:\JTHEH\Ô\Q
+FC12:\JTHEH\\Q
+FC13:\JTHEH\‡\Q
+FC14:\JTHEH\HYEH\Q
+FC15:\JJEEM\HHAH\Q
+FC16:\JJEEM\\Q
+FC17:\JHAH\Ô\Q
+FC18:\JHAH\\Q
+FC19:\JKHAH\Ô\Q
+FC1A:\JKHAH\HHAH\Q
+FC1B:\JKHAH\\Q
+FC1C:\JSEEN\Ô\Q
+FC1D:\JSEEN\HHAH\Q
+FC1E:\JSEEN\HKHAH\Q
+FC1F:\JSEEN\\Q
+FC20:\JSAD\HHAH\Q
+FC21:\JSAD\\Q
+FC22:\JDAD\Ô\Q
+FC23:\JDAD\HHAH\Q
+FC24:\JDAD\HKHAH\Q
+FC25:\JDAD\\Q
+FC26:\JTAH\HHAH\Q
+FC27:\JTAH\\Q
+FC28:\JZAH\\Q
+FC29:\JAIN\Ô\Q
+FC2A:\JAIN\\Q
+FC2B:\JGHAIN\Ô\Q
+FC2C:\JGHAIN\\Q
+FC2D:\JFEH\Ô\Q
+FC2E:\JFEH\HHAH\Q
+FC2F:\JFEH\HKHAH\Q
+FC30:\JFEH\\Q
+FC31:\JFEH\‡\Q
+FC32:\JFEH\HYEH\Q
+FC33:\JQAF\HHAH\Q
+FC34:\JQAF\\Q
+FC35:\JQAF\‡\Q
+FC36:\JQAF\HYEH\Q
+FC37:\JKAF\HALEF\Q
+FC38:\JKAF\Ô\Q
+FC39:\JKAF\HHAH\Q
+FC3A:\JKAF\HKHAH\Q
+FC3B:\JKAF\HLAM\Q
+FC3C:\JKAF\\Q
+FC3D:\JKAF\‡\Q
+FC3E:\JKAF\HYEH\Q
+FC3F:\JLAM\Ô\Q
+FC40:\JLAM\HHAH\Q
+FC41:\JLAM\HKHAH\Q
+FC42:\JLAM\\Q
+FC43:\JLAM\‡\Q
+FC44:\JLAM\HYEH\Q
+FC45:\JMEEM\Ô\Q
+FC46:\JMEEM\HHAH\Q
+FC47:\JMEEM\HKHAH\Q
+FC48:\JMEEM\\Q
+FC49:\JMEEM\‡\Q
+FC4A:\JMEEM\HYEH\Q
+FC4B:\JNOON\Ô\Q
+FC4C:\JNOON\HHAH\Q
+FC4D:\JNOON\HKHAH\Q
+FC4E:\JNOON\\Q
+FC4F:\JNOON\‡\Q
+FC50:\JNOON\HYEH\Q
+FC51:\JHEH\Ô\Q
+FC52:\JHEH\\Q
+FC53:\JHEH\‡\Q
+FC54:\JHEH\HYEH\Q
+FC55:\JYEH\Ô\Q
+FC56:\JYEH\HHAH\Q
+FC57:\JYEH\HKHAH\Q
+FC58:\JYEH\\Q
+FC59:\JYEH\‡\Q
+FC5A:\JYEH\HYEH\Q
+FC5B:\JTHAL\HSUPER\Ž ALEF\Q
+FC5C:\JREH\HSUPER\Ž ALEF\Q
+FC5D:\JALEF MAKSURA\HSUPER\Ž ALEF\Q
+FC5E:\JSHADDA\HDAMMATAN\Q
+FC5F:\JSHADDA\HKASRATAN\Q
+FC60:\JSHADDA\HFATHA\Q
+FC61:\JSHADDA\HDAMMA\Q
+FC62:\JSHADDA\HKASRA\Q
+FC63:\JSHADDA\HSUPER\Ž ALEF\Q
+FC64:\J\º\HREH\6
+FC65:\J\º\HZAIN\6
+FC66:\J\º\\6
+FC67:\J\º\HNOON\6
+FC68:\J\º\‡\6
+FC69:\J\º\Û
+FC6A:\JBEH\HREH\6
+FC6B:\JBEH\HZAIN\6
+FC6C:\JBEH\\6
+FC6D:\JBEH\HNOON\6
+FC6E:\JBEH\‡\6
+FC6F:\JBEH\Û
+FC70:\JTEH\HREH\6
+FC71:\JTEH\HZAIN\6
+FC72:\JTEH\\6
+FC73:\JTEH\HNOON\6
+FC74:\JTEH\‡\6
+FC75:\JTEH\Û
+FC76:\JTHEH\HREH\6
+FC77:\JTHEH\HZAIN\6
+FC78:\JTHEH\\6
+FC79:\JTHEH\HNOON\6
+FC7A:\JTHEH\‡\6
+FC7B:\JTHEH\Û
+FC7C:\JFEH\‡\6
+FC7D:\JFEH\Û
+FC7E:\JQAF\‡\6
+FC7F:\JQAF\Û
+FC80:\JKAF\HALEF\6
+FC81:\JKAF\HLAM\6
+FC82:\JKAF\\6
+FC83:\JKAF\‡\6
+FC84:\JKAF\Û
+FC85:\JLAM\\6
+FC86:\JLAM\‡\6
+FC87:\JLAM\Û
+FC88:\JMEEM\HALEF\6
+FC89:\JMEEM\\6
+FC8A:\JNOON\HREH\6
+FC8B:\JNOON\HZAIN\6
+FC8C:\JNOON\\6
+FC8D:\JNOON\HNOON\6
+FC8E:\JNOON\‡\6
+FC8F:\JNOON\Û
+FC90:\JALEF MAKSURA\HSUPER\Ž ALEF\6
+FC91:\JYEH\HREH\6
+FC92:\JYEH\HZAIN\6
+FC93:\JYEH\\6
+FC94:\JYEH\HNOON\6
+FC95:\JYEH\‡\6
+FC96:\JYEH\Û
+FC97:\J\º\Ô\2
+FC98:\J\º\HHAH\2
+FC99:\J\º\HKHAH\2
+FC9A:\J\º\\2
+FC9B:\J\º\HHEH\2
+FC9C:\JBEH\Ô\2
+FC9D:\JBEH\HHAH\2
+FC9E:\JBEH\HKHAH\2
+FC9F:\JBEH\\2
+FCA0:\JBEH\HHEH\2
+FCA1:\JTEH\Ô\2
+FCA2:\JTEH\HHAH\2
+FCA3:\JTEH\HKHAH\2
+FCA4:\JTEH\\2
+FCA5:\JTEH\HHEH\2
+FCA6:\JTHEH\\2
+FCA7:\JJEEM\HHAH\2
+FCA8:\JJEEM\\2
+FCA9:\JHAH\Ô\2
+FCAA:\JHAH\\2
+FCAB:\JKHAH\Ô\2
+FCAC:\JKHAH\\2
+FCAD:\JSEEN\Ô\2
+FCAE:\JSEEN\HHAH\2
+FCAF:\JSEEN\HKHAH\2
+FCB0:\JSEEN\\2
+FCB1:\JSAD\HHAH\2
+FCB2:\JSAD\HKHAH\2
+FCB3:\JSAD\\2
+FCB4:\JDAD\Ô\2
+FCB5:\JDAD\HHAH\2
+FCB6:\JDAD\HKHAH\2
+FCB7:\JDAD\\2
+FCB8:\JTAH\HHAH\2
+FCB9:\JZAH\\2
+FCBA:\JAIN\Ô\2
+FCBB:\JAIN\\2
+FCBC:\JGHAIN\Ô\2
+FCBD:\JGHAIN\\2
+FCBE:\JFEH\Ô\2
+FCBF:\JFEH\HHAH\2
+FCC0:\JFEH\HKHAH\2
+FCC1:\JFEH\\2
+FCC2:\JQAF\HHAH\2
+FCC3:\JQAF\\2
+FCC4:\JKAF\Ô\2
+FCC5:\JKAF\HHAH\2
+FCC6:\JKAF\HKHAH\2
+FCC7:\JKAF\HLAM\2
+FCC8:\JKAF\\2
+FCC9:\JLAM\Ô\2
+FCCA:\JLAM\HHAH\2
+FCCB:\JLAM\HKHAH\2
+FCCC:\JLAM\\2
+FCCD:\JLAM\HHEH\2
+FCCE:\JMEEM\Ô\2
+FCCF:\JMEEM\HHAH\2
+FCD0:\JMEEM\HKHAH\2
+FCD1:\JMEEM\\2
+FCD2:\JNOON\Ô\2
+FCD3:\JNOON\HHAH\2
+FCD4:\JNOON\HKHAH\2
+FCD5:\JNOON\\2
+FCD6:\JNOON\HHEH\2
+FCD7:\JHEH\Ô\2
+FCD8:\JHEH\\2
+FCD9:\JHEH\HSUPER\Ž ALEF\2
+FCDA:\JYEH\Ô\2
+FCDB:\JYEH\HHAH\2
+FCDC:\JYEH\HKHAH\2
+FCDD:\JYEH\\2
+FCDE:\JYEH\HHEH\2
+FCDF:\J\º\ MEDI\X
+FCE0:\J\º\HHEH MEDI\X
+FCE1:\JBEH\ MEDI\X
+FCE2:\JBEH\HHEH MEDI\X
+FCE3:\JTEH\ MEDI\X
+FCE4:\JTEH\HHEH MEDI\X
+FCE5:\JTHEH\ MEDI\X
+FCE6:\JTHEH\HHEH MEDI\X
+FCE7:\JSEEN\ MEDI\X
+FCE8:\JSEEN\HHEH MEDI\X
+FCE9:\JSHEEN\ MEDI\X
+FCEA:\JSHEEN\HHEH MEDI\X
+FCEB:\JKAF\HLAM MEDI\X
+FCEC:\JKAF\ MEDI\X
+FCED:\JLAM\ MEDI\X
+FCEE:\JNOON\ MEDI\X
+FCEF:\JNOON\HHEH MEDI\X
+FCF0:\JYEH\ MEDI\X
+FCF1:\JYEH\HHEH MEDI\X
+FCF2:\JSHADDA\HFATHA MEDI\X
+FCF3:\JSHADDA\HDAMMA MEDI\X
+FCF4:\JSHADDA\HKASRA MEDI\X
+FCF5:\JTAH\‡\Q
+FCF6:\JTAH\HYEH\Q
+FCF7:\JAIN\‡\Q
+FCF8:\JAIN\HYEH\Q
+FCF9:\JGHAIN\‡\Q
+FCFA:\JGHAIN\HYEH\Q
+FCFB:\JSEEN\‡\Q
+FCFC:\JSEEN\HYEH\Q
+FCFD:\JSHEEN\‡\Q
+FCFE:\JSHEEN\HYEH\Q
+FCFF:\JHAH\‡\Q
+FD00:\JHAH\HYEH\Q
+FD01:\JJEEM\‡\Q
+FD02:\JJEEM\HYEH\Q
+FD03:\JKHAH\‡\Q
+FD04:\JKHAH\HYEH\Q
+FD05:\JSAD\‡\Q
+FD06:\JSAD\HYEH\Q
+FD07:\JDAD\‡\Q
+FD08:\JDAD\HYEH\Q
+FD09:\JSHEEN\Ô\Q
+FD0A:\JSHEEN\HHAH\Q
+FD0B:\JSHEEN\HKHAH\Q
+FD0C:\JSHEEN\\Q
+FD0D:\JSHEEN\HREH\Q
+FD0E:\JSEEN\HREH\Q
+FD0F:\JSAD\HREH\Q
+FD10:\JDAD\HREH\Q
+FD11:\JTAH\‡\6
+FD12:\JTAH\Û
+FD13:\JAIN\‡\6
+FD14:\JAIN\Û
+FD15:\JGHAIN\‡\6
+FD16:\JGHAIN\Û
+FD17:\JSEEN\‡\6
+FD18:\JSEEN\Û
+FD19:\JSHEEN\‡\6
+FD1A:\JSHEEN\Û
+FD1B:\JHAH\‡\6
+FD1C:\JHAH\Û
+FD1D:\JJEEM\‡\6
+FD1E:\JJEEM\Û
+FD1F:\JKHAH\‡\6
+FD20:\JKHAH\Û
+FD21:\JSAD\‡\6
+FD22:\JSAD\Û
+FD23:\JDAD\‡\6
+FD24:\JDAD\Û
+FD25:\JSHEEN\Ô\6
+FD26:\JSHEEN\HHAH\6
+FD27:\JSHEEN\HKHAH\6
+FD28:\JSHEEN\\6
+FD29:\JSHEEN\HREH\6
+FD2A:\JSEEN\HREH\6
+FD2B:\JSAD\HREH\6
+FD2C:\JDAD\HREH\6
+FD2D:\JSHEEN\Ô\2
+FD2E:\JSHEEN\HHAH\2
+FD2F:\JSHEEN\HKHAH\2
+FD30:\JSHEEN\\2
+FD31:\JSEEN\HHEH\2
+FD32:\JSHEEN\HHEH\2
+FD33:\JTAH\\2
+FD34:\JSEEN\Ô MEDI\X
+FD35:\JSEEN\HHAH MEDI\X
+FD36:\JSEEN\HKHAH MEDI\X
+FD37:\JSHEEN\Ô MEDI\X
+FD38:\JSHEEN\HHAH MEDI\X
+FD39:\JSHEEN\HKHAH MEDI\X
+FD3A:\JTAH\ MEDI\X
+FD3B:\JZAH\ MEDI\X
+FD3C:\JALEF\HFATHATAN\6
+FD3D:\JALEF\HFATHATAN\Q
+FD3E:ORNATE \‰ \ÑS
+FD3F:ORNATE \ù\ÑS
+FD50:\JTEH\Ô\\2
+FD51:\JTEH\HHAH\Ô\6
+FD52:\JTEH\HHAH\Ô\2
+FD53:\JTEH\HHAH\\2
+FD54:\JTEH\HKHAH\\2
+FD55:\JTEH\\Ô\2
+FD56:\JTEH\\HHAH\2
+FD57:\JTEH\\HKHAH\2
+FD58:\JJEEM\\HHAH\6
+FD59:\JJEEM\\HHAH\2
+FD5A:\JHAH\\Û
+FD5B:\JHAH\\‡\6
+FD5C:\JSEEN\HHAH\Ô\2
+FD5D:\JSEEN\Ô\HHAH\2
+FD5E:\JSEEN\Ô\‡\6
+FD5F:\JSEEN\\HHAH\6
+FD60:\JSEEN\\HHAH\2
+FD61:\JSEEN\\Ô\2
+FD62:\JSEEN\\\6
+FD63:\JSEEN\\\2
+FD64:\JSAD\HHAH\HHAH\6
+FD65:\JSAD\HHAH\HHAH\2
+FD66:\JSAD\\\6
+FD67:\JSHEEN\HHAH\\6
+FD68:\JSHEEN\HHAH\\2
+FD69:\JSHEEN\Ô\Û
+FD6A:\JSHEEN\\HKHAH\6
+FD6B:\JSHEEN\\HKHAH\2
+FD6C:\JSHEEN\\\6
+FD6D:\JSHEEN\\\2
+FD6E:\JDAD\HHAH\‡\6
+FD6F:\JDAD\HKHAH\\6
+FD70:\JDAD\HKHAH\\2
+FD71:\JTAH\\HHAH\6
+FD72:\JTAH\\HHAH\2
+FD73:\JTAH\\\2
+FD74:\JTAH\\Û
+FD75:\JAIN\Ô\\6
+FD76:\JAIN\\\6
+FD77:\JAIN\\\2
+FD78:\JAIN\\‡\6
+FD79:\JGHAIN\\\6
+FD7A:\JGHAIN\\Û
+FD7B:\JGHAIN\\‡\6
+FD7C:\JFEH\HKHAH\\6
+FD7D:\JFEH\HKHAH\\2
+FD7E:\JQAF\\HHAH\6
+FD7F:\JQAF\\\6
+FD80:\JLAM\HHAH\\6
+FD81:\JLAM\HHAH\Û
+FD82:\JLAM\HHAH\‡\6
+FD83:\JLAM\Ô\Ô\2
+FD84:\JLAM\Ô\Ô\6
+FD85:\JLAM\HKHAH\\6
+FD86:\JLAM\HKHAH\\2
+FD87:\JLAM\\HHAH\6
+FD88:\JLAM\\HHAH\2
+FD89:\JMEEM\HHAH\Ô\2
+FD8A:\JMEEM\HHAH\\2
+FD8B:\JMEEM\HHAH\Û
+FD8C:\JMEEM\Ô\HHAH\2
+FD8D:\JMEEM\Ô\\2
+FD8E:\JMEEM\HKHAH\Ô\2
+FD8F:\JMEEM\HKHAH\\2
+FD92:\JMEEM\Ô\HKHAH\2
+FD93:\JHEH\\Ô\2
+FD94:\JHEH\\\2
+FD95:\JNOON\HHAH\\2
+FD96:\JNOON\HHAH\‡\6
+FD97:\JNOON\Ô\\6
+FD98:\JNOON\Ô\\2
+FD99:\JNOON\Ô\‡\6
+FD9A:\JNOON\\Û
+FD9B:\JNOON\\‡\6
+FD9C:\JYEH\\\6
+FD9D:\JYEH\\\2
+FD9E:\JBEH\HKHAH\Û
+FD9F:\JTEH\Ô\Û
+FDA0:\JTEH\Ô\‡\6
+FDA1:\JTEH\HKHAH\Û
+FDA2:\JTEH\HKHAH\‡\6
+FDA3:\JTEH\\Û
+FDA4:\JTEH\\‡\6
+FDA5:\JJEEM\\Û
+FDA6:\JJEEM\HHAH\‡\6
+FDA7:\JJEEM\\‡\6
+FDA8:\JSEEN\HKHAH\‡\6
+FDA9:\JSAD\HHAH\Û
+FDAA:\JSHEEN\HHAH\Û
+FDAB:\JDAD\HHAH\Û
+FDAC:\JLAM\Ô\Û
+FDAD:\JLAM\\Û
+FDAE:\JYEH\HHAH\Û
+FDAF:\JYEH\Ô\Û
+FDB0:\JYEH\\Û
+FDB1:\JMEEM\\Û
+FDB2:\JQAF\\Û
+FDB3:\JNOON\HHAH\Û
+FDB4:\JQAF\\HHAH\2
+FDB5:\JLAM\HHAH\\2
+FDB6:\JAIN\\Û
+FDB7:\JKAF\\Û
+FDB8:\JNOON\Ô\HHAH\2
+FDB9:\JMEEM\HKHAH\Û
+FDBA:\JLAM\Ô\\2
+FDBB:\JKAF\\\6
+FDBC:\JLAM\Ô\\6
+FDBD:\JNOON\Ô\HHAH\6
+FDBE:\JJEEM\HHAH\Û
+FDBF:\JHAH\Ô\Û
+FDC0:\JMEEM\Ô\Û
+FDC1:\JFEH\\Û
+FDC2:\JBEH\HHAH\Û
+FDC3:\JKAF\\\2
+FDC4:\JAIN\Ô\\2
+FDC5:\JSAD\\\2
+FDC6:\JSEEN\HKHAH\Û
+FDC7:\JNOON\Ô\Û
+FDF0:\JSALLA US\ÂAS KORANIC STOP\‚\Q
+FDF1:\JQALA US\ÂAS KORANIC STOP\‚\Q
+FDF2:\JALLAH\Q
+FDF3:\JAKBAR\Q
+FDF4:\JMOHAMMAD\Q
+FDF5:\JSALAM\Q
+FDF6:\JRASOUL\Q
+FDF7:\JALAYHE\Q
+FDF8:\JWASALLAM\Q
+FDF9:\JSALLA\Q
+FDFA:\JSALLALLAHOU ALAYHE WASALLAM
+FDFB:\JJALLAJALALOUHOU
+FDFC:RIAL\‚
+FE00:\ç-1
+FE01:\ç-2
+FE02:\ç-3
+FE03:\ç-4
+FE04:\ç-5
+FE05:\ç-6
+FE06:\ç-7
+FE07:\ç-8
+FE08:\ç-9
+FE09:\ç-10
+FE0A:\ç-11
+FE0B:\ç-12
+FE0C:\ç-13
+FE0D:\ç-14
+FE0E:\ç-15
+FE0F:\ç-16
+FE20:\o\ò\‰ HALF
+FE21:\o\ò\ùHALF
+FE22:\o\0 \æ \‰ HALF
+FE23:\o\0 \æ \ùHALF
+FE30:\¹TWO DOT LEADER
+FE31:\¹EM DASH
+FE32:\¹EN DASH
+FE33:\¹LOW \ä
+FE34:\¹WAVY LOW \ä
+FE35:\¹\‰ \ÑS
+FE36:\¹\ù\ÑS
+FE37:\¹\‰ CURLY \–
+FE38:\¹\ùCURLY \–
+FE39:\¹\‰ TORTOISE SHELL \–
+FE3A:\¹\ùTORTOISE SHELL \–
+FE3B:\¹\‰ \¬ LENTICULAR \–
+FE3C:\¹\ù\¬ LENTICULAR \–
+FE3D:\¹\‰ \0 ANGLE \–
+FE3E:\¹\ù\0 ANGLE \–
+FE3F:\¹\‰ ANGLE \–
+FE40:\¹\ùANGLE \–
+FE41:\¹\‰ CORNER \–
+FE42:\¹\ùCORNER \–
+FE43:\¹\‰ \¦CORNER \–
+FE44:\¹\ù\¦CORNER \–
+FE45:SESAME DOT
+FE46:\¦SESAME DOT
+FE49:DASH\ÂOVER\ä
+FE4A:CENTRE\ä OVER\ä
+FE4B:WAVY OVER\ä
+FE4C:\0 WAVY OVER\ä
+FE4D:DASH\ÂLOW \ä
+FE4E:CENTRE\ä LOW \ä
+FE4F:WAVY LOW \ä
+FE50:\§COMMA
+FE51:\§\8IC COMMA
+FE52:SMALL\é
+FE54:\§SEMICOLON
+FE55:\§COLON
+FE56:\§QUESTION\¥
+FE57:\§EXCLAM\”\¥
+FE58:\§EM DASH
+FE59:\§\‰ \ÑS
+FE5A:\§\ù\ÑS
+FE5B:\§\‰ CURLY \–
+FE5C:\§\ùCURLY \–
+FE5D:\§\‰ TORTOISE SHELL \–
+FE5E:\§\ùTORTOISE SHELL \–
+FE5F:\§\­SIGN
+FE60:\§AMPERSAND
+FE61:\§ASTERISK
+FE62:\§PLUS\‚
+FE63:\§HYPHEN-MINUS
+FE64:\§\µ\‚
+FE65:\§\’\‚
+FE66:\§EQUALS\‚
+FE68:\§REVERSE SOLIDUS
+FE69:\§DOLLAR\‚
+FE6A:\§PERCENT\‚
+FE6B:\§COMMERCIAL AT
+FE70:\Ê FATHATAN\Q
+FE71:\Ê TATWEEL\HFATHATAN\p
+FE72:\Ê DAMMATAN\Q
+FE73:\Ê TAIL FRAGMENT
+FE74:\Ê KASRATAN\Q
+FE76:\Ê FATHA\Q
+FE77:\Ê FATHA MEDI\X
+FE78:\Ê DAMMA\Q
+FE79:\Ê DAMMA MEDI\X
+FE7A:\Ê KASRA\Q
+FE7B:\Ê KASRA MEDI\X
+FE7C:\Ê SHADDA\Q
+FE7D:\Ê SHADDA MEDI\X
+FE7E:\Ê SUKUN\Q
+FE7F:\Ê SUKUN MEDI\X
+FE80:\^HAMZA\Q
+FE81:\^ALEF\HMADDA\p\Q
+FE82:\^ALEF\HMADDA\p\6
+FE83:\^ALEF\HHAMZA\p\Q
+FE84:\^ALEF\HHAMZA\p\6
+FE85:\^WAW\HHAMZA\p\Q
+FE86:\^WAW\HHAMZA\p\6
+FE87:\^ALEF\HHAMZA\…\Q
+FE88:\^ALEF\HHAMZA\…\6
+FE89:\^\º\Q
+FE8A:\^\º\6
+FE8B:\^\º\2
+FE8C:\^\º MEDI\X
+FE8D:\^ALEF\Q
+FE8E:\^ALEF\6
+FE8F:\^BEH\Q
+FE90:\^BEH\6
+FE91:\^BEH\2
+FE92:\^BEH MEDI\X
+FE93:\^TEH MARBUTA\Q
+FE94:\^TEH MARBUTA\6
+FE95:\^TEH\Q
+FE96:\^TEH\6
+FE97:\^TEH\2
+FE98:\^TEH MEDI\X
+FE99:\^THEH\Q
+FE9A:\^THEH\6
+FE9B:\^THEH\2
+FE9C:\^THEH MEDI\X
+FE9D:\^JEEM\Q
+FE9E:\^JEEM\6
+FE9F:\^JEEM\2
+FEA0:\^JEEM MEDI\X
+FEA1:\^HAH\Q
+FEA2:\^HAH\6
+FEA3:\^HAH\2
+FEA4:\^HAH MEDI\X
+FEA5:\^KHAH\Q
+FEA6:\^KHAH\6
+FEA7:\^KHAH\2
+FEA8:\^KHAH MEDI\X
+FEA9:\^DAL\Q
+FEAA:\^DAL\6
+FEAB:\^THAL\Q
+FEAC:\^THAL\6
+FEAD:\^REH\Q
+FEAE:\^REH\6
+FEAF:\^ZAIN\Q
+FEB0:\^ZAIN\6
+FEB1:\^SEEN\Q
+FEB2:\^SEEN\6
+FEB3:\^SEEN\2
+FEB4:\^SEEN MEDI\X
+FEB5:\^SHEEN\Q
+FEB6:\^SHEEN\6
+FEB7:\^SHEEN\2
+FEB8:\^SHEEN MEDI\X
+FEB9:\^SAD\Q
+FEBA:\^SAD\6
+FEBB:\^SAD\2
+FEBC:\^SAD MEDI\X
+FEBD:\^DAD\Q
+FEBE:\^DAD\6
+FEBF:\^DAD\2
+FEC0:\^DAD MEDI\X
+FEC1:\^TAH\Q
+FEC2:\^TAH\6
+FEC3:\^TAH\2
+FEC4:\^TAH MEDI\X
+FEC5:\^ZAH\Q
+FEC6:\^ZAH\6
+FEC7:\^ZAH\2
+FEC8:\^ZAH MEDI\X
+FEC9:\^AIN\Q
+FECA:\^AIN\6
+FECB:\^AIN\2
+FECC:\^AIN MEDI\X
+FECD:\^GHAIN\Q
+FECE:\^GHAIN\6
+FECF:\^GHAIN\2
+FED0:\^GHAIN MEDI\X
+FED1:\^FEH\Q
+FED2:\^FEH\6
+FED3:\^FEH\2
+FED4:\^FEH MEDI\X
+FED5:\^QAF\Q
+FED6:\^QAF\6
+FED7:\^QAF\2
+FED8:\^QAF MEDI\X
+FED9:\^KAF\Q
+FEDA:\^KAF\6
+FEDB:\^KAF\2
+FEDC:\^KAF MEDI\X
+FEDD:\^LAM\Q
+FEDE:\^LAM\6
+FEDF:\^LAM\2
+FEE0:\^LAM MEDI\X
+FEE1:\^MEEM\Q
+FEE2:\^MEEM\6
+FEE3:\^MEEM\2
+FEE4:\^MEEM MEDI\X
+FEE5:\^NOON\Q
+FEE6:\^NOON\6
+FEE7:\^NOON\2
+FEE8:\^NOON MEDI\X
+FEE9:\^HEH\Q
+FEEA:\^HEH\6
+FEEB:\^HEH\2
+FEEC:\^HEH MEDI\X
+FEED:\^WAW\Q
+FEEE:\^WAW\6
+FEEF:\^ALEF MAKSURA\Q
+FEF0:\^ALEF MAKSURA\6
+FEF1:\^YEH\Q
+FEF2:\^YEH\6
+FEF3:\^YEH\2
+FEF4:\^YEH MEDI\X
+FEF5:\JLAM\HALEF\HMADDA\p\Q
+FEF6:\JLAM\HALEF\HMADDA\p\6
+FEF7:\JLAM\HALEF\HHAMZA\p\Q
+FEF8:\JLAM\HALEF\HHAMZA\p\6
+FEF9:\JLAM\HALEF\HHAMZA\…\Q
+FEFA:\JLAM\HALEF\HHAMZA\…\6
+FEFB:\JLAM\HALEF\Q
+FEFC:\JLAM\HALEF\6
+FEFF:ZERO WIDTH NO-BREAK SPACE
+FF01:\†EXCLAM\”\¥
+FF02:\†QUOT\”\¥
+FF03:\†\­SIGN
+FF04:\†DOLLAR\‚
+FF05:\†PERCENT\‚
+FF06:\†AMPERSAND
+FF07:\†APOSTROPHE
+FF08:\†\‰ \ÑS
+FF09:\†\ù\ÑS
+FF0A:\†ASTERISK
+FF0B:\†PLUS\‚
+FF0C:\†COMMA
+FF0D:\†HYPHEN-MINUS
+FF0E:\†FULL STOP
+FF0F:\†SOLIDUS
+FF10:\†DIGIT ZERO
+FF11:\†DIGIT ONE
+FF12:\†DIGIT TWO
+FF13:\†DIGIT THREE
+FF14:\†DIGIT FOUR
+FF15:\†DIGIT FIVE
+FF16:\†DIGIT SIX
+FF17:\†DIGIT SEVEN
+FF18:\†DIGIT E\¼
+FF19:\†DIGIT NINE
+FF1A:\†COLON
+FF1B:\†SEMICOLON
+FF1C:\†\µ\‚
+FF1D:\†EQUALS\‚
+FF1E:\†\’\‚
+FF1F:\†QUESTION\¥
+FF20:\†COMMERCIAL AT
+FF21:\†\PA
+FF22:\†\PB
+FF23:\†\PC
+FF24:\†\PD
+FF25:\†\PE
+FF26:\†\PF
+FF27:\†\PG
+FF28:\†\PH
+FF29:\†\PI
+FF2A:\†\PJ
+FF2B:\†\PK
+FF2C:\†\PL
+FF2D:\†\PM
+FF2E:\†\PN
+FF2F:\†\PO
+FF30:\†\PP
+FF31:\†\PQ
+FF32:\†\PR
+FF33:\†\PS
+FF34:\†\PT
+FF35:\†\PU
+FF36:\†\PV
+FF37:\†\PW
+FF38:\†\PX
+FF39:\†\PY
+FF3A:\†\PZ
+FF3B:\†\‰ \r\–
+FF3C:\†REVERSE SOLIDUS
+FF3D:\†\ù\r\–
+FF3E:\†CIRCUMFLEX\×
+FF3F:\†LOW \ä
+FF40:\†GRAVE\×
+FF41:\†\LA
+FF42:\†\LB
+FF43:\†\LC
+FF44:\†\LD
+FF45:\†\LE
+FF46:\†\LF
+FF47:\†\LG
+FF48:\†\LH
+FF49:\†\LI
+FF4A:\†\LJ
+FF4B:\†\LK
+FF4C:\†\LL
+FF4D:\†\LM
+FF4E:\†\LN
+FF4F:\†\LO
+FF50:\†\LP
+FF51:\†\LQ
+FF52:\†\LR
+FF53:\†\LS
+FF54:\†\LT
+FF55:\†\LU
+FF56:\†\LV
+FF57:\†\LW
+FF58:\†\LX
+FF59:\†\LY
+FF5A:\†\LZ
+FF5B:\†\‰ CURLY \–
+FF5C:\†\€ \ä
+FF5D:\†\ùCURLY \–
+FF5E:\†\æ
+FF5F:\†\‰ \¦\ÑS
+FF60:\†\ù\¦\ÑS
+FF61:\4\8IC\é
+FF62:\4\‰ CORNER \–
+FF63:\4\ùCORNER \–
+FF64:\4\8IC COMMA
+FF65:\4\n MIDDLE DOT
+FF66:\4\ÍWO
+FF67:\4\Í\§A
+FF68:\4\Í\§I
+FF69:\4\Í\§U
+FF6A:\4\Í\§E
+FF6B:\4\Í\§O
+FF6C:\4\Í\§YA
+FF6D:\4\Í\§YU
+FF6E:\4\Í\§YO
+FF6F:\4\Í\§TU
+FF70:\4\n-HIRAGANA PROLONG\ÂSOUND\¥
+FF71:\4\ÍA
+FF72:\4\ÍI
+FF73:\4\ÍU
+FF74:\4\ÍE
+FF75:\4\ÍO
+FF76:\4\ÍKA
+FF77:\4\ÍKI
+FF78:\4\ÍKU
+FF79:\4\ÍKE
+FF7A:\4\ÍKO
+FF7B:\4\ÍSA
+FF7C:\4\ÍSI
+FF7D:\4\ÍSU
+FF7E:\4\ÍSE
+FF7F:\4\ÍSO
+FF80:\4\ÍTA
+FF81:\4\ÍTI
+FF82:\4\ÍTU
+FF83:\4\ÍTE
+FF84:\4\ÍTO
+FF85:\4\ÍNA
+FF86:\4\ÍNI
+FF87:\4\ÍNU
+FF88:\4\ÍNE
+FF89:\4\ÍNO
+FF8A:\4\ÍHA
+FF8B:\4\ÍHI
+FF8C:\4\ÍHU
+FF8D:\4\ÍHE
+FF8E:\4\ÍHO
+FF8F:\4\ÍMA
+FF90:\4\ÍMI
+FF91:\4\ÍMU
+FF92:\4\ÍME
+FF93:\4\ÍMO
+FF94:\4\ÍYA
+FF95:\4\ÍYU
+FF96:\4\ÍYO
+FF97:\4\ÍRA
+FF98:\4\ÍRI
+FF99:\4\ÍRU
+FF9A:\4\ÍRE
+FF9B:\4\ÍRO
+FF9C:\4\ÍWA
+FF9D:\4\ÍN
+FF9E:\4\n VOIC\ÂSOUND\¥
+FF9F:\4\n SEMI-VOIC\ÂSOUND\¥
+FFA0:\4\e FILLER
+FFA1:\4\ÖKIYEOK
+FFA2:\4\ÖSSANGKIYEOK
+FFA3:\4\ÖKIYEOK-SIOS
+FFA4:\4\ÖN\ÆN
+FFA5:\4\ÖN\ÆN-C\ÆC
+FFA6:\4\ÖN\ÆN-H\ÆH
+FFA7:\4\ÖTIKEUT
+FFA8:\4\ÖSSANGTIKEUT
+FFA9:\4\ÖR\ÆL
+FFAA:\4\ÖR\ÆL-KIYEOK
+FFAB:\4\ÖR\ÆL-M\ÆM
+FFAC:\4\ÖR\ÆL-P\ÆP
+FFAD:\4\ÖR\ÆL-SIOS
+FFAE:\4\ÖR\ÆL-TH\ÆTH
+FFAF:\4\ÖR\ÆL-PH\ÆPH
+FFB0:\4\ÖR\ÆL-H\ÆH
+FFB1:\4\ÖM\ÆM
+FFB2:\4\ÖP\ÆP
+FFB3:\4\ÖSSANGP\ÆP
+FFB4:\4\ÖP\ÆP-SIOS
+FFB5:\4\ÖSIOS
+FFB6:\4\ÖSSANGSIOS
+FFB7:\4\Ö\ÆNG
+FFB8:\4\ÖC\ÆC
+FFB9:\4\ÖSSANGC\ÆC
+FFBA:\4\ÖCH\ÆCH
+FFBB:\4\ÖKH\ÆKH
+FFBC:\4\ÖTH\ÆTH
+FFBD:\4\ÖPH\ÆPH
+FFBE:\4\ÖH\ÆH
+FFC2:\4\ÖA
+FFC3:\4\ÖAE
+FFC4:\4\ÖYA
+FFC5:\4\ÖYAE
+FFC6:\4\ÖEO
+FFC7:\4\ÖE
+FFCA:\4\ÖYEO
+FFCB:\4\ÖYE
+FFCC:\4\ÖO
+FFCD:\4\ÖWA
+FFCE:\4\ÖWAE
+FFCF:\4\ÖOE
+FFD2:\4\ÖYO
+FFD3:\4\ÖU
+FFD4:\4\ÖWEO
+FFD5:\4\ÖWE
+FFD6:\4\ÖWI
+FFD7:\4\ÖYU
+FFDA:\4\ÖEU
+FFDB:\4\ÖYI
+FFDC:\4\ÖI
+FFE0:\†CENT\‚
+FFE1:\†POUND\‚
+FFE2:\†NOT\‚
+FFE3:\†\å
+FFE4:\†BROKEN\ì
+FFE5:\†YEN\‚
+FFE6:\†WON\‚
+FFE8:\4FORMS L\¼ \€
+FFE9:\4\‰\Š\u
+FFEA:\4UP\Š\u
+FFEB:\4\Ù
+FFEC:\4\Ë\Š\u
+FFED:\4\¬ \ý
+FFEE:\4\¦\Ð
+FFF9:INTER\äAR ANNOT\” ANCHOR
+FFFA:INTER\äAR ANNOT\” SEPARATOR
+FFFB:INTER\äAR ANNOT\” TERMINATOR
+FFFC:OBJECT REPLACEMENT CHARACTER
+FFFD:REPLACEMENT CHARACTER
+10300:OLD \f\@A
+10301:OLD \f\@BE
+10302:OLD \f\@KE
+10303:OLD \f\@DE
+10304:OLD \f\@E
+10305:OLD \f\@VE
+10306:OLD \f\@ZE
+10307:OLD \f\@HE
+10308:OLD \f\@THE
+10309:OLD \f\@I
+1030A:OLD \f\@KA
+1030B:OLD \f\@EL
+1030C:OLD \f\@EM
+1030D:OLD \f\@EN
+1030E:OLD \f\@ESH
+1030F:OLD \f\@O
+10310:OLD \f\@PE
+10311:OLD \f\@SHE
+10312:OLD \f\@KU
+10313:OLD \f\@ER
+10314:OLD \f\@ES
+10315:OLD \f\@TE
+10316:OLD \f\@U
+10317:OLD \f\@EKS
+10318:OLD \f\@PHE
+10319:OLD \f\@KHE
+1031A:OLD \f\@EF
+1031B:OLD \f\@ERS
+1031C:OLD \f\@CHE
+1031D:OLD \f\@II
+1031E:OLD \f\@UU
+10320:OLD \f NUMERAL ONE
+10321:OLD \f NUMERAL FIVE
+10322:OLD \f NUMERAL TEN
+10323:OLD \f NUMERAL FIFTY
+10330:GOTHIC\@AHSA
+10331:GOTHIC\@BAIRKAN
+10332:GOTHIC\@GIBA
+10333:GOTHIC\@DAGS
+10334:GOTHIC\@AIHVUS
+10335:GOTHIC\@QAIRTHRA
+10336:GOTHIC\@IUJA
+10337:GOTHIC\@HAGL
+10338:GOTHIC\@THIUTH
+10339:GOTHIC\@EIS
+1033A:GOTHIC\@KUSMA
+1033B:GOTHIC\@LAGUS
+1033C:GOTHIC\@MANNA
+1033D:GOTHIC\@NAUTHS
+1033E:GOTHIC\@JER
+1033F:GOTHIC\@URUS
+10340:GOTHIC\@PAIRTHRA
+10341:GOTHIC\@NINETY
+10342:GOTHIC\@RAIDA
+10343:GOTHIC\@SAUIL
+10344:GOTHIC\@TEIWS
+10345:GOTHIC\@WINJA
+10346:GOTHIC\@FAIHU
+10347:GOTHIC\@IGGWS
+10348:GOTHIC\@HWAIR
+10349:GOTHIC\@OTHAL
+1034A:GOTHIC\@NINE HUNDRED
+10400:\¿\ãLONG I
+10401:\¿\ãLONG E
+10402:\¿\ãLONG A
+10403:\¿\ãLONG AH
+10404:\¿\ãLONG O
+10405:\¿\ãLONG OO
+10406:\¿\ãSHORT I
+10407:\¿\ãSHORT E
+10408:\¿\ãSHORT A
+10409:\¿\ãSHORT AH
+1040A:\¿\ãSHORT O
+1040B:\¿\ãSHORT OO
+1040C:\¿\ãAY
+1040D:\¿\ãOW
+1040E:\¿\ãWU
+1040F:\¿\ãYEE
+10410:\¿\ãH
+10411:\¿\ãPEE
+10412:\¿\ãBEE
+10413:\¿\ãTEE
+10414:\¿\ãDEE
+10415:\¿\ãCHEE
+10416:\¿\ãJEE
+10417:\¿\ãKAY
+10418:\¿\ãGAY
+10419:\¿\ãEF
+1041A:\¿\ãVEE
+1041B:\¿\ãETH
+1041C:\¿\ãTHEE
+1041D:\¿\ãES
+1041E:\¿\ãZEE
+1041F:\¿\ãESH
+10420:\¿\ãZHEE
+10421:\¿\ãER
+10422:\¿\ãEL
+10423:\¿\ãEM
+10424:\¿\ãEN
+10425:\¿\ãENG
+10428:\¿\N\@LONG I
+10429:\¿\N\@LONG E
+1042A:\¿\N\@LONG A
+1042B:\¿\N\@LONG AH
+1042C:\¿\N\@LONG O
+1042D:\¿\N\@LONG OO
+1042E:\¿\N\@SHORT I
+1042F:\¿\N\@SHORT E
+10430:\¿\N\@SHORT A
+10431:\¿\N\@SHORT AH
+10432:\¿\N\@SHORT O
+10433:\¿\N\@SHORT OO
+10434:\¿\N\@AY
+10435:\¿\N\@OW
+10436:\¿\N\@WU
+10437:\¿\N\@YEE
+10438:\¿\N\@H
+10439:\¿\N\@PEE
+1043A:\¿\N\@BEE
+1043B:\¿\N\@TEE
+1043C:\¿\N\@DEE
+1043D:\¿\N\@CHEE
+1043E:\¿\N\@JEE
+1043F:\¿\N\@KAY
+10440:\¿\N\@GAY
+10441:\¿\N\@EF
+10442:\¿\N\@VEE
+10443:\¿\N\@ETH
+10444:\¿\N\@THEE
+10445:\¿\N\@ES
+10446:\¿\N\@ZEE
+10447:\¿\N\@ESH
+10448:\¿\N\@ZHEE
+10449:\¿\N\@ER
+1044A:\¿\N\@EL
+1044B:\¿\N\@EM
+1044C:\¿\N\@EN
+1044D:\¿\N\@ENG
+1D000:\YPSILI
+1D001:\YDASEIA
+1D002:\Y\´
+1D003:\YOXEIA EKFONITIKON
+1D004:\YOXEIA DIPLI
+1D005:\YVAREIA EKFONITIKON
+1D006:\YVAREIA DIPLI
+1D007:\YKATHISTI
+1D008:\YSYRMATIKI
+1D009:\YPARAKLITIKI
+1D00A:\YYPOKRISIS
+1D00B:\YYPOKRISIS DIPLI
+1D00C:\YKREMASTI
+1D00D:\YAPESO EKFONITIKON
+1D00E:\YEXO EKFONITIKON
+1D00F:\YTELEIA
+1D010:\YKENTIMATA
+1D011:\YAPOSTROFOS
+1D012:\YAPOSTROFOS DIPLI
+1D013:\YSYNEVMA
+1D014:\YTHITA
+1D015:\YOLIGON ARCHAION
+1D016:\YGORGON ARCHAION
+1D017:\Y\É
+1D018:\YCHAMILON
+1D019:\YVATHY
+1D01A:\YISON ARCHAION
+1D01B:\YKENTIMA ARCHAION
+1D01C:\YKENTIMATA ARCHAION
+1D01D:\YSAXIMATA
+1D01E:\YPARICHON
+1D01F:\YSTAVROS APODEXIA
+1D020:\YOXEIAI ARCHAION
+1D021:\YVAREIAI ARCHAION
+1D022:\YAPODERMA ARCHAION
+1D023:\YAPOTHEMA
+1D024:\YKLASMA
+1D025:\YREVMA
+1D026:\YPIASMA ARCHAION
+1D027:\YTINAGMA
+1D028:\YANATRICHISMA
+1D029:\YSEISMA
+1D02A:\YSYNAGMA ARCHAION
+1D02B:\YSYNAGMA META STAVROU
+1D02C:\YOYRANISMA ARCHAION
+1D02D:\YTHEMA
+1D02E:\YLEMOI
+1D02F:\YDYO
+1D030:\YTRIA
+1D031:\YTESSERA
+1D032:\YKRATIMATA
+1D033:\YAPESO EXO NEO
+1D034:\YFTHORA ARCHAION
+1D035:\YIMIFTHORA
+1D036:\YTROMIKON ARCHAION
+1D037:\YKATAVA TROMIKON
+1D038:\YPELASTON
+1D039:\YPSIFISTON
+1D03A:\YKONTEVMA
+1D03B:\YCHOREVMA ARCHAION
+1D03C:\YRAPISMA
+1D03D:\YPARAKALESMA ARCHAION
+1D03E:\YPARAKLITIKI ARCHAION
+1D03F:\YICHADIN
+1D040:\YNANA
+1D041:\YPETASMA
+1D042:\YKONTEVMA ALLO
+1D043:\YTROMIKON ALLO
+1D044:\YSTRAGGISMATA
+1D045:\YGRONTHISMATA
+1D046:\YISON NEO
+1D047:\YOLIGON NEO
+1D048:\YOXEIA NEO
+1D049:\YPETASTI
+1D04A:\YKOUFISMA
+1D04B:\YPETASTOKOUFISMA
+1D04C:\YKRATIMOKOUFISMA
+1D04D:\YPELASTON NEO
+1D04E:\YKENTIMATA NEO ANO
+1D04F:\YKENTIMA NEO ANO
+1D050:\YYPSILI
+1D051:\YAPOSTROFOS NEO
+1D052:\YAPOSTROFOI SYNDESMOS NEO
+1D053:\YYPORROI
+1D054:\YKRATIMOYPORROON
+1D055:\YELAFRON
+1D056:\YCHAMILI
+1D057:\YMIKRON ISON
+1D058:\YVAREIA NEO
+1D059:\YPIASMA NEO
+1D05A:\YPSIFISTON NEO
+1D05B:\YOMALON
+1D05C:\YANTIKENOMA
+1D05D:\YLYGISMA
+1D05E:\YPARAKLITIKI NEO
+1D05F:\YPARAKALESMA NEO
+1D060:\YETERON PARAKALESMA
+1D061:\YKYLISMA
+1D062:\YANTIKENOKYLISMA
+1D063:\YTROMIKON NEO
+1D064:\YEKSTREPTON
+1D065:\YSYNAGMA NEO
+1D066:\YSYRMA
+1D067:\YCHOREVMA NEO
+1D068:\YEPEGERMA
+1D069:\YSEISMA NEO
+1D06A:\YXIRON KLASMA
+1D06B:\YTROMIKOPSIFISTON
+1D06C:\YPSIFISTOLYGISMA
+1D06D:\YTROMIKOLYGISMA
+1D06E:\YTROMIKOPARAKALESMA
+1D06F:\YPSIFISTOPARAKALESMA
+1D070:\YTROMIKOSYNAGMA
+1D071:\YPSIFISTOSYNAGMA
+1D072:\YGORGOSYNTHETON
+1D073:\YARGOSYNTHETON
+1D074:\YETERON ARGOSYNTHETON
+1D075:\YOYRANISMA NEO
+1D076:\YTHEMATISMOS ESO
+1D077:\YTHEMATISMOS EXO
+1D078:\YTHEMA APLOUN
+1D079:\YTHES KAI APOTHES
+1D07A:\YKATAVASMA
+1D07B:\YENDOFONON
+1D07C:\YYFEN KATO
+1D07D:\YYFEN ANO
+1D07E:\YSTAVROS
+1D07F:\YKLASMA ANO
+1D080:\YDIPLI ARCHAION
+1D081:\YKRATIMA ARCHAION
+1D082:\YKRATIMA ALLO
+1D083:\YKRATIMA NEO
+1D084:\YAPODERMA NEO
+1D085:\YAPLI
+1D086:\YDIPLI
+1D087:\YTRIPLI
+1D088:\YTETRAPLI
+1D089:\YKORONIS
+1D08A:\YLEIMMA ENOS CHRONOU
+1D08B:\YLEIMMA DYO CHRONON
+1D08C:\YLEIMMA TRION CHRONON
+1D08D:\YLEIMMA TESSARON CHRONON
+1D08E:\YLEIMMA IMISEOS CHRONOU
+1D08F:\YGORGON NEO ANO
+1D090:\YGORGON PARESTIGMENON ARISTERA
+1D091:\YGORGON PARESTIGMENON DEXIA
+1D092:\YDIGORGON
+1D093:\YDIGORGON PARESTIGMENON ARISTERA KATO
+1D094:\YDIGORGON PARESTIGMENON ARISTERA ANO
+1D095:\YDIGORGON PARESTIGMENON DEXIA
+1D096:\YTRIGORGON
+1D097:\YARGON
+1D098:\YIMIDIARGON
+1D099:\YDIARGON
+1D09A:\YAGOGI POLI ARGI
+1D09B:\YAGOGI ARGOTERI
+1D09C:\YAGOGI ARGI
+1D09D:\YAGOGI METRIA
+1D09E:\YAGOGI MESI
+1D09F:\YAGOGI GORGI
+1D0A0:\YAGOGI GORGOTERI
+1D0A1:\YAGOGI POLI GORGI
+1D0A2:\YMARTYRIA PROTOS ICHOS
+1D0A3:\YMARTYRIA ALLI PROTOS ICHOS
+1D0A4:\YMARTYRIA DEYTEROS ICHOS
+1D0A5:\YMARTYRIA ALLI DEYTEROS ICHOS
+1D0A6:\YMARTYRIA TRITOS ICHOS
+1D0A7:\YMARTYRIA TRIFONIAS
+1D0A8:\YMARTYRIA TETARTOS ICHOS
+1D0A9:\YMARTYRIA TETARTOS LEGETOS ICHOS
+1D0AA:\YMARTYRIA LEGETOS ICHOS
+1D0AB:\YMARTYRIA PLAGIOS ICHOS
+1D0AC:\YISAKIA TELOUS ICHIMATOS
+1D0AD:\YAPOSTROFOI TELOUS ICHIMATOS
+1D0AE:\YFANEROSIS TETRAFONIAS
+1D0AF:\YFANEROSIS MONOFONIAS
+1D0B0:\YFANEROSIS DIFONIAS
+1D0B1:\YMARTYRIA VARYS ICHOS
+1D0B2:\YMARTYRIA PROTOVARYS ICHOS
+1D0B3:\YMARTYRIA PLAGIOS TETARTOS ICHOS
+1D0B4:\YGORTHMIKON N APLOUN
+1D0B5:\YGORTHMIKON N DIPLOUN
+1D0B6:\YENARXIS KAI FTHORA VOU
+1D0B7:\YIMIFONON
+1D0B8:\YIMIFTHORON
+1D0B9:\YFTHORA ARCHAION DEYTEROU ICHOU
+1D0BA:\YFTHORA DIATONIKI PA
+1D0BB:\YFTHORA DIATONIKI NANA
+1D0BC:\YFTHORA NAOS ICHOS
+1D0BD:\YFTHORA DIATONIKI DI
+1D0BE:\YFTHORA SKLIRON DIATONON DI
+1D0BF:\YFTHORA DIATONIKI KE
+1D0C0:\YFTHORA DIATONIKI ZO
+1D0C1:\YFTHORA DIATONIKI NI KATO
+1D0C2:\YFTHORA DIATONIKI NI ANO
+1D0C3:\YFTHORA MALAKON CHROMA DIFONIAS
+1D0C4:\YFTHORA MALAKON CHROMA MONOFONIAS
+1D0C5:\YFHTORA SKLIRON CHROMA VASIS
+1D0C6:\YFTHORA SKLIRON CHROMA SYNAFI
+1D0C7:\YFTHORA NENANO
+1D0C8:\YCHROA ZYGOS
+1D0C9:\YCHROA KLITON
+1D0CA:\YCHROA SPATHI
+1D0CB:\YFTHORA I YFESIS TETARTIMORION
+1D0CC:\YFTHORA ENARMONIOS ANTIFONIA
+1D0CD:\YYFESIS TRITIMORION
+1D0CE:\YDIESIS TRITIMORION
+1D0CF:\YDIESIS TETARTIMORION
+1D0D0:\YDIESIS APLI DYO DODEKATA
+1D0D1:\YDIESIS MONOGRAMMOS TESSERA DODEKATA
+1D0D2:\YDIESIS DIGRAMMOS EX DODEKATA
+1D0D3:\YDIESIS TRIGRAMMOS OKTO DODEKATA
+1D0D4:\YYFESIS APLI DYO DODEKATA
+1D0D5:\YYFESIS MONOGRAMMOS TESSERA DODEKATA
+1D0D6:\YYFESIS DIGRAMMOS EX DODEKATA
+1D0D7:\YYFESIS TRIGRAMMOS OKTO DODEKATA
+1D0D8:\YGENIKI DIESIS
+1D0D9:\YGENIKI YFESIS
+1D0DA:\YDIASTOLI APLI MIKRI
+1D0DB:\YDIASTOLI APLI MEGALI
+1D0DC:\YDIASTOLI DIPLI
+1D0DD:\YDIASTOLI THESEOS
+1D0DE:\YSIMANSIS THESEOS
+1D0DF:\YSIMANSIS THESEOS DISIMOU
+1D0E0:\YSIMANSIS THESEOS TRISIMOU
+1D0E1:\YSIMANSIS THESEOS TETRASIMOU
+1D0E2:\YSIMANSIS ARSEOS
+1D0E3:\YSIMANSIS ARSEOS DISIMOU
+1D0E4:\YSIMANSIS ARSEOS TRISIMOU
+1D0E5:\YSIMANSIS ARSEOS TETRASIMOU
+1D0E6:\YDIGRAMMA GG
+1D0E7:\YDIFTOGGOS OU
+1D0E8:\YSTIGMA
+1D0E9:\YARKTIKO PA
+1D0EA:\YARKTIKO VOU
+1D0EB:\YARKTIKO GA
+1D0EC:\YARKTIKO DI
+1D0ED:\YARKTIKO KE
+1D0EE:\YARKTIKO ZO
+1D0EF:\YARKTIKO NI
+1D0F0:\YKENTIMATA NEO MESO
+1D0F1:\YKENTIMA NEO MESO
+1D0F2:\YKENTIMATA NEO KATO
+1D0F3:\YKENTIMA NEO KATO
+1D0F4:\YKLASMA KATO
+1D0F5:\YGORGON NEO KATO
+1D100:\KS\ôLE\ì\ä
+1D101:\K\0\ì\ä
+1D102:\KFINAL\ì\ä
+1D103:\KREVERSE FINAL\ì\ä
+1D104:\KDASHED\ì\ä
+1D105:\KSHORT\ì\ä
+1D106:\K\‰ REPEAT\‚
+1D107:\K\ùREPEAT\‚
+1D108:\KREPEAT DOTS
+1D109:\KDAL SEGNO
+1D10A:\KDA CAPO
+1D10B:\KSEGNO
+1D10C:\KCODA
+1D10D:\KREPEAT\ÂFIGURE-1
+1D10E:\KREPEAT\ÂFIGURE-2
+1D10F:\KREPEAT\ÂFIGURE-3
+1D110:\KFERMATA
+1D111:\KFERMATA\…
+1D112:\KBREATH\¥
+1D113:\KCAESURA
+1D114:\KBRACE
+1D115:\K\–
+1D116:\KONE-\ä STAFF
+1D117:\KTWO-\ä STAFF
+1D118:\KTHREE-\ä STAFF
+1D119:\KFOUR-\ä STAFF
+1D11A:\KFIVE-\ä STAFF
+1D11B:\KSIX-\ä STAFF
+1D11C:\KSIX-STR\ô FRETBOARD
+1D11D:\KFOUR-STR\ô FRETBOARD
+1D11E:\KG CLEF
+1D11F:\KG CLEF OTTAVA ALTA
+1D120:\KG CLEF OTTAVA BASSA
+1D121:\KC CLEF
+1D122:\KF CLEF
+1D123:\KF CLEF OTTAVA ALTA
+1D124:\KF CLEF OTTAVA BASSA
+1D125:\KDRUM CLEF-1
+1D126:\KDRUM CLEF-2
+1D12A:\K\0 SHARP
+1D12B:\K\0 FLAT
+1D12C:\KFLAT UP
+1D12D:\KFLAT \Ë
+1D12E:\KNATURAL UP
+1D12F:\KNATURAL \Ë
+1D130:\KSHARP UP
+1D131:\KSHARP \Ë
+1D132:\KQUARTER TONE SHARP
+1D133:\KQUARTER TONE FLAT
+1D134:\KCOMMON TIME
+1D135:\KCUT TIME
+1D136:\KOTTAVA ALTA
+1D137:\KOTTAVA BASSA
+1D138:\KQUINDICESIMA ALTA
+1D139:\KQUINDICESIMA BASSA
+1D13A:\KMULTI REST
+1D13B:\KWHOLE REST
+1D13C:\KHALF REST
+1D13D:\KQUARTER REST
+1D13E:\KE\¼H REST
+1D13F:\KSIXTEENTH REST
+1D140:\KTHIRTY-SECOND REST
+1D141:\KSIXTY-FOURTH REST
+1D142:\KONE HUNDR\ÂTWENTY-E\¼H REST
+1D143:\KX NOTEHEAD
+1D144:\KPLUS NOTEHEAD
+1D145:\K\Ð X NOTEHEAD
+1D146:\K\rNOTEHEAD WHITE
+1D147:\K\rNOTEHEAD \¬
+1D148:\K\¾ NOTEHEAD UP WHITE
+1D149:\K\¾ NOTEHEAD UP \¬
+1D14A:\K\¾ NOTEHEAD \‰ WHITE
+1D14B:\K\¾ NOTEHEAD \‰ \¬
+1D14C:\K\¾ NOTEHEAD \ùWHITE
+1D14D:\K\¾ NOTEHEAD \ù\¬
+1D14E:\K\¾ NOTEHEAD \Ë WHITE
+1D14F:\K\¾ NOTEHEAD \Ë \¬
+1D150:\K\¾ NOTEHEAD UP \ùWHITE
+1D151:\K\¾ NOTEHEAD UP \ù\¬
+1D152:\KMOON NOTEHEAD WHITE
+1D153:\KMOON NOTEHEAD \¬
+1D154:\K\¾-ROUND NOTEHEAD \Ë WHITE
+1D155:\K\¾-ROUND NOTEHEAD \Ë \¬
+1D156:\K\ÑS NOTEHEAD
+1D157:\KVOID NOTEHEAD
+1D158:\KNOTEHEAD \¬
+1D159:\KNULL NOTEHEAD
+1D15A:\KCLUSTER NOTEHEAD WHITE
+1D15B:\KCLUSTER NOTEHEAD \¬
+1D15C:\KBREVE
+1D15D:\KWHOLE NOTE
+1D15E:\KHALF NOTE
+1D15F:\KQUARTER NOTE
+1D160:\KE\¼H NOTE
+1D161:\KSIXTEENTH NOTE
+1D162:\KTHIRTY-SECOND NOTE
+1D163:\KSIXTY-FOURTH NOTE
+1D164:\KONE HUNDR\ÂTWENTY-E\¼H NOTE
+1D165:\K\oSTEM
+1D166:\K\oSPRECHGESANG STEM
+1D167:\K\oTREMOLO-1
+1D168:\K\oTREMOLO-2
+1D169:\K\oTREMOLO-3
+1D16A:\KF\ôER\ÂTREMOLO-1
+1D16B:\KF\ôER\ÂTREMOLO-2
+1D16C:\KF\ôER\ÂTREMOLO-3
+1D16D:\K\oAUGMENT\” DOT
+1D16E:\K\oFLAG-1
+1D16F:\K\oFLAG-2
+1D170:\K\oFLAG-3
+1D171:\K\oFLAG-4
+1D172:\K\oFLAG-5
+1D173:\KBEGIN BEAM
+1D174:\KEND BEAM
+1D175:\KBEGIN TIE
+1D176:\KEND TIE
+1D177:\KBEGIN SLUR
+1D178:\KEND SLUR
+1D179:\KBEGIN PHRASE
+1D17A:\KEND PHRASE
+1D17B:\K\oACCENT
+1D17C:\K\oSTACCATO
+1D17D:\K\oTENUTO
+1D17E:\K\oSTACCATISSIMO
+1D17F:\K\oMARCATO
+1D180:\K\oMARCATO-STACCATO
+1D181:\K\oACCENT-STACCATO
+1D182:\K\oLOURE
+1D183:\KARPEGGIATO UP
+1D184:\KARPEGGIATO \Ë
+1D185:\K\oDOIT
+1D186:\K\oRIP
+1D187:\K\oFLIP
+1D188:\K\oSMEAR
+1D189:\K\oBEND
+1D18A:\K\o\0 TONGUE
+1D18B:\K\oTRIPLE TONGUE
+1D18C:\KRINFORZANDO
+1D18D:\KSUBITO
+1D18E:\KZ
+1D18F:\KPIANO
+1D190:\KMEZZO
+1D191:\KFORTE
+1D192:\KCRESCENDO
+1D193:\KDECRESCENDO
+1D194:\KGRACE NOTE SLASH
+1D195:\KGRACE NOTE NO SLASH
+1D196:\KTR
+1D197:\KTURN
+1D198:\KINVERT\ÂTURN
+1D199:\KTURN SLASH
+1D19A:\KTURN UP
+1D19B:\KORNAMENT \Á-1
+1D19C:\KORNAMENT \Á-2
+1D19D:\KORNAMENT \Á-3
+1D19E:\KORNAMENT \Á-4
+1D19F:\KORNAMENT \Á-5
+1D1A0:\KORNAMENT \Á-6
+1D1A1:\KORNAMENT \Á-7
+1D1A2:\KORNAMENT \Á-8
+1D1A3:\KORNAMENT \Á-9
+1D1A4:\KORNAMENT \Á-10
+1D1A5:\KORNAMENT \Á-11
+1D1A6:\KHAUPTSTIMME
+1D1A7:\KNEBENSTIMME
+1D1A8:\KEND OF STIMME
+1D1A9:\KDEGREE SLASH
+1D1AA:\K\o\Ë BOW
+1D1AB:\K\oUP BOW
+1D1AC:\K\oHARMONIC
+1D1AD:\K\oSNAP PIZZICATO
+1D1AE:\KPEDAL\¥
+1D1AF:\KPEDAL UP\¥
+1D1B0:\KHALF PEDAL\¥
+1D1B1:\KGLISSANDO UP
+1D1B2:\KGLISSANDO \Ë
+1D1B3:\KWITH F\ôERNAILS
+1D1B4:\KDAMP
+1D1B5:\KDAMP ALL
+1D1B6:\KMAXIMA
+1D1B7:\KLONGA
+1D1B8:\KBREVIS
+1D1B9:\KSEMIBREVIS WHITE
+1D1BA:\KSEMIBREVIS \¬
+1D1BB:\KMINIMA
+1D1BC:\KMINIMA \¬
+1D1BD:\KSEMIMINIMA WHITE
+1D1BE:\KSEMIMINIMA \¬
+1D1BF:\KFUSA WHITE
+1D1C0:\KFUSA \¬
+1D1C1:\KLONGA PERFECTA REST
+1D1C2:\KLONGA IMPERFECTA REST
+1D1C3:\KBREVIS REST
+1D1C4:\KSEMIBREVIS REST
+1D1C5:\KMINIMA REST
+1D1C6:\KSEMIMINIMA REST
+1D1C7:\KTEMPUS PERFECTUM CUM PROL\”E PERFECTA
+1D1C8:\KTEMPUS PERFECTUM CUM PROL\”E IMPERFECTA
+1D1C9:\KTEMPUS PERFECTUM CUM PROL\”E PERFECTA DIMINUTION-1
+1D1CA:\KTEMPUS IMPERFECTUM CUM PROL\”E PERFECTA
+1D1CB:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA
+1D1CC:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA DIMINUTION-1
+1D1CD:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA DIMINUTION-2
+1D1CE:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA DIMINUTION-3
+1D1CF:\KCROIX
+1D1D0:\KGREGORIAN C CLEF
+1D1D1:\KGREGORIAN F CLEF
+1D1D2:\K\rB
+1D1D3:\KVIRGA
+1D1D4:\KPODATUS
+1D1D5:\KCLIVIS
+1D1D6:\KSCANDICUS
+1D1D7:\KCLIMACUS
+1D1D8:\KTORCULUS
+1D1D9:\KPORRECTUS
+1D1DA:\KPORRECTUS FLEXUS
+1D1DB:\KSCANDICUS FLEXUS
+1D1DC:\KTORCULUS RESUPINUS
+1D1DD:\KPES SUBPUNCTIS
+1D400:\îCAPITAL A
+1D401:\îCAPITAL B
+1D402:\îCAPITAL C
+1D403:\îCAPITAL D
+1D404:\îCAPITAL E
+1D405:\îCAPITAL F
+1D406:\îCAPITAL G
+1D407:\îCAPITAL H
+1D408:\îCAPITAL I
+1D409:\îCAPITAL J
+1D40A:\îCAPITAL K
+1D40B:\îCAPITAL L
+1D40C:\îCAPITAL M
+1D40D:\îCAPITAL N
+1D40E:\îCAPITAL O
+1D40F:\îCAPITAL P
+1D410:\îCAPITAL Q
+1D411:\îCAPITAL R
+1D412:\îCAPITAL S
+1D413:\îCAPITAL T
+1D414:\îCAPITAL U
+1D415:\îCAPITAL V
+1D416:\îCAPITAL W
+1D417:\îCAPITAL X
+1D418:\îCAPITAL Y
+1D419:\îCAPITAL Z
+1D41A:\î\§A
+1D41B:\î\§B
+1D41C:\î\§C
+1D41D:\î\§D
+1D41E:\î\§E
+1D41F:\î\§F
+1D420:\î\§G
+1D421:\î\§H
+1D422:\î\§I
+1D423:\î\§J
+1D424:\î\§K
+1D425:\î\§L
+1D426:\î\§M
+1D427:\î\§N
+1D428:\î\§O
+1D429:\î\§P
+1D42A:\î\§Q
+1D42B:\î\§R
+1D42C:\î\§S
+1D42D:\î\§T
+1D42E:\î\§U
+1D42F:\î\§V
+1D430:\î\§W
+1D431:\î\§X
+1D432:\î\§Y
+1D433:\î\§Z
+1D434:\E\›A
+1D435:\E\›B
+1D436:\E\›C
+1D437:\E\›D
+1D438:\E\›E
+1D439:\E\›F
+1D43A:\E\›G
+1D43B:\E\›H
+1D43C:\E\›I
+1D43D:\E\›J
+1D43E:\E\›K
+1D43F:\E\›L
+1D440:\E\›M
+1D441:\E\›N
+1D442:\E\›O
+1D443:\E\›P
+1D444:\E\›Q
+1D445:\E\›R
+1D446:\E\›S
+1D447:\E\›T
+1D448:\E\›U
+1D449:\E\›V
+1D44A:\E\›W
+1D44B:\E\›X
+1D44C:\E\›Y
+1D44D:\E\›Z
+1D44E:\E\—A
+1D44F:\E\—B
+1D450:\E\—C
+1D451:\E\—D
+1D452:\E\—E
+1D453:\E\—F
+1D454:\E\—G
+1D456:\E\—I
+1D457:\E\—J
+1D458:\E\—K
+1D459:\E\—L
+1D45A:\E\—M
+1D45B:\E\—N
+1D45C:\E\—O
+1D45D:\E\—P
+1D45E:\E\—Q
+1D45F:\E\—R
+1D460:\E\—S
+1D461:\E\—T
+1D462:\E\—U
+1D463:\E\—V
+1D464:\E\—W
+1D465:\E\—X
+1D466:\E\—Y
+1D467:\E\—Z
+1D468:\î\›A
+1D469:\î\›B
+1D46A:\î\›C
+1D46B:\î\›D
+1D46C:\î\›E
+1D46D:\î\›F
+1D46E:\î\›G
+1D46F:\î\›H
+1D470:\î\›I
+1D471:\î\›J
+1D472:\î\›K
+1D473:\î\›L
+1D474:\î\›M
+1D475:\î\›N
+1D476:\î\›O
+1D477:\î\›P
+1D478:\î\›Q
+1D479:\î\›R
+1D47A:\î\›S
+1D47B:\î\›T
+1D47C:\î\›U
+1D47D:\î\›V
+1D47E:\î\›W
+1D47F:\î\›X
+1D480:\î\›Y
+1D481:\î\›Z
+1D482:\î\—A
+1D483:\î\—B
+1D484:\î\—C
+1D485:\î\—D
+1D486:\î\—E
+1D487:\î\—F
+1D488:\î\—G
+1D489:\î\—H
+1D48A:\î\—I
+1D48B:\î\—J
+1D48C:\î\—K
+1D48D:\î\—L
+1D48E:\î\—M
+1D48F:\î\—N
+1D490:\î\—O
+1D491:\î\—P
+1D492:\î\—Q
+1D493:\î\—R
+1D494:\î\—S
+1D495:\î\—T
+1D496:\î\—U
+1D497:\î\—V
+1D498:\î\—W
+1D499:\î\—X
+1D49A:\î\—Y
+1D49B:\î\—Z
+1D49C:\E\Ž\ÒA
+1D49E:\E\Ž\ÒC
+1D49F:\E\Ž\ÒD
+1D4A2:\E\Ž\ÒG
+1D4A5:\E\Ž\ÒJ
+1D4A6:\E\Ž\ÒK
+1D4A9:\E\Ž\ÒN
+1D4AA:\E\Ž\ÒO
+1D4AB:\E\Ž\ÒP
+1D4AC:\E\Ž\ÒQ
+1D4AE:\E\Ž\ÒS
+1D4AF:\E\Ž\ÒT
+1D4B0:\E\Ž\ÒU
+1D4B1:\E\Ž\ÒV
+1D4B2:\E\Ž\ÒW
+1D4B3:\E\Ž\ÒX
+1D4B4:\E\Ž\ÒY
+1D4B5:\E\Ž\ÒZ
+1D4B6:\E\Ž\ÇA
+1D4B7:\E\Ž\ÇB
+1D4B8:\E\Ž\ÇC
+1D4B9:\E\Ž\ÇD
+1D4BB:\E\Ž\ÇF
+1D4BD:\E\Ž\ÇH
+1D4BE:\E\Ž\ÇI
+1D4BF:\E\Ž\ÇJ
+1D4C0:\E\Ž\ÇK
+1D4C2:\E\Ž\ÇM
+1D4C3:\E\Ž\ÇN
+1D4C5:\E\Ž\ÇP
+1D4C6:\E\Ž\ÇQ
+1D4C7:\E\Ž\ÇR
+1D4C8:\E\Ž\ÇS
+1D4C9:\E\Ž\ÇT
+1D4CA:\E\Ž\ÇU
+1D4CB:\E\Ž\ÇV
+1D4CC:\E\Ž\ÇW
+1D4CD:\E\Ž\ÇX
+1D4CE:\E\Ž\ÇY
+1D4CF:\E\Ž\ÇZ
+1D4D0:\î\Ž\ÒA
+1D4D1:\î\Ž\ÒB
+1D4D2:\î\Ž\ÒC
+1D4D3:\î\Ž\ÒD
+1D4D4:\î\Ž\ÒE
+1D4D5:\î\Ž\ÒF
+1D4D6:\î\Ž\ÒG
+1D4D7:\î\Ž\ÒH
+1D4D8:\î\Ž\ÒI
+1D4D9:\î\Ž\ÒJ
+1D4DA:\î\Ž\ÒK
+1D4DB:\î\Ž\ÒL
+1D4DC:\î\Ž\ÒM
+1D4DD:\î\Ž\ÒN
+1D4DE:\î\Ž\ÒO
+1D4DF:\î\Ž\ÒP
+1D4E0:\î\Ž\ÒQ
+1D4E1:\î\Ž\ÒR
+1D4E2:\î\Ž\ÒS
+1D4E3:\î\Ž\ÒT
+1D4E4:\î\Ž\ÒU
+1D4E5:\î\Ž\ÒV
+1D4E6:\î\Ž\ÒW
+1D4E7:\î\Ž\ÒX
+1D4E8:\î\Ž\ÒY
+1D4E9:\î\Ž\ÒZ
+1D4EA:\î\Ž\ÇA
+1D4EB:\î\Ž\ÇB
+1D4EC:\î\Ž\ÇC
+1D4ED:\î\Ž\ÇD
+1D4EE:\î\Ž\ÇE
+1D4EF:\î\Ž\ÇF
+1D4F0:\î\Ž\ÇG
+1D4F1:\î\Ž\ÇH
+1D4F2:\î\Ž\ÇI
+1D4F3:\î\Ž\ÇJ
+1D4F4:\î\Ž\ÇK
+1D4F5:\î\Ž\ÇL
+1D4F6:\î\Ž\ÇM
+1D4F7:\î\Ž\ÇN
+1D4F8:\î\Ž\ÇO
+1D4F9:\î\Ž\ÇP
+1D4FA:\î\Ž\ÇQ
+1D4FB:\î\Ž\ÇR
+1D4FC:\î\Ž\ÇS
+1D4FD:\î\Ž\ÇT
+1D4FE:\î\Ž\ÇU
+1D4FF:\î\Ž\ÇV
+1D500:\î\Ž\ÇW
+1D501:\î\Ž\ÇX
+1D502:\î\Ž\ÇY
+1D503:\î\Ž\ÇZ
+1D504:\E\£\ÒA
+1D505:\E\£\ÒB
+1D507:\E\£\ÒD
+1D508:\E\£\ÒE
+1D509:\E\£\ÒF
+1D50A:\E\£\ÒG
+1D50D:\E\£\ÒJ
+1D50E:\E\£\ÒK
+1D50F:\E\£\ÒL
+1D510:\E\£\ÒM
+1D511:\E\£\ÒN
+1D512:\E\£\ÒO
+1D513:\E\£\ÒP
+1D514:\E\£\ÒQ
+1D516:\E\£\ÒS
+1D517:\E\£\ÒT
+1D518:\E\£\ÒU
+1D519:\E\£\ÒV
+1D51A:\E\£\ÒW
+1D51B:\E\£\ÒX
+1D51C:\E\£\ÒY
+1D51E:\E\£\ÇA
+1D51F:\E\£\ÇB
+1D520:\E\£\ÇC
+1D521:\E\£\ÇD
+1D522:\E\£\ÇE
+1D523:\E\£\ÇF
+1D524:\E\£\ÇG
+1D525:\E\£\ÇH
+1D526:\E\£\ÇI
+1D527:\E\£\ÇJ
+1D528:\E\£\ÇK
+1D529:\E\£\ÇL
+1D52A:\E\£\ÇM
+1D52B:\E\£\ÇN
+1D52C:\E\£\ÇO
+1D52D:\E\£\ÇP
+1D52E:\E\£\ÇQ
+1D52F:\E\£\ÇR
+1D530:\E\£\ÇS
+1D531:\E\£\ÇT
+1D532:\E\£\ÇU
+1D533:\E\£\ÇV
+1D534:\E\£\ÇW
+1D535:\E\£\ÇX
+1D536:\E\£\ÇY
+1D537:\E\£\ÇZ
+1D538:\E\¤\ÒA
+1D539:\E\¤\ÒB
+1D53B:\E\¤\ÒD
+1D53C:\E\¤\ÒE
+1D53D:\E\¤\ÒF
+1D53E:\E\¤\ÒG
+1D540:\E\¤\ÒI
+1D541:\E\¤\ÒJ
+1D542:\E\¤\ÒK
+1D543:\E\¤\ÒL
+1D544:\E\¤\ÒM
+1D546:\E\¤\ÒO
+1D54A:\E\¤\ÒS
+1D54B:\E\¤\ÒT
+1D54C:\E\¤\ÒU
+1D54D:\E\¤\ÒV
+1D54E:\E\¤\ÒW
+1D54F:\E\¤\ÒX
+1D550:\E\¤\ÒY
+1D552:\E\¤\ÇA
+1D553:\E\¤\ÇB
+1D554:\E\¤\ÇC
+1D555:\E\¤\ÇD
+1D556:\E\¤\ÇE
+1D557:\E\¤\ÇF
+1D558:\E\¤\ÇG
+1D559:\E\¤\ÇH
+1D55A:\E\¤\ÇI
+1D55B:\E\¤\ÇJ
+1D55C:\E\¤\ÇK
+1D55D:\E\¤\ÇL
+1D55E:\E\¤\ÇM
+1D55F:\E\¤\ÇN
+1D560:\E\¤\ÇO
+1D561:\E\¤\ÇP
+1D562:\E\¤\ÇQ
+1D563:\E\¤\ÇR
+1D564:\E\¤\ÇS
+1D565:\E\¤\ÇT
+1D566:\E\¤\ÇU
+1D567:\E\¤\ÇV
+1D568:\E\¤\ÇW
+1D569:\E\¤\ÇX
+1D56A:\E\¤\ÇY
+1D56B:\E\¤\ÇZ
+1D56C:\î\£\ÒA
+1D56D:\î\£\ÒB
+1D56E:\î\£\ÒC
+1D56F:\î\£\ÒD
+1D570:\î\£\ÒE
+1D571:\î\£\ÒF
+1D572:\î\£\ÒG
+1D573:\î\£\ÒH
+1D574:\î\£\ÒI
+1D575:\î\£\ÒJ
+1D576:\î\£\ÒK
+1D577:\î\£\ÒL
+1D578:\î\£\ÒM
+1D579:\î\£\ÒN
+1D57A:\î\£\ÒO
+1D57B:\î\£\ÒP
+1D57C:\î\£\ÒQ
+1D57D:\î\£\ÒR
+1D57E:\î\£\ÒS
+1D57F:\î\£\ÒT
+1D580:\î\£\ÒU
+1D581:\î\£\ÒV
+1D582:\î\£\ÒW
+1D583:\î\£\ÒX
+1D584:\î\£\ÒY
+1D585:\î\£\ÒZ
+1D586:\î\£\ÇA
+1D587:\î\£\ÇB
+1D588:\î\£\ÇC
+1D589:\î\£\ÇD
+1D58A:\î\£\ÇE
+1D58B:\î\£\ÇF
+1D58C:\î\£\ÇG
+1D58D:\î\£\ÇH
+1D58E:\î\£\ÇI
+1D58F:\î\£\ÇJ
+1D590:\î\£\ÇK
+1D591:\î\£\ÇL
+1D592:\î\£\ÇM
+1D593:\î\£\ÇN
+1D594:\î\£\ÇO
+1D595:\î\£\ÇP
+1D596:\î\£\ÇQ
+1D597:\î\£\ÇR
+1D598:\î\£\ÇS
+1D599:\î\£\ÇT
+1D59A:\î\£\ÇU
+1D59B:\î\£\ÇV
+1D59C:\î\£\ÇW
+1D59D:\î\£\ÇX
+1D59E:\î\£\ÇY
+1D59F:\î\£\ÇZ
+1D5A0:\z\ÒA
+1D5A1:\z\ÒB
+1D5A2:\z\ÒC
+1D5A3:\z\ÒD
+1D5A4:\z\ÒE
+1D5A5:\z\ÒF
+1D5A6:\z\ÒG
+1D5A7:\z\ÒH
+1D5A8:\z\ÒI
+1D5A9:\z\ÒJ
+1D5AA:\z\ÒK
+1D5AB:\z\ÒL
+1D5AC:\z\ÒM
+1D5AD:\z\ÒN
+1D5AE:\z\ÒO
+1D5AF:\z\ÒP
+1D5B0:\z\ÒQ
+1D5B1:\z\ÒR
+1D5B2:\z\ÒS
+1D5B3:\z\ÒT
+1D5B4:\z\ÒU
+1D5B5:\z\ÒV
+1D5B6:\z\ÒW
+1D5B7:\z\ÒX
+1D5B8:\z\ÒY
+1D5B9:\z\ÒZ
+1D5BA:\z\ÇA
+1D5BB:\z\ÇB
+1D5BC:\z\ÇC
+1D5BD:\z\ÇD
+1D5BE:\z\ÇE
+1D5BF:\z\ÇF
+1D5C0:\z\ÇG
+1D5C1:\z\ÇH
+1D5C2:\z\ÇI
+1D5C3:\z\ÇJ
+1D5C4:\z\ÇK
+1D5C5:\z\ÇL
+1D5C6:\z\ÇM
+1D5C7:\z\ÇN
+1D5C8:\z\ÇO
+1D5C9:\z\ÇP
+1D5CA:\z\ÇQ
+1D5CB:\z\ÇR
+1D5CC:\z\ÇS
+1D5CD:\z\ÇT
+1D5CE:\z\ÇU
+1D5CF:\z\ÇV
+1D5D0:\z\ÇW
+1D5D1:\z\ÇX
+1D5D2:\z\ÇY
+1D5D3:\z\ÇZ
+1D5D4:\O\ÒA
+1D5D5:\O\ÒB
+1D5D6:\O\ÒC
+1D5D7:\O\ÒD
+1D5D8:\O\ÒE
+1D5D9:\O\ÒF
+1D5DA:\O\ÒG
+1D5DB:\O\ÒH
+1D5DC:\O\ÒI
+1D5DD:\O\ÒJ
+1D5DE:\O\ÒK
+1D5DF:\O\ÒL
+1D5E0:\O\ÒM
+1D5E1:\O\ÒN
+1D5E2:\O\ÒO
+1D5E3:\O\ÒP
+1D5E4:\O\ÒQ
+1D5E5:\O\ÒR
+1D5E6:\O\ÒS
+1D5E7:\O\ÒT
+1D5E8:\O\ÒU
+1D5E9:\O\ÒV
+1D5EA:\O\ÒW
+1D5EB:\O\ÒX
+1D5EC:\O\ÒY
+1D5ED:\O\ÒZ
+1D5EE:\O\ÇA
+1D5EF:\O\ÇB
+1D5F0:\O\ÇC
+1D5F1:\O\ÇD
+1D5F2:\O\ÇE
+1D5F3:\O\ÇF
+1D5F4:\O\ÇG
+1D5F5:\O\ÇH
+1D5F6:\O\ÇI
+1D5F7:\O\ÇJ
+1D5F8:\O\ÇK
+1D5F9:\O\ÇL
+1D5FA:\O\ÇM
+1D5FB:\O\ÇN
+1D5FC:\O\ÇO
+1D5FD:\O\ÇP
+1D5FE:\O\ÇQ
+1D5FF:\O\ÇR
+1D600:\O\ÇS
+1D601:\O\ÇT
+1D602:\O\ÇU
+1D603:\O\ÇV
+1D604:\O\ÇW
+1D605:\O\ÇX
+1D606:\O\ÇY
+1D607:\O\ÇZ
+1D608:\z \›A
+1D609:\z \›B
+1D60A:\z \›C
+1D60B:\z \›D
+1D60C:\z \›E
+1D60D:\z \›F
+1D60E:\z \›G
+1D60F:\z \›H
+1D610:\z \›I
+1D611:\z \›J
+1D612:\z \›K
+1D613:\z \›L
+1D614:\z \›M
+1D615:\z \›N
+1D616:\z \›O
+1D617:\z \›P
+1D618:\z \›Q
+1D619:\z \›R
+1D61A:\z \›S
+1D61B:\z \›T
+1D61C:\z \›U
+1D61D:\z \›V
+1D61E:\z \›W
+1D61F:\z \›X
+1D620:\z \›Y
+1D621:\z \›Z
+1D622:\z \—A
+1D623:\z \—B
+1D624:\z \—C
+1D625:\z \—D
+1D626:\z \—E
+1D627:\z \—F
+1D628:\z \—G
+1D629:\z \—H
+1D62A:\z \—I
+1D62B:\z \—J
+1D62C:\z \—K
+1D62D:\z \—L
+1D62E:\z \—M
+1D62F:\z \—N
+1D630:\z \—O
+1D631:\z \—P
+1D632:\z \—Q
+1D633:\z \—R
+1D634:\z \—S
+1D635:\z \—T
+1D636:\z \—U
+1D637:\z \—V
+1D638:\z \—W
+1D639:\z \—X
+1D63A:\z \—Y
+1D63B:\z \—Z
+1D63C:\O \›A
+1D63D:\O \›B
+1D63E:\O \›C
+1D63F:\O \›D
+1D640:\O \›E
+1D641:\O \›F
+1D642:\O \›G
+1D643:\O \›H
+1D644:\O \›I
+1D645:\O \›J
+1D646:\O \›K
+1D647:\O \›L
+1D648:\O \›M
+1D649:\O \›N
+1D64A:\O \›O
+1D64B:\O \›P
+1D64C:\O \›Q
+1D64D:\O \›R
+1D64E:\O \›S
+1D64F:\O \›T
+1D650:\O \›U
+1D651:\O \›V
+1D652:\O \›W
+1D653:\O \›X
+1D654:\O \›Y
+1D655:\O \›Z
+1D656:\O \—A
+1D657:\O \—B
+1D658:\O \—C
+1D659:\O \—D
+1D65A:\O \—E
+1D65B:\O \—F
+1D65C:\O \—G
+1D65D:\O \—H
+1D65E:\O \—I
+1D65F:\O \—J
+1D660:\O \—K
+1D661:\O \—L
+1D662:\O \—M
+1D663:\O \—N
+1D664:\O \—O
+1D665:\O \—P
+1D666:\O \—Q
+1D667:\O \—R
+1D668:\O \—S
+1D669:\O \—T
+1D66A:\O \—U
+1D66B:\O \—V
+1D66C:\O \—W
+1D66D:\O \—X
+1D66E:\O \—Y
+1D66F:\O \—Z
+1D670:\•\ÒA
+1D671:\•\ÒB
+1D672:\•\ÒC
+1D673:\•\ÒD
+1D674:\•\ÒE
+1D675:\•\ÒF
+1D676:\•\ÒG
+1D677:\•\ÒH
+1D678:\•\ÒI
+1D679:\•\ÒJ
+1D67A:\•\ÒK
+1D67B:\•\ÒL
+1D67C:\•\ÒM
+1D67D:\•\ÒN
+1D67E:\•\ÒO
+1D67F:\•\ÒP
+1D680:\•\ÒQ
+1D681:\•\ÒR
+1D682:\•\ÒS
+1D683:\•\ÒT
+1D684:\•\ÒU
+1D685:\•\ÒV
+1D686:\•\ÒW
+1D687:\•\ÒX
+1D688:\•\ÒY
+1D689:\•\ÒZ
+1D68A:\•\ÇA
+1D68B:\•\ÇB
+1D68C:\•\ÇC
+1D68D:\•\ÇD
+1D68E:\•\ÇE
+1D68F:\•\ÇF
+1D690:\•\ÇG
+1D691:\•\ÇH
+1D692:\•\ÇI
+1D693:\•\ÇJ
+1D694:\•\ÇK
+1D695:\•\ÇL
+1D696:\•\ÇM
+1D697:\•\ÇN
+1D698:\•\ÇO
+1D699:\•\ÇP
+1D69A:\•\ÇQ
+1D69B:\•\ÇR
+1D69C:\•\ÇS
+1D69D:\•\ÇT
+1D69E:\•\ÇU
+1D69F:\•\ÇV
+1D6A0:\•\ÇW
+1D6A1:\•\ÇX
+1D6A2:\•\ÇY
+1D6A3:\•\ÇZ
+1D6A8:\îCAPITAL \þ
+1D6A9:\îCAPITAL BETA
+1D6AA:\îCAPITAL GAMMA
+1D6AB:\îCAPITAL DELTA
+1D6AC:\îCAPITAL E\É
+1D6AD:\îCAPITAL ZETA
+1D6AE:\îCAPITAL ETA
+1D6AF:\îCAPITAL THETA
+1D6B0:\îCAPITAL IOTA
+1D6B1:\îCAPITAL KAPPA
+1D6B2:\îCAPITAL LAMDA
+1D6B3:\îCAPITAL MU
+1D6B4:\îCAPITAL NU
+1D6B5:\îCAPITAL XI
+1D6B6:\îCAPITAL OMICRON
+1D6B7:\îCAPITAL PI
+1D6B8:\îCAPITAL RHO
+1D6B9:\îCAPITAL THETA \
+1D6BA:\îCAPITAL SIGMA
+1D6BB:\îCAPITAL TAU
+1D6BC:\îCAPITAL U\É
+1D6BD:\îCAPITAL PHI
+1D6BE:\îCAPITAL CHI
+1D6BF:\îCAPITAL PSI
+1D6C0:\îCAPITAL \ü
+1D6C1:\îNABLA
+1D6C2:\î\§\þ
+1D6C3:\î\§BETA
+1D6C4:\î\§GAMMA
+1D6C5:\î\§DELTA
+1D6C6:\î\§E\É
+1D6C7:\î\§ZETA
+1D6C8:\î\§ETA
+1D6C9:\î\§THETA
+1D6CA:\î\§IOTA
+1D6CB:\î\§KAPPA
+1D6CC:\î\§LAMDA
+1D6CD:\î\§MU
+1D6CE:\î\§NU
+1D6CF:\î\§XI
+1D6D0:\î\§OMICRON
+1D6D1:\î\§PI
+1D6D2:\î\§RHO
+1D6D3:\î\§FINAL SIGMA
+1D6D4:\î\§SIGMA
+1D6D5:\î\§TAU
+1D6D6:\î\§U\É
+1D6D7:\î\§PHI
+1D6D8:\î\§CHI
+1D6D9:\î\§PSI
+1D6DA:\î\§\ü
+1D6DB:\îPARTIAL DIFFERENTIAL
+1D6DC:\îE\É \
+1D6DD:\îTHETA \
+1D6DE:\îKAPPA \
+1D6DF:\îPHI \
+1D6E0:\îRHO \
+1D6E1:\îPI \
+1D6E2:\E\›\þ
+1D6E3:\E\›BETA
+1D6E4:\E\›GAMMA
+1D6E5:\E\›DELTA
+1D6E6:\E\›E\É
+1D6E7:\E\›ZETA
+1D6E8:\E\›ETA
+1D6E9:\E\›THETA
+1D6EA:\E\›IOTA
+1D6EB:\E\›KAPPA
+1D6EC:\E\›LAMDA
+1D6ED:\E\›MU
+1D6EE:\E\›NU
+1D6EF:\E\›XI
+1D6F0:\E\›OMICRON
+1D6F1:\E\›PI
+1D6F2:\E\›RHO
+1D6F3:\E\›THETA \
+1D6F4:\E\›SIGMA
+1D6F5:\E\›TAU
+1D6F6:\E\›U\É
+1D6F7:\E\›PHI
+1D6F8:\E\›CHI
+1D6F9:\E\›PSI
+1D6FA:\E\›\ü
+1D6FB:\E\f NABLA
+1D6FC:\E\—\þ
+1D6FD:\E\—BETA
+1D6FE:\E\—GAMMA
+1D6FF:\E\—DELTA
+1D700:\E\—E\É
+1D701:\E\—ZETA
+1D702:\E\—ETA
+1D703:\E\—THETA
+1D704:\E\—IOTA
+1D705:\E\—KAPPA
+1D706:\E\—LAMDA
+1D707:\E\—MU
+1D708:\E\—NU
+1D709:\E\—XI
+1D70A:\E\—OMICRON
+1D70B:\E\—PI
+1D70C:\E\—RHO
+1D70D:\E\—FINAL SIGMA
+1D70E:\E\—SIGMA
+1D70F:\E\—TAU
+1D710:\E\—U\É
+1D711:\E\—PHI
+1D712:\E\—CHI
+1D713:\E\—PSI
+1D714:\E\—\ü
+1D715:\E\f PARTIAL DIFFERENTIAL
+1D716:\E\f E\É \
+1D717:\E\f THETA \
+1D718:\E\f KAPPA \
+1D719:\E\f PHI \
+1D71A:\E\f RHO \
+1D71B:\E\f PI \
+1D71C:\î\›\þ
+1D71D:\î\›BETA
+1D71E:\î\›GAMMA
+1D71F:\î\›DELTA
+1D720:\î\›E\É
+1D721:\î\›ZETA
+1D722:\î\›ETA
+1D723:\î\›THETA
+1D724:\î\›IOTA
+1D725:\î\›KAPPA
+1D726:\î\›LAMDA
+1D727:\î\›MU
+1D728:\î\›NU
+1D729:\î\›XI
+1D72A:\î\›OMICRON
+1D72B:\î\›PI
+1D72C:\î\›RHO
+1D72D:\î\›THETA \
+1D72E:\î\›SIGMA
+1D72F:\î\›TAU
+1D730:\î\›U\É
+1D731:\î\›PHI
+1D732:\î\›CHI
+1D733:\î\›PSI
+1D734:\î\›\ü
+1D735:\î\f NABLA
+1D736:\î\—\þ
+1D737:\î\—BETA
+1D738:\î\—GAMMA
+1D739:\î\—DELTA
+1D73A:\î\—E\É
+1D73B:\î\—ZETA
+1D73C:\î\—ETA
+1D73D:\î\—THETA
+1D73E:\î\—IOTA
+1D73F:\î\—KAPPA
+1D740:\î\—LAMDA
+1D741:\î\—MU
+1D742:\î\—NU
+1D743:\î\—XI
+1D744:\î\—OMICRON
+1D745:\î\—PI
+1D746:\î\—RHO
+1D747:\î\—FINAL SIGMA
+1D748:\î\—SIGMA
+1D749:\î\—TAU
+1D74A:\î\—U\É
+1D74B:\î\—PHI
+1D74C:\î\—CHI
+1D74D:\î\—PSI
+1D74E:\î\—\ü
+1D74F:\î\f PARTIAL DIFFERENTIAL
+1D750:\î\f E\É \
+1D751:\î\f THETA \
+1D752:\î\f KAPPA \
+1D753:\î\f PHI \
+1D754:\î\f RHO \
+1D755:\î\f PI \
+1D756:\O\Ò\þ
+1D757:\O\ÒBETA
+1D758:\O\ÒGAMMA
+1D759:\O\ÒDELTA
+1D75A:\O\ÒE\É
+1D75B:\O\ÒZETA
+1D75C:\O\ÒETA
+1D75D:\O\ÒTHETA
+1D75E:\O\ÒIOTA
+1D75F:\O\ÒKAPPA
+1D760:\O\ÒLAMDA
+1D761:\O\ÒMU
+1D762:\O\ÒNU
+1D763:\O\ÒXI
+1D764:\O\ÒOMICRON
+1D765:\O\ÒPI
+1D766:\O\ÒRHO
+1D767:\O\ÒTHETA \
+1D768:\O\ÒSIGMA
+1D769:\O\ÒTAU
+1D76A:\O\ÒU\É
+1D76B:\O\ÒPHI
+1D76C:\O\ÒCHI
+1D76D:\O\ÒPSI
+1D76E:\O\Ò\ü
+1D76F:\O NABLA
+1D770:\O\Ç\þ
+1D771:\O\ÇBETA
+1D772:\O\ÇGAMMA
+1D773:\O\ÇDELTA
+1D774:\O\ÇE\É
+1D775:\O\ÇZETA
+1D776:\O\ÇETA
+1D777:\O\ÇTHETA
+1D778:\O\ÇIOTA
+1D779:\O\ÇKAPPA
+1D77A:\O\ÇLAMDA
+1D77B:\O\ÇMU
+1D77C:\O\ÇNU
+1D77D:\O\ÇXI
+1D77E:\O\ÇOMICRON
+1D77F:\O\ÇPI
+1D780:\O\ÇRHO
+1D781:\O\ÇFINAL SIGMA
+1D782:\O\ÇSIGMA
+1D783:\O\ÇTAU
+1D784:\O\ÇU\É
+1D785:\O\ÇPHI
+1D786:\O\ÇCHI
+1D787:\O\ÇPSI
+1D788:\O\Ç\ü
+1D789:\O PARTIAL DIFFERENTIAL
+1D78A:\O E\É \
+1D78B:\O THETA \
+1D78C:\O KAPPA \
+1D78D:\O PHI \
+1D78E:\O RHO \
+1D78F:\O PI \
+1D790:\O \›\þ
+1D791:\O \›BETA
+1D792:\O \›GAMMA
+1D793:\O \›DELTA
+1D794:\O \›E\É
+1D795:\O \›ZETA
+1D796:\O \›ETA
+1D797:\O \›THETA
+1D798:\O \›IOTA
+1D799:\O \›KAPPA
+1D79A:\O \›LAMDA
+1D79B:\O \›MU
+1D79C:\O \›NU
+1D79D:\O \›XI
+1D79E:\O \›OMICRON
+1D79F:\O \›PI
+1D7A0:\O \›RHO
+1D7A1:\O \›THETA \
+1D7A2:\O \›SIGMA
+1D7A3:\O \›TAU
+1D7A4:\O \›U\É
+1D7A5:\O \›PHI
+1D7A6:\O \›CHI
+1D7A7:\O \›PSI
+1D7A8:\O \›\ü
+1D7A9:\O \f NABLA
+1D7AA:\O \—\þ
+1D7AB:\O \—BETA
+1D7AC:\O \—GAMMA
+1D7AD:\O \—DELTA
+1D7AE:\O \—E\É
+1D7AF:\O \—ZETA
+1D7B0:\O \—ETA
+1D7B1:\O \—THETA
+1D7B2:\O \—IOTA
+1D7B3:\O \—KAPPA
+1D7B4:\O \—LAMDA
+1D7B5:\O \—MU
+1D7B6:\O \—NU
+1D7B7:\O \—XI
+1D7B8:\O \—OMICRON
+1D7B9:\O \—PI
+1D7BA:\O \—RHO
+1D7BB:\O \—FINAL SIGMA
+1D7BC:\O \—SIGMA
+1D7BD:\O \—TAU
+1D7BE:\O \—U\É
+1D7BF:\O \—PHI
+1D7C0:\O \—CHI
+1D7C1:\O \—PSI
+1D7C2:\O \—\ü
+1D7C3:\O \f PARTIAL DIFFERENTIAL
+1D7C4:\O \f E\É \
+1D7C5:\O \f THETA \
+1D7C6:\O \f KAPPA \
+1D7C7:\O \f PHI \
+1D7C8:\O \f RHO \
+1D7C9:\O \f PI \
+1D7CE:\îDIGIT ZERO
+1D7CF:\îDIGIT ONE
+1D7D0:\îDIGIT TWO
+1D7D1:\îDIGIT THREE
+1D7D2:\îDIGIT FOUR
+1D7D3:\îDIGIT FIVE
+1D7D4:\îDIGIT SIX
+1D7D5:\îDIGIT SEVEN
+1D7D6:\îDIGIT E\¼
+1D7D7:\îDIGIT NINE
+1D7D8:\E\¤\hZERO
+1D7D9:\E\¤\hONE
+1D7DA:\E\¤\hTWO
+1D7DB:\E\¤\hTHREE
+1D7DC:\E\¤\hFOUR
+1D7DD:\E\¤\hFIVE
+1D7DE:\E\¤\hSIX
+1D7DF:\E\¤\hSEVEN
+1D7E0:\E\¤\hE\¼
+1D7E1:\E\¤\hNINE
+1D7E2:\z\hZERO
+1D7E3:\z\hONE
+1D7E4:\z\hTWO
+1D7E5:\z\hTHREE
+1D7E6:\z\hFOUR
+1D7E7:\z\hFIVE
+1D7E8:\z\hSIX
+1D7E9:\z\hSEVEN
+1D7EA:\z\hE\¼
+1D7EB:\z\hNINE
+1D7EC:\O\hZERO
+1D7ED:\O\hONE
+1D7EE:\O\hTWO
+1D7EF:\O\hTHREE
+1D7F0:\O\hFOUR
+1D7F1:\O\hFIVE
+1D7F2:\O\hSIX
+1D7F3:\O\hSEVEN
+1D7F4:\O\hE\¼
+1D7F5:\O\hNINE
+1D7F6:\•\hZERO
+1D7F7:\•\hONE
+1D7F8:\•\hTWO
+1D7F9:\•\hTHREE
+1D7FA:\•\hFOUR
+1D7FB:\•\hFIVE
+1D7FC:\•\hSIX
+1D7FD:\•\hSEVEN
+1D7FE:\•\hE\¼
+1D7FF:\•\hNINE
+20000-2A6D6:<CJK Ideograph Extension B>
+2F800:\Þ00
+2F801:\Þ01
+2F802:\Þ02
+2F803:\Þ03
+2F804:\Þ04
+2F805:\Þ05
+2F806:\Þ06
+2F807:\Þ07
+2F808:\Þ08
+2F809:\Þ09
+2F80A:\Þ0A
+2F80B:\Þ0B
+2F80C:\Þ0C
+2F80D:\Þ0D
+2F80E:\Þ0E
+2F80F:\Þ0F
+2F810:\Þ10
+2F811:\Þ11
+2F812:\Þ12
+2F813:\Þ13
+2F814:\Þ14
+2F815:\Þ15
+2F816:\Þ16
+2F817:\Þ17
+2F818:\Þ18
+2F819:\Þ19
+2F81A:\Þ1A
+2F81B:\Þ1B
+2F81C:\Þ1C
+2F81D:\Þ1D
+2F81E:\Þ1E
+2F81F:\Þ1F
+2F820:\Þ20
+2F821:\Þ21
+2F822:\Þ22
+2F823:\Þ23
+2F824:\Þ24
+2F825:\Þ25
+2F826:\Þ26
+2F827:\Þ27
+2F828:\Þ28
+2F829:\Þ29
+2F82A:\Þ2A
+2F82B:\Þ2B
+2F82C:\Þ2C
+2F82D:\Þ2D
+2F82E:\Þ2E
+2F82F:\Þ2F
+2F830:\Þ30
+2F831:\Þ31
+2F832:\Þ32
+2F833:\Þ33
+2F834:\Þ34
+2F835:\Þ35
+2F836:\Þ36
+2F837:\Þ37
+2F838:\Þ38
+2F839:\Þ39
+2F83A:\Þ3A
+2F83B:\Þ3B
+2F83C:\Þ3C
+2F83D:\Þ3D
+2F83E:\Þ3E
+2F83F:\Þ3F
+2F840:\Þ40
+2F841:\Þ41
+2F842:\Þ42
+2F843:\Þ43
+2F844:\Þ44
+2F845:\Þ45
+2F846:\Þ46
+2F847:\Þ47
+2F848:\Þ48
+2F849:\Þ49
+2F84A:\Þ4A
+2F84B:\Þ4B
+2F84C:\Þ4C
+2F84D:\Þ4D
+2F84E:\Þ4E
+2F84F:\Þ4F
+2F850:\Þ50
+2F851:\Þ51
+2F852:\Þ52
+2F853:\Þ53
+2F854:\Þ54
+2F855:\Þ55
+2F856:\Þ56
+2F857:\Þ57
+2F858:\Þ58
+2F859:\Þ59
+2F85A:\Þ5A
+2F85B:\Þ5B
+2F85C:\Þ5C
+2F85D:\Þ5D
+2F85E:\Þ5E
+2F85F:\Þ5F
+2F860:\Þ60
+2F861:\Þ61
+2F862:\Þ62
+2F863:\Þ63
+2F864:\Þ64
+2F865:\Þ65
+2F866:\Þ66
+2F867:\Þ67
+2F868:\Þ68
+2F869:\Þ69
+2F86A:\Þ6A
+2F86B:\Þ6B
+2F86C:\Þ6C
+2F86D:\Þ6D
+2F86E:\Þ6E
+2F86F:\Þ6F
+2F870:\Þ70
+2F871:\Þ71
+2F872:\Þ72
+2F873:\Þ73
+2F874:\Þ74
+2F875:\Þ75
+2F876:\Þ76
+2F877:\Þ77
+2F878:\Þ78
+2F879:\Þ79
+2F87A:\Þ7A
+2F87B:\Þ7B
+2F87C:\Þ7C
+2F87D:\Þ7D
+2F87E:\Þ7E
+2F87F:\Þ7F
+2F880:\Þ80
+2F881:\Þ81
+2F882:\Þ82
+2F883:\Þ83
+2F884:\Þ84
+2F885:\Þ85
+2F886:\Þ86
+2F887:\Þ87
+2F888:\Þ88
+2F889:\Þ89
+2F88A:\Þ8A
+2F88B:\Þ8B
+2F88C:\Þ8C
+2F88D:\Þ8D
+2F88E:\Þ8E
+2F88F:\Þ8F
+2F890:\Þ90
+2F891:\Þ91
+2F892:\Þ92
+2F893:\Þ93
+2F894:\Þ94
+2F895:\Þ95
+2F896:\Þ96
+2F897:\Þ97
+2F898:\Þ98
+2F899:\Þ99
+2F89A:\Þ9A
+2F89B:\Þ9B
+2F89C:\Þ9C
+2F89D:\Þ9D
+2F89E:\Þ9E
+2F89F:\Þ9F
+2F8A0:\ÞA0
+2F8A1:\ÞA1
+2F8A2:\ÞA2
+2F8A3:\ÞA3
+2F8A4:\ÞA4
+2F8A5:\ÞA5
+2F8A6:\ÞA6
+2F8A7:\ÞA7
+2F8A8:\ÞA8
+2F8A9:\ÞA9
+2F8AA:\ÞAA
+2F8AB:\ÞAB
+2F8AC:\ÞAC
+2F8AD:\ÞAD
+2F8AE:\ÞAE
+2F8AF:\ÞAF
+2F8B0:\ÞB0
+2F8B1:\ÞB1
+2F8B2:\ÞB2
+2F8B3:\ÞB3
+2F8B4:\ÞB4
+2F8B5:\ÞB5
+2F8B6:\ÞB6
+2F8B7:\ÞB7
+2F8B8:\ÞB8
+2F8B9:\ÞB9
+2F8BA:\ÞBA
+2F8BB:\ÞBB
+2F8BC:\ÞBC
+2F8BD:\ÞBD
+2F8BE:\ÞBE
+2F8BF:\ÞBF
+2F8C0:\ÞC0
+2F8C1:\ÞC1
+2F8C2:\ÞC2
+2F8C3:\ÞC3
+2F8C4:\ÞC4
+2F8C5:\ÞC5
+2F8C6:\ÞC6
+2F8C7:\ÞC7
+2F8C8:\ÞC8
+2F8C9:\ÞC9
+2F8CA:\ÞCA
+2F8CB:\ÞCB
+2F8CC:\ÞCC
+2F8CD:\ÞCD
+2F8CE:\ÞCE
+2F8CF:\ÞCF
+2F8D0:\ÞD0
+2F8D1:\ÞD1
+2F8D2:\ÞD2
+2F8D3:\ÞD3
+2F8D4:\ÞD4
+2F8D5:\ÞD5
+2F8D6:\ÞD6
+2F8D7:\ÞD7
+2F8D8:\ÞD8
+2F8D9:\ÞD9
+2F8DA:\ÞDA
+2F8DB:\ÞDB
+2F8DC:\ÞDC
+2F8DD:\ÞDD
+2F8DE:\ÞDE
+2F8DF:\ÞDF
+2F8E0:\ÞE0
+2F8E1:\ÞE1
+2F8E2:\ÞE2
+2F8E3:\ÞE3
+2F8E4:\ÞE4
+2F8E5:\ÞE5
+2F8E6:\ÞE6
+2F8E7:\ÞE7
+2F8E8:\ÞE8
+2F8E9:\ÞE9
+2F8EA:\ÞEA
+2F8EB:\ÞEB
+2F8EC:\ÞEC
+2F8ED:\ÞED
+2F8EE:\ÞEE
+2F8EF:\ÞEF
+2F8F0:\ÞF0
+2F8F1:\ÞF1
+2F8F2:\ÞF2
+2F8F3:\ÞF3
+2F8F4:\ÞF4
+2F8F5:\ÞF5
+2F8F6:\ÞF6
+2F8F7:\ÞF7
+2F8F8:\ÞF8
+2F8F9:\ÞF9
+2F8FA:\ÞFA
+2F8FB:\ÞFB
+2F8FC:\ÞFC
+2F8FD:\ÞFD
+2F8FE:\ÞFE
+2F8FF:\ÞFF
+2F900:\ß00
+2F901:\ß01
+2F902:\ß02
+2F903:\ß03
+2F904:\ß04
+2F905:\ß05
+2F906:\ß06
+2F907:\ß07
+2F908:\ß08
+2F909:\ß09
+2F90A:\ß0A
+2F90B:\ß0B
+2F90C:\ß0C
+2F90D:\ß0D
+2F90E:\ß0E
+2F90F:\ß0F
+2F910:\ß10
+2F911:\ß11
+2F912:\ß12
+2F913:\ß13
+2F914:\ß14
+2F915:\ß15
+2F916:\ß16
+2F917:\ß17
+2F918:\ß18
+2F919:\ß19
+2F91A:\ß1A
+2F91B:\ß1B
+2F91C:\ß1C
+2F91D:\ß1D
+2F91E:\ß1E
+2F91F:\ß1F
+2F920:\ß20
+2F921:\ß21
+2F922:\ß22
+2F923:\ß23
+2F924:\ß24
+2F925:\ß25
+2F926:\ß26
+2F927:\ß27
+2F928:\ß28
+2F929:\ß29
+2F92A:\ß2A
+2F92B:\ß2B
+2F92C:\ß2C
+2F92D:\ß2D
+2F92E:\ß2E
+2F92F:\ß2F
+2F930:\ß30
+2F931:\ß31
+2F932:\ß32
+2F933:\ß33
+2F934:\ß34
+2F935:\ß35
+2F936:\ß36
+2F937:\ß37
+2F938:\ß38
+2F939:\ß39
+2F93A:\ß3A
+2F93B:\ß3B
+2F93C:\ß3C
+2F93D:\ß3D
+2F93E:\ß3E
+2F93F:\ß3F
+2F940:\ß40
+2F941:\ß41
+2F942:\ß42
+2F943:\ß43
+2F944:\ß44
+2F945:\ß45
+2F946:\ß46
+2F947:\ß47
+2F948:\ß48
+2F949:\ß49
+2F94A:\ß4A
+2F94B:\ß4B
+2F94C:\ß4C
+2F94D:\ß4D
+2F94E:\ß4E
+2F94F:\ß4F
+2F950:\ß50
+2F951:\ß51
+2F952:\ß52
+2F953:\ß53
+2F954:\ß54
+2F955:\ß55
+2F956:\ß56
+2F957:\ß57
+2F958:\ß58
+2F959:\ß59
+2F95A:\ß5A
+2F95B:\ß5B
+2F95C:\ß5C
+2F95D:\ß5D
+2F95E:\ß5E
+2F95F:\ß5F
+2F960:\ß60
+2F961:\ß61
+2F962:\ß62
+2F963:\ß63
+2F964:\ß64
+2F965:\ß65
+2F966:\ß66
+2F967:\ß67
+2F968:\ß68
+2F969:\ß69
+2F96A:\ß6A
+2F96B:\ß6B
+2F96C:\ß6C
+2F96D:\ß6D
+2F96E:\ß6E
+2F96F:\ß6F
+2F970:\ß70
+2F971:\ß71
+2F972:\ß72
+2F973:\ß73
+2F974:\ß74
+2F975:\ß75
+2F976:\ß76
+2F977:\ß77
+2F978:\ß78
+2F979:\ß79
+2F97A:\ß7A
+2F97B:\ß7B
+2F97C:\ß7C
+2F97D:\ß7D
+2F97E:\ß7E
+2F97F:\ß7F
+2F980:\ß80
+2F981:\ß81
+2F982:\ß82
+2F983:\ß83
+2F984:\ß84
+2F985:\ß85
+2F986:\ß86
+2F987:\ß87
+2F988:\ß88
+2F989:\ß89
+2F98A:\ß8A
+2F98B:\ß8B
+2F98C:\ß8C
+2F98D:\ß8D
+2F98E:\ß8E
+2F98F:\ß8F
+2F990:\ß90
+2F991:\ß91
+2F992:\ß92
+2F993:\ß93
+2F994:\ß94
+2F995:\ß95
+2F996:\ß96
+2F997:\ß97
+2F998:\ß98
+2F999:\ß99
+2F99A:\ß9A
+2F99B:\ß9B
+2F99C:\ß9C
+2F99D:\ß9D
+2F99E:\ß9E
+2F99F:\ß9F
+2F9A0:\ßA0
+2F9A1:\ßA1
+2F9A2:\ßA2
+2F9A3:\ßA3
+2F9A4:\ßA4
+2F9A5:\ßA5
+2F9A6:\ßA6
+2F9A7:\ßA7
+2F9A8:\ßA8
+2F9A9:\ßA9
+2F9AA:\ßAA
+2F9AB:\ßAB
+2F9AC:\ßAC
+2F9AD:\ßAD
+2F9AE:\ßAE
+2F9AF:\ßAF
+2F9B0:\ßB0
+2F9B1:\ßB1
+2F9B2:\ßB2
+2F9B3:\ßB3
+2F9B4:\ßB4
+2F9B5:\ßB5
+2F9B6:\ßB6
+2F9B7:\ßB7
+2F9B8:\ßB8
+2F9B9:\ßB9
+2F9BA:\ßBA
+2F9BB:\ßBB
+2F9BC:\ßBC
+2F9BD:\ßBD
+2F9BE:\ßBE
+2F9BF:\ßBF
+2F9C0:\ßC0
+2F9C1:\ßC1
+2F9C2:\ßC2
+2F9C3:\ßC3
+2F9C4:\ßC4
+2F9C5:\ßC5
+2F9C6:\ßC6
+2F9C7:\ßC7
+2F9C8:\ßC8
+2F9C9:\ßC9
+2F9CA:\ßCA
+2F9CB:\ßCB
+2F9CC:\ßCC
+2F9CD:\ßCD
+2F9CE:\ßCE
+2F9CF:\ßCF
+2F9D0:\ßD0
+2F9D1:\ßD1
+2F9D2:\ßD2
+2F9D3:\ßD3
+2F9D4:\ßD4
+2F9D5:\ßD5
+2F9D6:\ßD6
+2F9D7:\ßD7
+2F9D8:\ßD8
+2F9D9:\ßD9
+2F9DA:\ßDA
+2F9DB:\ßDB
+2F9DC:\ßDC
+2F9DD:\ßDD
+2F9DE:\ßDE
+2F9DF:\ßDF
+2F9E0:\ßE0
+2F9E1:\ßE1
+2F9E2:\ßE2
+2F9E3:\ßE3
+2F9E4:\ßE4
+2F9E5:\ßE5
+2F9E6:\ßE6
+2F9E7:\ßE7
+2F9E8:\ßE8
+2F9E9:\ßE9
+2F9EA:\ßEA
+2F9EB:\ßEB
+2F9EC:\ßEC
+2F9ED:\ßED
+2F9EE:\ßEE
+2F9EF:\ßEF
+2F9F0:\ßF0
+2F9F1:\ßF1
+2F9F2:\ßF2
+2F9F3:\ßF3
+2F9F4:\ßF4
+2F9F5:\ßF5
+2F9F6:\ßF6
+2F9F7:\ßF7
+2F9F8:\ßF8
+2F9F9:\ßF9
+2F9FA:\ßFA
+2F9FB:\ßFB
+2F9FC:\ßFC
+2F9FD:\ßFD
+2F9FE:\ßFE
+2F9FF:\ßFF
+2FA00:\1A00
+2FA01:\1A01
+2FA02:\1A02
+2FA03:\1A03
+2FA04:\1A04
+2FA05:\1A05
+2FA06:\1A06
+2FA07:\1A07
+2FA08:\1A08
+2FA09:\1A09
+2FA0A:\1A0A
+2FA0B:\1A0B
+2FA0C:\1A0C
+2FA0D:\1A0D
+2FA0E:\1A0E
+2FA0F:\1A0F
+2FA10:\1A10
+2FA11:\1A11
+2FA12:\1A12
+2FA13:\1A13
+2FA14:\1A14
+2FA15:\1A15
+2FA16:\1A16
+2FA17:\1A17
+2FA18:\1A18
+2FA19:\1A19
+2FA1A:\1A1A
+2FA1B:\1A1B
+2FA1C:\1A1C
+2FA1D:\1A1D
+E0001:LANGUAGE TAG
+E0020:TAG SPACE
+E0021:TAG EXCLAM\”\¥
+E0022:TAG QUOT\”\¥
+E0023:TAG \­SIGN
+E0024:TAG DOLLAR\‚
+E0025:TAG PERCENT\‚
+E0026:TAG AMPERSAND
+E0027:TAG APOSTROPHE
+E0028:TAG \‰ \ÑS
+E0029:TAG \ù\ÑS
+E002A:TAG ASTERISK
+E002B:TAG PLUS\‚
+E002C:TAG COMMA
+E002D:TAG HYPHEN-MINUS
+E002E:TAG\é
+E002F:TAG SOLIDUS
+E0030:TAG\hZERO
+E0031:TAG\hONE
+E0032:TAG\hTWO
+E0033:TAG\hTHREE
+E0034:TAG\hFOUR
+E0035:TAG\hFIVE
+E0036:TAG\hSIX
+E0037:TAG\hSEVEN
+E0038:TAG\hE\¼
+E0039:TAG\hNINE
+E003A:TAG COLON
+E003B:TAG SEMICOLON
+E003C:TAG \µ\‚
+E003D:TAG EQUALS\‚
+E003E:TAG \’\‚
+E003F:TAG QUESTION\¥
+E0040:TAG COMMERCIAL AT
+E0041:TAG \PA
+E0042:TAG \PB
+E0043:TAG \PC
+E0044:TAG \PD
+E0045:TAG \PE
+E0046:TAG \PF
+E0047:TAG \PG
+E0048:TAG \PH
+E0049:TAG \PI
+E004A:TAG \PJ
+E004B:TAG \PK
+E004C:TAG \PL
+E004D:TAG \PM
+E004E:TAG \PN
+E004F:TAG \PO
+E0050:TAG \PP
+E0051:TAG \PQ
+E0052:TAG \PR
+E0053:TAG \PS
+E0054:TAG \PT
+E0055:TAG \PU
+E0056:TAG \PV
+E0057:TAG \PW
+E0058:TAG \PX
+E0059:TAG \PY
+E005A:TAG \PZ
+E005B:TAG \‰ \r\–
+E005C:TAG REVERSE SOLIDUS
+E005D:TAG \ù\r\–
+E005E:TAG CIRCUMFLEX\×
+E005F:TAG LOW \ä
+E0060:TAG GRAVE\×
+E0061:TAG \LA
+E0062:TAG \LB
+E0063:TAG \LC
+E0064:TAG \LD
+E0065:TAG \LE
+E0066:TAG \LF
+E0067:TAG \LG
+E0068:TAG \LH
+E0069:TAG \LI
+E006A:TAG \LJ
+E006B:TAG \LK
+E006C:TAG \LL
+E006D:TAG \LM
+E006E:TAG \LN
+E006F:TAG \LO
+E0070:TAG \LP
+E0071:TAG \LQ
+E0072:TAG \LR
+E0073:TAG \LS
+E0074:TAG \LT
+E0075:TAG \LU
+E0076:TAG \LV
+E0077:TAG \LW
+E0078:TAG \LX
+E0079:TAG \LY
+E007A:TAG \LZ
+E007B:TAG \‰ CURLY \–
+E007C:TAG \€ \ä
+E007D:TAG \ùCURLY \–
+E007E:TAG \æ
+E007F:CANCEL TAG
+F0000-FFFFD:<Plane 15 Private Use>
+100000-10FFFD:<Plane 16 Private Use>
+T0:DOUBLE
+T1:CJK COMPATIBILITY IDEOGRAPH-2F
+T2: INITIAL FORM
+T3:THAI CHARACTER
+T4:HALFWIDTH
+T5:TIBETAN
+T6: FINAL FORM
+T7:SEONG
+T8:IDEOGRAPH
+T9:GREEK CAPITAL LETTER
+T@: LETTER
+TB:CJK COMPATIBILITY IDEOGRAPH-
+TC: SYLLABLE
+TE:MATHEMATICAL
+TF:CANADIAN SYLLABICS
+TH: WITH
+TI: CAPITAL
+TJ:ARABIC LIGATURE
+TK:MUSICAL SYMBOL
+TL:LATIN SMALL LETTER
+TM:BRAILLE PATTERN DOTS-
+TN: SMALL
+TO:MATHEMATICAL SANS-SERIF BOLD
+TP:LATIN CAPITAL LETTER
+TQ: ISOLATED FORM
+TU:KANGXI RADICAL
+TV:ETHIOPIC SYLLABLE
+TX:AL FORM
+TY:BYZANTINE MUSICAL SYMBOL
+TZ:YI SYLLABLE
+T^:ARABIC LETTER
+T_:IDEOGRAPHIC TELEGRAPH SYMBOL FOR
+Tb: VOWEL SIGN
+Tc:CIRCLED
+Te:HANGUL
+Tf:ITALIC
+Tg:CYRILLIC
+Th: DIGIT
+Ti: AND
+Tj:BOX DRAWINGS
+Tk:CANADIAN SYLLABICS CARRIER
+Tl:APL FUNCTIONAL SYMBOL
+Tm:MATHEMATICAL BOLD
+Tn:KATAKANA
+To:COMBINING
+Tp: ABOVE
+Tq:RIGHT
+Tr:SQUARE
+Tt:PARENTHESIZED
+Tu: ARROW
+Tv: RADICAL
+Tx:MONGOLIAN LETTER
+Ty:GREEK SMALL LETTER
+Tz:MATHEMATICAL SANS-SERIF
+T€:VERTICAL
+T:CANADIAN SYLLABICS WEST-CREE
+T‚: SIGN
+Tƒ:WARDS HARPOON WITH BARB
+T„:DEVANAGARI
+T…: BELOW
+T†:FULLWIDTH
+T‡: WITH ALEF MAKSURA
+Tˆ: WITH CIRCUMFLEX
+T‰:LEFT
+TŠ:WARDS
+T‹:HIRAGANA LETTER
+TŒ:CHEROKEE LETTER
+T:SYMBOL
+TŽ:SCRIPT
+T: WITH MEEM
+T:HORIZONTAL
+T‘: EQUAL TO
+T’:GREATER-THAN
+T“:HANGUL JONGSEONG
+T”:ATION
+T•:MATHEMATICAL MONOSPACE
+T–:BRACKET
+T—:ITALIC SMALL
+T™:HANGUL CHOSEONG
+Tš:MALAYALAM
+T›:ITALIC CAPITAL
+Tœ:GEGRAMMENI
+T:TIBETAN SUBJOINED LETTER
+Tž: WITH DIAERESIS
+TŸ:HEBREW
+T :CJK COMPATIBILITY IDEOGRAPH-F9
+T¡:CYRILLIC CAPITAL LETTER
+T¢:CYRILLIC SMALL LETTER
+T£:FRAKTUR
+T¤:DOUBLE-STRUCK
+T¥: MARK
+T¦:WHITE
+T§:SMALL
+T©:BOPOMOFO LETTER
+Tª:GUJARATI
+T«:HANGUL JUNGSEONG
+T¬:BLACK
+T­:NUMBER
+T®:MODIFIER LETTER
+T¯:GURMUKHI
+T°:BENGALI
+T±: WITH DASIA AND
+T²:ROMAN NUMERAL
+T³: WITH DOT
+T´:PERISPOMENI
+Tµ:LESS-THAN
+T¶:SINHALA LETTER
+T·: WITH PSILI AND
+T¹:PRESENTATION FORM FOR VERTICAL
+Tº:YEH WITH HAMZA ABOVE
+T»:KANNADA
+T¼:IGHT
+T½:MYANMAR
+T¾:TRIANGLE
+T¿:DESERET
+TÀ:RUNIC LETTER
+TÁ:STROKE
+TÂ:ED
+TÃ:KHMER INDEPENDENT VOWEL
+TÄ:POINTING
+TÅ:HEAVY
+TÆ:IEU
+TÇ: SMALL
+TÉ:PSILON
+TÊ:ARABIC
+TË:DOWN
+TÌ:DINGBAT NEGATIVE CIRCLED
+TÍ:KATAKANA LETTER
+TÎ:VOCALIC
+TÏ:TELUGU
+TÐ:CIRCLE
+TÑ:PARENTHESI
+TÒ: CAPITAL
+TÓ:SYRIAC
+TÔ: WITH JEEM
+TÕ:ALI GALI
+TÖ:HANGUL LETTER
+T×: ACCENT
+TÙ:RIGHTWARDS ARROW
+TÚ: OPERATOR
+TÛ: WITH YEH FINAL FORM
+TÜ:ACUTE
+TÝ:KHMER
+TÞ:CJK COMPATIBILITY IDEOGRAPH-2F8
+Tß:CJK COMPATIBILITY IDEOGRAPH-2F9
+Tà:MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING
+Tá:DINGBAT NEGATIVE CIRCLED C-SIMPLIFIED
+Tâ:ORIYA LETTER
+Tã: CAPITAL LETTER
+Tä:LINE
+Tå:MACRON
+Tæ:TILDE
+Tç:VARIATION SELECTOR
+Té: FULL STOP
+Tê:<control>
+Të:THAANA LETTER
+Tì: BAR
+Tí: WITH HOOK
+Tî:MATHEMATICAL BOLD
+Tï:LOWER
+Tð:IDEOGRAPHIC DESCRIPTION CHARACTER
+Tñ:SYMBOL FOR
+Tò:LIGATURE
+Tó:DENTISTRY SYMBOL LIGHT
+Tô:ING
+Tõ:CJK COMPATIBILITY IDEOGRAPH-FA
+Tö:REVERSED
+T÷:UPPER
+Tù:RIGHT
+Tú:VULGAR FRACTION
+Tû: WITH CARON
+Tü:OMEGA
+Tý:SQUARE
+Tþ:ALPHA
+Tÿ:YI SYLLABLE N
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites,ff9
index 3eb5b44b7..3eb5b44b7 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites,ff9
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites11,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites11,ff9
index 48986b41e..48986b41e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites11,ff9
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites11,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites22,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites22,ff9
index 63a6e6122..63a6e6122 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites22,ff9
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9
new file mode 100644
index 000000000..096f2f22a
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9
new file mode 100644
index 000000000..3bf5d53b4
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9
new file mode 100644
index 000000000..29a67dd3c
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9
new file mode 100644
index 000000000..0c866df39
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa b/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa
index 431535e21..d6dafd212 100644
--- a/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa
+++ b/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa
Binary files differ
diff --git a/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa b/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa
index 8dd0dd2c9..045d6a3af 100755..100644
--- a/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa
+++ b/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa
Binary files differ
diff --git a/frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffa b/frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffa
new file mode 100644
index 000000000..bfcc3ef63
--- /dev/null
+++ b/frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffa
Binary files differ
diff --git a/frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright
new file mode 100644
index 000000000..8bb7d7eb0
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright
@@ -0,0 +1,20 @@
+Copyright (c) 2019-2022 Lee Noar
+Copyright (c) 2019-2022 GCCSDK Developers
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+ * The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b28 b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b28
new file mode 100644
index 000000000..246443e2c
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b28
@@ -0,0 +1 @@
+https://www.riscos.info/downloads/gccsdk/sharedunixlib/
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe b/frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe
deleted file mode 100644
index 4f4ca1e24..000000000
--- a/frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe
+++ /dev/null
@@ -1,34 +0,0 @@
-AcornURI 1.04
--------------
-
-Hi. This is a complete reimplementation of Acorn's URI module such that it
-works on Iyonix. This allows simple URI / URL launching from applications.
-Merge this !System with your own, then (re)launch your favourite browser to
-ensure it's running.
-
-This has a few advantages over the official offering: it's smaller,
-compatible with more browsers and more tolerant of errors.
-
-This is released under the terms of the LGPL, which is included in this
-archive as the file Copying. Previous versions of this module were released
-under the GPL, and are still available from sudden.recoil.org.
-
-Source is available from the same place you downloaded this archive, ie
-<http://sudden.recoil.org/others/acornuri/acornuri104src.zip>
-
-
-Changelog
----------
-
-v1.04 20-May-06 Relicensed under the LGPL (rather than GPL)
-
-v1.03 11-May-04 Changed the order of things to try, so it now
- always prefers browsers which are already loaded
-
-v1.02 19-Feb-04 Fixed claiming of URIs where I'd misread the spec
- Added automatic fall-back to the ANT protocol
- Removed some service calls to improve reliability
-
---
-Christian Ludlam
-chris@recoil.org \ No newline at end of file
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0 b/frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/Copying b/frontends/riscos/distribution/3rdParty/AcornURI/Copying
index 5ab7695ab..4c1b077bf 100644
--- a/frontends/riscos/distribution/3rdParty/AcornURI/Copying
+++ b/frontends/riscos/distribution/3rdParty/AcornURI/Copying
@@ -1,504 +1,22 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
+Files: URI
+Copyright:
+ 1995, 1998 Acorn Computers Ltd
+ 2000 Pace Micro Technology plc
+ 2007, 2008, 2013 Castle Technology Ltd
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ The complete text of the Apache License Version 2.0 can be found in
+ in the file 'Apache-2.0'.
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/Origin,b28 b/frontends/riscos/distribution/3rdParty/AcornURI/Origin,b28
new file mode 100644
index 000000000..573a74db2
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/AcornURI/Origin,b28
@@ -0,0 +1 @@
+https://www.riscosopen.org/
diff --git a/frontends/riscos/distribution/3rdParty/Cache/Copyright b/frontends/riscos/distribution/3rdParty/Cache/Copyright
new file mode 100644
index 000000000..61d82856d
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Cache/Copyright
@@ -0,0 +1,20 @@
+Copyright 2007 Adam Richardson
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/frontends/riscos/distribution/3rdParty/Cache/Origin,b28 b/frontends/riscos/distribution/3rdParty/Cache/Origin,b28
new file mode 100644
index 000000000..ad677d3c9
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Cache/Origin,b28
@@ -0,0 +1 @@
+https://www.snowstone.org.uk/riscos/
diff --git a/frontends/riscos/distribution/3rdParty/CryptRand/Origin,b28 b/frontends/riscos/distribution/3rdParty/CryptRand/Origin,b28
new file mode 100644
index 000000000..f56f9d600
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/CryptRand/Origin,b28
@@ -0,0 +1 @@
+https://www.riscos.info/packages/arm/System
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/COPYING b/frontends/riscos/distribution/3rdParty/Iconv/COPYING
new file mode 100644
index 000000000..266d65eb1
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/COPYING
@@ -0,0 +1,140 @@
+Files: *
+Copyright: 2004-13 J-M Bell
+License: MIT-like
+
+Files: src/transtab
+Copyright: 2000 Markus Kuhn
+License: transtab
+
+Files: test/GNU/*
+Copyright: 2000-2002, 2004-2005 Free Software Foundation, Inc.
+License: LGPL-2+
+
+Files: unicode/Unicode/*
+Copyright:
+ 1997 Acorn Computers Ltd
+ 1999, 2001 Pace Micro Technology plc
+License: Apache-2.0
+
+Files: unicode/Unicode/c/makealiases
+Copyright: 2008 John-Mark Bell
+License: MIT-like
+
+Files: unicode/Unicode/data/CharNames
+Copyright: 2002 Unicode, Inc
+License: Unicode
+
+Files: unicode/UnicodeLib/*
+Copyright:
+ 1997, 1998 Acorn Computers Ltd
+ 1997-2000 Pace Micro Technology PLC.
+ 1999 Element 14 Ltd
+ 2005, 2009, 2015 Castle Technology Ltd
+License: Apache-2.0
+
+Files: unicode/UnicodeLib/data/*
+Copyright:
+ 1991-2002 Unicode, Inc.
+License: Unicode
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ The complete text of the Apache License Version 2.0 can be found in
+ in the file 'licenses/Apache-2.0'.
+
+License: LGPL-2+
+ The GNU LIBICONV Library is free software; you can redistribute it
+ and/or modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+ .
+ The GNU LIBICONV Library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+ .
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU LIBICONV Library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+ .
+ The full text of the GNU Library General Public License version 2 can be
+ found in the file 'licenses/LGPL-2'.
+
+License: MIT-like
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ * The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: transtab
+ This package contains a table for transliterating ISO 10646 texts into
+ best-effort representations using smaller coded character sets (ASCII,
+ ISO 8859, etc.). It is primarily intended for inclusion into the GNU C
+ library, but might be of use for other applications as well. The table
+ is freely available to anyone.
+
+License: Unicode
+ UNICODE LICENSE V3
+ .
+ COPYRIGHT AND PERMISSION NOTICE
+ .
+ Copyright © 1991-2023 Unicode, Inc.
+ .
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of data files and any associated documentation (the "Data Files") or
+ software and any associated documentation (the "Software") to deal in the
+ Data Files or Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
+ copies of the Data Files or Software, and to permit persons to whom the
+ Data Files or Software are furnished to do so, provided that either (a)
+ this copyright and permission notice appear with all copies of the Data
+ Files or Software, or (b) this copyright and permission notice appear in
+ associated Documentation.
+ .
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ THIRD PARTY RIGHTS.
+ .
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+ FILES OR SOFTWARE.
+ .
+ Except as contained in this notice, the name of a copyright holder shall
+ not be used in advertising or otherwise to promote the sale, use or other
+ dealings in these Data Files or Software without prior written
+ authorization of the copyright holder.
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/Origin,b28 b/frontends/riscos/distribution/3rdParty/Iconv/Origin,b28
new file mode 100644
index 000000000..547a62896
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/Origin,b28
@@ -0,0 +1 @@
+https://www.netsurf-browser.org/iconv/
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/ReadMe b/frontends/riscos/distribution/3rdParty/Iconv/ReadMe
index 907c2c7c8..f49a1b0b2 100644
--- a/frontends/riscos/distribution/3rdParty/Iconv/ReadMe
+++ b/frontends/riscos/distribution/3rdParty/Iconv/ReadMe
@@ -24,22 +24,5 @@ See the ReadMe file in that directory for further information.
Licence
=======
-Iconv is Copyright © 2004-13 J-M Bell
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
- * The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+Please see the COPYING file for full licensing information. No part of the
+test suite is included in this binary distribution.
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0 b/frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2 b/frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2
new file mode 100644
index 000000000..5bc8fb2c8
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2
@@ -0,0 +1,481 @@
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/frontends/riscos/distribution/3rdParty/SharedULib/Copyright b/frontends/riscos/distribution/3rdParty/SharedULib/Copyright
index b6784ed06..4939ec36e 100644
--- a/frontends/riscos/distribution/3rdParty/SharedULib/Copyright
+++ b/frontends/riscos/distribution/3rdParty/SharedULib/Copyright
@@ -7,9 +7,9 @@ Nicholas Clark and Peter Burwood.
These contributors have expressed "no interest" in any further licensing or
copyright in regards to UnixLib.
-Other sections are (c) 1999-2006 Nick Burrett, John Tytgat, Peter Naulls,
-Peter Teichmann, Alex Waugh, Christian Ludlam, Theo Markettos, Graham Shaw,
-James Bursa and John-Mark Bell.
+Other sections are (c) 1999-2011 Nick Burrett, John Tytgat, Peter Naulls,
+Lee Noar, Peter Teichmann, Alex Waugh, Christian Ludlam, Theo Markettos,
+Graham Shaw, James Bursa and John-Mark Bell.
In January 2005, permission was obtained from all relevant contributors
by Peter Naulls to license all past and present contributions to UnixLib
@@ -86,7 +86,7 @@ http://www.fsf.org/licenses/why-not-lgpl.html
===========================================================================
- Copyright (c) 1995-2005 UnixLib Developers
+ Copyright (c) 1995-2009 UnixLib Developers
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -280,7 +280,6 @@ works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
-
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -631,8 +630,8 @@ safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -658,7 +657,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
- <signature of Ty Coon>, 1 April 1990
+ <signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
diff --git a/frontends/riscos/distribution/3rdParty/SharedULib/Origin,b28 b/frontends/riscos/distribution/3rdParty/SharedULib/Origin,b28
new file mode 100644
index 000000000..246443e2c
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/SharedULib/Origin,b28
@@ -0,0 +1 @@
+https://www.riscos.info/downloads/gccsdk/sharedunixlib/
diff --git a/frontends/riscos/distribution/3rdParty/Tinct/Origin,b28 b/frontends/riscos/distribution/3rdParty/Tinct/Origin,b28
new file mode 100644
index 000000000..3081d9159
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Tinct/Origin,b28
@@ -0,0 +1 @@
+http://www.tinct.net/tinct.asp
diff --git a/frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0 b/frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/frontends/riscos/distribution/3rdParty/Unicode/Copyright b/frontends/riscos/distribution/3rdParty/Unicode/Copyright
new file mode 100644
index 000000000..f1a33a5d0
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Unicode/Copyright
@@ -0,0 +1,66 @@
+Files: !Unicode.*
+Copyright:
+ 1997 Acorn Computers Ltd
+ 1999, 2001 Pace Micro Technology plc
+License: Apache-2.0
+
+Files: !Unicode.Files.CharNames
+Copyright: 2002 Unicode, Inc
+License: Unicode
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ The complete text of the Apache License Version 2.0 can be found in
+ in the file 'Apache-2.0'.
+
+License: Unicode
+ UNICODE LICENSE V3
+ .
+ COPYRIGHT AND PERMISSION NOTICE
+ .
+ Copyright © 1991-2023 Unicode, Inc.
+ .
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of data files and any associated documentation (the "Data Files") or
+ software and any associated documentation (the "Software") to deal in the
+ Data Files or Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
+ copies of the Data Files or Software, and to permit persons to whom the
+ Data Files or Software are furnished to do so, provided that either (a)
+ this copyright and permission notice appear with all copies of the Data
+ Files or Software, or (b) this copyright and permission notice appear in
+ associated Documentation.
+ .
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+ THIRD PARTY RIGHTS.
+ .
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+ FILES OR SOFTWARE.
+ .
+ Except as contained in this notice, the name of a copyright holder shall
+ not be used in advertising or otherwise to promote the sale, use or other
+ dealings in these Data Files or Software without prior written
+ authorization of the copyright holder.
diff --git a/frontends/riscos/distribution/3rdParty/Unicode/Origin,b28 b/frontends/riscos/distribution/3rdParty/Unicode/Origin,b28
new file mode 100644
index 000000000..573a74db2
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Unicode/Origin,b28
@@ -0,0 +1 @@
+https://www.riscosopen.org/
diff --git a/frontends/riscos/distribution/LeesMij b/frontends/riscos/distribution/LeesMij
index a0d3ff41f..3a48b77ec 100644
--- a/frontends/riscos/distribution/LeesMij
+++ b/frontends/riscos/distribution/LeesMij
@@ -6,7 +6,7 @@ broncode.
De nieuwste versie van NetSurf is verkrijgbaar via:
- http://www.netsurf-browser.org/
+ https://www.netsurf-browser.org/
Installatie
@@ -59,15 +59,3 @@ voor meer informatie.
De meegeleverde !Boot- en !System-mappen bevatten items die door
derden zijn geproduceerd. De bijbehorende licenties zijn meegeleverd
in de map '3rdParty'.
-
-AcornURI
- http://sudden.recoil.org/others/
-
-Iconv
- http://www.netsurf-browser.org/iconv/
-
-SharedUnixLibrary
- http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
-
-Tinct
- http://www.tinct.net/tinct.asp
diff --git a/frontends/riscos/distribution/ReadMe b/frontends/riscos/distribution/ReadMe
index eec39d6ab..6a4429b12 100644
--- a/frontends/riscos/distribution/ReadMe
+++ b/frontends/riscos/distribution/ReadMe
@@ -5,7 +5,7 @@ This is a development build of NetSurf, an open source web browser.
The latest version of NetSurf is available from:
- http://www.netsurf-browser.org/
+ https://www.netsurf-browser.org/
Installation
@@ -31,7 +31,10 @@ Double click on !NetSurf in your chosen location to launch NetSurf.
Note NetSurf requires WindowManager 3.80 or later. This comes
with RISC OS 4 and above. RISC OS 3 users should install
the Universal Boot Sequence from:
- http://acorn.riscos.com/riscos/releases/UniBoot/
+ http://www.riscos.com/ftp_space/generic/uniboot/ or,
+ alternatively, use the HardDisc4 and associated System
+ resources provided by RISC OS Open:
+ https://www.riscosopen.org/content/downloads/common
Note RISC OS 3.1 and earlier are not supported.
@@ -45,17 +48,5 @@ for details.
The !Boot and !System directories contain items provided produced
-by third parties. Their licences are provided in the 3rd Party
-directory.
-
-AcornURI
- http://sudden.recoil.org/others/
-
-Iconv
- http://www.netsurf-browser.org/iconv/
-
-SharedUnixLibrary
- http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
-
-Tinct
- http://www.tinct.net/tinct.asp
+by third parties. Their licences, associated documentation, and
+origin are provided in the 3rd Party directory.
diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c
index bdc705426..216f5750c 100644
--- a/frontends/riscos/download.c
+++ b/frontends/riscos/download.c
@@ -313,8 +313,8 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
/** @todo change this to take a reference to the nsurl and use
* that value directly rather than using a fixed buffer.
*/
- strncpy(dw->url, nsurl_access(url), sizeof dw->url);
- dw->url[sizeof dw->url - 1] = 0;
+ strncpy(dw->url, nsurl_access(url), sizeof(dw->url) - 1);
+ dw->url[sizeof(dw->url) - 1] = 0;
dw->status[0] = 0;
gettimeofday(&dw->start_time, 0);
@@ -414,7 +414,8 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
return 0;
}
else {
- strncpy(dw->path, local_path, sizeof dw->path);
+ strncpy(dw->path, local_path, sizeof(dw->path) - 1);
+ dw->path[sizeof(dw->path)-1] = 0;
free(local_path);
}
@@ -484,7 +485,8 @@ static void gui_download_window_error(struct gui_download_window *dw,
riscos_schedule(-1, ro_gui_download_update_status_wrapper, dw);
/* place error message in status icon in red */
- strncpy(dw->status, error_msg, sizeof dw->status);
+ strncpy(dw->status, error_msg, sizeof(dw->status) - 1);
+ dw->status[sizeof(dw->status)-1] = 0;
error = xwimp_set_icon_state(dw->window,
ICON_DOWNLOAD_STATUS,
wimp_COLOUR_RED << wimp_ICON_FG_COLOUR_SHIFT,
@@ -872,11 +874,11 @@ bool ro_gui_download_click(wimp_pointer *pointer)
ro_gui_drag_icon(x, y, sprite);
} else if (pointer->i == ICON_DOWNLOAD_DESTINATION) {
- char command[256] = "Filer_OpenDir ";
+ char command[sizeof(dw->path) + 14 + 1] = "Filer_OpenDir ";
char *dot;
- strncpy(command + 14, dw->path, 242);
- command[255] = 0;
+ strncpy(command + 14, dw->path, sizeof(command) - 14 - 1);
+ command[sizeof(command) - 1] = 0;
dot = strrchr(command, '.');
if (dot) {
os_error *error;
@@ -1384,7 +1386,8 @@ bool ro_gui_download_save(struct gui_download_window *dw,
}
dw->saved = true;
- strncpy(dw->path, file_name, sizeof dw->path);
+ strncpy(dw->path, file_name, sizeof(dw->path) - 1);
+ dw->path[sizeof(dw->path)-1] = 0;
if (!dw->send_dataload || dw->save_message.data.data_xfer.est_size != -1)
ro_gui_download_remember_dir(file_name);
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index f9268cac1..1a2b944a8 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -144,27 +144,6 @@ static ns_wimp_message_list task_messages = {
message_URI_PROCESS,
message_URI_RETURN_RESULT,
message_INET_SUITE_OPEN_URL,
-#ifdef WITH_PLUGIN
- message_PLUG_IN_OPENING,
- message_PLUG_IN_CLOSED,
- message_PLUG_IN_RESHAPE_REQUEST,
- message_PLUG_IN_FOCUS,
- message_PLUG_IN_URL_ACCESS,
- message_PLUG_IN_STATUS,
- message_PLUG_IN_BUSY,
- message_PLUG_IN_STREAM_NEW,
- message_PLUG_IN_STREAM_WRITE,
- message_PLUG_IN_STREAM_WRITTEN,
- message_PLUG_IN_STREAM_DESTROY,
- message_PLUG_IN_OPEN,
- message_PLUG_IN_CLOSE,
- message_PLUG_IN_RESHAPE,
- message_PLUG_IN_STREAM_AS_FILE,
- message_PLUG_IN_NOTIFY,
- message_PLUG_IN_ABORT,
- message_PLUG_IN_ACTION,
- /* message_PLUG_IN_INFORMED, (not provided by oslib) */
-#endif
message_PRINT_SAVE,
message_PRINT_ERROR,
message_PRINT_TYPE_ODD,
@@ -306,7 +285,7 @@ set_colour_from_wimp(struct nsoption_s *opts,
static nserror set_defaults(struct nsoption_s *defaults)
{
/* Set defaults for absent option strings */
- nsoption_setnull_charp(ca_bundle, strdup("NetSurf:Resources.ca-bundle"));
+ nsoption_setnull_charp(ca_bundle, strdup("<NetSurf$CABundle>"));
nsoption_setnull_charp(cookie_file, strdup("NetSurf:Cookies"));
nsoption_setnull_charp(cookie_jar, strdup(CHOICES_PREFIX "Cookies"));
@@ -1231,16 +1210,9 @@ static nserror gui_init(int argc, char** argv)
/* Initialise save complete functionality */
save_complete_init();
- /* Initialise the font subsystem */
- nsfont_init();
-
- /* Load in visited URLs, Cookies, and hostlist */
+ /* Load in visited URLs and Cookies */
urldb_load(nsoption_charp(url_path));
urldb_load_cookies(nsoption_charp(cookie_file));
- hotlist_init(nsoption_charp(hotlist_path),
- nsoption_bool(external_hotlists) ?
- NULL :
- nsoption_charp(hotlist_save));
/* Initialise with the wimp */
error = xwimp_initialise(wimp_VERSION_RO38, task_name,
@@ -1271,6 +1243,15 @@ static nserror gui_init(int argc, char** argv)
ro_message_register_route(message_WINDOW_INFO,
ro_msg_window_info);
+ /* Initialise the font subsystem (must be after Wimp_Initialise) */
+ nsfont_init();
+
+ /* Initialise the hotlist (must be after fonts) */
+ hotlist_init(nsoption_charp(hotlist_path),
+ nsoption_bool(external_hotlists) ?
+ NULL :
+ nsoption_charp(hotlist_save));
+
/* Initialise global information */
ro_gui_get_screen_properties();
ro_gui_wimp_get_desktop_font();
@@ -1777,51 +1758,6 @@ static void ro_gui_user_message(wimp_event_no event, wimp_message *message)
ro_url_message_received(message);
}
break;
-#ifdef WITH_PLUGIN
- case message_PLUG_IN_OPENING:
- plugin_opening(message);
- break;
- case message_PLUG_IN_CLOSED:
- plugin_closed(message);
- break;
- case message_PLUG_IN_RESHAPE_REQUEST:
- plugin_reshape_request(message);
- break;
- case message_PLUG_IN_FOCUS:
- break;
- case message_PLUG_IN_URL_ACCESS:
- plugin_url_access(message);
- break;
- case message_PLUG_IN_STATUS:
- plugin_status(message);
- break;
- case message_PLUG_IN_BUSY:
- break;
- case message_PLUG_IN_STREAM_NEW:
- plugin_stream_new(message);
- break;
- case message_PLUG_IN_STREAM_WRITE:
- break;
- case message_PLUG_IN_STREAM_WRITTEN:
- plugin_stream_written(message);
- break;
- case message_PLUG_IN_STREAM_DESTROY:
- break;
- case message_PLUG_IN_OPEN:
- if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
- plugin_open_msg(message);
- break;
- case message_PLUG_IN_CLOSE:
- if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
- plugin_close_msg(message);
- break;
- case message_PLUG_IN_RESHAPE:
- case message_PLUG_IN_STREAM_AS_FILE:
- case message_PLUG_IN_NOTIFY:
- case message_PLUG_IN_ABORT:
- case message_PLUG_IN_ACTION:
- break;
-#endif
case message_PRINT_SAVE:
if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
ro_print_save_bounce(message);
diff --git a/frontends/riscos/gui/button_bar.c b/frontends/riscos/gui/button_bar.c
index 34ae39ae5..50e1de3c1 100644
--- a/frontends/riscos/gui/button_bar.c
+++ b/frontends/riscos/gui/button_bar.c
@@ -189,7 +189,8 @@ struct button_bar *ro_gui_button_bar_create(struct theme_descriptor *theme,
icon->bar_next = NULL;
strncpy(icon->sprite, buttons[def].icon,
- BUTTONBAR_SPRITE_NAME_LENGTH);
+ BUTTONBAR_SPRITE_NAME_LENGTH - 1);
+ icon->sprite[BUTTONBAR_SPRITE_NAME_LENGTH-1] = 0;
snprintf(icon->validation, BUTTONBAR_VALIDATION_LENGTH,
"R5;S%s,p%s", icon->sprite, icon->sprite);
diff --git a/frontends/riscos/gui/throbber.c b/frontends/riscos/gui/throbber.c
index f3b79a68e..e3e4106cc 100644
--- a/frontends/riscos/gui/throbber.c
+++ b/frontends/riscos/gui/throbber.c
@@ -32,6 +32,7 @@
#include "oslib/wimp.h"
#include "utils/log.h"
+#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/gui/throbber.h"
@@ -385,7 +386,8 @@ bool ro_gui_throbber_animate(struct throbber *throbber)
throbber->current_frame = 1;
snprintf(sprite_name, THROBBER_SPRITE_NAME_LENGTH,
- "throbber%i", throbber->current_frame);
+ "throbber%i",
+ min(max(throbber->current_frame, 0), 999));
ro_gui_set_icon_string(throbber->window, throbber->icon,
sprite_name, true);
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index ec21e9371..99a90f58a 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -351,9 +351,12 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
if (url_bar->display) {
icon.icon.flags |= (wimp_BUTTON_NEVER <<
wimp_ICON_BUTTON_TYPE_SHIFT);
- } else {
+ } else if (!ns_wimp_has_text_selection()) {
icon.icon.flags |= (wimp_BUTTON_WRITE_CLICK_DRAG <<
wimp_ICON_BUTTON_TYPE_SHIFT);
+ } else {
+ icon.icon.flags |= (wimp_BUTTON_WRITABLE <<
+ wimp_ICON_BUTTON_TYPE_SHIFT);
}
error = xwimp_create_icon(&icon, &url_bar->text.icon);
if (error) {
@@ -1506,7 +1509,7 @@ ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
struct gui_window *g)
{
int type = 0;
- char sprite[URLBAR_FAVICON_NAME_LENGTH];
+ char sprite[URLBAR_FAVICON_NAME_LENGTH-1];
struct hlcache_handle *h;
if (url_bar == NULL ||
diff --git a/frontends/riscos/iconbar.c b/frontends/riscos/iconbar.c
index a9a62a98f..c85827030 100644
--- a/frontends/riscos/iconbar.c
+++ b/frontends/riscos/iconbar.c
@@ -207,7 +207,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
switch (action) {
case HELP_OPEN_CONTENTS:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
diff --git a/frontends/riscos/image.c b/frontends/riscos/image.c
index 0bad94810..5c90b05ba 100644
--- a/frontends/riscos/image.c
+++ b/frontends/riscos/image.c
@@ -27,6 +27,7 @@
#include "riscos/image.h"
#include "riscos/gui.h"
+#include "riscos/wimp.h"
#include "riscos/tinct.h"
/**
@@ -65,11 +66,11 @@ static bool image_redraw_tinct(osspriteop_id header, int x, int y,
if (alpha) {
error = _swix(Tinct_PlotScaledAlpha, _INR(2,7),
- header, x, y - req_height,
+ header, x, y,
req_width, req_height, tinct_options);
} else {
error = _swix(Tinct_PlotScaled, _INR(2,7),
- header, x, y - req_height,
+ header, x, y,
req_width, req_height, tinct_options);
}
@@ -144,13 +145,11 @@ static bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
if (tile) {
error = xosspriteop_plot_tiled_sprite(osspriteop_PTR,
- osspriteop_UNSPECIFIED, header,
- x, (int)(y - req_height),
+ osspriteop_UNSPECIFIED, header, x, y,
osspriteop_USE_MASK, &f, table);
} else {
error = xosspriteop_put_sprite_scaled(osspriteop_PTR,
- osspriteop_UNSPECIFIED, header,
- x, (int)(y - req_height),
+ osspriteop_UNSPECIFIED, header, x, y,
osspriteop_USE_MASK, &f, table);
}
if (error) {
@@ -173,17 +172,19 @@ static bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
* Only replaces mode if existing mode matches \ref old.
*
* \param[in] area The sprite area containing the sprite.
+ * \param[in] type Requested plot mode.
* \param[in] old Existing sprite mode to check for.
* \param[in] new Sprite mode to set if existing mode is expected.
*/
static inline void image__override_sprite_mode(
osspriteop_area *area,
+ image_type type,
os_mode old,
os_mode new)
{
osspriteop_header *sprite = (osspriteop_header *)(area + 1);
- if (sprite->mode == old) {
+ if (sprite->mode == old && type == IMAGE_PLOT_TINCT_ALPHA) {
sprite->mode = new;
}
}
@@ -210,6 +211,7 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
colour background_colour,
bool repeatx, bool repeaty, bool background, image_type type)
{
+ image_type used_type = type;
unsigned int tinct_options;
bool tinct_avoid = false;
bool res = false;
@@ -220,10 +222,13 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
osspriteop_id header = (osspriteop_id)
((char*) area + area->first);
+
req_width *= 2;
req_height *= 2;
width *= 2;
height *= 2;
+ y -= req_height;
+
tinct_options = background ? nsoption_int(plot_bg_quality) :
nsoption_int(plot_fg_quality);
@@ -234,12 +239,24 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
* is that we lose the optimisation for tiling tiny bitmaps.
*/
if (tinct_options & tinct_USE_OS_SPRITE_OP) {
- type = IMAGE_PLOT_OS;
+ used_type = IMAGE_PLOT_OS;
tinct_avoid = true;
}
}
- switch (type) {
+ if (tinct_avoid) {
+ int xeig;
+ int yeig;
+
+ if (ro_gui_wimp_read_eig_factors(os_CURRENT_MODE,
+ &xeig, &yeig)) {
+
+ req_width = (req_width / 2) * (4 >> xeig);
+ req_height = (req_height / 2) * (4 >> yeig);
+ }
+ }
+
+ switch (used_type) {
case IMAGE_PLOT_TINCT_ALPHA:
res = image_redraw_tinct(header, x, y,
req_width, req_height,
@@ -260,7 +277,7 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
case IMAGE_PLOT_OS:
if (tinct_avoid) {
- image__override_sprite_mode(area,
+ image__override_sprite_mode(area, type,
tinct_SPRITE_MODE,
alpha_SPRITE_MODE);
}
@@ -268,7 +285,7 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
req_height, width, height,
repeatx | repeaty);
if (tinct_avoid) {
- image__override_sprite_mode(area,
+ image__override_sprite_mode(area, type,
alpha_SPRITE_MODE,
tinct_SPRITE_MODE);
}
diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index b390c693d..e87f47857 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -106,7 +106,7 @@ static bool print_document(struct gui_window *g, const char *filename);
static const char *print_declare_fonts(struct hlcache_handle *h);
static void print_fonts_callback(void *context,
const char *font_name, unsigned int font_size,
- const char *s8, unsigned short *s16, unsigned int n,
+ const uint8_t *s8, const uint32_t *s32, unsigned int n,
int x, int y);
@@ -998,7 +998,7 @@ end:
void print_fonts_callback(void *context,
const char *font_name, unsigned int font_size,
- const char *s8, unsigned short *s16, unsigned int n,
+ const uint8_t *s8, const uint32_t *s32, unsigned int n,
int x, int y)
{
unsigned int i;
@@ -1009,7 +1009,7 @@ void print_fonts_callback(void *context,
(void) x; /* unused */
(void) y; /* unused */
- assert(s8 || s16);
+ assert(s8 || s32);
/* check if the font name is new */
for (i = 0; i != print_fonts_count &&
diff --git a/frontends/riscos/save.c b/frontends/riscos/save.c
index 86797602b..b435787b0 100644
--- a/frontends/riscos/save.c
+++ b/frontends/riscos/save.c
@@ -40,8 +40,10 @@
#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/utf8.h"
+#include "utils/nsoption.h"
#include "utils/nsurl.h"
+#include "utils/utf8.h"
+#include "utils/utils.h"
#include "netsurf/browser_window.h"
#include "netsurf/window.h"
#include "netsurf/bitmap.h"
@@ -60,7 +62,6 @@
#include "riscos/menus.h"
#include "riscos/message.h"
#include "riscos/mouse.h"
-#include "utils/nsoption.h"
#include "riscos/query.h"
#include "riscos/save.h"
#include "riscos/save_draw.h"
@@ -243,7 +244,7 @@ ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name)
struct bitmap *bitmap;
osspriteop_area *area;
- bitmap = riscos_bitmap_create(34, 34, BITMAP_NEW | BITMAP_OPAQUE | BITMAP_CLEAR_MEMORY);
+ bitmap = riscos_bitmap_create(34, 34, BITMAP_OPAQUE | BITMAP_CLEAR);
if (!bitmap) {
NSLOG(netsurf, INFO, "Thumbnail initialisation failed.");
return false;
@@ -257,7 +258,8 @@ ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name)
}
sprite_header = (osspriteop_header *)(area + 1);
- strncpy(sprite_header->name, name, 12);
+ memset(sprite_header->name, 0, 12);
+ memcpy(sprite_header->name, name, min(strlen(name), 12));
/* we can't resize the saveas sprite area because it may move
@@ -1018,7 +1020,7 @@ ro_gui_save_content(struct hlcache_handle *h, char *path, bool force_overwrite)
}
else
gui_save_current_type = GUI_SAVE_OBJECT_ORIG; /** \todo do this earlier? */
- /* no break */
+ fallthrough;
case GUI_SAVE_SOURCE:
case GUI_SAVE_OBJECT_ORIG:
source_data = content_get_source_data(h, &source_size);
diff --git a/frontends/riscos/scripts/Run b/frontends/riscos/scripts/Run
index 4a51d7838..3368140d2 100644
--- a/frontends/riscos/scripts/Run
+++ b/frontends/riscos/scripts/Run
@@ -33,16 +33,19 @@ SetMacro NetSurf$ChoicesSave <Choices$Write>.WWW.NetSurf.Choices
RMEnsure UtilityModule 3.00 Error NetSurf needs RISC OS 3 or later
| Ensure Nested WIMP is installed
-| http://acorn.riscos.com/ (in the universal boot archive)
-RMEnsure WindowManager 3.80 Error NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://acorn.riscos.com/
+| http://www.riscos.com/ftp_space/generic/uniboot/ (i.e. install universal boot)
+RMEnsure WindowManager 3.80 Error NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://www.riscos.com/ftp_space/generic/uniboot/
| Check for various key resources - can't do much if they don't exist
If "<System$Path>" = "" Then Set System$Path_Message System resources not found.
If "<Wimp$ScrapDir>" = "" Then Error Scrap resource not found.
If "<InetDBase$Path>" = "" Then Error Internet resources can not be found
-If "<Unicode$Path>" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at http://www.netsurf-browser.org/projects/iconv/
+If "<Unicode$Path>" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at https://www.netsurf-browser.org/projects/iconv/
If "<Inet$MimeMappings>" = "" Then Set Inet$MimeMappings InetDBase:MimeMap
+| Use OS copy of root CA bundle, if present
+IfThere InetDBase:CertData Then Set NetSurf$CABundle InetDBase:CertData Else Set NetSurf$CABundle NetSurf:Resources.ca-bundle
+
| Define this alias for clarity
| Syntax: NetSurfRMLoad <Path to module>
Set Alias$NetSurfRMLoad IfThere %%*0 Then RMLoad %%*0
@@ -65,6 +68,10 @@ RMEnsure DrawFile 1.30 Error NetSurf requires the DrawFile module. This can be d
RMEnsure SharedUnixLibrary 1.07 NetSurfRMLoad System:Modules.SharedULib
RMEnsure SharedUnixLibrary 1.07 Error NetSurf requires SharedUnixLibrary 1.07 or later. Please use the RISC OS Configure app to update the computer's !System directory from the NetSurf archive.
+| Ensure ARMEABISupport is installed
+|RMEnsure ARMEABISupport 1.04 NetSurfRMLoad System:Modules.ARMEABISupport
+|RMEnsure ARMEABISupport 1.04 Error NetSurf requires ARMEABISupport 1.04 or later. Please use the RISC OS Configure app to update the computer's !System directory from the NetSurf archive.
+
| Load AcornURI if it isn't already
Unset NetSurf$Start_URI_Handler
RMEnsure AcornURI 0.12 Set NetSurf$Start_URI_Handler 1
diff --git a/frontends/riscos/templates/de b/frontends/riscos/templates/de
index 19a23e330..b5710d467 100644
--- a/frontends/riscos/templates/de
+++ b/frontends/riscos/templates/de
@@ -1145,7 +1145,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
text.size:*
text.validation:"R2"
}
@@ -3370,15 +3370,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,496,-212
-#ifdef WITH_PLUGIN
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
-#else
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
-#endif
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Plugins nicht benutzen"
+ text_and_sprite.text:"CSS nicht benutzen"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
diff --git a/frontends/riscos/templates/en b/frontends/riscos/templates/en
index d5259d922..6ea18a859 100644
--- a/frontends/riscos/templates/en
+++ b/frontends/riscos/templates/en
@@ -1355,7 +1355,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
text.size:*
text.validation:"R2"
}
@@ -3040,15 +3040,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,344,-212
-#ifdef WITH_PLUGIN
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
-#else
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
-#endif
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Disable plug-ins"
+ text_and_sprite.text:"Disable CSS"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
diff --git a/frontends/riscos/templates/fr b/frontends/riscos/templates/fr
index 76a4611bf..e2741df4a 100644
--- a/frontends/riscos/templates/fr
+++ b/frontends/riscos/templates/fr
@@ -1145,7 +1145,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
text.size:*
text.validation:"R2"
}
@@ -2842,15 +2842,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,404,-212
-#ifdef WITH_PLUGIN
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
-#else
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
-#endif
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Désactiver les plug-ins"
+ text_and_sprite.text:"Désactiver les CSS"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
diff --git a/frontends/riscos/templates/nl b/frontends/riscos/templates/nl
index 01188b097..24b176891 100644
--- a/frontends/riscos/templates/nl
+++ b/frontends/riscos/templates/nl
@@ -1359,8 +1359,8 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
- text.size:43
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
+ text.size:*
text.validation:"R2"
}
wimp_icon {
@@ -3090,11 +3090,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,540,-212
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
+ icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Plug-ins uitschakelen"
+ text_and_sprite.text:"CSS uitschakelen"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
diff --git a/frontends/riscos/textarea.c b/frontends/riscos/textarea.c
index 6f41c640b..69b7eede1 100644
--- a/frontends/riscos/textarea.c
+++ b/frontends/riscos/textarea.c
@@ -33,6 +33,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
+#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/oslib_pre7.h"
@@ -1023,7 +1024,7 @@ bool ro_textarea_key_press(wimp_key *key)
break;
}
- /* fall through */
+ fallthrough;
case wimp_KEY_ESCAPE:
keypress = *key;
keypress.w = ta->parent;
diff --git a/frontends/riscos/ucstables.c b/frontends/riscos/ucstables.c
index 3e31c992e..a94e4348c 100644
--- a/frontends/riscos/ucstables.c
+++ b/frontends/riscos/ucstables.c
@@ -398,49 +398,47 @@ static const char *localencodings[] = {
"ISO-8859-10//TRANSLIT",
"ISO-8859-13//TRANSLIT",
"ISO-8859-14//TRANSLIT",
- "ISO-8859-16//TRANSLIT",
-#define CONT_ENC_END 116 /* RISC OS alphabet numbers lie in a
- * contiguous range [100,CONT_ENC_END]
- * _except_ for Cyrillic2, which doesn't.
- */
- "CP866//TRANSLIT" /* Cyrillic2 - 120 */
+ "ISO-8859-16//TRANSLIT", /* Latin10 - 116 */
+ NULL, /* UTF-16, if you believe HdrSrc (Unused) */
+ NULL, /* Unused */
+ NULL, /* Unused */
+ "CP866//TRANSLIT" /* Cyrillic2 - 120 */
};
-static const struct special {
- char local; /**< Local 8bit representation */
- char len; /**< Length (in bytes) of UTF-8 character */
- const char *utf; /**< UTF-8 representation */
-} special_chars[] = {
- { 0x80, 3, "\xE2\x82\xAC" }, /* EURO SIGN */
- { 0x81, 2, "\xC5\xB4" }, /* LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
- { 0x82, 2, "\xC5\xB5" }, /* LATIN SMALL LETTER W WITH CIRCUMFLEX */
- { 0x84, 3, "\xE2\x9C\x98" }, /* HEAVY BALLOT X */
- { 0x85, 2, "\xC5\xB6" }, /* LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
- { 0x86, 2, "\xC5\xB7" }, /* LATIN SMALL LETTER Y WITH CIRCUMFLEX */
- { 0x88, 3, "\xE2\x87\x90" }, /* LEFTWARDS DOUBLE ARROW */
- { 0x89, 3, "\xE2\x87\x92" }, /* RIGHTWARDS DOUBLE ARROW */
- { 0x8a, 3, "\xE2\x87\x93" }, /* DOWNWARDS DOUBLE ARROW */
- { 0x8b, 3, "\xE2\x87\x91" }, /* UPWARDS DOUBLE ARROW */
- { 0x8c, 3, "\xE2\x80\xA6" }, /* HORIZONTAL ELLIPSIS */
- { 0x8d, 3, "\xE2\x84\xA2" }, /* TRADE MARK SIGN */
- { 0x8e, 3, "\xE2\x80\xB0" }, /* PER MILLE SIGN */
- { 0x8f, 3, "\xE2\x80\xA2" }, /* BULLET */
- { 0x90, 3, "\xE2\x80\x98" }, /* LEFT SINGLE QUOTATION MARK */
- { 0x91, 3, "\xE2\x80\x99" }, /* RIGHT SINGLE QUOTATION MARK */
- { 0x92, 3, "\xE2\x80\xB9" }, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
- { 0x93, 3, "\xE2\x80\xBA" }, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
- { 0x94, 3, "\xE2\x80\x9C" }, /* LEFT DOUBLE QUOTATION MARK */
- { 0x95, 3, "\xE2\x80\x9D" }, /* RIGHT DOUBLE QUOTATION MARK */
- { 0x96, 3, "\xE2\x80\x9E" }, /* DOUBLE LOW-9 QUOTATION MARK */
- { 0x97, 3, "\xE2\x80\x93" }, /* EN DASH */
- { 0x98, 3, "\xE2\x80\x94" }, /* EM DASH */
- { 0x99, 3, "\xE2\x88\x92" }, /* MINUS SIGN */
- { 0x9a, 2, "\xC5\x92" }, /* LATIN CAPITAL LIGATURE OE */
- { 0x9b, 2, "\xC5\x93" }, /* LATIN SMALL LIGATURE OE */
- { 0x9c, 3, "\xE2\x80\xA0" }, /* DAGGER */
- { 0x9d, 3, "\xE2\x80\xA1" }, /* DOUBLE DAGGER */
- { 0x9e, 3, "\xEF\xAC\x81" }, /* LATIN SMALL LIGATURE FI */
- { 0x9f, 3, "\xEF\xAC\x82" } /* LATIN SMALL LIGATURE FL */
+/* These are the Acorn Latin1 C1 block between [0x80,0x9f] */
+static const char *special_chars[] = {
+ "\xE2\x82\xAC", /* EURO SIGN */
+ "\xC5\xB4", /* LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
+ "\xC5\xB5", /* LATIN SMALL LETTER W WITH CIRCUMFLEX */
+ NULL, /* unused */
+ "\xE2\x9C\x98", /* HEAVY BALLOT X */
+ "\xC5\xB6", /* LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
+ "\xC5\xB7", /* LATIN SMALL LETTER Y WITH CIRCUMFLEX */
+ NULL, /* unused */
+ "\xE2\x87\x90", /* LEFTWARDS DOUBLE ARROW */
+ "\xE2\x87\x92", /* RIGHTWARDS DOUBLE ARROW */
+ "\xE2\x87\x93", /* DOWNWARDS DOUBLE ARROW */
+ "\xE2\x87\x91", /* UPWARDS DOUBLE ARROW */
+ "\xE2\x80\xA6", /* HORIZONTAL ELLIPSIS */
+ "\xE2\x84\xA2", /* TRADE MARK SIGN */
+ "\xE2\x80\xB0", /* PER MILLE SIGN */
+ "\xE2\x80\xA2", /* BULLET */
+ "\xE2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
+ "\xE2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
+ "\xE2\x80\xB9", /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
+ "\xE2\x80\xBA", /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
+ "\xE2\x80\x9C", /* LEFT DOUBLE QUOTATION MARK */
+ "\xE2\x80\x9D", /* RIGHT DOUBLE QUOTATION MARK */
+ "\xE2\x80\x9E", /* DOUBLE LOW-9 QUOTATION MARK */
+ "\xE2\x80\x93", /* EN DASH */
+ "\xE2\x80\x94", /* EM DASH */
+ "\xE2\x88\x92", /* MINUS SIGN */
+ "\xC5\x92", /* LATIN CAPITAL LIGATURE OE */
+ "\xC5\x93", /* LATIN SMALL LIGATURE OE */
+ "\xE2\x80\xA0", /* DAGGER */
+ "\xE2\x80\xA1", /* DOUBLE DAGGER */
+ "\xEF\xAC\x81", /* LATIN SMALL LIGATURE FI */
+ "\xEF\xAC\x82" /* LATIN SMALL LIGATURE FL */
};
@@ -470,20 +468,22 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
/* read system alphabet */
error = xosbyte1(osbyte_ALPHABET_NUMBER, 127, 0, &alphabet);
- if (error)
+ /* Assume Latin1 for anything we know nothing about */
+ if (error || alphabet < territory_ALPHABET_BFONT ||
+ alphabet > territory_ALPHABET_CYRILLIC2)
alphabet = territory_ALPHABET_LATIN1;
/* UTF-8 -> simply copy string */
- if (alphabet == 111 /* UTF-8 */) {
+ if (alphabet == territory_ALPHABET_UTF8) {
*result = strndup(string, len);
return NSERROR_OK;
}
/* get encoding name */
- enc = (alphabet <= CONT_ENC_END ? localencodings[alphabet - 100]
- : (alphabet == 120 ?
- localencodings[CONT_ENC_END - 100 + 1]
- : localencodings[0]));
+ enc = localencodings[alphabet - territory_ALPHABET_BFONT];
+ /* Assume Latin1 for any that are unused */
+ if (enc == NULL)
+ enc = localencodings[0];
/* create output buffer */
*(result) = malloc(len + 1);
@@ -498,13 +498,32 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
* characters and inserting appropriate output for characters
* that iconv can't handle. */
for (off = 0; off < len; off = utf8_next(string, len, off)) {
- if (string[off] != 0xE2 &&
- string[off] != 0xC5 && string[off] != 0xEF)
+ /* Specials only start with C5/E2/EF */
+ if (string[off] != 0xC5 &&
+ string[off] != 0xE2 && string[off] != 0xEF)
continue;
+ /* Ignore truncated input */
+ if (off + 2 + (string[off] == 0xC5 ? 0 : 1) >= len)
+ continue;
+
+ /* Search to see if this character is special */
for (i = 0; i != NOF_ELEMENTS(special_chars); i++) {
- if (strncmp(string + off, special_chars[i].utf,
- special_chars[i].len) != 0)
+ /* Skip unused special char */
+ if (special_chars[i] == NULL)
+ continue;
+
+ /* Skip 2-byte non-match */
+ if (string[off] == 0xC5 &&
+ (string[off] != special_chars[i][0] ||
+ string[off+1] != special_chars[i][1]))
+ continue;
+
+ /* Skip 3-byte non-match */
+ if (string[off] != 0xC5 &&
+ (string[off] != special_chars[i][0] ||
+ string[off+1] != special_chars[i][1] ||
+ string[off+2] != special_chars[i][2]))
continue;
/* 0 length has a special meaning to utf8_to_enc */
@@ -524,9 +543,13 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
free(temp);
}
- *cur_pos = special_chars[i].local;
+ /* Emit conversion for this special character */
+ *cur_pos = 0x80 + i;
*(++cur_pos) = '\0';
- prev_off = off + special_chars[i].len;
+ prev_off = off + 2 + (string[off] == 0xC5 ? 0 : 1);
+
+ /* Return to outer loop to process remaining input */
+ break;
}
}
@@ -561,7 +584,7 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
{
os_error *error;
- int alphabet, i, num_specials = 0, result_alloc;
+ int alphabet, num_specials = 0, result_alloc;
#define SPECIAL_CHUNK_SIZE 255
size_t off, prev_off, cur_off;
char *temp;
@@ -576,11 +599,13 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
/* read system alphabet */
error = xosbyte1(osbyte_ALPHABET_NUMBER, 127, 0, &alphabet);
- if (error)
+ /* Assume Latin1 for anything we know nothing about */
+ if (error || alphabet < territory_ALPHABET_BFONT ||
+ alphabet > territory_ALPHABET_CYRILLIC2)
alphabet = territory_ALPHABET_LATIN1;
/* UTF-8 -> simply copy string */
- if (alphabet == 111 /* UTF-8 */) {
+ if (alphabet == territory_ALPHABET_UTF8) {
temp = strndup(string, len);
if (!temp)
return NSERROR_NOMEM;
@@ -590,10 +615,10 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
}
/* get encoding name */
- enc = (alphabet <= CONT_ENC_END ? localencodings[alphabet - 100]
- : (alphabet == 120 ?
- localencodings[CONT_ENC_END - 100 + 1]
- : localencodings[0]));
+ enc = localencodings[alphabet - territory_ALPHABET_BFONT];
+ /* Assume Latin1 for any that are unused */
+ if (enc == NULL)
+ enc = localencodings[0];
/* create output buffer (oversized) */
result_alloc = (len * 4) + (3 * SPECIAL_CHUNK_SIZE) + 1;
@@ -610,52 +635,54 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
* characters and inserting appropriate output for characters
* that iconv can't handle. */
for (off = 0; off < len; off++) {
+ /* Skip non-special characters */
if (string[off] < 0x80 || string[off] > 0x9f)
continue;
- for (i = 0; i != NOF_ELEMENTS(special_chars); i++) {
- if (string[off] != special_chars[i].local)
- continue;
-
- /* 0 length has a special meaning to utf8_from_enc */
- if (off - prev_off > 0) {
- err = utf8_from_enc(string + prev_off, enc,
- off - prev_off, &temp, NULL);
- if (err != NSERROR_OK) {
- assert(err != NSERROR_BAD_ENCODING);
- NSLOG(netsurf, INFO,
- "utf8_from_enc failed");
- free(*result);
- return NSERROR_NOMEM;
- }
-
- strcat((*result) + cur_off, temp);
-
- cur_off += strlen(temp);
-
- free(temp);
+ /* 0 length has a special meaning to utf8_from_enc */
+ if (off - prev_off > 0) {
+ err = utf8_from_enc(string + prev_off, enc,
+ off - prev_off, &temp, NULL);
+ if (err != NSERROR_OK) {
+ assert(err != NSERROR_BAD_ENCODING);
+ NSLOG(netsurf, INFO, "utf8_from_enc failed");
+ free(*result);
+ return NSERROR_NOMEM;
}
- strcat((*result) + cur_off, special_chars[i].utf);
+ strcat((*result) + cur_off, temp);
- cur_off += special_chars[i].len;
+ cur_off += strlen(temp);
- prev_off = off + 1;
+ free(temp);
+ }
- num_specials++;
- if (num_specials % SPECIAL_CHUNK_SIZE ==
- SPECIAL_CHUNK_SIZE - 1) {
- char *temp = realloc((*result),
- result_alloc +
- (3 * SPECIAL_CHUNK_SIZE));
- if (!temp) {
- free(*result);
- return NSERROR_NOMEM;
- }
+ /* Append UTF-8 encoded special character or U+FFFD if none */
+ if (special_chars[string[off]-0x80] != NULL) {
+ const char *special = special_chars[string[off]-0x80];
+ strcat((*result) + cur_off, special);
+ cur_off += 2 + (special[0] == 0xC5 ? 0 : 1);
+ } else {
+ strcat((*result) + cur_off, "\xef\xbf\xbd");
+ cur_off += 3;
+ }
- *result = temp;
- result_alloc += (3 * SPECIAL_CHUNK_SIZE);
+ prev_off = off + 1;
+
+ /* Resize output buffer if necessary */
+ num_specials++;
+ if (num_specials % SPECIAL_CHUNK_SIZE ==
+ SPECIAL_CHUNK_SIZE - 1) {
+ char *temp = realloc((*result),
+ result_alloc +
+ (3 * SPECIAL_CHUNK_SIZE));
+ if (!temp) {
+ free(*result);
+ return NSERROR_NOMEM;
}
+
+ *result = temp;
+ result_alloc += (3 * SPECIAL_CHUNK_SIZE);
}
}
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 28ef06fa9..4dcdcd734 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -833,6 +833,7 @@ ro_gui_window_toolbar_click(void *data,
if (action_type == TOOLBAR_ACTION_URL) {
switch (action.url) {
case TOOLBAR_URL_DRAG_URL:
+ case TOOLBAR_URL_DRAG_FAVICON:
{
gui_save_type save_type;
nserror err;
@@ -1312,7 +1313,7 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
case IS_WIMP_KEY + wimp_KEY_F1: /* Help. */
{
nserror error = nsurl_create(
- "http://www.netsurf-browser.org/documentation/",
+ "https://www.netsurf-browser.org/documentation/",
&url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
@@ -2574,7 +2575,7 @@ ro_gui_window_menu_select(wimp_w w,
/* help actions */
case HELP_OPEN_CONTENTS:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -2586,7 +2587,7 @@ ro_gui_window_menu_select(wimp_w w,
break;
case HELP_OPEN_GUIDE:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/guide", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/guide", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -2598,7 +2599,7 @@ ro_gui_window_menu_select(wimp_w w,
break;
case HELP_OPEN_INFORMATION:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/info", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/info", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -3594,7 +3595,8 @@ static void gui_window_set_title(struct gui_window *g, const char *title)
title, scale_disp);
}
} else {
- strncpy(g->title, title, sizeof(g->title));
+ strncpy(g->title, title, sizeof(g->title) - 1);
+ g->title[sizeof(g->title)-1] = 0;
}
ro_gui_set_window_title(g->window, g->title);
@@ -4568,7 +4570,7 @@ ro_gui_window_iconise(struct gui_window *g, wimp_full_message_window_info *wi)
/* create the thumbnail sprite */
bitmap = riscos_bitmap_create(width, height,
- BITMAP_NEW | BITMAP_OPAQUE | BITMAP_CLEAR_MEMORY);
+ BITMAP_OPAQUE | BITMAP_CLEAR);
if (!bitmap) {
NSLOG(netsurf, INFO, "Thumbnail initialisation failed.");
return;
diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile
index 4e74edd7a..524f716fe 100644
--- a/frontends/windows/Makefile
+++ b/frontends/windows/Makefile
@@ -90,7 +90,7 @@ $(OBJROOT)/messages-en: $(MESSAGES_TARGET)/en/Messages
$(VQ)echo " MSGCP: $< $@"
$(Q)$(INSTALL) -m 644 -T $< $@
-netsurf-installer.exe: $(EXETARGET) $(WIN_RES_INS_OBJ)
+netsurf-installer.exe: $(EXETARGET) $(POSTEXES) $(WIN_RES_INS_OBJ)
$(VQ)echo "MAKENSIS: $@"
$(Q)makensis -V$(NSIS_VERBOSE) -NOCD -DOBJROOT=$(OBJROOT) -DRESDIR=$(FRONTEND_RESOURCES_DIR) -DVERSIONMAJOR=$(VERSION_MAJ) -DVERSIONMINOR=$(VERSION_MIN) -DOUTFNAME=$@ $(FRONTEND_RESOURCES_DIR)/installer.nsi
diff --git a/frontends/windows/bitmap.c b/frontends/windows/bitmap.c
index eed3d3a15..a52f29ad9 100644
--- a/frontends/windows/bitmap.c
+++ b/frontends/windows/bitmap.c
@@ -41,19 +41,19 @@
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param state flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *win32_bitmap_create(int width, int height, unsigned int state)
+static void *win32_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
BITMAPV5HEADER *pbmi;
HBITMAP windib;
uint8_t *pixdata;
- NSLOG(netsurf, INFO, "width %d, height %d, state %u", width, height,
- state);
+ NSLOG(netsurf, INFO, "width %d, height %d, flags %u", width, height,
+ (unsigned)flags);
pbmi = calloc(1, sizeof(BITMAPV5HEADER));
if (pbmi == NULL) {
@@ -91,7 +91,7 @@ void *win32_bitmap_create(int width, int height, unsigned int state)
bitmap->windib = windib;
bitmap->pbmi = pbmi;
bitmap->pixdata = pixdata;
- if ((state & BITMAP_OPAQUE) != 0) {
+ if ((flags & BITMAP_OPAQUE) != 0) {
bitmap->opaque = true;
} else {
bitmap->opaque = false;
@@ -164,20 +164,6 @@ void win32_bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -207,35 +193,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- struct bitmap *bm = bitmap;
-
- if (bitmap == NULL) {
- NSLOG(netsurf, INFO, "NULL bitmap!");
- return false;
- }
-
- tst = bm->width * bm->height;
-
- while (tst-- > 0) {
- if (bm->pixdata[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO, "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -276,11 +233,6 @@ static int bitmap_get_height(void *bitmap)
return(bm->height);
}
-static size_t bitmap_get_bpp(void *bitmap)
-{
- return 4;
-}
-
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height)
{
struct bitmap *ret = malloc(sizeof(struct bitmap));
@@ -346,7 +298,7 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
}
/* create a full size bitmap and plot into it */
- fsbitmap = win32_bitmap_create(width, height, BITMAP_NEW | BITMAP_CLEAR_MEMORY | BITMAP_OPAQUE);
+ fsbitmap = win32_bitmap_create(width, height, BITMAP_CLEAR | BITMAP_OPAQUE);
SelectObject(bufferdc, fsbitmap->windib);
@@ -375,13 +327,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = win32_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/windows/bitmap.h b/frontends/windows/bitmap.h
index c57061d77..a370dd619 100644
--- a/frontends/windows/bitmap.h
+++ b/frontends/windows/bitmap.h
@@ -33,8 +33,6 @@ struct bitmap {
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height);
-void *win32_bitmap_create(int width, int height, unsigned int state);
-
void win32_bitmap_destroy(void *bitmap);
#endif
diff --git a/frontends/windows/download.c b/frontends/windows/download.c
index f0163cef7..cfd2bbbb7 100644
--- a/frontends/windows/download.c
+++ b/frontends/windows/download.c
@@ -169,6 +169,7 @@ nsws_download_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
case IDOK:
if (download1->downloaded != download1->size)
return TRUE;
+ fallthrough;
case IDCANCEL:
nsws_download_clear_data(download1);
diff --git a/frontends/windows/prefs.c b/frontends/windows/prefs.c
index 37f558477..d6855f5da 100644
--- a/frontends/windows/prefs.c
+++ b/frontends/windows/prefs.c
@@ -277,6 +277,7 @@ static BOOL CALLBACK options_appearance_dialog_handler(HWND hwnd,
}
break;
}
+ break;
case WM_COMMAND:
diff --git a/frontends/windows/res/installer.nsi b/frontends/windows/res/installer.nsi
index 7a03192f5..2f8b757d8 100644
--- a/frontends/windows/res/installer.nsi
+++ b/frontends/windows/res/installer.nsi
@@ -13,16 +13,16 @@
!define VERSIONMAJOR 3
!endif
!ifndef VERSIONMINOR
- !define VERSIONMINOR 10
+ !define VERSIONMINOR 11
!endif
!ifndef VERSIONBUILD
!define VERSIONBUILD 0
!endif
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
-!define HELPURL "http://www.netsurf-browser.org/" # "Support Information" link
-!define UPDATEURL "http://www.netsurf-browser.org/" # "Product Updates" link
-!define ABOUTURL "http://www.netsurf-browser.org/" # "Publisher" link
+!define HELPURL "https://www.netsurf-browser.org/" # "Support Information" link
+!define UPDATEURL "https://www.netsurf-browser.org/" # "Product Updates" link
+!define ABOUTURL "https://www.netsurf-browser.org/" # "Publisher" link
# This is the size (in kB) of all the files copied into "Program Files"
!define INSTALLSIZE 9000
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 750c57703..00e5a7e05 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -432,7 +432,7 @@ nsws_window_urlbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
NSLOG(netsurf, INFO, "Destroyed font object");
DeleteObject(hFont);
}
-
+ fallthrough;
case WM_NCDESTROY:
/* remove properties if window is being destroyed */
@@ -1250,17 +1250,17 @@ nsws_window_command(HWND hwnd,
case IDM_HELP_CONTENTS:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/");
+ "https://www.netsurf-browser.org/documentation/");
break;
case IDM_HELP_GUIDE:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/guide");
+ "https://www.netsurf-browser.org/documentation/guide");
break;
case IDM_HELP_INFO:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/info");
+ "https://www.netsurf-browser.org/documentation/info");
break;
case IDM_HELP_ABOUT:
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index 5f4349427..97be710f3 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -26,7 +26,6 @@ extern struct gui_window_table *win32_window_table;
struct browser_mouse {
struct gui_window *gui;
- struct box *box;
double pressed_x;
double pressed_y;
diff --git a/include/netsurf/bitmap.h b/include/netsurf/bitmap.h
index f5de51423..10e9a07fb 100644
--- a/include/netsurf/bitmap.h
+++ b/include/netsurf/bitmap.h
@@ -20,64 +20,120 @@
* \file
* Generic bitmap handling interface.
*
- * This interface wraps the native platform-specific image format, so that
- * portable image convertors can be written.
+ * This interface wraps the native platform-specific image format.
*
- * Bitmaps are required to be 32bpp with components in the order RR GG BB AA.
+ * Bitmaps are required to be 32bpp with 8-bit components. The components are
+ * red, green, blue, and alpha, in client specified order.
*
- * For example, an opaque 1x1 pixel image would yield the following bitmap
- * data:
- *
- * > Red : 0xff 0x00 0x00 0x00
- * > Green: 0x00 0xff 0x00 0x00
- * > Blue : 0x00 0x00 0xff 0x00
- *
- * Any attempt to read pixels by casting bitmap data to uint32_t or similar
- * will need to cater for the order of bytes in a word being different on
- * big and little endian systems. To avoid confusion, it is recommended
- * that pixel data is loaded as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * // red green blue alpha
- * return bmp[0] | (bmp[1] << 8) | (bmp[2] << 16) | (bmp[3] << 24);
- * }
- *
- * and *not* as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * return *((uint32_t *) bmp);
- * }
+ * The component order may be set in the front ends by calling
+ * \ref bitmap_set_format().
*/
#ifndef _NETSURF_BITMAP_H_
#define _NETSURF_BITMAP_H_
-#define BITMAP_NEW 0
-#define BITMAP_OPAQUE (1 << 0) /**< image is opaque */
-#define BITMAP_MODIFIED (1 << 1) /**< buffer has been modified */
-#define BITMAP_CLEAR_MEMORY (1 << 2) /**< memory should be wiped */
+/** Bitmap creation flags. */
+enum gui_bitmap_flags {
+ BITMAP_NONE = 0,
+ BITMAP_OPAQUE = (1 << 0), /**< image is opaque */
+ BITMAP_CLEAR = (1 << 1), /**< memory should be wiped to 0 */
+};
+
+/**
+ * NetSurf bitmap pixel layout.
+ *
+ * All pixels are 32 bits per pixel (bpp). The different layouts allow control
+ * over the ordering of colour channels. All colour channels are 8 bits wide.
+ */
+enum bitmap_layout {
+ /** Bite-wise RGBA: Byte order: 0xRR, 0xGG, 0xBB, 0xAA. */
+ BITMAP_LAYOUT_R8G8B8A8,
+
+ /** Bite-wise BGRA: Byte order: 0xBB, 0xGG, 0xRR, 0xAA. */
+ BITMAP_LAYOUT_B8G8R8A8,
+
+ /** Bite-wise ARGB: Byte order: 0xAA, 0xRR, 0xGG, 0xBB. */
+ BITMAP_LAYOUT_A8R8G8B8,
+
+ /** Bite-wise ABGR: Byte order: 0xAA, 0xBB, 0xGG, 0xRR. */
+ BITMAP_LAYOUT_A8B8G8R8,
+
+ /**
+ * 32-bit RGBA (0xRRGGBBAA).
+ *
+ * * On little endian host, same as \ref BITMAP_LAYOUT_A8B8G8R8.
+ * * On big endian host, same as \ref BITMAP_LAYOUT_R8G8B8A8.
+ */
+ BITMAP_LAYOUT_RGBA8888,
+
+ /**
+ * 32-bit BGRA (0xBBGGRRAA).
+ *
+ * * On little endian host, same as \ref BITMAP_LAYOUT_A8R8G8B8.
+ * * On big endian host, same as \ref BITMAP_LAYOUT_B8G8R8A8.
+ */
+ BITMAP_LAYOUT_BGRA8888,
+
+ /**
+ * 32-bit ARGB (0xAARRGGBB).
+ *
+ * * On little endian host, same as \ref BITMAP_LAYOUT_B8G8R8A8.
+ * * On big endian host, same as \ref BITMAP_LAYOUT_A8R8G8B8.
+ */
+ BITMAP_LAYOUT_ARGB8888,
+
+ /**
+ * 32-bit BGRA (0xAABBGGRR).
+ *
+ * * On little endian host, same as \ref BITMAP_LAYOUT_R8G8B8A8.
+ * * On big endian host, same as \ref BITMAP_LAYOUT_A8B8G8R8.
+ */
+ BITMAP_LAYOUT_ABGR8888,
+};
+
+/** Bitmap format specifier. */
+typedef struct bitmap_fmt {
+ enum bitmap_layout layout; /**< Colour component layout. */
+ bool pma; /**< Premultiplied alpha. */
+} bitmap_fmt_t;
struct content;
struct bitmap;
struct hlcache_handle;
/**
+ * Set client bitmap format.
+ *
+ * Set this to ensure that the bitmaps decoded by the core are in the
+ * correct format for the front end.
+ *
+ * \param[in] bitmap_format The bitmap format specification to set.
+ */
+void bitmap_set_format(const bitmap_fmt_t *bitmap_format);
+
+/**
+ * Test whether a bitmap is completely opaque (no transparency).
+ *
+ * \param[in] bitmap The bitmap to test.
+ * \return Returns true if the bitmap is opaque, false otherwise.
+ */
+bool bitmap_test_opaque(void *bitmap);
+
+/**
* Bitmap operations.
*/
struct gui_bitmap_table {
- /* Mandantory entries */
+ /* Mandatory entries */
/**
* Create a new bitmap.
*
- * \param width width of image in pixels
- * \param height width of image in pixels
- * \param state The state to create the bitmap in.
+ * \param width width of image in pixels
+ * \param height height of image in pixels
+ * \param flags flags for bitmap creation
* \return A bitmap structure or NULL on error.
*/
- void *(*create)(int width, int height, unsigned int state);
+ void *(*create)(int width, int height, enum gui_bitmap_flags flags);
/**
* Destroy a bitmap.
@@ -103,16 +159,10 @@ struct gui_bitmap_table {
bool (*get_opaque)(void *bitmap);
/**
- * Test if a bitmap is opaque.
- *
- * \param bitmap The bitmap to examine.
- * \return The bitmap opacity.
- */
- bool (*test_opaque)(void *bitmap);
-
- /**
* Get the image buffer from a bitmap
*
+ * Note that all pixels must be 4-byte aligned.
+ *
* \param bitmap The bitmap to get the buffer from.
* \return The image buffer or NULL if there is none.
*/
@@ -143,22 +193,6 @@ struct gui_bitmap_table {
int (*get_height)(void *bitmap);
/**
- * Get the *bytes* per pixel.
- *
- * \param bitmap The bitmap
- */
- size_t (*get_bpp)(void *bitmap);
-
- /**
- * Save a bitmap to disc.
- *
- * \param bitmap The bitmap to save
- * \param path The path to save the bitmap to.
- * \param flags Flags affecting the save.
- */
- bool (*save)(void *bitmap, const char *path, unsigned flags);
-
- /**
* Marks a bitmap as modified.
*
* \param bitmap The bitmap set as modified.
diff --git a/include/netsurf/fetch.h b/include/netsurf/fetch.h
index 30b204868..156f4d1ef 100644
--- a/include/netsurf/fetch.h
+++ b/include/netsurf/fetch.h
@@ -99,6 +99,23 @@ struct gui_fetch_table {
*/
char *(*mimetype)(const char *ro_path);
+ /**
+ * Open a socket
+ *
+ * \param domain Communication domain
+ * \param type Socket type
+ * \param protocol Protocol
+ * \return Socket descriptor on success, -1 on error and errno set
+ */
+ int (*socket_open)(int domain, int type, int protocol);
+
+ /**
+ * Close a socket
+ *
+ * \param socket Socket descriptor
+ * \return 0 on success, -1 on error and errno set
+ */
+ int (*socket_close)(int socket);
};
#endif
diff --git a/include/netsurf/inttypes.h b/include/netsurf/inttypes.h
index 3a16d0ef1..e2229085a 100644
--- a/include/netsurf/inttypes.h
+++ b/include/netsurf/inttypes.h
@@ -52,8 +52,13 @@
/** c99 standard printf formatting for size_t type */
#define PRIsizet "zu"
+#if defined(__riscos__)
+/** riscos/unixlib defines ssize_t as a long int */
+#define PRIssizet "ld"
+#else
/** c99 standard printf formatting for ssize_t type */
#define PRIssizet "zd"
+#endif
#endif
diff --git a/include/netsurf/keypress.h b/include/netsurf/keypress.h
index 604d2dd9b..84d9d41c8 100644
--- a/include/netsurf/keypress.h
+++ b/include/netsurf/keypress.h
@@ -59,7 +59,9 @@ enum input_key {
NS_KEY_TEXT_START,
NS_KEY_TEXT_END,
NS_KEY_WORD_LEFT,
+ NS_KEY_DELETE_WORD_LEFT,
NS_KEY_WORD_RIGHT,
+ NS_KEY_DELETE_WORD_RIGHT,
NS_KEY_PAGE_UP,
NS_KEY_PAGE_DOWN,
NS_KEY_DELETE_LINE_END,
diff --git a/include/netsurf/plot_style.h b/include/netsurf/plot_style.h
index bfc0805ea..875020cd8 100644
--- a/include/netsurf/plot_style.h
+++ b/include/netsurf/plot_style.h
@@ -201,10 +201,6 @@ typedef struct plot_font_style {
(((((c1 & 0x00ff00) * (255 - p)) + \
((c0 & 0x00ff00) * ( p)) ) >> 8) & 0x00ff00))
-/* get a bitmap pixel (image/bitmap.h) into a plot colour */
-#define pixel_to_colour(b) \
- b[0] | (b[1] << 8) | (b[2] << 16) | (b[3] << 24)
-
/* Get the red channel from a colour */
#define red_from_colour(c) \
((c ) & 0xff)
diff --git a/resources/FatMessages b/resources/FatMessages
index 0c8668a92..bda91910a 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -39,11 +39,12 @@
en.all.NetSurf:NetSurf
zh_CN.all.NetSurf:NetSurf
-en.all.NetSurfCopyright:© 2003-2020 The NetSurf Developers
-de.all.NetSurfCopyright:© 2003-2020 die NetSurf Entwickler
-nl.all.NetSurfCopyright:© 2003-2020 De NetSurf-ontwikkelaars
-it.all.NetSurfCopyright:© 2003-2020 A cura degli sviluppatori di NetSurf
-zh_CN.all.NetSurfCopyright:©2003-2020 NetSurf å¼€å‘人员
+en.all.NetSurfCopyright:© 2003-2023 The NetSurf Developers
+de.all.NetSurfCopyright:© 2003-2023 die NetSurf Entwickler
+fr.all.NetSurfCopyright:© 2003-2023 Les développeurs de NetSurf
+nl.all.NetSurfCopyright:© 2003-2023 De NetSurf-ontwikkelaars
+it.all.NetSurfCopyright:© 2003-2023 A cura degli sviluppatori di NetSurf
+zh_CN.all.NetSurfCopyright:© 2003-2023 NetSurf å¼€å‘人员
# General
@@ -74,21 +75,21 @@ zh_CN.all.Replace:替æ¢æ–‡ä»¶
en.all.DontReplace:Don't replace
de.all.DontReplace:Abbrechen
-fr.all.DontReplace:Ne pas remplacer le fichier
+fr.all.DontReplace:Ne pas remplacer
it.all.DontReplace:Non sostituire
nl.all.DontReplace:Annuleer bewaaractie
zh_CN.all.DontReplace:ä¸è¦æ›¿æ¢
en.all.Remove:Remove address
de.all.Remove:Adresse entfernen
-fr.all.Remove:Enlever/retirer une adresse
+fr.all.Remove:Retirer l’adresse
it.all.Remove:Rimuovi indirizzo
nl.all.Remove:Verwijder adres
zh_CN.all.Remove:删除地å€
en.all.DontRemove:Don't remove
de.all.DontRemove:Behalten
-fr.all.DontRemove:Ne pas enlever/retirer
+fr.all.DontRemove:Ne pas retirer
it.all.DontRemove:Non rimuovere
nl.all.DontRemove:Niet verwijderen
zh_CN.all.DontRemove:ä¸è¦åˆ é™¤
@@ -130,14 +131,14 @@ zh_CN.all.OK:好的
en.all.Selecting:Selecting
de.all.Selecting:Auswählen
-fr.all.Selecting:Sélection en cours
+fr.all.Selecting:Sélection
it.all.Selecting:Selezione
nl.all.Selecting:selecteren
zh_CN.all.Selecting:正在选择
en.all.FrameDrag:Resizing frames
de.all.FrameDrag:Frames ändern
-fr.all.FrameDrag:Redimensionnement des cadres en cours
+fr.all.FrameDrag:Redimensionnement des cadres
it.all.FrameDrag:Ridimensione dei frame
nl.all.FrameDrag:frames aan het aanpassen
zh_CN.all.FrameDrag:正在调整框架大å°
@@ -149,14 +150,14 @@ zh_CN.all.FrameDrag:正在调整框架大å°
# Decimal prefix
en.all.Bytes: B
de.all.Bytes: B
-fr.all.Bytes: octets
+fr.all.Bytes: o
it.all.Bytes: Byte
nl.all.Bytes: B
zh_CN.all.Bytes: B
en.all.kBytes: kB
de.all.kBytes: kB
-fr.all.kBytes: Ko
+fr.all.kBytes: ko
it.all.kBytes: KB
nl.all.kBytes: KB
zh_CN.all.kBytes: kB
@@ -177,21 +178,27 @@ zh_CN.all.GBytes: GB
# Binary prefix
en.all.KiBytes: KiB
+fr.all.KiBytes: Kio
zh_CN.all.KiBytes: KiB
en.all.MiBytes: MiB
+fr.all.MiBytes: Mio
zh_CN.all.MiBytes: MiB
en.all.GiBytes: GiB
+fr.all.GiBytes: Gio
zh_CN.all.GiBytes: GiB
en.all.TiBytes: TiB
+fr.all.TiBytes: Tio
zh_CN.all.TiBytes: TiB
en.all.PiBytes: PiB
+fr.all.PiBytes: Pio
zh_CN.all.PiBytes: PiB
en.all.EiBytes: EiB
+fr.all.EiBytes: Eio
zh_CN.all.EiBytes: EiB
# Content Forms
@@ -201,7 +208,7 @@ zh_CN.all.EiBytes: EiB
#
en.all.Form_Submit:Submit
de.all.Form_Submit:Ãœbertragen
-fr.all.Form_Submit:Soumettre
+fr.all.Form_Submit:Envoyer
it.all.Form_Submit:Invia
nl.all.Form_Submit:Versturen
zh_CN.all.Form_Submit:æ交
@@ -229,37 +236,37 @@ zh_CN.all.Form_Many:(多个表)
en.all.Form_Drop:Drop file here
it.all.Form_Drop:Sposta il file qui
+de.all.Form_Drop:Datei hier hinziehen
+fr.all.Form_Drop:Déposer ici votre fichier
+it.all.Form_Drop:Inserisci un file qui
+nl.all.Form_Drop:Bestand hier plaatsen
+zh_CN.all.Form_Drop:å•å‡»ä»¥é€‰æ‹©æ–‡ä»¶
en.gtk.Form_Drop:Click to select file
-fr.gtk.Form_Drop:Cliquer pour sélectionner fichier
+fr.gtk.Form_Drop:Cliquer pour sélectionner un fichier
it.gtk.Form_Drop:Clicca per selezionare il file
nl.gtk.Form_Drop:Klik om bestand te selecteren
en.ro.Form_Drop:Drop file here
-fr.ro.Form_Drop:Déposer fichier ici
+fr.ro.Form_Drop:Déposer ici votre fichier
it.ro.Form_Drop:Sposta il file qui
en.ami.Form_Drop:Click or drop file here
-fr.ami.Form_Drop:Cliquer ou déposer fichier ici]
+fr.ami.Form_Drop:Cliquer ou déposer un fichier ici
it.ami.Form_Drop:Clicca o sposta il file qui
nl.ami.Form_Drop:Sleep bestand hierheen
en.beos.Form_Drop:Drop file here
-fr.beos.Form_Drop:Drop file here
+fr.beos.Form_Drop:Déposer ici votre fichier
it.beos.Form_Drop:Sposta il file qui
nl.beos.Form_Drop:Sleep bestand hierheen
en.fb.Form_Drop:Click to select file
-fr.fb.Form_Drop:Cliquer pour sélectionner fichier
+fr.fb.Form_Drop:Cliquer pour sélectionner un fichier
it.fb.Form_Drop:Clicca per selezionare il file
nl.fb.Form_Drop:Klik om bestand te selecteren
en.osx.Form_Drop:Click to select file
-fr.osx.Form_Drop:Cliquer pour sélectionner fichier
+fr.osx.Form_Drop:Cliquer pour sélectionner un fichier
it.osx.Form_Drop:Clicca per selezionare il file
-de.all.Form_Drop:Datei hier hinziehen
-fr.all.Form_Drop:Déposer les fichiers ici
-it.all.Form_Drop:Inserisci un file qui
-nl.all.Form_Drop:Bestand hier plaatsen
-zh_CN.all.Form_Drop:å•å‡»ä»¥é€‰æ‹©æ–‡ä»¶
en.all.FormSelect:Click to choose a form item
de.all.FormSelect:Anklicken öffnet Auswahlmenü
-fr.all.FormSelect:Cliquer pour choisir un item de formulaire
+fr.all.FormSelect:Cliquer pour choisir un élément du formulaire
it.all.FormSelect:Clicca per scegliere un oggetto del form
nl.all.FormSelect:Klikken selecteert een formulieritem
zh_CN.all.FormSelect:å•å‡»ä»¥é€‰æ‹©è¡¨å•é¡¹
@@ -287,14 +294,14 @@ zh_CN.all.FormSubmit:å‘é€è¡¨æ ¼åˆ° %s
en.all.FormBadSubmit:Warning: form can not be submitted
de.all.FormBadSubmit:Achtung: Daten können nicht gesendet werden
-fr.all.FormBadSubmit:Alerte : le formulaire n'a pas pu être envoyé
+fr.all.FormBadSubmit:Attention : le formulaire n’a pas pu être envoyé
it.all.FormBadSubmit:Attenzione: Il form non può essere inviato
nl.all.FormBadSubmit:Waarschuwing: informatie kan niet verzonden worden
zh_CN.all.FormBadSubmit:警告:无法æ交表格
en.all.FormButton:Warning: button can not be activated
de.all.FormButton:Achtung: Schaltknopf kann nicht aktiviert werden
-fr.all.FormButton:Warning: Bouton ne peut être activé
+fr.all.FormButton:Attention : le bouton n’a pas pu être activé
it.all.FormButton:Attenzione: il pulsante non può essere attivato
nl.all.FormButton:Waarschuwing: knop kan niet geactiveerd worden
zh_CN.all.FormButton:警告:无法激活按钮
@@ -322,7 +329,7 @@ zh_CN.all.FormReset:é‡ç½®è¡¨æ ¼ï¼ˆæœªå®žçŽ°ï¼‰
en.all.FormFile:Drop a file here to upload it
de.all.FormFile:Zum Upload Datei hierhin ziehen und fallenlassen
-fr.all.FormFile:Déposer un fichier ici pour le téléverser #Need review
+fr.all.FormFile:Déposer un fichier ici pour le téléverser
it.all.FormFile:Inserisci un file da inviare qui
nl.all.FormFile:Het bestand hier plaatsen voor verzenden
zh_CN.all.FormFile:将文件拖放到在此处上传
@@ -375,7 +382,7 @@ zh_CN.all.PNGTitle:%s(PNG å›¾åƒ ï¼…luxï¼…lu åƒç´ ï¼‰
en.all.SpriteTitle:%s (Sprite image %lux%lu pixels)
de.all.SpriteTitle:%s (Sprite Bild %lux%lu pixels)
-fr.all.SpriteTitle:%s (Image Sprite %lux%lu pixels)
+fr.all.SpriteTitle:%s (Image « sprite » %lux%lu pixels)
it.all.SpriteTitle:%s (Immagine Sprite %lux%lu pixel)
nl.all.SpriteTitle:%s (Sprite-afbeelding %lux%lu punten)
zh_CN.all.SpriteTitle:%s(Sprite å›¾åƒ ï¼…luxï¼…lu åƒç´ ï¼‰
@@ -414,7 +421,7 @@ zh_CN.ami.DataTypesTitle:%s(%s å›¾åƒ ï¼…luxï¼…lu åƒç´ ï¼‰
#
en.all.Encoding0:from HTTP headers
de.all.Encoding0:aus HTTP Kopfzeilen
-fr.all.Encoding0:dans les en-têtes HTTP
+fr.all.Encoding0:dans les entêtes HTTP
it.all.Encoding0:da intestazioni HTTP
nl.all.Encoding0:van HTTP-koppen
zh_CN.all.Encoding0:从 HTTP 报头
@@ -458,7 +465,7 @@ zh_CN.all.Not2xx:æœåŠ¡å™¨è¿”回错误
en.all.InvalidURL:The address <em>%s</em> could not be understood.
de.all.InvalidURL:Die Adresse <em>%s</em> konnte nicht ausgewertet werden.
-fr.all.InvalidURL:L'adresse <em>%s</em> est incomprise.
+fr.all.InvalidURL:L’adresse <em>%s</em> n’a pas pu être reconnue.
it.all.InvalidURL:L'indirizzo <em>%s</em> non è stato riconosciuto.
nl.all.InvalidURL:Het adres <em>%s</em> klopt niet.
zh_CN.all.InvalidURL:无法ç†è§£åœ°å€ <em>%s</em>。
@@ -469,7 +476,7 @@ zh_CN.all.InvalidURL:无法ç†è§£åœ°å€ <em>%s</em>。
#
en.all.ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Page error</title></head><body><h1>Sorry, NetSurf was unable to display this page</h1><p><strong>%s</strong></p></body></html>
de.all.ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Seitenfehler</title></head><body><h1>NetSurf konnte diese Seite leider nicht darstellen.</h1><p><strong>%s</strong></p></body></html>
-fr.all.ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Erreur</title></head><body><h1>Désolé, NetSurf n'a pas pu afficher cette page</h1><p><strong>%s</strong></p></body></html>
+fr.all.ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Erreur</title></head><body><h1>Désolé, NetSurf n’a pas pu afficher cette page</h1><p><strong>%s</strong></p></body></html>
it.all.ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Errore nella pagina</title></head><body><h1>Spiacente, NetSurf non è in grado di visualizzare questa pagina.</h1><p><strong>%s</strong></p></body></html>
nl.all.ErrorPage:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Pagina fout</title></head><body><h1>Sorry, NetSurf kan deze pagina</h1><p><strong>%s</strong></p>niet tonen.</body></html>
zh_CN.all.ErrorPage:<!DOCTYPE HTML PUBLIC“-// W3C // DTD HTML 4.01 // zh_CNâ€â€œ http://www.w3.org/TR/html4/strict.dtd“><html><head><meta http-equiv =“ Content-Type†content =“ text / html; charset = UTF-8â€> <title>页é¢é”™è¯¯</title> </head> <body> <h1>抱歉, NetSurf 无法显示此页é¢</ h1> <p> <strong>%s </strong> </p> </body> </html>
@@ -492,84 +499,84 @@ zh_CN.all.NoMemory:NetSurf 内存ä¸è¶³ã€‚请释放一些内存,然åŽé‡è¯•ã€
en.all.SaveError:The file could not be saved due to an error:
de.all.SaveError:Die Datei konnte wegen eines Fehlers nicht gespeichert werden:
-fr.all.SaveError:Le fichier n'a pas pu être sauvé suite à une erreur:
+fr.all.SaveError:Le fichier n’a pas pu être sauvé à cause d’une erreur :
it.all.SaveError:Il file non può essere salvato a causa di un errore:
nl.all.SaveError:Wegens een fout kan dit bestand niet opgeslagen worden:
zh_CN.all.SaveError:由于出现错误,无法ä¿å­˜æ­¤æ–‡ä»¶ï¼š
en.all.LoadError:The file could not be loaded due to an error:
de.all.LoadError:Die Datei konnte wegen eines Fehlers nicht geladen werden:
-fr.all.LoadError:Le fichier n'a pas pu être chargé à cause d'une erreur:
+fr.all.LoadError:Le fichier n’a pas pu être chargé à cause d’une erreur :
it.all.LoadError:Il file non può essere caricato a causa di un errore:
nl.all.LoadError:Wegens een fout kan dit bestand niet geladen worden:
zh_CN.all.LoadError:由于出现错误,无法加载此文件:
en.all.MiscError:An unexpected error occurred:
de.all.MiscError:Unerwarteter Fehler:
-fr.all.MiscError:Une erreur inattendue s'est produite:
+fr.all.MiscError:Une erreur inattendue s’est produite :
it.all.MiscError:Si è verificato un errore inatteso:
nl.all.MiscError:Er trad een onverwachte fout op:
zh_CN.all.MiscError:出现错误:
en.all.FileError:File does not exist:
de.all.FileError:Datei existiert nicht:
-fr.all.FileError:Le fichier n'existe pas:
+fr.all.FileError:Le fichier n’existe pas :
it.all.FileError:Il file è inesistente:
nl.all.FileError:Bestand lijkt niet te bestaan:
zh_CN.all.FileError:文件ä¸å­˜åœ¨ï¼š
en.all.PrintError:An error occurred when printing:
de.all.PrintError:Ein Fehler trat während des Druckens auf:
-fr.all.PrintError:Une erreur s'est produite lors de l'impression:
+fr.all.PrintError:Une erreur s’est produite lors de l’impression :
it.all.PrintError:Si è verificato un errore durante la stampa:
nl.all.PrintError:Fout tijdens afdrukken:
zh_CN.all.PrintError:打å°æ—¶å‡ºçŽ°é”™è¯¯ï¼š
en.all.NoDiscSpace:Not enough space available on disc.
de.all.NoDiscSpace:Nicht genug Speicherplatz auf dem Medium vorhanden.
-fr.all.NoDiscSpace:Pas assez d'espace disque disponible.
+fr.all.NoDiscSpace:Pas assez d’espace disque disponible.
it.all.NoDiscSpace:Spazio insufficiente nel disco.
nl.all.NoDiscSpace:Onvoldoende ruimte beschikbaar op schijf.
zh_CN.all.NoDiscSpace:ç£ç›˜ä¸Šæ²¡æœ‰è¶³å¤Ÿçš„å¯ç”¨ç©ºé—´ã€‚
en.all.HotlistSaveError:The hotlist was unable to be correctly saved.
de.all.HotlistSaveError:Hotlist konnte nicht korrekt gespeichert werden.
-fr.all.HotlistSaveError:Les favoris n'ont pas pu être sauvés correctement.
+fr.all.HotlistSaveError:Les marque-pages n’ont pas pu être correctement sauvés.
it.all.HotlistSaveError:Non è stato possibile salvare correttamente i segnalibri.
nl.all.HotlistSaveError:De favorietenlijst kon niet correct worden bewaard.
zh_CN.all.HotlistSaveError:无法正确ä¿å­˜æ­¤å¸¸ç”¨åˆ—表。
en.all.TreeLoadError:The tree was unable to be correctly loaded.
de.all.TreeLoadError:The tree was unable to be correctly loaded.
-fr.all.TreeLoadError:The tree was unable to be correctly loaded.
+fr.all.TreeLoadError:L’arbre n’a pas pu être correctement chargé.
it.all.TreeLoadError:L'albero della directory non è stato caricato correttamente.
nl.all.TreeLoadError:De gegevensstructuur kon niet correct worden geladen.
zh_CN.all.TreeLoadError:无法正确加载此树。
en.all.NoDirError:%s is not a directory
de.all.NoDirError:%s ist kein Verzeichnis.
-fr.all.NoDirError:%s n'est pas un répertoire
+fr.all.NoDirError:%s n’est pas un dossier
it.all.NoDirError:%s non è una directory
nl.all.NoDirError:%s is geen map
zh_CN.all.NoDirError:%s ä¸æ˜¯ç›®å½•
en.all.NoNameError:Please enter a name
de.all.NoNameError:Bitte einen Namen eingeben.
-fr.all.NoNameError:Entrez un nom SVP
+fr.all.NoNameError:Merci d’entrer un nom
it.all.NoNameError:Inserisci un nome
nl.all.NoNameError:Geef een naam op
zh_CN.all.NoNameError:请输入å称
en.all.NoURLError:Please enter a URL
de.all.NoURLError:Bitte eine URL Adresse eingeben.
-fr.all.NoURLError:Entrez une URL SVP
+fr.all.NoURLError:Merci d’entrer une URL
it.all.NoURLError:Inserisci un URL
nl.all.NoURLError:Geef een adres op
zh_CN.all.NoURLError:请输入 URL
en.all.URIError:NetSurf was unable to parse this URI file due to a syntax error.
de.all.URIError:NetSurf konnte die URI Datei nicht lesen. Syntax Fehler.
-fr.all.URIError:NetSurf est incapable de traiter ce fichier URI à cause d'une erreur de syntaxe.
+fr.all.URIError:NetSurf est incapable de traiter ce fichier URI à cause d’une erreur de syntaxe.
it.all.URIError:NetSurf non è stato in grado di processare questo file URI a causa di un errore di sintassi.
nl.all.URIError:NetSurf kon dit URI-bestand niet verwerken vanwege een syntaxisfout.
zh_CN.all.URIError:由于语法错误,NetSurf 无法解æžæ­¤ URI 文件。
@@ -583,134 +590,137 @@ zh_CN.all.EmptyError:文件为空。
en.all.SearchError:Invalid Search.
de.all.SearchError:Suche fehlerhaft.
-fr.all.SearchError:Recherche Non-Valide.
+fr.all.SearchError:La recherche n’est pas valide.
it.all.SearchError:Ricerca non valida.
nl.all.SearchError:Ongeldige zoekopdracht.
zh_CN.all.SearchError:无效æœç´¢ã€‚
en.all.EncNotRec:Encoding type not recognised.
de.all.EncNotRec:Encodierung nicht erkannt.
-fr.all.EncNotRec:Type de codage non reconnu.
+fr.all.EncNotRec:Le type d’encodage n’est pas reconnu.
it.all.EncNotRec:Tipo di codifica sconosciuta.
nl.all.EncNotRec:Codeertype is niet herkend.
zh_CN.all.EncNotRec:无法识别编ç ç±»åž‹ã€‚
en.all.FileOpenError:could not open file '%s'
de.all.FileOpenError:Datei ist nicht zu öffnen: '%s'
-fr.all.FileOpenError:ne parvient pas à ouvrir le fichier '%s'
+fr.all.FileOpenError:ne parvient pas à ouvrir le fichier « %s »
it.all.FileOpenError:Impossibile aprire il file '%s'
nl.all.FileOpenError:kan bestand '%s' niet openen
zh_CN.all.FileOpenError:无法打开文件“%sâ€
en.all.DirectoryError:directory '%s' already exists
de.all.DirectoryError:Verzeichnis '%s' existiert bereits.
-fr.all.DirectoryError:répertoire '%s' existe déjà
+fr.all.DirectoryError:le dossier « %s » existe déjà
it.all.DirectoryError:La directory '%s' è già esistente
nl.all.DirectoryError:map '%s' bestaat reeds
zh_CN.all.DirectoryError:目录“%sâ€å·²ç»å­˜åœ¨
en.all.Timeout:This site took too long to respond
+fr.all.Timeout:Ce site met trop de temps à répondre
it.all.Timeout:Questo sito sta impiegando troppo a rispondere
zh_CN.all.Timeout:此网站å“应时间过长
en.all.BadURL:The given URL was not able to be parsed
+fr.all.BadURL:L’URL entrée n’a pas pu être parsée
zh_CN.all.BadURL:给定的 URL 无法解æž
# error messages for RISC OS
#
en.ro.PathToURL:An error occurred converting the file path to an URL:
de.ro.PathToURL:Fehler beim Konvertieren des Dateipfades in eine URL Adresse:
-fr.ro.PathToURL:Une erreur s'est produite en convertissant le chemin du fichier en une URL:
+fr.ro.PathToURL:Une erreur s’est produite en convertissant le chemin du fichier en une URL :
it.ro.PathToURL:Si è verificato un errore durante la conversione del percorso file nell'URL:
nl.ro.PathToURL:Fout tijdens het omzetten van het bestandspad naar een adres:
zh_CN.ro.PathToURL:将文件路径转æ¢ä¸º URL æ—¶å‘生错误:
en.ro.WimpError:An unexpected Window Manager error occurred:
de.ro.WimpError:Unerwarteter Fehler im Window Manager:
-fr.ro.WimpError:Une erreur inattendue du Gestionnaire de Fenêtres s'est produite:
+fr.ro.WimpError:Une erreur inattendue du gestionnaire de fenêtres s’est produite :
it.ro.WimpError:Si è verificato un errore inatteso nella finestra principale:
nl.ro.WimpError:Er trad een onverwachte fout op in de Vensterbeheerder:
zh_CN.ro.WimpError:å‘生窗å£ç®¡ç†å™¨é”™è¯¯ï¼š
en.ro.DragError:An error occurred when dragging the icon:
de.ro.DragError:Fehler beim Ziehen des Symboles:
-fr.ro.DragError:Une erreur s'est produite lors du déplacement d'icône:
+fr.ro.DragError:Une erreur s’est produite lors du déplacement de l’icône :
it.ro.DragError:Si è verificato un errore durante il trascinamento dell'icona:
nl.ro.DragError:Fout bij het slepen van het symbool:
zh_CN.ro.DragError:拖动图标时å‘生错误:
en.ro.MenuError:An error occurred when opening the menu:
de.ro.MenuError:Fehler beim Öffnen des Menüs:
-fr.ro.MenuError:Une erreur s'est produite lors de l'ouverture du menu:
+fr.ro.MenuError:Une erreur s’est produite lors de l’ouverture du menu :
it.ro.MenuError:Si è verificato un errore durante l'apertura del menu:
nl.ro.MenuError:Fout bij het openen van het menu:
zh_CN.ro.MenuError:打开èœå•æ—¶å‘生错误:
en.ro.DownloadWarn:This download may not complete:
de.ro.DownloadWarn:Der Download ist wahrscheinlich unvollständig:
-fr.ro.DownloadWarn:Ce téléchargement ne peut pas se terminer:
+fr.ro.DownloadWarn:Ce téléchargement ne peut pas se terminer :
it.ro.DownloadWarn:Questo trasferimento potrebbe essere incompleto:
nl.ro.DownloadWarn:Dit bestand is misschien niet compleet opgehaald:
zh_CN.ro.DownloadWarn:此下载å¯èƒ½æ— æ³•å®Œæˆï¼š
en.ro.LongURL:The URL for this page is too long for NetSurf to display.
de.ro.LongURL:The URL for this page is too long for NetSurf to display.
-fr.ro.LongURL:The URL for this page is too long for NetSurf to display.
+fr.ro.LongURL:L’URL de cette page est trop longue pour pouvoir être affichée par NetSurf.
it.ro.LongURL:L'URL di questa pagina è troppo lungo per essere visualizzato su NetSurf.
nl.ro.LongURL:Het adres van deze pagina is te lang voor NetSurf om te kunnen tonen.
zh_CN.ro.LongURL:该页é¢çš„ URL 过长, NetSurf 无法显示。
en.ro.FontBadInst:An error occurred when initialising fonts due to the presence of obsolete copies of the ROM fonts on disc. NetSurf will exit and launch a program which will attempt to fix this.
de.ro.FontBadInst:Font-Initialisierung fehlerhaft. Obsolete Kopien von ROM Fonts auf dem lokalem Speichermedium. Fehlerbehebung startet.
-fr.ro.FontBadInst:Une erreur s'est produite lors de l'initialisation des fontes à cause de la présence de copies obsolètes de fontes ROM sur disque. NetSurf va sortir et lancer un programme qui va tenter de réparer cela.
+fr.ro.FontBadInst:Une erreur s’est produite lors de l’initialisation des polices de caractères à cause de la présence de copies obsolètes de polices ROM sur le disque. NetSurf va s’arrêter et lancer un programme pour tenter de réparer ça.
it.ro.FontBadInst:Si è verificato un errore durante l'inizializzazione dei font a causa della presenza di una copia obsoleta dei font "ROM" nel disco. NetSurf verrà chiuso e si cercherà di lanciare un programma in grado di risolvere questo problema.
nl.ro.FontBadInst:Probleem ontstaan bij het initialiseren van de lettertypen. Een schijf bevat een map met geactiveerde ROM-lettertypes die overbodig zijn. NetSurf wordt gestopt en activeert een programma die dit probleem probeert te verhelpen.
zh_CN.ro.FontBadInst:因为ç£ç›˜ä¸Šå­˜åœ¨ ROM 字体的过时副本,åˆå§‹åŒ–字体时出现错误。NetSurf 将退出并å¯åŠ¨ä¸€ä¸ªç”¨äºŽå°è¯•ä¿®å¤æ­¤é—®é¢˜çš„程åºã€‚
en.ro.FontError:Failed to open font "Homerton.Medium" (%s).
de.ro.FontError:Fehler beim öffnen des Fonts "Homerton.Medium" (%s).
-fr.ro.FontError:Échec d'ouverture de la fonte "Homerton.Medium" (%s).
+fr.ro.FontError:Échec d’ouverture de la police « Homerton.Medium » (%s).
it.ro.FontError:Impossibile aprire il font "Homerton.Medium" (%s).
nl.ro.FontError:Het lettertypebestand "Homerton.Medium" kan niet worden geopend (%s).
zh_CN.ro.FontError:无法打开字体“Homerton.Mediumâ€(%s)。
en.ro.Resolvers:No domain name servers are configured, so only browsing local files will be possible. Use Configure to set your name server(s).
de.ro.Resolvers:Keine Domain Name Servers (DNS) konfiguriert. Nur lokale Dateien sind ladbar. Bitte DNS unter !Boot eintragen.
-fr.ro.Resolvers:Aucun nom de domaine n'étant configuré, seul la consultation de fichiers locaux est possible. Utilisez Configure pour définir les serveurs de noms.
+fr.ro.Resolvers:Aucun serveur de résolution de nom de domaine n’étant configuré, seul la consultation de fichiers locaux est possible. Utilisez Configure pour définir les serveurs de noms.
it.ro.Resolvers:Non è stato configurato nessun nome per i domini dei server, perciò sarà possibile effettuare la navigazione dei file solo in modalità locale. Usa "Configura" per impostare il nome (o i nomi) del/dei server.
nl.ro.Resolvers:Er zijn geen DNS-servers ingesteld, dus kunnen alleen lokale bestanden worden bekeken. Ga naar de netwerkinstellingen via !Boot om de DNS-server(s) in te stellen.
zh_CN.ro.Resolvers:没有é…置域åæœåŠ¡å™¨ï¼Œå› æ­¤åªèƒ½æµè§ˆæœ¬åœ°æ–‡ä»¶ã€‚ 使用é…ç½®æ¥è®¾ç½®æ‚¨çš„域åæœåŠ¡å™¨ã€‚
en.ro.Template:A window template is missing from the Templates file. Please reinstall NetSurf.
de.ro.Template:Ein Template für ein Fenster fehlt in der Datei Templates. Bitte NetSurf neu installieren.
-fr.ro.Template:Un modèle de fenêtre est absent du fichier Templates. Réinstallez NetSurf SVP.
+fr.ro.Template:Un modèle de fenêtre est absent du fichier des modèles. Merci de réinstaller NetSurf.
it.ro.Template:Una finestra di template risulta mancante. Per favore reinstalla NetSurf.
nl.ro.Template:Er ontbreekt een vensterdefinitie in het Templates-bestand. Installeer NetSurf opnieuw.
zh_CN.ro.Template:Templates 文件中缺少窗å£æ¨¡æ¿ã€‚请é‡æ–°å®‰è£… NetSurf。
en.ro.NoPathError:To save, drag the icon to a directory display
de.ro.NoPathError:Symbol in ein Verzeichnisfenster ziehen um zu Speichern.
-fr.ro.NoPathError:Pour sauver, lâcher cette icône dans une fenêtre de Filer
+fr.ro.NoPathError:Pour enregistrer, déposez cette icône dans la fenêtre d’un dossier
it.ro.NoPathError:Per salvare, trascina l'icona in una directory di visualizzazione.
nl.ro.NoPathError:Het symbool naar een geopende mapvenster slepen om te bewaren.
zh_CN.ro.NoPathError:è‹¥è¦ä¿å­˜ï¼Œè¯·å°†å›¾æ ‡æ‹–动到显示的目录中
en.ro.AWNotSeen:Please locate the AWViewer application and try again.
de.ro.AWNotSeen:Das Programm AWViewer wurde nicht gefunden.
-fr.ro.AWNotSeen:Localisez l'application AMViewer SVP puis réessayez.
+fr.ro.AWNotSeen:Merci de définir l’emplacement de l’application AWViewer avant de réessayez.
it.ro.AWNotSeen:Per favore fornisci l'applicativo AWViewer e riprova nuovamente.
nl.ro.AWNotSeen:Initialiseer het AWViewer-programma door het op te zoeken en probeer het dan nog eens.
zh_CN.ro.AWNotSeen:è¯·å®šä½ AWViewer 应用程åºï¼Œç„¶åŽé‡è¯•ã€‚
en.ro.PrintErrorRO2:It appears that the printer is busy.
de.ro.PrintErrorRO2:Der Drucker scheint beschäftigt zu sein.
-fr.ro.PrintErrorRO2:Il semble que l'imprimante soit occupée.
+fr.ro.PrintErrorRO2:Il semble que l’imprimante soit occupée.
it.ro.PrintErrorRO2:La stampante sembra essere occupata.
nl.ro.PrintErrorRO2:De printer lijkt al bezig te zijn.
zh_CN.ro.PrintErrorRO2:打å°æœºä¼¼ä¹Žæ­£å¿™ã€‚
en.ro.SprIsNull:Unable to convert image to sprite
de.ro.SprIsNull:Bild nicht in Sprite konvertierbar
+fr.ro.SprIsNull:Impossible de convertir l’image en « sprite »
it.ro.SprIsNull:Impossibile convertire l'immagine in sprite.
nl.ro.SprIsNull:Afbeelding kan niet worden omgezet in een sprite.
zh_CN.ro.SprIsNull:无法将图åƒè½¬æ¢ä¸ºè´´å›¾
@@ -719,35 +729,35 @@ zh_CN.ro.SprIsNull:无法将图åƒè½¬æ¢ä¸ºè´´å›¾
#
en.ami.CompError:Unable to open
de.ami.CompError:Nicht zu öffnen
-fr.ami.CompError:Unable to open
+fr.ami.CompError:Ouverture impossible
it.ami.CompError:Impossibile aprire
nl.ami.CompError:Niet te openen
zh_CN.ami.CompError:无法打开
en.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
de.ami.BMConvErr:NetSurf benötigt die guigfx.library für Bilder in diesem Mode
-fr.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
+fr.ami.BMConvErr:NetSurf requiert guigfx.library pour afficher les images dans ce mode
it.ami.BMConvErr:NetSurf richiede la guigfx.library per visualizzare le immagini in questa modalità
nl.ami.BMConvErr:NetSurf requires guigfx.library to display images in this mode
zh_CN.ami.BMConvErr:在这ç§æ¨¡å¼ä¸‹ï¼ŒNetSurf éœ€è¦ guigfx.library æ¥æ˜¾ç¤ºå›¾åƒ
en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
de.ami.MultiTabClose:Wirklich mehrere Tabs schließen?
-fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+fr.ami.MultiTabClose:Êtes-vous sûr de vouloir fermer plusieurs onglets en même temps ?
it.ami.MultiTabClose:Sono rimaste aperte più schede, sei sicuro di voler chiudere NetSurf?
nl.ami.MultiTabClose:Er zijn meerdere tabbladen geopend. Tabbladen allemaal sluiten?
zh_CN.ami.MultiTabClose:您确定è¦å…³é—­å¤šä¸ªæ ‡ç­¾é¡µå—?
en.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
de.ami.TCPIPShutdown:Der TCP/IP Stack geht grad' zur Hölle und reißt Netsurf mit sich. In genau 5 Sekunden - es sei denn, der Shutdown wird abgebrochen.
-fr.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
+fr.ami.TCPIPShutdown:La pile TCP/IP a signalé son arrêt et NetSurf doit donc être fermé. NetSurf va s’arrêter dans 5 secondes à moins que cet arrêt soit annulé.
it.ami.TCPIPShutdown:Lo stack TCP/IP ha dato segnale di essere in procinto di arresto, NetSurf verrà chiuso. NetSurf si chiuderà entro 5 secondi a meno che lo shutdown non venga interrotto.
nl.ami.TCPIPShutdown:De TCP/IP-stack meldt dat deze wordt afgesloten waardoor NetSurf gestopt moet worden. NetSurf zal stoppen in 5 seconden, tenzij het afsluiten wordt afgebroken.
zh_CN.ami.TCPIPShutdown:TCP/IP 堆栈已å‘出å³å°†å…³é—­çš„ä¿¡å·ï¼Œå¹¶ä¸” NetSurf 必须退出。除éžä¸­æ­¢å…³æœºï¼Œå¦åˆ™ NetSurf 将在 5 秒钟内退出。
en.ami.AbortShutdown:Abort shutdown
de.ami.AbortShutdown:Shutdown abbrechen
-fr.ami.AbortShutdown:Abort shutdown
+fr.ami.AbortShutdown:Annuler l’arrêt
it.ami.AbortShutdown:Interrompi lo shutdown
nl.ami.AbortShutdown:Afsluiten afbreken
zh_CN.ami.AbortShutdown:中止关机
@@ -760,14 +770,14 @@ zh_CN.ami.AbortShutdown:中止关机
#
en.all.AbortDownload:Are you sure you wish to abort this download?
de.all.AbortDownload:Soll das Herunterladen der Datei wirklich abgebrochen werden ?
-fr.all.AbortDownload:Étes-vous sûr de vouloir interrompre ce téléchargement ?
+fr.all.AbortDownload:Étes-vous sûr de vouloir interrompre ce téléchargement ?
it.all.AbortDownload:Sei sicuro di voler annullare questo trasferimento?
nl.all.AbortDownload:Zeker weten dat deze ophaalopdracht afgebroken moet worden?
zh_CN.all.AbortDownload:您确定è¦ä¸­æ­¢æ­¤ä¸‹è½½ä»»åŠ¡å—?
en.all.QuitDownload:One or more downloads are still in progress. Are you sure you wish to quit?
de.all.QuitDownload:Das Herunterladen ein oder mehrerer Dateien wurde noch nicht abgeschlossen. Soll NetSurf trotzdem beendet werden ?
-fr.all.QuitDownload:Un ou plusieurs téléchargements sont en cours. Êtes-vous sûr de vouloir quitter ?
+fr.all.QuitDownload:Un ou plusieurs téléchargements sont en cours. Êtes-vous sûr de vouloir quitter ?
it.all.QuitDownload:Uno o più file si trovano in fase di scaricamento, sei sicuro di voler chiudere NetSurf?
nl.all.QuitDownload:Eén of meer ophaalopdrachten zijn nog in uitvoering. Toch afbreken?
zh_CN.all.QuitDownload:一或多个下载任务ä»åœ¨è¿›è¡Œä¸­ã€‚您确定è¦é€€å‡ºå—?
@@ -781,7 +791,7 @@ zh_CN.all.OverwriteFile:å·²ç»å­˜åœ¨å…·æœ‰è¯¥å称的文件,原文件将会ä¸
en.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
de.all.RemoveHotlist:Adresse wirklich aus der Hotlist entfernen?
-fr.all.RemoveHotlist:Êtes-vous sûr de vouloir supprimer l'adresse de la liste critique?
+fr.all.RemoveHotlist:Êtes-vous sûr de vouloir supprimer cette adresse des marque-pages ?
it.all.RemoveHotlist:Sei sicuro di voler rimuovere questo indirizzo dai segnalibri?
nl.all.RemoveHotlist:Zeker weten dat dit adres uit de favorietenlijst verwijderd moet worden?
zh_CN.all.RemoveHotlist:您确定è¦ä»Žå¸¸ç”¨é¡¹åˆ—表中删除此地å€å—?
@@ -812,7 +822,7 @@ zh_CN.all.ProgressU:%s
en.all.RecPercent:Received %s (%u%%)
de.all.RecPercent:Empfangen %s (%u%%)
-fr.all.RecPercent:%s (%u%%)
+fr.all.RecPercent:%s reçus (%u%%)
it.all.RecPercent:ricevuti %s (%u%%)
nl.all.RecPercent:ontvangen %s (%u%%)
zh_CN.all.RecPercent:已收到 %s (%u%%)
@@ -826,7 +836,7 @@ zh_CN.all.Received:已收到 %s
en.all.Redirecting:Redirecting...
de.all.Redirecting:Umleiten...
-fr.all.Redirecting:Redirection en cours...
+fr.all.Redirecting:Redirection en cours…
it.all.Redirecting:redirezione in corso...
nl.all.Redirecting:doorverwijzen...
zh_CN.all.Redirecting:正在é‡å®šå‘…
@@ -877,7 +887,7 @@ zh_CN.all.Stopped:å·²åœæ­¢
#
en.all.BadRedirect:Bad redirect URL
de.all.BadRedirect:Falsche URL für Redirect
-fr.all.BadRedirect:Mauvais URL de redirection
+fr.all.BadRedirect:Mauvaise URL de redirection
it.all.BadRedirect:Errata redirezione dell'URL
nl.all.BadRedirect:foutief doorverwijzen naar adres
zh_CN.all.BadRedirect:错误的é‡å®šå‘地å€
@@ -891,35 +901,35 @@ zh_CN.all.FetchFailed:无法获å–文件
en.all.NotCSS:Warning: stylesheet is not CSS
de.all.NotCSS:Warnung:Stylesheet ist kein CSS
-fr.all.NotCSS:Attention: feuille de style non CSS
+fr.all.NotCSS:Attention : la feuille de style n’est pas du CSS
it.all.NotCSS:Attenzione: La dicitura "Foglio di stile" non ha nulla a che vedere con i CSS
nl.all.NotCSS:melding: stijlblad is geen CSS
zh_CN.all.NotCSS:警告:样å¼è¡¨ä¸æ˜¯ CSS æ ·å¼
en.all.NotFavIco:Favicon not supported
de.all.NotFavIco:Favicon wird nicht unterstützt
-fr.all.NotFavIco:Favicon non-soutenu
+fr.all.NotFavIco:Favicon non reconnu
it.all.NotFavIco:Favicon non supportata
nl.all.NotFavIco:websitesymbool wordt niet ondersteund
zh_CN.all.NotFavIco:ä¸æ”¯æŒçš„网站图标
en.all.BadObject:Warning: bad object type
de.all.BadObject:Warnung: falscher Objekttyp
-fr.all.BadObject:Attention: mauvais type d'objet
+fr.all.BadObject:Attention : mauvais type d’objet
it.all.BadObject:Errore nell'analisi del tipo di oggetto
nl.all.BadObject:melding: fout objecttype
zh_CN.all.BadObject:警告:对象类型错误
en.all.ObjError:Error loading object: %s
de.all.ObjError:Fehler beim Laden des Objektes: %s
-fr.all.ObjError:Erreur lors du chargement de: %s
+fr.all.ObjError:Erreur lors du chargement de : %s
it.all.ObjError:Errore nel caricamento dell'oggetto: %s
nl.all.ObjError:fout bij het laden object: %s
zh_CN.all.ObjError:加载对象时出错:%s
en.all.ParsingFail:Parsing the document failed.
de.all.ParsingFail:Dokumentparsing ist fehlgeschlagen.
-fr.all.ParsingFail:L'analyse syntaxique du document a échoué.
+fr.all.ParsingFail:L’analyse syntaxique du document a échoué.
it.all.ParsingFail:Analisi del documento fallita.
nl.all.ParsingFail:fout bij ontleden van dit document.
zh_CN.all.ParsingFail:无法解æžæ–‡æ¡£ã€‚
@@ -939,42 +949,42 @@ zh_CN.all.CSSBase:无法加载基本样å¼è¡¨
en.all.BadGIF:Reading GIF failed.
de.all.BadGIF:Lesen einer GIF Datei fehlgeschlagen.
-fr.all.BadGIF:Erreur de lecture de GIF.
+fr.all.BadGIF:Erreur de lecture GIF.
it.all.BadGIF:Lettura del file GIF fallita.
nl.all.BadGIF:fout bij lezen GIF.
zh_CN.all.BadGIF:æ— æ³•èŽ·å– GIF 图åƒã€‚
en.all.BadBMP:Reading BMP failed.
de.all.BadBMP:Lesen einer BMP Datei fehlgeschlagen.
-fr.all.BadBMP:Erreur de lecture de BMP.
+fr.all.BadBMP:Erreur de lecture BMP.
it.all.BadBMP:Lettura del file BMP fallita.
nl.all.BadBMP:fout bij lezen BMP.
zh_CN.all.BadBMP:æ— æ³•èŽ·å– BMP 图åƒã€‚
en.all.BadICO:Reading ICO failed.
de.all.BadICO:Lesen einer ICO Datei fehlgeschlagen.
-fr.all.BadICO:Erreur de lecture de ICO.
+fr.all.BadICO:Erreur de lecture ICO.
it.all.BadICO:Lettura del file ICO fallita.
nl.all.BadICO:fout bij lezen ICO.
zh_CN.all.BadICO:æ— æ³•èŽ·å– ICO 图åƒã€‚
en.all.PNGError:Error converting PNG.
de.all.PNGError:Fehler beim PNG konvertieren.
-fr.all.PNGError:Error converting PNG.
+fr.all.PNGError:Erreur de conversion PNG.
it.all.PNGError:Errore durante la conversione PNG.
nl.all.PNGError:fout bij omzetting PNG.
zh_CN.all.PNGError:æ— æ³•è½¬æ¢ PNG 图åƒã€‚
en.all.MNGError:Error converting MNG/PNG/JNG: %i
de.all.MNGError:MNG Library Fehler: %i
-fr.all.MNGError:Erreur dans la bibliothèque MNG: %i
+fr.all.MNGError:Erreur dans la bibliothèque MNG/PNG/JNG : %i
it.all.MNGError:Errore durante la conversione MNG/PNG/JNG: %i
nl.all.MNGError:MNG-bibliotheekfout: %i
zh_CN.all.MNGError:æ— æ³•è½¬æ¢ MNG/PNG/JNG 图åƒï¼š%i
en.all.BadSprite:Invalid or corrupt Sprite data.
de.all.BadSprite:Ungültiges oder beschädigtes Sprite.
-fr.all.BadSprite:Les données du sprite sont invalides ou corrompues.
+fr.all.BadSprite:Les données du « sprite » sont invalides ou corrompues.
it.all.BadSprite:Dati del file Sprite invalidi o corrotti.
nl.all.BadSprite:foutief sprite-bestand.
zh_CN.all.BadSprite:无效或已æŸå的贴图数æ®ã€‚
@@ -1020,14 +1030,14 @@ zh_CN.all.HTTP203:éžæƒå¨ä¿¡æ¯
en.all.HTTP204:No content
de.all.HTTP204:No content
-fr.all.HTTP204:Pas de contenu
+fr.all.HTTP204:Aucun contenu
it.all.HTTP204:Nessun contenuto
nl.all.HTTP204:Geen inhoud
zh_CN.all.HTTP204:无内容
en.all.HTTP205:Reset content
de.all.HTTP205:Reset content
-fr.all.HTTP205:Remise-à-Zéro du contenu
+fr.all.HTTP205:Réinitialisation du contenu
it.all.HTTP205:Resetta contenuto
nl.all.HTTP205:Inhoud opnieuw instellen
zh_CN.all.HTTP205:é‡è®¾å†…容
@@ -1048,7 +1058,7 @@ zh_CN.all.HTTP300:多é‡é€‰æ‹©
en.all.HTTP301:Moved permanently
de.all.HTTP301:Moved permanently
-fr.all.HTTP301:A déménagé définitivement
+fr.all.HTTP301:A changé d’adresse définitivement
it.all.HTTP301:Rimosso permanentemente
nl.all.HTTP301:Definitief verplaatst
zh_CN.all.HTTP301:永久移动
@@ -1069,7 +1079,7 @@ zh_CN.all.HTTP303:查看其他
en.all.HTTP304:Not modified
de.all.HTTP304:Not modified
-fr.all.HTTP304:Pas modifié
+fr.all.HTTP304:Non modifié
it.all.HTTP304:Non modificato
nl.all.HTTP304:Niet gewijzigd
zh_CN.all.HTTP304:未修改
@@ -1097,7 +1107,7 @@ zh_CN.all.HTTP400:错误请求
en.all.HTTP401:Unauthorized
de.all.HTTP401:Unauthorized
-fr.all.HTTP401:Sans autorisation
+fr.all.HTTP401:Non autorisé
it.all.HTTP401:Autorizzazione negata
nl.all.HTTP401:Niet geautoriseerd
zh_CN.all.HTTP401:未ç»æŽˆæƒ
@@ -1118,7 +1128,7 @@ zh_CN.all.HTTP403:å·²ç¦æ­¢
en.all.HTTP404:Not found
de.all.HTTP404:Not found
-fr.all.HTTP404:Pas trouvé
+fr.all.HTTP404:Non trouvé
it.all.HTTP404:Non trovato
nl.all.HTTP404:Niet gevonden
zh_CN.all.HTTP404:未找到
@@ -1132,14 +1142,14 @@ zh_CN.all.HTTP405:方法ä¸å…许
en.all.HTTP406:Not acceptable
de.all.HTTP406:Not acceptable
-fr.all.HTTP406:Pas acceptable
+fr.all.HTTP406:Non acceptable
it.all.HTTP406:Non accettabile
nl.all.HTTP406:Niet aanvaardbaar
zh_CN.all.HTTP406:ä¸æŽ¥å—
en.all.HTTP407:Proxy authentication required
de.all.HTTP407:Proxy authentication required
-fr.all.HTTP407:Authentification du proxy nécessaire
+fr.all.HTTP407:Authentification via proxy nécessaire
it.all.HTTP407:Autentificazione Proxy necessaria
nl.all.HTTP407:Authenticatie op de proxy-server verplicht
zh_CN.all.HTTP407:需è¦ä»£ç†èº«ä»½éªŒè¯
@@ -1167,7 +1177,7 @@ zh_CN.all.HTTP410:已丢失
en.all.HTTP411:Length required
de.all.HTTP411:Length required
-fr.all.HTTP411:Longueur nécessaire
+fr.all.HTTP411:Taille nécessaire
it.all.HTTP411:Lunghezza richiesta
nl.all.HTTP411:Lengte benodigd
zh_CN.all.HTTP411:长度å—é™
@@ -1181,14 +1191,14 @@ zh_CN.all.HTTP412:å‰ææ¡ä»¶å¤±è´¥
en.all.HTTP413:Request entity too large
de.all.HTTP413:Request entity too large
-fr.all.HTTP413:Demande d'entité trop grande
+fr.all.HTTP413:Requète trop grande pour cette entité
it.all.HTTP413:Entità richiesta troppo larga
nl.all.HTTP413:Aanvraag te groot
zh_CN.all.HTTP413:请求的实体过大
en.all.HTTP414:Request-URI too long
de.all.HTTP414:Request-URI too long
-fr.all.HTTP414:Request-URI trop long
+fr.all.HTTP414:L’URI de la requète est trop longue
it.all.HTTP414:Richiesta URI troppo lunga
nl.all.HTTP414:Aanvraagadres te lang
zh_CN.all.HTTP414:请求的 URI 过长
@@ -1202,7 +1212,7 @@ zh_CN.all.HTTP415:ä¸æ”¯æŒçš„媒体类型
en.all.HTTP416:Requested range not satisfiable
de.all.HTTP416:Requested range not satisfiable
-fr.all.HTTP416:Étendue demandée non satisfaisable
+fr.all.HTTP416:Plage demandée non satisfaite
it.all.HTTP416:Estensione richiesta non soddisfabile
nl.all.HTTP416:Aangevraagd gedeelte niet opvraagbaar
zh_CN.all.HTTP416:无法满足è¦æ±‚的范围
@@ -1244,14 +1254,14 @@ zh_CN.all.HTTP503:ä¸å¯ç”¨æœåŠ¡
en.all.HTTP504:Gateway timeout
de.all.HTTP504:Gateway timeout
-fr.all.HTTP504:Délai passerelle expiré
+fr.all.HTTP504:Délai expiré de la passerelle
it.all.HTTP504:Timeout Gateway
nl.all.HTTP504:Aanvraagtijd bij Gateway verstreken
zh_CN.all.HTTP504:网关超时
en.all.HTTP505:HTTP version not supported
de.all.HTTP505:HTTP version not supported
-fr.all.HTTP505:version HTTP non supportée
+fr.all.HTTP505:Version HTTP non supportée
it.all.HTTP505:Versione HTTP non supportata
nl.all.HTTP505:HTTP-versie wordt niet ondersteund
zh_CN.all.HTTP505:ä¸æ”¯æŒçš„ HTTP 版本
@@ -1304,7 +1314,7 @@ zh_CN.all.FileDate:文件日期
en.all.FileTime:Time
de.all.FileTime:Zeit
-fr.all.FileTime:Time
+fr.all.FileTime:Heure
it.all.FileTime:Ora
nl.all.FileTime:Tijd
zh_CN.all.FileTime:文件时间
@@ -1346,7 +1356,7 @@ zh_CN.all.Prev:上一页
en.all.ShowAll:Show All
de.all.ShowAll:Alle zeigen
-fr.all.ShowAll:Tout afficher
+fr.all.ShowAll:Afficher tout
it.all.ShowAll:Mostra Tutto
nl.all.ShowAll:Toon alles
zh_CN.all.ShowAll:显示全部
@@ -1367,17 +1377,17 @@ zh_CN.all.CaseSens:区分大å°å†™
#
en.all.LoginTitle:Authentication Requested
it.all.LoginTitle:Richiesta di Autentificazione
-fr.all.LoginTitle:Authentification demandée
+fr.all.LoginTitle:Authentification requise
zh_CN.all.LoginTitle:è¦æ±‚认è¯
en.all.LoginDescription:The site %s with realm "%s" is requesting credentials for access.
it.all.LoginDescription:Il sito %s con elementi di tipo realm "%s" richiede delle credenziali per l'accesso.
-fr.all.LoginDescription:Le site %s avec le royaume "%s" demande des informations d'identification pour l'accès.
+fr.all.LoginDescription:Le site %s demande des informations d’identification pour accéder au domaine « %s ».
zh_CN.all.LoginDescription:域“%2$sâ€çš„站点 %1$s 正在请求访问凭è¯ã€‚
en.all.LoginAgain:The credentials for the site %s and realm "%s" were rejected.
it.all.LoginAgain:Le credenziali per il sito %s ed il realm "%s" sono state rifiutate.
-fr.all.LoginAgain:Les identifiants pour le site %s et le royaume "%s" ont été rejetés.
+fr.all.LoginAgain:Les identifiants pour le site %s et son domaine « %s » ont été rejetés.
zh_CN.all.LoginAgain:网站 %s 和领域“%sâ€çš„凭è¯è¢«æ‹’ç»ã€‚
en.all.Host:Host
@@ -1396,7 +1406,7 @@ zh_CN.all.Realm:域
en.all.Username:Username
de.all.Username:Benutzername
-fr.all.Username:Nom d'utilisateur
+fr.all.Username:Nom d’utilisateur
it.all.Username:Nome Utente
nl.all.Username:Gebruikersnaam
zh_CN.all.Username:用户å
@@ -1428,12 +1438,13 @@ zh_CN.all.Cancel:å–消
#
en.all.PrivacyTitle:Privacy error
de.all.PrivacyTitle:Datenschutzfehler
-fr.all.PrivacyTitle:Erreur de confidentialité
+fr.all.PrivacyTitle:Problème de confidentialité
it.all.PrivacyTitle:Errore della privacy
nl.all.PrivacyTitle:Privacyfout
zh_CN.all.PrivacyTitle:用户éšç§é”™è¯¯
en.all.PrivacyDescription:A privacy error occurred while communicating with %s this may be a site configuration error or an attempt to steal private information (passwords, messages or credit cards)
+fr.all.PrivacyDescription:Un problème de confidentialité est apparu lors de la communication avec %s. Cela peut être dû à une erreur de configuration du site ou une tentative de vol d’informations privées (mots de passe, messages, numéros de carte de crédit, …)
it.all.PrivacyDescription:Si è verificato un errore della privacy durante la comunicazione con %s fai attenzione, questo potrebbe essere un errore di configurazione del sito oppure un tentativo di rubare informazioni private (password, messaggi o numeri di carte di credito)
zh_CN.all.PrivacyDescription:与 %s 通讯时å‘生éšç§é”™è¯¯ï¼Œè¿™å¯èƒ½æ˜¯ç½‘ç«™é…置错误或试图窃å–ç§äººä¿¡æ¯ï¼ˆå¯†ç ï¼Œæ¶ˆæ¯æˆ–信用å¡ï¼‰å¯¼è‡´çš„
@@ -1453,59 +1464,70 @@ zh_CN.all.ViewCertificatesNotPossible:è¯ä¹¦ä¿¡æ¯ä¸å¯æŸ¥çœ‹
en.all.Proceed:Proceed
de.all.Proceed:Vorgehen
-fr.all.Proceed:Procéder
+fr.all.Proceed:Continuer
it.all.Proceed:Procedi
nl.all.Proceed:Doorgaan
zh_CN.all.Proceed:继续进行
en.all.Backtosafety:Back to safety
de.all.Backtosafety:Zurück zur Sicherheit
-fr.all.Backtosafety:Retour a la sécurité
+fr.all.Backtosafety:Retourner en sécurité
it.all.Backtosafety:Torna al modo sicuro
nl.all.Backtosafety:Terug naar veiligheid
zh_CN.all.Backtosafety:返回到安全区域
en.all.SSLCertErrOk:The certificate has no errors.
+fr.all.SSLCertErrOk:Le certificat n’a pas d’erreur.
it.all.SSLCertErrOk:Il certificato non contiene errori.
zh_CN.all.SSLCertErrOk:è¯ä¹¦æ²¡æœ‰é”™è¯¯ã€‚
en.all.SSLCertErrUnknown:An unknown error occurred while processing the certificate.
+fr.all.SSLCertErrUnknown:Une erreur inconnue est survenue durant le traitement du certificat.
it.all.SSLCertErrUnknown:Si è verificato un problema sconosciuto durante l'elaborazione del certificato.
zh_CN.all.SSLCertErrUnknown:处ç†è¯ä¹¦æ—¶å‘生未知错误。
en.all.SSLCertErrBadIssuer:The issuer of this certificate is not known. This may occur if the browser cannot access the certificate authority (CA) bundle.
+fr.all.SSLCertErrBadIssuer:L’émetteur de ce certificat est inconnu. Cela peut arriver si le navigateur ne peut pas accéder au paquet des certificats d’autorité.
it.all.SSLCertErrBadIssuer:L'emittente di questo certificato è sconosciuto. Questo può verificarsi se il browser non è in grado di accedere al pacchetto dell'autorità di certificazione (CA).
zh_CN.all.SSLCertErrBadIssuer:该è¯ä¹¦çš„å‘行者未知。如果æµè§ˆå™¨æ— æ³•è®¿é—®è¯ä¹¦é¢å‘机构(CA)的æ†ç»‘包,则å¯èƒ½ä¼šå‘生这ç§æƒ…况。
en.all.SSLCertErrBadSig:The certificate is improperly signed.
+fr.all.SSLCertErrBadSig:Le certificat est mal signé.
it.all.SSLCertErrBadSig:Il certificato non è stato firmato correttamente.
zh_CN.all.SSLCertErrBadSig:è¯ä¹¦ç­¾åä¸æ­£ç¡®ã€‚
en.all.SSLCertErrTooYoung:The certificate is not yet valid.
+fr.all.SSLCertErrTooYoung:Le certificat n’est pas encore valide.
it.all.SSLCertErrTooYoung:Il certificato non è ancora valido.
zh_CN.all.SSLCertErrTooYoung:è¯ä¹¦å°šæœªç”Ÿæ•ˆã€‚
en.all.SSLCertErrTooOld:The certificate has expired.
+fr.all.SSLCertErrTooOld:Le certificat a expiré.
it.all.SSLCertErrTooOld:Il certificato è scaduto.
zh_CN.all.SSLCertErrTooOld:è¯ä¹¦å·²è¿‡æœŸã€‚
en.all.SSLCertErrSelfSigned:The certificate is self signed.
+fr.all.SSLCertErrSelfSigned:Le certificat est auto-signé.
it.all.SSLCertErrSelfSigned:Il certificato è autofirmato.
zh_CN.all.SSLCertErrSelfSigned:è¯ä¹¦æ˜¯è‡ªç­¾å的。
en.all.SSLCertErrChainSelfSigned:The certificate chain is self signed.
+fr.all.SSLCertErrChainSelfSigned:La chaîne de certification est auto-signée.
it.all.SSLCertErrChainSelfSigned:La catena dei certificati è autofirmata.
zh_CN.all.SSLCertErrChainSelfSigned:è¯ä¹¦é“¾æ˜¯è‡ªç­¾å的。
en.all.SSLCertErrRevoked:The certificate has been revoked by the issuer.
+fr.all.SSLCertErrRevoked:Le certificat a été révoqué par son émetteur.
it.all.SSLCertErrRevoked:Il certificato è stato revocato dall'emittente.
zh_CN.all.SSLCertErrRevoked:该è¯ä¹¦å·²è¢«å‘行者åŠé”€ã€‚
en.all.SSLCertErrHostnameMismatch:The certificate is for a different host than the server.
+fr.all.SSLCertErrHostnameMismatch:Le certificat est pour un nom d’hôte différent de celui du serveur.
it.all.SSLCertErrHostnameMismatch:Il certificato è per un host diverso rispetto al server.
zh_CN.all.SSLCertErrHostnameMismatch:è¯ä¹¦ç”¨äºŽä¸ŽæœåŠ¡å™¨ä¸åŒçš„主机。
en.all.SSLCertErrCertMissing:The certificate was missing from the chain.
+fr.all.SSLCertErrCertMissing:Le certificat n’est pas dans la chaîne.
it.all.SSLCertErrCertMissing:Il certificato mancava dalla catena.
zh_CN.all.SSLCertErrCertMissing:è¯ä¹¦ä»Žé“¾ä¸­ä¸¢å¤±ã€‚
@@ -1514,18 +1536,22 @@ zh_CN.all.SSLCertErrCertMissing:è¯ä¹¦ä»Žé“¾ä¸­ä¸¢å¤±ã€‚
# =======================
#
en.all.TimeoutTitle:Connection timed out
+fr.all.TimeoutTitle:La connexion a expiré
it.all.TimeoutTitle:Connessione scaduta
zh_CN.all.TimeoutTitle:连接超时
en.all.TimeoutDescription: A connection to %s could not be established. The site may be temporarily unavailable or too busy to respond.
+fr.all.TimeoutDescription: La connexion à %s n’a pas pu être établie. Le site peut être temporairement injoignable ou trop occupé pour répondre.
it.all.TimeoutDescription: La connessione a %s non può essere stabilita. Il sito potrebbe essere temporaneamente indisponibile o troppo occupato per rispondere.
zh_CN.all.TimeoutDescription: 无法连接到 %s。该站点å¯èƒ½æš‚æ—¶ä¸å¯ç”¨æˆ–太ç¹å¿™è€Œæ— æ³•å“应。
en.all.Backtoprevious:Back
+fr.all.Backtoprevious:Retour
it.all.Backtoprevious:Indietro
zh_CN.all.Backtoprevious:返回
en.all.TryAgain:Try Again
+fr.all.TryAgain:Essayer à nouveau
it.all.TryAgain:Ricarica
zh_CN.all.TryAgain:é‡è¯•
@@ -1561,56 +1587,56 @@ zh_CN.all.SSLCerts:SSL è¯ä¹¦
en.all.SSLError:NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below.
de.all.SSLError:NetSurf konnte ein SSL Zertifikat nicht prüfen. Bitte die Details unten beachten.
-fr.all.SSLError:NetSurf a échoué dans la vérification de l'authenticité d'un certificat SSL. Vérifier les détails présentés ci-dessous.
+fr.all.SSLError:NetSurf n’a pas réussi à vérifier l’authenticité d’un certificat SSL. Vérifier les détails présentés ci-dessous.
it.all.SSLError:NetSurf non è stato in grado di verificare l'autenticità di questo certificato SSL, per favore verifica i dettagli presenti di seguito
nl.all.SSLError:NetSurf kan de authenticiteit van een SSL-certificaat niet controleren. Controleer onderstaande details.
zh_CN.all.SSLError:NetSurf æ— æ³•éªŒè¯ SSL è¯ä¹¦çš„真实性。请验è¯ä¸‹é¢æ˜¾ç¤ºçš„详细信æ¯ã€‚
en.all.SSL_Certificate_Subject:Subject: %s
de.all.SSL_Certificate_Subject:Subject: %s
-fr.all.SSL_Certificate_Subject:Objet : %s
+fr.all.SSL_Certificate_Subject:Objet : %s
it.all.SSL_Certificate_Subject:Soggetto: %s
nl.all.SSL_Certificate_Subject:Subjekt: %s
zh_CN.all.SSL_Certificate_Subject:主题:%s
en.all.SSL_Certificate_Issuer:Issuer: %s
de.all.SSL_Certificate_Issuer:Issuer: %s
-fr.all.SSL_Certificate_Issuer:Émetteur : %s
+fr.all.SSL_Certificate_Issuer:Émetteur : %s
it.all.SSL_Certificate_Issuer:Emittente: %s
nl.all.SSL_Certificate_Issuer:Uitgever: %s
zh_CN.all.SSL_Certificate_Issuer:å‘行者:%s
en.all.SSL_Certificate_Version:Version: %ld
de.all.SSL_Certificate_Version:Version: %ld
-fr.all.SSL_Certificate_Version:Version : %ld
+fr.all.SSL_Certificate_Version:Version : %ld
it.all.SSL_Certificate_Version:Versione: %ld
nl.all.SSL_Certificate_Version:Versie: %ld
zh_CN.all.SSL_Certificate_Version:版本:%ld
en.all.SSL_Certificate_ValidFrom:Valid from: %s
de.all.SSL_Certificate_ValidFrom:Valid from: %s
-fr.all.SSL_Certificate_ValidFrom:Valide à compter du : %s
+fr.all.SSL_Certificate_ValidFrom:Valide à compter du : %s
it.all.SSL_Certificate_ValidFrom:Valido da: %s
nl.all.SSL_Certificate_ValidFrom:Geldig vanaf: %s
zh_CN.all.SSL_Certificate_ValidFrom:有效期从:%s
en.all.SSL_Certificate_ValidTo:Valid until: %s
de.all.SSL_Certificate_ValidTo:Valid until: %s
-fr.all.SSL_Certificate_ValidTo:Valable jusqu'au : %s
+fr.all.SSL_Certificate_ValidTo:Valable jusqu’au : %s
it.all.SSL_Certificate_ValidTo:Valido fino a: %s
nl.all.SSL_Certificate_ValidTo:Geldig tot: %s
zh_CN.all.SSL_Certificate_ValidTo:有效期至:%s
en.all.SSL_Certificate_Type:Type: %i
de.all.SSL_Certificate_Type:Type: %i
-fr.all.SSL_Certificate_Type:Type : %i
+fr.all.SSL_Certificate_Type:Type : %i
it.all.SSL_Certificate_Type:Tipo: %i
nl.all.SSL_Certificate_Type:Type: %i
zh_CN.all.SSL_Certificate_Type:类型:%i
en.all.SSL_Certificate_Serial:Serial: %ld
de.all.SSL_Certificate_Serial:Serial: %ld
-fr.all.SSL_Certificate_Serial:Série : %ld
+fr.all.SSL_Certificate_Serial:Série : %ld
it.all.SSL_Certificate_Serial:Seriale: %ld
nl.all.SSL_Certificate_Serial:Serienr.: %ld
zh_CN.all.SSL_Certificate_Serial:åºåˆ—å·ï¼š%ld
@@ -1666,7 +1692,7 @@ zh_CN.all.Copies:副本
en.all.Printing:Printing page
de.all.Printing:Drucke Seite
-fr.all.Printing:Page impression
+fr.all.Printing:Impression de la page
it.all.Printing:Stampa della pagina
nl.all.Printing:Pagina aan het afdrukken
zh_CN.all.Printing:正在打å°é¡µé¢
@@ -1683,28 +1709,28 @@ zh_CN.all.Printing:正在打å°é¡µé¢
#
en.all.TreeAdded:Added: %s
de.all.TreeAdded:eingetragen am: %s
-fr.all.TreeAdded:Ajoutée : %s
+fr.all.TreeAdded:Ajoutée : %s
it.all.TreeAdded:Aggiunto: %s
nl.all.TreeAdded:Toegevoegd: %s
zh_CN.all.TreeAdded:新增:%s
en.all.TreeLast:Last visited: %s
de.all.TreeLast:letzter Besuch: %s
-fr.all.TreeLast:Dernière visitée : %s
+fr.all.TreeLast:Dernière visite : %s
it.all.TreeLast:Ultima visita: %s
nl.all.TreeLast:Laatst bezocht: %s
zh_CN.all.TreeLast:上次访问:%s
en.all.TreeVisited:Visited: %s
de.all.TreeVisited:gesehen am: %s
-fr.all.TreeVisited:Visitées : %s
+fr.all.TreeVisited:Visites : %s
it.all.TreeVisited:Visitato: %s
nl.all.TreeVisited:Bezocht: %s keer
zh_CN.all.TreeVisited:访问日期:%s
en.all.TreeVisits:Visits: %i
de.all.TreeVisits:Besuche gesamt: %i
-fr.all.TreeVisits:Visites : %i
+fr.all.TreeVisits:Visites : %i
it.all.TreeVisits:Visite totali: %i
nl.all.TreeVisits:Bezocht: %i keer
zh_CN.all.TreeVisits:访问次数:%i
@@ -1718,63 +1744,63 @@ zh_CN.all.TreeUnknown:未知
en.all.TreeValue:Value: %s
de.all.TreeValue:Eintrag: %s
-fr.all.TreeValue:Valeur : %s
+fr.all.TreeValue:Valeur : %s
it.all.TreeValue:Valore: %s
nl.all.TreeValue:Waarde: %s
zh_CN.all.TreeValue:值:%s
en.all.TreeComment:Comment: %s
de.all.TreeComment:Kommentar: %s
-fr.all.TreeComment:Commentaire : %s
+fr.all.TreeComment:Commentaire : %s
it.all.TreeComment:Commento: %s
nl.all.TreeComment:Commentaar: %s
zh_CN.all.TreeComment:注释:%s
en.all.TreeDomain:Domain: %s%s
de.all.TreeDomain:Domain: %s%s
-fr.all.TreeDomain:Domaine : %s%s
+fr.all.TreeDomain:Domaine : %s%s
it.all.TreeDomain:Dominio: %s%s
nl.all.TreeDomain:Domein: %s%s
zh_CN.all.TreeDomain:域:%s%s
en.all.TreePath:Path: %s%s
de.all.TreePath:Pfad: %s%s
-fr.all.TreePath:Chemin : %s%s
+fr.all.TreePath:Chemin : %s%s
it.all.TreePath:Percorso: %s%s
nl.all.TreePath:Pad: %s%s
zh_CN.all.TreePath:路径:%s%s
en.all.TreeExpires:Expires: %s
de.all.TreeExpires:Verfällt: %s
-fr.all.TreeExpires:Expire : %s
+fr.all.TreeExpires:Expire : %s
it.all.TreeExpires:Scadenza: %s
nl.all.TreeExpires:Verloopt op: %s
zh_CN.all.TreeExpires:过期:%s
en.all.TreeLastUsed:Last used: %s
de.all.TreeLastUsed:Zuletzt genutzt: %s
-fr.all.TreeLastUsed:Dernière utilisation : %s
+fr.all.TreeLastUsed:Dernière utilisation : %s
it.all.TreeLastUsed:Ultimo utilizzo: %s
nl.all.TreeLastUsed:Laatst gebruikt: %s
zh_CN.all.TreeLastUsed:上次使用:%s
en.all.TreeSecure:Secure hosts only: %s
de.all.TreeSecure:Nur sichere Hosts: %s
-fr.all.TreeSecure:Uniquement des sites sécurisés : %s
+fr.all.TreeSecure:Uniquement des sites sécurisés : %s
it.all.TreeSecure:Solo host sicuri: %s
nl.all.TreeSecure:Alleen veilige sites: %s
zh_CN.all.TreeSecure:ä»…é™å®‰å…¨ä¸»æœºï¼š%s
en.all.TreeVersion:Version: %s
de.all.TreeVersion:Version: %s
-fr.all.TreeVersion:Version : %s
+fr.all.TreeVersion:Version : %s
it.all.TreeVersion:Versione: %s
nl.all.TreeVersion:Versie: %s
zh_CN.all.TreeVersion:版本:%s
en.all.TreePersistent:Persistent: %s
de.all.TreePersistent:Persistent: %s
-fr.all.TreePersistent:Persistant : %s
+fr.all.TreePersistent:Persistant : %s
it.all.TreePersistent:Persistenza: %s
nl.all.TreePersistent:Permanent: %s
zh_CN.all.TreePersistent:æŒç»­æ€§ï¼š%s
@@ -1844,7 +1870,7 @@ zh_CN.all.TreeNewFolder:新建目录
en.all.TreeLaunch:Visit URL
de.all.TreeLaunch:URL ansehen
-fr.all.TreeLaunch:Visiter l'URL
+fr.all.TreeLaunch:Visiter l’URL
it.all.TreeLaunch:Visita URL
nl.all.TreeLaunch:Bezoek webadres
zh_CN.all.TreeLaunch:访问 URL
@@ -2000,7 +2026,7 @@ zh_CN.all.TreeviewLabelType:类型
en.all.TreeviewLabelValidUntil:Valid until
de.all.TreeviewLabelValidUntil:Valid until
-fr.all.TreeviewLabelValidUntil:Valable jusqu'au
+fr.all.TreeviewLabelValidUntil:Valable jusqu’au
it.all.TreeviewLabelValidUntil:Valido fino a
nl.all.TreeviewLabelValidUntil:Geldig tot:
zh_CN.all.TreeviewLabelValidUntil:有效期从
@@ -2074,7 +2100,7 @@ zh_CN.all.NewFolderName:新建文件夹
#
en.all.NoTitle:<No title>
de.all.NoTitle:<No title>
-fr.all.NoTitle:<Sans titre>
+fr.all.NoTitle:<sans titre>
it.all.NoTitle:<Senza titolo>
nl.all.NoTitle:<Naamloos>
zh_CN.all.NoTitle:<无标题>
@@ -2083,7 +2109,7 @@ zh_CN.all.NoTitle:<无标题>
#
en.all.TreeHotlist:NetSurf hotlist
de.all.TreeHotlist:NetSurf Hotlist
-fr.all.TreeHotlist:Favoris de NetSurf
+fr.all.TreeHotlist:Marque-pages de NetSurf
it.all.TreeHotlist:Segnalibri di NetSurf
nl.all.TreeHotlist:NetSurf-favorieten
zh_CN.all.TreeHotlist:NetSurf 常用列表
@@ -2095,13 +2121,13 @@ zh_CN.all.TreeHotlist:NetSurf 常用列表
# This secion is for tokens that have user information about the browser
en.ami.NetSurfDesc:Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.
-fr.ami.NetSurfDesc:Petit comme une souris, rapide comme un guépard. NetSurf est un navigateur Web multi-plate-forme libre.
+fr.ami.NetSurfDesc:Petit comme une souris, rapide comme un guépard. NetSurf est un navigateur Web multi-plateforme libre.
it.ami.NetSurfDesc:Piccolo come un mouse e veloce come un ghepardo! NetSurf, il browser web opensource e multi-piattaforma
nl.ami.NetSurfDesc:Klein als een muis, snel als een cheetah en gratis beschikbaar. NetSurf is een multi-platform webbrowser.
zh_CN.ami.NetSurfDesc:NetSurf 体积å°ï¼Œé€Ÿåº¦å¿«ï¼Œå¹¶æä¾›å…è´¹æœåŠ¡ã€‚NetSurf 是一个多平å°çš„网络æµè§ˆå™¨ã€‚
en.gtk.AboutDesc:NetSurf is a small and fast web browser.
-fr.gtk.AboutDesc:NetSurf est un navigateur Web multi-plate-forme libre.
+fr.gtk.AboutDesc:NetSurf est un petit, mais rapide, navigateur Web libre.
it.gtk.AboutDesc:NetSurf, il browser web opensource e multi-piattaforma
nl.gtk.AboutDesc:NetSurf is een kleine, snelle webbrowser met open broncode.
zh_CN.gtk.AboutDesc:NetSurf 是一款体积å°ï¼Œé€Ÿåº¦å¿«çš„网络æµè§ˆå™¨ã€‚
@@ -2118,7 +2144,7 @@ zh_CN.gtk.AboutDesc:NetSurf 是一款体积å°ï¼Œé€Ÿåº¦å¿«çš„网络æµè§ˆå™¨ã€‚
#
en.all.NewLink:Create new address
de.all.NewLink:Neuen Eintrag erstellen
-fr.all.NewLink:Créer une nouvelle adresse
+fr.all.NewLink:Ajouter une nouvelle adresse
it.all.NewLink:Crea nuovo indirizzo
nl.all.NewLink:Nieuw adres aanmaken
zh_CN.all.NewLink:新建地å€
@@ -2132,14 +2158,14 @@ zh_CN.all.NewFolder:新建目录
en.all.EditTitle:Edit title
de.all.EditTitle:Edit title
-fr.all.EditTitle:Éditer le titre
+fr.all.EditTitle:Modifier le titre
it.all.EditTitle:Modifica titolo
nl.all.EditTitle:Wijzig titel
zh_CN.all.EditTitle:修改标题
en.all.EditLink:Edit address
de.all.EditLink:Eintrag bearbeiten
-fr.all.EditLink:Éditer l'adresse
+fr.all.EditLink:Modifier l’adresse
it.all.EditLink:Modifica indirizzo
nl.all.EditLink:Bewerk adres
zh_CN.all.EditLink:修改地å€
@@ -2155,7 +2181,7 @@ zh_CN.all.EditFolder:é‡å‘½å目录
#
en.all.HotlistHomepage:NetSurf homepage
de.all.HotlistHomepage:NetSurf Homepage
-fr.all.HotlistHomepage:Page d'accueil de NetSurf
+fr.all.HotlistHomepage:Page d’accueil de NetSurf
it.all.HotlistHomepage:Pagina iniziale di NetSurf
nl.all.HotlistHomepage:NetSurf-startpagina
zh_CN.all.HotlistHomepage:NetSurf 主页
@@ -2185,14 +2211,14 @@ zh_CN.all.HotlistDownloads:下载最新版本
#
en.ami.HotlistMenu:Hotlist menu
de.ami.HotlistMenu:Hotlist menu
-fr.ami.HotlistMenu:Hotlist menu
+fr.ami.HotlistMenu:Menu des marque-pages
it.ami.HotlistMenu:Menu segnalibri
nl.ami.HotlistMenu:Favorietenmenu
zh_CN.ami.HotlistMenu:常用列表èœå•
en.ami.HotlistToolbar:Hotlist toolbar
de.ami.HotlistToolbar:Hotlist toolbar
-fr.ami.HotlistToolbar:Hotlist toolbar
+fr.ami.HotlistToolbar:Barre d’outils des marque-pages
it.ami.HotlistToolbar:Barra segnalibri
nl.ami.HotlistToolbar:Favorietenwerkbalk
zh_CN.ami.HotlistToolbar:常用列表工具æ 
@@ -2220,7 +2246,7 @@ zh_CN.all.DomainAll:(所有域)
en.all.DateToday:Today
de.all.DateToday:Heute
-fr.all.DateToday:Aujourd'hui
+fr.all.DateToday:Aujourd’hui
it.all.DateToday:Oggi
nl.all.DateToday:Vandaag
zh_CN.all.DateToday:今天
@@ -2355,28 +2381,28 @@ zh_CN.all.Info:ä¿¡æ¯
en.ro.AppHelpNoShortcut:Help...
de.ro.AppHelpNoShortcut:Hilfe...
-fr.ro.AppHelpNoShortcut:Aide...
+fr.ro.AppHelpNoShortcut:Aide…
it.ro.AppHelpNoShortcut:Aiuto...
nl.ro.AppHelpNoShortcut:Hulp...
zh_CN.ro.AppHelpNoShortcut:帮助…
en.beos.AppHelp:Help...
de.beos.AppHelp:Hilfe...
-fr.beos.AppHelp:Aide...
+fr.beos.AppHelp:Aide…
it.beos.AppHelp:Aiuto...
nl.beos.AppHelp:Hulp...
zh_CN.beos.AppHelp:帮助…
en.ro.HotlistShowNoShortcut:Show hotlist...
de.ro.HotlistShowNoShortcut:Hotlist zeigen...
-fr.ro.HotlistShowNoShortcut:Montrer les favoris...
+fr.ro.HotlistShowNoShortcut:Afficher les marque-pages…
it.ro.HotlistShowNoShortcut:Mostra...
nl.ro.HotlistShowNoShortcut:Favorieten...
zh_CN.ro.HotlistShowNoShortcut:显示常用列表…
en.ro.HistGlobalNoShortcut:Show global history...
de.ro.HistGlobalNoShortcut:History (global) zeigen...
-fr.ro.HistGlobalNoShortcut:Montrer l'historique global...
+fr.ro.HistGlobalNoShortcut:Afficher l’historique global…
it.ro.HistGlobalNoShortcut:Mostra cronologia globale...
nl.ro.HistGlobalNoShortcut:Browsergeschiedenis...
zh_CN.ro.HistGlobalNoShortcut:显示全局历å²è®°å½•â€¦
@@ -2389,7 +2415,7 @@ zh_CN.all.Open:打开
en.all.Choices:Choices...
de.all.Choices:Einstellungen...
-fr.all.Choices:Préférences...
+fr.all.Choices:Préférences…
it.all.Choices:Scegli...
nl.all.Choices:Keuzes...
zh_CN.all.Choices:选择…
@@ -2408,7 +2434,7 @@ zh_CN.beos.QuitAccel:Q
#
en.all.OpenURL:Open URL
de.all.OpenURL:Öffne URL
-fr.all.OpenURL:Ouvrir l'URL
+fr.all.OpenURL:Ouvrir l’URL
it.all.OpenURL:Apri URL
nl.all.OpenURL:Weblocatie
zh_CN.all.OpenURL:打开 URL
@@ -2467,14 +2493,14 @@ zh_CN.ro.PageInfo:ä¿¡æ¯ ^F1
en.ro.Save:Save F3
de.ro.Save:Speichern F3
-fr.ro.Save:Sauver F3
+fr.ro.Save:Enregistrer F3
it.ro.Save:Salva F3
nl.ro.Save:Bewaar F3
zh_CN.ro.Save:ä¿å­˜ F3
en.ro.SaveComp:Full save ⇑F3
de.ro.SaveComp:Alles speichern ⇑F3
-fr.ro.SaveComp:Sauvegarde Complète ⇑F3
+fr.ro.SaveComp:Sauvegarde complète ⇑F3
it.ro.SaveComp:Salva Tutto ⇑F3
nl.ro.SaveComp:Bewaar alles ⇑F3
zh_CN.ro.SaveComp:全部ä¿å­˜ ↑F3
@@ -2488,7 +2514,7 @@ zh_CN.all.Export:导出
en.all.SaveURL:Save location
de.all.SaveURL:URL speichern
-fr.all.SaveURL:Sauver le lieu
+fr.all.SaveURL:Enregistrer l’adresse
it.all.SaveURL:Salva indirizzo
nl.all.SaveURL:Bewaar adres
zh_CN.all.SaveURL:ä¿å­˜ä½ç½®
@@ -2513,12 +2539,12 @@ zh_CN.beos.NewWindowNSAccel:N
en.ro.ViewSrc:View source... F8
de.ro.ViewSrc:Quellcode... F8
-fr.ro.ViewSrc:Voir le source... F8
+fr.ro.ViewSrc:Voir la source… F8
it.ro.ViewSrc:Mostra sorgente... F8
nl.ro.ViewSrc:Toon HTML... F8
en.beos.ViewSrc:View source...
de.beos.ViewSrc:Quellcode...
-fr.beos.ViewSrc:Voir le source...
+fr.beos.ViewSrc:Voir le source…
it.beos.ViewSrc:Mostra sorgente...
nl.beos.ViewSrc:Toon HTML...
zh_CN.beos.ViewSrc:查看æºä»£ç â€¦
@@ -2531,7 +2557,7 @@ zh_CN.beos.ViewSrcAccel:U
#
en.ro.Draw:Draw ⇑^F3
fr.ro.Draw:Dessiner ⇑^F3
-it.ro.Draw:Draw â^F3
+it.ro.Draw:Draw �^F3
nl.ro.Draw:Draw-bestand ⇑^F3
zh_CN.ro.Draw:绘图 ↑^F3
@@ -2577,7 +2603,7 @@ zh_CN.all.ObjInfo:ä¿¡æ¯
en.all.ObjSave:Save
de.all.ObjSave:Speichern
-fr.all.ObjSave:Sauver
+fr.all.ObjSave:Enregistrer
it.all.ObjSave:Salva
nl.all.ObjSave:Bewaar
zh_CN.all.ObjSave:ä¿å­˜
@@ -2618,7 +2644,7 @@ zh_CN.all.LinkSave:ä¿å­˜
en.all.LinkDload:Download target
de.all.LinkDload:Ziel speichern
-fr.all.LinkDload:Téléchargement cible
+fr.all.LinkDload:Télécharger la cible
it.all.LinkDload:Scarica file
nl.all.LinkDload:Haal op
zh_CN.all.LinkDload:下载目标
@@ -2642,7 +2668,7 @@ zh_CN.all.SelSave:ä¿å­˜
#
en.all.Home:Home page
de.all.Home:Homepage
-fr.all.Home:Page d'accueil
+fr.all.Home:Page d’accueil
it.all.Home:Pagina iniziale
nl.all.Home:Startpagina
zh_CN.all.Home:主页
@@ -2659,7 +2685,7 @@ nl.all.Back:Vorige pagina
zh_CN.all.Back:åŽé€€
en.beos.BackAccel:â†
-it.beos.BackAccel:â
+it.beos.BackAccel:�
zh_CN.beos.BackAccel:â†
en.all.Forward:Forward one page
@@ -2670,18 +2696,18 @@ nl.all.Forward:Volgende pagina
zh_CN.all.Forward:å‰è¿›
en.beos.ForwardAccel:→
-it.beos.ForwardAccel:â
+it.beos.ForwardAccel:�
zh_CN.beos.ForwardAccel:→
en.all.UpLevel:Up one level
de.all.UpLevel:Eine Ebene hoch
-fr.all.UpLevel:Remonter d'un niveau
+fr.all.UpLevel:Remonter d’un niveau
it.all.UpLevel:Livello superiore
nl.all.UpLevel:Niveau omhoog
zh_CN.all.UpLevel:回到上级
en.beos.UpLevelAccel:↑
-it.beos.UpLevelAccel:â
+it.beos.UpLevelAccel:�
zh_CN.beos.UpLevelAccel:↑
en.ro.Reload:Reload this page ^F5
@@ -2729,7 +2755,7 @@ zh_CN.all.Images:图åƒ
en.all.Toolbars:Toolbars
de.all.Toolbars:Anzeigen und Leisten
-fr.all.Toolbars:Barre d'outils
+fr.all.Toolbars:Barres d’outils
it.all.Toolbars:Barre strumenti
nl.all.Toolbars:Toon gereedschapbalken
zh_CN.all.Toolbars:工具æ 
@@ -2775,21 +2801,21 @@ zh_CN.all.ToolButtons:按钮
en.all.ToolAddress:Address bar
de.all.ToolAddress:Adressleiste
-fr.all.ToolAddress:Barre d'adresse
+fr.all.ToolAddress:Barre d’adresse
it.all.ToolAddress:Barra indirizzi
nl.all.ToolAddress:Adresveld
zh_CN.all.ToolAddress:地å€æ 
en.all.ToolThrob:Throbber
de.all.ToolThrob:Ladeaktivität
-fr.all.ToolThrob:Pulseur
+fr.all.ToolThrob:Indicateur d’activité
it.all.ToolThrob:Indicatore di attività
nl.all.ToolThrob:Laadactiviteit
zh_CN.all.ToolThrob:动æ€æµè§ˆå›¾ç¤º
en.all.ToolStatus:Status bar
de.all.ToolStatus:Statusanzeige
-fr.all.ToolStatus:Barre d'état
+fr.all.ToolStatus:Barre d’état
it.all.ToolStatus:Barra di stato
nl.all.ToolStatus:Statusbalk
zh_CN.all.ToolStatus:状æ€æ 
@@ -2798,14 +2824,14 @@ zh_CN.all.ToolStatus:状æ€æ 
#
en.all.RenderAnims:Buffer animations
de.all.RenderAnims:Animationen zwischenspeichern
-fr.all.RenderAnims:Tamponner les animations
+fr.all.RenderAnims:Utiliser un tampon pour les animations
it.all.RenderAnims:Buffer animazioni
nl.all.RenderAnims:Buffer animaties
zh_CN.all.RenderAnims:缓冲动画
en.all.RenderAll:Buffer all rendering
de.all.RenderAll:Alles zwischenspeichern
-fr.all.RenderAll:Tamponner tous les rendus
+fr.all.RenderAll:Utiliser un tampon pour tous les rendus
it.all.RenderAll:Blocca tutto l'interprete
nl.all.RenderAll:Buffer gehele weergave
zh_CN.all.RenderAll:缓冲所有渲染
@@ -2813,7 +2839,7 @@ zh_CN.all.RenderAll:缓冲所有渲染
# Main -> Utilities menu
#
en.all.Hotlist:Hotlist
-fr.all.Hotlist:Favoris
+fr.all.Hotlist:Marque-pages
it.all.Hotlist:Segnalibri
nl.all.Hotlist:Favorieten
zh_CN.all.Hotlist:常用列表
@@ -2831,7 +2857,7 @@ zh_CN.all.Cookies:Cookies
en.ro.FindText:Find text F4
de.ro.FindText:Text suchen F4
-fr.ro.FindText:Recherche de texte F4
+fr.ro.FindText:Recherche texte F4
it.ro.FindText:Trova testo F4
nl.ro.FindText:Zoek tekst F4
zh_CN.ro.FindText:查找文本 F4
@@ -2847,14 +2873,14 @@ zh_CN.all.Window:窗å£
#
en.all.HotlistAdd:Add to hotlist
de.all.HotlistAdd:Eintrag hinzufügen
-fr.all.HotlistAdd:Ajouter aux favoris
+fr.all.HotlistAdd:Ajouter aux marque-pages
it.all.HotlistAdd:Aggiungi
nl.all.HotlistAdd:Voeg pagina toe
zh_CN.all.HotlistAdd:添加至常用列表
en.ro.HotlistShow:Show hotlist... F6
de.ro.HotlistShow:Hotlist zeigen... F6
-fr.ro.HotlistShow:Montrer les favoris... F6
+fr.ro.HotlistShow:Afficher les marque-pages… F6
it.ro.HotlistShow:Mostra... F6
nl.ro.HotlistShow:Favorieten... F6
zh_CN.ro.HotlistShow:显示常用列表… F6
@@ -2863,14 +2889,14 @@ zh_CN.ro.HotlistShow:显示常用列表… F6
#
en.ro.HistLocal:Show local history... F7
de.ro.HistLocal:History (lokal) zeigen... F7
-fr.ro.HistLocal:Montrer l'historique local... F7
+fr.ro.HistLocal:Afficher l’historique local… F7
it.ro.HistLocal:Mostra cronologia locale... F7
nl.ro.HistLocal:Venstergeschiedenis... F7
zh_CN.ro.HistLocal:显示本地历å²è®°å½•â€¦ F7
en.ro.HistGlobal:Show global history... ^F7
de.ro.HistGlobal:History (global) zeigen... ^F7
-fr.ro.HistGlobal:Montrer l'historique global... ^F7
+fr.ro.HistGlobal:Afficher l’historique global… ^F7
it.ro.HistGlobal:Mostra cronologia globale... ^F7
nl.ro.HistGlobal:Browsergeschiedenis... ^F7
zh_CN.ro.HistGlobal:显示全局历å²è®°å½•â€¦ ^F7
@@ -2878,7 +2904,7 @@ zh_CN.ro.HistGlobal:显示全局历å²è®°å½•â€¦ ^F7
# Main -> Utilities -> Cookies menu
en.all.ShowCookies:Show cookies...
de.all.ShowCookies:Cookies verwalten...
-fr.all.ShowCookies:Montrer les cookies...
+fr.all.ShowCookies:Afficher les cookies…
it.all.ShowCookies:Mostra cookie...
nl.all.ShowCookies:Cookiesbeheer...
zh_CN.all.ShowCookies:显示 Cookies …
@@ -2901,7 +2927,7 @@ zh_CN.all.WindowSave:设置为默认ä½ç½®
en.all.WindowStagr:Stagger window position
de.all.WindowStagr:neue Fenster versetzen
-fr.all.WindowStagr:Décaler la position des nouv. fenêtres
+fr.all.WindowStagr:Étaler la position des fenêtres
it.all.WindowStagr:Sfalsa posizione della finestra
nl.all.WindowStagr:Open vensters stapelgewijs
zh_CN.all.WindowStagr:错开窗å£ä½ç½®
@@ -2915,7 +2941,7 @@ zh_CN.all.WindowSize:æ‹·è´çª—å£ä½ç½®
en.all.WindowReset:Reset default position
de.all.WindowReset:Fensterposition zurücksetzen
-fr.all.WindowReset:RAZ de la position par défaut
+fr.all.WindowReset:Revenir à la position par défaut
it.all.WindowReset:Resetta posizione della finestra
nl.all.WindowReset:Herstel standaardwaarden
zh_CN.all.WindowReset:é‡ç½®é»˜è®¤ä½ç½®
@@ -2923,7 +2949,7 @@ zh_CN.all.WindowReset:é‡ç½®é»˜è®¤ä½ç½®
# Main -> Help menu
#
en.ro.HelpContent:Contents F1
-de.ro.HelpContent:Inhalt F1
+de.ro.HelpContent:Inhalt F1
fr.ro.HelpContent:Contenus F1
it.ro.HelpContent:Contenuti F1
nl.ro.HelpContent:Inhoudsopgave F1
@@ -2931,7 +2957,7 @@ zh_CN.ro.HelpContent:内容 F1
en.ro.HelpGuide:User guide
de.ro.HelpGuide:Handbuch
-fr.ro.HelpGuide:Guide de l'utilisateur
+fr.ro.HelpGuide:Guide de l’utilisateur
it.ro.HelpGuide:Guida in linea
nl.ro.HelpGuide:Gebruikershandleiding
zh_CN.ro.HelpGuide:用户指å—
@@ -2951,6 +2977,7 @@ zh_CN.all.HelpCredits:制作人员åå•
en.all.HelpLicence:Licence
de.all.HelpLicence:Lizenz
+fr.all.HelpLicence:Licence
it.all.HelpLicence:Licenza
nl.all.HelpLicence:Licentie
zh_CN.all.HelpLicence:许å¯è¯
@@ -2966,14 +2993,14 @@ zh_CN.ro.HelpInter:交互å¼å¸®åŠ©ç”¨æˆ·
#
en.all.Toolbar:Toolbar
de.all.Toolbar:Symbolleiste
-fr.all.Toolbar:Barre d'outils
+fr.all.Toolbar:Barre d’outils
it.all.Toolbar:Barra strumenti
nl.all.Toolbar:Gereedschapbalk
zh_CN.all.Toolbar:工具æ 
en.all.EditToolbar:Edit toolbar
de.all.EditToolbar:Symbolleiste bearbeiten
-fr.all.EditToolbar:Éditer la barre d'outils
+fr.all.EditToolbar:Éditer la barre d’outils
it.all.EditToolbar:Modifica barra strumenti
nl.all.EditToolbar:Aanpasmodus
zh_CN.all.EditToolbar:编辑工具æ 
@@ -3026,7 +3053,7 @@ zh_CN.ro.Paste:从剪贴æ¿ç²˜è´´ ^V
#
en.all.Edit:Edit
de.all.Edit:Bearbeiten
-fr.all.Edit:Éditer
+fr.all.Edit:Édition
it.all.Edit:Modifica
nl.all.Edit:Wijzig naam
zh_CN.all.Edit:编辑
@@ -3063,14 +3090,14 @@ zh_CN.all.New:新建
en.all.Expand:Expand
de.all.Expand:Expandieren
-fr.all.Expand:Déployer
+fr.all.Expand:Développer
it.all.Expand:Espandi
nl.all.Expand:Klap uit
zh_CN.all.Expand:扩展
en.all.Collapse:Collapse
de.all.Collapse:Zusammenfalten
-fr.all.Collapse:Regrouper
+fr.all.Collapse:Réduire
it.all.Collapse:Raggruppa
nl.all.Collapse:Klap in
zh_CN.all.Collapse:崩溃
@@ -3082,7 +3109,7 @@ nl.all.Tree:Tree
zh_CN.all.Tree:æ ‘
en.all.TreeExport:Export...
-fr.all.TreeExport:Exporter...
+fr.all.TreeExport:Exporter…
it.all.TreeExport:Esporta...
nl.all.TreeExport:Exporteer...
zh_CN.all.TreeExport:导出…
@@ -3217,14 +3244,14 @@ zh_CN.all.Display:显示
en.all.ImgStyle0:Use OS
de.all.ImgStyle0:RISC OS nutzen
-fr.all.ImgStyle0:Utiliser l'OS
+fr.all.ImgStyle0:Utiliser l’OS
it.all.ImgStyle0:Usa OS
nl.all.ImgStyle0:RISC OS-routines
zh_CN.all.ImgStyle0:使用æ“作系统
en.all.ImgStyle1:Direct to screen
de.all.ImgStyle1:Direktausgabe
-fr.all.ImgStyle1:Directement sur l'écran
+fr.all.ImgStyle1:Directement sur l’écran
it.all.ImgStyle1:Diretto su schermo
nl.all.ImgStyle1:Directe weergave
zh_CN.all.ImgStyle1:直接在å±å¹•ä¸Šæ˜¾ç¤º
@@ -3238,7 +3265,7 @@ zh_CN.all.ImgStyle2:数字抖动
en.all.ImgStyle3:Error diffused
de.all.ImgStyle3:Error-Diffusion
-fr.all.ImgStyle3:Avec diffusion d'erreur
+fr.all.ImgStyle3:Avec diffusion d’erreur
it.all.ImgStyle3:Errore diffuso
nl.all.ImgStyle3:Foutdiffusie
zh_CN.all.ImgStyle3:误差扩散方法
@@ -3272,7 +3299,7 @@ zh_CN.all.NewTab:新建标签页
en.all.CloseTab:Close tab
de.all.CloseTab:Schließe Tab
-fr.all.CloseTab:Fermer l'onglet
+fr.all.CloseTab:Fermer l’onglet
it.all.CloseTab:Chiudi scheda
nl.all.CloseTab:Sluit tabblad
zh_CN.all.CloseTab:关闭标签页
@@ -3293,42 +3320,42 @@ zh_CN.all.SaveAsNS:å¦å­˜ä¸º
en.all.Source:Source...
de.all.Source:Quelle...
-fr.all.Source:Source...
+fr.all.Source:Source…
it.all.Source:Sorgente...
nl.all.Source:Bron...
zh_CN.all.Source:æºä»£ç â€¦
en.all.TextNS:Text...
de.all.TextNS:Text...
-fr.all.TextNS:Texte...
+fr.all.TextNS:Texte…
it.all.TextNS:Testo...
nl.all.TextNS:Tekst...
zh_CN.all.TextNS:文本…
en.all.SaveCompNS:Complete...
de.all.SaveCompNS:Komplett...
-fr.all.SaveCompNS:Complète ...
+fr.all.SaveCompNS:Complète…
it.all.SaveCompNS:Cartella...
nl.all.SaveCompNS:Compleet...
zh_CN.all.SaveCompNS:补全…
en.all.PDFNS:PDF...
de.all.PDFNS:PDF...
-fr.all.PDFNS:PDF...
+fr.all.PDFNS:PDF…
it.all.PDFNS:PDF...
nl.all.PDFNS:PDF...
zh_CN.all.PDFNS:PDF…
en.ami.IFF:IFF...
de.ami.IFF:IFF...
-fr.ami.IFF:IFF...
+fr.ami.IFF:IFF…
it.ami.IFF:IFF...
nl.ami.IFF:IFF...
zh_CN.ami.IFF:IFF…
en.all.OpenFile:Open local file...
de.all.OpenFile:Öffne lokale Datei...
-fr.all.OpenFile:Ouvrir un fichier local ...
+fr.all.OpenFile:Ouvrir un fichier local…
it.all.OpenFile:Apri file locale...
nl.all.OpenFile:Open lokaal bestand...
zh_CN.all.OpenFile:打开本地文件…
@@ -3342,7 +3369,7 @@ zh_CN.all.About:关于
en.all.PrintNS:Print...
de.all.PrintNS:Drucken...
-fr.all.PrintNS:Imprimer...
+fr.all.PrintNS:Imprimer…
it.all.PrintNS:Stampa...
nl.all.PrintNS:Druk af...
zh_CN.all.PrintNS:打å°â€¦
@@ -3409,28 +3436,28 @@ zh_CN.all.Browser:æµè§ˆå™¨
en.all.HistGlobalNS:Show global history
de.all.HistGlobalNS:Zeige globale History
-fr.all.HistGlobalNS:Afficher l'historique global
+fr.all.HistGlobalNS:Afficher l’historique global
it.all.HistGlobalNS:Mostra cronologia globale
nl.all.HistGlobalNS:Toon browsergeschiedenis
zh_CN.all.HistGlobalNS:显示全局历å²è®°å½•
en.all.HistLocalNS:Show local history
de.all.HistLocalNS:Zeige lokale History
-fr.all.HistLocalNS:Afficher l'historique local
+fr.all.HistLocalNS:Afficher l’historique local
it.all.HistLocalNS:Mostra cronologia locale
nl.all.HistLocalNS:Toon venstergeschiedenis
zh_CN.all.HistLocalNS:显示本地历å²è®°å½•
en.ami.ShowCookiesNS:Show cookies
de.ami.ShowCookiesNS:Cookies verwalten
-fr.ami.ShowCookiesNS:Montrer les cookies
+fr.ami.ShowCookiesNS:Afficher les cookies
it.ami.ShowCookiesNS:Mostra cookie
nl.ami.ShowCookiesNS:Toon cookies
zh_CN.ami.ShowCookiesNS:显示 Cookies
en.all.FindTextNS:Find text...
de.all.FindTextNS:Suchen...
-fr.all.FindTextNS:Recherche de texte...
+fr.all.FindTextNS:Recherche de texte…
it.all.FindTextNS:Trova testo...
nl.all.FindTextNS:Zoek tekst...
zh_CN.all.FindTextNS:查找文本…
@@ -3474,7 +3501,7 @@ zh_CN.all.ScaleNorm:正常
#
en.all.HotlistShowNS:Show hotlist
de.all.HotlistShowNS:Zeige Hotlist
-fr.all.HotlistShowNS:Afficher les favoris
+fr.all.HotlistShowNS:Afficher les marque-pages
it.all.HotlistShowNS:Mostra
nl.all.HotlistShowNS:Toon favorieten
zh_CN.all.HotlistShowNS:显示常用列表
@@ -3520,7 +3547,7 @@ zh_CN.ami.ARexx:ARexx
en.ami.ARexxExecute:Execute script...
de.ami.ARexxExecute:Script ausführen...
-fr.ami.ARexxExecute:Executer script...
+fr.ami.ARexxExecute:Executer script…
it.ami.ARexxExecute:Esegui script...
nl.ami.ARexxExecute:Voer script uit...
zh_CN.ami.ARexxExecute:执行脚本…
@@ -3562,21 +3589,21 @@ zh_CN.all.CopyClip:å¤åˆ¶åˆ°å‰ªè´´æ¿
en.all.SaveAs:Save as...
de.all.SaveAs:Speichern als...
-fr.all.SaveAs:Enregistrer sous...
+fr.all.SaveAs:Enregistrer sous…
it.all.SaveAs:Salva come...
nl.all.SaveAs:Bewaar als...
zh_CN.all.SaveAs:å¦å­˜ä¸ºâ€¦
en.ami.SaveIFF:Save as IFF...
de.ami.SaveIFF:Speichern als IFF...
-fr.ami.SaveIFF:Enregistrer sous IFF...
+fr.ami.SaveIFF:Enregistrer sous IFF…
it.ami.SaveIFF:Salva come IFF...
nl.ami.SaveIFF:Bewaar als IFF...
zh_CN.ami.SaveIFF:å¦å­˜ä¸º IFF …
en.all.SaveComplete:Save complete...
de.all.SaveComplete:Speichern abgeschlossen...
-fr.all.SaveComplete:Enregistrement terminé...
+fr.all.SaveComplete:Enregistrement terminé…
it.all.SaveComplete:Salva tutto...
nl.all.SaveComplete:Bewaar alles...
zh_CN.all.SaveComplete:完æˆä¿å­˜â€¦
@@ -3590,21 +3617,21 @@ zh_CN.all.Close:关闭
en.ami.CloseInactive:Close inactive tabs
de.ami.CloseInactive:Close inactive tabs
-fr.ami.CloseInactive:Close inactive tabs
+fr.ami.CloseInactive:Fermer les onglets inactifs
it.ami.CloseInactive:Chiudi schede inattive
nl.ami.CloseInactive:Close inactive tabs
zh_CN.ami.CloseInactive:关闭闲置的标签页
en.all.ObjShow:Show object
de.all.ObjShow:Zeige Objekt
-fr.all.ObjShow:Afficher l'objet
+fr.all.ObjShow:Afficher l’objet
it.all.ObjShow:Mostra file
nl.all.ObjShow:Toon object
zh_CN.all.ObjShow:显示对象
en.all.Frame:Frame
de.all.Frame:Frame
-fr.all.Frame:Frame
+fr.all.Frame:Cadre
it.all.Frame:Frame
nl.all.Frame:Vensterkader
zh_CN.all.Frame:帧
@@ -3625,14 +3652,14 @@ zh_CN.all.FrameNewTab:在新标签页中显示
en.all.FrameOnly:Show only this frame
de.all.FrameOnly:Nur diesen Frame anzeigen
-fr.all.FrameOnly:N'afficher que ce cadre
+fr.all.FrameOnly:N’afficher que ce cadre
it.all.FrameOnly:Apri frame in questa finestra
nl.all.FrameOnly:Toon alleen dit vensterkader
zh_CN.all.FrameOnly:仅显示此帧
en.all.SelectFile:Select file...
de.all.SelectFile:Datei auswählen...
-fr.all.SelectFile:Sélectionnez le fichier...
+fr.all.SelectFile:Sélectionnez le fichier…
it.all.SelectFile:Seleziona file...
nl.all.SelectFile:Selecteer bestand...
zh_CN.all.SelectFile:选择文件…
@@ -3654,27 +3681,27 @@ zh_CN.all.ExternalApp:在外部应用中打开
en.all.Download:%s of %s • %s/s • %s remaining
de.all.Download:%s von %s • %s/s • noch %s
fr.all.Download:%s de %s • %s/s • %s restants
-it.all.Download:%s di %s ⢠%s/s ⢠%s al termine
+it.all.Download:%s di %s �� %s/s �� %s al termine
nl.all.Download:%s van %s • %s/s • nog %s
zh_CN.all.Download:第 %s 个,共 %s 个 • %s/s • 剩余 %s
en.all.DownloadU:%s of unknown • %s/s • %s total
de.all.DownloadU:%s von unbekannt • %s/s • bisher %s
fr.all.DownloadU:%s sur inconnu • %s/s • %s total
-it.all.DownloadU:%s sconosciuto ⢠%s/s ⢠%s totale
+it.all.DownloadU:%s sconosciuto �� %s/s �� %s totale
nl.all.DownloadU:%s van onbekend • %s/s • %s totaal
zh_CN.all.DownloadU:未知 %s • %s/s • 总共 %s
en.all.Downloaded:%s complete • average %s/s • %s total
de.all.Downloaded:%s komplett • etwa %s/s • gesamt %s
fr.all.Downloaded:%s effectués • moyenne %s/s • %s total
-it.all.Downloaded:%s completato ⢠average %s/s ⢠%s totale
+it.all.Downloaded:%s completato �� average %s/s �� %s totale
nl.all.Downloaded:%s compleet • gemiddeld %s/s • %s totaal
zh_CN.all.Downloaded:å®Œæˆ %s • å¹³å‡ %s/s • 总共 %s
en.all.Unwritten:Writing data to file failed.
de.all.Unwritten:Schreiben der Datei ist fehlgeschlagen.
-fr.all.Unwritten:L'écriture de données dans le fichier a échoué.
+fr.all.Unwritten:L’écriture de données dans le fichier a échoué.
it.all.Unwritten:Scrittura dei dati sul file fallita.
nl.all.Unwritten:Informatie naar bestand wegschrijven is mislukt.
zh_CN.all.Unwritten:将数æ®å†™å…¥æ–‡ä»¶å¤±è´¥ã€‚
@@ -3693,21 +3720,21 @@ zh_CN.all.Abort:中止
#
en.ami.amiDownloading:NetSurf: Downloading...
de.ami.amiDownloading:NetSurf: Downloading...
-fr.ami.amiDownloading:NetSurf: Downloading...
+fr.ami.amiDownloading:NetSurf: Téléchargement…
it.ami.amiDownloading:NetSurf: Scaricamento...
nl.ami.amiDownloading:NetSurf: Downloading...
zh_CN.ami.amiDownloading:NetSurf:正在下载…
en.ami.amiDownload:%ld of %ld bytes downloaded
de.ami.amiDownload:%ld von %ld Bytes heruntergeladen
-fr.ami.amiDownload:%ld of %ld bytes downloaded
+fr.ami.amiDownload:%ld de %ld bytes téléchargés
it.ami.amiDownload:%ld di %ld byte scaricati
nl.ami.amiDownload:%ld van %ld bytes opgehaald
zh_CN.ami.amiDownload:已下载 %2$ld 个字节中的 %1$ld 个
en.ami.amiDownloadU:%ld bytes downloaded
de.ami.amiDownloadU:%ld Bytes heruntergeladen
-fr.ami.amiDownloadU:%ld bytes downloaded
+fr.ami.amiDownloadU:%ld bytes téléchargés
it.ami.amiDownloadU:%ld byte scaricati
nl.ami.amiDownloadU:%ld bytes opgehaald
zh_CN.ami.amiDownloadU:已下载 %ld 个字节
@@ -3757,7 +3784,7 @@ zh_CN.gtk.gtkProgressBar:%.0f%%,共 %u 个文件
en.gtk.gtkProgressBarPulse:Downloading %u files
de.gtk.gtkProgressBarPulse:Lade %u Dateien herunter
-fr.gtk.gtkProgressBarPulse:Tèlèchargement des fichiers %u
+fr.gtk.gtkProgressBarPulse:Téléchargement des fichiers %u
it.gtk.gtkProgressBarPulse:Scaricamento dei file %u
nl.gtk.gtkProgressBarPulse:%u bestanden aan het downloaden
zh_CN.gtk.gtkProgressBarPulse:正在下载 %u 个文件
@@ -3826,7 +3853,7 @@ zh_CN.gtk.gtkCanceled: å·²å–消
en.gtk.gtkWorking: Working
de.gtk.gtkWorking: Arbeite
-fr.gtk.gtkWorking: en cours
+fr.gtk.gtkWorking: En cours
it.gtk.gtkWorking: In corso
nl.gtk.gtkWorking: In bedrijf
zh_CN.gtk.gtkWorking: 正在处ç†
@@ -3835,7 +3862,7 @@ zh_CN.gtk.gtkWorking: 正在处ç†
#
en.gtk.gtkQuit:Quit NetSurf?
de.gtk.gtkQuit:NetSurf beenden?
-fr.gtk.gtkQuit:Quitter NetSurf ?
+fr.gtk.gtkQuit:Quitter NetSurf ?
it.gtk.gtkQuit:Sei sicuro di voler uscire da NetSurf?
nl.gtk.gtkQuit:NetSurf afsluiten?
zh_CN.gtk.gtkQuit:是å¦é€€å‡º NetSurf?
@@ -3849,28 +3876,28 @@ zh_CN.gtk.gtkDownloadsRunning:ç›®å‰ä»ç„¶æœ‰ä¸‹è½½ä»»åŠ¡æ­£åœ¨è¿è¡Œï¼Œå¦‚æžœæ‚
en.gtk.gtkStartDownload:Download file?
de.gtk.gtkStartDownload:Datei herunterladen?
-fr.gtk.gtkStartDownload:Téléchargement du fichier?
+fr.gtk.gtkStartDownload:Téléchargement du fichier ?
it.gtk.gtkStartDownload:Scaricare il file?
nl.gtk.gtkStartDownload:Bestand downloaden?
zh_CN.gtk.gtkStartDownload:下载文件?
en.gtk.gtkOverwrite:A file named "%s" already exists. Do you want to replace it?
de.gtk.gtkOverwrite:Eine Datei mit dem Namen "%s" existiert bereits. Soll sie ersetzt werden?
-fr.gtk.gtkOverwrite:Un fichier nommé "%s" existe déja. Voulez-vous le remplacer ?
+fr.gtk.gtkOverwrite:Un fichier nommé « %s » existe déja. Voulez-vous le remplacer ?
it.gtk.gtkOverwrite:Il file "%s" è già esistente. Si desidera sovrascriverlo?
nl.gtk.gtkOverwrite:Een bestand met de naam "%s" bestaat reeds. Bestand overschrijven en vervangen?
zh_CN.gtk.gtkOverwrite:已存在å为 “%s†的文件。您è¦æ›¿æ¢å®ƒå—?
en.gtk.gtkOverwriteTitle:File exists
de.gtk.gtkOverwriteTitle:File exists
-fr.gtk.gtkOverwriteTitle:Le fichier existe
+fr.gtk.gtkOverwriteTitle:Fichier existant
it.gtk.gtkOverwriteTitle:File già esistente
nl.gtk.gtkOverwriteTitle:Bestand bestaat reeds.
zh_CN.gtk.gtkOverwriteTitle:文件已存在
en.gtk.gtkOverwriteInfo:The file already exists in "%s". Replacing it will overwrite its contents.
de.gtk.gtkOverwriteInfo:Die Datei existiert bereits im Verzeichnis "%s". Beim ersetzen wird ihr momentaner Inhalt überschrieben.
-fr.gtk.gtkOverwriteInfo:Le fichier existe déja dans "%s". Son remplacement réécrira son contenu.
+fr.gtk.gtkOverwriteInfo:Le fichier existe déja dans « %s ». Son remplacement réécrira son contenu.
it.gtk.gtkOverwriteInfo:Il file è già esistente in "%s". Sostituirlo comporterà la sovrascrittura del file.
nl.gtk.gtkOverwriteInfo:Het bestand bestaat reeds in map "%s". Bij het vervangen zal de huidige inhoud worden overschreven.
zh_CN.gtk.gtkOverwriteInfo:“%s†中已有该文件。替æ¢æ­¤æ–‡ä»¶ä¼šè¦†ç›–其内容。
@@ -3884,7 +3911,7 @@ zh_CN.gtk.gtkFailed:下载失败
en.gtk.gtkFileError:File error: %s
de.gtk.gtkFileError:Dateifehler: %s
-fr.gtk.gtkFileError:Erreur de fichier : %s
+fr.gtk.gtkFileError:Erreur de fichier : %s
it.gtk.gtkFileError:Errore file: %s
nl.gtk.gtkFileError:Bestandsfout: %s
zh_CN.gtk.gtkFileError:文件错误: %s
@@ -3898,14 +3925,14 @@ zh_CN.gtk.gtkInfo:%2$s 中的 %1$s 大å°æ˜¯ %3$s
en.gtk.gtkSave:Save file as…
de.gtk.gtkSave:Datei speichern unter...
-fr.gtk.gtkSave:Enregistrer le fichier sous...
+fr.gtk.gtkSave:Enregistrer le fichier sous…
it.gtk.gtkSave:Salva file come...
nl.gtk.gtkSave:Bestand bewaren als...
zh_CN.gtk.gtkSave:文件å¦å­˜ä¸ºâ€¦
en.gtk.gtkSourceSave:Save source
de.gtk.gtkSourceSave:Quelltext speichern
-fr.gtk.gtkSourceSave:Enregistrer la Source
+fr.gtk.gtkSourceSave:Enregistrer la source
it.gtk.gtkSourceSave:Salva sorgente
nl.gtk.gtkSourceSave:Brontekst bewaren
zh_CN.gtk.gtkSourceSave:ä¿å­˜æº
@@ -3915,7 +3942,7 @@ de.gtk.gtkSourceTabError:Fehler beim behandeln der Quelldaten
fr.gtk.gtkSourceTabError:Erreur de manipulation des données source
it.gtk.gtkSourceTabError:Errore di modifica sul sorgente
nl.gtk.gtkSourceTabError:Fout plaatsgevonden bij afhandelen brondata
-zh_CN.gtk.gtkSourceTabError:处ç†æºæ•°æ®æ—¶å‡ºé”™
+zh_CN.gtk.gtkSourceTabError:处ç†æºæ•°æ®æ—¶å‡ºé”™
en.gtk.gtkplainSave:Save plain text
de.gtk.gtkplainSave:Als Text speichern
@@ -3926,7 +3953,7 @@ zh_CN.gtk.gtkplainSave:ä¿å­˜çº¯æ–‡æœ¬
en.gtk.gtkcompleteSave:Export complete page as a folder
de.gtk.gtkcompleteSave:Seite komplett speichern
-fr.gtk.gtkcompleteSave:Enregistrer page web complète
+fr.gtk.gtkcompleteSave:Enregistrer la page Web complète
it.gtk.gtkcompleteSave:Salva pagina web completa
nl.gtk.gtkcompleteSave:Complete webpagina bewaren
zh_CN.gtk.gtkcompleteSave:将完整页é¢å¯¼å‡ºä¸ºæ–‡ä»¶å¤¹
@@ -3940,7 +3967,7 @@ zh_CN.gtk.gtkSaveConfirm:文件已ä¿å­˜
en.gtk.gtkSaveCancelled:File not saved
de.gtk.gtkSaveCancelled:Datei nicht gespeichert
-fr.gtk.gtkSaveCancelled:Fichier pas enregistré
+fr.gtk.gtkSaveCancelled:Fichier non enregistré
it.gtk.gtkSaveCancelled:File non salvato
nl.gtk.gtkSaveCancelled:Bestand is niet bewaard
zh_CN.gtk.gtkSaveCancelled:文件未ä¿å­˜
@@ -3970,6 +3997,7 @@ zh_CN.gtk.gtkUnknownSize:未知大å°
#
en.gtk.gtkOpenMenu:Open Menu
+fr.gtk.gtkOpenMenu:Ouvrir le menu
it.gtk.gtkOpenMenu:Apri menu
zh_CN.gtk.gtkOpenMenu:打开èœå•
@@ -3982,7 +4010,7 @@ zh_CN.gtk.gtkFile:文件(_F)
en.gtk.gtkEdit:_Edit
de.gtk.gtkEdit:_Bearbeiten
-fr.gtk.gtkEdit:Édit_er
+fr.gtk.gtkEdit:Édi_tion
it.gtk.gtkEdit:Mo_difica
nl.gtk.gtkEdit:Be_werken
zh_CN.gtk.gtkEdit:退出(_E)
@@ -4003,7 +4031,7 @@ zh_CN.gtk.gtkNavigate:导航(_N)
en.gtk.gtkTools:_Tools
de.gtk.gtkTools:_Tools
-fr.gtk.gtkTools:Ou_tils
+fr.gtk.gtkTools:_Outils
it.gtk.gtkTools:_Strumenti
nl.gtk.gtkTools:E_xtra
zh_CN.gtk.gtkTools:工具(_T)
@@ -4017,14 +4045,14 @@ zh_CN.gtk.gtkHelp:帮助(_H)
en.gtk.gtkNewTab:New _Tab
de.gtk.gtkNewTab:Neuer _Tab
-fr.gtk.gtkNewTab:Nouvel _Onglet
+fr.gtk.gtkNewTab:Nouvel _onglet
it.gtk.gtkNewTab:Nuova _scheda
nl.gtk.gtkNewTab:Nieuw _Tabblad
zh_CN.gtk.gtkNewTab:新建标签页(_T)
en.gtk.gtkNewWindow:_New Window
de.gtk.gtkNewWindow:_Neues Fenster
-fr.gtk.gtkNewWindow:_Nouvelle Fenêtre
+fr.gtk.gtkNewWindow:_Nouvelle fenêtre
it.gtk.gtkNewWindow:Nuova _finestra
nl.gtk.gtkNewWindow:_Nieuw venster
zh_CN.gtk.gtkNewWindow:新建窗å£(_N)
@@ -4052,49 +4080,49 @@ zh_CN.gtk.gtkExport:导出
en.gtk.gtkSavePage:Complete Page…
de.gtk.gtkSavePage:Seite speichern..
-fr.gtk.gtkSavePage:Enregistrer la Page...
+fr.gtk.gtkSavePage:Enregistrer la Page…
it.gtk.gtkSavePage:Salva pagina...
nl.gtk.gtkSavePage:Pagina bewaren...
zh_CN.gtk.gtkSavePage:完整页é¢â€¦
en.gtk.gtkPlainText:Plain Text…
de.gtk.gtkPlainText:Reiner Text..
-fr.gtk.gtkPlainText:Texte...
+fr.gtk.gtkPlainText:Texte…
it.gtk.gtkPlainText:Testo normale...
nl.gtk.gtkPlainText:Platte tekst...
zh_CN.gtk.gtkPlainText:纯文本…
en.gtk.gtkDrawFile:Drawfile…
de.gtk.gtkDrawFile:Drawfile..
-fr.gtk.gtkDrawFile:Fichier dessin...
+fr.gtk.gtkDrawFile:Fichier dessin…
it.gtk.gtkDrawFile:File Draw...
nl.gtk.gtkDrawFile:Draw-bestand...
zh_CN.gtk.gtkDrawFile:绘图文件…
en.gtk.gtkPostScript:PostScript…
de.gtk.gtkPostScript:PostScript..
-fr.gtk.gtkPostScript:PostScript...
+fr.gtk.gtkPostScript:PostScript…
it.gtk.gtkPostScript:File PostScript...
nl.gtk.gtkPostScript:PostScript...
zh_CN.gtk.gtkPostScript:PostScript…
en.gtk.gtkPDF:PDF…
de.gtk.gtkPDF:PDF..
-fr.gtk.gtkPDF:PDF...
+fr.gtk.gtkPDF:PDF…
it.gtk.gtkPDF:File PDF...
nl.gtk.gtkPDF:PDF...
zh_CN.gtk.gtkPDF:PDF…
en.gtk.gtkPrintPreview:Print Preview…
de.gtk.gtkPrintPreview:Druckvorschau...
-fr.gtk.gtkPrintPreview:Aperçu avant impression...
+fr.gtk.gtkPrintPreview:Aperçu avant impression…
it.gtk.gtkPrintPreview:Anteprima di stampa...
nl.gtk.gtkPrintPreview:Afdruk_voorbeeld...
zh_CN.gtk.gtkPrintPreview:打å°é¢„览…
en.gtk.gtkPrint:Print…
de.gtk.gtkPrint:Drucken...
-fr.gtk.gtkPrint:Imprimer...
+fr.gtk.gtkPrint:Imprimer…
it.gtk.gtkPrint:Stampa...
nl.gtk.gtkPrint:Af_drukken...
zh_CN.gtk.gtkPrint:打å°â€¦
@@ -4143,7 +4171,7 @@ zh_CN.gtk.gtkSelectAll:全选(_A)
en.gtk.gtkFind:_Find…
de.gtk.gtkFind:_Finden..
-fr.gtk.gtkFind:_Rechercher...
+fr.gtk.gtkFind:_Rechercher…
it.gtk.gtkFind:T_rova...
nl.gtk.gtkFind:_Zoeken...
zh_CN.gtk.gtkFind:查找(_F) …
@@ -4227,14 +4255,14 @@ zh_CN.gtk.gtkForegroundImages:å‰æ™¯å›¾åƒ(_F)
en.gtk.gtkBackgroundImages:_Background Images
de.gtk.gtkBackgroundImages:_Hintergrundbilder
-fr.gtk.gtkBackgroundImages:_Images d'arrière plan
+fr.gtk.gtkBackgroundImages:_Images d’arrière plan
it.gtk.gtkBackgroundImages:In _sottofondo
nl.gtk.gtkBackgroundImages:_Achtergrondafbeeldingen
zh_CN.gtk.gtkBackgroundImages:背景图åƒ(_B)
en.gtk.gtkToolbars:_Toolbars
de.gtk.gtkToolbars:_Werkzeugleisten
-fr.gtk.gtkToolbars:Barre d'ou_tils
+fr.gtk.gtkToolbars:Barres d’ou_tils
it.gtk.gtkToolbars:_Barre strumenti
nl.gtk.gtkToolbars:_Werkbalken
zh_CN.gtk.gtkToolbars:工具æ (_T)
@@ -4255,21 +4283,21 @@ zh_CN.gtk.gtkMenuBar:èœå•æ (_M)
en.gtk.gtkToolBar:_Button Bar
de.gtk.gtkToolBar:_Buttonleiste
-fr.gtk.gtkToolBar:_Barre de boutons
+fr.gtk.gtkToolBar:_Barre de navigation
it.gtk.gtkToolBar:Barra p_ulsanti
nl.gtk.gtkToolBar:_Knoppenbalk
zh_CN.gtk.gtkToolBar:按钮æ (_B)
en.gtk.gtkStatusBar:_Status Bar
de.gtk.gtkStatusBar:_Statusleiste
-fr.gtk.gtkStatusBar:Ba_rre d'état
+fr.gtk.gtkStatusBar:Ba_rre d’état
it.gtk.gtkStatusBar:Barra di s_tato
nl.gtk.gtkStatusBar:_Statusbalk
zh_CN.gtk.gtkStatusBar:状æ€æ (_S)
en.gtk.gtkDownloads:_Downloads...
de.gtk.gtkDownloads:_Downloads...
-fr.gtk.gtkDownloads:_Téléchargements...
+fr.gtk.gtkDownloads:_Téléchargements…
it.gtk.gtkDownloads:_Trasferimenti...
nl.gtk.gtkDownloads:_Downloads...
zh_CN.gtk.gtkDownloads:下载(_D) …
@@ -4297,14 +4325,14 @@ zh_CN.gtk.gtkToggleDebugging:切æ¢è°ƒè¯•æ¸²æŸ“(_O)
en.gtk.gtkDebugBoxTree:Debug _box tree
de.gtk.gtkDebugBoxTree:Debug _box tree
-fr.gtk.gtkDebugBoxTree:Déboguer arbre _box
+fr.gtk.gtkDebugBoxTree:Déboguer l’arbre d’em_boîtement
it.gtk.gtkDebugBoxTree:Debug _box tree
nl.gtk.gtkDebugBoxTree:_Box-boom debuggen
zh_CN.gtk.gtkDebugBoxTree:调试边框树(_B)
en.gtk.gtkDebugDomTree:Debug _DOM tree
de.gtk.gtkDebugDomTree:Debug _DOM tree
-fr.gtk.gtkDebugDomTree:Déboguer arbre _DOM
+fr.gtk.gtkDebugDomTree:Déboguer l’arbre _DOM
it.gtk.gtkDebugDomTree:Debug albero _DOM
nl.gtk.gtkDebugDomTree:_DOM-boom debuggen
zh_CN.gtk.gtkDebugDomTree:调试 _DOM 树
@@ -4347,28 +4375,28 @@ zh_CN.gtk.gtkGlobalHistory:全局历å²è®°å½•(_G) …
en.gtk.gtkAddBookMarks:_Add to Bookmarks…
de.gtk.gtkAddBookMarks:_Lesezeichen hinzufügen..
-fr.gtk.gtkAddBookMarks:_Ajouter un marque-page..
+fr.gtk.gtkAddBookMarks:_Ajouter un marque-page…
it.gtk.gtkAddBookMarks:Aggiungi ai _segnalibri...
nl.gtk.gtkAddBookMarks:_Aan bladwijzers toevoegen...
zh_CN.gtk.gtkAddBookMarks:添加到书签(_A) …
en.gtk.gtkShowBookMarks:_Show Bookmarks…
de.gtk.gtkShowBookMarks:Le_sezeichen anzeigen..
-fr.gtk.gtkShowBookMarks:_Montrer les marques-pages...
+fr.gtk.gtkShowBookMarks:_Afficher les marque-pages…
it.gtk.gtkShowBookMarks:_Mostra segnalibri...
nl.gtk.gtkShowBookMarks:Bladwijzers _beheren...
zh_CN.gtk.gtkShowBookMarks:显示书签(_S) …
en.gtk.gtkShowCookies:Show _Cookies…
de.gtk.gtkShowCookies:Zeige _Cookies…
-fr.gtk.gtkShowCookies:Afficher _cookies...
+fr.gtk.gtkShowCookies:Afficher les _cookies…
it.gtk.gtkShowCookies:Mostra _cookie...
nl.gtk.gtkShowCookies:_Cookies beheren...
zh_CN.gtk.gtkShowCookies:显示 Cookies(_C) …
en.gtk.gtkOpenLocation:_Open Location…
de.gtk.gtkOpenLocation:_Ort öffnen..
-fr.gtk.gtkOpenLocation:_Ouvrir un site..
+fr.gtk.gtkOpenLocation:_Ouvrir un site…
it.gtk.gtkOpenLocation:Apri in_dirizzo...
nl.gtk.gtkOpenLocation:Locatie _openen..
zh_CN.gtk.gtkOpenLocation:打开ä½ç½®ä¿¡æ¯(_O) …
@@ -4389,7 +4417,7 @@ zh_CN.gtk.gtkPrevTab:上一个标签页(_P)
en.gtk.gtkCloseTab:_Close tab
de.gtk.gtkCloseTab:Tab s_chliessen
-fr.gtk.gtkCloseTab:_Fermer l'onglet
+fr.gtk.gtkCloseTab:_Fermer l’onglet
it.gtk.gtkCloseTab:_Chiudi scheda
nl.gtk.gtkCloseTab:Tabblad _sluiten
zh_CN.gtk.gtkCloseTab:关闭标签页(_C)
@@ -4417,42 +4445,42 @@ zh_CN.gtk.gtkUserInformation:用户信æ¯(_I) …
en.gtk.gtkAbout:_About…
de.gtk.gtkAbout:Ü_ber
-fr.gtk.gtkAbout:_A propos...
+fr.gtk.gtkAbout:_À propos…
it.gtk.gtkAbout:_Informazioni...
nl.gtk.gtkAbout:_Programma-informatie...
zh_CN.gtk.gtkAbout:关于(_A) …
en.gtk.gtkCustomize:Customise…
de.gtk.gtkCustomize:Anpassen…
-fr.gtk.gtkCustomize:Personnaliser...
+fr.gtk.gtkCustomize:Personnaliser…
it.gtk.gtkCustomize:Personalizza...
nl.gtk.gtkCustomize:Aanpassen...
zh_CN.gtk.gtkCustomize:自定义(_C) …
en.gtk.gtkOpentab:Open Link in New _Tab
de.gtk.gtkOpentab:Link in neuem _Tab öffnen
-fr.gtk.gtkOpentab:Ouvrir dans un nouvel _Onglet
+fr.gtk.gtkOpentab:Ouvrir dans un nouvel _onglet
it.gtk.gtkOpentab:Apri in nuova _scheda
nl.gtk.gtkOpentab:Koppeling openen in nieuw _tabblad
zh_CN.gtk.gtkOpentab:在新标签页中打开链接(_T)
en.gtk.gtkOpenwin:Open Link in New _Window
de.gtk.gtkOpenwin:Link in neuem _Fenster öffnen
-fr.gtk.gtkOpenwin:Ouvrir dans une nouvelle _Fenêtre
+fr.gtk.gtkOpenwin:Ouvrir dans une nouvelle _fenêtre
it.gtk.gtkOpenwin:Apri in nuova _finestra
nl.gtk.gtkOpenwin:Koppeling openen in nieuw _venster
zh_CN.gtk.gtkOpenwin:在新窗å£ä¸­æ‰“开链接(_W)
en.gtk.gtkSavelink:Save Lin_k
de.gtk.gtkSavelink:Lin_k speichern..
-fr.gtk.gtkSavelink:Enregistrer li_en
+fr.gtk.gtkSavelink:Enregistrer le li_en
it.gtk.gtkSavelink:Salva lin_k
nl.gtk.gtkSavelink:_Koppeling opslaan als...
zh_CN.gtk.gtkSavelink:ä¿å­˜é“¾æŽ¥(_K)
en.gtk.gtkBookmarklink:Bookmark _Link
de.gtk.gtkBookmarklink:_Link als Bookmark
-fr.gtk.gtkBookmarklink:Marquer _Lien
+fr.gtk.gtkBookmarklink:Marquer le _lien
it.gtk.gtkBookmarklink:A_ggiungi ai segnalibri
nl.gtk.gtkBookmarklink:B_ladwijzer voor de koppeling maken
zh_CN.gtk.gtkBookmarklink:书签链接(_L)
@@ -4468,14 +4496,14 @@ zh_CN.gtk.gtkCopylink:å¤åˆ¶é“¾æŽ¥ä½ç½®(_A)
en.gtk.gtkAddThemeTitle:Select folder containing theme images
de.gtk.gtkAddThemeTitle:Ordner mit Themenbildern auswählen
-fr.gtk.gtkAddThemeTitle:Sélectionner le dossier contenant des images de thèmes
+fr.gtk.gtkAddThemeTitle:Sélectionner le dossier contenant des images de thème
it.gtk.gtkAddThemeTitle:Seleziona una cartella contenente le immagini del tema in questione
nl.gtk.gtkAddThemeTitle:Map met thema-afbeeldingen selecteren
zh_CN.gtk.gtkAddThemeTitle:选择包å«ä¸»é¢˜å›¾åƒçš„文件夹
en.gtk.gtkThemeFolderInstructions:To Install a theme, create a directory full of appropriately-named images as a subdirectory of gtk/res/themes/
de.gtk.gtkThemeFolderInstructions:Erstellen sie ein Verzeichnis mit korrekt benannten Bildern als Unterverzeichnis von gtk/res/themes um ein Thema zu installieren
-fr.gtk.gtkThemeFolderInstructions:Pour installer un thème, créer un dossier d'images avec un nom approprié comme sous-dossier de gtk/res/themes/
+fr.gtk.gtkThemeFolderInstructions:Pour installer un thème, créer un dossier d’images avec un nom approprié comme sous-dossier de gtk/res/themes/
it.gtk.gtkThemeFolderInstructions:Per installare un nuovo tema crea una directory con delle immagini appropriate ed inseriscile come sotto-directory di gtk/res/themes/
nl.gtk.gtkThemeFolderInstructions:Maak in de map gtk/res/themes/ een submap aan die afbeeldingen met de juiste namen bevatten om deze als thema te installeren.
zh_CN.gtk.gtkThemeFolderInstructions:如果è¦å®‰è£…主题,请创建一个目录,作为 gtk/res/themes/ çš„å­ç›®å½•ï¼Œå…¶ä¸­åŒ…å«æ­£ç¡®å‘½å的图åƒã€‚
@@ -4496,7 +4524,7 @@ zh_CN.gtk.gtkThemeDup:已应用主题
en.gtk.gtkThemeAdd:Theme added successfully
de.gtk.gtkThemeAdd:Thema erfolgreich hinzugefügt
-fr.gtk.gtkThemeAdd:Le thème a été ajouté avec succes
+fr.gtk.gtkThemeAdd:Le thème a été ajouté avec succès
it.gtk.gtkThemeAdd:Il tema è stato aggiunto con successo
nl.gtk.gtkThemeAdd:Thema is succesvol toegevoegd
zh_CN.gtk.gtkThemeAdd:å·²æˆåŠŸæ·»åŠ ä¸»é¢˜
@@ -4504,36 +4532,44 @@ zh_CN.gtk.gtkThemeAdd:å·²æˆåŠŸæ·»åŠ ä¸»é¢˜
# GTK toolbar customisation
en.gtk.gtkCustomizeToolbarTitle:Customise Toolbar
+fr.gtk.gtkCustomizeToolbarTitle:Personnaliser la barre d’outils
it.gtk.gtkCustomizeToolbarTitle:Personalizza barra strumenti
zh_CN.gtk.gtkCustomizeToolbarTitle:自定义工具æ 
en.gtk.gtkCustomizeToolbarInstructions:Drag toolbar items into and out of the toolbar.
+fr.gtk.gtkCustomizeToolbarInstructions:Glisser-déposer de nouveaux éléments sur la barre.
it.gtk.gtkCustomizeToolbarInstructions:Trascina elementi della barra strumenti dentro e fuori la barra.
zh_CN.gtk.gtkCustomizeToolbarInstructions:拖动工具æ é¡¹ã€‚
# GTK find in page
en.gtk.gtkFindPlaceholder:Find in page
+fr.gtk.gtkFindPlaceholder:Rechercher dans la page
it.gtk.gtkFindPlaceholder:Trova nella pagina
zh_CN.gtk.gtkFindPlaceholder:在页é¢ä¸­æŸ¥æ‰¾
en.gtk.gtkFindBack:Find Previous Occurrence
+fr.gtk.gtkFindBack:Trouver l’occurence précédente
it.gtk.gtkFindBack:Trova occorrenza _precedente
zh_CN.gtk.gtkFindBack:查找上一个匹é…项
en.gtk.gtkFindForward:Find _Next Occurrence
+fr.gtk.gtkFindForward:Trouver l’occurence _suivante
it.gtk.gtkFindForward:Trova occorrenza _successiva
zh_CN.gtk.gtkFindForward:查找下一个匹é…项(_N)
en.gtk.gtkFindHighlightAll:Highlight All
+fr.gtk.gtkFindHighlightAll:Tout surligner
it.gtk.gtkFindHighlightAll:Evidenzia tutto
zh_CN.gtk.gtkFindHighlightAll:çªå‡ºæ˜¾ç¤ºæ‰€æœ‰æŸ¥æ‰¾å†…容
en.gtk.gtkFindMatchCase:Match Case
+fr.gtk.gtkFindMatchCase:Respecter la casse
it.gtk.gtkFindMatchCase:Marca corrispondenze
zh_CN.gtk.gtkFindMatchCase:匹é…查找内容
en.gtk.gtkFindClose:Close Find Bar
+fr.gtk.gtkFindClose:Fermer la barre de recherche
it.gtk.gtkFindClose:Chiudi finestra di ricerca
zh_CN.gtk.gtkFindClose:关闭æœç´¢æ 
@@ -4549,7 +4585,7 @@ zh_CN.gtk.preferencesTitle:NetSurf 首选项
# Main tab
en.gtk.preferencesMainTabtitle:Main
de.gtk.preferencesMainTabtitle:Allgemein
-fr.gtk.preferencesMainTabtitle:Accueil/Principal
+fr.gtk.preferencesMainTabtitle:Général
it.gtk.preferencesMainTabtitle:Principale
nl.gtk.preferencesMainTabtitle:Algemeen
zh_CN.gtk.preferencesMainTabtitle:主èœå•
@@ -4563,7 +4599,7 @@ zh_CN.gtk.preferencesStartup:<b>å¯åŠ¨</b>
en.gtk.preferencesStartupPage:Page:
de.gtk.preferencesStartupPage:Seite:
-fr.gtk.preferencesStartupPage:Page:
+fr.gtk.preferencesStartupPage:Page :
it.gtk.preferencesStartupPage:Pagina:
nl.gtk.preferencesStartupPage:Pagina:
zh_CN.gtk.preferencesStartupPage:页é¢ï¼š
@@ -4598,21 +4634,21 @@ zh_CN.gtk.preferencesSearch:<b>查找</b>
en.gtk.preferencesSearchURLBar:Search from URL bar
de.gtk.preferencesSearchURLBar:Adressleiste zum Suchen
-fr.gtk.preferencesSearchURLBar:Recherche depuis la barre d'URL
+fr.gtk.preferencesSearchURLBar:Recherche depuis la barre d’URL
it.gtk.preferencesSearchURLBar:Cerca da barra URL
nl.gtk.preferencesSearchURLBar:Standaardzoekmachine
zh_CN.gtk.preferencesSearchURLBar:从地å€æ æœç´¢
en.gtk.preferencesSearchProvider:Provider:
de.gtk.preferencesSearchProvider:Anbieter:
-fr.gtk.preferencesSearchProvider:Fournisseur :
+fr.gtk.preferencesSearchProvider:Fournisseur :
it.gtk.preferencesSearchProvider:Provider:
nl.gtk.preferencesSearchProvider:Zoeken met:
zh_CN.gtk.preferencesSearchProvider:æ供者:
en.gtk.preferencesSearchProviderTooltip:The default web search provider
de.gtk.preferencesSearchProviderTooltip:Voreingestellter Suchanbieter
-fr.gtk.preferencesSearchProviderTooltip:Le fournisseur de recherche sur le web par défaut
+fr.gtk.preferencesSearchProviderTooltip:Le fournisseur de recherche Web par défaut
it.gtk.preferencesSearchProviderTooltip:Provider di ricerca web predefinito
nl.gtk.preferencesSearchProviderTooltip:Kies de standaardzoekmachine. NetSurf gebruikt deze in de zoekbalk.
zh_CN.gtk.preferencesSearchProviderTooltip:默认网络æœç´¢æ供者
@@ -4633,21 +4669,21 @@ zh_CN.gtk.preferencesDownloadsRemove:完æˆåŽä»Žåˆ—表中删除下载任务
en.gtk.preferencesDownloadsConfirm:Confirm before overwriting files
de.gtk.preferencesDownloadsConfirm:Überschreiben bestätigen
-fr.gtk.preferencesDownloadsConfirm:Confirmer avant d'écraser des fichiers
+fr.gtk.preferencesDownloadsConfirm:Confirmer avant d’écraser des fichiers
it.gtk.preferencesDownloadsConfirm:Conferma prima di sovrascrivere
nl.gtk.preferencesDownloadsConfirm:Overschrijven van bestand bevestigen
zh_CN.gtk.preferencesDownloadsConfirm:覆盖文件之å‰è¿›è¡Œç¡®è®¤
en.gtk.preferencesDownloadsLocation:Location:
de.gtk.preferencesDownloadsLocation:Zielort:
-fr.gtk.preferencesDownloadsLocation:Emplacement :
+fr.gtk.preferencesDownloadsLocation:Emplacement :
it.gtk.preferencesDownloadsLocation:Percorso:
nl.gtk.preferencesDownloadsLocation:Bestanden opslaan in:
zh_CN.gtk.preferencesDownloadsLocation:ä½ç½®ï¼š
en.gtk.preferencesDownloadsLocationTooltip:The default location downloaded files are put
de.gtk.preferencesDownloadsLocationTooltip:Speicherort für Downloads
-fr.gtk.preferencesDownloadsLocationTooltip:L'emplacement par défaut des fichiers téléchargés sont mis
+fr.gtk.preferencesDownloadsLocationTooltip:L’emplacement par défaut où déplacer les fichiers téléchargés
it.gtk.preferencesDownloadsLocationTooltip:Percorso predefinito dove scaricare i file
nl.gtk.preferencesDownloadsLocationTooltip:De standaardplaats waar gedownloade bestanden worden opgeslagen
zh_CN.gtk.preferencesDownloadsLocationTooltip:默认ä½ç½®æ”¾ç½®ä¸‹è½½çš„文件
@@ -4669,7 +4705,7 @@ zh_CN.gtk.preferencesThemes:<b>主题</b>
en.gtk.preferencesThemesAdd:Add Theme...
de.gtk.preferencesThemesAdd:Thema hinzu...
-fr.gtk.preferencesThemesAdd:Ajouter thème...
+fr.gtk.preferencesThemesAdd:Ajouter un thème…
it.gtk.preferencesThemesAdd:Aggiungi tema...
nl.gtk.preferencesThemesAdd:Thema toevoegen...
zh_CN.gtk.preferencesThemesAdd:添加主题…
@@ -4683,28 +4719,28 @@ zh_CN.gtk.preferencesTabs:<b>标签页</b>
en.gtk.preferencesTabsAlways:Always show tab bar
de.gtk.preferencesTabsAlways:Tableiste immer anzeigen
-fr.gtk.preferencesTabsAlways:Toujours afficher la barre d'onglet
+fr.gtk.preferencesTabsAlways:Toujours afficher la barre d’onglet
it.gtk.preferencesTabsAlways:Mostra sempre la barra delle schede
nl.gtk.preferencesTabsAlways:De tabbladenwerkbalk verbergen wanneer slechts één tabblad is geopend
zh_CN.gtk.preferencesTabsAlways:总是显示标签页æ 
en.gtk.preferencesTabsSwitch:Switch to newly opened tabs immediately
de.gtk.preferencesTabsSwitch:neue Tabs sofort in Vordergrund
-fr.gtk.preferencesTabsSwitch:Passer à l'onglet nouvellement ouvert immédiatement
+fr.gtk.preferencesTabsSwitch:À l’ouverture d’un nouvel onglet, basculer immédiatement vers celui-ci
it.gtk.preferencesTabsSwitch:Passa immediatamente alle nuove schede aperte
nl.gtk.preferencesTabsSwitch:Naar vanuit koppeling geopende nieuwe tabbladen schakelen
zh_CN.gtk.preferencesTabsSwitch:ç«‹å³åˆ‡æ¢åˆ°æ–°æ‰“开的标签页
en.gtk.preferencesTabsNewly:Newly opened tabs are blank
de.gtk.preferencesTabsNewly:neue Tabs als leere Seite
-fr.gtk.preferencesTabsNewly:Onglet récemment ouvert est vièrge
+fr.gtk.preferencesTabsNewly:Utiliser une page vide pour les nouveaux onglets
it.gtk.preferencesTabsNewly:Le nuove schede aperte sono vuote
nl.gtk.preferencesTabsNewly:Geopende nieuwe tabbladen zijn leeg inplaats van de startpagina
zh_CN.gtk.preferencesTabsNewly:新打开的标签页为空白
en.gtk.preferencesTabsPosition:Position:
de.gtk.preferencesTabsPosition:Position:
-fr.gtk.preferencesTabsPosition:Position :
+fr.gtk.preferencesTabsPosition:Position :
it.gtk.preferencesTabsPosition:Posizione:
nl.gtk.preferencesTabsPosition:Positie in venster:
zh_CN.gtk.preferencesTabsPosition:ä½ç½®ï¼š
@@ -4718,56 +4754,56 @@ zh_CN.gtk.preferencesTools:<b>工具</b>
en.gtk.preferencesDeveloperView:Open developer views in a
de.gtk.preferencesDeveloperView:Entwickleransicht öffnen in
-fr.gtk.preferencesDeveloperView:Vues de développement s'ouvrent dans
+fr.gtk.preferencesDeveloperView:La vue de développement s’ouvre dans
it.gtk.preferencesDeveloperView:Apri visualizzazione sviluppatori in
nl.gtk.preferencesDeveloperView:Informatie voor ontwikkelaars openen in
zh_CN.gtk.preferencesDeveloperView:打开开å‘人员视图
en.gtk.preferencesDeveloperViewWindow:Window
de.gtk.preferencesDeveloperViewWindow:Fenster
-fr.gtk.preferencesDeveloperViewWindow:un fenêtre
+fr.gtk.preferencesDeveloperViewWindow:une nouvelle fenêtre
it.gtk.preferencesDeveloperViewWindow:Finestra
nl.gtk.preferencesDeveloperViewWindow:Venster
zh_CN.gtk.preferencesDeveloperViewWindow:窗å£
en.gtk.preferencesDeveloperViewTab:Tab
de.gtk.preferencesDeveloperViewTab:Tab
-fr.gtk.preferencesDeveloperViewTab:un onglet
+fr.gtk.preferencesDeveloperViewTab:un nouvel onglet
it.gtk.preferencesDeveloperViewTab:Scheda
nl.gtk.preferencesDeveloperViewTab:Tabblad
zh_CN.gtk.preferencesDeveloperViewTab:标签页
en.gtk.preferencesDeveloperViewEditor:Editor
de.gtk.preferencesDeveloperViewEditor:Editor
-fr.gtk.preferencesDeveloperViewEditor:Éditeur
+fr.gtk.preferencesDeveloperViewEditor:votre éditeur préféré
it.gtk.preferencesDeveloperViewEditor:Editor di testo
nl.gtk.preferencesDeveloperViewEditor:Tekst-editor
zh_CN.gtk.preferencesDeveloperViewEditor:编辑器
en.gtk.preferencesURLbar:<b>URLbar</b>
de.gtk.preferencesURLbar:<b>Adressleiste</b>
-fr.gtk.preferencesURLbar:<b>Barre URL</b>
+fr.gtk.preferencesURLbar:<b>Barre d’URL</b>
it.gtk.preferencesURLbar:<b>Barra indirizzi</b>
nl.gtk.preferencesURLbar:<b>Locatiebalk</b>
zh_CN.gtk.preferencesURLbar:<b>地å€æ </b>
en.gtk.preferencesURLbarDisplay:Display recently visited URLs as you type
de.gtk.preferencesURLbarDisplay:benutzte URLs während Eingabe zeigen
-fr.gtk.preferencesURLbarDisplay:Afficher les URL visités récemment lorsque vous tapez
+fr.gtk.preferencesURLbarDisplay:Afficher les URL récemment visitées lors de la frappe
it.gtk.preferencesURLbarDisplay:Mostra gli URL visitati di recente durante la digitazione
nl.gtk.preferencesURLbarDisplay:Automatisch aanvullen vanuit de browsergeschiedenis tijdens het typen
zh_CN.gtk.preferencesURLbarDisplay:键入时显示最近访问的地å€
en.gtk.preferencesToolbar:<b>Toolbar</b>
de.gtk.preferencesToolbar:<b>Knopfleiste</b>
-fr.gtk.preferencesToolbar:<b>Barre d'outils</b>
+fr.gtk.preferencesToolbar:<b>Barre d’outils</b>
it.gtk.preferencesToolbar:<b>Barra strumenti</b>
nl.gtk.preferencesToolbar:<b>Werkbalk</b>
zh_CN.gtk.preferencesToolbar:<b>工具æ </b>
en.gtk.preferencesToolbarButtons:Buttons:
de.gtk.preferencesToolbarButtons:Gestalt:
-fr.gtk.preferencesToolbarButtons:Boutons :
+fr.gtk.preferencesToolbarButtons:Boutons :
it.gtk.preferencesToolbarButtons:Pulsanti:
nl.gtk.preferencesToolbarButtons:Knoppen:
zh_CN.gtk.preferencesToolbarButtons:按钮:
@@ -4783,28 +4819,28 @@ zh_CN.gtk.preferencesThemeTypeDefault:默认
# Tab position list
en.gtk.preferencesTabLocTop:Top
de.gtk.preferencesTabLocTop:Oben
-fr.gtk.preferencesTabLocTop:Haut
+fr.gtk.preferencesTabLocTop:en haut
it.gtk.preferencesTabLocTop:In alto
nl.gtk.preferencesTabLocTop:Bovenaan
zh_CN.gtk.preferencesTabLocTop:顶部
en.gtk.preferencesTabLocLeft:Left
de.gtk.preferencesTabLocLeft:Links
-fr.gtk.preferencesTabLocLeft:Gauche
+fr.gtk.preferencesTabLocLeft:à gauche
it.gtk.preferencesTabLocLeft:A sinistra
nl.gtk.preferencesTabLocLeft:Links
zh_CN.gtk.preferencesTabLocLeft:左侧
en.gtk.preferencesTabLocBottom:Bottom
de.gtk.preferencesTabLocBottom:Unten
-fr.gtk.preferencesTabLocBottom:Bas
+fr.gtk.preferencesTabLocBottom:en bas
it.gtk.preferencesTabLocBottom:In basso
nl.gtk.preferencesTabLocBottom:Onderaan
zh_CN.gtk.preferencesTabLocBottom:底部
en.gtk.preferencesTabLocRight:Right
de.gtk.preferencesTabLocRight:Rechts
-fr.gtk.preferencesTabLocRight:Droite
+fr.gtk.preferencesTabLocRight:à droite
it.gtk.preferencesTabLocRight:A destra
nl.gtk.preferencesTabLocRight:Rechts
zh_CN.gtk.preferencesTabLocRight:å³ä¾§
@@ -4812,28 +4848,28 @@ zh_CN.gtk.preferencesTabLocRight:å³ä¾§
# button list
en.gtk.preferencesButtonTypeSmall:Small Icons
de.gtk.preferencesButtonTypeSmall:Kleine Icons
-fr.gtk.preferencesButtonTypeSmall:Petites icônes
+fr.gtk.preferencesButtonTypeSmall:petites icônes
it.gtk.preferencesButtonTypeSmall:Pulsanti piccoli
nl.gtk.preferencesButtonTypeSmall:Kleine pictogrammen
zh_CN.gtk.preferencesButtonTypeSmall:å°å›¾æ ‡
en.gtk.preferencesButtonTypeLarge:Large Icons
de.gtk.preferencesButtonTypeLarge:Große Icons
-fr.gtk.preferencesButtonTypeLarge:Grandes icônes
+fr.gtk.preferencesButtonTypeLarge:grandes icônes
it.gtk.preferencesButtonTypeLarge:Pulsanti grandi
nl.gtk.preferencesButtonTypeLarge:Grote pictogrammen
zh_CN.gtk.preferencesButtonTypeLarge:大图标
en.gtk.preferencesButtonTypeLargeText:Large Icons and Text
de.gtk.preferencesButtonTypeLargeText:Große Icons mit Text
-fr.gtk.preferencesButtonTypeLargeText:Grandes icônes et texte
+fr.gtk.preferencesButtonTypeLargeText:grandes icônes et texte
it.gtk.preferencesButtonTypeLargeText:Pulsanti grandi e testo
nl.gtk.preferencesButtonTypeLargeText:Grote pictogrammen en tekst
zh_CN.gtk.preferencesButtonTypeLargeText:大图标和文本
en.gtk.preferencesButtonTypeText:Text only
de.gtk.preferencesButtonTypeText:Text ohne Icons
-fr.gtk.preferencesButtonTypeText:Texte uniquement
+fr.gtk.preferencesButtonTypeText:texte uniquement
it.gtk.preferencesButtonTypeText:Solo testo
nl.gtk.preferencesButtonTypeText:Alleen tekst
zh_CN.gtk.preferencesButtonTypeText:仅文本
@@ -4855,7 +4891,7 @@ zh_CN.gtk.preferencesControl:<b>控件</b>
en.gtk.preferencesControlPrevent:Prevent pop-up windows
de.gtk.preferencesControlPrevent:Pop-Up Fenster blocken
-fr.gtk.preferencesControlPrevent:Empêcher fenêtres pop-up
+fr.gtk.preferencesControlPrevent:Bloquer les fenêtres popup
it.gtk.preferencesControlPrevent:Blocca finestre pop-up (AdBlock)
nl.gtk.preferencesControlPrevent:Pop-upvensters blokkeren
zh_CN.gtk.preferencesControlPrevent:阻止弹窗
@@ -4869,21 +4905,21 @@ zh_CN.gtk.preferencesControlHide:éšè—广告
en.gtk.preferencesControlEnable:Enable JavaScript
de.gtk.preferencesControlEnable:JavaScript einschalten
-fr.gtk.preferencesControlEnable:Activer JavaScript
+fr.gtk.preferencesControlEnable:Activer le JavaScript
it.gtk.preferencesControlEnable:Attiva JavaScript
nl.gtk.preferencesControlEnable:JavaScript inschakelen
zh_CN.gtk.preferencesControlEnable:å¯ç”¨ JavaScript
en.gtk.preferencesControlDisable:Disable plug-ins
de.gtk.preferencesControlDisable:Plug-Ins abschalten
-fr.gtk.preferencesControlDisable:Désactiver modules externes
+fr.gtk.preferencesControlDisable:Désactiver les modules externes
it.gtk.preferencesControlDisable:Disattiva Plugins
nl.gtk.preferencesControlDisable:Plug-ins uitschakelen
zh_CN.gtk.preferencesControlDisable:ç¦ç”¨æ’件
en.gtk.preferencesControlHigh:High quality image scaling
de.gtk.preferencesControlHigh:Bildskalierung hoher Qualität
-fr.gtk.preferencesControlHigh:Haute qualité d'image redimensionnée
+fr.gtk.preferencesControlHigh:Haute qualité d’image
it.gtk.preferencesControlHigh:Scala immagini in alta qualità
nl.gtk.preferencesControlHigh:Schalen op hoge beeldkwaliteit
zh_CN.gtk.preferencesControlHigh:高质é‡å›¾åƒç¼©æ”¾
@@ -4911,7 +4947,7 @@ zh_CN.gtk.preferencesAnimationEnable:å¯ç”¨
en.gtk.preferencesAnimationMinimum:Minimum time between frames:
de.gtk.preferencesAnimationMinimum:minimale Zeit zwischen Frames:
-fr.gtk.preferencesAnimationMinimum:Temps minimal entre cadres/frames/images/photo :
+fr.gtk.preferencesAnimationMinimum:Temps minimal entre chaque image :
it.gtk.preferencesAnimationMinimum:Limita velocità fotogrammi al secondo:
nl.gtk.preferencesAnimationMinimum:Minimum tijd tussen opeenvolgende animatiebeelden:
zh_CN.gtk.preferencesAnimationMinimum:最å°å¸§é—´éš”时间:
@@ -4925,7 +4961,7 @@ zh_CN.gtk.preferencesAnimationMinimumTooltip:更新动画的频率ä¸è¦è¶…过æ­
en.gtk.preferencesFonts:<b>Fonts</b>
de.gtk.preferencesFonts:<b>Fonts</b>
-fr.gtk.preferencesFonts:<b>Fontes/Polices</b>
+fr.gtk.preferencesFonts:<b>Polices de caractères</b>
it.gtk.preferencesFonts:<b>Font</b>
nl.gtk.preferencesFonts:<b>Lettertypen</b>
zh_CN.gtk.preferencesFonts:<b>字体</b>
@@ -4946,7 +4982,7 @@ zh_CN.gtk.preferencesFontsSize:字体大å°
en.gtk.preferencesFontsSizeTooltip:The base-line font size to use.
de.gtk.preferencesFontsSizeTooltip:Die Standardgröße für Basisschriften.
-fr.gtk.preferencesFontsSizeTooltip:La taille de la fonte/police de base à utiliser.
+fr.gtk.preferencesFontsSizeTooltip:La taille de référence à utiliser pour les polices.
it.gtk.preferencesFontsSizeTooltip:Dimensione base del carattere di linea da utilizzare.
nl.gtk.preferencesFontsSizeTooltip:Het standaardlettertype te gebruiken voor webpagina's.
zh_CN.gtk.preferencesFontsSizeTooltip:è¦ä½¿ç”¨çš„基准字体大å°ã€‚
@@ -4967,7 +5003,7 @@ zh_CN.gtk.preferencesLanguage:<b>语言</b>
en.gtk.preferencesLanguagePreferred:Preferred language:
de.gtk.preferencesLanguagePreferred:bevorzugte Sprache:
-fr.gtk.preferencesLanguagePreferred:Langue préférée :
+fr.gtk.preferencesLanguagePreferred:Langue préférée :
it.gtk.preferencesLanguagePreferred:Lingua preferita:
nl.gtk.preferencesLanguagePreferred:Voorkeurtaal:
zh_CN.gtk.preferencesLanguagePreferred:首选语言:
@@ -4982,28 +5018,28 @@ zh_CN.gtk.preferencesLanguagePreferredTooltip:网页的首选语言
# Image loading list
en.gtk.preferencesImageLoadBoth:foreground and background images
de.gtk.preferencesImageLoadBoth:Vorder- und Hintergrundbilder
-fr.gtk.preferencesImageLoadBoth:Images d'avant-plan et d'arrière-plan
+fr.gtk.preferencesImageLoadBoth:images de premier plan et d’arrière plan
it.gtk.preferencesImageLoadBoth:Immagini in primo piano e di sfondo
nl.gtk.preferencesImageLoadBoth:voorgrond- en achtergrondafbeeldingen
zh_CN.gtk.preferencesImageLoadBoth:å‰æ™¯å’ŒèƒŒæ™¯å›¾åƒ
en.gtk.preferencesImageLoadFore:foreground images
de.gtk.preferencesImageLoadFore:Vordergrundbilder
-fr.gtk.preferencesImageLoadFore:Images d'avant-plan
+fr.gtk.preferencesImageLoadFore:images de premier plan
it.gtk.preferencesImageLoadFore:Immagini in primo piano
nl.gtk.preferencesImageLoadFore:voorgrondafbeeldingen
zh_CN.gtk.preferencesImageLoadFore:å‰æ™¯å›¾åƒ
en.gtk.preferencesImageLoadBack:background images
de.gtk.preferencesImageLoadBack:Hintergrundbilder
-fr.gtk.preferencesImageLoadBack:Images d'arrière-plan
+fr.gtk.preferencesImageLoadBack:images d’arrière plan
it.gtk.preferencesImageLoadBack:Immagini di sfondo
nl.gtk.preferencesImageLoadBack:achtergrondafbeeldingen
zh_CN.gtk.preferencesImageLoadBack:背景图åƒ
en.gtk.preferencesImageLoadNone:no images
de.gtk.preferencesImageLoadNone:Keine Bidlder
-fr.gtk.preferencesImageLoadNone:pas d'images
+fr.gtk.preferencesImageLoadNone:aucune image
it.gtk.preferencesImageLoadNone:Nessuna immagine
nl.gtk.preferencesImageLoadNone:geen afbeeldingen
zh_CN.gtk.preferencesImageLoadNone:无图åƒ
@@ -5025,7 +5061,7 @@ zh_CN.gtk.preferencesFonttypeSerif:衬线字体
en.gtk.preferencesFonttypeMonospace:Monospace
de.gtk.preferencesFonttypeMonospace:Monospace
-fr.gtk.preferencesFonttypeMonospace:Monospace
+fr.gtk.preferencesFonttypeMonospace:Chasse fixe
it.gtk.preferencesFonttypeMonospace:Monospaziato
nl.gtk.preferencesFonttypeMonospace:Monospace
zh_CN.gtk.preferencesFonttypeMonospace:等宽字体
@@ -5039,7 +5075,7 @@ zh_CN.gtk.preferencesFonttypeCursive:手写字体
en.gtk.preferencesFonttypeFantasy:Fantasy
de.gtk.preferencesFonttypeFantasy:Fantasy
-fr.gtk.preferencesFonttypeFantasy:Fantasy
+fr.gtk.preferencesFonttypeFantasy:Fantaisie
it.gtk.preferencesFonttypeFantasy:Fantasia
nl.gtk.preferencesFonttypeFantasy:Fantasie
zh_CN.gtk.preferencesFonttypeFantasy:Fantasy 字体
@@ -5060,14 +5096,14 @@ zh_CN.gtk.preferencesGeneral:<b>常规</b>
en.gtk.preferencesGeneralReferral:Enable referral submission
de.gtk.preferencesGeneralReferral:Referenzen erlauben
-fr.gtk.preferencesGeneralReferral:Permettre l'envoi du referer en entête
+fr.gtk.preferencesGeneralReferral:Autoriser le partage du referer
it.gtk.preferencesGeneralReferral:Permetti invio informazioni sul referral
nl.gtk.preferencesGeneralReferral:Referentie versturen inschakelen
zh_CN.gtk.preferencesGeneralReferral:å¯ç”¨æŽ¨èæ交
en.gtk.preferencesGeneralDNT:Enable sending "Do Not Track" request
de.gtk.preferencesGeneralDNT:Webseiten sollen nicht nachverfolgen dürfen
-fr.gtk.preferencesGeneralDNT:Activer l'envoi d'une requête "Ne pas suivre à la trace"
+fr.gtk.preferencesGeneralDNT:Demander aux sites Web de « ne pas me pister »
it.gtk.preferencesGeneralDNT:Attiva invio per la richiesta di non tracciamento
nl.gtk.preferencesGeneralDNT:Websites laten weten dat gebruiker niet gevolgd wil worden
zh_CN.gtk.preferencesGeneralDNT:å‘é€â€œä¸è·Ÿè¸ªâ€è¯·æ±‚
@@ -5081,14 +5117,14 @@ zh_CN.gtk.preferencesHistory:<b>历å²è®°å½•</b>
en.gtk.preferencesHistoryShow:Local history shows URL in tooltip
de.gtk.preferencesHistoryShow:History (lokal) zeigt die URL in der Hilfe an
-fr.gtk.preferencesHistoryShow:Historique local dans une infobulle
+fr.gtk.preferencesHistoryShow:L’historique local montre les URLs dans une infobulle
it.gtk.preferencesHistoryShow:Mostra cronologia locale dell'URL nella descrizione comandi
nl.gtk.preferencesHistoryShow:Venstergeschiedenis toont webadres in een tipkader
zh_CN.gtk.preferencesHistoryShow:本地历å²è®°å½•åœ¨å·¥å…·æ示中显示 URL
en.gtk.preferencesHistoryRemember:Remember browsing history for up to
de.gtk.preferencesHistoryRemember:History merken für bis zu
-fr.gtk.preferencesHistoryRemember:Conserver l'historique de navigation pendant
+fr.gtk.preferencesHistoryRemember:Conserver l’historique de navigation pendant
it.gtk.preferencesHistoryRemember:Ricorda cronologia di navigazione in
nl.gtk.preferencesHistoryRemember:Browsergeschiedenis onthouden voor
zh_CN.gtk.preferencesHistoryRemember:è®°ä½æµè§ˆåŽ†å²è®°å½•
@@ -5109,14 +5145,14 @@ zh_CN.gtk.preferencesCache:<b>缓存</b>
en.gtk.preferencesCacheMemory:Memory cache size
de.gtk.preferencesCacheMemory:RAM Cache
-fr.gtk.preferencesCacheMemory:Taille du cache mémoire
+fr.gtk.preferencesCacheMemory:Taille du cache en mémoire vive
it.gtk.preferencesCacheMemory:Dimensione memoria cache
nl.gtk.preferencesCacheMemory:Grootte geheugenbuffer
zh_CN.gtk.preferencesCacheMemory:内存缓存大å°
en.gtk.preferencesCacheDisc:Disc cache size
de.gtk.preferencesCacheDisc:Festplatten Cache
-fr.gtk.preferencesCacheDisc:Taille du cache disque
+fr.gtk.preferencesCacheDisc:Taille du cache sur le disque
it.gtk.preferencesCacheDisc:Dimensione memoria disco
nl.gtk.preferencesCacheDisc:Grootte schijfbuffer
zh_CN.gtk.preferencesCacheDisc:ç£ç›˜ç¼“存大å°
@@ -5158,7 +5194,7 @@ zh_CN.gtk.preferencesProxy:<b>HTTP 代ç†æœåŠ¡å™¨</b>
en.gtk.preferencesProxyType:Proxy type
de.gtk.preferencesProxyType:Proxytyp
-fr.gtk.preferencesProxyType:Type de Proxy
+fr.gtk.preferencesProxyType:Type de proxy
it.gtk.preferencesProxyType:Tipo di Proxy
nl.gtk.preferencesProxyType:Proxy-type
zh_CN.gtk.preferencesProxyType:代ç†æœåŠ¡å™¨ç±»åž‹
@@ -5172,7 +5208,7 @@ zh_CN.gtk.preferencesProxyHost:主机
en.gtk.preferencesProxyUsername:Username
de.gtk.preferencesProxyUsername:Benutzer
-fr.gtk.preferencesProxyUsername:Nom d'utilisateur
+fr.gtk.preferencesProxyUsername:Nom d’utilisateur
it.gtk.preferencesProxyUsername:Nome utente
nl.gtk.preferencesProxyUsername:Gebruikersnaam
zh_CN.gtk.preferencesProxyUsername:用户å
@@ -5193,14 +5229,14 @@ zh_CN.gtk.preferencesProxyNoproxy:没有代ç†æœåŠ¡å™¨ç”¨äºŽæ“作
en.gtk.preferencesProxyTypeTooltip:The type of HTTP proxy server.
de.gtk.preferencesProxyTypeTooltip:Der Type des HTTP Proxy-Servers.
-fr.gtk.preferencesProxyTypeTooltip:Le type de serveur proxy HTTP.
+fr.gtk.preferencesProxyTypeTooltip:Type de serveur proxy HTTP.
it.gtk.preferencesProxyTypeTooltip:Il tipo di server Proxy HTTP.
nl.gtk.preferencesProxyTypeTooltip:Het type van de HTTP-proxy-server.
zh_CN.gtk.preferencesProxyTypeTooltip:HTTP 代ç†æœåŠ¡å™¨çš„类型。
en.gtk.preferencesProxyHostTooltip:Host name of your proxy server.
de.gtk.preferencesProxyHostTooltip:Hostname des Proxy-Servers.
-fr.gtk.preferencesProxyHostTooltip:Nom d'hôte du serveur proxy.
+fr.gtk.preferencesProxyHostTooltip:Nom d’hôte du serveur proxy.
it.gtk.preferencesProxyHostTooltip:Nome host del tuo server Proxy.
nl.gtk.preferencesProxyHostTooltip:Adres van de proxy-server.
zh_CN.gtk.preferencesProxyHostTooltip:代ç†æœåŠ¡å™¨çš„主机å。
@@ -5214,14 +5250,14 @@ zh_CN.gtk.preferencesProxyPortTooltip:连接代ç†æœåŠ¡å™¨çš„端å£å·ã€‚
en.gtk.preferencesProxyUsernameTooltip:Username to access the proxy.
de.gtk.preferencesProxyUsernameTooltip:Username für die Verbindung zum Proxy.
-fr.gtk.preferencesProxyUsernameTooltip:Nom d'utilisateur pour accéder au proxy.
+fr.gtk.preferencesProxyUsernameTooltip:Nom d’utilisateur pour accéder au proxy.
it.gtk.preferencesProxyUsernameTooltip:Nome utente per l'accesso al Proxy.
nl.gtk.preferencesProxyUsernameTooltip:Gebruikersnaam voor toegang tot de proxy.
zh_CN.gtk.preferencesProxyUsernameTooltip:访问代ç†æœåŠ¡å™¨çš„用户å。
en.gtk.preferencesProxyNoproxyTooltip:Comma separated list of host names that should not be proxied.
de.gtk.preferencesProxyNoproxyTooltip:Liste von Hosts, die kein Proxy sein sollen. Komma trennt Einträge.
-fr.gtk.preferencesProxyNoproxyTooltip:Liste des noms d'hôtes séparés par des virgules qui ne devraient pas être traitées par le proxy.
+fr.gtk.preferencesProxyNoproxyTooltip:Liste des noms d’hôtes séparés par des virgules qui ne devraient pas être traitées par le proxy.
it.gtk.preferencesProxyNoproxyTooltip:Elenco separato da virgole dei nomi host che non devono essere sottoposti a Proxy.
nl.gtk.preferencesProxyNoproxyTooltip:Lijst van ip-adressen of servernamen die niet via de proxy mogen lopen, gescheiden door komma's.
zh_CN.gtk.preferencesProxyNoproxyTooltip:用逗å·åˆ†éš”ä¸åº”代ç†çš„主机å列表。
@@ -5256,21 +5292,21 @@ zh_CN.gtk.preferencesFetchingCached:已缓存的连接
en.gtk.preferencesFetchingMaxTooltip:Maximum number of concurrent items to fetch at once.
de.gtk.preferencesFetchingMaxTooltip:Maximale Anzahl paralleler Verbindungen.
-fr.gtk.preferencesFetchingMaxTooltip:Nombre maximum d'éléments simultanés à récupérer
+fr.gtk.preferencesFetchingMaxTooltip:Nombre maximum d’éléments simultanés à récupérer
it.gtk.preferencesFetchingMaxTooltip:Numero massimo di elementi simultanei da recuperare in contemporanea.
nl.gtk.preferencesFetchingMaxTooltip:Maximum aantal verbindingen die simultaan items ophalen.
zh_CN.gtk.preferencesFetchingMaxTooltip:一次获å–的最大并å‘项数。
en.gtk.preferencesFetchingPerhostTooltip:Maximum number of item fetches per web server.
de.gtk.preferencesFetchingPerhostTooltip:Maximale Zahl je Webserver.
-fr.gtk.preferencesFetchingPerhostTooltip:Nombre maximum d'élément à extrair pour chaque serveur Web.
+fr.gtk.preferencesFetchingPerhostTooltip:Nombre maximum d’élément à extraire pour chaque serveur Web.
it.gtk.preferencesFetchingPerhostTooltip:Numero massimo di elementi da recuperare per server Web.
nl.gtk.preferencesFetchingPerhostTooltip:Maximum aantal verbinden per webserver.
zh_CN.gtk.preferencesFetchingPerhostTooltip:æ¯ä¸ªç½‘络æœåŠ¡å™¨çš„最大项目获å–数。
en.gtk.preferencesFetchingCachedTooltip:Number of connections to keep in case they are needed again.
de.gtk.preferencesFetchingCachedTooltip:Zahl offengehaltener Verbindungen für den Fall, daß sie nochmal benötigt werden.
-fr.gtk.preferencesFetchingCachedTooltip:Nombre de connexions à maintenir dans le cas où elles seront nécessaires à nouveau.
+fr.gtk.preferencesFetchingCachedTooltip:Nombre de connexions à maintenir dans le cas où elles seraient nécessaires à nouveau.
it.gtk.preferencesFetchingCachedTooltip:Numero di connessioni da conservare nel caso in cui siano di nuovo necessarie.
nl.gtk.preferencesFetchingCachedTooltip:Aantal verbindingen te bufferen voor het geval ze zijn weer nodig.
zh_CN.gtk.preferencesFetchingCachedTooltip:è¦ä¿ç•™çš„连接数,以备å†æ¬¡éœ€è¦æ—¶ä½¿ç”¨ã€‚
@@ -5299,7 +5335,7 @@ zh_CN.gtk.preferencesProxyTypeBasic:使用基本身份验è¯çš„手动æ“作
en.gtk.preferencesProxyTypeNLTM:Manual with - authentication
de.gtk.preferencesProxyTypeNLTM:Manuell mit - Authentifizierung
-fr.gtk.preferencesProxyTypeNLTM:Manuel avec l'authentification NTLM
+fr.gtk.preferencesProxyTypeNLTM:Manuel avec authentification NTLM
it.gtk.preferencesProxyTypeNLTM:Manuale con autentificazione NTLM
nl.gtk.preferencesProxyTypeNLTM:Handmatig via NTLM-authenticatie
zh_CN.gtk.preferencesProxyTypeNLTM:使用身份验è¯çš„手动æ“作
@@ -5327,14 +5363,14 @@ zh_CN.gtk.preferencesAppearance:<b>外观</b>
en.gtk.preferencesAppearanceImages:No images in output
de.gtk.preferencesAppearanceImages:Bilder unterdrücken
-fr.gtk.preferencesAppearanceImages:Aucune image de rendu/restituée
+fr.gtk.preferencesAppearanceImages:Supprimer toutes les images
it.gtk.preferencesAppearanceImages:Nessuna immagine in output
nl.gtk.preferencesAppearanceImages:Geen afbeeldingen in uitvoer
zh_CN.gtk.preferencesAppearanceImages:输出结果中无图åƒ
en.gtk.preferencesAppearanceBackground:No background images in output
de.gtk.preferencesAppearanceBackground:keine Hintergrundbilder
-fr.gtk.preferencesAppearanceBackground:Aucune image d'arrière-plan de rendu/restituée
+fr.gtk.preferencesAppearanceBackground:Supprimer les images d’arrière plan
it.gtk.preferencesAppearanceBackground:Nessuna immagine di sfondo in output
nl.gtk.preferencesAppearanceBackground:Geen achtergrondafbeeldingen in uitvoer
zh_CN.gtk.preferencesAppearanceBackground:输出结果中无背景图åƒ
@@ -5369,21 +5405,21 @@ zh_CN.gtk.preferencesMarginsMeasurements:å•ä½ä¸ºæ¯«ç±³
en.gtk.preferencesGeneration:<b>Generation</b>
de.gtk.preferencesGeneration:<b>Erstellung</b>
-fr.gtk.preferencesGeneration:<b>Generation</b>
+fr.gtk.preferencesGeneration:<b>Génération</b>
it.gtk.preferencesGeneration:<b>Generazione</b>
nl.gtk.preferencesGeneration:<b>Genereren</b>
zh_CN.gtk.preferencesGeneration:<b>生æˆ</b>
en.gtk.preferencesGenerationCompressed:Output is compressed
de.gtk.preferencesGenerationCompressed:Ausgabe komprimieren
-fr.gtk.preferencesGenerationCompressed:La restitution est compressée
+fr.gtk.preferencesGenerationCompressed:Compresser le document
it.gtk.preferencesGenerationCompressed:L'output è compresso
nl.gtk.preferencesGenerationCompressed:Uitvoer wordt gecomprimeerd
zh_CN.gtk.preferencesGenerationCompressed:输出结果已压缩
en.gtk.preferencesGenerationPassword:Output has a password
de.gtk.preferencesGenerationPassword:Dokument hat Passwort
-fr.gtk.preferencesGenerationPassword:La restitution possède un mot de passe
+fr.gtk.preferencesGenerationPassword:Protéger le document par un mot de passe
it.gtk.preferencesGenerationPassword:L'output ha una password
nl.gtk.preferencesGenerationPassword:Uitvoer wordt met wachtwoord beveiligd
zh_CN.gtk.preferencesGenerationPassword:输出结果有密ç 
@@ -5407,21 +5443,21 @@ zh_CN.all.ScrollUp:点击箭头å‘上滚动页é¢
en.all.ScrollPUp:Click to scroll up one page
de.all.ScrollPUp:Anklicken scrollt eine Seite hoch
-fr.all.ScrollPUp:Cliquer pour faire défiler d'une page vers le haut
+fr.all.ScrollPUp:Cliquer pour faire défiler d’une page vers le haut
it.all.ScrollPUp:Clicca per scrollare in alto di una pagina
nl.all.ScrollPUp:Klik om 1 pagina omhoog te gaan
zh_CN.all.ScrollPUp:点击å‘上滚动一页
en.all.ScrollV:Drag the bar to scroll vertically
de.all.ScrollV:Ziehen der Leiste scrollt vertikal
-fr.all.ScrollV:Tirez la barre pour la faire défiler verticalement
+fr.all.ScrollV:Tirez sur la barre pour faire défiler verticalement
it.all.ScrollV:Trascina la barra per scrollare verticalmente
nl.all.ScrollV:Verschuif de balk om verticaal over de pagina te gaan
zh_CN.all.ScrollV:拖动æ åž‚直滚动
en.all.ScrollPDown:Click to scroll down one page
de.all.ScrollPDown:Anklicken scrollt eine Seite nach unten
-fr.all.ScrollPDown:Cliquer pour faire défiler d'une page vers le bas
+fr.all.ScrollPDown:Cliquer pour faire défiler d’une page vers le bas
it.all.ScrollPDown:Clicca per scrollare in basso di una pagina
nl.all.ScrollPDown:Klik om 1 pagina omlaag te gaan
zh_CN.all.ScrollPDown:点击å‘下滚动一页
@@ -5442,21 +5478,21 @@ zh_CN.all.ScrollLeft:点击箭头å‘左滚动页é¢
en.all.ScrollPLeft:Click to scroll left one page
de.all.ScrollPLeft:Anklicken scrollt eine Seite nach links
-fr.all.ScrollPLeft:Cliquer pour faire défiler d'une page vers la gauche
+fr.all.ScrollPLeft:Cliquer pour faire défiler d’une page vers la gauche
it.all.ScrollPLeft:Clicca per scrollare a sinistra di una pagina
nl.all.ScrollPLeft:Klik om 1 pagina naar links te gaan
zh_CN.all.ScrollPLeft:点击å‘左滚动一页
en.all.ScrollH:Drag the bar to scroll horizontally
de.all.ScrollH:Ziehen der Leiste scrollt horizontal
-fr.all.ScrollH:Tirez la barre pour la faire défiler horizontalement
+fr.all.ScrollH:Tirez sur la barre pour faire défiler horizontalement
it.all.ScrollH:Trascina la barra per scrollare orizzontalmente
nl.all.ScrollH:Verschuif de balk om horizontaal over de pagina te gaan
zh_CN.all.ScrollH:拖动æ æ°´å¹³æ»šåŠ¨
en.all.ScrollPRight:Click to scroll right one page
de.all.ScrollPRight:Anklicken scrollt eine Seite nach rechts
-fr.all.ScrollPRight:Cliquer pour faire défiler d'une page vers la droite
+fr.all.ScrollPRight:Cliquer pour faire défiler d’une page vers la droite
it.all.ScrollPRight:Clicca per scrollare a destra di una pagina
nl.all.ScrollPRight:Klik om 1 pagina naar rechts te gaan
zh_CN.all.ScrollPRight:点击å‘å³æ»šåŠ¨ä¸€é¡µ
@@ -5479,14 +5515,14 @@ zh_CN.all.ScrollBoth:在按ä½æŒ‰é’®çš„åŒæ—¶ç§»åŠ¨é¼ æ ‡æ¥æ»šåŠ¨æµè§ˆå†…容
#
en.all.SelectClick:Click on entry to select it
de.all.SelectClick:Anklicken um auszuwählen
-fr.all.SelectClick:Cliquer sur l'entrée pour la sélectionner
+fr.all.SelectClick:Cliquer sur une entrée pour la sélectionner
it.all.SelectClick:Clicca sull'elemento per selezionarlo
nl.all.SelectClick:Klik op een item om het te selecteren.
zh_CN.all.SelectClick:点击æ¡ç›®å°†å…¶é€‰ä¸­
en.all.SelectMClick:Click on entry to select it, multiple options can be selected
de.all.SelectMClick:Anklicken um auszuwählen, auch mehrere Optionen sind auswählbar
-fr.all.SelectMClick:Cliquer sur l'entrée pour la sélectionner, plusieurs options peuvent être sélectionnées
+fr.all.SelectMClick:Cliquer sur une entrée pour la sélectionner, plusieurs options peuvent être sélectionnées
it.all.SelectMClick:Clicca sull'elemento per selezionarlo, sono supportate le scelte multiple
nl.all.SelectMClick:Klik op een item om het te selecteren, er kunnen meerdere opties tegelijkertijd geselecteerd worden
zh_CN.all.SelectMClick:点击æ¡ç›®å°†å…¶é€‰ä¸­ï¼Œå¯ä»¥é€‰æ‹©å¤šä¸ªé€‰é¡¹
@@ -5506,21 +5542,21 @@ zh_CN.all.SelectClose:点击关闭选择èœå•
en.all.SaveSource:Source
de.all.SaveSource:Quellcode
-fr.all.SaveSource:Source
+fr.all.SaveSource:Code source
it.all.SaveSource:Sorgente
nl.all.SaveSource:Bron
zh_CN.all.SaveSource:ä¿å­˜æºä»£ç 
en.all.SaveDraw:Webpage
de.all.SaveDraw:Webseite
-fr.all.SaveDraw:PageWeb
+fr.all.SaveDraw:Page Web
it.all.SaveDraw:Pagina Web
nl.all.SaveDraw:Webpagina
zh_CN.all.SaveDraw:ä¿å­˜ç½‘页绘图
en.all.SaveText:Webpage
de.all.SaveText:Webseite
-fr.all.SaveText:PageWeb
+fr.all.SaveText:Page Web
it.all.SaveText:Pagina Web
nl.all.SaveText:Webpagina
zh_CN.all.SaveText:ä¿å­˜ç½‘页文本
@@ -5541,7 +5577,7 @@ zh_CN.all.SaveLink:ä¿å­˜é“¾æŽ¥
en.all.SaveSelection:Selection
de.all.SaveSelection:Auswahl
-fr.all.SaveSelection:Texte
+fr.all.SaveSelection:Sélection
it.all.SaveSelection:Selezione
nl.all.SaveSelection:Selectie
zh_CN.all.SaveSelection:ä¿å­˜é€‰é¡¹
@@ -5554,14 +5590,14 @@ zh_CN.all.SaveSelection:ä¿å­˜é€‰é¡¹
en.all.ThemeInstActive:A theme is currently being downloaded or installed. Please wait for it to finish or cancel it before installing more themes.
de.all.ThemeInstActive:Ein Thema wird gerade geladen oder installiert. Bitte vor Installation weiterer Themen diesen Vorgang abwarten oder beenden.
-fr.all.ThemeInstActive:Un thème est en cours de téléchargement ou d'installation. Veuillez attendre que ce soit fini ou annulez l'opération avant d'installer de nouveaux thèmes.
+fr.all.ThemeInstActive:Un thème est en cours de téléchargement ou d’installation. Veuillez attendre que ce soit fini ou annulez l’opération avant d’installer de nouveaux thèmes.
it.all.ThemeInstActive:Il tema è attualmente in fase di scaricamento o di installazione. Attendere il completamente del processo oppure annullare l'intera operazione prima di installare altri temi.
nl.all.ThemeInstActive:Een thema wordt momenteel opgehaald of geïnstalleerd. Wacht tot het is geïnstalleerd of annuleer de opdracht voordat meer thema's geïnstalleerd worden.
zh_CN.all.ThemeInstActive:主题正在下载或安装中。在安装更多主题之å‰ï¼Œè¯·ç­‰å¾…其完æˆæˆ–å–消任务。
en.all.ThemeInstDown:Please wait for the theme to download.
de.all.ThemeInstDown:Bitte warten bis das Thema vollständig heruntergeladen wurde.
-fr.all.ThemeInstDown:Veuillez attendre le téléchargement du thème.
+fr.all.ThemeInstDown:Veuillez attendre la fin du téléchargement du thème.
it.all.ThemeInstDown:Per favore attendere lo scaricamento del tema grafico.
nl.all.ThemeInstDown:Wacht tot het thema is opgehaald.
zh_CN.all.ThemeInstDown:请等待下载主题。
@@ -5575,28 +5611,28 @@ zh_CN.all.ThemeInvalid:下载的主题无效或需è¦ä½¿ç”¨æ›´é«˜ç‰ˆæœ¬çš„ NetSu
en.all.ThemeInstall:Would you like to install the theme '%s' by %s?
de.all.ThemeInstall:Soll das Thema '%s' von %s installiert werden ?
-fr.all.ThemeInstall:Voulez-vous installer le thème '%s' par %s?
+fr.all.ThemeInstall:Voulez-vous installer le thème « %s » créé par %s ?
it.all.ThemeInstall:Si desidera installare il tema '%s' di %s?
nl.all.ThemeInstall:Moet het thema '%s' geïnstalleerd worden door %s?
zh_CN.all.ThemeInstall:是å¦è¦ç”± %2$s 安装主题“%1$sâ€ï¼Ÿ
en.all.ThemeInstallErr:An error occurred whilst trying to install the downloaded theme.
de.all.ThemeInstallErr:Beim Installieren des geladenen Themas trat ein Fehler auf.
-fr.all.ThemeInstallErr:Une erreur s'est produite pendant l'installation du thème téléchargé.
+fr.all.ThemeInstallErr:Une erreur s’est produite pendant l’installation du thème téléchargé.
it.all.ThemeInstallErr:Si è verificato un errore durante il tentativo di installazione del tema scaricato
nl.all.ThemeInstallErr:Een fout ontstond tijdens het installeren van het opgehaalde thema.
zh_CN.all.ThemeInstallErr:å°è¯•å®‰è£…下载的主题时å‘生错误。
en.all.ThemeApplyErr:An error occurred whilst trying to apply the downloaded theme.
de.all.ThemeApplyErr:Beim Versuch der Anwendung eines geladenen Themas trat ein Fehler auf.
-fr.all.ThemeApplyErr:Une erreur s'est produite en essayant d'appliquer le thème téléchargé.
+fr.all.ThemeApplyErr:Une erreur s’est produite en essayant d’appliquer le thème téléchargé.
it.all.ThemeApplyErr:Si è verificato un errore durante il tentativo di applicazione del tema
nl.all.ThemeApplyErr:Een fout ontstond tijdens het toevoegen van het opgehaalde thema.
zh_CN.all.ThemeApplyErr:å°è¯•åº”用下载的主题时å‘生错误。
en.ami.More:More
de.ami.More:Mehr
-fr.ami.More:More
+fr.ami.More:Plus
it.ami.More:Altro
nl.ami.More:Meer
zh_CN.ami.More:更多
@@ -5609,14 +5645,14 @@ zh_CN.ami.More:更多
#
en.ro.HelpToolbar0:\Tback button.|M\Straverse back one page in the history tree.|MDoes not resubmit form information.
de.ro.HelpToolbar0:Schaltet zurück auf die zuvor dargestellte Seite.|MDer Inhalt wird dabei nicht aktualisiert.
-fr.ro.HelpToolbar0:\Tle bouton de retour.|M\Srevenir d'une page en arrière dans l'historique.|MNe renvoie pas l'information de formulaire.
+fr.ro.HelpToolbar0:\Tle bouton de retour.|M\Srevenir d’une page en arrière dans l’historique.|MNe renvoie pas l’information de formulaire.
it.ro.HelpToolbar0:\Ttorna indietro di una pagina
nl.ro.HelpToolbar0:Dit is de Terug-knop.|MKlik met KIES om 1 pagina terug te gaan.|MKlik met PASAAN om 1 pagina terug te gaan en deze in een nieuw browservenster te openen.|MLet op! Formulieren worden niet nogmaals ingediend.
zh_CN.ro.HelpToolbar0:\TåŽé€€é”®ã€‚|M\S在历å²è®°å½•æ ‘中å‘åŽé历一页。|Mä¸é‡æ–°æ交表å•ä¿¡æ¯ã€‚
en.ro.HelpToolbar1:\Tforward button.|M\Straverse forward one page in the history tree.|MDoes not resubmit form information.
de.ro.HelpToolbar1:Schaltet vorwärts auf die nächste Seite.|MDer Inhalt wird dabei nicht aktualisiert.
-fr.ro.HelpToolbar1:\Tle bouton d'avance.|M\Savancer d'une page dans l'historique.|MNe renvoie pas l'information de formulaire.
+fr.ro.HelpToolbar1:\Tle bouton d’avance.|M\Savancer d’une page dans l’historique.|MNe renvoie pas l’information de formulaire.
it.ro.HelpToolbar1:\Tvai avanti di una pagina
nl.ro.HelpToolbar1:Dit is de Vooruit-knop.|MKlik met KIES om 1 pagina vooruit te gaan.|MKlik met PASAAN om 1 pagina terug te gaan en deze in een nieuw browservenster te openen.|MLet op! Formulieren worden niet nogmaals ingediend.
zh_CN.ro.HelpToolbar1:\Tå‰è¿›é”®ã€‚|M\S在历å²è®°å½•æ ‘中å‘å‰é历一页。|Mä¸é‡æ–°æ交表å•ä¿¡æ¯ã€‚
@@ -5630,21 +5666,21 @@ zh_CN.ro.HelpToolbar2:\Tåœæ­¢é”®ã€‚|M\Såœæ­¢åŠ è½½é¡µé¢ã€‚
en.ro.HelpToolbar3:\Treload button.|M\Sreload this page.|M\Areload this page and any objects it contains.
de.ro.HelpToolbar3:Aktualisiert den Seiteninhalt.|MKlicken mit AUSWAHL lädt die Seite neu.|MKlicken mit SPEZIAL lädt die Seite und alle zugehörigen Objekte neu.
-fr.ro.HelpToolbar3:\Tle bouton de recharge.|M\Srecharger cette page.|M\Arecharger cette page et tous les objets qu'elle contient.
+fr.ro.HelpToolbar3:\Tle bouton de recharge.|M\Srecharger cette page.|M\Arecharger cette page et tous les objets qu’elle contient.
it.ro.HelpToolbar3:\Tricarica la pagina corrente
nl.ro.HelpToolbar3:Dit is de Herlaad-knop.|MKlik met KIES om deze pagina opnieuw op te halen.|MKlik met PASAAN om deze pagina opnieuw op te halen, inclusief alle objecten die deze pagina bevat.
zh_CN.ro.HelpToolbar3:\Té‡è½½é”®ã€‚|M\Sé‡è½½æ­¤é¡µé¢ã€‚|M\Aé‡è½½æ­¤é¡µé¢å’Œå…¶ä¸­æ‰€æœ‰åŒ…å«çš„对象。
en.ro.HelpToolbar4:\Thome button.|M\Sgo to your home page.
de.ro.HelpToolbar4:Lädt die Homepage.
-fr.ro.HelpToolbar4:\Tle bouton Accueil.|M\Saller à votre page d'accueil.
+fr.ro.HelpToolbar4:\Tle bouton Accueil.|M\Saller à votre page d’accueil.
it.ro.HelpToolbar4:\Tvai alla pagina iniziale
nl.ro.HelpToolbar4:Dit is de Startpagina-knop.|MKlik met KIES om naar de begin-/startpagina te gaan.
zh_CN.ro.HelpToolbar4:\T主页键。|M\Så‰å¾€ä¸»é¡µé¢ã€‚
en.ro.HelpToolbar5:\Thistory button.|M\Sopen the local history \w.|M\Aopen the global history \w.
de.ro.HelpToolbar5:Das ist der Schaltknopf zur History-Funktion.|MKlicken mit AUSWAHL öffnet die lokale History.|MKlicken mit SPEZIAL öffnet das Fenster mit der globalen History.
-fr.ro.HelpToolbar5:\Tle bouton d'historique.|M\Souvrir la \w d'historique locale.|M\Aopen the global history \w.
+fr.ro.HelpToolbar5:\Tle bouton d’historique.|M\Souvrir la \w d’historique locale.|M\Aopen the global history \w.
it.ro.HelpToolbar5:\Tmostra la cronologia locale o globale
nl.ro.HelpToolbar5:Dit is de Geschiedenis-knop.|MKlik met KIES om de venstergeschiedenis te openen.|MKlik met PASAAN om de browsergeschiedenis te openen.
zh_CN.ro.HelpToolbar5:\T历å²é”®ã€‚|M\S打开本地历å²è®°å½•\w。|M\A打开全局历å²è®°å½• \w。
@@ -5658,21 +5694,21 @@ zh_CN.ro.HelpToolbar6:\Tä¿å­˜é”®ã€‚|M\Sä¿æŒå½“å‰æ–‡ä»¶è®°å½•ã€‚
en.ro.HelpToolbar7:\Tprint button.|M\Sopen the print dialogue box.
de.ro.HelpToolbar7:Drucken der aktuellen Seite.|MAnklicken öffnet den 'Drucken' Dialog.
-fr.ro.HelpToolbar7:\Tle bouton d'impression.|M\Simprimer cette page.|MOuvre une bo�te de dialogue pour l'impression.
+fr.ro.HelpToolbar7:\Tle bouton d’impression.|M\Simprimer cette page.|MOuvre une boîte de dialogue pour l’impression.
it.ro.HelpToolbar7:\Tapri la finestra di stampa
nl.ro.HelpToolbar7:Dit is de Afdruk-knop.|MKlik met KIES om het afdrukvenster te openen.
zh_CN.ro.HelpToolbar7:\T打å°é”®ã€‚|M\S打开打å°å¯¹è¯æ¡†ã€‚
en.ro.HelpToolbar8:\Thotlist button.|M\Sopen the hotlist management \w.|M\Aadd this address to the hotlist.
de.ro.HelpToolbar8:Das ist der Hotlist Schaltknopf.|MKlicken mit AUSWAHL öffnet die Hotlist.|MKlicken mit SPEZIAL trägt die aktuelle Seite in die Hotlist ein.
-fr.ro.HelpToolbar8:\Tle bouton de favoris.|M\Souvrir la \w de gestion des favoris.|M\Aajouter cette adresse aux favoris.
+fr.ro.HelpToolbar8:\Tle bouton des marque-pages.|M\Souvrir la \w de gestion des marque-pages.|M\Aajouter cette adresse aux marque-pages.
it.ro.HelpToolbar8:\Tapri o aggiungi un link ai segnalibri
nl.ro.HelpToolbar8:Dit is de Favorieten-knop.|MKlik met KIES om de favorietenlijst te openen.|MKlik met PASAAN om dit webadres aan de favorietenlijst toe te voegen.
zh_CN.ro.HelpToolbar8:\T常用列表键。|M\S打开常用列表管ç†\w。|M\A添加此地å€åˆ°å¸¸ç”¨åˆ—表。
en.ro.HelpToolbar9:\Tscale view button.|M\Sscale the page, affecting both text and images.
de.ro.HelpToolbar9:Anklicken öffnet den Vergrößerungs-Dialog.|MDie Vergrößerung betrifft Text und Bilder.
-fr.ro.HelpToolbar9:\Tle bouton de changement d'échelle.|M\Sredimensionner la page, texte et images comprises.
+fr.ro.HelpToolbar9:\Tle bouton de changement d’échelle.|M\Sredimensionner la page, texte et images comprises.
it.ro.HelpToolbar9:\Tscala la dimensione del testo e delle immagini
nl.ro.HelpToolbar9:Dit is de Schaal-knop.|MKlik met KIES om deze pagina te schalen, zowel tekst als afbeeldingen.
zh_CN.ro.HelpToolbar9:\T缩放键。|M\S 缩放页é¢ï¼Œæ”¹å˜æ–‡å­—和图åƒã€‚
@@ -5686,28 +5722,28 @@ zh_CN.ro.HelpToolbar10:\T查找键。|M\S在页é¢ä¸ŠæŸ¥æ‰¾æ–‡æœ¬å­—符串的实
en.ro.HelpToolbar11:\Tup button.|M\Straverse up one level on the current website
de.ro.HelpToolbar11:Das ist der Aufwärtsknopf.|MKlicken mit AUSWAHL führt auf die nächsthöhere Ebene der innerhalb Webseite.
-fr.ro.HelpToolbar11:\Tle bouton haut.|M\Sremonte d'un niveau sur le site web en cours.
+fr.ro.HelpToolbar11:\Tle bouton haut.|M\Sremonte d’un niveau sur le site web en cours.
it.ro.HelpToolbar11:\Tsali di un livello rispetto all'indirizzo corrente
nl.ro.HelpToolbar11:Dit is de Omhoog-knop.|MKlik met KIES om 1 niveau omhoog te gaan in de websitehiërarchie.|MKlik met PASAAN om 1 niveau omhoog te gaan in de websitehiërarchie en deze in een nieuw browservenster te openen.
zh_CN.ro.HelpToolbar11:\Tå‘上方å‘键。|M\S在当å‰ç½‘站上å‘上移动一级
en.ro.HelpToolbar14:\TURL bar.|MType in the address of a site to visit and press Return to go there.
de.ro.HelpToolbar14:Das ist die Adressleiste.|MHier die Adresse (URL) eingeben und Entertaste drücken, um eine neue Seite zu laden.
-fr.ro.HelpToolbar14:\Tla barre d'URL.|MTapez l'adresse d'un site à visiter et appuyez sur Return pour y aller.
+fr.ro.HelpToolbar14:\Tla barre d’URL.|MTapez l’adresse d’un site à visiter et appuyez sur Return pour y aller.
it.ro.HelpToolbar14:\Tdigita un indirizzo e premi invio
nl.ro.HelpToolbar14:Dit is het Adresveld.|MVoer een adres in van een website en druk op RETURN om er naartoe te gaan.
zh_CN.ro.HelpToolbar14:\T地å€æ ã€‚|M输入您è¦è®¿é—®çš„站点地å€ï¼Œç„¶åŽæŒ‰å›žè½¦é”®ã€‚
en.ro.HelpToolbar15:\TURL suggestion icon.|M\Sopen a list of recently typed URLs.
de.ro.HelpToolbar15:Das ist das URL-Schnellwahl Symbol.|MKlicken mit AUSWAHL öffnet eine Liste der zuletzt eingegebenen Web-Adressen.
-fr.ro.HelpToolbar15:\Tl'icône de suggestion d'URL.|M\Souvrir une liste d'URLs tapées récemment.
+fr.ro.HelpToolbar15:\Tl’icône de suggestion d’URL.|M\Souvrir une liste d’URLs tapées récemment.
it.ro.HelpToolbar15:\Tapri la lista dei siti visitati più recenti
nl.ro.HelpToolbar15:Dit is het Adressuggestie-symbool.|MKlik met KIES om een lijst met adressen van recent bezochte websites te openen.
zh_CN.ro.HelpToolbar15:\T地å€å»ºè®®å›¾æ ‡ã€‚|M\S打开最近键入的 URL 列表。
en.ro.HelpToolbar16:\Tthrobber.|MIt animates while this \w is active.
de.ro.HelpToolbar16:Das ist die Ladeaktivitätsanzeige.|MSie wird animiert, wenn NetSurf aktiv ist.
-fr.ro.HelpToolbar16:\Tle pulseur.|MIl s'anime lorsque cette \w est active.
+fr.ro.HelpToolbar16:\Tle pulseur.|MIl s’anime lorsque cette \w est active.
it.ro.HelpToolbar16:\Tthrobber animato durante le attività di rete
nl.ro.HelpToolbar16:Dit is de Activiteitsindicator.|MDeze indicator beweegt zolang er actieve processen in het venster plaatsvinden.
zh_CN.ro.HelpToolbar16:\T页é¢åŠ è½½æŒ‡ç¤ºå™¨ã€‚|M它会在此 \w 处于活跃状æ€æ—¶åˆ¶ä½œåŠ¨ç”»ã€‚
@@ -5721,21 +5757,21 @@ zh_CN.ro.HelpToolbarFav:\T收è—夹图标:当å‰ç«™ç‚¹æ供的å°å¾½æ ‡(如æž
en.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
de.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
-fr.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+fr.ro.HelpToolbarHot:\Tindicateur des marque-pages : si allumé, l’adresse courante est déjà dans les marque-pages.|M\Spour ajouter l’adresse courante aux marque-pages.|M\Apour supprimer l’adresse courante des marque-pages.
it.ro.HelpToolbarHot:\Tindicatore segnalibri: se acceso significa che il corrente indirizzo è presente nei segnalibri.|M\Sper aggiungere il corrente indirizzo ai segnalibri.|M\Aper rimuovere il corrente indirizzo dai segnalibri.
nl.ro.HelpToolbarHot:Dit is de favorietenindicator: wanneer deze oplicht, staat het webadres al in de favorietenlijst.|MKlik met KIES om het adres aan de favorietenlijst toe te voegen.|MKlik met PASAAN om het adres uit de favorietenlijst te verwijderen.
zh_CN.ro.HelpToolbarHot:\T常用列表指示器:若指示图标亮起,则当å‰åœ°å€åœ¨è¯¥å¸¸ç”¨é¡¹åˆ—表中。|M\S将当å‰åœ°å€æ·»åŠ åˆ°è¯¥å¸¸ç”¨é¡¹åˆ—表中。|M\A从该常用项列表中删除当å‰åœ°å€ã€‚
en.ro.HelpStatus0:\Tstatus bar resizer.|MDrag to alter the size of the status bar.
de.ro.HelpStatus0:Das ist die Begrenzung der Statusanzeige.|MKlicken und Ziehen verändert die Länge der Statusanzeige.
-fr.ro.HelpStatus0:\Tla glissière de la barre d'état.|MDéplacez-la pour changer la taille de la barre d'état.
+fr.ro.HelpStatus0:\Tla glissière de la barre d’état.|MDéplacez-la pour changer la taille de la barre d’état.
it.ro.HelpStatus0:\Ttrascina per modificare le dimensioni della barra di stato
nl.ro.HelpStatus0:Dit is statusbalkaanpasser.|MVersleep het om de grootte van de statusbalk te wijzigen.
zh_CN.ro.HelpStatus0:\T状æ€æ å¤§å°è°ƒæ•´å™¨ã€‚|M拖动以更改状æ€æ çš„大å°ã€‚
en.ro.HelpStatus1:\Tstatus bar.|MIt displays information on what the browser \w is doing.
de.ro.HelpStatus1:Das ist die Statusanzeige|MSie zeigt an, was gerade im Browserfenster geschieht.
-fr.ro.HelpStatus1:\Tla barre d'état.|MElle affiche des informations sur ce que fait la \w de navigateur.
+fr.ro.HelpStatus1:\Tla barre d’état.|MElle affiche des informations sur ce que fait la \w de navigateur.
it.ro.HelpStatus1:\Tmostra informazioni relative alle attività del browser
nl.ro.HelpStatus1:Dit is statusbalk.|MHet toont informatie over wat het browservenster aan het doen is.
zh_CN.ro.HelpStatus1:\T状æ€æ ã€‚|M它会显示相关æµè§ˆå™¨ \w 正在执行的æ“作信æ¯ã€‚
@@ -5770,14 +5806,14 @@ zh_CN.ro.HelpIconMenu2-0:\R输入访问地å€ã€‚
en.ro.HelpIconMenu2-1:\Sopen the hotlist management \w.
de.ro.HelpIconMenu2-1:Klicken mit AUSWAHL öffnet die Hotlist.
-fr.ro.HelpIconMenu2-1:\Souvrir la fenêtre de gestion des favoris.
+fr.ro.HelpIconMenu2-1:\Souvrir la fenêtre de gestion des marque-pages.
it.ro.HelpIconMenu2-1:\Sapri la finestra dei segnalibri
nl.ro.HelpIconMenu2-1:Klik met KIES om de favorietenlijst te openen.
zh_CN.ro.HelpIconMenu2-1:\S打开常用列表管ç†å™¨ \w。
en.ro.HelpIconMenu2-2:\Sopen the global history \w.
de.ro.HelpIconMenu2-2:Klicken mit AUSWAHL öffnet das Fenster mit der globalen History.
-fr.ro.HelpIconMenu2-2:\Souvrir la fenêtre d'historique global.
+fr.ro.HelpIconMenu2-2:\Souvrir la fenêtre d’historique global.
it.ro.HelpIconMenu2-2:\Smostra cronologia globale
nl.ro.HelpIconMenu2-2:Klik met KIES om de browsergeschiedenis te openen.
zh_CN.ro.HelpIconMenu2-2:\S打开全局历å²è®°å½• \w。
@@ -5833,7 +5869,7 @@ zh_CN.ro.HelpBrowserMenu0-2:\Rä¿å­˜å½“å‰é¡µé¢ï¼ŒåŒ…括所有图åƒå’Œæ ·å¼è¡
en.ro.HelpBrowserMenu0-3:\Rsee the export options.
de.ro.HelpBrowserMenu0-3:Abspeichern der Seite in verschiedenen Formaten.
-fr.ro.HelpBrowserMenu0-3:\Rvoir les options d'exportation.
+fr.ro.HelpBrowserMenu0-3:\Rvoir les options d’exportation.
it.ro.HelpBrowserMenu0-3:\Rmostra opzioni di esportazione
nl.ro.HelpBrowserMenu0-3:Verplaats de muispijl naar rechts om de exporteermogelijkheden te tonen.
zh_CN.ro.HelpBrowserMenu0-3:\R查看导出选项。
@@ -5854,35 +5890,35 @@ zh_CN.ro.HelpBrowserMenu0-3-1:\R将当å‰é¡µé¢å¯¼å‡ºä¸ºçº¯æ–‡æœ¬æ–‡ä»¶ã€‚
en.ro.HelpBrowserMenu0-4:\Rsave the address of the current page.
de.ro.HelpBrowserMenu0-4:Adresse der Seite speichern.
-fr.ro.HelpBrowserMenu0-4:\Rsauver l'adresse de la page courante.
+fr.ro.HelpBrowserMenu0-4:\Rsauver l’adresse de la page courante.
it.ro.HelpBrowserMenu0-4:\Rsalva l'indirizzo della pagina corrente
nl.ro.HelpBrowserMenu0-4:Verplaats de muispijl naar rechts om het webadres van deze pagina te bewaren.
zh_CN.ro.HelpBrowserMenu0-4:\Rä¿å­˜å½“å‰é¡µé¢çš„网å€ã€‚
en.ro.HelpBrowserMenu0-4-0:\Rsave the current address in Acorn URI format.
de.ro.HelpBrowserMenu0-4-0:Speichert die Adresse der Seite im Acorn URI Format.
-fr.ro.HelpBrowserMenu0-4-0:\Rsauver l'adresse en cours au format Acorn URI.
+fr.ro.HelpBrowserMenu0-4-0:\Rsauver l’adresse en cours au format Acorn URI.
it.ro.HelpBrowserMenu0-4-0:\Rsalva l'indirizzo corrente nel formato Acorn URI
nl.ro.HelpBrowserMenu0-4-0:Verplaats de muispijl naar rechts om dit adres in AcornURI-vorm te bewaren.
zh_CN.ro.HelpBrowserMenu0-4-0:\R以 Acorn URI æ ¼å¼ä¿å­˜å½“å‰ç½‘å€ã€‚
en.ro.HelpBrowserMenu0-4-1:\Rsave the current address in Ant URL format.
de.ro.HelpBrowserMenu0-4-1:Speichert die Adresse der Seite im Ant URL Format.
-fr.ro.HelpBrowserMenu0-4-1:\Rsauver l'adresse en cours au format Ant URL.
+fr.ro.HelpBrowserMenu0-4-1:\Rsauver l’adresse en cours au format Ant URL.
it.ro.HelpBrowserMenu0-4-1:\Rsalva l'indirizzo corrente nel formato Ant URL
nl.ro.HelpBrowserMenu0-4-1:Verplaats de muispijl naar rechts om dit adres in AntURL-vorm te bewaren,
zh_CN.ro.HelpBrowserMenu0-4-1:\R以 Ant URL æ ¼å¼ä¿å­˜å½“å‰ç½‘å€ã€‚
en.ro.HelpBrowserMenu0-4-2:\Rsave the current address as plain text.
de.ro.HelpBrowserMenu0-4-2:Speichert die Adresse der Seite als Text.
-fr.ro.HelpBrowserMenu0-4-2:\Rsauver l'adresse courante en simple texte.
+fr.ro.HelpBrowserMenu0-4-2:\Rsauver l’adresse courante en simple texte.
it.ro.HelpBrowserMenu0-4-2:\Rsalva l'indirizzo corrente come file di testo
nl.ro.HelpBrowserMenu0-4-2:Verplaats de muispijl naar rechts om dit adres als platte tekst te bewaren.
zh_CN.ro.HelpBrowserMenu0-4-2:\R将当å‰ç½‘å€å¦å­˜ä¸ºçº¯æ–‡æœ¬ã€‚
en.ro.HelpBrowserMenu0-5:\Sopen the print dialogue box.
de.ro.HelpBrowserMenu0-5:Dialogfenster zum Drucken der Seite.
-fr.ro.HelpBrowserMenu0-5:\Souvrir la boîte de dialogue d'impression.
+fr.ro.HelpBrowserMenu0-5:\Souvrir la boîte de dialogue d’impression.
it.ro.HelpBrowserMenu0-5:\Sapri la finestra di stampa
nl.ro.HelpBrowserMenu0-5:Verplaats de muispijl naar rechts om het afdrukvenster te openen.
zh_CN.ro.HelpBrowserMenu0-5:\S打开打å°å¯¹è¯æ¡†ã€‚
@@ -5910,35 +5946,35 @@ zh_CN.ro.HelpBrowserMenu0-8:\S在文本编辑器中查看当å‰é¡µé¢çš„æºä»£ç 
en.ro.HelpBrowserMenu1:\Rsee the options relating to the current item.
de.ro.HelpBrowserMenu1:Untermenü Objekt.|MMenöpunkte beziehen sich auf das aktuelle Objekt.
-fr.ro.HelpBrowserMenu1:\Rvoir les options correspondant à l'objet courant.
+fr.ro.HelpBrowserMenu1:\Rvoir les options correspondant à l’objet courant.
it.ro.HelpBrowserMenu1:\Rmostra opzioni relative all'oggetto corrente.
nl.ro.HelpBrowserMenu1:Verplaats de muispijl naar rechts om de mogelijkheden bij dit item te tonen.
zh_CN.ro.HelpBrowserMenu1:\R查看与当å‰é¡¹çš„相关选项。
en.ro.HelpBrowserMenu1-0-0:\Rsee information about the current item.
de.ro.HelpBrowserMenu1-0-0:Informationen zum aktuellen Objekt zeigen.
-fr.ro.HelpBrowserMenu1-0-0:\Rvoir les informations sur l'objet en cours.
+fr.ro.HelpBrowserMenu1-0-0:\Rvoir les informations sur l’objet en cours.
it.ro.HelpBrowserMenu1-0-0:\Rmostra informazioni relative all'oggetto corrente.
nl.ro.HelpBrowserMenu1-0-0:Verplaats de muispijl naar rechts om informatie over dit item te tonen.
zh_CN.ro.HelpBrowserMenu1-0-0:\R查看当å‰é¡¹çš„ä¿¡æ¯ã€‚
en.ro.HelpBrowserMenu1-0-1:\Rsave the current item.
de.ro.HelpBrowserMenu1-0-1:Abspeichern des Objektes (Original).
-fr.ro.HelpBrowserMenu1-0-1:\Rsauver l'objet courant.
+fr.ro.HelpBrowserMenu1-0-1:\Rsauver l’objet courant.
it.ro.HelpBrowserMenu1-0-1:\Rsalva l'oggetto corrente
nl.ro.HelpBrowserMenu1-0-1:Verplaats de muispijl naar rechts om dit item te bewaren.
zh_CN.ro.HelpBrowserMenu1-0-1:\Rä¿å­˜å½“å‰é¡¹ã€‚
en.ro.HelpBrowserMenu1-0-2:\Rsee the export options.
de.ro.HelpBrowserMenu1-0-2:Optionen zum Export des aktuellen Objektes zeigen.
-fr.ro.HelpBrowserMenu1-0-2:\Rvoir les options d'exportation.
+fr.ro.HelpBrowserMenu1-0-2:\Rvoir les options d’exportation.
it.ro.HelpBrowserMenu1-0-2:\Rmostra opzioni di esportazione
nl.ro.HelpBrowserMenu1-0-2:Verplaats de muispijl naar rechts om de exporteermogelijkheden te tonen.
zh_CN.ro.HelpBrowserMenu1-0-2:\R查看导出选项。
en.ro.HelpBrowserMenu1-0-2-0:\Rsave the image as a Sprite.
de.ro.HelpBrowserMenu1-0-2-0:Abspeichern des Bildes als Sprite Datei.
-fr.ro.HelpBrowserMenu1-0-2-0:\Rsauver l'image au format Sprite.
+fr.ro.HelpBrowserMenu1-0-2-0:\Rsauver l’image au format « sprite ».
it.ro.HelpBrowserMenu1-0-2-0:\Rsalva l'immagine come file Sprite
nl.ro.HelpBrowserMenu1-0-2-0:Verplaats de muispijl naar rechts om de afbeelding als een Sprite-bestand te bewaren.
zh_CN.ro.HelpBrowserMenu1-0-2-0:\R将图åƒå¦å­˜ä¸ºè´´å›¾æ–‡ä»¶ã€‚
@@ -5952,28 +5988,28 @@ zh_CN.ro.HelpBrowserMenu1-0-2-1:\R将图åƒå¦å­˜ä¸ºç»˜å›¾æ–‡ä»¶
en.ro.HelpBrowserMenu1-0-3:\Rsave the address of the current item.
de.ro.HelpBrowserMenu1-0-3:Die Adresse des Objektes speichern.
-fr.ro.HelpBrowserMenu1-0-3:\Rsauver l'adresse de l'objet courant.
+fr.ro.HelpBrowserMenu1-0-3:\Rsauver l’adresse de l’objet courant.
it.ro.HelpBrowserMenu1-0-3:\Rsalva l'indirizzo dell'oggetto corrente.
nl.ro.HelpBrowserMenu1-0-3:Verplaats de muispijl naar rechts om het adres van dit item te bewaren.
zh_CN.ro.HelpBrowserMenu1-0-3:\Rä¿å­˜å½“å‰é¡¹çš„网å€ã€‚
en.ro.HelpBrowserMenu1-0-3-0:\Rsave the current item's address in Acorn URI format.
de.ro.HelpBrowserMenu1-0-3-0:Speichert die Adresse des Objektes im Acorn URI Format.
-fr.ro.HelpBrowserMenu1-0-3-0:\Rsauver l'adresse de l'objet courant au format Acorn URI.
+fr.ro.HelpBrowserMenu1-0-3-0:\Rsauver l’adresse de l’objet courant au format Acorn URI.
it.ro.HelpBrowserMenu1-0-3-0:\Rsalva l'indirizzo dell'oggetto corrente nel formato Acorn URI
nl.ro.HelpBrowserMenu1-0-3-0:Verplaats de muispijl naar rechts om het adres van dit item in AcornURI-vorm te bewaren.
zh_CN.ro.HelpBrowserMenu1-0-3-0:\R以 Acorn URI æ ¼å¼ä¿å­˜å½“å‰é¡¹çš„网å€ã€‚
en.ro.HelpBrowserMenu1-0-3-1:\Rsave the current item's address in Ant URL format.
de.ro.HelpBrowserMenu1-0-3-1:Speichert die Adresse des Objektes im Ant URL Format.
-fr.ro.HelpBrowserMenu1-0-3-1:\Rsauver l'adresse de l'objet courant au format Ant URL.
+fr.ro.HelpBrowserMenu1-0-3-1:\Rsauver l’adresse de l’objet courant au format Ant URL.
it.ro.HelpBrowserMenu1-0-3-1:\Rsalva l'indirizzo dell'oggetto corrente nel formato Ant URL
nl.ro.HelpBrowserMenu1-0-3-1:Verplaats de muispijl naar rechts om het adres van dit item in AntURL-vorm te bewaren.
zh_CN.ro.HelpBrowserMenu1-0-3-1:\R以 Ant URL æ ¼å¼ä¿å­˜å½“å‰é¡¹çš„网å€ã€‚
en.ro.HelpBrowserMenu1-0-3-2:\Rsave the current item's address as plain text.
de.ro.HelpBrowserMenu1-0-3-2:Speichert die Adresse des Objektes als Text.
-fr.ro.HelpBrowserMenu1-0-3-2:\Rsauver l'adresse de l'objet courant en texte simple.
+fr.ro.HelpBrowserMenu1-0-3-2:\Rsauver l’adresse de l’objet courant en texte simple.
it.ro.HelpBrowserMenu1-0-3-2:\Rsalva l'indirizzo dell'oggetto corrente come file di testo
nl.ro.HelpBrowserMenu1-0-3-2:Verplaats de muispijl naar rechts om het adres van dit item als platte tekst te bewaren.
zh_CN.ro.HelpBrowserMenu1-0-3-2:\R将当å‰é¡¹çš„网å€å¦å­˜ä¸ºçº¯æ–‡æœ¬ã€‚
@@ -6092,21 +6128,21 @@ zh_CN.ro.HelpBrowserMenu3:\R查看导航选项。
en.ro.HelpBrowserMenu3-0:\Sreturn to the configured home page.
de.ro.HelpBrowserMenu3-0:Öffnet die Homepage im aktuellen Fenster.
-fr.ro.HelpBrowserMenu3-0:\Srevenir à la page d'accueil configurée.
+fr.ro.HelpBrowserMenu3-0:\Srevenir à la page d’accueil configurée.
it.ro.HelpBrowserMenu3-0:\Storna alla pagina iniziale preconfigurata
nl.ro.HelpBrowserMenu3-0:Klik met KIES om terug naar de begin-/startpagina te gaan.
zh_CN.ro.HelpBrowserMenu3-0:\S返回é…置好的主页。
en.ro.HelpBrowserMenu3-1:\Sgo back a page in the local history.|MForm information is not resubmitted.
de.ro.HelpBrowserMenu3-1:Schaltet zurück zur vorher dargestellten Seite.|MDie Seite wird dabei nicht aktualisiert.
-fr.ro.HelpBrowserMenu3-1:\Sreculer d'une page dans l'historique local.|ML'information du formlaire n'est pas réenvoyée.
+fr.ro.HelpBrowserMenu3-1:\Sreculer d’une page dans l’historique local.|ML’information du formlaire n’est pas réenvoyée.
it.ro.HelpBrowserMenu3-1:\Storna indietro di una pagina nella cronologia locale.|MIl form non verrà reinviato.
nl.ro.HelpBrowserMenu3-1:Klik met KIES om 1 pagina terug in de venstergeschiedenis te gaan.|MLet op! Formulierinformatie wordt niet opnieuw ingediend.
zh_CN.ro.HelpBrowserMenu3-1:\S在本地历å²è®°å½•ä¸­åŽé€€ä¸€é¡µã€‚|Mä¸é‡æ–°æ交表格信æ¯ã€‚
en.ro.HelpBrowserMenu3-2:\Sstep forward a page in the local history.|MForm information is not resubmitted.
de.ro.HelpBrowserMenu3-2:Schaltet zur nächsten Seite in der lokalen History Liste.|MDie Seite wird dabei nicht aktualisiert.
-fr.ro.HelpBrowserMenu3-2:\Savancer d'une page dans l'historique local.|ML'information du formlaire n'est pas réenvoyée.
+fr.ro.HelpBrowserMenu3-2:\Savancer d’une page dans l’historique local.|ML’information du formlaire n’est pas réenvoyée.
it.ro.HelpBrowserMenu3-2:\Svai avanti di una pagina nella cronologia locale.|MLe informazioni contenute nel form non verranno inviate.
nl.ro.HelpBrowserMenu3-2:Klik met KIES om 1 pagina vooruit in de venstergeschiedenis te gaan.|MLet op! Formulierinformatie wordt niet opnieuw ingediend.
zh_CN.ro.HelpBrowserMenu3-2:\S在本地历å²è®°å½•ä¸­å‰è¿›ä¸€é¡µã€‚|Mä¸é‡æ–°æ交表格信æ¯ã€‚
@@ -6134,7 +6170,7 @@ zh_CN.ro.HelpBrowserMenu3-5:\S阻止 NetSurf 继续加载此页é¢ã€‚
en.ro.HelpBrowserMenu4:\Rset the local display options.
de.ro.HelpBrowserMenu4:Untermenü Anzeige.|MFestlegen der Darstellungsparameter für das Browserfenster.
-fr.ro.HelpBrowserMenu4:\Rdéfinir les options d'affichage locales.
+fr.ro.HelpBrowserMenu4:\Rdéfinir les options d’affichage locales.
it.ro.HelpBrowserMenu4:\Rimposta le opzioni di visualizzazione locale.
nl.ro.HelpBrowserMenu4:Verplaats de muispijl naar rechts om de weergavemogelijkheden van dit browservenster aan te passen.
zh_CN.ro.HelpBrowserMenu4:\R设置本地显示的选项。
@@ -6148,7 +6184,7 @@ zh_CN.ro.HelpBrowserMenu4-0:\R缩放页é¢ï¼ŒåŒæ—¶æ”¹å˜æ–‡æœ¬å’Œå›¾åƒã€‚
en.ro.HelpBrowserMenu4-1:\Rset the local image options.
de.ro.HelpBrowserMenu4-1:Optionen zur Anzeige von Bildern.
-fr.ro.HelpBrowserMenu4-1:\Rdéfinir les options d'images locales.
+fr.ro.HelpBrowserMenu4-1:\Rdéfinir les options d’images locales.
it.ro.HelpBrowserMenu4-1:\Rimposta le opzioni relative alle immagini locali.
nl.ro.HelpBrowserMenu4-1:Verplaats de muispijl naar rechts om de afbeeldingsmogelijkheden van dit browservenster aan te passen.
zh_CN.ro.HelpBrowserMenu4-1:\R设置本地图åƒçš„选项。
@@ -6176,42 +6212,42 @@ zh_CN.ro.HelpBrowserMenu4-1-2:\S切æ¢æ˜¾ç¤ºåŠ¨ç”»ã€‚|M如果关闭,则会显ç
en.ro.HelpBrowserMenu4-2:\Rcontrol the display of NetSurf's toolbars.
de.ro.HelpBrowserMenu4-2:Optionen zur Anzeige von Kontroll- und Steuerelementen.
-fr.ro.HelpBrowserMenu4-2:\Rcontroler l'affichage des barres d'outils de NetSurf.
+fr.ro.HelpBrowserMenu4-2:\Rcontroler l’affichage des barres d’outils de NetSurf.
it.ro.HelpBrowserMenu4-2:\Rcontrolla la visualizzazione delle barre strumenti di NetSurf.
nl.ro.HelpBrowserMenu4-2:Verplaats de muispijl naar rechts om de gereedschapbalken aan te passen.
zh_CN.ro.HelpBrowserMenu4-2:\R控制显示 NetSurf 工具æ ã€‚
en.ro.HelpBrowserMenu4-2-0:\Stoggle the display of the toolbar buttons.|MURL bar uses the remaining space.
de.ro.HelpBrowserMenu4-2-0:Schaltet die Schaltknöpfe am oberen Fensterrand ein/aus.|MDie Länge der Adressleiste wird angepaßt.
-fr.ro.HelpBrowserMenu4-2-0:\Safficher ou pas les boutons de la barre d'outil.|MLa barre d'URL utilise l'espace restant.
+fr.ro.HelpBrowserMenu4-2-0:\Safficher ou pas les boutons de la barre d’outil.|MLa barre d’URL utilise l’espace restant.
it.ro.HelpBrowserMenu4-2-0:\Salterna la visualizzazione dei pulsanti della barra strumenti.|MLa barra URL coprirà lo spazio eccedente.
nl.ro.HelpBrowserMenu4-2-0:Klik met KIES om het tonen van de knoppen op de gereedschapbalk aan of uit te zetten.|MHet adresveld gebruikt de overblijvende vrijkomende ruimte.
zh_CN.ro.HelpBrowserMenu4-2-0:\S切æ¢æ˜¾ç¤ºå·¥å…·æ æŒ‰é’®ã€‚|M 地å€æ ä½¿ç”¨å‰©ä½™çš„空间。
en.ro.HelpBrowserMenu4-2-1:\Stoggle the display of the address (URL) bar.
de.ro.HelpBrowserMenu4-2-1:Schaltet die Adressleiste am oberen Fensterrand ein/aus.
-fr.ro.HelpBrowserMenu4-2-1:\Safficher ou pas la barre d'adresse (URL).
+fr.ro.HelpBrowserMenu4-2-1:\Safficher ou pas la barre d’adresse (URL).
it.ro.HelpBrowserMenu4-2-1:\Salterna la visualizzazione della barra indirizzi (URL).
nl.ro.HelpBrowserMenu4-2-1:Klik met KIES om het tonen van het (web)adresveld aan of uit te zetten.
zh_CN.ro.HelpBrowserMenu4-2-1:\S切æ¢æ˜¾ç¤ºåœ°å€(URL)æ ã€‚
en.ro.HelpBrowserMenu4-2-2:\Stoggle the display of the throbber.|MURL bar uses the remaining space.
de.ro.HelpBrowserMenu4-2-2:Schaltet die Ladeaktivitätsanzeige am oberen Fensterrand ein/aus.|MDie Länge der Adressleiste wird angepaßt.
-fr.ro.HelpBrowserMenu4-2-2:\Safficher le pulseur ou pas.|MLa barre d'URL utilise l'espace restant.
+fr.ro.HelpBrowserMenu4-2-2:\Safficher le pulseur ou pas.|MLa barre d’URL utilise l’espace restant.
it.ro.HelpBrowserMenu4-2-2:\Salterna la visualizzazione del throbber.|MLa barra URL coprirà lo spazio eccedente.
nl.ro.HelpBrowserMenu4-2-2:Klik met KIES om het tonen van de (laad)Activiteitsindicator aan of uit te zetten.|MHet adresveld gebruikt de overblijvende vrijkomende ruimte.
zh_CN.ro.HelpBrowserMenu4-2-2:\S切æ¢æ˜¾ç¤ºåŠ¨æ€æµè§ˆå›¾ç¤ºã€‚|M 地å€æ ä½¿ç”¨å‰©ä½™çš„空间。
en.ro.HelpBrowserMenu4-2-3:\Stoggle toolbar edit mode.
de.ro.HelpBrowserMenu4-2-3:Schaltet in den Modus zur Bearbeitung der Iconleiste am oberen Fensterrand.
-fr.ro.HelpBrowserMenu4-2-3:\Schanger le mode d'édition de barre d'outils.
+fr.ro.HelpBrowserMenu4-2-3:\Schanger le mode d’édition de barre d’outils.
it.ro.HelpBrowserMenu4-2-3:\Salterna la modalità di modifica della barra strumenti.
nl.ro.HelpBrowserMenu4-2-3:Klik met KIES om de aanpasmodus van de gereedschapbalk in of uit te schakelen. Wanneer ingeschakelt, verschijnt er een balk onder de gereedschapbalk met extra knoppen die van en naar deze balk gesleept kunnen worden om deze aan te passen.
zh_CN.ro.HelpBrowserMenu4-2-3:\S切æ¢å·¥å…·æ ç¼–辑模å¼ã€‚
en.ro.HelpBrowserMenu4-3:\Scontrol the manner in which the display is rendered.
de.ro.HelpBrowserMenu4-3:Einstellungen zur Berechnung der Seitendarstellung.
-fr.ro.HelpBrowserMenu4-3:\Scontroler la façon d'afficher.
+fr.ro.HelpBrowserMenu4-3:\Scontroler la façon d’afficher.
it.ro.HelpBrowserMenu4-3:\Scontrolla il modo in cui è resa l'esposizione.
nl.ro.HelpBrowserMenu4-3:Verplaats de muispijl naar rechts om de pagina-opbouwmethodes aan te passen.
zh_CN.ro.HelpBrowserMenu4-3:\S控制显示的渲染方å¼ã€‚
@@ -6232,7 +6268,7 @@ zh_CN.ro.HelpBrowserMenu4-3-1:\S切æ¢æ˜¯å¦åœ¨æ‰€æœ‰è®¡ç®—完æˆä¹‹å‰ä¸æ˜¾ç¤º
en.ro.HelpBrowserMenu4-4:\Smake your local display options the default options for NetSurf.
de.ro.HelpBrowserMenu4-4:Übernimmt die vorgenommenen Anzeigeeinstellungen als globale Standardwerte für die Darstellung aller weiteren Seiten.
-fr.ro.HelpBrowserMenu4-4:\Spromouvoir vos options d'affichage locales en options par défaut pour NetSurf.
+fr.ro.HelpBrowserMenu4-4:\Spromouvoir vos options d’affichage locales en options par défaut pour NetSurf.
it.ro.HelpBrowserMenu4-4:\Simposta come predefinite tutte le impostazioni di visualizzazione.
nl.ro.HelpBrowserMenu4-4:Klik met KIES om de gekozen weergave van dit browservenster als de standaardinstelling voor NetSurf te maken.
zh_CN.ro.HelpBrowserMenu4-4:\S将本地显示选项设置为 NetSurf 的默认选项。
@@ -6253,7 +6289,7 @@ zh_CN.ro.HelpBrowserMenu4-5-0:\S å°†å½“å‰ \w ä½ç½®è®¾ç½®ä¸ºé»˜è®¤ä½ç½®ã€‚
en.ro.HelpBrowserMenu4-5-1:\S toggle whether subsequent windows are staggered down the screen.
de.ro.HelpBrowserMenu4-5-1:Neu geöffnete Fenster werden nicht alle an der Standardposition sondern zueinander leicht versetzt plaziert.
-fr.ro.HelpBrowserMenu4-5-1:\Sdécider si les fenêtres suivantes doivent être ouvertes en décalage à l'écran.
+fr.ro.HelpBrowserMenu4-5-1:\Sdécider si les fenêtres suivantes doivent être ouvertes en décalage à l’écran.
it.ro.HelpBrowserMenu4-5-1:\Simposta nel caso le finestre successive siano sfalsate rispetto alla parte bassa dello schermo.
nl.ro.HelpBrowserMenu4-5-1:Klik met KIES om het verticaal stapelen van nieuwe browservensters aan of uit te zetten.
zh_CN.ro.HelpBrowserMenu4-5-1:\S 切æ¢åŽç»­çª—å£æ˜¯å¦åœ¨å±å¹•ä¸Šäº¤é”™æ˜¾ç¤ºã€‚
@@ -6274,28 +6310,28 @@ zh_CN.ro.HelpBrowserMenu4-5-3:\S 返回默认的\w ä½ç½®ã€‚
en.ro.HelpBrowserMenu5:\Raccess NetSurf's built in utilities.|MUtilities are tools such as the hotlist, history tree and various setup options.
de.ro.HelpBrowserMenu5:Untermenü Werkzeuge.|MEnthält verschiedene nützliche Zusatz- und Sonderfunktionen.
-fr.ro.HelpBrowserMenu5:\Raccéder aux utilitaires intégrés à NetSurf.|MLes utilitaires sont des outils comme les favoris, l'historique arborescent et diverses options de configuration.
+fr.ro.HelpBrowserMenu5:\Raccéder aux utilitaires intégrés à NetSurf.|MLes utilitaires sont des outils comme les marque-pages, l’historique arborescent et diverses options de configuration.
it.ro.HelpBrowserMenu5:\Raccedi a NetSurf attraverso le utilità.|MLe utilità sono strumenti simili ai segnalibri, gli alberi della cronologia e le altre opzioni di configurazione.
nl.ro.HelpBrowserMenu5:Verplaats de muispijl naar rechts om toegang te krijgen tot NetSurf's ingebouwde mogelijkheden.|MMogelijkheden zijn bijvoorbeeld gereedschappen zoals de favorietenlijst, de browsergeschiedenis en verschillende instelmogelijkheden.
zh_CN.ro.HelpBrowserMenu5:\R访问 NetSurf 的内置实用程åºã€‚|M实用程åºæ˜¯è¯¸å¦‚常用列表,历å²è®°å½•æ ‘å’Œå„ç§è®¾ç½®é€‰é¡¹ä¹‹ç±»çš„工具。
en.ro.HelpBrowserMenu5-0:\Rmanage the hotlist.
de.ro.HelpBrowserMenu5-0:Verwaltung der Hotlist.
-fr.ro.HelpBrowserMenu5-0:\Rgérer les favoris.
+fr.ro.HelpBrowserMenu5-0:\Rgérer les marque-pages.
it.ro.HelpBrowserMenu5-0:\Rgestisci i segnalibri.
nl.ro.HelpBrowserMenu5-0:Verplaats de muispijl naar rechts om de favorietenlijst te beheren.
zh_CN.ro.HelpBrowserMenu5-0:\R管ç†å¸¸ç”¨åˆ—表。
en.ro.HelpBrowserMenu5-0-0:\Sadd the current page to the hotlist.
de.ro.HelpBrowserMenu5-0-0:Anklicken trägt die Adresse der aktuellen Seite in die Hotlist ein.
-fr.ro.HelpBrowserMenu5-0-0:\Sajouter la page en cours aux favoris.
+fr.ro.HelpBrowserMenu5-0-0:\Sajouter la page courante aux marque-pages.
it.ro.HelpBrowserMenu5-0-0:\Saggiungi la pagina corrente ai segnalibri
nl.ro.HelpBrowserMenu5-0-0:Klik met KIES om deze pagina aan de favorietenlijst toe te voegen.
zh_CN.ro.HelpBrowserMenu5-0-0:\S将当å‰é¡µé¢æ·»åŠ åˆ°å¸¸ç”¨åˆ—表。
en.ro.HelpBrowserMenu5-0-1:\Sopen the hotlist management \w.
de.ro.HelpBrowserMenu5-0-1:Öffnet die Hotlist.
-fr.ro.HelpBrowserMenu5-0-1:\Souvrir la \w de gestion des favoris.
+fr.ro.HelpBrowserMenu5-0-1:\Souvrir la \w de gestion des marque-pages.
it.ro.HelpBrowserMenu5-0-1:\Sapri la finestra del gestore dei segnalibri
nl.ro.HelpBrowserMenu5-0-1:Klik met KIES om de favorietenlijst te openen.
zh_CN.ro.HelpBrowserMenu5-0-1:\S打开常用列表管ç†å™¨ \w。
@@ -6309,21 +6345,21 @@ zh_CN.ro.HelpBrowserMenu5-1:\R查看历å²è®°å½•é€‰é¡¹ã€‚
en.ro.HelpBrowserMenu5-1-0:\Sopen the local history \w.
de.ro.HelpBrowserMenu5-1-0:Anklicken mit AUSWAHL öffnet das Fenster mit der lokalen History.|MIn der lokalen History werden alle Webseiten notiert, die mit dem aktuellen Browserfenster bereits besucht worden waren.
-fr.ro.HelpBrowserMenu5-1-0:\Souvrir la \w d'historique local.
+fr.ro.HelpBrowserMenu5-1-0:\Souvrir la \w d’historique local.
it.ro.HelpBrowserMenu5-1-0:\Sapri la cronologia locale
nl.ro.HelpBrowserMenu5-1-0:Klik met KIES om de venstergeschiedenis te openen.
zh_CN.ro.HelpBrowserMenu5-1-0:\S打开本地历å²è®°å½• \w。
en.ro.HelpBrowserMenu5-1-1:\Sopen the global history \w.
de.ro.HelpBrowserMenu5-1-1:Anklicken mit AUSWAHL öffnet das Fenster mit der globalen History.|MIn der globalen History werden alle mit NetSurf besuchten Webseiten notiert.
-fr.ro.HelpBrowserMenu5-1-1:\Souvrir la fenêtre d'historique global.
+fr.ro.HelpBrowserMenu5-1-1:\Souvrir la fenêtre d’historique global.
it.ro.HelpBrowserMenu5-1-1:\Sapri la cronologia globale
nl.ro.HelpBrowserMenu5-1-1:Klik met KIES om de browsergeschiedenis te openen.
zh_CN.ro.HelpBrowserMenu5-1-1:\S打开全局历å²è®°å½• \w。
en.ro.HelpBrowserMenu5-2:\Rmanage your cookies.
de.ro.HelpBrowserMenu5-2:Cookies bearbeiten.
-fr.ro.HelpBrowserMenu5-2:\Rgérer vos favoris.
+fr.ro.HelpBrowserMenu5-2:\Rgérer vos cookies.
it.ro.HelpBrowserMenu5-2:\Rgestisci i tuoi cookie.
nl.ro.HelpBrowserMenu5-2:Verplaats de muispijl naar rechts om de cookies te beheren.
zh_CN.ro.HelpBrowserMenu5-2:\R管ç†æ‚¨çš„ Cookies。
@@ -6344,7 +6380,7 @@ zh_CN.ro.HelpBrowserMenu5-2-1:\S删除所有ä¿å­˜çš„ Cookies。
en.ro.HelpBrowserMenu6:\Rsee the help resources available.
de.ro.HelpBrowserMenu6:Untermenü Hilfe.|MZeigt Informationen zu und über NetSurf.
-fr.ro.HelpBrowserMenu6:\Rvoir l'aide disponible.
+fr.ro.HelpBrowserMenu6:\Rvoir l’aide disponible.
it.ro.HelpBrowserMenu6:\Rmostra la documentazione disponibile
nl.ro.HelpBrowserMenu6:Verplaats de muispijl naar rechts om extra hulp en informatie te raadplegen, indien deze beschikbaar is.
zh_CN.ro.HelpBrowserMenu6:\R查看å¯ç”¨çš„帮助资æºã€‚
@@ -6358,14 +6394,14 @@ zh_CN.ro.HelpBrowserMenu6-0:\S在新的 \w 中打开文档内容页é¢ã€‚
en.ro.HelpBrowserMenu6-1:\Sopen the user guide in a new \w.
de.ro.HelpBrowserMenu6-1:Öffnet das NetSurf Handbuch in einem neuen Browserfenster.
-fr.ro.HelpBrowserMenu6-1:\Souvrir le guide de l'utilisateur dans une nouvelle fenêtre.
+fr.ro.HelpBrowserMenu6-1:\Souvrir le guide de l’utilisateur dans une nouvelle fenêtre.
it.ro.HelpBrowserMenu6-1:\Sapri la guida in linea in una nuova finestra
nl.ro.HelpBrowserMenu6-1:Klik met KIES om de gebruikershandleiding in een nieuw browservenster te openen.
zh_CN.ro.HelpBrowserMenu6-1:\S在新的 \w 中打开用户指å—。
en.ro.HelpBrowserMenu6-2:\Sopen the user information page in a new \w.
de.ro.HelpBrowserMenu6-2:Öffnet eine Seite mit allgemeinen Informationen zu NetSurf in einem neuen Browserfenster.
-fr.ro.HelpBrowserMenu6-2:\Souvrir la page d'information de l'utilisateur dans une nouvelle fenêtre.
+fr.ro.HelpBrowserMenu6-2:\Souvrir la page d’information de l’utilisateur dans une nouvelle fenêtre.
it.ro.HelpBrowserMenu6-2:\Sapri la pagina delle informazioni utente in una nuova finestra
nl.ro.HelpBrowserMenu6-2:Klik met KIES om de gebruikersinformatie in een nieuw browservenster te openen.
zh_CN.ro.HelpBrowserMenu6-2:\S在新的 \w 中打开用户信æ¯é¡µé¢ã€‚
@@ -6393,21 +6429,21 @@ zh_CN.ro.HelpBrowserMenu6-5:\Sè¿è¡Œå¸®åŠ©ã€‚
en.ro.HelpBrowser-1:Click \s on a link to follow it.|MClick \a on a link to open it in a new \w.|MShift+\s click on a link to download the link target contents.|MShift+\a click to save the link target address.
de.ro.HelpBrowser-1:Das ist ein Browserfenster.|MEinen Link mit AUSWAHL anklicken, um ihm zu folgen.|MEinen Link mit SPEZIAL anklicken, um ihn in einem neuen Fenster zu öffnen.|MShift+AUSWAHL über einem Verweis lädt den verlinkten Inhalt herunter.|MShift+SPEZIAL über einem Link klicken zum Speichern der Adresse des Verweises.
-fr.ro.HelpBrowser-1:Cliquer \s sur un lien pour le suivre.|MCliquer \a sur un lien pour l'ouvrir dans une nouvelle \w.|MShift+\s click on a link to download the link target contents.|MShift+\a click to save the link target address.
+fr.ro.HelpBrowser-1:Cliquer \s sur un lien pour le suivre.|MCliquer \a sur un lien pour l’ouvrir dans une nouvelle \w.|MShift+\s click on a link to download the link target contents.|MShift+\a click to save the link target address.
it.ro.HelpBrowser-1:Clicca \s sul link per procedere.|MClicca \a in un link per aprirlo in una nuova finestra|MShift+\s clicca sul link per scaricarne i contenuti.|MShift+\a clicca per salvare l'indirizzo del link.
nl.ro.HelpBrowser-1:Klik met KIES op een koppeling om deze te volgen.|MKlik met PASAAN om de koppeling in een nieuw venster te openen.|MKlik met SHIFT+KIES om de inhoud op te halen voor opslag.|MKlik met SHIFT+PASAAN om het koppelingsadres te bewaren.
zh_CN.ro.HelpBrowser-1:å•å‡»é“¾æŽ¥ä¸Šçš„ \s 以跟éšå®ƒã€‚|Må•å‡»é“¾æŽ¥ä¸Šçš„ \a 以在新的 \w 中打开。|MShift+\s å•å‡»é“¾æŽ¥ä»¥ä¸‹è½½é“¾æŽ¥ç›®æ ‡å†…容。|MShift+\a å•å‡»ä»¥ä¿å­˜é“¾æŽ¥ç›®æ ‡ç½‘å€ã€‚
en.ro.HelpIconbar:\TNetSurf icon.|M\Sopen a new browser \w.|M\Aopen the hotlist management \w.
de.ro.HelpIconbar:Das ist das NetSurf Icon.|MKlicken mit AUSWAHL öffnet ein neues Browserfenster.|MKlicken mit SPEZIAL öffnet die Hotlist.
-fr.ro.HelpIconbar:\Tl'icône de NetSurf.|M\Souvrir une nouvelle \w de navigateur.|M\Aouvrir la fenêtre de gestion des favoris.
+fr.ro.HelpIconbar:\Tl’icône de NetSurf.|M\Souvrir une nouvelle \w de navigateur.|M\Aouvrir la fenêtre de gestion des marque-pages.
it.ro.HelpIconbar:\TIcona di NetSurf.|M\Sapri una nuova finestra|M\Aapri la finestra del gestore dei segnalibri
nl.ro.HelpIconbar:Dit is het symbool van het programma NetSurf.|MKlik met KIES om een nieuw browservenster te openen.|MKlik met PASAAN om de favorietenlijst te openen.
zh_CN.ro.HelpIconbar:\T NetSurf 图标。|M\S打开新的æµè§ˆå™¨ \w。|M\A打开常用项列表管ç†\w。
en.ro.HelpHistory:Use this \w to navigate around the local history tree.|M\Son a thumbnail to return to that page.
de.ro.HelpHistory:Die History zeigt alle in dieser Sitzung besuchten Seiten.|MKlicken mit AUSWAHL auf eine Symbolgrafik kehrt zurück zur jeweiligen Seite.
-fr.ro.HelpHistory:Utiliser cette \w pour naviguer dans l'historique arborescent local.|M\Ssur une vignette pour revenir à cette page.
+fr.ro.HelpHistory:Utiliser cette \w pour naviguer dans l’historique arborescent local.|M\Ssur une vignette pour revenir à cette page.
it.ro.HelpHistory:Usa questa finestra per navigare all'interno dell'albero della cronologia locale.|M\Ssulla miniatura per tornare a quella pagina.
nl.ro.HelpHistory:Gebruik dit venster om door de structuur van de venstergeschiedenis te kunnen gaan.|MKlik met KIES op een miniatuur om terug te keren naar de pagina.
zh_CN.ro.HelpHistory:使用此 \w 在本地历å²è®°å½•æ ‘中导航。|M\S在缩略图上返回到该页é¢ã€‚
@@ -6435,7 +6471,7 @@ zh_CN.ro.HelpSaveAs1:用æ¥ä¿å­˜æ­¤æ–‡æ¡£çš„文件å。
en.ro.HelpSaveAs2:\Ssave the file with the current filename.|MIf a full path is not set, you must drag the icon to a directory.
de.ro.HelpSaveAs2:Klicken mit AUSWAHL speichert die Datei unter angezeigtem Pfad und Namen.|MWird kein voller Dateipfad angezeigt, muß die Datei per Drag & Drop gespeichert werden.
-fr.ro.HelpSaveAs2:\Ssauver le fichier avec le nom de fichier en cours.|MSi le nom de chemin n'est pas complet, il vous faudra déposer l'icône dans un répertoire.
+fr.ro.HelpSaveAs2:\Ssauver le fichier avec le nom de fichier en cours.|MSi le nom de chemin n’est pas complet, il vous faudra déposer l’icône dans un répertoire.
it.ro.HelpSaveAs2:\Ssalva il file usando il suo nome corrente.|MNel caso il percorso completo non sia impostato sposta l'icona nella directory.
nl.ro.HelpSaveAs2:Klik met KIES om het bestand met deze bestandsnaam te bewaren.|MWanneer het veld geen volledig pad toont, dan moet het symbool naar de gewenste map worden gesleept.
zh_CN.ro.HelpSaveAs2:\S用当å‰æ–‡ä»¶åä¿å­˜æ–‡ä»¶ã€‚|M如果您未设置完整路径,则必须将图标拖到目录中。
@@ -6449,28 +6485,28 @@ zh_CN.ro.HelpSaveAs3:\S关闭此 \w 而ä¸ä¿å­˜ã€‚
en.ro.HelpScaleView:Use this \w to change the scale the page is displayed at.
de.ro.HelpScaleView:Mit diesem Dialog kann die Darstellung der Seite vergrößert oder verkleinert werden.
-fr.ro.HelpScaleView:Utiliser cette \w pour changer l'échelle d'affichage.
+fr.ro.HelpScaleView:Utiliser cette \w pour changer l’échelle d’affichage.
it.ro.HelpScaleView:Usa questa finestra per modificare la scala di visualizzazione della pagina.
nl.ro.HelpScaleView:Gebruik dit venster om de schaal van deze pagina te wijzigen.
zh_CN.ro.HelpScaleView:使用此 \w 以更改页é¢æ˜¾ç¤ºçš„比例。
en.ro.HelpScaleView1:Enter the scale you wish the page to be displayed at.
de.ro.HelpScaleView1:Gewünschte Skalierung hier eingeben.
-fr.ro.HelpScaleView1:Saisissez l'échelle à laquelle vous voulez afficher cette page.
+fr.ro.HelpScaleView1:Saisissez l’échelle à laquelle vous voulez afficher cette page.
it.ro.HelpScaleView1:Inserisci la scala di visualizzazione preferita.
nl.ro.HelpScaleView1:Voer hier de gewenste schaal in waarop deze pagina getoond moet worden.
zh_CN.ro.HelpScaleView1:输入您希望显示的页é¢æ¯”例。
en.ro.HelpScaleView2:\Sreduce the scale, 10% at a time.
de.ro.HelpScaleView2:Klicken mit AUSWAHL um die Skalierung um 10% zu verringern.
-fr.ro.HelpScaleView2:\Sréduire l'échelle, par pas de 10%.
+fr.ro.HelpScaleView2:\Sréduire l’échelle, par pas de 10%.
it.ro.HelpScaleView2:\Sdecrementa la scala di un 10% alla volta.
nl.ro.HelpScaleView2:Klik met KIES om de schaal met 10% per keer te verkleinen.
zh_CN.ro.HelpScaleView2:\S缩å°æ¯”例, æ¯æ¬¡å‡å°‘ 10%。
en.ro.HelpScaleView3:\Sincrease the scale, 10% at a time.
de.ro.HelpScaleView3:Klicken mit AUSWAHL um die Skalierung um 10% zu erhöhen.
-fr.ro.HelpScaleView3:\Saugmenter l'échelle, par pas de 10%.
+fr.ro.HelpScaleView3:\Saugmenter l’échelle, par pas de 10%.
it.ro.HelpScaleView3:\Sincrementa la scala di un 10% alla volta.
nl.ro.HelpScaleView3:Klik met KIES om de schaal met 10% per keer te vergroten.
zh_CN.ro.HelpScaleView3:\S放大比例, æ¯æ¬¡å¢žåŠ  10%。
@@ -6484,14 +6520,14 @@ zh_CN.ro.HelpScaleView5:选择是å¦ä¹Ÿç¼©æ”¾æ‰€æœ‰å¸§ã€‚
en.ro.HelpScaleView7:\Scancel changes.|MThe current scale will not be changed.
de.ro.HelpScaleView7:Klicken mit AUSWAHL um die Skalierung nicht durchzuführen.|MDas Dialogfenster wird geschlossen.|MDie Darstellung der Seite wird unverändert beibehalten.
-fr.ro.HelpScaleView7:\Sannuler les changements.|ML'échelle en cours ne sera pas modifiée.
+fr.ro.HelpScaleView7:\Sannuler les changements.|ML’échelle en cours ne sera pas modifiée.
it.ro.HelpScaleView7:\Sannulla tutte le modifiche.|MLa scala corrente non verrà modificata.
nl.ro.HelpScaleView7:Klik met KIES om dit venster te sluiten zonder dat de gemaakte wijzigingen worden ingesteld.|MDeze schaal wordt niet gewijzigd.
zh_CN.ro.HelpScaleView7:\S撤销更改。|Mä¸ä¼šæ›´æ”¹å½“å‰æ¯”例。
en.ro.HelpScaleView8:\Schange the view to the scale you have chosen.
de.ro.HelpScaleView8:Klicken mit AUSWAHL um die Seite skaliert darzustellen.|MDie Seite wird in der gewählten Vergrößerung angezeigt.
-fr.ro.HelpScaleView8:\Svalider le changement d'échelle.
+fr.ro.HelpScaleView8:\Svalider le changement d’échelle.
it.ro.HelpScaleView8:\Smodifica la visualizzazione della scala prescelta.
nl.ro.HelpScaleView8:Klik met KIES om de gekozen schaal in te stellen op deze weergave en het venster sluiten.
zh_CN.ro.HelpScaleView8:\S将视图更改到您选定的比例。
@@ -6505,28 +6541,28 @@ zh_CN.ro.HelpSearch:使用 \w æœç´¢é¡µé¢å†…的文本。
en.ro.HelpSearch0:Enter the search text. # matches any single character, * matches 0 or more characters.
de.ro.HelpSearch0:Suchtext hier eingeben. # steht für exakt ein beliebiges Zeichen. * steht für 0 oder mehrere Zeichen.
-fr.ro.HelpSearch0:Entrer la chaîne de recherche. # remplace n'importe quel caractère, * correspond à 0 ou plus caractères.
+fr.ro.HelpSearch0:Entrer la chaîne de recherche. # remplace n’importe quel caractère, * correspond à 0 ou plus caractères.
it.ro.HelpSearch0:Inserisci un testo da cercare. # corrispondenza di ogni singolo carattere, * corrispondenza di 0 o più caratteri.
nl.ro.HelpSearch0:Voer in dit veld de zoekreeks in. # staat voor 1 willekeurig letterteken, * staat voor 0 of meerdere lettertekens.
zh_CN.ro.HelpSearch0:输入æœç´¢æ–‡å­—。# 匹é…任何å•ä¸ªå­—符,* åŒ¹é… 0 个或多个字符。
en.ro.HelpSearch1:Choose whether the search should regard upper and lower case characters as different.
de.ro.HelpSearch1:Wählt ob nach Groß- und Kleinschreibung unterschieden werden soll.
-fr.ro.HelpSearch1:Choisir si la recherche accorde de l'importance à la casse (minuscules/MAJUSCULES).
+fr.ro.HelpSearch1:Choisir si la recherche accorde de l’importance à la casse (minuscules/MAJUSCULES).
it.ro.HelpSearch1:Scegli se la ricerca deve considerare i caratteri maiuscoli e minuscoli come diversi.
nl.ro.HelpSearch1:Kies of een zoekopdracht rekening moet houden met hoofd- en kleine letters.
zh_CN.ro.HelpSearch1:选择æœç´¢æ˜¯å¦åº”区分大写和å°å†™å­—æ¯ã€‚
en.ro.HelpSearch2:\Smove to the next match.
de.ro.HelpSearch2:Klicken mit AUSWAHL findet den nächsten Treffer.
-fr.ro.HelpSearch2:\Schercher l'occurence suivante.
+fr.ro.HelpSearch2:\Schercher l’occurence suivante.
it.ro.HelpSearch2:\Spassa alla prossima occorrenza
nl.ro.HelpSearch2:Klik met KIES om naar de volgende gevonden zoekreeks te gaan.
zh_CN.ro.HelpSearch2:\S移动到下一个匹é…ä½ç½®ã€‚
en.ro.HelpSearch3:\Smove to the previous match.
de.ro.HelpSearch3:Klicken mit AUSWAHL sucht rückwärts im Text.
-fr.ro.HelpSearch3:\Schercher l'occurence précédente.
+fr.ro.HelpSearch3:\Schercher l’occurence précédente.
it.ro.HelpSearch3:\Spassa alla precedente occorrenza
nl.ro.HelpSearch3:Klik met KIES om naar de vorige gevonden zoekreeks te gaan.
zh_CN.ro.HelpSearch3:\S移动到上一个匹é…ä½ç½®ã€‚
@@ -6554,7 +6590,7 @@ zh_CN.ro.HelpHotEntry:使用此 \w æ¥è®¾ç½®æ¡ç›®è¯¦ç»†ä¿¡æ¯ã€‚
en.ro.HelpHotlist:\Thotlist management window.
de.ro.HelpHotlist:Das ist das Hotlist Fenster.
-fr.ro.HelpHotlist:\Tla fenêtre de gestion des favoris.
+fr.ro.HelpHotlist:\Tla fenêtre de gestion des marque-pages.
it.ro.HelpHotlist:\Tfinestra di gestione dei segnalibri.
nl.ro.HelpHotlist:Dit venster toont de favorietenlijst.
zh_CN.ro.HelpHotlist:\T常用列表管ç†çª—å£ã€‚
@@ -6624,14 +6660,14 @@ zh_CN.ro.HelpHotToolbar0:\T删除键。|M\S删除当å‰é€‰é¡¹ã€‚
en.ro.HelpHotToolbar1:\Texpand entries button.|M\Sexpand all addresses in the hotlist.|M\Acollapse all addresses in the hotlist.|MExpanded addresses show additional details, such as a visit counter.
de.ro.HelpHotToolbar1:Expandiert Einträge.|MKlicken mit AUSWAHL expandiert alle / alle markierten Einträge.|MKlicken mit SPEZIAL faltet alle / alle markierten Einträge zusammen.|MBei expandierten Einträgen werden zusätzliche Informationen angezeigt.
-fr.ro.HelpHotToolbar1:\Tle bouton de déploiement des entrées.|M\Sdéployer toutes les entrées ou seulement celle de la sélection courante.|M\ARegrouper toutes les entrées ou seulement celles de la sélection courante.|MLes entrées déployées affichent des infos supplémentaires, comme un compteur de visite.
+fr.ro.HelpHotToolbar1:\Tle bouton de développement des marque-pages.|M\Sdévelopper toutes les entrées.|M\Aréduire toutes les entrées.|MLes entrées développées affichent des détails supplémentaires, comme un compteur de visite.
it.ro.HelpHotToolbar1:\Tpulsante espandi voci.|M\Sespande tutti gli indirizzi dei segnalibri.|M\Araggruppa tutti gli indirizzi nei segnalibri.|MEspandi gli indirizzi mostrando dettagli addizionali quali ad esempio il numero delle visite.
nl.ro.HelpHotToolbar1:Dit is de Detail-knop.|MKlik met KIES om alle favorieten uit te klappen.|MKlik met PASAAN om alle favorieten in te klappen.|MUitgeklapte favorieten tonen aanvullende details, zoals een bezoekteller.
zh_CN.ro.HelpHotToolbar1:\T展开æ¡ç›®é”®ã€‚|M\S展开常用列表中的所有网å€ã€‚|M\A折å å¸¸ç”¨åˆ—表中的所有网å€ã€‚|M展开的网å€æ˜¾ç¤ºå…¶ä»–详细信æ¯ï¼Œå¦‚访问计数器。
en.ro.HelpHotToolbar2:\Topen directories button.|M\Sopen all directories in the hotlist.|M\Aclose all directories in the hotlist.
de.ro.HelpHotToolbar2:Öffnet Verzeichnisse.|MKlicken mit AUSWAHL öffnet alle / alle markierten Verzeichnisse.|MKlicken mit SPEZIAL schließt alle / alle markierten Verzeichnisse.
-fr.ro.HelpHotToolbar2:\Tle bouton d'ouverture de répertoires.|M\Souvrir tous les répertoires ou seulement ceux de la sélection courante.|M\Afermer tous les répertoires ou seulement ceux de la sélection courante.
+fr.ro.HelpHotToolbar2:\Tle bouton d’ouverture de répertoires.|M\Souvrir tous les répertoires ou seulement ceux de la sélection courante.|M\Afermer tous les répertoires ou seulement ceux de la sélection courante.
it.ro.HelpHotToolbar2:\Tpulsante apri directory.|M\Sapri tutte le directory dei segnalibri.|M\Achiudi tutte le directory dei segnalibri.
nl.ro.HelpHotToolbar2:Dit is de Open map-knop.|MKlik met KIES om alle mappen in de favorietenlijst te openen.|MKlik met PASAAN om alle mappen in de favorietenlijst te sluiten.
zh_CN.ro.HelpHotToolbar2:\T打开目录键。|M\S打开常用列表中的所有目录。|M\A关闭常用列表中的所有目录。
@@ -6652,7 +6688,7 @@ zh_CN.ro.HelpHotToolbar4:\T创建键。|M\S创建新目录。
en.ro.HelpHotlistMenu0:\Rperform an operation on the hotlist.
de.ro.HelpHotlistMenu0:Untermenü Hotlist. Bearbeiten der Hotlist.
-fr.ro.HelpHotlistMenu0:\Raccomplir une opération sur les favoris.
+fr.ro.HelpHotlistMenu0:\Raccomplir une opération sur les marque-pages.
it.ro.HelpHotlistMenu0:\Resegui un'operazione nei segnalibri.
nl.ro.HelpHotlistMenu0:Verplaats de muispijl naar rechts om een operatie uit te voeren op de favorietenlijst.
zh_CN.ro.HelpHotlistMenu0:\R在常用列表上执行æ“作。
@@ -6680,14 +6716,14 @@ zh_CN.ro.HelpHotlistMenu0-0-1:\R创建新网å€ã€‚
en.ro.HelpHotlistMenu0-1:\Rexport the hotlist as an HTML file.
de.ro.HelpHotlistMenu0-1:Die gesamte Hotlist als HTML Datei speichern.
-fr.ro.HelpHotlistMenu0-1:\Rexporter les favoris en fichier HTML.
+fr.ro.HelpHotlistMenu0-1:\Rexporter les marque-pages en fichier HTML.
it.ro.HelpHotlistMenu0-1:\Resporta i segnalibri come file HTML.
nl.ro.HelpHotlistMenu0-1:Verplaats de muispijl naar rechts om de favorietenlijst te exporteren als een HTML-bestand.
zh_CN.ro.HelpHotlistMenu0-1:\R将常用列表导出为 HTML 文件。
en.ro.HelpHotlistMenu0-2:\Rexpand items within the hotlist.
de.ro.HelpHotlistMenu0-2:Öffnen von Verzeichnissen und Anzeigen von Zusatzinformationen.
-fr.ro.HelpHotlistMenu0-2:\Rdéployer les items dans la liste des favoris.
+fr.ro.HelpHotlistMenu0-2:\Rdévelopper la liste des marque-pages.
it.ro.HelpHotlistMenu0-2:\Respandi gli elementi all'interno dei segnalibri.
nl.ro.HelpHotlistMenu0-2:Verplaats de muispijl naar rechts om bepaalde items in de favorietenlijst uit te klappen.
zh_CN.ro.HelpHotlistMenu0-2:\R展开常用列表中的项。
@@ -6715,7 +6751,7 @@ zh_CN.ro.HelpHotlistMenu0-2-2:\S显示全部æ¡ç›®è¯¦ç»†ä¿¡æ¯ã€‚
en.ro.HelpHotlistMenu0-3:\Rcollapse items within the hotlist.
de.ro.HelpHotlistMenu0-3:Schließen von Verzeichnissen und Ausblenden der Zusatzinformationen.
-fr.ro.HelpHotlistMenu0-3:\Rregrouper les items dans la liste des favoris.
+fr.ro.HelpHotlistMenu0-3:\Rréduire la liste des marque-pages.
it.ro.HelpHotlistMenu0-3:\Rraggruppa gli elementi all'interno dei segnalibri.
nl.ro.HelpHotlistMenu0-3:Verplaats de muispijl naar rechts om bepaalde items in de favorietenlijst in te klappen.
zh_CN.ro.HelpHotlistMenu0-3:\R折å å¸¸ç”¨åˆ—表中的项目。
@@ -6743,21 +6779,21 @@ zh_CN.ro.HelpHotlistMenu0-3-2:\Séšè—所有æ¡ç›®è¯¦ç»†ä¿¡æ¯ã€‚
en.ro.HelpHotlistMenu0-4:\Rcontrol the display of NetSurf's toolbars.
de.ro.HelpHotlistMenu0-4:Knopfleisteneinstellungen vornehmen.
-fr.ro.HelpHotlistMenu0-4:\Rcontroler l'affichage des barres d'outils de Netsurf.
+fr.ro.HelpHotlistMenu0-4:\Rcontroler l’affichage des barres d’outils de Netsurf.
it.ro.HelpHotlistMenu0-4:\Rcontrolla la visualizzazione delle barre strumenti di NetSurf.
nl.ro.HelpHotlistMenu0-4:Verplaats de muispijl naar rechts om de gereedschapbalken aan te passen.
zh_CN.ro.HelpHotlistMenu0-4:\R控制显示 NetSurf 工具æ ã€‚
en.ro.HelpHotlistMenu0-4-0:\Stoggle the display of the toolbar buttons.
de.ro.HelpHotlistMenu0-4-0:Anklicken um die Knopfleiste ein- bzw. auszuschalten.
-fr.ro.HelpHotlistMenu0-4-0:\Sbasculer l'affichage des boutons de la barre d'outils.
+fr.ro.HelpHotlistMenu0-4-0:\Sbasculer l’affichage des boutons de la barre d’outils.
it.ro.HelpHotlistMenu0-4-0:\Salterna la visualizzazione dei pulsanti della barra strumenti.
nl.ro.HelpHotlistMenu0-4-0:Klik met KIES om het tonen van de knoppen van de gereedschapbalk aan of uit te zetten.
zh_CN.ro.HelpHotlistMenu0-4-0:\S切æ¢æ˜¾ç¤ºå·¥å…·æ æŒ‰é’®ã€‚
en.ro.HelpHotlistMenu0-4-1:\Stoggle toolbar edit mode.
de.ro.HelpHotlistMenu0-4-1:Anklicken zum Bearbeiten der Knopfleiste.
-fr.ro.HelpHotlistMenu0-4-1:\Sbasculer le mode d'édition de barre d'outils.
+fr.ro.HelpHotlistMenu0-4-1:\Sbasculer le mode d’édition de barre d’outils.
it.ro.HelpHotlistMenu0-4-1:\Salterna la modalità di modifica della barra strumenti.
nl.ro.HelpHotlistMenu0-4-1:Klik met KIES om de aanpasmodus van de gereedschapbalk in of uit te schakelen. Wanneer ingeschakelt, verschijnt er een balk onder de gereedschapbalk met extra knoppen die van en naar deze balk gesleept kunnen worden om deze aan te passen.
zh_CN.ro.HelpHotlistMenu0-4-1:\S切æ¢å·¥å…·æ ç¼–辑模å¼ã€‚
@@ -6771,7 +6807,7 @@ zh_CN.ro.HelpHotlistMenu1:\R对当å‰é€‰æ‹©æ‰§è¡Œæ“作。
en.ro.HelpHotlistMenu1-0:\Redit the current item.
de.ro.HelpHotlistMenu1-0:Ändern des markierten Elementes in der Hotlist.
-fr.ro.HelpHotlistMenu1-0:\Rééditer l'item en cours.
+fr.ro.HelpHotlistMenu1-0:\Rééditer l’item en cours.
it.ro.HelpHotlistMenu1-0:\Rmodifica l'oggetto corrente.
nl.ro.HelpHotlistMenu1-0:Klik met KIES om de naam van dit item te wijzigen
zh_CN.ro.HelpHotlistMenu1-0:\R编辑当å‰é¡¹ã€‚
@@ -6785,7 +6821,7 @@ zh_CN.ro.HelpHotlistMenu1-1:\Så¯åŠ¨å½“å‰é€‰é¡¹ã€‚
en.ro.HelpHotlistMenu1-2:\Sdelete the current selection from the hotlist.
de.ro.HelpHotlistMenu1-2:Löscht markierte Elemente aus der Hotlist.|MAchtung: Verzeichnisse werden mit allen in ihnen enthaltenen Einträgen gelöscht.
-fr.ro.HelpHotlistMenu1-2:\Ssupprimer la sélection courante de la liste des favoris.
+fr.ro.HelpHotlistMenu1-2:\Ssupprimer la sélection courante des marque-pages.
it.ro.HelpHotlistMenu1-2:\Scancella dai segnalibri la selezione corrente.
nl.ro.HelpHotlistMenu1-2:Klik met KIES om deze selectie uit de favorietenlijst te verwijderen.
zh_CN.ro.HelpHotlistMenu1-2:\S从常用列表中删除当å‰é€‰é¡¹ã€‚
@@ -6799,7 +6835,7 @@ zh_CN.ro.HelpHotlistMenu1-3:\Sé‡ç½®æ‰€é€‰é¡¹çš„统计信æ¯ï¼Œå¦‚访问计数ç­
en.ro.HelpHotlistMenu2:\Sselect all the items in the hotlist.
de.ro.HelpHotlistMenu2:Markiert alle Elemente der Hotlist.
-fr.ro.HelpHotlistMenu2:\Ssélectionner tous les items de la liste des favoris.
+fr.ro.HelpHotlistMenu2:\Ssélectionner tous les marque-pages.
it.ro.HelpHotlistMenu2:\Sseleziona tutti gli elementi dei segnalibri.
nl.ro.HelpHotlistMenu2:Klik met KIES om alle items in de favorietenlijst te selecteren.
zh_CN.ro.HelpHotlistMenu2:\S选择常用列表中的所有项。
@@ -6813,7 +6849,7 @@ zh_CN.ro.HelpHotlistMenu3:\Så–消选择所有选定项。
en.ro.HelpGHistory:\Tglobal history window.
de.ro.HelpGHistory:Das ist das Fenster der globalen History.
-fr.ro.HelpGHistory:\Tla fenêtre d'historique global.
+fr.ro.HelpGHistory:\Tla fenêtre d’historique global.
it.ro.HelpGHistory:\Tfinestra della cronologia globale.
nl.ro.HelpGHistory:Dit venster toont de browsergeschiedenis.
zh_CN.ro.HelpGHistory:\T全局历å²è®°å½•çª—å£ã€‚
@@ -6827,14 +6863,14 @@ zh_CN.ro.HelpGHistoryToolbar0:\T删除键。|M\S删除当å‰é€‰é¡¹ã€‚
en.ro.HelpGHistoryToolbar1:\Texpand entries button.|M\Sexpand all entries in the history.|M\Acollapse all entries in the history.|MExpanded entries show additional details, such as a visit counter.
de.ro.HelpGHistoryToolbar1:Expandiert Einträge.|MAnklicken mit AUSWAHL expandiert alle Adressen.|MAnklicken mit SPEZIAL macht die Expansion aller Adressen rückgängig.|MIn expandierten Adressen werden Zusatzinformationen angezeigt.
-fr.ro.HelpGHistoryToolbar1:\Tle bouton de déploiement des entrées.|M\Sdéployer toutes les adresses des favoris.|M\Aregrouper toutes les adresses des favoris.|MLes adresses déployées apportent des détails supplémentaires, comme un compteur de visites.
+fr.ro.HelpGHistoryToolbar1:\Tle bouton de développement des entrées.|M\Sdévelopper toutes les entrées de l’historique.|M\Aréduire toutes les entrées de l’historique.|MLes adresses développées affichent des détails supplémentaires, comme un compteur de visites.
it.ro.HelpGHistoryToolbar1:\Tpulsante espandi voci.|M\Sespandi tutte le voci nella cronologia.|M\Araggruppa tutte le voci nella cronologia.|ML'espansione delle voci mostra dettagli addizionali quali ad esempio il numero delle visite.
nl.ro.HelpGHistoryToolbar1:Dit is de Detail-knop.|MKlik met KIES om alle items in de broswergeschiedenis uit te klappen.|MKlik met PASAAN om alle items in te klappen.|MUitgeklapte items tonen aanvullende details, zoals een bezoekteller.
zh_CN.ro.HelpGHistoryToolbar1:\T展开æ¡ç›®é”®ã€‚|M\S展开历å²è®°å½•ä¸­çš„所有æ¡ç›®ã€‚|M\A折å åŽ†å²è®°å½•ä¸­çš„所有æ¡ç›®ã€‚|M展开的æ¡ç›®æ˜¾ç¤ºå…¶ä»–详细信æ¯ï¼Œå¦‚访问计数器。
en.ro.HelpGHistoryToolbar2:\Topen sections button.|M\Sopen all sections in the global history.|M\Aclose all sections in the global history.
de.ro.HelpGHistoryToolbar2:Öffnet Verzeichnisse.|MAnklicken mit AUSWAHL öffnet alle Verzeichnisse.|MAnklicken mit SPEZIAL schließt alle geöffneten Verzeichnisse.
-fr.ro.HelpGHistoryToolbar2:\Tle bouton d'ouverture de répertoires.|M\Souvrir tous les répertoires des favoris.|M\Afermer tous les répertoires des favoris.
+fr.ro.HelpGHistoryToolbar2:\Tle bouton d’ouverture des sections.|M\Souvrir toutes les sections de l’historique.|M\Afermer toutes les sections de l’historique.
it.ro.HelpGHistoryToolbar2:\Tpulsante apri sezioni.|M\Sapri tutte le sezioni nella cronologia globale.|M\Achiudi tutte le sezioni nella cronologia globale.
nl.ro.HelpGHistoryToolbar2:Dit is de Open tijdsmappen-knop.|MKlik met KIES om alle tijdsmappen in de browsergeschiedenis te openen.|MKlik met PASAAN om alle tijdsmappen te sluiten.
zh_CN.ro.HelpGHistoryToolbar2:\T打开分区键。|M\S打开全局历å²è®°å½•ä¸­çš„所有分区。|M\A关闭全局历å²è®°å½•ä¸­çš„所有分区。
@@ -6848,21 +6884,21 @@ zh_CN.ro.HelpGHistoryToolbar3:\Tå¯åŠ¨é”®ã€‚|M\Så¯åŠ¨å½“å‰é€‰é¡¹ã€‚
en.ro.HelpGHistoryMenu0:\Rperform an operation on global history.
de.ro.HelpGHistoryMenu0:Die globale History bearbeiten.
-fr.ro.HelpGHistoryMenu0:\Reffectuer une opération sur l'historique global.
+fr.ro.HelpGHistoryMenu0:\Reffectuer une opération sur l’historique global.
it.ro.HelpGHistoryMenu0:\Resegui un'operazione nella cronologia globale.
nl.ro.HelpGHistoryMenu0:Verplaats de muispijl naar rechts om een operatie uit te voeren op de browsergeschiedenis.
zh_CN.ro.HelpGHistoryMenu0:\R对全局历å²è®°å½•æ‰§è¡Œæ“作。
en.ro.HelpGHistoryMenu0-0:\Rexport global history as an HTML file.
de.ro.HelpGHistoryMenu0-0:Speichert die History (global) als HTML Datei.
-fr.ro.HelpGHistoryMenu0-0:\Rexporter l'historique global en fichier HTML.
+fr.ro.HelpGHistoryMenu0-0:\Rexporter l’historique global en fichier HTML.
it.ro.HelpGHistoryMenu0-0:\Resporta la cronologia globale come file HTML.
nl.ro.HelpGHistoryMenu0-0:Verplaats de muispijl naar rechts om de browsergeschiedenis te exporteren als een HTML-bestand.
zh_CN.ro.HelpGHistoryMenu0-0:\R将全局历å²è®°å½•å¯¼å‡ºä¸º HTML 文件。
en.ro.HelpGHistoryMenu0-1:\Rexpand items within global history.
de.ro.HelpGHistoryMenu0-1:Mehr Information anzeigen
-fr.ro.HelpGHistoryMenu0-1:\Rdéployer les items de l'historique global.
+fr.ro.HelpGHistoryMenu0-1:\Rdévelopper les items de l’historique global.
it.ro.HelpGHistoryMenu0-1:\Respandi gli elementi all'interno della cronologia globale.
nl.ro.HelpGHistoryMenu0-1:Verplaats de muispijl naar rechts om bepaalde items in de browsergeschiedenis uit te klappen.
zh_CN.ro.HelpGHistoryMenu0-1:\R展开全局历å²è®°å½•ä¸­çš„项。
@@ -6890,7 +6926,7 @@ zh_CN.ro.HelpGHistoryMenu0-1-2:\S显示全部æ¡ç›®è¯¦ç»†ä¿¡æ¯ã€‚
en.ro.HelpGHistoryMenu0-2:\Rcollapse items within global history.
de.ro.HelpGHistoryMenu0-2:Weniger Information anzeigen
-fr.ro.HelpGHistoryMenu0-2:\Rregrouper les items de l'historique global.
+fr.ro.HelpGHistoryMenu0-2:\Rréduire les entrées de l’historique global.
it.ro.HelpGHistoryMenu0-2:\Rraggruppa gli elementi all'interno della cronologia globale.
nl.ro.HelpGHistoryMenu0-2:Verplaats de muispijl naar rechts om bepaalde items in de browsergeschiedenis in te klappen.
zh_CN.ro.HelpGHistoryMenu0-2:\R折å å…¨å±€åŽ†å²è®°å½•ä¸­çš„项。
@@ -6918,21 +6954,21 @@ zh_CN.ro.HelpGHistoryMenu0-2-2:\Séšè—所有æ¡ç›®è¯¦ç»†ä¿¡æ¯ã€‚
en.ro.HelpGHistoryMenu0-3:\Rcontrol the display of NetSurf's toolbars.
de.ro.HelpGHistoryMenu0-3:Die Iconleiste der globalen History verändern.
-fr.ro.HelpGHistoryMenu0-3:\Rcontroler l'affichage des barre d'outils de NetSurf.
+fr.ro.HelpGHistoryMenu0-3:\Rcontroler l’affichage des barre d’outils de NetSurf.
it.ro.HelpGHistoryMenu0-3:\Rcontrolla la visualizzazione delle barre strumenti di NetSurf.
nl.ro.HelpGHistoryMenu0-3:Verplaats de muispijl naar rechts om de gereedschapbalken aan te passen.
zh_CN.ro.HelpGHistoryMenu0-3:\R控制显示 NetSurf 工具æ ã€‚
en.ro.HelpGHistoryMenu0-3-0:\Stoggle the display of the toolbar buttons.
de.ro.HelpGHistoryMenu0-3-0:Iconleiste an- oder abschalten.
-fr.ro.HelpGHistoryMenu0-3-0:\Sbasculer l'affichage des boutons de la barre d'outils.
+fr.ro.HelpGHistoryMenu0-3-0:\Sbasculer l’affichage des boutons de la barre d’outils.
it.ro.HelpGHistoryMenu0-3-0:\Salterna la visualizzazione dei pulsanti della barra strumenti.
nl.ro.HelpGHistoryMenu0-3-0:Klik met KIES om het tonen van de knoppen op de gereedschapbalk aan of uit te zetten.
zh_CN.ro.HelpGHistoryMenu0-3-0:\S切æ¢æ˜¾ç¤ºå·¥å…·æ æŒ‰é’®ã€‚
en.ro.HelpGHistoryMenu0-3-1:\Stoggle toolbar edit mode.
de.ro.HelpGHistoryMenu0-3-1:Iconleiste bearbeiten.
-fr.ro.HelpGHistoryMenu0-3-1:\Sbasculer le mode d'édition de la barre d'outils.
+fr.ro.HelpGHistoryMenu0-3-1:\Sbasculer le mode d’édition de la barre d’outils.
it.ro.HelpGHistoryMenu0-3-1:\Salterna la modalità di modifica della barra strumenti.
nl.ro.HelpGHistoryMenu0-3-1:Klik met KIES om de aanpasmodus van de gereedschapbalk in of uit te schakelen. Wanneer ingeschakelt, verschijnt er een balk onder de gereedschapbalk met extra knoppen die van en naar deze balk gesleept kunnen worden om deze aan te passen.
zh_CN.ro.HelpGHistoryMenu0-3-1:\S切æ¢å·¥å…·æ ç¼–辑模å¼ã€‚
@@ -6953,7 +6989,7 @@ zh_CN.ro.HelpGHistoryMenu1-0:\Så¯åŠ¨å½“å‰é€‰é¡¹ã€‚
en.ro.HelpGHistoryMenu1-1:\Sdelete the current selection from global history.
de.ro.HelpGHistoryMenu1-1:Entfernt markierte Bereiche.|MAnklicken mit AUSWAHL löscht die vorher markierten Bereiche aus der History.
-fr.ro.HelpGHistoryMenu1-1:\Ssupprimer la sélection courante de l'historique global.
+fr.ro.HelpGHistoryMenu1-1:\Ssupprimer la sélection courante de l’historique global.
it.ro.HelpGHistoryMenu1-1:\Scancella la selezione corrente dalla cronologia globale.
nl.ro.HelpGHistoryMenu1-1:Klik met KIES om deze selectie uit de browsergeschiedenis te verwijderen.
zh_CN.ro.HelpGHistoryMenu1-1:\S从全局历å²è®°å½•ä¸­åˆ é™¤å½“å‰é€‰é¡¹ã€‚
@@ -6967,7 +7003,7 @@ zh_CN.ro.HelpGHistoryMenu1-2:\Sé‡ç½®æ‰€é€‰é¡¹çš„统计信æ¯ï¼Œå¦‚访问计数ç
en.ro.HelpGHistoryMenu2:\Sselect all the items in the history.
de.ro.HelpGHistoryMenu2:Markiert alle Elemente der globalen History.
-fr.ro.HelpGHistoryMenu2:\Ssélectionner tous les items des favoris.
+fr.ro.HelpGHistoryMenu2:\Ssélectionner toutes les entrées de l’historique.
it.ro.HelpGHistoryMenu2:\Sseleziona tutti gli oggetti della cronologia.
nl.ro.HelpGHistoryMenu2:Klik met KIES om alle items in de browsergeschiedenis te selecteren.
zh_CN.ro.HelpGHistoryMenu2:\S选择历å²è®°å½•ä¸­çš„所有项。
@@ -6995,7 +7031,7 @@ zh_CN.ro.HelpCookiesToolbar0:\T删除键。|M\S删除当å‰é€‰é¡¹ã€‚
en.ro.HelpCookiesToolbar1:\Texpand cookies button.|M\Sexpand all cookies in the list.|M\Acollapse all cookies in the list.|MExpanded cookies show additional details.
de.ro.HelpCookiesToolbar1:Dies ist der Schalter zum Expandieren der Einträge.|MKlicken mit AUSWAHL expandiert alle Cookies.|MKlicken mit SPEZIAL versteckt die Zusatzinformationen wieder.|MIn expandierten Cookies werden zusätzliche Informationen angezeigt.
-fr.ro.HelpCookiesToolbar1:\Tdéployer le bouton de cookies.|M\Sdéployer tous les cookies de la liste.|M\Aregrouper tous les cookies de la liste.|MDéployer les cookies permet l'affichage d'informations supplémentaires.
+fr.ro.HelpCookiesToolbar1:\Tbouton de développement des cookies.|M\Sdévelopper tous les cookies de la liste.|M\Aréduire tous les cookies de la liste.|MDévelopper les cookies permet l’affichage de détails supplémentaires.
it.ro.HelpCookiesToolbar1:\Tpulsante espandi cookie.|M\Sespandi tutti i cookie nella lista.|M\Araggruppa tutti i cookie nella lista.|ML'espansione dei cookie serve a mostrare dettagli addizionali.
nl.ro.HelpCookiesToolbar1:Dit is de Detail-knop.|MKlik met KIES om alle cookies uit te klappen.|MKlik met PASAAN om alle cookies in te klappen.|MUitgeklapte cookies tonen aanvullende details,
zh_CN.ro.HelpCookiesToolbar1:\T展开 Cookies 键。|M\S展开列表中的所有 Cookies。|M\A折å åˆ—表中的所有 Cookies。|M展开的 Cookies 显示其他详细信æ¯ã€‚
@@ -7009,14 +7045,14 @@ zh_CN.ro.HelpCookiesToolbar2:\T打开目录键。|M\S打开列表中的所有目
en.ro.HelpCookiesMenu0:\Rperform an operation on the cookie list.
de.ro.HelpCookiesMenu0:Die gesamte Liste bearbeiten.
-fr.ro.HelpCookiesMenu0:\Raccomplir une opération sur la liste de cookies.
+fr.ro.HelpCookiesMenu0:\Raccomplir une opération sur la liste des cookies.
it.ro.HelpCookiesMenu0:\Resegui un'operazione nella lista dei cookie.
nl.ro.HelpCookiesMenu0:Verplaats de muispijl naar rechts om een operatie uit te voeren op de opgeslagen cookies.
zh_CN.ro.HelpCookiesMenu0:\R对 Cookie 列表执行æ“作。
en.ro.HelpCookiesMenu0-0:\Rexpand items within the cookie list.
de.ro.HelpCookiesMenu0-0:Menü zum Expandieren der Einträge der Liste.
-fr.ro.HelpCookiesMenu0-0:\Rdéployer les items dans la liste de cookies.
+fr.ro.HelpCookiesMenu0-0:\Rdévelopper les items dans la liste des cookies.
it.ro.HelpCookiesMenu0-0:\Respandi gli elementi all'interno della lista dei cookie.
nl.ro.HelpCookiesMenu0-0:Verplaats de muispijl naar rechts om bepaalde items in het cookiesbeheervenster uit te klappen.
zh_CN.ro.HelpCookiesMenu0-0:\R展开 Cookie 列表中的项。
@@ -7044,7 +7080,7 @@ zh_CN.ro.HelpCookiesMenu0-0-2:\S显示全部 Cookie 详细信æ¯ã€‚
en.ro.HelpCookiesMenu0-1:\Rcollapse items within the cookie list.
de.ro.HelpCookiesMenu0-1:Menü zum Schließen der Einträge der Liste.
-fr.ro.HelpCookiesMenu0-1:\Rregrouper les items dans la liste de cookies.
+fr.ro.HelpCookiesMenu0-1:\Rregrouper les items dans la liste des cookies.
it.ro.HelpCookiesMenu0-1:\Rragguppa gli elementi all'interno della lista dei cookie.
nl.ro.HelpCookiesMenu0-1:Verplaats de muispijl naar rechts om bepaalde items in het cookiesbeheervenster in te klappen.
zh_CN.ro.HelpCookiesMenu0-1:\RæŠ˜å  Cookie 列表中的项。
@@ -7072,21 +7108,21 @@ zh_CN.ro.HelpCookiesMenu0-1-2:\Séšè—所有 Cookie 详细信æ¯ã€‚
en.ro.HelpCookiesMenu0-2:\Rcontrol the display of NetSurf's toolbars.
de.ro.HelpCookiesMenu0-2:Die Iconleiste verändern.
-fr.ro.HelpCookiesMenu0-2:\Rcontroler l'affichage des barres d'outils de Netsurf.
+fr.ro.HelpCookiesMenu0-2:\Rcontroler l’affichage des barres d’outils de Netsurf.
it.ro.HelpCookiesMenu0-2:\Rcontrolla la visualizzazione delle barre strumenti di NetSurf.
nl.ro.HelpCookiesMenu0-2:Verplaats de muispijl naar rechts om de gereedschapbalken aan te passen.
zh_CN.ro.HelpCookiesMenu0-2:\R控制显示 NetSurf 工具æ ã€‚
en.ro.HelpCookiesMenu0-2-0:\Stoggle the display of the toolbar buttons.
de.ro.HelpCookiesMenu0-2-0:Klicken mit AUSWAHL um die Iconleiste an- oder abzuschalten.
-fr.ro.HelpCookiesMenu0-2-0:\Sbasculer l'affichage des boutons de la barre d'outils.
+fr.ro.HelpCookiesMenu0-2-0:\Sbasculer l’affichage des boutons de la barre d’outils.
it.ro.HelpCookiesMenu0-2-0:\Salterna la visualizzazione dei pulsanti della barra strumenti.
nl.ro.HelpCookiesMenu0-2-0:Klik met KIES om het tonen van de knoppen op de gereedschapbalk aan of uit te zetten.
zh_CN.ro.HelpCookiesMenu0-2-0:\S切æ¢æ˜¾ç¤ºå·¥å…·æ æŒ‰é’®ã€‚
en.ro.HelpCookiesMenu0-2-1:\Stoggle toolbar edit mode.
de.ro.HelpCookiesMenu0-2-1:Klicken mit AUSWAHL um die Iconleiste zu bearbeiten.
-fr.ro.HelpCookiesMenu0-2-1:\Sbasculer le mode d'édition de la barre d'outils.
+fr.ro.HelpCookiesMenu0-2-1:\Sbasculer le mode d’édition de la barre d’outils.
it.ro.HelpCookiesMenu0-2-1:\Salterna la modalità di modifica della barra strumenti.
nl.ro.HelpCookiesMenu0-2-1:Klik met KIES om de aanpasmodus van de gereedschapbalk in of uit te schakelen. Wanneer ingeschakelt, verschijnt er een balk onder de gereedschapbalk met extra knoppen die van en naar deze balk gesleept kunnen worden om deze aan te passen.
zh_CN.ro.HelpCookiesMenu0-2-1:\S切æ¢å·¥å…·æ ç¼–辑模å¼ã€‚
@@ -7107,7 +7143,7 @@ zh_CN.ro.HelpCookiesMenu1-0:\S删除所有选定的 Cookies。
en.ro.HelpCookiesMenu2:\Sselect all the items in the cookie list.
de.ro.HelpCookiesMenu2:Klicken mit AUSWAHL markiert alle Cookies als gewählt.
-fr.ro.HelpCookiesMenu2:\Ssélectionner tous les items dans la liste de cookies.
+fr.ro.HelpCookiesMenu2:\Ssélectionner tous les items dans la liste des cookies.
it.ro.HelpCookiesMenu2:\Sseleziona tutti gli oggetti dalla lista dei cookie.
nl.ro.HelpCookiesMenu2:Klik met KIES om alle cookies in het cookiesbeheervenster te selecteren.
zh_CN.ro.HelpCookiesMenu2:\S选择 Cookie 列表中的所有项。
@@ -7121,7 +7157,7 @@ zh_CN.ro.HelpCookiesMenu3:\Så–消选择所有选定项。
en.ro.HelpAppInfo:\TNetSurf information \w.|MSee the about page for the contributor list and credits.
de.ro.HelpAppInfo:Das ist das Info-Fenster zu NetSurf.|MGenauere Angaben zu den Autoren, Grafikern, Übersetzern, genutzten Libraries etc. gibt es bei "Über NetSurf" im Untermenü Hilfe eines Browserfensters.
-fr.ro.HelpAppInfo:\Tla \w d'information de NetSurf.|MVoir la page "À propos de" pour une liste des contributeurs et les remerciements.
+fr.ro.HelpAppInfo:\Tla \w d’information de NetSurf.|MVoir la page "À propos de" pour une liste des contributeurs et les remerciements.
it.ro.HelpAppInfo:\TInformazioni su NetSurf \w.|MMostra la pagina delle informazioni e la lista dei ringraziamenti.
nl.ro.HelpAppInfo:Dit is het NetSurf-informatievenster.|MOpen de Bijdragen-pagina voor de lijst met degenen die bijdroegen aan het NetSurf-project.
zh_CN.ro.HelpAppInfo:\TNetSurf ä¿¡æ¯ \w。|M相关贡献者列表和制作人员åå•ï¼Œè¯·å‚阅关于页é¢ã€‚
@@ -7164,21 +7200,21 @@ zh_CN.ro.HelpConfigure3:字体é…置工具
en.ro.HelpConfigure4:Home page configuration tool
de.ro.HelpConfigure4:Homepage einstellen
-fr.ro.HelpConfigure4:Outil de configuration de la page d'accueil
+fr.ro.HelpConfigure4:Outil de configuration de la page d’accueil
it.ro.HelpConfigure4:Strumento di configurazione della pagina iniziale
nl.ro.HelpConfigure4:Begin-/Startpagina-instellingen.|MKlik op dit symbool om de begin-/startpagin in te stellen.
zh_CN.ro.HelpConfigure4:主页é…置工具
en.ro.HelpConfigure5:Image configuration tool
de.ro.HelpConfigure5:Bilderdarstellung konfigurieren
-fr.ro.HelpConfigure5:Outil de configuration d'image
+fr.ro.HelpConfigure5:Outil de configuration d’image
it.ro.HelpConfigure5:Strumento di configurazione delle immagini
nl.ro.HelpConfigure5:Afbeeldingen-instellingen.|MKlik op dit symbool om de afhandelinginstellingen van de afbeeldingen aan te passen.
zh_CN.ro.HelpConfigure5:图åƒé…置工具
en.ro.HelpConfigure6:Interface configuration tool
de.ro.HelpConfigure6:Programmverhalten für besondere Situationen einstellen
-fr.ro.HelpConfigure6:Outil de configuration d'interface
+fr.ro.HelpConfigure6:Outil de configuration d’interface
it.ro.HelpConfigure6:Strumento di configurazione dell'interfaccia
nl.ro.HelpConfigure6:Interface-instellingen.|MKlik op dit symbool om de instellingen van de gebruikersinterface aan te passen.
zh_CN.ro.HelpConfigure6:ç•Œé¢é…置工具
@@ -7318,7 +7354,7 @@ zh_CN.ro.HelpConnectConfig4:\S选择代ç†æœåŠ¡å™¨ç±»åž‹ã€‚
en.ro.HelpConnectConfig6:You can enter the proxy's host name here.
de.ro.HelpConnectConfig6:Hier kann der Hostname des Proxys eingegeben werden.
-fr.ro.HelpConnectConfig6:Vous pouvez entrer ici le nom d'hôte du proxy.
+fr.ro.HelpConnectConfig6:Vous pouvez entrer ici le nom d’hôte du proxy.
it.ro.HelpConnectConfig6:Inserisci qui il nome host del proxy.
nl.ro.HelpConnectConfig6:Voer hier de hostnaam in voor de proxy-server.
zh_CN.ro.HelpConnectConfig6:您å¯ä»¥åœ¨æ­¤å¤„输入代ç†æœåŠ¡å™¨çš„主机å。
@@ -7332,7 +7368,7 @@ zh_CN.ro.HelpConnectConfig8:您å¯ä»¥åœ¨æ­¤å¤„输入代ç†æœåŠ¡å™¨çš„端å£å·ã
en.ro.HelpConnectConfig10:You can enter a username for proxies that require authentication here.
de.ro.HelpConnectConfig10:Hier kann ein Username eingegeben werden, wenn der Proxy das erfordert.
-fr.ro.HelpConnectConfig10:Vous pouvez entrer ici un nom d'utilisateur pour les proxies nécessitant une authentification.
+fr.ro.HelpConnectConfig10:Vous pouvez entrer ici un nom d’utilisateur pour les proxies nécessitant une authentification.
it.ro.HelpConnectConfig10:Inserisci un nome utente per i proxy che richiedono autentificazione.
nl.ro.HelpConnectConfig10:Voer hier een gebruikersnaam in voor proxies die authenticifering vereisen.
zh_CN.ro.HelpConnectConfig10:您å¯ä»¥åœ¨æ­¤å¤„输入需è¦èº«ä»½éªŒè¯çš„代ç†æœåŠ¡å™¨ç”¨æˆ·å。
@@ -7444,17 +7480,17 @@ zh_CN.ro.HelpContentConfig2:这表示 NetSurf 是å¦ä¼šå°è¯•å±è”½ç½‘页上的å
en.ro.HelpContentConfig3:This indicates whether NetSurf will stop web sites from automatically opening new windows on your desktop.
de.ro.HelpContentConfig3:Stellt ein, ob NetSurf das automatische Öffnen neuer Fenster auf dem Desktop unterbinden soll.
-fr.ro.HelpContentConfig3:Ceci indique si Netsurf doit empêcher les sites web d'ouvrir automatiquement de nouvelles fenêtres sur votre Bureau.
+fr.ro.HelpContentConfig3:Ceci indique si Netsurf doit empêcher les sites web d’ouvrir automatiquement de nouvelles fenêtres sur votre Bureau.
it.ro.HelpContentConfig3:Indica se NetSurf impedirà ai siti Web di aprire automaticamente nuove finestre sul desktop.
nl.ro.HelpContentConfig3:Deze optie geeft aan of NetSurf websites, die automatisch nieuwe pagina's proberen te openen blokkeerd.
zh_CN.ro.HelpContentConfig3:这表示NetSurf是å¦ä¼šé˜»æ­¢ç½‘站在您的桌é¢ä¸Šè‡ªåŠ¨æ‰“开新窗å£ã€‚
-en.ro.HelpContentConfig4:This indicates whether NetSurf will allow external plug-ins to handle additional types of content, such as Flash.
-de.ro.HelpContentConfig4:Stellt ein, ob externe Pluginroutinen genutzt werden dürfen, um Zusatzinhalte darzustellen (z.B. Flash).
-fr.ro.HelpContentConfig4:Ceci indique si Netsurf doit autoriser les plug-ins externes à manipuler des types de contenu supplémentaires, comme le Flash.
-it.ro.HelpContentConfig4:Indica se NetSurf consentirà ai plug-in esterni di gestire tipi di contenuto aggiuntivi come il Flash.
-nl.ro.HelpContentConfig4:Deze optie geeft aan of NetSurf externe plug-ins, voor aanvullende soorten inhoud zoals Flash toestaat.
-zh_CN.ro.HelpContentConfig4:这表示 NetSurf 是å¦å…许外部æ’件æ¥å¤„ç†å…¶ä»–类型的内容,如 Flash æ’件。
+en.ro.HelpContentConfig4:This indicates whether NetSurf will allow web pages to style their content with CSS.
+de.ro.HelpContentConfig4:This indicates whether NetSurf will allow web pages to style their content with CSS.
+fr.ro.HelpContentConfig4:This indicates whether NetSurf will allow web pages to style their content with CSS.
+it.ro.HelpContentConfig4:This indicates whether NetSurf will allow web pages to style their content with CSS.
+nl.ro.HelpContentConfig4:This indicates whether NetSurf will allow web pages to style their content with CSS.
+zh_CN.ro.HelpContentConfig4:This indicates whether NetSurf will allow web pages to style their content with CSS.
en.ro.HelpContentConfig7:This indicates whether NetSurf will allow links to open in new windows.
de.ro.HelpContentConfig7:Stellt ein, ob NetSurf erlaubt, daß Links beim Aufruf neue Browserfenster öffnen dürfen.
@@ -7500,7 +7536,7 @@ zh_CN.ro.HelpFontConfig:\T字体é…ç½® \w
en.ro.HelpFontConfig3:\Tcurrently selected sans-serif font.|MNetSurf will use this font wherever a web page specifies a sans-serif typeface.
de.ro.HelpFontConfig3:Das ist die aktuell gewählte Schriftart für Sans-serif.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Sans-serif vorgegeben wird.
-fr.ro.HelpFontConfig3:\Tla fonte sans-sérif actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu'une page web spécifiera une police sans-sérif.
+fr.ro.HelpFontConfig3:\Tla fonte sans-sérif actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu’une page web spécifiera une police sans-sérif.
it.ro.HelpFontConfig3:\Tfont sans-serif correntemente selezionato.|MNetSurf utilizzerà questo font ovunque una pagina Web specifichi un carattere tipografico di tipo sans-serif.
nl.ro.HelpFontConfig3:Dit is momenteel het geselecteerde schreefloos lettertype.|MNetSurf gebruikt dit lettertype wanneer een webpagina om deze tekststijl vraagt.
zh_CN.ro.HelpFontConfig3:\T当å‰é€‰å®šçš„无衬线字体。|M NetSurf 将在网页指定 无衬线字体的任何地方使用此字体。
@@ -7514,7 +7550,7 @@ zh_CN.ro.HelpFontConfig4:\S选择一个无衬线字体。
en.ro.HelpFontConfig6:\Tcurrently selected serif font.|MNetSurf will use this font wherever a web page specifies a serif typeface.
de.ro.HelpFontConfig6:Das ist die aktuell gewählte Schriftart für Serif.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Serif vorgegeben wird.
-fr.ro.HelpFontConfig6:\Tla fonte sérif actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu'une page web spécifiera une police sérif.
+fr.ro.HelpFontConfig6:\Tla fonte sérif actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu’une page web spécifiera une police sérif.
it.ro.HelpFontConfig6:\Tfont serif correntemente selezionato.|MNetSurf utilizzerà questo font ovunque una pagina Web specifichi un carattere tipografico di tipo serif.
nl.ro.HelpFontConfig6:Dit is momenteel het geselecteerde lettertype met schreef.|MNetSurf gebruikt dit lettertype wanneer een webpagina om deze tekststijl vraagt.
zh_CN.ro.HelpFontConfig6:\T当å‰é€‰å®šçš„衬线字体。|M NetSurf 将在网页指定衬线字体的任何地方使用此字体。
@@ -7528,7 +7564,7 @@ zh_CN.ro.HelpFontConfig7:\S选择一个无衬线字体。
en.ro.HelpFontConfig9:\Tcurrently selected monospace font.|MNetSurf will use this font wherever a web page specifies a monospace typeface.
de.ro.HelpFontConfig9:Das ist die aktuell gewählte Schriftart für Monospace.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Monospace vorgegeben wird.
-fr.ro.HelpFontConfig9:\Tla fonte sérif actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu'une page web spécifiera une police monospace.
+fr.ro.HelpFontConfig9:\Tla fonte sérif actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu’une page web spécifiera une police monospace.
it.ro.HelpFontConfig9:\Tfont monospaziato correntemente selezionato.|MNetSurf utilizzerà questo font ovunque una pagina Web specifichi un carattere tipografico di tipo monospaziato.
nl.ro.HelpFontConfig9:Dit is momenteel het geselecteerde monospace-lettertype.|MNetSurf gebruikt dit lettertype wanneer een webpagina om deze tekststijl vraagt.
zh_CN.ro.HelpFontConfig9:\T当å‰é€‰å®šçš„等宽字体。|M NetSurf 将在网页指定等宽字体的任何地方使用此字体。
@@ -7542,7 +7578,7 @@ zh_CN.ro.HelpFontConfig10:\S选择一个等宽字体。
en.ro.HelpFontConfig12:\Tcurrently selected cursive font.|MNetSurf will use this font wherever a web page specifies a cursive typeface.
de.ro.HelpFontConfig12:Das ist die aktuell gewählte Schriftart für Kursiv.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Kursiv vorgegeben wird.
-fr.ro.HelpFontConfig12:\Tla fonte cursive actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu'une page web spécifiera une police cursive.
+fr.ro.HelpFontConfig12:\Tla fonte cursive actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu’une page web spécifiera une police cursive.
it.ro.HelpFontConfig12:\Tfont corsivo correntemente selezionato.|MNetSurf utilizzerà questo font ovunque una pagina Web specifichi un carattere tipografico di tipo corsivo.
nl.ro.HelpFontConfig12:Dit is momenteel het geselecteerde cursieve lettertype.|MNetSurf gebruikt dit lettertype wanneer een webpagina om deze tekststijl vraagt.
zh_CN.ro.HelpFontConfig12:\T当å‰é€‰å®šçš„手写字体。|M NetSurf 将在网页指定手写字体的任何地方使用此字体。
@@ -7556,7 +7592,7 @@ zh_CN.ro.HelpFontConfig13:\S选择一个手写字体。
en.ro.HelpFontConfig15:\Tcurrently selected fantasy font.|MNetSurf will use this font wherever a web page specifies a fantasy typeface.
de.ro.HelpFontConfig15:Das ist die aktuell gewählte Schriftart für Fantasy.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite ein Schriftbild in Fantasy vorgegeben wird.
-fr.ro.HelpFontConfig15:\Tla fonte fantaisie actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu'une page web spécifiera une police fantaisie.
+fr.ro.HelpFontConfig15:\Tla fonte fantaisie actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu’une page web spécifiera une police fantaisie.
it.ro.HelpFontConfig15:\Tfont fantasia correntemente selezionato.|MNetSurf utilizzerà questo font ovunque una pagina Web specifichi un carattere tipografico di tipo fantasia.
nl.ro.HelpFontConfig15:Dit is momenteel het geselecteerde fantasie-lettertype.|MNetSurf gebruikt dit lettertype wanneer een webpagina om deze tekststijl vraagt.
zh_CN.ro.HelpFontConfig15:\T当å‰é€‰å®šçš„ Fantasy 字体。|M NetSurf 将在网页指定 Fantasy 字体的任何地方使用此字体。
@@ -7570,7 +7606,7 @@ zh_CN.ro.HelpFontConfig16:\S选择一个 Fantasy 字体。
en.ro.HelpFontConfig18:\Tcurrently selected font family.|MNetSurf will use this wherever a web page does not specify a typeface.
de.ro.HelpFontConfig18:Das ist die aktuell gewählte Schriftart für die Standardtextanzeige.|MNetSurf wird diese Schriftart überall dort verwenden, wo von der Webseite KEIN bestimmtes Schriftbild vorgegeben wird.
-fr.ro.HelpFontConfig18:\Tla famille de fontes actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu'une page web ne spécifiera aucune police.
+fr.ro.HelpFontConfig18:\Tla famille de fontes actuellement sélectionnée.|MNetsurf utilisera cette fonte à chaque fois qu’une page web ne spécifiera aucune police.
it.ro.HelpFontConfig18:\Tfamiglia font correntemente selezionata.|MNetSurf lo utilizzerà laddove una pagina Web non specifichi un carattere tipografico.
nl.ro.HelpFontConfig18:Dit is momenteel het geselecteerde lettertypesoort.|MNetSurf gebruikt dit lettertype als een webpagina geen lettertypesoort specificeerd.
zh_CN.ro.HelpFontConfig18:\T当å‰é€‰å®šçš„字体家æ—。|M NetSurf 将在网页未指定字体的地方使用此字体。
@@ -7584,7 +7620,7 @@ zh_CN.ro.HelpFontConfig19:\S选择默认字体家æ—。
en.ro.HelpFontConfig23:You can enter a default font size here.|MNetSurf will use this wherever a web page does not specify a font size of its own.
de.ro.HelpFontConfig23:Hier kann eine Standarfontgröße gewählt werden.|MNetSurf wird diese Größe immer dann verwenden, wenn von der Webseite keine eigene Schriftgröße eingestellt wird.
-fr.ro.HelpFontConfig23:Vous pouvez entrer ici une taille par défaut.|MNetsurf l'utilisera chaque fois qu'une page web ne spécifiera pas de taille de fonte.
+fr.ro.HelpFontConfig23:Vous pouvez entrer ici une taille par défaut.|MNetsurf l’utilisera chaque fois qu’une page web ne spécifiera pas de taille de fonte.
it.ro.HelpFontConfig23:Puoi inserire qui la dimensione predefinita del carattere.|MNetSurf lo utilizzerà laddove una pagina Web non specifichi una propria dimensione del carattere.
nl.ro.HelpFontConfig23:In dit veld kan een standaardlettergrootte ingevoerd worden.|MNetSurf gebruikt deze lettergrootte waar een webpagina niet van zichzelf de grootte specificeerd.
zh_CN.ro.HelpFontConfig23:您å¯ä»¥åœ¨æ­¤è¾“入默认字体大å°ã€‚|MNetSurf 将在网页未指定自己的字体大å°æ—¶ä½¿ç”¨æ­¤å¤§å°ã€‚
@@ -7605,7 +7641,7 @@ zh_CN.ro.HelpFontConfig25:\Sæ高默认字体大å°ã€‚
en.ro.HelpFontConfig28:You can enter a minimum font size here.|MNetSurf will not allow web pages to display smaller text than this.
de.ro.HelpFontConfig28:Hier kann eine minimale Schriftgröße eingestellt werden.|MNetSurf wird keine Darstellung von noch kleineren Schriften zulassen.
-fr.ro.HelpFontConfig28:Vous pouvez entrer ici une taille de fonte minimum.|MNetsurf ne permettra pas aux pages web d'afficher un texte ayant une taille plus petite.
+fr.ro.HelpFontConfig28:Vous pouvez entrer ici une taille de fonte minimum.|MNetsurf ne permettra pas aux pages web d’afficher un texte ayant une taille plus petite.
it.ro.HelpFontConfig28:Puoi inserire qui la dimensione minima del carattere.|MNetSurf non consentirà alle pagine Web di visualizzare un testo più piccolo di questo.
nl.ro.HelpFontConfig28:In dit veld kan een minimum lettertypegrootte ingevoerd worden.|MNetSurf staat webpagina's dan niet toe om kleinere lettertypes te tonen.
zh_CN.ro.HelpFontConfig28:您å¯ä»¥åœ¨æ­¤å¤„输入最å°å­—体大å°ã€‚|MNetSurf ä¸å…许网页显示å°äºŽæ­¤å¤§å°çš„文本。
@@ -7647,21 +7683,21 @@ zh_CN.ro.HelpFontConfig34:\Sä¿å­˜è¿™äº›è®¾ç½®å¹¶å…³é—­ \w。|M\A在ä¸å…³é—­ \w
en.ro.HelpHomeConfig:\Thome page configuration \w
de.ro.HelpHomeConfig:Homepage Konfiguration
-fr.ro.HelpHomeConfig:\Tla fenêtre de configuration de Page d'accueil
+fr.ro.HelpHomeConfig:\Tla fenêtre de configuration de Page d’accueil
it.ro.HelpHomeConfig:\Tconfigurazione della pagina iniziale \w
nl.ro.HelpHomeConfig:De begin/startpagina kan in dit venster gewijzigd worden.
zh_CN.ro.HelpHomeConfig:\T主页é…ç½® \w
en.ro.HelpHomeConfig3:You can enter a default home page address here.
de.ro.HelpHomeConfig3:Hier kann die Webadresse der Homepage eingegeben werden.
-fr.ro.HelpHomeConfig3:Vous pouvez entrer ici une page d'accueil par défaut.
+fr.ro.HelpHomeConfig3:Vous pouvez entrer ici une page d’accueil par défaut.
it.ro.HelpHomeConfig3:Puoi inserire qui l'indirizzo della pagina iniziale.
nl.ro.HelpHomeConfig3:Voer hier een standaard begin-/startpagina-adres in.
zh_CN.ro.HelpHomeConfig3:您å¯ä»¥åœ¨æ­¤å¤„输入默认主页网å€ã€‚
en.ro.HelpHomeConfig4:\Sselect a recently typed URL.|MThese addresses have recently been typed into a NetSurf browser \w's URL bar.
de.ro.HelpHomeConfig4:Klicken mit AUSWAHL zur schnellen Auswahl einer Adresse.|MDie angezeigten Adressen wurden in letzter Zeit in die Adressleiste eines Browserfensters eingegeben.
-fr.ro.HelpHomeConfig4:\Ssélectionner une URL récemment tapée.|MCes adresses ont été récemment tapées dans la barre d'URL du navigateur Netsurf.
+fr.ro.HelpHomeConfig4:\Ssélectionner une URL récemment tapée.|MCes adresses ont été récemment tapées dans la barre d’URL du navigateur Netsurf.
it.ro.HelpHomeConfig4:\Sseleziona un URL digitato di recente.|MQuesti indirizzi sono stati digitati recentemente nella barra indirizzi del browser NetSurf.
nl.ro.HelpHomeConfig4:Klik met KIES om een recent bezochte pagina te selecteren als startpagina.
zh_CN.ro.HelpHomeConfig4:\S选择最近键入的地å€ã€‚|M这些地å€æœ€è¿‘已键入 NetSurf æµè§ˆå™¨ \w 的地å€æ ã€‚
@@ -7675,14 +7711,14 @@ zh_CN.ro.HelpHomeConfig5:这表示 NetSurf 是å¦åœ¨å¯åŠ¨æ—¶æ‰“å¼€æµè§ˆå™¨ \wã
en.ro.HelpHomeConfig6:\Sreset the Home page options back to their default values.
de.ro.HelpHomeConfig6:Stellt die Standardeinstellungen wieder her.
-fr.ro.HelpHomeConfig6:\Srevenir aux valeurs par défaut des options de Page d'accueil.
+fr.ro.HelpHomeConfig6:\Srevenir aux valeurs par défaut des options de Page d’accueil.
it.ro.HelpHomeConfig6:\Sresetta le opzioni della pagina iniziale ai valori predefiniti.
nl.ro.HelpHomeConfig6:Klik met KIES om de startpagina-instellingen in dit venster terug te zetten op de standaardwaarden.
zh_CN.ro.HelpHomeConfig6:\S将主页选项é‡ç½®ä¸ºé»˜è®¤å€¼ã€‚
en.ro.HelpHomeConfig7:\Sclose this \w without saving changes.|M\Areturn the home options to the last saved configuration.
de.ro.HelpHomeConfig7:Klicken mit AUSWAHL schließt das Fenster ohne die Änderungen zu speichern.|MKlicken mit SPEZIAL stellt die zuletzt abgespeicherten Einstellungen wieder her.
-fr.ro.HelpHomeConfig7:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options de Page d'accueil précédemment sauvegardées.
+fr.ro.HelpHomeConfig7:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options de Page d’accueil précédemment sauvegardées.
it.ro.HelpHomeConfig7:\Schiudi questa finestra senza salvare le modifiche.|M\Aripristina le opzioni della home all'ultima configurazione salvata.
nl.ro.HelpHomeConfig7:Klik met KIES om dit venster te sluiten zonder dat de gemaakte wijzigingen worden bewaard.|MKlik met PASAAN om de gemaakte wijzigingen ongedaan te maken; het venster wordt hierbij niet gesloten.
zh_CN.ro.HelpHomeConfig7:\S关闭此 \w 而ä¸ä¿å­˜æ›´æ”¹ã€‚|M\A将主页选项æ¢å¤åˆ°ä¸Šæ¬¡ä¿å­˜çš„é…置。
@@ -7696,63 +7732,63 @@ zh_CN.ro.HelpHomeConfig8:\Sä¿å­˜è¿™äº›è®¾ç½®å¹¶å…³é—­ \w。|M\A在ä¸å…³é—­ \w
en.ro.HelpImageConfig:\Timage configuration \w
de.ro.HelpImageConfig:Das ist das Fenster zur Konfiguration der Bilddarstellungsoptionen.
-fr.ro.HelpImageConfig:\Tla fenêtre de configuration d'Image
+fr.ro.HelpImageConfig:\Tla fenêtre de configuration d’Image
it.ro.HelpImageConfig:\Tconfigurazione della immagini \w
nl.ro.HelpImageConfig:De verwerking van afbeeldingen kan in dit venster gewijzigd worden.
zh_CN.ro.HelpImageConfig:\T图åƒé…ç½® \w
en.ro.HelpImageConfig3:\Tcurrently selected foreground image quality.
de.ro.HelpImageConfig3:Das ist die aktuell gewählte Qualität für die Darstellung der Vordergrundbilder.
-fr.ro.HelpImageConfig3:\Tla qualité d'image de premier plan sélectionnée actuellement.
+fr.ro.HelpImageConfig3:\Tla qualité d’image de premier plan sélectionnée actuellement.
it.ro.HelpImageConfig3:\Tqualità dell'immagine in primo piano correntemente selezionata.
nl.ro.HelpImageConfig3:Dit is momenteel de geselecteerde voorgrondafbeeldingskwaliteit.
zh_CN.ro.HelpImageConfig3:\T当å‰é€‰æ‹©çš„å‰æ™¯å›¾åƒè´¨é‡ã€‚
en.ro.HelpImageConfig4:\Sselect a foreground image quality setting.|MError diffused provides the highest quality.
de.ro.HelpImageConfig4:Klicken mit AUSWAHL zur Wahl der Anzeigequalität für Vordergrundbilder.|MError-Diffusion bietet die beste Qualität.
-fr.ro.HelpImageConfig4:\Schoisir un réglage de qualité pour les images de premier plan.|MAvec diffusion d'erreur correspond à la meilleure qualité.
+fr.ro.HelpImageConfig4:\Schoisir un réglage de qualité pour les images de premier plan.|MAvec diffusion d’erreur correspond à la meilleure qualité.
it.ro.HelpImageConfig4:\Sseleziona una impostazione per la qualità dell'immagine in primo piano.|ML'errore diffuso fornisce la qualità migliore.
nl.ro.HelpImageConfig4:Klik met KIES om een bepaalde voorgrondafbeeldingskwaliteit te selecteren.|MFoutdiffusie biedt de hoogstmogelijke kwaliteit.
zh_CN.ro.HelpImageConfig4:\S选择å‰æ™¯å›¾åƒè´¨é‡è®¾ç½®ã€‚|M误差扩散方法å¯æ供最高质é‡ã€‚
en.ro.HelpImageConfig6:\Tcurrently selected background image quality.
de.ro.HelpImageConfig6:Das ist die aktuell gewählte Qualität für die Darstellung der Hintergrundbilder.
-fr.ro.HelpImageConfig6:\Tla qualité d'image de fond sélectionnée actuellement.
+fr.ro.HelpImageConfig6:\Tla qualité d’image de fond sélectionnée actuellement.
it.ro.HelpImageConfig6:\Tqualità dell'immagine di sfondo correntemente selezionata.
nl.ro.HelpImageConfig6:Dit is momenteel de geselecteerde achtergrondafbeeldingskwaliteit.
zh_CN.ro.HelpImageConfig6:\T当å‰é€‰æ‹©çš„背景图åƒè´¨é‡ã€‚
en.ro.HelpImageConfig7:\Sselect a background image quality setting.|MError diffused provides the highest quality.
de.ro.HelpImageConfig7:Klicken mit AUSWAHL zur Wahl der Anzeigequalität für Hintergrundbilder.|MError-Diffusion bietet die beste Qualität.
-fr.ro.HelpImageConfig7:\Schoisir un réglage de qualité pour les images de fond.|MAvec diffusion d'erreur correspond à la meilleure qualité.
+fr.ro.HelpImageConfig7:\Schoisir un réglage de qualité pour les images de fond.|MAvec diffusion d’erreur correspond à la meilleure qualité.
it.ro.HelpImageConfig7:\Sseleziona una impostazione per la qualità dell'immagine di sfondo.|ML'errore diffuso fornisce la qualità migliore.
nl.ro.HelpImageConfig7:Klik met KIES om een bepaalde achtergrondafbeeldingskwaliteit te selecteren.|MFoutdiffusie biedt de hoogstmogelijke kwaliteit.
zh_CN.ro.HelpImageConfig7:\S选择背景图åƒè´¨é‡è®¾ç½®ã€‚|M误差扩散方法å¯æ供最高质é‡ã€‚
en.ro.HelpImageConfig8:\Timage quality preview image.|MThe optimum results are achived with both foreground and background image quality set to error diffused.|MThe user guide provides more information on the implications of these options.
de.ro.HelpImageConfig8:Das ist das Vorschaubild.|MDie qualitativ besten Anzeigeresultate werden erzielt, wenn Vorder- und Hintergrundbilder per Error-Diffusion dargestellt werden.|MGenauere Informationen gibt es in der Dokumentation.
-fr.ro.HelpImageConfig8:\Timage de prévisualisation de qualité d'image.|MLes résultats optimaux sont obtenus avec des images de premier plan et de fond avec diffusion d'erreur.|MLe guide utilisateur fournit plus d'informations quant aux implications de cette option.
+fr.ro.HelpImageConfig8:\Timage de prévisualisation de qualité d’image.|MLes résultats optimaux sont obtenus avec des images de premier plan et de fond avec diffusion d’erreur.|MLe guide utilisateur fournit plus d’informations quant aux implications de cette option.
it.ro.HelpImageConfig8:\TQualità immagine di anteprima.|MI risultati ottimali vengono raggiunti impostando la qualità dell'immagine in primo piano e di sfondo su errore diffuso.|MLa guida in linea fornisce ulteriori informazioni sulle implicazioni di queste opzioni.
nl.ro.HelpImageConfig8:Dit is een kwaliteitsvoorbeeldafbeelding.|MSelecteer foutdiffusie voor zowel voorgrond- als achtergrond voor de beste kwaliteit.|MDe gebruikershandleiding geeft meer informatie over de implicaties van deze mogelijkheden.
zh_CN.ro.HelpImageConfig8:\T图åƒè´¨é‡é¢„览图åƒã€‚|M在å‰æ™¯å’ŒèƒŒæ™¯å›¾åƒè´¨é‡å‡è®¾ç½®ä¸ºè¯¯å·®æ‰©æ•£çš„情况下å¯èŽ·å¾—最佳效果。|M用户指å—æ供了有关这些选项å«ä¹‰çš„详细信æ¯ã€‚
en.ro.HelpImageConfig12:You can enter the minimum time between animation frames here.|MA very low setting can cause your computer to slow down when rapid animations are displayed and is not suitable for slow computers.
de.ro.HelpImageConfig12:Hier kann die minimale Zeitverzögerung zwischen den Frames einer Animation vorgegeben werden.|MSehr niedrige Werte können bei raschen Animationen hohe Rechenleistungen erfordern und sind darum nicht geeignet für langsamere Computer.
-fr.ro.HelpImageConfig12:Vous pouvez entrer ici le temps minimum entre deux images d'animation.|MUn réglage trop bas peut ralentir les animations affichées et ne convient pas à des ordinateurs lents.
+fr.ro.HelpImageConfig12:Vous pouvez entrer ici le temps minimum entre deux images d’animation.|MUn réglage trop bas peut ralentir les animations affichées et ne convient pas à des ordinateurs lents.
it.ro.HelpImageConfig12:Puoi inserire qui il tempo minimo tra i frame di animazione.|MUn'impostazione molto bassa potrebbe rallentare il computer qualora vengano visualizzate animazioni rapide, potrebbe quindi non essere adatta su computer lenti.
nl.ro.HelpImageConfig12:In dit veld kan de minimumtijd ingevoerd worden tussen de opeenvolgende animatiebeelden.|MEen lage waarde kan er toe leiden dat het systeem traag wordt bij het tonen van snelle animaties en is niet geschikt voor langzame systemen.
zh_CN.ro.HelpImageConfig12:您å¯ä»¥åœ¨æ­¤å¤„输入画帧之间的最短时间。|M一个éžå¸¸ä½Žçš„设置会导致您的计算机在显示快速动画时速度å˜æ…¢ï¼Œä¸é€‚åˆé€Ÿåº¦è¾ƒæ…¢çš„计算机。
en.ro.HelpImageConfig13:\Sreduce the minimum time between animation frames.
de.ro.HelpImageConfig13:Klicken mit AUSWAHL verkleinert die minimale Wartezeit zwischen aufeinanderfolgenden Einzelbildern einer Animation.
-fr.ro.HelpImageConfig13:\Sréduire le temps minimum entre deux images d'animation.
+fr.ro.HelpImageConfig13:\Sréduire le temps minimum entre deux images d’animation.
it.ro.HelpImageConfig13:\Sriduci il tempo di intervallo minimo tra i frame di animazione.
nl.ro.HelpImageConfig13:Klik met KIES om de minimumtijd tussen animatie-afbeeldingen te verkleinen.
zh_CN.ro.HelpImageConfig13:\Så‡å°‘画帧之间的最短时间。
en.ro.HelpImageConfig14:\Sincrease the minimum time between animation frames.
de.ro.HelpImageConfig14:Klicken mit AUSWAHL vergrößert die minimale Wartezeit zwischen aufeinanderfolgenden Einzelbildern einer Animation.
-fr.ro.HelpImageConfig14:\Saugmenter le temps minimum entre deux images d'animation.
+fr.ro.HelpImageConfig14:\Saugmenter le temps minimum entre deux images d’animation.
it.ro.HelpImageConfig14:\Saumenta il tempo di intervallo minimo tra i frame di animazione.
nl.ro.HelpImageConfig14:Klik met KIES om de minimumtijd tussen animatie-afbeeldingen te vergroten.
zh_CN.ro.HelpImageConfig14:\S增加画帧之间的最短时间。
@@ -7766,14 +7802,14 @@ zh_CN.ro.HelpImageConfig16:这表示 NetSurf 是å¦ç¦ç”¨ç½‘页上的动画。|M
en.ro.HelpImageConfig17:\Sreset the Image options back to their default values.
de.ro.HelpImageConfig17:Stellt die Bildoptionen zurück auf die Standardwerte.
-fr.ro.HelpImageConfig17:\Srevenir aux valeurs par défaut des options d'Image.
+fr.ro.HelpImageConfig17:\Srevenir aux valeurs par défaut des options d’Image.
it.ro.HelpImageConfig17:\Sresetta le opzioni della immagini ai valori predefiniti.
nl.ro.HelpImageConfig17:Klik met KIES om de instellingen in dit venster terug te zetten op de standaardwaarden.
zh_CN.ro.HelpImageConfig17:\S将图åƒé€‰é¡¹é‡ç½®ä¸ºé»˜è®¤å€¼ã€‚
en.ro.HelpImageConfig18:\Sclose this \w without saving changes.|M\Areturn the image options to the last saved configuration.
de.ro.HelpImageConfig18:Klicken mit AUSWAHL schließt das Fenster ohne die Änderungen zu speichern.|MKlicken mit SPEZIAL stellt die zuletzt abgespeicherten Einstellungen wieder her.
-fr.ro.HelpImageConfig18:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options d'Image précédemment sauvegardées.
+fr.ro.HelpImageConfig18:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options d’Image précédemment sauvegardées.
it.ro.HelpImageConfig18:\Schiudi questa finestra senza salvare le modifiche.|M\Aripristina le opzioni delle immagini all'ultima configurazione salvata.
nl.ro.HelpImageConfig18:Klik met KIES om dit venster te sluiten zonder dat de gemaakte wijzigingen worden bewaard.|MKlik met PASAAN om de gemaakte wijzigingen ongedaan te maken; het venster wordt hierbij niet gesloten.
zh_CN.ro.HelpImageConfig18:\S关闭此 \w 而ä¸ä¿å­˜æ›´æ”¹ã€‚|M\A将图åƒé€‰é¡¹æ¢å¤åˆ°ä¸Šæ¬¡ä¿å­˜çš„é…置。
@@ -7787,56 +7823,56 @@ zh_CN.ro.HelpImageConfig19:\Sä¿å­˜è¿™äº›è®¾ç½®å¹¶å…³é—­ \w。|M\A在ä¸å…³é—­ \
en.ro.HelpInterfaceConfig:\Tinterface configuration \w
de.ro.HelpInterfaceConfig:Fenster zur Einstellung des Programmverhaltens in ausgewählten Situationen
-fr.ro.HelpInterfaceConfig:\Tla fenêtre de configuration d'interface
+fr.ro.HelpInterfaceConfig:\Tla fenêtre de configuration d’interface
it.ro.HelpInterfaceConfig:\Tconfigurazione dell'interfaccia \w
nl.ro.HelpInterfaceConfig:De interface-instellingen kunnen in dit venster gewijzigd worden.
zh_CN.ro.HelpInterfaceConfig:\Tç•Œé¢é…ç½® \w
en.ro.HelpInterfaceConfig2:This indicates whether NetSurf will strip file extensions when saving files to disc.
de.ro.HelpInterfaceConfig2:Beim Abspeichern von Dateien auf einen Datenträger werden die Dateinamenserweiterungen (Extensions) aus dem Dateinamen entfernt.
-fr.ro.HelpInterfaceConfig2:Ceci indique si Netsurf supprime les extensions de fichiers lors d'une sauvegarde sur disque.
+fr.ro.HelpInterfaceConfig2:Ceci indique si Netsurf supprime les extensions de fichiers lors d’une sauvegarde sur disque.
it.ro.HelpInterfaceConfig2:Indica se NetSurf rimuoverà le estensioni dei file durante il salvataggio dei file su disco.
nl.ro.HelpInterfaceConfig2:Deze optie geeft aan of bestandsextensies verwijderd zullen worden bij het bewaren.
zh_CN.ro.HelpInterfaceConfig2:这表示 NetSurf 是å¦åœ¨å°†æ–‡ä»¶ä¿å­˜åˆ°ç£ç›˜æ—¶çœåŽ»æ–‡ä»¶æ‰©å±•å。
en.ro.HelpInterfaceConfig3:This indicates whether NetSurf will ask for confirmation before overwriting files of the same name.
de.ro.HelpInterfaceConfig3:Beim Abspeichern wird vor dem Ãœberschreiben namensgleicher Dateien von NetSurf nachgefragt, ob dies so erfolgen soll.
-fr.ro.HelpInterfaceConfig3:Ceci indique si Netsurf doit demander confirmation avant d'écraser des fichiers portant le même nom.
+fr.ro.HelpInterfaceConfig3:Ceci indique si Netsurf doit demander confirmation avant d’écraser des fichiers portant le même nom.
it.ro.HelpInterfaceConfig3:Indica se NetSurf chiederà conferma prima di sovrascrivere i file con lo stesso nome.
nl.ro.HelpInterfaceConfig3:Deze optie geeft aan of er toestemming wordt gevraagd voor het overschrijven van bestanden met dezelfde naam.
zh_CN.ro.HelpInterfaceConfig3:这表示 NetSurf 是å¦åœ¨è¦†ç›–åŒå文件之å‰éœ€è¦ç¡®è®¤ã€‚
en.ro.HelpInterfaceConfig6:This indicates whether NetSurf's URL suggestion feature is enabled.|MURL suggestion shows options for completing URLs as you type into NetSurf's URL bar.
de.ro.HelpInterfaceConfig6:Fantastisches Feature zum automatischen Vorschlagen von URL Adressen bei deren Eingabe.|MDiese Funktion zeigt bei der Eingabe von Webadressen in die Adressleiste mögliche sinnvolle Adressvorschläge während des Eintippens an.
-fr.ro.HelpInterfaceConfig6:Ceci indique si la fontion de suggestion d'URL de Netsurf est activée.|MLa suggestion d'URL montre les possibilités de complétion d'URL au fur et à mesure où elles sont tapées dans la barre.
+fr.ro.HelpInterfaceConfig6:Ceci indique si la fontion de suggestion d’URL de Netsurf est activée.|MLa suggestion d’URL montre les possibilités de complétion d’URL au fur et à mesure où elles sont tapées dans la barre.
it.ro.HelpInterfaceConfig6:Indica se la funzione di suggerimento URL di NetSurf sarà abilitata.|MIl suggerimento URL mostra le opzioni per il completamento degli URL durante la digitazione nella barra indirizzi di NetSurf.
nl.ro.HelpInterfaceConfig6:Deze optie geeft aan of het geven van adressuggesties is ingesteld.|MAdressuggestie geeft tijdens het typen van een adres een suggestie van het complete webadres.
zh_CN.ro.HelpInterfaceConfig6:这表示是å¦å¯ç”¨ NetSurf 的地å€å»ºè®®åŠŸèƒ½ã€‚|M当您在 NetSurf 的地å€æ ä¸­é”®å…¥æ—¶ï¼Œåœ°å€å»ºè®®ä¼šæ˜¾ç¤ºç”¨äºŽå¡«å†™åœ°å€çš„选项。
en.ro.HelpInterfaceConfig7:This indicates whether the URL for the item under the pointer in NetSurf's local history \w will be displayed.
de.ro.HelpInterfaceConfig7:In der lokalen History werden die Adressen der besuchten Webseiten schwebend über den zugehörigen Bildern eingeblendet.
-fr.ro.HelpInterfaceConfig7:Ceci indique si l'URL de l'item sous le pointeur dans la fenêtre d'historique local doit être affiché.
+fr.ro.HelpInterfaceConfig7:Ceci indique si l’URL de l’item sous le pointeur dans la fenêtre d’historique local doit être affiché.
it.ro.HelpInterfaceConfig7:Indica se verrà visualizzato l'URL dell'elemento sotto il puntatore del mouse nella finestra della cronologia locale di NetSurf.
nl.ro.HelpInterfaceConfig7:Deze optie geeft aan of het adres van een item onder de muisaanwijzer in de venstergeschiedenis zal worden getoond.
zh_CN.ro.HelpInterfaceConfig7:这表示是å¦åœ¨ NetSurf æœ¬åœ°åŽ†å² \w 中显示鼠标指针下的项地å€ã€‚
en.ro.HelpInterfaceConfig10:This indicates whether NetSurf will use a thumbnail when iconising windows to the Pinboard.
de.ro.HelpInterfaceConfig10:Beim verkleinernden Ablegen eines Browserfensters auf dem Desktophintergrund (Iconisieren) wird von NetSurf ein fensterspezifisches Icon erzeugt, welches den aktuellen Seiteninhalt wiedergibt.
-fr.ro.HelpInterfaceConfig10:Ceci indique si Netsurf doit utiliser une miniature lors de l'iconisation vers le Punaiseur (Pinboard).
+fr.ro.HelpInterfaceConfig10:Ceci indique si Netsurf doit utiliser une miniature lors de l’iconisation vers le Punaiseur (Pinboard).
it.ro.HelpInterfaceConfig10:Indica se NetSurf utilizzerà una miniatura quando si iconificano le finestre nella Pinboard.
nl.ro.HelpInterfaceConfig10:Deze optie geeft aan of er een miniatuur van de pagina wordt getoond bij het symboliseren van vensters naar het prikbord.
zh_CN.ro.HelpInterfaceConfig10:这表示 NetSurf 是å¦åœ¨å°†çª—å£å›¾æ ‡åŒ–到æ’接æ¿æ—¶ä½¿ç”¨ç¼©ç•¥å›¾ã€‚
en.ro.HelpInterfaceConfig11:\Sreset the Interface options back to their default values.
de.ro.HelpInterfaceConfig11:Stellt die Standardeinstellungen wieder her.
-fr.ro.HelpInterfaceConfig11:\Srevenir aux valeurs par défaut des options d'Interface.
+fr.ro.HelpInterfaceConfig11:\Srevenir aux valeurs par défaut des options d’Interface.
it.ro.HelpInterfaceConfig11:\Sresetta le opzioni dell'interfaccia ai valori predefiniti.
nl.ro.HelpInterfaceConfig11:Klik met KIES om de instellingen in dit venster terug te zetten op de standaardwaarden.
zh_CN.ro.HelpInterfaceConfig11:\S将界é¢é€‰é¡¹é‡ç½®ä¸ºé»˜è®¤å€¼ã€‚
en.ro.HelpInterfaceConfig12:\Sclose this \w without saving changes.|M\Areturn the interface options to the last saved configuration.
de.ro.HelpInterfaceConfig12:Klicken mit AUSWAHL schließt das Fenster ohne die Änderungen zu speichern.|MKlicken mit SPEZIAL stellt die zuletzt abgespeicherten Einstellungen wieder her.
-fr.ro.HelpInterfaceConfig12:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options d'Interface précédemment sauvegardées.
+fr.ro.HelpInterfaceConfig12:\Sfermer cette fenêtre sans sauver les changements|M\Arevenir aux options d’Interface précédemment sauvegardées.
it.ro.HelpInterfaceConfig12:\Schiudi questa finestra senza salvare le modifiche.|M\Aripristina le opzioni dell'interfaccia all'ultima configurazione salvata.
nl.ro.HelpInterfaceConfig12:Klik met KIES om dit venster te sluiten zonder dat de gemaakte wijzigingen worden bewaard.|MKlik met PASAAN om de gemaakte wijzigingen ongedaan te maken; het venster wordt hierbij niet gesloten.
zh_CN.ro.HelpInterfaceConfig12:\S关闭此 \w 而ä¸ä¿å­˜æ›´æ”¹ã€‚|M\A将界é¢é€‰é¡¹æ¢å¤åˆ°ä¸Šæ¬¡ä¿å­˜çš„é…置。
@@ -7850,14 +7886,14 @@ zh_CN.ro.HelpInterfaceConfig13:\Sä¿å­˜è¿™äº›è®¾ç½®å¹¶å…³é—­ \w。|M\A在ä¸å…³é
en.ro.HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
de.ro.HelpInterfaceConfig16:Erlaubt das Benutzen eines externen Programmes zur Verwaltung der Hotlist.
-fr.ro.HelpInterfaceConfig16:This indicates whether NetSurf will use an external hotlist client if available, in preference to the internal hotlist.
+fr.ro.HelpInterfaceConfig16:Indique si NetSurf doit utiliser un client externe pour gérer les marque-pages en remplacement de sa propre liste interne.
it.ro.HelpInterfaceConfig16:Indica se NetSurf tenterà di utilizzare un client segnalibri esterno se disponibile, al posto di quello interno.
nl.ro.HelpInterfaceConfig16:Deze optie geeft aan of de favorietenlijst via een extern programma (indien beschikbaar) beheerd mogen worden.
zh_CN.ro.HelpInterfaceConfig16:这表示 NetSurf 是å¦ä¼˜å…ˆä½¿ç”¨å¤–部常用列表客户端(如果å¯ç”¨),而ä¸æ˜¯å†…部常用列表。
en.ro.HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
de.ro.HelpInterfaceConfig18:\Tder Pfad zu einer Anwendung, die die Hotlist verwalten kann.
-fr.ro.HelpInterfaceConfig18:\Tthe path to a hotlist application which will be used to display the hotlist.
+fr.ro.HelpInterfaceConfig18:\Tle chemin vers l’application externe à utiliser pour afficher les marque-pages.
it.ro.HelpInterfaceConfig18:\Til percorso di un'applicazione esterna da utilizzare per la visualizzazione dei segnalibri.
nl.ro.HelpInterfaceConfig18:Voer in dit invoerveld het pad in van een extern programma dat de favorietenlijst mag beheren.
zh_CN.ro.HelpInterfaceConfig18:\T常用列表应用程åºçš„路径,将用æ¥æ˜¾ç¤ºå¸¸ç”¨åˆ—表。
@@ -7871,14 +7907,14 @@ zh_CN.ro.HelpLanguageConfig:\T语言é…ç½® \w
en.ro.HelpLanguageConfig3:\Tcurrently selected interface language.|MThe interface language is the language used for NetSurf's messages and dialogue boxes.
de.ro.HelpLanguageConfig3:Das ist die aktuell eingestellte Sprache für die Bedienoberfläche.|MDiese Sprache wird genutzt, um NetSurf's Meldungen, Texte der Dialogboxen, Menüs darzustellen.
-fr.ro.HelpLanguageConfig3:\Tla langue d'interface sélectionnée actuellement.|MLa langue d'interface est la langue utilisée pour les messages et les boîtes de dialogue de Netsurf.
-it.ro.HelpLanguageConfig3:\Tla lingua dell'interfaccia correntemente selezionata.|MLa lingua dell'interfaccia è la lingua utilizzata per i messaggi e le finestre di dialogo di NetSurf.
+fr.ro.HelpLanguageConfig3:\Tla langue d’interface sélectionnée actuellement.|MLa langue d’interface est la langue utilisée pour les messages et les boîtes de dialogue de Netsurf.
+it.ro.HelpLanguageConfig3:\Tla lingua dell'interfaccia correntemente selezionata.|MLa lingua dell'interfaccia � la lingua utilizzata per i messaggi e le finestre di dialogo di NetSurf.
nl.ro.HelpLanguageConfig3:Dit is momenteel de geselecteerde gebruikersinterfacetaal.|MDe interfacetaal is de taal voor de melding- en dialoogvensters.
zh_CN.ro.HelpLanguageConfig3:\T当å‰é€‰æ‹©çš„ç•Œé¢è¯­è¨€ã€‚|Mç•Œé¢è¯­è¨€æ˜¯ NetSurf æµè§ˆå™¨æ¶ˆæ¯å’Œå¯¹è¯æ¡†ä½¿ç”¨çš„语言。
en.ro.HelpLanguageConfig4:\Sselect an interface language.
de.ro.HelpLanguageConfig4:Klicken mit AUSWAHL zum Auswählen einer Oberflächensprache.
-fr.ro.HelpLanguageConfig4:\Schoisir une langue d'interface.
+fr.ro.HelpLanguageConfig4:\Schoisir une langue d’interface.
it.ro.HelpLanguageConfig4:\Sseleziona una lingua per l'interfaccia.
nl.ro.HelpLanguageConfig4:Klik met KIES om de gebruikersinterfacetaal te kiezen.
zh_CN.ro.HelpLanguageConfig4:\S选择界é¢è¯­è¨€ã€‚
@@ -7927,28 +7963,28 @@ zh_CN.ro.HelpSecurityConfig:\T安全é…ç½® \w
en.ro.HelpSecurityConfig2:This indicates whether NetSurf will send site referral information to web servers.|MWhen this is enabled NetSurf will tell the web server of a new page the address of the site you came from, after following a link.
de.ro.HelpSecurityConfig2:NetSurf sendet Seitenreferenzinformationen an Webserver.|MIst diese Option gewählt, schickt NetSurf an den Server einer neuen Webseite die Adresse der Seite von der aus die aktuelle über einen Link aufgerufen wurde.
-fr.ro.HelpSecurityConfig2:Ceci indique si Netsurf doit envoyer l'information de renvoi de site aux serveurs web.|MLorsque ceci est activé Netsurf signalera au serveur web d'une nouvelle page l'adresse du site d'où vous venez, après avoir suivi un lien.
-it.ro.HelpSecurityConfig2:Indica se NetSurf invierà le informazioni di riferimento del sito ai server Web.|MQuando questo è abilitato, NetSurf comunicherà al server Web di una nuova pagina l'indirizzo del sito dal quale proveniva, dopo aver seguito un link.
+fr.ro.HelpSecurityConfig2:Ceci indique si Netsurf doit envoyer l’information de renvoi de site aux serveurs web.|MLorsque ceci est activé Netsurf signalera au serveur web d’une nouvelle page l’adresse du site d’où vous venez, après avoir suivi un lien.
+it.ro.HelpSecurityConfig2:Indica se NetSurf invierà le informazioni di riferimento del sito ai server Web.|MQuando questo � abilitato, NetSurf comunicherà al server Web di una nuova pagina l'indirizzo del sito dal quale proveniva, dopo aver seguito un link.
nl.ro.HelpSecurityConfig2:Deze optie geeft aan of site-gerelateerde informatie naar webservers wordt meegezonden.|MIndien toegestaan, ontvangt de webserver informatie over de vorige pagina waar, via een koppeling, vandaan is gekomen.
zh_CN.ro.HelpSecurityConfig2:这表示 NetSurf 是å¦å°†ç«™ç‚¹æŽ¨èä¿¡æ¯å‘é€åˆ°ç½‘络æœåŠ¡å™¨ã€‚|Må¯ç”¨æ­¤é€‰é¡¹åŽï¼ŒNetSurf 将在跟踪链接åŽå°†æ‚¨çš„站点网å€å‘ŠçŸ¥æ–°ç½‘页的网络æœåŠ¡å™¨ã€‚
en.ro.HelpSecurityConfig6:You can enter the length of time that items are stored in global history here.
de.ro.HelpSecurityConfig6:Hier kann die Zeitdauer in Tagen angegeben werden, bis zu deren Ablauf Objekte in der globalen History gespeichert bleiben.
-fr.ro.HelpSecurityConfig6:Vous pouvez entrer ici la durée de stockage des items dans l'historique global.
+fr.ro.HelpSecurityConfig6:Vous pouvez entrer ici la durée de stockage des items dans l’historique global.
it.ro.HelpSecurityConfig6:Puoi inserire qui il periodo di tempo nel quale gli oggetti verranno memorizzati nella cronologia globale.
nl.ro.HelpSecurityConfig6:In dit veld kan de tijdsduur ingevoerd worden, dat items bewaard worden in de browsergeschiedenis.
zh_CN.ro.HelpSecurityConfig6:您å¯ä»¥åœ¨æ­¤å¤„输入项在全局历å²è®°å½•ä¸­å­˜å‚¨çš„时长。
en.ro.HelpSecurityConfig7:\Sreduce the global history duration.
de.ro.HelpSecurityConfig7:Klicken mit AUSWAHL verkürzt die Aufbewahrungszeit von Seiten in der globalen History.
-fr.ro.HelpSecurityConfig7:\Sréduire la durée de l'historique global.
+fr.ro.HelpSecurityConfig7:\Sréduire la durée de l’historique global.
it.ro.HelpSecurityConfig7:\Sriduci la durata della cronologia globale.
nl.ro.HelpSecurityConfig7:Klik met KIES om de tijdsduur van de browsergeschiedenis per dag te verminderen.
zh_CN.ro.HelpSecurityConfig7:\S缩短全局历å²è®°å½•ä¿å­˜æ—¶é—´ã€‚
en.ro.HelpSecurityConfig8:\Sincrease the global history duration.
de.ro.HelpSecurityConfig8:Klicken mit AUSWAHL verlängert die Aufbewahrungszeit von Seiten in der globalen History.
-fr.ro.HelpSecurityConfig8:\Saugmenter la durée de l'historique global.
+fr.ro.HelpSecurityConfig8:\Saugmenter la durée de l’historique global.
it.ro.HelpSecurityConfig8:\Saumenta la durata della cronologia globale.
nl.ro.HelpSecurityConfig8:Klik met KIES om de tijdsduur van de browsergeschiedenis per dag te vermeerderen,
zh_CN.ro.HelpSecurityConfig8:\S增加全局历å²è®°å½•ä¿å­˜æ—¶é—´ã€‚
@@ -8004,7 +8040,7 @@ zh_CN.ro.HelpThemeConfig4:\Sä¿å­˜è¿™äº›è®¾ç½®å¹¶å…³é—­ \w。|M\A在ä¸å…³é—­ \w
en.ro.HelpThemePConfig:This pane shows the available themes.|MThe selected icon theme is used for NetSurf browser \ws, the hotlist, global history and cookie management.
de.ro.HelpThemePConfig:Dieser Dialog zeigt die verfügbaren Themen.|MDas ausgewählte Thema wird bei der Anzeige von Browserfenster, Cookieverwaltung, Hotlist und History eingesetzt.
-fr.ro.HelpThemePConfig:Cette fenêtre indique les thèmes disponibles.|MLe thème de l'icône sélectionnée est utilisée pour les fenêtres de navigation de Netsurf, la liste des favoris et l'historique global.
+fr.ro.HelpThemePConfig:Cette fenêtre indique les thèmes disponibles.|MLe thème de l’icône sélectionnée est utilisée pour les fenêtres de navigation de Netsurf, la fenêtre des marque-pages et l’historique global.
it.ro.HelpThemePConfig:Questo pannello mostra i temi disponibili.|MIl tema delle icone selezionato verrà usato dal browser NetSurf \ws, dai segnalibri, dalla cronologia globale e dal gestore dei cookie.
nl.ro.HelpThemePConfig:Dit deelvenster toont de beschikbare thema's.|MHet geselecteerde thema wordt gebruikt in de NetSurf-browservensters, de favorietenlijst en de browsergeschiedenis.
zh_CN.ro.HelpThemePConfig:此窗格显示å¯ç”¨çš„主题。|M选定的图标主题用于 NetSurf æµè§ˆå™¨ \wsã€å¸¸ç”¨åˆ—表ã€å…¨å±€åŽ†å²è®°å½•å’Œ Cookie 管ç†ã€‚
@@ -8063,29 +8099,36 @@ zh_CN.ami.HelpToolbarWebSearch:Webæœç´¢æ \n键入文本并按下回车键使ç”
en.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
de.ami.HelpToolbarAddTab:Tab hinzufügen.
-fr.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
+fr.ami.HelpToolbarAddTab:Ajouter un onglet\nLMB: Ajouter un nouvel onglet vide
it.ami.HelpToolbarAddTab:Apri una nuova scheda
nl.ami.HelpToolbarAddTab:Tabblad toevoegen\nLMB: Een nieuwe leeg tabblad wordt geopend
zh_CN.ami.HelpToolbarAddTab:添加标签页\n鼠标左键:添加新的空白标签页
en.ami.PageInfo:Page info
+fr.ami.PageInfo:Information sur la page
+
en.ami.PageInfoInsecure:Insecure
+fr.ami.PageInfoInsecure:Non sécurisé
it.ami.PageInfoInsecure:Non sicuro
zh_CN.ami.PageInfoInsecure:ä¸å®‰å…¨
en.ami.PageInfoLocal:Local
+fr.ami.PageInfoLocal:Local
it.ami.PageInfoLocal:Locale
zh_CN.ami.PageInfoLocal:本地
en.ami.PageInfoSecure:Secure
+fr.ami.PageInfoSecure:Securisé
it.ami.PageInfoSecure:Sicuro
zh_CN.ami.PageInfoSecure:安全
en.ami.PageInfoWarning:Warning
+fr.ami.PageInfoWarning:Attention
it.ami.PageInfoWarning:Avviso
zh_CN.ami.PageInfoWarning:警告
en.ami.PageInfoInternal:Internal
+fr.ami.PageInfoInternal:Interne
it.ami.PageInfoInternal:Interno
zh_CN.ami.PageInfoInternal:内部
@@ -8126,7 +8169,7 @@ zh_CN.all.con_fonts:字体
en.all.con_home:Home page
de.all.con_home:Homepage
-fr.all.con_home:Page d'accueil
+fr.all.con_home:Page d’accueil
it.all.con_home:Pagina iniziale
nl.all.con_home:Startpagina
zh_CN.all.con_home:主页
@@ -8213,7 +8256,7 @@ zh_CN.all.Use:使用
en.all.HomePageURL:URL
de.all.HomePageURL:URL
-fr.all.HomePageURL:URL
+fr.all.HomePageURL:Adresse
it.all.HomePageURL:URL
nl.all.HomePageURL:Adres
zh_CN.all.HomePageURL:URL
@@ -8234,21 +8277,21 @@ zh_CN.all.HomePageCurrent:使用当å‰é¡µé¢
en.all.HomePageBlank:Use blank page
de.all.HomePageBlank:Use blank page
-fr.all.HomePageBlank:Utiliser une page vierge
+fr.all.HomePageBlank:Utiliser une page vide
it.all.HomePageBlank:Usa pagina vuota
nl.all.HomePageBlank:Gebruik een lege pagina
zh_CN.all.HomePageBlank:使用空白页é¢
en.all.ContentBlocking:Content blocking
de.all.ContentBlocking:Inhalte blockieren
-fr.all.ContentBlocking:blocage de contenu
+fr.all.ContentBlocking:Blocage de contenu
it.all.ContentBlocking:Blocca contenuti (AdBlock)
nl.all.ContentBlocking:Inhoud blokkeren
zh_CN.all.ContentBlocking:å±è”½å†…容
en.all.BlockAds:Hide advertisements
de.all.BlockAds:Werbung unterdrücken
-fr.all.BlockAds:Cacher la publicité
+fr.all.BlockAds:Cacher les publicités
it.all.BlockAds:Nascondi messaggi/banner
nl.all.BlockAds:Verberg advertenties
zh_CN.all.BlockAds:éšè—广告
@@ -8269,7 +8312,7 @@ zh_CN.ami.LocaleLang:从区域设置首选项获å–
en.all.HistoryAge:Keep history for
de.all.HistoryAge:History behalten für
-fr.all.HistoryAge:Conserver l'historique de navigation pendant
+fr.all.HistoryAge:Conserver l’historique de navigation pendant
it.all.HistoryAge:Conserva cronologia per
nl.all.HistoryAge:Bewaar geschiedenis voor
zh_CN.all.HistoryAge:ä¿å­˜åŽ†å²è®°å½•
@@ -8311,14 +8354,14 @@ zh_CN.ami.Privacy:éšç§
en.all.SendReferer:Send site referral information
de.all.SendReferer:Seitenreferenzen senden
-fr.all.SendReferer:Permettre l'envoi du referer en entête
+fr.all.SendReferer:Autoriser le partage du referer
it.all.SendReferer:Invia informazioni sul referral del sito
nl.all.SendReferer:Zend websitereferentie
zh_CN.all.SendReferer:å‘é€ç½‘站推èä¿¡æ¯
en.ami.DoNotTrack:Send header to tell websites not to track
de.ami.DoNotTrack:Webseiten das Tracking verbieten - Wunsch
-fr.ami.DoNotTrack:Activer l'envoi d'une requête "Ne pas suivre à la trace"
+fr.ami.DoNotTrack:Demander aux sites Web de « ne pas me pister »
it.ami.DoNotTrack:Invia header al sito per la richiesta di non tracciamento
nl.ami.DoNotTrack:Websites laten weten dat gebruiker niet gevolgd wil worden
zh_CN.ami.DoNotTrack:å‘é€æŠ¥å¤´ä»¥å‘ŠçŸ¥ç½‘ç«™ä¸è¦è·Ÿè¸ªèŽ·å–用户éšç§ä¿¡æ¯
@@ -8342,14 +8385,14 @@ zh_CN.all.Screen:å±å¹•
en.all.ScreenOwn:Own screen
de.all.ScreenOwn:Eigener Screen
-fr.all.ScreenOwn:Own screen
+fr.all.ScreenOwn:Écran privé
it.all.ScreenOwn:Schermo proprietario
nl.all.ScreenOwn:Eigen scherm
zh_CN.all.ScreenOwn:本机å±å¹•
en.ami.ScreenWB:Workbench
de.ami.ScreenWB:Workbench
-fr.ami.ScreenWB:Plan de travail
+fr.ami.ScreenWB:Espace de travail
it.ami.ScreenWB:Schermo Workbench
nl.ami.ScreenWB:Workbench-scherm
zh_CN.ami.ScreenWB:工作å°
@@ -8375,6 +8418,34 @@ it.all.Theme:Tema grafico
nl.all.Theme:Thema
zh_CN.all.Theme:主题
+en.ami.ThemeGUI:GUI theme
+de.ami.ThemeGUI:GUI theme
+fr.ami.ThemeGUI:Thème de l’interface
+it.ami.ThemeGUI:GUI theme
+nl.ami.ThemeGUI:GUI theme
+zh_CN.ami.ThemeGUI:GUI theme
+
+en.ami.ThemePage:Preferred page theme
+de.ami.ThemePage:Preferred page theme
+fr.ami.ThemePage:Thème de page préféré
+it.ami.ThemePage:Preferred page theme
+nl.ami.ThemePage:Preferred page theme
+zh_CN.ami.ThemePage:Preferred page theme
+
+en.ami.Light:Light
+de.ami.Light:Light
+fr.ami.Light:Clair
+it.ami.Light:Light
+nl.ami.Light:Light
+zh_CN.ami.Light:Light
+
+en.ami.Dark:Dark
+de.ami.Dark:Dark
+fr.ami.Dark:Sombre
+it.ami.Dark:Dark
+nl.ami.Dark:Dark
+zh_CN.ami.Dark:Dark
+
en.all.MousePointers:Mouse pointers
de.all.MousePointers:Mauszeiger
fr.all.MousePointers:Pointeurs de souris
@@ -8384,21 +8455,21 @@ zh_CN.all.MousePointers:鼠标指针
en.all.TrueColour:True colour
de.all.TrueColour:TrueColour
-fr.all.TrueColour:Couleur vraie
+fr.all.TrueColour:Vraies couleurs
it.all.TrueColour:True color
nl.all.TrueColour:Ware kleuren
zh_CN.all.TrueColour:真彩
en.all.OSPointers:Use OS mouse pointers when possible
de.all.OSPointers:Mauszeiger vom OS nutzen, wenn möglich
-fr.all.OSPointers:Utiliser les pointeurs de souris du système d'exploitation lorsque cela est possible
+fr.all.OSPointers:Utiliser les pointeurs de souris du système d’exploitation lorsque cela est possible
it.all.OSPointers:Se possibile usa i puntatori del mouse di sistema
nl.all.OSPointers:Gebruik bij voorkeur besturingssysteem-muisaanwijzers
zh_CN.all.OSPointers:å°½å¯èƒ½ä½¿ç”¨æ“作系统的鼠标指针
en.all.NeedRestart:These options will not take effect until the next time NetSurf is started
de.all.NeedRestart:Diese Optionen werden erst nach einem Neustart von NetSurf aktiviert.
-fr.all.NeedRestart:Ces options ne prendront effet qu'au prochain démarrage de NetSurf
+fr.all.NeedRestart:Ces options ne prendront effet qu’au prochain démarrage de NetSurf
it.all.NeedRestart:Queste modifiche avranno effetto al prossimo riavvio di NetSurf
nl.all.NeedRestart:Deze opties worden pas actief nadat NetSurf opieuw is gestart
zh_CN.all.NeedRestart:这些选项在下次å¯åŠ¨ NetSurf 之å‰ä¸ä¼šç”Ÿæ•ˆ
@@ -8422,19 +8493,19 @@ zh_CN.ami.ProxyBypass:绕过代ç†æœåŠ¡å™¨
en.all.Fetching:Fetching
de.all.Fetching:Fetching
-fr.all.Fetching:Connexion
+fr.all.Fetching:Récupération
it.all.Fetching:Ricezione
nl.all.Fetching:ophalen
en.all.FetchesMax:Maximum fetches
de.all.FetchesMax:Maximale Anzahl an Ladevorgängen
-fr.all.FetchesMax:Maximum de connexions
+fr.all.FetchesMax:Maximum de récupération
it.all.FetchesMax:Massima
nl.all.FetchesMax:Maximaal aantal keer ophalen
zh_CN.all.FetchesMax:最大获å–æ•°
en.all.FetchesHost:Fetches per host
de.all.FetchesHost:Ladevorgänge pro Host
-fr.all.FetchesHost:Connexions par hôte
+fr.all.FetchesHost:Récupérations par hôte
it.all.FetchesHost:Per host
nl.all.FetchesHost:Fetches per host
zh_CN.all.FetchesHost:æ¯ä¸ªä¸»æœºçš„获å–次数
@@ -8458,7 +8529,7 @@ zh_CN.all.CacheNative:缓存本机版本
en.all.ScaleQuality:Higher quality scaling
de.all.ScaleQuality:Skalieren hoher Qualität
-fr.all.ScaleQuality:Graduation de qualité supérieur
+fr.all.ScaleQuality:Mise à l’échelle de haute qualité
it.all.ScaleQuality:Massima qualità di visualizzazione
nl.all.ScaleQuality:Hogere schaalkwaliteit
zh_CN.all.ScaleQuality:高质é‡ç¼©æ”¾
@@ -8507,7 +8578,7 @@ zh_CN.all.AnimSpeedLimit:é™åˆ¶é€Ÿåº¦ä¸º
en.all.AnimSpeedFrames:seconds between frames
de.all.AnimSpeedFrames:Bildintervall (Sekunden)
-fr.all.AnimSpeedFrames:secondes entre les images
+fr.all.AnimSpeedFrames:secondes entre chaque image
it.all.AnimSpeedFrames:fotogrammi al secondo
nl.all.AnimSpeedFrames:seconden per beeld
zh_CN.all.AnimSpeedFrames:æ¯å¸§ä¹‹é—´çš„秒数
@@ -8528,7 +8599,7 @@ zh_CN.all.None:æ— 
en.all.Scaled:Scaled
de.all.Scaled:Skaliert
-fr.all.Scaled:Scaled
+fr.all.Scaled:Ajusté
it.all.Scaled:Scalate
nl.all.Scaled:Geschaald
zh_CN.all.Scaled:已缩放
@@ -8561,6 +8632,13 @@ it.all.DPI:DPI
nl.all.DPI:DPI
zh_CN.all.DPI:DPI(Dot Per Inch æ¯è‹±å¯¸ç‚¹æ•°ï¼‰
+en.ami.EnableCSS:Enable CSS
+de.ami.EnableCSS:CSS benutzen
+fr.ami.EnableCSS:Activer le CSS
+it.ami.EnableCSS:Attiva CSS
+nl.ami.EnableCSS:CSS ingeschakeld
+zh_CN.ami.EnableCSS:å¯ç”¨ CSS
+
# Fonts tab
#
@@ -8587,7 +8665,7 @@ zh_CN.all.FontSerif:衬线字体
en.all.FontMono:Monospaced
de.all.FontMono:Monospace
-fr.all.FontMono:Monospace
+fr.all.FontMono:Chasse fixe
it.all.FontMono:Monospaziato
nl.all.FontMono:Monospaced
zh_CN.all.FontMono:等宽字体
@@ -8608,7 +8686,7 @@ zh_CN.all.FontFantasy:Fantasy 字体
en.ami.FontFallback:Preferred fallback
de.ami.FontFallback:wenns nicht klappt
-fr.ami.FontFallback:Police de caractères de secour préférée
+fr.ami.FontFallback:Police de caractères de remplacement préférée
it.ami.FontFallback:Fallback preferito
nl.ami.FontFallback:Favoriete reserve lettertype
zh_CN.ami.FontFallback:字体的首选åŽå¤‡
@@ -8622,7 +8700,7 @@ zh_CN.all.Default:默认
en.all.FontSize:Font size
de.all.FontSize:Schriftgröße
-fr.all.FontSize:Taille de police de caractères
+fr.all.FontSize:Taille de la police de caractères
it.all.FontSize:Dimensione Font
nl.all.FontSize:Lettertypegrootte
zh_CN.all.FontSize:字体大å°
@@ -8643,14 +8721,14 @@ zh_CN.all.Pt:pt
en.ami.FontAntialiasing:Use anti-aliasing (when possible)
de.ami.FontAntialiasing:Anti-aliasing nutzen (wenn möglich)
-fr.ami.FontAntialiasing:Utiliser l'anticrénelage (si possible)
+fr.ami.FontAntialiasing:Utiliser l’anticrénelage (si possible)
it.ami.FontAntialiasing:Usa anti-aliasing (quando possibile)
nl.ami.FontAntialiasing:Anti-aliasing (indien mogelijk) gebruiken
zh_CN.ami.FontAntialiasing:使用抗锯齿处ç†æ–¹å¼ï¼ˆå¦‚æžœå¯èƒ½ï¼‰
en.ami.FontBitmap:Allow bitmap fonts
de.ami.FontBitmap:Bitmap Fonts zulassen
-fr.ami.FontBitmap:Allow bitmap fonts
+fr.ami.FontBitmap:Autoriser les polices de caractères bitmap
it.ami.FontBitmap:Permetti font bitmap
nl.ami.FontBitmap:Allow bitmap fonts
zh_CN.ami.FontBitmap:å…许使用点阵字体
@@ -8658,14 +8736,14 @@ zh_CN.ami.FontBitmap:å…许使用点阵字体
# Font scanning
en.ami.FontScanning:Scanning fonts...
de.ami.FontScanning:Lese Fonts ein...
-fr.ami.FontScanning:Balayage de polices de caractères...
+fr.ami.FontScanning:Lecture des polices de caractères…
it.ami.FontScanning:Scansione dei font in corso...
nl.ami.FontScanning:Scannen lettertypen...
zh_CN.ami.FontScanning:正在扫æ字体…
en.ami.FontGlyphs:%ld unique glyphs found
de.ami.FontGlyphs:%ld eigenständige Glyphen gefunden
-fr.ami.FontGlyphs:%ld glyphe(s) unique(s) trouvé
+fr.ami.FontGlyphs:%ld glyphes uniques trouvés
it.ami.FontGlyphs:%ld glifi unici trovati
nl.ami.FontGlyphs:%ld unieke tekens gevonden
zh_CN.ami.FontGlyphs:找到 %ld 个字形
@@ -8675,14 +8753,14 @@ zh_CN.ami.FontGlyphs:找到 %ld 个字形
en.all.CacheMemory:Memory cache
de.all.CacheMemory:Arbeitsspeicher Cache
-fr.all.CacheMemory:Mémoire cache
+fr.all.CacheMemory:Cache en mémoire vive
it.all.CacheMemory:Memoria cache
nl.all.CacheMemory:Buffergeheugen
zh_CN.all.CacheMemory:内存缓存
en.all.CacheDisc:Disc cache
de.all.CacheDisc:Festplatten Cache
-fr.all.CacheDisc:Cache du disque
+fr.all.CacheDisc:Cache sur le disque
it.all.CacheDisc:Cache su disco
nl.all.CacheDisc:Schijfbuffer
zh_CN.all.CacheDisc:ç£ç›˜ç¼“å­˜
@@ -8720,21 +8798,21 @@ zh_CN.all.TabbedBrowsing:标签页å¼æµè§ˆ
en.all.TabActive:Open new tabs in background
de.all.TabActive:Neuen Tab im Hintergrund öffnen
-fr.all.TabActive:Ouvrir de nouveaux onglets en arrière-plan
+fr.all.TabActive:Ouvrir les nouveaux onglets en arrière plan
it.all.TabActive:Apri le nuove schede in sottofondo
nl.all.TabActive:Open nieuwe tabbladen in de achtergrond
zh_CN.all.TabActive:在åŽå°ä¸­æ‰“开新标签页
en.all.TabMiddle:Middle mouse button opens tabs
de.all.TabMiddle:Mittlere Maustaste öffnet Tab
-fr.all.TabMiddle:Bouton du milieu de la souris ouvre un onglet
+fr.all.TabMiddle:Le bouton du milieu de la souris ouvre un onglet
it.all.TabMiddle:Usa tasto centrale del mouse per aprire le schede
nl.all.TabMiddle:Middelste muisknop opent een nieuw tabblad
zh_CN.all.TabMiddle:鼠标中键点击 URL,并在新标签页中打开
en.all.TabLast:Open new tabs after all existing tabs
de.all.TabLast:Neue Tabs hinter letztem öffnen
-fr.all.TabLast:Ouvrir de nouveaux onglets après tous les onglets existants
+fr.all.TabLast:Placer les nouveaux onglets après tous les autres
it.all.TabLast:Apri le nuove schede dopo quella corrente
nl.all.TabLast:Open nieuw tabblad na alle bestaande tabbladen
zh_CN.all.TabLast:在已有标签页å³ä¾§æ‰“开新标签页
@@ -8758,13 +8836,14 @@ zh_CN.ami.TabAlways:总是显示标签页æ 
en.all.Downloads:Downloads
de.all.Downloads:Downloads
+fr.all.Downloads:Téléchargements
it.all.Downloads:Trasferimenti
nl.all.Downloads:Opgehaalde items
zh_CN.all.Downloads:下载项
en.all.ConfirmOverwrite:Request confirmation when overwriting
de.all.ConfirmOverwrite:vor Ãœberschreiben nachfragen
-fr.all.ConfirmOverwrite:Demande de confirmation lors de l'écrasement
+fr.all.ConfirmOverwrite:Demander une confirmation avant d’écraser
it.all.ConfirmOverwrite:Richiedi conferma prima di sovrascrivere
nl.all.ConfirmOverwrite:Vraag bevestiging bij overschrijven
zh_CN.all.ConfirmOverwrite:覆盖时请求确认
@@ -8778,7 +8857,7 @@ zh_CN.all.DownloadDir:默认下载ä½ç½®
en.all.DownloadNotify:Notify on completion
de.all.DownloadNotify:Downloadende melden
-fr.all.DownloadNotify:Notifier sur complétion
+fr.all.DownloadNotify:Notifier lorsque le téléchargement se termine
it.all.DownloadNotify:Notifica al completamento (Ringhio)
nl.all.DownloadNotify:Melding wanneer ophalenproces gereed is
zh_CN.all.DownloadNotify:完æˆæ—¶é€šçŸ¥
@@ -8792,7 +8871,7 @@ zh_CN.all.SearchWeb:互è”网æœç´¢
en.all.SearchURL:Search from URL bar
de.all.SearchURL:Suche über URL Leiste
-fr.all.SearchURL:Recherche depuis la barre URL
+fr.all.SearchURL:Lancer des recherches depuis la barre d’adresse
it.all.SearchURL:Ricerca da barra URL
nl.all.SearchURL:Zoek via (web)adresveld
zh_CN.all.SearchURL:从地å€æ æœç´¢
@@ -8813,7 +8892,7 @@ zh_CN.ami.OptionDocky:在 AmiDock 中显示
en.ami.PopupMenu:Use popupmenu for forms
de.ami.PopupMenu:Use popupmenu for forms
-fr.ami.PopupMenu:Use popupmenu for forms
+fr.ami.PopupMenu:Utiliser un menu popup pour les formulaires
it.ami.PopupMenu:Usa menu popup nei form
nl.ami.PopupMenu:Gebruik popup-menu for formulieren
zh_CN.ami.PopupMenu:对表格使用弹出å¼èœå•
@@ -8827,7 +8906,7 @@ zh_CN.all.Clipboard:剪贴æ¿
en.all.ClipboardUTF8:Write text as UTF-8
de.all.ClipboardUTF8:Text als UTF-8
-fr.all.ClipboardUTF8:Écrire du texte en UTF-8
+fr.all.ClipboardUTF8:Écrire le texte en UTF-8
it.all.ClipboardUTF8:Scrivi testo come UTF-8
nl.all.ClipboardUTF8:Schrijf tekst in UTF8-formaat
zh_CN.all.ClipboardUTF8:以 UTF-8 ç¼–ç å†™å…¥æ–‡ä»¶
@@ -8869,7 +8948,7 @@ zh_CN.all.OptionNoWindow:å¯åŠ¨æ—¶ä¸æ‰“开窗å£
en.all.OptionNoQuit:Do not quit when last window closed
de.all.OptionNoQuit:Nicht Beenden beim Schließen des letzten Fensters
-fr.all.OptionNoQuit:Ne pas quitter lorsque la dernière fenêtre se trouve fermée
+fr.all.OptionNoQuit:Ne pas quitter lorsque la dernière fenêtre est fermée
it.all.OptionNoQuit:Iconifica su AmiDock alla chiusura di NetSurf
nl.all.OptionNoQuit:Stop programma niet als laatste venster worden gesloten
zh_CN.all.OptionNoQuit:在最åŽä¸€ä¸ªçª—å£å…³é—­æ—¶ä¸é€€å‡º
@@ -8886,28 +8965,28 @@ zh_CN.all.Margins:è¾¹è·
en.all.Top:Top
de.all.Top:Oben
-fr.all.Top:Haut/Supérieur
+fr.all.Top:supérieure
it.all.Top:Superiore
nl.all.Top:Top
zh_CN.all.Top:顶端
en.all.Left:Left
de.all.Left:Links
-fr.all.Left:Gauche
+fr.all.Left:gauche
it.all.Left:Sinistro
nl.all.Left:Links
zh_CN.all.Left:左端
en.all.Right:Right
de.all.Right:Rechts
-fr.all.Right:Droite
+fr.all.Right:droite
it.all.Right:Destro
nl.all.Right:Rechts
zh_CN.all.Right:å³ç«¯
en.all.Bottom:Bottom
de.all.Bottom:Unten
-fr.all.Bottom:Bas/inférieur
+fr.all.Bottom:inférieure
it.all.Bottom:Inferiore
nl.all.Bottom:Onder
zh_CN.all.Bottom:底端
@@ -8921,14 +9000,14 @@ zh_CN.all.MM:毫米
en.all.Scaling:Scaling
de.all.Scaling:Skalierung
-fr.all.Scaling:Mise à l'échelle
+fr.all.Scaling:Mise à l’échelle
it.all.Scaling:Scala
nl.all.Scaling:Schaling
zh_CN.all.Scaling:缩放比例
en.all.Scale:Scale
de.all.Scale:Skalieren
-fr.all.Scale:Échelle (proportion)
+fr.all.Scale:Échelle
it.all.Scale:Scalati
nl.all.Scale:Schaal
zh_CN.all.Scale:缩放
@@ -8949,7 +9028,7 @@ zh_CN.all.SuppressImages:éšè—图åƒ
en.all.RemoveBackground:Remove background
de.all.RemoveBackground:Hintergrund entfernen
-fr.all.RemoveBackground:Retirer l'arrière-plan
+fr.all.RemoveBackground:Supprimer l’arrière plan
it.all.RemoveBackground:Rimuovi sfondo
nl.all.RemoveBackground:Verwijder achtergrond
zh_CN.all.RemoveBackground:删除背景
@@ -9013,12 +9092,12 @@ nl.all.SetPassword:Stel wachtwoord in
#nl.all.FilterImg:Maak afbeelding vloeiend
#en.all.RenderText:Blend text to background
#de.all.RenderText:Text/Hintergrund Ãœbergang weich
-#fr.all.RenderText:Fondre le texte sur l'arrière-plan
+#fr.all.RenderText:Fondre le texte sur l’arrière plan
#it.all.RenderText:Sfuma testo di sfondo
#nl.all.RenderText:Harmoniseer tekst met achtergrond
#en.all.TbarError:An error occurred when constructing the toolbar:
#de.all.TbarError:Fehler beim Aufbau der Toolbar:
-#fr.all.TbarError:Une erreur s'est produite lors de la construction de la barre d'outils:
+#fr.all.TbarError:Une erreur s’est produite lors de la construction de la barre d’outils:
#it.all.TbarError:Si è verificato un errore durante la costruzione della barra strumenti:
#nl.all.TbarError:Fout bij het maken van de gereedschapbalk:
#en.all.JNGTitle:%s (JNG image %lux%lu pixels)
@@ -9035,6 +9114,6 @@ nl.all.SetPassword:Stel wachtwoord in
#it.all.LoginLabel:Il sito web richiede delle credenziali per l'accesso.
#en.gtk.gtkToolBarTitle:Toolbar custom button store
#de.gtk.gtkToolBarTitle:Benutzerdefinierter Ort für Toolbar-Icons
-#fr.gtk.gtkToolBarTitle:Personaliser la barre d'outils
+#fr.gtk.gtkToolBarTitle:Personaliser la barre d’outils
#it.gtk.gtkToolBarTitle:Pulsanti della barra strumenti
#nl.gtk.gtkToolBarTitle:Werkbalk aanpassen
diff --git a/resources/SearchEngines b/resources/SearchEngines
index 38e77957b..71a22697e 100644
--- a/resources/SearchEngines
+++ b/resources/SearchEngines
@@ -1,20 +1,17 @@
-Google|www.google.com|http://www.google.com/search?q=%s|http://www.google.com/favicon.ico|
-Yahoo|search.yahoo.com|http://search.yahoo.com/search?p=%s|http://www.yahoo.com/favicon.ico|
-Bing|www.bing.com|http://www.bing.com/search?q=%s|http://www.bing.com/favicon.ico|
-Business.com|www.business.com|http://www.business.com/search/rslt_default.asp?query=%s|http://www.business.com/favicon.ico|
-Omgili|www.omgili.com|http://www.omgili.com/AAAAA/%s.html|http://omgili.com/public/images/favicon.ico|
-BBC News|search.bbc.co.uk|http://search.bbc.co.uk/search?q=%s&tab=ns|http://www.bbc.co.uk/favicon.ico|
-Ubuntu Packages|packages.ubuntu.com|http://packages.ubuntu.com/search?keywords=%s|http://packages.ubuntu.com/favicon.ico|
-Creative Commons|creativecommons.org|http://creativecommons.org/?s=%s|http://creativecommons.org/favicon.ico|fixme:favicon does not work as it is served as x-icon and is a png
-Ask.com|www.ask.com|http://www.ask.com/web?q=%s|http://sp.uk.ask.com/sh/i/a14/favicon/favicon.ico|fixme:favicon is served as text/plain
-Dictionary.com|dictionary.reference.com|http://dictionary.reference.com/browse/%s?jss=0|http://dictionary.reference.com/favicon.ico|
-Youtube|www.youtube.com|http://www.youtube.com/results?search_query=%s|http://www.youtube.com/favicon.ico|
-AOL|search.aol.com|http://search.aol.com/aol/search?query=%s|http://www.aol.com/favicon.ico|
-Baidu|www.baidu.com|http://www.baidu.com/s?wd=%s|http://www.baidu.com/favicon.ico|
-Amazon|www.amazon.com|http://www.amazon.com/s/ref=nb_ss_gw?field-keywords=%s|http://www.amazon.com/favicon.ico|
-Ebay|shop.ebay.com|http://shop.ebay.com/items/%s|http://www.ebay.com/favicon.ico|
-IMDB|www.imdb.com|http://www.imdb.com/find?q=%s|http://www.imdb.com/favicon.ico|
-ESPN|search.espn.go.com|http://search.espn.go.com/%s/|http://www.espn.go.com/favicon.ico|
-Wikipedia|en.wikipedia.org|http://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=%s|http://en.wikipedia.org/favicon.ico|
-DuckDuckGo|www.duckduckgo.com|http://www.duckduckgo.com/html/?q=%s|http://www.duckduckgo.com/favicon.ico|fixme:Their ico upsets the current implementation
-Seeks|www.seeks-project.info|https://www.seeks-project.info/search.php/search?q=%s|http://www.seeks-project.info/search.php/public/images/seek_icon_32x32_transparent.png|fixme:they have no icon
+Google|www.google.com|https://www.google.com/search?q=%s|https://www.google.com/favicon.ico|
+Yahoo|search.yahoo.com|https://search.yahoo.com/search?p=%s|https://www.yahoo.com/favicon.ico|
+Bing|www.bing.com|https://www.bing.com/search?q=%s|https://www.bing.com/favicon.ico|
+DuckDuckGo|www.duckduckgo.com|https://www.duckduckgo.com/html/?q=%s|https://www.duckduckgo.com/favicon.ico|fixme:Their ico upsets the current implementation
+Wikipedia|en.wikipedia.org|https://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=%s|https://en.wikipedia.org/favicon.ico|
+BBC News|search.bbc.co.uk|https://search.bbc.co.uk/search?q=%s&tab=ns|https://www.bbc.co.uk/favicon.ico|
+Ubuntu Packages|packages.ubuntu.com|https://packages.ubuntu.com/search?keywords=%s|https://packages.ubuntu.com/favicon.ico|
+Creative Commons|creativecommons.org|https://creativecommons.org/?s=%s|https://creativecommons.org/favicon.ico|fixme:favicon does not work as it is served as x-icon and is a png
+Ask.com|www.ask.com|https://www.ask.com/web?q=%s|https://sp.uk.ask.com/sh/i/a14/favicon/favicon.ico|fixme:favicon is served as text/plain
+Dictionary.com|dictionary.reference.com|https://dictionary.reference.com/browse/%s?jss=0|https://dictionary.reference.com/favicon.ico|
+Youtube|www.youtube.com|https://www.youtube.com/results?search_query=%s|https://www.youtube.com/favicon.ico|
+AOL|search.aol.com|https://search.aol.com/aol/search?query=%s|https://www.aol.com/favicon.ico|
+Baidu|www.baidu.com|https://www.baidu.com/s?wd=%s|https://www.baidu.com/favicon.ico|
+Amazon|www.amazon.com|https://www.amazon.com/s/ref=nb_ss_gw?field-keywords=%s|https://www.amazon.com/favicon.ico|
+Ebay|www.ebay.com|https://www.ebay.com/sch/i.html?_nkw=%s|https://www.ebay.com/favicon.ico|
+IMDB|www.imdb.com|https://www.imdb.com/find?q=%s|https://www.imdb.com/favicon.ico|
+Stract|stract.com|https://stract.com/search?q=%s|https://stract.com/favicon.ico|
diff --git a/resources/ca-bundle b/resources/ca-bundle
index 651694e8a..fd61b8b49 100644
--- a/resources/ca-bundle
+++ b/resources/ca-bundle
@@ -1,7 +1,7 @@
##
## Bundle of CA Root Certificates
##
-## Certificate data from Mozilla as of: Wed Jan 1 04:12:10 2020 GMT
+## Certificate data from Mozilla as of: Tue Dec 19 23:28:07 2023 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
@@ -13,8 +13,8 @@
## an Apache+mod_ssl webserver for SSL client authentication.
## Just configure this file as the SSLCACertificateFile.
##
-## Conversion done with mk-ca-bundle.pl version 1.27.
-## SHA256: f3bdcd74612952da8476a9d4147f50b29ad0710b7dd95b4c8690500209986d70
+## Conversion done with mk-ca-bundle.pl version 1.29.
+## SHA256: 1970dd65858925d68498d2356aea6d03f764422523c5887deca8ce3ba9e1f845
##
@@ -39,52 +39,6 @@ hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
-----END CERTIFICATE-----
-GlobalSign Root CA - R2
-=======================
------BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
-YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
-bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
-aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
-bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
-ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
-s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
-S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
-TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
-ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
-FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
-YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
-BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
-9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
-01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
-9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
-TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority - G3
-============================================================
------BEGIN CERTIFICATE-----
-MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
-CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
-dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
-EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
-cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
-EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
-055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
-ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
-j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
-/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
-xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
-t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
------END CERTIFICATE-----
-
Entrust.net Premium 2048 Secure Server CA
=========================================
-----BEGIN CERTIFICATE-----
@@ -130,30 +84,6 @@ Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----
-AddTrust External Root
-======================
------BEGIN CERTIFICATE-----
-MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
-QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
-VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
-NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
-cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
-Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
-+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
-Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
-aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
-2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
-7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
-BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
-VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
-VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
-IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
-j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
-6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
-e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
-G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
------END CERTIFICATE-----
-
Entrust Root Certification Authority
====================================
-----BEGIN CERTIFICATE-----
@@ -180,87 +110,6 @@ W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
-----END CERTIFICATE-----
-GeoTrust Global CA
-==================
------BEGIN CERTIFICATE-----
-MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
-Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
-MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
-LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
-CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
-BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
-8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
-T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
-vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
-AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
-DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
-zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
-d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
-mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
-XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
-Mw==
------END CERTIFICATE-----
-
-GeoTrust Universal CA
-=====================
------BEGIN CERTIFICATE-----
-MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
-R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
-MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu
-Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
-ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t
-JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e
-RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs
-7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d
-8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V
-qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga
-Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB
-Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu
-KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08
-ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0
-XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB
-hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
-aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
-qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
-oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
-xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
-KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
-DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
-xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
-p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
-P/rmMuGNG2+k5o7Y+SlIis5z/iw=
------END CERTIFICATE-----
-
-GeoTrust Universal CA 2
-=======================
------BEGIN CERTIFICATE-----
-MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
-R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0
-MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg
-SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA
-A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0
-DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17
-j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q
-JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a
-QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2
-WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP
-20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn
-ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC
-SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG
-8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2
-+/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E
-BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
-dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ
-4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+
-mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq
-A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
-Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
-pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
-FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
-gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
-X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
------END CERTIFICATE-----
-
Comodo AAA Services root
========================
-----BEGIN CERTIFICATE-----
@@ -285,38 +134,6 @@ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
-----END CERTIFICATE-----
-QuoVadis Root CA
-================
------BEGIN CERTIFICATE-----
-MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
-ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
-eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz
-MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp
-cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD
-EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
-AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk
-J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL
-F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL
-YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen
-AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w
-PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y
-ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7
-MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj
-YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs
-ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
-Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW
-Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu
-BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw
-FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6
-tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo
-fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul
-LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
-gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
-5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
-5nrQNiOKSnQ2+Q==
------END CERTIFICATE-----
-
QuoVadis Root CA 2
==================
-----BEGIN CERTIFICATE-----
@@ -383,47 +200,6 @@ vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
-----END CERTIFICATE-----
-Security Communication Root CA
-==============================
------BEGIN CERTIFICATE-----
-MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
-U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
-HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
-U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
-8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
-DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
-5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
-DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
-JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
-DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
-0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
-mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
-s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
-6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
-FL39vmwLAw==
------END CERTIFICATE-----
-
-Sonera Class 2 Root CA
-======================
------BEGIN CERTIFICATE-----
-MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
-U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
-NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
-IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
-/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
-dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
-f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
-tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
-nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
-XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
-0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
-cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
-Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
-EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
-llpwrN9M
------END CERTIFICATE-----
-
XRamp Global CA Root
====================
-----BEGIN CERTIFICATE-----
@@ -496,36 +272,6 @@ KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
QBFGmh95DmK/D5fs4C8fF5Q=
-----END CERTIFICATE-----
-Taiwan GRCA
-===========
------BEGIN CERTIFICATE-----
-MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG
-EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X
-DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv
-dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD
-ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN
-w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5
-BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O
-1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO
-htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov
-J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7
-Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t
-B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB
-O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8
-lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV
-HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2
-09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
-TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj
-Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2
-Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU
-D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz
-DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk
-Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk
-7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ
-CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy
-+fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS
------END CERTIFICATE-----
-
DigiCert Assured ID Root CA
===========================
-----BEGIN CERTIFICATE-----
@@ -592,26 +338,6 @@ mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
-----END CERTIFICATE-----
-DST Root CA X3
-==============
------BEGIN CERTIFICATE-----
-MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK
-ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
-DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1
-cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT
-rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9
-UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy
-xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d
-utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T
-AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ
-MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug
-dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE
-GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw
-RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
-fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
------END CERTIFICATE-----
-
SwissSign Gold CA - G2
======================
-----BEGIN CERTIFICATE-----
@@ -674,78 +400,6 @@ DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
-----END CERTIFICATE-----
-GeoTrust Primary Certification Authority
-========================================
------BEGIN CERTIFICATE-----
-MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD
-ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx
-CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ
-cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
-CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN
-b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9
-nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge
-RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt
-tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
-AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI
-hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K
-Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN
-NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa
-Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG
-1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
------END CERTIFICATE-----
-
-thawte Primary Root CA
-======================
------BEGIN CERTIFICATE-----
-MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE
-BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
-aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3
-MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg
-SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv
-KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT
-FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs
-oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ
-1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc
-q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K
-aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p
-afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
-VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
-AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
-uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
-xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
-jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
-z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G5
-============================================================
------BEGIN CERTIFICATE-----
-MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
-biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
-dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
-YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
-j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
-Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
-Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
-fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
-BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
-Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
-aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
-SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
-X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
-KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
-Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
-ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
------END CERTIFICATE-----
-
SecureTrust CA
==============
-----BEGIN CERTIFICATE-----
@@ -814,29 +468,6 @@ IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
-----END CERTIFICATE-----
-Network Solutions Certificate Authority
-=======================================
------BEGIN CERTIFICATE-----
-MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
-EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
-IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
-MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
-MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
-jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
-aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
-crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
-/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
-AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
-BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
-bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
-A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
-4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
-GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
-wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
-ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
------END CERTIFICATE-----
-
COMODO ECC Certification Authority
==================================
-----BEGIN CERTIFICATE-----
@@ -854,29 +485,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
-----END CERTIFICATE-----
-OISTE WISeKey Global Root GA CA
-===============================
------BEGIN CERTIFICATE-----
-MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
-BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
-A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
-bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
-VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
-IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
-IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
-Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
-Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
-d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
-/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
-LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
-KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm
-MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4
-+vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
-hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY
-okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
------END CERTIFICATE-----
-
Certigna
========
-----BEGIN CERTIFICATE-----
@@ -899,28 +507,6 @@ PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
-----END CERTIFICATE-----
-Cybertrust Global Root
-======================
------BEGIN CERTIFICATE-----
-MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li
-ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4
-MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD
-ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-+Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW
-0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL
-AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin
-89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT
-8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP
-BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2
-MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G
-A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO
-lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
-5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
-hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
-X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
-WL1WMRJOEcgh4LMRkWXbtKaIOM5V
------END CERTIFICATE-----
-
ePKI Root Certification Authority
=================================
-----BEGIN CERTIFICATE-----
@@ -972,136 +558,6 @@ vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
-----END CERTIFICATE-----
-GeoTrust Primary Certification Authority - G3
-=============================================
------BEGIN CERTIFICATE-----
-MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
-BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
-IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy
-eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz
-NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo
-YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT
-LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j
-K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE
-c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C
-IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu
-dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC
-MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr
-2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9
-cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE
-Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
-AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
-t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
------END CERTIFICATE-----
-
-thawte Primary Root CA - G2
-===========================
------BEGIN CERTIFICATE-----
-MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
-VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
-IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
-Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV
-MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG
-b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt
-IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS
-LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5
-8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
-mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN
-G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K
-rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
------END CERTIFICATE-----
-
-thawte Primary Root CA - G3
-===========================
------BEGIN CERTIFICATE-----
-MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE
-BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
-aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w
-ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
-d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD
-VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG
-A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At
-P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC
-+BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY
-7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW
-vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E
-BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ
-KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK
-A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
-t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
-8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
-er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority - G2
-=============================================
------BEGIN CERTIFICATE-----
-MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
-VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
-Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
-ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
-OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
-MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
-b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
-BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
-KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
-VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
-EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
-ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
-npaqBA+K
------END CERTIFICATE-----
-
-VeriSign Universal Root Certification Authority
-===============================================
------BEGIN CERTIFICATE-----
-MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
-IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
-1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
-MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
-9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
-AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
-tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
-CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
-a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
-DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
-Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
-Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
-P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
-wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
-mJO37M2CYfE45k+XmCpajQ==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G4
-============================================================
------BEGIN CERTIFICATE-----
-MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
-VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
-b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
-ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
-YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
-MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
-cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
-b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
-IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
-Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
-rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
-/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
-HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
-Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
-A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
-AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
------END CERTIFICATE-----
-
NetLock Arany (Class Gold) Főtanúsítvány
========================================
-----BEGIN CERTIFICATE-----
@@ -1126,58 +582,6 @@ NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
-----END CERTIFICATE-----
-Staat der Nederlanden Root CA - G2
-==================================
------BEGIN CERTIFICATE-----
-MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC
-TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
-ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ
-5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn
-vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj
-CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil
-e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR
-OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI
-CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65
-48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi
-trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737
-qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB
-AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC
-ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
-HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA
-A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz
-+51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj
-f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN
-kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk
-CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF
-URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb
-CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h
-oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV
-IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm
-66+KAQ==
------END CERTIFICATE-----
-
-Hongkong Post Root CA 1
-=======================
------BEGIN CERTIFICATE-----
-MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
-DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
-NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
-IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
-AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
-ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
-auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
-qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
-V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
-HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
-h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
-l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
-IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
-T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
-c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
------END CERTIFICATE-----
-
SecureSign RootCA11
===================
-----BEGIN CERTIFICATE-----
@@ -1244,39 +648,6 @@ YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
kpeDMdmztcpHWD9f
-----END CERTIFICATE-----
-Autoridad de Certificacion Firmaprofesional CIF A62634068
-=========================================================
------BEGIN CERTIFICATE-----
-MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
-BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
-MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
-QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
-NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
-Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
-B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
-7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
-ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
-plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
-MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
-LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
-bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
-vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud
-EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH
-DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
-cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA
-bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx
-ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx
-51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk
-R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP
-T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f
-Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl
-osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR
-crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR
-saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD
-KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi
-6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
------END CERTIFICATE-----
-
Izenpe.com
==========
-----BEGIN CERTIFICATE-----
@@ -1309,82 +680,6 @@ Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
-----END CERTIFICATE-----
-Chambers of Commerce Root - 2008
-================================
------BEGIN CERTIFICATE-----
-MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
-MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
-bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
-QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy
-Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl
-ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF
-EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl
-cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
-AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA
-XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj
-h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/
-ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk
-NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g
-D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331
-lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ
-0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
-ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2
-EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI
-G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ
-BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh
-bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh
-bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC
-CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH
-AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1
-wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH
-3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU
-RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6
-M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1
-YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF
-9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
-zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
-nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
-OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
------END CERTIFICATE-----
-
-Global Chambersign Root - 2008
-==============================
------BEGIN CERTIFICATE-----
-MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
-MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
-bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
-QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
-NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
-Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
-QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
-aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
-VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf
-XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0
-ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB
-/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA
-TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M
-H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe
-Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF
-HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
-wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB
-AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT
-BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE
-BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm
-aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm
-aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp
-1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
-dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
-/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
-ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
-dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
-9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
-foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
-qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
-P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
-c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
-09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
------END CERTIFICATE-----
-
Go Daddy Root Certificate Authority - G2
========================================
-----BEGIN CERTIFICATE-----
@@ -1601,60 +896,6 @@ tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29
mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
-----END CERTIFICATE-----
-EC-ACC
-======
------BEGIN CERTIFICATE-----
-MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE
-BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w
-ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD
-VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE
-CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT
-BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7
-MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt
-SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl
-Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh
-cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK
-w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT
-ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4
-HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a
-E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw
-0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E
-BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD
-VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0
-Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l
-dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
-lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
-Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
-l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
-E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
-5EI=
------END CERTIFICATE-----
-
-Hellenic Academic and Research Institutions RootCA 2011
-=======================================================
------BEGIN CERTIFICATE-----
-MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT
-O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y
-aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
-IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT
-AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
-IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo
-IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI
-1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa
-71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u
-8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH
-3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/
-MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8
-MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu
-b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt
-XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
-TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD
-/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N
-7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4
------END CERTIFICATE-----
-
Actalis Authentication Root CA
==============================
-----BEGIN CERTIFICATE-----
@@ -1686,27 +927,6 @@ OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
-----END CERTIFICATE-----
-Trustis FPS Root CA
-===================
------BEGIN CERTIFICATE-----
-MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG
-EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290
-IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV
-BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ
-RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk
-H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa
-cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt
-o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA
-AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd
-BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c
-GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC
-yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P
-8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV
-l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl
-iB6XzCGcKQENZetX2fNXlrtIzYE=
------END CERTIFICATE-----
-
Buypass Class 2 Root CA
=======================
-----BEGIN CERTIFICATE-----
@@ -1789,30 +1009,6 @@ P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
-----END CERTIFICATE-----
-EE Certification Centre Root CA
-===============================
------BEGIN CERTIFICATE-----
-MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
-EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy
-dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw
-MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB
-UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy
-ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
-DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM
-TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2
-rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw
-93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN
-P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T
-AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ
-MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF
-BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj
-xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM
-lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
-uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU
-3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM
-dcGWxZ0=
------END CERTIFICATE-----
-
D-TRUST Root Class 3 CA 2 2009
==============================
-----BEGIN CERTIFICATE-----
@@ -1991,40 +1187,6 @@ Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems
WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
-----END CERTIFICATE-----
-E-Tugra Certification Authority
-===============================
------BEGIN CERTIFICATE-----
-MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w
-DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls
-ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
-ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw
-NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx
-QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl
-cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD
-DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
-MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd
-hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K
-CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g
-ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ
-BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0
-E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz
-rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq
-jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn
-rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5
-dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB
-/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG
-MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK
-kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO
-XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807
-VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo
-a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc
-dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV
-KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT
-Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0
-8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G
-C7TbO6Orb1wdtn7os4I07QZcJA==
------END CERTIFICATE-----
-
T-TeleSec GlobalRoot Class 2
============================
-----BEGIN CERTIFICATE-----
@@ -2346,20 +1508,6 @@ HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu
9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
-----END CERTIFICATE-----
-GlobalSign ECC Root CA - R4
-===========================
------BEGIN CERTIFICATE-----
-MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb
-R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
-EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
-R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
-EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl
-OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P
-AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV
-MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF
-JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q=
------END CERTIFICATE-----
-
GlobalSign ECC Root CA - R5
===========================
-----BEGIN CERTIFICATE-----
@@ -2375,66 +1523,6 @@ uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
-----END CERTIFICATE-----
-Staat der Nederlanden Root CA - G3
-==================================
------BEGIN CERTIFICATE-----
-MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC
-TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
-ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y
-olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t
-x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy
-EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K
-Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur
-mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5
-1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp
-07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo
-FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE
-41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB
-AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu
-yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD
-U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq
-KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1
-v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA
-8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b
-8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r
-mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq
-1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI
-JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV
-tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk=
------END CERTIFICATE-----
-
-Staat der Nederlanden EV Root CA
-================================
------BEGIN CERTIFICATE-----
-MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
-MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
-cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
-SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
-O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
-0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
-Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV
-XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr
-08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV
-0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd
-74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx
-fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC
-MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa
-ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI
-eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu
-c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq
-5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN
-b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN
-f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi
-5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4
-WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK
-DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
-eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
------END CERTIFICATE-----
-
IdenTrust Commercial Root CA 1
==============================
-----BEGIN CERTIFICATE-----
@@ -2831,37 +1919,6 @@ MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1
AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA==
-----END CERTIFICATE-----
-LuxTrust Global Root 2
-======================
------BEGIN CERTIFICATE-----
-MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG
-A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh
-bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW
-MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC
-AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm
-Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2
-xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC
-wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm
-1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm
-FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF
-wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/
-a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U
-ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ
-MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB
-/zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5
-Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT
-+Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ
-FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN
-H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW
-7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu
-ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA
-VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR
-TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt
-/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc
-7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I
-iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr
------END CERTIFICATE-----
-
TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
=============================================
-----BEGIN CERTIFICATE-----
@@ -2917,87 +1974,6 @@ F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ
aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==
-----END CERTIFICATE-----
-TrustCor RootCert CA-1
-======================
------BEGIN CERTIFICATE-----
-MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP
-MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
-U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
-dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx
-MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu
-YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe
-VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy
-dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq
-jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4
-pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0
-JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h
-gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw
-/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j
-BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
-AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5
-mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf
-ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C
-qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P
-3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk=
------END CERTIFICATE-----
-
-TrustCor RootCert CA-2
-======================
------BEGIN CERTIFICATE-----
-MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w
-DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT
-eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0
-eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy
-MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h
-bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U
-cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0
-IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb
-ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk
-RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1
-oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb
-XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1
-/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q
-jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP
-eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg
-rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh
-8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU
-2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD
-VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h
-Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp
-kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv
-2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3
-S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw
-PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv
-DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU
-RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE
-xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX
-RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ
------END CERTIFICATE-----
-
-TrustCor ECA-1
-==============
------BEGIN CERTIFICATE-----
-MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP
-MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
-U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
-dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw
-N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5
-MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y
-IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR
-MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23
-xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc
-p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+
-fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj
-YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL
-f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF
-AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u
-/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F
-hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs
-J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC
-jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g==
------END CERTIFICATE-----
-
SSL.com Root Certification Authority RSA
========================================
-----BEGIN CERTIFICATE-----
@@ -3142,96 +2118,6 @@ AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk
AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9
-----END CERTIFICATE-----
-GTS Root R1
-===========
------BEGIN CERTIFICATE-----
-MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG
-EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv
-b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG
-A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi
-MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx
-9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r
-aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW
-r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM
-LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly
-4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr
-06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92
-wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om
-3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu
-JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD
-VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM
-BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1
-d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv
-fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm
-ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b
-gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq
-4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr
-tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo
-pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0
-sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql
-CFF1pkgl
------END CERTIFICATE-----
-
-GTS Root R2
-===========
------BEGIN CERTIFICATE-----
-MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG
-EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv
-b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG
-A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi
-MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk
-k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo
-7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI
-m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm
-dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu
-ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz
-cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW
-Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl
-aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy
-5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD
-VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM
-BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT
-vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ
-+YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw
-c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da
-WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r
-n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu
-Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ
-7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs
-gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld
-o/DUhgkC
------END CERTIFICATE-----
-
-GTS Root R3
-===========
------BEGIN CERTIFICATE-----
-MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV
-UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
-UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
-ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq
-hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU
-Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej
-QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP
-0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0
-glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa
-KaqW04MjyaR7YbPMAuhd
------END CERTIFICATE-----
-
-GTS Root R4
-===========
------BEGIN CERTIFICATE-----
-MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV
-UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
-UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
-ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq
-hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa
-6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj
-QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV
-2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI
-N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x
-zPKwTdb+mciUqXWi4w==
------END CERTIFICATE-----
-
UCA Global G2 Root
==================
-----BEGIN CERTIFICATE-----
@@ -3464,3 +2350,1185 @@ JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G
+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT
kcpG2om3PVODLAgfi49T3f+sHw==
-----END CERTIFICATE-----
+
+Microsoft ECC Root Certificate Authority 2017
+=============================================
+-----BEGIN CERTIFICATE-----
+MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
+UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND
+IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4
+MjMxNjA0WjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw
+NAYDVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQ
+BgcqhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZRogPZnZH6
+thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYbhGBKia/teQ87zvH2RPUB
+eMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIy5lycFIM
++Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlf
+Xu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR
+eNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M=
+-----END CERTIFICATE-----
+
+Microsoft RSA Root Certificate Authority 2017
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG
+EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg
+UlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIw
+NzE4MjMwMDIzWjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u
+MTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcw
+ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZNt9GkMml
+7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0ZdDMbRnMlfl7rEqUrQ7e
+S0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw7
+1VdyvD/IybLeS2v4I2wDwAW9lcfNcztmgGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+
+dkC0zVJhUXAoP8XFWvLJjEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49F
+yGcohJUcaDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaGYaRS
+MLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6W6IYZVcSn2i51BVr
+lMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4KUGsTuqwPN1q3ErWQgR5WrlcihtnJ
+0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJ
+ClTUFLkqqNfs+avNJVgyeY+QW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYw
+DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC
+NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZCLgLNFgVZJ8og
+6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OCgMNPOsduET/m4xaRhPtthH80
+dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk
++ONVFT24bcMKpBLBaYVu32TxU5nhSnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex
+/2kskZGT4d9Mozd2TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDy
+AmH3pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGRxpl/j8nW
+ZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiAppGWSZI1b7rCoucL5mxAyE
+7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKT
+c0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D
+5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E
+-----END CERTIFICATE-----
+
+e-Szigno Root CA 2017
+=====================
+-----BEGIN CERTIFICATE-----
+MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw
+DwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt
+MjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJvb3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZa
+Fw00MjA4MjIxMjA3MDZaMHExCzAJBgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UE
+CgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3pp
+Z25vIFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtvxie+RJCx
+s1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+HWyx7xf58etqjYzBhMA8G
+A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSHERUI0arBeAyxr87GyZDv
+vzAEwDAfBgNVHSMEGDAWgBSHERUI0arBeAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEA
+tVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO
+svxyqltZ+efcMQ==
+-----END CERTIFICATE-----
+
+certSIGN Root CA G2
+===================
+-----BEGIN CERTIFICATE-----
+MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw
+EgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy
+MDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJBgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lH
+TiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBAMDFdRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05
+N0IwvlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZuIt4Imfk
+abBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhpn+Sc8CnTXPnGFiWeI8Mg
+wT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKscpc/I1mbySKEwQdPzH/iV8oScLumZfNp
+dWO9lfsbl83kqK/20U6o2YpxJM02PbyWxPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91Qqh
+ngLjYl/rNUssuHLoPj1PrCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732
+jcZZroiFDsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fxDTvf
+95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgyLcsUDFDYg2WD7rlc
+z8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6CeWRgKRM+o/1Pcmqr4tTluCRVLERL
+iohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1Ud
+DgQWBBSCIS1mxteg4BXrzkwJd8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOB
+ywaK8SJJ6ejqkX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC
+b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQlqiCA2ClV9+BB
+/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0OJD7uNGzcgbJceaBxXntC6Z5
+8hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+cNywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5
+BiKDUyUM/FHE5r7iOZULJK2v0ZXkltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklW
+atKcsWMy5WHgUyIOpwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tU
+Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M
+NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N
+0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc=
+-----END CERTIFICATE-----
+
+Trustwave Global Certification Authority
+========================================
+-----BEGIN CERTIFICATE-----
+MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV
+UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2
+ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV
+UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2
+ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29
+zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf
+LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq
+stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o
+WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+
+OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40
+Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE
+uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm
++9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj
+ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB
+BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H
+PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H
+ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla
+4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R
+vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd
+zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O
+856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH
+Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu
+3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP
+29FpHOTKyeC2nOnOcXHebD8WpHk=
+-----END CERTIFICATE-----
+
+Trustwave Global ECC P256 Certification Authority
+=================================================
+-----BEGIN CERTIFICATE-----
+MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER
+MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI
+b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD
+VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy
+dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1
+NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj
+43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm
+P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt
+0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz
+RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7
+-----END CERTIFICATE-----
+
+Trustwave Global ECC P384 Certification Authority
+=================================================
+-----BEGIN CERTIFICATE-----
+MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER
+MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI
+b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD
+VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy
+dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4
+NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH
+Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr
+/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV
+HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn
+ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl
+CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw==
+-----END CERTIFICATE-----
+
+NAVER Global Root Certification Authority
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG
+A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD
+DClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4
+NDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT
+UyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb
+UGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW
++j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7
+XNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2
+aacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4
+Yb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z
+VHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B
+A0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai
+cdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy
+YhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV
+HQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB
+Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK
+21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB
+jCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx
+hYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg
+E34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH
+D8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ
+A76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY
+qqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG
+I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg
+kpzNNIaRkPpkUZ3+/uul9XXeifdy
+-----END CERTIFICATE-----
+
+AC RAIZ FNMT-RCM SERVIDORES SEGUROS
+===================================
+-----BEGIN CERTIFICATE-----
+MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF
+UzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy
+NjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1SQ00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4
+MTIyMDA5MzczM1oXDTQzMTIyMDA5MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQt
+UkNNMQ4wDAYDVQQLDAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNB
+QyBSQUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuBBAAiA2IA
+BPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LHsbI6GA60XYyzZl2hNPk2
+LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oKUm8BA06Oi6NCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqG
+SM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD
+zBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c=
+-----END CERTIFICATE-----
+
+GlobalSign Root R46
+===================
+-----BEGIN CERTIFICATE-----
+MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV
+BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv
+b3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAX
+BgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIi
+MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08Es
+CVeJOaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQGvGIFAha/
+r6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud316HCkD7rRlr+/fKYIje
+2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo0q3v84RLHIf8E6M6cqJaESvWJ3En7YEt
+bWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSEy132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvj
+K8Cd+RTyG/FWaha/LIWFzXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD4
+12lPFzYE+cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCNI/on
+ccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzsx2sZy/N78CsHpdls
+eVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqaByFrgY/bxFn63iLABJzjqls2k+g9
+vXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYD
+VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEM
+BQADggIBAHx47PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg
+JuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti2kM3S+LGteWy
+gxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIkpnnpHs6i58FZFZ8d4kuaPp92
+CC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRFFRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZm
+OUdkLG5NrmJ7v2B0GbhWrJKsFjLtrWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qq
+JZ4d16GLuc1CLgSkZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwye
+qiv5u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP4vkYxboz
+nxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6N3ec592kD3ZDZopD8p/7
+DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3
+QEUxeCp6
+-----END CERTIFICATE-----
+
+GlobalSign Root E46
+===================
+-----BEGIN CERTIFICATE-----
+MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT
+AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg
+RTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNV
+BAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcq
+hkjOPQIBBgUrgQQAIgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkB
+jtjqR+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGddyXqBPCCj
+QjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQxCpCPtsad0kRL
+gLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk
+vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+
+CAezNIm8BZ/3Hobui3A=
+-----END CERTIFICATE-----
+
+GLOBALTRUST 2020
+================
+-----BEGIN CERTIFICATE-----
+MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx
+IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT
+VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh
+BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy
+MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi
+D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO
+VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM
+CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm
+fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA
+A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR
+JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG
+DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU
+clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ
+mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud
+IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA
+VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw
+4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9
+iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS
+8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2
+HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS
+vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918
+oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF
+YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl
+gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
+-----END CERTIFICATE-----
+
+ANF Secure Server Root CA
+=========================
+-----BEGIN CERTIFICATE-----
+MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4
+NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv
+bjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg
+Q0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw
+MQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw
+EgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC
+AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz
+BE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv
+T1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv
+B2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse
+zx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM
+VwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j
+7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z
+JTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe
+8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO
+Hj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj
+o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E
+BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ
+UqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx
+j6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt
+dD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM
+5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb
+5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54
+EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H
+hk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy
+g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3
+r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw=
+-----END CERTIFICATE-----
+
+Certum EC-384 CA
+================
+-----BEGIN CERTIFICATE-----
+MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ
+TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy
+dGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2
+MDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh
+dGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx
+GTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq
+vm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn
+iBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo
+ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0
+QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k=
+-----END CERTIFICATE-----
+
+Certum Trusted Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG
+EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew
+HhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY
+QXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p
+fktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52
+HO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2
+fJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt
+g/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4
+NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk
+fVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ
+P/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY
+njYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK
+HRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1
+vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL
+LtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s
+ALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K
+h2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8
+CYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA
+4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo
+WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj
+6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT
+OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck
+bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb
+-----END CERTIFICATE-----
+
+TunTrust Root CA
+================
+-----BEGIN CERTIFICATE-----
+MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG
+A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj
+dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw
+NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD
+ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz
+2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b
+bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7
+NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd
+gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW
+VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f
+Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ
+juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas
+DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS
+VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI
+04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0
+90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl
+0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd
+Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY
+YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp
+adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x
+xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP
+jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM
+MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z
+ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r
+AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o=
+-----END CERTIFICATE-----
+
+HARICA TLS RSA Root CA 2021
+===========================
+-----BEGIN CERTIFICATE-----
+MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG
+EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
+cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz
+OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl
+bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB
+IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN
+JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu
+a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y
+Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K
+5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv
+dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR
+0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH
+GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm
+haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ
+CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G
+A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU
+EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq
+QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD
+QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR
+j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5
+vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0
+qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6
+Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/
+PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn
+kf3/W9b3raYvAwtt41dU63ZTGI0RmLo=
+-----END CERTIFICATE-----
+
+HARICA TLS ECC Root CA 2021
+===========================
+-----BEGIN CERTIFICATE-----
+MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH
+UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD
+QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX
+DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj
+IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv
+b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l
+AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b
+ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW
+0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi
+rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw
+CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps
+-----END CERTIFICATE-----
+
+Autoridad de Certificacion Firmaprofesional CIF A62634068
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCRVMxQjBA
+BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIw
+QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
+NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
+Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
+B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
+7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
+ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
+plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
+MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
+LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
+bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
+vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1Ud
+DgQWBBRlzeurNR4APn7VdMActHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4w
+gZswgZgGBFUdIAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j
+b20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABCAG8AbgBhAG4A
+bwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAwADEANzAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9miWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL
+4QjbEwj4KKE1soCzC1HA01aajTNFSa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDb
+LIpgD7dvlAceHabJhfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1il
+I45PVf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZEEAEeiGaP
+cjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV1aUsIC+nmCjuRfzxuIgA
+LI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2tCsvMo2ebKHTEm9caPARYpoKdrcd7b/+A
+lun4jWq9GJAd/0kakFI3ky88Al2CdgtR5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH
+9IBk9W6VULgRfhVwOEqwf9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpf
+NIbnYrX9ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNKGbqE
+ZycPvEJdvSRUDewdcAZfpLz6IHxV
+-----END CERTIFICATE-----
+
+vTrus ECC Root CA
+=================
+-----BEGIN CERTIFICATE-----
+MIICDzCCAZWgAwIBAgIUbmq8WapTvpg5Z6LSa6Q75m0c1towCgYIKoZIzj0EAwMwRzELMAkGA1UE
+BhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBS
+b290IENBMB4XDTE4MDczMTA3MjY0NFoXDTQzMDczMTA3MjY0NFowRzELMAkGA1UEBhMCQ04xHDAa
+BgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBSb290IENBMHYw
+EAYHKoZIzj0CAQYFK4EEACIDYgAEZVBKrox5lkqqHAjDo6LN/llWQXf9JpRCux3NCNtzslt188+c
+ToL0v/hhJoVs1oVbcnDS/dtitN9Ti72xRFhiQgnH+n9bEOf+QP3A2MMrMudwpremIFUde4BdS49n
+TPEQo0IwQDAdBgNVHQ4EFgQUmDnNvtiyjPeyq+GtJK97fKHbH88wDwYDVR0TAQH/BAUwAwEB/zAO
+BgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIwV53dVvHH4+m4SVBrm2nDb+zDfSXkV5UT
+QJtS0zvzQBm8JsctBp61ezaf9SXUY2sAAjEA6dPGnlaaKsyh2j/IZivTWJwghfqrkYpwcBE4YGQL
+YgmRWAD5Tfs0aNoJrSEGGJTO
+-----END CERTIFICATE-----
+
+vTrus Root CA
+=============
+-----BEGIN CERTIFICATE-----
+MIIFVjCCAz6gAwIBAgIUQ+NxE9izWRRdt86M/TX9b7wFjUUwDQYJKoZIhvcNAQELBQAwQzELMAkG
+A1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xFjAUBgNVBAMTDXZUcnVzIFJv
+b3QgQ0EwHhcNMTgwNzMxMDcyNDA1WhcNNDMwNzMxMDcyNDA1WjBDMQswCQYDVQQGEwJDTjEcMBoG
+A1UEChMTaVRydXNDaGluYSBDby4sTHRkLjEWMBQGA1UEAxMNdlRydXMgUm9vdCBDQTCCAiIwDQYJ
+KoZIhvcNAQEBBQADggIPADCCAgoCggIBAL1VfGHTuB0EYgWgrmy3cLRB6ksDXhA/kFocizuwZots
+SKYcIrrVQJLuM7IjWcmOvFjai57QGfIvWcaMY1q6n6MLsLOaXLoRuBLpDLvPbmyAhykUAyyNJJrI
+ZIO1aqwTLDPxn9wsYTwaP3BVm60AUn/PBLn+NvqcwBauYv6WTEN+VRS+GrPSbcKvdmaVayqwlHeF
+XgQPYh1jdfdr58tbmnDsPmcF8P4HCIDPKNsFxhQnL4Z98Cfe/+Z+M0jnCx5Y0ScrUw5XSmXX+6KA
+YPxMvDVTAWqXcoKv8R1w6Jz1717CbMdHflqUhSZNO7rrTOiwCcJlwp2dCZtOtZcFrPUGoPc2BX70
+kLJrxLT5ZOrpGgrIDajtJ8nU57O5q4IikCc9Kuh8kO+8T/3iCiSn3mUkpF3qwHYw03dQ+A0Em5Q2
+AXPKBlim0zvc+gRGE1WKyURHuFE5Gi7oNOJ5y1lKCn+8pu8fA2dqWSslYpPZUxlmPCdiKYZNpGvu
+/9ROutW04o5IWgAZCfEF2c6Rsffr6TlP9m8EQ5pV9T4FFL2/s1m02I4zhKOQUqqzApVg+QxMaPnu
+1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHWOXSuTEGC2/KmSNGzm/MzqvOmwMVO
+9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMBAAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYg
+scasGrz2iTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOC
+AgEAKbqSSaet8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd
+nxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1jbhd47F18iMjr
+jld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvMKar5CKXiNxTKsbhm7xqC5PD4
+8acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIivTDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJn
+xDHO2zTlJQNgJXtxmOTAGytfdELSS8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554Wg
+icEFOwE30z9J4nfrI8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4
+sEb9b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNBUvupLnKW
+nyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1PTi07NEPhmg4NpGaXutIc
+SkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929vensBxXVsFy6K2ir40zSbofitzmdHxghm+H
+l3s=
+-----END CERTIFICATE-----
+
+ISRG Root X2
+============
+-----BEGIN CERTIFICATE-----
+MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQswCQYDVQQGEwJV
+UzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElT
+UkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVT
+MSkwJwYDVQQKEyBJbnRlcm5ldCBTZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNS
+RyBSb290IFgyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0H
+ttwW+1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9ItgKbppb
+d9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
+HQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZIzj0EAwMDaAAwZQIwe3lORlCEwkSHRhtF
+cP9Ymd70/aTSVaYgLXTWNLxBo1BfASdWtL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5
+U6VR5CmD1/iQMVtCnwr1/q4AaOeMSQ+2b1tbFfLn
+-----END CERTIFICATE-----
+
+HiPKI Root CA - G1
+==================
+-----BEGIN CERTIFICATE-----
+MIIFajCCA1KgAwIBAgIQLd2szmKXlKFD6LDNdmpeYDANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQG
+EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xGzAZBgNVBAMMEkhpUEtJ
+IFJvb3QgQ0EgLSBHMTAeFw0xOTAyMjIwOTQ2MDRaFw0zNzEyMzExNTU5NTlaME8xCzAJBgNVBAYT
+AlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQS0kg
+Um9vdCBDQSAtIEcxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9B5/UnMyDHPkvRN0
+o9QwqNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh8Ge6zCFovkRTv4354twvVcg3Px+k
+wJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux55199QmQ5eiY29yTw1S+6lZgRZq2XNdZ1AYDgr/SE
+YYwNHl98h5ZeQa/rh+r4XfEuiAU+TCK72h8q3VJGZDnzQs7ZngyzsHeXZJzA9KMuH5UHsBffMNsA
+GJZMoYFL3QRtU6M9/Aes1MU3guvklQgZKILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfd
+hSi8MEyr48KxRURHH+CKFgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXTT3OUM3ECoWqj
+1jOXTyFjHluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK9p/7qxj3ccC2HTHsOyDry+K4
+9a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8b3ti6RZsR1pl8w4Rm0bZ/W3c1pzAtH2lsN0/
+Vm+h+fbkEkj9Bn8SV7apI09bA8PgcSojt/ewsTu8mL3WmKgMa/aOEmem8rJY5AIJEzypuxC00jBF
+8ez3ABHfZfjcK0NVvxaXxA/VLGGEqnKG/uY6fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaNCMEAwDwYD
+VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ncX+l6o/vY9cdVouslGDDjYr7AwDgYDVR0PAQH/BAQD
+AgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBQUfB13HAE4/+qddRxosuej6ip0691x1TPOhwEmSKsxBHi
+7zNKpiMdDg1H2DfHb680f0+BazVP6XKlMeJ45/dOlBhbQH3PayFUhuaVevvGyuqcSE5XCV0vrPSl
+tJczWNWseanMX/mF+lLFjfiRFOs6DRfQUsJ748JzjkZ4Bjgs6FzaZsT0pPBWGTMpWmWSBUdGSquE
+wx4noR8RkpkndZMPvDY7l1ePJlsMu5wP1G4wB9TcXzZoZjmDlicmisjEOf6aIW/Vcobpf2Lll07Q
+JNBAsNB1CI69aO4I1258EHBGG3zgiLKecoaZAeO/n0kZtCW+VmWuF2PlHt/o/0elv+EmBYTksMCv
+5wiZqAxeJoBF1PhoL5aPruJKHJwWDBNvOIf2u8g0X5IDUXlwpt/L9ZlNec1OvFefQ05rLisY+Gpz
+jLrFNe85akEez3GoorKGB1s6yeHvP2UEgEcyRHCVTjFnanRbEEV16rCf0OY1/k6fi8wrkkVbbiVg
+hUbN0aqwdmaTd5a+g744tiROJgvM7XpWGuDpWsZkrUx6AEhEL7lAuxM+vhV4nYWBSipX3tUZQ9rb
+yltHhoMLP7YNdnhzeSJesYAfz77RP1YQmCuVh6EfnWQUYDksswBVLuT1sw5XxJFBAJw/6KXf6vb/
+yPCtbVKoF6ubYfwSUTXkJf2vqmqGOQ==
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R4
+===========================
+-----BEGIN CERTIFICATE-----
+MIIB3DCCAYOgAwIBAgINAgPlfvU/k/2lCSGypjAKBggqhkjOPQQDAjBQMSQwIgYDVQQLExtHbG9i
+YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds
+b2JhbFNpZ24wHhcNMTIxMTEzMDAwMDAwWhcNMzgwMTE5MDMxNDA3WjBQMSQwIgYDVQQLExtHbG9i
+YWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds
+b2JhbFNpZ24wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4xnnTj2wlDp8uORkcA6SumuU5BwkW
+ymOxuYb4ilfBV85C+nOh92VC/x7BALJucw7/xyHlGKSq2XE/qNS5zowdo0IwQDAOBgNVHQ8BAf8E
+BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVLB7rUW44kB/+wpu+74zyTyjhNUwCgYI
+KoZIzj0EAwIDRwAwRAIgIk90crlgr/HmnKAWBVBfw147bmF0774BxL4YSFlhgjICICadVGNA3jdg
+UM/I2O2dgq43mLyjj0xMqTQrbO/7lZsm
+-----END CERTIFICATE-----
+
+GTS Root R1
+===========
+-----BEGIN CERTIFICATE-----
+MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV
+UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
+UjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
+ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM
+f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0
+xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w
+B7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXW
+nOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk
+9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zq
+kUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92wO1A
+K/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om3xPX
+V2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDW
+cfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T
+AQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQAD
+ggIBAJ+qQibbC5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe
+QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuyh6f88/qBVRRi
+ClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM47HLwEXWdyzRSjeZ2axfG34ar
+J45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8JZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYci
+NuaCp+0KueIHoI17eko8cdLiA6EfMgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5me
+LMFrUKTX5hgUvYU/Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJF
+fbdT6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ0E6yove+
+7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm2tIMPNuzjsmhDYAPexZ3
+FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bbbP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3
+gm3c
+-----END CERTIFICATE-----
+
+GTS Root R2
+===========
+-----BEGIN CERTIFICATE-----
+MIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV
+UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
+UjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
+ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3Lv
+CvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo7JUl
+e3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWIm8Wb
+a96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5GmdFrS
++LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7M
+kogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJG
+r61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RWIr9q
+S34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73VululycslaVNV
+J1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy5okL
+dWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T
+AQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQAD
+ggIBAB/Kzt3HvqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8
+0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyCB19m3H0Q/gxh
+swWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2uNmSRXbBoGOqKYcl3qJfEycel
+/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMgyALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVn
+jWQye+mew4K6Ki3pHrTgSAai/GevHyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y5
+9PYjJbigapordwj6xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M
+7YNRTOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924SgJPFI/2R8
+0L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV7LXTWtiBmelDGDfrs7vR
+WGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjW
+HYbL
+-----END CERTIFICATE-----
+
+GTS Root R3
+===========
+-----BEGIN CERTIFICATE-----
+MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi
+MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMw
+HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ
+R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjO
+PQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout
+736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24CejQjBA
+MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP0/Eq
+Er24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azT
+L818+FsuVbu/3ZL3pAzcMeGiAjEA/JdmZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV
+11RZt+cRLInUue4X
+-----END CERTIFICATE-----
+
+GTS Root R4
+===========
+-----BEGIN CERTIFICATE-----
+MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJVUzEi
+MCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQw
+HhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZ
+R29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjO
+PQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzu
+hXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqjQjBA
+MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV2Py1
+PsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/C
+r8deVl5c1RxYIigL9zC2L7F8AjEA8GE8p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh
+4rsUecrNIdSUtUlD
+-----END CERTIFICATE-----
+
+Telia Root CA v2
+================
+-----BEGIN CERTIFICATE-----
+MIIFdDCCA1ygAwIBAgIPAWdfJ9b+euPkrL4JWwWeMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNVBAYT
+AkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2
+MjAeFw0xODExMjkxMTU1NTRaFw00MzExMjkxMTU1NTRaMEQxCzAJBgNVBAYTAkZJMRowGAYDVQQK
+DBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2MjCCAiIwDQYJKoZI
+hvcNAQEBBQADggIPADCCAgoCggIBALLQPwe84nvQa5n44ndp586dpAO8gm2h/oFlH0wnrI4AuhZ7
+6zBqAMCzdGh+sq/H1WKzej9Qyow2RCRj0jbpDIX2Q3bVTKFgcmfiKDOlyzG4OiIjNLh9vVYiQJ3q
+9HsDrWj8soFPmNB06o3lfc1jw6P23pLCWBnglrvFxKk9pXSW/q/5iaq9lRdU2HhE8Qx3FZLgmEKn
+pNaqIJLNwaCzlrI6hEKNfdWV5Nbb6WLEWLN5xYzTNTODn3WhUidhOPFZPY5Q4L15POdslv5e2QJl
+tI5c0BE0312/UqeBAMN/mUWZFdUXyApT7GPzmX3MaRKGwhfwAZ6/hLzRUssbkmbOpFPlob/E2wnW
+5olWK8jjfN7j/4nlNW4o6GwLI1GpJQXrSPjdscr6bAhR77cYbETKJuFzxokGgeWKrLDiKca5JLNr
+RBH0pUPCTEPlcDaMtjNXepUugqD0XBCzYYP2AgWGLnwtbNwDRm41k9V6lS/eINhbfpSQBGq6WT0E
+BXWdN6IOLj3rwaRSg/7Qa9RmjtzG6RJOHSpXqhC8fF6CfaamyfItufUXJ63RDolUK5X6wK0dmBR4
+M0KGCqlztft0DbcbMBnEWg4cJ7faGND/isgFuvGqHKI3t+ZIpEYslOqodmJHixBTB0hXbOKSTbau
+BcvcwUpej6w9GU7C7WB1K9vBykLVAgMBAAGjYzBhMB8GA1UdIwQYMBaAFHKs5DN5qkWH9v2sHZ7W
+xy+G2CQ5MB0GA1UdDgQWBBRyrOQzeapFh/b9rB2e1scvhtgkOTAOBgNVHQ8BAf8EBAMCAQYwDwYD
+VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAoDtZpwmUPjaE0n4vOaWWl/oRrfxn83EJ
+8rKJhGdEr7nv7ZbsnGTbMjBvZ5qsfl+yqwE2foH65IRe0qw24GtixX1LDoJt0nZi0f6X+J8wfBj5
+tFJ3gh1229MdqfDBmgC9bXXYfef6xzijnHDoRnkDry5023X4blMMA8iZGok1GTzTyVR8qPAs5m4H
+eW9q4ebqkYJpCh3DflminmtGFZhb069GHWLIzoBSSRE/yQQSwxN8PzuKlts8oB4KtItUsiRnDe+C
+y748fdHif64W1lZYudogsYMVoe+KTTJvQS8TUoKU1xrBeKJR3Stwbbca+few4GeXVtt8YVMJAygC
+QMez2P2ccGrGKMOF6eLtGpOg3kuYooQ+BXcBlj37tCAPnHICehIv1aO6UXivKitEZU61/Qrowc15
+h2Er3oBXRb9n8ZuRXqWk7FlIEA04x7D6w0RtBPV4UBySllva9bguulvP5fBqnUsvWHMtTy3EHD70
+sz+rFQ47GUGKpMFXEmZxTPpT41frYpUJnlTd0cI8Vzy9OK2YZLe4A5pTVmBds9hCG1xLEooc6+t9
+xnppxyd/pPiL8uSUZodL6ZQHCRJ5irLrdATczvREWeAWysUsWNc8e89ihmpQfTU2Zqf7N+cox9jQ
+raVplI/owd8k+BsHMYeB2F326CjYSlKArBPuUBQemMc=
+-----END CERTIFICATE-----
+
+D-TRUST BR Root CA 1 2020
+=========================
+-----BEGIN CERTIFICATE-----
+MIIC2zCCAmCgAwIBAgIQfMmPK4TX3+oPyWWa00tNljAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE
+RTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEJSIFJvb3QgQ0EgMSAy
+MDIwMB4XDTIwMDIxMTA5NDUwMFoXDTM1MDIxMTA5NDQ1OVowSDELMAkGA1UEBhMCREUxFTATBgNV
+BAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDEgMjAyMDB2MBAG
+ByqGSM49AgEGBSuBBAAiA2IABMbLxyjR+4T1mu9CFCDhQ2tuda38KwOE1HaTJddZO0Flax7mNCq7
+dPYSzuht56vkPE4/RAiLzRZxy7+SmfSk1zxQVFKQhYN4lGdnoxwJGT11NIXe7WB9xwy0QVK5buXu
+QqOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHOREKv/VbNafAkl1bK6CKBrqx9t
+MA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu
+bmV0L2NybC9kLXRydXN0X2JyX3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj
+dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwQlIlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP
+PUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD
+AwNpADBmAjEAlJAtE/rhY/hhY+ithXhUkZy4kzg+GkHaQBZTQgjKL47xPoFWwKrY7RjEsK70Pvom
+AjEA8yjixtsrmfu3Ubgko6SUeho/5jbiA1czijDLgsfWFBHVdWNbFJWcHwHP2NVypw87
+-----END CERTIFICATE-----
+
+D-TRUST EV Root CA 1 2020
+=========================
+-----BEGIN CERTIFICATE-----
+MIIC2zCCAmCgAwIBAgIQXwJB13qHfEwDo6yWjfv/0DAKBggqhkjOPQQDAzBIMQswCQYDVQQGEwJE
+RTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRSVVNUIEVWIFJvb3QgQ0EgMSAy
+MDIwMB4XDTIwMDIxMTEwMDAwMFoXDTM1MDIxMTA5NTk1OVowSDELMAkGA1UEBhMCREUxFTATBgNV
+BAoTDEQtVHJ1c3QgR21iSDEiMCAGA1UEAxMZRC1UUlVTVCBFViBSb290IENBIDEgMjAyMDB2MBAG
+ByqGSM49AgEGBSuBBAAiA2IABPEL3YZDIBnfl4XoIkqbz52Yv7QFJsnL46bSj8WeeHsxiamJrSc8
+ZRCC/N/DnU7wMyPE0jL1HLDfMxddxfCxivnvubcUyilKwg+pf3VlSSowZ/Rk99Yad9rDwpdhQntJ
+raOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFH8QARY3OqQo5FD4pPfsazK2/umL
+MA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6gPKA6hjhodHRwOi8vY3JsLmQtdHJ1c3Qu
+bmV0L2NybC9kLXRydXN0X2V2X3Jvb3RfY2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVj
+dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwRVYlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxP
+PUQtVHJ1c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjOPQQD
+AwNpADBmAjEAyjzGKnXCXnViOTYAYFqLwZOZzNnbQTs7h5kXO9XMT8oi96CAy/m0sRtW9XLS/BnR
+AjEAkfcwkz8QRitxpNA7RJvAKQIFskF3UfN5Wp6OFKBOQtJbgfM0agPnIjhQW+0ZT0MW
+-----END CERTIFICATE-----
+
+DigiCert TLS ECC P384 Root G5
+=============================
+-----BEGIN CERTIFICATE-----
+MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURpZ2lDZXJ0IFRMUyBFQ0MgUDM4
+NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDkRpZ2lDZXJ0LCBJbmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQg
+Um9vdCBHNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1Tzvd
+lHJS7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp0zVozptj
+n4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICISB4CIfBFqMA4GA1UdDwEB
+/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQCJao1H5+z8blUD2Wds
+Jk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQLgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIx
+AJSdYsiJvRmEFOml+wG4DXZDjC5Ty3zfDBeWUA==
+-----END CERTIFICATE-----
+
+DigiCert TLS RSA4096 Root G5
+============================
+-----BEGIN CERTIFICATE-----
+MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBNMQswCQYDVQQG
+EwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0
+MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcNNDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2
+IFJvb3QgRzUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS8
+7IE+ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG02C+JFvuU
+AT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgpwgscONyfMXdcvyej/Ces
+tyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZMpG2T6T867jp8nVid9E6P/DsjyG244gXa
+zOvswzH016cpVIDPRFtMbzCe88zdH5RDnU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnV
+DdXifBBiqmvwPXbzP6PosMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9q
+TXeXAaDxZre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cdLvvy
+z6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvXKyY//SovcfXWJL5/
+MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNeXoVPzthwiHvOAbWWl9fNff2C+MIk
+wcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPLtgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4E
+FgQUUTMc7TZArxfTJc1paPKvTiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8w
+DQYJKoZIhvcNAQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw
+GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7HPNtQOa27PShN
+lnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLFO4uJ+DQtpBflF+aZfTCIITfN
+MBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQREtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/
+u4cnYiWB39yhL/btp/96j1EuMPikAdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9G
+OUrYU9DzLjtxpdRv/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh
+47a+p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilwMUc/dNAU
+FvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WFqUITVuwhd4GTWgzqltlJ
+yqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCKovfepEWFJqgejF0pW8hL2JpqA15w8oVP
+bEtoL8pU9ozaMv7Da4M/OMZ+
+-----END CERTIFICATE-----
+
+Certainly Root R1
+=================
+-----BEGIN CERTIFICATE-----
+MIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAwPTELMAkGA1UE
+BhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2VydGFpbmx5IFJvb3QgUjEwHhcN
+MjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2Vy
+dGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBANA21B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O
+5MQTvqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbedaFySpvXl
+8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b01C7jcvk2xusVtyWMOvwl
+DbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGI
+XsXwClTNSaa/ApzSRKft43jvRl5tcdF5cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkN
+KPl6I7ENPT2a/Z2B7yyQwHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQ
+AjeZjOVJ6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA2Cnb
+rlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyHWyf5QBGenDPBt+U1
+VwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMReiFPCyEQtkA6qyI6BJyLm4SGcprS
+p6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
+DgQWBBTgqj8ljZ9EXME66C6ud0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAsz
+HQNTVfSVcOQrPbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d
+8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi1wrykXprOQ4v
+MMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrdrRT90+7iIgXr0PK3aBLXWopB
+GsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9ditaY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+
+gjwN/KUD+nsa2UUeYNrEjvn8K8l7lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgH
+JBu6haEaBQmAupVjyTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7
+fpYnKx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLyyCwzk5Iw
+x06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5nwXARPbv0+Em34yaXOp/S
+X3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6OV+KmalBWQewLK8=
+-----END CERTIFICATE-----
+
+Certainly Root E1
+=================
+-----BEGIN CERTIFICATE-----
+MIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQswCQYDVQQGEwJV
+UzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlubHkgUm9vdCBFMTAeFw0yMTA0
+MDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJBgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlu
+bHkxGjAYBgNVBAMTEUNlcnRhaW5seSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4
+fxzf7flHh4axpMCK+IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9
+YBk2QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4hevIIgcwCgYIKoZIzj0E
+AwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozmut6Dacpps6kFtZaSF4fC0urQe87YQVt8
+rgIwRt7qy12a7DLCZRawTDBcMPPaTnOGBtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR
+-----END CERTIFICATE-----
+
+Security Communication RootCA3
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQMSUw
+IwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1cml0eSBD
+b21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQsw
+CQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UE
+AxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4rCmDvu20r
+hvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzAlrenfna84xtSGc4RHwsE
+NPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MGTfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2
+/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF79+qMHIjH7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGm
+npjKIG58u4iFW/vAEGK78vknR+/RiTlDxN/e4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtY
+XLVqAvO4g160a75BflcJdURQVc1aEWEhCmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3weGVPK
+p7FKFSBWFHA9K4IsD50VHUeAR/94mQ4xr28+j+2GaR57GIgUssL8gjMunEst+3A7caoreyYn8xrC
+3PsXuKHqy6C0rtOUfnrQq8PsOC0RLoi/1D+tEjtCrI8Cbn3M0V9hvqG8OmpI6iZVIhZdXw3/JzOf
+GAN0iltSIEdrRU0id4xVJ/CvHozJgyJUt5rQT9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0Vcw
+CBEF/VfR2ccCAwEAAaNCMEAwHQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB
+/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybS
+YpOnpSNyByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PAFNr0Y/Dq9HHu
+Tofjcan0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd9XbXv8S2gVj/yP9kaWJ5rW4O
+H3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQIUYWg9by0F1jqClx6vWPGOi//lkkZhOpn2ASx
+YfQAW0q3nHE3GYV5v4GwxxMOdnE+OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQDdwj98ClZ
+XSEIx2C/pHF7uNkegr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO0QR4ynKudtml
++LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUVnuiZIesn
+KwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD2NCcnWXL0CsnMQMeNuE9
+dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm
+6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR16/9M51NZg==
+-----END CERTIFICATE-----
+
+Security Communication ECC RootCA1
+==================================
+-----BEGIN CERTIFICATE-----
+MIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYTAkpQMSUwIwYD
+VQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMSswKQYDVQQDEyJTZWN1cml0eSBDb21t
+dW5pY2F0aW9uIEVDQyBSb290Q0ExMB4XDTE2MDYxNjA1MTUyOFoXDTM4MDExODA1MTUyOFowYTEL
+MAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKzApBgNV
+BAMTIlNlY3VyaXR5IENvbW11bmljYXRpb24gRUNDIFJvb3RDQTEwdjAQBgcqhkjOPQIBBgUrgQQA
+IgNiAASkpW9gAwPDvTH00xecK4R1rOX9PVdu12O/5gSJko6BnOPpR27KkBLIE+CnnfdldB9sELLo
+5OnvbYUymUSxXv3MdhDYW72ixvnWQuRXdtyQwjWpS4g8EkdtXP9JTxpKULGjQjBAMB0GA1UdDgQW
+BBSGHOf+LaVKiwj+KBH6vqNm+GBZLzAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAK
+BggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3L
+snNdo4gIxwwCMQDAqy0Obe0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70e
+N9k=
+-----END CERTIFICATE-----
+
+BJCA Global Root CA1
+====================
+-----BEGIN CERTIFICATE-----
+MIIFdDCCA1ygAwIBAgIQVW9l47TZkGobCdFsPsBsIDANBgkqhkiG9w0BAQsFADBUMQswCQYDVQQG
+EwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJK
+Q0EgR2xvYmFsIFJvb3QgQ0ExMB4XDTE5MTIxOTAzMTYxN1oXDTQ0MTIxMjAzMTYxN1owVDELMAkG
+A1UEBhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQD
+DBRCSkNBIEdsb2JhbCBSb290IENBMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPFm
+CL3ZxRVhy4QEQaVpN3cdwbB7+sN3SJATcmTRuHyQNZ0YeYjjlwE8R4HyDqKYDZ4/N+AZspDyRhyS
+sTphzvq3Rp4Dhtczbu33RYx2N95ulpH3134rhxfVizXuhJFyV9xgw8O558dnJCNPYwpj9mZ9S1Wn
+P3hkSWkSl+BMDdMJoDIwOvqfwPKcxRIqLhy1BDPapDgRat7GGPZHOiJBhyL8xIkoVNiMpTAK+BcW
+yqw3/XmnkRd4OJmtWO2y3syJfQOcs4ll5+M7sSKGjwZteAf9kRJ/sGsciQ35uMt0WwfCyPQ10WRj
+eulumijWML3mG90Vr4TqnMfK9Q7q8l0ph49pczm+LiRvRSGsxdRpJQaDrXpIhRMsDQa4bHlW/KNn
+MoH1V6XKV0Jp6VwkYe/iMBhORJhVb3rCk9gZtt58R4oRTklH2yiUAguUSiz5EtBP6DF+bHq/pj+b
+OT0CFqMYs2esWz8sgytnOYFcuX6U1WTdno9uruh8W7TXakdI136z1C2OVnZOz2nxbkRs1CTqjSSh
+GL+9V/6pmTW12xB3uD1IutbB5/EjPtffhZ0nPNRAvQoMvfXnjSXWgXSHRtQpdaJCbPdzied9v3pK
+H9MiyRVVz99vfFXQpIsHETdfg6YmV6YBW37+WGgHqel62bno/1Afq8K0wM7o6v0PvY1NuLxxAgMB
+AAGjQjBAMB0GA1UdDgQWBBTF7+3M2I0hxkjk49cULqcWk+WYATAPBgNVHRMBAf8EBTADAQH/MA4G
+A1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAUoKsITQfI/Ki2Pm4rzc2IInRNwPWaZ+4
+YRC6ojGYWUfo0Q0lHhVBDOAqVdVXUsv45Mdpox1NcQJeXyFFYEhcCY5JEMEE3KliawLwQ8hOnThJ
+dMkycFRtwUf8jrQ2ntScvd0g1lPJGKm1Vrl2i5VnZu69mP6u775u+2D2/VnGKhs/I0qUJDAnyIm8
+60Qkmss9vk/Ves6OF8tiwdneHg56/0OGNFK8YT88X7vZdrRTvJez/opMEi4r89fO4aL/3Xtw+zuh
+TaRjAv04l5U/BXCga99igUOLtFkNSoxUnMW7gZ/NfaXvCyUeOiDbHPwfmGcCCtRzRBPbUYQaVQNW
+4AB+dAb/OMRyHdOoP2gxXdMJxy6MW2Pg6Nwe0uxhHvLe5e/2mXZgLR6UcnHGCyoyx5JO1UbXHfmp
+GQrI+pXObSOYqgs4rZpWDW+N8TEAiMEXnM0ZNjX+VVOg4DwzX5Ze4jLp3zO7Bkqp2IRzznfSxqxx
+4VyjHQy7Ct9f4qNx2No3WqB4K/TUfet27fJhcKVlmtOJNBir+3I+17Q9eVzYH6Eze9mCUAyTF6ps
+3MKCuwJXNq+YJyo5UOGwifUll35HaBC07HPKs5fRJNz2YqAo07WjuGS3iGJCz51TzZm+ZGiPTx4S
+SPfSKcOYKMryMguTjClPPGAyzQWWYezyr/6zcCwupvI=
+-----END CERTIFICATE-----
+
+BJCA Global Root CA2
+====================
+-----BEGIN CERTIFICATE-----
+MIICJTCCAaugAwIBAgIQLBcIfWQqwP6FGFkGz7RK6zAKBggqhkjOPQQDAzBUMQswCQYDVQQGEwJD
+TjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJKQ0Eg
+R2xvYmFsIFJvb3QgQ0EyMB4XDTE5MTIxOTAzMTgyMVoXDTQ0MTIxMjAzMTgyMVowVDELMAkGA1UE
+BhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRC
+SkNBIEdsb2JhbCBSb290IENBMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABJ3LgJGNU2e1uVCxA/jl
+SR9BIgmwUVJY1is0j8USRhTFiy8shP8sbqjV8QnjAyEUxEM9fMEsxEtqSs3ph+B99iK++kpRuDCK
+/eHeGBIK9ke35xe/J4rUQUyWPGCWwf0VHKNCMEAwHQYDVR0OBBYEFNJKsVF/BvDRgh9Obl+rg/xI
+1LCRMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2gAMGUCMBq8
+W9f+qdJUDkpd0m2xQNz0Q9XSSpkZElaA94M04TVOSG0ED1cxMDAtsaqdAzjbBgIxAMvMh1PLet8g
+UXOQwKhbYdDFUDn9hf7B43j4ptZLvZuHjw/l1lOWqzzIQNph91Oj9w==
+-----END CERTIFICATE-----
+
+Sectigo Public Server Authentication Root E46
+=============================================
+-----BEGIN CERTIFICATE-----
+MIICOjCCAcGgAwIBAgIQQvLM2htpN0RfFf51KBC49DAKBggqhkjOPQQDAzBfMQswCQYDVQQGEwJH
+QjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBTZXJ2
+ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1OTU5
+WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0
+aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUr
+gQQAIgNiAAR2+pmpbiDt+dd34wc7qNs9Xzjoq1WmVk/WSOrsfy2qw7LFeeyZYX8QeccCWvkEN/U0
+NSt3zn8gj1KjAIns1aeibVvjS5KToID1AZTc8GgHHs3u/iVStSBDHBv+6xnOQ6OjQjBAMB0GA1Ud
+DgQWBBTRItpMWfFLXyY4qp3W7usNw/upYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
+/zAKBggqhkjOPQQDAwNnADBkAjAn7qRaqCG76UeXlImldCBteU/IvZNeWBj7LRoAasm4PdCkT0RH
+lAFWovgzJQxC36oCMB3q4S6ILuH5px0CMk7yn2xVdOOurvulGu7t0vzCAxHrRVxgED1cf5kDW21U
+SAGKcw==
+-----END CERTIFICATE-----
+
+Sectigo Public Server Authentication Root R46
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIFijCCA3KgAwIBAgIQdY39i658BwD6qSWn4cetFDANBgkqhkiG9w0BAQwFADBfMQswCQYDVQQG
+EwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBT
+ZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1
+OTU5WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1T
+ZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwggIiMA0GCSqGSIb3
+DQEBAQUAA4ICDwAwggIKAoICAQCTvtU2UnXYASOgHEdCSe5jtrch/cSV1UgrJnwUUxDaef0rty2k
+1Cz66jLdScK5vQ9IPXtamFSvnl0xdE8H/FAh3aTPaE8bEmNtJZlMKpnzSDBh+oF8HqcIStw+Kxwf
+GExxqjWMrfhu6DtK2eWUAtaJhBOqbchPM8xQljeSM9xfiOefVNlI8JhD1mb9nxc4Q8UBUQvX4yMP
+FF1bFOdLvt30yNoDN9HWOaEhUTCDsG3XME6WW5HwcCSrv0WBZEMNvSE6Lzzpng3LILVCJ8zab5vu
+ZDCQOc2TZYEhMbUjUDM3IuM47fgxMMxF/mL50V0yeUKH32rMVhlATc6qu/m1dkmU8Sf4kaWD5Qaz
+Yw6A3OASVYCmO2a0OYctyPDQ0RTp5A1NDvZdV3LFOxxHVp3i1fuBYYzMTYCQNFu31xR13NgESJ/A
+wSiItOkcyqex8Va3e0lMWeUgFaiEAin6OJRpmkkGj80feRQXEgyDet4fsZfu+Zd4KKTIRJLpfSYF
+plhym3kT2BFfrsU4YjRosoYwjviQYZ4ybPUHNs2iTG7sijbt8uaZFURww3y8nDnAtOFr94MlI1fZ
+EoDlSfB1D++N6xybVCi0ITz8fAr/73trdf+LHaAZBav6+CuBQug4urv7qv094PPK306Xlynt8xhW
+6aWWrL3DkJiy4Pmi1KZHQ3xtzwIDAQABo0IwQDAdBgNVHQ4EFgQUVnNYZJX5khqwEioEYnmhQBWI
+IUkwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAC9c
+mTz8Bl6MlC5w6tIyMY208FHVvArzZJ8HXtXBc2hkeqK5Duj5XYUtqDdFqij0lgVQYKlJfp/imTYp
+E0RHap1VIDzYm/EDMrraQKFz6oOht0SmDpkBm+S8f74TlH7Kph52gDY9hAaLMyZlbcp+nv4fjFg4
+exqDsQ+8FxG75gbMY/qB8oFM2gsQa6H61SilzwZAFv97fRheORKkU55+MkIQpiGRqRxOF3yEvJ+M
+0ejf5lG5Nkc/kLnHvALcWxxPDkjBJYOcCj+esQMzEhonrPcibCTRAUH4WAP+JWgiH5paPHxsnnVI
+84HxZmduTILA7rpXDhjvLpr3Etiga+kFpaHpaPi8TD8SHkXoUsCjvxInebnMMTzD9joiFgOgyY9m
+pFuiTdaBJQbpdqQACj7LzTWb4OE4y2BThihCQRxEV+ioratF4yUQvNs+ZUH7G6aXD+u5dHn5Hrwd
+Vw1Hr8Mvn4dGp+smWg9WY7ViYG4A++MnESLn/pmPNPW56MORcr3Ywx65LvKRRFHQV80MNNVIIb/b
+E/FmJUNS0nAiNs2fxBx1IK1jcmMGDw4nztJqDby1ORrp0XZ60Vzk50lJLVU3aPAaOpg+VBeHVOmm
+J1CJeyAvP/+/oYtKR5j/K3tJPsMpRmAYQqszKbrAKbkTidOIijlBO8n9pu0f9GBj39ItVQGL
+-----END CERTIFICATE-----
+
+SSL.com TLS RSA Root CA 2022
+============================
+-----BEGIN CERTIFICATE-----
+MIIFiTCCA3GgAwIBAgIQb77arXO9CEDii02+1PdbkTANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQG
+EwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBSU0Eg
+Um9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2MzQyMloXDTQ2MDgxOTE2MzQyMVowTjELMAkGA1UEBhMC
+VVMxGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgUlNBIFJv
+b3QgQ0EgMjAyMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANCkCXJPQIgSYT41I57u
+9nTPL3tYPc48DRAokC+X94xI2KDYJbFMsBFMF3NQ0CJKY7uB0ylu1bUJPiYYf7ISf5OYt6/wNr/y
+7hienDtSxUcZXXTzZGbVXcdotL8bHAajvI9AI7YexoS9UcQbOcGV0insS657Lb85/bRi3pZ7Qcac
+oOAGcvvwB5cJOYF0r/c0WRFXCsJbwST0MXMwgsadugL3PnxEX4MN8/HdIGkWCVDi1FW24IBydm5M
+R7d1VVm0U3TZlMZBrViKMWYPHqIbKUBOL9975hYsLfy/7PO0+r4Y9ptJ1O4Fbtk085zx7AGL0SDG
+D6C1vBdOSHtRwvzpXGk3R2azaPgVKPC506QVzFpPulJwoxJF3ca6TvvC0PeoUidtbnm1jPx7jMEW
+TO6Af77wdr5BUxIzrlo4QqvXDz5BjXYHMtWrifZOZ9mxQnUjbvPNQrL8VfVThxc7wDNY8VLS+YCk
+8OjwO4s4zKTGkH8PnP2L0aPP2oOnaclQNtVcBdIKQXTbYxE3waWglksejBYSd66UNHsef8JmAOSq
+g+qKkK3ONkRN0VHpvB/zagX9wHQfJRlAUW7qglFA35u5CCoGAtUjHBPW6dvbxrB6y3snm/vg1UYk
+7RBLY0ulBY+6uB0rpvqR4pJSvezrZ5dtmi2fgTIFZzL7SAg/2SW4BCUvAgMBAAGjYzBhMA8GA1Ud
+EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU+y437uOEeicuzRk1sTN8/9REQrkwHQYDVR0OBBYEFPsu
+N+7jhHonLs0ZNbEzfP/UREK5MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAjYlt
+hEUY8U+zoO9opMAdrDC8Z2awms22qyIZZtM7QbUQnRC6cm4pJCAcAZli05bg4vsMQtfhWsSWTVTN
+j8pDU/0quOr4ZcoBwq1gaAafORpR2eCNJvkLTqVTJXojpBzOCBvfR4iyrT7gJ4eLSYwfqUdYe5by
+iB0YrrPRpgqU+tvT5TgKa3kSM/tKWTcWQA673vWJDPFs0/dRa1419dvAJuoSc06pkZCmF8NsLzjU
+o3KUQyxi4U5cMj29TH0ZR6LDSeeWP4+a0zvkEdiLA9z2tmBVGKaBUfPhqBVq6+AL8BQx1rmMRTqo
+ENjwuSfr98t67wVylrXEj5ZzxOhWc5y8aVFjvO9nHEMaX3cZHxj4HCUp+UmZKbaSPaKDN7Egkaib
+MOlqbLQjk2UEqxHzDh1TJElTHaE/nUiSEeJ9DU/1172iWD54nR4fK/4huxoTtrEoZP2wAgDHbICi
+vRZQIA9ygV/MlP+7mea6kMvq+cYMwq7FGc4zoWtcu358NFcXrfA/rs3qr5nsLFR+jM4uElZI7xc7
+P0peYNLcdDa8pUNjyw9bowJWCZ4kLOGGgYz+qxcs+sjiMho6/4UIyYOf8kpIEFR3N+2ivEC+5BB0
+9+Rbu7nzifmPQdjH5FCQNYA+HLhNkNPU98OwoX6EyneSMSy4kLGCenROmxMmtNVQZlR4rmA=
+-----END CERTIFICATE-----
+
+SSL.com TLS ECC Root CA 2022
+============================
+-----BEGIN CERTIFICATE-----
+MIICOjCCAcCgAwIBAgIQFAP1q/s3ixdAW+JDsqXRxDAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV
+UzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBFQ0MgUm9v
+dCBDQSAyMDIyMB4XDTIyMDgyNTE2MzM0OFoXDTQ2MDgxOTE2MzM0N1owTjELMAkGA1UEBhMCVVMx
+GDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgRUNDIFJvb3Qg
+Q0EgMjAyMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABEUpNXP6wrgjzhR9qLFNoFs27iosU8NgCTWy
+JGYmacCzldZdkkAZDsalE3D07xJRKF3nzL35PIXBz5SQySvOkkJYWWf9lCcQZIxPBLFNSeR7T5v1
+5wj4A4j3p8OSSxlUgaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBSJjy+j6CugFFR7
+81a4Jl9nOAuc0DAdBgNVHQ4EFgQUiY8vo+groBRUe/NWuCZfZzgLnNAwDgYDVR0PAQH/BAQDAgGG
+MAoGCCqGSM49BAMDA2gAMGUCMFXjIlbp15IkWE8elDIPDAI2wv2sdDJO4fscgIijzPvX6yv/N33w
+7deedWo1dlJF4AIxAMeNb0Igj762TVntd00pxCAgRWSGOlDGxK0tk/UYfXLtqc/ErFc2KAhl3zx5
+Zn6g6g==
+-----END CERTIFICATE-----
+
+Atos TrustedRoot Root CA ECC TLS 2021
+=====================================
+-----BEGIN CERTIFICATE-----
+MIICFTCCAZugAwIBAgIQPZg7pmY9kGP3fiZXOATvADAKBggqhkjOPQQDAzBMMS4wLAYDVQQDDCVB
+dG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgRUNDIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQswCQYD
+VQQGEwJERTAeFw0yMTA0MjIwOTI2MjNaFw00MTA0MTcwOTI2MjJaMEwxLjAsBgNVBAMMJUF0b3Mg
+VHJ1c3RlZFJvb3QgUm9vdCBDQSBFQ0MgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNVBAYT
+AkRFMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEloZYKDcKZ9Cg3iQZGeHkBQcfl+3oZIK59sRxUM6K
+DP/XtXa7oWyTbIOiaG6l2b4siJVBzV3dscqDY4PMwL502eCdpO5KTlbgmClBk1IQ1SQ4AjJn8ZQS
+b+/Xxd4u/RmAo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR2KCXWfeBmmnoJsmo7jjPX
+NtNPojAOBgNVHQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIwW5kp85wxtolrbNa9d+F851F+
+uDrNozZffPc8dz7kUK2o59JZDCaOMDtuCCrCp1rIAjEAmeMM56PDr9NJLkaCI2ZdyQAUEv049OGY
+a3cpetskz2VAv9LcjBHo9H1/IISpQuQo
+-----END CERTIFICATE-----
+
+Atos TrustedRoot Root CA RSA TLS 2021
+=====================================
+-----BEGIN CERTIFICATE-----
+MIIFZDCCA0ygAwIBAgIQU9XP5hmTC/srBRLYwiqipDANBgkqhkiG9w0BAQwFADBMMS4wLAYDVQQD
+DCVBdG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgUlNBIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQsw
+CQYDVQQGEwJERTAeFw0yMTA0MjIwOTIxMTBaFw00MTA0MTcwOTIxMDlaMEwxLjAsBgNVBAMMJUF0
+b3MgVHJ1c3RlZFJvb3QgUm9vdCBDQSBSU0EgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNV
+BAYTAkRFMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtoAOxHm9BYx9sKOdTSJNy/BB
+l01Z4NH+VoyX8te9j2y3I49f1cTYQcvyAh5x5en2XssIKl4w8i1mx4QbZFc4nXUtVsYvYe+W/CBG
+vevUez8/fEc4BKkbqlLfEzfTFRVOvV98r61jx3ncCHvVoOX3W3WsgFWZkmGbzSoXfduP9LVq6hdK
+ZChmFSlsAvFr1bqjM9xaZ6cF4r9lthawEO3NUDPJcFDsGY6wx/J0W2tExn2WuZgIWWbeKQGb9Cpt
+0xU6kGpn8bRrZtkh68rZYnxGEFzedUlnnkL5/nWpo63/dgpnQOPF943HhZpZnmKaau1Fh5hnstVK
+PNe0OwANwI8f4UDErmwh3El+fsqyjW22v5MvoVw+j8rtgI5Y4dtXz4U2OLJxpAmMkokIiEjxQGMY
+sluMWuPD0xeqqxmjLBvk1cbiZnrXghmmOxYsL3GHX0WelXOTwkKBIROW1527k2gV+p2kHYzygeBY
+Br3JtuP2iV2J+axEoctr+hbxx1A9JNr3w+SH1VbxT5Aw+kUJWdo0zuATHAR8ANSbhqRAvNncTFd+
+rrcztl524WWLZt+NyteYr842mIycg5kDcPOvdO3GDjbnvezBc6eUWsuSZIKmAMFwoW4sKeFYV+xa
+fJlrJaSQOoD0IJ2azsct+bJLKZWD6TWNp0lIpw9MGZHQ9b8Q4HECAwEAAaNCMEAwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUdEmZ0f+0emhFdcN+tNzMzjkz2ggwDgYDVR0PAQH/BAQDAgGGMA0G
+CSqGSIb3DQEBDAUAA4ICAQAjQ1MkYlxt/T7Cz1UAbMVWiLkO3TriJQ2VSpfKgInuKs1l+NsW4AmS
+4BjHeJi78+xCUvuppILXTdiK/ORO/auQxDh1MoSf/7OwKwIzNsAQkG8dnK/haZPso0UvFJ/1TCpl
+Q3IM98P4lYsU84UgYt1UU90s3BiVaU+DR3BAM1h3Egyi61IxHkzJqM7F78PRreBrAwA0JrRUITWX
+AdxfG/F851X6LWh3e9NpzNMOa7pNdkTWwhWaJuywxfW70Xp0wmzNxbVe9kzmWy2B27O3Opee7c9G
+slA9hGCZcbUztVdF5kJHdWoOsAgMrr3e97sPWD2PAzHoPYJQyi9eDF20l74gNAf0xBLh7tew2Vkt
+afcxBPTy+av5EzH4AXcOPUIjJsyacmdRIXrMPIWo6iFqO9taPKU0nprALN+AnCng33eU0aKAQv9q
+TFsR0PXNor6uzFFcw9VUewyu1rkGd4Di7wcaaMxZUa1+XGdrudviB0JbuAEFWDlN5LuYo7Ey7Nmj
+1m+UI/87tyll5gfp77YZ6ufCOB0yiJA8EytuzO+rdwY0d4RPcuSBhPm5dDTedk+SKlOxJTnbPP/l
+PqYO5Wue/9vsL3SD3460s6neFE3/MaNFcyT6lSnMEpcEoji2jbDwN/zIIX8/syQbPYtuzE2wFg2W
+HYMfRsCbvUOZ58SWLs5fyQ==
+-----END CERTIFICATE-----
+
+TrustAsia Global Root CA G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIIFpTCCA42gAwIBAgIUZPYOZXdhaqs7tOqFhLuxibhxkw8wDQYJKoZIhvcNAQEMBQAwWjELMAkG
+A1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xJDAiBgNVBAMM
+G1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHMzAeFw0yMTA1MjAwMjEwMTlaFw00NjA1MTkwMjEw
+MTlaMFoxCzAJBgNVBAYTAkNOMSUwIwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMu
+MSQwIgYDVQQDDBtUcnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzMwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQDAMYJhkuSUGwoqZdC+BqmHO1ES6nBBruL7dOoKjbmzTNyPtxNST1QY4Sxz
+lZHFZjtqz6xjbYdT8PfxObegQ2OwxANdV6nnRM7EoYNl9lA+sX4WuDqKAtCWHwDNBSHvBm3dIZwZ
+Q0WhxeiAysKtQGIXBsaqvPPW5vxQfmZCHzyLpnl5hkA1nyDvP+uLRx+PjsXUjrYsyUQE49RDdT/V
+P68czH5GX6zfZBCK70bwkPAPLfSIC7Epqq+FqklYqL9joDiR5rPmd2jE+SoZhLsO4fWvieylL1Ag
+dB4SQXMeJNnKziyhWTXAyB1GJ2Faj/lN03J5Zh6fFZAhLf3ti1ZwA0pJPn9pMRJpxx5cynoTi+jm
+9WAPzJMshH/x/Gr8m0ed262IPfN2dTPXS6TIi/n1Q1hPy8gDVI+lhXgEGvNz8teHHUGf59gXzhqc
+D0r83ERoVGjiQTz+LISGNzzNPy+i2+f3VANfWdP3kXjHi3dqFuVJhZBFcnAvkV34PmVACxmZySYg
+WmjBNb9Pp1Hx2BErW+Canig7CjoKH8GB5S7wprlppYiU5msTf9FkPz2ccEblooV7WIQn3MSAPmea
+mseaMQ4w7OYXQJXZRe0Blqq/DPNL0WP3E1jAuPP6Z92bfW1K/zJMtSU7/xxnD4UiWQWRkUF3gdCF
+TIcQcf+eQxuulXUtgQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEDk5PIj
+7zjKsK5Xf/IhMBY027ySMB0GA1UdDgQWBBRA5OTyI+84yrCuV3/yITAWNNu8kjAOBgNVHQ8BAf8E
+BAMCAQYwDQYJKoZIhvcNAQEMBQADggIBACY7UeFNOPMyGLS0XuFlXsSUT9SnYaP4wM8zAQLpw6o1
+D/GUE3d3NZ4tVlFEbuHGLige/9rsR82XRBf34EzC4Xx8MnpmyFq2XFNFV1pF1AWZLy4jVe5jaN/T
+G3inEpQGAHUNcoTpLrxaatXeL1nHo+zSh2bbt1S1JKv0Q3jbSwTEb93mPmY+KfJLaHEih6D4sTNj
+duMNhXJEIlU/HHzp/LgV6FL6qj6jITk1dImmasI5+njPtqzn59ZW/yOSLlALqbUHM/Q4X6RJpstl
+cHboCoWASzY9M/eVVHUl2qzEc4Jl6VL1XP04lQJqaTDFHApXB64ipCz5xUG3uOyfT0gA+QEEVcys
++TIxxHWVBqB/0Y0n3bOppHKH/lmLmnp0Ft0WpWIp6zqW3IunaFnT63eROfjXy9mPX1onAX1daBli
+2MjN9LdyR75bl87yraKZk62Uy5P2EgmVtqvXO9A/EcswFi55gORngS1d7XB4tmBZrOFdRWOPyN9y
+aFvqHbgB8X7754qz41SgOAngPN5C8sLtLpvzHzW2NtjjgKGLzZlkD8Kqq7HK9W+eQ42EVJmzbsAS
+ZthwEPEGNTNDqJwuuhQxzhB/HIbjj9LV+Hfsm6vxL2PZQl/gZ4FkkfGXL/xuJvYz+NO1+MRiqzFR
+JQJ6+N1rZdVtTTDIZbpoFGWsJwt0ivKH
+-----END CERTIFICATE-----
+
+TrustAsia Global Root CA G4
+===========================
+-----BEGIN CERTIFICATE-----
+MIICVTCCAdygAwIBAgIUTyNkuI6XY57GU4HBdk7LKnQV1tcwCgYIKoZIzj0EAwMwWjELMAkGA1UE
+BhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xJDAiBgNVBAMMG1Ry
+dXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHNDAeFw0yMTA1MjAwMjEwMjJaFw00NjA1MTkwMjEwMjJa
+MFoxCzAJBgNVBAYTAkNOMSUwIwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMuMSQw
+IgYDVQQDDBtUcnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNi
+AATxs8045CVD5d4ZCbuBeaIVXxVjAd7Cq92zphtnS4CDr5nLrBfbK5bKfFJV4hrhPVbwLxYI+hW8
+m7tH5j/uqOFMjPXTNvk4XatwmkcN4oFBButJ+bAp3TPsUKV/eSm4IJijYzBhMA8GA1UdEwEB/wQF
+MAMBAf8wHwYDVR0jBBgwFoAUpbtKl86zK3+kMd6Xg1mDpm9xy94wHQYDVR0OBBYEFKW7SpfOsyt/
+pDHel4NZg6ZvccveMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjBe8usGzEkxn0AA
+bbd+NvBNEU/zy4k6LHiRUKNbwMp1JvK/kF0LgoxgKJ/GcJpo5PECMFxYDlZ2z1jD1xCMuo6u47xk
+dUfFVZDj/bpV6wfEU6s3qe4hsiFbYI89MvHVI5TWWA==
+-----END CERTIFICATE-----
+
+CommScope Public Trust ECC Root-01
+==================================
+-----BEGIN CERTIFICATE-----
+MIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMwTjELMAkGA1UE
+BhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBUcnVz
+dCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNaFw00NjA0MjgxNzM1NDJaME4xCzAJBgNVBAYT
+AlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3Qg
+RUNDIFJvb3QtMDEwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16ocNfQj3Rid8NeeqrltqLx
+eP0CflfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOcw5tjnSCDPgYLpkJEhRGnSjot
+6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
+A1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggqhkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2
+Jpc1XHvr20v4qotzVRVcrHgpD7oh2MSg2NED3W3ROT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liW
+pDVfG2XqYZpwI7UNo5uSUm9poIyNStDuiw7LR47QjRE=
+-----END CERTIFICATE-----
+
+CommScope Public Trust ECC Root-02
+==================================
+-----BEGIN CERTIFICATE-----
+MIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMwTjELMAkGA1UE
+BhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBUcnVz
+dCBFQ0MgUm9vdC0wMjAeFw0yMTA0MjgxNzQ0NTRaFw00NjA0MjgxNzQ0NTNaME4xCzAJBgNVBAYT
+AlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3Qg
+RUNDIFJvb3QtMDIwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAR4MIHoYx7l63FRD/cHB8o5mXxO1Q/M
+MDALj2aTPs+9xYa9+bG3tD60B8jzljHz7aRP+KNOjSkVWLjVb3/ubCK1sK9IRQq9qEmUv4RDsNuE
+SgMjGWdqb8FuvAY5N9GIIvejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
+A1UdDgQWBBTmGHX/72DehKT1RsfeSlXjMjZ59TAKBggqhkjOPQQDAwNnADBkAjAmc0l6tqvmSfR9
+Uj/UQQSugEODZXW5hYA4O9Zv5JOGq4/nich/m35rChJVYaoR4HkCMHfoMXGsPHED1oQmHhS48zs7
+3u1Z/GtMMH9ZzkXpc2AVmkzw5l4lIhVtwodZ0LKOag==
+-----END CERTIFICATE-----
+
+CommScope Public Trust RSA Root-01
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFbDCCA1SgAwIBAgIUPgNJgXUWdDGOTKvVxZAplsU5EN0wDQYJKoZIhvcNAQELBQAwTjELMAkG
+A1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBU
+cnVzdCBSU0EgUm9vdC0wMTAeFw0yMTA0MjgxNjQ1NTRaFw00NjA0MjgxNjQ1NTNaME4xCzAJBgNV
+BAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1
+c3QgUlNBIFJvb3QtMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwSGWjDR1C45Ft
+nYSkYZYSwu3D2iM0GXb26v1VWvZVAVMP8syMl0+5UMuzAURWlv2bKOx7dAvnQmtVzslhsuitQDy6
+uUEKBU8bJoWPQ7VAtYXR1HHcg0Hz9kXHgKKEUJdGzqAMxGBWBB0HW0alDrJLpA6lfO741GIDuZNq
+ihS4cPgugkY4Iw50x2tBt9Apo52AsH53k2NC+zSDO3OjWiE260f6GBfZumbCk6SP/F2krfxQapWs
+vCQz0b2If4b19bJzKo98rwjyGpg/qYFlP8GMicWWMJoKz/TUyDTtnS+8jTiGU+6Xn6myY5QXjQ/c
+Zip8UlF1y5mO6D1cv547KI2DAg+pn3LiLCuz3GaXAEDQpFSOm117RTYm1nJD68/A6g3czhLmfTif
+BSeolz7pUcZsBSjBAg/pGG3svZwG1KdJ9FQFa2ww8esD1eo9anbCyxooSU1/ZOD6K9pzg4H/kQO9
+lLvkuI6cMmPNn7togbGEW682v3fuHX/3SZtS7NJ3Wn2RnU3COS3kuoL4b/JOHg9O5j9ZpSPcPYeo
+KFgo0fEbNttPxP/hjFtyjMcmAyejOQoBqsCyMWCDIqFPEgkBEa801M/XrmLTBQe0MXXgDW1XT2mH
++VepuhX2yFJtocucH+X8eKg1mp9BFM6ltM6UCBwJrVbl2rZJmkrqYxhTnCwuwwIDAQABo0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUN12mmnQywsL5x6YVEFm4
+5P3luG0wDQYJKoZIhvcNAQELBQADggIBAK+nz97/4L1CjU3lIpbfaOp9TSp90K09FlxD533Ahuh6
+NWPxzIHIxgvoLlI1pKZJkGNRrDSsBTtXAOnTYtPZKdVUvhwQkZyybf5Z/Xn36lbQnmhUQo8mUuJM
+3y+Xpi/SB5io82BdS5pYV4jvguX6r2yBS5KPQJqTRlnLX3gWsWc+QgvfKNmwrZggvkN80V4aCRck
+jXtdlemrwWCrWxhkgPut4AZ9HcpZuPN4KWfGVh2vtrV0KnahP/t1MJ+UXjulYPPLXAziDslg+Mkf
+Foom3ecnf+slpoq9uC02EJqxWE2aaE9gVOX2RhOOiKy8IUISrcZKiX2bwdgt6ZYD9KJ0DLwAHb/W
+NyVntHKLr4W96ioDj8z7PEQkguIBpQtZtjSNMgsSDesnwv1B10A8ckYpwIzqug/xBpMu95yo9GA+
+o/E4Xo4TwbM6l4c/ksp4qRyv0LAbJh6+cOx69TOY6lz/KwsETkPdY34Op054A5U+1C0wlREQKC6/
+oAI+/15Z0wUOlV9TRe9rh9VIzRamloPh37MG88EU26fsHItdkJANclHnYfkUyq+Dj7+vsQpZXdxc
+1+SWrVtgHdqul7I52Qb1dgAT+GhMIbA1xNxVssnBQVocicCMb3SgazNNtQEo/a2tiRc7ppqEvOuM
+6sRxJKi6KfkIsidWNTJf6jn7MZrVGczw
+-----END CERTIFICATE-----
+
+CommScope Public Trust RSA Root-02
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFbDCCA1SgAwIBAgIUVBa/O345lXGN0aoApYYNK496BU4wDQYJKoZIhvcNAQELBQAwTjELMAkG
+A1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBU
+cnVzdCBSU0EgUm9vdC0wMjAeFw0yMTA0MjgxNzE2NDNaFw00NjA0MjgxNzE2NDJaME4xCzAJBgNV
+BAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1
+c3QgUlNBIFJvb3QtMDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDh+g77aAASyE3V
+rCLENQE7xVTlWXZjpX/rwcRqmL0yjReA61260WI9JSMZNRTpf4mnG2I81lDnNJUDMrG0kyI9p+Kx
+7eZ7Ti6Hmw0zdQreqjXnfuU2mKKuJZ6VszKWpCtYHu8//mI0SFHRtI1CrWDaSWqVcN3SAOLMV2MC
+e5bdSZdbkk6V0/nLKR8YSvgBKtJjCW4k6YnS5cciTNxzhkcAqg2Ijq6FfUrpuzNPDlJwnZXjfG2W
+Wy09X6GDRl224yW4fKcZgBzqZUPckXk2LHR88mcGyYnJ27/aaL8j7dxrrSiDeS/sOKUNNwFnJ5rp
+M9kzXzehxfCrPfp4sOcsn/Y+n2Dg70jpkEUeBVF4GiwSLFworA2iI540jwXmojPOEXcT1A6kHkIf
+hs1w/tkuFT0du7jyU1fbzMZ0KZwYszZ1OC4PVKH4kh+Jlk+71O6d6Ts2QrUKOyrUZHk2EOH5kQMr
+eyBUzQ0ZGshBMjTRsJnhkB4BQDa1t/qp5Xd1pCKBXbCL5CcSD1SIxtuFdOa3wNemKfrb3vOTlycE
+VS8KbzfFPROvCgCpLIscgSjX74Yxqa7ybrjKaixUR9gqiC6vwQcQeKwRoi9C8DfF8rhW3Q5iLc4t
+Vn5V8qdE9isy9COoR+jUKgF4z2rDN6ieZdIs5fq6M8EGRPbmz6UNp2YINIos8wIDAQABo0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUR9DnsSL/nSz12Vdgs7Gx
+cJXvYXowDQYJKoZIhvcNAQELBQADggIBAIZpsU0v6Z9PIpNojuQhmaPORVMbc0RTAIFhzTHjCLqB
+KCh6krm2qMhDnscTJk3C2OVVnJJdUNjCK9v+5qiXz1I6JMNlZFxHMaNlNRPDk7n3+VGXu6TwYofF
+1gbTl4MgqX67tiHCpQ2EAOHyJxCDut0DgdXdaMNmEMjRdrSzbymeAPnCKfWxkxlSaRosTKCL4BWa
+MS/TiJVZbuXEs1DIFAhKm4sTg7GkcrI7djNB3NyqpgdvHSQSn8h2vS/ZjvQs7rfSOBAkNlEv41xd
+gSGn2rtO/+YHqP65DSdsu3BaVXoT6fEqSWnHX4dXTEN5bTpl6TBcQe7rd6VzEojov32u5cSoHw2O
+HG1QAk8mGEPej1WFsQs3BWDJVTkSBKEqz3EWnzZRSb9wO55nnPt7eck5HHisd5FUmrh1CoFSl+Nm
+YWvtPjgelmFV4ZFUjO2MJB+ByRCac5krFk5yAD9UG/iNuovnFNa2RU9g7Jauwy8CTl2dlklyALKr
+dVwPaFsdZcJfMw8eD/A7hvWwTruc9+olBdytoptLFwG+Qt81IR2tq670v64fG9PiO/yzcnMcmyiQ
+iRM9HcEARwmWmjgb3bHPDcK0RPOWlc4yOo80nOAXx17Org3bhzjlP1v9mxnhMUF6cKojawHhRUzN
+lM47ni3niAIi9G7oyOzWPPO5std3eqx7
+-----END CERTIFICATE-----
diff --git a/resources/de/welcome.html b/resources/de/welcome.html
index 1a27a8c8c..899f685f9 100644
--- a/resources/de/welcome.html
+++ b/resources/de/welcome.html
@@ -21,7 +21,7 @@
<p class="intro">NetSurf ist ein kleiner, schneller Opensource Webbrowser. Wir sind st&auml;ndig daran interessiert, unseren Browser zu verbessern. Bitte kontaktieren Sie uns, wenn Sie irgend welche Probleme bemerken.<br>
Danke, dass Sie sich f&uuml;r NetSurf entschieden haben!</p>
-<form method="get" action="http://www.google.de/search">
+<form method="get" action="https://www.google.de/search">
<div class="websearch">
<input type="text" name="q" size="42" maxlength="255">
<input type="submit" value="Google-Suche" name="btnG">
@@ -30,29 +30,29 @@ Danke, dass Sie sich f&uuml;r NetSurf entschieden haben!</p>
<div class="links">
<ul>
-<li><a href="http://news.bbc.co.uk/">BBC News</a></li>
-<li><a href="http://www.reuters.com/news">Reuters</a></li>
-<li><a href="http://www.cnn.com/">CNN</a></li>
+<li><a href="https://news.bbc.co.uk/">BBC News</a></li>
+<li><a href="https://www.reuters.com/news">Reuters</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
</ul>
<ul>
-<li><a href="http://slashdot.org/">Slashdot</a></li>
-<li><a href="http://arstechnica.com/">Ars Technica</a></li>
-<li><a href="http://www.theregister.co.uk/">The Register</a></li>
-<li><a href="http://www.w3.org/">W3C</a></li>
+<li><a href="https://slashdot.org/">Slashdot</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
</ul>
<ul>
-<li><a href="http://de.wikipedia.org/">Wikipedia</a></li>
-<li><a href="http://www.google.de/">Google</a></li>
-<li><a href="http://de.yahoo.com/">Yahoo!</a></li>
-<li><a href="http://www.imdb.com/">IMDB</a></li>
+<li><a href="https://de.wikipedia.org/">Wikipedia</a></li>
+<li><a href="https://www.google.de/">Google</a></li>
+<li><a href="https://de.yahoo.com/">Yahoo!</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
</ul>
<ul>
-<li><a href="http://www.iconbar.com/">The Icon Bar</a></li>
-<li><a href="http://www.riscosopen.org/">ROOL</a></li>
-<li><a href="http://www.riscos.info/">riscos.info</a></li>
+<li><a href="https://www.iconbar.com/">The Icon Bar</a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
</ul>
</div>
diff --git a/resources/en/credits.html b/resources/en/credits.html
index 436e1d242..1a728d376 100644
--- a/resources/en/credits.html
+++ b/resources/en/credits.html
@@ -91,7 +91,7 @@ div#DevList ul {
</div>
<div class="footer ns-even-fg-subtle">
-<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2020 The NetSurf Developers</p>
+<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2023 The NetSurf Developers</p>
</div>
</body>
diff --git a/resources/en/licence.html b/resources/en/licence.html
index 750d4d773..0ab4c2b40 100644
--- a/resources/en/licence.html
+++ b/resources/en/licence.html
@@ -56,75 +56,75 @@ version.</p>
<h3>NetSurf Project Components</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/">NetSurf</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/">NetSurf</a></dt>
<dd>
<span>&copy; 2002&ndash;2020 The NetSurf Developers</span>
<span><a href="#gplv2">GPLv2</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
<dd>
-<span>&copy; 2007&ndash;2019 John-Mark Bell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
<dd>
-<span>&copy; 2007&ndash;2019 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
<dd>
-<span>&copy; 2007&ndash;2019 John-Mark Bell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
<dd>
<span>&copy; 2008 James Shaw</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
<dd>
<span>&copy; 2005&ndash;2006 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
<dd>
<span>&copy; 2005&ndash;2009 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
<dd>
<span>&copy; 2008&ndash;2009 James Bursa<br>&copy; 2017 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
<dd>
-<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox<br>&copy; 2017 Vincent Sanders</span>
+<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox<br>&copy; 2017&ndash;2023 Vincent Sanders</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
<dd>
-<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2017 Michael Drake</span>
+<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2023 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
<dd>
-<span>&copy; 2004 Richard Wilson</br>&copy; 2008 Sean Fox</span>
+<span>&copy; 2004 Richard Wilson</br>&copy; 2008 Sean Fox<br>&copy; 2020&ndash;2023 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
<dd>
-<span>&copy; 2009&ndash;2020 NetSurf Browser Project, Daniel Silverstone</span>
+<span>&copy; 2009&ndash;2023 NetSurf Browser Project, Daniel Silverstone</span>
<span><a href="#mit">MIT</a></span>
</dd>
</dl>
@@ -132,49 +132,49 @@ version.</p>
<h3>Third Party Components</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://curl.haxx.se/">cURL</a></dt>
+<dt class="ns-border"><a href="https://curl.haxx.se/">cURL</a></dt>
<dd>
<span>&copy; 1996&ndash;2020 Daniel Stenberg</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://libharu.org/">Haru PDF</a></dt>
+<dt class="ns-border"><a href="https://libharu.org/">Haru PDF</a></dt>
<dd>
<span>&copy; 2000&ndash;2008 Takeshi Kanno</span>
<span><a href="#zlib">ZLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.ijg.org">libjpeg</a></dt>
+<dt class="ns-border"><a href="https://www.ijg.org">libjpeg</a></dt>
<dd>
<span>&copy; 1991&ndash;2010 Thomas G. Lane, Guido Vollbeding</span>
<span><a href="#ijg">IJG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.littlecms.com/">liblcms</a></dt>
+<dt class="ns-border"><a href="https://www.littlecms.com/">liblcms</a></dt>
<dd>
<span>&copy; 1998&ndash;2007 Marti Maria Saguer</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://ro-oslib.sourceforge.net/">OSLib</a></dt>
+<dt class="ns-border"><a href="https://ro-oslib.sourceforge.net/">OSLib</a></dt>
<dd>
<span>&copy; 1994&ndash;1998 Jonathan Coxhead and contributors</span>
<span><a href="#oslib">OSLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.openssl.org/">OpenSSL</a></dt>
+<dt class="ns-border"><a href="https://www.openssl.org/">OpenSSL</a></dt>
<dd>
<span>&copy; 1995&ndash;1998 Eric A. Young, Tim J. Hudson<br>&copy; 1998&ndash;2010 The OpenSSL Project</span>
<span><a href="#openssl">OpenSSL</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.libpng.org">libpng</a></dt>
+<dt class="ns-border"><a href="https://www.libpng.org">libpng</a></dt>
<dd>
<span>&copy; 2004&ndash;2010 Glenn Randers-Pehrson</span>
<span><a href="#png">PNG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
+<dt class="ns-border"><a href="https://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
<dd>
<span>&copy; 1995&ndash;1999 Simon Callan, Nick Burrett, Nicholas Clark and
Peter Burwood<br>&copy; 1999&ndash;2009 Nick Burrett, John Tytgat, Peter Naulls,
@@ -183,7 +183,7 @@ Graham Shaw, James Bursa and John-Mark Bell.</span>
<span><a href="#unixlib">UnixLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://zlib.net/">ZLib</a></dt>
+<dt class="ns-border"><a href="https://zlib.net/">ZLib</a></dt>
<dd>
<span>&copy; 1995&ndash;2010 Jean-loup Gailly and Mark Adler</span>
<span><a href="#zlib">ZLib</a></span>
diff --git a/resources/en/welcome.html b/resources/en/welcome.html
index d10735880..a4dbcad36 100644
--- a/resources/en/welcome.html
+++ b/resources/en/welcome.html
@@ -20,7 +20,7 @@
<p class="intro">NetSurf is a small, fast open source web browser. We are always keen to improve our browser, so get in touch if you run into any problems. Thanks for choosing NetSurf!</p>
-<form method="get" action="http://www.google.co.uk/search">
+<form method="get" action="https://www.google.co.uk/search">
<div class="websearch">
<input type="text" name="q" size="42" maxlength="255">
<input type="submit" value="Google Search" name="btnG">
@@ -29,29 +29,29 @@
<div class="links">
<ul>
-<li><a href="http://news.bbc.co.uk/">BBC News</a></li>
-<li><a href="http://www.reuters.com/news">Reuters</a></li>
-<li><a href="http://www.cnn.com/">CNN</a></li>
+<li><a href="https://news.bbc.co.uk/">BBC News</a></li>
+<li><a href="https://www.reuters.com/news">Reuters</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
</ul>
<ul>
-<li><a href="http://slashdot.org/">Slashdot</a></li>
-<li><a href="http://arstechnica.com/">Ars Technica</a></li>
-<li><a href="http://www.theregister.co.uk/">The Register</a></li>
-<li><a href="http://www.w3.org/">W3C</a></li>
+<li><a href="https://slashdot.org/">Slashdot</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
</ul>
<ul>
-<li><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
-<li><a href="http://google.co.uk/">Google</a></li>
-<li><a href="http://yahoo.co.uk/">Yahoo!</a></li>
-<li><a href="http://www.imdb.com/">IMDB</a></li>
+<li><a href="https://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
+<li><a href="https://google.co.uk/">Google</a></li>
+<li><a href="https://yahoo.co.uk/">Yahoo!</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
</ul>
<ul>
-<li><a href="http://www.iconbar.com/">The Icon Bar</a></li>
-<li><a href="http://www.riscosopen.org/">ROOL</a></li>
-<li><a href="http://www.riscos.info/">riscos.info</a></li>
+<li><a href="https://www.iconbar.com/">The Icon Bar</a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
</ul>
</div>
@@ -61,4 +61,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/resources/fr/credits.html b/resources/fr/credits.html
new file mode 100644
index 000000000..dc4b19f15
--- /dev/null
+++ b/resources/fr/credits.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>NetSurf | &Agrave; propos des cr&eacute;dits</title>
+<link rel="stylesheet" type="text/css" href="resource:internal.css">
+<style>
+div#DevList li {
+ float: left;
+ width: 18em; }
+div#DevList ul {
+ overflow: hidden; }
+</style>
+</head>
+
+<body class="ns-even-bg ns-even-fg ns-border">
+
+<h1 class="ns-border">Cr&eacute;dits NetSurf</h1>
+
+<p>NetSurf est rendu possible gr&acirc;ce &agrave; toutes ces personnes&nbsp;:</p>
+
+<div id="DevList">
+
+<h2 class="ns-border">Code</h2>
+<ul>
+<li>John-Mark Bell</li>
+<li>Michael Drake</li>
+<li>Rob Kendrick</li>
+<li>Fran&ccedil;ois Revol</li>
+<li>Vincent Sanders</li>
+<li>Daniel Silverstone</li>
+<li>Chris Young</li>
+<li>Kevin Bagust</li>
+<li>Mark Benjamin</li>
+<li>Adam Blokus</li>
+<li>Pawe&#x0142 Blokus</li>
+<li>James Bursa</li>
+<li>Stefaan Claes</li>
+<li>Calin Dobos</li>
+<li>Sean Fox</li>
+<li>Stephen Fryatt</li>
+<li>Rik Griffin</li>
+<li>Matthew Hambley</li>
+<li>Rob Jackson</li>
+<li>Jeffrey Lee</li>
+<li>Adrian Lees</li>
+<li>Michael Lester</li>
+<li>Ole Loots</li>
+<li>Phil Mellor</li>
+<li>Philip Pemberton</li>
+<li>Darren Salt</li>
+<li>James Shaw</li>
+<li>Andrew Sidwell</li>
+<li>Andrew Timmins</li>
+<li>John Tytgat</li>
+<li>Sven Weidauer</li>
+<li>Chris Williams</li>
+<li>Richard Wilson</li>
+<li>Bo Yang</li>
+</ul>
+
+<h2 class="ns-border">Documentation</h2>
+<ul>
+<li>John-Mark Bell</li>
+<li>James Bursa</li>
+<li>Michael Drake</li>
+<li>Rob Kendrick</li>
+<li>James Shaw</li>
+<li>Richard Wilson</li>
+</ul>
+
+<h2 class="ns-border">Graphismes</h2>
+<ul>
+<li>Michael Drake</li>
+<li>Andrew Duffell</li>
+<li>John Duffell</li>
+<li>Richard Hallas</li>
+<li>Phil Mellor</li>
+</ul>
+
+<h2 class="ns-border">Traductions</h2>
+<ul>
+<li>Sebastian Barthel</li>
+<li>Bruno D'Arcangeli</li>
+<li>Samir Hawamdeh</li>
+<li>Gerard van Katwijk</li>
+<li>J&eacute;r&ocirc;me Mathevet</li>
+<li>Simon Voortman</li>
+</ul>
+
+</div>
+
+<div class="footer ns-even-fg-subtle">
+<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2023 Les d&eacute;veloppeurs de NetSurf</p>
+</div>
+
+</body>
+</html>
diff --git a/resources/fr/licence.html b/resources/fr/licence.html
new file mode 100644
index 000000000..50b68730a
--- /dev/null
+++ b/resources/fr/licence.html
@@ -0,0 +1,1876 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>NetSurf | &Agrave; propos de la licence</title>
+<link rel="stylesheet" type="text/css" href="resource:internal.css">
+<style>
+div.licence {
+ white-space: pre;
+ font-family: monospace;
+ border-width: 1px;
+ border-style: solid;
+ margin: 10mm;
+ padding: 1em 0.5em;
+}
+dl.components > dt {
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+dl.components > dt > a {
+ text-decoration: none;
+}
+dl.components > dd > span {
+ display: table-cell;
+ width: 100%;
+}
+dl.components > dd > span + span {
+ width: auto;
+}
+</style>
+</head>
+
+<body class="ns-even-bg ns-even-fg ns-border">
+
+<h1 class="ns-border">Licence NetSurf</h1>
+
+<p>NetSurf, son code source, sa documentation, ses traductions et ses fichiers
+de d&eacute;finition d'interface sont disponibles selon les termes de la
+licence publique g&eacute;n&eacute;rale GNU en version 2.0. De plus, une
+exception sp&eacute;cifique est garantie de pouvoir lier le code de cette
+version de NetSurf avec la librairie &laquo;&nbsp;OpenSSL&nbsp;&raquo; mise
+&agrave; disposition par le projet OpenSSL (ou avec une version modifi&eacute;e
+de cette librairie, tant qu'elle utilise la m&ecirc;me licence que la librairie
+&laquo;&nbsp;OpenSSL&nbsp;&raquo; originale) et de distribuer les fichiers
+ex&eacute;cutables r&eacute;sultant.</p>
+
+<p>Vous devez ob&eacute;ir &agrave; la licence publique g&eacute;n&eacute;rale
+GNU en version 2 pour l'ensemble du code, autre que
+&laquo;&nbsp;OpenSSL&nbsp;&raquo;. Si vous modifiez le code, vous pouvez
+&eacute;tendre cette exception &agrave; votre propre version du code, mais vous
+n'y &ecirc;tes pas oblig&eacute;. Si vous ne souhaitez pas utiliser cette
+exception, pensez &agrave; supprimer la mention de cette exception de votre
+version du code.</p>
+
+<h2 class="ns-border">Licence des composants</h2>
+
+<p>Les cr&eacute;ations graphiques de NetSurf sont distribu&eacute;es selon la licence MIT.</p>
+
+<p>NetSurf peut &eacute;galement contenir les diff&eacute;rents composants suivant.</p>
+
+<h3>Composants issus du projet NetSurf</h3>
+
+<dl class="components">
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/">NetSurf</a></dt>
+<dd>
+<span>&copy; 2002&ndash;2020 Les d&eacute;veloppeurs de NetSurf</span>
+<span><a href="#gplv2">GPLv2</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
+<dd>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
+<dd>
+<span>&copy; 2007&ndash;2023 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
+<dd>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
+<dd>
+<span>&copy; 2008 James Shaw</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
+<dd>
+<span>&copy; 2005&ndash;2006 James Bursa</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
+<dd>
+<span>&copy; 2005&ndash;2009 James Bursa</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
+<dd>
+<span>&copy; 2008&ndash;2009 James Bursa<br>&copy; 2017 Michael Drake</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
+<dd>
+<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox<br>&copy; 2017&ndash;2023 Vincent Sanders</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
+<dd>
+<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2023 Michael Drake</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
+<dd>
+<span>&copy; 2004 Richard Wilson</br>&copy; 2008 Sean Fox<br>&copy; 2020&ndash;2023 Michael Drake</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
+<dd>
+<span>&copy; 2009&ndash;2023 NetSurf Browser Project, Daniel Silverstone</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+</dl>
+
+<h3>Composants tiers</h3>
+
+<dl class="components">
+<dt class="ns-border"><a href="https://curl.haxx.se/">cURL</a></dt>
+<dd>
+<span>&copy; 1996&ndash;2020 Daniel Stenberg</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://libharu.org/">Haru PDF</a></dt>
+<dd>
+<span>&copy; 2000&ndash;2008 Takeshi Kanno</span>
+<span><a href="#zlib">ZLib</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.ijg.org">libjpeg</a></dt>
+<dd>
+<span>&copy; 1991&ndash;2010 Thomas G. Lane, Guido Vollbeding</span>
+<span><a href="#ijg">IJG</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.littlecms.com/">liblcms</a></dt>
+<dd>
+<span>&copy; 1998&ndash;2007 Marti Maria Saguer</span>
+<span><a href="#mit">MIT</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://ro-oslib.sourceforge.net/">OSLib</a></dt>
+<dd>
+<span>&copy; 1994&ndash;1998 Jonathan Coxhead et contributeurs</span>
+<span><a href="#oslib">OSLib</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.openssl.org/">OpenSSL</a></dt>
+<dd>
+<span>&copy; 1995&ndash;1998 Eric A. Young, Tim J. Hudson<br>&copy; 1998&ndash;2010 The OpenSSL Project</span>
+<span><a href="#openssl">OpenSSL</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.libpng.org">libpng</a></dt>
+<dd>
+<span>&copy; 2004&ndash;2010 Glenn Randers-Pehrson</span>
+<span><a href="#png">PNG</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
+<dd>
+<span>&copy; 1995&ndash;1999 Simon Callan, Nick Burrett, Nicholas Clark et
+Peter Burwood<br>&copy; 1999&ndash;2009 Nick Burrett, John Tytgat, Peter Naulls,
+Lee Noar, Peter Teichmann, Alex Waugh, Christian Ludlam, Theo Markettos,
+Graham Shaw, James Bursa et John-Mark Bell.</span>
+<span><a href="#unixlib">UnixLib</a></span>
+</dd>
+
+<dt class="ns-border"><a href="https://zlib.net/">ZLib</a></dt>
+<dd>
+<span>&copy; 1995&ndash;2010 Jean-loup Gailly et Mark Adler</span>
+<span><a href="#zlib">ZLib</a></span>
+</dd>
+</dl>
+
+<h2 class="ns-border">Textes des licences</h2>
+
+<p>La version g&eacute;n&eacute;rique des textes des licences sont reproduits ici lorsque
+c'est possible. Certains composants utilisent des versions l&eacute;g&egrave;rement
+diff&eacute;rentes de ces textes de r&eacute;f&eacute;rence. Nous avons fait de notre mieux pour
+d&eacute;tecter ces changements et les lister ci-apr&egrave;s. Les changements dans les
+espacements, etc. n'ont pas &eacute;t&eacute; consid&eacute;r&eacute;s.</p>
+
+<a name="gplv2" />
+<h3>GNU General Public Licence, Version 2</h3>
+<div class="licence ns-border ns-odd-bg"> GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+</div>
+
+<a name="mit" />
+<h3>MIT/X Licence</h3>
+<div class="licence ns-border ns-odd-bg">Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+</div>
+
+<a name="zlib" />
+<h3>ZLib Licence</h3>
+<div class="licence ns-border ns-odd-bg"> This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+</div>
+
+<a name="ijg" />
+<h3>IJG Licence</h3>
+<div class="licence ns-border ns-odd-bg">The authors make NO WARRANTY or representation, either express or implied,
+with respect to this software, its quality, accuracy, merchantability, or
+fitness for a particular purpose. This software is provided "AS IS", and you,
+its user, assume the entire risk as to its quality and accuracy.
+
+This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
+All Rights Reserved except as specified below.
+
+Permission is hereby granted to use, copy, modify, and distribute this
+software (or portions thereof) for any purpose, without fee, subject to these
+conditions:
+(1) If any part of the source code for this software is distributed, then this
+README file must be included, with this copyright and no-warranty notice
+unaltered; and any additions, deletions, or changes to the original files
+must be clearly indicated in accompanying documentation.
+(2) If only executable code is distributed, then the accompanying
+documentation must state that "this software is based in part on the work of
+the Independent JPEG Group".
+(3) Permission for use of this software is granted only if the user accepts
+full responsibility for any undesirable consequences; the authors accept
+NO LIABILITY for damages of any kind.
+
+These conditions apply to any software derived from or based on the IJG code,
+not just to the unmodified library. If you use our work, you ought to
+acknowledge us.
+
+Permission is NOT granted for the use of any IJG author's name or company name
+in advertising or publicity relating to this software or products derived from
+it. This software may be referred to only as "the Independent JPEG Group's
+software".
+
+We specifically permit and encourage the use of this software as the basis of
+commercial products, provided that all warranty or liability claims are
+assumed by the product vendor.
+
+
+ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
+sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
+ansi2knr.c is NOT covered by the above copyright and conditions, but instead
+by the usual distribution terms of the Free Software Foundation; principally,
+that you must include source code if you redistribute it. (See the file
+ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
+of any program generated from the IJG code, this does not limit you more than
+the foregoing paragraphs do.
+
+The Unix configuration script "configure" was produced with GNU Autoconf.
+It is copyright by the Free Software Foundation but is freely distributable.
+The same holds for its supporting scripts (config.guess, config.sub,
+ltmain.sh). Another support script, install-sh, is copyright by X Consortium
+but is also freely distributable.
+</div>
+
+
+<a name="oslib" />
+<h3>OSLib Licence</h3>
+<div class="licence ns-border ns-odd-bg">The copyright holder has granted a small relaxation of the
+conditions of the GNU Public Licence, in that OSLib is itself
+free software, but applications linked to it need not be.
+This means that any changes to OSLib itself (the contents of
+the OSLib, OSLibHelp, OSLibSrc, and OSLibSupport archives)
+fall under the terms of the GNU Public Licence; but programs
+written using OSLib need not be so restricted.
+
+ GNU GENERAL PUBLIC LICENCE
+ Version 1, February 1989
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, U S A
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ Preamble
+
+ The licence agreements of most software companies try to keep users
+at the mercy of those companies. By contrast, our General Public
+Licence is intended to guarantee your freedom to share and change free
+software---to make sure the software is free for all its users. The
+General Public Licence applies to the Free Software Foundation's
+software and to any other programme whose authors commit to using it.
+You can use it for your programmes, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Specifically, the General Public Licence is designed to make
+sure that you have the freedom to give away or sell copies of free
+software, that you receive source code or can get it if you want it,
+that you can change the software or use pieces of it in new free
+programmes; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of a such a programme, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must tell them their rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this licence which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This Licence Agreement applies to any programme or other work which
+contains a notice placed by the copyright holder saying it may be
+distributed under the terms of this General Public Licence. The
+"Programme", below, refers to any such programme or work, and a "work based
+on the Programme" means either the Programme or any work containing the
+Programme or a portion of it, either verbatim or with modifications. Each
+licensee is addressed as "you".
+
+ 1. You may copy and distribute verbatim copies of the Programme's source
+code as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this
+General Public Licence and to the absence of any warranty; and give any
+other recipients of the Programme a copy of this General Public Licence
+along with the Programme. You may charge a fee for the physical act of
+transferring a copy.
+
+ 2. You may modify your copy or copies of the Programme or any portion of
+it, and copy and distribute such modifications under the terms of Paragraph
+1 above, provided that you also do the following:
+
+ a) cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change; and
+
+ b) cause the whole of any work that you distribute or publish, that
+ in whole or in part contains the Programme or any part thereof, either
+ with or without modifications, to be licensed at no charge to all
+ third parties under the terms of this General Public Licence (except
+ that you may choose to grant warranty protection to some or all
+ third parties, at your option).
+
+ c) If the modified programme normally reads commands interactively when
+ run, you must cause it, when started running for such interactive use
+ in the simplest and most usual way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the programme under these
+ conditions, and telling the user how to view a copy of this General
+ Public Licence.
+
+ d) You may charge a fee for the physical act of transferring a
+ copy, and you may at your option offer warranty protection in
+ exchange for a fee.
+
+Mere aggregation of another independent work with the Programme (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other work under the scope of these terms.
+
+ 3. You may copy and distribute the Programme (or a portion or derivative of
+it, under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+ a) accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ b) accompany it with a written offer, valid for at least three
+ years, to give any third party free (except for a nominal charge
+ for the cost of distribution) a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of
+ Paragraphs 1 and 2 above; or,
+
+ c) accompany it with the information you received as to where the
+ corresponding source code may be obtained. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the programme in object code or executable form alone.)
+
+Source code for a work means the preferred form of the work for making
+modifications to it. For an executable file, complete source code means
+all the source code for all modules it contains; but, as a special
+exception, it need not include source code for modules which are standard
+libraries that accompany the operating system on which the executable
+file runs, or for standard header files or definitions files that
+accompany that operating system.
+
+ 4. You may not copy, modify, sublicense, distribute or transfer the
+Programme except as expressly provided under this General Public Licence.
+Any attempt otherwise to copy, modify, sublicense, distribute or transfer
+the Programme is void, and will automatically terminate your rights to use
+the Programme under this Licence. However, parties who have received
+copies, or rights to use copies, from you under this General Public
+Licence will not have their licences terminated so long as such parties
+remain in full compliance.
+
+ 5. By copying, distributing or modifying the Programme (or any work based
+on the Programme) you indicate your acceptance of this licence to do so,
+and all its terms and conditions.
+
+ 6. Each time you redistribute the Programme (or any work based on the
+Programme), the recipient automatically receives a licence from the original
+licensor to copy, distribute or modify the Programme subject to these
+terms and conditions. You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein.
+
+ 7. The Free Software Foundation may publish revised and/or new versions
+of the General Public Licence from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Programme
+specifies a version number of the licence which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Programme does not specify a version number of
+the licence, you may choose any version ever published by the Free Software
+Foundation.
+
+ 8. If you wish to incorporate parts of the Programme into other free
+programmes whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 9. BECAUSE THE PROGRAMME IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAMME, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAMME "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAMME IS WITH YOU. SHOULD THE
+PROGRAMME PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAMME AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAMME (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAMME TO OPERATE WITH ANY OTHER
+PROGRAMMES), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programmes
+
+ If you develop a new programme, and you want it to be of the greatest
+possible use to humanity, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+ To do so, attach the following notices to the programme. It is safest to
+attach them to the start of each source file to most effectively convey
+the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the programme's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This programme is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public Licence as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ This programme is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public Licence for more details.
+
+ You should have received a copy of the GNU General Public Licence
+ along with this programme; if not, write to the Free Software
+ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the programme is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19xx name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public Licence. Of course, the
+commands you use may be called something other than `show w' and `show
+c'; they could even be mouse-clicks or menu items--whatever suits your
+programme.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the programme, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ programme `Gnomovision' (a programme to direct compilers to make passes
+ at assemblers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+That's all there is to it!
+</div>
+
+<a name="openssl" />
+<h3>OpenSSL Licence</h3>
+<div class="licence ns-border ns-odd-bg"> The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
+ the OpenSSL License and the original SSLeay license apply to the toolkit.
+ See below for the actual license texts. Actually both licenses are BSD-style
+ Open Source licenses. In case of any license issues related to OpenSSL
+ please contact openssl-core@openssl.org.
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+</div>
+
+<a name="png" />
+<h3>PNG Licence</h3>
+<div class="licence ns-border ns-odd-bg"> * This code is released under the libpng license.
+ *
+ * libpng versions 1.2.6, August 15, 2004, through 1.4.1, February 25, 2010, are
+ * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
+ * distributed according to the same disclaimer and license as libpng-1.2.5
+ * with the following individual added to the list of Contributing Authors:
+ *
+ * Cosmin Truta
+ *
+ * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
+ * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
+ * distributed according to the same disclaimer and license as libpng-1.0.6
+ * with the following individuals added to the list of Contributing Authors:
+ *
+ * Simon-Pierre Cadieux
+ * Eric S. Raymond
+ * Gilles Vollant
+ *
+ * and with the following additions to the disclaimer:
+ *
+ * There is no warranty against interference with your enjoyment of the
+ * library or against infringement. There is no warranty that our
+ * efforts or the library will fulfill any of your particular purposes
+ * or needs. This library is provided with all faults, and the entire
+ * risk of satisfactory quality, performance, accuracy, and effort is with
+ * the user.
+ *
+ * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+ * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are
+ * distributed according to the same disclaimer and license as libpng-0.96,
+ * with the following individuals added to the list of Contributing Authors:
+ *
+ * Tom Lane
+ * Glenn Randers-Pehrson
+ * Willem van Schaik
+ *
+ * libpng versions 0.89, June 1996, through 0.96, May 1997, are
+ * Copyright (c) 1996, 1997 Andreas Dilger
+ * Distributed according to the same disclaimer and license as libpng-0.88,
+ * with the following individuals added to the list of Contributing Authors:
+ *
+ * John Bowler
+ * Kevin Bracey
+ * Sam Bushell
+ * Magnus Holmgren
+ * Greg Roelofs
+ * Tom Tanner
+ *
+ * libpng versions 0.5, May 1995, through 0.88, January 1996, are
+ * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+ *
+ * For the purposes of this copyright and license, "Contributing Authors"
+ * is defined as the following set of individuals:
+ *
+ * Andreas Dilger
+ * Dave Martindale
+ * Guy Eric Schalnat
+ * Paul Schmidt
+ * Tim Wegner
+ *
+ * The PNG Reference Library is supplied "AS IS". The Contributing Authors
+ * and Group 42, Inc. disclaim all warranties, expressed or implied,
+ * including, without limitation, the warranties of merchantability and of
+ * fitness for any purpose. The Contributing Authors and Group 42, Inc.
+ * assume no liability for direct, indirect, incidental, special, exemplary,
+ * or consequential damages, which may result from the use of the PNG
+ * Reference Library, even if advised of the possibility of such damage.
+ *
+ * Permission is hereby granted to use, copy, modify, and distribute this
+ * source code, or portions hereof, for any purpose, without fee, subject
+ * to the following restrictions:
+ *
+ * 1. The origin of this source code must not be misrepresented.
+ *
+ * 2. Altered versions must be plainly marked as such and
+ * must not be misrepresented as being the original source.
+ *
+ * 3. This Copyright notice may not be removed or altered from
+ * any source or altered source distribution.
+ *
+ * The Contributing Authors and Group 42, Inc. specifically permit, without
+ * fee, and encourage the use of this source code as a component to
+ * supporting the PNG file format in commercial products. If you use this
+ * source code in a product, acknowledgment is not required but would be
+ * appreciated.
+ */
+</div>
+
+<a name="unixlib" />
+<h3>UnixLib Licence</h3>
+<div class="licence ns-border ns-odd-bg">In January 2005, permission was obtained from all relevant contributors
+by Peter Naulls to license all past and present contributions to UnixLib
+(where possible) under the revised BSD license. The license is included
+in the next section and is applicable to all code in UnixLib that does not
+have an explicit license in its source.
+
+Prior to 4th January 2005 and after May 2001, UnixLib contained code licensed
+under the GNU General Public License, and versions of UnixLib produced
+between these dates are subject to the provisions of the GPL. We realised
+that this might cause potential problems with the wider use of UnixLib in
+RISC OS, and along with the desire to clarify the overall licensing status of
+UnixLib, GPL code was removed from UnixLib and the above permission from all
+copyright holders allowed UnixLib contributions to be relicensed as per the
+revised BSD license. The GPL is therefore not included in this notice
+as it is no longer relevant to UnixLib.
+
+
+Practical notes on using UnixLib in your own programs:
+
+This is a plain English version of guidelines for use of UnixLib in
+your programs. It does not override any of the licenses included
+below, but is intended to state instances when it may be used in
+free and non-free software. Where there is contradiction or
+ambiguity in this wording, please refer to the specifics of the licence
+in question. These recommendations are based upon our understading
+of the GPL/LGPL and BSD licenses and are subject to change should
+our understanding of the topics improve.
+
+ - Because UnixLib contains code that is subject to the Lesser GNU
+ Public License, the LGPL is the overriding consideration when
+ linking UnixLib to programs (unless the program itself is GPL).
+
+ - You are free to use sections of UnixLib in your own programs
+ subject to the conditions of that code. If the entirety of
+ that code is under a BSD license, then you can generally use
+ that code as you see fit, and there is no further obligation
+ from you as long as the copyright notice remains. If you
+ use LGPL code in your program, then your program must also be
+ distributed under the LGPL (or GPL).
+
+ - If you use UnixLib in its intended original form - that is as a
+ supporting library for ported programs to RISC OS - then your program
+ is subject to the LGPL; or the GPL if the program is covered by that.
+ Note that you must make the source and any modifications available to for
+ both if requested. This is of course equally true if you write an original
+ GPL program using UnixLib. In most cases, no additional action is
+ required of you, especially since source is usually readibly available.
+
+ - If you use UnixLib for a non-free program - whether that's commercial or
+ otherwise, then you should carefully read section 6 of the LGPL. This
+ applies, because at the present time, there is no practical method of
+ dynamic linking on RISC OS. At such time that UnixLib is available as a
+ shared library, then programs dynamically linking to it will no longer be
+ subject to the LPGL as applied to UnixLib.
+
+ - Section 6 means that in practice, you must supply, or offer to
+ supply either source or object code for your program.
+ This is mainly to allow rebuilding of the executable program
+ with later or modified versions of UnixLib. You must of course
+ supply (or better, contribute to the GCCSDK project) any
+ modifications you make to UnixLib upon request.
+
+
+Recommended reading:
+
+Frequently Asked Questions about the GNU GPL
+http://www.fsf.org/licenses/gpl-faq.html (has some sections on LGPL)
+
+About the justifications for using LGPL
+http://www.fsf.org/licenses/why-not-lgpl.html
+
+
+
+===========================================================================
+
+ Copyright (c) 1995-2009 UnixLib Developers
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===========================================================================
+
+Portions of UnixLib are copyright The Regents of the University of
+California.
+
+Portions of this library are copyright Sun Microsystems, Inc. The
+
+Portions of this library are derived from the GNU C Library and fall under
+the GNU Library General Public License.
+
+Portions of this library are copyright Henry Spencer.
+
+Portions of this library are copyright The Regents of the University of
+California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
+Corporation and other parties.
+
+Portions of this library are copyright PostgreSQL Global Development Group.
+
+The licenses for the above are duplicated below.
+
+
+===========================================================================
+
+ Copyright (c) The Regents of the University of California.
+ All rights reserved.
+
+ This code is derived from software contributed to Berkeley by
+ Chris Torek.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the University of
+ California, Berkeley and its contributors.
+ 4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+===========================================================================
+
+ Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+
+ Developed at SunPro, a Sun Microsystems, Inc. business.
+ Permission to use, copy, modify, and distribute this
+ software is freely granted, provided that this notice
+ is preserved.
+
+===========================================================================
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+===========================================================================
+
+Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
+
+Development of this software was funded, in part, by Cray Research Inc.,
+UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
+Corporation, none of whom are responsible for the results. The author
+thanks all of them.
+
+Redistribution and use in source and binary forms -- with or without
+modification -- are permitted for any purpose, provided that
+redistributions in source form retain this entire copyright notice and
+indicate the origin and nature of any modifications.
+
+I'd appreciate being given credit for this package in the documentation
+of software which uses it, but that is not a requirement.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===========================================================================
+
+This software is copyrighted by the Regents of the University of
+California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
+Corporation and other parties. The following terms apply to all files
+associated with the software unless explicitly disclaimed in
+individual files.
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
+IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+MODIFICATIONS.
+
+GOVERNMENT USE: If you are acquiring this software on behalf of the
+U.S. government, the Government shall have only "Restricted Rights"
+in the software and related documentation as defined in the Federal
+Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+are acquiring the software on behalf of the Department of Defense, the
+software shall be classified as "Commercial Computer Software" and the
+Government shall have only "Restricted Rights" as defined in Clause
+252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
+authors grant the U.S. Government and others acting in its behalf
+permission to use and distribute the software in accordance with the
+terms specified in this license.
+
+===========================================================================
+
+PostgreSQL Database Management System
+(formerly known as Postgres, then as Postgres95)
+
+Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
+
+Portions Copyright (c) 1994, The Regents of the University of California
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose, without fee, and without a written agreement
+is hereby granted, provided that the above copyright notice and this
+paragraph and the following two paragraphs appear in all copies.
+
+IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+</div>
+
+<div class="footer ns-even-fg-subtle">
+<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2019 Les d&eacute;veloppeurs de NetSurf</p>
+</div>
+
+</body>
+</html>
diff --git a/resources/fr/welcome.html b/resources/fr/welcome.html
new file mode 100644
index 000000000..241ea180e
--- /dev/null
+++ b/resources/fr/welcome.html
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Bienvenue sur NetSurf</title>
+<style type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0 auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0 1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:94%;}.nslinks li{display:table-cell;text-align:center;padding:0.2em 0.3em 0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid #b1c3ff;}.version{padding:0;margin:1.2em auto 0;width:90%;color:#444;font-size:160%;}.intro{width: 90%;margin:1em auto;color:#666;}.websearch{margin:1.5em auto;padding:1.2em 0.3em;background:#d8e2ff;border:2px solid #c5d3ff;width:80%;text-align:center;}input[type=text]{border:2px solid #b6c7ff;background:#f9faff;color:#000;margin:2px;}input[type=submit]{border:2px outset #cedaff;color:#000;background:#cedaff;margin:2px;}.links{display:table;width:80%;margin:0 auto 3em;font-size:94%;}.links ul{display:table-cell;padding-left:2.5em;}.links ul+ul{padding-left:1em;}.footer{font-style:italic;color:#666;text-align:right;}.footer p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}</style>
+</head>
+
+<body>
+<h1 class="banner"><a href="https://www.netsurf-browser.org/"><img src="about:logo" alt="NetSurf"></a></h1>
+
+<ul class="nslinks">
+<li><a href="https://www.netsurf-browser.org/">Site&nbsp;Web de NetSurf</a></li>
+<li><a href="https://www.netsurf-browser.org/documentation/">Documentation</a></li>
+<li><a href="https://www.netsurf-browser.org/downloads/">T&eacute;l&eacute;charger la derni&egrave;re version de NetSurf</a></li>
+<li><a href="https://www.netsurf-browser.org/contact/">Contacter les d&eacute;veloppeurs</a></li>
+</ul>
+
+<div class="onlycontent">
+<h2 class="version">Bienvenue sur NetSurf</h2>
+
+<p class="intro">NetSurf est un petit et rapide navigateur Web &agrave; code source ouvert. Nous sommes toujours pr&ecirc;t &agrave; am&eacute;liorer notre navigateur, donc n'h&eacute;sitez pas &agrave; nous contacter si vous rencontrez le moindre p&eacute;pin. Merci d'avoir choisi Netsurf&nbsp;!</p>
+
+<form method="get" action="https://www.google.fr/search">
+<div class="websearch">
+<input type="text" name="q" size="42" maxlength="255">
+<input type="submit" value="Recherche Google" name="btnG">
+</div>
+</form>
+
+<div class="links">
+<ul>
+<li><a href="https://news.bbc.co.uk/">BBC News</a></li>
+<li><a href="https://www.reuters.com/news">Reuters</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
+</ul>
+
+<ul>
+<li><a href="https://slashdot.org/">Slashdot</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
+</ul>
+
+<ul>
+<li><a href="https://fr.wikipedia.org/">Wikipedia</a></li>
+<li><a href="https://google.fr/">Google</a></li>
+<li><a href="https://yahoo.fr/">Yahoo!</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
+</ul>
+
+<ul>
+<li><a href="https://www.iconbar.com/">The Icon Bar</a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
+</ul>
+</div>
+
+<div class="footer">
+<p>NetSurf est distribu&eacute; selon la licence publique GNU version 2</p>
+</div>
+</div>
+
+</body>
+</html>
diff --git a/resources/it/credits.html b/resources/it/credits.html
index 533fbe7aa..c700f3184 100644
--- a/resources/it/credits.html
+++ b/resources/it/credits.html
@@ -90,7 +90,7 @@ div#DevList ul {
</div>
<div class="footer ns-even-fg-subtle">
-<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2020 The NetSurf Developers</p>
+<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2023 The NetSurf Developers</p>
</div>
</body>
diff --git a/resources/it/licence.html b/resources/it/licence.html
index d25d3be23..0de3ffa55 100644
--- a/resources/it/licence.html
+++ b/resources/it/licence.html
@@ -48,73 +48,73 @@ dl.components > dd > span + span {
<h3>Componenti del progetto NetSurf</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/">NetSurf</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/">NetSurf</a></dt>
<dd>
<span>&copy; 2002&ndash;2020 The NetSurf Developers</span>
<span><a href="#gplv2">GPLv2</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
<dd>
<span>&copy; 2007&ndash;2018 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
<dd>
<span>&copy; 2007&ndash;2017 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
<dd>
<span>&copy; 2007&ndash;2017 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
<dd>
<span>&copy; 2008 James Shaw</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
<dd>
<span>&copy; 2005&ndash;2006 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
<dd>
<span>&copy; 2005&ndash;2009 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
<dd>
<span>&copy; 2008&ndash;2009 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
<dd>
<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
<dd>
<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2017 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
<dd>
<span>&copy; 2004 Richard Wilson<br>&copy; 2008 Sean Fox</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
<dd>
<span>&copy; 2009&ndash;2017 NetSurf Browser Project, Daniel Silverstone</span>
<span><a href="#mit">MIT</a></span>
@@ -124,49 +124,49 @@ dl.components > dd > span + span {
<h3>Componenti di terze parti</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://curl.haxx.se/">cURL</a></dt>
+<dt class="ns-border"><a href="https://curl.haxx.se/">cURL</a></dt>
<dd>
<span>&copy; 1996&ndash;2020 Daniel Stenberg</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://libharu.org/">Haru PDF</a></dt>
+<dt class="ns-border"><a href="https://libharu.org/">Haru PDF</a></dt>
<dd>
<span>&copy; 2000&ndash;2008 Takeshi Kanno</span>
<span><a href="#zlib">ZLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.ijg.org">libjpeg</a></dt>
+<dt class="ns-border"><a href="https://www.ijg.org">libjpeg</a></dt>
<dd>
<span>&copy; 1991&ndash;2010 Thomas G. Lane, Guido Vollbeding</span>
<span><a href="#ijg">IJG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.littlecms.com/">liblcms</a></dt>
+<dt class="ns-border"><a href="https://www.littlecms.com/">liblcms</a></dt>
<dd>
<span>&copy; 1998&ndash;2007 Marti Maria Saguer</span>
<span><a href="#mit">MIT</a></span>
</dd>
-q<dt class="ns-border"><a href="http://ro-oslib.sourceforge.net/">OSLib</a></dt>
+q<dt class="ns-border"><a href="https://ro-oslib.sourceforge.net/">OSLib</a></dt>
<dd>
<span>&copy; 1994&ndash;1998 Jonathan Coxhead and contributors</span>
<span><a href="#oslib">OSLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.openssl.org/">OpenSSL</a></dt>
+<dt class="ns-border"><a href="https://www.openssl.org/">OpenSSL</a></dt>
<dd>
<span>&copy; 1995&ndash;1998 Eric A. Young, Tim J. Hudson<br>&copy; 1998&ndash;2010 The OpenSSL Project</span>
<span><a href="#openssl">OpenSSL</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.libpng.org">libpng</a></dt>
+<dt class="ns-border"><a href="https://www.libpng.org">libpng</a></dt>
<dd>
<span>&copy; 2004&ndash;2010 Glenn Randers-Pehrson</span>
<span><a href="#png">PNG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
+<dt class="ns-border"><a href="https://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
<dd>
<span>&copy; 1995&ndash;1999 Simon Callan, Nick Burrett, Nicholas Clark and
Peter Burwood<br>&copy; 1999&ndash;2009 Nick Burrett, John Tytgat, Peter Naulls,
@@ -175,7 +175,7 @@ Graham Shaw, James Bursa and John-Mark Bell.</span>
<span><a href="#unixlib">UnixLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://zlib.net/">ZLib</a></dt>
+<dt class="ns-border"><a href="https://zlib.net/">ZLib</a></dt>
<dd>
<span>&copy; 1995&ndash;2010 Jean-loup Gailly and Mark Adler</span>
<span><a href="#zlib">ZLib</a></span>
diff --git a/resources/it/welcome.html b/resources/it/welcome.html
index c6b12b11d..98bb3a0ae 100644
--- a/resources/it/welcome.html
+++ b/resources/it/welcome.html
@@ -20,7 +20,7 @@
<p class="intro">NetSurf è la nostra idea di browser, per questo abbiamo scelto di renderlo veloce e sicuro ed ogni giorno lavoriamo per renderlo migliore, se hai qualche suggerimento o semplicemente hai bisogno di aiuto contattaci!<br><br> Grazie per aver scelto NetSurf!</p>
-<form method="get" action="http://www.google.it/search">
+<form method="get" action="https://www.google.it/search">
<div class="websearch">
<input type="text" name="q" size="42" maxlength="255">
<input type="submit" value="Ricerca Google" name="btnG">
@@ -29,29 +29,29 @@
<div class="links">
<ul>
-<li><a href="http://news.bbc.co.uk/">BBC News</a></li>
-<li><a href="http://www.reuters.com/news">Reuters</a></li>
-<li><a href="http://www.cnn.com/">CNN</a></li>
+<li><a href="https://news.bbc.co.uk/">BBC News</a></li>
+<li><a href="https://www.reuters.com/news">Reuters</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
</ul>
<ul>
-<li><a href="http://slashdot.org/">Slashdot</a></li>
-<li><a href="http://arstechnica.com/">Ars Technica</a></li>
-<li><a href="http://www.theregister.co.uk/">The Register</a></li>
-<li><a href="http://www.w3.org/">W3C</a></li>
+<li><a href="https://slashdot.org/">Slashdot</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
</ul>
<ul>
-<li><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
-<li><a href="http://google.it/">Google</a></li>
-<li><a href="http://yahoo.co.uk/">Yahoo!</a></li>
-<li><a href="http://www.imdb.com/">IMDB</a></li>
+<li><a href="https://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
+<li><a href="https://google.it/">Google</a></li>
+<li><a href="https://yahoo.co.uk/">Yahoo!</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
</ul>
<ul>
-<li><a href="http://www.iconbar.com/">The Icon Bar</a></li>
-<li><a href="http://www.riscosopen.org/">ROOL</a></li>
-<li><a href="http://www.riscos.info/">riscos.info</a></li>
+<li><a href="https://www.iconbar.com/">The Icon Bar</a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
</ul>
</div>
diff --git a/resources/ja/welcome.html b/resources/ja/welcome.html
index 5db1b7066..6f6cf97f3 100644
--- a/resources/ja/welcome.html
+++ b/resources/ja/welcome.html
@@ -21,7 +21,7 @@
<p class="intro">NetSurfã¯å°ã•ãã¦é€Ÿã„オープンソースã®ã‚¦ã‚§ãƒ–ブラウザã§ã™ã€‚ç§ãŸã¡ã¯ã„ã¤ã‚‚ã“ã®ãƒ–ラウザを改良ã™ã‚‹æ°—満々ã§ã™ã‹ã‚‰ã€ã©ã‚“ãªå•é¡Œã§ã‚‚声をã‹ã‘ã¦ãã ã•ã„。NetSurfã‚’é¸ã‚“ã§ãã‚Œã¦ã‚ã‚ŠãŒã¨ã†ï¼</p>
-<form method="get" action="http://www.google.co.jp/search">
+<form method="get" action="https://www.google.co.jp/search">
<div class="websearch">
<input type="text" name="q" size="42" maxlength="255">
<input type="submit" value="Google検索" name="btnG">
@@ -30,29 +30,29 @@
<div class="links">
<ul>
-<li><a href="http://news.bbc.co.uk/">BBC News</a></li>
-<li><a href="http://www.reuters.com/news">Reuters</a></li>
-<li><a href="http://www.cnn.com/">CNN</a></li>
+<li><a href="https://news.bbc.co.uk/">BBC News</a></li>
+<li><a href="https://www.reuters.com/news">Reuters</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
</ul>
<ul>
-<li><a href="http://slashdot.jp/">Slashdot</a></li>
-<li><a href="http://arstechnica.com/">Ars Technica</a></li>
-<li><a href="http://www.theregister.co.uk/">The Register</a></li>
-<li><a href="http://www.w3.org/">W3C</a></li>
+<li><a href="https://slashdot.jp/">Slashdot</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
</ul>
<ul>
-<li><a href="http://ja.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
-<li><a href="http://google.co.jp/">Google</a></li>
-<li><a href="http://yahoo.co.jp/">Yahoo!</a></li>
-<li><a href="http://www.imdb.com/">IMDB</a></li>
+<li><a href="https://ja.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
+<li><a href="https://google.co.jp/">Google</a></li>
+<li><a href="https://yahoo.co.jp/">Yahoo!</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
</ul>
<ul>
-<li><a href="http://www.iconbar.com/">The Icon Bar</a></li>
-<li><a href="http://www.riscosopen.org/">ROOL</a></li>
-<li><a href="http://www.riscos.info/">riscos.info</a></li>
+<li><a href="https://www.iconbar.com/">The Icon Bar</a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
</ul>
</div>
diff --git a/resources/nl/credits.html b/resources/nl/credits.html
index ed131b039..0bd3f02ea 100644
--- a/resources/nl/credits.html
+++ b/resources/nl/credits.html
@@ -95,7 +95,7 @@ div#DevList ul {
</div>
<div class="footer ns-even-fg-subtle">
-<p class="ns-border">Auteursrecht 2003&ndash;2020 De NetSurf-ontwikkelaars</p>
+<p class="ns-border">Auteursrecht 2003&ndash;2023 De NetSurf-ontwikkelaars</p>
</div>
</body>
diff --git a/resources/nl/licence.html b/resources/nl/licence.html
index 79138d728..f30ce1440 100644
--- a/resources/nl/licence.html
+++ b/resources/nl/licence.html
@@ -59,75 +59,75 @@ dan verwijder deze uitzonderingverklaring uit uw eigen versie.</p>
<h3>Onderdelen van het NetSurf-project</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/">NetSurf</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/">NetSurf</a></dt>
<dd>
<span>&copy; 2002&ndash;2020 De NetSurf-ontwikkerlaars</span>
<span><a href="#gplv2">GPLv2</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
<dd>
-<span>&copy; 2007&ndash;2018 John-Mark Bell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
<dd>
-<span>&copy; 2007&ndash;2018 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
<dd>
-<span>&copy; 2007&ndash;2018 John-Mark Bell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
<dd>
<span>&copy; 2008 James Shaw</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
<dd>
<span>&copy; 2005&ndash;2006 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
<dd>
<span>&copy; 2005&ndash;2009 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
<dd>
-<span>&copy; 2008&ndash;2009 James Bursa<br>&copy; 2016&ndash;2018 Michael Drake</span>
+<span>&copy; 2008&ndash;2009 James Bursa<br>&copy; 2016&ndash;2023 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
<dd>
-<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox<br>&copy; 2016 Vincent Sanders</span>
+<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox<br>&copy; 2016&ndash;2023 Vincent Sanders</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
<dd>
-<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2017 Michael Drake</span>
+<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2023 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
<dd>
<span>&copy; 2004 Richard Wilson</br>&copy; 2008 Sean Fox</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
<dd>
-<span>&copy; 2009&ndash;2017 NetSurf Browser Project, Daniel Silverstone</span>
+<span>&copy; 2009&ndash;2023 NetSurf Browser Project, Daniel Silverstone</span>
<span><a href="#mit">MIT</a></span>
</dd>
</dl>
@@ -136,49 +136,49 @@ dan verwijder deze uitzonderingverklaring uit uw eigen versie.</p>
<h3>Onderdelen van derden</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://curl.haxx.se/">cURL</a></dt>
+<dt class="ns-border"><a href="https://curl.haxx.se/">cURL</a></dt>
<dd>
<span>&copy; 1996&ndash;2020 Daniel Stenberg</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://libharu.org/">Haru PDF</a></dt>
+<dt class="ns-border"><a href="https://libharu.org/">Haru PDF</a></dt>
<dd>
<span>&copy; 2000&ndash;2008 Takeshi Kanno</span>
<span><a href="#zlib">ZLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.ijg.org">libjpeg</a></dt>
+<dt class="ns-border"><a href="https://www.ijg.org">libjpeg</a></dt>
<dd>
<span>&copy; 1991&ndash;2010 Thomas G. Lane, Guido Vollbeding</span>
<span><a href="#ijg">IJG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.littlecms.com/">liblcms</a></dt>
+<dt class="ns-border"><a href="https://www.littlecms.com/">liblcms</a></dt>
<dd>
<span>&copy; 1998&ndash;2007 Marti Maria Saguer</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://ro-oslib.sourceforge.net/">OSLib</a></dt>
+<dt class="ns-border"><a href="https://ro-oslib.sourceforge.net/">OSLib</a></dt>
<dd>
<span>&copy; 1994&ndash;1998 Jonathan Coxhead and contributors</span>
<span><a href="#oslib">OSLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.openssl.org/">OpenSSL</a></dt>
+<dt class="ns-border"><a href="https://www.openssl.org/">OpenSSL</a></dt>
<dd>
<span>&copy; 1995&ndash;1998 Eric A. Young, Tim J. Hudson<br>&copy; 1998&ndash;2010 The OpenSSL Project</span>
<span><a href="#openssl">OpenSSL</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.libpng.org">libpng</a></dt>
+<dt class="ns-border"><a href="https://www.libpng.org">libpng</a></dt>
<dd>
<span>&copy; 2004&ndash;2010 Glenn Randers-Pehrson</span>
<span><a href="#png">PNG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
+<dt class="ns-border"><a href="https://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
<dd>
<span>&copy; 1995&ndash;1999 Simon Callan, Nick Burrett, Nicholas Clark and
Peter Burwood<br>&copy; 1999&ndash;2009 Nick Burrett, John Tytgat, Peter Naulls,
@@ -187,7 +187,7 @@ Graham Shaw, James Bursa and John-Mark Bell.</span>
<span><a href="#unixlib">UnixLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://zlib.net/">ZLib</a></dt>
+<dt class="ns-border"><a href="https://zlib.net/">ZLib</a></dt>
<dd>
<span>&copy; 1995&ndash;2010 Jean-loup Gailly and Mark Adler</span>
<span><a href="#zlib">ZLib</a></span>
diff --git a/resources/nl/welcome.html b/resources/nl/welcome.html
index c4678f8ce..e138fb7bb 100644
--- a/resources/nl/welcome.html
+++ b/resources/nl/welcome.html
@@ -21,7 +21,7 @@
<p class="intro">NetSurf is een kleine, snelle webbrowser met open broncode. Wij willen altijd onze browser nog beter maken. Neem dus contact op met de ontwikkelaars (in het Engels!) of met de vertalers (gewoon in het Nederlands) mocht je verbeteringsvoorstellen hebben en/of problemen ervaren. Bedankt dat je voor NetSurf hebt gekozen.</p>
-<form method="get" action="http://www.ixquick.nl/do/search/">
+<form method="get" action="https://www.ixquick.nl/do/search/">
<div class="websearch">
<input type="text" name="q" size="42" maxlength="255">
<input type="submit" value="Zoeken" name="btnG">
@@ -32,36 +32,36 @@
<p><h3>Nieuws</h3>
<ul>
-<li><a href="http://nos.nl/nieuws/">NOS nieuws</a></li>
-<li><a href="http://teletekst-data.nos.nl/webplus?p=100">NOS teletekst</a></li>
-<li><a href="http://www.nu.nl">NU.nl</a></li>
-<li><a href="http://news.bbc.co.uk/">BBC news</a></li>
-<li><a href="http://www.cnn.com/">CNN</a></li>
+<li><a href="https://nos.nl/nieuws/">NOS nieuws</a></li>
+<li><a href="https://teletekst-data.nos.nl/webplus?p=100">NOS teletekst</a></li>
+<li><a href="https://www.nu.nl">NU.nl</a></li>
+<li><a href="https://news.bbc.co.uk/">BBC news</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
</ul></p>
<p><h3>RISC OS</h3>
<ul>
-<li><a href="http://www.bigbenclub.nl/">Big Ben Club</a></li>
-<li><a href="http://www.iconbar.com/">Icon Bar</a></li>
+<li><a href="https://www.bigbenclub.nl/">Big Ben Club</a></li>
+<li><a href="https://www.iconbar.com/">Icon Bar</a></li>
<li><a href="http://riscos.be">RISCOS.be</a>
-<li><a href="http://www.riscos.info/">riscos.info</a></li>
-<li><a href="http://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
</ul></p>
<p><h3>Techniek</h3>
<ul>
-<li><a href="http://arstechnica.com/">Ars Technica</a></li>
-<li><a href="http://slashdot.org/">Slashdot</a></li>
-<li><a href="http://www.theregister.co.uk/">The Register</a></li>
-<li><a href="http://tweakers.net">Tweakers</a></li>
-<li><a href="http://www.w3.org/">W3C</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://slashdot.org/">Slashdot</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://tweakers.net">Tweakers</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
</ul></p>
<p><h3>Zoeken</h3>
<ul>
-<li><a href="http://google.nl/">Google</a></li>
-<li><a href="http://www.imdb.com/">IMDB</a></li>
-<li><a href="http://nl.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
+<li><a href="https://google.nl/">Google</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
+<li><a href="https://nl.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
</ul></p>
</div>
diff --git a/resources/zh_CN/credits.html b/resources/zh_CN/credits.html
index 864827cb2..aa669f417 100644
--- a/resources/zh_CN/credits.html
+++ b/resources/zh_CN/credits.html
@@ -91,7 +91,7 @@ div#DevList ul {
</div>
<div class="footer">
-<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2020 NetSurf å¼€å‘人员</p>
+<p class="ns-even-fg-faded ns-border">Copyright 2003&ndash;2023 NetSurf å¼€å‘人员</p>
</div>
</body>
diff --git a/resources/zh_CN/licence.html b/resources/zh_CN/licence.html
index dd8e9d364..2d7a29f4a 100644
--- a/resources/zh_CN/licence.html
+++ b/resources/zh_CN/licence.html
@@ -56,75 +56,75 @@ version.</p>
<h3>NetSurf 项目组件</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/">NetSurf</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/">NetSurf</a></dt>
<dd>
-<span>&copy; 2002&ndash;2020 NetSurf å¼€å‘人员</span>
+<span>&copy; 2002&ndash;2023 NetSurf å¼€å‘人员</span>
<span><a href="#gplv2">GPLv2</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libcss/">LibCSS</a></dt>
<dd>
-<span>&copy; 2007&ndash;2019 John-Mark Bell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/hubbub/">Hubbub</a></dt>
<dd>
-<span>&copy; 2007&ndash;2019 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell<br>&copy; 2008&ndash;2009 Andrew Sidwell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libparserutils/">LibParserUtils</a></dt>
<dd>
-<span>&copy; 2007&ndash;2019 John-Mark Bell</span>
+<span>&copy; 2007&ndash;2023 John-Mark Bell</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/librosprite/">LibROSprite</a></dt>
<dd>
<span>&copy; 2008 James Shaw</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libpencil">Libpencil</a></dt>
<dd>
-<span>&copy; 2005&ndash;2006 James Bursa</span>
+<span>&copy; 2005&ndash;2023 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/rufl">RUfl</a></dt>
<dd>
-<span>&copy; 2005&ndash;2009 James Bursa</span>
+<span>&copy; 2005&ndash;2023 James Bursa</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libsvgtiny">Libsvgtiny</a></dt>
<dd>
<span>&copy; 2008&ndash;2009 James Bursa<br>&copy; 2017 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsbmp/">Libnsbmp</a></dt>
<dd>
<span>&copy; 2006 Richard Wilson<br>&copy; 2008 Sean Fox<br>&copy; 2017 Vincent Sanders</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsfb/">Libnsfb</a></dt>
<dd>
-<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2017 Michael Drake</span>
+<span>&copy; 2009&ndash;2017 Vincent Sanders<br>&copy; 2009&ndash;2023 Michael Drake</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libnsgif/">Libnsgif</a></dt>
<dd>
<span>&copy; 2004 Richard Wilson</br>&copy; 2008 Sean Fox</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
+<dt class="ns-border"><a href="https://www.netsurf-browser.org/projects/libwapcaplet">LibWapcaplet</a></dt>
<dd>
-<span>&copy; 2009&ndash;2020 NetSurf æµè§ˆå™¨é¡¹ç›®ï¼ŒDaniel Silverstone</span>
+<span>&copy; 2009&ndash;2023 NetSurf æµè§ˆå™¨é¡¹ç›®ï¼ŒDaniel Silverstone</span>
<span><a href="#mit">MIT</a></span>
</dd>
</dl>
@@ -132,49 +132,49 @@ version.</p>
<h3>第三方组件</h3>
<dl class="components">
-<dt class="ns-border"><a href="http://curl.haxx.se/">cURL</a></dt>
+<dt class="ns-border"><a href="https://curl.haxx.se/">cURL</a></dt>
<dd>
-<span>&copy; 1996&ndash;2020 Daniel Stenberg</span>
+<span>&copy; 1996&ndash;2023 Daniel Stenberg</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://libharu.org/">Haru PDF</a></dt>
+<dt class="ns-border"><a href="https://libharu.org/">Haru PDF</a></dt>
<dd>
<span>&copy; 2000&ndash;2008 Takeshi Kanno</span>
<span><a href="#zlib">ZLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.ijg.org">libjpeg</a></dt>
+<dt class="ns-border"><a href="https://www.ijg.org">libjpeg</a></dt>
<dd>
<span>&copy; 1991&ndash;2010 Thomas G. Lane,Guido Vollbeding</span>
<span><a href="#ijg">IJG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.littlecms.com/">liblcms</a></dt>
+<dt class="ns-border"><a href="https://www.littlecms.com/">liblcms</a></dt>
<dd>
<span>&copy; 1998&ndash;2007 Marti Maria Saguer</span>
<span><a href="#mit">MIT</a></span>
</dd>
-<dt class="ns-border"><a href="http://ro-oslib.sourceforge.net/">OSLib</a></dt>
+<dt class="ns-border"><a href="https://ro-oslib.sourceforge.net/">OSLib</a></dt>
<dd>
<span>&copy; 1994&ndash;1998 Jonathan Coxhead and contributors</span>
<span><a href="#oslib">OSLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.openssl.org/">OpenSSL</a></dt>
+<dt class="ns-border"><a href="https://www.openssl.org/">OpenSSL</a></dt>
<dd>
<span>&copy; 1995&ndash;1998 Eric A. Young, Tim J. Hudson<br>&copy; 1998&ndash;2010 OpenSSL 项目</span>
<span><a href="#openssl">OpenSSL</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.libpng.org">libpng</a></dt>
+<dt class="ns-border"><a href="https://www.libpng.org">libpng</a></dt>
<dd>
<span>&copy; 2004&ndash;2010 Glenn Randers-Pehrson</span>
<span><a href="#png">PNG</a></span>
</dd>
-<dt class="ns-border"><a href="http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
+<dt class="ns-border"><a href="https://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2Frecipe%2Ffiles%2Fgcc%2Flibunixlib%2F&#a9586e56e500c7fdfb58279167b82472d">UnixLib</a></dt>
<dd>
<span>&copy; 1995&ndash;1999 Simon Callan,Nick Burrett,Nicholas Clark and
Peter Burwood<br>&copy; 1999&ndash;2009 Nick Burrett,John Tytgat,Peter Naulls,
@@ -183,7 +183,7 @@ Graham Shaw,James Bursa and John-Mark Bell。</span>
<span><a href="#unixlib">UnixLib</a></span>
</dd>
-<dt class="ns-border"><a href="http://zlib.net/">ZLib</a></dt>
+<dt class="ns-border"><a href="https://zlib.net/">ZLib</a></dt>
<dd>
<span>&copy; 1995&ndash;2010 Jean-loup Gailly and Mark Adler</span>
<span><a href="#zlib">ZLib</a></span>
diff --git a/resources/zh_CN/welcome.html b/resources/zh_CN/welcome.html
index 1bbe30f98..340a8e206 100644
--- a/resources/zh_CN/welcome.html
+++ b/resources/zh_CN/welcome.html
@@ -21,7 +21,7 @@
<p class="intro">NetSurf 是一款体积å°ã€é€Ÿè¯»å¿«çš„å¼€æºç½‘络æµè§ˆå™¨ã€‚我们一直致力于改进æµè§ˆå™¨ï¼Œå¦‚æžœé‡åˆ°ä»»ä½•é—®é¢˜ï¼Œè¯·ä¸Žæˆ‘们è”系。感谢您选择 NetSurfï¼</p>
-<form method="get" action="http://www.google.co.uk/search">
+<form method="get" action="https://www.google.co.uk/search">
<div class="websearch">
<input type="text" name="q" size="42" maxlength="255">
<input type="submit" value="Google Search" name="btnG">
@@ -30,29 +30,29 @@
<div class="links">
<ul>
-<li><a href="http://news.bbc.co.uk/">BBC æ–°é—»</a></li>
-<li><a href="http://www.reuters.com/news">è·¯é€ç¤¾</a></li>
-<li><a href="http://www.cnn.com/">CNN</a></li>
+<li><a href="https://news.bbc.co.uk/">BBC æ–°é—»</a></li>
+<li><a href="https://www.reuters.com/news">è·¯é€ç¤¾</a></li>
+<li><a href="https://www.cnn.com/">CNN</a></li>
</ul>
<ul>
-<li><a href="http://slashdot.org/">Slashdot</a></li>
-<li><a href="http://arstechnica.com/">Ars Technica</a></li>
-<li><a href="http://www.theregister.co.uk/">The Register</a></li>
-<li><a href="http://www.w3.org/">W3C</a></li>
+<li><a href="https://slashdot.org/">Slashdot</a></li>
+<li><a href="https://arstechnica.com/">Ars Technica</a></li>
+<li><a href="https://www.theregister.co.uk/">The Register</a></li>
+<li><a href="https://www.w3.org/">W3C</a></li>
</ul>
<ul>
-<li><a href="http://en.wikipedia.org/wiki/Main_Page">维基百科</a></li>
-<li><a href="http://google.co.uk/">谷歌</a></li>
-<li><a href="http://yahoo.co.uk/">雅虎</a></li>
-<li><a href="http://www.imdb.com/">IMDB</a></li>
+<li><a href="https://en.wikipedia.org/wiki/Main_Page">维基百科</a></li>
+<li><a href="https://google.co.uk/">谷歌</a></li>
+<li><a href="https://yahoo.co.uk/">雅虎</a></li>
+<li><a href="https://www.imdb.com/">IMDB</a></li>
</ul>
<ul>
-<li><a href="http://www.iconbar.com/">图标æ </a></li>
-<li><a href="http://www.riscosopen.org/">ROOL</a></li>
-<li><a href="http://www.riscos.info/">riscos.info</a></li>
+<li><a href="https://www.iconbar.com/">图标æ </a></li>
+<li><a href="https://www.riscosopen.org/">ROOL</a></li>
+<li><a href="https://www.riscos.info/">riscos.info</a></li>
</ul>
</div>
diff --git a/test/assert.c b/test/assert.c
index d21926e5e..fb4db8cc9 100644
--- a/test/assert.c
+++ b/test/assert.c
@@ -30,7 +30,23 @@ __ns_assert_fail(const char *__assertion, const char *__file,
unsigned int __line, const char *__function)
__THROW __attribute__ ((__noreturn__));
-/* We use this to flush coverage data */
+#if __GNUC__ > 10
+
+/* We use this to dump coverage data in gcc 11 and later */
+extern void __gcov_dump(void);
+
+/* And here's our entry point */
+void
+__ns_assert_fail(const char *__assertion, const char *__file,
+ unsigned int __line, const char *__function)
+{
+ __gcov_dump();
+ __assert_fail(__assertion, __file, __line, __function);
+}
+
+#else
+
+/* We use this to flush coverage data before gcc 11 */
extern void __gcov_flush(void);
/* And here's our entry point */
@@ -41,3 +57,4 @@ __ns_assert_fail(const char *__assertion, const char *__file,
__gcov_flush();
__assert_fail(__assertion, __file, __line, __function);
}
+#endif
diff --git a/test/corestrings.c b/test/corestrings.c
index 43eb5130e..c3c4e93eb 100644
--- a/test/corestrings.c
+++ b/test/corestrings.c
@@ -40,7 +40,7 @@
*
* This is used to test all the out of memory paths in initialisation.
*/
-#define CORESTRING_TEST_COUNT 487
+#define CORESTRING_TEST_COUNT 488
START_TEST(corestrings_test)
{
diff --git a/test/data/Choices-all b/test/data/Choices-all
index baae231a2..5c26f2887 100644
--- a/test/data/Choices-all
+++ b/test/data/Choices-all
@@ -26,6 +26,7 @@ foreground_images:1
background_images:1
animate_images:1
enable_javascript:1
+author_level_css:1
script_timeout:10
expire_url:28
font_default:0
@@ -65,6 +66,7 @@ remove_backgrounds:0
enable_loosening:1
enable_PDF_compression:1
enable_PDF_password:0
+prefer_dark_mode:0
sys_colour_ActiveBorder:d3d3d3
sys_colour_ActiveCaption:f1f1f1
sys_colour_AppWorkspace:f1f1f1
diff --git a/test/js/class-list.html b/test/js/class-list.html
new file mode 100644
index 000000000..4c73283e5
--- /dev/null
+++ b/test/js/class-list.html
@@ -0,0 +1,29 @@
+<html>
+ <head>
+ <title>Class List (and other token lists?)</title>
+ <style>
+ .bad { background-color: red; }
+ .ok { background-color: green; }
+ </style>
+ </head>
+ <body>
+ <h1>This is a set of demonstrators for the token list Element.classList</h1>
+ <h2>This first is taken from the MDN for DOMTokenList</h2>
+ <span id="demo1" class=" d d e f bad"></span>
+ <script>
+ var span = document.getElementById("demo1");
+ var classes = span.classList;
+ classes.add("x", "d", "g");
+ classes.remove("e", "g");
+ classes.toggle("d"); // Toggles d off
+ classes.toggle("q", false); // Forces q off (won't be present)
+ classes.toggle("d"); // Toggles d on
+ classes.toggle("d", true); // Forces d on (won't toggle it off again)
+ if (classes.contains("d")) {
+ classes.add("ok")
+ classes.remove("bad")
+ span.textContent = "span classList is \"" + classes + '"';
+ }
+ </script>
+ </body>
+</html>
diff --git a/test/js/index.html b/test/js/index.html
index 032946726..6d2c6541e 100644
--- a/test/js/index.html
+++ b/test/js/index.html
@@ -104,6 +104,7 @@
<li><a href="assorted-log-doc-write.html">console.log and document.write</a></li>
<li><a href="wikipedia-lcm.html">Example from wikipedia</a></li>
<li><a href="verify-instanceofness.html">Check instanceof behaviour</a></li>
+<li><a href="class-list.html">Class list (and other token lists?)</a></li>
<li><a href="mandelbrot.html">Canvas/ImageData Mandelbrot ploter</a></li>
<li><a href="life.html">Game of Life</a></li>
</ul>
diff --git a/test/monkey-see-monkey-do b/test/monkey-see-monkey-do
index 4dc761aae..72b8685ec 100755
--- a/test/monkey-see-monkey-do
+++ b/test/monkey-see-monkey-do
@@ -117,7 +117,7 @@ def main():
index = index.read()
print("Parsing tests...")
- test_set = yaml.load_all(index)
+ test_set = yaml.load_all(index, Loader=yaml.SafeLoader)
print("Running tests...")
ret = 0
diff --git a/tools/jenkins-build.sh b/tools/jenkins-build.sh
index d31b233b4..7dcd788a0 100755
--- a/tools/jenkins-build.sh
+++ b/tools/jenkins-build.sh
@@ -54,11 +54,16 @@ MAKE=make
# NetSurf version number haiku needs it for package name
NETSURF_VERSION="3.11"
+UPDATE_LATEST=yes
+
# Ensure the combination of target and toolchain works and set build
# specific parameters too
case ${TARGET} in
"riscos")
case ${HOST} in
+ "arm-riscos-gnueabi")
+ UPDATE_LATEST=no
+ ;;
"arm-unknown-riscos")
;;
@@ -69,6 +74,10 @@ case ${TARGET} in
esac
+ export GCCSDK_INSTALL_ENV=/opt/netsurf/${HOST}/env
+ export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${HOST}/cross/bin
+ IDENTIFIER="${HOST}-${IDENTIFIER}"
+ OLD_IDENTIFIER="${HOST}-${OLD_IDENTIFIER}"
PKG_SRC=netsurf
PKG_SFX=.zip
;;
@@ -285,6 +294,11 @@ case ${TARGET} in
MAKE=gmake
;;
+ "arm-riscos-gnueabi")
+ export GCCSDK_INSTALL_ENV=/opt/netsurf/${HOST}/env
+ export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${HOST}/cross/bin
+ ;;
+
"arm-unknown-riscos")
export GCCSDK_INSTALL_ENV=/opt/netsurf/${HOST}/env
export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${HOST}/cross/bin
@@ -341,6 +355,11 @@ case ${TARGET} in
MAKE=gmake
;;
+ "arm-riscos-gnueabi")
+ export GCCSDK_INSTALL_ENV=/opt/netsurf/${HOST}/env
+ export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${HOST}/cross/bin
+ ;;
+
"arm-unknown-riscos")
export GCCSDK_INSTALL_ENV=/opt/netsurf/${HOST}/env
export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${HOST}/cross/bin
@@ -483,4 +502,7 @@ done
############ Expired package artifact removal and latest linking ##############
-ssh netsurf@ci.netsurf-browser.org "rm -f ${OLD_ARTIFACT_TARGETS} ${DESTDIR}/LATEST && echo "${NEW_ARTIFACT_TARGET}${PKG_SFX}" > ${DESTDIR}/LATEST"
+ssh netsurf@ci.netsurf-browser.org "rm -f ${OLD_ARTIFACT_TARGETS}"
+if [ ${UPDATE_LATEST} = "yes" ]; then
+ ssh netsurf@ci.netsurf-browser.org "rm -f ${DESTDIR}/LATEST && echo "${NEW_ARTIFACT_TARGET}${PKG_SFX}" > ${DESTDIR}/LATEST"
+fi
diff --git a/utils/config.h b/utils/config.h
index 0227f4177..f54326dba 100644
--- a/utils/config.h
+++ b/utils/config.h
@@ -146,6 +146,15 @@ char *realpath(const char *path, char *resolved_path);
#undef HAVE_SCANDIR
#endif
+#define HAVE_DIRFD
+#define HAVE_UNLINKAT
+#define HAVE_FSTATAT
+#if (defined(_WIN32) || defined(__riscos__) || defined(__HAIKU__) || defined(__BEOS__) || defined(__amigaos4__) || defined(__AMIGA__) || defined(__MINT__))
+#undef HAVE_DIRFD
+#undef HAVE_UNLINKAT
+#undef HAVE_FSTATAT
+#endif
+
#define HAVE_REGEX
#if (defined(__serenity__))
#undef HAVE_REGEX
diff --git a/utils/corestringlist.h b/utils/corestringlist.h
index b253b3b56..5cdbb3af7 100644
--- a/utils/corestringlist.h
+++ b/utils/corestringlist.h
@@ -167,6 +167,7 @@ CORESTRING_LWC_VALUE(application_octet_stream, "application/octet-stream");
CORESTRING_LWC_VALUE(image_gif, "image/gif");
CORESTRING_LWC_VALUE(image_png, "image/png");
CORESTRING_LWC_VALUE(image_jpeg, "image/jpeg");
+CORESTRING_LWC_VALUE(image_jxl, "image/jxl");
CORESTRING_LWC_VALUE(image_bmp, "image/bmp");
CORESTRING_LWC_VALUE(image_vnd_microsoft_icon, "image/vnd.microsoft.icon");
CORESTRING_LWC_VALUE(image_webp, "image/webp");
diff --git a/utils/file.c b/utils/file.c
index c460e49e9..75a8a1c03 100644
--- a/utils/file.c
+++ b/utils/file.c
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <fcntl.h>
#include <errno.h>
#include "desktop/gui_internal.h"
@@ -318,16 +319,13 @@ nserror netsurf_mkdir_all(const char *fname)
nserror
netsurf_recursive_rm(const char *path)
{
- struct dirent **listing = NULL; /* directory entry listing */
- int nentries, ent;
+ DIR *parent;
+ struct dirent *entry;
nserror ret = NSERROR_OK;
struct stat ent_stat; /* stat result of leaf entry */
- char *leafpath = NULL;
- const char *leafname;
-
- nentries = scandir(path, &listing, 0, alphasort);
- if (nentries < 0) {
+ parent = opendir(path);
+ if (parent == NULL) {
switch (errno) {
case ENOENT:
return NSERROR_NOT_FOUND;
@@ -336,26 +334,44 @@ netsurf_recursive_rm(const char *path)
}
}
- for (ent = 0; ent < nentries; ent++) {
- leafname = listing[ent]->d_name;
- if (strcmp(leafname, ".") == 0 ||
- strcmp(leafname, "..") == 0)
+ while ((entry = readdir(parent))) {
+ char *leafpath = NULL;
+
+ if (strcmp(entry->d_name, ".") == 0 ||
+ strcmp(entry->d_name, "..") == 0)
continue;
- ret = netsurf_mkpath(&leafpath, NULL, 2, path, leafname);
- if (ret != NSERROR_OK) goto out;
+
+ ret = netsurf_mkpath(&leafpath, NULL, 2, path, entry->d_name);
+ if (ret != NSERROR_OK)
+ goto out;
+
+#if (defined(HAVE_DIRFD) && defined(HAVE_FSTATAT))
+ if (fstatat(dirfd(parent), entry->d_name, &ent_stat,
+ AT_SYMLINK_NOFOLLOW) != 0) {
+#else
if (stat(leafpath, &ent_stat) != 0) {
+#endif
+ free(leafpath);
goto out_via_errno;
}
if (S_ISDIR(ent_stat.st_mode)) {
ret = netsurf_recursive_rm(leafpath);
- if (ret != NSERROR_OK) goto out;
+ if (ret != NSERROR_OK) {
+ free(leafpath);
+ goto out;
+ }
} else {
+#if (defined(HAVE_DIRFD) && defined(HAVE_UNLINKAT))
+ if (unlinkat(dirfd(parent), entry->d_name, 0) != 0) {
+#else
if (unlink(leafpath) != 0) {
+#endif
+ free(leafpath);
goto out_via_errno;
}
}
+
free(leafpath);
- leafpath = NULL;
}
if (rmdir(path) != 0) {
@@ -373,16 +389,7 @@ out_via_errno:
ret = NSERROR_UNKNOWN;
}
out:
- if (listing != NULL) {
- for (ent = 0; ent < nentries; ent++) {
- free(listing[ent]);
- }
- free(listing);
- }
-
- if (leafpath != NULL) {
- free(leafpath);
- }
+ closedir(parent);
return ret;
}
diff --git a/utils/filename.c b/utils/filename.c
index 00ade7409..346fa85cc 100644
--- a/utils/filename.c
+++ b/utils/filename.c
@@ -29,10 +29,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include "utils/dirent.h"
+#include "utils/errors.h"
+#include "utils/file.h"
#include "utils/filename.h"
#include "utils/log.h"
#include "utils/utils.h"
@@ -55,7 +58,6 @@ static char filename_directory[256];
static struct directory *filename_create_directory(const char *prefix);
static bool filename_flush_directory(const char *folder, int depth);
-static bool filename_delete_recursive(char *folder);
/**
* Request a new, unique, filename.
@@ -272,6 +274,8 @@ bool filename_flush_directory(const char *folder, int depth)
}
parent = opendir(folder);
+ if (parent == NULL)
+ return false;
while ((entry = readdir(parent))) {
int written;
@@ -288,7 +292,12 @@ bool filename_flush_directory(const char *folder, int depth)
child[sizeof(child) - 1] = '\0';
}
+#if (defined(HAVE_DIRFD) && defined(HAVE_FSTATAT))
+ if (fstatat(dirfd(parent), entry->d_name, &statbuf,
+ AT_SYMLINK_NOFOLLOW) == -1) {
+#else
if (stat(child, &statbuf) == -1) {
+#endif
NSLOG(netsurf, INFO, "Unable to stat %s: %s", child,
strerror(errno));
continue;
@@ -354,14 +363,20 @@ bool filename_flush_directory(const char *folder, int depth)
/* delete or recurse */
if (del) {
- if (S_ISDIR(statbuf.st_mode))
- filename_delete_recursive(child);
-
- if (remove(child))
- NSLOG(netsurf, INFO, "Failed to remove '%s'",
- child);
- else
- changed = true;
+ if (S_ISDIR(statbuf.st_mode)) {
+ changed = (netsurf_recursive_rm(child) ==
+ NSERROR_OK);
+ } else {
+#if (defined(HAVE_DIRFD) && defined(HAVE_UNLINKAT))
+ if (unlinkat(dirfd(parent), entry->d_name, 0)) {
+#else
+ if (unlink(child)) {
+#endif
+ NSLOG(netsurf, INFO,
+ "Failed to remove '%s'", child);
+ } else
+ changed = true;
+ }
} else {
while (filename_flush_directory(child, depth + 1));
}
@@ -374,61 +389,6 @@ bool filename_flush_directory(const char *folder, int depth)
/**
- * Recursively deletes the contents of a directory
- *
- * \param folder the directory to delete
- * \return true on success, false otherwise
- */
-bool filename_delete_recursive(char *folder)
-{
- DIR *parent;
- struct dirent *entry;
- char child[256];
- struct stat statbuf;
-
- parent = opendir(folder);
-
- while ((entry = readdir(parent))) {
- int written;
-
- /* Ignore '.' and '..' */
- if (strcmp(entry->d_name, ".") == 0 ||
- strcmp(entry->d_name, "..") == 0)
- continue;
-
- written = snprintf(child, sizeof(child), "%s/%s",
- folder, entry->d_name);
- if (written == sizeof(child)) {
- child[sizeof(child) - 1] = '\0';
- }
-
- if (stat(child, &statbuf) == -1) {
- NSLOG(netsurf, INFO, "Unable to stat %s: %s", child,
- strerror(errno));
- continue;
- }
-
- if (S_ISDIR(statbuf.st_mode)) {
- if (!filename_delete_recursive(child)) {
- closedir(parent);
- return false;
- }
- }
-
- if (remove(child)) {
- NSLOG(netsurf, INFO, "Failed to remove '%s'", child);
- closedir(parent);
- return false;
- }
- }
-
- closedir(parent);
-
- return true;
-}
-
-
-/**
* Creates a new directory.
*
* \param prefix the prefix to use, or NULL to allocate a new one
diff --git a/utils/idna.c b/utils/idna.c
index 628ef1fac..3ce3e1be1 100644
--- a/utils/idna.c
+++ b/utils/idna.c
@@ -440,7 +440,7 @@ static bool idna__is_valid(int32_t *label, size_t len)
/* 4. Check characters not DISALLOWED by RFC5892 */
if (idna_prop == IDNA_P_DISALLOWED) {
NSLOG(netsurf, INFO,
- "Check failed: character %"PRIsizet" (%x) is DISALLOWED",
+ "Check failed: character %"PRIsizet" (%"PRIx32") is DISALLOWED",
i,
label[i]);
return false;
@@ -450,7 +450,7 @@ static bool idna__is_valid(int32_t *label, size_t len)
if (idna_prop == IDNA_P_CONTEXTJ) {
if (idna__contextj_rule(label, i, len) == false) {
NSLOG(netsurf, INFO,
- "Check failed: character %"PRIsizet" (%x) does not conform to CONTEXTJ rule",
+ "Check failed: character %"PRIsizet" (%"PRIx32") does not conform to CONTEXTJ rule",
i,
label[i]);
return false;
@@ -462,7 +462,7 @@ static bool idna__is_valid(int32_t *label, size_t len)
if (idna_prop == IDNA_P_CONTEXTO) {
if (idna__contexto_rule(label[i]) == false) {
NSLOG(netsurf, INFO,
- "Check failed: character %"PRIsizet" (%x) has no CONTEXTO rule defined",
+ "Check failed: character %"PRIsizet" (%"PRIx32") has no CONTEXTO rule defined",
i,
label[i]);
return false;
@@ -472,7 +472,7 @@ static bool idna__is_valid(int32_t *label, size_t len)
/* 7. Check characters are not UNASSIGNED */
if (idna_prop == IDNA_P_UNASSIGNED) {
NSLOG(netsurf, INFO,
- "Check failed: character %"PRIsizet" (%x) is UNASSIGNED",
+ "Check failed: character %"PRIsizet" (%"PRIx32") is UNASSIGNED",
i,
label[i]);
return false;
diff --git a/utils/inet.h b/utils/inet.h
index da1798432..29010efc1 100644
--- a/utils/inet.h
+++ b/utils/inet.h
@@ -40,6 +40,15 @@
#include <arpa/inet.h>
#include <sys/select.h>
+#define ns_close_socket close
+
+#ifdef WITH_AMISSL
+/* AmiSSL needs everything to be using bsdsocket directly to avoid conflicts */
+#include <proto/bsdsocket.h>
+#undef ns_close_socket
+#define ns_close_socket CloseSocket
+#endif
+
#else
#include <winsock2.h>
@@ -49,6 +58,8 @@
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
+#define ns_close_socket closesocket
+
#endif
diff --git a/utils/libdom.c b/utils/libdom.c
index a996e98bf..c39aad343 100644
--- a/utils/libdom.c
+++ b/utils/libdom.c
@@ -28,129 +28,6 @@
#include "utils/log.h"
#include "utils/libdom.h"
-/* exported interface documented in libdom.h */
-bool libdom_treewalk(dom_node *root,
- bool (*callback)(dom_node *node, dom_string *name, void *ctx),
- void *ctx)
-{
- dom_node *node;
- bool result = true;
-
- node = dom_node_ref(root); /* tree root */
-
- while (node != NULL) {
- dom_node *next = NULL;
- dom_node_type type;
- dom_string *name;
- dom_exception exc;
-
- exc = dom_node_get_first_child(node, &next);
- if (exc != DOM_NO_ERR) {
- dom_node_unref(node);
- break;
- }
-
- if (next != NULL) {
- /* 1. Got children */
- dom_node_unref(node);
- node = next;
- } else {
- /* No children; siblings & ancestor's siblings */
- while (node != NULL) {
- exc = dom_node_get_next_sibling(node, &next);
- if (exc != DOM_NO_ERR) {
- dom_node_unref(node);
- node = NULL;
- break;
- }
-
- if (next != NULL) {
- /* 2. Got sibling */
- break;
- }
-
- exc = dom_node_get_parent_node(node, &next);
- if (exc != DOM_NO_ERR) {
- dom_node_unref(node);
- node = NULL;
- break;
- }
-
- /* 3. Try parent */
- dom_node_unref(node);
- node = next;
- }
-
- if (node == NULL)
- break;
-
- dom_node_unref(node);
- node = next;
- }
-
- assert(node != NULL);
-
- exc = dom_node_get_node_type(node, &type);
- if ((exc != DOM_NO_ERR) || (type != DOM_ELEMENT_NODE))
- continue;
-
- exc = dom_node_get_node_name(node, &name);
- if (exc != DOM_NO_ERR)
- continue;
-
- result = callback(node, name, ctx);
-
- dom_string_unref(name);
-
- if (result == false) {
- break; /* callback caused early termination */
- }
-
- }
- return result;
-}
-
-
-/* libdom_treewalk context for libdom_find_element */
-struct find_element_ctx {
- lwc_string *search;
- dom_node *found;
-};
-
-/* libdom_treewalk callback for libdom_find_element */
-static bool libdom_find_element_callback(dom_node *node, dom_string *name,
- void *ctx)
-{
- struct find_element_ctx *data = ctx;
-
- if (dom_string_caseless_lwc_isequal(name, data->search)) {
- /* Found element */
- data->found = node;
- return false; /* Discontinue search */
- }
-
- return true; /* Continue search */
-}
-
-
-/* exported interface documented in libdom.h */
-dom_node *libdom_find_element(dom_node *node, lwc_string *element_name)
-{
- struct find_element_ctx data;
-
- assert(element_name != NULL);
-
- if (node == NULL)
- return NULL;
-
- data.search = element_name;
- data.found = NULL;
-
- libdom_treewalk(node, libdom_find_element_callback, &data);
-
- return data.found;
-}
-
/* exported interface documented in libdom.h */
dom_node *libdom_find_first_element(dom_node *parent, lwc_string *element_name)
diff --git a/utils/libdom.h b/utils/libdom.h
index 306aa0f8b..63841934f 100644
--- a/utils/libdom.h
+++ b/utils/libdom.h
@@ -33,29 +33,6 @@
#include <dom/bindings/hubbub/errors.h>
/**
- * depth-first walk the dom calling callback for each element
- *
- * \param root the dom node to use as the root of the tree walk
- * \param callback The function called for each element
- * \param ctx The context passed to the callback.
- * \return true if all nodes were examined, false if the callback terminated
- * the walk early.
- */
-bool libdom_treewalk(dom_node *root,
- bool (*callback)(dom_node *node, dom_string *name, void *ctx),
- void *ctx);
-
-/**
- * Search the descendants of a node for an element.
- *
- * \param node dom_node to search children of, or NULL
- * \param element_name name of element to find
- * \return first child of node which is an element and matches name, or
- * NULL if not found or parameter node is NULL
- */
-dom_node *libdom_find_element(dom_node *node, lwc_string *element_name);
-
-/**
* Search children of a node for first named element
* \param parent dom_node to search children of, or NULL
* \param element_name name of element to find
diff --git a/utils/log.c b/utils/log.c
index 68b188e0f..a083b5720 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -99,6 +99,7 @@ NSLOG_DEFINE_CATEGORY(plot, "Rendering system");
NSLOG_DEFINE_CATEGORY(schedule, "Scheduler");
NSLOG_DEFINE_CATEGORY(fbtk, "Framebuffer toolkit");
NSLOG_DEFINE_CATEGORY(layout, "Layout");
+NSLOG_DEFINE_CATEGORY(flex, "Flex");
NSLOG_DEFINE_CATEGORY(dukky, "Duktape JavaScript Binding");
NSLOG_DEFINE_CATEGORY(jserrors, "JavaScript error messages");
@@ -285,7 +286,7 @@ nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv)
/* exported interface documented in utils/log.h */
nserror
-nslog_set_filter_by_options()
+nslog_set_filter_by_options(void)
{
if (verbose_log)
return nslog_set_filter(nsoption_charp(verbose_filter));
@@ -295,7 +296,7 @@ nslog_set_filter_by_options()
/* exported interface documented in utils/log.h */
void
-nslog_finalise()
+nslog_finalise(void)
{
NSLOG(netsurf, INFO,
"Finalising logging, please report any further messages");
diff --git a/utils/log.h b/utils/log.h
index 02a886c01..b7aa83358 100644
--- a/utils/log.h
+++ b/utils/log.h
@@ -84,6 +84,7 @@ NSLOG_DECLARE_CATEGORY(plot);
NSLOG_DECLARE_CATEGORY(schedule);
NSLOG_DECLARE_CATEGORY(fbtk);
NSLOG_DECLARE_CATEGORY(layout);
+NSLOG_DECLARE_CATEGORY(flex);
NSLOG_DECLARE_CATEGORY(dukky);
NSLOG_DECLARE_CATEGORY(jserrors);
diff --git a/utils/nscolour.c b/utils/nscolour.c
index a07175201..5a772b8a6 100644
--- a/utils/nscolour.c
+++ b/utils/nscolour.c
@@ -28,6 +28,7 @@
#include <stddef.h>
#include <stdbool.h>
+#include "netsurf/inttypes.h"
#include "netsurf/plot_style.h"
#include "utils/errors.h"
@@ -211,49 +212,49 @@ nserror nscolour_get_stylesheet(const char **stylesheet_out)
ret = snprintf(buffer, sizeof(buffer),
".ns-odd-bg {\n"
- "\tbackground-color: #%06x;\n"
+ "\tbackground-color: #%06"PRIx32";\n"
"}\n"
".ns-odd-bg-hover {\n"
- "\tbackground-color: #%06x;\n"
+ "\tbackground-color: #%06"PRIx32";\n"
"}\n"
".ns-odd-fg {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-odd-fg-subtle {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-odd-fg-faded {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-odd-fg-good {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-odd-fg-bad {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-even-bg {\n"
- "\tbackground-color: #%06x;\n"
+ "\tbackground-color: #%06"PRIx32";\n"
"}\n"
".ns-even-bg-hover {\n"
- "\tbackground-color: #%06x;\n"
+ "\tbackground-color: #%06"PRIx32";\n"
"}\n"
".ns-even-fg {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-even-fg-subtle {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-even-fg-faded {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-even-fg-good {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-even-fg-bad {\n"
- "\tcolor: #%06x;\n"
+ "\tcolor: #%06"PRIx32";\n"
"}\n"
".ns-border {\n"
- "\tborder-color: #%06x;\n"
+ "\tborder-color: #%06"PRIx32";\n"
"}\n",
colour_rb_swap(nscolours[NSCOLOUR_WIN_ODD_BG]),
colour_rb_swap(nscolours[NSCOLOUR_WIN_ODD_BG_HOVER]),
diff --git a/utils/nsoption.c b/utils/nsoption.c
index a8a29b3bf..7306dee1b 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -32,6 +32,7 @@
#include <string.h>
#include <strings.h>
+#include "netsurf/inttypes.h"
#include "netsurf/plot_style.h"
#include "utils/errors.h"
#include "utils/log.h"
@@ -112,7 +113,7 @@ strtooption(const char *value, struct nsoption_s *option)
break;
case OPTION_COLOUR:
- if (sscanf(value, "%x", &rgbcolour) == 1) {
+ if (sscanf(value, "%"SCNx32"", &rgbcolour) == 1) {
option->value.c = (((0x000000FF & rgbcolour) << 16) |
((0x0000FF00 & rgbcolour) << 0) |
((0x00FF0000 & rgbcolour) >> 16));
@@ -323,7 +324,7 @@ nsoption_output(FILE *fp,
rgbcolour = (((0x000000FF & opts[entry].value.c) << 16) |
((0x0000FF00 & opts[entry].value.c) << 0) |
((0x00FF0000 & opts[entry].value.c) >> 16));
- fprintf(fp, "%s:%06x\n",
+ fprintf(fp, "%s:%06"PRIx32"\n",
opts[entry].key,
rgbcolour);
@@ -387,10 +388,10 @@ nsoption_output_value_html(struct nsoption_s *option,
slen = snprintf(string + pos,
size - pos,
"<span style=\"font-family:Monospace;\">"
- "#%06X"
+ "#%06"PRIX32
"</span> "
- "<span style=\"background-color: #%06x; "
- "border: 1px solid #%06x; "
+ "<span style=\"background-color: #%06"PRIx32"; "
+ "border: 1px solid #%06"PRIx32"; "
"display: inline-block; "
"width: 1em; height: 1em;\">"
"</span>",
@@ -459,7 +460,7 @@ nsoption_output_value_text(struct nsoption_s *option,
rgbcolour = (((0x000000FF & option->value.c) << 16) |
((0x0000FF00 & option->value.c) << 0) |
((0x00FF0000 & option->value.c) >> 16));
- slen = snprintf(string + pos, size - pos, "%06x", rgbcolour);
+ slen = snprintf(string + pos, size - pos, "%06"PRIx32, rgbcolour);
break;
case OPTION_STRING:
diff --git a/utils/ssl_certs.c b/utils/ssl_certs.c
index d0f2a6c18..8546165ac 100644
--- a/utils/ssl_certs.c
+++ b/utils/ssl_certs.c
@@ -248,12 +248,23 @@ nserror cert_chain_to_query(struct cert_chain *chain, struct nsurl **url_out )
urlstrlen = snprintf((char *)urlstr, allocsize, "about:certificate");
for (depth = 0; depth < chain->depth; depth++) {
+ int written;
nsuerror nsures;
size_t output_length;
- urlstrlen += snprintf((char *)urlstr + urlstrlen,
- allocsize - urlstrlen,
- "&cert=");
+ written = snprintf((char *)urlstr + urlstrlen,
+ allocsize - urlstrlen,
+ "&cert=");
+ if (written < 0) {
+ free(urlstr);
+ return NSERROR_UNKNOWN;
+ }
+ if ((size_t)written >= allocsize - urlstrlen) {
+ free(urlstr);
+ return NSERROR_UNKNOWN;
+ }
+
+ urlstrlen += (size_t)written;
output_length = allocsize - urlstrlen;
nsures = nsu_base64_encode_url(
@@ -268,10 +279,20 @@ nserror cert_chain_to_query(struct cert_chain *chain, struct nsurl **url_out )
urlstrlen += output_length;
if (chain->certs[depth].err != SSL_CERT_ERR_OK) {
- urlstrlen += snprintf((char *)urlstr + urlstrlen,
- allocsize - urlstrlen,
- "&certerr=%d",
- chain->certs[depth].err);
+ written = snprintf((char *)urlstr + urlstrlen,
+ allocsize - urlstrlen,
+ "&certerr=%d",
+ chain->certs[depth].err);
+ if (written < 0) {
+ free(urlstr);
+ return NSERROR_UNKNOWN;
+ }
+ if ((size_t)written >= allocsize - urlstrlen) {
+ free(urlstr);
+ return NSERROR_UNKNOWN;
+ }
+
+ urlstrlen += (size_t)written;
}
}
diff --git a/utils/useragent.c b/utils/useragent.c
index 3d93a97b2..547999c7c 100644
--- a/utils/useragent.c
+++ b/utils/useragent.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "utils/config.h"
#include "utils/utsname.h"
@@ -29,7 +30,7 @@
static const char *core_user_agent_string = NULL;
#ifndef NETSURF_UA_FORMAT_STRING
-#define NETSURF_UA_FORMAT_STRING "NetSurf/%d.%d (%s)"
+#define NETSURF_UA_FORMAT_STRING "Mozilla/5.0 (%s) NetSurf/%d.%d"
#endif
/**
@@ -46,12 +47,16 @@ user_agent_build_string(void)
if (uname(&un) >= 0) {
sysname = un.sysname;
+ if (strcmp(sysname, "Linux") == 0) {
+ /* Force desktop, not mobile */
+ sysname = "X11; Linux";
+ }
}
len = snprintf(NULL, 0, NETSURF_UA_FORMAT_STRING,
+ sysname,
netsurf_version_major,
- netsurf_version_minor,
- sysname);
+ netsurf_version_minor);
ua_string = malloc(len + 1);
if (!ua_string) {
/** \todo this needs handling better */
@@ -59,9 +64,9 @@ user_agent_build_string(void)
}
snprintf(ua_string, len + 1,
NETSURF_UA_FORMAT_STRING,
+ sysname,
netsurf_version_major,
- netsurf_version_minor,
- sysname);
+ netsurf_version_minor);
core_user_agent_string = ua_string;
diff --git a/utils/utf8.c b/utils/utf8.c
index f0ac0c9b2..3eedd0810 100644
--- a/utils/utf8.c
+++ b/utils/utf8.c
@@ -32,6 +32,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
+#include "netsurf/inttypes.h"
#include "netsurf/utf8.h"
#include "desktop/gui_internal.h"
@@ -44,7 +45,7 @@ uint32_t utf8_to_ucs4(const char *s_in, size_t l)
parserutils_error perror;
perror = parserutils_charset_utf8_to_ucs4((const uint8_t *) s_in, l,
- &ucs4, &len);
+ &ucs4, &len);
if (perror != PARSERUTILS_OK)
ucs4 = 0xfffd;
@@ -106,7 +107,7 @@ size_t utf8_char_byte_length(const char *s)
parserutils_error perror;
perror = parserutils_charset_utf8_char_byte_length((const uint8_t *) s,
- &len);
+ &len);
assert(perror == PARSERUTILS_OK);
return len;
@@ -131,7 +132,7 @@ size_t utf8_next(const char *s, size_t l, size_t o)
parserutils_error perror;
perror = parserutils_charset_utf8_next((const uint8_t *) s, l, o,
- &next);
+ &next);
assert(perror == PARSERUTILS_OK);
return next;
@@ -151,6 +152,47 @@ static inline void utf8_clear_cd_cache(void)
last_cd.cd = 0;
}
+/**
+ * obtain a cached conversion descriptor
+ *
+ * either return the cached conversion descriptor or create one if required
+ */
+static nserror
+get_cached_cd(const char *enc_from, const char *enc_to, iconv_t *cd_out)
+{
+ iconv_t cd;
+ /* we cache the last used conversion descriptor,
+ * so check if we're trying to use it here */
+ if (strncasecmp(last_cd.from, enc_from, sizeof(last_cd.from)) == 0 &&
+ strncasecmp(last_cd.to, enc_to, sizeof(last_cd.to)) == 0 &&
+ last_cd.cd != 0) {
+ *cd_out = last_cd.cd;
+ return NSERROR_OK;
+ }
+
+ /* no match, so create a new cd */
+ cd = iconv_open(enc_to, enc_from);
+ if (cd == (iconv_t) -1) {
+ if (errno == EINVAL) {
+ return NSERROR_BAD_ENCODING;
+ }
+ /* default to no memory */
+ return NSERROR_NOMEM;
+ }
+
+ /* close the last cd - we don't care if this fails */
+ if (last_cd.cd) {
+ iconv_close(last_cd.cd);
+ }
+
+ /* and safely copy the to/from/cd data into last_cd */
+ snprintf(last_cd.from, sizeof(last_cd.from), "%s", enc_from);
+ snprintf(last_cd.to, sizeof(last_cd.to), "%s", enc_to);
+ *cd_out = last_cd.cd = cd;
+
+ return NSERROR_OK;
+}
+
/* exported interface documented in utils/utf8.h */
nserror utf8_finalise(void)
{
@@ -168,95 +210,72 @@ nserror utf8_finalise(void)
* Convert a string from one encoding to another
*
* \param string The NULL-terminated string to convert
- * \param len Length of input string to consider (in bytes), or 0
+ * \param slen Length of input string to consider (in bytes), or 0
* \param from The encoding name to convert from
* \param to The encoding name to convert to
- * \param result Pointer to location in which to store result.
- * \param result_len Pointer to location in which to store result length.
+ * \param result_out Pointer to location in which to store result.
+ * \param result_len_out Pointer to location in which to store result length.
* \return NSERROR_OK for no error, NSERROR_NOMEM on allocation error,
* NSERROR_BAD_ENCODING for a bad character encoding
*/
static nserror
utf8_convert(const char *string,
- size_t len,
+ size_t slen,
const char *from,
const char *to,
- char **result,
- size_t *result_len)
+ char **result_out,
+ size_t *result_len_out)
{
iconv_t cd;
- char *temp, *out, *in;
- size_t slen, rlen;
-
- assert(string && from && to && result);
-
- if (string[0] == '\0') {
- /* On AmigaOS, iconv() returns an error if we pass an
- * empty string. This prevents iconv() being called as
- * there is no conversion necessary anyway. */
- *result = strdup("");
- if (!(*result)) {
- *result = NULL;
- return NSERROR_NOMEM;
- }
+ char *temp, *out, *in, *result;
+ size_t result_len;
+ nserror res;
- return NSERROR_OK;
+ assert(string && from && to && result_out);
+
+ /* calculate the source length if not given */
+ if (slen==0) {
+ slen = strlen(string);
}
- if (strcasecmp(from, to) == 0) {
- /* conversion from an encoding to itself == strdup */
- slen = len ? len : strlen(string);
- *(result) = strndup(string, slen);
- if (!(*result)) {
- *(result) = NULL;
+ /* process the empty string separately avoiding any conversion
+ * check for the source and destination encoding being the same
+ *
+ * This optimisation is necessary on AmigaOS as iconv()
+ * returns an error if an empty string is passed.
+ */
+ if ((slen == 0) || (strcasecmp(from, to) == 0)) {
+ *result_out = strndup(string, slen);
+ if (*result_out == NULL) {
return NSERROR_NOMEM;
}
+ if (result_len_out != NULL) {
+ *result_len_out = slen;
+ }
return NSERROR_OK;
}
in = (char *)string;
- /* we cache the last used conversion descriptor,
- * so check if we're trying to use it here */
- if (strncasecmp(last_cd.from, from, sizeof(last_cd.from)) == 0 &&
- strncasecmp(last_cd.to, to, sizeof(last_cd.to)) == 0) {
- cd = last_cd.cd;
- }
- else {
- /* no match, so create a new cd */
- cd = iconv_open(to, from);
- if (cd == (iconv_t)-1) {
- if (errno == EINVAL)
- return NSERROR_BAD_ENCODING;
- /* default to no memory */
- return NSERROR_NOMEM;
- }
-
- /* close the last cd - we don't care if this fails */
- if (last_cd.cd)
- iconv_close(last_cd.cd);
-
- /* and copy the to/from/cd data into last_cd */
- snprintf(last_cd.from, sizeof(last_cd.from), "%s", from);
- snprintf(last_cd.to, sizeof(last_cd.to), "%s", to);
- last_cd.cd = cd;
+ res = get_cached_cd(from, to, &cd);
+ if (res != NSERROR_OK) {
+ return res;
}
- slen = len ? len : strlen(string);
/* Worst case = ASCII -> UCS4, so allocate an output buffer
* 4 times larger than the input buffer, and add 4 bytes at
* the end for the NULL terminator
*/
- rlen = slen * 4 + 4;
+ result_len = slen * 4 + 4;
- temp = out = malloc(rlen);
+ temp = out = malloc(result_len);
if (!out) {
return NSERROR_NOMEM;
}
/* perform conversion */
- if (iconv(cd, (void *) &in, &slen, &out, &rlen) == (size_t)-1) {
+ if (iconv(cd, (void *) &in, &slen, &out, &result_len) == (size_t)-1) {
free(temp);
/* clear the cached conversion descriptor as it's invalid */
if (last_cd.cd)
@@ -270,19 +289,22 @@ utf8_convert(const char *string,
return NSERROR_NOMEM;
}
- *(result) = realloc(temp, out - temp + 4);
- if (!(*result)) {
+ result_len = out - temp;
+
+ /* resize buffer allowing for null termination */
+ result = realloc(temp, result_len + 4);
+ if (result == NULL) {
free(temp);
- *(result) = NULL; /* for sanity's sake */
return NSERROR_NOMEM;
}
/* NULL terminate - needs 4 characters as we may have
* converted to UTF-32 */
- memset((*result) + (out - temp), 0, 4);
+ memset(result + result_len, 0, 4);
- if (result_len != NULL) {
- *result_len = (out - temp);
+ *result_out = result;
+ if (result_len_out != NULL) {
+ *result_len_out = result_len;
}
return NSERROR_OK;
@@ -290,14 +312,14 @@ utf8_convert(const char *string,
/* exported interface documented in utils/utf8.h */
nserror utf8_to_enc(const char *string, const char *encname,
- size_t len, char **result)
+ size_t len, char **result)
{
return utf8_convert(string, len, "UTF-8", encname, result, NULL);
}
/* exported interface documented in utils/utf8.h */
nserror utf8_from_enc(const char *string, const char *encname,
- size_t len, char **result, size_t *result_len)
+ size_t len, char **result, size_t *result_len)
{
return utf8_convert(string, len, encname, "UTF-8", result, result_len);
}
@@ -325,10 +347,10 @@ utf8_convert_html_chunk(iconv_t cd,
return NSERROR_NOMEM;
ucs4 = utf8_to_ucs4(chunk, inlen);
- esclen = snprintf(escape, sizeof(escape), "&#x%06x;", ucs4);
+ esclen = snprintf(escape, sizeof(escape), "&#x%06"PRIx32";", ucs4);
pescape = escape;
ret = iconv(cd, (void *) &pescape, &esclen,
- (void *) out, outlen);
+ (void *) out, outlen);
if (ret == (size_t) -1)
return NSERROR_NOMEM;
@@ -340,45 +362,26 @@ utf8_convert_html_chunk(iconv_t cd,
return NSERROR_OK;
}
+
+
/* exported interface documented in utils/utf8.h */
nserror
-utf8_to_html(const char *string, const char *encname, size_t len, char **result)
+utf8_to_html(const char *string, const char *encname, size_t len, char **result_out)
{
iconv_t cd;
const char *in;
- char *out, *origout;
+ char *out, *origout, *result;
size_t off, prev_off, inlen, outlen, origoutlen, esclen;
nserror ret;
char *pescape, escape[11];
+ nserror res;
if (len == 0)
len = strlen(string);
- /* we cache the last used conversion descriptor,
- * so check if we're trying to use it here */
- if (strncasecmp(last_cd.from, "UTF-8", sizeof(last_cd.from)) == 0 &&
- strncasecmp(last_cd.to, encname,
- sizeof(last_cd.to)) == 0 &&
- last_cd.cd != 0) {
- cd = last_cd.cd;
- } else {
- /* no match, so create a new cd */
- cd = iconv_open(encname, "UTF-8");
- if (cd == (iconv_t) -1) {
- if (errno == EINVAL)
- return NSERROR_BAD_ENCODING;
- /* default to no memory */
- return NSERROR_NOMEM;
- }
-
- /* close the last cd - we don't care if this fails */
- if (last_cd.cd)
- iconv_close(last_cd.cd);
-
- /* and safely copy the to/from/cd data into last_cd */
- snprintf(last_cd.from, sizeof(last_cd.from), "UTF-8");
- snprintf(last_cd.to, sizeof(last_cd.to), "%s", encname);
- last_cd.cd = cd;
+ res = get_cached_cd("UTF-8", encname, &cd);
+ if (res != NSERROR_OK) {
+ return res;
}
/* Worst case is ASCII -> UCS4, with all characters escaped:
@@ -398,13 +401,13 @@ utf8_to_html(const char *string, const char *encname, size_t len, char **result)
while (off < len) {
/* Must escape '&', '<', and '>' */
if (string[off] == '&' || string[off] == '<' ||
- string[off] == '>') {
+ string[off] == '>') {
if (off - prev_off > 0) {
/* Emit chunk */
in = string + prev_off;
inlen = off - prev_off;
ret = utf8_convert_html_chunk(cd, in, inlen,
- &out, &outlen);
+ &out, &outlen);
if (ret != NSERROR_OK) {
free(origout);
iconv_close(cd);
@@ -415,10 +418,10 @@ utf8_to_html(const char *string, const char *encname, size_t len, char **result)
/* Emit mandatory escape */
esclen = snprintf(escape, sizeof(escape),
- "&#x%06x;", string[off]);
+ "&#x%06x;", string[off]);
pescape = escape;
ret = utf8_convert_html_chunk(cd, pescape, esclen,
- &out, &outlen);
+ &out, &outlen);
if (ret != NSERROR_OK) {
free(origout);
iconv_close(cd);
@@ -450,11 +453,12 @@ utf8_to_html(const char *string, const char *encname, size_t len, char **result)
outlen -= 4;
/* Shrink-wrap */
- *result = realloc(origout, origoutlen - outlen);
- if (*result == NULL) {
+ result = realloc(origout, origoutlen - outlen);
+ if (result == NULL) {
free(origout);
return NSERROR_NOMEM;
}
+ *result_out = result;
return NSERROR_OK;
}
diff --git a/utils/utils.h b/utils/utils.h
index 3995071cd..cb9e04b45 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -89,4 +89,31 @@
*/
bool is_dir(const char *path);
+/**
+ * switch fall through
+ */
+#if defined __cplusplus && defined __has_cpp_attribute
+ #if __has_cpp_attribute(fallthrough) && __cplusplus >= __has_cpp_attribute(fallthrough)
+ #define fallthrough [[fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough) && __STDC_VERSION__ >= __has_cpp_attribute(gnu::fallthrough)
+ #define fallthrough [[gnu::fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough) && __STDC_VERSION__ >= __has_cpp_attribute(clang::fallthrough)
+ #define fallthrough [[clang::fallthrough]]
+ #endif
+#elif defined __STDC_VERSION__ && defined __has_c_attribute
+ #if __has_c_attribute(fallthrough) && __STDC_VERSION__ >= __has_c_attribute(fallthrough)
+ #define fallthrough [[fallthrough]]
+ #endif
+#endif
+#if !defined fallthrough && defined __has_attribute
+ #if __has_attribute(__fallthrough__)
+ #define fallthrough __attribute__((__fallthrough__))
+ #endif
+#endif
+#if !defined fallthrough
+/* early gcc and clang have no implicit fallthrough warning */
+ #define fallthrough do {} while(0)
+#endif
+
+
#endif