From: Sascha Schumann Date: Tue, 26 Sep 2000 11:10:11 +0000 (+0000) Subject: Remove --enable-c9x-inline option. We now use a syntax which is compatible X-Git-Tag: php-4.0.3RC1~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99771d91ceec55de8e1e62d3610919e1500aafcf;p=php Remove --enable-c9x-inline option. We now use a syntax which is compatible with all compilers by providing the function with static linkage in every compilation unit. --- diff --git a/Zend/Makefile.am b/Zend/Makefile.am index 1e4e9c27a6..ceb69f96fe 100644 --- a/Zend/Makefile.am +++ b/Zend/Makefile.am @@ -3,14 +3,12 @@ #CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output AUTOMAKE_OPTIONS=foreign -EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la -noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la +EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la +noinst_LTLIBRARIES=$(ZEND_SCANNER) libZend.la libZend_cc_la_SOURCES=zend-scanner-cc.cc libZend_c_la_SOURCES=zend-scanner.c -libZend_gcc_la_SOURCES=zend_gcc_inline.c - libZend_la_SOURCES=\ zend-parser.y \ zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \ @@ -19,7 +17,7 @@ libZend_la_SOURCES=\ zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \ zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c -libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC) +libZend_la_LIBADD = $(ZEND_SCANNER) libZend_la_LDFLAGS = @EXTRA_LIBS@ libZend_la_DEPENDENCIES = $(ZEND_SCANNER) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index f44ef7072e..e28d5951ef 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -101,13 +101,6 @@ AC_ARG_ENABLE(debug, AC_DEFUN(LIBZEND_OTHER_CHECKS,[ -AC_ARG_ENABLE(c9x-inline, -[ --enable-c9x-inline Enable C9x-inline semantics],[ - ZEND_C9X_INLINE=$enableval -],[ - ZEND_C9X_INLINE=no -]) - AC_ARG_ENABLE(experimental-zts, [ --enable-experimental-zts This will most likely break your build],[ ZEND_EXPERIMENTAL_ZTS=$enableval @@ -130,9 +123,6 @@ AC_ARG_ENABLE(memory-limit, ZEND_MEMORY_LIMIT=no ]) -AC_MSG_CHECKING(whether to enable C9x-inline semantics) -AC_MSG_RESULT($ZEND_C9X_INLINE) - AC_MSG_CHECKING(whether to enable experimental ZTS) AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS) @@ -169,13 +159,6 @@ else ZEND_SCANNER_TYPE=c fi -if test "$ZEND_C9X_INLINE" = "yes"; then - AC_DEFINE(C9X_INLINE_SEMANTICS, 1, [whether to enable C9x-inline semantics]) -else - ZEND_GCC=libZend_gcc.la - AC_SUBST(ZEND_GCC) -fi - ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la" if test "$ZEND_MEMORY_LIMIT" = "yes"; then diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 5e733de798..2663eb32a6 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -54,8 +54,7 @@ void init_executor(CLS_D ELS_DC); void shutdown_executor(ELS_D); void execute(zend_op_array *op_array ELS_DC); ZEND_API int zend_is_true(zval *op); -ZEND_API inline void safe_free_zval_ptr(zval *p) -#if defined(C9X_INLINE_SEMANTICS) +static inline void safe_free_zval_ptr(zval *p) { ELS_FETCH(); @@ -63,13 +62,9 @@ ZEND_API inline void safe_free_zval_ptr(zval *p) FREE_ZVAL(p); } } -#else -; -#endif ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC ELS_DC); -ZEND_API inline int i_zend_is_true(zval *op) -#if defined(C9X_INLINE_SEMANTICS) +static inline int i_zend_is_true(zval *op) { int result; @@ -105,15 +100,11 @@ ZEND_API inline int i_zend_is_true(zval *op) } return result; } -#else -; -#endif ZEND_API int zval_update_constant(zval **pp, void *arg); /* dedicated Zend executor functions - do not use! */ -ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D) -#if defined(C9X_INLINE_SEMANTICS) +static inline void zend_ptr_stack_clear_multiple(ELS_D) { void **p = EG(argument_stack).top_element-2; int delete_count = (ulong) *p; @@ -124,12 +115,8 @@ ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D) } EG(argument_stack).top_element = p; } -#else -; -#endif -ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC) -#if defined(C9X_INLINE_SEMANTICS) +static inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC) { void **p = EG(argument_stack).top_element-2; int arg_count = (ulong) *p; @@ -140,9 +127,6 @@ ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC *data = (p-arg_count+requested_arg-1); return SUCCESS; } -#else -; -#endif #if SUPPORT_INTERACTIVE void execute_new_code(CLS_D); @@ -171,8 +155,7 @@ void zend_shutdown_timeout_thread(); #define active_opline (*EG(opline_ptr)) -ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC) -#if defined(C9X_INLINE_SEMANTICS) +static inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC) { zval *variable_ptr = *variable_ptr_ptr; zval *value_ptr; @@ -222,9 +205,6 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var AI_USE_PTR(Ts[result->u.var].var); } } -#else -; -#endif #define IS_OVERLOADED_OBJECT 1 #define IS_STRING_OFFSET 2 diff --git a/Zend/zend_gcc_inline.c b/Zend/zend_gcc_inline.c deleted file mode 100644 index 439cd17b29..0000000000 --- a/Zend/zend_gcc_inline.c +++ /dev/null @@ -1,17 +0,0 @@ - -/* - * If C9X_INLINE_SEMANTICS is already defined here, - * we assume the user does not want GCC inline semantics, - * but compiles this file always. - */ - -#ifndef C9X_INLINE_SEMANTICS - -#define C9X_INLINE_SEMANTICS - -#include "zend.h" - -#include "zend_execute.h" -#include "zend_operators.h" - -#endif diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 216c8b7747..5b95a1220f 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -58,8 +58,7 @@ ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2); ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2); ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2); ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2); -ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval) -#if defined(C9X_INLINE_SEMANTICS) +static inline int is_numeric_string(char *str, int length, long *lval, double *dval) { long local_lval; double local_dval; @@ -115,9 +114,6 @@ ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double return 0; } -#else -; -#endif ZEND_API int increment_function(zval *op1); ZEND_API int decrement_function(zval *op2);