# HG changeset patch # User David Demelier # Date 1480593248 -3600 # Node ID 12bf6de5b67a81f36f984de161915cc412158a66 # Parent 9298566b4708601b91342d58c73cfbea3899fd1c duktape: upgrade to 1.5.1 diff -r 9298566b4708 -r 12bf6de5b67a VERSION.duktape.txt --- a/VERSION.duktape.txt Thu Nov 24 17:35:14 2016 +0100 +++ b/VERSION.duktape.txt Thu Dec 01 12:54:08 2016 +0100 @@ -1,1 +1,1 @@ -1.5.0 +1.5.1 diff -r 9298566b4708 -r 12bf6de5b67a duktape/duk_config.h --- a/duktape/duk_config.h Thu Nov 24 17:35:14 2016 +0100 +++ b/duktape/duk_config.h Thu Dec 01 12:54:08 2016 +0100 @@ -1,9 +1,9 @@ /* * duk_config.h configuration header generated by genconfig.py. * - * Git commit: 83d557704ee63f68ab40b6fcb00995c9b3d6777c - * Git describe: v1.5.0 - * Git branch: master + * Git commit: 2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e + * Git describe: v1.5.1 + * Git branch: HEAD * * Supported platforms: * - Mac OSX, iPhone, Darwin @@ -918,12 +918,27 @@ #define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern #define DUK_EXTERNAL __attribute__ ((visibility("default"))) #if defined(DUK_SINGLE_FILE) +#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG) +/* Minimize warnings for unused internal functions with GCC >= 3.1.1 and + * Clang. Based on documentation it should suffice to have the attribute + * in the declaration only, but in practice some warnings are generated unless + * the attribute is also applied to the definition. + */ +#define DUK_INTERNAL_DECL static __attribute__ ((unused)) +#define DUK_INTERNAL static __attribute__ ((unused)) +#else #define DUK_INTERNAL_DECL static #define DUK_INTERNAL static +#endif +#else +#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG) +#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) extern +#define DUK_INTERNAL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) #else #define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) extern #define DUK_INTERNAL __attribute__ ((visibility("hidden"))) #endif +#endif #define DUK_LOCAL_DECL static #define DUK_LOCAL static #endif @@ -1012,12 +1027,27 @@ #define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern #define DUK_EXTERNAL __attribute__ ((visibility("default"))) #if defined(DUK_SINGLE_FILE) +#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG) +/* Minimize warnings for unused internal functions with GCC >= 3.1.1 and + * Clang. Based on documentation it should suffice to have the attribute + * in the declaration only, but in practice some warnings are generated unless + * the attribute is also applied to the definition. + */ +#define DUK_INTERNAL_DECL static __attribute__ ((unused)) +#define DUK_INTERNAL static __attribute__ ((unused)) +#else #define DUK_INTERNAL_DECL static #define DUK_INTERNAL static +#endif +#else +#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG) +#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) extern +#define DUK_INTERNAL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) #else #define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) extern #define DUK_INTERNAL __attribute__ ((visibility("hidden"))) #endif +#endif #define DUK_LOCAL_DECL static #define DUK_LOCAL static #endif @@ -1174,12 +1204,27 @@ #define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern #define DUK_EXTERNAL __attribute__ ((visibility("default"))) #if defined(DUK_SINGLE_FILE) +#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG) +/* Minimize warnings for unused internal functions with GCC >= 3.1.1 and + * Clang. Based on documentation it should suffice to have the attribute + * in the declaration only, but in practice some warnings are generated unless + * the attribute is also applied to the definition. + */ +#define DUK_INTERNAL_DECL static __attribute__ ((unused)) +#define DUK_INTERNAL static __attribute__ ((unused)) +#else #define DUK_INTERNAL_DECL static #define DUK_INTERNAL static +#endif +#else +#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG) +#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) extern +#define DUK_INTERNAL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) #else #define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) extern #define DUK_INTERNAL __attribute__ ((visibility("hidden"))) #endif +#endif #define DUK_LOCAL_DECL static #define DUK_LOCAL static @@ -2077,7 +2122,13 @@ /* Missing some obvious constants. */ #define DUK_F_USE_REPL_ALL #elif defined(DUK_F_AMIGAOS) && defined(DUK_F_VBCC) -/* VBCC is missing the built-ins even in C99 mode (perhaps a header issue) */ +/* VBCC is missing the built-ins even in C99 mode (perhaps a header issue). */ +#define DUK_F_USE_REPL_ALL +#elif defined(DUK_F_AMIGAOS) && defined(DUK_F_M68K) +/* AmigaOS + M68K seems to have math issues even when using GCC cross + * compilation. Use replacements for all AmigaOS versions on M68K + * regardless of compiler. + */ #define DUK_F_USE_REPL_ALL #elif defined(DUK_F_FREEBSD) && defined(DUK_F_CLANG) /* Placeholder fix for (detection is wider than necessary): diff -r 9298566b4708 -r 12bf6de5b67a duktape/duktape.h --- a/duktape/duktape.h Thu Nov 24 17:35:14 2016 +0100 +++ b/duktape/duktape.h Thu Dec 01 12:54:08 2016 +0100 @@ -1,13 +1,13 @@ /* - * Duktape public API for Duktape 1.5.0. + * Duktape public API for Duktape 1.5.1. * * See the API reference for documentation on call semantics. * The exposed API is inside the DUK_API_PUBLIC_H_INCLUDED * include guard. Other parts of the header are Duktape * internal and related to platform/compiler/feature detection. * - * Git commit 83d557704ee63f68ab40b6fcb00995c9b3d6777c (v1.5.0). - * Git branch master. + * Git commit 2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e (v1.5.1). + * Git branch HEAD. * * See Duktape AUTHORS.rst and LICENSE.txt for copyright and * licensing information. @@ -218,16 +218,16 @@ * 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 10500L +#define DUK_VERSION 10501L /* Git commit, describe, and branch for Duktape build. Useful for * non-official snapshot builds so that application code can easily log * which Duktape snapshot was used. Not available in the Ecmascript * environment. */ -#define DUK_GIT_COMMIT "83d557704ee63f68ab40b6fcb00995c9b3d6777c" -#define DUK_GIT_DESCRIBE "v1.5.0" -#define DUK_GIT_BRANCH "master" +#define DUK_GIT_COMMIT "2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e" +#define DUK_GIT_DESCRIBE "v1.5.1" +#define DUK_GIT_BRANCH "HEAD" /* Duktape debug protocol version used by this build. */ #define DUK_DEBUG_PROTOCOL_VERSION 1 @@ -426,7 +426,7 @@ #ifdef DUK_API_VARIADIC_MACROS #define duk_error(ctx,err_code,...) \ - duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), __VA_ARGS__) + duk_error_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__) #else DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_stash(duk_context *ctx, duk_errcode_t err_code, const char *fmt, ...)); /* One problem with this macro is that expressions like the following fail @@ -434,14 +434,14 @@ * they make little sense anyway. */ #define duk_error \ - (duk_api_global_filename = (const char *) (__FILE__), \ - duk_api_global_line = (duk_int_t) (__LINE__), \ + (duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \ + duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \ duk_error_stash) /* last value is func pointer, arguments follow in parens */ #endif DUK_API_NORETURN(DUK_EXTERNAL_DECL void duk_error_va_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap)); #define duk_error_va(ctx,err_code,fmt,ap) \ - duk_error_va_raw((ctx), (duk_errcode_t) (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), (fmt), (ap)) + duk_error_va_raw((ctx), (duk_errcode_t) (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)) /* * Other state related functions @@ -547,19 +547,19 @@ #ifdef DUK_API_VARIADIC_MACROS #define duk_push_error_object(ctx,err_code,...) \ - duk_push_error_object_raw((ctx), (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), __VA_ARGS__) + duk_push_error_object_raw((ctx), (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), __VA_ARGS__) #else DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_stash(duk_context *ctx, duk_errcode_t err_code, const char *fmt, ...); /* Note: parentheses are required so that the comma expression works in assignments. */ #define duk_push_error_object \ - (duk_api_global_filename = (const char *) (__FILE__), \ - duk_api_global_line = (duk_int_t) (__LINE__), \ + (duk_api_global_filename = (const char *) (DUK_FILE_MACRO), \ + duk_api_global_line = (duk_int_t) (DUK_LINE_MACRO), \ duk_push_error_object_stash) /* last value is func pointer, arguments follow in parens */ #endif DUK_EXTERNAL_DECL duk_idx_t duk_push_error_object_va_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt, va_list ap); #define duk_push_error_object_va(ctx,err_code,fmt,ap) \ - duk_push_error_object_va_raw((ctx), (err_code), (const char *) (__FILE__), (duk_int_t) (__LINE__), (fmt), (ap)) + duk_push_error_object_va_raw((ctx), (err_code), (const char *) (DUK_FILE_MACRO), (duk_int_t) (DUK_LINE_MACRO), (fmt), (ap)) #define DUK_BUF_FLAG_DYNAMIC (1 << 0) /* internal flag: dynamic buffer */ #define DUK_BUF_FLAG_EXTERNAL (1 << 1) /* internal flag: external buffer */