Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove --enable-c9x-inline option. We now use a syntax which is compa…
…tible

with all compilers by providing the function with static linkage in every
compilation unit.
  • Loading branch information
Sascha Schumann committed Sep 26, 2000
1 parent 7db8740 commit 99771d9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 69 deletions.
8 changes: 3 additions & 5 deletions Zend/Makefile.am
Expand Up @@ -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 \
Expand All @@ -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)

Expand Down
17 changes: 0 additions & 17 deletions Zend/Zend.m4
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
30 changes: 5 additions & 25 deletions Zend/zend_execute.h
Expand Up @@ -54,22 +54,17 @@ 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();

if (p!=EG(uninitialized_zval_ptr)) {
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;

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions Zend/zend_gcc_inline.c

This file was deleted.

6 changes: 1 addition & 5 deletions Zend/zend_operators.h
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 99771d9

Please sign in to comment.