Skip to content

Commit

Permalink
Remove configuration option --disable-vm-evaluator
Browse files Browse the repository at this point in the history
The `--disable-vm-evaluator` flag was being used only to selectively
allow/disallow the `make check-vm` option, but the VM was being
built and could be used whether that flag was passed or not.
This changeset removes that flag, allowing the VM to always be
built and available to the end user. To anyone building Octave
from source, this makes both `make check` and `make check-vm`
available. (The VM is still disabled when Octave starts, and the
user must explicitly invoke it with `__vm_enable__ (1)`.)

* configure.ac: Remove flag and corresponding variables.
* Makefile.am, test/Makefile.am: Remove use of flag,
allow `check-vm` to be available always.
* compile.cc: Edit FIXME and docstring to not mention the flag.
  • Loading branch information
arungiridhar committed Oct 20, 2023
1 parent 2c99138 commit 73c6076
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
2 changes: 0 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,8 @@ run-octave: run-octave.in build-aux/subst-script-vals.sh
$(AM_V_GEN)$(call simple-filter-rule,build-aux/subst-script-vals.sh) && \
chmod a+rx $@

if AMCOND_ENABLE_VM_EVALUATOR
check-vm:
$(MAKE) -C test check-vm
endif

octave-config.h: config.h build-aux/mk-octave-config-h.sh
$(AM_V_GEN)$(SHELL) $(srcdir)/build-aux/mk-octave-config-h.sh $< > $@-t && \
Expand Down
14 changes: 1 addition & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1408,21 +1408,9 @@ if test $ENABLE_COMMAND_LINE_PUSH_PARSER = yes; then
[Define to 1 to use Bison's push parser interface in the command line REPL.])
fi

### Configure compilation of *experimental* Virtual Machine evaluator.

## FIXME: The next line is needed for VM-related ifdefs in pt-bytecode-vm.cc.
AC_C_BIGENDIAN()

ENABLE_VM_EVALUATOR=yes
AC_ARG_ENABLE([vm-evaluator],
[AS_HELP_STRING([--disable-vm-evaluator],
[don't compile *experimental* virtual machine evaluator])],
[if test "$enableval" = no; then ENABLE_VM_EVALUATOR=no; fi], [])
if test $ENABLE_VM_EVALUATOR = yes; then
AC_DEFINE(OCTAVE_ENABLE_VM_EVALUATOR, 1,
[Define to 1 to build experimental Virtual Machine evaluator.])
fi
AM_CONDITIONAL([AMCOND_ENABLE_VM_EVALUATOR], [test $ENABLE_VM_EVALUATOR = yes])

### Check for PCRE2 or PCRE regex library, requiring one to exist.

have_pcre2=no
Expand Down
4 changes: 0 additions & 4 deletions libinterp/corefcn/compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
OCTAVE_BEGIN_NAMESPACE(octave)

// If TRUE, use VM evaluator rather than tree walker.
// FIXME: Use OCTAVE_ENABLE_VM_EVALUATOR define to set it to true when
// the VM has been tested properly.
bool V__vm_enable__ = false;

// Cleverly hidden in pt-bytecode-vm.cc to prevent inlining here
Expand Down Expand Up @@ -576,8 +574,6 @@ Note that the virtual machine feature is experimental.
The default value is currently false, while the VM is still experimental.
Users need to explicitly call @code{__vm_enable__ (1)} to enable it.
In future, this will be set to the value of the OCTAVE_ENABLE_VM_EVALUATOR
flag that was set when building Octave.
When false, Octave uses a traditional tree walker
to evaluate statements parsed from m-code. When true, Octave translates parsed
Expand Down
2 changes: 0 additions & 2 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,8 @@ endef
check-local: $(GENERATED_TEST_FILES) $(MEX_TEST_FUNCTIONS) | $(OCTAVE_INTERPRETER_TARGETS) $(octave_dirstamp)
$(AM_V_at)$(call run-octave-tests)

if AMCOND_ENABLE_VM_EVALUATOR
check-vm: $(BUILT_SOURCES) $(GENERATED_TEST_FILES) $(MEX_TEST_FUNCTIONS) | $(OCTAVE_INTERPRETER_TARGETS) $(octave_dirstamp)
$(AM_V_at)$(call run-octave-tests,__vm_enable__ (1))
endif

COVERAGE_DIR = coverage
COVERAGE_INFO = $(COVERAGE_DIR)/$(PACKAGE).info
Expand Down

0 comments on commit 73c6076

Please sign in to comment.