Skip to content

Commit

Permalink
Merge branch 'refactor/tokenizer' into autobuild/tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
c-lipka committed Sep 17, 2018
2 parents 9c5b7cc + c661589 commit 0d49813
Show file tree
Hide file tree
Showing 193 changed files with 3,681 additions and 2,738 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Override language auto-detection on GitHub.
libraries/* linguist-vendored
distribution/**/*.inc linguist-language=POV-Ray
distribution/platform-specific/windows/Insert?Menu/*.txt linguist-language=POV-Ray
**/*.pov linguist-language=POV-Ray
**/*.h linguist-language=C++
source/povms/povms.h linguist-language=C
libraries/**/*.h linguist-language=C
libraries/boost/*.h linguist-language=C++
libraries/ilmbase/*.h linguist-language=C++
libraries/openexr/*.h linguist-language=C++

# Do not auto-merge version number file.
source/base/version.h -merge
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![AppVeyor Build status](https://img.shields.io/appveyor/ci/c-lipka/povray-exwy4.svg?label=appveyor)](https://ci.appveyor.com/project/c-lipka/povray-exwy4 "AppVeyor: Windows Server 2012 with Visual Studio 2015")
[![Travis CI Build Status](https://img.shields.io/travis/POV-Ray/povray.svg?label=travis%20ci)](https://travis-ci.org/POV-Ray/povray "Travis CI: Ubuntu 12.04 LTE 64-bit with gcc 4.6; OS X 10.11 with clang 4.2")
[![Coverity Code Analysis](https://scan.coverity.com/projects/269/badge.svg)](https://scan.coverity.com/projects/pov-ray "Coverity: Static Code Analysis")
[![Maintenance Status](https://img.shields.io/maintenance/yes/2017.svg)](README.md "Last edited 2017-08-18")
[![Maintenance Status](https://img.shields.io/maintenance/yes/2018.svg)](README.md "Last edited 2018-05-22")

- [License](#license)
- [Forums](#forums)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ for:
$env:pov_release_type = ($env:pov_build_type).ToLower() + ' release'
$env:pov_build_title = $env:pov_build_type + ' build'
$env:pov_build_message += '**Note:** This is a binary-only ' + $env:pov_release_type + '; to install, copy the '
$env:pov_build_message += 'binary into an existing POV-Ray 3.7 installation. (Make sure to backup the original '
$env:pov_build_message += 'binary into an existing POV-Ray v3.7 installation. (Make sure to backup the original '
$env:pov_build_message += 'binary first.)'
$env:pov_build_message += "`n`n"
$env:pov_build_message += 'These binaries require Windows Vista or higher, due to limitations of our automated '
Expand Down
79 changes: 67 additions & 12 deletions changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ 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
-----------------

Expand All @@ -61,6 +54,33 @@ Changed Behaviour
- 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 `#`).
- UV mapping of cylinder, cone and lemon primitives has been disabled again
for now, due to their orientation being poorly defined.
- An age-old bug in the inbuilt `f_enneper` isosurface function has been
fixed; the function now results in the originally intended shape.
- The `defined()` pseudo-function now returns `true` (while printing a
warning) if applied to reserved words. The `#ifdef` and `#ifndef` directives
also behave accordingly.

New Features
------------

- The `ovus` primitive has been extended in multiple ways. See the
documentation (currently being maintained on <http://wiki.povray.org>) for
details.
- Anti-aliasing now supports a new mode 3, which can actually serve as a
generic oversampling mechanism not only suited to perform edge
anti-aliasing, but also to successtully suppress moire patterns as well as
reduce image noise from stochastic mechanisms (e.g. jittered area lights,
subsurface light transport or micronormals). The mathematical background
and parameterization is similar to that of adaptive focal blur.

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 `#`).

Fixed or Mitigated Bugs
-----------------------
Expand All @@ -85,27 +105,62 @@ Reported via the Newsgroups:
an orthographic camera.
- <[email protected]>
(2018-01-05, povray.beta-test, "3.8.0 block pattern, density list parsing issue.")
- <[email protected]>
(2018-08-27, povray.advanced-users, "Re: It gets even weirder.")
Trying to `#declare Foo[A][B]=...` with `Foo` being an array of arrays and
`Foo[A]` not yet initialized causes a hard crash instead of a parse error.

Reported by Coverity static code analysis:

- CID 986462,986463 (Wrapper object use after free)
- CID 967358-967362 (Uninitialized scalar variable)
- CID 1372542-1372544 (Result is not floating-point)
- CID 1372618 (Uninitialized scalar variable)
- CID 1372629 (Uninitialized pointer read)
- CID 1372630-1372632 (Uninitialized scalar variable)

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).
- Fix long-standing bug in Julia fractal primitive using hypercomplex numbers.

Development Related
-------------------

- When compiled in debug mode, a new directive `#breakpoint` is now available,
intended for triggering an unconditional breakpoint from the scene file, or
priming a conditional breakpoint. See `Parser::Parse_Breakpoint()` in
`source/parser/parser_tokenizer.cpp` for more details.
- When compiled in debug mode, POV-Ray for Windows will now make do with
the release version of the editor DLLs if it can't find the debug version.
- A new version of the Git pre-commit hook is available; please, copy
`pre-commit` from `tools/git/hooks/` to `.git/hooks/` in your local
repository.
- To simplify version number housekeeping, the file `unix/VERSION` is now
created on the fly by the `unix/prebuild.sh` script, and has been dropped
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.
- To simplify creating reproducible builds, the Unix build process has been
amended to compile and link source files in a well-defined order.

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

- During alpha development phase, POV-Ray v3.8.0-alpha for Windows will
piggypack on an existing v3.7 installation to allow for raw binary
distribution.
- The source code now requires a C++11-compliant compiler.
- The Unix build process now officially requires Autoconf 2.68 or later.
- Added `--generation` command-line switch to POV-Ray for Unix, which will
cause POV-Ray to print its abbreviated version number to standard output.
- To simplify version number housekeeping, the file `unix/VERSION` is now
created on the fly by the `unix/prebuild.sh` script, and has been dropped
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.
- The `./configure` script can now be run without the `COMPILED_BY=...`
option. In this case it defaults to `$USER <no contact address>`, where
`$USER` is your login name.


Changes between 3.7.1-beta.9 and 3.7.1-rc.1
Expand Down
7 changes: 6 additions & 1 deletion distribution/include/functions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@
// 2. y scale (inverse)
// 3. z scale (inverse)

#declare f_enneper = function { internal(18) }
#if (Functions_Inc_Temp < 3.8)
#declare deprecated once "f_enneper was broken prior to v3.8; results will most likely differ."
f_enneper = function { internal(18) }
#else
#declare f_enneper = function { internal(18) }
#end
// Parameters: x, y, z
// One extra parameter required:
// 1. Field strength
Expand Down
6 changes: 3 additions & 3 deletions platform/unix/syspovtimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 @@ -76,7 +76,7 @@ void Delay(unsigned int msec)
timespec ts;
ts.tv_sec = msec / 1000;
ts.tv_nsec = (POV_ULONG) (1000000) * (msec % 1000);
nanosleep(&ts, NULL);
nanosleep(&ts, nullptr);
#elif defined(HAVE_USLEEP)
POV_ASSERT(msec < 1000); // On some systems, usleep() does not support sleeping for 1 second or more.
usleep (msec * (useconds_t)1000);
Expand Down Expand Up @@ -126,7 +126,7 @@ static inline bool GettimeofdayMillisec(POV_ULONG& result)
{
#if defined(HAVE_GETTIMEOFDAY)
struct timeval tv; // seconds + microseconds since
bool success = (gettimeofday(&tv, NULL) == 0);
bool success = (gettimeofday(&tv, nullptr) == 0);
if (success)
result = static_cast<POV_ULONG>(tv.tv_sec) *1000
+ static_cast<POV_ULONG>(tv.tv_usec) /1000;
Expand Down
8 changes: 4 additions & 4 deletions platform/windows/syspovtimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 @@ -65,7 +65,7 @@ Timer::Timer () :
// TODO - sources on the internet indicate that GetThreadTimes() and GetProcessTimes() have been
// around as early as NT 3.1. Is there a reason we're only making use of it in NT 4.0 and
// later Windows versions?
mThreadHandle (NULL),
mThreadHandle (nullptr),
mCPUTimeSupported (WindowsVersionDetector().IsNTVersion (4,0))
{
if (mCPUTimeSupported)
Expand All @@ -74,15 +74,15 @@ Timer::Timer () :
&mThreadHandle, 0, TRUE, DUPLICATE_SAME_ACCESS))
{
POV_ASSERT (false);
mThreadHandle = NULL;
mThreadHandle = nullptr;
}
}
Reset ();
}

Timer::~Timer ()
{
if (mThreadHandle != NULL)
if (mThreadHandle != nullptr)
CloseHandle (mThreadHandle);
}

Expand Down
6 changes: 3 additions & 3 deletions platform/x86/cpuid.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 @@ -159,7 +159,7 @@ CPUVendorInfo gCPUVendorInfo[] = {
{ kCPUVendor_VM, "VMwareVMware" }, // VMWare
{ kCPUVendor_VM, "XenVMMXenVMM" }, // Xen HVM
// End of list.
{ kCPUVendor_Unrecognized, NULL }
{ kCPUVendor_Unrecognized, nullptr }
};

struct CPUIDInfo
Expand Down Expand Up @@ -197,7 +197,7 @@ CPUIDInfo::CPUIDInfo() :
std::memcpy(vendor + 4, &info[CPUID_EDX], 4);
std::memcpy(vendor + 8, &info[CPUID_ECX], 4);
vendor[12] = '\0';
for (CPUVendorInfo* p = gCPUVendorInfo; p->cpuidString != NULL; ++p)
for (CPUVendorInfo* p = gCPUVendorInfo; p->cpuidString != nullptr; ++p)
{
if (strcmp(vendor, p->cpuidString) == 0)
{
Expand Down
12 changes: 6 additions & 6 deletions platform/x86/optimizednoise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 @@ -92,8 +92,8 @@ OptimizedNoiseInfo gaOptimizedNoiseInfo[] = {
AVXFMA4DNoise, // dNoise,
&kAVXFMA4NoiseEnabled, // enabled,
AVXFMA4Supported, // supported,
NULL, // recommended,
NULL // init
nullptr, // recommended,
nullptr // init
},
#endif
#ifdef TRY_OPTIMIZED_NOISE_AVX
Expand All @@ -116,12 +116,12 @@ OptimizedNoiseInfo gaOptimizedNoiseInfo[] = {
AVXPortableDNoise, // dNoise,
&kAVXPortableNoiseEnabled, // enabled,
AVXSupported, // supported,
NULL, // recommended,
NULL // init
nullptr, // recommended,
nullptr // init
},
#endif
// End-of-list entry.
{ NULL }
{ nullptr }
};

}
Expand Down
Loading

0 comments on commit 0d49813

Please sign in to comment.