Skip to content

Commit 0d49813

Browse files
committed
Merge branch 'refactor/tokenizer' into autobuild/tokenizer
2 parents 9c5b7cc + c661589 commit 0d49813

File tree

193 files changed

+3681
-2738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3681
-2738
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Override language auto-detection on GitHub.
12
libraries/* linguist-vendored
23
distribution/**/*.inc linguist-language=POV-Ray
4+
distribution/platform-specific/windows/Insert?Menu/*.txt linguist-language=POV-Ray
35
**/*.pov linguist-language=POV-Ray
6+
**/*.h linguist-language=C++
7+
source/povms/povms.h linguist-language=C
8+
libraries/**/*.h linguist-language=C
9+
libraries/boost/*.h linguist-language=C++
10+
libraries/ilmbase/*.h linguist-language=C++
11+
libraries/openexr/*.h linguist-language=C++
12+
13+
# Do not auto-merge version number file.
14+
source/base/version.h -merge

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![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")
66
[![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")
77
[![Coverity Code Analysis](https://scan.coverity.com/projects/269/badge.svg)](https://scan.coverity.com/projects/pov-ray "Coverity: Static Code Analysis")
8-
[![Maintenance Status](https://img.shields.io/maintenance/yes/2017.svg)](README.md "Last edited 2017-08-18")
8+
[![Maintenance Status](https://img.shields.io/maintenance/yes/2018.svg)](README.md "Last edited 2018-05-22")
99

1010
- [License](#license)
1111
- [Forums](#forums)

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ for:
8080
$env:pov_release_type = ($env:pov_build_type).ToLower() + ' release'
8181
$env:pov_build_title = $env:pov_build_type + ' build'
8282
$env:pov_build_message += '**Note:** This is a binary-only ' + $env:pov_release_type + '; to install, copy the '
83-
$env:pov_build_message += 'binary into an existing POV-Ray 3.7 installation. (Make sure to backup the original '
83+
$env:pov_build_message += 'binary into an existing POV-Ray v3.7 installation. (Make sure to backup the original '
8484
$env:pov_build_message += 'binary first.)'
8585
$env:pov_build_message += "`n`n"
8686
$env:pov_build_message += 'These binaries require Windows Vista or higher, due to limitations of our automated '

changes.txt

Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ This version is still under active development, and not finalized yet.
3737
NOTE: This release cycle has been redesignated v3.8.0. There will not be a
3838
v3.7.1 release proper.
3939

40-
Performance Improvements
41-
------------------------
42-
43-
- Significantly improved parsing speed of skipped conditional blocks (e.g. in
44-
`#if(false) ... #end`), especially for blocks containing few directives
45-
(stuff that begins with `#`).
46-
4740
Changed Behaviour
4841
-----------------
4942

@@ -61,6 +54,33 @@ Changed Behaviour
6154
- Token counting in conditional blocks (e.g. in `#if ... #end`) has changed.
6255
Whenever such a block is skipped, the token count is now incremented only
6356
by directives (stuff that begins with `#`).
57+
- UV mapping of cylinder, cone and lemon primitives has been disabled again
58+
for now, due to their orientation being poorly defined.
59+
- An age-old bug in the inbuilt `f_enneper` isosurface function has been
60+
fixed; the function now results in the originally intended shape.
61+
- The `defined()` pseudo-function now returns `true` (while printing a
62+
warning) if applied to reserved words. The `#ifdef` and `#ifndef` directives
63+
also behave accordingly.
64+
65+
New Features
66+
------------
67+
68+
- The `ovus` primitive has been extended in multiple ways. See the
69+
documentation (currently being maintained on <http://wiki.povray.org>) for
70+
details.
71+
- Anti-aliasing now supports a new mode 3, which can actually serve as a
72+
generic oversampling mechanism not only suited to perform edge
73+
anti-aliasing, but also to successtully suppress moire patterns as well as
74+
reduce image noise from stochastic mechanisms (e.g. jittered area lights,
75+
subsurface light transport or micronormals). The mathematical background
76+
and parameterization is similar to that of adaptive focal blur.
77+
78+
Performance Improvements
79+
------------------------
80+
81+
- Significantly improved parsing speed of skipped conditional blocks (e.g. in
82+
`#if(false) ... #end`), especially for blocks containing few directives
83+
(stuff that begins with `#`).
6484

6585
Fixed or Mitigated Bugs
6686
-----------------------
@@ -85,27 +105,62 @@ Reported via the Newsgroups:
85105
an orthographic camera.
86106
87107
(2018-01-05, povray.beta-test, "3.8.0 block pattern, density list parsing issue.")
108+
109+
(2018-08-27, povray.advanced-users, "Re: It gets even weirder.")
110+
Trying to `#declare Foo[A][B]=...` with `Foo` being an array of arrays and
111+
`Foo[A]` not yet initialized causes a hard crash instead of a parse error.
112+
113+
Reported by Coverity static code analysis:
114+
115+
- CID 986462,986463 (Wrapper object use after free)
116+
- CID 967358-967362 (Uninitialized scalar variable)
117+
- CID 1372542-1372544 (Result is not floating-point)
118+
- CID 1372618 (Uninitialized scalar variable)
119+
- CID 1372629 (Uninitialized pointer read)
120+
- CID 1372630-1372632 (Uninitialized scalar variable)
88121

89122
Miscellaneous:
90123

91124
- Fix `interior_texture` for text objects (as mentioned in GitHub issue #65)
92125
- Eliminated use of deprecated C++ `register` keyword (except in 3rd party
93126
libraries bundled with the POV-Ray source code).
127+
- Fix long-standing bug in Julia fractal primitive using hypercomplex numbers.
128+
129+
Development Related
130+
-------------------
131+
132+
- When compiled in debug mode, a new directive `#breakpoint` is now available,
133+
intended for triggering an unconditional breakpoint from the scene file, or
134+
priming a conditional breakpoint. See `Parser::Parse_Breakpoint()` in
135+
`source/parser/parser_tokenizer.cpp` for more details.
136+
- When compiled in debug mode, POV-Ray for Windows will now make do with
137+
the release version of the editor DLLs if it can't find the debug version.
138+
- A new version of the Git pre-commit hook is available; please, copy
139+
`pre-commit` from `tools/git/hooks/` to `.git/hooks/` in your local
140+
repository.
141+
- To simplify version number housekeeping, the file `unix/VERSION` is now
142+
created on the fly by the `unix/prebuild.sh` script, and has been dropped
143+
from the repository. To retrieve version information from the source
144+
package, use one of the new `get-source-version.*` scripts provided in
145+
`tools/unix/` and `tools/windows/`, respectively.
146+
- To simplify creating reproducible builds, the Unix build process has been
147+
amended to compile and link source files in a well-defined order.
94148

95149
Other Noteworthy
96150
----------------
97151

152+
- During alpha development phase, POV-Ray v3.8.0-alpha for Windows will
153+
piggypack on an existing v3.7 installation to allow for raw binary
154+
distribution.
98155
- The source code now requires a C++11-compliant compiler.
99156
- The Unix build process now officially requires Autoconf 2.68 or later.
100157
- Added `--generation` command-line switch to POV-Ray for Unix, which will
101158
cause POV-Ray to print its abbreviated version number to standard output.
102-
- To simplify version number housekeeping, the file `unix/VERSION` is now
103-
created on the fly by the `unix/prebuild.sh` script, and has been dropped
104-
from the repository. To retrieve version information from the source
105-
package, use one of the new `get-source-version.*` scripts provided in
106-
`tools/unix/` and `tools/windows/`, respectively.
107159
- The `unix/prebuild.sh` script can now be run from the main directory; it is
108160
no longer necessary to change to the unix directory first.
161+
- The `./configure` script can now be run without the `COMPILED_BY=...`
162+
option. In this case it defaults to `$USER <no contact address>`, where
163+
`$USER` is your login name.
109164

110165

111166
Changes between 3.7.1-beta.9 and 3.7.1-rc.1

distribution/include/functions.inc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,12 @@
163163
// 2. y scale (inverse)
164164
// 3. z scale (inverse)
165165

166-
#declare f_enneper = function { internal(18) }
166+
#if (Functions_Inc_Temp < 3.8)
167+
#declare deprecated once "f_enneper was broken prior to v3.8; results will most likely differ."
168+
f_enneper = function { internal(18) }
169+
#else
170+
#declare f_enneper = function { internal(18) }
171+
#end
167172
// Parameters: x, y, z
168173
// One extra parameter required:
169174
// 1. Field strength

platform/unix/syspovtimer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -76,7 +76,7 @@ void Delay(unsigned int msec)
7676
timespec ts;
7777
ts.tv_sec = msec / 1000;
7878
ts.tv_nsec = (POV_ULONG) (1000000) * (msec % 1000);
79-
nanosleep(&ts, NULL);
79+
nanosleep(&ts, nullptr);
8080
#elif defined(HAVE_USLEEP)
8181
POV_ASSERT(msec < 1000); // On some systems, usleep() does not support sleeping for 1 second or more.
8282
usleep (msec * (useconds_t)1000);
@@ -126,7 +126,7 @@ static inline bool GettimeofdayMillisec(POV_ULONG& result)
126126
{
127127
#if defined(HAVE_GETTIMEOFDAY)
128128
struct timeval tv; // seconds + microseconds since
129-
bool success = (gettimeofday(&tv, NULL) == 0);
129+
bool success = (gettimeofday(&tv, nullptr) == 0);
130130
if (success)
131131
result = static_cast<POV_ULONG>(tv.tv_sec) *1000
132132
+ static_cast<POV_ULONG>(tv.tv_usec) /1000;

platform/windows/syspovtimer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -65,7 +65,7 @@ Timer::Timer () :
6565
// TODO - sources on the internet indicate that GetThreadTimes() and GetProcessTimes() have been
6666
// around as early as NT 3.1. Is there a reason we're only making use of it in NT 4.0 and
6767
// later Windows versions?
68-
mThreadHandle (NULL),
68+
mThreadHandle (nullptr),
6969
mCPUTimeSupported (WindowsVersionDetector().IsNTVersion (4,0))
7070
{
7171
if (mCPUTimeSupported)
@@ -74,15 +74,15 @@ Timer::Timer () :
7474
&mThreadHandle, 0, TRUE, DUPLICATE_SAME_ACCESS))
7575
{
7676
POV_ASSERT (false);
77-
mThreadHandle = NULL;
77+
mThreadHandle = nullptr;
7878
}
7979
}
8080
Reset ();
8181
}
8282

8383
Timer::~Timer ()
8484
{
85-
if (mThreadHandle != NULL)
85+
if (mThreadHandle != nullptr)
8686
CloseHandle (mThreadHandle);
8787
}
8888

platform/x86/cpuid.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -159,7 +159,7 @@ CPUVendorInfo gCPUVendorInfo[] = {
159159
{ kCPUVendor_VM, "VMwareVMware" }, // VMWare
160160
{ kCPUVendor_VM, "XenVMMXenVMM" }, // Xen HVM
161161
// End of list.
162-
{ kCPUVendor_Unrecognized, NULL }
162+
{ kCPUVendor_Unrecognized, nullptr }
163163
};
164164

165165
struct CPUIDInfo
@@ -197,7 +197,7 @@ CPUIDInfo::CPUIDInfo() :
197197
std::memcpy(vendor + 4, &info[CPUID_EDX], 4);
198198
std::memcpy(vendor + 8, &info[CPUID_ECX], 4);
199199
vendor[12] = '\0';
200-
for (CPUVendorInfo* p = gCPUVendorInfo; p->cpuidString != NULL; ++p)
200+
for (CPUVendorInfo* p = gCPUVendorInfo; p->cpuidString != nullptr; ++p)
201201
{
202202
if (strcmp(vendor, p->cpuidString) == 0)
203203
{

platform/x86/optimizednoise.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -92,8 +92,8 @@ OptimizedNoiseInfo gaOptimizedNoiseInfo[] = {
9292
AVXFMA4DNoise, // dNoise,
9393
&kAVXFMA4NoiseEnabled, // enabled,
9494
AVXFMA4Supported, // supported,
95-
NULL, // recommended,
96-
NULL // init
95+
nullptr, // recommended,
96+
nullptr // init
9797
},
9898
#endif
9999
#ifdef TRY_OPTIMIZED_NOISE_AVX
@@ -116,12 +116,12 @@ OptimizedNoiseInfo gaOptimizedNoiseInfo[] = {
116116
AVXPortableDNoise, // dNoise,
117117
&kAVXPortableNoiseEnabled, // enabled,
118118
AVXSupported, // supported,
119-
NULL, // recommended,
120-
NULL // init
119+
nullptr, // recommended,
120+
nullptr // init
121121
},
122122
#endif
123123
// End-of-list entry.
124-
{ NULL }
124+
{ nullptr }
125125
};
126126

127127
}

0 commit comments

Comments
 (0)