Skip to content

Commit

Permalink
Merge branch 'release/v3.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
c-lipka committed Jan 6, 2018
2 parents b3038c2 + 26e2d47 commit 9c67174
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 46 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ addons:
- zlib1g-dev

install:
- cd unix
- ./prebuild.sh
- cd ..
- unix/prebuild.sh
- ./configure COMPILED_BY="Travis CI" --prefix="$(pwd)/build"
- make check
- make install
Expand Down
48 changes: 33 additions & 15 deletions changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,31 @@ This version is still under active development, and not finalized yet.
NOTE: This release cycle has been redesignated v3.8.0. There will not be a
v3.7.1 release proper.

Performance Improvements
------------------------

- Significantly improved parsing speed of skipped conditional blocks (e.g. in
`#if(false) ... #end`), especially for blocks containing few directives
(stuff that begins with `#`).

Changed Behaviour
-----------------

- Any new behaviour formerly activated by `#version 3.71` now requires
`#version 3.8` (or higher); specifying `#version 3.71` will trigger a
corresponding warning.
- Some defaults have been changed (requires `#version 3.8` as the _very first_
statement of the scene, or a corresponding command line / INI setting):
- The pigment now defaults to plain white.
- `ambient` now defaults to 0.0 instead of 0.1.
- The camera `right` vector length now defaults to the output image aspect
ratio (presuming square pixels) instead of 1.33.
- Minor changes have been made to the benchmark scene. New benchmark version
is 2.03.
- Token counting in conditional blocks (e.g. in `#if ... #end`) has changed.
Whenever such a block is skipped, the token count is now incremented only
by directives (stuff that begins with `#`).

Fixed or Mitigated Bugs
-----------------------

Expand All @@ -54,35 +79,26 @@ Reported via GitHub:
spline types & lathe uses.")
- #292 ("Port of FS227 - Fixed Vector Limitations")
- #317 ("Boost 1.65.0 incompatibility")
- #341 ("macOS build failure for 3.7.0.5", configure script failing to use
-lboost_system with Boost 1.66)
- #342 ("AX_FIX_INCORRECT_PATH is broken", configure script failing to
properly handle `.` directory in `C_INCLUDE_PATH` or `CPLUS_INCLUDE_PATH`)

Reported via the Newsgroups:

- <[email protected]>
(2017-11-05, povray.newusers, "orthographic camera and conic_sweep object")
Sides of a `conic_sweep` prism become invisible when viewed head-on using
an orthographic camera.
- <[email protected]>
(2018-01-05, povray.beta-test, "3.8.0 block pattern, density list parsing issue.")

Miscellaneous:

- Fix `interior_texture` for text objects (as mentioned in GitHub issue #65)
- Eliminated use of deprecated C++ `register` keyword (except in 3rd party
libraries bundled with the POV-Ray source code).

Changed Behaviour
-----------------

- Any new behaviour formerly activated by `#version 3.71` now requires
`#version 3.8` (or higher); specifying `#version 3.71` will trigger a
corresponding warning.
- Some defaults have been changed (requires `#version 3.8` as the _very first_
statement of the scene, or a corresponding command line / INI setting):
- The pigment now defaults to plain white.
- `ambient` now defaults to 0.0 instead of 0.1.
- The camera `right` vector length now defaults to the output image aspect
ratio (presuming square pixels) instead of 1.33.
- Minor changes have been made to the benchmark scene. New benchmark version
is 2.03.

Other Noteworthy
----------------

Expand All @@ -95,6 +111,8 @@ Other Noteworthy
from the repository. To retrieve version information from the source
package, use one of the new `get-source-version.*` scripts provided in
`tools/unix/` and `tools/windows/`, respectively.
- The `unix/prebuild.sh` script can now be run from the main directory; it is
no longer necessary to change to the unix directory first.


Changes between 3.7.1-beta.9 and 3.7.1-rc.1
Expand Down
6 changes: 5 additions & 1 deletion source/parser/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -709,7 +709,11 @@ class Parser : public SceneTask
// tokenize.h/tokenize.cpp
void Echo_ungetc (int c);
int Echo_getc (void);
/// Advance to the next non-whitespace character.
bool Skip_Spaces (void);
/// Advance to the next hash sign.
/// Hash signs inside comments or strings are ignored.
bool SkipToDirective(void);
int Parse_C_Comments (void);
inline void Begin_String (void);
inline void Stuff_Character (int c);
Expand Down
14 changes: 12 additions & 2 deletions source/parser/parser_expressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -3209,13 +3209,23 @@ template<>
shared_ptr<GenericPigmentBlendMap> Parser::Parse_Blend_List<GenericPigmentBlendMap> (int Count, ColourBlendMapConstPtr Def_Map, BlendMapTypeId Blend_Type)
{
shared_ptr<GenericPigmentBlendMap> New;
POV_BLEND_MAP_ASSERT(Blend_Type == kBlendMapType_Pigment);
POV_BLEND_MAP_ASSERT((Blend_Type == kBlendMapType_Pigment) ||
(Blend_Type == kBlendMapType_Density));
EXPECT_ONE
CASE(PIGMENT_TOKEN)
if (Blend_Type != kBlendMapType_Pigment)
Only_In("pigment", "pigment map");
UNGET
New = Parse_Blend_List<PigmentBlendMap> (Count, Def_Map, kBlendMapType_Pigment);
END_CASE

CASE(DENSITY_TOKEN)
if (Blend_Type != kBlendMapType_Density)
Only_In("density", "density map");
UNGET
New = Parse_Blend_List<PigmentBlendMap> (Count, Def_Map, kBlendMapType_Density);
END_CASE

OTHERWISE
UNGET
New = Parse_Blend_List<ColourBlendMap> (Count, Def_Map, kBlendMapType_Colour);
Expand Down
88 changes: 86 additions & 2 deletions source/parser/parser_tokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/// @parblock
///
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
///
/// POV-Ray is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -329,7 +329,12 @@ void Parser::Get_Token ()

while (Token.Token_Id == END_OF_FILE_TOKEN)
{
Skip_Spaces();
if (Skipping && !Parsing_Directive)
// If we're skipping, we're only interested in directives, such as `#else` or `#end`,
// so we just pretend any other characters in between are blanks.
SkipToDirective();
else
Skip_Spaces();

Token.Token_Col_No = col = Echo_Indx;
c = Echo_getc();
Expand Down Expand Up @@ -733,6 +738,85 @@ bool Parser::Skip_Spaces()



//*****************************************************************************

bool Parser::SkipToDirective()
{
int c;

while(true)
{
c = Echo_getc();

switch (c)
{
case EOF:
return false;

case '#' :
// Genuine Directive.
// We need to actually parse this.
Echo_ungetc(c);
return true;

case '/' :
// Possibly a comment.
// We need to examine the next character.
c = Echo_getc();
switch (c)
{
case '*':
// C style comment.
// Ignore all characters until the terminating `*/`.
Parse_C_Comments();
break;

case '/':
// C++ style comment.
// Ignore all characters until the end of line.
do
{
c = Echo_getc();
if (c == EOF)
return false;
}
while (c != '\n');
break;

default:
// The first slash was just an ordinary slash.
// Look at the second character in more detail.
Echo_ungetc(c);
break;
}
break;

case '"' :
// String literal.
// Ignore all characters until the end of the string.
do
{
c = Echo_getc();
if (c == EOF)
Error("No end quote for string.");
if (c == '\\')
// Escaped character.
// Completely ignore the next character.
(void)Echo_getc();
}
while (c != '"');
break;

default:
// Just any odd character.
// Ignore it.
break;
}
}
}



/*****************************************************************************
*
* FUNCTION
Expand Down
1 change: 0 additions & 1 deletion source/parser/reservedwords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ const RESERVED_WORD Reserved_Words[] = {
{ SRGBFT_TOKEN, "srgbft" },
{ SRGBT_TOKEN, "srgbt" },
{ STATISTICS_TOKEN, "statistics" },
{ STEPS_TOKEN, "steps" },
{ STR_TOKEN, "str" },
{ STRCMP_TOKEN, "strcmp" },
{ STRENGTH_TOKEN, "strength" },
Expand Down
1 change: 0 additions & 1 deletion source/parser/reservedwords.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,6 @@ enum TOKEN_IDS
SQUARE_TOKEN,
STAR_TOKEN,
STATISTICS_TOKEN,
STEPS_TOKEN,
STR_TOKEN,
STRENGTH_TOKEN,
STRING_ID_TOKEN,
Expand Down
6 changes: 3 additions & 3 deletions unix/config/ax_fix_incorrect_path.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# LAST MODIFICATION
#
# 2009-01-16
# 2018-01-05
#
# COPYLEFT
#
Expand All @@ -24,12 +24,12 @@ AC_DEFUN([AX_FIX_INCORRECT_PATH],
AC_SUBST([$1])
# process paths containing dots and create regexp
ax_fix_incorrect_path_regexp="[[=:]]*`echo $2 | sed 's,\.,\\\\.,g'`:*"
ax_fix_incorrect_path_regexp=":`echo $2 | sed 's,\.,\\\\.,g'`:"
echo ax_fix_incorrect_path_regexp = $ax_fix_incorrect_path_regexp >&AS_MESSAGE_LOG_FD
# initial and processed variable values
eval "ax_fix_incorrect_path_old=\$$1"
ax_fix_incorrect_path_new=`echo $ax_fix_incorrect_path_old | sed s,$ax_fix_incorrect_path_regexp,,g`
ax_fix_incorrect_path_new=`echo :$ax_fix_incorrect_path_old: | sed s,$ax_fix_incorrect_path_regexp,:,g | sed s,^:,, | sed s,:$,,`
echo ax_fix_incorrect_path_old = $ax_fix_incorrect_path_old >&AS_MESSAGE_LOG_FD
echo ax_fix_incorrect_path_new = $ax_fix_incorrect_path_new >&AS_MESSAGE_LOG_FD
Expand Down
22 changes: 13 additions & 9 deletions unix/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,21 @@ for extralib in '' '-lboost_system'
do
LIBS=$SAVED_LIBS
LIBS="$LIBS $extralib"
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <boost/thread/thread.hpp>
]],
[[boost::defer_lock_t(); return 0;]])],
[
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <boost/thread/thread.hpp>
]],[[
boost::mutex m;
boost::defer_lock_t();
return 0;
]])
],[
AC_MSG_RESULT([yes])
BOOST_THREAD_LIB="$BOOST_THREAD_LIB $extralib"
boost_thread_links=1
],,
[AC_MSG_RESULT([cross-compiling])] # FIXME
)
],,[
AC_MSG_RESULT([cross-compiling]) # FIXME
])
if test $boost_thread_links = '1'; then
break
fi
Expand Down Expand Up @@ -1362,6 +1365,7 @@ Compilation settings:
Compiler vendor: $pov_compiler_vendor
Compiler version: $pov_compiler_version
Compiler flags: $CXXFLAGS
Libraries: $LIBS
Type 'make check' to build the program and run a test render.
Type 'make install' to install $PACKAGE_NAME on your system.
Expand Down
Loading

0 comments on commit 9c67174

Please sign in to comment.