# HG changeset patch # User John W. Eaton # Date 1344031518 14400 # Node ID b9b6a310ad97d0056726e965855ce11534cb4de1 # Parent a132d206a36a512544d5aa0804aa5c8ef27bfd68# Parent 909a2797935bbf1e59690da056a9b850360a0e26 maint: periodic merge of default to gui diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# Makefile for octave's src directory +# Makefile for Octave's src directory # # Copyright (C) 1993-2012 John W. Eaton # @@ -24,10 +24,12 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libcruft/misc \ -I../liboctave -I$(top_srcdir)/liboctave \ + -Ioctave-value -I$(srcdir)/octave-value \ + -Iparse-tree -I$(srcdir)/parse-tree \ + -Ioperators -I$(srcdir)/operators \ + -Iinterp-core -I$(srcdir)/interp-core \ -Iinterpfcn -I$(srcdir)/interpfcn \ -Icorefcn \ - -Ioctave-value -I$(srcdir)/octave-value \ - -Iparse-tree -I$(srcdir)/parse-tree \ -I. -I$(srcdir) \ -I../libgnu -I$(top_srcdir)/libgnu \ @CPPFLAGS@ @@ -66,33 +68,33 @@ ## $(DEF_FILES), and building those requires all the sources ## (except builtins.cc) to be available. BUILT_SOURCES = \ - $(BUILT_SOURCES_EXTRA) \ + interp-core/mxarray.h \ + interp-core/oct-errno.cc \ interpfcn/defaults.h \ + interpfcn/graphics-props.cc \ interpfcn/graphics.h \ - interpfcn/graphics-props.cc \ + operators/ops.cc \ parse-tree/lex.cc \ - mxarray.h \ + parse-tree/oct-gperf.h \ + parse-tree/oct-parse.cc \ oct-conf.h \ - oct-errno.cc \ - oct-gperf.h \ - parse-tree/oct-parse.cc \ - ops.cc \ version.h \ + $(BUILT_SOURCES_EXTRA) \ builtins.cc BUILT_DISTFILES = \ - oct-gperf.h \ + parse-tree/oct-gperf.h \ parse-tree/oct-parse.h ## Files that are created during build process and installed, ## BUT not distributed in tarball. BUILT_NODISTFILES = \ + interp-core/mxarray.h \ + interp-core/oct-errno.cc \ interpfcn/defaults.h \ interpfcn/graphics.h \ + operators/ops.cc \ oct-conf.h \ - oct-errno.cc \ - ops.cc \ - mxarray.h \ version.h \ $(OPT_HANDLERS) \ $(OPT_INC) \ @@ -101,13 +103,10 @@ EXTRA_DIST = \ Makefile.in \ - defaults.in.h \ DOCSTRINGS \ find-defun-files.sh \ gendoc.pl \ genprops.awk \ - gl2ps.c \ - graphics.in.h \ mk-errno-list \ mk-pkg-add \ mkbuiltins \ @@ -115,136 +114,36 @@ mkoctfile.in.cc \ mkoctfile.in.sh \ mkops \ - mxarray.in.h \ oct-conf.in.h \ - oct-errno.in.cc \ octave-config.in.cc \ octave-config.in.sh \ - octave.gperf \ version.in.h \ $(BUILT_DISTFILES) -JIT_INCLUDES = \ - jit-util.h \ - jit-typeinfo.h \ - jit-ir.h \ - pt-jit.h - octinclude_HEADERS = \ - Cell.h \ - builtins.h \ - c-file-ptr-stream.h \ - comment-list.h \ - cutils.h \ - defun-dld.h \ - defun-int.h \ - display.h \ - dynamic-ld.h \ - gl-render.h \ - gl2ps.h \ - gl2ps-renderer.h \ interpfcn/graphics-props.cc \ - gripes.h \ - ls-ascii-helper.h \ - ls-hdf5.h \ - ls-mat-ascii.h \ - ls-mat4.h \ - ls-mat5.h \ - ls-oct-binary.h \ - ls-utils.h \ - mex.h \ - mexproto.h \ - oct-errno.h \ - oct-fstrm.h \ - oct-gperf.h \ - oct-hdf5.h \ - oct-iostrm.h \ - oct-lvalue.h \ - oct-map.h \ - oct-obj.h \ - oct-prcstrm.h \ - oct-procbuf.h \ - oct-stdstrm.h \ - oct-stream.h \ - oct-strstrm.h \ - oct.h \ + parse-tree/oct-gperf.h \ + builtins.h \ octave.h \ - ops.h \ - procstream.h \ - siglist.h \ - sparse-xdiv.h \ - sparse-xpow.h \ - token.h \ - txt-eng-ft.h \ - txt-eng.h \ - unwind-prot.h \ - xdiv.h \ - xnorm.h \ - xpow.h \ - zfstream.h \ $(OV_INCLUDES) \ $(OV_SPARSE_INCLUDES) \ $(PT_INCLUDES) \ - $(INTERPFCN_INCLUDES) \ - $(JIT_INCLUDES) + $(OPERATOR_INCLUDES) \ + $(INTERP_CORE_INCLUDES) \ + $(INTERPFCN_INCLUDES) nodist_octinclude_HEADERS = \ + interp-core/mxarray.h \ interpfcn/defaults.h \ interpfcn/graphics.h \ oct-conf.h \ - mxarray.h \ version.h -JIT_SRC = \ - jit-util.cc \ - jit-typeinfo.cc \ - jit-ir.cc \ - pt-jit.cc - DIST_SRC = \ - Cell.cc \ - c-file-ptr-stream.cc \ - comment-list.cc \ - cutils.c \ - display.cc \ - dynamic-ld.cc \ - gl-render.cc \ - gl2ps-renderer.cc \ - gripes.cc \ - ls-ascii-helper.cc \ - ls-hdf5.cc \ - ls-mat-ascii.cc \ - ls-mat4.cc \ - ls-mat5.cc \ - ls-oct-binary.cc \ - ls-utils.cc \ - matherr.c \ - mex.cc \ - oct-fstrm.cc \ - oct-iostrm.cc \ - oct-lvalue.cc \ - oct-map.cc \ - oct-obj.cc \ - oct-prcstrm.cc \ - oct-procbuf.cc \ - oct-stream.cc \ - oct-strstrm.cc \ octave.cc \ - procstream.cc \ - siglist.c \ - sparse-xdiv.cc \ - sparse-xpow.cc \ - token.cc \ - txt-eng-ft.cc \ - unwind-prot.cc \ - xdiv.cc \ - xgl2ps.c \ - xnorm.cc \ - xpow.cc \ - zfstream.cc \ $(OCTAVE_VALUE_SRC) \ $(PARSE_TREE_SRC) \ - $(JIT_SRC) \ + $(INTERP_CORE_SRC) \ $(INTERPFCN_SRC) \ $(COREFCN_SRC) @@ -254,6 +153,7 @@ include octave-value/module.mk include operators/module.mk include template-inst/module.mk +include interp-core/module.mk include interpfcn/module.mk include corefcn/module.mk include dldfcn/module.mk @@ -277,13 +177,13 @@ $(TEMPLATE_INST_SRC) nodist_liboctinterp_la_SOURCES = \ - builtins.cc \ + interp-core/mxarray.h \ + interp-core/oct-errno.cc \ interpfcn/defaults.h \ interpfcn/graphics.h \ - mxarray.h \ + operators/ops.cc \ + builtins.cc \ oct-conf.h \ - oct-errno.cc \ - ops.cc \ version.h \ $(OPT_INC) @@ -309,8 +209,6 @@ -bindir $(bindir) \ $(LIBOCTINTERP_LINK_OPTS) -display.df display.lo: CPPFLAGS += $(X11_FLAGS) - ## FIXME: Does this rule need to be uncommented? #fft.df fft.lo fft2.df fft2.lo fftn.df fftn.lo: CPPFLAGS += $(FFTW_XCPPFLAGS) @@ -358,27 +256,12 @@ ## Special rules: ## Mostly for sources which must be built before rest of compilation. -## defaults.h and oct-conf.h must depend on Makefile. Calling configure +## oct-conf.h must depend on Makefile. Calling configure ## may change default/config values. However, calling configure will also ## regenerate the Makefiles from Makefile.am and trigger the rules below. oct-conf.h: oct-conf.in.h Makefile @$(do_subst_config_vals) -## Don't use a pipeline to process gperf output since if gperf -## is missing but sed is not, the exit status of the pipeline -## will still be success and we will end up creating an empty -## oct-gperf.h file. -oct-gperf.h: octave.gperf - $(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1 - $(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t - mv $@-t $@ - rm -f $@-t1 - -mxarray.h: mxarray.in.h Makefile - $(SED) < $< \ - -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t - mv $@-t $@ - version.h: version.in.h Makefile $(SED) < $< \ -e "s|%OCTAVE_API_VERSION_NUMBER%|${OCTAVE_API_VERSION_NUMBER}|" \ @@ -392,20 +275,6 @@ $(srcdir)/mkbuiltins $(DEF_FILES) > $@-t mv $@-t $@ -ops.cc: $(OPERATORS_SRC) mkops - $(srcdir)/mkops $(OPERATORS_SRC) > $@-t - mv $@-t $@ - -oct-errno.cc: oct-errno.in.cc Makefile - if test -n "$(PERL)"; then \ - $(srcdir)/mk-errno-list --perl "$(PERL)" < $< > $@-t; \ - elif test -n "$(PYTHON)"; then \ - $(srcdir)/mk-errno-list --python "$(PYTHON)" < $< > $@-t; \ - else \ - $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \ - fi - mv $@-t $@ - if AMCOND_ENABLE_DYNAMIC_LINKING DLDFCN_PKG_ADD_FILE = dldfcn/PKG_ADD @@ -414,12 +283,6 @@ mv $@-t $@ endif -__fltk_uigetfile__.lo __fltk_uigetfile__.o: \ - AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS)) - -__init_fltk__.lo __init_fltk__.o: \ - AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS)) - if AMCOND_BUILD_DOCS .DOCSTRINGS: $(ALL_DEF_FILES) gendoc.pl if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \ diff --git a/src/Cell.cc b/src/interp-core/Cell.cc rename from src/Cell.cc rename to src/interp-core/Cell.cc diff --git a/src/Cell.h b/src/interp-core/Cell.h rename from src/Cell.h rename to src/interp-core/Cell.h diff --git a/src/c-file-ptr-stream.cc b/src/interp-core/c-file-ptr-stream.cc rename from src/c-file-ptr-stream.cc rename to src/interp-core/c-file-ptr-stream.cc diff --git a/src/c-file-ptr-stream.h b/src/interp-core/c-file-ptr-stream.h rename from src/c-file-ptr-stream.h rename to src/interp-core/c-file-ptr-stream.h diff --git a/src/comment-list.cc b/src/interp-core/comment-list.cc rename from src/comment-list.cc rename to src/interp-core/comment-list.cc diff --git a/src/comment-list.h b/src/interp-core/comment-list.h rename from src/comment-list.h rename to src/interp-core/comment-list.h diff --git a/src/cutils.c b/src/interp-core/cutils.c rename from src/cutils.c rename to src/interp-core/cutils.c diff --git a/src/cutils.h b/src/interp-core/cutils.h rename from src/cutils.h rename to src/interp-core/cutils.h diff --git a/src/defun-dld.h b/src/interp-core/defun-dld.h rename from src/defun-dld.h rename to src/interp-core/defun-dld.h diff --git a/src/defun-int.h b/src/interp-core/defun-int.h rename from src/defun-int.h rename to src/interp-core/defun-int.h diff --git a/src/display.cc b/src/interp-core/display.cc rename from src/display.cc rename to src/interp-core/display.cc diff --git a/src/display.h b/src/interp-core/display.h rename from src/display.h rename to src/interp-core/display.h diff --git a/src/dynamic-ld.cc b/src/interp-core/dynamic-ld.cc rename from src/dynamic-ld.cc rename to src/interp-core/dynamic-ld.cc diff --git a/src/dynamic-ld.h b/src/interp-core/dynamic-ld.h rename from src/dynamic-ld.h rename to src/interp-core/dynamic-ld.h diff --git a/src/gl-render.cc b/src/interp-core/gl-render.cc rename from src/gl-render.cc rename to src/interp-core/gl-render.cc diff --git a/src/gl-render.h b/src/interp-core/gl-render.h rename from src/gl-render.h rename to src/interp-core/gl-render.h diff --git a/src/gl2ps-renderer.cc b/src/interp-core/gl2ps-renderer.cc rename from src/gl2ps-renderer.cc rename to src/interp-core/gl2ps-renderer.cc diff --git a/src/gl2ps-renderer.h b/src/interp-core/gl2ps-renderer.h rename from src/gl2ps-renderer.h rename to src/interp-core/gl2ps-renderer.h diff --git a/src/gl2ps.c b/src/interp-core/gl2ps.c rename from src/gl2ps.c rename to src/interp-core/gl2ps.c diff --git a/src/gl2ps.h b/src/interp-core/gl2ps.h rename from src/gl2ps.h rename to src/interp-core/gl2ps.h diff --git a/src/gripes.cc b/src/interp-core/gripes.cc rename from src/gripes.cc rename to src/interp-core/gripes.cc diff --git a/src/gripes.h b/src/interp-core/gripes.h rename from src/gripes.h rename to src/interp-core/gripes.h diff --git a/src/jit-ir.cc b/src/interp-core/jit-ir.cc rename from src/jit-ir.cc rename to src/interp-core/jit-ir.cc diff --git a/src/jit-ir.h b/src/interp-core/jit-ir.h rename from src/jit-ir.h rename to src/interp-core/jit-ir.h diff --git a/src/jit-typeinfo.cc b/src/interp-core/jit-typeinfo.cc rename from src/jit-typeinfo.cc rename to src/interp-core/jit-typeinfo.cc --- a/src/jit-typeinfo.cc +++ b/src/interp-core/jit-typeinfo.cc @@ -1162,7 +1162,7 @@ llvm::BasicBlock *normal_block = fn.new_block ("normal"); llvm::Value *zero = llvm::ConstantFP::get (scalar_t, 0); - llvm::Value *check = builder.CreateFCmpUEQ (zero, fn.argument (builder, 0)); + llvm::Value *check = builder.CreateFCmpUEQ (zero, fn.argument (builder, 1)); builder.CreateCondBr (check, warn_block, normal_block); builder.SetInsertPoint (warn_block); diff --git a/src/jit-typeinfo.h b/src/interp-core/jit-typeinfo.h rename from src/jit-typeinfo.h rename to src/interp-core/jit-typeinfo.h diff --git a/src/jit-util.cc b/src/interp-core/jit-util.cc rename from src/jit-util.cc rename to src/interp-core/jit-util.cc diff --git a/src/jit-util.h b/src/interp-core/jit-util.h rename from src/jit-util.h rename to src/interp-core/jit-util.h diff --git a/src/ls-ascii-helper.cc b/src/interp-core/ls-ascii-helper.cc rename from src/ls-ascii-helper.cc rename to src/interp-core/ls-ascii-helper.cc diff --git a/src/ls-ascii-helper.h b/src/interp-core/ls-ascii-helper.h rename from src/ls-ascii-helper.h rename to src/interp-core/ls-ascii-helper.h diff --git a/src/ls-hdf5.cc b/src/interp-core/ls-hdf5.cc rename from src/ls-hdf5.cc rename to src/interp-core/ls-hdf5.cc diff --git a/src/ls-hdf5.h b/src/interp-core/ls-hdf5.h rename from src/ls-hdf5.h rename to src/interp-core/ls-hdf5.h diff --git a/src/ls-mat-ascii.cc b/src/interp-core/ls-mat-ascii.cc rename from src/ls-mat-ascii.cc rename to src/interp-core/ls-mat-ascii.cc diff --git a/src/ls-mat-ascii.h b/src/interp-core/ls-mat-ascii.h rename from src/ls-mat-ascii.h rename to src/interp-core/ls-mat-ascii.h diff --git a/src/ls-mat4.cc b/src/interp-core/ls-mat4.cc rename from src/ls-mat4.cc rename to src/interp-core/ls-mat4.cc diff --git a/src/ls-mat4.h b/src/interp-core/ls-mat4.h rename from src/ls-mat4.h rename to src/interp-core/ls-mat4.h diff --git a/src/ls-mat5.cc b/src/interp-core/ls-mat5.cc rename from src/ls-mat5.cc rename to src/interp-core/ls-mat5.cc diff --git a/src/ls-mat5.h b/src/interp-core/ls-mat5.h rename from src/ls-mat5.h rename to src/interp-core/ls-mat5.h diff --git a/src/ls-oct-binary.cc b/src/interp-core/ls-oct-binary.cc rename from src/ls-oct-binary.cc rename to src/interp-core/ls-oct-binary.cc diff --git a/src/ls-oct-binary.h b/src/interp-core/ls-oct-binary.h rename from src/ls-oct-binary.h rename to src/interp-core/ls-oct-binary.h diff --git a/src/ls-utils.cc b/src/interp-core/ls-utils.cc rename from src/ls-utils.cc rename to src/interp-core/ls-utils.cc diff --git a/src/ls-utils.h b/src/interp-core/ls-utils.h rename from src/ls-utils.h rename to src/interp-core/ls-utils.h diff --git a/src/matherr.c b/src/interp-core/matherr.c rename from src/matherr.c rename to src/interp-core/matherr.c diff --git a/src/mex.cc b/src/interp-core/mex.cc rename from src/mex.cc rename to src/interp-core/mex.cc diff --git a/src/mex.h b/src/interp-core/mex.h rename from src/mex.h rename to src/interp-core/mex.h diff --git a/src/mexproto.h b/src/interp-core/mexproto.h rename from src/mexproto.h rename to src/interp-core/mexproto.h diff --git a/src/interp-core/module.mk b/src/interp-core/module.mk new file mode 100644 --- /dev/null +++ b/src/interp-core/module.mk @@ -0,0 +1,138 @@ +EXTRA_DIST += \ + interp-core/module.mk \ + interp-core/gl2ps.c \ + interp-core/mxarray.in.h \ + interp-core/oct-errno.in.cc + +JIT_INCLUDES = \ + interp-core/jit-util.h \ + interp-core/jit-typeinfo.h \ + interp-core/jit-ir.h \ + interp-core/pt-jit.h + +INTERP_CORE_INCLUDES = \ + interp-core/Cell.h \ + interp-core/c-file-ptr-stream.h \ + interp-core/comment-list.h \ + interp-core/cutils.h \ + interp-core/defun-dld.h \ + interp-core/defun-int.h \ + interp-core/display.h \ + interp-core/dynamic-ld.h \ + interp-core/gl-render.h \ + interp-core/gl2ps-renderer.h \ + interp-core/gl2ps.h \ + interp-core/gripes.h \ + interp-core/jit-ir.h \ + interp-core/jit-typeinfo.h \ + interp-core/jit-util.h \ + interp-core/ls-ascii-helper.h \ + interp-core/ls-hdf5.h \ + interp-core/ls-mat-ascii.h \ + interp-core/ls-mat4.h \ + interp-core/ls-mat5.h \ + interp-core/ls-oct-binary.h \ + interp-core/ls-utils.h \ + interp-core/mex.h \ + interp-core/mexproto.h \ + interp-core/mxarray.in.h \ + interp-core/oct-errno.h \ + interp-core/oct-fstrm.h \ + interp-core/oct-hdf5.h \ + interp-core/oct-iostrm.h \ + interp-core/oct-lvalue.h \ + interp-core/oct-map.h \ + interp-core/oct-obj.h \ + interp-core/oct-prcstrm.h \ + interp-core/oct-procbuf.h \ + interp-core/oct-stdstrm.h \ + interp-core/oct-stream.h \ + interp-core/oct-strstrm.h \ + interp-core/oct.h \ + interp-core/procstream.h \ + interp-core/pt-jit.h \ + interp-core/siglist.h \ + interp-core/sparse-xdiv.h \ + interp-core/sparse-xpow.h \ + interp-core/txt-eng-ft.h \ + interp-core/txt-eng.h \ + interp-core/unwind-prot.h \ + interp-core/xdiv.h \ + interp-core/xnorm.h \ + interp-core/xpow.h \ + interp-core/zfstream.h \ + $(JIT_INCLUDES) + +JIT_SRC = \ + interp-core/jit-util.cc \ + interp-core/jit-typeinfo.cc \ + interp-core/jit-ir.cc \ + interp-core/pt-jit.cc + +C_INTERP_CORE_SRC = \ + interp-core/cutils.c \ + interp-core/matherr.c \ + interp-core/siglist.c \ + interp-core/xgl2ps.c + +INTERP_CORE_SRC = \ + interp-core/Cell.cc \ + interp-core/c-file-ptr-stream.cc \ + interp-core/comment-list.cc \ + interp-core/display.cc \ + interp-core/dynamic-ld.cc \ + interp-core/gl-render.cc \ + interp-core/gl2ps-renderer.cc \ + interp-core/gripes.cc \ + interp-core/jit-ir.cc \ + interp-core/jit-typeinfo.cc \ + interp-core/jit-util.cc \ + interp-core/ls-ascii-helper.cc \ + interp-core/ls-hdf5.cc \ + interp-core/ls-mat-ascii.cc \ + interp-core/ls-mat4.cc \ + interp-core/ls-mat5.cc \ + interp-core/ls-oct-binary.cc \ + interp-core/ls-utils.cc \ + interp-core/mex.cc \ + interp-core/oct-fstrm.cc \ + interp-core/oct-iostrm.cc \ + interp-core/oct-lvalue.cc \ + interp-core/oct-map.cc \ + interp-core/oct-obj.cc \ + interp-core/oct-prcstrm.cc \ + interp-core/oct-procbuf.cc \ + interp-core/oct-stream.cc \ + interp-core/oct-strstrm.cc \ + interp-core/procstream.cc \ + interp-core/pt-jit.cc \ + interp-core/sparse-xdiv.cc \ + interp-core/sparse-xpow.cc \ + interp-core/txt-eng-ft.cc \ + interp-core/unwind-prot.cc \ + interp-core/xdiv.cc \ + interp-core/xnorm.cc \ + interp-core/xpow.cc \ + interp-core/zfstream.cc \ + $(JIT_SRC) \ + $(C_INTERP_CORE_SRC) + +## FIXME: I don't believe this rule actually fires +display.df display.lo: CPPFLAGS += $(X11_FLAGS) + +## Special rules for sources which must be built before rest of compilation. +interp-core/oct-errno.cc: interp-core/oct-errno.in.cc Makefile + if test -n "$(PERL)"; then \ + $(srcdir)/mk-errno-list --perl "$(PERL)" < $< > $@-t; \ + elif test -n "$(PYTHON)"; then \ + $(srcdir)/mk-errno-list --python "$(PYTHON)" < $< > $@-t; \ + else \ + $(SED) '/@SYSDEP_ERRNO_LIST@/D' $< > $@-t; \ + fi + mv $@-t $@ + +interp-core/mxarray.h: interp-core/mxarray.in.h Makefile + $(SED) < $< \ + -e "s|%OCTAVE_IDX_TYPE%|${OCTAVE_IDX_TYPE}|" > $@-t + mv $@-t $@ + diff --git a/src/mxarray.in.h b/src/interp-core/mxarray.in.h rename from src/mxarray.in.h rename to src/interp-core/mxarray.in.h diff --git a/src/oct-errno.h b/src/interp-core/oct-errno.h rename from src/oct-errno.h rename to src/interp-core/oct-errno.h diff --git a/src/oct-errno.in.cc b/src/interp-core/oct-errno.in.cc rename from src/oct-errno.in.cc rename to src/interp-core/oct-errno.in.cc --- a/src/oct-errno.in.cc +++ b/src/interp-core/oct-errno.in.cc @@ -1,4 +1,4 @@ -// oct-errno.cc.in +// DO NOT EDIT! Generated automatically from oct-errno.in.cc by configure /* Copyright (C) 2005-2012 John W. Eaton diff --git a/src/oct-fstrm.cc b/src/interp-core/oct-fstrm.cc rename from src/oct-fstrm.cc rename to src/interp-core/oct-fstrm.cc diff --git a/src/oct-fstrm.h b/src/interp-core/oct-fstrm.h rename from src/oct-fstrm.h rename to src/interp-core/oct-fstrm.h diff --git a/src/oct-hdf5.h b/src/interp-core/oct-hdf5.h rename from src/oct-hdf5.h rename to src/interp-core/oct-hdf5.h diff --git a/src/oct-iostrm.cc b/src/interp-core/oct-iostrm.cc rename from src/oct-iostrm.cc rename to src/interp-core/oct-iostrm.cc diff --git a/src/oct-iostrm.h b/src/interp-core/oct-iostrm.h rename from src/oct-iostrm.h rename to src/interp-core/oct-iostrm.h diff --git a/src/oct-lvalue.cc b/src/interp-core/oct-lvalue.cc rename from src/oct-lvalue.cc rename to src/interp-core/oct-lvalue.cc diff --git a/src/oct-lvalue.h b/src/interp-core/oct-lvalue.h rename from src/oct-lvalue.h rename to src/interp-core/oct-lvalue.h diff --git a/src/oct-map.cc b/src/interp-core/oct-map.cc rename from src/oct-map.cc rename to src/interp-core/oct-map.cc diff --git a/src/oct-map.h b/src/interp-core/oct-map.h rename from src/oct-map.h rename to src/interp-core/oct-map.h diff --git a/src/oct-obj.cc b/src/interp-core/oct-obj.cc rename from src/oct-obj.cc rename to src/interp-core/oct-obj.cc diff --git a/src/oct-obj.h b/src/interp-core/oct-obj.h rename from src/oct-obj.h rename to src/interp-core/oct-obj.h diff --git a/src/oct-prcstrm.cc b/src/interp-core/oct-prcstrm.cc rename from src/oct-prcstrm.cc rename to src/interp-core/oct-prcstrm.cc diff --git a/src/oct-prcstrm.h b/src/interp-core/oct-prcstrm.h rename from src/oct-prcstrm.h rename to src/interp-core/oct-prcstrm.h diff --git a/src/oct-procbuf.cc b/src/interp-core/oct-procbuf.cc rename from src/oct-procbuf.cc rename to src/interp-core/oct-procbuf.cc diff --git a/src/oct-procbuf.h b/src/interp-core/oct-procbuf.h rename from src/oct-procbuf.h rename to src/interp-core/oct-procbuf.h diff --git a/src/oct-stdstrm.h b/src/interp-core/oct-stdstrm.h rename from src/oct-stdstrm.h rename to src/interp-core/oct-stdstrm.h diff --git a/src/oct-stream.cc b/src/interp-core/oct-stream.cc rename from src/oct-stream.cc rename to src/interp-core/oct-stream.cc diff --git a/src/oct-stream.h b/src/interp-core/oct-stream.h rename from src/oct-stream.h rename to src/interp-core/oct-stream.h diff --git a/src/oct-strstrm.cc b/src/interp-core/oct-strstrm.cc rename from src/oct-strstrm.cc rename to src/interp-core/oct-strstrm.cc diff --git a/src/oct-strstrm.h b/src/interp-core/oct-strstrm.h rename from src/oct-strstrm.h rename to src/interp-core/oct-strstrm.h diff --git a/src/oct.h b/src/interp-core/oct.h rename from src/oct.h rename to src/interp-core/oct.h diff --git a/src/procstream.cc b/src/interp-core/procstream.cc rename from src/procstream.cc rename to src/interp-core/procstream.cc diff --git a/src/procstream.h b/src/interp-core/procstream.h rename from src/procstream.h rename to src/interp-core/procstream.h diff --git a/src/pt-jit.cc b/src/interp-core/pt-jit.cc rename from src/pt-jit.cc rename to src/interp-core/pt-jit.cc --- a/src/pt-jit.cc +++ b/src/interp-core/pt-jit.cc @@ -1904,4 +1904,27 @@ %! assert (all (m == expected)); %! assert (result == sum (expected (:))); +%!function test_divide () +%! state = warning ("query", "Octave:divide-by-zero").state; +%! unwind_protect +%! warning ("error", "Octave:divide-by-zero"); +%! for i=1:1e5 +%! a = 1; +%! a / 0; +%! endfor +%! unwind_protect_cleanup +%! warning (state, "Octave:divide-by-zero"); +%! end_unwind_protect +%!endfunction + +%!error test_divide () + +%!test +%! while 1 +%! a = 0; +%! result = a / 1; +%! break; +%! endwhile +%! assert (result, 0); + */ diff --git a/src/pt-jit.h b/src/interp-core/pt-jit.h rename from src/pt-jit.h rename to src/interp-core/pt-jit.h diff --git a/src/siglist.c b/src/interp-core/siglist.c rename from src/siglist.c rename to src/interp-core/siglist.c diff --git a/src/siglist.h b/src/interp-core/siglist.h rename from src/siglist.h rename to src/interp-core/siglist.h diff --git a/src/sparse-xdiv.cc b/src/interp-core/sparse-xdiv.cc rename from src/sparse-xdiv.cc rename to src/interp-core/sparse-xdiv.cc diff --git a/src/sparse-xdiv.h b/src/interp-core/sparse-xdiv.h rename from src/sparse-xdiv.h rename to src/interp-core/sparse-xdiv.h diff --git a/src/sparse-xpow.cc b/src/interp-core/sparse-xpow.cc rename from src/sparse-xpow.cc rename to src/interp-core/sparse-xpow.cc diff --git a/src/sparse-xpow.h b/src/interp-core/sparse-xpow.h rename from src/sparse-xpow.h rename to src/interp-core/sparse-xpow.h diff --git a/src/txt-eng-ft.cc b/src/interp-core/txt-eng-ft.cc rename from src/txt-eng-ft.cc rename to src/interp-core/txt-eng-ft.cc diff --git a/src/txt-eng-ft.h b/src/interp-core/txt-eng-ft.h rename from src/txt-eng-ft.h rename to src/interp-core/txt-eng-ft.h diff --git a/src/txt-eng.h b/src/interp-core/txt-eng.h rename from src/txt-eng.h rename to src/interp-core/txt-eng.h diff --git a/src/unwind-prot.cc b/src/interp-core/unwind-prot.cc rename from src/unwind-prot.cc rename to src/interp-core/unwind-prot.cc diff --git a/src/unwind-prot.h b/src/interp-core/unwind-prot.h rename from src/unwind-prot.h rename to src/interp-core/unwind-prot.h diff --git a/src/xdiv.cc b/src/interp-core/xdiv.cc rename from src/xdiv.cc rename to src/interp-core/xdiv.cc diff --git a/src/xdiv.h b/src/interp-core/xdiv.h rename from src/xdiv.h rename to src/interp-core/xdiv.h diff --git a/src/xgl2ps.c b/src/interp-core/xgl2ps.c rename from src/xgl2ps.c rename to src/interp-core/xgl2ps.c diff --git a/src/xnorm.cc b/src/interp-core/xnorm.cc rename from src/xnorm.cc rename to src/interp-core/xnorm.cc diff --git a/src/xnorm.h b/src/interp-core/xnorm.h rename from src/xnorm.h rename to src/interp-core/xnorm.h diff --git a/src/xpow.cc b/src/interp-core/xpow.cc rename from src/xpow.cc rename to src/interp-core/xpow.cc diff --git a/src/xpow.h b/src/interp-core/xpow.h rename from src/xpow.h rename to src/interp-core/xpow.h diff --git a/src/zfstream.cc b/src/interp-core/zfstream.cc rename from src/zfstream.cc rename to src/interp-core/zfstream.cc diff --git a/src/zfstream.h b/src/interp-core/zfstream.h rename from src/zfstream.h rename to src/interp-core/zfstream.h diff --git a/src/interpfcn/data.cc b/src/interpfcn/data.cc --- a/src/interpfcn/data.cc +++ b/src/interpfcn/data.cc @@ -38,10 +38,7 @@ #include #include -extern "C" -{ #include -} #include "lo-ieee.h" #include "lo-math.h" diff --git a/src/interpfcn/module.mk b/src/interpfcn/module.mk --- a/src/interpfcn/module.mk +++ b/src/interpfcn/module.mk @@ -1,5 +1,7 @@ EXTRA_DIST += \ - interpfcn/module.mk + interpfcn/module.mk \ + interpfcn/defaults.in.h \ + interpfcn/graphics.in.h INTERPFCN_INCLUDES = \ interpfcn/data.h \ @@ -63,3 +65,9 @@ $(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t mv $@-t $@ +## FIXME: Do these rules work correctly after transplant to interpfcn/ dir? +__fltk_uigetfile__.lo __fltk_uigetfile__.o: \ + AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS)) + +__init_fltk__.lo __init_fltk__.o: \ + AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS)) diff --git a/src/operators/module.mk b/src/operators/module.mk --- a/src/operators/module.mk +++ b/src/operators/module.mk @@ -129,8 +129,16 @@ operators/op-ui64-ui64.cc \ operators/op-ui8-ui8.cc -octinclude_HEADERS += \ +## These look like included header files to Autotools build process +OPERATOR_INCLUDES = \ operators/op-dm-template.cc \ operators/op-dms-template.cc \ operators/op-int.h \ - operators/op-pm-template.cc + operators/op-pm-template.cc \ + operators/ops.h + +## Special rules for sources which must be built before rest of compilation. +operators/ops.cc: $(OPERATORS_SRC) mkops + $(srcdir)/mkops $(OPERATORS_SRC) > $@-t + mv $@-t $@ + diff --git a/src/ops.h b/src/operators/ops.h rename from src/ops.h rename to src/operators/ops.h diff --git a/src/parse-tree/module.mk b/src/parse-tree/module.mk --- a/src/parse-tree/module.mk +++ b/src/parse-tree/module.mk @@ -1,5 +1,6 @@ EXTRA_DIST += \ - parse-tree/module.mk + parse-tree/module.mk \ + parse-tree/octave.gperf PARSER_INCLUDES = \ parse-tree/lex.h \ @@ -42,6 +43,7 @@ parse-tree/pt-unop.h \ parse-tree/pt-walk.h \ parse-tree/pt.h \ + parse-tree/token.h \ $(PARSER_INCLUDES) PARSE_TREE_SRC = \ @@ -71,5 +73,18 @@ parse-tree/pt-stmt.cc \ parse-tree/pt-unop.cc \ parse-tree/pt.cc \ + parse-tree/token.cc \ $(PARSER_SRC) +## Special rules for sources which must be built before rest of compilation. + +## Don't use a pipeline to process gperf output since if gperf +## is missing but sed is not, the exit status of the pipeline +## will still be success and we will end up creating an empty +## oct-gperf.h file. +parse-tree/oct-gperf.h: parse-tree/octave.gperf + $(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1 + $(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t + mv $@-t $@ + rm -f $@-t1 + diff --git a/src/octave.gperf b/src/parse-tree/octave.gperf rename from src/octave.gperf rename to src/parse-tree/octave.gperf diff --git a/src/token.cc b/src/parse-tree/token.cc rename from src/token.cc rename to src/parse-tree/token.cc diff --git a/src/token.h b/src/parse-tree/token.h rename from src/token.h rename to src/parse-tree/token.h